@ckeditor/ckeditor5-comments 46.0.0-alpha.6 → 46.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x45c52b={}){function _0x20882f(_0x50482e){return _0x50482e['map'](_0x3ba6d0=>String['fromCharCode'](_0x3ba6d0))['join']('');}(_0x45c52b=Object['assign']({},_0x45c52b))['plugins']||(_0x45c52b['plugins']=Qt['defaultPlugins']),super(_0x45c52b),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x20882f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x20882f([0x76,0x69,0x65,0x77])][_0x20882f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x20882f([0x61,0x75,0x74,0x6f]),this[_0x20882f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x20882f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x20882f([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x20882f([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x20882f([0x6f,0x6b])});}['create'](){const _0xba0117=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xba0117))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5bae79=>{const _0x2f5d24=this['model']['document']['getRoot'](),_0x4f8d05=_0x2f5d24&&_0x2f5d24['getChild'](_0x2f5d24['childCount']-0x1);_0x5bae79['setSelection'](_0x4f8d05,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x336f10=this['editing']['view'],_0x187faa=_0x336f10['document']['getRoot'](),_0x4cba84=_0x187faa['getChild'](0x0);_0x187faa['childCount']>0x1||!_0x4cba84||'p'!=_0x4cba84['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x336f10,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4cba84['placeholder']=this['placeholder']),St({'view':_0x336f10,'element':_0x4cba84,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4cba84);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1569f1,_0x506830={}){super(_0x1569f1),this['editor']=null,this['_editorConfig']=_0x506830,this['set']('value',_0x506830['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x1569f1,'Reply...')),this['set']('submitLabel',N(_0x1569f1,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xd0afa6(),this['focusCycler']=new _0x5aa072({'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',(_0x2a66a6,_0x2dcdf8)=>{this['cancelButtonView']['fire']('execute'),_0x2dcdf8();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4a8409,_0x1da544)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1da544());}),this['on']('submit',(_0x37f1d4,_0x3aa8e9)=>{_0x3aa8e9['length']>0xfde8?(alert(N(_0x1569f1,'TOO_LONG_COMMENT_ALERT',[_0x3aa8e9['length'],0xfde8])),_0x37f1d4['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4377d3=this['editor'];this['element']['insertBefore'](_0x4377d3['ui']['element'],this['element']['firstChild']),_0x4377d3['model']['document']['on']('change',()=>this['value']=_0x4377d3['getData']()),_0x4377d3['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4377d3['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3500d6){-0x1===_0x3500d6?(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:_0x1c0321}=this,_0x5940f5=new _0x1287d8(_0x1c0321);return _0x5940f5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5940f5['withText']=!0x0,_0x5940f5['bind']('label')['to'](this,'submitLabel'),_0x5940f5['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5940f5['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x15667b,_0x309ac7)=>!_0x309ac7&&!!_0x15667b['trim']()),_0x5940f5;}['_createCancelButton'](){const {locale:_0x206afa}=this,_0x2c762f=new _0x1287d8(_0x206afa);return _0x2c762f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2c762f['label']=N(_0x206afa,'Cancel'),_0x2c762f['withText']=!0x0,_0x2c762f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2c762f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x401ed3=>{this['focusTracker']['add'](_0x401ed3['element']);}),this['focusables']['on']('change',(_0x27d3c8,_0x483136)=>{for(const _0x55fed2 of Array['from'](_0x483136['added'])['reverse']())this['focusTracker']['add'](_0x55fed2['element']);});}}class ie extends kt{constructor(_0x1376d2,_0x47628d,_0x5e8551){super(_0x1376d2),this['commentInputView']=new es(_0x1376d2,_0x5e8551),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5eb802,_0x1354d8)=>_0x5eb802||!!_0x1354d8),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 _0x14525e(_0x1376d2,_0x47628d),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'](_0x378c86){this['commentInputView']['focus'](_0x378c86);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x124377,_0x5370e7)=>{const {submitButtonView:_0x429f86,cancelButtonView:_0x36404b,editor:_0x5e59a0}=this['commentInputView'];[_0x429f86['element'],_0x36404b['element'],_0x5e59a0?_0x5e59a0['editing']['view']['getDomRoot']():null]['filter'](_0xfdd7a4=>_0xfdd7a4)['some'](_0x25ae56=>_0x25ae56['contains'](_0x5370e7['target']))||(this['focus'](),_0x5370e7['preventDefault']());});}}class os extends kt{constructor(_0x5af62e){super(_0x5af62e);const _0x4b5d0f=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4b5d0f['to']('count',_0x22e840=>N(_0x5af62e,'NUMBER_OF_COMMENTS',_0x22e840))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x390062,_0x50a3f8,_0x1699da){super(_0x390062);const _0x4b9d22=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x50a3f8['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x50a3f8,this['_config']=_0x1699da,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xd0afa6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5aa072({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5b4f5f=>this['commentViews']['map'](_0x379221=>_0x379221['element'])['includes'](_0x5b4f5f['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x390062),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1baaaf=>_0x1baaaf-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5e25fa of _0x50a3f8['comments'])this['_handleNewCommentModel'](_0x5e25fa);this['_handleInfoComment'](),this['listenTo'](_0x50a3f8['comments'],'add',(_0x25cb3f,_0x43f916)=>{const _0x49cf90=this['_calculatePosition'](_0x43f916);this['length']++,this['_handleNewCommentModel'](_0x43f916,_0x49cf90),this['refreshVisibleViews']();}),this['listenTo'](_0x50a3f8['comments'],'remove',(_0x24515d,_0x11f6b6)=>{this['length']--,this['_handleRemoveCommentModel'](_0x11f6b6),this['refreshVisibleViews']();}),this['listenTo'](_0x50a3f8,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x50a3f8,'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',_0x4b9d22['if']('length','ck-hidden',_0x2a5346=>!_0x2a5346)],'aria-label':N(_0x390062,'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'](_0x2b6e41){-0x1===_0x2b6e41?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x28b15f of this['commentViews'])_0x28b15f['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x14d7b3,_0x3f266a){const _0x347b52=new this['_config']['CommentView'](this['locale'],_0x14d7b3,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x347b52['viewUid']=_0x14d7b3['id'],_0x347b52['delegate']('removeComment')['to'](this),_0x347b52['delegate']('updateComment')['to'](this),_0x347b52['delegate']('resolveCommentThread')['to'](this),_0x347b52['delegate']('editorReady')['to'](this),_0x347b52['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x347b52,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x347b52,_0x3f266a);}['_calculatePosition'](_0x1f796a){const _0x298260=this['_model']['_findOptimalIndex'](_0x1f796a);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1f796a['authoredAt']?_0x298260-0x1:_0x298260:_0x298260-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3409b4={'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'],_0x3409b4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3409b4));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xaede78){const _0x420ac2=this['commentViews']['remove'](_0xaede78['id']);this['stopListening'](_0x420ac2),_0x420ac2['isEditMode']&&this['_updateHasDirtyComment'](),_0x420ac2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x218c60=>_0x218c60['isEditMode']);}['_rearrangeCollapse'](){const _0x1aa583=function(_0x587e8e){const _0x4de10e=new _0x52f624();for(const _0x7b8b5d of _0x587e8e)_0x4de10e['add'](_0x7b8b5d);return _0x4de10e;}(this['commentViews']),_0x5b02c9=this['_collapsedCommentsView']['count'];for(let _0x115894=0x1;_0x115894<=_0x5b02c9;_0x115894++)_0x1aa583['remove'](0x1);for(const _0x117b76 of _0x1aa583)_0x117b76['collapse']();_0x5b02c9>0x0&&_0x1aa583['add'](this['_collapsedCommentsView'],0x1),rs(_0x3ec72e(Array['from'](this['visibleViews']),Array['from'](_0x1aa583)),this['visibleViews'],_0x1aa583);}['_rearrangeExpand'](){rs(_0x3ec72e(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1f85d4 of this['visibleViews'])_0x1f85d4['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2ee55b=>{this['focusTracker']['add'](_0x2ee55b['element']),this['keystrokes']['listenTo'](_0x2ee55b['element']);}),this['commentViews']['on']('change',(_0x3b1821,_0x255156)=>{for(const _0x486b7a of _0x255156['removed'])this['focusTracker']['remove'](_0x486b7a['element']),this['keystrokes']['stopListening'](_0x486b7a['element']);for(const _0x418f59 of Array['from'](_0x255156['added'])['reverse']())this['focusTracker']['add'](_0x418f59['element']),this['keystrokes']['listenTo'](_0x418f59['element']);});}}function rs(_0x495392,_0x59aa3e,_0x497a37){let _0x1c04a0=0x0;for(const _0x5153ea of _0x495392)switch(_0x5153ea){case'insert':_0x59aa3e['add'](_0x497a37['get'](_0x1c04a0),_0x1c04a0),_0x1c04a0++;break;case'delete':_0x59aa3e['remove'](_0x1c04a0);break;case'equal':_0x1c04a0++;}}class oe extends kt{constructor(_0x7d2504){super(_0x7d2504);const _0x2097a1=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2097a1['to']('contextValue',_0x2ebb4b=>N(_0x7d2504,'THREAD_CONTEXT_LABEL',_0x2ebb4b)),'tabindex':-0x1},'children':[{'text':_0x2097a1['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1775c3,_0x31536d){super(_0x1775c3);const _0x424c25=this['bindTemplate'];this['_model']=_0x31536d,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xd0afa6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5aa072({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x13090b=>!!_0x13090b),this['bind']('contextValue')['to'](this['_model'],'context',_0x1cc040=>_0x1cc040&&_0x1cc040['value']?this['_trimContextValue'](_0x1cc040['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',_0x424c25['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 _0x3c2bd0=new _0x1287d8(this['locale']);return _0x3c2bd0['label']=N(this['locale'],'Reopen'),_0x3c2bd0['tooltip']=N(this['locale'],'Reopen'),_0x3c2bd0['icon']=_0x11eb95,_0x3c2bd0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x195259=>!_0x195259),_0x3c2bd0['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x7f0b1c,_0xbe15)=>_0x7f0b1c&&_0xbe15),_0x3c2bd0['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3c2bd0;}['_trimContextValue'](_0x1d81a4){if(_0x1d81a4['length']<0x96)return _0x1d81a4;const _0x37a2ae=_0x1d81a4['lastIndexOf']('\x20',0x93);return _0x1d81a4['substring'](0x0,_0x37a2ae>-0x1?_0x37a2ae:0x93)+'...';}['_attachContextActions'](){const _0x1cfb98=this['element']['querySelector']('.ck-context'),_0x546b24=_0x1cfb98['querySelector']('.ck-context__value');this['listenTo'](_0x1cfb98,'mouseenter',()=>{_0x546b24['offsetWidth']<_0x546b24['scrollWidth']&&_0x1cfb98['classList']['add']('overlay');}),this['listenTo'](_0x1cfb98,'mouseleave',()=>{_0x1cfb98['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3cebbf of this['focusables'])this['focusTracker']['add'](_0x3cebbf['element']),this['keystrokes']['listenTo'](_0x3cebbf['element']);}['_createContextView'](){const _0x55d252=new oe(this['locale']);return _0x55d252['bind']('contextValue')['to'](this),_0x55d252;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2ecd8f,_0x13b180,_0x1e453a,_0x364a47){super(_0x2ecd8f),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x13b180,this['_localUser']=_0x1e453a,this['_config']=_0x364a47,this['commentThreadHeaderView']=new Xt(_0x2ecd8f,_0x13b180),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x2ecd8f,N(_0x2ecd8f,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2ecd8f,_0x13b180,Object['assign']({'CommentView':this['_config']['CommentView']},_0x364a47)),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',(_0x305339,_0x400a91)=>_0x305339||!!_0x400a91),this['bind']('isUnlinked')['to'](_0x13b180,'unlinkedAt',_0x2a94e8=>!!_0x2a94e8),this['bind']('ariaLabel')['to'](this,'length',_0x5c5ec1=>{const _0x590c3d=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x5c5ec1,_0x590c3d]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xd0afa6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5aa072({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1e6b8c=>_0x1e6b8c['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 _0x263075=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x381330=_0x263075['commentInputView'];return _0x263075['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x381330,'value',(_0x4f83bf,_0x275764,_0x488920,_0x50cd44,_0x5597d6)=>!!_0x5597d6||!!_0x50cd44&&_0x488920&&!_0x275764||_0x4f83bf&&_0x488920&&!_0x275764),_0x381330['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3faebe,_0x55bd9f,_0x118b38)=>{let _0x3bede7;return _0x3bede7=_0x118b38&&_0x55bd9f?'Reply\x20to\x20reopen\x20discussion...':_0x3faebe?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3bede7);}),_0x381330['bind']('submitLabel')['to'](this,'length',_0x2f0145=>N(this['locale'],_0x2f0145?'Reply':'Comment')),_0x381330['on']('submit',(_0x3a2c94,_0x4ca916)=>{this['fire']('addComment',_0x4ca916),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x381330['on']('cancel',()=>{this['focus']();}),_0x381330['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x381330['on']('cancel',_0x24d551=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x24d551['stop']());}),this['on']('change:isActive',(_0xd145ca,_0x581385,_0x46d11c)=>{_0x46d11c||this['length']||_0x381330['value']||this['fire']('removeCommentThread');}),_0x263075;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x2f0bd8(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2c148b,target:_0x1e506c,type:_0x46f990,isVisible:_0x7378c=!0x0}){super(),this['view']=_0x2c148b,this['view']['element']||this['view']['render'](),this['_type']=_0x46f990,this['_target']=_0x1e506c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x52f624([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x20c088,_0x1e56bf)=>{this['view']['focusTracker']['add'](_0x1e56bf);}),this['focusableElements']['on']('remove',(_0x7b572c,_0x1277e2)=>{this['view']['focusTracker']['remove'](_0x1277e2);}),this['set']('isVisible',_0x7378c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3f78ae=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x3f78ae),_0x3f78ae;}get['targetRect'](){const _0x34cba1=this['target'];if(null===_0x34cba1)return null;if(_0x34cba1 instanceof _0x206900)return _0x34cba1;const _0x519666=_0x34cba1['filter'](_0x57618b=>function(_0x316273){const _0x16acfe=_0x316273['offsetParent'];if(_0x16acfe)return!0x0;const _0x3069ec=_0x316273['getClientRects']()['item'](0x0);return!!_0x3069ec;}(_0x57618b));return 0x0===_0x519666['length']?null:new _0x206900(_0x519666[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x7263e6){this['view']['isActive']=_0x7263e6,this['view']['mainView']['isActive']=_0x7263e6;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x361c6c){if(!(null===_0x361c6c||_0x361c6c instanceof _0x206900||Array['isArray'](_0x361c6c)&&_0x361c6c['every'](_0x38dcac=>fi(_0x38dcac))))throw new _0xcbec56('annotation-invalid-target',null,{'target':_0x361c6c});}['_getNormalizedTarget'](){const _0x3fb0ae='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x3fb0ae)?[_0x3fb0ae]:_0x3fb0ae;}}function fi(_0x5c7c1b){return null!==_0x5c7c1b&&'object'==typeof _0x5c7c1b&&'nodeType'in _0x5c7c1b&&0x1===_0x5c7c1b['nodeType'];}class S extends _0x52f624{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x6f9637=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xd0afa6(),this['_focusTracker']['on']('change:isFocused',(_0x2f5876,_0xedf7f7,_0x58f6ef)=>{_0x58f6ef||this['fire']('blur');});for(const _0x222839 of _0x6f9637)this['add'](_0x222839);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xaa3245){if(this['has'](_0xaa3245))throw new _0xcbec56('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xaa3245['innerView'],_0xaa3245),this['_viewToAnnotation']['set'](_0xaa3245['view'],_0xaa3245);for(const _0xd025f7 of _0xaa3245['focusableElements'])this['_focusTracker']['add'](_0xd025f7);this['listenTo'](_0xaa3245['focusableElements'],'add',(_0x118fa5,_0x42f032)=>{this['_focusTracker']['add'](_0x42f032);}),this['listenTo'](_0xaa3245['focusableElements'],'remove',(_0x3f85e2,_0x3bca5d)=>{this['_focusTracker']['remove'](_0x3bca5d);}),this['listenTo'](_0xaa3245['view']['focusTracker'],'change:isFocused',(_0x178811,_0x203346,_0x497360)=>{_0x497360&&this['fire']('focus',_0xaa3245);}),_0xaa3245['updateTargetRect']();const _0x55e3af=this['_getOrderInContent'](_0xaa3245['view']['targetRect']);return super['add'](_0xaa3245,_0x55e3af);}['remove'](_0x44a740){if(!this['has'](_0x44a740))throw new _0xcbec56('annotationcollection-not-existing-item',null);this['stopListening'](_0x44a740['view']['focusTracker']),this['stopListening'](_0x44a740['focusableElements']);for(const _0x15b614 of _0x44a740['focusableElements'])this['_focusTracker']['remove'](_0x15b614);return this['_viewToAnnotation']['delete'](_0x44a740['view']),this['_innerViewToAnnotation']['delete'](_0x44a740['innerView']),super['remove'](_0x44a740);}['getByInnerView'](_0x4b2b3c){return this['_innerViewToAnnotation']['get'](_0x4b2b3c);}['getByView'](_0x58b314){return this['_viewToAnnotation']['get'](_0x58b314);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x28ad23 of this)_0x28ad23['updateTargetRect']();this['_sort']();}['_sort'](){const _0x257516=Array['from'](this)['sort']((_0x4b2609,_0x149ee3)=>w(_0x4b2609['view']['targetRect'],_0x149ee3['view']['targetRect']));for(let _0xb63805=_0x257516['length']-0x1;_0xb63805>0x0;_0xb63805--){const _0x272f9f=_0x257516[_0xb63805];_0xb63805!==this['getIndex'](_0x272f9f)&&(this['remove'](_0x272f9f),this['add'](_0x272f9f));}}['_getOrderInContent'](_0x22337a){let _0x1885bb=0x0;if(!_0x22337a)return this['length'];for(const _0x38ad06 of this){const _0xd320cb=_0x38ad06['view']['targetRect'];if(_0xd320cb){if(w(_0x22337a,_0xd320cb)<0x0)return _0x1885bb;_0x1885bb++;}}return _0x1885bb;}}function v({source:_0x52fcd4,target:_0x4bb3bf,filter:_0x3485ef}){for(const _0x1ae002 of _0x52fcd4)_0x3485ef(_0x1ae002)&&_0x4bb3bf['add'](_0x1ae002);_0x4bb3bf['listenTo'](_0x52fcd4,'add',(_0x323f96,_0x32b164)=>{_0x3485ef(_0x32b164)&&_0x4bb3bf['add'](_0x32b164);}),_0x4bb3bf['listenTo'](_0x52fcd4,'remove',(_0x4edafb,_0x4e40e8)=>{_0x4bb3bf['has'](_0x4e40e8)&&_0x4bb3bf['remove'](_0x4e40e8);});}function w(_0x388229,_0x2c2ffc){if(null===_0x388229&&null===_0x2c2ffc)return 0x0;if(null===_0x388229)return-0x1;if(null===_0x2c2ffc)return 0x1;const _0x43bc54=_0x388229['top']-_0x2c2ffc['top'];return 0x0==_0x43bc54?_0x388229['left']-_0x2c2ffc['left']:_0x43bc54;}class y extends _0x5d570f{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xaa31a6){if(super(_0xaa31a6),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xaa31a6 instanceof _0x14e4ce){const _0x2ab5bd=_0xaa31a6['locale'];_0xaa31a6['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x2ab5bd,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x2ab5bd,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x2ab5bd,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x2ab5bd,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x2ab5bd,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x2ab5bd,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x2ab5bd,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2c6175){this['collection']['add'](_0x2c6175);}['remove'](_0x25741d){this['collection']['remove'](_0x25741d),_0x25741d['destroy']();}['refreshVisibility'](){for(const _0x39a297 of this['collection'])_0x39a297['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xd9af78){return this['collection']['getByInnerView'](_0xd9af78);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xd8aa8d of this['collection'])_0xd8aa8d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1c439c){this['fire']('_activateAnnotation',_0x1c439c);}['createAnnotation'](_0x187dce){return new T(_0x187dce);}['createAnnotationView'](_0x5ec4b8,_0x2a044){return new E(_0x5ec4b8,_0x2a044);}['_addActiveAnnotation'](_0x2eb980){const _0x9c20cb=new Set(this['activeAnnotations']);_0x9c20cb['add'](_0x2eb980),this['activeAnnotations']=_0x9c20cb;}['_removeActiveAnnotation'](_0x255a09){const _0x506267=new Set(this['activeAnnotations']);_0x506267['delete'](_0x255a09),this['activeAnnotations']=_0x506267;}['_bindAnnotationsToVisibleAnnotations'](){const _0x184554=this['collection'],_0x5326a8=this['_visibleAnnotations'];function _0x5cbc2d(_0x4c83d7){const _0x389967=_0x4c83d7['source'];_0x389967['isVisible']&&!_0x5326a8['has'](_0x389967)?_0x5326a8['add'](_0x389967):!_0x389967['isVisible']&&_0x5326a8['has'](_0x389967)&&_0x5326a8['remove'](_0x389967),_0x389967['view']['focusTracker']['remove'](_0x389967['view']['element']),_0x389967['view']['focusTracker']['add'](_0x389967['view']['element']);}this['listenTo'](_0x184554,'add',(_0x191dd4,_0x469a1f)=>{_0x469a1f['isVisible']&&_0x5326a8['add'](_0x469a1f),this['listenTo'](_0x469a1f,'change:isVisible',_0x5cbc2d);}),this['listenTo'](_0x184554,'remove',(_0x1121da,_0x5b69d9)=>{_0x5326a8['has'](_0x5b69d9)&&_0x5326a8['remove'](_0x5b69d9),this['stopListening'](_0x5b69d9,'change:isVisible',_0x5cbc2d);});}['_setupEnterAnnotationKeystroke'](){const _0x449239=_0x3556f3=>{_0x3556f3['on']('ready',()=>{_0x3556f3['keystrokes']['set'](_0x5c1279,(_0x3b2467,_0x31885c)=>{const _0x4e2f1a=_0x1af6d5(this['activeAnnotations']['values']());_0x4e2f1a&&(_0x4e2f1a['view']['focus'](),_0x31885c());});});};this['context']instanceof _0x14e4ce?_0x449239(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xf58ce5,_0x1c369e)=>{_0x449239(_0x1c369e);});}['_setupEscapeAnnotationHandling'](){const _0x2543c8=_0x5eb76a=>{const _0xa15488=_0x5eb76a['source'],_0xb5550d=[];let _0x52a966;if(Array['isArray'](_0xa15488['target'])){_0x52a966=_0xa15488['target'][0x0],this['context']instanceof _0x14e4ce?_0xb5550d['push'](this['context']):this['context']['editors']&&_0xb5550d['push'](...this['context']['editors']);for(const _0x313db8 of _0xb5550d)for(const _0x23d3b6 of _0x313db8['editing']['view']['domRoots']['values']())if(_0x23d3b6['contains'](_0x52a966))return void _0x313db8['editing']['view']['focus']();_0x52a966['focus']();}};this['listenTo'](this['collection'],'add',(_0x2fdb67,_0x7d3670)=>{this['listenTo'](_0x7d3670,'escape',_0x2543c8,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x585142,_0x9d4035)=>{this['stopListening'](_0x9d4035,'escape',_0x2543c8);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x5d570f{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x36ce2b){super(_0x36ce2b),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1a5788=this['context']['config'];_0x1a5788['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1a5788['define']('comments.maxThreadTotalWeight',0x1f4),_0x1a5788['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1a5788['define']('comments.CommentThreadView',vt),_0x1a5788['define']('comments.CommentView',gt),_0x1a5788['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x292c06=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xdc142e,_0x46c06b)=>this['_addCommentThread'](_0x46c06b)),this['on']('submitCommentThread',(_0x3cf888,_0x38f7ee)=>this['_submitCommentThread'](_0x38f7ee)),this['on']('resolveCommentThread',(_0x15bceb,_0xd948f2)=>this['_resolveCommentThread'](_0xd948f2)),this['on']('resolveCommentThread',(_0x329672,_0x51e704)=>this['_updateActiveAnnotation'](_0x51e704),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x633bc3,_0x3017ff)=>this['_reopenCommentThread'](_0x3017ff)),this['on']('reopenCommentThread',(_0x5c45ed,_0x2d05c2)=>this['_updateActiveAnnotation'](_0x2d05c2),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5cc207,_0x39b94c)=>this['_removeCommentThread'](_0x39b94c)),this['on']('updateCommentThread',(_0x23b5c4,_0x1cd0b1)=>this['_updateCommentThread'](_0x1cd0b1)),this['on']('updateCommentThread',(_0x2da7df,_0x51005f)=>this['_updateActiveAnnotation'](_0x51005f),{'priority':'lowest'}),this['on']('addComment',(_0x4725fc,_0x3018e5)=>this['_addComment'](_0x3018e5)),this['on']('updateComment',(_0x1c7fe9,_0x494009)=>this['_updateComment'](_0x494009)),this['on']('removeComment',(_0x449a5d,_0x18d14f)=>this['_removeComment'](_0x18d14f)),this['on']('addComment',(_0x126e6e,{threadId:_0x2368d9,isFromAdapter:_0x54b3e2})=>{if(_0x54b3e2)return;const _0x57fd71=this['getCommentThread'](_0x2368d9),_0x5b1418=_0x57fd71&&this['_threadToController']['get'](_0x57fd71);_0x5b1418&&_0x5b1418['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x292c06,'change:activeAnnotations',(_0x11a7e5,_0x1e1e04,_0x4b752a)=>{const _0x4b3547=Array['from'](_0x4b752a)['map'](_0x597df7=>this['_viewToController']['get'](_0x597df7['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4b3547?_0x4b3547['model']:null;});}set['adapter'](_0x2ff62d){if(this['_adapter'])throw new _0xcbec56('commentsrepository-adapter-already-set');this['_adapter']=_0x2ff62d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x30e935=Tt,threadId:_0x2fa5ba=_0x3b7a37(),comments:_0xd1fc60=[],unlinkedAt:_0x2d140d=null,resolvedAt:_0x4c0000=null,resolvedBy:_0x1518f3=null,target:_0x3071f2=null,context:_0xb8bdb8=null,attributes:_0x371082={},isResolvable:_0x3da4c3=!0x0,isSubmitted:_0x31fddf=!0x1,isFromAdapter:_0x17acca=!0x1}={}){return this['fire'](bt('addCommentThread',_0x30e935),{'channelId':_0x30e935,'threadId':_0x2fa5ba,'comments':_0xd1fc60,'unlinkedAt':_0x2d140d,'resolvedAt':_0x4c0000,'resolvedBy':_0x1518f3,'target':_0x3071f2,'context':_0xb8bdb8,'attributes':_0x371082,'isFromAdapter':_0x17acca,'isResolvable':_0x3da4c3,'isSubmitted':_0x31fddf}),this['getCommentThread'](_0x2fa5ba);}['openNewCommentThread']({channelId:_0x271635=Tt,threadId:_0x353dbb=_0x3b7a37(),target:_0x59fb57,context:_0x1829a6=null,isResolvable:_0x29f4bd=!0x0}){if(this['_readOnlyChannels']['has'](_0x271635)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x59fb57)throw new _0xcbec56('commentsrepository-missing-target');const _0x3fea95=this['addCommentThread']({'channelId':_0x271635,'threadId':_0x353dbb,'target':_0x59fb57,'context':_0x1829a6,'isResolvable':_0x29f4bd});if(!_0x3fea95)return null;const _0x3a6775=this['_threadToController']['get'](_0x3fea95),_0x44edab=_0x3a6775['view']['commentThreadInputView']['commentInputView'],_0x4ebf45=this['context']['plugins']['get'](y),_0x4d9ba4=_0x4ebf45['getByInnerView'](_0x3a6775['view']);return _0x4ebf45['activate'](_0x4d9ba4),_0x44edab['once']('editorReady',()=>_0x44edab['focus']()),_0x3fea95;}['hasCommentThread'](_0x3d8df5){if('string'!=typeof _0x3d8df5)throw new _0xcbec56('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3d8df5);}['updateCommentThread']({channelId:_0x1297ab=Tt,threadId:_0x52c6c7,context:_0x39eeee,unlinkedAt:_0x23024f,attributes:_0x162992,isFromAdapter:_0x35dae8=!0x1}){return this['fire'](bt('updateCommentThread',_0x1297ab),{'channelId':_0x1297ab,'threadId':_0x52c6c7,'context':_0x39eeee,'unlinkedAt':_0x23024f,'attributes':_0x162992,'isFromAdapter':_0x35dae8}),this['getCommentThread'](_0x52c6c7);}['getCommentThread'](_0x3654a6){if('string'!=typeof _0x3654a6)throw new _0xcbec56('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3654a6);}['fetchCommentThread']({channelId:_0x3d3e05,threadId:_0x4a1d63}={}){const _0x5f5b94=this['getCommentThread'](_0x4a1d63);if(_0x5f5b94)return Promise['resolve'](_0x5f5b94);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xcbec56('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3d3e05,'threadId':_0x4a1d63})['then'](_0x2bdd57=>this['hasCommentThread'](_0x4a1d63)?this['getCommentThread'](_0x4a1d63):_0x2bdd57?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3d3e05},_0x2bdd57)):void 0x0)['catch'](_0xb81989=>{throw console['error'](_0xb81989),new _0xcbec56('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x313c2e,skipNotAttached:_0x3ab758=!0x1,skipEmpty:_0x56c3c8=!0x1,toJSON:_0x101f1d=!0x1}={}){const _0x903cdf=[];for(const _0x163821 of this['_threads']['values']())_0x313c2e&&_0x163821['channelId']!==_0x313c2e||_0x3ab758&&!_0x163821['isAttached']||_0x56c3c8&&0x0===_0x163821['length']||_0x903cdf['push'](_0x163821);return _0x101f1d?_0x903cdf['map'](_0x2ff497=>_0x2ff497['toJSON']()):_0x903cdf;}['getAnnotationForCommentThread'](_0x21fdb5){const _0x2f7d7c=this['_threadToController']['get'](_0x21fdb5);if(!_0x2f7d7c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2f7d7c['view'])||null;}['getCommentThreadForAnnotation'](_0x5a32c4){const _0xf961d3=this['_viewToController']['get'](_0x5a32c4['innerView']);return _0xf961d3?_0xf961d3['model']:null;}['setActiveCommentThread'](_0x55cd31){const _0x17c413=this['context']['plugins']['get'](y);if(!_0x55cd31)return void(this['activeCommentThread']&&_0x17c413['deactivateAll']());const _0x4a68ad=this['getCommentThread'](_0x55cd31);if(!_0x4a68ad)throw new _0xcbec56('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x55cd31});if(!this['_threadToController']['has'](_0x4a68ad))throw new _0xcbec56('commentsrepository-active-not-attached',null,{'threadId':_0x55cd31});const _0x5594fc=_0x17c413['getByInnerView'](this['_threadToController']['get'](_0x4a68ad)['view']);_0x17c413['activate'](_0x5594fc);}['switchReadOnly'](_0x1d1c03,_0x15d56d){_0x1d1c03?this['_readOnlyChannels']['add'](_0x15d56d):this['_readOnlyChannels']['delete'](_0x15d56d),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x24707c){return this['_readOnlyChannels']['has'](_0x24707c)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x34bf05,_0x353d8c){return new yt(_0x34bf05,_0x353d8c);}['setPermissions'](_0x9002c5,_0x16be48=Tt){this['_permissions']['set'](_0x16be48,_0x9002c5),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x28eea8=Tt){return this['_permissions']['has'](_0x28eea8)?this['_permissions']['get'](_0x28eea8):_t;}['_addCommentThread']({channelId:_0x5cfdac,threadId:_0x5dbf61,comments:_0x6305ba,unlinkedAt:_0x4f1237,resolvedAt:_0x2d7d5f,resolvedBy:_0x6d643e,target:_0x11b1c9,context:_0x2423e0,attributes:_0x5b3f09,isFromAdapter:_0x26574d,isResolvable:_0x3bd241,isSubmitted:_0x2744c5}){if('string'!=typeof _0x5dbf61)throw new _0xcbec56('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5dbf61});if(this['hasCommentThread'](_0x5dbf61))throw new _0xcbec56('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5dbf61});const _0x4b91de=new pi(this,{'channelId':_0x5cfdac,'id':_0x5dbf61,'context':_0x2423e0,'attributes':_0x5b3f09,'unlinkedAt':_0x4f1237,'resolvedAt':_0x2d7d5f,'resolvedBy':_0x6d643e?this['context']['plugins']['get'](it)['getUser'](_0x6d643e):null,'isResolvable':_0x3bd241,'isSubmitted':_0x2744c5||_0x26574d});this['_threads']['set'](_0x5dbf61,_0x4b91de);for(const _0x5bb01c of _0x6305ba)_0x4b91de['_add'](this['_createNewComment']({'threadId':_0x5dbf61,..._0x5bb01c}));return _0x11b1c9&&_0x4b91de['attachTo'](_0x11b1c9),_0x26574d||!_0x4b91de['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5cfdac,'threadId':_0x5dbf61});}['_submitCommentThread']({channelId:_0x51fbfd,threadId:_0x5b7259}){if(!this['hasCommentThread'](_0x5b7259))throw new _0xcbec56('commentsrepository-missing-comment-thread',this);const _0x59f469=this['getCommentThread'](_0x5b7259);if(_0x59f469['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x56c440,comments:_0x1d53bf,resolvedAt:_0x548c8b,resolvedBy:_0x1b3629,context:_0x2b19df,attributes:_0x3decfd}=_0x59f469,_0x409703=this['context']['plugins']['get']('PendingActions'),_0x479c11=_0x409703['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x51fbfd,'threadId':_0x56c440,'comments':_0x1d53bf['map'](_0x1c470=>_0x1c470['toJSON']()),'resolvedAt':_0x548c8b,'resolvedBy':_0x1b3629?_0x1b3629['id']:_0x1b3629,'context':_0x2b19df,'attributes':_0x3decfd})['then'](({comments:_0x7b389e})=>{_0x409703['remove'](_0x479c11);for(const _0x19d52d of _0x7b389e)this['_updateComment']({'channelId':_0x51fbfd,'threadId':_0x5b7259,'commentId':_0x19d52d['commentId'],'createdAt':_0x19d52d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x56e9f2=>{throw console['error'](_0x56e9f2),new _0xcbec56('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x21e31f,target:_0x9740c1}){const _0x6c07d3=this['getCommentThread'](_0x21e31f);if(!_0x6c07d3)throw new _0xcbec56('commentsrepository-attach-missing-comment-thread',this);const _0x3b35eb=this['context']['plugins']['get']('PendingActions'),_0x4d59f2=this['context']['plugins']['get'](y),_0x4aa4c5=this['_createCommentThreadView'](_0x6c07d3),_0x42f18e=new yt(_0x6c07d3,_0x4aa4c5);let _0x30765f=null;_0x4aa4c5['on']('change:isDirty',(_0x2d8b2b,_0x194c80,_0x12917c)=>{_0x12917c?_0x30765f=_0x3b35eb['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x30765f&&(_0x3b35eb['remove'](_0x30765f),_0x30765f=null);}),this['_threadToController']['set'](_0x6c07d3,_0x42f18e),this['_viewToController']['set'](_0x4aa4c5,_0x42f18e);const _0x32ec94=new E(this['context']['locale'],_0x4aa4c5);_0x32ec94['bind']('length')['to'](_0x4aa4c5),_0x32ec94['bind']('isDirty')['to'](_0x4aa4c5,'isDirty',_0x4aa4c5,'length',(_0x527e3a,_0x3e525a)=>_0x527e3a||!_0x3e525a),_0x32ec94['bind']('isActive')['to'](_0x4aa4c5),_0x32ec94['type']='comment';const _0x4ef611=new T({'view':_0x32ec94,'target':_0x9740c1,'type':'comment','isVisible':!_0x6c07d3['archivedAt']});return _0x4aa4c5['on']('escape',()=>{_0x4ef611['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4aa4c5,_0x4ef611),_0x4d59f2['add'](_0x4ef611),_0x4ef611;}['_bindAnnotationToEditors'](_0x561dfe,_0x1d8b20){this['listenTo'](_0x561dfe,'editorReady',(_0x1f6fc9,_0xb76c72)=>{const _0x3036bc=_0xb76c72['ui']['view']['body']['bodyCollectionContainer'];_0x1d8b20['focusableElements']['add'](_0x3036bc),this['context']instanceof _0x14e4ce&&this['context']['ui']['focusTracker']['add'](_0x3036bc);},{'priority':'highest'}),this['listenTo'](_0x561dfe,'editorDestroyed',(_0x1b90e6,_0xced457)=>{const _0x443472=_0xced457['ui']['view']['body']['bodyCollectionContainer'];_0x1d8b20['focusableElements']['has'](_0x443472)&&_0x1d8b20['focusableElements']['remove'](_0x443472),this['context']instanceof _0x14e4ce&&this['context']['ui']['focusTracker']['remove'](_0x443472);});}['_unbindEditors'](_0x2b9dc3){this['stopListening'](_0x2b9dc3,'editorReady'),this['stopListening'](_0x2b9dc3,'editorDestroyed');}['_createCommentThreadView'](_0x3c8f2c){const _0x4bd6ff=this['context']['plugins']['get'](it),{config:_0x4d21f5,locale:_0x370fa9}=this['context'],_0x11cc4e=lt(_0x4d21f5['get']('locale'),_0x370fa9);return new(0x0,(_0x4d21f5['get']('comments'))['CommentThreadView'])(_0x370fa9,_0x3c8f2c,_0x4bd6ff['me'],{'editorConfig':{..._0x4d21f5['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4d21f5['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4d21f5['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4d21f5['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4d21f5['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x11cc4e,'CommentView':_0x4d21f5['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x32aca3,channelId:_0x3306a3,resolvedAt:_0x3434a4,resolvedBy:_0x57c2ac,isFromAdapter:_0xa842a}){if(!this['hasCommentThread'](_0x32aca3))throw new _0xcbec56('commentsrepository-missing-comment-thread',null,{'threadId':_0x32aca3});const _0x106454=this['getCommentThread'](_0x32aca3);if(_0x106454['isResolved'])throw new _0xcbec56('commentsrepository-resolved-comment-thread',null,{'threadId':_0x32aca3});const _0xc3bcc=this['context']['plugins']['get'](it);if(_0x106454['resolvedBy']=_0xc3bcc['getUser'](_0x57c2ac),_0x106454['resolvedAt']=_0x3434a4,_0xa842a||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x8b6740=this['context']['plugins']['get']('PendingActions'),_0x3b8837=_0x8b6740['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3306a3,'threadId':_0x32aca3})['then'](({resolvedAt:_0x31d672,resolvedBy:_0x5e15fb})=>{_0x8b6740['remove'](_0x3b8837),_0x106454['resolvedBy']['id']!==_0x5e15fb&&(_0x106454['resolvedBy']=_0xc3bcc['getUser'](_0x5e15fb)),_0x106454['resolvedAt']=_0x31d672;})['catch'](_0x2d5e0f=>{throw console['error'](_0x2d5e0f),new _0xcbec56('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x7bcba5,channelId:_0x4f881d,isFromAdapter:_0x3eda01}){if(!this['hasCommentThread'](_0x7bcba5))throw new _0xcbec56('commentsrepository-missing-comment-thread',null,{'threadId':_0x7bcba5});const _0x153a4e=this['getCommentThread'](_0x7bcba5);if(!_0x153a4e['isResolved'])throw new _0xcbec56('commentsrepository-reopen-comment-thread',null,{'threadId':_0x7bcba5});if(_0x153a4e['resolvedBy']=null,_0x153a4e['resolvedAt']=null,_0x3eda01||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x24333f=this['context']['plugins']['get']('PendingActions'),_0x225022=_0x24333f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4f881d,'threadId':_0x7bcba5})['then'](()=>_0x24333f['remove'](_0x225022))['catch'](_0x4af221=>{throw console['error'](_0x4af221),new _0xcbec56('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x149442,isFromAdapter:_0x4c439a}){const _0x8794e5=this['getCommentThread'](_0x149442);if(!_0x8794e5)throw new _0xcbec56('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x149442),this['_threads']['delete'](_0x149442),!_0x8794e5['isSubmitted']||_0x4c439a||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x51d21b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44cc6c}=_0x8794e5,_0x1efcc3=_0x51d21b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x44cc6c,'threadId':_0x149442})['then'](()=>_0x51d21b['remove'](_0x1efcc3))['catch'](_0xfe75c1=>{throw console['error'](_0xfe75c1),new _0xcbec56('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x433035,unlinkedAt:_0x26b66e,context:_0x20f07f,attributes:_0x1325ab,isFromAdapter:_0xa1ec6d}){if('string'!=typeof _0x433035)throw new _0xcbec56('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x433035});if(!this['hasCommentThread'](_0x433035))throw new _0xcbec56('commentsrepository-missing-comment-thread',null,{'threadId':_0x433035});const _0x457e74=this['getCommentThread'](_0x433035);let _0x3d6491=!0x1;if(void 0x0!==_0x20f07f&&_0x457e74['context']!==_0x20f07f&&(_0x457e74['context']=_0x20f07f,_0x3d6491=!0x0),void 0x0!==_0x26b66e&&_0x457e74['unlinkedAt']!==_0x26b66e&&(_0x457e74['unlinkedAt']=_0x26b66e,_0x3d6491=!0x0),_0x1325ab&&!wt(_0x1325ab,_0x457e74['attributes'])&&(_0x457e74['attributes']=_0x1325ab,_0x3d6491=!0x0),!_0x3d6491)return Promise['resolve']();if(!_0x457e74['isSubmitted']||_0xa1ec6d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x20bdd0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x26fa04}=_0x457e74,_0x40ddbb=_0x20bdd0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x26fa04,'threadId':_0x433035,'context':_0x20f07f,'unlinkedAt':_0x26b66e,'attributes':_0x1325ab})['then'](()=>_0x20bdd0['remove'](_0x40ddbb))['catch'](_0x341ba6=>{throw console['error'](_0x341ba6),new _0xcbec56('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x36ea28){const _0x382433=this['context']['plugins']['get'](y),_0x2e19df=this['getCommentThread'](_0x36ea28);if(_0x2e19df['_isAttached']=!0x1,this['_threadToController']['has'](_0x2e19df)){const _0x3adfb0=this['_threadToController']['get'](_0x2e19df),_0x5db8b7=_0x3adfb0['view'],_0x4cd972=_0x382433['getByInnerView'](_0x5db8b7);this['_threadToController']['delete'](_0x2e19df),this['_viewToController']['delete'](_0x5db8b7),_0x4cd972&&_0x382433['remove'](_0x4cd972),_0x3adfb0['destroy'](),_0x5db8b7['destroy']()['then'](()=>{this['_unbindEditors'](_0x5db8b7);});}}['_updateActiveAnnotation']({threadId:_0x464181,resolvedAt:_0x47aec1,unlinkedAt:_0x5aee8d}){const _0x1716cb=!!_0x47aec1,_0x18508e=this['context']['plugins']['get'](y),_0x4fa743=this['getCommentThread'](_0x464181);if(this['_threadToController']['has'](_0x4fa743)){const _0x276542=this['_threadToController']['get'](_0x4fa743)['view'],_0x4ab854=_0x18508e['getByInnerView'](_0x276542);_0x4ab854&&(_0x1716cb&&_0x18508e['_removeActiveAnnotation'](_0x4ab854),_0x5aee8d?_0x4ab854['isVisible']=!0x1:_0x4ab854['refreshVisibility']());}}['_getExternalAuthor'](_0x2f9443){const _0x2b5631=this['context']['plugins']['get'](it),_0x4f200f=pt('external:'+_0x2f9443),_0x53ccb5=_0x2b5631['getUser'](_0x4f200f);return _0x53ccb5||_0x2b5631['addUser']({'id':_0x4f200f,'name':_0x2f9443});}['_createNewComment']({threadId:_0x439ed8,commentId:_0x2dd1f7=_0x3b7a37(),content:_0xa8f7a6,authorId:_0x1115fa,createdAt:_0x33e31c,attributes:_0x1c07e9}){if('string'!=typeof _0x2dd1f7)throw new _0xcbec56('commentsrepository-invalid-commentid');if('string'!=typeof _0x1115fa)throw new _0xcbec56('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xa8f7a6||!_0xa8f7a6['trim']())throw new _0xcbec56('commentsrepository-invalid-comment-content');const _0x344c55=this['context']['plugins']['get'](it)['getUser'](_0x1115fa);if(!_0x344c55)throw new _0xcbec56('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1115fa});let _0x1baaf9=null,_0x5c792b=_0x33e31c;return _0x1c07e9?.['@external']&&(_0x1baaf9=this['_getExternalAuthor'](_0x1c07e9['@external']['authorName']),_0x5c792b=new Date(_0x1c07e9['@external']['createdAt'])),new wi(this,{'threadId':_0x439ed8,'id':_0x2dd1f7,'author':_0x1baaf9||_0x344c55,'creator':_0x344c55,'content':_0xa8f7a6,'createdAt':_0x33e31c,'authoredAt':_0x5c792b,'attributes':_0x1c07e9});}['_addComment'](_0x2f7a3b){let {threadId:_0x204984,content:_0x6a6687,attributes:_0x2fd42c,isFromAdapter:_0x8c78e6}=_0x2f7a3b;const _0x117e05=this['getCommentThread'](_0x2f7a3b['threadId']);if(!_0x117e05)throw new _0xcbec56('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x482085=this['_createNewComment'](_0x2f7a3b),{id:_0x4fdce0}=_0x482085;if(_0x117e05['_add'](_0x482085),_0x8c78e6||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x117e05['isSubmitted'])return Promise['resolve']();const _0x554d5b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x309cce}=_0x117e05,_0xccd4d=_0x554d5b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2fd42c||(_0x2fd42c={}),this['adapter']['addComment']({'channelId':_0x309cce,'threadId':_0x204984,'commentId':_0x4fdce0,'content':_0x6a6687,'attributes':_0x2fd42c})['then'](_0x137711=>{_0x554d5b['remove'](_0xccd4d),_0x137711&&this['_updateComment']({'channelId':_0x309cce,'threadId':_0x204984,'commentId':_0x4fdce0,'createdAt':_0x137711['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1dd004=>{throw console['error'](_0x1dd004),new _0xcbec56('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x225f10,commentId:_0x4732cc,content:_0x532cc3,createdAt:_0x35a6fd,attributes:_0x7a7f03,isFromAdapter:_0x327301}){if(void 0x0!==_0x532cc3&&('string'!=typeof _0x532cc3||!_0x532cc3['trim']()['length']))throw new _0xcbec56('commentsrepository-update-comment-invalid-content');const _0x1aa9d3=this['getCommentThread'](_0x225f10),_0x16fa6b=_0x1aa9d3['getComment'](_0x4732cc);if(!_0x16fa6b)throw new _0xcbec56('commentsrepository-update-missing-comment',this);let _0x59d8f6=!0x1;if(_0x532cc3&&_0x532cc3!==_0x16fa6b['content']&&(_0x16fa6b['isEditable']||_0x327301)&&(_0x16fa6b['content']=_0x532cc3,_0x59d8f6=!0x0),_0x35a6fd&&_0x35a6fd!==_0x16fa6b['createdAt']&&(_0x16fa6b['createdAt']=_0x35a6fd,_0x16fa6b['attributes']&&_0x16fa6b['attributes']['@external']||(_0x16fa6b['authoredAt']=_0x35a6fd),_0x59d8f6=!0x0),_0x7a7f03&&!wt(_0x7a7f03,_0x16fa6b['attributes'])&&(_0x16fa6b['attributes']=_0x7a7f03,_0x59d8f6=!0x0),!_0x59d8f6)return Promise['resolve']();if(_0x1aa9d3['fire']('commentUpdated'),_0x327301||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x228e12=this['context']['plugins']['get']('PendingActions'),{channelId:_0x193e32}=this['getCommentThread'](_0x16fa6b['threadId']),_0x2494dc=_0x228e12['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x193e32,'threadId':_0x225f10,'commentId':_0x4732cc,'content':_0x532cc3,'attributes':_0x7a7f03})['then'](()=>_0x228e12['remove'](_0x2494dc))['catch'](_0x4288e9=>{throw console['error'](_0x4288e9),new _0xcbec56('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x158f4e,commentId:_0x39f040,isFromAdapter:_0x30038c}){const _0x7444c8=this['getCommentThread'](_0x158f4e),_0x145d3e=_0x7444c8['getComment'](_0x39f040);if(!_0x145d3e)throw new _0xcbec56('commentsrepository-remove-missing-comment',this);if(_0x7444c8['_remove'](_0x145d3e),_0x30038c||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x73d0da=this['context']['plugins']['get']('PendingActions'),{channelId:_0x637a9d}=_0x7444c8,_0x2515e8=_0x73d0da['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x637a9d,'threadId':_0x158f4e,'commentId':_0x39f040})['then'](()=>_0x73d0da['remove'](_0x2515e8))['catch'](_0x39b57e=>{throw console['error'](_0x39b57e),new _0xcbec56('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x2f0bd8(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2ea85b,_0x3883b3){super();const _0x1d1ab4=_0x2ea85b['context']['plugins']['get'](it)['me'],_0x4292c=_0x2ea85b['getCommentThread'](_0x3883b3['threadId']),_0x51b32c=0x0===_0x4292c['comments']['length'],_0x2353f9=_0x1d1ab4===_0x3883b3['author'];this['id']=_0x3883b3['id'],this['threadId']=_0x3883b3['threadId'],this['author']=_0x3883b3['author'],this['creator']=_0x3883b3['creator'],this['isExternal']=Boolean(_0x3883b3['attributes']&&_0x3883b3['attributes']['@external']),this['set']('content',_0x3883b3['content']),this['createdAt']=_0x3883b3['createdAt']||new Date(),this['set']('authoredAt',_0x3883b3['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4292c,'resolvedAt'),this['set']('attributes',_0x3883b3['attributes']||{}),this['bind']('isEditable')['to'](_0x2ea85b,'_permissions',()=>{const _0x2c3b03=_0x2ea85b['getPermissions'](_0x4292c['channelId'])['write'],_0x3cabe0=_0x2ea85b['getPermissions'](_0x4292c['channelId'])['modifyAll'];return _0x2353f9&&_0x2c3b03||!_0x2353f9&&_0x3cabe0;}),this['bind']('isRemovable')['to'](_0x4292c,'isRemovable',_0x2ea85b,'_permissions',_0x3cd34a=>{const _0x103f8b=_0x2ea85b['getPermissions'](_0x4292c['channelId'])['write'],_0x29dd1c=_0x2ea85b['getPermissions'](_0x4292c['channelId'])['modifyAll'];return _0x2353f9&&_0x103f8b||_0x3cd34a&&_0x51b32c||!_0x2353f9&&_0x29dd1c&&!_0x51b32c;}),this['bind']('isReadOnly')['to'](_0x4292c,'isReadOnly'),this['_repository']=_0x2ea85b;}get['weight'](){return Math['max'](function(_0x2adbd0){const _0x21d8e6=document['createElement']('div');return _0x21d8e6['innerHTML']=_0x2adbd0,_0x21d8e6['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3478bc){const {threadId:_0x208982,id:_0x4e6f58}=this;if(!this['_repository']['hasCommentThread'](_0x208982))throw new _0xcbec56('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4c5b97}=this['_repository']['getCommentThread'](_0x208982);this['_repository']['fire'](bt('updateComment',_0x4c5b97,_0x208982),{'channelId':_0x4c5b97,'threadId':_0x208982,'commentId':_0x4e6f58,..._0x3478bc});}['setAttribute'](_0x7006b0,_0xd110d){const _0x145bd4=It(this['attributes']);At(_0x145bd4,_0x7006b0,_0xd110d),this['update']({'attributes':_0x145bd4});}['removeAttribute'](_0x5f07fd){const _0x4b6870=It(this['attributes']);Ct(_0x4b6870,_0x5f07fd),this['update']({'attributes':_0x4b6870});}['remove'](_0x5b12fe={}){if(!_0x5b12fe['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xb51564,id:_0x46c974}=this;if(!this['_repository']['hasCommentThread'](_0xb51564))throw new _0xcbec56('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1e250c}=this['_repository']['getCommentThread'](_0xb51564);this['_repository']['fire'](bt('removeComment',_0x1e250c,_0xb51564),{'channelId':_0x1e250c,'threadId':_0xb51564,'commentId':_0x46c974,..._0x5b12fe});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x1a00f0,..._0x40ed02){for(const _0x3c375a of _0x40ed02)void 0x0!==_0x3c375a&&(_0x1a00f0+=':'+String(_0x3c375a));return _0x1a00f0;}class rt extends _0x173239{constructor(_0x2ab050){super(_0x2ab050),this['set']('hasContent',!0x1);}['refresh'](){const _0x5694cc=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5694dd of _0x5694cc['getRanges']())if(this['_hasContent'](_0x5694dd))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3be1b9=_0x3b7a37(),ranges:_0xf6be33,comment:_0xa91962}={}){const _0x5e71f8=this['editor']['model'],_0x140338=_0xf6be33??Array['from'](_0x5e71f8['document']['selection']['getRanges']()),_0x55fb8b=[];for(const _0x1df97c of _0x140338)this['_hasContent'](_0x1df97c)&&_0x55fb8b['push'](this['_trimToContent'](_0x1df97c));if(!_0x55fb8b['length'])throw new _0xcbec56('addcommentthreadcommand-incorrect-ranges',null);_0xa91962&&this['_createCommentThread'](_0x3be1b9,_0xa91962),this['_createMarkersFromRanges'](_0x3be1b9,_0x55fb8b,!!_0xa91962);}['_createMarkersFromRanges'](_0x4de96c,_0x2de2cd,_0x19685e){this['editor']['model']['change'](_0x1f500b=>{for(const _0x54d188 of _0x2de2cd){const _0x56b538=_0x3b7a37()['substr'](0x1,0x5),_0x1b5552='comment:'+_0x4de96c+':'+_0x56b538;_0x1f500b['addMarker'](_0x1b5552,{'range':_0x54d188,'usingOperation':_0x19685e,'affectsData':_0x19685e});}});}['_createCommentThread'](_0x201988,_0x2e7122){const _0x4fe02d=this['editor']['plugins']['get']('CommentsRepository'),_0x280b52=this['editor']['config']['get']('collaboration.channelId'),_0x4b1536=this['editor']['plugins']['get']('Users')['me'];if(!_0x4b1536)throw new _0xcbec56('addcommentthreadcommand-user-not-found',null);_0x4fe02d['addCommentThread']({'threadId':_0x201988,'channelId':_0x280b52,'comments':[{'authorId':_0x4b1536['id'],'content':_0x2e7122,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x105e7f){for(const _0x17f84f of _0x105e7f['getItems']())if(this['_itemIsContent'](_0x17f84f))return!0x0;return!0x1;}['_itemIsContent'](_0x9ebd65){return _0x9ebd65['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x9ebd65)&&!_0x9ebd65['is']('element','tableCell');}['_trimToContent'](_0x54ab06){const _0x24c5d5=_0x50d2a9=>!this['_itemIsContent'](_0x50d2a9['item']),_0xc42481=_0x54ab06['start']['getLastMatchingPosition'](_0x24c5d5),_0x1176a2=_0x54ab06['end']['getLastMatchingPosition'](_0x24c5d5,{'direction':'backward'});return this['editor']['model']['createRange'](_0xc42481,_0x1176a2);}}class b extends _0x847970{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x17df41){super(_0x17df41),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x28ef76=this['editor'],_0x3afa61=_0x28ef76['model']['document']['selection'],_0x50c65e=_0x80a969(()=>this['refreshSelectedViews'](),0xa);_0x3afa61['on']('change:range',(_0x1a7a3e,_0x366529)=>{_0x366529['directChange']&&(_0x50c65e['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x28ef76['editing']['view']['document'],'change:isFocused',(_0x14917f,_0x6f8456,_0x403513)=>{_0x403513&&_0x50c65e();}),this['listenTo'](_0x28ef76['ui']['focusTracker'],'change:isFocused',(_0x19edf1,_0x2662f3,_0x182e86)=>{_0x182e86||_0x28ef76['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x940f3e=>this['_editorAnnotationsData']['has'](_0x940f3e['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3f8040){if(this['_editorAnnotations']['has'](_0x3f8040['view']))return;this['_editorAnnotations']['add'](_0x3f8040['view']),this['editor']['ui']['focusTracker']['add'](_0x3f8040['view']['element']);const _0x5d91c5=this['editor']['plugins']['get'](y);this['listenTo'](_0x5d91c5['collection'],'remove',(_0x5f0b7c,_0x312bd0)=>{this['editor']['ui']['focusTracker']['remove'](_0x312bd0['view']['element']),this['_editorAnnotations']['delete'](_0x312bd0['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2ea5b4){if('function'!=typeof _0x2ea5b4)throw new _0xcbec56('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2ea5b4);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4651e9,annotations:_0x14b422}){const _0x5a7500=[],_0x50540d=this['editor']['model']['document']['selection'],_0xcd158e=Array['from'](_0x50540d['getRanges']());for(const [_0x5b5d49,_0x504b58]of this['_editorAnnotationsData']){const _0x22749b=_0x3af254(_0x504b58),_0x1ac831=_0x14b422['getByInnerView'](_0x5b5d49);_0x22749b&&_0x1ac831&&_0x5a7500['push']({'annotation':_0x1ac831,'range':_0x22749b});}function _0x3af254(_0x16c727){for(const _0x18eb07 of _0x16c727)for(const _0x550dec of _0xcd158e)if(_0x18eb07['containsRange'](_0x550dec,!_0x50540d['isCollapsed']))return _0x18eb07;return null;}return _0x5a7500['sort']((_0x416a0d,_0x1de472)=>{const _0x1f9713=_0x416a0d['range'],_0x195099=_0x1de472['range'];if(!_0x1f9713['isEqual'](_0x195099)){if(_0x1f9713['containsRange'](_0x195099,!0x0))return 0x1;if(_0x195099['containsRange'](_0x1f9713,!0x0))return-0x1;}return _0x416a0d['annotation']==_0x4651e9?-0x1:_0x1de472['annotation']==_0x4651e9?0x1:0x0;})['map'](_0x1770a2=>_0x1770a2['annotation']);}get['_editorAnnotationsData'](){const _0x197fa1=new Map();for(const _0x4bcf3f of Array['from'](this['_dataCollectors']))for(const [_0x3c0b0b,_0x3332ec]of _0x4bcf3f())_0x197fa1['set'](_0x3c0b0b,_0x3332ec);return _0x197fa1;}}class st extends _0x847970{['afterInit'](){const _0x1fde9d=this['editor'];if(!_0x1fde9d['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1fde9d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x847970{constructor(_0x4c2141){super(_0x4c2141),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1caabe=this['editor'],_0x309090=_0x1caabe['commands']['get']('importWord'),_0xf857a5=_0x1caabe['plugins']['get'](it);_0x309090&&(_0x309090['on']('execute',(_0x4ebc53,[,_0x2e3515])=>{_0x2e3515['collaboration_features']={'comments':!0x0,'user_id':_0xf857a5['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x309090,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5f0829,_0x41f3cb){const {comment_threads:_0x20bec5}=_0x41f3cb;_0x20bec5&&_0x20bec5['forEach'](({thread_id:_0x2c3ce6,comments:_0x18fcc6,is_resolved:_0x4fd600})=>{const _0xfd77be=new Date(),_0x356331=_0x18fcc6['map'](({author:_0x3d604b,content:_0x3d6a43,created_at:_0x33461b})=>({'content':_0x3d6a43,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xfd77be,'attributes':{'@external':{'authorName':_0x3d604b,'createdAt':_0x33461b?new Date(_0x33461b):new Date(),'source':'importWord'}}})),_0x26555a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x26555a,'threadId':_0x2c3ce6,'comments':_0x356331,'resolvedAt':_0x4fd600?_0xfd77be:null});});}}class at extends _0x847970{constructor(_0x3abea7){super(_0x3abea7),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5850dd=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5850dd,'contentInsertion',(_0x46911f,_0x2fee3b)=>this['_removeMarkersWithoutThreads'](_0x2fee3b['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4d2998){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4d2998;const _0x395a7d=this['editor']['plugins']['get']('CommentsRepository');for(const _0xf59cd9 of _0x4d2998['keys']()){const [_0x58aa5b,_0xdabdea]=_0xf59cd9['split'](':');'comment'!=_0x58aa5b||_0x395a7d['hasCommentThread'](_0xdabdea)||_0x4d2998['delete'](_0xf59cd9);}return _0x4d2998;}['_registerMarkerInClipboardPipeline'](){const _0x49c1fe=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x171c20=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x171c20&&_0x49c1fe['_registerMarkerToCopy']('comment',_0x171c20);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x151a4c){switch(_0x151a4c){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x847970{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xfb3ff1,_0x255f84)=>{if(!_0x255f84['options']['showCommentHighlights'])return null;if(_0x255f84['options']['ignoreResolvedComments']){const {id:_0x4a9e3c}=er(_0xfb3ff1['markerName']),_0x54a7d0=this['editor']['plugins']['get'](o);if(_0x54a7d0['getCommentThread'](_0x4a9e3c)?.['isResolved']&&_0xfb3ff1['item'])return _0x255f84['consumable']['consume'](_0xfb3ff1['item'],'addMarker:'+_0xfb3ff1['markerName']),_0x255f84['consumable']['consume'](_0xfb3ff1['item'],'removeMarker:'+_0xfb3ff1['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x40e9be=>{_0x40e9be['on']('addMarker:comment',(_0x3da865,_0x525af1,_0x35e68c)=>{if(!_0x35e68c['options']['showCommentHighlights'])return;const _0x4ac122=_0x525af1['item'];if(!_0x4ac122)return;const _0x4974b1=_0x35e68c['mapper']['toViewElement'](_0x4ac122);this['editor']['model']['schema']['isObject'](_0x4ac122)&&_0x4974b1&&!_0x4974b1['getCustomProperty']('widget')&&_0x4974b1['is']('containerElement')&&_0x274cfe(_0x4974b1,_0x35e68c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5ad224,{writer:_0x2b2cc9,options:_0x47ebbd})=>{if(!_0x47ebbd['showCommentHighlights'])return null;const _0x5656be=_0x2b2cc9['createContainerElement']('div'),_0x47f087=_0x2b2cc9['createEmptyElement']('hr');return _0x2b2cc9['addClass']('ck-horizontal-line',_0x5656be),_0x2b2cc9['insert'](_0x2b2cc9['createPositionAt'](_0x5656be,0x0),_0x47f087),_0x5656be;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0xbff7e,{writer:_0x2ff20f,options:_0x44f796})=>{if(!_0x44f796['showCommentHighlights'])return null;const _0x3ffecb=_0x2ff20f['createContainerElement']('span'),_0x3f93d9=_0x2ff20f['createEmptyElement']('img');return _0x2ff20f['addClass']('image-inline',_0x3ffecb),_0x2ff20f['insert'](_0x2ff20f['createPositionAt'](_0x3ffecb,0x0),_0x3f93d9),_0x3ffecb;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1a67b7,{writer:_0x3526a8,options:_0x57f05e})=>{if(_0x57f05e['showCommentHighlights'])return _0x3526a8['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3b2ec7,_0x562f31,_0x376bf0)=>{_0x376bf0['options']['showCommentHighlights']&&_0x3b2ec7['stop']();},{'priority':'high'});}}class r extends _0x847970{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(_0x439241){super(_0x439241),this['set']('isThreadsLoadingPaused',!0x0),_0x439241['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x405010,_0x1d594a,_0x2a308f,_0x2bd887)=>{const _0x2e0bb2=_0x439241['plugins']['get'](o),_0x2e778b=_0x2a308f?er(_0x2a308f)['id']:null;_0x439241['model']['change'](()=>{if(_0x2e778b){const _0x49f63d=this['getAllMarkersForId'](_0x2e778b);for(const _0x3ce984 of _0x49f63d)_0x439241['editing']['reconvertMarker'](_0x3ce984);}if(_0x2bd887){const {id:_0x123d7a}=er(_0x2bd887),_0x381c68=_0x2e0bb2['getCommentThread'](_0x123d7a);if(_0x381c68&&_0x381c68['unlinkedAt'])return;if(_0x381c68&&!_0x381c68['isAttached'])return;const _0x55f486=this['getAllMarkersForId'](_0x123d7a);for(const _0x13467a of _0x55f486)_0x439241['editing']['reconvertMarker'](_0x13467a);}}),_0x2e778b&&this['scrollToThreadMarker'](_0x2e778b);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5f49f2=this['editor'],_0x33f1b0=_0x5f49f2['plugins']['get'](o),_0x3442e8=_0x5f49f2['config']['get']('collaboration.channelId'),_0x11389f=_0x33f1b0['getCommentThreads']()['filter'](_0xdfd416=>_0xdfd416['channelId']!==_0x3442e8);_0x5f49f2['commands']['add']('addCommentThread',new rt(_0x5f49f2)),this['listenTo'](_0x5f49f2,'change:isReadOnly',(_0x291dd1,_0x4c130d,_0x396e02)=>{_0x33f1b0['switchReadOnly'](_0x396e02,_0x5f49f2['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x33f1b0,ft('addCommentThread',_0x3442e8),(_0x2247ce,{threadId:_0x4bd250})=>{const _0x59fa61=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4bd250);_0x59fa61?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4bd250);}),this['listenTo'](_0x33f1b0,ft('removeCommentThread',_0x3442e8),(_0x58b190,{threadId:_0x3483f6})=>{_0x5f49f2['model']['enqueueChange']({'isUndoable':!0x1},_0x599d26=>{const _0x283b74=this['getAllMarkersForId'](_0x3483f6);for(const _0x57306a of _0x283b74)_0x599d26['removeMarker'](_0x57306a);});}),this['listenTo'](_0x33f1b0,ft('resolveCommentThread',_0x3442e8),(_0x3b4617,{threadId:_0x5cbf95})=>{(this['_reconvertMarkers'](_0x5cbf95),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5cbf95)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x33f1b0,ft('reopenCommentThread',_0x3442e8),(_0x383578,{threadId:_0x2237d5})=>{this['_reconvertMarkers'](_0x2237d5);},{'priority':'low'}),this['listenTo'](_0x33f1b0,ft('addComment',_0x3442e8),(_0x4b9ffa,{threadId:_0x831c5d,isFromAdapter:_0x23745d})=>{const _0x54e270=this['getAllMarkersForId'](_0x831c5d);if(_0x23745d||0x0==_0x54e270['length']||!_0x33f1b0['hasCommentThread'](_0x831c5d))return;0x1===_0x33f1b0['getCommentThread'](_0x831c5d)['length']&&_0x5f49f2['model']['enqueueChange']({'isUndoable':!0x1},_0x24054a=>{for(const _0x3b0eca of _0x54e270)_0x24054a['updateMarker'](_0x3b0eca,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x11389f);}['afterInit'](){!async function(_0x593da6){const _0x19b36a=_0x249377([0x58,0x47,0x53,0x76,0x4c,0x5a,0x32,0x4e,0x6d,0x6f,0x78,0x33,0x70,0x52,0x6b,0x68,0x41,0x50,0x72,0x59,0x49,0x6c,0x54,0x36,0x34,0x44,0x73,0x37,0x71,0x4f,0x65,0x4d,0x57,0x74,0x55,0x6e,0x42,0x4b,0x56,0x67,0x61,0x64,0x75,0x77,0x48,0x66,0x6a,0x43,0x51,0x30,0x31,0x62,0x69,0x39,0x38,0x4a,0x63,0x79,0x7a,0x35,0x46,0x45]),_0x3b0189=0x1f51df6c,_0x51bb77=0x1f56b38c^_0x3b0189,_0x2f28fe=window[_0x249377([0x44,0x61,0x74,0x65])][_0x249377([0x6e,0x6f,0x77])](),_0x3a8ca9=_0x593da6[_0x249377([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x16f048=new window[(_0x249377([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x182bb9=>{_0x3a8ca9[_0x249377([0x6f,0x6e,0x63,0x65])](_0x249377([0x72,0x65,0x61,0x64,0x79]),_0x182bb9);}),_0x2a8b3d={[_0x249377([0x6b,0x74,0x79])]:_0x249377([0x45,0x43]),[_0x249377([0x75,0x73,0x65])]:_0x249377([0x73,0x69,0x67]),[_0x249377([0x63,0x72,0x76])]:_0x249377([0x50,0x2d,0x32,0x35,0x36]),[_0x249377([0x78])]:_0x249377([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]),[_0x249377([0x79])]:_0x249377([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]),[_0x249377([0x61,0x6c,0x67])]:_0x249377([0x45,0x53,0x32,0x35,0x36])},_0x56189c=_0x3a8ca9[_0x249377([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x249377([0x67,0x65,0x74])](_0x249377([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x227225(){let _0x4d2f10,_0x50568c=null,_0x3f6449=null;try{if(_0x56189c==_0x249377([0x47,0x50,0x4c]))return _0x249377([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4d2f10=_0x2881ae(),!_0x4d2f10)return _0x249377([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4d2f10[_0x249377([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3f6449=_0x2530c1(_0x4d2f10[_0x249377([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4d2f10[_0x249377([0x6a,0x74,0x69])])),await _0x5248cf()?_0x2560f3()?_0x2ece60()?_0x249377([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5c4ca3()?(_0x4d2f10[_0x249377([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x249377([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x50568c=_0x55f4c4(_0x249377([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4d2f10[_0x249377([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x249377([0x74,0x72,0x69,0x61,0x6c])&&(_0x50568c=_0x55f4c4(_0x249377([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x37561e()):_0x249377([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x249377([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x249377([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x249377([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2ece60(){const _0x451254=[_0x249377([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x249377([0x74,0x72,0x69,0x61,0x6c])][_0x249377([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d2f10[_0x249377([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2f28fe/0x3e8:0xe10*_0x51bb77;return _0x4d2f10[_0x249377([0x65,0x78,0x70])]<_0x451254;}function _0x2560f3(){const _0x1463ef=_0x4d2f10[_0x249377([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1463ef)return!0x1;if(_0x1463ef[_0x249377([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x249377([0x2a])))return!0x0;if(_0x1463ef[_0x249377([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x249377([0x43,0x4d,0x54])))return!0x0;if(_0x1463ef[_0x249377([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x249377([0x52,0x43,0x4d,0x54]))){if(_0x4005bd())return!0x0;if(_0x2dc996()||_0x3f34da())return!0x0;}return!0x1;}function _0x5c4ca3(){const _0x1106e5=_0x4d2f10[_0x249377([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1106e5||0x0==_0x1106e5[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x12716b}=new URL(window[_0x249377([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1106e5[_0x249377([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12716b))return!0x0;const _0x21b242=_0x12716b[_0x249377([0x73,0x70,0x6c,0x69,0x74])](_0x249377([0x2e]));return _0x1106e5[_0x249377([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3021cf=>_0x3021cf[_0x249377([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x249377([0x2a])))[_0x249377([0x6d,0x61,0x70])](_0x5baf05=>_0x5baf05[_0x249377([0x73,0x70,0x6c,0x69,0x74])](_0x249377([0x2e])))[_0x249377([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x245bc7=>_0x245bc7[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x21b242[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x249377([0x6d,0x61,0x70])](_0x422cfa=>Array(_0x21b242[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x422cfa[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x249377([0x66,0x69,0x6c,0x6c])](_0x422cfa[0x0]===_0x249377([0x2a])?_0x249377([0x2a]):'')[_0x249377([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x422cfa))[_0x249377([0x73,0x6f,0x6d,0x65])](_0x3594ee=>_0x21b242[_0x249377([0x65,0x76,0x65,0x72,0x79])]((_0x18b08a,_0xf61ed0)=>_0x3594ee[_0xf61ed0]===_0x18b08a||_0x3594ee[_0xf61ed0]===_0x249377([0x2a])));}function _0x37561e(){return _0x50568c&&_0x3f6449?new window[(_0x249377([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x277193,_0x1d05a2)=>{_0x50568c[_0x249377([0x74,0x68,0x65,0x6e])](_0x277193,_0x1d05a2),_0x3f6449[_0x249377([0x74,0x68,0x65,0x6e])](_0x551506=>{_0x551506!=_0x249377([0x56,0x61,0x6c,0x69,0x64])&&_0x277193(_0x551506);},_0x1d05a2);}):_0x50568c||_0x3f6449||_0x249377([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2530c1(_0x6145f1,_0x5c8d47){return new window[(_0x249377([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x369dc4=>{if(_0x27a0f7())return _0x369dc4(_0x249377([0x56,0x61,0x6c,0x69,0x64]));_0xaf153a(),_0x3a8ca9[_0x249377([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x249377([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1dfbbf=!0x1;const _0xc1da20=_0x3b7a37();function _0x174c46(_0x923cdf){return!!_0x923cdf&&(typeof _0x923cdf===_0x249377([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x923cdf===_0x249377([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x923cdf[_0x249377([0x74,0x68,0x65,0x6e])]===_0x249377([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x923cdf[_0x249377([0x63,0x61,0x74,0x63,0x68])]===_0x249377([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x38acda(_0x102dd9){_0x513e68(_0x102dd9)[_0x249377([0x74,0x68,0x65,0x6e])](_0x84f03a=>{if(!_0x84f03a||_0x84f03a[_0x249377([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x249377([0x6f,0x6b]))return _0x249377([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3a3657(_0x5f2af9(_0xc1da20+_0x5c8d47))!=_0x84f03a[_0x249377([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x249377([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x249377([0x56,0x61,0x6c,0x69,0x64]);})[_0x249377([0x74,0x68,0x65,0x6e])](_0xf20737=>(_0x24711f(),_0xf20737),()=>{const _0x297e6e=_0x4f5e05();return null==_0x297e6e?(_0x24711f(),_0x249377([0x56,0x61,0x6c,0x69,0x64])):_0x249377(_0x2f28fe-_0x297e6e>(0x3b5d5b6c^_0x3b0189)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x249377([0x74,0x68,0x65,0x6e])](_0x369dc4)[_0x249377([0x63,0x61,0x74,0x63,0x68])](()=>{_0x369dc4(_0x249377([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x456408=0x1f6731ec^_0x3b0189;function _0x24711f(){const _0x17fe2e=_0x249377([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a3657(_0x5f2af9(_0x6145f1)),_0x598543=_0x678df5(_0x3a3657(window[_0x249377([0x4d,0x61,0x74,0x68])][_0x249377([0x63,0x65,0x69,0x6c])](_0x2f28fe/_0x456408)));window[_0x249377([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x249377([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x17fe2e,_0x598543);}function _0x4f5e05(){const _0x51af83=_0x249377([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a3657(_0x5f2af9(_0x6145f1)),_0x1da8f5=window[_0x249377([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x249377([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x51af83);return _0x1da8f5?window[_0x249377([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x678df5(_0x1da8f5),0x10)*_0x456408:null;}function _0x513e68(_0x33d0a8){return new window[(_0x249377([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x30dcc3,_0xfec49b)=>{_0x33d0a8[_0x249377([0x74,0x68,0x65,0x6e])](_0x30dcc3,_0xfec49b),window[_0x249377([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xfec49b,0x1f500bac^_0x3b0189);});}}_0x3a8ca9[_0x249377([0x6f,0x6e])](_0x249377([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4ef907,_0x1ab490)=>{if(_0x1ab490[0x0]!=_0x6145f1)return _0x369dc4(_0x249377([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1ab490[0x1]={..._0x1ab490[0x1],[_0x249377([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xc1da20};},{[_0x249377([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x249377([0x68,0x69,0x67,0x68])}),_0x3a8ca9[_0x249377([0x6f,0x6e])](_0x249377([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58e144=>{_0x174c46(_0x58e144[_0x249377([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1dfbbf=!0x0,_0x38acda(_0x58e144[_0x249377([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x249377([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x249377([0x6c,0x6f,0x77])}),_0x16f048[_0x249377([0x74,0x68,0x65,0x6e])](()=>{_0x1dfbbf||_0x369dc4(_0x249377([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x27a0f7(){return _0x3a8ca9[_0x249377([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x249377([0x76,0x69,0x65,0x77])][_0x249377([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x249377([0x61,0x75,0x74,0x6f]);}function _0xaf153a(){_0x3a8ca9[_0x249377([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x249377([0x76,0x69,0x65,0x77])][_0x249377([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x249377([0x61,0x75,0x74,0x6f]);}}function _0x55f4c4(_0x162d59){const _0x3685f4=[new window[(_0x249377([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2cf692=>setTimeout(_0x2cf692,0x1f58e1a0^_0x3b0189)),_0x16f048[_0x249377([0x74,0x68,0x65,0x6e])](()=>new window[(_0x249377([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d2712=>{let _0x3aa5aa=0x0;_0x3a8ca9[_0x249377([0x6d,0x6f,0x64,0x65,0x6c])][_0x249377([0x6f,0x6e])](_0x249377([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x223dcd,_0x3cea02)=>{_0x3cea02[0x0][_0x249377([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3aa5aa++,_0x3aa5aa==(0x1f51de94^_0x3b0189)&&(_0x2d2712(),_0x223dcd[_0x249377([0x6f,0x66,0x66])]());});}))];return window[_0x249377([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x249377([0x72,0x61,0x63,0x65])](_0x3685f4)[_0x249377([0x74,0x68,0x65,0x6e])](()=>_0x162d59);}async function _0x5c3ab0(){await _0x16f048,_0x3a8ca9[_0x249377([0x6d,0x6f,0x64,0x65,0x6c])][_0x249377([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x52955e,_0x3a8ca9[_0x249377([0x6d,0x6f,0x64,0x65,0x6c])][_0x249377([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x52955e,_0x3a8ca9[_0x249377([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x249377([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4005bd(){return _0x1ff380(_0x249377([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4f2dae(_0x249377([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x249377([0x73,0x74,0x61,0x74,0x65])]==_0x249377([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2dc996(){return _0x1ff380(_0x249377([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 _0x3f34da(){return _0x1ff380(_0x249377([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5978a4(_0x5e44bd){const _0x458b9c=_0x144f6a();_0x3a8ca9[_0x458b9c]=_0x249377([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5e44bd,_0x5e44bd!=_0x249377([0x56,0x61,0x6c,0x69,0x64])&&_0x5c3ab0();}function _0x144f6a(){const _0x5d0793=window[_0x249377([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x249377([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x249377([0x6e,0x6f,0x77])]())[_0x249377([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x249377([0x2e]),'');let _0x489bc9=_0x249377([0x58]);for(let _0x429176=0x0;_0x429176<_0x5d0793[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x429176+=0x2){let _0x4f79d2=window[_0x249377([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d0793[_0x249377([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x429176,_0x429176+0x2));_0x4f79d2>=_0x19b36a[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4f79d2-=_0x19b36a[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x489bc9+=_0x19b36a[_0x4f79d2];}return _0x489bc9;}function _0x2881ae(){const _0x20598a=_0x56189c[_0x249377([0x73,0x70,0x6c,0x69,0x74])](_0x249377([0x2e]));if(0x3!=_0x20598a[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2007a6(_0x20598a[0x1]);function _0x2007a6(_0x241f33){const _0x1eb61=_0x29d36c(_0x241f33);return _0x1eb61&&_0x24dc34()?_0x1eb61:null;function _0x24dc34(){const _0x356657=_0x1eb61[_0x249377([0x6a,0x74,0x69])],_0x310499=window[_0x249377([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x356657[_0x249377([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x356657[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x12273a={..._0x1eb61,[_0x249377([0x6a,0x74,0x69])]:_0x356657[_0x249377([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x356657[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x12273a[_0x249377([0x76,0x63])],_0x5f2af9(_0x12273a)==_0x310499;}}}async function _0x5248cf(){let _0x42ee92=!0x0;try{const _0xd14bdb=_0x56189c[_0x249377([0x73,0x70,0x6c,0x69,0x74])](_0x249377([0x2e])),[_0x52589a,_0x4e464d,_0x375569]=_0xd14bdb;return _0x4c0bd1(_0x52589a),await _0x2b7f59(_0x52589a,_0x4e464d,_0x375569),_0x42ee92;}catch{return!0x1;}function _0x4c0bd1(_0x421199){const _0x4ef6b4=_0x29d36c(_0x421199);_0x4ef6b4&&_0x4ef6b4[_0x249377([0x61,0x6c,0x67])]==_0x249377([0x45,0x53,0x32,0x35,0x36])||(_0x42ee92=!0x1);}async function _0x2b7f59(_0x4a219d,_0x1fe031,_0x3e6346){const _0xa8b88a=window[_0x249377([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x249377([0x66,0x72,0x6f,0x6d])](_0x4ba5f5(_0x3e6346),_0xc029cb=>_0xc029cb[_0x249377([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2fcc5f=new window[(_0x249377([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x249377([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4a219d+_0x249377([0x2e])+_0x1fe031),_0x13bb0f=window[_0x249377([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x249377([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x13bb0f)return;const _0x5c8ce7=await _0x13bb0f[_0x249377([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x249377([0x6a,0x77,0x6b]),_0x2a8b3d,{[_0x249377([0x6e,0x61,0x6d,0x65])]:_0x249377([0x45,0x43,0x44,0x53,0x41]),[_0x249377([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x249377([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x249377([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x13bb0f[_0x249377([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x249377([0x6e,0x61,0x6d,0x65])]:_0x249377([0x45,0x43,0x44,0x53,0x41]),[_0x249377([0x68,0x61,0x73,0x68])]:{[_0x249377([0x6e,0x61,0x6d,0x65])]:_0x249377([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5c8ce7,_0xa8b88a,_0x2fcc5f)||(_0x42ee92=!0x1);}}function _0x29d36c(_0x4e718e){return _0x4e718e[_0x249377([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x249377([0x65,0x79]))?JSON[_0x249377([0x70,0x61,0x72,0x73,0x65])](_0x4ba5f5(_0x4e718e)):null;}function _0x4ba5f5(_0x2c4d44){return window[_0x249377([0x61,0x74,0x6f,0x62])](_0x2c4d44[_0x249377([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x249377([0x2b]))[_0x249377([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x249377([0x2f])));}function _0x5f2af9(_0xb5085c){let _0x1684c3=0x1505;function _0x37e3af(_0x1829f7){for(let _0x3add3a=0x0;_0x3add3a<_0x1829f7[_0x249377([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3add3a++){const _0x21d6cd=_0x1829f7[_0x249377([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3add3a);_0x1684c3=(_0x1684c3<<0x5)+_0x1684c3+_0x21d6cd,_0x1684c3&=_0x1684c3;}}function _0x2ac036(_0x1124b1){Array[_0x249377([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1124b1)?_0x1124b1[_0x249377([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2ac036):_0x1124b1&&typeof _0x1124b1==_0x249377([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x249377([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1124b1)[_0x249377([0x73,0x6f,0x72,0x74])]()[_0x249377([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x21aef9,_0x44377d])=>{_0x37e3af(_0x21aef9),_0x2ac036(_0x44377d);}):_0x37e3af(window[_0x249377([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1124b1));}return _0x2ac036(_0xb5085c),_0x1684c3>>>0x0;}function _0x3a3657(_0x3ab6fd){return _0x3ab6fd[_0x249377([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x249377([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x249377([0x30]));}function _0x678df5(_0x43343d){return _0x43343d[_0x249377([0x73,0x70,0x6c,0x69,0x74])]('')[_0x249377([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x249377([0x6a,0x6f,0x69,0x6e])]('');}function _0x1ff380(_0x4fbdf5){return _0x3a8ca9[_0x249377([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x249377([0x68,0x61,0x73])](_0x4fbdf5);}function _0x4f2dae(_0x3809d1){return _0x3a8ca9[_0x249377([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x249377([0x67,0x65,0x74])](_0x3809d1);}function _0x52955e(){}function _0x249377(_0x3fa3fe){return _0x3fa3fe['map'](_0x3bf368=>String['fromCharCode'](_0x3bf368))['join']('');}_0x5978a4(await _0x227225());}(this);}['destroy'](){const _0x1dc168=this['editor']['plugins']['get'](o),_0x52a7ac=this['editor']['config']['get']('collaboration.channelId');for(const _0x26f2bf of _0x1dc168['getCommentThreads']({'channelId':_0x52a7ac}))_0x1dc168['_detachCommentThread'](_0x26f2bf['id']),_0x1dc168['_threads']['delete'](_0x26f2bf['id']);super['destroy']();}['hasMarkerForId'](_0x54f903){return this['getAllMarkersForId'](_0x54f903)['length']>0x0;}['getAllMarkersForId'](_0x8bd4f6){const _0x54b311=[];for(const _0x301ef4 of this['editor']['model']['markers'])_0x301ef4['name']['startsWith']('comment:'+_0x8bd4f6)&&_0x54b311['push'](_0x301ef4);return _0x54b311;}['scrollToThreadMarker'](_0x29c1e0){setTimeout(()=>{const _0x2a0bdc=this['_getTargetForId'](_0x29c1e0);if(!_0x2a0bdc)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0x29c1e0&&nt({'target':_0x2a0bdc[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1ccceb){this['editor']['model']['change'](()=>{for(const _0x3cef71 of this['getAllMarkersForId'](_0x1ccceb))this['editor']['editing']['reconvertMarker'](_0x3cef71);});}['_attachArchivedThread'](_0x4424d6){const _0x41bb28=this['editor']['plugins']['get'](o),_0x285902=this['editor']['plugins']['get'](b),_0x527559=_0x41bb28['getCommentThread'](_0x4424d6);if(!_0x527559['isAttached']){const _0x54434c=_0x527559['attachTo'](()=>this['_getTargetForId'](_0x527559['id']));_0x285902['registerAnnotation'](_0x54434c),_0x527559['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x45eb36=this['editor'],_0x56d3bc=_0x45eb36['plugins']['get'](it);_0x45eb36['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xa81879,_0x36f882)=>{const {id:_0x3fb948}=er(_0xa81879['markerName']),_0x1c5f03=_0x45eb36['plugins']['get'](o)['getCommentThread'](_0x3fb948),_0x5b76d5=this['activeMarker']&&er(this['activeMarker'])['id']===_0x3fb948;let _0x51f5aa;if(_0x1c5f03&&_0x1c5f03['isResolved']&&!_0x5b76d5&&_0xa81879['item'])return _0x36f882['consumable']['consume'](_0xa81879['item'],'addMarker:'+_0xa81879['markerName']),_0x36f882['consumable']['consume'](_0xa81879['item'],'removeMarker:'+_0xa81879['markerName']),null;const _0x56d735=['ck-comment-marker'];return _0x5b76d5&&_0x56d735['push']('ck-comment-marker--active'),_0x51f5aa=_0x1c5f03?.['length']?_0x1c5f03['comments']['first']['author']['id']:_0x56d3bc['me']['id'],{'classes':_0x56d735,'attributes':{'data-comment':_0x3fb948,'data-author-id':_0x51f5aa}};}}),_0x45eb36['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xf96e43,{options:_0x1b538a})=>{if(_0x1b538a['showCommentHighlights'])return null;const _0x62f1e3=_0x45eb36['plugins']['get'](o),_0x4e3a40=_0x45eb36['model']['markers']['get'](_0xf96e43),{id:_0x46d53e,part:_0x4e5a13}=er(_0xf96e43);return _0x4e3a40&&!_0x4e3a40['affectsData']||_0x1b538a['ignoreResolvedComments']&&_0x62f1e3['getCommentThread'](_0x46d53e)?.['isResolved']?null:{'group':'comment','name':_0x4e5a13?_0x46d53e+':'+_0x4e5a13:_0x46d53e};}}),_0x45eb36['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x25952c,{writer:_0x2fa177})=>_0x2fa177['createElement']('$marker',{'data-name':'comment:'+_0x25952c['getAttribute']('id')})}),_0x45eb36['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x51947f=this['editor'],_0x3df8d0=_0x51947f['plugins']['get'](o),_0x4a2679=new Set(),_0x378b11=new Set();_0x51947f['model']['document']['registerPostFixer'](_0x30c2d0=>{let _0x258054=!0x1;for(const {name:_0x29826b,data:_0x27b0d5}of _0x51947f['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4ff9e2,id:_0x302578}=er(_0x29826b);let _0x354f93=_0x27b0d5['newRange'];if('comment'!==_0x4ff9e2||!_0x354f93)continue;const _0x171ddf='$graveyard'===_0x354f93['root']['rootName'];_0x171ddf||(_0x354f93=dt(_0x354f93,_0x51947f['model']),!_0x354f93||_0x354f93['isCollapsed']||!_0x27b0d5['newRange']||_0x354f93['isEqual'](_0x27b0d5['newRange']))?_0x51947f['model']['hasContent'](_0x354f93)&&!_0x171ddf?this['isThreadsLoadingPaused']?_0x4a2679['add'](_0x29826b):this['_handleThreadMarker'](_0x29826b,_0x302578):(_0x378b11['add'](_0x29826b),_0x4a2679['delete'](_0x29826b),_0x30c2d0['removeMarker'](_0x29826b),_0x258054=!0x0):(_0x30c2d0['updateMarker'](_0x29826b,{'range':_0x354f93}),_0x258054=!0x0);}return _0x258054;}),this['on']('change:isThreadsLoadingPaused',(_0x2ba6be,_0x230a2f,_0x2bc4f2)=>{if(!_0x2bc4f2&&_0x4a2679['size'])for(const _0x183988 of _0x4a2679){const {id:_0x15dbb2}=er(_0x183988);_0x4a2679['delete'](_0x183988),_0x51947f['model']['markers']['get'](_0x183988)&&this['_handleThreadMarker'](_0x183988,_0x15dbb2);}}),this['listenTo'](_0x51947f['model']['document'],'change',()=>{for(const {name:_0x448ff3,data:{newRange:_0x108291}}of _0x51947f['model']['document']['differ']['getChangedMarkers']()){const {group:_0x387ac6,id:_0x510c37}=er(_0x448ff3);if('comment'!==_0x387ac6)continue;const _0x35db63=_0x3df8d0['getCommentThread'](_0x510c37),_0xecd2f7=this['hasMarkerForId'](_0x510c37);_0x35db63&&(!_0x35db63['_hasTargetInContent']&&_0x108291&&_0x51947f['editing']['view']['once']('render',()=>{const _0x3eda52=_0x51947f['plugins']['get'](y),_0x53e81e=_0x3df8d0['_threadToController']['get'](_0x35db63)['view'];_0x3eda52['getByInnerView'](_0x53e81e)['refreshVisibility']();},{'priority':'low'}),_0x35db63['_hasTargetInContent']=_0xecd2f7||!!_0x108291),_0x108291||(_0x378b11['add'](_0x448ff3),_0x4a2679['delete'](_0x448ff3));}for(const _0x5a0925 of _0x378b11){const {id:_0x49e4a9}=er(_0x5a0925),_0x5e54f7=_0x3df8d0['getCommentThread'](_0x49e4a9);if(_0x4a2679['delete'](_0x5a0925),!_0x5e54f7)continue;const _0x33341c=this['hasMarkerForId'](_0x49e4a9);_0x33341c||_0x5e54f7['isSubmitted']?_0x33341c||_0x5e54f7['unlinkedAt']||_0x5e54f7['setUnlinkedAt'](new Date()):_0x5e54f7['remove']();}_0x378b11['clear']();});}['_handleInitialThreads'](_0x475d97){_0x475d97['forEach'](_0x4b2fb3=>{_0x4b2fb3['unlinkedAt']&&this['_attachArchivedThread'](_0x4b2fb3['id']);});}['_getTargetForId'](_0x43a451){const _0x75415d=this['editor'],_0x70681f=this['getAllMarkersForId'](_0x43a451);return et(_0x75415d['editing'],_0x70681f);}['_getTextContext'](_0x447ddc){const _0x324453=this['getAllMarkersForId'](_0x447ddc);let _0xff197a='',_0xc8ba4d=!0x1;for(const _0x3b0505 of _0x324453){const _0x32ed86=_0x3b0505['getRange']();for(const _0x479f27 of Array['from'](_0x32ed86['getItems']()))_0x479f27['is']('$textProxy')?(_0xff197a&&_0xc8ba4d&&(_0xff197a+='\x20',_0xc8ba4d=!0x1),_0xff197a+=_0x479f27['data']):_0xc8ba4d=!0x0;_0xc8ba4d=!0x0;}return _0xff197a['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2d8bf2,_0x229983){const _0x2e4b33=this['editor'],_0xae64fd=_0x2e4b33['plugins']['get'](o);let _0x4ef92f=_0xae64fd['getCommentThread'](_0x229983);const _0x2be8f3=_0x2e4b33['config']['get']('collaboration.channelId'),_0x10b7af=_0x2e4b33['plugins']['get'](b);if(_0x4ef92f&&(_0x4ef92f['unlinkedAt']&&_0x4ef92f['setUnlinkedAt'](null),_0x4ef92f['isAttached']))return _0x4ef92f;return!this['getAllMarkersForId'](_0x229983)[0x0]['managedUsingOperations']?_0x2e4b33['editing']['view']['once']('render',()=>{if(_0xae64fd['getCommentThread'](_0x229983))return;const _0x3d45dd=_0x2e4b33['plugins']['get'](y);_0x4ef92f=_0xae64fd['openNewCommentThread']({'channelId':_0x2be8f3,'threadId':_0x229983,'target':()=>this['_getTargetForId'](_0x229983),'context':{'type':'text','value':this['_getTextContext'](_0x229983)}});const _0x29aa16=_0xae64fd['_threadToController']['get'](_0x4ef92f)['view'],_0x57e61e=_0x3d45dd['getByInnerView'](_0x29aa16);_0x57e61e&&_0x10b7af['registerAnnotation'](_0x57e61e);},{'priority':'low'}):_0xae64fd['fetchCommentThread']({'channelId':_0x2be8f3,'threadId':_0x229983})['then'](_0x1a3599=>{if('destroyed'!==_0x2e4b33['state']){if(_0x4ef92f=_0x1a3599,_0x4ef92f&&!_0x4ef92f['isAttached']){const _0x3ab7b5=_0x4ef92f['attachTo'](()=>this['_getTargetForId'](_0x229983));_0x10b7af['registerAnnotation'](_0x3ab7b5),_0x4ef92f['isResolved']&&this['_reconvertMarkers'](_0x229983);}else{if(!_0x4ef92f){const _0x5f3f50=this['getAllMarkersForId'](_0x229983);_0x2e4b33['model']['change'](_0x1fda48=>{for(const _0x566b2c of _0x5f3f50)_0x1fda48['removeMarker'](_0x566b2c);});}}}}),_0x4ef92f;}['_handleThreadMarker'](_0x38db22,_0x4e51f3){const _0x3ae90c=this['_attachMarkerToThread'](_0x38db22,_0x4e51f3);_0x3ae90c&&!_0x3ae90c['context']&&_0x3ae90c['setContext']({'type':'text','value':this['_getTextContext'](_0x4e51f3)});}['_initAriaMarkerChangeAnnouncements'](){const _0xf2bacf=this['editor'];ot(_0xf2bacf['model'],({left:_0x3904ae,entered:_0x142db5})=>{for(const _0x4d7ed5 of _0x3904ae)if(mt(_0x4d7ed5)){_0xf2bacf['ui']['ariaLiveAnnouncer']['announce'](N(_0xf2bacf['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x346883 of _0x142db5)if(mt(_0x346883)){_0xf2bacf['ui']['ariaLiveAnnouncer']['announce'](N(_0xf2bacf['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x185b3c)));break;}});}}function ft(_0x4aced3,_0x473c73){return _0x473c73?_0x4aced3+':'+_0x473c73:_0x4aced3;}function er(_0x47fa2e){const _0x16d178=_0x47fa2e['split'](':');return{'group':_0x16d178[0x0],'id':_0x16d178[0x1],'part':_0x16d178[0x2]};}function dt(_0x224ad0,_0x53d5b2){const _0x34e3bd=_0x53d5b2['schema'],_0x5c293f=_0x53d5b2['createRange'](_0x224ad0['start']);for(const _0x1ef21c of _0x224ad0['getWalker']()){const {type:_0x2e7281,item:_0x3f5fa0,nextPosition:_0x1f554d}=_0x1ef21c;if('text'===_0x2e7281||_0x34e3bd['isObject'](_0x3f5fa0)){const _0x543603=_0x53d5b2['createPositionBefore'](_0x3f5fa0);_0x5c293f['isCollapsed']&&(_0x5c293f['start']=_0x543603),_0x5c293f['end']=_0x1f554d;}}return _0x5c293f;}function mt(_0x2726ae){return'comment'===er(_0x2726ae['name'])['group'];}class s extends _0x847970{['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 _0x29c812=this['editor'],_0x1cb721=_0x29c812['plugins']['get'](o),_0x4014ef=_0x29c812['plugins']['get'](r),_0x3d190b=_0x29c812['plugins']['get'](y),_0x5e364d=_0x29c812['plugins']['get'](b);_0x29c812['ui']['componentFactory']['add']('comment',()=>{const _0x1307c5=this['_createUIButton'](_0x1287d8);return _0x1307c5['tooltip']=!0x0,_0x1307c5;}),_0x29c812['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x3cebc9)),_0x5e364d['addSourceCollector'](()=>{const _0x475557=[];for(const [_0x1edd81,_0x31fe6b]of _0x1cb721['_threadToController']){const _0x5c0e87=_0x4014ef['getAllMarkersForId'](_0x1edd81['id']),_0x33a072=_0x5c0e87['map'](_0x5c3d94=>_0x5c3d94['getRange']());_0x5c0e87['length']>0x0&&_0x475557['push']([_0x31fe6b['view'],_0x33a072]);}return _0x475557;}),this['listenTo'](_0x3d190b,'change:activeAnnotations',(_0x24ec97,_0x4b5b7,_0x3236ac)=>{const _0x1c4d12=Array['from'](_0x3236ac)['map'](_0x59432c=>_0x59432c['innerView'])['find'](_0x451a7=>_0x1cb721['_viewToController']['has'](_0x451a7));if(!_0x1c4d12)return void(_0x4014ef['activeMarker']=null);const _0x559af0=_0x1cb721['_viewToController']['get'](_0x1c4d12)['model']['id'],_0x287484='comment:'+_0x559af0;_0x559af0&&_0x4014ef['hasMarkerForId'](_0x559af0)?_0x4014ef['activeMarker']=_0x287484:_0x4014ef['activeMarker']&&(_0x4014ef['activeMarker']=null);}),this['listenTo'](_0x1cb721,'removeCommentThread',(_0x1be6e7,{threadId:_0x1c0836,isFromAdapter:_0x1dc74c})=>{!_0x1dc74c&&_0x29c812['ui']['focusTracker']['isFocused']&&_0x4014ef['hasMarkerForId'](_0x1c0836)&&_0x29c812['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x1cb721,'addComment',(_0x57a0d7,{threadId:_0xf9aa76,isFromAdapter:_0x1230e0})=>{if(_0x1230e0||!_0x4014ef['hasMarkerForId'](_0xf9aa76)||!_0x1cb721['hasCommentThread'](_0xf9aa76))return;0x1===_0x1cb721['getCommentThread'](_0xf9aa76)['length']&&(_0x29c812['editing']['view']['focus'](),_0x57a0d7['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x321f4c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1e39e0;for(const _0x22b4dc in _0x321f4c){const _0x1984f0=_0x22b4dc,_0x43adf9=_0x321f4c[_0x1984f0];if('commentsLicenseKeyValid'==_0x43adf9||'commentsLicenseKeyInvalid'==_0x43adf9||'commentsLicenseKeyExpired'==_0x43adf9||'commentsLicenseKeyDomainLimit'==_0x43adf9||'commentsLicenseKeyNotAllowed'==_0x43adf9||'commentsLicenseKeyEvaluationLimit'==_0x43adf9||'commentsLicenseKeyTrialLimit'==_0x43adf9||'commentsLicenseKeyUsageLimit'==_0x43adf9){delete _0x321f4c[_0x1984f0],_0x1e39e0=_0x43adf9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1e39e0&&_0x321f4c['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1e39e0&&_0x321f4c['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1e39e0&&_0x321f4c['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1e39e0&&_0x321f4c['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1e39e0&&_0x321f4c['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1e39e0&&_0x321f4c['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1e39e0&&_0x321f4c['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x197ade){const _0x346a63=this['editor'],_0x16db8f=new _0x197ade(_0x346a63['locale']),_0x643221=_0x346a63['commands']['get']('addCommentThread');return _0x16db8f['set']({'label':N(_0x346a63['locale'],'Comment'),'icon':_0x31f37f}),_0x16db8f['bind']('isEnabled')['to'](_0x643221,'hasContent'),this['listenTo'](_0x16db8f,'execute',()=>{_0x643221['execute']();}),_0x16db8f;}}class i extends _0x847970{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x314e6a){super(_0x314e6a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xd533f0,_0x3283d5,_0x4fc602)=>{_0x4fc602?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x14bb71,_0x2496bb]of this['editor']['commands'])_0x2496bb['affectsData']&&'addCommentThread'!==_0x14bb71&&_0x2496bb['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x10af4d=this['editor']['editing']['view']['document'];this['listenTo'](_0x10af4d,'cut',_0x2a2b26=>_0x2a2b26['stop'](),{'priority':'highest'}),this['listenTo'](_0x10af4d,'clipboardInput',_0x4d85fe=>_0x4d85fe['stop'](),{'priority':'highest'}),this['listenTo'](_0x10af4d,'delete',_0x25df3a=>_0x25df3a['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x9a16b4,_0x1b85bc]of this['editor']['commands'])_0x1b85bc['affectsData']&&'addCommentThread'!==_0x9a16b4&&_0x1b85bc['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 _0x5d570f{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a95ca){super(_0x4a95ca),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x258744=this['context']['plugins']['get'](y);this['listenTo'](_0x258744,'_activateAnnotation',(_0xd48962,_0x44686f)=>{for(const _0x28f800 of this['activeUIs']){const _0x551631=this['_uis']['get'](_0x28f800);(0x0,this['uisData']['get'](_0x28f800)['filter'])(_0x44686f)&&_0x551631['setActiveAnnotation'](_0x44686f);}}),this['listenTo'](_0x258744,'_deactivateAllAnnotations',()=>{for(const _0x51d5bb of this['activeUIs']){this['_uis']['get'](_0x51d5bb)['setActiveAnnotation'](null);}}),this['listenTo'](_0x258744['_visibleAnnotations'],'add',(_0x1d5b4c,_0x29ce01)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x29ce01);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3e6368){return this['activeUIs']['has'](_0x3e6368);}['activate'](_0x5ce050,_0x41fa11=this['defaultFilter']){const _0x87cf97=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x5ce050))throw new _0xcbec56('annotationsuis-missing-ui',this,{'uiName':_0x5ce050});this['isActive'](_0x5ce050)&&this['deactivate'](_0x5ce050),this['activeUIs']['add'](_0x5ce050);const _0x491833=new S();v({'source':_0x87cf97['_visibleAnnotations'],'target':_0x491833,'filter':_0x41fa11}),this['uisData']['set'](_0x5ce050,{'collection':_0x491833,'filter':_0x41fa11});const _0x2b63b6=this['_uis']['get'](_0x5ce050);_0x2b63b6['attach'](_0x491833),this['listenTo'](_0x2b63b6,'change:activeAnnotation',(_0x5bbdb2,_0x50306f,_0x162113,_0x55acd8)=>{_0x55acd8&&_0x87cf97['_removeActiveAnnotation'](_0x55acd8),_0x162113&&_0x87cf97['_addActiveAnnotation'](_0x162113);});}['deactivate'](_0x4ad2c5){if(this['activeUIs']['delete'](_0x4ad2c5),!this['_uis']['has'](_0x4ad2c5))throw new _0xcbec56('annotationsuis-missing-ui',this,{'uiName':_0x4ad2c5});const _0x792b1e=this['_uis']['get'](_0x4ad2c5);_0x792b1e['detach'](),this['stopListening'](_0x792b1e),this['uisData']['get'](_0x4ad2c5)['collection']['destroy'](),this['uisData']['delete'](_0x4ad2c5);}['switchTo'](_0x13349f){if(!this['_uis']['has'](_0x13349f))throw new _0xcbec56('annotationsuis-missing-ui',this,{'uiName':_0x13349f});const _0x14ba9b=this['context']['plugins']['get'](y),_0x37a74b=Array['from'](_0x14ba9b['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x13349f);const _0x53a93b=this['_uis']['get'](_0x13349f);_0x53a93b['setActiveAnnotation'](_0x37a74b),_0x53a93b['_setSelectedAnnotations']&&_0x37a74b&&_0x53a93b['_setSelectedAnnotations']([_0x37a74b]);}['deactivateAll'](){for(const _0x26ae04 of this['activeUIs'])this['deactivate'](_0x26ae04);}['register'](_0x4375eb,_0x3f171a){if(this['_uis']['has'](_0x4375eb))throw new _0xcbec56('annotationsuis-register-already-registered');if('function'!=typeof _0x3f171a['attach']||'function'!=typeof _0x3f171a['detach']||'function'!=typeof _0x3f171a['setActiveAnnotation'])throw new _0xcbec56('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4375eb,_0x3f171a);}['refilterAnnotations'](){const _0x2b62e5=this['context']['plugins']['get'](y)['collection'],_0x26ae8a=new Map(),_0x177cba=Array['from'](this['activeUIs']);for(const _0x458283 of this['activeUIs']){const _0x35a40e=this['uisData']['get'](_0x458283)['collection'];for(const _0x279154 of _0x35a40e)_0x26ae8a['set'](_0x279154,_0x458283);}for(const _0x500443 of _0x2b62e5){const _0x3de18c=_0x26ae8a['get'](_0x500443);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x500443);const _0x5913b6=_0x177cba['find'](_0x3d0f02=>this['uisData']['get'](_0x3d0f02)['filter'](_0x500443));_0x3de18c!==_0x5913b6&&(_0x3de18c&&this['uisData']['get'](_0x3de18c)['collection']['remove'](_0x500443),_0x5913b6&&this['uisData']['get'](_0x5913b6)['collection']['add'](_0x500443));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x26b996){const _0x3ee935=[];for(const _0x5e507d of this['activeUIs']){(0x0,this['uisData']['get'](_0x5e507d)['filter'])(_0x26b996)&&_0x3ee935['push'](_0x5e507d);}if(_0x3ee935['length']>0x1)throw new _0xcbec56('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3ee935,'annotationType':_0x26b996['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(_0x43c26e){super(_0x43c26e),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5b5be9,_0x5ef3a6)=>_0x5b5be9+_0x5ef3a6),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1e4189=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1e4189['to']('isAnimationDisabled',_0xaecd25=>_0xaecd25?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1e4189['to']('top',_0x54704e=>Ot(_0x54704e))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1969e8=this['element']['clientHeight'];_0x1969e8&&(this['height']=_0x1969e8);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x5d570f{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15eafa){super(_0x15eafa),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 _0x5b6b88=this['context']['config']['get']('sidebar.container');_0x5b6b88&&this['setContainer'](_0x5b6b88);}['setContainer'](_0x5415b2){if(!g(_0x5415b2))throw new _0xcbec56('sidebar-setcontainer-invalid-element');this['container']=_0x5415b2;}['_attachToContainer']({viewClass:_0x513e2e='',spaceBetweenItems:_0x588847=0x19}={}){if(!g(this['container']))throw new _0xcbec56('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x513e2e,this['_spaceBetweenItems']=_0x588847;}['rearrange']({removedAnnotation:_0x8c3e03,previousAnnotation:_0x2ca895,nextAnnotation:_0x54e6ce}){const _0x19a80d=this['getSidebarItemView'](_0x8c3e03);this['view']['list']['remove'](_0x19a80d),this['_destroySidebarItemView'](_0x8c3e03),_0x2ca895&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2ca895)),_0x54e6ce&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x54e6ce)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xf3236a,activatedAnnotation:_0x264629,disableAnimationOnActivatedAnnotation:_0x4b89c8}){if(this['_activeAnnotation']=_0x264629,_0xf3236a){_0xf3236a['isActive']=!0x1;const _0x24812f=this['getSidebarItemView'](_0xf3236a);_0x24812f&&_0x4b89c8&&(_0x24812f['isAnimationDisabled']=!0x1);}if(_0x264629){const _0x3b3789=this['getSidebarItemView'](_0x264629);_0x3b3789&&(_0x264629['isActive']=!0x0,_0x4b89c8&&(_0x3b3789['isAnimationDisabled']=!0x0,_0x3b3789['top']+=0x1),this['_alignToTargetRect'](_0x3b3789));}}['_detachFromContainer'](_0x513a04){if(this['view']['element']['remove'](),_0x513a04){for(const _0x3bd1b1 of _0x513a04)this['_destroySidebarItemView'](_0x3bd1b1);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2c3f55,_0x2bf1a3){_0x2bf1a3||(_0x2bf1a3=_0x2c3f55['view']);const _0x4aad50=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4aad50,_0x2c3f55),this['_annotationToSidebarItemView']['set'](_0x2c3f55,_0x4aad50),_0x4aad50['content']['add'](_0x2bf1a3),this['listenTo'](_0x2c3f55['view'],'change:targetRect',(_0x2028c8,_0x1167af,_0x3690d8)=>{const _0x249507=this['_getTargetTop'](_0x2c3f55,_0x3690d8);_0x4aad50['_targetTop']!=_0x249507&&(_0x4aad50['_targetTop']=_0x249507,this['_setItemTop'](_0x4aad50,_0x249507));}),this['listenTo'](_0x4aad50,'change:top',()=>{this['_recalculate'](_0x4aad50,'top');}),this['listenTo'](_0x4aad50,'change:bottom',()=>{this['_recalculate'](_0x4aad50,'bottom');}),this['_alignToTargetRect'](_0x4aad50);const _0x3ae8ef=this['_getItemBefore'](_0x4aad50);if(_0x3ae8ef)this['_alignAfterItem'](_0x3ae8ef,_0x4aad50)||this['_alignToTargetRect'](_0x4aad50);else this['_alignToTargetRect'](_0x4aad50);return this['_updateLastItem'](),this['view']['list']['add'](_0x4aad50),_0x4aad50;}['_alignForTopChange'](_0x47715c){if(!_0x47715c['content']['length'])return;const _0x58c202=this['_getItemBefore'](_0x47715c);if(!_0x58c202)return;const _0x1b117e=this['_sidebarItemViewToAnnotation']['get'](_0x58c202),_0x2bb3f9=this['_activeAnnotation'];_0x2bb3f9&&_0x2bb3f9===_0x1b117e?this['_alignAfterItem'](_0x58c202,_0x47715c):this['_alignBeforeItem'](_0x47715c,_0x58c202);}['_alignForBottomChange'](_0x2c526c){if(!_0x2c526c['content']['length'])return;const _0x2ed1b8=this['_getItemAfter'](_0x2c526c);if(!_0x2ed1b8)return;const _0x290072=this['_sidebarItemViewToAnnotation']['get'](_0x2ed1b8),_0x317f2e=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x165fbd=this['_activeAnnotation'];_0x165fbd&&_0x165fbd===_0x290072&&_0x317f2e?(this['_alignBeforeItem'](_0x2ed1b8,_0x2c526c),this['_alignAfterItem'](_0x2c526c,_0x2ed1b8)):_0x165fbd&&_0x165fbd===_0x290072?this['_alignBeforeItem'](_0x2ed1b8,_0x2c526c):this['_alignAfterItem'](_0x2c526c,_0x2ed1b8);}['_recalculate'](_0x394c0e,_0x2f6e3e){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5402a3,changedProp:_0x5c9952}of this['_recalculateBuffer'])'top'===_0x5c9952?this['_alignForTopChange'](_0x5402a3):this['_alignForBottomChange'](_0x5402a3);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x394c0e,'changedProp':_0x2f6e3e});}['getSidebarItemView'](_0x2b00cb){return this['_annotationToSidebarItemView']['get'](_0x2b00cb);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x272289){const _0x155f20=this['getSidebarItemView'](_0x272289);this['stopListening'](_0x155f20),this['stopListening'](_0x272289['view']),_0x155f20['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x272289),this['_sidebarItemViewToAnnotation']['delete'](_0x155f20);}['_createSidebarView'](){const _0x479035=new H(this['context']['locale']);return _0x479035['render'](),this['on']('change:_lastItem',(_0x159da8,_0x101518,_0x319b49,_0x1d8407)=>{_0x1d8407&&_0x479035['unbind']('minHeight'),_0x319b49?_0x479035['bind']('minHeight')['to'](_0x319b49,'bottom'):_0x479035['minHeight']=null;}),_0x479035;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x585b8b){const _0x34fb9e=this['_sidebarItemViewToAnnotation']['get'](_0x585b8b),_0xc866a7=_0x34fb9e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x34fb9e)-0x1);return _0xc866a7&&this['getSidebarItemView'](_0xc866a7)||null;}['_getItemAfter'](_0x3aa246){const _0x1c1b20=this['_sidebarItemViewToAnnotation']['get'](_0x3aa246),_0x9a2e5c=_0x1c1b20&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1c1b20)+0x1);return _0x9a2e5c&&this['getSidebarItemView'](_0x9a2e5c)||null;}['_alignBeforeItem'](_0x3b08b4,_0x1b302f){_0x3b08b4['updateHeight']();const _0xf5069e=G(_0x1b302f['bottom']+this['_spaceBetweenItems'],_0x3b08b4['top']);return!!_0xf5069e&&(this['_setItemTop'](_0x1b302f,_0x1b302f['top']-_0xf5069e),!0x0);}['_alignAfterItem'](_0x151bf9,_0x43e529){_0x151bf9['updateHeight']();const _0x43bc4f=G(_0x151bf9['bottom']+this['_spaceBetweenItems'],_0x43e529['top']);return!!_0x43bc4f&&(this['_setItemTop'](_0x43e529,_0x43e529['top']+_0x43bc4f,!0x1),!0x0);}['_alignToTargetRect'](_0x436fc8){const _0x213db3=this['_sidebarItemViewToAnnotation']['get'](_0x436fc8);if(!_0x213db3||!_0x213db3['target']||!_0x213db3['targetRect'])return;const _0x2b84c2=this['_getTargetTop'](_0x213db3,_0x213db3['targetRect']);this['_setItemTop'](_0x436fc8,_0x2b84c2);}['_getTargetTop'](_0x5b4e08,_0x412729){if(null===_0x412729)return 0x0;if(_0x5b4e08['target']instanceof _0x206900)return _0x412729['top'];{const _0x1d4ae3=new _0x206900(this['view']['element'])['top'];return _0x412729['top']-_0x1d4ae3;}}['_setItemTop'](_0x166513,_0x42e551,_0x385d6c=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x385d6c&&(_0x42e551=Math['max'](_0x42e551,this['_getMaxAvailableTop'](_0x166513))),_0x166513['top']=_0x42e551;}['_getMaxAvailableTop'](_0x27a5c3){let _0x23b273=this['_getItemBefore'](_0x27a5c3),_0x14ce1c=0x0;for(;_0x23b273;)_0x23b273['updateHeight'](),_0x14ce1c+=this['_spaceBetweenItems']+_0x23b273['height'],_0x23b273=this['_getItemBefore'](_0x23b273);return _0x14ce1c;}}function G(_0x18f1d6,_0x4d1712){return Math['max'](_0x18f1d6-_0x4d1712,0x0);}function g(_0x34ebdf){return null!==_0x34ebdf&&'object'==typeof _0x34ebdf&&0x1===_0x34ebdf['nodeType'];}class e extends _0x5d570f{['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(_0x15e328){super(_0x15e328),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x52f624(),this['_refreshPositioningDebounced']=_0x80a969(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x55a14e=this['context']['plugins']['get'](j),_0x82234d=this['context']['plugins']['get'](z);_0x55a14e['register']('wideSidebar',this),_0x82234d['container']&&_0x55a14e['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3a45fd){if(_0x3a45fd===this['activeAnnotation'])return;const _0xb8ce07=this['context']['plugins']['get'](z);_0xb8ce07['_activeAnnotation']=_0x3a45fd;const _0x269c2b=this['activeAnnotation'];_0xb8ce07['refresh']({'blurredAnnotation':_0x269c2b,'activatedAnnotation':_0x3a45fd}),this['activeAnnotation']=_0x3a45fd;}['attach'](_0x4b52a4){this['annotations']=_0x4b52a4;const _0x581c64=this['context']['plugins']['get'](z);if(_0x581c64['_annotations']=_0x4b52a4,this['isAttached'])throw new _0xcbec56('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x581c64,'set:container',()=>{this['detach'](),this['listenTo'](_0x581c64,'change:container',_0x4af4c9=>{_0x4af4c9['off'](),this['attach'](_0x4b52a4);});}),_0x581c64['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3d0695=_0x266b76=>{_0x266b76['updateTargetRect'](),_0x581c64['addAnnotation'](_0x266b76);};for(const _0x5bb863 of _0x4b52a4)_0x3d0695(_0x5bb863);this['listenTo'](_0x4b52a4,'add',(_0x3afd94,_0x90a858)=>{_0x3d0695(_0x90a858);}),this['listenTo'](_0x4b52a4,'remove',(_0x52a61f,_0xcf24a8,_0x32ea79)=>{_0x581c64['rearrange']({'removedAnnotation':_0xcf24a8,'previousAnnotation':_0x4b52a4['get'](_0x32ea79-0x1),'nextAnnotation':_0x4b52a4['get'](_0x32ea79+0x1)}),_0xcf24a8===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4b52a4,'focus',(_0x5206be,_0x59b872)=>{this['setActiveAnnotation'](_0x59b872);}),this['listenTo'](_0x4b52a4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x12d001=this['context']instanceof _0x3422b6?this['context']['editors']:new _0x52f624([this['context']]);for(const _0x39318c of _0x12d001)this['_integrateWithEditorAnnotations'](_0x39318c);this['listenTo'](_0x12d001,'add',(_0x2d6abd,_0x4de852)=>{this['listenTo'](_0x4de852,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4de852);});}),this['listenTo'](_0x12d001,'remove',(_0x48a85c,_0x1bbbfe)=>{_0x1bbbfe['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1bbbfe['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xcbec56('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1c7891=this['context']['plugins']['get'](z);_0x1c7891['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1c7891),this['stopListening'](this['annotations']),this['context']instanceof _0x3422b6&&this['stopListening'](this['context']['editors']);for(const _0x2ad189 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2ad189);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2e1476){if(!_0x2e1476['plugins']['has']('EditorAnnotations'))return;const _0xcb9584=_0x2e1476['plugins']['get']('EditorAnnotations'),_0x745a09=()=>{const _0x3e4d84=_0xcb9584['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3e4d84[0x0]||null);};this['listenTo'](_0xcb9584,'refresh',_0x745a09),this['listenTo'](_0xcb9584,'blur',(_0x425314,{isAnnotationTracked:_0x4fb1b8})=>{this['activeAnnotation']&&_0x4fb1b8(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xcb9584,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x102969=>{_0xcb9584['hasDomSelection']()&&(_0x745a09(),_0x102969['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xcb9584);}['_destroyEditorAnnotationsIntegration'](_0x2d7584){this['stopListening'](_0x2d7584),this['_editorAnnotations']['remove'](_0x2d7584);}}class C extends _0x1287d8{['counterView'];constructor(_0x22979c){super(_0x22979c);const _0x1c0309=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2351ca,_0x49a593)=>_0x2351ca?'...':_0x49a593['toString']()),this['set']('annotationType',''),this['icon']=_0x31f37f,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1c0309['to']('annotationType',_0x377c99=>'ck-annotation-counter__badge--'+_0x377c99),_0x1c0309['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1c0309['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x5d570f{['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(_0x4b18a8){super(_0x4b18a8),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3f2fdf())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x52f624(),this['_refreshPositioningDebounced']=_0x80a969(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2a9849(this['context']['locale']),this['balloonPanelView']=new _0x4a0fdd(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x14efa2){this['annotations']=_0x14efa2;const _0x5efb97=this['context']['plugins']['get'](z),_0x19aca3=this['balloonPanelView'];if(_0x5efb97['_annotations']=_0x14efa2,this['isAttached'])throw new _0xcbec56('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5efb97,'set:container',()=>{this['detach'](),this['listenTo'](_0x5efb97,'change:container',_0x39d1d7=>{_0x39d1d7['off'](),this['attach'](_0x14efa2);});}),_0x5efb97['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x84bc8d=_0x56bc07=>{const _0xc56b84=new C(this['context']['locale']);_0x5efb97['addAnnotation'](_0x56bc07,_0xc56b84),this['_annotationToNarrowView']['set'](_0x56bc07,_0xc56b84),_0xc56b84['bind']('isDirty','annotationType','number')['to'](_0x56bc07['view'],'isDirty','type','length'),_0xc56b84['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x19aca3['content']['first']!==_0x56bc07['view']?(this['_showBalloon'](_0x56bc07),_0x56bc07['view']['element']['focus'](),this['setActiveAnnotation'](_0x56bc07)):this['setActiveAnnotation'](null);});};for(const _0xb5eabb of _0x14efa2)_0x84bc8d(_0xb5eabb);this['listenTo'](_0x14efa2,'add',(_0x49b5a2,_0x18715c)=>{_0x84bc8d(_0x18715c);}),this['listenTo'](_0x14efa2,'remove',(_0x59452b,_0x13c252,_0x2aea66)=>{this['_annotationToNarrowView']['get'](_0x13c252)['destroy'](),this['_annotationToNarrowView']['delete'](_0x13c252),_0x5efb97['rearrange']({'removedAnnotation':_0x13c252,'previousAnnotation':_0x14efa2['get'](_0x2aea66-0x1),'nextAnnotation':_0x14efa2['get'](_0x2aea66+0x1)}),_0x13c252===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x14efa2,'focus',(_0x404732,_0x2f43d0)=>{this['setActiveAnnotation'](_0x2f43d0);}),this['listenTo'](_0x14efa2,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x567634,_0x25e520)=>{_0x25e520['keyCode']===_0x7ba570['esc']&&_0x19aca3['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x19aca3['content']['first']),this['_hideBalloon'](),_0x25e520['stopPropagation'](),_0x25e520['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x115092,_0x1c5464)=>{const _0x484a67=_0x1c5464['target'];_0x19aca3['isVisible']&&_0x19aca3['element']['contains'](_0x484a67)||_0x5efb97['view']['element']['contains'](_0x484a67)||_0x115092['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x5717e6=>_0x5717e6['contains'](_0x484a67))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xa77d2c=this['context']instanceof _0x3422b6?this['context']['editors']:new _0x52f624([this['context']]);for(const _0x22536c of _0xa77d2c)this['_integrateWithEditorAnnotations'](_0x22536c);this['listenTo'](_0xa77d2c,'add',(_0x50aad0,_0x93b1a1)=>{this['listenTo'](_0x93b1a1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x93b1a1);});}),this['listenTo'](_0xa77d2c,'remove',(_0x34a865,_0x182238)=>{_0x182238['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x182238['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0xa95432){if(_0xa95432===this['activeAnnotation'])return;const _0x448e9a=this['context']['plugins']['get'](z);if(_0x448e9a['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0xa95432,'disableAnimationOnActivatedAnnotation':!0x0}),_0xa95432)_0x448e9a['getSidebarItemView'](_0xa95432)?this['_showBalloon'](_0xa95432):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0xa95432;}['detach'](){if(!this['isAttached'])throw new _0xcbec56('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3360d3=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xbaa66b=>_0xbaa66b['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3360d3['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3422b6&&this['stopListening'](this['context']['editors']);for(const _0x5ce63a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5ce63a);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'](_0xdd4754){if(!_0xdd4754['plugins']['has']('EditorAnnotations'))return;const _0x4f925e=_0xdd4754['plugins']['get']('EditorAnnotations'),_0xee129=this['context']['plugins']['get'](z),_0x381a25=this['annotations'],_0x13ce5a=this['balloonPanelView'],_0x56b0ba=()=>{const _0xb906f2=_0x4f925e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xb906f2),this['setActiveAnnotation'](_0xb906f2[0x0]||null);};this['listenTo'](_0x4f925e,'refresh',_0x56b0ba),this['listenTo'](_0x4f925e,'blur',(_0x11a107,{isAnnotationTracked:_0x298033})=>{this['activeAnnotation']&&_0x298033(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4f925e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x381a25,'blur',_0x1802c3=>{_0x4f925e['hasDomSelection']()&&_0x1802c3['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x249af5,_0xf32017)=>{const _0x3a493e=_0xf32017['target'];_0x13ce5a['isVisible']&&_0x13ce5a['element']['contains'](_0x3a493e)||_0xee129['view']['element']['contains'](_0x3a493e)||this['activeAnnotation']&&_0x4f925e['hasDomSelection']()&&(_0x56b0ba(),_0x249af5['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4f925e);}['_destroyEditorAnnotationsIntegration'](_0x21d09c){_0x21d09c&&(this['stopListening'](_0x21d09c),this['_editorAnnotations']['remove'](_0x21d09c));}['_setSelectedAnnotations'](_0x39ede9){for(const _0x22b7b8 of this['_selectedAnnotations'])_0x39ede9['includes'](_0x22b7b8)||this['_manuallyClosedAnnotationViews']['delete'](_0x22b7b8['view']);this['_selectedAnnotations']=_0x39ede9;}['_refreshPositioning'](){const _0x57e18e=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x57e18e['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4c69d0){if(this['_manuallyClosedAnnotationViews']['has'](_0x4c69d0['view']))return;const _0x218358=this['balloonPanelView']['content']['first'];_0x218358!==_0x4c69d0['view']?(_0x218358&&this['_detachListeners'](_0x218358),this['_attachListeners'](_0x4c69d0['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4c69d0['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xd9d745=this['balloonPanelView']['content']['first'],_0x3309d4=_0xd9d745&&this['annotations']['getByView'](_0xd9d745);if(!_0x3309d4||!this['_annotationToNarrowView']['has'](_0x3309d4))return;const _0x5c3f50=this['_annotationToNarrowView']['get'](_0x3309d4)['element'],_0x4ef6b1=(function(){const _0xefb656=_0x4a0fdd['defaultPositions'];return[_0xefb656['southArrowNorthEast'],_0xefb656['northArrowSouthEast'],_0xefb656['southArrowNorth'],_0xefb656['northArrowSouth'],_0xefb656['southArrowNorthWest'],_0xefb656['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5c3f50,'positions':_0x4ef6b1});}['_hideBalloon'](){const _0x5118a1=this['balloonPanelView'],_0x46972f=_0x5118a1['content']['first'];_0x46972f&&(this['_detachListeners'](_0x46972f),_0x5118a1['unpin'](),_0x5118a1['content']['clear']());}['_attachListeners'](_0x4b1a19){this['listenTo'](_0x4b1a19,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4b1a19,'Esc',(_0x302bf5,_0x8faf7b)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4b1a19),this['_hideBalloon'](),_0x8faf7b();});}['_detachListeners'](_0x4d35e4){this['stopListening'](_0x4d35e4);}}class c extends _0x847970{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x1c6b4d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x21fca3){super(_0x21fca3),_0x21fca3['editing']['view']['addObserver'](_0x28fbef),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x21fca3['plugins']['get'](_0x1c6b4d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x4ce7c8=this['editor']['plugins']['get'](j);_0x4ce7c8['context']===this['editor']&&(_0x4ce7c8['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x29e515,_0x32a98c)=>{const _0x2aacbd=this['_balloon'];if(this['isAttached']&&_0x2aacbd['visibleView']){const _0x5aa7e8=this['annotations']['getByView'](_0x2aacbd['visibleView']);_0x5aa7e8&&this['_closeAnnotation'](_0x5aa7e8),_0x32a98c();}}));}['afterInit'](){const _0x4abc2d=this['editor']['plugins']['get'](j);_0x4abc2d['context']===this['editor']&&(_0x4abc2d['hasActive']()||_0x4abc2d['switchTo']('inline'));}['setActiveAnnotation'](_0x5c1e70){_0x5c1e70!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5c1e70&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5c1e70)&&this['_addAnnotationToBalloon'](_0x5c1e70,!0x0),_0x5c1e70['isActive']=!0x0),_0x5c1e70||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5c1e70);}['attach'](_0x5a61a0){this['annotations']=_0x5a61a0;const _0x52ed73=this['editor']['plugins']['get'](j),_0x5f5884=this['_balloon'];if(this['isAttached'])throw new _0xcbec56('inlineannotations-attach-already-attached',this);if(_0x52ed73['context']!==this['editor'])throw new _0xcbec56('inlineannotations-not-allowed-with-context',this);const _0x11e732=this['editor']['plugins']['get'](b);this['listenTo'](_0x11e732,'refresh',()=>{const _0xb60455=_0x11e732['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x108de8,_0x3e368a;!this['_forceRefresh']&&(_0x108de8=_0xb60455,_0x3e368a=this['_selectedAnnotations'],_0x108de8['length']===_0x3e368a['length']&&_0x108de8['every'](_0x48e34a=>_0x3e368a['includes'](_0x48e34a)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xb60455),this['setActiveAnnotation'](_0xb60455[0x0]||null));}),this['listenTo'](_0x11e732,'blur',(_0x3c9c07,{isAnnotationTracked:_0x5df021})=>{this['activeAnnotation']&&_0x5df021(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x15553a,_0x18865f,_0x363b31)=>{_0x363b31||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5a61a0,'remove',(_0x2a6a2d,_0x4af328)=>{this['_removeAnnotationFromBalloon'](_0x4af328),_0x4af328===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5f5884,'change:visibleView',(_0x3f2777,_0x240144,_0x37624b,_0xd74190)=>{_0xd74190&&this['stopListening'](_0xd74190);const _0x2ceb78=_0x5a61a0['getByView'](_0x37624b);_0x37624b&&_0x2ceb78&&(this['listenTo'](_0x37624b,'change:height',()=>{_0x5f5884['updatePosition']();}),this['listenTo'](_0x37624b,'Esc',()=>{this['_closeAnnotation'](_0x2ceb78),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2ceb78&&this['setActiveAnnotation'](_0x2ceb78));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5f5884['visibleView']&&(_0x5a61a0['getByView'](_0x5f5884['visibleView'])&&_0x5f5884['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 _0xcbec56('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5e4692 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5e4692);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x48dd17){for(const _0x5ea7ea of this['_selectedAnnotations'])_0x48dd17['includes'](_0x5ea7ea)||this['_manuallyClosed']['delete'](_0x5ea7ea);for(const _0x2b04bb of this['annotations'])_0x48dd17['includes'](_0x2b04bb)||this['_removeAnnotationFromBalloon'](_0x2b04bb);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4f69ab of _0x48dd17)this['_addAnnotationToBalloon'](_0x4f69ab);}this['_selectedAnnotations']=_0x48dd17;}['_addAnnotationToBalloon'](_0x45d94d,_0x2fc350=!0x1){this['_manuallyClosed']['has'](_0x45d94d)||(this['_addedAnnotations']['has'](_0x45d94d)||this['_balloon']['hasView'](_0x45d94d['view'])||(this['_addedAnnotations']['add'](_0x45d94d),this['_balloon']['add']({'stackId':_0x45d94d['view']['id'],'view':_0x45d94d['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x45d94d)}})),_0x2fc350&&this['_balloon']['showStack'](_0x45d94d['view']['id']));}['_getBalloonTargetForAnnotation'](_0x33c4cf){const _0x348109=_0x33c4cf['target'],_0x3a3c0=this['editor']['editing']['view'],_0x289960=_0x3a3c0['document']['selection']['getFirstRange'](),_0x4b78ef=_0x3a3c0['domConverter']['viewRangeToDom'](_0x289960);if(_0x4b78ef['collapse'](!0x0),_0x348109){if(_0x348109 instanceof _0x206900)return _0x348109;let _0x32a8ad=[];for(const _0x1a8f39 of _0x348109)_0x32a8ad['push'](...F(_0x1a8f39['getClientRects']()));_0x32a8ad=function(_0x565aef){const _0x4294a2=[];let _0x54f4f3=_0x565aef[0x0];for(let _0x48407b=0x1;_0x48407b<_0x565aef['length'];_0x48407b++)P(_0x54f4f3,_0x565aef[_0x48407b])?_0x54f4f3['width']+=_0x565aef[_0x48407b]['width']:(_0x4294a2['push'](_0x54f4f3),_0x54f4f3=_0x565aef[_0x48407b]);return _0x4294a2['push'](_0x54f4f3),_0x4294a2;}(_0x32a8ad);const _0x3663df=_0x4b78ef['getBoundingClientRect']();return _0x32a8ad['find'](_0xeb7a11=>_0xeb7a11['top']<=_0x3663df['top']&&_0xeb7a11['bottom']>=_0x3663df['bottom']&&_0xeb7a11['left']<=_0x3663df['left']&&_0xeb7a11['right']>=_0x3663df['right'])||_0x32a8ad[0x0];}return _0x33c4cf['targetRect']||_0x4b78ef;}['_removeAnnotationFromBalloon'](_0x368f8f){this['_addedAnnotations']['has'](_0x368f8f)&&this['_balloon']['hasView'](_0x368f8f['view'])&&(this['_addedAnnotations']['delete'](_0x368f8f),this['_balloon']['remove'](_0x368f8f['view']));}['_closeAnnotation'](_0xc67037){this['_manuallyClosed']['add'](_0xc67037),this['_removeAnnotationFromBalloon'](_0xc67037);}}function F(_0xd7197a){return Array['from'](_0xd7197a)['map'](DOMRect['fromRect']);}function P(_0x50827a,_0x58a05d){return _0x50827a['top']===_0x58a05d['top']&&_0x50827a['bottom']===_0x58a05d['bottom']&&_0x50827a['right']===_0x58a05d['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x6594a2,_0x24cccc){super(_0x6594a2),this['set']('isEmpty',!_0x24cccc['length']),this['focusTracker']=new _0xd0afa6(),this['_annotationViews']=_0x24cccc,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x5aa072({'focusables':_0x24cccc,'focusTracker':this['focusTracker']}),this['listenTo'](_0x24cccc,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x24cccc,'remove',(_0x17b29d,_0x28c2ff)=>{_0x28c2ff['isActive']&&this['focus'](),_0x24cccc['length']||(this['isEmpty']=!0x0);});const _0x240325=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x6594a2,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x24cccc},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x240325['if']('isEmpty','ck-hidden',_0x305b2a=>!_0x305b2a)]},'children':[{'text':N(_0x6594a2,'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 _0x1a8fe0 of this['_annotationViews'])this['focusTracker']['add'](_0x1a8fe0['element']);this['_annotationViews']['on']('change',(_0x30899f,{added:_0x57387d,removed:_0x493c1c})=>{for(const _0x2883f7 of _0x57387d)this['focusTracker']['add'](_0x2883f7['element']);for(const _0x1b86e0 of _0x493c1c)this['focusTracker']['remove'](_0x1b86e0['element']);});}}class p extends _0x5d570f{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x3aee9b){super(_0x3aee9b),this['archivedThreads']=new _0x52f624();}['init'](){const _0x3a23b9=this['context'],_0x4d99ef=_0x3a23b9['plugins']['get'](o),_0x6f670f=_0x3a23b9['plugins']['get'](y);this['listenTo'](_0x4d99ef,'addCommentThread',(_0x42d382,{threadId:_0x112b10})=>{const _0x415827=_0x4d99ef['getCommentThread'](_0x112b10);_0x415827['archivedAt']&&this['archivedThreads']['add'](_0x415827,this['_calculatePosition'](_0x415827['archivedAt'])),this['listenTo'](_0x415827,'change:archivedAt',(_0x2ac574,_0x5d892c,_0x514588)=>{_0x514588?this['archivedThreads']['has'](_0x415827)||this['archivedThreads']['add'](_0x415827,this['_calculatePosition'](_0x415827['archivedAt'])):this['archivedThreads']['has'](_0x415827)&&this['archivedThreads']['remove'](_0x415827);});}),this['listenTo'](_0x4d99ef,'removeCommentThread',(_0x4d493f,{threadId:_0x742bc3})=>{const _0x195a6b=_0x4d99ef['getCommentThread'](_0x742bc3);this['stopListening'](_0x195a6b),this['archivedThreads']['has'](_0x195a6b)&&this['archivedThreads']['remove'](_0x195a6b);},{'priority':'highest'}),this['listenTo'](_0x6f670f['collection'],'focus',(_0x3c4310,_0x4d9110)=>{_0x4d9110['isVisible']||(_0x4d9110['isActive']=!0x0,_0x6f670f['activate'](_0x4d9110));});}['_calculatePosition'](_0x519548){const _0x562cc5=[...this['archivedThreads']]['findIndex'](_0x5ad613=>_0x5ad613['archivedAt']<_0x519548);return _0x562cc5>-0x1?_0x562cc5:this['archivedThreads']['length'];}}class a extends _0x847970{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x517e68];}constructor(_0x4a5e73){super(_0x4a5e73),this['annotationViews']=new _0x55d301(),this['_pendingThreads']=[];}['init'](){const _0xd6d9b9=this['editor'],_0x3bb6f9=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xd6d9b9['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1287d8,!0x0)),_0xd6d9b9['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4dc992=this['_createCommentsArchiveButton'](_0x3cebc9);return _0x4dc992['set']({'role':'menuitemcheckbox'}),_0x4dc992;});const _0x1c2562=_0xd6d9b9['plugins']['get'](p),_0x5e1a30=_0xd6d9b9['plugins']['get']('Annotations'),_0x409a7a=_0xd6d9b9['plugins']['get']('CommentsRepository');_0x1c2562['archivedThreads']['forEach'](_0xaf143=>{this['_handleNewThread'](_0xaf143);}),this['listenTo'](_0x1c2562['archivedThreads'],'add',(_0x2335b6,_0x3dc792)=>{this['_handleNewThread'](_0x3dc792);}),this['listenTo'](_0x5e1a30['collection'],'add',(_0x538eff,_0x3a557a)=>{const _0x209291=this['_pendingThreads']['find'](_0x56531e=>{const _0x5b2759=_0x409a7a['_threadToController']['get'](_0x56531e);return _0x5b2759&&_0x3a557a['innerView']===_0x5b2759['view'];});if(_0x209291){const _0xd97943=this['_calculatePosition'](_0x209291['archivedAt']);this['annotationViews']['add'](_0x3a557a['view'],_0xd97943),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x209291),0x1);}}),this['listenTo'](_0x1c2562['archivedThreads'],'remove',(_0x1afb9d,_0x4b2187)=>{const _0x30870c=_0xd6d9b9['config']['get']('collaboration.channelId');if(!_0x30870c||_0x4b2187['channelId']===_0x30870c){if(this['_pendingThreads']['includes'](_0x4b2187))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4b2187),0x1);else{const _0x104ce0=_0x409a7a['_threadToController']['get'](_0x4b2187),_0x39efa7=_0x5e1a30['getByInnerView'](_0x104ce0['view']);this['annotationViews']['remove'](_0x39efa7['view']),this['stopListening'](_0x39efa7['focusableElements']);}}}),this['listenTo'](_0x5e1a30['collection'],'add',(_0x4d4782,_0x4d4473)=>{this['listenTo'](_0x4d4473,'escape',_0x3bb6f9);}),this['listenTo'](_0x5e1a30['collection'],'remove',(_0x14655b,_0x1a10c4)=>{this['stopListening'](_0x1a10c4,'escape',_0x3bb6f9);});}['_handleNewThread'](_0x249c1c){const _0x1ead8b=this['editor']['plugins']['get']('CommentsRepository'),_0x343c81=this['editor']['plugins']['get']('Annotations'),_0x317715=this['editor']['config']['get']('collaboration.channelId');if(!_0x317715||_0x249c1c['channelId']===_0x317715){const _0x37e4cc=_0x1ead8b['_threadToController']['get'](_0x249c1c);if(!_0x37e4cc)return void this['_pendingThreads']['push'](_0x249c1c);const _0x42cf0c=this['_calculatePosition'](_0x249c1c['archivedAt']),_0x2d6258=_0x343c81['getByInnerView'](_0x37e4cc['view']);_0x2d6258['isVisible']&&_0x343c81['_visibleAnnotations']['remove'](_0x2d6258),this['annotationViews']['add'](_0x2d6258['view'],_0x42cf0c);}}['_calculatePosition'](_0xf8b524){const _0x3c7570=this['editor']['config']['get']('collaboration.channelId'),_0x2e711a=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x27b561=>_0x27b561['channelId']===_0x3c7570)['findIndex'](_0x23747e=>_0x23747e['archivedAt']<_0xf8b524);return _0x2e711a<0x0||_0x2e711a>this['annotationViews']['length']?this['annotationViews']['length']:_0x2e711a-0x1;}['_toggleDialog'](){const _0x4bdd77=this['editor'],_0x1ad5d2=_0x4bdd77['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x4bdd77['locale'],this['annotationViews'])),'commentsArchive'===_0x1ad5d2['id']?_0x1ad5d2['hide']():_0x1ad5d2['show']({'id':'commentsArchive','title':N(_0x4bdd77['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3df419,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x42e0d9['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x58b085,_0x23b0ae=!0x1){const _0x321c56=this['editor']['locale'],_0x44b15a=this['editor']['plugins']['get']('Dialog'),_0x29d3aa=new _0x58b085(_0x321c56);return _0x29d3aa['bind']('isEnabled')['to'](this,'isEnabled'),_0x29d3aa['bind']('isOn')['to'](_0x44b15a,'id',_0xe6cfbc=>'commentsArchive'===_0xe6cfbc),_0x29d3aa['set']({'label':N(_0x321c56,'COMMENTS_ARCHIVE'),'icon':_0x3df419,'isToggleable':!0x0}),_0x23b0ae&&(_0x29d3aa['tooltip']=!0x0),this['listenTo'](_0x29d3aa,'execute',()=>this['_toggleDialog']()),_0x29d3aa;}['_hideDialogOnAnnotationEscape']=_0x5469ee=>{const _0x30b6f1=_0x5469ee['source'];if(!this['annotationViews']['has'](_0x30b6f1['view']))return;const _0x57ddd5=this['editor']['plugins']['get']('Dialog');_0x57ddd5['isOpen']&&'commentsArchive'===_0x57ddd5['id']&&(_0x57ddd5['hide'](),_0x5469ee['stop']());};}class gi extends _0x847970{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x4bc0e5,ContextPlugin as _0x3f106c,PendingActions as ht,Command as _0x7f5ae3,Plugin as _0x1a45c0,Context as _0x41d3ee}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x166ad1,uid as _0x27956d,KeystrokeHandler as jt,FocusTracker as _0x34c795,diff as _0x27fecb,Collection as _0x4550ea,Rect as _0x415c3c,CKEditorError as _0x160abe,first as _0x31f99c,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x3d333e,keyCodes as _0x1fca4c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x54cc69,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1aaf7c,trimHtml as ts,LateFocusDropdownButtonView as _0x1d5b3a,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x332df9}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as Ct,debounce as _0x35cf6e}from'es-toolkit/compat';import{IconUndo as _0x41ae24,IconCheck as _0x2370eb,IconPencil as _0x44cb21,IconRemoveComment as _0x1786d4,IconThreeVerticalDots as _0x5b8bc6,IconAddComment as _0x54774b,IconCommentsArchive as _0x3bc011}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x230040,ButtonView as _0x4cc9f4,ViewCollection as _0x1bac6b,createDropdown as _0x641072,ListView as _0x23c5f3,focusChildOnDropdownOpen as _0xd80ee5,ListItemView as _0x3a773c,MenuBarMenuListItemButtonView as _0x353c38,BodyCollection as _0x394631,BalloonPanelView as _0x7586f9,ContextualBalloon as _0x5a5023,Dialog as _0x3a9f1b,DialogViewPosition as _0x23317a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x96ebaf}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x5f5a8d}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x58281d}from'@ckeditor/ckeditor5-widget/dist/index.js';class yt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x166ad1(){['model'];['view'];constructor(_0xfdbbe2,_0x59ec02){super(),this['model']=_0xfdbbe2,this['model']['_isAttached']=!0x0,this['view']=_0x59ec02,this['listenTo'](_0x59ec02,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x59ec02,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x59ec02,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x59ec02,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x59ec02,'addComment',(_0x575669,_0xde38a8)=>this['addComment'](_0xde38a8)),this['listenTo'](_0x59ec02,'updateComment',(_0xd43ab4,_0x352d73,_0x51bc89)=>this['updateComment'](_0x352d73,_0x51bc89)),this['listenTo'](_0x59ec02,'removeComment',(_0xc3923b,_0x2e91fe)=>this['removeComment'](_0x2e91fe));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x160c1a){this['model']['addComment']({'content':_0x160c1a,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3021d8,_0x5b6381){this['model']['getComment'](_0x3021d8)['update']({'content':_0x5b6381});}['removeComment'](_0xb2de10){this['model']['getComment'](_0xb2de10)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x2a43eb,_0x38cf05,_0x22f375){const t=_0x2a43eb['t'];switch(_0x38cf05){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'},_0x22f375);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'},_0x22f375);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'},_0x22f375);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'},_0x22f375);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x22f375);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'},_0x22f375);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'},_0x22f375);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'},_0x22f375);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(_0x2391c9,_0x38ebfe){super(_0x2391c9);const _0x265a13=_0x27956d();this['main']=this['createCollection'](),this['editable']=new Vt(_0x2391c9,_0x38ebfe,void 0x0,{'label':()=>N(_0x2391c9,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x2391c9['uiLanguageDirection'],'lang':_0x2391c9['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x265a13},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x38c7f5){super(_0x38c7f5),this['view']=new Rt(_0x38c7f5['locale'],_0x38c7f5['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x36beca=this['editor']['editing']['view'],_0x41c8ad=this['view']['editable'],_0x55a0c5=_0x36beca['document']['getRoot']();_0x41c8ad['name']=_0x55a0c5['rootName'],this['view']['render']();const _0x544647=_0x41c8ad['element'];this['setEditableElement'](_0x41c8ad['name'],_0x544647),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x36beca['attachDomRoot'](_0x544647),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x166ad1(_0x4bc0e5){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x213574={}){function _0x7eed12(_0x21fe2c){return _0x21fe2c['map'](_0x655f1d=>String['fromCharCode'](_0x655f1d))['join']('');}(_0x213574=Object['assign']({},_0x213574))['plugins']||(_0x213574['plugins']=Qt['defaultPlugins']),super(_0x213574),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x7eed12([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x7eed12([0x76,0x69,0x65,0x77])][_0x7eed12([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x7eed12([0x61,0x75,0x74,0x6f]),this[_0x7eed12([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x7eed12([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x7eed12([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x7eed12([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x7eed12([0x6f,0x6b])});}['create'](){const _0x4262d4=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4262d4))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x547b91=>{const _0x576861=this['model']['document']['getRoot'](),_0x54f6e8=_0x576861&&_0x576861['getChild'](_0x576861['childCount']-0x1);_0x547b91['setSelection'](_0x54f6e8,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xd3d49a=this['editing']['view'],_0x5db9e5=_0xd3d49a['document']['getRoot'](),_0x1e80f4=_0x5db9e5['getChild'](0x0);_0x5db9e5['childCount']>0x1||!_0x1e80f4||'p'!=_0x1e80f4['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0xd3d49a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1e80f4['placeholder']=this['placeholder']),St({'view':_0xd3d49a,'element':_0x1e80f4,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1e80f4);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x46fccc,_0x54afa5={}){super(_0x46fccc),this['editor']=null,this['_editorConfig']=_0x54afa5,this['set']('value',_0x54afa5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x46fccc,'Reply...')),this['set']('submitLabel',N(_0x46fccc,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x34c795(),this['focusCycler']=new _0x230040({'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',(_0x2728e5,_0x34c73c)=>{this['cancelButtonView']['fire']('execute'),_0x34c73c();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5e87f0,_0x5212f9)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5212f9());}),this['on']('submit',(_0xbfe02a,_0x36ba51)=>{_0x36ba51['length']>0xfde8?(alert(N(_0x46fccc,'TOO_LONG_COMMENT_ALERT',[_0x36ba51['length'],0xfde8])),_0xbfe02a['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x54da1a=this['editor'];this['element']['insertBefore'](_0x54da1a['ui']['element'],this['element']['firstChild']),_0x54da1a['model']['document']['on']('change',()=>this['value']=_0x54da1a['getData']()),_0x54da1a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x54da1a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5b0b9b){-0x1===_0x5b0b9b?(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:_0x28439a}=this,_0xc2e46c=new _0x4cc9f4(_0x28439a);return _0xc2e46c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xc2e46c['withText']=!0x0,_0xc2e46c['bind']('label')['to'](this,'submitLabel'),_0xc2e46c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xc2e46c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2125f5,_0x23ce49)=>!_0x23ce49&&!!_0x2125f5['trim']()),_0xc2e46c;}['_createCancelButton'](){const {locale:_0x1ce9b}=this,_0x5e4d46=new _0x4cc9f4(_0x1ce9b);return _0x5e4d46['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x5e4d46['label']=N(_0x1ce9b,'Cancel'),_0x5e4d46['withText']=!0x0,_0x5e4d46['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x5e4d46;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3301b8=>{this['focusTracker']['add'](_0x3301b8['element']);}),this['focusables']['on']('change',(_0x13ac12,_0xef00dc)=>{for(const _0x384785 of Array['from'](_0xef00dc['added'])['reverse']())this['focusTracker']['add'](_0x384785['element']);});}}class ie extends kt{constructor(_0x5cb777,_0x4338bc,_0x50f1f9){super(_0x5cb777),this['commentInputView']=new es(_0x5cb777,_0x50f1f9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x297c8c,_0x3791ae)=>_0x297c8c||!!_0x3791ae),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 _0x54cc69(_0x5cb777,_0x4338bc),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'](_0x516f35){this['commentInputView']['focus'](_0x516f35);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2ae627,_0x2d2e34)=>{const {submitButtonView:_0x3ca2e1,cancelButtonView:_0x200c3b,editor:_0x39aad1}=this['commentInputView'];[_0x3ca2e1['element'],_0x200c3b['element'],_0x39aad1?_0x39aad1['editing']['view']['getDomRoot']():null]['filter'](_0x51fc8f=>_0x51fc8f)['some'](_0x290ec6=>_0x290ec6['contains'](_0x2d2e34['target']))||(this['focus'](),_0x2d2e34['preventDefault']());});}}class os extends kt{constructor(_0x167b1f){super(_0x167b1f);const _0x42d07e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x42d07e['to']('count',_0x279e7e=>N(_0x167b1f,'NUMBER_OF_COMMENTS',_0x279e7e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x52bf51,_0x4c4e29,_0x5a17e7){super(_0x52bf51);const _0x5650e0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4c4e29['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4c4e29,this['_config']=_0x5a17e7,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1a8040=>this['commentViews']['map'](_0x1ce1f7=>_0x1ce1f7['element'])['includes'](_0x1a8040['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x52bf51),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x35157c=>_0x35157c-this['_config']['maxCommentsWhenCollapsed']);for(const _0x31948c of _0x4c4e29['comments'])this['_handleNewCommentModel'](_0x31948c);this['_handleInfoComment'](),this['listenTo'](_0x4c4e29['comments'],'add',(_0x171d7f,_0x45f6d1)=>{const _0x8a30d6=this['_calculatePosition'](_0x45f6d1);this['length']++,this['_handleNewCommentModel'](_0x45f6d1,_0x8a30d6),this['refreshVisibleViews']();}),this['listenTo'](_0x4c4e29['comments'],'remove',(_0x5d543c,_0x598b97)=>{this['length']--,this['_handleRemoveCommentModel'](_0x598b97),this['refreshVisibleViews']();}),this['listenTo'](_0x4c4e29,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4c4e29,'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',_0x5650e0['if']('length','ck-hidden',_0x255db3=>!_0x255db3)],'aria-label':N(_0x52bf51,'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'](_0x135f18){-0x1===_0x135f18?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x59eba0 of this['commentViews'])_0x59eba0['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x266c0a,_0x569c2f){const _0x2f9dc8=new this['_config']['CommentView'](this['locale'],_0x266c0a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x2f9dc8['viewUid']=_0x266c0a['id'],_0x2f9dc8['delegate']('removeComment')['to'](this),_0x2f9dc8['delegate']('updateComment')['to'](this),_0x2f9dc8['delegate']('resolveCommentThread')['to'](this),_0x2f9dc8['delegate']('editorReady')['to'](this),_0x2f9dc8['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x2f9dc8,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x2f9dc8,_0x569c2f);}['_calculatePosition'](_0x142540){const _0x3d2051=this['_model']['_findOptimalIndex'](_0x142540);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x142540['authoredAt']?_0x3d2051-0x1:_0x3d2051:_0x3d2051-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x431cdf={'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'],_0x431cdf,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x431cdf));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5847ec){const _0x549e0d=this['commentViews']['remove'](_0x5847ec['id']);this['stopListening'](_0x549e0d),_0x549e0d['isEditMode']&&this['_updateHasDirtyComment'](),_0x549e0d['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x931953=>_0x931953['isEditMode']);}['_rearrangeCollapse'](){const _0x3f8d65=function(_0x1fc3f9){const _0x52e418=new _0x4550ea();for(const _0x3966d7 of _0x1fc3f9)_0x52e418['add'](_0x3966d7);return _0x52e418;}(this['commentViews']),_0x48a9a6=this['_collapsedCommentsView']['count'];for(let _0x16ee85=0x1;_0x16ee85<=_0x48a9a6;_0x16ee85++)_0x3f8d65['remove'](0x1);for(const _0x2775d5 of _0x3f8d65)_0x2775d5['collapse']();_0x48a9a6>0x0&&_0x3f8d65['add'](this['_collapsedCommentsView'],0x1),rs(_0x27fecb(Array['from'](this['visibleViews']),Array['from'](_0x3f8d65)),this['visibleViews'],_0x3f8d65);}['_rearrangeExpand'](){rs(_0x27fecb(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1e36b1 of this['visibleViews'])_0x1e36b1['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x395999=>{this['focusTracker']['add'](_0x395999['element']),this['keystrokes']['listenTo'](_0x395999['element']);}),this['commentViews']['on']('change',(_0x33356e,_0xc85242)=>{for(const _0x55e5d8 of _0xc85242['removed'])this['focusTracker']['remove'](_0x55e5d8['element']),this['keystrokes']['stopListening'](_0x55e5d8['element']);for(const _0xb6ba0d of Array['from'](_0xc85242['added'])['reverse']())this['focusTracker']['add'](_0xb6ba0d['element']),this['keystrokes']['listenTo'](_0xb6ba0d['element']);});}}function rs(_0xa027a3,_0x5a39ad,_0x3293c8){let _0x2c45d2=0x0;for(const _0x490648 of _0xa027a3)switch(_0x490648){case'insert':_0x5a39ad['add'](_0x3293c8['get'](_0x2c45d2),_0x2c45d2),_0x2c45d2++;break;case'delete':_0x5a39ad['remove'](_0x2c45d2);break;case'equal':_0x2c45d2++;}}class oe extends kt{constructor(_0x24dbd3){super(_0x24dbd3);const _0x63be8c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x63be8c['to']('contextValue',_0x429591=>N(_0x24dbd3,'THREAD_CONTEXT_LABEL',_0x429591)),'tabindex':-0x1},'children':[{'text':_0x63be8c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x44670f,_0x3c0f29){super(_0x44670f);const _0x27c6af=this['bindTemplate'];this['_model']=_0x3c0f29,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x110acc=>!!_0x110acc),this['bind']('contextValue')['to'](this['_model'],'context',_0x190673=>_0x190673&&_0x190673['value']?this['_trimContextValue'](_0x190673['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',_0x27c6af['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 _0x450c38=new _0x4cc9f4(this['locale']);return _0x450c38['label']=N(this['locale'],'Reopen'),_0x450c38['tooltip']=N(this['locale'],'Reopen'),_0x450c38['icon']=_0x41ae24,_0x450c38['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x35daa8=>!_0x35daa8),_0x450c38['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x23728f,_0x2d9c9d)=>_0x23728f&&_0x2d9c9d),_0x450c38['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x450c38;}['_trimContextValue'](_0x30ed6f){if(_0x30ed6f['length']<0x96)return _0x30ed6f;const _0x3cb9b8=_0x30ed6f['lastIndexOf']('\x20',0x93);return _0x30ed6f['substring'](0x0,_0x3cb9b8>-0x1?_0x3cb9b8:0x93)+'...';}['_attachContextActions'](){const _0x9c79a4=this['element']['querySelector']('.ck-context'),_0x2d3270=_0x9c79a4['querySelector']('.ck-context__value');this['listenTo'](_0x9c79a4,'mouseenter',()=>{_0x2d3270['offsetWidth']<_0x2d3270['scrollWidth']&&_0x9c79a4['classList']['add']('overlay');}),this['listenTo'](_0x9c79a4,'mouseleave',()=>{_0x9c79a4['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x373bdc of this['focusables'])this['focusTracker']['add'](_0x373bdc['element']),this['keystrokes']['listenTo'](_0x373bdc['element']);}['_createContextView'](){const _0x38b546=new oe(this['locale']);return _0x38b546['bind']('contextValue')['to'](this),_0x38b546;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1c5595,_0x50e15d,_0xd8985e,_0x4ef892){super(_0x1c5595),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x50e15d,this['_localUser']=_0xd8985e,this['_config']=_0x4ef892,this['commentThreadHeaderView']=new Xt(_0x1c5595,_0x50e15d),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1c5595,N(_0x1c5595,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1c5595,_0x50e15d,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4ef892)),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',(_0x29415d,_0x4eb96f)=>_0x29415d||!!_0x4eb96f),this['bind']('isUnlinked')['to'](_0x50e15d,'unlinkedAt',_0x1d9814=>!!_0x1d9814),this['bind']('ariaLabel')['to'](this,'length',_0x33a302=>{const _0x4099e3=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x33a302,_0x4099e3]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5309d9=>_0x5309d9['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 _0x52da04=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x511fec=_0x52da04['commentInputView'];return _0x52da04['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x511fec,'value',(_0x1909e1,_0x1355e9,_0x17f3aa,_0x5272d3,_0x4feb0c)=>!!_0x4feb0c||!!_0x5272d3&&_0x17f3aa&&!_0x1355e9||_0x1909e1&&_0x17f3aa&&!_0x1355e9),_0x511fec['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x24728a,_0x1af88c,_0x177baf)=>{let _0x126ea0;return _0x126ea0=_0x177baf&&_0x1af88c?'Reply\x20to\x20reopen\x20discussion...':_0x24728a?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x126ea0);}),_0x511fec['bind']('submitLabel')['to'](this,'length',_0x1bbce3=>N(this['locale'],_0x1bbce3?'Reply':'Comment')),_0x511fec['on']('submit',(_0x44d8f8,_0x2781e3)=>{this['fire']('addComment',_0x2781e3),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x511fec['on']('cancel',()=>{this['focus']();}),_0x511fec['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x511fec['on']('cancel',_0x5b2a4b=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5b2a4b['stop']());}),this['on']('change:isActive',(_0x53f833,_0x57a88d,_0x48f16b)=>{_0x48f16b||this['length']||_0x511fec['value']||this['fire']('removeCommentThread');}),_0x52da04;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x13374f,_0x31409f,_0x40c775,_0x2b233e){super(_0x13374f,_0x31409f,_0x40c775,_0x2b233e),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x13374f,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0xc0e74b,_0x17bb17,_0x379b66)=>{_0x379b66||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3cd96d,_0x2e9edd,_0x5309cc)=>{_0x5309cc&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5e2219=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5e2219['if']('isActive','ck-thread--active'),_0x5e2219['if']('isUnlinked','ck-thread--unlinked'),_0x5e2219['if']('isConfirm','ck-thread--remove-confirmation'),_0x5e2219['to']('actionIndicator',_0x4a5b43=>_0x4a5b43?'ck-thread--'+_0x4a5b43:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5e2219['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 _0x3c5d7f of this['commentsListView']['commentViews'])_0x3c5d7f['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x533474}=this,_0x1bab42=this['commentsListView']['commentViews']['get'](0x0);_0x1bab42===this['_boundFirstCommentView']||_0x1bab42['isSystemComment']||(this['_boundFirstCommentView']=_0x1bab42,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1bab42,'actionIndicator',_0x582079=>'remove'===_0x582079?'remove':null),_0x1bab42['placeholder']=N(_0x533474,'Write\x20a\x20comment...'),_0x1bab42['removeButton']['on']('execute',_0x4a3fca=>{_0x4a3fca['stop'](),this['showConfirm'](N(_0x533474,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1bab42['focus']();}),_0x1bab42['actionBar']['add'](this['resolveButton'],0x0),_0x1bab42['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x20d843=new _0x1aaf7c(this['locale']);return _0x20d843['label']=N(this['locale'],'Resolve'),_0x20d843['tooltip']=N(this['locale'],'Resolve'),_0x20d843['icon']=_0x2370eb,_0x20d843['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x20d843['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x409485=>!_0x409485),_0x20d843['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x12a833,_0x4c4609)=>_0x12a833&&!_0x4c4609),_0x20d843['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x20d843;}['_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(_0x11ad18){super(_0x11ad18),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x903501,_0x16431c,_0x141111)=>{this['element']['innerHTML']=_0x141111;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x277e4f,_0x195658,_0x3996e1){super(_0x277e4f),this['_model']=_0x195658,this['_config']=_0x3996e1,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x195658,'content',_0x195658,'authoredAt',(_0x4e5296,_0x2a0f8a)=>N(_0x277e4f,'COMMENT_ARIA_LABEL',[_0x195658['author']['name'],_0x3996e1['formatDateTime'](_0x2a0f8a),new DOMParser()['parseFromString'](_0x4e5296,'text/html')['body']['textContent'],_0x195658['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x277e4f,N(_0x277e4f,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x1bac6b(),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x523dcc=>_0x523dcc['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 _0x5893b2=new is(this['locale']);return _0x5893b2['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x37c76e,_0x410531)=>_0x410531?ts(_0x37c76e,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x37c76e),_0x5893b2;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4c4873=new es(this['locale'],this['_config']['editorConfig']);return _0x4c4873['value']=this['_model']['content'],_0x4c4873['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4c4873['submitLabel']=N(this['locale'],'Save'),_0x4c4873['on']('submit',(_0x39af35,_0x477188)=>{this['fire']('updateComment',this['_model']['id'],_0x477188),this['switchToDisplayMode'](),this['focus']();}),_0x4c4873['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4c4873['once']('editorReady',()=>{_0x4c4873['focus']();}),_0x4c4873['createEditor'](),_0x4c4873['delegate']('editorReady')['to'](this),_0x4c4873['delegate']('editorDestroyed')['to'](this),_0x4c4873;}['_setupKeyboardNavigation'](){const _0x20dd0d=this['element'];this['keystrokes']['listenTo'](_0x20dd0d);for(const _0x11216f of this['focusables'])this['focusTracker']['add'](_0x11216f['element']),this['keystrokes']['listenTo'](_0x11216f['element']);this['focusables']['on']('change',(_0x57e50a,_0x2da2db)=>{for(const _0x4d00d4 of _0x2da2db['removed'])this['focusTracker']['remove'](_0x4d00d4['element']),this['keystrokes']['stopListening'](_0x4d00d4['element']);for(const _0x3c3e53 of _0x2da2db['added'])this['focusTracker']['add'](_0x3c3e53['element']),this['keystrokes']['listenTo'](_0x3c3e53['element']);}),this['keystrokes']['set']('enter',(_0x1c0712,_0x49b695)=>{_0x20dd0d===_0x1c0712['target']&&(this['focusCycler']['focusFirst'](),_0x49b695());}),this['keystrokes']['set']('esc',(_0x5074ee,_0x92684f)=>{_0x20dd0d!==_0x5074ee['target']&&(this['focus'](),_0x92684f());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x6885b4,_0x512f96,_0x1cb3c8){super(_0x6885b4,_0x512f96,_0x1cb3c8),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x6885b4,'Reply...')),this['bind']('authoredAt')['to'](_0x512f96),this['bind']('resolvedAt')['to'](_0x512f96),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 _0x54cc69(_0x6885b4,_0x512f96['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x512f96,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x135345=this['bindTemplate'],_0x8aadc5=[{'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':_0x135345['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x135345['to']('authoredAt',_0x46fca1=>this['_config']['formatDateTime'](_0x46fca1))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x135345['if']('isEditMode','ck-comment__actions--hidden'),_0x135345['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']&&_0x8aadc5['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x135345['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x135345['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x135345['if']('isEditMode','ck-comment--edit'),_0x135345['if']('isSystemComment','ck-comment--info'),_0x135345['to']('actionIndicator',_0x274038=>_0x274038?'ck-comment--'+_0x274038:'')],'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':_0x8aadc5}]}]};}['_createEditButton'](){const _0x5da9ef=new _0x4cc9f4(this['locale']);return _0x5da9ef['label']=N(this['locale'],'Edit'),_0x5da9ef['icon']=_0x44cb21,_0x5da9ef['withText']=!0x0,_0x5da9ef['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5da9ef['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x403302=>!_0x403302),_0x5da9ef['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5da9ef['on']('execute',()=>this['switchToEditMode']()),_0x5da9ef;}['_createRemoveButton'](){const _0x4011ff=new _0x4cc9f4(this['locale']);return _0x4011ff['label']=N(this['locale'],'Remove'),_0x4011ff['icon']=_0x1786d4,_0x4011ff['withText']=!0x0,_0x4011ff['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4011ff['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x595fe0=>!_0x595fe0),_0x4011ff['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4011ff['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4011ff;}['_createDropdown'](){const _0x337002=_0x641072(this['locale'],_0x1d5b3a),_0x270427=_0x337002['panelView']['children'],_0xf78790=new _0x23c5f3(this['locale']),_0x4670ff=_0x337002['bindTemplate'];_0xd80ee5(_0x337002,()=>this['items']['find'](_0x527a39=>_0x527a39['isVisible'])),_0x337002['extendTemplate']({'attributes':{'class':[_0x4670ff['if']('isVisible','ck-hidden',_0x9b58b7=>!_0x9b58b7)]}});const _0x1eb9e2=(_0x4f593d,_0x5220a5=-0x1)=>{const _0x5e887b=new _0x3a773c(this['locale']);_0x5e887b['children']['add'](_0x4f593d);const _0x11aacc=_0x5220a5>-0x1?_0x5220a5:_0xf78790['items']['length'];_0xf78790['items']['add'](_0x5e887b,_0x11aacc);const _0x39f8f6=Array['from'](this['items']);_0x337002['unbind']('isEnabled','isVisible'),_0x337002['bind']('isEnabled')['toMany'](_0x39f8f6,'isEnabled',(..._0x242a48)=>_0x242a48['some'](_0x38f0fe=>_0x38f0fe)),_0x337002['bind']('isVisible')['toMany'](_0x39f8f6,'isVisible',(..._0x29826b)=>_0x29826b['some'](_0x2f3706=>_0x2f3706));};_0x337002['panelPosition']='sw',_0x337002['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x5b8bc6});for(const _0x185647 of this['items'])_0x1eb9e2(_0x185647);return _0x270427['add'](_0xf78790),_0x337002['listenTo'](this['items'],'add',(_0x4ec94b,_0x3859ce,_0x29a1a3)=>{_0x1eb9e2(_0x3859ce,_0x29a1a3);}),_0x337002['listenTo'](this['items'],'remove',(_0x525e14,_0x37eed9,_0x17bf39)=>{_0xf78790['items']['remove'](_0x17bf39);}),_0x337002;}['_attachActions'](_0x3d49aa,_0x36ab19){const _0x28e2d2=_0x3d49aa&&_0x3d49aa['element'];_0x28e2d2&&(this['listenTo'](_0x28e2d2,'mouseenter',()=>this['actionIndicator']=_0x36ab19),this['listenTo'](_0x28e2d2,'focus',()=>this['actionIndicator']=_0x36ab19),this['listenTo'](_0x28e2d2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x28e2d2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x5a4d67=super['_createCommentInputView']();return _0x5a4d67['bind']('placeholder')['to'](this),_0x5a4d67;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x46b725){const _0xe08fd8=Dt(_0x46b725,0x1e),_0x347889=new MutationObserver(_0x144e45=>{for(const _0x1b21db of _0x144e45)('attributes'==_0x1b21db['type']&&'class'==_0x1b21db['attributeName']||'childList'==_0x1b21db['type']||'characterData'==_0x1b21db['type'])&&_0xe08fd8();});return{'attach'(_0x231843){_0x347889['observe'](_0x231843,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x347889['disconnect'](),_0xe08fd8['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x363f76,_0x4b0b15){super(_0x363f76),this['id']=_0x27956d(),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x19606b,_0x4ef155)=>this['fire']('Esc',_0x4ef155)),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'](_0x4b0b15),this['mainView']=_0x4b0b15;const _0x43097e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x43097e['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 _0x1f2ede=this['element']['clientHeight'];_0x1f2ede&&(this['height']=_0x1f2ede);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x166ad1(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x46ec71,target:_0x12c1ad,type:_0x442fc0,isVisible:_0x173073=!0x0}){super(),this['view']=_0x46ec71,this['view']['element']||this['view']['render'](),this['_type']=_0x442fc0,this['_target']=_0x12c1ad,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4550ea([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1410fe,_0x49e086)=>{this['view']['focusTracker']['add'](_0x49e086);}),this['focusableElements']['on']('remove',(_0x1df2f4,_0x30cc21)=>{this['view']['focusTracker']['remove'](_0x30cc21);}),this['set']('isVisible',_0x173073);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x473625=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x473625),_0x473625;}get['targetRect'](){const _0x53ce1c=this['target'];if(null===_0x53ce1c)return null;if(_0x53ce1c instanceof _0x415c3c)return _0x53ce1c;const _0x41d6c8=_0x53ce1c['filter'](_0x684f=>function(_0x30d3ff){const _0x3f7090=_0x30d3ff['offsetParent'];if(_0x3f7090)return!0x0;const _0x4b3b60=_0x30d3ff['getClientRects']()['item'](0x0);return!!_0x4b3b60;}(_0x684f));return 0x0===_0x41d6c8['length']?null:new _0x415c3c(_0x41d6c8[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4193bb){this['view']['isActive']=_0x4193bb,this['view']['mainView']['isActive']=_0x4193bb;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3fd04f){if(!(null===_0x3fd04f||_0x3fd04f instanceof _0x415c3c||Array['isArray'](_0x3fd04f)&&_0x3fd04f['every'](_0x244f21=>fi(_0x244f21))))throw new _0x160abe('annotation-invalid-target',null,{'target':_0x3fd04f});}['_getNormalizedTarget'](){const _0x46c256='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x46c256)?[_0x46c256]:_0x46c256;}}function fi(_0x5a84e1){return null!==_0x5a84e1&&'object'==typeof _0x5a84e1&&'nodeType'in _0x5a84e1&&0x1===_0x5a84e1['nodeType'];}class S extends _0x4550ea{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4391d7=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x34c795(),this['_focusTracker']['on']('change:isFocused',(_0x8d033a,_0xf89188,_0x5f07b3)=>{_0x5f07b3||this['fire']('blur');});for(const _0xe5c56e of _0x4391d7)this['add'](_0xe5c56e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x361c41){if(this['has'](_0x361c41))throw new _0x160abe('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x361c41['innerView'],_0x361c41),this['_viewToAnnotation']['set'](_0x361c41['view'],_0x361c41);for(const _0x27f46b of _0x361c41['focusableElements'])this['_focusTracker']['add'](_0x27f46b);this['listenTo'](_0x361c41['focusableElements'],'add',(_0x5e672b,_0x189475)=>{this['_focusTracker']['add'](_0x189475);}),this['listenTo'](_0x361c41['focusableElements'],'remove',(_0xfdc352,_0x1da963)=>{this['_focusTracker']['remove'](_0x1da963);}),this['listenTo'](_0x361c41['view']['focusTracker'],'change:isFocused',(_0x1036aa,_0x232c14,_0x2ebedd)=>{_0x2ebedd&&this['fire']('focus',_0x361c41);}),_0x361c41['updateTargetRect']();const _0x1c468e=this['_getOrderInContent'](_0x361c41['view']['targetRect']);return super['add'](_0x361c41,_0x1c468e);}['remove'](_0x3aa9e1){if(!this['has'](_0x3aa9e1))throw new _0x160abe('annotationcollection-not-existing-item',null);this['stopListening'](_0x3aa9e1['view']['focusTracker']),this['stopListening'](_0x3aa9e1['focusableElements']);for(const _0x2ec576 of _0x3aa9e1['focusableElements'])this['_focusTracker']['remove'](_0x2ec576);return this['_viewToAnnotation']['delete'](_0x3aa9e1['view']),this['_innerViewToAnnotation']['delete'](_0x3aa9e1['innerView']),super['remove'](_0x3aa9e1);}['getByInnerView'](_0x5edc88){return this['_innerViewToAnnotation']['get'](_0x5edc88);}['getByView'](_0x2106ee){return this['_viewToAnnotation']['get'](_0x2106ee);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1cd0e0 of this)_0x1cd0e0['updateTargetRect']();this['_sort']();}['_sort'](){const _0x410d34=Array['from'](this)['sort']((_0x27a4e9,_0x58911e)=>w(_0x27a4e9['view']['targetRect'],_0x58911e['view']['targetRect']));for(let _0x205a5a=_0x410d34['length']-0x1;_0x205a5a>0x0;_0x205a5a--){const _0x16ca42=_0x410d34[_0x205a5a];_0x205a5a!==this['getIndex'](_0x16ca42)&&(this['remove'](_0x16ca42),this['add'](_0x16ca42));}}['_getOrderInContent'](_0x707393){let _0x168933=0x0;if(!_0x707393)return this['length'];for(const _0x44d4cc of this){const _0x14321a=_0x44d4cc['view']['targetRect'];if(_0x14321a){if(w(_0x707393,_0x14321a)<0x0)return _0x168933;_0x168933++;}}return _0x168933;}}function v({source:_0x1d0462,target:_0x294bc4,filter:_0xdeb797}){for(const _0x2c47c5 of _0x1d0462)_0xdeb797(_0x2c47c5)&&_0x294bc4['add'](_0x2c47c5);_0x294bc4['listenTo'](_0x1d0462,'add',(_0x42e9f0,_0x22ce2a)=>{_0xdeb797(_0x22ce2a)&&_0x294bc4['add'](_0x22ce2a);}),_0x294bc4['listenTo'](_0x1d0462,'remove',(_0x4ecac9,_0x3b0f8c)=>{_0x294bc4['has'](_0x3b0f8c)&&_0x294bc4['remove'](_0x3b0f8c);});}function w(_0x4e02c1,_0x20c38c){if(null===_0x4e02c1&&null===_0x20c38c)return 0x0;if(null===_0x4e02c1)return-0x1;if(null===_0x20c38c)return 0x1;const _0x4a6d84=_0x4e02c1['top']-_0x20c38c['top'];return 0x0==_0x4a6d84?_0x4e02c1['left']-_0x20c38c['left']:_0x4a6d84;}class y extends _0x3f106c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf4bc0c){if(super(_0xf4bc0c),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xf4bc0c instanceof _0x4bc0e5){const _0x3ddd6a=_0xf4bc0c['locale'];_0xf4bc0c['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4a581f){this['collection']['add'](_0x4a581f);}['remove'](_0x3dbdd4){this['collection']['remove'](_0x3dbdd4),_0x3dbdd4['destroy']();}['refreshVisibility'](){for(const _0x3b6c03 of this['collection'])_0x3b6c03['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5ee3e6){return this['collection']['getByInnerView'](_0x5ee3e6);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3b3f6f of this['collection'])_0x3b3f6f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x595a83){this['fire']('_activateAnnotation',_0x595a83);}['createAnnotation'](_0x495eeb){return new T(_0x495eeb);}['createAnnotationView'](_0x5bd808,_0x353b19){return new E(_0x5bd808,_0x353b19);}['_addActiveAnnotation'](_0xfd6e5){const _0x13b1be=new Set(this['activeAnnotations']);_0x13b1be['add'](_0xfd6e5),this['activeAnnotations']=_0x13b1be;}['_removeActiveAnnotation'](_0x183067){const _0x21a6f5=new Set(this['activeAnnotations']);_0x21a6f5['delete'](_0x183067),this['activeAnnotations']=_0x21a6f5;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2f3fa3=this['collection'],_0x9da377=this['_visibleAnnotations'];function _0x3bc53e(_0x409ef2){const _0x3c97cb=_0x409ef2['source'];_0x3c97cb['isVisible']&&!_0x9da377['has'](_0x3c97cb)?_0x9da377['add'](_0x3c97cb):!_0x3c97cb['isVisible']&&_0x9da377['has'](_0x3c97cb)&&_0x9da377['remove'](_0x3c97cb),_0x3c97cb['view']['focusTracker']['remove'](_0x3c97cb['view']['element']),_0x3c97cb['view']['focusTracker']['add'](_0x3c97cb['view']['element']);}this['listenTo'](_0x2f3fa3,'add',(_0x432dd5,_0x24a18a)=>{_0x24a18a['isVisible']&&_0x9da377['add'](_0x24a18a),this['listenTo'](_0x24a18a,'change:isVisible',_0x3bc53e);}),this['listenTo'](_0x2f3fa3,'remove',(_0x220ff2,_0x52183c)=>{_0x9da377['has'](_0x52183c)&&_0x9da377['remove'](_0x52183c),this['stopListening'](_0x52183c,'change:isVisible',_0x3bc53e);});}['_setupEnterAnnotationKeystroke'](){const _0x2f2194=_0x12aaf9=>{_0x12aaf9['on']('ready',()=>{_0x12aaf9['keystrokes']['set'](_0x5f5a8d,(_0x300439,_0x11b32f)=>{const _0x2ed0e1=_0x31f99c(this['activeAnnotations']['values']());_0x2ed0e1&&(_0x2ed0e1['view']['focus'](),_0x11b32f());});});};this['context']instanceof _0x4bc0e5?_0x2f2194(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x526887,_0x50615e)=>{_0x2f2194(_0x50615e);});}['_setupEscapeAnnotationHandling'](){const _0x7dbfbe=_0x561675=>{const _0x2e1479=_0x561675['source'],_0xde24d8=[];let _0xa60435;if(Array['isArray'](_0x2e1479['target'])){_0xa60435=_0x2e1479['target'][0x0],this['context']instanceof _0x4bc0e5?_0xde24d8['push'](this['context']):this['context']['editors']&&_0xde24d8['push'](...this['context']['editors']);for(const _0x12689b of _0xde24d8)for(const _0x4ceaae of _0x12689b['editing']['view']['domRoots']['values']())if(_0x4ceaae['contains'](_0xa60435))return void _0x12689b['editing']['view']['focus']();_0xa60435['focus']();}};this['listenTo'](this['collection'],'add',(_0x2a9246,_0x27d8c7)=>{this['listenTo'](_0x27d8c7,'escape',_0x7dbfbe,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3eaa0f,_0x1e79f8)=>{this['stopListening'](_0x1e79f8,'escape',_0x7dbfbe);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x3f106c{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xa30a1a){super(_0xa30a1a),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x153805=this['context']['config'];_0x153805['define']('comments.maxCommentsWhenCollapsed',0x2),_0x153805['define']('comments.maxThreadTotalWeight',0x1f4),_0x153805['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x153805['define']('comments.CommentThreadView',vt),_0x153805['define']('comments.CommentView',gt),_0x153805['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x29f05c=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3d6c03,_0x12df76)=>this['_addCommentThread'](_0x12df76)),this['on']('submitCommentThread',(_0x17cf2f,_0xacc20c)=>this['_submitCommentThread'](_0xacc20c)),this['on']('resolveCommentThread',(_0x398637,_0x35d481)=>this['_resolveCommentThread'](_0x35d481)),this['on']('resolveCommentThread',(_0x224d8a,_0x4cabd6)=>this['_updateActiveAnnotation'](_0x4cabd6),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x18e861,_0x226edf)=>this['_reopenCommentThread'](_0x226edf)),this['on']('reopenCommentThread',(_0x41320f,_0x27f2a2)=>this['_updateActiveAnnotation'](_0x27f2a2),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1fab84,_0x172761)=>this['_removeCommentThread'](_0x172761)),this['on']('updateCommentThread',(_0x48564b,_0x57793e)=>this['_updateCommentThread'](_0x57793e)),this['on']('updateCommentThread',(_0xeae559,_0xa3083f)=>this['_updateActiveAnnotation'](_0xa3083f),{'priority':'lowest'}),this['on']('addComment',(_0x57b1b7,_0x37f703)=>this['_addComment'](_0x37f703)),this['on']('updateComment',(_0x21b819,_0x53987b)=>this['_updateComment'](_0x53987b)),this['on']('removeComment',(_0x4f2515,_0x3d80d9)=>this['_removeComment'](_0x3d80d9)),this['on']('addComment',(_0x3552a1,{threadId:_0x29be3a,isFromAdapter:_0x579ff7})=>{if(_0x579ff7)return;const _0x49769d=this['getCommentThread'](_0x29be3a),_0x8001ff=_0x49769d&&this['_threadToController']['get'](_0x49769d);_0x8001ff&&_0x8001ff['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x29f05c,'change:activeAnnotations',(_0x2b49db,_0x5c39b5,_0x33ae63)=>{const _0x43bee8=Array['from'](_0x33ae63)['map'](_0x16c689=>this['_viewToController']['get'](_0x16c689['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x43bee8?_0x43bee8['model']:null;});}set['adapter'](_0xfb7064){if(this['_adapter'])throw new _0x160abe('commentsrepository-adapter-already-set');this['_adapter']=_0xfb7064;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x45cdd2=Tt,threadId:_0x258a3b=_0x27956d(),comments:_0x2365dd=[],unlinkedAt:_0x359c45=null,resolvedAt:_0x12ea61=null,resolvedBy:_0x39b751=null,target:_0x6c3150=null,context:_0x3acfd7=null,attributes:_0x29119b={},isResolvable:_0x13e529=!0x0,isSubmitted:_0x399e35=!0x1,isFromAdapter:_0x44a0ad=!0x1}={}){return this['fire'](bt('addCommentThread',_0x45cdd2),{'channelId':_0x45cdd2,'threadId':_0x258a3b,'comments':_0x2365dd,'unlinkedAt':_0x359c45,'resolvedAt':_0x12ea61,'resolvedBy':_0x39b751,'target':_0x6c3150,'context':_0x3acfd7,'attributes':_0x29119b,'isFromAdapter':_0x44a0ad,'isResolvable':_0x13e529,'isSubmitted':_0x399e35}),this['getCommentThread'](_0x258a3b);}['openNewCommentThread']({channelId:_0x226897=Tt,threadId:_0x384e9a=_0x27956d(),target:_0x216420,context:_0x1fd435=null,isResolvable:_0x308479=!0x0}){if(this['_readOnlyChannels']['has'](_0x226897)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x216420)throw new _0x160abe('commentsrepository-missing-target');const _0x91a2a3=this['addCommentThread']({'channelId':_0x226897,'threadId':_0x384e9a,'target':_0x216420,'context':_0x1fd435,'isResolvable':_0x308479});if(!_0x91a2a3)return null;const _0x3b98dc=this['_threadToController']['get'](_0x91a2a3),_0x5f5282=_0x3b98dc['view']['commentThreadInputView']['commentInputView'],_0x2d304a=this['context']['plugins']['get'](y),_0x4de514=_0x2d304a['getByInnerView'](_0x3b98dc['view']);return _0x2d304a['activate'](_0x4de514),_0x5f5282['once']('editorReady',()=>_0x5f5282['focus']()),_0x91a2a3;}['hasCommentThread'](_0x3d248c){if('string'!=typeof _0x3d248c)throw new _0x160abe('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3d248c);}['updateCommentThread']({channelId:_0x40d02f=Tt,threadId:_0x47bc93,context:_0x21cc20,unlinkedAt:_0x38d264,attributes:_0x168236,isFromAdapter:_0x14bcd4=!0x1}){return this['fire'](bt('updateCommentThread',_0x40d02f),{'channelId':_0x40d02f,'threadId':_0x47bc93,'context':_0x21cc20,'unlinkedAt':_0x38d264,'attributes':_0x168236,'isFromAdapter':_0x14bcd4}),this['getCommentThread'](_0x47bc93);}['getCommentThread'](_0x456f4d){if('string'!=typeof _0x456f4d)throw new _0x160abe('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x456f4d);}['fetchCommentThread']({channelId:_0x59a867,threadId:_0x4a65d1}={}){const _0x5d7888=this['getCommentThread'](_0x4a65d1);if(_0x5d7888)return Promise['resolve'](_0x5d7888);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x160abe('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x59a867,'threadId':_0x4a65d1})['then'](_0x2a3c3b=>this['hasCommentThread'](_0x4a65d1)?this['getCommentThread'](_0x4a65d1):_0x2a3c3b?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x59a867},_0x2a3c3b)):void 0x0)['catch'](_0x31445e=>{throw console['error'](_0x31445e),new _0x160abe('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x344ca7,skipNotAttached:_0xa0e035=!0x1,skipEmpty:_0x1a2364=!0x1,toJSON:_0x3d6694=!0x1}={}){const _0x16b16f=[];for(const _0x130bc0 of this['_threads']['values']())_0x344ca7&&_0x130bc0['channelId']!==_0x344ca7||_0xa0e035&&!_0x130bc0['isAttached']||_0x1a2364&&0x0===_0x130bc0['length']||_0x16b16f['push'](_0x130bc0);return _0x3d6694?_0x16b16f['map'](_0x44cb56=>_0x44cb56['toJSON']()):_0x16b16f;}['getAnnotationForCommentThread'](_0x43910e){const _0x33b07c=this['_threadToController']['get'](_0x43910e);if(!_0x33b07c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x33b07c['view'])||null;}['getCommentThreadForAnnotation'](_0x1716d1){const _0x1b23c2=this['_viewToController']['get'](_0x1716d1['innerView']);return _0x1b23c2?_0x1b23c2['model']:null;}['setActiveCommentThread'](_0x74087a){const _0x36bede=this['context']['plugins']['get'](y);if(!_0x74087a)return void(this['activeCommentThread']&&_0x36bede['deactivateAll']());const _0x5d306a=this['getCommentThread'](_0x74087a);if(!_0x5d306a)throw new _0x160abe('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x74087a});if(!this['_threadToController']['has'](_0x5d306a))throw new _0x160abe('commentsrepository-active-not-attached',null,{'threadId':_0x74087a});const _0x3b43a9=_0x36bede['getByInnerView'](this['_threadToController']['get'](_0x5d306a)['view']);_0x36bede['activate'](_0x3b43a9);}['switchReadOnly'](_0x36f9ca,_0x4a3ed8){_0x36f9ca?this['_readOnlyChannels']['add'](_0x4a3ed8):this['_readOnlyChannels']['delete'](_0x4a3ed8),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4f4490){return this['_readOnlyChannels']['has'](_0x4f4490)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x143330,_0x4ba4e0){return new yt(_0x143330,_0x4ba4e0);}['setPermissions'](_0x52a354,_0x3b8a5c=Tt){this['_permissions']['set'](_0x3b8a5c,_0x52a354),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xd4ad09=Tt){return this['_permissions']['has'](_0xd4ad09)?this['_permissions']['get'](_0xd4ad09):_t;}['_addCommentThread']({channelId:_0x33848b,threadId:_0x29c883,comments:_0x548965,unlinkedAt:_0x551207,resolvedAt:_0x4542f0,resolvedBy:_0x241a4d,target:_0x308d81,context:_0x57d643,attributes:_0x5c80b5,isFromAdapter:_0x2e5fef,isResolvable:_0x4be2c7,isSubmitted:_0x1bc8b9}){if('string'!=typeof _0x29c883)throw new _0x160abe('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x29c883});if(this['hasCommentThread'](_0x29c883))throw new _0x160abe('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x29c883});const _0x481767=new pi(this,{'channelId':_0x33848b,'id':_0x29c883,'context':_0x57d643,'attributes':_0x5c80b5,'unlinkedAt':_0x551207,'resolvedAt':_0x4542f0,'resolvedBy':_0x241a4d?this['context']['plugins']['get'](it)['getUser'](_0x241a4d):null,'isResolvable':_0x4be2c7,'isSubmitted':_0x1bc8b9||_0x2e5fef});this['_threads']['set'](_0x29c883,_0x481767);for(const _0x103a85 of _0x548965)_0x481767['_add'](this['_createNewComment']({'threadId':_0x29c883,..._0x103a85}));return _0x308d81&&_0x481767['attachTo'](_0x308d81),_0x2e5fef||!_0x481767['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x33848b,'threadId':_0x29c883});}['_submitCommentThread']({channelId:_0x3d702f,threadId:_0x22c637}){if(!this['hasCommentThread'](_0x22c637))throw new _0x160abe('commentsrepository-missing-comment-thread',this);const _0xd86813=this['getCommentThread'](_0x22c637);if(_0xd86813['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x22473b,comments:_0x5d7e5a,resolvedAt:_0x573f83,resolvedBy:_0xc374fa,context:_0x1a26ca,attributes:_0x4bde46}=_0xd86813,_0x55c1f1=this['context']['plugins']['get']('PendingActions'),_0x5437ad=_0x55c1f1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3d702f,'threadId':_0x22473b,'comments':_0x5d7e5a['map'](_0x2bd44e=>_0x2bd44e['toJSON']()),'resolvedAt':_0x573f83,'resolvedBy':_0xc374fa?_0xc374fa['id']:_0xc374fa,'context':_0x1a26ca,'attributes':_0x4bde46})['then'](({comments:_0x318037})=>{_0x55c1f1['remove'](_0x5437ad);for(const _0x20a07d of _0x318037)this['_updateComment']({'channelId':_0x3d702f,'threadId':_0x22c637,'commentId':_0x20a07d['commentId'],'createdAt':_0x20a07d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x199c7e=>{throw console['error'](_0x199c7e),new _0x160abe('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x34ee6b,target:_0x3cce47}){const _0x1a215e=this['getCommentThread'](_0x34ee6b);if(!_0x1a215e)throw new _0x160abe('commentsrepository-attach-missing-comment-thread',this);const _0x53ac33=this['context']['plugins']['get']('PendingActions'),_0x5120db=this['context']['plugins']['get'](y),_0x3a344d=this['_createCommentThreadView'](_0x1a215e),_0x2593f8=new yt(_0x1a215e,_0x3a344d);let _0xe347d4=null;_0x3a344d['on']('change:isDirty',(_0x17e588,_0x7c9083,_0x57184e)=>{_0x57184e?_0xe347d4=_0x53ac33['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xe347d4&&(_0x53ac33['remove'](_0xe347d4),_0xe347d4=null);}),this['_threadToController']['set'](_0x1a215e,_0x2593f8),this['_viewToController']['set'](_0x3a344d,_0x2593f8);const _0x508332=new E(this['context']['locale'],_0x3a344d);_0x508332['bind']('length')['to'](_0x3a344d),_0x508332['bind']('isDirty')['to'](_0x3a344d,'isDirty',_0x3a344d,'length',(_0x55a60a,_0xc578c5)=>_0x55a60a||!_0xc578c5),_0x508332['bind']('isActive')['to'](_0x3a344d),_0x508332['type']='comment';const _0x75441c=new T({'view':_0x508332,'target':_0x3cce47,'type':'comment','isVisible':!_0x1a215e['archivedAt']});return _0x3a344d['on']('escape',()=>{_0x75441c['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3a344d,_0x75441c),_0x5120db['add'](_0x75441c),_0x75441c;}['_bindAnnotationToEditors'](_0x9da26,_0x11dc29){this['listenTo'](_0x9da26,'editorReady',(_0x1c7250,_0x3d2e50)=>{const _0x52aff3=_0x3d2e50['ui']['view']['body']['bodyCollectionContainer'];_0x11dc29['focusableElements']['add'](_0x52aff3),this['context']instanceof _0x4bc0e5&&this['context']['ui']['focusTracker']['add'](_0x52aff3);},{'priority':'highest'}),this['listenTo'](_0x9da26,'editorDestroyed',(_0x14c181,_0x15be99)=>{const _0x2cefb5=_0x15be99['ui']['view']['body']['bodyCollectionContainer'];_0x11dc29['focusableElements']['has'](_0x2cefb5)&&_0x11dc29['focusableElements']['remove'](_0x2cefb5),this['context']instanceof _0x4bc0e5&&this['context']['ui']['focusTracker']['remove'](_0x2cefb5);});}['_unbindEditors'](_0x515361){this['stopListening'](_0x515361,'editorReady'),this['stopListening'](_0x515361,'editorDestroyed');}['_createCommentThreadView'](_0x36221a){const _0x347cce=this['context']['plugins']['get'](it),{config:_0x57b277,locale:_0x4495b3}=this['context'],_0x1bda99=lt(_0x57b277['get']('locale'),_0x4495b3);return new(0x0,(_0x57b277['get']('comments'))['CommentThreadView'])(_0x4495b3,_0x36221a,_0x347cce['me'],{'editorConfig':{..._0x57b277['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x57b277['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x57b277['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x57b277['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x57b277['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1bda99,'CommentView':_0x57b277['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3bf402,channelId:_0x383675,resolvedAt:_0x12cb1a,resolvedBy:_0x20882e,isFromAdapter:_0x50dfa1}){if(!this['hasCommentThread'](_0x3bf402))throw new _0x160abe('commentsrepository-missing-comment-thread',null,{'threadId':_0x3bf402});const _0x4d88c7=this['getCommentThread'](_0x3bf402);if(_0x4d88c7['isResolved'])throw new _0x160abe('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3bf402});const _0x4868ce=this['context']['plugins']['get'](it);if(_0x4d88c7['resolvedBy']=_0x4868ce['getUser'](_0x20882e),_0x4d88c7['resolvedAt']=_0x12cb1a,_0x50dfa1||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4cf654=this['context']['plugins']['get']('PendingActions'),_0x31050b=_0x4cf654['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x383675,'threadId':_0x3bf402})['then'](({resolvedAt:_0x3eb9e2,resolvedBy:_0xec1844})=>{_0x4cf654['remove'](_0x31050b),_0x4d88c7['resolvedBy']['id']!==_0xec1844&&(_0x4d88c7['resolvedBy']=_0x4868ce['getUser'](_0xec1844)),_0x4d88c7['resolvedAt']=_0x3eb9e2;})['catch'](_0x55366b=>{throw console['error'](_0x55366b),new _0x160abe('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x59a51f,channelId:_0xccd330,isFromAdapter:_0x55ddb9}){if(!this['hasCommentThread'](_0x59a51f))throw new _0x160abe('commentsrepository-missing-comment-thread',null,{'threadId':_0x59a51f});const _0x50710e=this['getCommentThread'](_0x59a51f);if(!_0x50710e['isResolved'])throw new _0x160abe('commentsrepository-reopen-comment-thread',null,{'threadId':_0x59a51f});if(_0x50710e['resolvedBy']=null,_0x50710e['resolvedAt']=null,_0x55ddb9||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xd53c6=this['context']['plugins']['get']('PendingActions'),_0x376f16=_0xd53c6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xccd330,'threadId':_0x59a51f})['then'](()=>_0xd53c6['remove'](_0x376f16))['catch'](_0x149aef=>{throw console['error'](_0x149aef),new _0x160abe('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5da39b,isFromAdapter:_0x813e61}){const _0x9bcbb0=this['getCommentThread'](_0x5da39b);if(!_0x9bcbb0)throw new _0x160abe('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5da39b),this['_threads']['delete'](_0x5da39b),!_0x9bcbb0['isSubmitted']||_0x813e61||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1d6e8b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x45c7c7}=_0x9bcbb0,_0x35b747=_0x1d6e8b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x45c7c7,'threadId':_0x5da39b})['then'](()=>_0x1d6e8b['remove'](_0x35b747))['catch'](_0x410a0c=>{throw console['error'](_0x410a0c),new _0x160abe('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2245f9,unlinkedAt:_0x165a0f,context:_0x1edadf,attributes:_0xc4a684,isFromAdapter:_0x5e9777}){if('string'!=typeof _0x2245f9)throw new _0x160abe('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2245f9});if(!this['hasCommentThread'](_0x2245f9))throw new _0x160abe('commentsrepository-missing-comment-thread',null,{'threadId':_0x2245f9});const _0x1b7487=this['getCommentThread'](_0x2245f9);let _0x300ffb=!0x1;if(void 0x0!==_0x1edadf&&_0x1b7487['context']!==_0x1edadf&&(_0x1b7487['context']=_0x1edadf,_0x300ffb=!0x0),void 0x0!==_0x165a0f&&_0x1b7487['unlinkedAt']!==_0x165a0f&&(_0x1b7487['unlinkedAt']=_0x165a0f,_0x300ffb=!0x0),_0xc4a684&&!wt(_0xc4a684,_0x1b7487['attributes'])&&(_0x1b7487['attributes']=_0xc4a684,_0x300ffb=!0x0),!_0x300ffb)return Promise['resolve']();if(!_0x1b7487['isSubmitted']||_0x5e9777||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x483f6a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1535f8}=_0x1b7487,_0x18fec0=_0x483f6a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1535f8,'threadId':_0x2245f9,'context':_0x1edadf,'unlinkedAt':_0x165a0f,'attributes':_0xc4a684})['then'](()=>_0x483f6a['remove'](_0x18fec0))['catch'](_0x66f279=>{throw console['error'](_0x66f279),new _0x160abe('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x343d56){const _0x2d4809=this['context']['plugins']['get'](y),_0x15a035=this['getCommentThread'](_0x343d56);if(_0x15a035['_isAttached']=!0x1,this['_threadToController']['has'](_0x15a035)){const _0x28c5e2=this['_threadToController']['get'](_0x15a035),_0x5c93fa=_0x28c5e2['view'],_0x144a21=_0x2d4809['getByInnerView'](_0x5c93fa);this['_threadToController']['delete'](_0x15a035),this['_viewToController']['delete'](_0x5c93fa),_0x144a21&&_0x2d4809['remove'](_0x144a21),_0x28c5e2['destroy'](),_0x5c93fa['destroy']()['then'](()=>{this['_unbindEditors'](_0x5c93fa);});}}['_updateActiveAnnotation']({threadId:_0x5d50c7,resolvedAt:_0x4f7823,unlinkedAt:_0x550878}){const _0x1cb243=!!_0x4f7823,_0x2e4571=this['context']['plugins']['get'](y),_0x3548a8=this['getCommentThread'](_0x5d50c7);if(this['_threadToController']['has'](_0x3548a8)){const _0x42ebd6=this['_threadToController']['get'](_0x3548a8)['view'],_0x59e5b4=_0x2e4571['getByInnerView'](_0x42ebd6);_0x59e5b4&&(_0x1cb243&&_0x2e4571['_removeActiveAnnotation'](_0x59e5b4),_0x550878?_0x59e5b4['isVisible']=!0x1:_0x59e5b4['refreshVisibility']());}}['_getExternalAuthor'](_0x4c0e97){const _0x2d569c=this['context']['plugins']['get'](it),_0x515c73=pt('external:'+_0x4c0e97),_0x331b7a=_0x2d569c['getUser'](_0x515c73);return _0x331b7a||_0x2d569c['addUser']({'id':_0x515c73,'name':_0x4c0e97});}['_createNewComment']({threadId:_0x331e19,commentId:_0x735a5=_0x27956d(),content:_0x182f33,authorId:_0x522ad9,createdAt:_0x18f313,attributes:_0x2de2ba}){if('string'!=typeof _0x735a5)throw new _0x160abe('commentsrepository-invalid-commentid');if('string'!=typeof _0x522ad9)throw new _0x160abe('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x182f33||!_0x182f33['trim']())throw new _0x160abe('commentsrepository-invalid-comment-content');const _0xf0b7ba=this['context']['plugins']['get'](it)['getUser'](_0x522ad9);if(!_0xf0b7ba)throw new _0x160abe('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x522ad9});let _0x50221d=null,_0x5f8388=_0x18f313;return _0x2de2ba?.['@external']&&(_0x50221d=this['_getExternalAuthor'](_0x2de2ba['@external']['authorName']),_0x5f8388=new Date(_0x2de2ba['@external']['createdAt'])),new wi(this,{'threadId':_0x331e19,'id':_0x735a5,'author':_0x50221d||_0xf0b7ba,'creator':_0xf0b7ba,'content':_0x182f33,'createdAt':_0x18f313,'authoredAt':_0x5f8388,'attributes':_0x2de2ba});}['_addComment'](_0x431950){let {threadId:_0x26e1d1,content:_0xc311ff,attributes:_0x5e9453,isFromAdapter:_0x561571}=_0x431950;const _0x9957e4=this['getCommentThread'](_0x431950['threadId']);if(!_0x9957e4)throw new _0x160abe('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x230bab=this['_createNewComment'](_0x431950),{id:_0xb5e12b}=_0x230bab;if(_0x9957e4['_add'](_0x230bab),_0x561571||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x9957e4['isSubmitted'])return Promise['resolve']();const _0x59bef9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x233ff3}=_0x9957e4,_0x34ccf2=_0x59bef9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5e9453||(_0x5e9453={}),this['adapter']['addComment']({'channelId':_0x233ff3,'threadId':_0x26e1d1,'commentId':_0xb5e12b,'content':_0xc311ff,'attributes':_0x5e9453})['then'](_0x26874b=>{_0x59bef9['remove'](_0x34ccf2),_0x26874b&&this['_updateComment']({'channelId':_0x233ff3,'threadId':_0x26e1d1,'commentId':_0xb5e12b,'createdAt':_0x26874b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x321cda=>{throw console['error'](_0x321cda),new _0x160abe('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x23fc5d,commentId:_0x2efeaa,content:_0x2cba83,createdAt:_0x14392a,attributes:_0x30af2c,isFromAdapter:_0x1a96dc}){if(void 0x0!==_0x2cba83&&('string'!=typeof _0x2cba83||!_0x2cba83['trim']()['length']))throw new _0x160abe('commentsrepository-update-comment-invalid-content');const _0x6afa0e=this['getCommentThread'](_0x23fc5d),_0x4d0eb0=_0x6afa0e['getComment'](_0x2efeaa);if(!_0x4d0eb0)throw new _0x160abe('commentsrepository-update-missing-comment',this);let _0x337d0c=!0x1;if(_0x2cba83&&_0x2cba83!==_0x4d0eb0['content']&&(_0x4d0eb0['isEditable']||_0x1a96dc)&&(_0x4d0eb0['content']=_0x2cba83,_0x337d0c=!0x0),_0x14392a&&_0x14392a!==_0x4d0eb0['createdAt']&&(_0x4d0eb0['createdAt']=_0x14392a,_0x4d0eb0['attributes']&&_0x4d0eb0['attributes']['@external']||(_0x4d0eb0['authoredAt']=_0x14392a),_0x337d0c=!0x0),_0x30af2c&&!wt(_0x30af2c,_0x4d0eb0['attributes'])&&(_0x4d0eb0['attributes']=_0x30af2c,_0x337d0c=!0x0),!_0x337d0c)return Promise['resolve']();if(_0x6afa0e['fire']('commentUpdated'),_0x1a96dc||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x588f26=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ffeb8}=this['getCommentThread'](_0x4d0eb0['threadId']),_0x37c15f=_0x588f26['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1ffeb8,'threadId':_0x23fc5d,'commentId':_0x2efeaa,'content':_0x2cba83,'attributes':_0x30af2c})['then'](()=>_0x588f26['remove'](_0x37c15f))['catch'](_0x157d4c=>{throw console['error'](_0x157d4c),new _0x160abe('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x49f3ea,commentId:_0x341ae5,isFromAdapter:_0x58b768}){const _0x59bf41=this['getCommentThread'](_0x49f3ea),_0x3c119d=_0x59bf41['getComment'](_0x341ae5);if(!_0x3c119d)throw new _0x160abe('commentsrepository-remove-missing-comment',this);if(_0x59bf41['_remove'](_0x3c119d),_0x58b768||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x9219b8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a7459}=_0x59bf41,_0xcdb0e=_0x9219b8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2a7459,'threadId':_0x49f3ea,'commentId':_0x341ae5})['then'](()=>_0x9219b8['remove'](_0xcdb0e))['catch'](_0x5f28e1=>{throw console['error'](_0x5f28e1),new _0x160abe('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x166ad1(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x48e84f,_0x1fdac0){super();const _0x5578b9=_0x1fdac0['isResolvable'];this['channelId']=_0x1fdac0['channelId'],this['id']=_0x1fdac0['id'],this['comments']=new _0x4550ea(),this['_repository']=_0x48e84f,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1fdac0['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x48e84f,'_permissions',_0x48e84f,'_readOnlyChannels',()=>_0x48e84f['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x48e84f,'_permissions',()=>_0x48e84f['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x48e84f,'_permissions',()=>{const _0x1b50ca=_0x48e84f['getPermissions'](this['channelId']);return _0x1b50ca['write']||_0x1b50ca['admin'];}),this['bind']('isResolvable')['to'](_0x48e84f,'_permissions',()=>_0x5578b9&&_0x48e84f['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1fdac0['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2fd78c,_0x238284)=>_0x2fd78c?_0x238284?_0x2fd78c<_0x238284?_0x2fd78c:_0x238284:_0x2fd78c:_0x238284),this['set']('unlinkedAt',_0x1fdac0['unlinkedAt']||null),this['set']('resolvedAt',_0x1fdac0['resolvedAt']||null),this['set']('resolvedBy',_0x1fdac0['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x9c0de2=>!!_0x9c0de2),this['set']('attributes',_0x1fdac0['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x38a6f9,_0x515218)=>_0x38a6f9+_0x515218['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x330ec0,id:_0x4eb6f0}=this;this['_repository']['fire'](bt('submitCommentThread',_0x330ec0),{'channelId':_0x330ec0,'threadId':_0x4eb6f0});}['setUnlinkedAt'](_0xb4738f){this['_update']({'unlinkedAt':_0xb4738f});}['resolve']({resolvedAt:_0x2e9fbc=new Date(),resolvedBy:_0x95130f=null,isFromAdapter:_0x5044d5=!0x1}={}){const _0x38e724=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x487d06,id:_0x234935}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x487d06),{'channelId':_0x487d06,'threadId':_0x234935,'resolvedAt':_0x2e9fbc,'resolvedBy':_0x95130f||_0x38e724['id'],'isFromAdapter':_0x5044d5});}['reopen']({isFromAdapter:_0x30e99a=!0x1}={}){const {channelId:_0x2f6a5c,id:_0x373e50}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x2f6a5c),{'channelId':_0x2f6a5c,'threadId':_0x373e50,'isFromAdapter':_0x30e99a});}['setContext'](_0x3621a9){this['context']||this['_update']({'context':_0x3621a9});}['setAttribute'](_0x4be6f1,_0x728e6b){const _0x4a6c11=It(this['attributes']);At(_0x4a6c11,_0x4be6f1,_0x728e6b),this['_update']({'attributes':_0x4a6c11});}['removeAttribute'](_0x286d62){const _0x1f127a=It(this['attributes']);Ct(_0x1f127a,_0x286d62),this['_update']({'attributes':_0x1f127a});}['remove']({isFromAdapter:_0x4697a2=!0x1}={}){const {channelId:_0x390acd,id:_0x658c51}=this;this['_repository']['fire'](bt('removeCommentThread',_0x390acd),{'channelId':_0x390acd,'threadId':_0x658c51,'isFromAdapter':_0x4697a2});}['attachTo'](_0x950100){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x950100});}['addComment'](_0x2c6e18){const {channelId:_0x88a00d,id:_0x390380}=this;this['_repository']['fire'](bt('addComment',_0x88a00d,_0x390380),Object['assign']({'channelId':_0x88a00d,'threadId':_0x390380},_0x2c6e18));}['getComment'](_0x2bb211){if('string'!=typeof _0x2bb211)throw new _0x160abe('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2bb211});return this['comments']['get'](_0x2bb211);}['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'](_0x2cdaaf=>_0x2cdaaf['toJSON']()),'attributes':this['attributes']};}['_add'](_0x395ba0){return this['listenTo'](_0x395ba0,'change:authoredAt',()=>{const _0x14480a=this['_findOptimalIndex'](_0x395ba0),_0x290436=this['comments'];_0x14480a-0x1!=_0x290436['getIndex'](_0x395ba0)&&_0x14480a+0x1!=_0x290436['getIndex'](_0x395ba0)&&(this['_remove'](_0x395ba0),this['_add'](_0x395ba0));}),this['comments']['add'](_0x395ba0,this['_findOptimalIndex'](_0x395ba0));}['_update'](_0x5ccf66){const {channelId:_0x523fec,id:_0x2a49a8}=this;this['_repository']['fire'](bt('updateCommentThread',_0x523fec),{..._0x5ccf66,'channelId':_0x523fec,'threadId':_0x2a49a8});}['_remove'](_0x49266d){return this['stopListening'](_0x49266d),_0x49266d['destroy'](),this['comments']['remove'](_0x49266d);}['_findOptimalIndex'](_0x4fb89d){const _0x2ee372=this['comments']['find'](_0x430c18=>new Date(_0x430c18['authoredAt'])['getTime']()>new Date(_0x4fb89d['authoredAt'])['getTime']());return _0x2ee372?this['comments']['getIndex'](_0x2ee372):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x166ad1(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x106719,_0x3c5a0a){super();const _0x14983b=_0x106719['context']['plugins']['get'](it)['me'],_0x383fe8=_0x106719['getCommentThread'](_0x3c5a0a['threadId']),_0x1e6837=0x0===_0x383fe8['comments']['length'],_0x234cb1=_0x14983b===_0x3c5a0a['author'];this['id']=_0x3c5a0a['id'],this['threadId']=_0x3c5a0a['threadId'],this['author']=_0x3c5a0a['author'],this['creator']=_0x3c5a0a['creator'],this['isExternal']=Boolean(_0x3c5a0a['attributes']&&_0x3c5a0a['attributes']['@external']),this['set']('content',_0x3c5a0a['content']),this['createdAt']=_0x3c5a0a['createdAt']||new Date(),this['set']('authoredAt',_0x3c5a0a['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x383fe8,'resolvedAt'),this['set']('attributes',_0x3c5a0a['attributes']||{}),this['bind']('isEditable')['to'](_0x106719,'_permissions',()=>{const _0x42836a=_0x106719['getPermissions'](_0x383fe8['channelId'])['write'],_0x3c45cb=_0x106719['getPermissions'](_0x383fe8['channelId'])['modifyAll'];return _0x234cb1&&_0x42836a||!_0x234cb1&&_0x3c45cb;}),this['bind']('isRemovable')['to'](_0x383fe8,'isRemovable',_0x106719,'_permissions',_0x55e3d4=>{const _0x4cd755=_0x106719['getPermissions'](_0x383fe8['channelId'])['write'],_0x5271f2=_0x106719['getPermissions'](_0x383fe8['channelId'])['modifyAll'];return _0x234cb1&&_0x4cd755||_0x55e3d4&&_0x1e6837||!_0x234cb1&&_0x5271f2&&!_0x1e6837;}),this['bind']('isReadOnly')['to'](_0x383fe8,'isReadOnly'),this['_repository']=_0x106719;}get['weight'](){return Math['max'](function(_0x4df7db){const _0x4bad11=document['createElement']('div');return _0x4bad11['innerHTML']=_0x4df7db,_0x4bad11['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1a4cf7){const {threadId:_0x44d43b,id:_0x519ec5}=this;if(!this['_repository']['hasCommentThread'](_0x44d43b))throw new _0x160abe('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x595816}=this['_repository']['getCommentThread'](_0x44d43b);this['_repository']['fire'](bt('updateComment',_0x595816,_0x44d43b),{'channelId':_0x595816,'threadId':_0x44d43b,'commentId':_0x519ec5,..._0x1a4cf7});}['setAttribute'](_0x4a6a15,_0x531af2){const _0xa6c81a=It(this['attributes']);At(_0xa6c81a,_0x4a6a15,_0x531af2),this['update']({'attributes':_0xa6c81a});}['removeAttribute'](_0x81e2ac){const _0x13e629=It(this['attributes']);Ct(_0x13e629,_0x81e2ac),this['update']({'attributes':_0x13e629});}['remove'](_0x139e14={}){if(!_0x139e14['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x43d6f7,id:_0x19db07}=this;if(!this['_repository']['hasCommentThread'](_0x43d6f7))throw new _0x160abe('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4c5293}=this['_repository']['getCommentThread'](_0x43d6f7);this['_repository']['fire'](bt('removeComment',_0x4c5293,_0x43d6f7),{'channelId':_0x4c5293,'threadId':_0x43d6f7,'commentId':_0x19db07,..._0x139e14});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0xd44174,..._0x27cb4c){for(const _0x318ea1 of _0x27cb4c)void 0x0!==_0x318ea1&&(_0xd44174+=':'+String(_0x318ea1));return _0xd44174;}class rt extends _0x7f5ae3{constructor(_0x3d58da){super(_0x3d58da),this['set']('hasContent',!0x1);}['refresh'](){const _0x1c05cd=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x26c5a1 of _0x1c05cd['getRanges']())if(this['_hasContent'](_0x26c5a1))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x2b9108=_0x27956d(),ranges:_0x3187b4,comment:_0x4cd547}={}){const _0x170259=this['editor']['model'],_0x4e7dc6=_0x3187b4??Array['from'](_0x170259['document']['selection']['getRanges']()),_0x1040c4=[];for(const _0x37ce89 of _0x4e7dc6)this['_hasContent'](_0x37ce89)&&_0x1040c4['push'](this['_trimToContent'](_0x37ce89));if(!_0x1040c4['length'])throw new _0x160abe('addcommentthreadcommand-incorrect-ranges',null);_0x4cd547&&this['_createCommentThread'](_0x2b9108,_0x4cd547),this['_createMarkersFromRanges'](_0x2b9108,_0x1040c4,!!_0x4cd547);}['_createMarkersFromRanges'](_0x1119fc,_0x563bfe,_0xa5912d){this['editor']['model']['change'](_0x333423=>{for(const _0xe0b2 of _0x563bfe){const _0x201f38=_0x27956d()['substr'](0x1,0x5),_0x173c9c='comment:'+_0x1119fc+':'+_0x201f38;_0x333423['addMarker'](_0x173c9c,{'range':_0xe0b2,'usingOperation':_0xa5912d,'affectsData':_0xa5912d});}});}['_createCommentThread'](_0x51ac54,_0x361a51){const _0x24f8b4=this['editor']['plugins']['get']('CommentsRepository'),_0x96a359=this['editor']['config']['get']('collaboration.channelId'),_0x2df272=this['editor']['plugins']['get']('Users')['me'];if(!_0x2df272)throw new _0x160abe('addcommentthreadcommand-user-not-found',null);_0x24f8b4['addCommentThread']({'threadId':_0x51ac54,'channelId':_0x96a359,'comments':[{'authorId':_0x2df272['id'],'content':_0x361a51,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1b0cfe){for(const _0x3f96d1 of _0x1b0cfe['getItems']())if(this['_itemIsContent'](_0x3f96d1))return!0x0;return!0x1;}['_itemIsContent'](_0xdd2019){return _0xdd2019['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xdd2019)&&!_0xdd2019['is']('element','tableCell');}['_trimToContent'](_0x4a5ca2){const _0x58254f=_0x5bcb91=>!this['_itemIsContent'](_0x5bcb91['item']),_0x5c85d3=_0x4a5ca2['start']['getLastMatchingPosition'](_0x58254f),_0x26c94e=_0x4a5ca2['end']['getLastMatchingPosition'](_0x58254f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5c85d3,_0x26c94e);}}class b extends _0x1a45c0{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3911c4){super(_0x3911c4),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2121af=this['editor'],_0x3868c7=_0x2121af['model']['document']['selection'],_0x278c8e=_0x35cf6e(()=>this['refreshSelectedViews'](),0xa);_0x3868c7['on']('change:range',(_0x474145,_0x36bace)=>{_0x36bace['directChange']&&(_0x278c8e['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2121af['editing']['view']['document'],'change:isFocused',(_0x2bd9fc,_0x51fbf9,_0x2837fc)=>{_0x2837fc&&_0x278c8e();}),this['listenTo'](_0x2121af['ui']['focusTracker'],'change:isFocused',(_0x355242,_0x65cf49,_0x9cdbd5)=>{_0x9cdbd5||_0x2121af['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x574f86=>this['_editorAnnotationsData']['has'](_0x574f86['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3c8996){if(this['_editorAnnotations']['has'](_0x3c8996['view']))return;this['_editorAnnotations']['add'](_0x3c8996['view']),this['editor']['ui']['focusTracker']['add'](_0x3c8996['view']['element']);const _0x165ef7=this['editor']['plugins']['get'](y);this['listenTo'](_0x165ef7['collection'],'remove',(_0x10acb8,_0x2a5ee3)=>{this['editor']['ui']['focusTracker']['remove'](_0x2a5ee3['view']['element']),this['_editorAnnotations']['delete'](_0x2a5ee3['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x395ed7){if('function'!=typeof _0x395ed7)throw new _0x160abe('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x395ed7);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1e8f07,annotations:_0x298828}){const _0x1d0bb3=[],_0x1e6ae9=this['editor']['model']['document']['selection'],_0x4b375e=Array['from'](_0x1e6ae9['getRanges']());for(const [_0x4782f0,_0x566793]of this['_editorAnnotationsData']){const _0x2ff8c1=_0x9277c5(_0x566793),_0x200c0a=_0x298828['getByInnerView'](_0x4782f0);_0x2ff8c1&&_0x200c0a&&_0x1d0bb3['push']({'annotation':_0x200c0a,'range':_0x2ff8c1});}function _0x9277c5(_0x157a0b){for(const _0x2c76e4 of _0x157a0b)for(const _0x51da6e of _0x4b375e)if(_0x2c76e4['containsRange'](_0x51da6e,!_0x1e6ae9['isCollapsed']))return _0x2c76e4;return null;}return _0x1d0bb3['sort']((_0x56b2f9,_0x44242e)=>{const _0x2b3b7a=_0x56b2f9['range'],_0xf6b5e1=_0x44242e['range'];if(!_0x2b3b7a['isEqual'](_0xf6b5e1)){if(_0x2b3b7a['containsRange'](_0xf6b5e1,!0x0))return 0x1;if(_0xf6b5e1['containsRange'](_0x2b3b7a,!0x0))return-0x1;}return _0x56b2f9['annotation']==_0x1e8f07?-0x1:_0x44242e['annotation']==_0x1e8f07?0x1:0x0;})['map'](_0x51c81f=>_0x51c81f['annotation']);}get['_editorAnnotationsData'](){const _0x10c2ba=new Map();for(const _0x9fd0aa of Array['from'](this['_dataCollectors']))for(const [_0x3a81bb,_0x419e8e]of _0x9fd0aa())_0x10c2ba['set'](_0x3a81bb,_0x419e8e);return _0x10c2ba;}}class st extends _0x1a45c0{['afterInit'](){const _0x304166=this['editor'];if(!_0x304166['plugins']['has']('RestrictedEditingModeEditing'))return;_0x304166['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x1a45c0{constructor(_0xb730c0){super(_0xb730c0),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1b96fa=this['editor'],_0x166969=_0x1b96fa['commands']['get']('importWord'),_0x2c61f2=_0x1b96fa['plugins']['get'](it);_0x166969&&(_0x166969['on']('execute',(_0x3ecdd9,[,_0x572f20])=>{_0x572f20['collaboration_features']={'comments':!0x0,'user_id':_0x2c61f2['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x166969,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x29364f,_0x54bec8){const {comment_threads:_0x5ee849}=_0x54bec8;_0x5ee849&&_0x5ee849['forEach'](({thread_id:_0x196c57,comments:_0x4af727,is_resolved:_0x6e8a4f})=>{const _0xac6175=new Date(),_0x3f77b6=_0x4af727['map'](({author:_0x378be3,content:_0x269d15,created_at:_0x582ca0})=>({'content':_0x269d15,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xac6175,'attributes':{'@external':{'authorName':_0x378be3,'createdAt':_0x582ca0?new Date(_0x582ca0):new Date(),'source':'importWord'}}})),_0x7e1193=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x7e1193,'threadId':_0x196c57,'comments':_0x3f77b6,'resolvedAt':_0x6e8a4f?_0xac6175:null});});}}class at extends _0x1a45c0{constructor(_0x1b5e81){super(_0x1b5e81),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x110a03=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x110a03,'contentInsertion',(_0x4e29c8,_0x57d9d6)=>this['_removeMarkersWithoutThreads'](_0x57d9d6['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3deae3){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3deae3;const _0x800fcb=this['editor']['plugins']['get']('CommentsRepository');for(const _0x394e57 of _0x3deae3['keys']()){const [_0xdfc4f3,_0x484322]=_0x394e57['split'](':');'comment'!=_0xdfc4f3||_0x800fcb['hasCommentThread'](_0x484322)||_0x3deae3['delete'](_0x394e57);}return _0x3deae3;}['_registerMarkerInClipboardPipeline'](){const _0x5b2c66=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3d8e6b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3d8e6b&&_0x5b2c66['_registerMarkerToCopy']('comment',_0x3d8e6b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1227f3){switch(_0x1227f3){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x1a45c0{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2abdbc,_0x4c6f98)=>{if(!_0x4c6f98['options']['showCommentHighlights'])return null;if(_0x4c6f98['options']['ignoreResolvedComments']){const {id:_0x1f2c50}=er(_0x2abdbc['markerName']),_0x190284=this['editor']['plugins']['get'](o);if(_0x190284['getCommentThread'](_0x1f2c50)?.['isResolved']&&_0x2abdbc['item'])return _0x4c6f98['consumable']['consume'](_0x2abdbc['item'],'addMarker:'+_0x2abdbc['markerName']),_0x4c6f98['consumable']['consume'](_0x2abdbc['item'],'removeMarker:'+_0x2abdbc['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4b06e0=>{_0x4b06e0['on']('addMarker:comment',(_0x385761,_0x10f91c,_0x10db72)=>{if(!_0x10db72['options']['showCommentHighlights'])return;const _0x3c040a=_0x10f91c['item'];if(!_0x3c040a)return;const _0x137960=_0x10db72['mapper']['toViewElement'](_0x3c040a);this['editor']['model']['schema']['isObject'](_0x3c040a)&&_0x137960&&!_0x137960['getCustomProperty']('widget')&&_0x137960['is']('containerElement')&&_0x58281d(_0x137960,_0x10db72['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5341aa,{writer:_0x3caeb7,options:_0x2a2762})=>{if(!_0x2a2762['showCommentHighlights'])return null;const _0x59d5e0=_0x3caeb7['createContainerElement']('div'),_0x62fa93=_0x3caeb7['createEmptyElement']('hr');return _0x3caeb7['addClass']('ck-horizontal-line',_0x59d5e0),_0x3caeb7['insert'](_0x3caeb7['createPositionAt'](_0x59d5e0,0x0),_0x62fa93),_0x59d5e0;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x30b2ec,{writer:_0x2ebb40,options:_0x309480})=>{if(!_0x309480['showCommentHighlights'])return null;const _0x5c2796=_0x2ebb40['createContainerElement']('span'),_0x3e3fcf=_0x2ebb40['createEmptyElement']('img');return _0x2ebb40['addClass']('image-inline',_0x5c2796),_0x2ebb40['insert'](_0x2ebb40['createPositionAt'](_0x5c2796,0x0),_0x3e3fcf),_0x5c2796;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x513438,{writer:_0xec3ffa,options:_0x28a1a2})=>{if(_0x28a1a2['showCommentHighlights'])return _0xec3ffa['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x56f999,_0x4a3c5e,_0x5f191c)=>{_0x5f191c['options']['showCommentHighlights']&&_0x56f999['stop']();},{'priority':'high'});}}class r extends _0x1a45c0{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(_0x1af408){super(_0x1af408),this['set']('isThreadsLoadingPaused',!0x0),_0x1af408['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x400147,_0x310ff1,_0xe8c3d3,_0x114193)=>{const _0x71f224=_0x1af408['plugins']['get'](o),_0x5404fb=_0xe8c3d3?er(_0xe8c3d3)['id']:null;_0x1af408['model']['change'](()=>{if(_0x5404fb){const _0x5d47da=this['getAllMarkersForId'](_0x5404fb);for(const _0x2ba14c of _0x5d47da)_0x1af408['editing']['reconvertMarker'](_0x2ba14c);}if(_0x114193){const {id:_0x539dbc}=er(_0x114193),_0x528fa2=_0x71f224['getCommentThread'](_0x539dbc);if(_0x528fa2&&_0x528fa2['unlinkedAt'])return;if(_0x528fa2&&!_0x528fa2['isAttached'])return;const _0x39766a=this['getAllMarkersForId'](_0x539dbc);for(const _0x35ef10 of _0x39766a)_0x1af408['editing']['reconvertMarker'](_0x35ef10);}}),_0x5404fb&&this['scrollToThreadMarker'](_0x5404fb);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2a6ee2=this['editor'],_0x11d490=_0x2a6ee2['plugins']['get'](o),_0x48a62f=_0x2a6ee2['config']['get']('collaboration.channelId'),_0x49719e=_0x11d490['getCommentThreads']()['filter'](_0x21f7ae=>_0x21f7ae['channelId']!==_0x48a62f);_0x2a6ee2['commands']['add']('addCommentThread',new rt(_0x2a6ee2)),this['listenTo'](_0x2a6ee2,'change:isReadOnly',(_0x10815f,_0x416f13,_0x31aeea)=>{_0x11d490['switchReadOnly'](_0x31aeea,_0x2a6ee2['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x11d490,ft('addCommentThread',_0x48a62f),(_0x14c461,{threadId:_0x3da422})=>{const _0x2513ae=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3da422);_0x2513ae?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3da422);}),this['listenTo'](_0x11d490,ft('removeCommentThread',_0x48a62f),(_0x48023a,{threadId:_0x1dac36})=>{_0x2a6ee2['model']['enqueueChange']({'isUndoable':!0x1},_0x5dc1d9=>{const _0x134c9d=this['getAllMarkersForId'](_0x1dac36);for(const _0x7b8fa5 of _0x134c9d)_0x5dc1d9['removeMarker'](_0x7b8fa5);});}),this['listenTo'](_0x11d490,ft('resolveCommentThread',_0x48a62f),(_0x561efa,{threadId:_0x1541bc})=>{(this['_reconvertMarkers'](_0x1541bc),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1541bc)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x11d490,ft('reopenCommentThread',_0x48a62f),(_0xe250e1,{threadId:_0x16a416})=>{this['_reconvertMarkers'](_0x16a416);},{'priority':'low'}),this['listenTo'](_0x11d490,ft('addComment',_0x48a62f),(_0x5f0aed,{threadId:_0x56bb68,isFromAdapter:_0x54ad23})=>{const _0x557e49=this['getAllMarkersForId'](_0x56bb68);if(_0x54ad23||0x0==_0x557e49['length']||!_0x11d490['hasCommentThread'](_0x56bb68))return;0x1===_0x11d490['getCommentThread'](_0x56bb68)['length']&&_0x2a6ee2['model']['enqueueChange']({'isUndoable':!0x1},_0x2440ca=>{for(const _0xa0007b of _0x557e49)_0x2440ca['updateMarker'](_0xa0007b,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x49719e);}['afterInit'](){!async function(_0x240a97){const _0x3b2583=_0x4c4d1d([0x6e,0x56,0x4f,0x38,0x66,0x61,0x41,0x58,0x33,0x4e,0x45,0x35,0x54,0x4c,0x49,0x37,0x73,0x6a,0x69,0x4d,0x78,0x71,0x51,0x43,0x31,0x50,0x53,0x79,0x62,0x74,0x75,0x77,0x67,0x72,0x32,0x36,0x39,0x68,0x30,0x48,0x57,0x47,0x4a,0x64,0x55,0x42,0x7a,0x34,0x6f,0x44,0x6c,0x63,0x6d,0x70,0x76,0x52,0x46,0x4b,0x5a,0x65,0x59,0x6b]),_0x3b6e6f=0x2f488976,_0x470cfe=0x2f4fe466^_0x3b6e6f,_0x206bfd=window[_0x4c4d1d([0x44,0x61,0x74,0x65])][_0x4c4d1d([0x6e,0x6f,0x77])](),_0xc00643=_0x240a97[_0x4c4d1d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x53824e=new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x493125=>{_0xc00643[_0x4c4d1d([0x6f,0x6e,0x63,0x65])](_0x4c4d1d([0x72,0x65,0x61,0x64,0x79]),_0x493125);}),_0x2abc32={[_0x4c4d1d([0x6b,0x74,0x79])]:_0x4c4d1d([0x45,0x43]),[_0x4c4d1d([0x75,0x73,0x65])]:_0x4c4d1d([0x73,0x69,0x67]),[_0x4c4d1d([0x63,0x72,0x76])]:_0x4c4d1d([0x50,0x2d,0x32,0x35,0x36]),[_0x4c4d1d([0x78])]:_0x4c4d1d([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]),[_0x4c4d1d([0x79])]:_0x4c4d1d([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]),[_0x4c4d1d([0x61,0x6c,0x67])]:_0x4c4d1d([0x45,0x53,0x32,0x35,0x36])},_0x2d3c30=_0xc00643[_0x4c4d1d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c4d1d([0x67,0x65,0x74])](_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x52b14e(){let _0x32fb05,_0x21ba5a=null,_0xcb2f3e=null;try{if(_0x2d3c30==_0x4c4d1d([0x47,0x50,0x4c]))return _0x4c4d1d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x32fb05=_0x84a47d(),!_0x32fb05)return _0x4c4d1d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x32fb05[_0x4c4d1d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xcb2f3e=_0x48955e(_0x32fb05[_0x4c4d1d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x32fb05[_0x4c4d1d([0x6a,0x74,0x69])])),await _0x4de8c3()?_0x5c92d5()?_0x4bea2f()?_0x4c4d1d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x449438()?(_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c4d1d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x21ba5a=_0x5bd172(_0x4c4d1d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c4d1d([0x74,0x72,0x69,0x61,0x6c])&&(_0x21ba5a=_0x5bd172(_0x4c4d1d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5b16dd()):_0x4c4d1d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c4d1d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c4d1d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4c4d1d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4bea2f(){const _0x9b6caa=[_0x4c4d1d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c4d1d([0x74,0x72,0x69,0x61,0x6c])][_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x206bfd/0x3e8:0xe10*_0x470cfe;return _0x32fb05[_0x4c4d1d([0x65,0x78,0x70])]<_0x9b6caa;}function _0x5c92d5(){const _0x167b8d=_0x32fb05[_0x4c4d1d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x167b8d)return!0x1;if(_0x167b8d[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x2a])))return!0x0;if(_0x167b8d[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x43,0x4d,0x54])))return!0x0;if(_0x167b8d[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x52,0x43,0x4d,0x54]))){if(_0x14bab2())return!0x0;if(_0x75976c()||_0x36389c())return!0x0;}return!0x1;}function _0x449438(){const _0x593f00=_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x593f00||0x0==_0x593f00[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2bd16b}=new URL(window[_0x4c4d1d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x593f00[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bd16b))return!0x0;const _0x211ad2=_0x2bd16b[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e]));return _0x593f00[_0x4c4d1d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf718b5=>_0xf718b5[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x2a])))[_0x4c4d1d([0x6d,0x61,0x70])](_0x356252=>_0x356252[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e])))[_0x4c4d1d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a9f5e=>_0x1a9f5e[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x211ad2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c4d1d([0x6d,0x61,0x70])](_0x395c4b=>Array(_0x211ad2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x395c4b[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c4d1d([0x66,0x69,0x6c,0x6c])](_0x395c4b[0x0]===_0x4c4d1d([0x2a])?_0x4c4d1d([0x2a]):'')[_0x4c4d1d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x395c4b))[_0x4c4d1d([0x73,0x6f,0x6d,0x65])](_0x1127d9=>_0x211ad2[_0x4c4d1d([0x65,0x76,0x65,0x72,0x79])]((_0x4b5649,_0x25997f)=>_0x1127d9[_0x25997f]===_0x4b5649||_0x1127d9[_0x25997f]===_0x4c4d1d([0x2a])));}function _0x5b16dd(){return _0x21ba5a&&_0xcb2f3e?new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x524285,_0x3dc15a)=>{_0x21ba5a[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x524285,_0x3dc15a),_0xcb2f3e[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x2f5958=>{_0x2f5958!=_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64])&&_0x524285(_0x2f5958);},_0x3dc15a);}):_0x21ba5a||_0xcb2f3e||_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x48955e(_0x363d29,_0x307756){return new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10e4db=>{if(_0x57fde1())return _0x10e4db(_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64]));_0x44cbf8(),_0xc00643[_0x4c4d1d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c4d1d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xa06a92=!0x1;const _0x54de26=_0x27956d();function _0x1146e6(_0x54241d){return!!_0x54241d&&(typeof _0x54241d===_0x4c4d1d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x54241d===_0x4c4d1d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x54241d[_0x4c4d1d([0x74,0x68,0x65,0x6e])]===_0x4c4d1d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x54241d[_0x4c4d1d([0x63,0x61,0x74,0x63,0x68])]===_0x4c4d1d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1475f2(_0x2efc75){_0x2ce6d8(_0x2efc75)[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x33b383=>{if(!_0x33b383||_0x33b383[_0x4c4d1d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c4d1d([0x6f,0x6b]))return _0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x511ca0(_0x8790f(_0x54de26+_0x307756))!=_0x33b383[_0x4c4d1d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x4bfc15=>(_0x54800e(),_0x4bfc15),()=>{const _0x1022ea=_0x5327c7();return null==_0x1022ea?(_0x54800e(),_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64])):_0x4c4d1d(_0x206bfd-_0x1022ea>(0xb440d76^_0x3b6e6f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x10e4db)[_0x4c4d1d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x10e4db(_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xe9d9a5=0x2f7e67f6^_0x3b6e6f;function _0x54800e(){const _0x3f8298=_0x4c4d1d([0x6c,0x6c,0x63,0x74,0x2d])+_0x511ca0(_0x8790f(_0x363d29)),_0x45f967=_0x36df06(_0x511ca0(window[_0x4c4d1d([0x4d,0x61,0x74,0x68])][_0x4c4d1d([0x63,0x65,0x69,0x6c])](_0x206bfd/_0xe9d9a5)));window[_0x4c4d1d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c4d1d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f8298,_0x45f967);}function _0x5327c7(){const _0xcd74fb=_0x4c4d1d([0x6c,0x6c,0x63,0x74,0x2d])+_0x511ca0(_0x8790f(_0x363d29)),_0x554a62=window[_0x4c4d1d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c4d1d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xcd74fb);return _0x554a62?window[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36df06(_0x554a62),0x10)*_0xe9d9a5:null;}function _0x2ce6d8(_0x402e98){return new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x329657,_0x4dd7be)=>{_0x402e98[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x329657,_0x4dd7be),window[_0x4c4d1d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4dd7be,0x2f495db6^_0x3b6e6f);});}}_0xc00643[_0x4c4d1d([0x6f,0x6e])](_0x4c4d1d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x244408,_0x5bd347)=>{if(_0x5bd347[0x0]!=_0x363d29)return _0x10e4db(_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5bd347[0x1]={..._0x5bd347[0x1],[_0x4c4d1d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x54de26};},{[_0x4c4d1d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c4d1d([0x68,0x69,0x67,0x68])}),_0xc00643[_0x4c4d1d([0x6f,0x6e])](_0x4c4d1d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x469e04=>{_0x1146e6(_0x469e04[_0x4c4d1d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xa06a92=!0x0,_0x1475f2(_0x469e04[_0x4c4d1d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c4d1d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c4d1d([0x6c,0x6f,0x77])}),_0x53824e[_0x4c4d1d([0x74,0x68,0x65,0x6e])](()=>{_0xa06a92||_0x10e4db(_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x57fde1(){return _0xc00643[_0x4c4d1d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c4d1d([0x76,0x69,0x65,0x77])][_0x4c4d1d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c4d1d([0x61,0x75,0x74,0x6f]);}function _0x44cbf8(){_0xc00643[_0x4c4d1d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c4d1d([0x76,0x69,0x65,0x77])][_0x4c4d1d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c4d1d([0x61,0x75,0x74,0x6f]);}}function _0x5bd172(_0x8c0cc4){const _0x216a4a=[new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x248079=>setTimeout(_0x248079,0x2f41b7ba^_0x3b6e6f)),_0x53824e[_0x4c4d1d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f1b58=>{let _0x123d09=0x0;_0xc00643[_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4d1d([0x6f,0x6e])](_0x4c4d1d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x484181,_0x45811e)=>{_0x45811e[0x0][_0x4c4d1d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x123d09++,_0x123d09==(0x2f48888e^_0x3b6e6f)&&(_0x5f1b58(),_0x484181[_0x4c4d1d([0x6f,0x66,0x66])]());});}))];return window[_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c4d1d([0x72,0x61,0x63,0x65])](_0x216a4a)[_0x4c4d1d([0x74,0x68,0x65,0x6e])](()=>_0x8c0cc4);}async function _0x25e341(){await _0x53824e,_0xc00643[_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4d1d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16138c,_0xc00643[_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4d1d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16138c,_0xc00643[_0x4c4d1d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x14bab2(){return _0x302f85(_0x4c4d1d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x43bf14(_0x4c4d1d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4c4d1d([0x73,0x74,0x61,0x74,0x65])]==_0x4c4d1d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x75976c(){return _0x302f85(_0x4c4d1d([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 _0x36389c(){return _0x302f85(_0x4c4d1d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4e34a9(_0x6b2b1c){const _0x4f533f=_0x2a0ea8();_0xc00643[_0x4f533f]=_0x4c4d1d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x6b2b1c,_0x6b2b1c!=_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64])&&_0x25e341();}function _0x2a0ea8(){const _0xb943f8=window[_0x4c4d1d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c4d1d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c4d1d([0x6e,0x6f,0x77])]())[_0x4c4d1d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c4d1d([0x2e]),'');let _0x5718fe=_0x4c4d1d([0x6e]);for(let _0x1ebb2b=0x0;_0x1ebb2b<_0xb943f8[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ebb2b+=0x2){let _0x20bb59=window[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb943f8[_0x4c4d1d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ebb2b,_0x1ebb2b+0x2));_0x20bb59>=_0x3b2583[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x20bb59-=_0x3b2583[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5718fe+=_0x3b2583[_0x20bb59];}return _0x5718fe;}function _0x84a47d(){const _0x1e5efe=_0x2d3c30[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e]));if(0x3!=_0x1e5efe[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x271be0(_0x1e5efe[0x1]);function _0x271be0(_0x4df98a){const _0x5da874=_0x4859dc(_0x4df98a);return _0x5da874&&_0x5a2ece()?_0x5da874:null;function _0x5a2ece(){const _0xd461b2=_0x5da874[_0x4c4d1d([0x6a,0x74,0x69])],_0x3c0c52=window[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xd461b2[_0x4c4d1d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd461b2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x96d32={..._0x5da874,[_0x4c4d1d([0x6a,0x74,0x69])]:_0xd461b2[_0x4c4d1d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xd461b2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x96d32[_0x4c4d1d([0x76,0x63])],_0x8790f(_0x96d32)==_0x3c0c52;}}}async function _0x4de8c3(){let _0x264675=!0x0;try{const _0x2ca999=_0x2d3c30[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e])),[_0x5386cd,_0x1b5a45,_0x5a81ff]=_0x2ca999;return _0x12a0fc(_0x5386cd),await _0xc2458a(_0x5386cd,_0x1b5a45,_0x5a81ff),_0x264675;}catch{return!0x1;}function _0x12a0fc(_0x21a29b){const _0xba8dd5=_0x4859dc(_0x21a29b);_0xba8dd5&&_0xba8dd5[_0x4c4d1d([0x61,0x6c,0x67])]==_0x4c4d1d([0x45,0x53,0x32,0x35,0x36])||(_0x264675=!0x1);}async function _0xc2458a(_0x5da7b,_0xefde93,_0x343bd8){const _0x4a93d9=window[_0x4c4d1d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c4d1d([0x66,0x72,0x6f,0x6d])](_0x5b66e9(_0x343bd8),_0x33818d=>_0x33818d[_0x4c4d1d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1fe51c=new window[(_0x4c4d1d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c4d1d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5da7b+_0x4c4d1d([0x2e])+_0xefde93),_0x1c0b70=window[_0x4c4d1d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c4d1d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1c0b70)return;const _0x48c4d3=await _0x1c0b70[_0x4c4d1d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c4d1d([0x6a,0x77,0x6b]),_0x2abc32,{[_0x4c4d1d([0x6e,0x61,0x6d,0x65])]:_0x4c4d1d([0x45,0x43,0x44,0x53,0x41]),[_0x4c4d1d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c4d1d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c4d1d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1c0b70[_0x4c4d1d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c4d1d([0x6e,0x61,0x6d,0x65])]:_0x4c4d1d([0x45,0x43,0x44,0x53,0x41]),[_0x4c4d1d([0x68,0x61,0x73,0x68])]:{[_0x4c4d1d([0x6e,0x61,0x6d,0x65])]:_0x4c4d1d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48c4d3,_0x4a93d9,_0x1fe51c)||(_0x264675=!0x1);}}function _0x4859dc(_0x5a20f5){return _0x5a20f5[_0x4c4d1d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c4d1d([0x65,0x79]))?JSON[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65])](_0x5b66e9(_0x5a20f5)):null;}function _0x5b66e9(_0x54d892){return window[_0x4c4d1d([0x61,0x74,0x6f,0x62])](_0x54d892[_0x4c4d1d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c4d1d([0x2b]))[_0x4c4d1d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c4d1d([0x2f])));}function _0x8790f(_0x224cbf){let _0x3cad6f=0x1505;function _0x27fd5c(_0x506dab){for(let _0x3950b1=0x0;_0x3950b1<_0x506dab[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3950b1++){const _0xe78ef7=_0x506dab[_0x4c4d1d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3950b1);_0x3cad6f=(_0x3cad6f<<0x5)+_0x3cad6f+_0xe78ef7,_0x3cad6f&=_0x3cad6f;}}function _0x1d4be5(_0x43b322){Array[_0x4c4d1d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x43b322)?_0x43b322[_0x4c4d1d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1d4be5):_0x43b322&&typeof _0x43b322==_0x4c4d1d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c4d1d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x43b322)[_0x4c4d1d([0x73,0x6f,0x72,0x74])]()[_0x4c4d1d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x533de7,_0x303abb])=>{_0x27fd5c(_0x533de7),_0x1d4be5(_0x303abb);}):_0x27fd5c(window[_0x4c4d1d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x43b322));}return _0x1d4be5(_0x224cbf),_0x3cad6f>>>0x0;}function _0x511ca0(_0x91f1e2){return _0x91f1e2[_0x4c4d1d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c4d1d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c4d1d([0x30]));}function _0x36df06(_0x595add){return _0x595add[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c4d1d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c4d1d([0x6a,0x6f,0x69,0x6e])]('');}function _0x302f85(_0x5221e3){return _0xc00643[_0x4c4d1d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c4d1d([0x68,0x61,0x73])](_0x5221e3);}function _0x43bf14(_0x40e6a7){return _0xc00643[_0x4c4d1d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c4d1d([0x67,0x65,0x74])](_0x40e6a7);}function _0x16138c(){}function _0x4c4d1d(_0x479cff){return _0x479cff['map'](_0x156bcd=>String['fromCharCode'](_0x156bcd))['join']('');}_0x4e34a9(await _0x52b14e());}(this);}['destroy'](){const _0x228137=this['editor']['plugins']['get'](o),_0x10cb61=this['editor']['config']['get']('collaboration.channelId');for(const _0x55582b of _0x228137['getCommentThreads']({'channelId':_0x10cb61}))_0x228137['_detachCommentThread'](_0x55582b['id']),_0x228137['_threads']['delete'](_0x55582b['id']);super['destroy']();}['hasMarkerForId'](_0x135ad5){return this['getAllMarkersForId'](_0x135ad5)['length']>0x0;}['getAllMarkersForId'](_0x4225aa){const _0x41125c=[];for(const _0x5acd79 of this['editor']['model']['markers'])_0x5acd79['name']['startsWith']('comment:'+_0x4225aa)&&_0x41125c['push'](_0x5acd79);return _0x41125c;}['scrollToThreadMarker'](_0xf6a942){setTimeout(()=>{const _0x29147f=this['_getTargetForId'](_0xf6a942);if(!_0x29147f)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0xf6a942&&nt({'target':_0x29147f[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4dc60b){this['editor']['model']['change'](()=>{for(const _0x1c9360 of this['getAllMarkersForId'](_0x4dc60b))this['editor']['editing']['reconvertMarker'](_0x1c9360);});}['_attachArchivedThread'](_0x130cc3){const _0x3646e3=this['editor']['plugins']['get'](o),_0x13976d=this['editor']['plugins']['get'](b),_0x5071a1=_0x3646e3['getCommentThread'](_0x130cc3);if(!_0x5071a1['isAttached']){const _0x584a60=_0x5071a1['attachTo'](()=>this['_getTargetForId'](_0x5071a1['id']));_0x13976d['registerAnnotation'](_0x584a60),_0x5071a1['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3d92d1=this['editor'],_0x55031d=_0x3d92d1['plugins']['get'](it);_0x3d92d1['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x22de38,_0x38c922)=>{const {id:_0x54ddb7}=er(_0x22de38['markerName']),_0x37f30b=_0x3d92d1['plugins']['get'](o)['getCommentThread'](_0x54ddb7),_0x403d73=this['activeMarker']&&er(this['activeMarker'])['id']===_0x54ddb7;let _0x1f80d3;if(_0x37f30b&&_0x37f30b['isResolved']&&!_0x403d73&&_0x22de38['item'])return _0x38c922['consumable']['consume'](_0x22de38['item'],'addMarker:'+_0x22de38['markerName']),_0x38c922['consumable']['consume'](_0x22de38['item'],'removeMarker:'+_0x22de38['markerName']),null;const _0x454c2a=['ck-comment-marker'];return _0x403d73&&_0x454c2a['push']('ck-comment-marker--active'),_0x1f80d3=_0x37f30b?.['length']?_0x37f30b['comments']['first']['author']['id']:_0x55031d['me']['id'],{'classes':_0x454c2a,'attributes':{'data-comment':_0x54ddb7,'data-author-id':_0x1f80d3}};}}),_0x3d92d1['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3d1d41,{options:_0x219ffb})=>{if(_0x219ffb['showCommentHighlights'])return null;const _0x593ad1=_0x3d92d1['plugins']['get'](o),_0x33c422=_0x3d92d1['model']['markers']['get'](_0x3d1d41),{id:_0x4999b4,part:_0x53ce17}=er(_0x3d1d41);return _0x33c422&&!_0x33c422['affectsData']||_0x219ffb['ignoreResolvedComments']&&_0x593ad1['getCommentThread'](_0x4999b4)?.['isResolved']?null:{'group':'comment','name':_0x53ce17?_0x4999b4+':'+_0x53ce17:_0x4999b4};}}),_0x3d92d1['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x888dda,{writer:_0x506d39})=>_0x506d39['createElement']('$marker',{'data-name':'comment:'+_0x888dda['getAttribute']('id')})}),_0x3d92d1['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x18fe1a=this['editor'],_0x4e43d0=_0x18fe1a['plugins']['get'](o),_0x25b127=new Set(),_0x46998a=new Set();_0x18fe1a['model']['document']['registerPostFixer'](_0x5ea0b1=>{let _0x41c9d7=!0x1;for(const {name:_0x281244,data:_0x291f58}of _0x18fe1a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x35f2e1,id:_0xc834e3}=er(_0x281244);let _0x5bea70=_0x291f58['newRange'];if('comment'!==_0x35f2e1||!_0x5bea70)continue;const _0x4accbc='$graveyard'===_0x5bea70['root']['rootName'];_0x4accbc||(_0x5bea70=dt(_0x5bea70,_0x18fe1a['model']),!_0x5bea70||_0x5bea70['isCollapsed']||!_0x291f58['newRange']||_0x5bea70['isEqual'](_0x291f58['newRange']))?_0x18fe1a['model']['hasContent'](_0x5bea70)&&!_0x4accbc?this['isThreadsLoadingPaused']?_0x25b127['add'](_0x281244):this['_handleThreadMarker'](_0x281244,_0xc834e3):(_0x46998a['add'](_0x281244),_0x25b127['delete'](_0x281244),_0x5ea0b1['removeMarker'](_0x281244),_0x41c9d7=!0x0):(_0x5ea0b1['updateMarker'](_0x281244,{'range':_0x5bea70}),_0x41c9d7=!0x0);}return _0x41c9d7;}),this['on']('change:isThreadsLoadingPaused',(_0x3c093b,_0x35954e,_0x3cb644)=>{if(!_0x3cb644&&_0x25b127['size'])for(const _0x3bf870 of _0x25b127){const {id:_0x34d816}=er(_0x3bf870);_0x25b127['delete'](_0x3bf870),_0x18fe1a['model']['markers']['get'](_0x3bf870)&&this['_handleThreadMarker'](_0x3bf870,_0x34d816);}}),this['listenTo'](_0x18fe1a['model']['document'],'change',()=>{for(const {name:_0x3858d5,data:{newRange:_0x43ecdd}}of _0x18fe1a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x269248,id:_0x394ee3}=er(_0x3858d5);if('comment'!==_0x269248)continue;const _0x4a1ba1=_0x4e43d0['getCommentThread'](_0x394ee3),_0x39dde6=this['hasMarkerForId'](_0x394ee3);_0x4a1ba1&&(!_0x4a1ba1['_hasTargetInContent']&&_0x43ecdd&&_0x18fe1a['editing']['view']['once']('render',()=>{const _0x2aed22=_0x18fe1a['plugins']['get'](y),_0x22a6af=_0x4e43d0['_threadToController']['get'](_0x4a1ba1)['view'];_0x2aed22['getByInnerView'](_0x22a6af)['refreshVisibility']();},{'priority':'low'}),_0x4a1ba1['_hasTargetInContent']=_0x39dde6||!!_0x43ecdd),_0x43ecdd||(_0x46998a['add'](_0x3858d5),_0x25b127['delete'](_0x3858d5));}for(const _0x27aed5 of _0x46998a){const {id:_0x127ef3}=er(_0x27aed5),_0x3f2a63=_0x4e43d0['getCommentThread'](_0x127ef3);if(_0x25b127['delete'](_0x27aed5),!_0x3f2a63)continue;const _0x4e1f02=this['hasMarkerForId'](_0x127ef3);_0x4e1f02||_0x3f2a63['isSubmitted']?_0x4e1f02||_0x3f2a63['unlinkedAt']||_0x3f2a63['setUnlinkedAt'](new Date()):_0x3f2a63['remove']();}_0x46998a['clear']();});}['_handleInitialThreads'](_0x172902){_0x172902['forEach'](_0x543fe9=>{_0x543fe9['unlinkedAt']&&this['_attachArchivedThread'](_0x543fe9['id']);});}['_getTargetForId'](_0x9fdb70){const _0xe3b220=this['editor'],_0x4cd13b=this['getAllMarkersForId'](_0x9fdb70);return et(_0xe3b220['editing'],_0x4cd13b);}['_getTextContext'](_0x1df8c9){const _0x1512d8=this['getAllMarkersForId'](_0x1df8c9);let _0x19270e='',_0x49a9f2=!0x1;for(const _0x25cde4 of _0x1512d8){const _0x42859d=_0x25cde4['getRange']();for(const _0x530575 of Array['from'](_0x42859d['getItems']()))_0x530575['is']('$textProxy')?(_0x19270e&&_0x49a9f2&&(_0x19270e+='\x20',_0x49a9f2=!0x1),_0x19270e+=_0x530575['data']):_0x49a9f2=!0x0;_0x49a9f2=!0x0;}return _0x19270e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x22dd1e,_0x9b49ea){const _0x64ec1a=this['editor'],_0x3c157d=_0x64ec1a['plugins']['get'](o);let _0x4618cd=_0x3c157d['getCommentThread'](_0x9b49ea);const _0x562959=_0x64ec1a['config']['get']('collaboration.channelId'),_0xbb0c9a=_0x64ec1a['plugins']['get'](b);if(_0x4618cd&&(_0x4618cd['unlinkedAt']&&_0x4618cd['setUnlinkedAt'](null),_0x4618cd['isAttached']))return _0x4618cd;return!this['getAllMarkersForId'](_0x9b49ea)[0x0]['managedUsingOperations']?_0x64ec1a['editing']['view']['once']('render',()=>{if(_0x3c157d['getCommentThread'](_0x9b49ea))return;const _0x4858b6=_0x64ec1a['plugins']['get'](y);_0x4618cd=_0x3c157d['openNewCommentThread']({'channelId':_0x562959,'threadId':_0x9b49ea,'target':()=>this['_getTargetForId'](_0x9b49ea),'context':{'type':'text','value':this['_getTextContext'](_0x9b49ea)}});const _0x55678e=_0x3c157d['_threadToController']['get'](_0x4618cd)['view'],_0x43facd=_0x4858b6['getByInnerView'](_0x55678e);_0x43facd&&_0xbb0c9a['registerAnnotation'](_0x43facd);},{'priority':'low'}):_0x3c157d['fetchCommentThread']({'channelId':_0x562959,'threadId':_0x9b49ea})['then'](_0x5a65f1=>{if('destroyed'!==_0x64ec1a['state']){if(_0x4618cd=_0x5a65f1,_0x4618cd&&!_0x4618cd['isAttached']){const _0x55a0f0=_0x4618cd['attachTo'](()=>this['_getTargetForId'](_0x9b49ea));_0xbb0c9a['registerAnnotation'](_0x55a0f0),_0x4618cd['isResolved']&&this['_reconvertMarkers'](_0x9b49ea);}else{if(!_0x4618cd){const _0x2a2b0e=this['getAllMarkersForId'](_0x9b49ea);_0x64ec1a['model']['change'](_0x2fb100=>{for(const _0x12d2a3 of _0x2a2b0e)_0x2fb100['removeMarker'](_0x12d2a3);});}}}}),_0x4618cd;}['_handleThreadMarker'](_0x215fd6,_0x3562a5){const _0x469bd5=this['_attachMarkerToThread'](_0x215fd6,_0x3562a5);_0x469bd5&&!_0x469bd5['context']&&_0x469bd5['setContext']({'type':'text','value':this['_getTextContext'](_0x3562a5)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3f7734=this['editor'];ot(_0x3f7734['model'],({left:_0x4cf9e2,entered:_0x39dcce})=>{for(const _0x9afb52 of _0x4cf9e2)if(mt(_0x9afb52)){_0x3f7734['ui']['ariaLiveAnnouncer']['announce'](N(_0x3f7734['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x13d2ae of _0x39dcce)if(mt(_0x13d2ae)){_0x3f7734['ui']['ariaLiveAnnouncer']['announce'](N(_0x3f7734['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x332df9)));break;}});}}function ft(_0x5c83c2,_0x3f1700){return _0x3f1700?_0x5c83c2+':'+_0x3f1700:_0x5c83c2;}function er(_0x5daf77){const _0x233197=_0x5daf77['split'](':');return{'group':_0x233197[0x0],'id':_0x233197[0x1],'part':_0x233197[0x2]};}function dt(_0x64cff9,_0x219c7b){const _0x5552c0=_0x219c7b['schema'],_0x3775cd=_0x219c7b['createRange'](_0x64cff9['start']);for(const _0x5e6709 of _0x64cff9['getWalker']()){const {type:_0x460d69,item:_0x26b566,nextPosition:_0x3336e2}=_0x5e6709;if('text'===_0x460d69||_0x5552c0['isObject'](_0x26b566)){const _0x350b8e=_0x219c7b['createPositionBefore'](_0x26b566);_0x3775cd['isCollapsed']&&(_0x3775cd['start']=_0x350b8e),_0x3775cd['end']=_0x3336e2;}}return _0x3775cd;}function mt(_0x72a73b){return'comment'===er(_0x72a73b['name'])['group'];}class s extends _0x1a45c0{['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 _0x3d4862=this['editor'],_0x4b8e2d=_0x3d4862['plugins']['get'](o),_0x166b8a=_0x3d4862['plugins']['get'](r),_0x1f0718=_0x3d4862['plugins']['get'](y),_0x19bef8=_0x3d4862['plugins']['get'](b);_0x3d4862['ui']['componentFactory']['add']('comment',()=>{const _0xc25317=this['_createUIButton'](_0x4cc9f4);return _0xc25317['tooltip']=!0x0,_0xc25317;}),_0x3d4862['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x353c38)),_0x19bef8['addSourceCollector'](()=>{const _0x315ea4=[];for(const [_0x156623,_0x30c3f5]of _0x4b8e2d['_threadToController']){const _0x88e67e=_0x166b8a['getAllMarkersForId'](_0x156623['id']),_0x228bb3=_0x88e67e['map'](_0x581dd2=>_0x581dd2['getRange']());_0x88e67e['length']>0x0&&_0x315ea4['push']([_0x30c3f5['view'],_0x228bb3]);}return _0x315ea4;}),this['listenTo'](_0x1f0718,'change:activeAnnotations',(_0x3f7163,_0x5c4822,_0xcbc961)=>{const _0x3ac025=Array['from'](_0xcbc961)['map'](_0x244c46=>_0x244c46['innerView'])['find'](_0xef2be=>_0x4b8e2d['_viewToController']['has'](_0xef2be));if(!_0x3ac025)return void(_0x166b8a['activeMarker']=null);const _0x439ba6=_0x4b8e2d['_viewToController']['get'](_0x3ac025)['model']['id'],_0x69f2e9='comment:'+_0x439ba6;_0x439ba6&&_0x166b8a['hasMarkerForId'](_0x439ba6)?_0x166b8a['activeMarker']=_0x69f2e9:_0x166b8a['activeMarker']&&(_0x166b8a['activeMarker']=null);}),this['listenTo'](_0x4b8e2d,'removeCommentThread',(_0x2a2a58,{threadId:_0x533149,isFromAdapter:_0x5da4f0})=>{!_0x5da4f0&&_0x3d4862['ui']['focusTracker']['isFocused']&&_0x166b8a['hasMarkerForId'](_0x533149)&&_0x3d4862['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4b8e2d,'addComment',(_0x137a2f,{threadId:_0xccd964,isFromAdapter:_0x2fb561})=>{if(_0x2fb561||!_0x166b8a['hasMarkerForId'](_0xccd964)||!_0x4b8e2d['hasCommentThread'](_0xccd964))return;0x1===_0x4b8e2d['getCommentThread'](_0xccd964)['length']&&(_0x3d4862['editing']['view']['focus'](),_0x137a2f['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x901f3d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27fe54;for(const _0x37f8ff in _0x901f3d){const _0x2d2b98=_0x37f8ff,_0x35b941=_0x901f3d[_0x2d2b98];if('commentsLicenseKeyValid'==_0x35b941||'commentsLicenseKeyInvalid'==_0x35b941||'commentsLicenseKeyExpired'==_0x35b941||'commentsLicenseKeyDomainLimit'==_0x35b941||'commentsLicenseKeyNotAllowed'==_0x35b941||'commentsLicenseKeyEvaluationLimit'==_0x35b941||'commentsLicenseKeyTrialLimit'==_0x35b941||'commentsLicenseKeyUsageLimit'==_0x35b941){delete _0x901f3d[_0x2d2b98],_0x27fe54=_0x35b941,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27fe54&&_0x901f3d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27fe54&&_0x901f3d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27fe54&&_0x901f3d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3a57c6){const _0x3b38bc=this['editor'],_0x437183=new _0x3a57c6(_0x3b38bc['locale']),_0x9d28f9=_0x3b38bc['commands']['get']('addCommentThread');return _0x437183['set']({'label':N(_0x3b38bc['locale'],'Comment'),'icon':_0x54774b}),_0x437183['bind']('isEnabled')['to'](_0x9d28f9,'hasContent'),this['listenTo'](_0x437183,'execute',()=>{_0x9d28f9['execute']();}),_0x437183;}}class i extends _0x1a45c0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5962f3){super(_0x5962f3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x23bb4b,_0x1009a7,_0x17cfce)=>{_0x17cfce?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xebd47,_0x522be7]of this['editor']['commands'])_0x522be7['affectsData']&&'addCommentThread'!==_0xebd47&&_0x522be7['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x5e5d3e=this['editor']['editing']['view']['document'];this['listenTo'](_0x5e5d3e,'cut',_0x4e1905=>_0x4e1905['stop'](),{'priority':'highest'}),this['listenTo'](_0x5e5d3e,'clipboardInput',_0x19f4d3=>_0x19f4d3['stop'](),{'priority':'highest'}),this['listenTo'](_0x5e5d3e,'delete',_0x11ab47=>_0x11ab47['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x42777b,_0xf8e6ac]of this['editor']['commands'])_0xf8e6ac['affectsData']&&'addCommentThread'!==_0x42777b&&_0xf8e6ac['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 _0x3f106c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f1d36){super(_0x5f1d36),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1b05de=this['context']['plugins']['get'](y);this['listenTo'](_0x1b05de,'_activateAnnotation',(_0x37770f,_0x932ef)=>{for(const _0x1b7289 of this['activeUIs']){const _0x313ffb=this['_uis']['get'](_0x1b7289);(0x0,this['uisData']['get'](_0x1b7289)['filter'])(_0x932ef)&&_0x313ffb['setActiveAnnotation'](_0x932ef);}}),this['listenTo'](_0x1b05de,'_deactivateAllAnnotations',()=>{for(const _0x39bee8 of this['activeUIs']){this['_uis']['get'](_0x39bee8)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1b05de['_visibleAnnotations'],'add',(_0x3ddb70,_0x19ec16)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x19ec16);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2df482){return this['activeUIs']['has'](_0x2df482);}['activate'](_0x291a37,_0x2ff30a=this['defaultFilter']){const _0x10b8ff=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x291a37))throw new _0x160abe('annotationsuis-missing-ui',this,{'uiName':_0x291a37});this['isActive'](_0x291a37)&&this['deactivate'](_0x291a37),this['activeUIs']['add'](_0x291a37);const _0x213ced=new S();v({'source':_0x10b8ff['_visibleAnnotations'],'target':_0x213ced,'filter':_0x2ff30a}),this['uisData']['set'](_0x291a37,{'collection':_0x213ced,'filter':_0x2ff30a});const _0x43066c=this['_uis']['get'](_0x291a37);_0x43066c['attach'](_0x213ced),this['listenTo'](_0x43066c,'change:activeAnnotation',(_0x1e0185,_0x106ff9,_0x157830,_0x12d218)=>{_0x12d218&&_0x10b8ff['_removeActiveAnnotation'](_0x12d218),_0x157830&&_0x10b8ff['_addActiveAnnotation'](_0x157830);});}['deactivate'](_0x3fe76d){if(this['activeUIs']['delete'](_0x3fe76d),!this['_uis']['has'](_0x3fe76d))throw new _0x160abe('annotationsuis-missing-ui',this,{'uiName':_0x3fe76d});const _0x5e5202=this['_uis']['get'](_0x3fe76d);_0x5e5202['detach'](),this['stopListening'](_0x5e5202),this['uisData']['get'](_0x3fe76d)['collection']['destroy'](),this['uisData']['delete'](_0x3fe76d);}['switchTo'](_0xfc2a2e){if(!this['_uis']['has'](_0xfc2a2e))throw new _0x160abe('annotationsuis-missing-ui',this,{'uiName':_0xfc2a2e});const _0x400fc0=this['context']['plugins']['get'](y),_0x22c7f9=Array['from'](_0x400fc0['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xfc2a2e);const _0x5a7dbe=this['_uis']['get'](_0xfc2a2e);_0x5a7dbe['setActiveAnnotation'](_0x22c7f9),_0x5a7dbe['_setSelectedAnnotations']&&_0x22c7f9&&_0x5a7dbe['_setSelectedAnnotations']([_0x22c7f9]);}['deactivateAll'](){for(const _0x20e757 of this['activeUIs'])this['deactivate'](_0x20e757);}['register'](_0x2f8d56,_0x2079d0){if(this['_uis']['has'](_0x2f8d56))throw new _0x160abe('annotationsuis-register-already-registered');if('function'!=typeof _0x2079d0['attach']||'function'!=typeof _0x2079d0['detach']||'function'!=typeof _0x2079d0['setActiveAnnotation'])throw new _0x160abe('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2f8d56,_0x2079d0);}['refilterAnnotations'](){const _0x20d672=this['context']['plugins']['get'](y)['collection'],_0x3a96cb=new Map(),_0x188a29=Array['from'](this['activeUIs']);for(const _0x318036 of this['activeUIs']){const _0x316fb3=this['uisData']['get'](_0x318036)['collection'];for(const _0x283844 of _0x316fb3)_0x3a96cb['set'](_0x283844,_0x318036);}for(const _0x4776d9 of _0x20d672){const _0x1625f9=_0x3a96cb['get'](_0x4776d9);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4776d9);const _0x573290=_0x188a29['find'](_0x371f5e=>this['uisData']['get'](_0x371f5e)['filter'](_0x4776d9));_0x1625f9!==_0x573290&&(_0x1625f9&&this['uisData']['get'](_0x1625f9)['collection']['remove'](_0x4776d9),_0x573290&&this['uisData']['get'](_0x573290)['collection']['add'](_0x4776d9));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5cbdaa){const _0x4e6399=[];for(const _0x488676 of this['activeUIs']){(0x0,this['uisData']['get'](_0x488676)['filter'])(_0x5cbdaa)&&_0x4e6399['push'](_0x488676);}if(_0x4e6399['length']>0x1)throw new _0x160abe('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4e6399,'annotationType':_0x5cbdaa['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2ef91a){super(_0x2ef91a);const _0x410432=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 _0x34c795(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x410432['to']('class')],'style':{'minHeight':_0x410432['to']('minHeight',_0x43b60d=>'number'==typeof _0x43b60d?_i(_0x43b60d+0xa):null)},'dir':_0x2ef91a['uiLanguageDirection'],'role':'application','aria-label':N(_0x2ef91a,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x2ef91a,'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',_0x290ed6=>{this['_updateItemPositionInFocusables'](_0x290ed6['source']);}),this['list']['forEach'](_0x43c30a=>{this['focusTracker']['add'](_0x43c30a['element']),this['_updateItemPositionInFocusables'](_0x43c30a);}),this['list']['on']('change',(_0x58546b,_0x43218e)=>{for(const _0x5c47ab of _0x43218e['removed'])this['focusTracker']['remove'](_0x5c47ab['element']),this['focusables']['remove'](_0x5c47ab);for(const _0x29f532 of _0x43218e['added'])this['focusTracker']['add'](_0x29f532['element']),this['_updateItemPositionInFocusables'](_0x29f532);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5ec697){const _0x21268f=this['focusables']['getIndex'](_0x5ec697);let _0x5037d0,_0x2c7e59;for(const _0x46092c of this['focusables'])if(_0x5ec697['top']<_0x46092c['top']){_0x5037d0=_0x46092c;break;}if(_0x2c7e59=_0x5037d0?this['focusables']['getIndex'](_0x5037d0):this['focusables']['length'],-0x1!==_0x21268f){if(_0x21268f===_0x2c7e59-0x1)return;this['focusables']['remove'](_0x5ec697),_0x2c7e59=_0x5037d0?this['focusables']['getIndex'](_0x5037d0):this['focusables']['length'];}this['focusables']['add'](_0x5ec697,_0x2c7e59);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x29b1b2){super(_0x29b1b2),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x155a0a,_0xc98701)=>_0x155a0a+_0xc98701),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5a4261=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5a4261['to']('isAnimationDisabled',_0x184295=>_0x184295?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5a4261['to']('top',_0x218d85=>Ot(_0x218d85))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4ae04b=this['element']['clientHeight'];_0x4ae04b&&(this['height']=_0x4ae04b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x3f106c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11a2f2){super(_0x11a2f2),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 _0x2d571e=this['context']['config']['get']('sidebar.container');_0x2d571e&&this['setContainer'](_0x2d571e);}['setContainer'](_0x24dd11){if(!g(_0x24dd11))throw new _0x160abe('sidebar-setcontainer-invalid-element');this['container']=_0x24dd11;}['_attachToContainer']({viewClass:_0x4f2584='',spaceBetweenItems:_0x1610d1=0x19}={}){if(!g(this['container']))throw new _0x160abe('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4f2584,this['_spaceBetweenItems']=_0x1610d1;}['rearrange']({removedAnnotation:_0x3e4530,previousAnnotation:_0x43328c,nextAnnotation:_0x165b8f}){const _0x7f8b32=this['getSidebarItemView'](_0x3e4530);this['view']['list']['remove'](_0x7f8b32),this['_destroySidebarItemView'](_0x3e4530),_0x43328c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x43328c)),_0x165b8f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x165b8f)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x51f5a0,activatedAnnotation:_0x258e0b,disableAnimationOnActivatedAnnotation:_0x2313ab}){if(this['_activeAnnotation']=_0x258e0b,_0x51f5a0){_0x51f5a0['isActive']=!0x1;const _0x2e6424=this['getSidebarItemView'](_0x51f5a0);_0x2e6424&&_0x2313ab&&(_0x2e6424['isAnimationDisabled']=!0x1);}if(_0x258e0b){const _0x16da61=this['getSidebarItemView'](_0x258e0b);_0x16da61&&(_0x258e0b['isActive']=!0x0,_0x2313ab&&(_0x16da61['isAnimationDisabled']=!0x0,_0x16da61['top']+=0x1),this['_alignToTargetRect'](_0x16da61));}}['_detachFromContainer'](_0x4fc2f9){if(this['view']['element']['remove'](),_0x4fc2f9){for(const _0xe1de35 of _0x4fc2f9)this['_destroySidebarItemView'](_0xe1de35);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x28790e,_0x32a93e){_0x32a93e||(_0x32a93e=_0x28790e['view']);const _0x5406f8=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5406f8,_0x28790e),this['_annotationToSidebarItemView']['set'](_0x28790e,_0x5406f8),_0x5406f8['content']['add'](_0x32a93e),this['listenTo'](_0x28790e['view'],'change:targetRect',(_0x359a8f,_0xf2c95b,_0x2f1e96)=>{const _0x1e99a3=this['_getTargetTop'](_0x28790e,_0x2f1e96);_0x5406f8['_targetTop']!=_0x1e99a3&&(_0x5406f8['_targetTop']=_0x1e99a3,this['_setItemTop'](_0x5406f8,_0x1e99a3));}),this['listenTo'](_0x5406f8,'change:top',()=>{this['_recalculate'](_0x5406f8,'top');}),this['listenTo'](_0x5406f8,'change:bottom',()=>{this['_recalculate'](_0x5406f8,'bottom');}),this['_alignToTargetRect'](_0x5406f8);const _0x1bf2df=this['_getItemBefore'](_0x5406f8);if(_0x1bf2df)this['_alignAfterItem'](_0x1bf2df,_0x5406f8)||this['_alignToTargetRect'](_0x5406f8);else this['_alignToTargetRect'](_0x5406f8);return this['_updateLastItem'](),this['view']['list']['add'](_0x5406f8),_0x5406f8;}['_alignForTopChange'](_0x30c743){if(!_0x30c743['content']['length'])return;const _0x4643c4=this['_getItemBefore'](_0x30c743);if(!_0x4643c4)return;const _0x16d9b1=this['_sidebarItemViewToAnnotation']['get'](_0x4643c4),_0x48861e=this['_activeAnnotation'];_0x48861e&&_0x48861e===_0x16d9b1?this['_alignAfterItem'](_0x4643c4,_0x30c743):this['_alignBeforeItem'](_0x30c743,_0x4643c4);}['_alignForBottomChange'](_0x185e21){if(!_0x185e21['content']['length'])return;const _0x25492c=this['_getItemAfter'](_0x185e21);if(!_0x25492c)return;const _0x29a402=this['_sidebarItemViewToAnnotation']['get'](_0x25492c),_0x4d70cf=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5e5b53=this['_activeAnnotation'];_0x5e5b53&&_0x5e5b53===_0x29a402&&_0x4d70cf?(this['_alignBeforeItem'](_0x25492c,_0x185e21),this['_alignAfterItem'](_0x185e21,_0x25492c)):_0x5e5b53&&_0x5e5b53===_0x29a402?this['_alignBeforeItem'](_0x25492c,_0x185e21):this['_alignAfterItem'](_0x185e21,_0x25492c);}['_recalculate'](_0x4ca6ba,_0x3a478a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4258c2,changedProp:_0x4b0e85}of this['_recalculateBuffer'])'top'===_0x4b0e85?this['_alignForTopChange'](_0x4258c2):this['_alignForBottomChange'](_0x4258c2);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4ca6ba,'changedProp':_0x3a478a});}['getSidebarItemView'](_0xfbb4f6){return this['_annotationToSidebarItemView']['get'](_0xfbb4f6);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xae4333){const _0x486e23=this['getSidebarItemView'](_0xae4333);this['stopListening'](_0x486e23),this['stopListening'](_0xae4333['view']),_0x486e23['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xae4333),this['_sidebarItemViewToAnnotation']['delete'](_0x486e23);}['_createSidebarView'](){const _0x2952a6=new H(this['context']['locale']);return _0x2952a6['render'](),this['on']('change:_lastItem',(_0x161f94,_0x1243f4,_0x2f1c4f,_0xb0008d)=>{_0xb0008d&&_0x2952a6['unbind']('minHeight'),_0x2f1c4f?_0x2952a6['bind']('minHeight')['to'](_0x2f1c4f,'bottom'):_0x2952a6['minHeight']=null;}),_0x2952a6;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x302320){const _0xa40666=this['_sidebarItemViewToAnnotation']['get'](_0x302320),_0x1a9f21=_0xa40666&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xa40666)-0x1);return _0x1a9f21&&this['getSidebarItemView'](_0x1a9f21)||null;}['_getItemAfter'](_0x457a99){const _0x43542a=this['_sidebarItemViewToAnnotation']['get'](_0x457a99),_0x354842=_0x43542a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43542a)+0x1);return _0x354842&&this['getSidebarItemView'](_0x354842)||null;}['_alignBeforeItem'](_0x4e5b17,_0x1b360f){_0x4e5b17['updateHeight']();const _0x20102b=G(_0x1b360f['bottom']+this['_spaceBetweenItems'],_0x4e5b17['top']);return!!_0x20102b&&(this['_setItemTop'](_0x1b360f,_0x1b360f['top']-_0x20102b),!0x0);}['_alignAfterItem'](_0x25c4df,_0x753c4c){_0x25c4df['updateHeight']();const _0x35a906=G(_0x25c4df['bottom']+this['_spaceBetweenItems'],_0x753c4c['top']);return!!_0x35a906&&(this['_setItemTop'](_0x753c4c,_0x753c4c['top']+_0x35a906,!0x1),!0x0);}['_alignToTargetRect'](_0x2bb29d){const _0x381625=this['_sidebarItemViewToAnnotation']['get'](_0x2bb29d);if(!_0x381625||!_0x381625['target']||!_0x381625['targetRect'])return;const _0x3790e3=this['_getTargetTop'](_0x381625,_0x381625['targetRect']);this['_setItemTop'](_0x2bb29d,_0x3790e3);}['_getTargetTop'](_0x17e5a6,_0x5c6843){if(null===_0x5c6843)return 0x0;if(_0x17e5a6['target']instanceof _0x415c3c)return _0x5c6843['top'];{const _0x3b08d4=new _0x415c3c(this['view']['element'])['top'];return _0x5c6843['top']-_0x3b08d4;}}['_setItemTop'](_0x5ba453,_0x384a25,_0x9b6ce2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x9b6ce2&&(_0x384a25=Math['max'](_0x384a25,this['_getMaxAvailableTop'](_0x5ba453))),_0x5ba453['top']=_0x384a25;}['_getMaxAvailableTop'](_0x379258){let _0x67f5d3=this['_getItemBefore'](_0x379258),_0x5027b4=0x0;for(;_0x67f5d3;)_0x67f5d3['updateHeight'](),_0x5027b4+=this['_spaceBetweenItems']+_0x67f5d3['height'],_0x67f5d3=this['_getItemBefore'](_0x67f5d3);return _0x5027b4;}}function G(_0x59f623,_0x56355a){return Math['max'](_0x59f623-_0x56355a,0x0);}function g(_0x26d3c3){return null!==_0x26d3c3&&'object'==typeof _0x26d3c3&&0x1===_0x26d3c3['nodeType'];}class e extends _0x3f106c{['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(_0x1d1b8d){super(_0x1d1b8d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4550ea(),this['_refreshPositioningDebounced']=_0x35cf6e(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x396f03=this['context']['plugins']['get'](j),_0x48094d=this['context']['plugins']['get'](z);_0x396f03['register']('wideSidebar',this),_0x48094d['container']&&_0x396f03['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x50971d){if(_0x50971d===this['activeAnnotation'])return;const _0xb9485a=this['context']['plugins']['get'](z);_0xb9485a['_activeAnnotation']=_0x50971d;const _0x431511=this['activeAnnotation'];_0xb9485a['refresh']({'blurredAnnotation':_0x431511,'activatedAnnotation':_0x50971d}),this['activeAnnotation']=_0x50971d;}['attach'](_0x2725d6){this['annotations']=_0x2725d6;const _0x45ab0c=this['context']['plugins']['get'](z);if(_0x45ab0c['_annotations']=_0x2725d6,this['isAttached'])throw new _0x160abe('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x45ab0c,'set:container',()=>{this['detach'](),this['listenTo'](_0x45ab0c,'change:container',_0x16b50c=>{_0x16b50c['off'](),this['attach'](_0x2725d6);});}),_0x45ab0c['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x13c3bf=_0x3fc9e6=>{_0x3fc9e6['updateTargetRect'](),_0x45ab0c['addAnnotation'](_0x3fc9e6);};for(const _0x1d8a6c of _0x2725d6)_0x13c3bf(_0x1d8a6c);this['listenTo'](_0x2725d6,'add',(_0x4a60b9,_0x2a7d98)=>{_0x13c3bf(_0x2a7d98);}),this['listenTo'](_0x2725d6,'remove',(_0x1f8797,_0x2dc10b,_0x55e3f5)=>{_0x45ab0c['rearrange']({'removedAnnotation':_0x2dc10b,'previousAnnotation':_0x2725d6['get'](_0x55e3f5-0x1),'nextAnnotation':_0x2725d6['get'](_0x55e3f5+0x1)}),_0x2dc10b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2725d6,'focus',(_0x4223f5,_0x43c975)=>{this['setActiveAnnotation'](_0x43c975);}),this['listenTo'](_0x2725d6,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5374e6=this['context']instanceof _0x41d3ee?this['context']['editors']:new _0x4550ea([this['context']]);for(const _0x476e3a of _0x5374e6)this['_integrateWithEditorAnnotations'](_0x476e3a);this['listenTo'](_0x5374e6,'add',(_0x656b93,_0x3e9ed2)=>{this['listenTo'](_0x3e9ed2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3e9ed2);});}),this['listenTo'](_0x5374e6,'remove',(_0x2d6f4c,_0x3dda9c)=>{_0x3dda9c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3dda9c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x160abe('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x159adb=this['context']['plugins']['get'](z);_0x159adb['_detachFromContainer'](this['annotations']),this['stopListening'](_0x159adb),this['stopListening'](this['annotations']),this['context']instanceof _0x41d3ee&&this['stopListening'](this['context']['editors']);for(const _0x7c0d9a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x7c0d9a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4bcfa3){if(!_0x4bcfa3['plugins']['has']('EditorAnnotations'))return;const _0x5e167f=_0x4bcfa3['plugins']['get']('EditorAnnotations'),_0x839a62=()=>{const _0x2d7362=_0x5e167f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2d7362[0x0]||null);};this['listenTo'](_0x5e167f,'refresh',_0x839a62),this['listenTo'](_0x5e167f,'blur',(_0x22e700,{isAnnotationTracked:_0x22a745})=>{this['activeAnnotation']&&_0x22a745(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5e167f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x20a6d6=>{_0x5e167f['hasDomSelection']()&&(_0x839a62(),_0x20a6d6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5e167f);}['_destroyEditorAnnotationsIntegration'](_0x1e4f1d){this['stopListening'](_0x1e4f1d),this['_editorAnnotations']['remove'](_0x1e4f1d);}}class C extends _0x4cc9f4{['counterView'];constructor(_0x3a73f6){super(_0x3a73f6);const _0x2270f4=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5c0afe,_0x344012)=>_0x5c0afe?'...':_0x344012['toString']()),this['set']('annotationType',''),this['icon']=_0x54774b,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2270f4['to']('annotationType',_0x53eed6=>'ck-annotation-counter__badge--'+_0x53eed6),_0x2270f4['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2270f4['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x3f106c{['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(_0x81a2e5){super(_0x81a2e5),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3d333e())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4550ea(),this['_refreshPositioningDebounced']=_0x35cf6e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x394631(this['context']['locale']),this['balloonPanelView']=new _0x7586f9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x45c056){this['annotations']=_0x45c056;const _0x29eee7=this['context']['plugins']['get'](z),_0x47016a=this['balloonPanelView'];if(_0x29eee7['_annotations']=_0x45c056,this['isAttached'])throw new _0x160abe('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x29eee7,'set:container',()=>{this['detach'](),this['listenTo'](_0x29eee7,'change:container',_0x5df8e4=>{_0x5df8e4['off'](),this['attach'](_0x45c056);});}),_0x29eee7['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x50ebec=_0x873659=>{const _0x5b1f4d=new C(this['context']['locale']);_0x29eee7['addAnnotation'](_0x873659,_0x5b1f4d),this['_annotationToNarrowView']['set'](_0x873659,_0x5b1f4d),_0x5b1f4d['bind']('isDirty','annotationType','number')['to'](_0x873659['view'],'isDirty','type','length'),_0x5b1f4d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x47016a['content']['first']!==_0x873659['view']?(this['_showBalloon'](_0x873659),_0x873659['view']['element']['focus'](),this['setActiveAnnotation'](_0x873659)):this['setActiveAnnotation'](null);});};for(const _0x404445 of _0x45c056)_0x50ebec(_0x404445);this['listenTo'](_0x45c056,'add',(_0x44fdf7,_0x5d0700)=>{_0x50ebec(_0x5d0700);}),this['listenTo'](_0x45c056,'remove',(_0x4028b8,_0x51f58d,_0x534fc6)=>{this['_annotationToNarrowView']['get'](_0x51f58d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x51f58d),_0x29eee7['rearrange']({'removedAnnotation':_0x51f58d,'previousAnnotation':_0x45c056['get'](_0x534fc6-0x1),'nextAnnotation':_0x45c056['get'](_0x534fc6+0x1)}),_0x51f58d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x45c056,'focus',(_0x46d39b,_0x38d0d5)=>{this['setActiveAnnotation'](_0x38d0d5);}),this['listenTo'](_0x45c056,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x40db56,_0x1af465)=>{_0x1af465['keyCode']===_0x1fca4c['esc']&&_0x47016a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x47016a['content']['first']),this['_hideBalloon'](),_0x1af465['stopPropagation'](),_0x1af465['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2a8b17,_0x214b57)=>{const _0x17cde8=_0x214b57['target'];_0x47016a['isVisible']&&_0x47016a['element']['contains'](_0x17cde8)||_0x29eee7['view']['element']['contains'](_0x17cde8)||_0x2a8b17['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x10f336=>_0x10f336['contains'](_0x17cde8))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2d46ef=this['context']instanceof _0x41d3ee?this['context']['editors']:new _0x4550ea([this['context']]);for(const _0x4d0644 of _0x2d46ef)this['_integrateWithEditorAnnotations'](_0x4d0644);this['listenTo'](_0x2d46ef,'add',(_0x395d73,_0x41fdb8)=>{this['listenTo'](_0x41fdb8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41fdb8);});}),this['listenTo'](_0x2d46ef,'remove',(_0x1e5368,_0x5b6efa)=>{_0x5b6efa['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5b6efa['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x403010){if(_0x403010===this['activeAnnotation'])return;const _0x30900e=this['context']['plugins']['get'](z);if(_0x30900e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x403010,'disableAnimationOnActivatedAnnotation':!0x0}),_0x403010)_0x30900e['getSidebarItemView'](_0x403010)?this['_showBalloon'](_0x403010):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x403010;}['detach'](){if(!this['isAttached'])throw new _0x160abe('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x18a116=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1f8335=>_0x1f8335['destroy']()),this['_annotationToNarrowView']['clear'](),_0x18a116['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x41d3ee&&this['stopListening'](this['context']['editors']);for(const _0x2eb2b2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2eb2b2);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'](_0x4f5bd5){if(!_0x4f5bd5['plugins']['has']('EditorAnnotations'))return;const _0x338c08=_0x4f5bd5['plugins']['get']('EditorAnnotations'),_0x1a791f=this['context']['plugins']['get'](z),_0x50c7f6=this['annotations'],_0x45da88=this['balloonPanelView'],_0x4045c8=()=>{const _0x47ff9e=_0x338c08['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x47ff9e),this['setActiveAnnotation'](_0x47ff9e[0x0]||null);};this['listenTo'](_0x338c08,'refresh',_0x4045c8),this['listenTo'](_0x338c08,'blur',(_0x35efab,{isAnnotationTracked:_0x5eda12})=>{this['activeAnnotation']&&_0x5eda12(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x338c08,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x50c7f6,'blur',_0x1a087b=>{_0x338c08['hasDomSelection']()&&_0x1a087b['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xd1a402,_0x14e413)=>{const _0x37a26e=_0x14e413['target'];_0x45da88['isVisible']&&_0x45da88['element']['contains'](_0x37a26e)||_0x1a791f['view']['element']['contains'](_0x37a26e)||this['activeAnnotation']&&_0x338c08['hasDomSelection']()&&(_0x4045c8(),_0xd1a402['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x338c08);}['_destroyEditorAnnotationsIntegration'](_0x2cef56){_0x2cef56&&(this['stopListening'](_0x2cef56),this['_editorAnnotations']['remove'](_0x2cef56));}['_setSelectedAnnotations'](_0x2fe028){for(const _0x235fc8 of this['_selectedAnnotations'])_0x2fe028['includes'](_0x235fc8)||this['_manuallyClosedAnnotationViews']['delete'](_0x235fc8['view']);this['_selectedAnnotations']=_0x2fe028;}['_refreshPositioning'](){const _0x4efa2c=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x4efa2c['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x42fafe){if(this['_manuallyClosedAnnotationViews']['has'](_0x42fafe['view']))return;const _0x5cb2b0=this['balloonPanelView']['content']['first'];_0x5cb2b0!==_0x42fafe['view']?(_0x5cb2b0&&this['_detachListeners'](_0x5cb2b0),this['_attachListeners'](_0x42fafe['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x42fafe['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x518634=this['balloonPanelView']['content']['first'],_0x4a3841=_0x518634&&this['annotations']['getByView'](_0x518634);if(!_0x4a3841||!this['_annotationToNarrowView']['has'](_0x4a3841))return;const _0x5012a5=this['_annotationToNarrowView']['get'](_0x4a3841)['element'],_0x34a118=(function(){const _0x592a6c=_0x7586f9['defaultPositions'];return[_0x592a6c['southArrowNorthEast'],_0x592a6c['northArrowSouthEast'],_0x592a6c['southArrowNorth'],_0x592a6c['northArrowSouth'],_0x592a6c['southArrowNorthWest'],_0x592a6c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5012a5,'positions':_0x34a118});}['_hideBalloon'](){const _0x43dc3c=this['balloonPanelView'],_0x3ed62d=_0x43dc3c['content']['first'];_0x3ed62d&&(this['_detachListeners'](_0x3ed62d),_0x43dc3c['unpin'](),_0x43dc3c['content']['clear']());}['_attachListeners'](_0x35c00f){this['listenTo'](_0x35c00f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x35c00f,'Esc',(_0x50e665,_0x521ab8)=>{this['_manuallyClosedAnnotationViews']['add'](_0x35c00f),this['_hideBalloon'](),_0x521ab8();});}['_detachListeners'](_0xa96cf8){this['stopListening'](_0xa96cf8);}}class c extends _0x1a45c0{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x5a5023,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x16efd7){super(_0x16efd7),_0x16efd7['editing']['view']['addObserver'](_0x96ebaf),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x16efd7['plugins']['get'](_0x5a5023),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x511f26=this['editor']['plugins']['get'](j);_0x511f26['context']===this['editor']&&(_0x511f26['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x7730fe,_0x25798d)=>{const _0x3d1543=this['_balloon'];if(this['isAttached']&&_0x3d1543['visibleView']){const _0x1df97c=this['annotations']['getByView'](_0x3d1543['visibleView']);_0x1df97c&&this['_closeAnnotation'](_0x1df97c),_0x25798d();}}));}['afterInit'](){const _0x5b5985=this['editor']['plugins']['get'](j);_0x5b5985['context']===this['editor']&&(_0x5b5985['hasActive']()||_0x5b5985['switchTo']('inline'));}['setActiveAnnotation'](_0x4bd8fc){_0x4bd8fc!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4bd8fc&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4bd8fc)&&this['_addAnnotationToBalloon'](_0x4bd8fc,!0x0),_0x4bd8fc['isActive']=!0x0),_0x4bd8fc||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4bd8fc);}['attach'](_0x34f63d){this['annotations']=_0x34f63d;const _0x531e39=this['editor']['plugins']['get'](j),_0x1a35f1=this['_balloon'];if(this['isAttached'])throw new _0x160abe('inlineannotations-attach-already-attached',this);if(_0x531e39['context']!==this['editor'])throw new _0x160abe('inlineannotations-not-allowed-with-context',this);const _0x166cc0=this['editor']['plugins']['get'](b);this['listenTo'](_0x166cc0,'refresh',()=>{const _0x4fcd72=_0x166cc0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1e1be2,_0x256b54;!this['_forceRefresh']&&(_0x1e1be2=_0x4fcd72,_0x256b54=this['_selectedAnnotations'],_0x1e1be2['length']===_0x256b54['length']&&_0x1e1be2['every'](_0x374dea=>_0x256b54['includes'](_0x374dea)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4fcd72),this['setActiveAnnotation'](_0x4fcd72[0x0]||null));}),this['listenTo'](_0x166cc0,'blur',(_0x10a26b,{isAnnotationTracked:_0x348b7e})=>{this['activeAnnotation']&&_0x348b7e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x202b35,_0x410c2c,_0x2d1090)=>{_0x2d1090||this['setActiveAnnotation'](null);}),this['listenTo'](_0x34f63d,'remove',(_0x2716bb,_0x1caf98)=>{this['_removeAnnotationFromBalloon'](_0x1caf98),_0x1caf98===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1a35f1,'change:visibleView',(_0x32cba3,_0x47a172,_0x1c9206,_0x13ff99)=>{_0x13ff99&&this['stopListening'](_0x13ff99);const _0x5d03dc=_0x34f63d['getByView'](_0x1c9206);_0x1c9206&&_0x5d03dc&&(this['listenTo'](_0x1c9206,'change:height',()=>{_0x1a35f1['updatePosition']();}),this['listenTo'](_0x1c9206,'Esc',()=>{this['_closeAnnotation'](_0x5d03dc),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5d03dc&&this['setActiveAnnotation'](_0x5d03dc));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1a35f1['visibleView']&&(_0x34f63d['getByView'](_0x1a35f1['visibleView'])&&_0x1a35f1['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 _0x160abe('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x314fc1 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x314fc1);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x159121){for(const _0x137df2 of this['_selectedAnnotations'])_0x159121['includes'](_0x137df2)||this['_manuallyClosed']['delete'](_0x137df2);for(const _0xb85f95 of this['annotations'])_0x159121['includes'](_0xb85f95)||this['_removeAnnotationFromBalloon'](_0xb85f95);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4c15fb of _0x159121)this['_addAnnotationToBalloon'](_0x4c15fb);}this['_selectedAnnotations']=_0x159121;}['_addAnnotationToBalloon'](_0x547515,_0x7aed29=!0x1){this['_manuallyClosed']['has'](_0x547515)||(this['_addedAnnotations']['has'](_0x547515)||this['_balloon']['hasView'](_0x547515['view'])||(this['_addedAnnotations']['add'](_0x547515),this['_balloon']['add']({'stackId':_0x547515['view']['id'],'view':_0x547515['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x547515)}})),_0x7aed29&&this['_balloon']['showStack'](_0x547515['view']['id']));}['_getBalloonTargetForAnnotation'](_0x540385){const _0x45054e=_0x540385['target'],_0x240308=this['editor']['editing']['view'],_0x5d51d7=_0x240308['document']['selection']['getFirstRange'](),_0x353f34=_0x240308['domConverter']['viewRangeToDom'](_0x5d51d7);if(_0x353f34['collapse'](!0x0),_0x45054e){if(_0x45054e instanceof _0x415c3c)return _0x45054e;let _0x159f16=[];for(const _0x27ad40 of _0x45054e)_0x159f16['push'](...F(_0x27ad40['getClientRects']()));_0x159f16=function(_0x38094f){const _0x349975=[];let _0x75ce84=_0x38094f[0x0];for(let _0x305545=0x1;_0x305545<_0x38094f['length'];_0x305545++)P(_0x75ce84,_0x38094f[_0x305545])?_0x75ce84['width']+=_0x38094f[_0x305545]['width']:(_0x349975['push'](_0x75ce84),_0x75ce84=_0x38094f[_0x305545]);return _0x349975['push'](_0x75ce84),_0x349975;}(_0x159f16);const _0x22eed9=_0x353f34['getBoundingClientRect']();return _0x159f16['find'](_0x52c5b8=>_0x52c5b8['top']<=_0x22eed9['top']&&_0x52c5b8['bottom']>=_0x22eed9['bottom']&&_0x52c5b8['left']<=_0x22eed9['left']&&_0x52c5b8['right']>=_0x22eed9['right'])||_0x159f16[0x0];}return _0x540385['targetRect']||_0x353f34;}['_removeAnnotationFromBalloon'](_0x29e2dc){this['_addedAnnotations']['has'](_0x29e2dc)&&this['_balloon']['hasView'](_0x29e2dc['view'])&&(this['_addedAnnotations']['delete'](_0x29e2dc),this['_balloon']['remove'](_0x29e2dc['view']));}['_closeAnnotation'](_0x52e579){this['_manuallyClosed']['add'](_0x52e579),this['_removeAnnotationFromBalloon'](_0x52e579);}}function F(_0x5d9a7d){return Array['from'](_0x5d9a7d)['map'](DOMRect['fromRect']);}function P(_0x351b84,_0x28cf6d){return _0x351b84['top']===_0x28cf6d['top']&&_0x351b84['bottom']===_0x28cf6d['bottom']&&_0x351b84['right']===_0x28cf6d['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x4ee4f9,_0x436434){super(_0x4ee4f9),this['set']('isEmpty',!_0x436434['length']),this['focusTracker']=new _0x34c795(),this['_annotationViews']=_0x436434,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x230040({'focusables':_0x436434,'focusTracker':this['focusTracker']}),this['listenTo'](_0x436434,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x436434,'remove',(_0x51ccc2,_0x306e9d)=>{_0x306e9d['isActive']&&this['focus'](),_0x436434['length']||(this['isEmpty']=!0x0);});const _0x19cdb8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x4ee4f9,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x436434},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x19cdb8['if']('isEmpty','ck-hidden',_0x23ff7d=>!_0x23ff7d)]},'children':[{'text':N(_0x4ee4f9,'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 _0x467390 of this['_annotationViews'])this['focusTracker']['add'](_0x467390['element']);this['_annotationViews']['on']('change',(_0x1450c4,{added:_0x5e53d7,removed:_0x525983})=>{for(const _0x42b51c of _0x5e53d7)this['focusTracker']['add'](_0x42b51c['element']);for(const _0x9d525d of _0x525983)this['focusTracker']['remove'](_0x9d525d['element']);});}}class p extends _0x3f106c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5a45f2){super(_0x5a45f2),this['archivedThreads']=new _0x4550ea();}['init'](){const _0x2a1ceb=this['context'],_0x5b9f83=_0x2a1ceb['plugins']['get'](o),_0x5cc10e=_0x2a1ceb['plugins']['get'](y);this['listenTo'](_0x5b9f83,'addCommentThread',(_0x188e86,{threadId:_0x190cf5})=>{const _0x3c0a3b=_0x5b9f83['getCommentThread'](_0x190cf5);_0x3c0a3b['archivedAt']&&this['archivedThreads']['add'](_0x3c0a3b,this['_calculatePosition'](_0x3c0a3b['archivedAt'])),this['listenTo'](_0x3c0a3b,'change:archivedAt',(_0x40038f,_0x26c774,_0x305db5)=>{_0x305db5?this['archivedThreads']['has'](_0x3c0a3b)||this['archivedThreads']['add'](_0x3c0a3b,this['_calculatePosition'](_0x3c0a3b['archivedAt'])):this['archivedThreads']['has'](_0x3c0a3b)&&this['archivedThreads']['remove'](_0x3c0a3b);});}),this['listenTo'](_0x5b9f83,'removeCommentThread',(_0x526f11,{threadId:_0x2af60f})=>{const _0x547fc6=_0x5b9f83['getCommentThread'](_0x2af60f);this['stopListening'](_0x547fc6),this['archivedThreads']['has'](_0x547fc6)&&this['archivedThreads']['remove'](_0x547fc6);},{'priority':'highest'}),this['listenTo'](_0x5cc10e['collection'],'focus',(_0xcb22e6,_0x235e07)=>{_0x235e07['isVisible']||(_0x235e07['isActive']=!0x0,_0x5cc10e['activate'](_0x235e07));});}['_calculatePosition'](_0x5ade22){const _0x3dd66e=[...this['archivedThreads']]['findIndex'](_0x42da1c=>_0x42da1c['archivedAt']<_0x5ade22);return _0x3dd66e>-0x1?_0x3dd66e:this['archivedThreads']['length'];}}class a extends _0x1a45c0{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3a9f1b];}constructor(_0x4066a1){super(_0x4066a1),this['annotationViews']=new _0x1bac6b(),this['_pendingThreads']=[];}['init'](){const _0x2a7e2a=this['editor'],_0x348f79=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2a7e2a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4cc9f4,!0x0)),_0x2a7e2a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x553904=this['_createCommentsArchiveButton'](_0x353c38);return _0x553904['set']({'role':'menuitemcheckbox'}),_0x553904;});const _0x4947f0=_0x2a7e2a['plugins']['get'](p),_0x5b2dc4=_0x2a7e2a['plugins']['get']('Annotations'),_0x37882d=_0x2a7e2a['plugins']['get']('CommentsRepository');_0x4947f0['archivedThreads']['forEach'](_0x6923ec=>{this['_handleNewThread'](_0x6923ec);}),this['listenTo'](_0x4947f0['archivedThreads'],'add',(_0x201aaf,_0x3d0284)=>{this['_handleNewThread'](_0x3d0284);}),this['listenTo'](_0x5b2dc4['collection'],'add',(_0x4b2a06,_0xa3a672)=>{const _0x356bc3=this['_pendingThreads']['find'](_0x17c5dc=>{const _0x4ccd4e=_0x37882d['_threadToController']['get'](_0x17c5dc);return _0x4ccd4e&&_0xa3a672['innerView']===_0x4ccd4e['view'];});if(_0x356bc3){const _0x2a680b=this['_calculatePosition'](_0x356bc3['archivedAt']);this['annotationViews']['add'](_0xa3a672['view'],_0x2a680b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x356bc3),0x1);}}),this['listenTo'](_0x4947f0['archivedThreads'],'remove',(_0x592535,_0x5104c1)=>{const _0x15e8ed=_0x2a7e2a['config']['get']('collaboration.channelId');if(!_0x15e8ed||_0x5104c1['channelId']===_0x15e8ed){if(this['_pendingThreads']['includes'](_0x5104c1))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5104c1),0x1);else{const _0x44e6f7=_0x37882d['_threadToController']['get'](_0x5104c1),_0x3e4488=_0x5b2dc4['getByInnerView'](_0x44e6f7['view']);this['annotationViews']['remove'](_0x3e4488['view']),this['stopListening'](_0x3e4488['focusableElements']);}}}),this['listenTo'](_0x5b2dc4['collection'],'add',(_0x71ae18,_0x3e57e9)=>{this['listenTo'](_0x3e57e9,'escape',_0x348f79);}),this['listenTo'](_0x5b2dc4['collection'],'remove',(_0xb81cd0,_0x5f43a6)=>{this['stopListening'](_0x5f43a6,'escape',_0x348f79);});}['_handleNewThread'](_0x7df8e8){const _0x2c4869=this['editor']['plugins']['get']('CommentsRepository'),_0x1dc295=this['editor']['plugins']['get']('Annotations'),_0x3c17de=this['editor']['config']['get']('collaboration.channelId');if(!_0x3c17de||_0x7df8e8['channelId']===_0x3c17de){const _0x18b321=_0x2c4869['_threadToController']['get'](_0x7df8e8);if(!_0x18b321)return void this['_pendingThreads']['push'](_0x7df8e8);const _0x3668b7=this['_calculatePosition'](_0x7df8e8['archivedAt']),_0x38c82b=_0x1dc295['getByInnerView'](_0x18b321['view']);_0x38c82b['isVisible']&&_0x1dc295['_visibleAnnotations']['remove'](_0x38c82b),this['annotationViews']['add'](_0x38c82b['view'],_0x3668b7);}}['_calculatePosition'](_0x3d316e){const _0x36a54c=this['editor']['config']['get']('collaboration.channelId'),_0x21e979=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x18fc35=>_0x18fc35['channelId']===_0x36a54c)['findIndex'](_0x5276ac=>_0x5276ac['archivedAt']<_0x3d316e);return _0x21e979<0x0||_0x21e979>this['annotationViews']['length']?this['annotationViews']['length']:_0x21e979-0x1;}['_toggleDialog'](){const _0x119bc2=this['editor'],_0x25a58f=_0x119bc2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x119bc2['locale'],this['annotationViews'])),'commentsArchive'===_0x25a58f['id']?_0x25a58f['hide']():_0x25a58f['show']({'id':'commentsArchive','title':N(_0x119bc2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3bc011,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x23317a['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3024c1,_0x3f141f=!0x1){const _0x55147b=this['editor']['locale'],_0x346faf=this['editor']['plugins']['get']('Dialog'),_0x5eee80=new _0x3024c1(_0x55147b);return _0x5eee80['bind']('isEnabled')['to'](this,'isEnabled'),_0x5eee80['bind']('isOn')['to'](_0x346faf,'id',_0x153c27=>'commentsArchive'===_0x153c27),_0x5eee80['set']({'label':N(_0x55147b,'COMMENTS_ARCHIVE'),'icon':_0x3bc011,'isToggleable':!0x0}),_0x3f141f&&(_0x5eee80['tooltip']=!0x0),this['listenTo'](_0x5eee80,'execute',()=>this['_toggleDialog']()),_0x5eee80;}['_hideDialogOnAnnotationEscape']=_0x2ab52b=>{const _0x2aaa52=_0x2ab52b['source'];if(!this['annotationViews']['has'](_0x2aaa52['view']))return;const _0x26a34b=this['editor']['plugins']['get']('Dialog');_0x26a34b['isOpen']&&'commentsArchive'===_0x26a34b['id']&&(_0x26a34b['hide'](),_0x2ab52b['stop']());};}class gi extends _0x1a45c0{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|