@ckeditor/ckeditor5-comments 48.0.0-alpha.9 → 48.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>kt)());constructor(_0x436d57={}){function _0x196782(_0x51466a){return _0x51466a['map'](_0x170c36=>String['fromCharCode'](_0x170c36))['join']('');}(_0x436d57=Object['assign']({},_0x436d57))['plugins']||(_0x436d57['plugins']=Ot['defaultPlugins']),super(_0x436d57),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x196782([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x196782([0x76,0x69,0x65,0x77])][_0x196782([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x196782([0x61,0x75,0x74,0x6f]),this[_0x196782([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x196782([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x196782([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x196782([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x196782([0x6f,0x6b])});}['create'](){const _0x5a454f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5a454f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5e259e=>{const _0x5b57cf=this['model']['document']['getRoot'](),_0x16bb3e=_0x5b57cf&&_0x5b57cf['getChild'](_0x5b57cf['childCount']-0x1);_0x5e259e['setSelection'](_0x16bb3e,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3e4832=this['editing']['view'],_0x48b516=_0x3e4832['document']['getRoot'](),_0x2faee7=_0x48b516['getChild'](0x0);_0x48b516['childCount']>0x1||!_0x2faee7||'p'!=_0x2faee7['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x3e4832,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2faee7['placeholder']=this['placeholder']),ut({'view':_0x3e4832,'element':_0x2faee7,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2faee7);}}class Mt extends _0x73c3b7{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3c0e77,_0x124190={}){super(_0x3c0e77),this['editor']=null,this['_editorConfig']=_0x124190,this['set']('value',_0x124190['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x3c0e77,'Reply...')),this['set']('submitLabel',bt(_0x3c0e77,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x1c3d3e(),this['focusTracker']=new _0x4691cf(),this['focusCycler']=new _0x1962b4({'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',(_0x7e50b0,_0x44e6d9)=>{this['cancelButtonView']['fire']('execute'),_0x44e6d9();}),this['keystrokes']['set']('Ctrl+Enter',(_0xdf4fe5,_0x3a4e1e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3a4e1e());}),this['on']('submit',(_0x11bdb4,_0x566f4b)=>{_0x566f4b['length']>0xfde8?(alert(bt(_0x3c0e77,'TOO_LONG_COMMENT_ALERT',[_0x566f4b['length'],0xfde8])),_0x11bdb4['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x171510=this['editor'];this['element']['insertBefore'](_0x171510['ui']['element'],this['element']['firstChild']),_0x171510['model']['document']['on']('change',()=>this['value']=_0x171510['getData']()),_0x171510['bind']('placeholder')['to'](this),this['focusables']['add'](_0x171510['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x565bb4){-0x1===_0x565bb4?(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:_0x493293}=this,_0x254460=new _0x39c4f7(_0x493293);return _0x254460['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x254460['withText']=!0x0,_0x254460['bind']('label')['to'](this,'submitLabel'),_0x254460['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x254460['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x32e6c9,_0x3df729)=>!_0x3df729&&!!_0x32e6c9['trim']()),_0x254460;}['_createCancelButton'](){const {locale:_0x13a067}=this,_0x365368=new _0x39c4f7(_0x13a067);return _0x365368['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x365368['label']=bt(_0x13a067,'Cancel'),_0x365368['withText']=!0x0,_0x365368['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x365368;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4013b0=>{this['focusTracker']['add'](_0x4013b0['element']);}),this['focusables']['on']('change',(_0x2d44ff,_0x39e58e)=>{for(const _0x4f2aed of Array['from'](_0x39e58e['added'])['reverse']())this['focusTracker']['add'](_0x4f2aed['element']);});}}class Rt extends _0x73c3b7{constructor(_0x32bcd9,_0x4e3c15,_0x47048a){super(_0x32bcd9),this['commentInputView']=new Mt(_0x32bcd9,_0x47048a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2757c3,_0x199f44)=>_0x2757c3||!!_0x199f44),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 _0x350299(_0x32bcd9,_0x4e3c15),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'](_0x400107){this['commentInputView']['focus'](_0x400107);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x386ab6,_0x37ece7)=>{const {submitButtonView:_0x449ccb,cancelButtonView:_0x242af6,editor:_0x2f9607}=this['commentInputView'];[_0x449ccb['element'],_0x242af6['element'],_0x2f9607?_0x2f9607['editing']['view']['getDomRoot']():null]['filter'](_0x56067e=>_0x56067e)['some'](_0x1d8aa9=>_0x1d8aa9['contains'](_0x37ece7['target']))||(this['focus'](),_0x37ece7['preventDefault']());});}}class xt extends _0x73c3b7{constructor(_0x4ebe35){super(_0x4ebe35);const _0x521dcc=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x521dcc['to']('count',_0x38b9e2=>bt(_0x4ebe35,'NUMBER_OF_COMMENTS',_0x38b9e2))}]});}}class St extends _0x73c3b7{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x4e9b59,_0x3f47e9,_0x42ca74){super(_0x4e9b59);const _0x4b6f10=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x3f47e9['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x3f47e9,this['_config']=_0x42ca74,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4691cf(),this['keystrokes']=new _0x1c3d3e(),this['focusCycler']=new _0x1962b4({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1c0c40=>this['commentViews']['map'](_0x4ec484=>_0x4ec484['element'])['includes'](_0x1c0c40['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x4e9b59),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x408449=>_0x408449-this['_config']['maxCommentsWhenCollapsed']);for(const _0x43315c of _0x3f47e9['comments'])this['_handleNewCommentModel'](_0x43315c);this['_handleInfoComment'](),this['listenTo'](_0x3f47e9['comments'],'add',(_0x48d570,_0x1977d9)=>{const _0x51c61c=this['_calculatePosition'](_0x1977d9);this['length']++,this['_handleNewCommentModel'](_0x1977d9,_0x51c61c),this['refreshVisibleViews']();}),this['listenTo'](_0x3f47e9['comments'],'remove',(_0x46dee2,_0x2eda19)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2eda19),this['refreshVisibleViews']();}),this['listenTo'](_0x3f47e9,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x3f47e9,'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',_0x4b6f10['if']('length','ck-hidden',_0x5241c0=>!_0x5241c0)],'aria-label':bt(_0x4e9b59,'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'](_0x3a6d35){-0x1===_0x3a6d35?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x76afa of this['commentViews'])_0x76afa['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1300ed,_0x414f2e){const _0x3e8f0e=new this['_config']['CommentView'](this['locale'],_0x1300ed,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3e8f0e['viewUid']=_0x1300ed['id'],_0x3e8f0e['delegate']('removeComment')['to'](this),_0x3e8f0e['delegate']('updateComment')['to'](this),_0x3e8f0e['delegate']('resolveCommentThread')['to'](this),_0x3e8f0e['delegate']('editorReady')['to'](this),_0x3e8f0e['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3e8f0e,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3e8f0e,_0x414f2e);}['_calculatePosition'](_0x42e417){const _0x1b3174=this['_model']['_findOptimalIndex'](_0x42e417);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x42e417['authoredAt']?_0x1b3174-0x1:_0x1b3174:_0x1b3174-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x22095e={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x22095e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x22095e));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x7b7446){const _0x13e40b=this['commentViews']['remove'](_0x7b7446['id']);this['stopListening'](_0x13e40b),_0x13e40b['isEditMode']&&this['_updateHasDirtyComment'](),_0x13e40b['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x911708=>_0x911708['isEditMode']);}['_rearrangeCollapse'](){const _0x11d9ec=function(_0x52d51b){const _0x153925=new _0x2957ce();for(const _0x5b7fec of _0x52d51b)_0x153925['add'](_0x5b7fec);return _0x153925;}(this['commentViews']),_0x57039c=this['_collapsedCommentsView']['count'];for(let _0xf74e74=0x1;_0xf74e74<=_0x57039c;_0xf74e74++)_0x11d9ec['remove'](0x1);for(const _0x88ee84 of _0x11d9ec)_0x88ee84['collapse']();_0x57039c>0x0&&_0x11d9ec['add'](this['_collapsedCommentsView'],0x1),Pt(_0x1cd6fb(Array['from'](this['visibleViews']),Array['from'](_0x11d9ec)),this['visibleViews'],_0x11d9ec);}['_rearrangeExpand'](){Pt(_0x1cd6fb(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x446db8 of this['visibleViews'])_0x446db8['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x465a4f=>{this['focusTracker']['add'](_0x465a4f['element']),this['keystrokes']['listenTo'](_0x465a4f['element']);}),this['commentViews']['on']('change',(_0x2acea1,_0x121689)=>{for(const _0x53f466 of _0x121689['removed'])this['focusTracker']['remove'](_0x53f466['element']),this['keystrokes']['stopListening'](_0x53f466['element']);for(const _0x102dbd of Array['from'](_0x121689['added'])['reverse']())this['focusTracker']['add'](_0x102dbd['element']),this['keystrokes']['listenTo'](_0x102dbd['element']);});}}function Pt(_0x51788c,_0x1149a8,_0x453029){let _0x57f119=0x0;for(const _0x37a257 of _0x51788c)switch(_0x37a257){case'insert':_0x1149a8['add'](_0x453029['get'](_0x57f119),_0x57f119),_0x57f119++;break;case'delete':_0x1149a8['remove'](_0x57f119);break;case'equal':_0x57f119++;}}class Lt extends _0x73c3b7{constructor(_0x49394f){super(_0x49394f);const _0x1a9aa9=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1a9aa9['to']('contextValue',_0xa18479=>bt(_0x49394f,'THREAD_CONTEXT_LABEL',_0xa18479)),'tabindex':-0x1},'children':[{'text':_0x1a9aa9['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x73c3b7{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x13f009,_0x49779a){super(_0x13f009);const _0x997ae1=this['bindTemplate'];this['_model']=_0x49779a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4691cf(),this['keystrokes']=new _0x1c3d3e(),this['focusCycler']=new _0x1962b4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1b47c7=>!!_0x1b47c7),this['bind']('contextValue')['to'](this['_model'],'context',_0x505dec=>_0x505dec&&_0x505dec['value']?this['_trimContextValue'](_0x505dec['value']):bt(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',_0x997ae1['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 _0x441055=new _0x39c4f7(this['locale']);return _0x441055['label']=bt(this['locale'],'Reopen'),_0x441055['tooltip']=bt(this['locale'],'Reopen'),_0x441055['icon']=_0x4e31f1,_0x441055['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x235043=>!_0x235043),_0x441055['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x197e30,_0x2607a9)=>_0x197e30&&_0x2607a9),_0x441055['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x441055;}['_trimContextValue'](_0x3a61a4){if(_0x3a61a4['length']<0x96)return _0x3a61a4;const _0xee8663=_0x3a61a4['lastIndexOf']('\x20',0x93);return _0x3a61a4['substring'](0x0,_0xee8663>-0x1?_0xee8663:0x93)+'...';}['_attachContextActions'](){const _0x4c1d7b=this['element']['querySelector']('.ck-context'),_0xdfc19a=_0x4c1d7b['querySelector']('.ck-context__value');this['listenTo'](_0x4c1d7b,'mouseenter',()=>{_0xdfc19a['offsetWidth']<_0xdfc19a['scrollWidth']&&_0x4c1d7b['classList']['add']('overlay');}),this['listenTo'](_0x4c1d7b,'mouseleave',()=>{_0x4c1d7b['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2cdb60 of this['focusables'])this['focusTracker']['add'](_0x2cdb60['element']),this['keystrokes']['listenTo'](_0x2cdb60['element']);}['_createContextView'](){const _0x40c7a8=new Lt(this['locale']);return _0x40c7a8['bind']('contextValue')['to'](this),_0x40c7a8;}}class Vt extends _0x73c3b7{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3dbe4a,_0x131da4,_0x3145aa,_0x565a66){super(_0x3dbe4a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x131da4,this['_localUser']=_0x3145aa,this['_config']=_0x565a66,this['commentThreadHeaderView']=new Dt(_0x3dbe4a,_0x131da4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x38d2f7(_0x3dbe4a,bt(_0x3dbe4a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x3dbe4a,_0x131da4,Object['assign']({'CommentView':this['_config']['CommentView']},_0x565a66)),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',(_0x55cbc0,_0x3469aa)=>_0x55cbc0||!!_0x3469aa),this['bind']('isUnlinked')['to'](_0x131da4,'unlinkedAt',_0x394e6e=>!!_0x394e6e),this['bind']('ariaLabel')['to'](this,'length',_0x34a886=>{const _0x2b91e5=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x34a886,_0x2b91e5]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4691cf(),this['keystrokes']=new _0x1c3d3e(),this['focusCycler']=new _0x1962b4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4fa889=>_0x4fa889['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x4bd331(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xbba561=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4965ae=_0xbba561['commentInputView'];return _0xbba561['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4965ae,'value',(_0x1d62ff,_0xea09f2,_0x4f88de,_0x58eb4c,_0x1e32a7)=>!!_0x1e32a7||!!_0x58eb4c&&_0x4f88de&&!_0xea09f2||_0x1d62ff&&_0x4f88de&&!_0xea09f2),_0x4965ae['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x53060a,_0x4c9422,_0x1c19f9)=>{let _0x2a2087;return _0x2a2087=_0x1c19f9&&_0x4c9422?'Reply\x20to\x20reopen\x20discussion...':_0x53060a?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x2a2087);}),_0x4965ae['bind']('submitLabel')['to'](this,'length',_0x52c05c=>bt(this['locale'],_0x52c05c?'Reply':'Comment')),_0x4965ae['on']('submit',(_0x5fd7d4,_0x3bafa4)=>{this['fire']('addComment',_0x3bafa4),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4965ae['on']('cancel',()=>{this['focus']();}),_0x4965ae['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4965ae['on']('cancel',_0x567f67=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x567f67['stop']());}),this['on']('change:isActive',(_0x187446,_0x4bb560,_0x344f34)=>{_0x344f34||this['length']||_0x4965ae['value']||this['fire']('removeCommentThread');}),_0xbba561;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x38d982(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x50cbb5,target:_0x45ed1b,type:_0x39343b,isVisible:_0x26f126=!0x0}){super(),this['view']=_0x50cbb5,this['view']['element']||this['view']['render'](),this['_type']=_0x39343b,this['_target']=_0x45ed1b,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2957ce([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xbd7000,_0x3818de)=>{this['view']['focusTracker']['add'](_0x3818de);}),this['focusableElements']['on']('remove',(_0x37b821,_0x78d0f0)=>{this['view']['focusTracker']['remove'](_0x78d0f0);}),this['set']('isVisible',_0x26f126);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x54bc38=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x54bc38),_0x54bc38;}get['targetRect'](){const _0x529dad=this['target'];if(null===_0x529dad)return null;if(_0x529dad instanceof _0x1419a3)return _0x529dad;const _0xb7bd9=_0x529dad['filter'](_0x4109c7=>function(_0x4d74e2){const _0x975074=_0x4d74e2['offsetParent'];if(_0x975074)return!0x0;const _0x4121d5=_0x4d74e2['getClientRects']()['item'](0x0);return!!_0x4121d5;}(_0x4109c7));return 0x0===_0xb7bd9['length']?null:_0x1419a3['getDomElementRects'](_0xb7bd9[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x51d711){this['view']['isActive']=_0x51d711,this['view']['mainView']['isActive']=_0x51d711;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x55a01b){if(!(null===_0x55a01b||_0x55a01b instanceof _0x1419a3||Array['isArray'](_0x55a01b)&&_0x55a01b['every'](_0x5df444=>Gt(_0x5df444))))throw new _0x4e5896('annotation-invalid-target',null,{'target':_0x55a01b});}['_getNormalizedTarget'](){const _0x4ac904='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x4ac904)?[_0x4ac904]:_0x4ac904;}}function Gt(_0x26f220){return null!==_0x26f220&&'object'==typeof _0x26f220&&'nodeType'in _0x26f220&&0x1===_0x26f220['nodeType'];}class jt extends _0x2957ce{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x28ad32=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4691cf(),this['_focusTracker']['on']('change:isFocused',(_0x2dc93a,_0x1cf8af,_0xd6fed1)=>{_0xd6fed1||this['fire']('blur');});for(const _0x24e0ef of _0x28ad32)this['add'](_0x24e0ef);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2dae5b){if(this['has'](_0x2dae5b))throw new _0x4e5896('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2dae5b['innerView'],_0x2dae5b),this['_viewToAnnotation']['set'](_0x2dae5b['view'],_0x2dae5b);for(const _0x1e0a6c of _0x2dae5b['focusableElements'])this['_focusTracker']['add'](_0x1e0a6c);this['listenTo'](_0x2dae5b['focusableElements'],'add',(_0x2a21f7,_0x2254c6)=>{this['_focusTracker']['add'](_0x2254c6);}),this['listenTo'](_0x2dae5b['focusableElements'],'remove',(_0x37b893,_0x5096a0)=>{this['_focusTracker']['remove'](_0x5096a0);}),this['listenTo'](_0x2dae5b['view']['focusTracker'],'change:isFocused',(_0x627818,_0x3a1933,_0x9d9949)=>{_0x9d9949&&this['fire']('focus',_0x2dae5b);}),_0x2dae5b['updateTargetRect']();const _0x4adf73=this['_getOrderInContent'](_0x2dae5b['view']['targetRect']);return super['add'](_0x2dae5b,_0x4adf73);}['remove'](_0x5c98dc){if(!this['has'](_0x5c98dc))throw new _0x4e5896('annotationcollection-not-existing-item',null);this['stopListening'](_0x5c98dc['view']['focusTracker']),this['stopListening'](_0x5c98dc['focusableElements']);for(const _0x1fcc87 of _0x5c98dc['focusableElements'])this['_focusTracker']['remove'](_0x1fcc87);return this['_viewToAnnotation']['delete'](_0x5c98dc['view']),this['_innerViewToAnnotation']['delete'](_0x5c98dc['innerView']),super['remove'](_0x5c98dc);}['getByInnerView'](_0x2ab831){return this['_innerViewToAnnotation']['get'](_0x2ab831);}['getByView'](_0x523f23){return this['_viewToAnnotation']['get'](_0x523f23);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x57c1b9 of this)_0x57c1b9['updateTargetRect']();this['_sort']();}['_sort'](){const _0x42929c=Array['from'](this)['sort']((_0x256744,_0xdf71b0)=>qt(_0x256744['view']['targetRect'],_0xdf71b0['view']['targetRect']));for(let _0x4b2f28=_0x42929c['length']-0x1;_0x4b2f28>0x0;_0x4b2f28--){const _0xd12968=_0x42929c[_0x4b2f28];_0x4b2f28!==this['getIndex'](_0xd12968)&&(this['remove'](_0xd12968),this['add'](_0xd12968));}}['_getOrderInContent'](_0x11d499){let _0x536b90=0x0;if(!_0x11d499)return this['length'];for(const _0x1ddd4b of this){const _0x53718d=_0x1ddd4b['view']['targetRect'];if(_0x53718d){if(qt(_0x11d499,_0x53718d)<0x0)return _0x536b90;_0x536b90++;}}return _0x536b90;}}function Xt({source:_0x17fafb,target:_0x341de4,filter:_0x57bb5d}){for(const _0x3a0b1c of _0x17fafb)_0x57bb5d(_0x3a0b1c)&&_0x341de4['add'](_0x3a0b1c);_0x341de4['listenTo'](_0x17fafb,'add',(_0x2914a1,_0x24db99)=>{_0x57bb5d(_0x24db99)&&_0x341de4['add'](_0x24db99);}),_0x341de4['listenTo'](_0x17fafb,'remove',(_0xd04f3b,_0x21a41c)=>{_0x341de4['has'](_0x21a41c)&&_0x341de4['remove'](_0x21a41c);});}function qt(_0x2db7d4,_0x2b1a23){if(null===_0x2db7d4&&null===_0x2b1a23)return 0x0;if(null===_0x2db7d4)return-0x1;if(null===_0x2b1a23)return 0x1;const _0x1ea908=_0x2db7d4['top']-_0x2b1a23['top'];return 0x0==_0x1ea908?_0x2db7d4['left']-_0x2b1a23['left']:_0x1ea908;}class $t extends _0x5f30da{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x212548){if(super(_0x212548),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x212548 instanceof _0x2d5d5b){const _0x2176cb=_0x212548['locale'];_0x212548['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4f575e){this['collection']['add'](_0x4f575e);}['remove'](_0x14fc4b){this['collection']['remove'](_0x14fc4b),_0x14fc4b['destroy']();}['refreshVisibility'](){for(const _0x164078 of this['collection'])_0x164078['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x25e640){return this['collection']['getByInnerView'](_0x25e640);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x157515 of this['collection'])_0x157515['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x13611a){this['fire']('_activateAnnotation',_0x13611a);}['createAnnotation'](_0x46d7f8){return new Yt(_0x46d7f8);}['createAnnotationView'](_0x184d6a,_0x20e3d9){return new Kt(_0x184d6a,_0x20e3d9);}['_addActiveAnnotation'](_0x347d13){const _0xb03579=new Set(this['activeAnnotations']);_0xb03579['add'](_0x347d13),this['activeAnnotations']=_0xb03579;}['_removeActiveAnnotation'](_0xc234c){const _0x4997f8=new Set(this['activeAnnotations']);_0x4997f8['delete'](_0xc234c),this['activeAnnotations']=_0x4997f8;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3c9421=this['collection'],_0x55a92e=this['_visibleAnnotations'];function _0x11ae35(_0x1032e8){const _0x3dfae0=_0x1032e8['source'];_0x3dfae0['isVisible']&&!_0x55a92e['has'](_0x3dfae0)?_0x55a92e['add'](_0x3dfae0):!_0x3dfae0['isVisible']&&_0x55a92e['has'](_0x3dfae0)&&_0x55a92e['remove'](_0x3dfae0),_0x3dfae0['view']['focusTracker']['remove'](_0x3dfae0['view']['element']),_0x3dfae0['view']['focusTracker']['add'](_0x3dfae0['view']['element']);}this['listenTo'](_0x3c9421,'add',(_0x1bb7ca,_0xd47d69)=>{_0xd47d69['isVisible']&&_0x55a92e['add'](_0xd47d69),this['listenTo'](_0xd47d69,'change:isVisible',_0x11ae35);}),this['listenTo'](_0x3c9421,'remove',(_0x3b597d,_0x5c0f08)=>{_0x55a92e['has'](_0x5c0f08)&&_0x55a92e['remove'](_0x5c0f08),this['stopListening'](_0x5c0f08,'change:isVisible',_0x11ae35);});}['_setupEnterAnnotationKeystroke'](){const _0x17e4af=_0x25a8f3=>{_0x25a8f3['on']('ready',()=>{_0x25a8f3['keystrokes']['set'](_0x29748d,(_0x179237,_0x57a080)=>{const _0x27bd02=_0x51babc(this['activeAnnotations']['values']());_0x27bd02&&(_0x27bd02['view']['focus'](),_0x57a080());});});};this['context']instanceof _0x2d5d5b?_0x17e4af(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x47ae47,_0xb0d175)=>{_0x17e4af(_0xb0d175);});}['_setupEscapeAnnotationHandling'](){const _0x5a0783=_0x4cd699=>{const _0x51bb5b=_0x4cd699['source'],_0x135328=[];let _0x41e2dd;if(Array['isArray'](_0x51bb5b['target'])){_0x41e2dd=_0x51bb5b['target'][0x0],this['context']instanceof _0x2d5d5b?_0x135328['push'](this['context']):this['context']['editors']&&_0x135328['push'](...this['context']['editors']);for(const _0x23136c of _0x135328)for(const _0x52d479 of _0x23136c['editing']['view']['domRoots']['values']())if(_0x52d479['contains'](_0x41e2dd))return void _0x23136c['editing']['view']['focus']();_0x41e2dd['focus']();}};this['listenTo'](this['collection'],'add',(_0x4ddce7,_0xb08845)=>{this['listenTo'](_0xb08845,'escape',_0x5a0783,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x358833,_0x25e71a)=>{this['stopListening'](_0x25e71a,'escape',_0x5a0783);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x5f30da{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x4cca70,_0x15a349];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe0e829){super(_0xe0e829),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5958cc=this['context']['config'];_0x5958cc['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5958cc['define']('comments.maxThreadTotalWeight',0x1f4),_0x5958cc['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5958cc['define']('comments.CommentThreadView',Bt),_0x5958cc['define']('comments.CommentView',Ut),_0x5958cc['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x285ae8=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x401103,_0x2a9f24)=>this['_addCommentThread'](_0x2a9f24)),this['on']('submitCommentThread',(_0x45535e,_0x56d0a1)=>this['_submitCommentThread'](_0x56d0a1)),this['on']('resolveCommentThread',(_0x4fa29a,_0x326632)=>this['_resolveCommentThread'](_0x326632)),this['on']('resolveCommentThread',(_0x1a06a7,_0x337b7c)=>this['_updateActiveAnnotation'](_0x337b7c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3396f1,_0x248c28)=>this['_reopenCommentThread'](_0x248c28)),this['on']('reopenCommentThread',(_0x21ed71,_0x5ae5e8)=>this['_updateActiveAnnotation'](_0x5ae5e8),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x6ab806,_0x5b974e)=>this['_removeCommentThread'](_0x5b974e)),this['on']('updateCommentThread',(_0x2be3eb,_0x2c8979)=>this['_updateCommentThread'](_0x2c8979)),this['on']('updateCommentThread',(_0x158380,_0x236459)=>this['_updateActiveAnnotation'](_0x236459),{'priority':'lowest'}),this['on']('addComment',(_0x54484f,_0x283566)=>this['_addComment'](_0x283566)),this['on']('updateComment',(_0x303c9d,_0x26e631)=>this['_updateComment'](_0x26e631)),this['on']('removeComment',(_0x4ea57a,_0x5c87a4)=>this['_removeComment'](_0x5c87a4)),this['on']('addComment',(_0x45bbe6,{threadId:_0x5e7d23,isFromAdapter:_0x4ba499})=>{if(_0x4ba499)return;const _0x3ae368=this['getCommentThread'](_0x5e7d23),_0x34fda1=_0x3ae368&&this['_threadToController']['get'](_0x3ae368);_0x34fda1&&_0x34fda1['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x285ae8,'change:activeAnnotations',(_0x32702a,_0x42bd23,_0x2f3033)=>{const _0x42f17b=Array['from'](_0x2f3033)['map'](_0x2b8b38=>this['_viewToController']['get'](_0x2b8b38['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x42f17b?_0x42f17b['model']:null;});}set['adapter'](_0xa17544){if(this['_adapter'])throw new _0x4e5896('commentsrepository-adapter-already-set');this['_adapter']=_0xa17544;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5e5cf5=zt,threadId:_0x345e01=_0x4c898f(),comments:_0x110c1a=[],unlinkedAt:_0x32a8fa=null,resolvedAt:_0x57a1bf=null,resolvedBy:_0x31a906=null,target:_0x32e8ce=null,context:_0x55072f=null,attributes:_0x364c6e={},isResolvable:_0x4c9d4d=!0x0,isSubmitted:_0x2a677f=!0x1,isFromAdapter:_0x12083d=!0x1}={}){return this['fire'](ii('addCommentThread',_0x5e5cf5),{'channelId':_0x5e5cf5,'threadId':_0x345e01,'comments':_0x110c1a,'unlinkedAt':_0x32a8fa,'resolvedAt':_0x57a1bf,'resolvedBy':_0x31a906,'target':_0x32e8ce,'context':_0x55072f,'attributes':_0x364c6e,'isFromAdapter':_0x12083d,'isResolvable':_0x4c9d4d,'isSubmitted':_0x2a677f}),this['getCommentThread'](_0x345e01);}['openNewCommentThread']({channelId:_0x45f324=zt,threadId:_0x489ea8=_0x4c898f(),target:_0x5c7945,context:_0x3194e1=null,isResolvable:_0x1eb349=!0x0}){if(this['_readOnlyChannels']['has'](_0x45f324)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5c7945)throw new _0x4e5896('commentsrepository-missing-target');const _0x15eeae=this['addCommentThread']({'channelId':_0x45f324,'threadId':_0x489ea8,'target':_0x5c7945,'context':_0x3194e1,'isResolvable':_0x1eb349});if(!_0x15eeae)return null;const _0x4777e5=this['_threadToController']['get'](_0x15eeae),_0xc62d2c=_0x4777e5['view']['commentThreadInputView']['commentInputView'],_0xa536=this['context']['plugins']['get']($t),_0x43b387=_0xa536['getByInnerView'](_0x4777e5['view']);return _0xa536['activate'](_0x43b387),_0xc62d2c['once']('editorReady',()=>_0xc62d2c['focus']()),_0x15eeae;}['hasCommentThread'](_0x481677){if('string'!=typeof _0x481677)throw new _0x4e5896('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x481677);}['updateCommentThread']({channelId:_0x4dd77f=zt,threadId:_0x445c86,context:_0xbf8d9,unlinkedAt:_0x4b7bb8,attributes:_0x190c4c,isFromAdapter:_0x13dd85=!0x1}){return this['fire'](ii('updateCommentThread',_0x4dd77f),{'channelId':_0x4dd77f,'threadId':_0x445c86,'context':_0xbf8d9,'unlinkedAt':_0x4b7bb8,'attributes':_0x190c4c,'isFromAdapter':_0x13dd85}),this['getCommentThread'](_0x445c86);}['getCommentThread'](_0x1e8576){if('string'!=typeof _0x1e8576)throw new _0x4e5896('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1e8576);}['fetchCommentThread']({channelId:_0x2e6492,threadId:_0x5e6605}={}){const _0x4c7261=this['getCommentThread'](_0x5e6605);if(_0x4c7261)return Promise['resolve'](_0x4c7261);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4e5896('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2e6492,'threadId':_0x5e6605})['then'](_0x586ff1=>this['hasCommentThread'](_0x5e6605)?this['getCommentThread'](_0x5e6605):_0x586ff1?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2e6492},_0x586ff1)):void 0x0)['catch'](_0x59ee35=>{throw console['error'](_0x59ee35),new _0x4e5896('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2c5d6d,skipNotAttached:_0x3f9514=!0x1,skipEmpty:_0x2736d3=!0x1,toJSON:_0x55c6e1=!0x1}={}){const _0x99a238=[];for(const _0x5c04f9 of this['_threads']['values']())_0x2c5d6d&&_0x5c04f9['channelId']!==_0x2c5d6d||_0x3f9514&&!_0x5c04f9['isAttached']||_0x2736d3&&0x0===_0x5c04f9['length']||_0x99a238['push'](_0x5c04f9);return _0x55c6e1?_0x99a238['map'](_0x162aa9=>_0x162aa9['toJSON']()):_0x99a238;}['getAnnotationForCommentThread'](_0x57f32d){const _0x532a9f=this['_threadToController']['get'](_0x57f32d);if(!_0x532a9f)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x532a9f['view'])||null;}['getCommentThreadForAnnotation'](_0x339c8e){const _0x2573f7=this['_viewToController']['get'](_0x339c8e['innerView']);return _0x2573f7?_0x2573f7['model']:null;}['setActiveCommentThread'](_0x81a801){const _0x43be30=this['context']['plugins']['get']($t);if(!_0x81a801)return void(this['activeCommentThread']&&_0x43be30['deactivateAll']());const _0x37ebf7=this['getCommentThread'](_0x81a801);if(!_0x37ebf7)throw new _0x4e5896('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x81a801});if(!this['_threadToController']['has'](_0x37ebf7))throw new _0x4e5896('commentsrepository-active-not-attached',null,{'threadId':_0x81a801});const _0x1894f2=_0x43be30['getByInnerView'](this['_threadToController']['get'](_0x37ebf7)['view']);_0x43be30['activate'](_0x1894f2);}['switchReadOnly'](_0x1faf32,_0x43935a){_0x1faf32?this['_readOnlyChannels']['add'](_0x43935a):this['_readOnlyChannels']['delete'](_0x43935a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xf8da03){return this['_readOnlyChannels']['has'](_0xf8da03)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x318d3d,_0x20e7ba){return new It(_0x318d3d,_0x20e7ba);}['setPermissions'](_0x50bdce,_0x3610af=zt){this['_permissions']['set'](_0x3610af,_0x50bdce),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x184d25=zt){return this['_permissions']['has'](_0x184d25)?this['_permissions']['get'](_0x184d25):Jt;}['_addCommentThread']({channelId:_0x16550a,threadId:_0x196d07,comments:_0x57ccdb,unlinkedAt:_0x1feecf,resolvedAt:_0x2eac2f,resolvedBy:_0x20005a,target:_0x3b5b62,context:_0x1ee3b1,attributes:_0x1fb5db,isFromAdapter:_0x462b45,isResolvable:_0x493552,isSubmitted:_0x1892d5}){if('string'!=typeof _0x196d07)throw new _0x4e5896('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x196d07});if(this['hasCommentThread'](_0x196d07))throw new _0x4e5896('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x196d07});const _0x19dcc9=new Zt(this,{'channelId':_0x16550a,'id':_0x196d07,'context':_0x1ee3b1,'attributes':_0x1fb5db,'unlinkedAt':_0x1feecf,'resolvedAt':_0x2eac2f,'resolvedBy':_0x20005a?this['context']['plugins']['get'](_0x15a349)['getUser'](_0x20005a):null,'isResolvable':_0x493552,'isSubmitted':_0x1892d5||_0x462b45});this['_threads']['set'](_0x196d07,_0x19dcc9);for(const _0x331005 of _0x57ccdb)_0x19dcc9['_add'](this['_createNewComment']({'threadId':_0x196d07,..._0x331005}));return _0x3b5b62&&_0x19dcc9['attachTo'](_0x3b5b62),_0x462b45||!_0x19dcc9['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x16550a,'threadId':_0x196d07});}['_submitCommentThread']({channelId:_0x5d9d61,threadId:_0x497744}){if(!this['hasCommentThread'](_0x497744))throw new _0x4e5896('commentsrepository-missing-comment-thread',this);const _0x1675f9=this['getCommentThread'](_0x497744);if(_0x1675f9['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x7bb5a6,comments:_0x4d4d50,resolvedAt:_0x50e872,resolvedBy:_0x1ef164,context:_0x3236ef,attributes:_0x113b64}=_0x1675f9,_0x4d3225=this['context']['plugins']['get']('PendingActions'),_0x17f07d=_0x4d3225['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5d9d61,'threadId':_0x7bb5a6,'comments':_0x4d4d50['map'](_0x24a573=>_0x24a573['toJSON']()),'resolvedAt':_0x50e872,'resolvedBy':_0x1ef164?_0x1ef164['id']:_0x1ef164,'context':_0x3236ef,'attributes':_0x113b64})['then'](({comments:_0x2d0d33})=>{_0x4d3225['remove'](_0x17f07d);for(const _0x422d51 of _0x2d0d33)this['_updateComment']({'channelId':_0x5d9d61,'threadId':_0x497744,'commentId':_0x422d51['commentId'],'createdAt':_0x422d51['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x27b01c=>{throw console['error'](_0x27b01c),new _0x4e5896('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x295550,target:_0x288293}){const _0x2ef7e1=this['getCommentThread'](_0x295550);if(!_0x2ef7e1)throw new _0x4e5896('commentsrepository-attach-missing-comment-thread',this);const _0x3cb8d4=this['context']['plugins']['get']('PendingActions'),_0x177d7b=this['context']['plugins']['get']($t),_0x5bd229=this['_createCommentThreadView'](_0x2ef7e1),_0x368704=new It(_0x2ef7e1,_0x5bd229);let _0x2c5846=null;_0x5bd229['on']('change:isDirty',(_0x4286dd,_0x4a6daa,_0x25c7df)=>{_0x25c7df?_0x2c5846=_0x3cb8d4['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2c5846&&(_0x3cb8d4['remove'](_0x2c5846),_0x2c5846=null);}),this['_threadToController']['set'](_0x2ef7e1,_0x368704),this['_viewToController']['set'](_0x5bd229,_0x368704);const _0x40a800=new Kt(this['context']['locale'],_0x5bd229);_0x40a800['bind']('length')['to'](_0x5bd229),_0x40a800['bind']('isDirty')['to'](_0x5bd229,'isDirty',_0x5bd229,'length',(_0x58a2d1,_0x4b3147)=>_0x58a2d1||!_0x4b3147),_0x40a800['bind']('isActive')['to'](_0x5bd229),_0x40a800['type']='comment';const _0x38c93b=new Yt({'view':_0x40a800,'target':_0x288293,'type':'comment','isVisible':!_0x2ef7e1['archivedAt']&&!!('function'==typeof _0x288293?_0x288293():_0x288293)});return _0x5bd229['on']('escape',()=>{_0x38c93b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5bd229,_0x38c93b),_0x177d7b['add'](_0x38c93b),_0x38c93b;}['_bindAnnotationToEditors'](_0x556999,_0x105256){this['listenTo'](_0x556999,'editorReady',(_0xf761f6,_0x2d1dc2)=>{const _0x5e57a8=_0x2d1dc2['ui']['view']['body']['bodyCollectionContainer'];_0x105256['focusableElements']['add'](_0x5e57a8),this['context']instanceof _0x2d5d5b&&this['context']['ui']['focusTracker']['add'](_0x5e57a8);},{'priority':'highest'}),this['listenTo'](_0x556999,'editorDestroyed',(_0x3e86ba,_0x54553e)=>{const _0x40c2b9=_0x54553e['ui']['view']['body']['bodyCollectionContainer'];_0x105256['focusableElements']['has'](_0x40c2b9)&&_0x105256['focusableElements']['remove'](_0x40c2b9),this['context']instanceof _0x2d5d5b&&this['context']['ui']['focusTracker']['remove'](_0x40c2b9);});}['_unbindEditors'](_0x26e638){this['stopListening'](_0x26e638,'editorReady'),this['stopListening'](_0x26e638,'editorDestroyed');}['_createCommentThreadView'](_0x588bf0){const _0x3de4df=this['context']['plugins']['get'](_0x15a349),{config:_0x416a61,locale:_0x361952}=this['context'],_0x2081cd=_0x2c3507(_0x416a61['get']('locale'),_0x361952);return new(0x0,(_0x416a61['get']('comments'))['CommentThreadView'])(_0x361952,_0x588bf0,_0x3de4df['me'],{'editorConfig':{..._0x416a61['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x416a61['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x416a61['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x416a61['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x416a61['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2081cd,'CommentView':_0x416a61['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x34e8c0,channelId:_0x3d8d3a,resolvedAt:_0x4618c8,resolvedBy:_0x2fbc81,isFromAdapter:_0xbea26f}){if(!this['hasCommentThread'](_0x34e8c0))throw new _0x4e5896('commentsrepository-missing-comment-thread',null,{'threadId':_0x34e8c0});const _0x58590d=this['getCommentThread'](_0x34e8c0);if(_0x58590d['isResolved'])throw new _0x4e5896('commentsrepository-resolved-comment-thread',null,{'threadId':_0x34e8c0});const _0x4f19cc=this['context']['plugins']['get'](_0x15a349);if(_0x58590d['resolvedBy']=_0x4f19cc['getUser'](_0x2fbc81),_0x58590d['resolvedAt']=_0x4618c8,_0xbea26f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x44edb9=this['context']['plugins']['get']('PendingActions'),_0x1730fe=_0x44edb9['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3d8d3a,'threadId':_0x34e8c0})['then'](({resolvedAt:_0x24a5b3,resolvedBy:_0x2bdcfa})=>{_0x44edb9['remove'](_0x1730fe),_0x58590d['resolvedBy']['id']!==_0x2bdcfa&&(_0x58590d['resolvedBy']=_0x4f19cc['getUser'](_0x2bdcfa)),_0x58590d['resolvedAt']=_0x24a5b3;})['catch'](_0x5ef80d=>{throw console['error'](_0x5ef80d),new _0x4e5896('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x36147d,channelId:_0x38d5b1,isFromAdapter:_0x1344cb}){if(!this['hasCommentThread'](_0x36147d))throw new _0x4e5896('commentsrepository-missing-comment-thread',null,{'threadId':_0x36147d});const _0x45df14=this['getCommentThread'](_0x36147d);if(!_0x45df14['isResolved'])throw new _0x4e5896('commentsrepository-reopen-comment-thread',null,{'threadId':_0x36147d});if(_0x45df14['resolvedBy']=null,_0x45df14['resolvedAt']=null,_0x1344cb||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5b9932=this['context']['plugins']['get']('PendingActions'),_0x4db8be=_0x5b9932['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x38d5b1,'threadId':_0x36147d})['then'](()=>_0x5b9932['remove'](_0x4db8be))['catch'](_0x1afe33=>{throw console['error'](_0x1afe33),new _0x4e5896('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x329dc8,isFromAdapter:_0x39a786}){const _0x3ba969=this['getCommentThread'](_0x329dc8);if(!_0x3ba969)throw new _0x4e5896('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x329dc8),this['_threads']['delete'](_0x329dc8),!_0x3ba969['isSubmitted']||_0x39a786||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4c297a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3abfb8}=_0x3ba969,_0x39274f=_0x4c297a['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3abfb8,'threadId':_0x329dc8})['then'](()=>_0x4c297a['remove'](_0x39274f))['catch'](_0x5646ff=>{throw console['error'](_0x5646ff),new _0x4e5896('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x464570,unlinkedAt:_0x26b362,context:_0x4e790f,attributes:_0x51c243,isFromAdapter:_0x148cb0}){if('string'!=typeof _0x464570)throw new _0x4e5896('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x464570});if(!this['hasCommentThread'](_0x464570))throw new _0x4e5896('commentsrepository-missing-comment-thread',null,{'threadId':_0x464570});const _0x5ae6f7=this['getCommentThread'](_0x464570);let _0x32f6eb=!0x1;if(void 0x0!==_0x4e790f&&_0x5ae6f7['context']!==_0x4e790f&&(_0x5ae6f7['context']=_0x4e790f,_0x32f6eb=!0x0),void 0x0!==_0x26b362&&_0x5ae6f7['unlinkedAt']!==_0x26b362&&(_0x5ae6f7['unlinkedAt']=_0x26b362,_0x32f6eb=!0x0),_0x51c243&&!_0x3bf914(_0x51c243,_0x5ae6f7['attributes'])&&(_0x5ae6f7['attributes']=_0x51c243,_0x32f6eb=!0x0),!_0x32f6eb)return Promise['resolve']();if(!_0x5ae6f7['isSubmitted']||_0x148cb0||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x37286d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x277b5f}=_0x5ae6f7,_0x240daa=_0x37286d['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x277b5f,'threadId':_0x464570,'context':_0x4e790f,'unlinkedAt':_0x26b362,'attributes':_0x51c243})['then'](()=>_0x37286d['remove'](_0x240daa))['catch'](_0x58466c=>{throw console['error'](_0x58466c),new _0x4e5896('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x34a3fc){const _0x1d786c=this['context']['plugins']['get']($t),_0x4ffb1a=this['getCommentThread'](_0x34a3fc);if(_0x4ffb1a['_isAttached']=!0x1,this['_threadToController']['has'](_0x4ffb1a)){const _0xb7d1fe=this['_threadToController']['get'](_0x4ffb1a),_0x150454=_0xb7d1fe['view'],_0x35bd78=_0x1d786c['getByInnerView'](_0x150454);this['_threadToController']['delete'](_0x4ffb1a),this['_viewToController']['delete'](_0x150454),_0x35bd78&&_0x1d786c['remove'](_0x35bd78),_0xb7d1fe['destroy'](),_0x150454['destroy']()['then'](()=>{this['_unbindEditors'](_0x150454);});}}['_updateActiveAnnotation']({threadId:_0x4ebc7f,resolvedAt:_0x236090,unlinkedAt:_0x1d28a9}){const _0x50b480=!!_0x236090,_0x35ab18=this['context']['plugins']['get']($t),_0x3d7f01=this['getCommentThread'](_0x4ebc7f);if(this['_threadToController']['has'](_0x3d7f01)){const _0x56ac6a=this['_threadToController']['get'](_0x3d7f01)['view'],_0x5a1c87=_0x35ab18['getByInnerView'](_0x56ac6a);_0x5a1c87&&(_0x50b480&&_0x35ab18['_removeActiveAnnotation'](_0x5a1c87),_0x1d28a9?_0x5a1c87['isVisible']=!0x1:_0x5a1c87['refreshVisibility']());}}['_getExternalAuthor'](_0x5bd45d){const _0x13df88=this['context']['plugins']['get'](_0x15a349),_0x2ed9bf=_0x2c486f('external:'+_0x5bd45d),_0x6e2835=_0x13df88['getUser'](_0x2ed9bf);return _0x6e2835||_0x13df88['addUser']({'id':_0x2ed9bf,'name':_0x5bd45d});}['_createNewComment']({threadId:_0x295b72,commentId:_0xa335db=_0x4c898f(),content:_0x273a38,authorId:_0x4cf348,createdAt:_0x459418,attributes:_0x1be9c8}){if('string'!=typeof _0xa335db)throw new _0x4e5896('commentsrepository-invalid-commentid');if('string'!=typeof _0x4cf348)throw new _0x4e5896('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x273a38||!_0x273a38['trim']())throw new _0x4e5896('commentsrepository-invalid-comment-content');const _0xd0baf6=this['context']['plugins']['get'](_0x15a349)['getUser'](_0x4cf348);if(!_0xd0baf6)throw new _0x4e5896('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4cf348});let _0x213842=null,_0x17c5bd=_0x459418;return _0x1be9c8?.['@external']&&(_0x213842=this['_getExternalAuthor'](_0x1be9c8['@external']['authorName']),_0x17c5bd=new Date(_0x1be9c8['@external']['createdAt'])),new ti(this,{'threadId':_0x295b72,'id':_0xa335db,'author':_0x213842||_0xd0baf6,'creator':_0xd0baf6,'content':_0x273a38,'createdAt':_0x459418,'authoredAt':_0x17c5bd,'attributes':_0x1be9c8});}['_addComment'](_0x23ce01){let {threadId:_0x25198a,content:_0x136824,attributes:_0x3726bf,isFromAdapter:_0x151bf2}=_0x23ce01;const _0x2f533a=this['getCommentThread'](_0x23ce01['threadId']);if(!_0x2f533a)throw new _0x4e5896('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x471a4d=this['_createNewComment'](_0x23ce01),{id:_0x3fd109}=_0x471a4d;if(_0x2f533a['_add'](_0x471a4d),_0x151bf2||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2f533a['isSubmitted'])return Promise['resolve']();const _0x5f52d7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2e7e2d}=_0x2f533a,_0x4baa0a=_0x5f52d7['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3726bf||(_0x3726bf={}),this['adapter']['addComment']({'channelId':_0x2e7e2d,'threadId':_0x25198a,'commentId':_0x3fd109,'content':_0x136824,'attributes':_0x3726bf})['then'](_0x4a3a46=>{_0x5f52d7['remove'](_0x4baa0a),_0x4a3a46&&this['_updateComment']({'channelId':_0x2e7e2d,'threadId':_0x25198a,'commentId':_0x3fd109,'createdAt':_0x4a3a46['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x23a67e=>{throw console['error'](_0x23a67e),new _0x4e5896('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4d6eb6,commentId:_0x179167,content:_0x36d147,createdAt:_0x26b51d,attributes:_0x53ee82,isFromAdapter:_0x1f282d}){if(void 0x0!==_0x36d147&&('string'!=typeof _0x36d147||!_0x36d147['trim']()['length']))throw new _0x4e5896('commentsrepository-update-comment-invalid-content');const _0x1cfa82=this['getCommentThread'](_0x4d6eb6),_0x1a9549=_0x1cfa82['getComment'](_0x179167);if(!_0x1a9549)throw new _0x4e5896('commentsrepository-update-missing-comment',this);let _0x38dbbc=!0x1;if(_0x36d147&&_0x36d147!==_0x1a9549['content']&&(_0x1a9549['isEditable']||_0x1f282d)&&(_0x1a9549['content']=_0x36d147,_0x38dbbc=!0x0),_0x26b51d&&_0x26b51d!==_0x1a9549['createdAt']&&(_0x1a9549['createdAt']=_0x26b51d,_0x1a9549['attributes']&&_0x1a9549['attributes']['@external']||(_0x1a9549['authoredAt']=_0x26b51d),_0x38dbbc=!0x0),_0x53ee82&&!_0x3bf914(_0x53ee82,_0x1a9549['attributes'])&&(_0x1a9549['attributes']=_0x53ee82,_0x38dbbc=!0x0),!_0x38dbbc)return Promise['resolve']();if(_0x1cfa82['fire']('commentUpdated'),_0x1f282d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x38ac9d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x542232}=this['getCommentThread'](_0x1a9549['threadId']),_0x3d78fd=_0x38ac9d['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x542232,'threadId':_0x4d6eb6,'commentId':_0x179167,'content':_0x36d147,'attributes':_0x53ee82})['then'](()=>_0x38ac9d['remove'](_0x3d78fd))['catch'](_0x55c0f8=>{throw console['error'](_0x55c0f8),new _0x4e5896('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x4809dd,commentId:_0x3a1b10,isFromAdapter:_0x352e78}){const _0x1c3a62=this['getCommentThread'](_0x4809dd),_0x407e64=_0x1c3a62['getComment'](_0x3a1b10);if(!_0x407e64)throw new _0x4e5896('commentsrepository-remove-missing-comment',this);if(_0x1c3a62['_remove'](_0x407e64),_0x352e78||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x30ba32=this['context']['plugins']['get']('PendingActions'),{channelId:_0x235ae8}=_0x1c3a62,_0x5cc75d=_0x30ba32['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x235ae8,'threadId':_0x4809dd,'commentId':_0x3a1b10})['then'](()=>_0x30ba32['remove'](_0x5cc75d))['catch'](_0x393a97=>{throw console['error'](_0x393a97),new _0x4e5896('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x38d982(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1268e7,_0x5eaf5a){super();const _0x4e4d27=_0x1268e7['context']['plugins']['get'](_0x15a349)['me'],_0x3f34ad=_0x1268e7['getCommentThread'](_0x5eaf5a['threadId']),_0x341c5e=0x0===_0x3f34ad['comments']['length'],_0x53e935=_0x4e4d27===_0x5eaf5a['author'];this['id']=_0x5eaf5a['id'],this['threadId']=_0x5eaf5a['threadId'],this['author']=_0x5eaf5a['author'],this['creator']=_0x5eaf5a['creator'],this['isExternal']=Boolean(_0x5eaf5a['attributes']&&_0x5eaf5a['attributes']['@external']),this['set']('content',_0x5eaf5a['content']),this['createdAt']=_0x5eaf5a['createdAt']||new Date(),this['set']('authoredAt',_0x5eaf5a['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3f34ad,'resolvedAt'),this['set']('attributes',_0x5eaf5a['attributes']||{}),this['bind']('isEditable')['to'](_0x1268e7,'_permissions',()=>{const _0x1d0e7b=_0x1268e7['getPermissions'](_0x3f34ad['channelId'])['write'],_0xf98db7=_0x1268e7['getPermissions'](_0x3f34ad['channelId'])['modifyAll'];return _0x53e935&&_0x1d0e7b||!_0x53e935&&_0xf98db7;}),this['bind']('isRemovable')['to'](_0x3f34ad,'isRemovable',_0x1268e7,'_permissions',_0x42c46e=>{const _0x1ae820=_0x1268e7['getPermissions'](_0x3f34ad['channelId'])['write'],_0x5157f8=_0x1268e7['getPermissions'](_0x3f34ad['channelId'])['modifyAll'];return _0x53e935&&_0x1ae820||_0x42c46e&&_0x341c5e||!_0x53e935&&_0x5157f8&&!_0x341c5e;}),this['bind']('isReadOnly')['to'](_0x3f34ad,'isReadOnly'),this['_repository']=_0x1268e7;}get['weight'](){return Math['max'](function(_0x54e5a8){const _0x240d68=document['createElement']('div');return _0x240d68['innerHTML']=_0x54e5a8,_0x240d68['textContent']['length'];}(this['content']),0xc8);}['update'](_0x32dc9a){const {threadId:_0x4b0896,id:_0x29a854}=this;if(!this['_repository']['hasCommentThread'](_0x4b0896))throw new _0x4e5896('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3a52bc}=this['_repository']['getCommentThread'](_0x4b0896);this['_repository']['fire'](ii('updateComment',_0x3a52bc,_0x4b0896),{'channelId':_0x3a52bc,'threadId':_0x4b0896,'commentId':_0x29a854,..._0x32dc9a});}['setAttribute'](_0x1c3f7e,_0x94a930){const _0x154d99=_0x1be07f(this['attributes']);_0x26a330(_0x154d99,_0x1c3f7e,_0x94a930),this['update']({'attributes':_0x154d99});}['removeAttribute'](_0x30dd72){const _0x5102d4=_0x1be07f(this['attributes']);_0x32c716(_0x5102d4,_0x30dd72),this['update']({'attributes':_0x5102d4});}['remove'](_0x1d24c0={}){if(!_0x1d24c0['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x545302,id:_0x551648}=this;if(!this['_repository']['hasCommentThread'](_0x545302))throw new _0x4e5896('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x16b639}=this['_repository']['getCommentThread'](_0x545302);this['_repository']['fire'](ii('removeComment',_0x16b639,_0x545302),{'channelId':_0x16b639,'threadId':_0x545302,'commentId':_0x551648,..._0x1d24c0});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x3c80fc,..._0xb26e64){for(const _0x59a5f7 of _0xb26e64)void 0x0!==_0x59a5f7&&(_0x3c80fc+=':'+String(_0x59a5f7));return _0x3c80fc;}class ei extends _0x5d7909{constructor(_0x130997){super(_0x130997),this['set']('hasContent',!0x1);}['refresh'](){const _0x15ac1b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x40d515 of _0x15ac1b['getRanges']())if(this['_hasContent'](_0x40d515))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x407267=_0x4c898f(),ranges:_0x1bf560,comment:_0x1cd85c}={}){const _0x2872f5=this['editor']['model'],_0x2963a6=_0x1bf560??Array['from'](_0x2872f5['document']['selection']['getRanges']()),_0x330842=[];for(const _0x318d9b of _0x2963a6)this['_hasContent'](_0x318d9b)&&_0x330842['push'](this['_trimToContent'](_0x318d9b));if(!_0x330842['length'])throw new _0x4e5896('addcommentthreadcommand-incorrect-ranges',null);_0x1cd85c&&this['_createCommentThread'](_0x407267,_0x1cd85c),this['_createMarkersFromRanges'](_0x407267,_0x330842,!!_0x1cd85c);}['_createMarkersFromRanges'](_0x2799e8,_0x4cf49e,_0x33c7fc){this['editor']['model']['change'](_0x51cdd9=>{for(const _0x569005 of _0x4cf49e){const _0x5d24b1=_0x4c898f()['substr'](0x1,0x5),_0x3435d5='comment:'+_0x2799e8+':'+_0x5d24b1;_0x51cdd9['addMarker'](_0x3435d5,{'range':_0x569005,'usingOperation':_0x33c7fc,'affectsData':_0x33c7fc});}});}['_createCommentThread'](_0x454565,_0xbe24a1){const _0x1a8cd9=this['editor']['plugins']['get']('CommentsRepository'),_0x58d0f3=this['editor']['config']['get']('collaboration.channelId'),_0x3d3a70=this['editor']['plugins']['get']('Users')['me'];if(!_0x3d3a70)throw new _0x4e5896('addcommentthreadcommand-user-not-found',null);_0x1a8cd9['addCommentThread']({'threadId':_0x454565,'channelId':_0x58d0f3,'comments':[{'authorId':_0x3d3a70['id'],'content':_0xbe24a1,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x9427da){for(const _0x2cda91 of _0x9427da['getItems']())if(this['_itemIsContent'](_0x2cda91))return!0x0;return!0x1;}['_itemIsContent'](_0x6be36e){return _0x6be36e['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x6be36e)&&!_0x6be36e['is']('element','tableCell');}['_trimToContent'](_0x7bbad3){const _0x38c21b=_0x4ff5de=>!this['_itemIsContent'](_0x4ff5de['item']),_0x378edd=_0x7bbad3['start']['getLastMatchingPosition'](_0x38c21b),_0x5025be=_0x7bbad3['end']['getLastMatchingPosition'](_0x38c21b,{'direction':'backward'});return this['editor']['model']['createRange'](_0x378edd,_0x5025be);}}class si extends _0x1576f0{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5ca239){super(_0x5ca239),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x282069=this['editor'],_0x48e183=_0x282069['model']['document']['selection'],_0x1e1103=_0x538c79(()=>this['refreshSelectedViews'](),0xa);_0x48e183['on']('change:range',(_0x57d1a8,_0x4c3b8c)=>{_0x4c3b8c['directChange']&&(_0x1e1103['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x282069['editing']['view']['document'],'change:isFocused',(_0x378b34,_0x320787,_0x59964d)=>{_0x59964d&&_0x1e1103();}),this['listenTo'](_0x282069['ui']['focusTracker'],'change:isFocused',(_0x39ef4a,_0x22c6ee,_0x3efc01)=>{_0x3efc01||this['fire']('blur',{'isAnnotationTracked':_0xcd19a1=>this['_editorAnnotationsData']['has'](_0xcd19a1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1343f7){if(this['_editorAnnotations']['has'](_0x1343f7['view']))return;this['_editorAnnotations']['add'](_0x1343f7['view']),this['editor']['ui']['focusTracker']['add'](_0x1343f7['view']['element']);const _0x36b747=this['editor']['plugins']['get']($t);this['listenTo'](_0x36b747['collection'],'remove',(_0x334da5,_0x5c3f01)=>{this['editor']['ui']['focusTracker']['remove'](_0x5c3f01['view']['element']),this['_editorAnnotations']['delete'](_0x5c3f01['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x355ff4){if('function'!=typeof _0x355ff4)throw new _0x4e5896('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x355ff4);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x22074e,annotations:_0x12ca40}){const _0x5360ae=[],_0x22e204=this['editor']['model']['document']['selection'],_0x5ae893=Array['from'](_0x22e204['getRanges']());for(const [_0x104a85,_0x743544]of this['_editorAnnotationsData']){const _0x412db6=_0x2c5189(_0x743544),_0x320d4d=_0x12ca40['getByInnerView'](_0x104a85);_0x412db6&&_0x320d4d&&_0x5360ae['push']({'annotation':_0x320d4d,'range':_0x412db6});}function _0x2c5189(_0x327098){for(const _0x584ad8 of _0x327098)for(const _0x171ec5 of _0x5ae893)if(_0x584ad8['containsRange'](_0x171ec5,!_0x22e204['isCollapsed']))return _0x584ad8;return null;}return _0x5360ae['sort']((_0x44643b,_0x55c919)=>{const _0x4adc1a=_0x44643b['range'],_0x2bbc18=_0x55c919['range'];if(!_0x4adc1a['isEqual'](_0x2bbc18)){if(_0x4adc1a['containsRange'](_0x2bbc18,!0x0))return 0x1;if(_0x2bbc18['containsRange'](_0x4adc1a,!0x0))return-0x1;}return _0x44643b['annotation']==_0x22074e?-0x1:_0x55c919['annotation']==_0x22074e?0x1:0x0;})['map'](_0xf93f4f=>_0xf93f4f['annotation']);}get['_editorAnnotationsData'](){const _0x4c29d7=new Map();for(const _0x5ac879 of Array['from'](this['_dataCollectors']))for(const [_0x53c987,_0x1b3a97]of _0x5ac879())_0x4c29d7['set'](_0x53c987,_0x1b3a97);return _0x4c29d7;}}class ni extends _0x1576f0{['afterInit'](){const _0x1e46f4=this['editor'];if(!_0x1e46f4['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1e46f4['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x1576f0{constructor(_0xb4d5cd){super(_0xb4d5cd),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x237401=this['editor'],_0x51aee2=_0x237401['commands']['get']('importWord'),_0x477158=_0x237401['plugins']['get'](_0x15a349);_0x51aee2&&(_0x51aee2['on']('execute',(_0x353ddf,[,_0x3c0ef2])=>{_0x3c0ef2['collaboration_features']={'comments':!0x0,'user_id':_0x477158['me']['id']};},{'priority':_0x18180e['high']+0xa}),this['listenTo'](_0x51aee2,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2558e6,_0x46c62a){const {comment_threads:_0x27afdc}=_0x46c62a;_0x27afdc&&_0x27afdc['forEach'](({thread_id:_0x296bf4,comments:_0x774320,is_resolved:_0x537107})=>{const _0x428784=new Date(),_0x17c792=_0x774320['map'](({author:_0x5f5540,content:_0x359154,created_at:_0x27ca40})=>({'content':_0x359154,'authorId':this['editor']['plugins']['get'](_0x15a349)['me']['id'],'createdAt':_0x428784,'attributes':{'@external':{'authorName':_0x5f5540,'createdAt':_0x27ca40?new Date(_0x27ca40):new Date(),'source':'importWord'}}})),_0x19ae36=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x19ae36,'threadId':_0x296bf4,'comments':_0x17c792,'resolvedAt':_0x537107?_0x428784:null});});}}class ri extends _0x1576f0{constructor(_0x16a495){super(_0x16a495),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x16305d=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x16305d,'contentInsertion',(_0xd2acb0,_0x2dc755)=>this['_removeMarkersWithoutThreads'](_0x2dc755['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x49be0f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x49be0f;const _0x59aeea=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1489a5 of _0x49be0f['keys']()){const [_0x50f0ea,_0x420e0c]=_0x1489a5['split'](':');'comment'!=_0x50f0ea||_0x59aeea['hasCommentThread'](_0x420e0c)||_0x49be0f['delete'](_0x1489a5);}return _0x49be0f;}['_registerMarkerInClipboardPipeline'](){const _0x1430b3=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5dabf5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5dabf5&&_0x1430b3['_registerMarkerToCopy']('comment',_0x5dabf5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x298e9f){switch(_0x298e9f){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x15a62a){const _0x428429=_0x15a62a['split'](':');return{'group':_0x428429[0x0],'id':_0x428429[0x1],'part':_0x428429[0x2]};}class ai extends _0x1576f0{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x10a7a2,_0x11ed05)=>{if(!_0x11ed05['options']['showCommentHighlights'])return null;if(_0x11ed05['options']['ignoreResolvedComments']){const {id:_0x5b6f50}=hi(_0x10a7a2['markerName']),_0x42c582=this['editor']['plugins']['get'](Qt);if(_0x42c582['getCommentThread'](_0x5b6f50)?.['isResolved']&&_0x10a7a2['item'])return _0x11ed05['consumable']['consume'](_0x10a7a2['item'],'addMarker:'+_0x10a7a2['markerName']),_0x11ed05['consumable']['consume'](_0x10a7a2['item'],'removeMarker:'+_0x10a7a2['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x301ad2=>{_0x301ad2['on']('addMarker:comment',(_0x5ec664,_0x16ee00,_0x5d8de1)=>{if(!_0x5d8de1['options']['showCommentHighlights'])return;const _0x561be6=_0x16ee00['item'];if(!_0x561be6)return;const _0x4a07a6=_0x5d8de1['mapper']['toViewElement'](_0x561be6);this['editor']['model']['schema']['isObject'](_0x561be6)&&_0x4a07a6&&!_0x4a07a6['getCustomProperty']('widget')&&_0x4a07a6['is']('containerElement')&&Ct(_0x4a07a6,_0x5d8de1['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x292411,{writer:_0x35b39a,options:_0x5bcaa7})=>{if(!_0x5bcaa7['showCommentHighlights'])return null;const _0x16146d=_0x35b39a['createContainerElement']('div'),_0x565fbb=_0x35b39a['createEmptyElement']('hr');return _0x35b39a['addClass']('ck-horizontal-line',_0x16146d),_0x35b39a['insert'](_0x35b39a['createPositionAt'](_0x16146d,0x0),_0x565fbb),_0x16146d;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1d0f57,{writer:_0x1dc694,options:_0xc5e2f6})=>{if(!_0xc5e2f6['showCommentHighlights'])return null;const _0x213b3e=_0x1dc694['createContainerElement']('span'),_0x3ba17a=_0x1dc694['createEmptyElement']('img');return _0x1dc694['addClass']('image-inline',_0x213b3e),_0x1dc694['insert'](_0x1dc694['createPositionAt'](_0x213b3e,0x0),_0x3ba17a),_0x213b3e;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x25ca77,{writer:_0x57d2cc,options:_0x320d20})=>{if(_0x320d20['showCommentHighlights'])return _0x57d2cc['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x147ca7,_0x34fbda,_0x493b69)=>{_0x493b69['options']['showCommentHighlights']&&_0x147ca7['stop']();},{'priority':'high'});}}class ci extends _0x1576f0{static get['requires'](){return[Qt,si,_0x15a349,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35a6cd){super(_0x35a6cd),this['set']('isThreadsLoadingPaused',!0x0),_0x35a6cd['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x30456a,_0x517fed,_0x28762d,_0x55b538)=>{const _0x3d6a0d=_0x35a6cd['plugins']['get'](Qt),_0x1921c7=_0x28762d?hi(_0x28762d)['id']:null;_0x35a6cd['model']['change'](()=>{if(_0x1921c7){const _0x728a96=this['getAllMarkersForId'](_0x1921c7);for(const _0x1296df of _0x728a96)_0x35a6cd['editing']['reconvertMarker'](_0x1296df);}if(_0x55b538){const {id:_0x3bb718}=hi(_0x55b538),_0x17f701=_0x3d6a0d['getCommentThread'](_0x3bb718);if(_0x17f701&&_0x17f701['unlinkedAt'])return;if(_0x17f701&&!_0x17f701['isAttached'])return;const _0x1e0315=this['getAllMarkersForId'](_0x3bb718);for(const _0x2a6b53 of _0x1e0315)_0x35a6cd['editing']['reconvertMarker'](_0x2a6b53);}}),_0x1921c7&&this['scrollToThreadMarker'](_0x1921c7);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x57e5ef=this['editor'],_0x2004bd=_0x57e5ef['plugins']['get'](Qt),_0x56ca79=_0x57e5ef['config']['get']('collaboration.channelId'),_0x439660=_0x2004bd['getCommentThreads']()['filter'](_0x201f90=>_0x201f90['channelId']!==_0x56ca79);_0x57e5ef['commands']['add']('addCommentThread',new ei(_0x57e5ef)),this['listenTo'](_0x57e5ef,'change:isReadOnly',(_0x42357c,_0x457fa1,_0x38e364)=>{_0x2004bd['switchReadOnly'](_0x38e364,_0x57e5ef['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2004bd,di('addCommentThread',_0x56ca79),(_0x471057,{threadId:_0x5887b7})=>{const _0x29686c=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x5887b7);_0x29686c?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5887b7);}),this['listenTo'](_0x2004bd,di('removeCommentThread',_0x56ca79),(_0x223e5e,{threadId:_0x33d0d5})=>{_0x57e5ef['model']['enqueueChange']({'isUndoable':!0x1},_0x4f7fb9=>{const _0x4fbb8e=this['getAllMarkersForId'](_0x33d0d5);for(const _0x547901 of _0x4fbb8e)_0x4f7fb9['removeMarker'](_0x547901);});}),this['listenTo'](_0x2004bd,di('resolveCommentThread',_0x56ca79),(_0x3aa565,{threadId:_0x11f65d})=>{(this['_reconvertMarkers'](_0x11f65d),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x11f65d)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2004bd,di('reopenCommentThread',_0x56ca79),(_0x6afddf,{threadId:_0x1a042e})=>{this['_reconvertMarkers'](_0x1a042e);},{'priority':'low'}),this['listenTo'](_0x2004bd,di('addComment',_0x56ca79),(_0x105ccf,{threadId:_0x4a77a2,isFromAdapter:_0x36cfce})=>{const _0x3eeb86=this['getAllMarkersForId'](_0x4a77a2);if(_0x36cfce||0x0==_0x3eeb86['length']||!_0x2004bd['hasCommentThread'](_0x4a77a2))return;0x1===_0x2004bd['getCommentThread'](_0x4a77a2)['length']&&_0x57e5ef['model']['enqueueChange']({'isUndoable':!0x1},_0x1c1adc=>{for(const _0x301a41 of _0x3eeb86)_0x1c1adc['updateMarker'](_0x301a41,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x439660);}['afterInit'](){!async function(_0x14ec54){const _0x289512=_0x1e266b([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x4ddc6e=0x73460ab3,_0x1c6b10=0x73418f13^_0x4ddc6e,_0x5b4f12=window[_0x1e266b([0x44,0x61,0x74,0x65])][_0x1e266b([0x6e,0x6f,0x77])](),_0x4b61b0=_0x14ec54[_0x1e266b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x7c8a01=new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3bba6e=>{_0x4b61b0[_0x1e266b([0x6f,0x6e,0x63,0x65])](_0x1e266b([0x72,0x65,0x61,0x64,0x79]),_0x3bba6e);}),_0x3a40f3={[_0x1e266b([0x6b,0x74,0x79])]:_0x1e266b([0x45,0x43]),[_0x1e266b([0x75,0x73,0x65])]:_0x1e266b([0x73,0x69,0x67]),[_0x1e266b([0x63,0x72,0x76])]:_0x1e266b([0x50,0x2d,0x32,0x35,0x36]),[_0x1e266b([0x78])]:_0x1e266b([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]),[_0x1e266b([0x79])]:_0x1e266b([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]),[_0x1e266b([0x61,0x6c,0x67])]:_0x1e266b([0x45,0x53,0x32,0x35,0x36])},_0x3d151b=_0x4b61b0[_0x1e266b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1e266b([0x67,0x65,0x74])](_0x1e266b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5ec578(){let _0x2c5f23,_0x2e7594=null,_0x292f5b=null;try{if(_0x3d151b==_0x1e266b([0x47,0x50,0x4c]))return _0x1e266b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2c5f23=_0x135dea(),!_0x2c5f23)return _0x1e266b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2c5f23[_0x1e266b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x292f5b=_0x5e375d(_0x2c5f23[_0x1e266b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2c5f23[_0x1e266b([0x6a,0x74,0x69])])),await _0x1f7518()?_0x1a5349()?_0x4d9589()?_0x1e266b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x399988()?(_0x2c5f23[_0x1e266b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1e266b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e7594=_0x4611ae(_0x1e266b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x222261()):_0x1e266b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1e266b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1e266b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1e266b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4d9589(){const _0x4e58e7=[_0x1e266b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1e266b([0x74,0x72,0x69,0x61,0x6c])][_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c5f23[_0x1e266b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5b4f12/0x3e8:0xe10*_0x1c6b10;return _0x2c5f23[_0x1e266b([0x65,0x78,0x70])]<_0x4e58e7;}function _0x1a5349(){const _0xf1cc50=_0x2c5f23[_0x1e266b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xf1cc50)return!0x1;if(_0xf1cc50[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x2a])))return!0x0;if(_0xf1cc50[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x43,0x4d,0x54])))return!0x0;if(_0xf1cc50[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x1789f1())return!0x0;if(_0xf1cc50[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x52,0x43,0x4d,0x54]))){if(_0x48c911())return!0x0;if(_0x58b705()||_0x1d5132())return!0x0;}return!0x1;}function _0x399988(){const _0x4e0f22=_0x2c5f23[_0x1e266b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4e0f22||0x0==_0x4e0f22[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4a11de}=new URL(window[_0x1e266b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4e0f22[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a11de))return!0x0;const _0xbaaedc=_0x4a11de[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])](_0x1e266b([0x2e]));return _0x4e0f22[_0x1e266b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x48eda0=>_0x48eda0[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x2a])))[_0x1e266b([0x6d,0x61,0x70])](_0x3cb158=>_0x3cb158[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])](_0x1e266b([0x2e])))[_0x1e266b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2e6763=>_0x2e6763[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xbaaedc[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1e266b([0x6d,0x61,0x70])](_0x3fdec6=>Array(_0xbaaedc[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3fdec6[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1e266b([0x66,0x69,0x6c,0x6c])](_0x3fdec6[0x0]===_0x1e266b([0x2a])?_0x1e266b([0x2a]):'')[_0x1e266b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3fdec6))[_0x1e266b([0x73,0x6f,0x6d,0x65])](_0x5e7c41=>_0xbaaedc[_0x1e266b([0x65,0x76,0x65,0x72,0x79])]((_0x4836fe,_0x1bd9b9)=>_0x5e7c41[_0x1bd9b9]===_0x4836fe||_0x5e7c41[_0x1bd9b9]===_0x1e266b([0x2a])));}function _0x222261(){return _0x2e7594&&_0x292f5b?new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x49352d,_0x5a2cda)=>{_0x2e7594[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x49352d,_0x5a2cda),_0x292f5b[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x5ae9c6=>{_0x5ae9c6!=_0x1e266b([0x56,0x61,0x6c,0x69,0x64])&&_0x49352d(_0x5ae9c6);},_0x5a2cda);}):_0x2e7594||_0x292f5b||_0x1e266b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5e375d(_0x28d02f,_0x45c030){return new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5deecb=>{if(_0x5de4e8())return _0x5deecb(_0x1e266b([0x56,0x61,0x6c,0x69,0x64]));_0x2c28d6(),_0x4b61b0[_0x1e266b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1e266b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3e5aea=!0x1;const _0x291a32=_0x4c898f();function _0x587b5a(_0x33604b){return!!_0x33604b&&(typeof _0x33604b===_0x1e266b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x33604b===_0x1e266b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x33604b[_0x1e266b([0x74,0x68,0x65,0x6e])]===_0x1e266b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x33604b[_0x1e266b([0x63,0x61,0x74,0x63,0x68])]===_0x1e266b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x899d95(_0x4f304e){_0x166fcc(_0x4f304e)[_0x1e266b([0x74,0x68,0x65,0x6e])](_0xed1407=>{if(!_0xed1407||_0xed1407[_0x1e266b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1e266b([0x6f,0x6b]))return _0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5d59b9(_0x4d68ad(_0x291a32+_0x45c030))!=_0xed1407[_0x1e266b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1e266b([0x56,0x61,0x6c,0x69,0x64]);})[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x4b7a36=>(_0x459950(),_0x4b7a36),()=>{const _0x59e1db=_0x4e7998();return null==_0x59e1db?(_0x459950(),_0x1e266b([0x56,0x61,0x6c,0x69,0x64])):_0x1e266b(_0x5b4f12-_0x59e1db>(0x574a8eb3^_0x4ddc6e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x5deecb)[_0x1e266b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5deecb(_0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4d1fbb=0x7370e433^_0x4ddc6e;function _0x459950(){const _0x71500d=_0x1e266b([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d59b9(_0x4d68ad(_0x28d02f)),_0x1d4991=_0x26703d(_0x5d59b9(window[_0x1e266b([0x4d,0x61,0x74,0x68])][_0x1e266b([0x63,0x65,0x69,0x6c])](_0x5b4f12/_0x4d1fbb)));window[_0x1e266b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1e266b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x71500d,_0x1d4991);}function _0x4e7998(){const _0x5c4416=_0x1e266b([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d59b9(_0x4d68ad(_0x28d02f)),_0x431a51=window[_0x1e266b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1e266b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5c4416);return _0x431a51?window[_0x1e266b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x26703d(_0x431a51),0x10)*_0x4d1fbb:null;}function _0x166fcc(_0x51abde){return new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x51c400,_0x55386b)=>{_0x51abde[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x51c400,_0x55386b),window[_0x1e266b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x55386b,0x7347de73^_0x4ddc6e);});}}_0x4b61b0[_0x1e266b([0x6f,0x6e])](_0x1e266b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1eedcd,_0x2e4c75)=>{if(_0x2e4c75[0x0]!=_0x28d02f)return _0x5deecb(_0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2e4c75[0x1]={..._0x2e4c75[0x1],[_0x1e266b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x291a32};},{[_0x1e266b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1e266b([0x68,0x69,0x67,0x68])}),_0x4b61b0[_0x1e266b([0x6f,0x6e])](_0x1e266b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x454653=>{_0x587b5a(_0x454653[_0x1e266b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3e5aea=!0x0,_0x899d95(_0x454653[_0x1e266b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1e266b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1e266b([0x6c,0x6f,0x77])}),_0x7c8a01[_0x1e266b([0x74,0x68,0x65,0x6e])](()=>{_0x3e5aea||_0x5deecb(_0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5de4e8(){return _0x4b61b0[_0x1e266b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1e266b([0x76,0x69,0x65,0x77])][_0x1e266b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1e266b([0x61,0x75,0x74,0x6f]);}function _0x2c28d6(){_0x4b61b0[_0x1e266b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1e266b([0x76,0x69,0x65,0x77])][_0x1e266b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1e266b([0x61,0x75,0x74,0x6f]);}}function _0x4611ae(_0x1bc029){const _0x43d2c9=[new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3fced4=>setTimeout(_0x3fced4,0x734f347f^_0x4ddc6e)),_0x7c8a01[_0x1e266b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a9dde=>{let _0x35e43d=0x0;_0x4b61b0[_0x1e266b([0x6d,0x6f,0x64,0x65,0x6c])][_0x1e266b([0x6f,0x6e])](_0x1e266b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2d6fcb,_0x415b2c)=>{_0x415b2c[0x0][_0x1e266b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x35e43d++,_0x35e43d==(0x73460f5b^_0x4ddc6e)&&(_0x5a9dde(),_0x2d6fcb[_0x1e266b([0x6f,0x66,0x66])]());});}))];return window[_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1e266b([0x72,0x61,0x63,0x65])](_0x43d2c9)[_0x1e266b([0x74,0x68,0x65,0x6e])](()=>_0x1bc029);}async function _0x1654c7(){await _0x7c8a01,_0x4b61b0[_0x1e266b([0x6d,0x6f,0x64,0x65,0x6c])][_0x1e266b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x20662e,_0x4b61b0[_0x1e266b([0x6d,0x6f,0x64,0x65,0x6c])][_0x1e266b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x20662e,_0x4b61b0[_0x1e266b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1e266b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1789f1(){return window[_0x1e266b([0x67,0x6c,0x6f,0x62])]&&window[_0x1e266b([0x67,0x6c,0x6f,0x62])][_0x1e266b([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x48c911(){return _0x38ec6b(_0x1e266b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xabbd37(_0x1e266b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1e266b([0x73,0x74,0x61,0x74,0x65])]==_0x1e266b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x58b705(){return _0x38ec6b(_0x1e266b([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 _0x1d5132(){return _0x38ec6b(_0x1e266b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3022e0(_0x435ea9){const _0xa347d5=_0x5c8cfd();_0x4b61b0[_0xa347d5]=_0x1e266b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x435ea9,_0x435ea9!=_0x1e266b([0x56,0x61,0x6c,0x69,0x64])&&_0x1654c7();}function _0x5c8cfd(){const _0x10501c=window[_0x1e266b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1e266b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1e266b([0x6e,0x6f,0x77])]())[_0x1e266b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1e266b([0x2e]),'');let _0xb78d9e=_0x1e266b([0x4b]);for(let _0xb19a75=0x0;_0xb19a75<_0x10501c[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xb19a75+=0x2){let _0x412861=window[_0x1e266b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10501c[_0x1e266b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xb19a75,_0xb19a75+0x2));_0x412861>=_0x289512[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x412861-=_0x289512[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xb78d9e+=_0x289512[_0x412861];}return _0xb78d9e;}function _0x135dea(){const _0x1f08cb=_0x3d151b[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])](_0x1e266b([0x2e]));if(0x3!=_0x1f08cb[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xbebb34(_0x1f08cb[0x1]);function _0xbebb34(_0x329626){const _0x3bc4cb=_0x5e22f9(_0x329626);return _0x3bc4cb&&_0x1924bc()?_0x3bc4cb:null;function _0x1924bc(){const _0x5722e6=_0x3bc4cb[_0x1e266b([0x6a,0x74,0x69])],_0x4afa43=window[_0x1e266b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5722e6[_0x1e266b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5722e6[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2fe991={..._0x3bc4cb,[_0x1e266b([0x6a,0x74,0x69])]:_0x5722e6[_0x1e266b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5722e6[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2fe991[_0x1e266b([0x76,0x63])],_0x4d68ad(_0x2fe991)==_0x4afa43;}}}async function _0x1f7518(){let _0x258677=!0x0;try{const _0x378265=_0x3d151b[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])](_0x1e266b([0x2e])),[_0x20adc5,_0x41da35,_0x377c55]=_0x378265;return _0x24660e(_0x20adc5),await _0x5e54de(_0x20adc5,_0x41da35,_0x377c55),_0x258677;}catch{return!0x1;}function _0x24660e(_0x356507){const _0x4108ab=_0x5e22f9(_0x356507);_0x4108ab&&_0x4108ab[_0x1e266b([0x61,0x6c,0x67])]==_0x1e266b([0x45,0x53,0x32,0x35,0x36])||(_0x258677=!0x1);}async function _0x5e54de(_0x5b5023,_0x247b53,_0x280af5){const _0x3f5381=window[_0x1e266b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1e266b([0x66,0x72,0x6f,0x6d])](_0xb5edec(_0x280af5),_0x51318e=>_0x51318e[_0x1e266b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x413021=new window[(_0x1e266b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1e266b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5b5023+_0x1e266b([0x2e])+_0x247b53),_0x1395af=window[_0x1e266b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1e266b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1395af)return;const _0x31f4b0=await _0x1395af[_0x1e266b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1e266b([0x6a,0x77,0x6b]),_0x3a40f3,{[_0x1e266b([0x6e,0x61,0x6d,0x65])]:_0x1e266b([0x45,0x43,0x44,0x53,0x41]),[_0x1e266b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1e266b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1e266b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1395af[_0x1e266b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1e266b([0x6e,0x61,0x6d,0x65])]:_0x1e266b([0x45,0x43,0x44,0x53,0x41]),[_0x1e266b([0x68,0x61,0x73,0x68])]:{[_0x1e266b([0x6e,0x61,0x6d,0x65])]:_0x1e266b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x31f4b0,_0x3f5381,_0x413021)||(_0x258677=!0x1);}}function _0x5e22f9(_0x297f0f){return _0x297f0f[_0x1e266b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1e266b([0x65,0x79]))?JSON[_0x1e266b([0x70,0x61,0x72,0x73,0x65])](_0xb5edec(_0x297f0f)):null;}function _0xb5edec(_0x1aa775){return window[_0x1e266b([0x61,0x74,0x6f,0x62])](_0x1aa775[_0x1e266b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1e266b([0x2b]))[_0x1e266b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1e266b([0x2f])));}function _0x4d68ad(_0x48551c){let _0x3e2cb4=0x1505;function _0xfe258d(_0x2c3041){for(let _0x1fc8e5=0x0;_0x1fc8e5<_0x2c3041[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1fc8e5++){const _0x5cd5dc=_0x2c3041[_0x1e266b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1fc8e5);_0x3e2cb4=(_0x3e2cb4<<0x5)+_0x3e2cb4+_0x5cd5dc,_0x3e2cb4&=_0x3e2cb4;}}function _0x126c8d(_0x35e45e){Array[_0x1e266b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x35e45e)?_0x35e45e[_0x1e266b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x126c8d):_0x35e45e&&typeof _0x35e45e==_0x1e266b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1e266b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x35e45e)[_0x1e266b([0x73,0x6f,0x72,0x74])]()[_0x1e266b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5b58d0,_0x5c3385])=>{_0xfe258d(_0x5b58d0),_0x126c8d(_0x5c3385);}):_0xfe258d(window[_0x1e266b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x35e45e));}return _0x126c8d(_0x48551c),_0x3e2cb4>>>0x0;}function _0x5d59b9(_0x3d86f0){return _0x3d86f0[_0x1e266b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1e266b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1e266b([0x30]));}function _0x26703d(_0x11f2bf){return _0x11f2bf[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1e266b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1e266b([0x6a,0x6f,0x69,0x6e])]('');}function _0x38ec6b(_0x38e347){return _0x4b61b0[_0x1e266b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1e266b([0x68,0x61,0x73])](_0x38e347);}function _0xabbd37(_0x58488e){return _0x4b61b0[_0x1e266b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1e266b([0x67,0x65,0x74])](_0x58488e);}function _0x20662e(){}function _0x1e266b(_0xb27ada){return _0xb27ada['map'](_0x2ee510=>String['fromCharCode'](_0x2ee510))['join']('');}_0x3022e0(await _0x5ec578());}(this);}['destroy'](){const _0x5020f9=this['editor']['plugins']['get'](Qt),_0x4cf97b=this['editor']['config']['get']('collaboration.channelId');for(const _0x170217 of _0x5020f9['getCommentThreads']({'channelId':_0x4cf97b}))_0x5020f9['_detachCommentThread'](_0x170217['id']),_0x5020f9['_threads']['delete'](_0x170217['id']);super['destroy']();}['hasMarkerForId'](_0x485bf9){return this['getAllMarkersForId'](_0x485bf9)['length']>0x0;}['getAllMarkersForId'](_0x15831a){const _0x2ac637=[];for(const _0x2e3db9 of this['editor']['model']['markers'])_0x2e3db9['name']['startsWith']('comment:'+_0x15831a)&&_0x2ac637['push'](_0x2e3db9);return _0x2ac637;}['scrollToThreadMarker'](_0x2e4b96){setTimeout(()=>{const _0x53233e=this['_getTargetForId'](_0x2e4b96);if(!_0x53233e)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x2e4b96&&_0x3983aa({'target':_0x53233e[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x121726){this['editor']['model']['change'](()=>{for(const _0x224a37 of this['getAllMarkersForId'](_0x121726))this['editor']['editing']['reconvertMarker'](_0x224a37);});}['_attachArchivedThread'](_0x391cf4){const _0x32cdcb=this['editor']['plugins']['get'](Qt),_0x4469e2=this['editor']['plugins']['get'](si),_0xb33e18=_0x32cdcb['getCommentThread'](_0x391cf4);if(!_0xb33e18['isAttached']){const _0x22a8d4=_0xb33e18['attachTo'](()=>this['_getTargetForId'](_0xb33e18['id']));_0x4469e2['registerAnnotation'](_0x22a8d4),_0xb33e18['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x29b5ac=this['editor'],_0x42de51=_0x29b5ac['plugins']['get'](_0x15a349);_0x29b5ac['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d65d3,_0x3c3e12)=>{const {id:_0x400e87}=hi(_0x5d65d3['markerName']),_0x441f8e=_0x29b5ac['plugins']['get'](Qt)['getCommentThread'](_0x400e87),_0x364c87=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x400e87;let _0x28f23e;if(_0x441f8e&&_0x441f8e['isResolved']&&!_0x364c87&&_0x5d65d3['item'])return _0x3c3e12['consumable']['consume'](_0x5d65d3['item'],'addMarker:'+_0x5d65d3['markerName']),_0x3c3e12['consumable']['consume'](_0x5d65d3['item'],'removeMarker:'+_0x5d65d3['markerName']),null;const _0x583e54=['ck-comment-marker'];return _0x364c87&&_0x583e54['push']('ck-comment-marker--active'),_0x28f23e=_0x441f8e?.['length']?_0x441f8e['comments']['first']['author']['id']:_0x42de51['me']['id'],{'classes':_0x583e54,'attributes':{'data-comment':_0x400e87,'data-author-id':_0x28f23e}};}}),_0x29b5ac['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5ec32f,{options:_0x5aba75})=>{if(_0x5aba75['showCommentHighlights'])return null;const _0x7095d3=_0x29b5ac['plugins']['get'](Qt),_0x49a401=_0x29b5ac['model']['markers']['get'](_0x5ec32f),{id:_0x260c7f,part:_0x4aa601}=hi(_0x5ec32f);return _0x49a401&&!_0x49a401['affectsData']||_0x5aba75['ignoreResolvedComments']&&_0x7095d3['getCommentThread'](_0x260c7f)?.['isResolved']?null:{'group':'comment','name':_0x4aa601?_0x260c7f+':'+_0x4aa601:_0x260c7f};}}),_0x29b5ac['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3743c9,{writer:_0x4d023c})=>_0x4d023c['createElement']('$marker',{'data-name':'comment:'+_0x3743c9['getAttribute']('id')})}),_0x29b5ac['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4160e3=this['editor'],_0x499d88=_0x4160e3['plugins']['get'](Qt),_0x7a7a32=new Set(),_0x10879b=new Set();_0x4160e3['model']['document']['registerPostFixer'](_0x6a442c=>{let _0x15aa32=!0x1;for(const {name:_0xc29b59,data:_0x41fe4a}of _0x4160e3['model']['document']['differ']['getChangedMarkers']()){const {group:_0x168c94,id:_0x2a0d7a}=hi(_0xc29b59);let _0x30bb9b=_0x41fe4a['newRange'];if('comment'!==_0x168c94||!_0x30bb9b)continue;const _0x19e6d9='$graveyard'===_0x30bb9b['root']['rootName'];_0x19e6d9||(_0x30bb9b=li(_0x30bb9b,_0x4160e3['model']),!_0x30bb9b||_0x30bb9b['isCollapsed']||!_0x41fe4a['newRange']||_0x30bb9b['isEqual'](_0x41fe4a['newRange']))?_0x4160e3['model']['hasContent'](_0x30bb9b)&&!_0x19e6d9?this['isThreadsLoadingPaused']?_0x7a7a32['add'](_0xc29b59):this['_handleThreadMarker'](_0xc29b59,_0x2a0d7a):(_0x10879b['add'](_0xc29b59),_0x7a7a32['delete'](_0xc29b59),_0x6a442c['removeMarker'](_0xc29b59),_0x15aa32=!0x0):(_0x6a442c['updateMarker'](_0xc29b59,{'range':_0x30bb9b}),_0x15aa32=!0x0);}return _0x15aa32;}),this['on']('change:isThreadsLoadingPaused',(_0x51abd2,_0x444f62,_0x21fd21)=>{if(!_0x21fd21&&_0x7a7a32['size'])for(const _0x2871fb of _0x7a7a32){const {id:_0x54147c}=hi(_0x2871fb);_0x7a7a32['delete'](_0x2871fb),_0x4160e3['model']['markers']['get'](_0x2871fb)&&this['_handleThreadMarker'](_0x2871fb,_0x54147c);}}),this['listenTo'](_0x4160e3['model']['document'],'change',()=>{for(const {name:_0x31d76e,data:{newRange:_0x52a599}}of _0x4160e3['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5f117d,id:_0x5dd9c6}=hi(_0x31d76e);if('comment'!==_0x5f117d)continue;const _0x23f026=_0x499d88['getCommentThread'](_0x5dd9c6),_0x3e2a99=this['hasMarkerForId'](_0x5dd9c6);_0x23f026&&(!_0x23f026['_hasTargetInContent']&&_0x52a599&&_0x4160e3['editing']['view']['once']('render',()=>{const _0xe4bd05=_0x4160e3['plugins']['get']($t),_0x4e43ff=_0x499d88['_threadToController']['get'](_0x23f026)['view'];_0xe4bd05['getByInnerView'](_0x4e43ff)['refreshVisibility']();},{'priority':'low'}),_0x23f026['_hasTargetInContent']=_0x3e2a99||!!_0x52a599),_0x52a599||(_0x10879b['add'](_0x31d76e),_0x7a7a32['delete'](_0x31d76e));}for(const _0x52efca of _0x10879b){const {id:_0x117ab2}=hi(_0x52efca),_0x461b47=_0x499d88['getCommentThread'](_0x117ab2);if(_0x7a7a32['delete'](_0x52efca),!_0x461b47)continue;const _0x1c463b=this['hasMarkerForId'](_0x117ab2);_0x1c463b||_0x461b47['isSubmitted']?_0x1c463b||_0x461b47['unlinkedAt']||_0x461b47['setUnlinkedAt'](new Date()):_0x461b47['remove']();}_0x10879b['clear']();});}['_handleInitialThreads'](_0x469b12){_0x469b12['forEach'](_0x4e9242=>{_0x4e9242['unlinkedAt']&&this['_attachArchivedThread'](_0x4e9242['id']);});}['_getTargetForId'](_0x19c28e){const _0x1b96db=this['editor'],_0x2827bb=this['getAllMarkersForId'](_0x19c28e);return _0x2fc2b4(_0x1b96db['editing'],_0x2827bb);}['_getTextContext'](_0x2df7fd){const _0x4723e7=this['getAllMarkersForId'](_0x2df7fd);let _0x46bec8='',_0x34f2c8=!0x1;for(const _0x36b37e of _0x4723e7){const _0x1db521=_0x36b37e['getRange']();for(const _0x51052f of Array['from'](_0x1db521['getItems']()))_0x51052f['is']('$textProxy')?(_0x46bec8&&_0x34f2c8&&(_0x46bec8+='\x20',_0x34f2c8=!0x1),_0x46bec8+=_0x51052f['data']):_0x34f2c8=!0x0;_0x34f2c8=!0x0;}return _0x46bec8['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x6e3099,_0x2d9321){const _0x324b38=this['editor'],_0x659a73=_0x324b38['plugins']['get'](Qt);let _0x9c54b9=_0x659a73['getCommentThread'](_0x2d9321);const _0x178480=_0x324b38['config']['get']('collaboration.channelId'),_0x1277e0=_0x324b38['plugins']['get'](si);if(_0x9c54b9&&(_0x9c54b9['unlinkedAt']&&_0x9c54b9['setUnlinkedAt'](null),_0x9c54b9['isAttached']))return _0x9c54b9;return!this['getAllMarkersForId'](_0x2d9321)[0x0]['managedUsingOperations']?_0x324b38['editing']['view']['once']('render',()=>{if(_0x659a73['getCommentThread'](_0x2d9321))return;const _0x56e909=_0x324b38['plugins']['get']($t);_0x9c54b9=_0x659a73['openNewCommentThread']({'channelId':_0x178480,'threadId':_0x2d9321,'target':()=>this['_getTargetForId'](_0x2d9321),'context':{'type':'text','value':this['_getTextContext'](_0x2d9321)}});const _0x141344=_0x659a73['_threadToController']['get'](_0x9c54b9)['view'],_0x45e9f4=_0x56e909['getByInnerView'](_0x141344);_0x45e9f4&&_0x1277e0['registerAnnotation'](_0x45e9f4);},{'priority':'low'}):_0x659a73['fetchCommentThread']({'channelId':_0x178480,'threadId':_0x2d9321})['then'](_0x230982=>{if('destroyed'!==_0x324b38['state']){if(_0x9c54b9=_0x230982,_0x9c54b9&&!_0x9c54b9['isAttached']){const _0x43855d=_0x9c54b9['attachTo'](()=>this['_getTargetForId'](_0x2d9321));_0x1277e0['registerAnnotation'](_0x43855d),_0x9c54b9['isResolved']&&this['_reconvertMarkers'](_0x2d9321);}else{if(!_0x9c54b9){const _0x1410e6=this['getAllMarkersForId'](_0x2d9321);_0x324b38['model']['change'](_0x3444da=>{for(const _0x366f83 of _0x1410e6)_0x3444da['removeMarker'](_0x366f83);});}}}}),_0x9c54b9;}['_handleThreadMarker'](_0x35c674,_0x12a5a0){const _0xe0f4dc=this['_attachMarkerToThread'](_0x35c674,_0x12a5a0);_0xe0f4dc&&!_0xe0f4dc['context']&&_0xe0f4dc['setContext']({'type':'text','value':this['_getTextContext'](_0x12a5a0)});}['_initAriaMarkerChangeAnnouncements'](){const _0x429bba=this['editor'];_0x23d947(_0x429bba['model'],({left:_0x21d80c,entered:_0x22c18b})=>{for(const _0x31f075 of _0x21d80c)if(ui(_0x31f075)){_0x429bba['ui']['ariaLiveAnnouncer']['announce'](bt(_0x429bba['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2db31a of _0x22c18b)if(ui(_0x2db31a)){_0x429bba['ui']['ariaLiveAnnouncer']['announce'](bt(_0x429bba['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x1dd84f(_0x29748d)));break;}});}}function di(_0x55206e,_0x33e184){return _0x33e184?_0x55206e+':'+_0x33e184:_0x55206e;}function li(_0x411891,_0x2eec56){const _0x27eb1a=_0x2eec56['schema'],_0x3080ca=_0x2eec56['createRange'](_0x411891['start']);for(const _0xdc00ce of _0x411891['getWalker']()){const {type:_0xed32bb,item:_0x445d25,nextPosition:_0x1b0b4a}=_0xdc00ce;if('text'===_0xed32bb||_0x27eb1a['isObject'](_0x445d25)){const _0x40c28c=_0x2eec56['createPositionBefore'](_0x445d25);_0x3080ca['isCollapsed']&&(_0x3080ca['start']=_0x40c28c),_0x3080ca['end']=_0x1b0b4a;}}return _0x3080ca;}function ui(_0x3f510d){return'comment'===hi(_0x3f510d['name'])['group'];}class mi extends _0x1576f0{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x4eabe7=this['editor'],_0x2593cd=_0x4eabe7['plugins']['get'](Qt),_0x43712e=_0x4eabe7['plugins']['get'](ci),_0x3d3f0c=_0x4eabe7['plugins']['get']($t),_0x4cf359=_0x4eabe7['plugins']['get'](si);_0x4eabe7['ui']['componentFactory']['add']('comment',()=>{const _0x540c15=this['_createUIButton'](_0x39c4f7);return _0x540c15['tooltip']=!0x0,_0x540c15;}),_0x4eabe7['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x4cf359['addSourceCollector'](()=>{const _0x24172d=[];for(const [_0x5813a2,_0x345ed0]of _0x2593cd['_threadToController']){const _0x58aeb1=_0x43712e['getAllMarkersForId'](_0x5813a2['id']),_0x141451=_0x58aeb1['map'](_0x264aaa=>_0x264aaa['getRange']());_0x58aeb1['length']>0x0&&_0x24172d['push']([_0x345ed0['view'],_0x141451]);}return _0x24172d;}),this['listenTo'](_0x3d3f0c,'change:activeAnnotations',(_0x2dd454,_0x1bb94c,_0x21d3bf)=>{const _0x304d23=Array['from'](_0x21d3bf)['map'](_0x58a2a9=>_0x58a2a9['innerView'])['find'](_0x50c893=>_0x2593cd['_viewToController']['has'](_0x50c893));if(!_0x304d23)return void(_0x43712e['activeMarker']=null);const _0x1cee05=_0x2593cd['_viewToController']['get'](_0x304d23)['model']['id'],_0x5e61a3='comment:'+_0x1cee05;_0x1cee05&&_0x43712e['hasMarkerForId'](_0x1cee05)?_0x43712e['activeMarker']=_0x5e61a3:_0x43712e['activeMarker']&&(_0x43712e['activeMarker']=null);}),this['listenTo'](_0x2593cd,'removeCommentThread',(_0x300d52,{threadId:_0x2f3545,isFromAdapter:_0x16dd0f})=>{!_0x16dd0f&&_0x4eabe7['ui']['focusTracker']['isFocused']&&_0x43712e['hasMarkerForId'](_0x2f3545)&&_0x4eabe7['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2593cd,'addComment',(_0x39a6e5,{threadId:_0x17cbeb,isFromAdapter:_0x33f967})=>{if(_0x33f967||!_0x43712e['hasMarkerForId'](_0x17cbeb)||!_0x2593cd['hasCommentThread'](_0x17cbeb))return;0x1===_0x2593cd['getCommentThread'](_0x17cbeb)['length']&&(_0x4eabe7['editing']['view']['focus'](),_0x39a6e5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x467608=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3ef8ad;for(const _0x27ecca in _0x467608){const _0x1e5edf=_0x27ecca,_0x107699=_0x467608[_0x1e5edf];if('commentsLicenseKeyValid'==_0x107699||'commentsLicenseKeyInvalid'==_0x107699||'commentsLicenseKeyExpired'==_0x107699||'commentsLicenseKeyDomainLimit'==_0x107699||'commentsLicenseKeyNotAllowed'==_0x107699||'commentsLicenseKeyEvaluationLimit'==_0x107699||'commentsLicenseKeyUsageLimit'==_0x107699){delete _0x467608[_0x1e5edf],_0x3ef8ad=_0x107699,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3ef8ad&&_0x467608['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3ef8ad&&_0x467608['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3ef8ad&&_0x467608['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3ef8ad&&_0x467608['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3ef8ad&&_0x467608['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3ef8ad&&_0x467608['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x48396b){const _0xa38655=this['editor'],_0x26f739=new _0x48396b(_0xa38655['locale']),_0x4d3d5b=_0xa38655['commands']['get']('addCommentThread');return _0x26f739['set']({'label':bt(_0xa38655['locale'],'Comment'),'icon':_0x1b267d}),_0x26f739['bind']('isEnabled')['to'](_0x4d3d5b,'isEnabled',_0x4d3d5b,'hasContent',(_0x2bfe12,_0x218698)=>_0x2bfe12&&_0x218698),this['listenTo'](_0x26f739,'execute',()=>{_0x4d3d5b['execute']();}),_0x26f739;}}class fi extends _0x1576f0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x1b9493){super(_0x1b9493),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2835fb,_0x40f77e,_0x3938c7)=>{_0x3938c7?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x37b28e,_0x5a4a4b]of this['editor']['commands'])_0x5a4a4b['affectsData']&&'addCommentThread'!==_0x37b28e&&_0x5a4a4b['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x25030e=this['editor']['editing']['view']['document'];this['listenTo'](_0x25030e,'cut',_0xba17e1=>_0xba17e1['stop'](),{'priority':'highest'}),this['listenTo'](_0x25030e,'clipboardInput',_0x2b53ac=>_0x2b53ac['stop'](),{'priority':'highest'}),this['listenTo'](_0x25030e,'delete',_0x261e19=>_0x261e19['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x56d8e1,_0x806a88]of this['editor']['commands'])_0x806a88['affectsData']&&'addCommentThread'!==_0x56d8e1&&_0x806a88['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x5f30da{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2bf01c){super(_0x2bf01c),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1ab453=this['context']['plugins']['get']($t);this['listenTo'](_0x1ab453,'_activateAnnotation',(_0x373b02,_0x5f0b8b)=>{for(const _0x33bfc2 of this['activeUIs']){const _0x375c46=this['_uis']['get'](_0x33bfc2);(0x0,this['uisData']['get'](_0x33bfc2)['filter'])(_0x5f0b8b)&&_0x375c46['setActiveAnnotation'](_0x5f0b8b);}}),this['listenTo'](_0x1ab453,'_deactivateAllAnnotations',()=>{for(const _0x1306f7 of this['activeUIs']){this['_uis']['get'](_0x1306f7)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1ab453['_visibleAnnotations'],'add',(_0x436862,_0x189c13)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x189c13);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x432fee){return this['activeUIs']['has'](_0x432fee);}['activate'](_0x3b6f80,_0x3a9469=this['defaultFilter']){const _0x7b79c7=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x3b6f80))throw new _0x4e5896('annotationsuis-missing-ui',this,{'uiName':_0x3b6f80});this['isActive'](_0x3b6f80)&&this['deactivate'](_0x3b6f80),this['activeUIs']['add'](_0x3b6f80);const _0x427560=new jt();Xt({'source':_0x7b79c7['_visibleAnnotations'],'target':_0x427560,'filter':_0x3a9469}),this['uisData']['set'](_0x3b6f80,{'collection':_0x427560,'filter':_0x3a9469});const _0xf20273=this['_uis']['get'](_0x3b6f80);_0xf20273['attach'](_0x427560),this['listenTo'](_0xf20273,'change:activeAnnotation',(_0x1cc811,_0xce7725,_0xf99551,_0x47aea1)=>{_0x47aea1&&_0x7b79c7['_removeActiveAnnotation'](_0x47aea1),_0xf99551&&_0x7b79c7['_addActiveAnnotation'](_0xf99551);});}['deactivate'](_0x401863){if(this['activeUIs']['delete'](_0x401863),!this['_uis']['has'](_0x401863))throw new _0x4e5896('annotationsuis-missing-ui',this,{'uiName':_0x401863});const _0x2d2ee7=this['_uis']['get'](_0x401863);_0x2d2ee7['detach'](),this['stopListening'](_0x2d2ee7),this['uisData']['get'](_0x401863)['collection']['destroy'](),this['uisData']['delete'](_0x401863);}['switchTo'](_0x1631da){if(!this['_uis']['has'](_0x1631da))throw new _0x4e5896('annotationsuis-missing-ui',this,{'uiName':_0x1631da});const _0x8d85be=this['context']['plugins']['get']($t),_0x575268=Array['from'](_0x8d85be['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1631da);const _0x75cee0=this['_uis']['get'](_0x1631da);_0x75cee0['setActiveAnnotation'](_0x575268),_0x75cee0['_setSelectedAnnotations']&&_0x575268&&_0x75cee0['_setSelectedAnnotations']([_0x575268]);}['deactivateAll'](){for(const _0xd29c8 of this['activeUIs'])this['deactivate'](_0xd29c8);}['register'](_0x1cb392,_0x337f97){if(this['_uis']['has'](_0x1cb392))throw new _0x4e5896('annotationsuis-register-already-registered');if('function'!=typeof _0x337f97['attach']||'function'!=typeof _0x337f97['detach']||'function'!=typeof _0x337f97['setActiveAnnotation'])throw new _0x4e5896('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1cb392,_0x337f97);}['refilterAnnotations'](){const _0x58535d=this['context']['plugins']['get']($t)['collection'],_0x3d9a50=new Map(),_0x5ac1a0=Array['from'](this['activeUIs']);for(const _0x296c5f of this['activeUIs']){const _0x3e7f47=this['uisData']['get'](_0x296c5f)['collection'];for(const _0x4b5e0d of _0x3e7f47)_0x3d9a50['set'](_0x4b5e0d,_0x296c5f);}for(const _0x2d29f2 of _0x58535d){const _0x5b4dcb=_0x3d9a50['get'](_0x2d29f2);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2d29f2);const _0x21f083=_0x5ac1a0['find'](_0x30e0d9=>this['uisData']['get'](_0x30e0d9)['filter'](_0x2d29f2));_0x5b4dcb!==_0x21f083&&(_0x5b4dcb&&this['uisData']['get'](_0x5b4dcb)['collection']['remove'](_0x2d29f2),_0x21f083&&this['uisData']['get'](_0x21f083)['collection']['add'](_0x2d29f2));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x96c3fe){const _0x415ea1=[];for(const _0x4cef58 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4cef58)['filter'])(_0x96c3fe)&&_0x415ea1['push'](_0x4cef58);}if(_0x415ea1['length']>0x1)throw new _0x4e5896('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x415ea1,'annotationType':_0x96c3fe['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x5c74f2('px');class Ai extends _0x73c3b7{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3bee8c){super(_0x3bee8c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5611b0,_0x197b3e)=>_0x5611b0+_0x197b3e),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x240b5e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x240b5e['to']('isAnimationDisabled',_0x2c7bab=>_0x2c7bab?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x240b5e['to']('top',_0x2a3e44=>gi(_0x2a3e44))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x37c61d=this['element']['clientHeight'];_0x37c61d&&(this['height']=_0x37c61d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x5f30da{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4319e9){super(_0x4319e9),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 _0x3a2bf3=this['context']['config']['get']('sidebar.container');_0x3a2bf3&&this['setContainer'](_0x3a2bf3);}['setContainer'](_0x57b4ce){if(!yi(_0x57b4ce))throw new _0x4e5896('sidebar-setcontainer-invalid-element');this['container']=_0x57b4ce;}['_attachToContainer']({viewClass:_0x5e70b9='',spaceBetweenItems:_0x1292d8=0x19}={}){if(!yi(this['container']))throw new _0x4e5896('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5e70b9,this['_spaceBetweenItems']=_0x1292d8;}['rearrange']({removedAnnotation:_0xe0e7dc,previousAnnotation:_0x3c9188,nextAnnotation:_0x1ba201}){const _0x40f926=this['getSidebarItemView'](_0xe0e7dc);this['view']['list']['remove'](_0x40f926),this['_destroySidebarItemView'](_0xe0e7dc),_0x3c9188&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3c9188)),_0x1ba201&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1ba201)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4f07fb,activatedAnnotation:_0xa0ef9,disableAnimationOnActivatedAnnotation:_0x480b4e}){if(this['_activeAnnotation']=_0xa0ef9,_0x4f07fb){_0x4f07fb['isActive']=!0x1;const _0x22c217=this['getSidebarItemView'](_0x4f07fb);_0x22c217&&_0x480b4e&&(_0x22c217['isAnimationDisabled']=!0x1);}if(_0xa0ef9){const _0x115348=this['getSidebarItemView'](_0xa0ef9);_0x115348&&(_0xa0ef9['isActive']=!0x0,_0x480b4e&&(_0x115348['isAnimationDisabled']=!0x0,_0x115348['top']+=0x1),this['_alignToTargetRect'](_0x115348));}}['_detachFromContainer'](_0x20f248){if(this['view']['element']['remove'](),_0x20f248){for(const _0x2d7ef1 of _0x20f248)this['_destroySidebarItemView'](_0x2d7ef1);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x575281,_0xb73041){_0xb73041||(_0xb73041=_0x575281['view']);const _0x18ecf0=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x18ecf0,_0x575281),this['_annotationToSidebarItemView']['set'](_0x575281,_0x18ecf0),_0x18ecf0['content']['add'](_0xb73041),this['listenTo'](_0x575281['view'],'change:targetRect',(_0x1782f2,_0x5ae21f,_0x597a38)=>{const _0x4e0a0f=this['_getTargetTop'](_0x575281,_0x597a38);_0x18ecf0['_targetTop']!=_0x4e0a0f&&(_0x18ecf0['_targetTop']=_0x4e0a0f,this['_setItemTop'](_0x18ecf0,_0x4e0a0f));}),this['listenTo'](_0x18ecf0,'change:top',()=>{this['_recalculate'](_0x18ecf0,'top');}),this['listenTo'](_0x18ecf0,'change:bottom',()=>{this['_recalculate'](_0x18ecf0,'bottom');}),this['_alignToTargetRect'](_0x18ecf0);const _0xfb22e2=this['_getItemBefore'](_0x18ecf0);if(_0xfb22e2)this['_alignAfterItem'](_0xfb22e2,_0x18ecf0)||this['_alignToTargetRect'](_0x18ecf0);else this['_alignToTargetRect'](_0x18ecf0);return this['_updateLastItem'](),this['view']['list']['add'](_0x18ecf0),_0x18ecf0;}['_alignForTopChange'](_0x184dd6){if(!_0x184dd6['content']['length'])return;const _0x155756=this['_getItemBefore'](_0x184dd6);if(!_0x155756)return;const _0x32ecc3=this['_sidebarItemViewToAnnotation']['get'](_0x155756),_0x23f056=this['_activeAnnotation'];_0x23f056&&_0x23f056===_0x32ecc3?this['_alignAfterItem'](_0x155756,_0x184dd6):this['_alignBeforeItem'](_0x184dd6,_0x155756);}['_alignForBottomChange'](_0x293f8c){if(!_0x293f8c['content']['length'])return;const _0xc5c67=this['_getItemAfter'](_0x293f8c);if(!_0xc5c67)return;const _0x104e03=this['_sidebarItemViewToAnnotation']['get'](_0xc5c67),_0x530560=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x28f1d7=this['_activeAnnotation'];_0x28f1d7&&_0x28f1d7===_0x104e03&&_0x530560?(this['_alignBeforeItem'](_0xc5c67,_0x293f8c),this['_alignAfterItem'](_0x293f8c,_0xc5c67)):_0x28f1d7&&_0x28f1d7===_0x104e03?this['_alignBeforeItem'](_0xc5c67,_0x293f8c):this['_alignAfterItem'](_0x293f8c,_0xc5c67);}['_recalculate'](_0x56919f,_0x554bca){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x51a435,changedProp:_0x590582}of this['_recalculateBuffer'])'top'===_0x590582?this['_alignForTopChange'](_0x51a435):this['_alignForBottomChange'](_0x51a435);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x56919f,'changedProp':_0x554bca});}['getSidebarItemView'](_0x248c31){return this['_annotationToSidebarItemView']['get'](_0x248c31);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x496579){const _0x1fe411=this['getSidebarItemView'](_0x496579);this['stopListening'](_0x1fe411),this['stopListening'](_0x496579['view']),_0x1fe411['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x496579),this['_sidebarItemViewToAnnotation']['delete'](_0x1fe411);}['_createSidebarView'](){const _0x2f925e=new _i(this['context']['locale']);return _0x2f925e['render'](),this['on']('change:_lastItem',(_0x2bf863,_0x45412d,_0x1de65e,_0x500fc8)=>{_0x500fc8&&_0x2f925e['unbind']('minHeight'),_0x1de65e?_0x2f925e['bind']('minHeight')['to'](_0x1de65e,'bottom'):_0x2f925e['minHeight']=null;}),_0x2f925e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x47a72e){const _0x3a0f87=this['_sidebarItemViewToAnnotation']['get'](_0x47a72e),_0x225062=_0x3a0f87&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3a0f87)-0x1);return _0x225062&&this['getSidebarItemView'](_0x225062)||null;}['_getItemAfter'](_0x3ccf17){const _0x32fe6c=this['_sidebarItemViewToAnnotation']['get'](_0x3ccf17),_0x52963e=_0x32fe6c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x32fe6c)+0x1);return _0x52963e&&this['getSidebarItemView'](_0x52963e)||null;}['_alignBeforeItem'](_0x1ed3ad,_0x10d2b0){_0x1ed3ad['updateHeight']();const _0x5843bc=vi(_0x10d2b0['bottom']+this['_spaceBetweenItems'],_0x1ed3ad['top']);return!!_0x5843bc&&(this['_setItemTop'](_0x10d2b0,_0x10d2b0['top']-_0x5843bc),!0x0);}['_alignAfterItem'](_0x510688,_0x13da08){_0x510688['updateHeight']();const _0x2c2556=vi(_0x510688['bottom']+this['_spaceBetweenItems'],_0x13da08['top']);return!!_0x2c2556&&(this['_setItemTop'](_0x13da08,_0x13da08['top']+_0x2c2556,!0x1),!0x0);}['_alignToTargetRect'](_0x319ca5){const _0x2a0074=this['_sidebarItemViewToAnnotation']['get'](_0x319ca5);if(!_0x2a0074||!_0x2a0074['target']||!_0x2a0074['targetRect'])return;const _0x5e8b6e=this['_getTargetTop'](_0x2a0074,_0x2a0074['targetRect']);this['_setItemTop'](_0x319ca5,_0x5e8b6e);}['_getTargetTop'](_0x3d68db,_0x468d97){if(null===_0x468d97)return 0x0;if(_0x3d68db['target']instanceof _0x1419a3)return _0x468d97['top'];{const _0x107b1f=new _0x1419a3(this['view']['element'])['top'];return _0x468d97['top']-_0x107b1f;}}['_setItemTop'](_0x16f593,_0x334c59,_0x38a8a9=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x38a8a9&&(_0x334c59=Math['max'](_0x334c59,this['_getMaxAvailableTop'](_0x16f593))),_0x16f593['top']=_0x334c59;}['_getMaxAvailableTop'](_0x2abe5a){let _0x2faeb4=this['_getItemBefore'](_0x2abe5a),_0x2ac071=0x0;for(;_0x2faeb4;)_0x2faeb4['updateHeight'](),_0x2ac071+=this['_spaceBetweenItems']+_0x2faeb4['height'],_0x2faeb4=this['_getItemBefore'](_0x2faeb4);return _0x2ac071;}}function vi(_0x1d2ab0,_0x41e740){return Math['max'](_0x1d2ab0-_0x41e740,0x0);}function yi(_0x137251){return null!==_0x137251&&'object'==typeof _0x137251&&0x1===_0x137251['nodeType'];}class Ci extends _0x5f30da{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ad8cb){super(_0x3ad8cb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2957ce(),this['_refreshPositioningDebounced']=_0x538c79(()=>{_0x3ad8cb['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5b1193=this['context']['plugins']['get'](pi),_0x40114e=this['context']['plugins']['get'](Ti);_0x5b1193['register']('wideSidebar',this),_0x40114e['container']&&_0x5b1193['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x55bff1){if(_0x55bff1===this['activeAnnotation'])return;const _0x4783bf=this['context']['plugins']['get'](Ti);_0x4783bf['_activeAnnotation']=_0x55bff1;const _0x4e04f8=this['activeAnnotation'];_0x4783bf['refresh']({'blurredAnnotation':_0x4e04f8,'activatedAnnotation':_0x55bff1}),this['activeAnnotation']=_0x55bff1;}['attach'](_0x1cc1af){this['annotations']=_0x1cc1af;const _0x55b4bf=this['context']['plugins']['get'](Ti);if(_0x55b4bf['_annotations']=_0x1cc1af,this['isAttached'])throw new _0x4e5896('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x55b4bf,'set:container',()=>{this['detach'](),this['listenTo'](_0x55b4bf,'change:container',_0x397fc5=>{_0x397fc5['off'](),this['attach'](_0x1cc1af);});}),_0x55b4bf['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x138544=_0x8d9f0b=>{_0x8d9f0b['updateTargetRect'](),_0x55b4bf['addAnnotation'](_0x8d9f0b);};for(const _0x2a3ed3 of _0x1cc1af)_0x138544(_0x2a3ed3);this['listenTo'](_0x1cc1af,'add',(_0x550f6f,_0x451f31)=>{_0x138544(_0x451f31);}),this['listenTo'](_0x1cc1af,'remove',(_0x2b345f,_0x1d70ce,_0x4c696b)=>{_0x55b4bf['rearrange']({'removedAnnotation':_0x1d70ce,'previousAnnotation':_0x1cc1af['get'](_0x4c696b-0x1),'nextAnnotation':_0x1cc1af['get'](_0x4c696b+0x1)}),_0x1d70ce===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1cc1af,'focus',(_0x2a22ef,_0x3d56c5)=>{this['setActiveAnnotation'](_0x3d56c5);}),this['listenTo'](_0x1cc1af,'blur',()=>{this['setActiveAnnotation'](null);});const _0x559509=this['context']instanceof _0x3fe192?this['context']['editors']:new _0x2957ce([this['context']]);for(const _0x1ce5d9 of _0x559509)this['_integrateWithEditorAnnotations'](_0x1ce5d9);this['listenTo'](_0x559509,'add',(_0x53c230,_0x26a9ef)=>{this['listenTo'](_0x26a9ef,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x26a9ef);});}),this['listenTo'](_0x559509,'remove',(_0x1ab7d5,_0x5db258)=>{_0x5db258['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5db258['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4e5896('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1fbbbe=this['context']['plugins']['get'](Ti);_0x1fbbbe['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1fbbbe),this['stopListening'](this['annotations']),this['context']instanceof _0x3fe192&&this['stopListening'](this['context']['editors']);for(const _0x49a2ef of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x49a2ef);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5cc3d7){if(!_0x5cc3d7['plugins']['has']('EditorAnnotations'))return;const _0x137b9c=_0x5cc3d7['plugins']['get']('EditorAnnotations'),_0x8a951a=()=>{const _0x4967b6=_0x137b9c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4967b6[0x0]||null);};this['listenTo'](_0x137b9c,'refresh',_0x8a951a),this['listenTo'](_0x137b9c,'blur',(_0x2b36df,{isAnnotationTracked:_0x4a4a85})=>{this['activeAnnotation']&&_0x4a4a85(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x137b9c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x359414=>{_0x137b9c['hasDomSelection']()&&(_0x8a951a(),_0x359414['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x137b9c);}['_destroyEditorAnnotationsIntegration'](_0x460316){this['stopListening'](_0x460316),this['_editorAnnotations']['remove'](_0x460316);}}class Ii extends _0x39c4f7{['counterView'];constructor(_0x454723){super(_0x454723);const _0x47e7a9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x12dcc3,_0x26a24c)=>_0x12dcc3?'...':_0x26a24c['toString']()),this['set']('annotationType',''),this['icon']=_0x1b267d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x73c3b7(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x47e7a9['to']('annotationType',_0x50ad1a=>'ck-annotation-counter__badge--'+_0x50ad1a),_0x47e7a9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x47e7a9['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x5f30da{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f2ce8){super(_0x2f2ce8),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xc25130())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2957ce(),this['_refreshPositioningDebounced']=_0x538c79(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xbfe48){this['annotations']=_0xbfe48;const _0x2ef519=this['context']['plugins']['get'](Ti),_0x36f77a=this['balloonPanelView'];if(_0x2ef519['_annotations']=_0xbfe48,this['isAttached'])throw new _0x4e5896('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2ef519,'set:container',()=>{this['detach'](),this['listenTo'](_0x2ef519,'change:container',_0x15a7b9=>{_0x15a7b9['off'](),this['attach'](_0xbfe48);});}),_0x2ef519['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x13a091=_0x19ec6a=>{const _0x2df9ae=new Ii(this['context']['locale']);_0x2ef519['addAnnotation'](_0x19ec6a,_0x2df9ae),this['_annotationToNarrowView']['set'](_0x19ec6a,_0x2df9ae),_0x2df9ae['bind']('isDirty','annotationType','number')['to'](_0x19ec6a['view'],'isDirty','type','length'),_0x2df9ae['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x36f77a['content']['first']!==_0x19ec6a['view']?(this['_showBalloon'](_0x19ec6a),_0x19ec6a['view']['element']['focus'](),this['setActiveAnnotation'](_0x19ec6a)):this['setActiveAnnotation'](null);});};for(const _0x21b9d7 of _0xbfe48)_0x13a091(_0x21b9d7);this['listenTo'](_0xbfe48,'add',(_0x472945,_0x14be81)=>{_0x13a091(_0x14be81);}),this['listenTo'](_0xbfe48,'remove',(_0x532af8,_0x3459b7,_0x5d43e7)=>{this['_annotationToNarrowView']['get'](_0x3459b7)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3459b7),_0x2ef519['rearrange']({'removedAnnotation':_0x3459b7,'previousAnnotation':_0xbfe48['get'](_0x5d43e7-0x1),'nextAnnotation':_0xbfe48['get'](_0x5d43e7+0x1)}),_0x3459b7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xbfe48,'focus',(_0x1ce30a,_0x3812b3)=>{this['setActiveAnnotation'](_0x3812b3);}),this['listenTo'](_0xbfe48,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x380a68,_0xc9e12)=>{_0xc9e12['keyCode']===_0x1b2238['esc']&&_0x36f77a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x36f77a['content']['first']),this['_hideBalloon'](),_0xc9e12['stopPropagation'](),_0xc9e12['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x54eba7,_0x1e3d80)=>{const _0x39602c=_0x1e3d80['target'];_0x36f77a['isVisible']&&_0x36f77a['element']['contains'](_0x39602c)||_0x2ef519['view']['element']['contains'](_0x39602c)||_0x54eba7['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x823d71=>_0x823d71['contains'](_0x39602c))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x24caba=this['context']instanceof _0x3fe192?this['context']['editors']:new _0x2957ce([this['context']]);for(const _0xa99b80 of _0x24caba)this['_integrateWithEditorAnnotations'](_0xa99b80);this['listenTo'](_0x24caba,'add',(_0xac665e,_0x2db0cb)=>{this['listenTo'](_0x2db0cb,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2db0cb);});}),this['listenTo'](_0x24caba,'remove',(_0x23b5d1,_0x340e69)=>{_0x340e69['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x340e69['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x33a787){if(_0x33a787===this['activeAnnotation'])return;const _0x4ff36b=this['context']['plugins']['get'](Ti);if(_0x4ff36b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x33a787,'disableAnimationOnActivatedAnnotation':!0x0}),_0x33a787)_0x4ff36b['getSidebarItemView'](_0x33a787)?this['_showBalloon'](_0x33a787):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x33a787;}['detach'](){if(!this['isAttached'])throw new _0x4e5896('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x112065=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3db43a=>_0x3db43a['destroy']()),this['_annotationToNarrowView']['clear'](),_0x112065['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3fe192&&this['stopListening'](this['context']['editors']);for(const _0x3bf040 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3bf040);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'](_0x51365b){if(!_0x51365b['plugins']['has']('EditorAnnotations'))return;const _0xfcff51=_0x51365b['plugins']['get']('EditorAnnotations'),_0x11ba9c=this['context']['plugins']['get'](Ti),_0x33707f=this['annotations'],_0x25eb40=this['balloonPanelView'],_0x41f9bc=()=>{const _0x2e2945=_0xfcff51['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2e2945),this['setActiveAnnotation'](_0x2e2945[0x0]||null);};this['listenTo'](_0xfcff51,'refresh',_0x41f9bc),this['listenTo'](_0xfcff51,'blur',(_0x50fe11,{isAnnotationTracked:_0x28d794})=>{this['activeAnnotation']&&_0x28d794(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xfcff51,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x33707f,'blur',_0x1ec8b8=>{_0xfcff51['hasDomSelection']()&&_0x1ec8b8['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x279a81,_0xfe59a3)=>{const _0x231108=_0xfe59a3['target'];_0x25eb40['isVisible']&&_0x25eb40['element']['contains'](_0x231108)||_0x11ba9c['view']['element']['contains'](_0x231108)||this['activeAnnotation']&&_0xfcff51['hasDomSelection']()&&(_0x41f9bc(),_0x279a81['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0xfcff51);}['_destroyEditorAnnotationsIntegration'](_0x572e47){_0x572e47&&(this['stopListening'](_0x572e47),this['_editorAnnotations']['remove'](_0x572e47));}['_setSelectedAnnotations'](_0x3f7324){for(const _0x19cb18 of this['_selectedAnnotations'])_0x3f7324['includes'](_0x19cb18)||this['_manuallyClosedAnnotationViews']['delete'](_0x19cb18['view']);this['_selectedAnnotations']=_0x3f7324;}['_refreshPositioning'](){const _0x4606e2=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4606e2['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x14446b){if(this['_manuallyClosedAnnotationViews']['has'](_0x14446b['view']))return;const _0x1407a2=this['balloonPanelView']['content']['first'];_0x1407a2!==_0x14446b['view']?(_0x1407a2&&this['_detachListeners'](_0x1407a2),this['_attachListeners'](_0x14446b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x14446b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4b2169=this['balloonPanelView']['content']['first'],_0x2e63e0=_0x4b2169&&this['annotations']['getByView'](_0x4b2169);if(!_0x2e63e0||!this['_annotationToNarrowView']['has'](_0x2e63e0))return;const _0xcdec33=this['_annotationToNarrowView']['get'](_0x2e63e0)['element'],_0x13b0fc=(function(){const _0x28d084=ht['defaultPositions'];return[_0x28d084['southArrowNorthEast'],_0x28d084['northArrowSouthEast'],_0x28d084['southArrowNorth'],_0x28d084['northArrowSouth'],_0x28d084['southArrowNorthWest'],_0x28d084['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xcdec33,'positions':_0x13b0fc});}['_hideBalloon'](){const _0x32ac13=this['balloonPanelView'],_0xca71bf=_0x32ac13['content']['first'];_0xca71bf&&(this['_detachListeners'](_0xca71bf),_0x32ac13['unpin'](),_0x32ac13['content']['clear']());}['_attachListeners'](_0xc33579){this['listenTo'](_0xc33579,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xc33579,'Esc',(_0x725b67,_0x4fbcf5)=>{this['_manuallyClosedAnnotationViews']['add'](_0xc33579),this['_hideBalloon'](),_0x4fbcf5();});}['_detachListeners'](_0x15e544){this['stopListening'](_0x15e544);}}class Ei extends _0x1576f0{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4431fc){super(_0x4431fc),_0x4431fc['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4431fc['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x538c79(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x1ad430=this['editor']['plugins']['get'](pi);_0x1ad430['context']===this['editor']&&(_0x1ad430['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4d76f7,_0x479f57)=>{const _0x44c023=this['_balloon'];if(this['isAttached']&&_0x44c023['visibleView']){const _0x5d62fe=this['annotations']['getByView'](_0x44c023['visibleView']);_0x5d62fe&&this['_closeAnnotation'](_0x5d62fe),_0x479f57();}}));}['afterInit'](){const _0x36a3f8=this['editor']['plugins']['get'](pi);_0x36a3f8['context']===this['editor']&&(_0x36a3f8['hasActive']()||_0x36a3f8['switchTo']('inline'));}['setActiveAnnotation'](_0x2f67fe){_0x2f67fe!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2f67fe&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2f67fe)&&this['_addAnnotationToBalloon'](_0x2f67fe,!0x0),_0x2f67fe['isActive']=!0x0),_0x2f67fe||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2f67fe);}['attach'](_0x529c06){this['annotations']=_0x529c06;const _0x1fab79=this['editor']['plugins']['get'](pi),_0x6d6ced=this['_balloon'];if(this['isAttached'])throw new _0x4e5896('inlineannotations-attach-already-attached',this);if(_0x1fab79['context']!==this['editor'])throw new _0x4e5896('inlineannotations-not-allowed-with-context',this);const _0x466e33=this['editor']['plugins']['get'](si);this['listenTo'](_0x466e33,'refresh',()=>{const _0x63b5dc=_0x466e33['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1fd735,_0x313297;!this['_forceRefresh']&&(_0x1fd735=_0x63b5dc,_0x313297=this['_selectedAnnotations'],_0x1fd735['length']===_0x313297['length']&&_0x1fd735['every'](_0x3b69ae=>_0x313297['includes'](_0x3b69ae)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x63b5dc),this['setActiveAnnotation'](_0x63b5dc[0x0]||null));}),this['listenTo'](_0x466e33,'blur',(_0x10d9d9,{isAnnotationTracked:_0xb71e51})=>{this['activeAnnotation']&&_0xb71e51(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x466e33,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x542a0a,_0x31a88a,_0x4c1835)=>{_0x4c1835||this['setActiveAnnotation'](null);}),this['listenTo'](_0x529c06,'remove',(_0x51c203,_0x2e1ab5)=>{this['_removeAnnotationFromBalloon'](_0x2e1ab5),_0x2e1ab5===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x6d6ced,'change:visibleView',(_0x17bcaf,_0x1af733,_0x4e241d,_0x367bb1)=>{_0x367bb1&&this['stopListening'](_0x367bb1);const _0x141514=_0x529c06['getByView'](_0x4e241d);_0x4e241d&&_0x141514&&(this['listenTo'](_0x4e241d,'change:height',()=>{_0x6d6ced['updatePosition']();}),this['listenTo'](_0x4e241d,'Esc',()=>{this['_closeAnnotation'](_0x141514),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x141514&&this['setActiveAnnotation'](_0x141514));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x6d6ced['visibleView']&&(_0x529c06['getByView'](_0x6d6ced['visibleView'])&&_0x6d6ced['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 _0x4e5896('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5c4fd3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5c4fd3);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x4d61a2){for(const _0xc835ec of this['_selectedAnnotations'])_0x4d61a2['includes'](_0xc835ec)||this['_manuallyClosed']['delete'](_0xc835ec);for(const _0x4f111b of this['annotations'])_0x4d61a2['includes'](_0x4f111b)||this['_removeAnnotationFromBalloon'](_0x4f111b);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x16daa2 of _0x4d61a2)this['_addAnnotationToBalloon'](_0x16daa2);}this['_selectedAnnotations']=_0x4d61a2;}['_addAnnotationToBalloon'](_0x2a809a,_0x10c517=!0x1){this['_manuallyClosed']['has'](_0x2a809a)||(this['_addedAnnotations']['has'](_0x2a809a)||this['_balloon']['hasView'](_0x2a809a['view'])||(this['_addedAnnotations']['add'](_0x2a809a),this['_balloon']['add']({'stackId':_0x2a809a['view']['id'],'view':_0x2a809a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2a809a)}})),_0x10c517&&this['_balloon']['showStack'](_0x2a809a['view']['id']));}['_getBalloonTargetForAnnotation'](_0x170661){const _0x44e712=_0x170661['target'],_0x2889b3=this['editor']['editing']['view'],_0x4aa0cd=_0x2889b3['document']['selection']['getFirstRange'](),_0x28989a=_0x2889b3['domConverter']['viewRangeToDom'](_0x4aa0cd);if(_0x28989a['collapse'](!0x0),_0x44e712){if(_0x44e712 instanceof _0x1419a3)return _0x44e712;let _0x4406b4=[];for(const _0x4aa273 of _0x44e712)_0x4406b4['push'](..._0x1419a3['getDomElementRects'](_0x4aa273));_0x4406b4=function(_0x1209ea){const _0x45d844=[];let _0x4a8e3c=_0x1209ea[0x0];for(let _0x167dc0=0x1;_0x167dc0<_0x1209ea['length'];_0x167dc0++)if(Ni(_0x4a8e3c,_0x1209ea[_0x167dc0])){const _0x27847c=_0x1209ea[_0x167dc0]['width'];_0x4a8e3c['width']+=_0x27847c,_0x4a8e3c['right']+=_0x27847c;}else _0x45d844['push'](_0x4a8e3c),_0x4a8e3c=_0x1209ea[_0x167dc0];return _0x45d844['push'](_0x4a8e3c),_0x45d844;}(_0x4406b4);const _0x48194e=_0x28989a['getBoundingClientRect']();return _0x4406b4['find'](_0x4e4fea=>_0x4e4fea['top']<=_0x48194e['top']&&_0x4e4fea['bottom']>=_0x48194e['bottom']&&_0x4e4fea['left']<=_0x48194e['left']&&_0x4e4fea['right']>=_0x48194e['right'])||_0x4406b4[0x0];}return _0x170661['targetRect']||_0x28989a;}['_removeAnnotationFromBalloon'](_0x36effa){this['_addedAnnotations']['has'](_0x36effa)&&this['_balloon']['hasView'](_0x36effa['view'])&&(this['_addedAnnotations']['delete'](_0x36effa),this['_balloon']['remove'](_0x36effa['view']));}['_closeAnnotation'](_0x26a17f){this['_manuallyClosed']['add'](_0x26a17f),this['_removeAnnotationFromBalloon'](_0x26a17f);}}function Ni(_0x2afd3d,_0x5b1d83){return _0x2afd3d['top']===_0x5b1d83['top']&&_0x2afd3d['bottom']===_0x5b1d83['bottom']&&_0x2afd3d['right']===_0x5b1d83['left'];}class ki extends _0x73c3b7{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x2f657d,_0x4d2a4e){super(_0x2f657d),this['set']('isEmpty',!_0x4d2a4e['length']),this['focusTracker']=new _0x4691cf(),this['_annotationViews']=_0x4d2a4e,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x1962b4({'focusables':_0x4d2a4e,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4d2a4e,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4d2a4e,'remove',(_0x537421,_0x11b7ed)=>{_0x11b7ed['isActive']&&this['focus'](),_0x4d2a4e['length']||(this['isEmpty']=!0x0);});const _0x5d3d5d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x2f657d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4d2a4e},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5d3d5d['if']('isEmpty','ck-hidden',_0x9149a1=>!_0x9149a1)]},'children':[{'text':bt(_0x2f657d,'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 _0x14d442 of this['_annotationViews'])this['focusTracker']['add'](_0x14d442['element']);this['_annotationViews']['on']('change',(_0x3e21d0,{added:_0x242401,removed:_0x58b214})=>{for(const _0x2e4f51 of _0x242401)this['focusTracker']['add'](_0x2e4f51['element']);for(const _0x2ce88b of _0x58b214)this['focusTracker']['remove'](_0x2ce88b['element']);});}}class Oi extends _0x5f30da{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x2be0a4){super(_0x2be0a4),this['archivedThreads']=new _0x2957ce();}['init'](){const _0x464dbb=this['context'],_0x469b75=_0x464dbb['plugins']['get'](Qt),_0x458562=_0x464dbb['plugins']['get']($t);this['listenTo'](_0x469b75,'addCommentThread',(_0x38fef4,{threadId:_0x13c346})=>{const _0x251a2e=_0x469b75['getCommentThread'](_0x13c346);_0x251a2e['archivedAt']&&this['archivedThreads']['add'](_0x251a2e,this['_calculatePosition'](_0x251a2e['archivedAt'])),this['listenTo'](_0x251a2e,'change:archivedAt',(_0x2bfd52,_0x2e109b,_0xbf5fad)=>{_0xbf5fad?this['archivedThreads']['has'](_0x251a2e)||this['archivedThreads']['add'](_0x251a2e,this['_calculatePosition'](_0x251a2e['archivedAt'])):this['archivedThreads']['has'](_0x251a2e)&&this['archivedThreads']['remove'](_0x251a2e);});}),this['listenTo'](_0x469b75,'removeCommentThread',(_0x3f73cb,{threadId:_0x2f56a5})=>{const _0x535015=_0x469b75['getCommentThread'](_0x2f56a5);this['stopListening'](_0x535015),this['archivedThreads']['has'](_0x535015)&&this['archivedThreads']['remove'](_0x535015);},{'priority':'highest'}),this['listenTo'](_0x458562['collection'],'focus',(_0x47c990,_0x118e39)=>{_0x118e39['isVisible']||(_0x118e39['isActive']=!0x0,_0x458562['activate'](_0x118e39));});}['_calculatePosition'](_0x5b14b5){const _0x494b99=[...this['archivedThreads']]['findIndex'](_0x41e636=>_0x41e636['archivedAt']<_0x5b14b5);return _0x494b99>-0x1?_0x494b99:this['archivedThreads']['length'];}}class Mi extends _0x1576f0{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x2d77ea){super(_0x2d77ea),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4a2264=this['editor'],_0x3e15fc=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4a2264['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x39c4f7,!0x0)),_0x4a2264['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3883e4=this['_createCommentsArchiveButton'](ot);return _0x3883e4['set']({'role':'menuitemcheckbox'}),_0x3883e4;});const _0xbe4209=_0x4a2264['plugins']['get'](Oi),_0x360316=_0x4a2264['plugins']['get']('Annotations'),_0x31fb6b=_0x4a2264['plugins']['get']('CommentsRepository');_0xbe4209['archivedThreads']['forEach'](_0x4be161=>{this['_handleNewThread'](_0x4be161);}),this['listenTo'](_0xbe4209['archivedThreads'],'add',(_0x44a704,_0x17a004)=>{this['_handleNewThread'](_0x17a004);}),this['listenTo'](_0x360316['collection'],'add',(_0x275247,_0x5e5d30)=>{const _0x53eef9=this['_pendingThreads']['find'](_0x1d2e2e=>{const _0x12263c=_0x31fb6b['_threadToController']['get'](_0x1d2e2e);return _0x12263c&&_0x5e5d30['innerView']===_0x12263c['view'];});if(_0x53eef9){const _0x5c0f8a=this['_calculatePosition'](_0x53eef9['archivedAt']);this['_addAnnotationToArchive'](_0x5e5d30,_0x5c0f8a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x53eef9),0x1);}}),this['listenTo'](_0xbe4209['archivedThreads'],'remove',(_0x49b2c6,_0x431cf1)=>{const _0x408cd2=_0x4a2264['config']['get']('collaboration.channelId');if(!_0x408cd2||_0x431cf1['channelId']===_0x408cd2){if(this['_pendingThreads']['includes'](_0x431cf1))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x431cf1),0x1);else{const _0x39db61=_0x31fb6b['_threadToController']['get'](_0x431cf1),_0x4ea320=_0x360316['getByInnerView'](_0x39db61['view']);this['annotationViews']['remove'](_0x4ea320['view']),this['stopListening'](_0x4ea320),this['stopListening'](_0x4ea320['focusableElements']);}}}),this['listenTo'](_0x360316['collection'],'add',(_0x35f65c,_0x4cf2ad)=>{this['listenTo'](_0x4cf2ad,'escape',_0x3e15fc);}),this['listenTo'](_0x360316['collection'],'remove',(_0x5430d2,_0x4c4396)=>{this['stopListening'](_0x4c4396,'escape',_0x3e15fc);});}['_addAnnotationToArchive'](_0x6c5821,_0x21bec0){this['listenTo'](_0x6c5821,'set:isVisible',_0x3f0f82=>{_0x3f0f82['return']=!0x1,_0x3f0f82['stop']();}),this['annotationViews']['add'](_0x6c5821['view'],_0x21bec0);}['_handleNewThread'](_0x214eb7){const _0x5f0468=this['editor']['plugins']['get']('CommentsRepository'),_0x3bbc8b=this['editor']['plugins']['get']('Annotations'),_0x24956c=this['editor']['config']['get']('collaboration.channelId');if(!_0x24956c||_0x214eb7['channelId']===_0x24956c){const _0x35aff2=_0x5f0468['_threadToController']['get'](_0x214eb7);if(!_0x35aff2)return void this['_pendingThreads']['push'](_0x214eb7);const _0x24502e=this['_calculatePosition'](_0x214eb7['archivedAt']),_0x1d1a7f=_0x3bbc8b['getByInnerView'](_0x35aff2['view']);_0x1d1a7f['isVisible']&&_0x3bbc8b['_visibleAnnotations']['remove'](_0x1d1a7f),this['_addAnnotationToArchive'](_0x1d1a7f,_0x24502e);}}['_calculatePosition'](_0x5b8ad2){const _0x581570=this['editor']['config']['get']('collaboration.channelId'),_0x22e13f=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x32bb91=>_0x32bb91['channelId']===_0x581570)['findIndex'](_0x136ff9=>_0x136ff9['archivedAt']<_0x5b8ad2);return _0x22e13f<0x0||_0x22e13f>this['annotationViews']['length']?this['annotationViews']['length']:_0x22e13f-0x1;}['_toggleDialog'](){const _0x1d1b4e=this['editor'],_0x5097b2=_0x1d1b4e['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x1d1b4e['locale'],this['annotationViews'])),'commentsArchive'===_0x5097b2['id']?_0x5097b2['hide']():_0x5097b2['show']({'id':'commentsArchive','title':bt(_0x1d1b4e['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2c3d78,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2eafc9,_0x14adab=!0x1){const _0x511888=this['editor']['locale'],_0x55e729=this['editor']['plugins']['get']('Dialog'),_0x47de0f=new _0x2eafc9(_0x511888);return _0x47de0f['bind']('isEnabled')['to'](this,'isEnabled'),_0x47de0f['bind']('isOn')['to'](_0x55e729,'id',_0x9444f5=>'commentsArchive'===_0x9444f5),_0x47de0f['set']({'label':bt(_0x511888,'COMMENTS_ARCHIVE'),'icon':_0x2c3d78,'isToggleable':!0x0}),_0x14adab&&(_0x47de0f['tooltip']=!0x0),this['listenTo'](_0x47de0f,'execute',()=>this['_toggleDialog']()),_0x47de0f;}['_hideDialogOnAnnotationEscape']=_0x169612=>{const _0x5a320b=_0x169612['source'];if(!this['annotationViews']['has'](_0x5a320b['view']))return;const _0xaca49d=this['editor']['plugins']['get']('Dialog');_0xaca49d['isOpen']&&'commentsArchive'===_0xaca49d['id']&&(_0xaca49d['hide'](),_0x169612['stop']());};}class Ri extends _0x1576f0{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x3bb28c,ContextPlugin as _0x3d766a,PendingActions as _0x582bd3,Command as _0x11a9d9,Plugin as _0x3eacd6,Context as _0x35effb}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x5d3602,uid as _0x17d94f,KeystrokeHandler as _0x212e53,FocusTracker as _0x340c23,diff as _0x32dd70,Collection as _0x2ed34f,Rect as _0x1a3832,CKEditorError as _0x36d19a,first as _0x2ca59a,priorities as _0x9cf61,scrollViewportToShowTarget as _0x12c9fb,getEnvKeystrokeText as _0x57757a,toUnit as _0x23edf6,DomEmitterMixin as _0x17b3bd,keyCodes as _0x41b313}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x348ff9,AriaDescriptionView as _0x1f142b,setupThreadKeyboardNavigation as _0x4af483,ConfirmMixin as _0x25ab94,LateFocusButtonView as _0x5d11a7,trimHtml as _0x58d428,LateFocusDropdownButtonView as _0x1dc70e,FOCUS_ANNOTATION_KEYSTROKE as _0x46e7bf,Users as _0xdd578,getDateTimeFormatter as _0x3a0881,hashObject as _0x3066e4,getAllMarkersDomElementsSorted as _0x29895f,surroundingMarkersDetector as _0x316fd3}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x3cc0da,cloneDeep as _0x38963a,set as _0x5f0b07,unset as _0x333a25,isEqual as _0x2de9c5,debounce as _0x58129b}from'es-toolkit/compat';import{IconUndo as _0x216496,IconCheck as _0x16a453,IconPencil as _0x175c6f,IconRemoveComment as _0x47404e,IconThreeVerticalDots as _0x2f61fc,IconAddComment as _0x49bd39,IconCommentsArchive as _0x500afa}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x216513,InlineEditableUIView as _0x1f6cc7,EditorUI as _0x16f609,View as _0x719be3,FocusCycler as _0x567dee,ButtonView as _0x542a2,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x5d3602(){['model'];['view'];constructor(_0xdd98c4,_0x2d631d){super(),this['model']=_0xdd98c4,this['model']['_isAttached']=!0x0,this['view']=_0x2d631d,this['listenTo'](_0x2d631d,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x2d631d,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x2d631d,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x2d631d,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x2d631d,'addComment',(_0x1e7dbd,_0x31b8e2)=>this['addComment'](_0x31b8e2)),this['listenTo'](_0x2d631d,'updateComment',(_0x3fe76a,_0x391627,_0x3e4e4c)=>this['updateComment'](_0x391627,_0x3e4e4c)),this['listenTo'](_0x2d631d,'removeComment',(_0x39e983,_0xe51822)=>this['removeComment'](_0xe51822));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x29ac8d){this['model']['addComment']({'content':_0x29ac8d,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x1bc3ed,_0x4d6fcd){this['model']['getComment'](_0x1bc3ed)['update']({'content':_0x4d6fcd});}['removeComment'](_0x4e3008){this['model']['getComment'](_0x4e3008)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x5c542c,_0x595674,_0xa7ada6){const t=_0x5c542c['t'];switch(_0x595674){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'},_0xa7ada6);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'},_0xa7ada6);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'},_0xa7ada6);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'},_0xa7ada6);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0xa7ada6);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'},_0xa7ada6);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'},_0xa7ada6);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'},_0xa7ada6);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 Et extends _0x216513{['main'];['editable'];constructor(_0x5a3aa8,_0x48b4b5){super(_0x5a3aa8);const _0x1d6551=_0x17d94f();this['main']=this['createCollection'](),this['editable']=new _0x1f6cc7(_0x5a3aa8,_0x48b4b5,void 0x0,{'label':()=>bt(_0x5a3aa8,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x5a3aa8['uiLanguageDirection'],'lang':_0x5a3aa8['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x1d6551},'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 Nt extends _0x16f609{['view'];constructor(_0xb89bfb){super(_0xb89bfb),this['view']=new Et(_0xb89bfb['locale'],_0xb89bfb['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x56f3e0=this['editor']['editing']['view'],_0x296994=this['view']['editable'],_0x11ad5a=_0x56f3e0['document']['getRoot']();_0x296994['name']=_0x11ad5a['rootName'],this['view']['render']();const _0x1f84c8=_0x296994['element'];this['setEditableElement'](_0x296994['name'],_0x1f84c8),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x56f3e0['attachDomRoot'](_0x1f84c8),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x5d3602(_0x3bb28c){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>kt)());constructor(_0x38f89e={}){function _0x1b6aa1(_0x41362c){return _0x41362c['map'](_0x41c4e2=>String['fromCharCode'](_0x41c4e2))['join']('');}(_0x38f89e=Object['assign']({},_0x38f89e))['plugins']||(_0x38f89e['plugins']=Ot['defaultPlugins']),super(_0x38f89e),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x1b6aa1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1b6aa1([0x76,0x69,0x65,0x77])][_0x1b6aa1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1b6aa1([0x61,0x75,0x74,0x6f]),this[_0x1b6aa1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1b6aa1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1b6aa1([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1b6aa1([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1b6aa1([0x6f,0x6b])});}['create'](){const _0x208c9e=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x208c9e))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x301b36=>{const _0x55d99e=this['model']['document']['getRoot'](),_0x22471b=_0x55d99e&&_0x55d99e['getChild'](_0x55d99e['childCount']-0x1);_0x301b36['setSelection'](_0x22471b,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x4dfa0b=this['editing']['view'],_0x1c1035=_0x4dfa0b['document']['getRoot'](),_0x3c987b=_0x1c1035['getChild'](0x0);_0x1c1035['childCount']>0x1||!_0x3c987b||'p'!=_0x3c987b['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x4dfa0b,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3c987b['placeholder']=this['placeholder']),ut({'view':_0x4dfa0b,'element':_0x3c987b,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3c987b);}}class Mt extends _0x719be3{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3f1dea,_0xf255c5={}){super(_0x3f1dea),this['editor']=null,this['_editorConfig']=_0xf255c5,this['set']('value',_0xf255c5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x3f1dea,'Reply...')),this['set']('submitLabel',bt(_0x3f1dea,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x212e53(),this['focusTracker']=new _0x340c23(),this['focusCycler']=new _0x567dee({'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',(_0x3ca5ef,_0x3782b6)=>{this['cancelButtonView']['fire']('execute'),_0x3782b6();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5357c1,_0x5e29cf)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5e29cf());}),this['on']('submit',(_0x2d0b0e,_0xea5a00)=>{_0xea5a00['length']>0xfde8?(alert(bt(_0x3f1dea,'TOO_LONG_COMMENT_ALERT',[_0xea5a00['length'],0xfde8])),_0x2d0b0e['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1cbebf=this['editor'];this['element']['insertBefore'](_0x1cbebf['ui']['element'],this['element']['firstChild']),_0x1cbebf['model']['document']['on']('change',()=>this['value']=_0x1cbebf['getData']()),_0x1cbebf['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1cbebf['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x39abc8){-0x1===_0x39abc8?(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:_0x3ece0e}=this,_0x25c17b=new _0x542a2(_0x3ece0e);return _0x25c17b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x25c17b['withText']=!0x0,_0x25c17b['bind']('label')['to'](this,'submitLabel'),_0x25c17b['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x25c17b['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2c36ca,_0x1539a6)=>!_0x1539a6&&!!_0x2c36ca['trim']()),_0x25c17b;}['_createCancelButton'](){const {locale:_0x590e75}=this,_0x11f472=new _0x542a2(_0x590e75);return _0x11f472['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x11f472['label']=bt(_0x590e75,'Cancel'),_0x11f472['withText']=!0x0,_0x11f472['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x11f472;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x44a8d8=>{this['focusTracker']['add'](_0x44a8d8['element']);}),this['focusables']['on']('change',(_0x17afd7,_0x4ba833)=>{for(const _0x191580 of Array['from'](_0x4ba833['added'])['reverse']())this['focusTracker']['add'](_0x191580['element']);});}}class Rt extends _0x719be3{constructor(_0x14323a,_0x6878b5,_0x10c850){super(_0x14323a),this['commentInputView']=new Mt(_0x14323a,_0x10c850),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1d7b2e,_0x35752b)=>_0x1d7b2e||!!_0x35752b),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 _0x348ff9(_0x14323a,_0x6878b5),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'](_0x52ea47){this['commentInputView']['focus'](_0x52ea47);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2806cd,_0x202662)=>{const {submitButtonView:_0x1cf8f2,cancelButtonView:_0x26bb70,editor:_0x15f5db}=this['commentInputView'];[_0x1cf8f2['element'],_0x26bb70['element'],_0x15f5db?_0x15f5db['editing']['view']['getDomRoot']():null]['filter'](_0x538633=>_0x538633)['some'](_0x32c469=>_0x32c469['contains'](_0x202662['target']))||(this['focus'](),_0x202662['preventDefault']());});}}class xt extends _0x719be3{constructor(_0x338f82){super(_0x338f82);const _0x345c6d=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x345c6d['to']('count',_0x5837cb=>bt(_0x338f82,'NUMBER_OF_COMMENTS',_0x5837cb))}]});}}class St extends _0x719be3{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x585da9,_0x5c714b,_0x60caa0){super(_0x585da9);const _0x1e9a82=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5c714b['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5c714b,this['_config']=_0x60caa0,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x340c23(),this['keystrokes']=new _0x212e53(),this['focusCycler']=new _0x567dee({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2d037d=>this['commentViews']['map'](_0x27cf39=>_0x27cf39['element'])['includes'](_0x2d037d['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x585da9),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xa1df93=>_0xa1df93-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3c4a4c of _0x5c714b['comments'])this['_handleNewCommentModel'](_0x3c4a4c);this['_handleInfoComment'](),this['listenTo'](_0x5c714b['comments'],'add',(_0x265de4,_0x35355b)=>{const _0xd982cf=this['_calculatePosition'](_0x35355b);this['length']++,this['_handleNewCommentModel'](_0x35355b,_0xd982cf),this['refreshVisibleViews']();}),this['listenTo'](_0x5c714b['comments'],'remove',(_0x551822,_0x421876)=>{this['length']--,this['_handleRemoveCommentModel'](_0x421876),this['refreshVisibleViews']();}),this['listenTo'](_0x5c714b,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5c714b,'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',_0x1e9a82['if']('length','ck-hidden',_0x2a448a=>!_0x2a448a)],'aria-label':bt(_0x585da9,'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'](_0x371a06){-0x1===_0x371a06?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4e69f9 of this['commentViews'])_0x4e69f9['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3fe51e,_0x27014e){const _0x352d26=new this['_config']['CommentView'](this['locale'],_0x3fe51e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x352d26['viewUid']=_0x3fe51e['id'],_0x352d26['delegate']('removeComment')['to'](this),_0x352d26['delegate']('updateComment')['to'](this),_0x352d26['delegate']('resolveCommentThread')['to'](this),_0x352d26['delegate']('editorReady')['to'](this),_0x352d26['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x352d26,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x352d26,_0x27014e);}['_calculatePosition'](_0x3f0e2f){const _0x31b7e3=this['_model']['_findOptimalIndex'](_0x3f0e2f);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3f0e2f['authoredAt']?_0x31b7e3-0x1:_0x31b7e3:_0x31b7e3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x54e242={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x54e242,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x54e242));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x6d02e){const _0x386deb=this['commentViews']['remove'](_0x6d02e['id']);this['stopListening'](_0x386deb),_0x386deb['isEditMode']&&this['_updateHasDirtyComment'](),_0x386deb['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1b632e=>_0x1b632e['isEditMode']);}['_rearrangeCollapse'](){const _0x486b3f=function(_0x130f26){const _0x10f375=new _0x2ed34f();for(const _0x3d205e of _0x130f26)_0x10f375['add'](_0x3d205e);return _0x10f375;}(this['commentViews']),_0x2f2c49=this['_collapsedCommentsView']['count'];for(let _0x22c053=0x1;_0x22c053<=_0x2f2c49;_0x22c053++)_0x486b3f['remove'](0x1);for(const _0x37abcc of _0x486b3f)_0x37abcc['collapse']();_0x2f2c49>0x0&&_0x486b3f['add'](this['_collapsedCommentsView'],0x1),Pt(_0x32dd70(Array['from'](this['visibleViews']),Array['from'](_0x486b3f)),this['visibleViews'],_0x486b3f);}['_rearrangeExpand'](){Pt(_0x32dd70(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x193253 of this['visibleViews'])_0x193253['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5d0b3c=>{this['focusTracker']['add'](_0x5d0b3c['element']),this['keystrokes']['listenTo'](_0x5d0b3c['element']);}),this['commentViews']['on']('change',(_0xd4865,_0x5c7ce5)=>{for(const _0x104189 of _0x5c7ce5['removed'])this['focusTracker']['remove'](_0x104189['element']),this['keystrokes']['stopListening'](_0x104189['element']);for(const _0x2cf1d7 of Array['from'](_0x5c7ce5['added'])['reverse']())this['focusTracker']['add'](_0x2cf1d7['element']),this['keystrokes']['listenTo'](_0x2cf1d7['element']);});}}function Pt(_0x2cd5d6,_0x56cf37,_0x6ad570){let _0x452f0f=0x0;for(const _0x22c0e9 of _0x2cd5d6)switch(_0x22c0e9){case'insert':_0x56cf37['add'](_0x6ad570['get'](_0x452f0f),_0x452f0f),_0x452f0f++;break;case'delete':_0x56cf37['remove'](_0x452f0f);break;case'equal':_0x452f0f++;}}class Lt extends _0x719be3{constructor(_0x39318f){super(_0x39318f);const _0x58ffc1=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x58ffc1['to']('contextValue',_0x3aec2b=>bt(_0x39318f,'THREAD_CONTEXT_LABEL',_0x3aec2b)),'tabindex':-0x1},'children':[{'text':_0x58ffc1['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x719be3{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5a8269,_0x241aaa){super(_0x5a8269);const _0x273f9c=this['bindTemplate'];this['_model']=_0x241aaa,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x340c23(),this['keystrokes']=new _0x212e53(),this['focusCycler']=new _0x567dee({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3c88ef=>!!_0x3c88ef),this['bind']('contextValue')['to'](this['_model'],'context',_0xa5b576=>_0xa5b576&&_0xa5b576['value']?this['_trimContextValue'](_0xa5b576['value']):bt(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',_0x273f9c['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 _0x3a2024=new _0x542a2(this['locale']);return _0x3a2024['label']=bt(this['locale'],'Reopen'),_0x3a2024['tooltip']=bt(this['locale'],'Reopen'),_0x3a2024['icon']=_0x216496,_0x3a2024['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x48a90f=>!_0x48a90f),_0x3a2024['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x51de7e,_0x52c74e)=>_0x51de7e&&_0x52c74e),_0x3a2024['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3a2024;}['_trimContextValue'](_0x30f888){if(_0x30f888['length']<0x96)return _0x30f888;const _0x2a1b40=_0x30f888['lastIndexOf']('\x20',0x93);return _0x30f888['substring'](0x0,_0x2a1b40>-0x1?_0x2a1b40:0x93)+'...';}['_attachContextActions'](){const _0x346b4c=this['element']['querySelector']('.ck-context'),_0x4383dd=_0x346b4c['querySelector']('.ck-context__value');this['listenTo'](_0x346b4c,'mouseenter',()=>{_0x4383dd['offsetWidth']<_0x4383dd['scrollWidth']&&_0x346b4c['classList']['add']('overlay');}),this['listenTo'](_0x346b4c,'mouseleave',()=>{_0x346b4c['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x1e7337 of this['focusables'])this['focusTracker']['add'](_0x1e7337['element']),this['keystrokes']['listenTo'](_0x1e7337['element']);}['_createContextView'](){const _0x379bcb=new Lt(this['locale']);return _0x379bcb['bind']('contextValue')['to'](this),_0x379bcb;}}class Vt extends _0x719be3{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x411822,_0x58ab18,_0x1950b6,_0x2df51c){super(_0x411822),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x58ab18,this['_localUser']=_0x1950b6,this['_config']=_0x2df51c,this['commentThreadHeaderView']=new Dt(_0x411822,_0x58ab18),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x1f142b(_0x411822,bt(_0x411822,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x411822,_0x58ab18,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2df51c)),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',(_0x467860,_0x54f28d)=>_0x467860||!!_0x54f28d),this['bind']('isUnlinked')['to'](_0x58ab18,'unlinkedAt',_0x4e8014=>!!_0x4e8014),this['bind']('ariaLabel')['to'](this,'length',_0x50a740=>{const _0x4bfb05=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x50a740,_0x4bfb05]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x340c23(),this['keystrokes']=new _0x212e53(),this['focusCycler']=new _0x567dee({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x480629=>_0x480629['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x4af483(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x24e7eb=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x96ffd7=_0x24e7eb['commentInputView'];return _0x24e7eb['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x96ffd7,'value',(_0x47a2c1,_0x4f3171,_0x3585bd,_0x3f9246,_0x5cbc9b)=>!!_0x5cbc9b||!!_0x3f9246&&_0x3585bd&&!_0x4f3171||_0x47a2c1&&_0x3585bd&&!_0x4f3171),_0x96ffd7['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2ee940,_0x2c6598,_0xd79c38)=>{let _0xb6184c;return _0xb6184c=_0xd79c38&&_0x2c6598?'Reply\x20to\x20reopen\x20discussion...':_0x2ee940?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0xb6184c);}),_0x96ffd7['bind']('submitLabel')['to'](this,'length',_0x17a156=>bt(this['locale'],_0x17a156?'Reply':'Comment')),_0x96ffd7['on']('submit',(_0x549dbe,_0x58628c)=>{this['fire']('addComment',_0x58628c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x96ffd7['on']('cancel',()=>{this['focus']();}),_0x96ffd7['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x96ffd7['on']('cancel',_0x4aa006=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4aa006['stop']());}),this['on']('change:isActive',(_0x51ca4a,_0x584398,_0x536600)=>{_0x536600||this['length']||_0x96ffd7['value']||this['fire']('removeCommentThread');}),_0x24e7eb;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x25ab94(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x117b9e,_0x586821,_0x5d3754,_0x2ad913){super(_0x117b9e,_0x586821,_0x5d3754,_0x2ad913),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x117b9e,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x14d3b8,_0x1d4284,_0x7a38e1)=>{_0x7a38e1||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3c74ee,_0x54f782,_0x505d34)=>{_0x505d34&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5ab274=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5ab274['if']('isActive','ck-thread--active'),_0x5ab274['if']('isUnlinked','ck-thread--unlinked'),_0x5ab274['to']('actionIndicator',_0x4e3ec6=>_0x4e3ec6?'ck-thread--'+_0x4e3ec6:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5ab274['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 _0x12a876 of this['commentsListView']['commentViews'])_0x12a876['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5806d8}=this,_0x4935bd=this['commentsListView']['commentViews']['get'](0x0);_0x4935bd===this['_boundFirstCommentView']||_0x4935bd['isSystemComment']||(this['_boundFirstCommentView']=_0x4935bd,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x4935bd,'actionIndicator',_0x3bca29=>'remove'===_0x3bca29?'remove':null),_0x4935bd['placeholder']=bt(_0x5806d8,'Write\x20a\x20comment...'),_0x4935bd['removeButton']['on']('execute',_0x2ba081=>{_0x2ba081['stop'](),this['showConfirm'](bt(_0x5806d8,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x4935bd['focus']();}),_0x4935bd['actionBar']['add'](this['resolveButton'],0x0),_0x4935bd['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5ee767=new _0x5d11a7(this['locale']);return _0x5ee767['label']=bt(this['locale'],'Resolve'),_0x5ee767['tooltip']=bt(this['locale'],'Resolve'),_0x5ee767['icon']=_0x16a453,_0x5ee767['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5ee767['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x198a64=>!_0x198a64),_0x5ee767['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x50d9f9,_0x367e74)=>_0x50d9f9&&!_0x367e74),_0x5ee767['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5ee767;}['_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 Ht extends _0x719be3{constructor(_0x28f9ee){super(_0x28f9ee),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x509f91,_0x48753f,_0x16f04f)=>{this['element']['innerHTML']=_0x16f04f;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x719be3{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x550046,_0x18d1fa,_0x16723e){super(_0x550046),this['_model']=_0x18d1fa,this['_config']=_0x16723e,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x18d1fa,'content',_0x18d1fa,'authoredAt',(_0x42f95e,_0x1060c9)=>bt(_0x550046,'COMMENT_ARIA_LABEL',[_0x18d1fa['author']['name'],_0x16723e['formatDateTime'](_0x1060c9),new DOMParser()['parseFromString'](_0x42f95e,'text/html')['body']['textContent'],_0x18d1fa['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x1f142b(_0x550046,bt(_0x550046,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x340c23(),this['keystrokes']=new _0x212e53(),this['focusCycler']=new _0x567dee({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4cb4b2=>_0x4cb4b2['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']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x31887c=new Ht(this['locale']);return _0x31887c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x5acfee,_0x59b45a)=>_0x59b45a?_0x58d428(_0x5acfee,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x5acfee),_0x31887c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x458d39=new Mt(this['locale'],this['_config']['editorConfig']);return _0x458d39['value']=this['_model']['content'],_0x458d39['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x458d39['submitLabel']=bt(this['locale'],'Save'),_0x458d39['on']('submit',(_0x31424f,_0x2764b4)=>{this['fire']('updateComment',this['_model']['id'],_0x2764b4),this['switchToDisplayMode'](),this['focus']();}),_0x458d39['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x458d39['once']('editorReady',()=>{_0x458d39['focus']();}),_0x458d39['createEditor'](),_0x458d39['delegate']('editorReady')['to'](this),_0x458d39['delegate']('editorDestroyed')['to'](this),_0x458d39;}['_setupKeyboardNavigation'](){const _0x269c0a=this['element'];this['keystrokes']['listenTo'](_0x269c0a);for(const _0x5e0358 of this['focusables'])this['focusTracker']['add'](_0x5e0358['element']),this['keystrokes']['listenTo'](_0x5e0358['element']);this['focusables']['on']('change',(_0x4c671a,_0x31ae63)=>{for(const _0x2bdf64 of _0x31ae63['removed'])this['focusTracker']['remove'](_0x2bdf64['element']),this['keystrokes']['stopListening'](_0x2bdf64['element']);for(const _0x15bca4 of _0x31ae63['added'])this['focusTracker']['add'](_0x15bca4['element']),this['keystrokes']['listenTo'](_0x15bca4['element']);}),this['keystrokes']['set']('enter',(_0x284fb3,_0x33fd3f)=>{_0x269c0a===_0x284fb3['target']&&(this['focusCycler']['focusFirst'](),_0x33fd3f());}),this['keystrokes']['set']('esc',(_0x427295,_0x4d0f1f)=>{_0x269c0a!==_0x427295['target']&&(this['focus'](),_0x4d0f1f());});}}class Ut extends/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x25ab94(Ft){['actionBar'];['userView'];constructor(_0xac11ac,_0x3f41a1,_0x150542){super(_0xac11ac,_0x3f41a1,_0x150542),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0xac11ac,'Reply...')),this['bind']('authoredAt')['to'](_0x3f41a1),this['bind']('resolvedAt')['to'](_0x3f41a1),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 _0x348ff9(_0xac11ac,_0x3f41a1['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3f41a1,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x4d30f0=this['bindTemplate'],_0x561cbf=[{'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':_0x4d30f0['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x4d30f0['to']('authoredAt',_0x40a3af=>this['_config']['formatDateTime'](_0x40a3af))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x4d30f0['if']('isEditMode','ck-comment__actions--hidden'),_0x4d30f0['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']&&_0x561cbf['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x4d30f0['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x4d30f0['if']('isEditMode','ck-comment--edit'),_0x4d30f0['if']('isSystemComment','ck-comment--info'),_0x4d30f0['to']('actionIndicator',_0x586737=>_0x586737?'ck-comment--'+_0x586737:'')],'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':_0x561cbf}]}]};}['_createEditButton'](){const _0xf29cbc=new _0x542a2(this['locale']);return _0xf29cbc['label']=bt(this['locale'],'Edit'),_0xf29cbc['icon']=_0x175c6f,_0xf29cbc['withText']=!0x0,_0xf29cbc['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xf29cbc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x179421=>!_0x179421),_0xf29cbc['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xf29cbc['on']('execute',()=>this['switchToEditMode']()),_0xf29cbc;}['_createRemoveButton'](){const _0x255cb6=new _0x542a2(this['locale']);return _0x255cb6['label']=bt(this['locale'],'Remove'),_0x255cb6['icon']=_0x47404e,_0x255cb6['withText']=!0x0,_0x255cb6['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x255cb6['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x452a8a=>!_0x452a8a),_0x255cb6['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x255cb6['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x255cb6;}['_createDropdown'](){const _0x18c546=it(this['locale'],_0x1dc70e),_0x2fe960=_0x18c546['panelView']['children'],_0x59249e=new et(this['locale']),_0x3849d6=_0x18c546['bindTemplate'];st(_0x18c546,()=>this['items']['find'](_0x2fa6fe=>_0x2fa6fe['isVisible'])),_0x18c546['extendTemplate']({'attributes':{'class':[_0x3849d6['if']('isVisible','ck-hidden',_0x1ec0b=>!_0x1ec0b)]}});const _0xb1dcfe=(_0x340e11,_0x40b407=-0x1)=>{const _0x2890c1=new nt(this['locale']);_0x2890c1['children']['add'](_0x340e11);const _0x34fecb=_0x40b407>-0x1?_0x40b407:_0x59249e['items']['length'];_0x59249e['items']['add'](_0x2890c1,_0x34fecb);const _0x537f87=Array['from'](this['items']);_0x18c546['unbind']('isEnabled','isVisible'),_0x18c546['bind']('isEnabled')['toMany'](_0x537f87,'isEnabled',(..._0x5061e4)=>_0x5061e4['some'](_0x376e8b=>_0x376e8b)),_0x18c546['bind']('isVisible')['toMany'](_0x537f87,'isVisible',(..._0x47386f)=>_0x47386f['some'](_0x28f0ad=>_0x28f0ad));};_0x18c546['panelPosition']='sw',_0x18c546['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x2f61fc});for(const _0x43f77e of this['items'])_0xb1dcfe(_0x43f77e);return _0x2fe960['add'](_0x59249e),_0x18c546['listenTo'](this['items'],'add',(_0x27c84c,_0xc76136,_0x440cfb)=>{_0xb1dcfe(_0xc76136,_0x440cfb);}),_0x18c546['listenTo'](this['items'],'remove',(_0x5e5d94,_0x222646,_0x341a78)=>{_0x59249e['items']['remove'](_0x341a78);}),_0x18c546;}['_attachActions'](_0x3c03c8,_0x273ffe){const _0x47abfc=_0x3c03c8&&_0x3c03c8['element'];_0x47abfc&&(this['listenTo'](_0x47abfc,'mouseenter',()=>this['actionIndicator']=_0x273ffe),this['listenTo'](_0x47abfc,'focus',()=>this['actionIndicator']=_0x273ffe),this['listenTo'](_0x47abfc,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x47abfc,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1d9e3c=super['_createCommentInputView']();return _0x1d9e3c['bind']('placeholder')['to'](this),_0x1d9e3c;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x11f126){const _0x44b93d=_0x3cc0da(_0x11f126,0x1e),_0x23184f=new MutationObserver(_0x47910c=>{for(const _0x146f32 of _0x47910c)('attributes'==_0x146f32['type']&&'class'==_0x146f32['attributeName']||'childList'==_0x146f32['type']||'characterData'==_0x146f32['type'])&&_0x44b93d();});return{'attach'(_0x55c4a9){_0x23184f['observe'](_0x55c4a9,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x23184f['disconnect'](),_0x44b93d['cancel']();}};}class Kt extends _0x719be3{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x97e90,_0x154639){super(_0x97e90),this['id']=_0x17d94f(),this['focusTracker']=new _0x340c23(),this['keystrokes']=new _0x212e53(),this['keystrokes']['set']('Esc',(_0x1c95b2,_0x44e251)=>this['fire']('Esc',_0x44e251)),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']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x154639),this['mainView']=_0x154639;const _0x18d10e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x18d10e['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 _0x372901=this['element']['clientHeight'];_0x372901&&(this['height']=_0x372901);}}class Yt extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x5d3602(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3e8081,target:_0x589980,type:_0x2e7eef,isVisible:_0x6d5d1c=!0x0}){super(),this['view']=_0x3e8081,this['view']['element']||this['view']['render'](),this['_type']=_0x2e7eef,this['_target']=_0x589980,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2ed34f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x191c7d,_0x5a376a)=>{this['view']['focusTracker']['add'](_0x5a376a);}),this['focusableElements']['on']('remove',(_0x41280a,_0x1419aa)=>{this['view']['focusTracker']['remove'](_0x1419aa);}),this['set']('isVisible',_0x6d5d1c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x10e464=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x10e464),_0x10e464;}get['targetRect'](){const _0x157b8e=this['target'];if(null===_0x157b8e)return null;if(_0x157b8e instanceof _0x1a3832)return _0x157b8e;const _0x123637=_0x157b8e['filter'](_0x2b11df=>function(_0x155571){const _0x10164f=_0x155571['offsetParent'];if(_0x10164f)return!0x0;const _0x4cc023=_0x155571['getClientRects']()['item'](0x0);return!!_0x4cc023;}(_0x2b11df));return 0x0===_0x123637['length']?null:_0x1a3832['getDomElementRects'](_0x123637[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x11b70a){this['view']['isActive']=_0x11b70a,this['view']['mainView']['isActive']=_0x11b70a;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4e2d14){if(!(null===_0x4e2d14||_0x4e2d14 instanceof _0x1a3832||Array['isArray'](_0x4e2d14)&&_0x4e2d14['every'](_0x1488d2=>Gt(_0x1488d2))))throw new _0x36d19a('annotation-invalid-target',null,{'target':_0x4e2d14});}['_getNormalizedTarget'](){const _0x37be8b='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x37be8b)?[_0x37be8b]:_0x37be8b;}}function Gt(_0x53b8f8){return null!==_0x53b8f8&&'object'==typeof _0x53b8f8&&'nodeType'in _0x53b8f8&&0x1===_0x53b8f8['nodeType'];}class jt extends _0x2ed34f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x45ad09=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x340c23(),this['_focusTracker']['on']('change:isFocused',(_0x5ed13b,_0x133917,_0x566d76)=>{_0x566d76||this['fire']('blur');});for(const _0x337e53 of _0x45ad09)this['add'](_0x337e53);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x270358){if(this['has'](_0x270358))throw new _0x36d19a('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x270358['innerView'],_0x270358),this['_viewToAnnotation']['set'](_0x270358['view'],_0x270358);for(const _0x1d2dd4 of _0x270358['focusableElements'])this['_focusTracker']['add'](_0x1d2dd4);this['listenTo'](_0x270358['focusableElements'],'add',(_0x389ac7,_0x38bf1b)=>{this['_focusTracker']['add'](_0x38bf1b);}),this['listenTo'](_0x270358['focusableElements'],'remove',(_0x422ecc,_0x471a58)=>{this['_focusTracker']['remove'](_0x471a58);}),this['listenTo'](_0x270358['view']['focusTracker'],'change:isFocused',(_0x372e7f,_0x5c116e,_0x410a15)=>{_0x410a15&&this['fire']('focus',_0x270358);}),_0x270358['updateTargetRect']();const _0x311136=this['_getOrderInContent'](_0x270358['view']['targetRect']);return super['add'](_0x270358,_0x311136);}['remove'](_0x47e93c){if(!this['has'](_0x47e93c))throw new _0x36d19a('annotationcollection-not-existing-item',null);this['stopListening'](_0x47e93c['view']['focusTracker']),this['stopListening'](_0x47e93c['focusableElements']);for(const _0x3347b5 of _0x47e93c['focusableElements'])this['_focusTracker']['remove'](_0x3347b5);return this['_viewToAnnotation']['delete'](_0x47e93c['view']),this['_innerViewToAnnotation']['delete'](_0x47e93c['innerView']),super['remove'](_0x47e93c);}['getByInnerView'](_0x45c49){return this['_innerViewToAnnotation']['get'](_0x45c49);}['getByView'](_0x11a607){return this['_viewToAnnotation']['get'](_0x11a607);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x387654 of this)_0x387654['updateTargetRect']();this['_sort']();}['_sort'](){const _0x55df7c=Array['from'](this)['sort']((_0x1c0067,_0x3e69de)=>qt(_0x1c0067['view']['targetRect'],_0x3e69de['view']['targetRect']));for(let _0x4eaa56=_0x55df7c['length']-0x1;_0x4eaa56>0x0;_0x4eaa56--){const _0x1af353=_0x55df7c[_0x4eaa56];_0x4eaa56!==this['getIndex'](_0x1af353)&&(this['remove'](_0x1af353),this['add'](_0x1af353));}}['_getOrderInContent'](_0x521b6e){let _0x38ebc5=0x0;if(!_0x521b6e)return this['length'];for(const _0x43edc6 of this){const _0x5e04f3=_0x43edc6['view']['targetRect'];if(_0x5e04f3){if(qt(_0x521b6e,_0x5e04f3)<0x0)return _0x38ebc5;_0x38ebc5++;}}return _0x38ebc5;}}function Xt({source:_0x51f014,target:_0x2c966e,filter:_0x9464d}){for(const _0x454cea of _0x51f014)_0x9464d(_0x454cea)&&_0x2c966e['add'](_0x454cea);_0x2c966e['listenTo'](_0x51f014,'add',(_0x5d52dd,_0x21fb15)=>{_0x9464d(_0x21fb15)&&_0x2c966e['add'](_0x21fb15);}),_0x2c966e['listenTo'](_0x51f014,'remove',(_0x3a2efa,_0x5738d8)=>{_0x2c966e['has'](_0x5738d8)&&_0x2c966e['remove'](_0x5738d8);});}function qt(_0x4300dd,_0x16da6b){if(null===_0x4300dd&&null===_0x16da6b)return 0x0;if(null===_0x4300dd)return-0x1;if(null===_0x16da6b)return 0x1;const _0x5891ec=_0x4300dd['top']-_0x16da6b['top'];return 0x0==_0x5891ec?_0x4300dd['left']-_0x16da6b['left']:_0x5891ec;}class $t extends _0x3d766a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4110aa){if(super(_0x4110aa),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4110aa instanceof _0x3bb28c){const _0x54b614=_0x4110aa['locale'];_0x4110aa['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x54b614,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x45fb4b){this['collection']['add'](_0x45fb4b);}['remove'](_0x22eb40){this['collection']['remove'](_0x22eb40),_0x22eb40['destroy']();}['refreshVisibility'](){for(const _0x5257d3 of this['collection'])_0x5257d3['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3348bd){return this['collection']['getByInnerView'](_0x3348bd);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x28bf95 of this['collection'])_0x28bf95['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x20be98){this['fire']('_activateAnnotation',_0x20be98);}['createAnnotation'](_0x281a0f){return new Yt(_0x281a0f);}['createAnnotationView'](_0x1e39eb,_0x4a338c){return new Kt(_0x1e39eb,_0x4a338c);}['_addActiveAnnotation'](_0x30bdf9){const _0x1b1e3c=new Set(this['activeAnnotations']);_0x1b1e3c['add'](_0x30bdf9),this['activeAnnotations']=_0x1b1e3c;}['_removeActiveAnnotation'](_0x33cf7a){const _0x2e82e6=new Set(this['activeAnnotations']);_0x2e82e6['delete'](_0x33cf7a),this['activeAnnotations']=_0x2e82e6;}['_bindAnnotationsToVisibleAnnotations'](){const _0x572cb0=this['collection'],_0x31f23f=this['_visibleAnnotations'];function _0x3be762(_0x337a95){const _0x4dd796=_0x337a95['source'];_0x4dd796['isVisible']&&!_0x31f23f['has'](_0x4dd796)?_0x31f23f['add'](_0x4dd796):!_0x4dd796['isVisible']&&_0x31f23f['has'](_0x4dd796)&&_0x31f23f['remove'](_0x4dd796),_0x4dd796['view']['focusTracker']['remove'](_0x4dd796['view']['element']),_0x4dd796['view']['focusTracker']['add'](_0x4dd796['view']['element']);}this['listenTo'](_0x572cb0,'add',(_0x7c6ed7,_0x324c76)=>{_0x324c76['isVisible']&&_0x31f23f['add'](_0x324c76),this['listenTo'](_0x324c76,'change:isVisible',_0x3be762);}),this['listenTo'](_0x572cb0,'remove',(_0xa11440,_0x5c4075)=>{_0x31f23f['has'](_0x5c4075)&&_0x31f23f['remove'](_0x5c4075),this['stopListening'](_0x5c4075,'change:isVisible',_0x3be762);});}['_setupEnterAnnotationKeystroke'](){const _0x1bad99=_0x1dc0e3=>{_0x1dc0e3['on']('ready',()=>{_0x1dc0e3['keystrokes']['set'](_0x46e7bf,(_0x2e6f4a,_0x4dc92b)=>{const _0x42ed8e=_0x2ca59a(this['activeAnnotations']['values']());_0x42ed8e&&(_0x42ed8e['view']['focus'](),_0x4dc92b());});});};this['context']instanceof _0x3bb28c?_0x1bad99(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1db877,_0x3aa080)=>{_0x1bad99(_0x3aa080);});}['_setupEscapeAnnotationHandling'](){const _0x348d21=_0x4eb17f=>{const _0x3714a9=_0x4eb17f['source'],_0x9c3b1b=[];let _0x42a925;if(Array['isArray'](_0x3714a9['target'])){_0x42a925=_0x3714a9['target'][0x0],this['context']instanceof _0x3bb28c?_0x9c3b1b['push'](this['context']):this['context']['editors']&&_0x9c3b1b['push'](...this['context']['editors']);for(const _0x57cedd of _0x9c3b1b)for(const _0x2daace of _0x57cedd['editing']['view']['domRoots']['values']())if(_0x2daace['contains'](_0x42a925))return void _0x57cedd['editing']['view']['focus']();_0x42a925['focus']();}};this['listenTo'](this['collection'],'add',(_0x15aae8,_0x426a07)=>{this['listenTo'](_0x426a07,'escape',_0x348d21,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x38b7e7,_0x488ade)=>{this['stopListening'](_0x488ade,'escape',_0x348d21);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x3d766a{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x582bd3,_0xdd578];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdd5e6c){super(_0xdd5e6c),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x18a0e8=this['context']['config'];_0x18a0e8['define']('comments.maxCommentsWhenCollapsed',0x2),_0x18a0e8['define']('comments.maxThreadTotalWeight',0x1f4),_0x18a0e8['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x18a0e8['define']('comments.CommentThreadView',Bt),_0x18a0e8['define']('comments.CommentView',Ut),_0x18a0e8['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5e7f2f=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2bb979,_0x38b36e)=>this['_addCommentThread'](_0x38b36e)),this['on']('submitCommentThread',(_0x1b0342,_0xb03c00)=>this['_submitCommentThread'](_0xb03c00)),this['on']('resolveCommentThread',(_0x375605,_0x4aad21)=>this['_resolveCommentThread'](_0x4aad21)),this['on']('resolveCommentThread',(_0x448582,_0x5e3fcc)=>this['_updateActiveAnnotation'](_0x5e3fcc),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3b4daf,_0x36dd5b)=>this['_reopenCommentThread'](_0x36dd5b)),this['on']('reopenCommentThread',(_0x229183,_0x537ec7)=>this['_updateActiveAnnotation'](_0x537ec7),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5739ce,_0x40f9c3)=>this['_removeCommentThread'](_0x40f9c3)),this['on']('updateCommentThread',(_0x264add,_0x59fde9)=>this['_updateCommentThread'](_0x59fde9)),this['on']('updateCommentThread',(_0x541057,_0x327c9d)=>this['_updateActiveAnnotation'](_0x327c9d),{'priority':'lowest'}),this['on']('addComment',(_0x20c39a,_0x4a0c44)=>this['_addComment'](_0x4a0c44)),this['on']('updateComment',(_0x2ecf7b,_0x16cb4a)=>this['_updateComment'](_0x16cb4a)),this['on']('removeComment',(_0x39594c,_0x588e4a)=>this['_removeComment'](_0x588e4a)),this['on']('addComment',(_0x15f26c,{threadId:_0x5d0b8a,isFromAdapter:_0x2b7430})=>{if(_0x2b7430)return;const _0x17a182=this['getCommentThread'](_0x5d0b8a),_0xb0fd02=_0x17a182&&this['_threadToController']['get'](_0x17a182);_0xb0fd02&&_0xb0fd02['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5e7f2f,'change:activeAnnotations',(_0x41ad0d,_0x198332,_0x1516f2)=>{const _0x2cb850=Array['from'](_0x1516f2)['map'](_0x498310=>this['_viewToController']['get'](_0x498310['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x2cb850?_0x2cb850['model']:null;});}set['adapter'](_0x2de291){if(this['_adapter'])throw new _0x36d19a('commentsrepository-adapter-already-set');this['_adapter']=_0x2de291;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x216d50=zt,threadId:_0x57ec34=_0x17d94f(),comments:_0x26aa3b=[],unlinkedAt:_0xafa559=null,resolvedAt:_0xacd504=null,resolvedBy:_0x52fbc9=null,target:_0x3c13c5=null,context:_0x264a0f=null,attributes:_0x483911={},isResolvable:_0x44c53c=!0x0,isSubmitted:_0x429c33=!0x1,isFromAdapter:_0x47413c=!0x1}={}){return this['fire'](ii('addCommentThread',_0x216d50),{'channelId':_0x216d50,'threadId':_0x57ec34,'comments':_0x26aa3b,'unlinkedAt':_0xafa559,'resolvedAt':_0xacd504,'resolvedBy':_0x52fbc9,'target':_0x3c13c5,'context':_0x264a0f,'attributes':_0x483911,'isFromAdapter':_0x47413c,'isResolvable':_0x44c53c,'isSubmitted':_0x429c33}),this['getCommentThread'](_0x57ec34);}['openNewCommentThread']({channelId:_0x7de5a6=zt,threadId:_0x5ce34d=_0x17d94f(),target:_0x11c346,context:_0x426c58=null,isResolvable:_0xae6f33=!0x0}){if(this['_readOnlyChannels']['has'](_0x7de5a6)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x11c346)throw new _0x36d19a('commentsrepository-missing-target');const _0x31f41e=this['addCommentThread']({'channelId':_0x7de5a6,'threadId':_0x5ce34d,'target':_0x11c346,'context':_0x426c58,'isResolvable':_0xae6f33});if(!_0x31f41e)return null;const _0x1dbde=this['_threadToController']['get'](_0x31f41e),_0x20bda=_0x1dbde['view']['commentThreadInputView']['commentInputView'],_0x5eee26=this['context']['plugins']['get']($t),_0x48983f=_0x5eee26['getByInnerView'](_0x1dbde['view']);return _0x5eee26['activate'](_0x48983f),_0x20bda['once']('editorReady',()=>_0x20bda['focus']()),_0x31f41e;}['hasCommentThread'](_0x22fb4e){if('string'!=typeof _0x22fb4e)throw new _0x36d19a('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x22fb4e);}['updateCommentThread']({channelId:_0x316cbc=zt,threadId:_0x42c5d0,context:_0x58f8f9,unlinkedAt:_0x34908b,attributes:_0x742286,isFromAdapter:_0x760925=!0x1}){return this['fire'](ii('updateCommentThread',_0x316cbc),{'channelId':_0x316cbc,'threadId':_0x42c5d0,'context':_0x58f8f9,'unlinkedAt':_0x34908b,'attributes':_0x742286,'isFromAdapter':_0x760925}),this['getCommentThread'](_0x42c5d0);}['getCommentThread'](_0x526a58){if('string'!=typeof _0x526a58)throw new _0x36d19a('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x526a58);}['fetchCommentThread']({channelId:_0x2a97ad,threadId:_0x3a7403}={}){const _0x5cd985=this['getCommentThread'](_0x3a7403);if(_0x5cd985)return Promise['resolve'](_0x5cd985);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x36d19a('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2a97ad,'threadId':_0x3a7403})['then'](_0xe9d47b=>this['hasCommentThread'](_0x3a7403)?this['getCommentThread'](_0x3a7403):_0xe9d47b?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2a97ad},_0xe9d47b)):void 0x0)['catch'](_0x3aaed7=>{throw console['error'](_0x3aaed7),new _0x36d19a('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x38e3cc,skipNotAttached:_0x2f22d2=!0x1,skipEmpty:_0x9f4270=!0x1,toJSON:_0xe9bd3c=!0x1}={}){const _0x2dc741=[];for(const _0x53b9c1 of this['_threads']['values']())_0x38e3cc&&_0x53b9c1['channelId']!==_0x38e3cc||_0x2f22d2&&!_0x53b9c1['isAttached']||_0x9f4270&&0x0===_0x53b9c1['length']||_0x2dc741['push'](_0x53b9c1);return _0xe9bd3c?_0x2dc741['map'](_0x1d09a0=>_0x1d09a0['toJSON']()):_0x2dc741;}['getAnnotationForCommentThread'](_0x26684e){const _0x46cea5=this['_threadToController']['get'](_0x26684e);if(!_0x46cea5)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x46cea5['view'])||null;}['getCommentThreadForAnnotation'](_0x69f012){const _0x2b2dd5=this['_viewToController']['get'](_0x69f012['innerView']);return _0x2b2dd5?_0x2b2dd5['model']:null;}['setActiveCommentThread'](_0x270ad1){const _0x204229=this['context']['plugins']['get']($t);if(!_0x270ad1)return void(this['activeCommentThread']&&_0x204229['deactivateAll']());const _0x54143b=this['getCommentThread'](_0x270ad1);if(!_0x54143b)throw new _0x36d19a('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x270ad1});if(!this['_threadToController']['has'](_0x54143b))throw new _0x36d19a('commentsrepository-active-not-attached',null,{'threadId':_0x270ad1});const _0x37282d=_0x204229['getByInnerView'](this['_threadToController']['get'](_0x54143b)['view']);_0x204229['activate'](_0x37282d);}['switchReadOnly'](_0x49569d,_0x419162){_0x49569d?this['_readOnlyChannels']['add'](_0x419162):this['_readOnlyChannels']['delete'](_0x419162),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4b6238){return this['_readOnlyChannels']['has'](_0x4b6238)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x21b111,_0x191259){return new It(_0x21b111,_0x191259);}['setPermissions'](_0x2cdc4a,_0x4d9c40=zt){this['_permissions']['set'](_0x4d9c40,_0x2cdc4a),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x436774=zt){return this['_permissions']['has'](_0x436774)?this['_permissions']['get'](_0x436774):Jt;}['_addCommentThread']({channelId:_0x372674,threadId:_0x2ad022,comments:_0x1885f0,unlinkedAt:_0x3b46b3,resolvedAt:_0x12f319,resolvedBy:_0x42cb50,target:_0x5a01c9,context:_0x18028b,attributes:_0x34fb19,isFromAdapter:_0x11e73e,isResolvable:_0x591bef,isSubmitted:_0x45d688}){if('string'!=typeof _0x2ad022)throw new _0x36d19a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2ad022});if(this['hasCommentThread'](_0x2ad022))throw new _0x36d19a('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2ad022});const _0x32e936=new Zt(this,{'channelId':_0x372674,'id':_0x2ad022,'context':_0x18028b,'attributes':_0x34fb19,'unlinkedAt':_0x3b46b3,'resolvedAt':_0x12f319,'resolvedBy':_0x42cb50?this['context']['plugins']['get'](_0xdd578)['getUser'](_0x42cb50):null,'isResolvable':_0x591bef,'isSubmitted':_0x45d688||_0x11e73e});this['_threads']['set'](_0x2ad022,_0x32e936);for(const _0x42f162 of _0x1885f0)_0x32e936['_add'](this['_createNewComment']({'threadId':_0x2ad022,..._0x42f162}));return _0x5a01c9&&_0x32e936['attachTo'](_0x5a01c9),_0x11e73e||!_0x32e936['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x372674,'threadId':_0x2ad022});}['_submitCommentThread']({channelId:_0x29fe8a,threadId:_0x4eaac6}){if(!this['hasCommentThread'](_0x4eaac6))throw new _0x36d19a('commentsrepository-missing-comment-thread',this);const _0x2bb223=this['getCommentThread'](_0x4eaac6);if(_0x2bb223['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x575256,comments:_0x5a20f7,resolvedAt:_0x6b17fd,resolvedBy:_0x43e95d,context:_0x555770,attributes:_0x3254ec}=_0x2bb223,_0x3c4949=this['context']['plugins']['get']('PendingActions'),_0x33ec4f=_0x3c4949['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x29fe8a,'threadId':_0x575256,'comments':_0x5a20f7['map'](_0x1ef7c1=>_0x1ef7c1['toJSON']()),'resolvedAt':_0x6b17fd,'resolvedBy':_0x43e95d?_0x43e95d['id']:_0x43e95d,'context':_0x555770,'attributes':_0x3254ec})['then'](({comments:_0x34d864})=>{_0x3c4949['remove'](_0x33ec4f);for(const _0x3d7247 of _0x34d864)this['_updateComment']({'channelId':_0x29fe8a,'threadId':_0x4eaac6,'commentId':_0x3d7247['commentId'],'createdAt':_0x3d7247['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5ccce5=>{throw console['error'](_0x5ccce5),new _0x36d19a('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x42c037,target:_0x262aa8}){const _0x277ad5=this['getCommentThread'](_0x42c037);if(!_0x277ad5)throw new _0x36d19a('commentsrepository-attach-missing-comment-thread',this);const _0xe31af3=this['context']['plugins']['get']('PendingActions'),_0x1b6da6=this['context']['plugins']['get']($t),_0x5a666a=this['_createCommentThreadView'](_0x277ad5),_0x2aafc6=new It(_0x277ad5,_0x5a666a);let _0x1b496b=null;_0x5a666a['on']('change:isDirty',(_0x151acc,_0x4c0ded,_0x3764ad)=>{_0x3764ad?_0x1b496b=_0xe31af3['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1b496b&&(_0xe31af3['remove'](_0x1b496b),_0x1b496b=null);}),this['_threadToController']['set'](_0x277ad5,_0x2aafc6),this['_viewToController']['set'](_0x5a666a,_0x2aafc6);const _0x2a94cf=new Kt(this['context']['locale'],_0x5a666a);_0x2a94cf['bind']('length')['to'](_0x5a666a),_0x2a94cf['bind']('isDirty')['to'](_0x5a666a,'isDirty',_0x5a666a,'length',(_0x45739c,_0x346669)=>_0x45739c||!_0x346669),_0x2a94cf['bind']('isActive')['to'](_0x5a666a),_0x2a94cf['type']='comment';const _0xaf92b2=new Yt({'view':_0x2a94cf,'target':_0x262aa8,'type':'comment','isVisible':!_0x277ad5['archivedAt']&&!!('function'==typeof _0x262aa8?_0x262aa8():_0x262aa8)});return _0x5a666a['on']('escape',()=>{_0xaf92b2['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5a666a,_0xaf92b2),_0x1b6da6['add'](_0xaf92b2),_0xaf92b2;}['_bindAnnotationToEditors'](_0x47cb86,_0x32e238){this['listenTo'](_0x47cb86,'editorReady',(_0x4e8334,_0x2ed5d4)=>{const _0x4371a7=_0x2ed5d4['ui']['view']['body']['bodyCollectionContainer'];_0x32e238['focusableElements']['add'](_0x4371a7),this['context']instanceof _0x3bb28c&&this['context']['ui']['focusTracker']['add'](_0x4371a7);},{'priority':'highest'}),this['listenTo'](_0x47cb86,'editorDestroyed',(_0x23706c,_0x365df0)=>{const _0x2ce509=_0x365df0['ui']['view']['body']['bodyCollectionContainer'];_0x32e238['focusableElements']['has'](_0x2ce509)&&_0x32e238['focusableElements']['remove'](_0x2ce509),this['context']instanceof _0x3bb28c&&this['context']['ui']['focusTracker']['remove'](_0x2ce509);});}['_unbindEditors'](_0x92ad14){this['stopListening'](_0x92ad14,'editorReady'),this['stopListening'](_0x92ad14,'editorDestroyed');}['_createCommentThreadView'](_0x78e39f){const _0x51cd69=this['context']['plugins']['get'](_0xdd578),{config:_0x440717,locale:_0x14c302}=this['context'],_0x158780=_0x3a0881(_0x440717['get']('locale'),_0x14c302);return new(0x0,(_0x440717['get']('comments'))['CommentThreadView'])(_0x14c302,_0x78e39f,_0x51cd69['me'],{'editorConfig':{..._0x440717['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x440717['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x440717['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x440717['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x440717['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x158780,'CommentView':_0x440717['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x29670f,channelId:_0x2f1fd9,resolvedAt:_0x1640a8,resolvedBy:_0x1409b8,isFromAdapter:_0x266ade}){if(!this['hasCommentThread'](_0x29670f))throw new _0x36d19a('commentsrepository-missing-comment-thread',null,{'threadId':_0x29670f});const _0x57a710=this['getCommentThread'](_0x29670f);if(_0x57a710['isResolved'])throw new _0x36d19a('commentsrepository-resolved-comment-thread',null,{'threadId':_0x29670f});const _0x5eb0af=this['context']['plugins']['get'](_0xdd578);if(_0x57a710['resolvedBy']=_0x5eb0af['getUser'](_0x1409b8),_0x57a710['resolvedAt']=_0x1640a8,_0x266ade||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x21773c=this['context']['plugins']['get']('PendingActions'),_0x241d96=_0x21773c['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2f1fd9,'threadId':_0x29670f})['then'](({resolvedAt:_0x3fc8b4,resolvedBy:_0x124a1d})=>{_0x21773c['remove'](_0x241d96),_0x57a710['resolvedBy']['id']!==_0x124a1d&&(_0x57a710['resolvedBy']=_0x5eb0af['getUser'](_0x124a1d)),_0x57a710['resolvedAt']=_0x3fc8b4;})['catch'](_0x1bb899=>{throw console['error'](_0x1bb899),new _0x36d19a('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4a02ab,channelId:_0x1f08e8,isFromAdapter:_0x4710d7}){if(!this['hasCommentThread'](_0x4a02ab))throw new _0x36d19a('commentsrepository-missing-comment-thread',null,{'threadId':_0x4a02ab});const _0x1e1421=this['getCommentThread'](_0x4a02ab);if(!_0x1e1421['isResolved'])throw new _0x36d19a('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4a02ab});if(_0x1e1421['resolvedBy']=null,_0x1e1421['resolvedAt']=null,_0x4710d7||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xe92ce9=this['context']['plugins']['get']('PendingActions'),_0x4ac6a9=_0xe92ce9['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1f08e8,'threadId':_0x4a02ab})['then'](()=>_0xe92ce9['remove'](_0x4ac6a9))['catch'](_0xd5784=>{throw console['error'](_0xd5784),new _0x36d19a('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4d0042,isFromAdapter:_0x9ec494}){const _0x565c77=this['getCommentThread'](_0x4d0042);if(!_0x565c77)throw new _0x36d19a('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4d0042),this['_threads']['delete'](_0x4d0042),!_0x565c77['isSubmitted']||_0x9ec494||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5b629c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1d5d55}=_0x565c77,_0x2b3a93=_0x5b629c['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1d5d55,'threadId':_0x4d0042})['then'](()=>_0x5b629c['remove'](_0x2b3a93))['catch'](_0x3d9438=>{throw console['error'](_0x3d9438),new _0x36d19a('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4a3819,unlinkedAt:_0x21c294,context:_0x489ba8,attributes:_0x218631,isFromAdapter:_0x31506e}){if('string'!=typeof _0x4a3819)throw new _0x36d19a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4a3819});if(!this['hasCommentThread'](_0x4a3819))throw new _0x36d19a('commentsrepository-missing-comment-thread',null,{'threadId':_0x4a3819});const _0x1ac25=this['getCommentThread'](_0x4a3819);let _0x5cfb40=!0x1;if(void 0x0!==_0x489ba8&&_0x1ac25['context']!==_0x489ba8&&(_0x1ac25['context']=_0x489ba8,_0x5cfb40=!0x0),void 0x0!==_0x21c294&&_0x1ac25['unlinkedAt']!==_0x21c294&&(_0x1ac25['unlinkedAt']=_0x21c294,_0x5cfb40=!0x0),_0x218631&&!_0x2de9c5(_0x218631,_0x1ac25['attributes'])&&(_0x1ac25['attributes']=_0x218631,_0x5cfb40=!0x0),!_0x5cfb40)return Promise['resolve']();if(!_0x1ac25['isSubmitted']||_0x31506e||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xad5471=this['context']['plugins']['get']('PendingActions'),{channelId:_0x538c0a}=_0x1ac25,_0x14033a=_0xad5471['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x538c0a,'threadId':_0x4a3819,'context':_0x489ba8,'unlinkedAt':_0x21c294,'attributes':_0x218631})['then'](()=>_0xad5471['remove'](_0x14033a))['catch'](_0x13ea5f=>{throw console['error'](_0x13ea5f),new _0x36d19a('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x10028f){const _0x272a56=this['context']['plugins']['get']($t),_0xf70fd9=this['getCommentThread'](_0x10028f);if(_0xf70fd9['_isAttached']=!0x1,this['_threadToController']['has'](_0xf70fd9)){const _0x3f1fa3=this['_threadToController']['get'](_0xf70fd9),_0x4dd4af=_0x3f1fa3['view'],_0x55ea7f=_0x272a56['getByInnerView'](_0x4dd4af);this['_threadToController']['delete'](_0xf70fd9),this['_viewToController']['delete'](_0x4dd4af),_0x55ea7f&&_0x272a56['remove'](_0x55ea7f),_0x3f1fa3['destroy'](),_0x4dd4af['destroy']()['then'](()=>{this['_unbindEditors'](_0x4dd4af);});}}['_updateActiveAnnotation']({threadId:_0x571f69,resolvedAt:_0x380034,unlinkedAt:_0x294384}){const _0x4735fc=!!_0x380034,_0x483f65=this['context']['plugins']['get']($t),_0x61e06=this['getCommentThread'](_0x571f69);if(this['_threadToController']['has'](_0x61e06)){const _0x51fee1=this['_threadToController']['get'](_0x61e06)['view'],_0x1de130=_0x483f65['getByInnerView'](_0x51fee1);_0x1de130&&(_0x4735fc&&_0x483f65['_removeActiveAnnotation'](_0x1de130),_0x294384?_0x1de130['isVisible']=!0x1:_0x1de130['refreshVisibility']());}}['_getExternalAuthor'](_0x512d8c){const _0x1de5ce=this['context']['plugins']['get'](_0xdd578),_0x10eea4=_0x3066e4('external:'+_0x512d8c),_0x4aec65=_0x1de5ce['getUser'](_0x10eea4);return _0x4aec65||_0x1de5ce['addUser']({'id':_0x10eea4,'name':_0x512d8c});}['_createNewComment']({threadId:_0x183e15,commentId:_0x33ff70=_0x17d94f(),content:_0x33417a,authorId:_0x476d26,createdAt:_0x189b9d,attributes:_0x2ecfee}){if('string'!=typeof _0x33ff70)throw new _0x36d19a('commentsrepository-invalid-commentid');if('string'!=typeof _0x476d26)throw new _0x36d19a('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x33417a||!_0x33417a['trim']())throw new _0x36d19a('commentsrepository-invalid-comment-content');const _0xefea28=this['context']['plugins']['get'](_0xdd578)['getUser'](_0x476d26);if(!_0xefea28)throw new _0x36d19a('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x476d26});let _0x388b59=null,_0x1bbb94=_0x189b9d;return _0x2ecfee?.['@external']&&(_0x388b59=this['_getExternalAuthor'](_0x2ecfee['@external']['authorName']),_0x1bbb94=new Date(_0x2ecfee['@external']['createdAt'])),new ti(this,{'threadId':_0x183e15,'id':_0x33ff70,'author':_0x388b59||_0xefea28,'creator':_0xefea28,'content':_0x33417a,'createdAt':_0x189b9d,'authoredAt':_0x1bbb94,'attributes':_0x2ecfee});}['_addComment'](_0x425bdf){let {threadId:_0x12857d,content:_0x43447a,attributes:_0x24cdd8,isFromAdapter:_0x244f20}=_0x425bdf;const _0x5caea7=this['getCommentThread'](_0x425bdf['threadId']);if(!_0x5caea7)throw new _0x36d19a('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x507b57=this['_createNewComment'](_0x425bdf),{id:_0x5c7cc6}=_0x507b57;if(_0x5caea7['_add'](_0x507b57),_0x244f20||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5caea7['isSubmitted'])return Promise['resolve']();const _0xd49dd5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x206461}=_0x5caea7,_0x17ff8e=_0xd49dd5['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x24cdd8||(_0x24cdd8={}),this['adapter']['addComment']({'channelId':_0x206461,'threadId':_0x12857d,'commentId':_0x5c7cc6,'content':_0x43447a,'attributes':_0x24cdd8})['then'](_0x1685db=>{_0xd49dd5['remove'](_0x17ff8e),_0x1685db&&this['_updateComment']({'channelId':_0x206461,'threadId':_0x12857d,'commentId':_0x5c7cc6,'createdAt':_0x1685db['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x37611f=>{throw console['error'](_0x37611f),new _0x36d19a('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4cea4,commentId:_0x237d48,content:_0x19a60f,createdAt:_0x4bb479,attributes:_0x47ccd2,isFromAdapter:_0x5928e9}){if(void 0x0!==_0x19a60f&&('string'!=typeof _0x19a60f||!_0x19a60f['trim']()['length']))throw new _0x36d19a('commentsrepository-update-comment-invalid-content');const _0x17395e=this['getCommentThread'](_0x4cea4),_0x426d1b=_0x17395e['getComment'](_0x237d48);if(!_0x426d1b)throw new _0x36d19a('commentsrepository-update-missing-comment',this);let _0x2e05d4=!0x1;if(_0x19a60f&&_0x19a60f!==_0x426d1b['content']&&(_0x426d1b['isEditable']||_0x5928e9)&&(_0x426d1b['content']=_0x19a60f,_0x2e05d4=!0x0),_0x4bb479&&_0x4bb479!==_0x426d1b['createdAt']&&(_0x426d1b['createdAt']=_0x4bb479,_0x426d1b['attributes']&&_0x426d1b['attributes']['@external']||(_0x426d1b['authoredAt']=_0x4bb479),_0x2e05d4=!0x0),_0x47ccd2&&!_0x2de9c5(_0x47ccd2,_0x426d1b['attributes'])&&(_0x426d1b['attributes']=_0x47ccd2,_0x2e05d4=!0x0),!_0x2e05d4)return Promise['resolve']();if(_0x17395e['fire']('commentUpdated'),_0x5928e9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xdc10c6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x28c5c3}=this['getCommentThread'](_0x426d1b['threadId']),_0xcaac3e=_0xdc10c6['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x28c5c3,'threadId':_0x4cea4,'commentId':_0x237d48,'content':_0x19a60f,'attributes':_0x47ccd2})['then'](()=>_0xdc10c6['remove'](_0xcaac3e))['catch'](_0xa6a12c=>{throw console['error'](_0xa6a12c),new _0x36d19a('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x108580,commentId:_0x5520f,isFromAdapter:_0x522b22}){const _0x36dc32=this['getCommentThread'](_0x108580),_0x2feb58=_0x36dc32['getComment'](_0x5520f);if(!_0x2feb58)throw new _0x36d19a('commentsrepository-remove-missing-comment',this);if(_0x36dc32['_remove'](_0x2feb58),_0x522b22||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4e3dd5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cb0b5}=_0x36dc32,_0x535847=_0x4e3dd5['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5cb0b5,'threadId':_0x108580,'commentId':_0x5520f})['then'](()=>_0x4e3dd5['remove'](_0x535847))['catch'](_0xc6cb4a=>{throw console['error'](_0xc6cb4a),new _0x36d19a('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x5d3602(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3cb9ea,_0x46a783){super();const _0x239469=_0x46a783['isResolvable'];this['channelId']=_0x46a783['channelId'],this['id']=_0x46a783['id'],this['comments']=new _0x2ed34f(),this['_repository']=_0x3cb9ea,this['_isAttached']=!0x1,this['_isSubmitted']=_0x46a783['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3cb9ea,'_permissions',_0x3cb9ea,'_readOnlyChannels',()=>_0x3cb9ea['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3cb9ea,'_permissions',()=>_0x3cb9ea['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3cb9ea,'_permissions',()=>{const _0x3a4af6=_0x3cb9ea['getPermissions'](this['channelId']);return _0x3a4af6['write']||_0x3a4af6['admin'];}),this['bind']('isResolvable')['to'](_0x3cb9ea,'_permissions',()=>_0x239469&&_0x3cb9ea['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x46a783['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x202a3e,_0x416b91)=>_0x202a3e?_0x416b91?_0x202a3e<_0x416b91?_0x202a3e:_0x416b91:_0x202a3e:_0x416b91),this['set']('unlinkedAt',_0x46a783['unlinkedAt']||null),this['set']('resolvedAt',_0x46a783['resolvedAt']||null),this['set']('resolvedBy',_0x46a783['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x58171f=>!!_0x58171f),this['set']('attributes',_0x46a783['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x519139,_0x5569da)=>_0x519139+_0x5569da['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x144cb1,id:_0x233063}=this;this['_repository']['fire'](ii('submitCommentThread',_0x144cb1),{'channelId':_0x144cb1,'threadId':_0x233063});}['setUnlinkedAt'](_0x4edd7b){this['_update']({'unlinkedAt':_0x4edd7b});}['resolve']({resolvedAt:_0x4e7bfb=new Date(),resolvedBy:_0x5ebf43='',isFromAdapter:_0x17be7a=!0x1}={}){const _0x2f1244=this['_repository']['context']['plugins']['get'](_0xdd578)['me'],{channelId:_0x427f0e,id:_0x4da4b9}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x427f0e),{'channelId':_0x427f0e,'threadId':_0x4da4b9,'resolvedAt':_0x4e7bfb,'resolvedBy':_0x5ebf43||_0x2f1244['id'],'isFromAdapter':_0x17be7a});}['reopen']({isFromAdapter:_0x697197=!0x1}={}){const {channelId:_0x59d58b,id:_0x4158dc}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x59d58b),{'channelId':_0x59d58b,'threadId':_0x4158dc,'isFromAdapter':_0x697197});}['setContext'](_0x517be1){this['context']||this['_update']({'context':_0x517be1});}['setAttribute'](_0x34f5f9,_0xca9c96){const _0x4e2fb4=_0x38963a(this['attributes']);_0x5f0b07(_0x4e2fb4,_0x34f5f9,_0xca9c96),this['_update']({'attributes':_0x4e2fb4});}['removeAttribute'](_0x579207){const _0x4a1191=_0x38963a(this['attributes']);_0x333a25(_0x4a1191,_0x579207),this['_update']({'attributes':_0x4a1191});}['remove']({isFromAdapter:_0x3f7d5a=!0x1}={}){const {channelId:_0x452375,id:_0x176cf8}=this;this['_repository']['fire'](ii('removeCommentThread',_0x452375),{'channelId':_0x452375,'threadId':_0x176cf8,'isFromAdapter':_0x3f7d5a});}['attachTo'](_0x22fa84){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x22fa84});}['addComment'](_0x1f9cc0){const {channelId:_0x36d904,id:_0xfb8e50}=this;this['_repository']['fire'](ii('addComment',_0x36d904,_0xfb8e50),Object['assign']({'channelId':_0x36d904,'threadId':_0xfb8e50},_0x1f9cc0));}['getComment'](_0x21375d){if('string'!=typeof _0x21375d)throw new _0x36d19a('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x21375d});return this['comments']['get'](_0x21375d);}['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'](_0xfe6f05=>_0xfe6f05['toJSON']()),'attributes':this['attributes']};}['_add'](_0x45734c){return this['listenTo'](_0x45734c,'change:authoredAt',()=>{const _0x1d2a36=this['_findOptimalIndex'](_0x45734c),_0x2c9e12=this['comments'];_0x1d2a36-0x1!=_0x2c9e12['getIndex'](_0x45734c)&&_0x1d2a36+0x1!=_0x2c9e12['getIndex'](_0x45734c)&&(this['_remove'](_0x45734c),this['_add'](_0x45734c));}),this['comments']['add'](_0x45734c,this['_findOptimalIndex'](_0x45734c));}['_update'](_0x32bdd2){const {channelId:_0x521bbb,id:_0x4fcae5}=this;this['_repository']['fire'](ii('updateCommentThread',_0x521bbb),{..._0x32bdd2,'channelId':_0x521bbb,'threadId':_0x4fcae5});}['_remove'](_0x4ff2f9){return this['stopListening'](_0x4ff2f9),_0x4ff2f9['destroy'](),this['comments']['remove'](_0x4ff2f9);}['_findOptimalIndex'](_0xa9b171){const _0x4a09f7=this['comments']['find'](_0xee9612=>new Date(_0xee9612['authoredAt'])['getTime']()>new Date(_0xa9b171['authoredAt'])['getTime']());return _0x4a09f7?this['comments']['getIndex'](_0x4a09f7):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x5d3602(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x65c0c1,_0x3632ac){super();const _0x430e62=_0x65c0c1['context']['plugins']['get'](_0xdd578)['me'],_0x49c066=_0x65c0c1['getCommentThread'](_0x3632ac['threadId']),_0x4296a7=0x0===_0x49c066['comments']['length'],_0x9636b2=_0x430e62===_0x3632ac['author'];this['id']=_0x3632ac['id'],this['threadId']=_0x3632ac['threadId'],this['author']=_0x3632ac['author'],this['creator']=_0x3632ac['creator'],this['isExternal']=Boolean(_0x3632ac['attributes']&&_0x3632ac['attributes']['@external']),this['set']('content',_0x3632ac['content']),this['createdAt']=_0x3632ac['createdAt']||new Date(),this['set']('authoredAt',_0x3632ac['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x49c066,'resolvedAt'),this['set']('attributes',_0x3632ac['attributes']||{}),this['bind']('isEditable')['to'](_0x65c0c1,'_permissions',()=>{const _0xc2246f=_0x65c0c1['getPermissions'](_0x49c066['channelId'])['write'],_0x5b8919=_0x65c0c1['getPermissions'](_0x49c066['channelId'])['modifyAll'];return _0x9636b2&&_0xc2246f||!_0x9636b2&&_0x5b8919;}),this['bind']('isRemovable')['to'](_0x49c066,'isRemovable',_0x65c0c1,'_permissions',_0x9cc6a9=>{const _0xdc3693=_0x65c0c1['getPermissions'](_0x49c066['channelId'])['write'],_0x4d028a=_0x65c0c1['getPermissions'](_0x49c066['channelId'])['modifyAll'];return _0x9636b2&&_0xdc3693||_0x9cc6a9&&_0x4296a7||!_0x9636b2&&_0x4d028a&&!_0x4296a7;}),this['bind']('isReadOnly')['to'](_0x49c066,'isReadOnly'),this['_repository']=_0x65c0c1;}get['weight'](){return Math['max'](function(_0x233a74){const _0xd49b2c=document['createElement']('div');return _0xd49b2c['innerHTML']=_0x233a74,_0xd49b2c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x40ce64){const {threadId:_0x334b1d,id:_0x27fddb}=this;if(!this['_repository']['hasCommentThread'](_0x334b1d))throw new _0x36d19a('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x78c9ca}=this['_repository']['getCommentThread'](_0x334b1d);this['_repository']['fire'](ii('updateComment',_0x78c9ca,_0x334b1d),{'channelId':_0x78c9ca,'threadId':_0x334b1d,'commentId':_0x27fddb,..._0x40ce64});}['setAttribute'](_0x25a758,_0x51f5e4){const _0x4422d9=_0x38963a(this['attributes']);_0x5f0b07(_0x4422d9,_0x25a758,_0x51f5e4),this['update']({'attributes':_0x4422d9});}['removeAttribute'](_0x3287c8){const _0x283e61=_0x38963a(this['attributes']);_0x333a25(_0x283e61,_0x3287c8),this['update']({'attributes':_0x283e61});}['remove'](_0x1af0c9={}){if(!_0x1af0c9['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x10f0ea,id:_0x259e43}=this;if(!this['_repository']['hasCommentThread'](_0x10f0ea))throw new _0x36d19a('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1d5a4f}=this['_repository']['getCommentThread'](_0x10f0ea);this['_repository']['fire'](ii('removeComment',_0x1d5a4f,_0x10f0ea),{'channelId':_0x1d5a4f,'threadId':_0x10f0ea,'commentId':_0x259e43,..._0x1af0c9});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x2f01d6,..._0x2c95cf){for(const _0x28ba68 of _0x2c95cf)void 0x0!==_0x28ba68&&(_0x2f01d6+=':'+String(_0x28ba68));return _0x2f01d6;}class ei extends _0x11a9d9{constructor(_0x3e1540){super(_0x3e1540),this['set']('hasContent',!0x1);}['refresh'](){const _0x49680f=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x589d6c of _0x49680f['getRanges']())if(this['_hasContent'](_0x589d6c))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x560233=_0x17d94f(),ranges:_0x4c93d5,comment:_0x19a4ac}={}){const _0x418336=this['editor']['model'],_0x99e83f=_0x4c93d5??Array['from'](_0x418336['document']['selection']['getRanges']()),_0x3c13fa=[];for(const _0x5c2c7d of _0x99e83f)this['_hasContent'](_0x5c2c7d)&&_0x3c13fa['push'](this['_trimToContent'](_0x5c2c7d));if(!_0x3c13fa['length'])throw new _0x36d19a('addcommentthreadcommand-incorrect-ranges',null);_0x19a4ac&&this['_createCommentThread'](_0x560233,_0x19a4ac),this['_createMarkersFromRanges'](_0x560233,_0x3c13fa,!!_0x19a4ac);}['_createMarkersFromRanges'](_0x1586f1,_0x47b606,_0x256582){this['editor']['model']['change'](_0x1fbbeb=>{for(const _0x8cd2ed of _0x47b606){const _0xc776f5=_0x17d94f()['substr'](0x1,0x5),_0x15f8c4='comment:'+_0x1586f1+':'+_0xc776f5;_0x1fbbeb['addMarker'](_0x15f8c4,{'range':_0x8cd2ed,'usingOperation':_0x256582,'affectsData':_0x256582});}});}['_createCommentThread'](_0x2dae61,_0x68a74c){const _0x4ae639=this['editor']['plugins']['get']('CommentsRepository'),_0x479567=this['editor']['config']['get']('collaboration.channelId'),_0x1cdd52=this['editor']['plugins']['get']('Users')['me'];if(!_0x1cdd52)throw new _0x36d19a('addcommentthreadcommand-user-not-found',null);_0x4ae639['addCommentThread']({'threadId':_0x2dae61,'channelId':_0x479567,'comments':[{'authorId':_0x1cdd52['id'],'content':_0x68a74c,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x20aac2){for(const _0x17c3e7 of _0x20aac2['getItems']())if(this['_itemIsContent'](_0x17c3e7))return!0x0;return!0x1;}['_itemIsContent'](_0x3f2e3d){return _0x3f2e3d['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3f2e3d)&&!_0x3f2e3d['is']('element','tableCell');}['_trimToContent'](_0x2f5b83){const _0x38f0fa=_0x5bada5=>!this['_itemIsContent'](_0x5bada5['item']),_0x2e0ad5=_0x2f5b83['start']['getLastMatchingPosition'](_0x38f0fa),_0x1e42c3=_0x2f5b83['end']['getLastMatchingPosition'](_0x38f0fa,{'direction':'backward'});return this['editor']['model']['createRange'](_0x2e0ad5,_0x1e42c3);}}class si extends _0x3eacd6{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e59cb){super(_0x4e59cb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1e6f76=this['editor'],_0x5c9ebc=_0x1e6f76['model']['document']['selection'],_0x140aae=_0x58129b(()=>this['refreshSelectedViews'](),0xa);_0x5c9ebc['on']('change:range',(_0x250bcc,_0x4df021)=>{_0x4df021['directChange']&&(_0x140aae['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1e6f76['editing']['view']['document'],'change:isFocused',(_0x5365a8,_0x1a17cb,_0x64197c)=>{_0x64197c&&_0x140aae();}),this['listenTo'](_0x1e6f76['ui']['focusTracker'],'change:isFocused',(_0x13788c,_0x4221b9,_0x33f580)=>{_0x33f580||this['fire']('blur',{'isAnnotationTracked':_0x53b828=>this['_editorAnnotationsData']['has'](_0x53b828['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x334a08){if(this['_editorAnnotations']['has'](_0x334a08['view']))return;this['_editorAnnotations']['add'](_0x334a08['view']),this['editor']['ui']['focusTracker']['add'](_0x334a08['view']['element']);const _0x156ba4=this['editor']['plugins']['get']($t);this['listenTo'](_0x156ba4['collection'],'remove',(_0x2e3c9c,_0x7ec48)=>{this['editor']['ui']['focusTracker']['remove'](_0x7ec48['view']['element']),this['_editorAnnotations']['delete'](_0x7ec48['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x5b25b8){if('function'!=typeof _0x5b25b8)throw new _0x36d19a('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5b25b8);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4996bc,annotations:_0x5ba5dd}){const _0x3dbe01=[],_0x59d155=this['editor']['model']['document']['selection'],_0x4f8ca5=Array['from'](_0x59d155['getRanges']());for(const [_0x3d2915,_0x1f4b85]of this['_editorAnnotationsData']){const _0x1425cb=_0x53da96(_0x1f4b85),_0x2dd430=_0x5ba5dd['getByInnerView'](_0x3d2915);_0x1425cb&&_0x2dd430&&_0x3dbe01['push']({'annotation':_0x2dd430,'range':_0x1425cb});}function _0x53da96(_0x4fa179){for(const _0x2ffa71 of _0x4fa179)for(const _0x4190e5 of _0x4f8ca5)if(_0x2ffa71['containsRange'](_0x4190e5,!_0x59d155['isCollapsed']))return _0x2ffa71;return null;}return _0x3dbe01['sort']((_0x44f94d,_0x3d5308)=>{const _0x2df59e=_0x44f94d['range'],_0x129546=_0x3d5308['range'];if(!_0x2df59e['isEqual'](_0x129546)){if(_0x2df59e['containsRange'](_0x129546,!0x0))return 0x1;if(_0x129546['containsRange'](_0x2df59e,!0x0))return-0x1;}return _0x44f94d['annotation']==_0x4996bc?-0x1:_0x3d5308['annotation']==_0x4996bc?0x1:0x0;})['map'](_0x409f48=>_0x409f48['annotation']);}get['_editorAnnotationsData'](){const _0x3a64f8=new Map();for(const _0x473d22 of Array['from'](this['_dataCollectors']))for(const [_0x2f2b8c,_0x4ec636]of _0x473d22())_0x3a64f8['set'](_0x2f2b8c,_0x4ec636);return _0x3a64f8;}}class ni extends _0x3eacd6{['afterInit'](){const _0x4fd3a5=this['editor'];if(!_0x4fd3a5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4fd3a5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x3eacd6{constructor(_0x84ce05){super(_0x84ce05),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x42f9a8=this['editor'],_0x1501a3=_0x42f9a8['commands']['get']('importWord'),_0x112f9f=_0x42f9a8['plugins']['get'](_0xdd578);_0x1501a3&&(_0x1501a3['on']('execute',(_0x373f80,[,_0xb5d5c3])=>{_0xb5d5c3['collaboration_features']={'comments':!0x0,'user_id':_0x112f9f['me']['id']};},{'priority':_0x9cf61['high']+0xa}),this['listenTo'](_0x1501a3,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2ecb31,_0x4156b2){const {comment_threads:_0x33c3df}=_0x4156b2;_0x33c3df&&_0x33c3df['forEach'](({thread_id:_0x3fe318,comments:_0x3cd78b,is_resolved:_0x3b38c2})=>{const _0x72d70=new Date(),_0x299306=_0x3cd78b['map'](({author:_0x131b5d,content:_0x24ea27,created_at:_0x52a7b0})=>({'content':_0x24ea27,'authorId':this['editor']['plugins']['get'](_0xdd578)['me']['id'],'createdAt':_0x72d70,'attributes':{'@external':{'authorName':_0x131b5d,'createdAt':_0x52a7b0?new Date(_0x52a7b0):new Date(),'source':'importWord'}}})),_0x4ac713=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x4ac713,'threadId':_0x3fe318,'comments':_0x299306,'resolvedAt':_0x3b38c2?_0x72d70:null});});}}class ri extends _0x3eacd6{constructor(_0x45121a){super(_0x45121a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x298302=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x298302,'contentInsertion',(_0x4b9c4b,_0x5d0d7a)=>this['_removeMarkersWithoutThreads'](_0x5d0d7a['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x7fa8bf){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x7fa8bf;const _0x73163c=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2d4fab of _0x7fa8bf['keys']()){const [_0x1ca848,_0x3b9831]=_0x2d4fab['split'](':');'comment'!=_0x1ca848||_0x73163c['hasCommentThread'](_0x3b9831)||_0x7fa8bf['delete'](_0x2d4fab);}return _0x7fa8bf;}['_registerMarkerInClipboardPipeline'](){const _0x115f99=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3fde22=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3fde22&&_0x115f99['_registerMarkerToCopy']('comment',_0x3fde22);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x454b4e){switch(_0x454b4e){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x213e0a){const _0x14a2b0=_0x213e0a['split'](':');return{'group':_0x14a2b0[0x0],'id':_0x14a2b0[0x1],'part':_0x14a2b0[0x2]};}class ai extends _0x3eacd6{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4cd7b5,_0x5cf5fc)=>{if(!_0x5cf5fc['options']['showCommentHighlights'])return null;if(_0x5cf5fc['options']['ignoreResolvedComments']){const {id:_0x2ca46f}=hi(_0x4cd7b5['markerName']),_0xd25c05=this['editor']['plugins']['get'](Qt);if(_0xd25c05['getCommentThread'](_0x2ca46f)?.['isResolved']&&_0x4cd7b5['item'])return _0x5cf5fc['consumable']['consume'](_0x4cd7b5['item'],'addMarker:'+_0x4cd7b5['markerName']),_0x5cf5fc['consumable']['consume'](_0x4cd7b5['item'],'removeMarker:'+_0x4cd7b5['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1cdcd0=>{_0x1cdcd0['on']('addMarker:comment',(_0x5c7104,_0xd3af0a,_0x1a0ba5)=>{if(!_0x1a0ba5['options']['showCommentHighlights'])return;const _0x10661b=_0xd3af0a['item'];if(!_0x10661b)return;const _0x575f90=_0x1a0ba5['mapper']['toViewElement'](_0x10661b);this['editor']['model']['schema']['isObject'](_0x10661b)&&_0x575f90&&!_0x575f90['getCustomProperty']('widget')&&_0x575f90['is']('containerElement')&&Ct(_0x575f90,_0x1a0ba5['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1d3dc0,{writer:_0xc1a998,options:_0x1473d8})=>{if(!_0x1473d8['showCommentHighlights'])return null;const _0x2a3a34=_0xc1a998['createContainerElement']('div'),_0x28f8c7=_0xc1a998['createEmptyElement']('hr');return _0xc1a998['addClass']('ck-horizontal-line',_0x2a3a34),_0xc1a998['insert'](_0xc1a998['createPositionAt'](_0x2a3a34,0x0),_0x28f8c7),_0x2a3a34;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2abd31,{writer:_0x4ceced,options:_0x4d953b})=>{if(!_0x4d953b['showCommentHighlights'])return null;const _0x1915fd=_0x4ceced['createContainerElement']('span'),_0x808964=_0x4ceced['createEmptyElement']('img');return _0x4ceced['addClass']('image-inline',_0x1915fd),_0x4ceced['insert'](_0x4ceced['createPositionAt'](_0x1915fd,0x0),_0x808964),_0x1915fd;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x43d53e,{writer:_0x479489,options:_0x3f6a72})=>{if(_0x3f6a72['showCommentHighlights'])return _0x479489['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4ae6ef,_0xc486d9,_0x58fc7d)=>{_0x58fc7d['options']['showCommentHighlights']&&_0x4ae6ef['stop']();},{'priority':'high'});}}class ci extends _0x3eacd6{static get['requires'](){return[Qt,si,_0xdd578,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f3176){super(_0x2f3176),this['set']('isThreadsLoadingPaused',!0x0),_0x2f3176['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x246ab2,_0x456363,_0x4b4b6b,_0x3d39fd)=>{const _0x1990e2=_0x2f3176['plugins']['get'](Qt),_0x21469d=_0x4b4b6b?hi(_0x4b4b6b)['id']:null;_0x2f3176['model']['change'](()=>{if(_0x21469d){const _0x1401c7=this['getAllMarkersForId'](_0x21469d);for(const _0x4f46c1 of _0x1401c7)_0x2f3176['editing']['reconvertMarker'](_0x4f46c1);}if(_0x3d39fd){const {id:_0x3d82c7}=hi(_0x3d39fd),_0x3c28ed=_0x1990e2['getCommentThread'](_0x3d82c7);if(_0x3c28ed&&_0x3c28ed['unlinkedAt'])return;if(_0x3c28ed&&!_0x3c28ed['isAttached'])return;const _0x417fc5=this['getAllMarkersForId'](_0x3d82c7);for(const _0x1f9400 of _0x417fc5)_0x2f3176['editing']['reconvertMarker'](_0x1f9400);}}),_0x21469d&&this['scrollToThreadMarker'](_0x21469d);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4740ee=this['editor'],_0x197fe5=_0x4740ee['plugins']['get'](Qt),_0x13dec7=_0x4740ee['config']['get']('collaboration.channelId'),_0x3c3aa0=_0x197fe5['getCommentThreads']()['filter'](_0x548517=>_0x548517['channelId']!==_0x13dec7);_0x4740ee['commands']['add']('addCommentThread',new ei(_0x4740ee)),this['listenTo'](_0x4740ee,'change:isReadOnly',(_0x39bdeb,_0x140d6a,_0x4c0f74)=>{_0x197fe5['switchReadOnly'](_0x4c0f74,_0x4740ee['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x197fe5,di('addCommentThread',_0x13dec7),(_0x4fc90f,{threadId:_0x2bc9d})=>{const _0x5dbae5=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x2bc9d);_0x5dbae5?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2bc9d);}),this['listenTo'](_0x197fe5,di('removeCommentThread',_0x13dec7),(_0x5aa955,{threadId:_0x115b4d})=>{_0x4740ee['model']['enqueueChange']({'isUndoable':!0x1},_0x425689=>{const _0x361bc4=this['getAllMarkersForId'](_0x115b4d);for(const _0x2aec44 of _0x361bc4)_0x425689['removeMarker'](_0x2aec44);});}),this['listenTo'](_0x197fe5,di('resolveCommentThread',_0x13dec7),(_0x951c3d,{threadId:_0x37536c})=>{(this['_reconvertMarkers'](_0x37536c),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x37536c)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x197fe5,di('reopenCommentThread',_0x13dec7),(_0x52c653,{threadId:_0xd59611})=>{this['_reconvertMarkers'](_0xd59611);},{'priority':'low'}),this['listenTo'](_0x197fe5,di('addComment',_0x13dec7),(_0xe39335,{threadId:_0x47b55e,isFromAdapter:_0x130f7b})=>{const _0x2425fd=this['getAllMarkersForId'](_0x47b55e);if(_0x130f7b||0x0==_0x2425fd['length']||!_0x197fe5['hasCommentThread'](_0x47b55e))return;0x1===_0x197fe5['getCommentThread'](_0x47b55e)['length']&&_0x4740ee['model']['enqueueChange']({'isUndoable':!0x1},_0x2b4268=>{for(const _0x85c51c of _0x2425fd)_0x2b4268['updateMarker'](_0x85c51c,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3c3aa0);}['afterInit'](){!async function(_0x5473d5){const _0x11fe09=_0x37b3c([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x3beddd=0x73460ab3,_0x2b7e83=0x73418d53^_0x3beddd,_0x214814=window[_0x37b3c([0x44,0x61,0x74,0x65])][_0x37b3c([0x6e,0x6f,0x77])](),_0x5baae6=_0x5473d5[_0x37b3c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1384ca=new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b4eed=>{_0x5baae6[_0x37b3c([0x6f,0x6e,0x63,0x65])](_0x37b3c([0x72,0x65,0x61,0x64,0x79]),_0x4b4eed);}),_0x3f60d8={[_0x37b3c([0x6b,0x74,0x79])]:_0x37b3c([0x45,0x43]),[_0x37b3c([0x75,0x73,0x65])]:_0x37b3c([0x73,0x69,0x67]),[_0x37b3c([0x63,0x72,0x76])]:_0x37b3c([0x50,0x2d,0x32,0x35,0x36]),[_0x37b3c([0x78])]:_0x37b3c([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]),[_0x37b3c([0x79])]:_0x37b3c([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]),[_0x37b3c([0x61,0x6c,0x67])]:_0x37b3c([0x45,0x53,0x32,0x35,0x36])},_0x4fd7cd=_0x5baae6[_0x37b3c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x37b3c([0x67,0x65,0x74])](_0x37b3c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x45732c(){let _0x37f7a,_0x334e4b=null,_0x4a5a58=null;try{if(_0x4fd7cd==_0x37b3c([0x47,0x50,0x4c]))return _0x37b3c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x37f7a=_0x30b38a(),!_0x37f7a)return _0x37b3c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x37f7a[_0x37b3c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4a5a58=_0xc307f8(_0x37f7a[_0x37b3c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x37f7a[_0x37b3c([0x6a,0x74,0x69])])),await _0x3c4b09()?_0x363174()?_0x40ca35()?_0x37b3c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5ba59a()?(_0x37f7a[_0x37b3c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37b3c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x334e4b=_0xbb3967(_0x37b3c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x53a1b3()):_0x37b3c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x37b3c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x37b3c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x37b3c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x40ca35(){const _0x288441=[_0x37b3c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x37b3c([0x74,0x72,0x69,0x61,0x6c])][_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37f7a[_0x37b3c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x214814/0x3e8:0xe10*_0x2b7e83;return _0x37f7a[_0x37b3c([0x65,0x78,0x70])]<_0x288441;}function _0x363174(){const _0x812a68=_0x37f7a[_0x37b3c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x812a68)return!0x1;if(_0x812a68[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x2a])))return!0x0;if(_0x812a68[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x43,0x4d,0x54])))return!0x0;if(_0x812a68[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x5bdb3f())return!0x0;if(_0x812a68[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x52,0x43,0x4d,0x54]))){if(_0x17931d())return!0x0;if(_0x28009d()||_0x214d61())return!0x0;}return!0x1;}function _0x5ba59a(){const _0x41229c=_0x37f7a[_0x37b3c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x41229c||0x0==_0x41229c[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3d6bac}=new URL(window[_0x37b3c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x41229c[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d6bac))return!0x0;const _0x131aab=_0x3d6bac[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])](_0x37b3c([0x2e]));return _0x41229c[_0x37b3c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2114ae=>_0x2114ae[_0x37b3c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37b3c([0x2a])))[_0x37b3c([0x6d,0x61,0x70])](_0x6c2764=>_0x6c2764[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])](_0x37b3c([0x2e])))[_0x37b3c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x34b24e=>_0x34b24e[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x131aab[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x37b3c([0x6d,0x61,0x70])](_0x464a68=>Array(_0x131aab[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x464a68[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x37b3c([0x66,0x69,0x6c,0x6c])](_0x464a68[0x0]===_0x37b3c([0x2a])?_0x37b3c([0x2a]):'')[_0x37b3c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x464a68))[_0x37b3c([0x73,0x6f,0x6d,0x65])](_0x35551b=>_0x131aab[_0x37b3c([0x65,0x76,0x65,0x72,0x79])]((_0x298b2b,_0x2e5f3e)=>_0x35551b[_0x2e5f3e]===_0x298b2b||_0x35551b[_0x2e5f3e]===_0x37b3c([0x2a])));}function _0x53a1b3(){return _0x334e4b&&_0x4a5a58?new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x49a49a,_0xf7f41d)=>{_0x334e4b[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x49a49a,_0xf7f41d),_0x4a5a58[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x52e078=>{_0x52e078!=_0x37b3c([0x56,0x61,0x6c,0x69,0x64])&&_0x49a49a(_0x52e078);},_0xf7f41d);}):_0x334e4b||_0x4a5a58||_0x37b3c([0x56,0x61,0x6c,0x69,0x64]);}}function _0xc307f8(_0x3790d7,_0x1ab890){return new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43edbd=>{if(_0x40ace4())return _0x43edbd(_0x37b3c([0x56,0x61,0x6c,0x69,0x64]));_0x34e464(),_0x5baae6[_0x37b3c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x37b3c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2d146a=!0x1;const _0x349330=_0x17d94f();function _0x1420ec(_0x41f6af){return!!_0x41f6af&&(typeof _0x41f6af===_0x37b3c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x41f6af===_0x37b3c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x41f6af[_0x37b3c([0x74,0x68,0x65,0x6e])]===_0x37b3c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x41f6af[_0x37b3c([0x63,0x61,0x74,0x63,0x68])]===_0x37b3c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x461159(_0x437866){_0x522e5c(_0x437866)[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x12d0ab=>{if(!_0x12d0ab||_0x12d0ab[_0x37b3c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x37b3c([0x6f,0x6b]))return _0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x10e51c(_0x57039f(_0x349330+_0x1ab890))!=_0x12d0ab[_0x37b3c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x37b3c([0x56,0x61,0x6c,0x69,0x64]);})[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x245125=>(_0x47304c(),_0x245125),()=>{const _0x16c621=_0x11780f();return null==_0x16c621?(_0x47304c(),_0x37b3c([0x56,0x61,0x6c,0x69,0x64])):_0x37b3c(_0x214814-_0x16c621>(0x574a8eb3^_0x3beddd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x43edbd)[_0x37b3c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x43edbd(_0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x457134=0x7370e433^_0x3beddd;function _0x47304c(){const _0x5ed8fa=_0x37b3c([0x6c,0x6c,0x63,0x74,0x2d])+_0x10e51c(_0x57039f(_0x3790d7)),_0x2ad861=_0x313413(_0x10e51c(window[_0x37b3c([0x4d,0x61,0x74,0x68])][_0x37b3c([0x63,0x65,0x69,0x6c])](_0x214814/_0x457134)));window[_0x37b3c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37b3c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5ed8fa,_0x2ad861);}function _0x11780f(){const _0x33c971=_0x37b3c([0x6c,0x6c,0x63,0x74,0x2d])+_0x10e51c(_0x57039f(_0x3790d7)),_0x1daca3=window[_0x37b3c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37b3c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x33c971);return _0x1daca3?window[_0x37b3c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x313413(_0x1daca3),0x10)*_0x457134:null;}function _0x522e5c(_0x114bed){return new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23dfac,_0x2c3808)=>{_0x114bed[_0x37b3c([0x74,0x68,0x65,0x6e])](_0x23dfac,_0x2c3808),window[_0x37b3c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2c3808,0x7347de73^_0x3beddd);});}}_0x5baae6[_0x37b3c([0x6f,0x6e])](_0x37b3c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x235fca,_0x28ea08)=>{if(_0x28ea08[0x0]!=_0x3790d7)return _0x43edbd(_0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x28ea08[0x1]={..._0x28ea08[0x1],[_0x37b3c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x349330};},{[_0x37b3c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37b3c([0x68,0x69,0x67,0x68])}),_0x5baae6[_0x37b3c([0x6f,0x6e])](_0x37b3c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x47650e=>{_0x1420ec(_0x47650e[_0x37b3c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2d146a=!0x0,_0x461159(_0x47650e[_0x37b3c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x37b3c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37b3c([0x6c,0x6f,0x77])}),_0x1384ca[_0x37b3c([0x74,0x68,0x65,0x6e])](()=>{_0x2d146a||_0x43edbd(_0x37b3c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x40ace4(){return _0x5baae6[_0x37b3c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37b3c([0x76,0x69,0x65,0x77])][_0x37b3c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x37b3c([0x61,0x75,0x74,0x6f]);}function _0x34e464(){_0x5baae6[_0x37b3c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37b3c([0x76,0x69,0x65,0x77])][_0x37b3c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x37b3c([0x61,0x75,0x74,0x6f]);}}function _0xbb3967(_0x285660){const _0x375739=[new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42b124=>setTimeout(_0x42b124,0x734f347f^_0x3beddd)),_0x1384ca[_0x37b3c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x94e908=>{let _0x5a1fe3=0x0;_0x5baae6[_0x37b3c([0x6d,0x6f,0x64,0x65,0x6c])][_0x37b3c([0x6f,0x6e])](_0x37b3c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2d7a5d,_0x29221b)=>{_0x29221b[0x0][_0x37b3c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5a1fe3++,_0x5a1fe3==(0x73460f5b^_0x3beddd)&&(_0x94e908(),_0x2d7a5d[_0x37b3c([0x6f,0x66,0x66])]());});}))];return window[_0x37b3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x37b3c([0x72,0x61,0x63,0x65])](_0x375739)[_0x37b3c([0x74,0x68,0x65,0x6e])](()=>_0x285660);}async function _0x42eb41(){await _0x1384ca,_0x5baae6[_0x37b3c([0x6d,0x6f,0x64,0x65,0x6c])][_0x37b3c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x81a223,_0x5baae6[_0x37b3c([0x6d,0x6f,0x64,0x65,0x6c])][_0x37b3c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x81a223,_0x5baae6[_0x37b3c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x37b3c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5bdb3f(){return window[_0x37b3c([0x67,0x6c,0x6f,0x62])]&&window[_0x37b3c([0x67,0x6c,0x6f,0x62])][_0x37b3c([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x17931d(){return _0x4157d7(_0x37b3c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4fdf77(_0x37b3c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x37b3c([0x73,0x74,0x61,0x74,0x65])]==_0x37b3c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x28009d(){return _0x4157d7(_0x37b3c([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 _0x214d61(){return _0x4157d7(_0x37b3c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x6e10af(_0x3edafa){const _0x445519=_0x4439a8();_0x5baae6[_0x445519]=_0x37b3c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3edafa,_0x3edafa!=_0x37b3c([0x56,0x61,0x6c,0x69,0x64])&&_0x42eb41();}function _0x4439a8(){const _0x8d190f=window[_0x37b3c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x37b3c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x37b3c([0x6e,0x6f,0x77])]())[_0x37b3c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x37b3c([0x2e]),'');let _0x35f1f4=_0x37b3c([0x4b]);for(let _0x14b71e=0x0;_0x14b71e<_0x8d190f[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x14b71e+=0x2){let _0x17158b=window[_0x37b3c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x8d190f[_0x37b3c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x14b71e,_0x14b71e+0x2));_0x17158b>=_0x11fe09[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x17158b-=_0x11fe09[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x35f1f4+=_0x11fe09[_0x17158b];}return _0x35f1f4;}function _0x30b38a(){const _0x32307c=_0x4fd7cd[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])](_0x37b3c([0x2e]));if(0x3!=_0x32307c[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5282a7(_0x32307c[0x1]);function _0x5282a7(_0x5e6796){const _0x68cb05=_0x53606a(_0x5e6796);return _0x68cb05&&_0x1c2261()?_0x68cb05:null;function _0x1c2261(){const _0x388d57=_0x68cb05[_0x37b3c([0x6a,0x74,0x69])],_0x57fb07=window[_0x37b3c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x388d57[_0x37b3c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x388d57[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x303070={..._0x68cb05,[_0x37b3c([0x6a,0x74,0x69])]:_0x388d57[_0x37b3c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x388d57[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x303070[_0x37b3c([0x76,0x63])],_0x57039f(_0x303070)==_0x57fb07;}}}async function _0x3c4b09(){let _0x24a70d=!0x0;try{const _0x387481=_0x4fd7cd[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])](_0x37b3c([0x2e])),[_0x58b3c7,_0xad2338,_0x1724e5]=_0x387481;return _0x85b062(_0x58b3c7),await _0x222af4(_0x58b3c7,_0xad2338,_0x1724e5),_0x24a70d;}catch{return!0x1;}function _0x85b062(_0x5d543b){const _0x52c36f=_0x53606a(_0x5d543b);_0x52c36f&&_0x52c36f[_0x37b3c([0x61,0x6c,0x67])]==_0x37b3c([0x45,0x53,0x32,0x35,0x36])||(_0x24a70d=!0x1);}async function _0x222af4(_0x2ba035,_0x242799,_0x1b44fc){const _0x56709a=window[_0x37b3c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x37b3c([0x66,0x72,0x6f,0x6d])](_0x479258(_0x1b44fc),_0x518a1f=>_0x518a1f[_0x37b3c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x181232=new window[(_0x37b3c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x37b3c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2ba035+_0x37b3c([0x2e])+_0x242799),_0x2a0f90=window[_0x37b3c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x37b3c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2a0f90)return;const _0x3dba1d=await _0x2a0f90[_0x37b3c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x37b3c([0x6a,0x77,0x6b]),_0x3f60d8,{[_0x37b3c([0x6e,0x61,0x6d,0x65])]:_0x37b3c([0x45,0x43,0x44,0x53,0x41]),[_0x37b3c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x37b3c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x37b3c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2a0f90[_0x37b3c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x37b3c([0x6e,0x61,0x6d,0x65])]:_0x37b3c([0x45,0x43,0x44,0x53,0x41]),[_0x37b3c([0x68,0x61,0x73,0x68])]:{[_0x37b3c([0x6e,0x61,0x6d,0x65])]:_0x37b3c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3dba1d,_0x56709a,_0x181232)||(_0x24a70d=!0x1);}}function _0x53606a(_0x27d7ff){return _0x27d7ff[_0x37b3c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x37b3c([0x65,0x79]))?JSON[_0x37b3c([0x70,0x61,0x72,0x73,0x65])](_0x479258(_0x27d7ff)):null;}function _0x479258(_0x48ad16){return window[_0x37b3c([0x61,0x74,0x6f,0x62])](_0x48ad16[_0x37b3c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x37b3c([0x2b]))[_0x37b3c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x37b3c([0x2f])));}function _0x57039f(_0x7e2c23){let _0x10ee37=0x1505;function _0x2b3350(_0x5838c7){for(let _0x2bd1d7=0x0;_0x2bd1d7<_0x5838c7[_0x37b3c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2bd1d7++){const _0x30f958=_0x5838c7[_0x37b3c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2bd1d7);_0x10ee37=(_0x10ee37<<0x5)+_0x10ee37+_0x30f958,_0x10ee37&=_0x10ee37;}}function _0x43b1ee(_0x23c796){Array[_0x37b3c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x23c796)?_0x23c796[_0x37b3c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x43b1ee):_0x23c796&&typeof _0x23c796==_0x37b3c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x37b3c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x23c796)[_0x37b3c([0x73,0x6f,0x72,0x74])]()[_0x37b3c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x365862,_0x409846])=>{_0x2b3350(_0x365862),_0x43b1ee(_0x409846);}):_0x2b3350(window[_0x37b3c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x23c796));}return _0x43b1ee(_0x7e2c23),_0x10ee37>>>0x0;}function _0x10e51c(_0xb1b4bd){return _0xb1b4bd[_0x37b3c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x37b3c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x37b3c([0x30]));}function _0x313413(_0x737c35){return _0x737c35[_0x37b3c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x37b3c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x37b3c([0x6a,0x6f,0x69,0x6e])]('');}function _0x4157d7(_0x2d931f){return _0x5baae6[_0x37b3c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x37b3c([0x68,0x61,0x73])](_0x2d931f);}function _0x4fdf77(_0x6c5df7){return _0x5baae6[_0x37b3c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x37b3c([0x67,0x65,0x74])](_0x6c5df7);}function _0x81a223(){}function _0x37b3c(_0x1f5afa){return _0x1f5afa['map'](_0x122ea8=>String['fromCharCode'](_0x122ea8))['join']('');}_0x6e10af(await _0x45732c());}(this);}['destroy'](){const _0x463738=this['editor']['plugins']['get'](Qt),_0x3cf29e=this['editor']['config']['get']('collaboration.channelId');for(const _0x31213f of _0x463738['getCommentThreads']({'channelId':_0x3cf29e}))_0x463738['_detachCommentThread'](_0x31213f['id']),_0x463738['_threads']['delete'](_0x31213f['id']);super['destroy']();}['hasMarkerForId'](_0x22fc84){return this['getAllMarkersForId'](_0x22fc84)['length']>0x0;}['getAllMarkersForId'](_0x595615){const _0x3fdf63=[];for(const _0x48ffb8 of this['editor']['model']['markers'])_0x48ffb8['name']['startsWith']('comment:'+_0x595615)&&_0x3fdf63['push'](_0x48ffb8);return _0x3fdf63;}['scrollToThreadMarker'](_0x2e8aa3){setTimeout(()=>{const _0x23f8f1=this['_getTargetForId'](_0x2e8aa3);if(!_0x23f8f1)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x2e8aa3&&_0x12c9fb({'target':_0x23f8f1[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5c938f){this['editor']['model']['change'](()=>{for(const _0x1572b3 of this['getAllMarkersForId'](_0x5c938f))this['editor']['editing']['reconvertMarker'](_0x1572b3);});}['_attachArchivedThread'](_0x145d02){const _0x582760=this['editor']['plugins']['get'](Qt),_0x571d78=this['editor']['plugins']['get'](si),_0x58c318=_0x582760['getCommentThread'](_0x145d02);if(!_0x58c318['isAttached']){const _0x17a35a=_0x58c318['attachTo'](()=>this['_getTargetForId'](_0x58c318['id']));_0x571d78['registerAnnotation'](_0x17a35a),_0x58c318['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x37e74c=this['editor'],_0x39ff5f=_0x37e74c['plugins']['get'](_0xdd578);_0x37e74c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xd18f96,_0x4ad110)=>{const {id:_0x120e80}=hi(_0xd18f96['markerName']),_0x55c267=_0x37e74c['plugins']['get'](Qt)['getCommentThread'](_0x120e80),_0x50b746=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x120e80;let _0x7a750d;if(_0x55c267&&_0x55c267['isResolved']&&!_0x50b746&&_0xd18f96['item'])return _0x4ad110['consumable']['consume'](_0xd18f96['item'],'addMarker:'+_0xd18f96['markerName']),_0x4ad110['consumable']['consume'](_0xd18f96['item'],'removeMarker:'+_0xd18f96['markerName']),null;const _0x189b99=['ck-comment-marker'];return _0x50b746&&_0x189b99['push']('ck-comment-marker--active'),_0x7a750d=_0x55c267?.['length']?_0x55c267['comments']['first']['author']['id']:_0x39ff5f['me']['id'],{'classes':_0x189b99,'attributes':{'data-comment':_0x120e80,'data-author-id':_0x7a750d}};}}),_0x37e74c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xc941ec,{options:_0x5bf99c})=>{if(_0x5bf99c['showCommentHighlights'])return null;const _0x2d9038=_0x37e74c['plugins']['get'](Qt),_0x416496=_0x37e74c['model']['markers']['get'](_0xc941ec),{id:_0x3406d1,part:_0x544e7e}=hi(_0xc941ec);return _0x416496&&!_0x416496['affectsData']||_0x5bf99c['ignoreResolvedComments']&&_0x2d9038['getCommentThread'](_0x3406d1)?.['isResolved']?null:{'group':'comment','name':_0x544e7e?_0x3406d1+':'+_0x544e7e:_0x3406d1};}}),_0x37e74c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x558847,{writer:_0x2f10cb})=>_0x2f10cb['createElement']('$marker',{'data-name':'comment:'+_0x558847['getAttribute']('id')})}),_0x37e74c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x220de9=this['editor'],_0x4d85e9=_0x220de9['plugins']['get'](Qt),_0x581a93=new Set(),_0x107d13=new Set();_0x220de9['model']['document']['registerPostFixer'](_0x57c9c9=>{let _0x9da9b8=!0x1;for(const {name:_0x25b89f,data:_0x437bfa}of _0x220de9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x432613,id:_0x42703f}=hi(_0x25b89f);let _0x491c29=_0x437bfa['newRange'];if('comment'!==_0x432613||!_0x491c29)continue;const _0x32acb0='$graveyard'===_0x491c29['root']['rootName'];_0x32acb0||(_0x491c29=li(_0x491c29,_0x220de9['model']),!_0x491c29||_0x491c29['isCollapsed']||!_0x437bfa['newRange']||_0x491c29['isEqual'](_0x437bfa['newRange']))?_0x220de9['model']['hasContent'](_0x491c29)&&!_0x32acb0?this['isThreadsLoadingPaused']?_0x581a93['add'](_0x25b89f):this['_handleThreadMarker'](_0x25b89f,_0x42703f):(_0x107d13['add'](_0x25b89f),_0x581a93['delete'](_0x25b89f),_0x57c9c9['removeMarker'](_0x25b89f),_0x9da9b8=!0x0):(_0x57c9c9['updateMarker'](_0x25b89f,{'range':_0x491c29}),_0x9da9b8=!0x0);}return _0x9da9b8;}),this['on']('change:isThreadsLoadingPaused',(_0x5167de,_0x84ad7a,_0x3a320e)=>{if(!_0x3a320e&&_0x581a93['size'])for(const _0x4b7c18 of _0x581a93){const {id:_0x51cedd}=hi(_0x4b7c18);_0x581a93['delete'](_0x4b7c18),_0x220de9['model']['markers']['get'](_0x4b7c18)&&this['_handleThreadMarker'](_0x4b7c18,_0x51cedd);}}),this['listenTo'](_0x220de9['model']['document'],'change',()=>{for(const {name:_0x56c0be,data:{newRange:_0x22dbcc}}of _0x220de9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5d82d4,id:_0x2c859a}=hi(_0x56c0be);if('comment'!==_0x5d82d4)continue;const _0x3cb59b=_0x4d85e9['getCommentThread'](_0x2c859a),_0x185e08=this['hasMarkerForId'](_0x2c859a);_0x3cb59b&&(!_0x3cb59b['_hasTargetInContent']&&_0x22dbcc&&_0x220de9['editing']['view']['once']('render',()=>{const _0x5c2fbf=_0x220de9['plugins']['get']($t),_0xf4b6ba=_0x4d85e9['_threadToController']['get'](_0x3cb59b)['view'];_0x5c2fbf['getByInnerView'](_0xf4b6ba)['refreshVisibility']();},{'priority':'low'}),_0x3cb59b['_hasTargetInContent']=_0x185e08||!!_0x22dbcc),_0x22dbcc||(_0x107d13['add'](_0x56c0be),_0x581a93['delete'](_0x56c0be));}for(const _0x24ab21 of _0x107d13){const {id:_0x18d1ad}=hi(_0x24ab21),_0x2d7bcf=_0x4d85e9['getCommentThread'](_0x18d1ad);if(_0x581a93['delete'](_0x24ab21),!_0x2d7bcf)continue;const _0x4287d9=this['hasMarkerForId'](_0x18d1ad);_0x4287d9||_0x2d7bcf['isSubmitted']?_0x4287d9||_0x2d7bcf['unlinkedAt']||_0x2d7bcf['setUnlinkedAt'](new Date()):_0x2d7bcf['remove']();}_0x107d13['clear']();});}['_handleInitialThreads'](_0x662107){_0x662107['forEach'](_0x2249cf=>{_0x2249cf['unlinkedAt']&&this['_attachArchivedThread'](_0x2249cf['id']);});}['_getTargetForId'](_0x455a7c){const _0x5d2398=this['editor'],_0x3f27e6=this['getAllMarkersForId'](_0x455a7c);return _0x29895f(_0x5d2398['editing'],_0x3f27e6);}['_getTextContext'](_0x5556f6){const _0x4bc392=this['getAllMarkersForId'](_0x5556f6);let _0x41c7d3='',_0x153ad0=!0x1;for(const _0x23f97e of _0x4bc392){const _0x2834f6=_0x23f97e['getRange']();for(const _0x3822fa of Array['from'](_0x2834f6['getItems']()))_0x3822fa['is']('$textProxy')?(_0x41c7d3&&_0x153ad0&&(_0x41c7d3+='\x20',_0x153ad0=!0x1),_0x41c7d3+=_0x3822fa['data']):_0x153ad0=!0x0;_0x153ad0=!0x0;}return _0x41c7d3['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5b036f,_0x4063bd){const _0x3214fe=this['editor'],_0x5ec04f=_0x3214fe['plugins']['get'](Qt);let _0x412845=_0x5ec04f['getCommentThread'](_0x4063bd);const _0x465a6e=_0x3214fe['config']['get']('collaboration.channelId'),_0x5e8d6d=_0x3214fe['plugins']['get'](si);if(_0x412845&&(_0x412845['unlinkedAt']&&_0x412845['setUnlinkedAt'](null),_0x412845['isAttached']))return _0x412845;return!this['getAllMarkersForId'](_0x4063bd)[0x0]['managedUsingOperations']?_0x3214fe['editing']['view']['once']('render',()=>{if(_0x5ec04f['getCommentThread'](_0x4063bd))return;const _0x416344=_0x3214fe['plugins']['get']($t);_0x412845=_0x5ec04f['openNewCommentThread']({'channelId':_0x465a6e,'threadId':_0x4063bd,'target':()=>this['_getTargetForId'](_0x4063bd),'context':{'type':'text','value':this['_getTextContext'](_0x4063bd)}});const _0x544c7a=_0x5ec04f['_threadToController']['get'](_0x412845)['view'],_0x4674eb=_0x416344['getByInnerView'](_0x544c7a);_0x4674eb&&_0x5e8d6d['registerAnnotation'](_0x4674eb);},{'priority':'low'}):_0x5ec04f['fetchCommentThread']({'channelId':_0x465a6e,'threadId':_0x4063bd})['then'](_0x3e10f0=>{if('destroyed'!==_0x3214fe['state']){if(_0x412845=_0x3e10f0,_0x412845&&!_0x412845['isAttached']){const _0x2a50b3=_0x412845['attachTo'](()=>this['_getTargetForId'](_0x4063bd));_0x5e8d6d['registerAnnotation'](_0x2a50b3),_0x412845['isResolved']&&this['_reconvertMarkers'](_0x4063bd);}else{if(!_0x412845){const _0x59ba86=this['getAllMarkersForId'](_0x4063bd);_0x3214fe['model']['change'](_0xf4d275=>{for(const _0x4ec3c4 of _0x59ba86)_0xf4d275['removeMarker'](_0x4ec3c4);});}}}}),_0x412845;}['_handleThreadMarker'](_0x33c963,_0x2188f7){const _0x452576=this['_attachMarkerToThread'](_0x33c963,_0x2188f7);_0x452576&&!_0x452576['context']&&_0x452576['setContext']({'type':'text','value':this['_getTextContext'](_0x2188f7)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4be283=this['editor'];_0x316fd3(_0x4be283['model'],({left:_0x159728,entered:_0xc79b99})=>{for(const _0x1ad2b5 of _0x159728)if(ui(_0x1ad2b5)){_0x4be283['ui']['ariaLiveAnnouncer']['announce'](bt(_0x4be283['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4bf756 of _0xc79b99)if(ui(_0x4bf756)){_0x4be283['ui']['ariaLiveAnnouncer']['announce'](bt(_0x4be283['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x57757a(_0x46e7bf)));break;}});}}function di(_0x2b01c0,_0x2ea458){return _0x2ea458?_0x2b01c0+':'+_0x2ea458:_0x2b01c0;}function li(_0x10bf67,_0x4506d0){const _0x36953f=_0x4506d0['schema'],_0x5d5f9a=_0x4506d0['createRange'](_0x10bf67['start']);for(const _0x3411b2 of _0x10bf67['getWalker']()){const {type:_0x486a40,item:_0x5af265,nextPosition:_0x42b830}=_0x3411b2;if('text'===_0x486a40||_0x36953f['isObject'](_0x5af265)){const _0x30445d=_0x4506d0['createPositionBefore'](_0x5af265);_0x5d5f9a['isCollapsed']&&(_0x5d5f9a['start']=_0x30445d),_0x5d5f9a['end']=_0x42b830;}}return _0x5d5f9a;}function ui(_0x2ce202){return'comment'===hi(_0x2ce202['name'])['group'];}class mi extends _0x3eacd6{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x365599=this['editor'],_0x5a89c4=_0x365599['plugins']['get'](Qt),_0x3f0eee=_0x365599['plugins']['get'](ci),_0xb4bbbc=_0x365599['plugins']['get']($t),_0x2cfcb6=_0x365599['plugins']['get'](si);_0x365599['ui']['componentFactory']['add']('comment',()=>{const _0x346f6a=this['_createUIButton'](_0x542a2);return _0x346f6a['tooltip']=!0x0,_0x346f6a;}),_0x365599['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x2cfcb6['addSourceCollector'](()=>{const _0x3de9db=[];for(const [_0x27c0f4,_0x587bb4]of _0x5a89c4['_threadToController']){const _0x1c76d2=_0x3f0eee['getAllMarkersForId'](_0x27c0f4['id']),_0x3021d4=_0x1c76d2['map'](_0x21acbe=>_0x21acbe['getRange']());_0x1c76d2['length']>0x0&&_0x3de9db['push']([_0x587bb4['view'],_0x3021d4]);}return _0x3de9db;}),this['listenTo'](_0xb4bbbc,'change:activeAnnotations',(_0x4dab4c,_0x461272,_0x48c1b8)=>{const _0x155fb8=Array['from'](_0x48c1b8)['map'](_0x32e7bf=>_0x32e7bf['innerView'])['find'](_0x4ed0f7=>_0x5a89c4['_viewToController']['has'](_0x4ed0f7));if(!_0x155fb8)return void(_0x3f0eee['activeMarker']=null);const _0x55aae8=_0x5a89c4['_viewToController']['get'](_0x155fb8)['model']['id'],_0x22d072='comment:'+_0x55aae8;_0x55aae8&&_0x3f0eee['hasMarkerForId'](_0x55aae8)?_0x3f0eee['activeMarker']=_0x22d072:_0x3f0eee['activeMarker']&&(_0x3f0eee['activeMarker']=null);}),this['listenTo'](_0x5a89c4,'removeCommentThread',(_0x309b7b,{threadId:_0x2596c0,isFromAdapter:_0x383b01})=>{!_0x383b01&&_0x365599['ui']['focusTracker']['isFocused']&&_0x3f0eee['hasMarkerForId'](_0x2596c0)&&_0x365599['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5a89c4,'addComment',(_0x3969a1,{threadId:_0x1bbfab,isFromAdapter:_0x4e5c42})=>{if(_0x4e5c42||!_0x3f0eee['hasMarkerForId'](_0x1bbfab)||!_0x5a89c4['hasCommentThread'](_0x1bbfab))return;0x1===_0x5a89c4['getCommentThread'](_0x1bbfab)['length']&&(_0x365599['editing']['view']['focus'](),_0x3969a1['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x14e7f2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1e0432;for(const _0x83b5c1 in _0x14e7f2){const _0x233b60=_0x83b5c1,_0x368373=_0x14e7f2[_0x233b60];if('commentsLicenseKeyValid'==_0x368373||'commentsLicenseKeyInvalid'==_0x368373||'commentsLicenseKeyExpired'==_0x368373||'commentsLicenseKeyDomainLimit'==_0x368373||'commentsLicenseKeyNotAllowed'==_0x368373||'commentsLicenseKeyEvaluationLimit'==_0x368373||'commentsLicenseKeyUsageLimit'==_0x368373){delete _0x14e7f2[_0x233b60],_0x1e0432=_0x368373,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1e0432&&_0x14e7f2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1e0432&&_0x14e7f2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1e0432&&_0x14e7f2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1e0432&&_0x14e7f2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1e0432&&_0x14e7f2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1e0432&&_0x14e7f2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xa33dc1){const _0x116719=this['editor'],_0x2f571f=new _0xa33dc1(_0x116719['locale']),_0x2958af=_0x116719['commands']['get']('addCommentThread');return _0x2f571f['set']({'label':bt(_0x116719['locale'],'Comment'),'icon':_0x49bd39}),_0x2f571f['bind']('isEnabled')['to'](_0x2958af,'isEnabled',_0x2958af,'hasContent',(_0x20020e,_0x3bae3c)=>_0x20020e&&_0x3bae3c),this['listenTo'](_0x2f571f,'execute',()=>{_0x2958af['execute']();}),_0x2f571f;}}class fi extends _0x3eacd6{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x3c24bf){super(_0x3c24bf),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x28afa3,_0x502453,_0x59c93)=>{_0x59c93?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2c8ff6,_0x1a1338]of this['editor']['commands'])_0x1a1338['affectsData']&&'addCommentThread'!==_0x2c8ff6&&_0x1a1338['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x106d89=this['editor']['editing']['view']['document'];this['listenTo'](_0x106d89,'cut',_0x1d0a66=>_0x1d0a66['stop'](),{'priority':'highest'}),this['listenTo'](_0x106d89,'clipboardInput',_0x615608=>_0x615608['stop'](),{'priority':'highest'}),this['listenTo'](_0x106d89,'delete',_0x15bb78=>_0x15bb78['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x48a4b7,_0x14148a]of this['editor']['commands'])_0x14148a['affectsData']&&'addCommentThread'!==_0x48a4b7&&_0x14148a['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x3d766a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a880c){super(_0x1a880c),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3c7b36=this['context']['plugins']['get']($t);this['listenTo'](_0x3c7b36,'_activateAnnotation',(_0x5ad534,_0x56009f)=>{for(const _0x557bc6 of this['activeUIs']){const _0x4d0f66=this['_uis']['get'](_0x557bc6);(0x0,this['uisData']['get'](_0x557bc6)['filter'])(_0x56009f)&&_0x4d0f66['setActiveAnnotation'](_0x56009f);}}),this['listenTo'](_0x3c7b36,'_deactivateAllAnnotations',()=>{for(const _0xea7e23 of this['activeUIs']){this['_uis']['get'](_0xea7e23)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3c7b36['_visibleAnnotations'],'add',(_0x5857f1,_0x4edf8a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4edf8a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5ec1c5){return this['activeUIs']['has'](_0x5ec1c5);}['activate'](_0x23c6b5,_0x4caf50=this['defaultFilter']){const _0x1c9b0a=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x23c6b5))throw new _0x36d19a('annotationsuis-missing-ui',this,{'uiName':_0x23c6b5});this['isActive'](_0x23c6b5)&&this['deactivate'](_0x23c6b5),this['activeUIs']['add'](_0x23c6b5);const _0x5ab8df=new jt();Xt({'source':_0x1c9b0a['_visibleAnnotations'],'target':_0x5ab8df,'filter':_0x4caf50}),this['uisData']['set'](_0x23c6b5,{'collection':_0x5ab8df,'filter':_0x4caf50});const _0x28f502=this['_uis']['get'](_0x23c6b5);_0x28f502['attach'](_0x5ab8df),this['listenTo'](_0x28f502,'change:activeAnnotation',(_0x11d6c6,_0x53e8c4,_0x2466f0,_0x15ff8e)=>{_0x15ff8e&&_0x1c9b0a['_removeActiveAnnotation'](_0x15ff8e),_0x2466f0&&_0x1c9b0a['_addActiveAnnotation'](_0x2466f0);});}['deactivate'](_0x4d8e02){if(this['activeUIs']['delete'](_0x4d8e02),!this['_uis']['has'](_0x4d8e02))throw new _0x36d19a('annotationsuis-missing-ui',this,{'uiName':_0x4d8e02});const _0x4d8733=this['_uis']['get'](_0x4d8e02);_0x4d8733['detach'](),this['stopListening'](_0x4d8733),this['uisData']['get'](_0x4d8e02)['collection']['destroy'](),this['uisData']['delete'](_0x4d8e02);}['switchTo'](_0xc9332b){if(!this['_uis']['has'](_0xc9332b))throw new _0x36d19a('annotationsuis-missing-ui',this,{'uiName':_0xc9332b});const _0x398cbc=this['context']['plugins']['get']($t),_0x5e2cf1=Array['from'](_0x398cbc['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xc9332b);const _0x57d5c7=this['_uis']['get'](_0xc9332b);_0x57d5c7['setActiveAnnotation'](_0x5e2cf1),_0x57d5c7['_setSelectedAnnotations']&&_0x5e2cf1&&_0x57d5c7['_setSelectedAnnotations']([_0x5e2cf1]);}['deactivateAll'](){for(const _0x305508 of this['activeUIs'])this['deactivate'](_0x305508);}['register'](_0x35a6f9,_0x1b3b5c){if(this['_uis']['has'](_0x35a6f9))throw new _0x36d19a('annotationsuis-register-already-registered');if('function'!=typeof _0x1b3b5c['attach']||'function'!=typeof _0x1b3b5c['detach']||'function'!=typeof _0x1b3b5c['setActiveAnnotation'])throw new _0x36d19a('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x35a6f9,_0x1b3b5c);}['refilterAnnotations'](){const _0x31f2dd=this['context']['plugins']['get']($t)['collection'],_0x486c3e=new Map(),_0x47b705=Array['from'](this['activeUIs']);for(const _0x5daa5b of this['activeUIs']){const _0x36500e=this['uisData']['get'](_0x5daa5b)['collection'];for(const _0x4c729 of _0x36500e)_0x486c3e['set'](_0x4c729,_0x5daa5b);}for(const _0x2e99ef of _0x31f2dd){const _0x5d1c53=_0x486c3e['get'](_0x2e99ef);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2e99ef);const _0x4d8c3b=_0x47b705['find'](_0x34f6c1=>this['uisData']['get'](_0x34f6c1)['filter'](_0x2e99ef));_0x5d1c53!==_0x4d8c3b&&(_0x5d1c53&&this['uisData']['get'](_0x5d1c53)['collection']['remove'](_0x2e99ef),_0x4d8c3b&&this['uisData']['get'](_0x4d8c3b)['collection']['add'](_0x2e99ef));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x185967){const _0x8ebf11=[];for(const _0xf1670c of this['activeUIs']){(0x0,this['uisData']['get'](_0xf1670c)['filter'])(_0x185967)&&_0x8ebf11['push'](_0xf1670c);}if(_0x8ebf11['length']>0x1)throw new _0x36d19a('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x8ebf11,'annotationType':_0x185967['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x23edf6('px');class _i extends _0x719be3{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4f3c4f){super(_0x4f3c4f);const _0xea6b8c=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 _0x340c23(),this['focusCycler']=new _0x567dee({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xea6b8c['to']('class')],'style':{'minHeight':_0xea6b8c['to']('minHeight',_0x523dbf=>'number'==typeof _0x523dbf?wi(_0x523dbf+0xa):null)},'dir':_0x4f3c4f['uiLanguageDirection'],'role':'application','aria-label':bt(_0x4f3c4f,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x4f3c4f,'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',_0x404e5c=>{this['_updateItemPositionInFocusables'](_0x404e5c['source']);}),this['list']['forEach'](_0xeaa9de=>{this['focusTracker']['add'](_0xeaa9de['element']),this['_updateItemPositionInFocusables'](_0xeaa9de);}),this['list']['on']('change',(_0x1333f5,_0x4dc5a8)=>{for(const _0x72c6bc of _0x4dc5a8['removed'])this['focusTracker']['remove'](_0x72c6bc['element']),this['focusables']['remove'](_0x72c6bc);for(const _0x6ac01 of _0x4dc5a8['added'])this['focusTracker']['add'](_0x6ac01['element']),this['_updateItemPositionInFocusables'](_0x6ac01);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x48449d){const _0x34b401=this['focusables']['getIndex'](_0x48449d);let _0x228f96,_0x598650;for(const _0x2475df of this['focusables'])if(_0x48449d['top']<_0x2475df['top']){_0x228f96=_0x2475df;break;}if(_0x598650=_0x228f96?this['focusables']['getIndex'](_0x228f96):this['focusables']['length'],-0x1!==_0x34b401){if(_0x34b401===_0x598650-0x1)return;this['focusables']['remove'](_0x48449d),_0x598650=_0x228f96?this['focusables']['getIndex'](_0x228f96):this['focusables']['length'];}this['focusables']['add'](_0x48449d,_0x598650);}}const gi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x23edf6('px');class Ai extends _0x719be3{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x435ef7){super(_0x435ef7),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0xcf9b93,_0xc5ae09)=>_0xcf9b93+_0xc5ae09),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4c06ce=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4c06ce['to']('isAnimationDisabled',_0x4e369c=>_0x4e369c?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4c06ce['to']('top',_0x54cc75=>gi(_0x54cc75))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2e4f5e=this['element']['clientHeight'];_0x2e4f5e&&(this['height']=_0x2e4f5e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x3d766a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4cbb56){super(_0x4cbb56),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 _0x126374=this['context']['config']['get']('sidebar.container');_0x126374&&this['setContainer'](_0x126374);}['setContainer'](_0x1a54a8){if(!yi(_0x1a54a8))throw new _0x36d19a('sidebar-setcontainer-invalid-element');this['container']=_0x1a54a8;}['_attachToContainer']({viewClass:_0x2110f2='',spaceBetweenItems:_0x4066a6=0x19}={}){if(!yi(this['container']))throw new _0x36d19a('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2110f2,this['_spaceBetweenItems']=_0x4066a6;}['rearrange']({removedAnnotation:_0xe6264e,previousAnnotation:_0x2c74db,nextAnnotation:_0x3284ce}){const _0x3be5fc=this['getSidebarItemView'](_0xe6264e);this['view']['list']['remove'](_0x3be5fc),this['_destroySidebarItemView'](_0xe6264e),_0x2c74db&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2c74db)),_0x3284ce&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3284ce)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x514630,activatedAnnotation:_0x1c87a3,disableAnimationOnActivatedAnnotation:_0x187a05}){if(this['_activeAnnotation']=_0x1c87a3,_0x514630){_0x514630['isActive']=!0x1;const _0x239e54=this['getSidebarItemView'](_0x514630);_0x239e54&&_0x187a05&&(_0x239e54['isAnimationDisabled']=!0x1);}if(_0x1c87a3){const _0x12f142=this['getSidebarItemView'](_0x1c87a3);_0x12f142&&(_0x1c87a3['isActive']=!0x0,_0x187a05&&(_0x12f142['isAnimationDisabled']=!0x0,_0x12f142['top']+=0x1),this['_alignToTargetRect'](_0x12f142));}}['_detachFromContainer'](_0x5c1161){if(this['view']['element']['remove'](),_0x5c1161){for(const _0x33e7d7 of _0x5c1161)this['_destroySidebarItemView'](_0x33e7d7);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2c67f5,_0x1b1e70){_0x1b1e70||(_0x1b1e70=_0x2c67f5['view']);const _0x154381=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x154381,_0x2c67f5),this['_annotationToSidebarItemView']['set'](_0x2c67f5,_0x154381),_0x154381['content']['add'](_0x1b1e70),this['listenTo'](_0x2c67f5['view'],'change:targetRect',(_0x25c549,_0x39e50c,_0x5be84a)=>{const _0x5b700c=this['_getTargetTop'](_0x2c67f5,_0x5be84a);_0x154381['_targetTop']!=_0x5b700c&&(_0x154381['_targetTop']=_0x5b700c,this['_setItemTop'](_0x154381,_0x5b700c));}),this['listenTo'](_0x154381,'change:top',()=>{this['_recalculate'](_0x154381,'top');}),this['listenTo'](_0x154381,'change:bottom',()=>{this['_recalculate'](_0x154381,'bottom');}),this['_alignToTargetRect'](_0x154381);const _0x466125=this['_getItemBefore'](_0x154381);if(_0x466125)this['_alignAfterItem'](_0x466125,_0x154381)||this['_alignToTargetRect'](_0x154381);else this['_alignToTargetRect'](_0x154381);return this['_updateLastItem'](),this['view']['list']['add'](_0x154381),_0x154381;}['_alignForTopChange'](_0x3bada6){if(!_0x3bada6['content']['length'])return;const _0xaf1ae8=this['_getItemBefore'](_0x3bada6);if(!_0xaf1ae8)return;const _0x1b1b18=this['_sidebarItemViewToAnnotation']['get'](_0xaf1ae8),_0x1ed5ef=this['_activeAnnotation'];_0x1ed5ef&&_0x1ed5ef===_0x1b1b18?this['_alignAfterItem'](_0xaf1ae8,_0x3bada6):this['_alignBeforeItem'](_0x3bada6,_0xaf1ae8);}['_alignForBottomChange'](_0x4bed5a){if(!_0x4bed5a['content']['length'])return;const _0x1072fa=this['_getItemAfter'](_0x4bed5a);if(!_0x1072fa)return;const _0x560cb6=this['_sidebarItemViewToAnnotation']['get'](_0x1072fa),_0x1ae35b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4c1a84=this['_activeAnnotation'];_0x4c1a84&&_0x4c1a84===_0x560cb6&&_0x1ae35b?(this['_alignBeforeItem'](_0x1072fa,_0x4bed5a),this['_alignAfterItem'](_0x4bed5a,_0x1072fa)):_0x4c1a84&&_0x4c1a84===_0x560cb6?this['_alignBeforeItem'](_0x1072fa,_0x4bed5a):this['_alignAfterItem'](_0x4bed5a,_0x1072fa);}['_recalculate'](_0xeed1cb,_0xe2a85c){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x53171b,changedProp:_0x3e9cf8}of this['_recalculateBuffer'])'top'===_0x3e9cf8?this['_alignForTopChange'](_0x53171b):this['_alignForBottomChange'](_0x53171b);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xeed1cb,'changedProp':_0xe2a85c});}['getSidebarItemView'](_0x1bdcd6){return this['_annotationToSidebarItemView']['get'](_0x1bdcd6);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1035c7){const _0x4028b6=this['getSidebarItemView'](_0x1035c7);this['stopListening'](_0x4028b6),this['stopListening'](_0x1035c7['view']),_0x4028b6['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1035c7),this['_sidebarItemViewToAnnotation']['delete'](_0x4028b6);}['_createSidebarView'](){const _0x439144=new _i(this['context']['locale']);return _0x439144['render'](),this['on']('change:_lastItem',(_0x24dd7c,_0x38a541,_0x23904d,_0x52ef5d)=>{_0x52ef5d&&_0x439144['unbind']('minHeight'),_0x23904d?_0x439144['bind']('minHeight')['to'](_0x23904d,'bottom'):_0x439144['minHeight']=null;}),_0x439144;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x25fe82){const _0x43ded3=this['_sidebarItemViewToAnnotation']['get'](_0x25fe82),_0x5a8911=_0x43ded3&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43ded3)-0x1);return _0x5a8911&&this['getSidebarItemView'](_0x5a8911)||null;}['_getItemAfter'](_0x20733f){const _0x5ed69e=this['_sidebarItemViewToAnnotation']['get'](_0x20733f),_0x5661d9=_0x5ed69e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5ed69e)+0x1);return _0x5661d9&&this['getSidebarItemView'](_0x5661d9)||null;}['_alignBeforeItem'](_0x4d8a06,_0x4992e9){_0x4d8a06['updateHeight']();const _0xd322b7=vi(_0x4992e9['bottom']+this['_spaceBetweenItems'],_0x4d8a06['top']);return!!_0xd322b7&&(this['_setItemTop'](_0x4992e9,_0x4992e9['top']-_0xd322b7),!0x0);}['_alignAfterItem'](_0xab9c26,_0x37e41a){_0xab9c26['updateHeight']();const _0x538c66=vi(_0xab9c26['bottom']+this['_spaceBetweenItems'],_0x37e41a['top']);return!!_0x538c66&&(this['_setItemTop'](_0x37e41a,_0x37e41a['top']+_0x538c66,!0x1),!0x0);}['_alignToTargetRect'](_0x2ce39f){const _0x42101c=this['_sidebarItemViewToAnnotation']['get'](_0x2ce39f);if(!_0x42101c||!_0x42101c['target']||!_0x42101c['targetRect'])return;const _0x585686=this['_getTargetTop'](_0x42101c,_0x42101c['targetRect']);this['_setItemTop'](_0x2ce39f,_0x585686);}['_getTargetTop'](_0x596e16,_0x30a736){if(null===_0x30a736)return 0x0;if(_0x596e16['target']instanceof _0x1a3832)return _0x30a736['top'];{const _0x5e6467=new _0x1a3832(this['view']['element'])['top'];return _0x30a736['top']-_0x5e6467;}}['_setItemTop'](_0x3c584b,_0x192b3e,_0x39bc23=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x39bc23&&(_0x192b3e=Math['max'](_0x192b3e,this['_getMaxAvailableTop'](_0x3c584b))),_0x3c584b['top']=_0x192b3e;}['_getMaxAvailableTop'](_0x753b6e){let _0x4bbbc1=this['_getItemBefore'](_0x753b6e),_0xabf849=0x0;for(;_0x4bbbc1;)_0x4bbbc1['updateHeight'](),_0xabf849+=this['_spaceBetweenItems']+_0x4bbbc1['height'],_0x4bbbc1=this['_getItemBefore'](_0x4bbbc1);return _0xabf849;}}function vi(_0x1fbff3,_0x3954db){return Math['max'](_0x1fbff3-_0x3954db,0x0);}function yi(_0x4c206e){return null!==_0x4c206e&&'object'==typeof _0x4c206e&&0x1===_0x4c206e['nodeType'];}class Ci extends _0x3d766a{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19adc8){super(_0x19adc8),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2ed34f(),this['_refreshPositioningDebounced']=_0x58129b(()=>{_0x19adc8['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x319cd6=this['context']['plugins']['get'](pi),_0x106816=this['context']['plugins']['get'](Ti);_0x319cd6['register']('wideSidebar',this),_0x106816['container']&&_0x319cd6['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x12daf1){if(_0x12daf1===this['activeAnnotation'])return;const _0x318a81=this['context']['plugins']['get'](Ti);_0x318a81['_activeAnnotation']=_0x12daf1;const _0x3f8caf=this['activeAnnotation'];_0x318a81['refresh']({'blurredAnnotation':_0x3f8caf,'activatedAnnotation':_0x12daf1}),this['activeAnnotation']=_0x12daf1;}['attach'](_0x54234d){this['annotations']=_0x54234d;const _0x4c00e6=this['context']['plugins']['get'](Ti);if(_0x4c00e6['_annotations']=_0x54234d,this['isAttached'])throw new _0x36d19a('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4c00e6,'set:container',()=>{this['detach'](),this['listenTo'](_0x4c00e6,'change:container',_0xfae379=>{_0xfae379['off'](),this['attach'](_0x54234d);});}),_0x4c00e6['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4a85ae=_0x110f14=>{_0x110f14['updateTargetRect'](),_0x4c00e6['addAnnotation'](_0x110f14);};for(const _0x4f8e85 of _0x54234d)_0x4a85ae(_0x4f8e85);this['listenTo'](_0x54234d,'add',(_0x3f9223,_0x41be15)=>{_0x4a85ae(_0x41be15);}),this['listenTo'](_0x54234d,'remove',(_0x54e466,_0x561764,_0x67b2d9)=>{_0x4c00e6['rearrange']({'removedAnnotation':_0x561764,'previousAnnotation':_0x54234d['get'](_0x67b2d9-0x1),'nextAnnotation':_0x54234d['get'](_0x67b2d9+0x1)}),_0x561764===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x54234d,'focus',(_0x47754c,_0x416aec)=>{this['setActiveAnnotation'](_0x416aec);}),this['listenTo'](_0x54234d,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1e0811=this['context']instanceof _0x35effb?this['context']['editors']:new _0x2ed34f([this['context']]);for(const _0x4c4874 of _0x1e0811)this['_integrateWithEditorAnnotations'](_0x4c4874);this['listenTo'](_0x1e0811,'add',(_0x43ffcb,_0x5a73a6)=>{this['listenTo'](_0x5a73a6,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5a73a6);});}),this['listenTo'](_0x1e0811,'remove',(_0x40322a,_0x3a7a43)=>{_0x3a7a43['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3a7a43['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x36d19a('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2cc596=this['context']['plugins']['get'](Ti);_0x2cc596['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2cc596),this['stopListening'](this['annotations']),this['context']instanceof _0x35effb&&this['stopListening'](this['context']['editors']);for(const _0x3abbeb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3abbeb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4d24fe){if(!_0x4d24fe['plugins']['has']('EditorAnnotations'))return;const _0x3e7e35=_0x4d24fe['plugins']['get']('EditorAnnotations'),_0x35d9b9=()=>{const _0x2a0a0e=_0x3e7e35['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2a0a0e[0x0]||null);};this['listenTo'](_0x3e7e35,'refresh',_0x35d9b9),this['listenTo'](_0x3e7e35,'blur',(_0xb3d794,{isAnnotationTracked:_0xeaafb8})=>{this['activeAnnotation']&&_0xeaafb8(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3e7e35,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3ac4e1=>{_0x3e7e35['hasDomSelection']()&&(_0x35d9b9(),_0x3ac4e1['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3e7e35);}['_destroyEditorAnnotationsIntegration'](_0x3397b4){this['stopListening'](_0x3397b4),this['_editorAnnotations']['remove'](_0x3397b4);}}class Ii extends _0x542a2{['counterView'];constructor(_0x10f1c5){super(_0x10f1c5);const _0x1442f7=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x7d1698,_0x269d8a)=>_0x7d1698?'...':_0x269d8a['toString']()),this['set']('annotationType',''),this['icon']=_0x49bd39,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x719be3(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1442f7['to']('annotationType',_0x52f2ce=>'ck-annotation-counter__badge--'+_0x52f2ce),_0x1442f7['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1442f7['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x3d766a{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b9f72){super(_0x5b9f72),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x17b3bd())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2ed34f(),this['_refreshPositioningDebounced']=_0x58129b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xf80a90){this['annotations']=_0xf80a90;const _0x2eb8c5=this['context']['plugins']['get'](Ti),_0x3077e6=this['balloonPanelView'];if(_0x2eb8c5['_annotations']=_0xf80a90,this['isAttached'])throw new _0x36d19a('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2eb8c5,'set:container',()=>{this['detach'](),this['listenTo'](_0x2eb8c5,'change:container',_0x18745c=>{_0x18745c['off'](),this['attach'](_0xf80a90);});}),_0x2eb8c5['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x146d2a=_0x5bd264=>{const _0x5a0569=new Ii(this['context']['locale']);_0x2eb8c5['addAnnotation'](_0x5bd264,_0x5a0569),this['_annotationToNarrowView']['set'](_0x5bd264,_0x5a0569),_0x5a0569['bind']('isDirty','annotationType','number')['to'](_0x5bd264['view'],'isDirty','type','length'),_0x5a0569['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3077e6['content']['first']!==_0x5bd264['view']?(this['_showBalloon'](_0x5bd264),_0x5bd264['view']['element']['focus'](),this['setActiveAnnotation'](_0x5bd264)):this['setActiveAnnotation'](null);});};for(const _0x229ffe of _0xf80a90)_0x146d2a(_0x229ffe);this['listenTo'](_0xf80a90,'add',(_0x4bfbe8,_0x39cbcb)=>{_0x146d2a(_0x39cbcb);}),this['listenTo'](_0xf80a90,'remove',(_0x40f98b,_0x53d883,_0x30b161)=>{this['_annotationToNarrowView']['get'](_0x53d883)['destroy'](),this['_annotationToNarrowView']['delete'](_0x53d883),_0x2eb8c5['rearrange']({'removedAnnotation':_0x53d883,'previousAnnotation':_0xf80a90['get'](_0x30b161-0x1),'nextAnnotation':_0xf80a90['get'](_0x30b161+0x1)}),_0x53d883===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xf80a90,'focus',(_0x141dfd,_0x216468)=>{this['setActiveAnnotation'](_0x216468);}),this['listenTo'](_0xf80a90,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x5537b8,_0x50154e)=>{_0x50154e['keyCode']===_0x41b313['esc']&&_0x3077e6['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3077e6['content']['first']),this['_hideBalloon'](),_0x50154e['stopPropagation'](),_0x50154e['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x475335,_0x307dbd)=>{const _0x1de63f=_0x307dbd['target'];_0x3077e6['isVisible']&&_0x3077e6['element']['contains'](_0x1de63f)||_0x2eb8c5['view']['element']['contains'](_0x1de63f)||_0x475335['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x571af1=>_0x571af1['contains'](_0x1de63f))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3b6c9a=this['context']instanceof _0x35effb?this['context']['editors']:new _0x2ed34f([this['context']]);for(const _0xa3c763 of _0x3b6c9a)this['_integrateWithEditorAnnotations'](_0xa3c763);this['listenTo'](_0x3b6c9a,'add',(_0x467c40,_0x996310)=>{this['listenTo'](_0x996310,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x996310);});}),this['listenTo'](_0x3b6c9a,'remove',(_0x27862d,_0x5d8000)=>{_0x5d8000['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5d8000['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5ddbd8){if(_0x5ddbd8===this['activeAnnotation'])return;const _0x437f01=this['context']['plugins']['get'](Ti);if(_0x437f01['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5ddbd8,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5ddbd8)_0x437f01['getSidebarItemView'](_0x5ddbd8)?this['_showBalloon'](_0x5ddbd8):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5ddbd8;}['detach'](){if(!this['isAttached'])throw new _0x36d19a('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x31374b=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x40c0e2=>_0x40c0e2['destroy']()),this['_annotationToNarrowView']['clear'](),_0x31374b['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x35effb&&this['stopListening'](this['context']['editors']);for(const _0x16e66e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x16e66e);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'](_0x35561a){if(!_0x35561a['plugins']['has']('EditorAnnotations'))return;const _0x277f2c=_0x35561a['plugins']['get']('EditorAnnotations'),_0x48fd15=this['context']['plugins']['get'](Ti),_0xca5e11=this['annotations'],_0x45b099=this['balloonPanelView'],_0x2f132b=()=>{const _0x528e2d=_0x277f2c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x528e2d),this['setActiveAnnotation'](_0x528e2d[0x0]||null);};this['listenTo'](_0x277f2c,'refresh',_0x2f132b),this['listenTo'](_0x277f2c,'blur',(_0x1c3b17,{isAnnotationTracked:_0x291f0e})=>{this['activeAnnotation']&&_0x291f0e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x277f2c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xca5e11,'blur',_0x13e4a6=>{_0x277f2c['hasDomSelection']()&&_0x13e4a6['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xe9af7d,_0x519df9)=>{const _0x36f817=_0x519df9['target'];_0x45b099['isVisible']&&_0x45b099['element']['contains'](_0x36f817)||_0x48fd15['view']['element']['contains'](_0x36f817)||this['activeAnnotation']&&_0x277f2c['hasDomSelection']()&&(_0x2f132b(),_0xe9af7d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x277f2c);}['_destroyEditorAnnotationsIntegration'](_0x2348d4){_0x2348d4&&(this['stopListening'](_0x2348d4),this['_editorAnnotations']['remove'](_0x2348d4));}['_setSelectedAnnotations'](_0x232edb){for(const _0x4f38ac of this['_selectedAnnotations'])_0x232edb['includes'](_0x4f38ac)||this['_manuallyClosedAnnotationViews']['delete'](_0x4f38ac['view']);this['_selectedAnnotations']=_0x232edb;}['_refreshPositioning'](){const _0x32a414=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x32a414['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xa36852){if(this['_manuallyClosedAnnotationViews']['has'](_0xa36852['view']))return;const _0x10a07d=this['balloonPanelView']['content']['first'];_0x10a07d!==_0xa36852['view']?(_0x10a07d&&this['_detachListeners'](_0x10a07d),this['_attachListeners'](_0xa36852['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xa36852['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x297712=this['balloonPanelView']['content']['first'],_0x4d4b87=_0x297712&&this['annotations']['getByView'](_0x297712);if(!_0x4d4b87||!this['_annotationToNarrowView']['has'](_0x4d4b87))return;const _0x5e9512=this['_annotationToNarrowView']['get'](_0x4d4b87)['element'],_0x58bff8=(function(){const _0x406378=ht['defaultPositions'];return[_0x406378['southArrowNorthEast'],_0x406378['northArrowSouthEast'],_0x406378['southArrowNorth'],_0x406378['northArrowSouth'],_0x406378['southArrowNorthWest'],_0x406378['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5e9512,'positions':_0x58bff8});}['_hideBalloon'](){const _0x1061b6=this['balloonPanelView'],_0x13b94a=_0x1061b6['content']['first'];_0x13b94a&&(this['_detachListeners'](_0x13b94a),_0x1061b6['unpin'](),_0x1061b6['content']['clear']());}['_attachListeners'](_0x2e1dc6){this['listenTo'](_0x2e1dc6,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2e1dc6,'Esc',(_0x32130a,_0x594e7c)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2e1dc6),this['_hideBalloon'](),_0x594e7c();});}['_detachListeners'](_0x18ec21){this['stopListening'](_0x18ec21);}}class Ei extends _0x3eacd6{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x257a48){super(_0x257a48),_0x257a48['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x257a48['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x58129b(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x38340a=this['editor']['plugins']['get'](pi);_0x38340a['context']===this['editor']&&(_0x38340a['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1f57d0,_0x129a4e)=>{const _0x27b643=this['_balloon'];if(this['isAttached']&&_0x27b643['visibleView']){const _0x1d5e74=this['annotations']['getByView'](_0x27b643['visibleView']);_0x1d5e74&&this['_closeAnnotation'](_0x1d5e74),_0x129a4e();}}));}['afterInit'](){const _0x441d0b=this['editor']['plugins']['get'](pi);_0x441d0b['context']===this['editor']&&(_0x441d0b['hasActive']()||_0x441d0b['switchTo']('inline'));}['setActiveAnnotation'](_0x40d4db){_0x40d4db!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x40d4db&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x40d4db)&&this['_addAnnotationToBalloon'](_0x40d4db,!0x0),_0x40d4db['isActive']=!0x0),_0x40d4db||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x40d4db);}['attach'](_0x478788){this['annotations']=_0x478788;const _0x4120e0=this['editor']['plugins']['get'](pi),_0x1b5397=this['_balloon'];if(this['isAttached'])throw new _0x36d19a('inlineannotations-attach-already-attached',this);if(_0x4120e0['context']!==this['editor'])throw new _0x36d19a('inlineannotations-not-allowed-with-context',this);const _0x1bc918=this['editor']['plugins']['get'](si);this['listenTo'](_0x1bc918,'refresh',()=>{const _0x570213=_0x1bc918['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2f07ea,_0x38ef71;!this['_forceRefresh']&&(_0x2f07ea=_0x570213,_0x38ef71=this['_selectedAnnotations'],_0x2f07ea['length']===_0x38ef71['length']&&_0x2f07ea['every'](_0x17876a=>_0x38ef71['includes'](_0x17876a)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x570213),this['setActiveAnnotation'](_0x570213[0x0]||null));}),this['listenTo'](_0x1bc918,'blur',(_0x4f9d4c,{isAnnotationTracked:_0x17f086})=>{this['activeAnnotation']&&_0x17f086(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1bc918,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x435dd0,_0x7face9,_0x10896d)=>{_0x10896d||this['setActiveAnnotation'](null);}),this['listenTo'](_0x478788,'remove',(_0x2b4553,_0x358c3f)=>{this['_removeAnnotationFromBalloon'](_0x358c3f),_0x358c3f===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b5397,'change:visibleView',(_0x34e992,_0x579dba,_0x5973a6,_0x54f6fd)=>{_0x54f6fd&&this['stopListening'](_0x54f6fd);const _0x44ff00=_0x478788['getByView'](_0x5973a6);_0x5973a6&&_0x44ff00&&(this['listenTo'](_0x5973a6,'change:height',()=>{_0x1b5397['updatePosition']();}),this['listenTo'](_0x5973a6,'Esc',()=>{this['_closeAnnotation'](_0x44ff00),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x44ff00&&this['setActiveAnnotation'](_0x44ff00));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1b5397['visibleView']&&(_0x478788['getByView'](_0x1b5397['visibleView'])&&_0x1b5397['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 _0x36d19a('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2e1a23 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2e1a23);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x5aec1f){for(const _0x5bc849 of this['_selectedAnnotations'])_0x5aec1f['includes'](_0x5bc849)||this['_manuallyClosed']['delete'](_0x5bc849);for(const _0x5c2065 of this['annotations'])_0x5aec1f['includes'](_0x5c2065)||this['_removeAnnotationFromBalloon'](_0x5c2065);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x25e4d8 of _0x5aec1f)this['_addAnnotationToBalloon'](_0x25e4d8);}this['_selectedAnnotations']=_0x5aec1f;}['_addAnnotationToBalloon'](_0x16e7e4,_0x82ca76=!0x1){this['_manuallyClosed']['has'](_0x16e7e4)||(this['_addedAnnotations']['has'](_0x16e7e4)||this['_balloon']['hasView'](_0x16e7e4['view'])||(this['_addedAnnotations']['add'](_0x16e7e4),this['_balloon']['add']({'stackId':_0x16e7e4['view']['id'],'view':_0x16e7e4['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x16e7e4)}})),_0x82ca76&&this['_balloon']['showStack'](_0x16e7e4['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5bd7aa){const _0x487bac=_0x5bd7aa['target'],_0x409663=this['editor']['editing']['view'],_0x2d6940=_0x409663['document']['selection']['getFirstRange'](),_0x2611a5=_0x409663['domConverter']['viewRangeToDom'](_0x2d6940);if(_0x2611a5['collapse'](!0x0),_0x487bac){if(_0x487bac instanceof _0x1a3832)return _0x487bac;let _0x57105d=[];for(const _0x5782ad of _0x487bac)_0x57105d['push'](..._0x1a3832['getDomElementRects'](_0x5782ad));_0x57105d=function(_0x7d9ba2){const _0x2f49f3=[];let _0xc41593=_0x7d9ba2[0x0];for(let _0x8e563c=0x1;_0x8e563c<_0x7d9ba2['length'];_0x8e563c++)if(Ni(_0xc41593,_0x7d9ba2[_0x8e563c])){const _0x3f7428=_0x7d9ba2[_0x8e563c]['width'];_0xc41593['width']+=_0x3f7428,_0xc41593['right']+=_0x3f7428;}else _0x2f49f3['push'](_0xc41593),_0xc41593=_0x7d9ba2[_0x8e563c];return _0x2f49f3['push'](_0xc41593),_0x2f49f3;}(_0x57105d);const _0x391b57=_0x2611a5['getBoundingClientRect']();return _0x57105d['find'](_0x1faa45=>_0x1faa45['top']<=_0x391b57['top']&&_0x1faa45['bottom']>=_0x391b57['bottom']&&_0x1faa45['left']<=_0x391b57['left']&&_0x1faa45['right']>=_0x391b57['right'])||_0x57105d[0x0];}return _0x5bd7aa['targetRect']||_0x2611a5;}['_removeAnnotationFromBalloon'](_0x1d4126){this['_addedAnnotations']['has'](_0x1d4126)&&this['_balloon']['hasView'](_0x1d4126['view'])&&(this['_addedAnnotations']['delete'](_0x1d4126),this['_balloon']['remove'](_0x1d4126['view']));}['_closeAnnotation'](_0x5ee62d){this['_manuallyClosed']['add'](_0x5ee62d),this['_removeAnnotationFromBalloon'](_0x5ee62d);}}function Ni(_0xd3c792,_0x483f61){return _0xd3c792['top']===_0x483f61['top']&&_0xd3c792['bottom']===_0x483f61['bottom']&&_0xd3c792['right']===_0x483f61['left'];}class ki extends _0x719be3{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x29f2ee,_0x4b1fd3){super(_0x29f2ee),this['set']('isEmpty',!_0x4b1fd3['length']),this['focusTracker']=new _0x340c23(),this['_annotationViews']=_0x4b1fd3,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x567dee({'focusables':_0x4b1fd3,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4b1fd3,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4b1fd3,'remove',(_0x78aa96,_0x556ae8)=>{_0x556ae8['isActive']&&this['focus'](),_0x4b1fd3['length']||(this['isEmpty']=!0x0);});const _0x49e476=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x29f2ee,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4b1fd3},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x49e476['if']('isEmpty','ck-hidden',_0x4bf1e3=>!_0x4bf1e3)]},'children':[{'text':bt(_0x29f2ee,'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 _0xff82b2 of this['_annotationViews'])this['focusTracker']['add'](_0xff82b2['element']);this['_annotationViews']['on']('change',(_0x2522fe,{added:_0x310ca6,removed:_0xad03bf})=>{for(const _0x1b80a8 of _0x310ca6)this['focusTracker']['add'](_0x1b80a8['element']);for(const _0x430229 of _0xad03bf)this['focusTracker']['remove'](_0x430229['element']);});}}class Oi extends _0x3d766a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x1f7b60){super(_0x1f7b60),this['archivedThreads']=new _0x2ed34f();}['init'](){const _0x36fc8f=this['context'],_0x45d907=_0x36fc8f['plugins']['get'](Qt),_0x21d1d2=_0x36fc8f['plugins']['get']($t);this['listenTo'](_0x45d907,'addCommentThread',(_0x2aee12,{threadId:_0x533242})=>{const _0x3d44df=_0x45d907['getCommentThread'](_0x533242);_0x3d44df['archivedAt']&&this['archivedThreads']['add'](_0x3d44df,this['_calculatePosition'](_0x3d44df['archivedAt'])),this['listenTo'](_0x3d44df,'change:archivedAt',(_0x4c8be6,_0x285ff2,_0x3b71f0)=>{_0x3b71f0?this['archivedThreads']['has'](_0x3d44df)||this['archivedThreads']['add'](_0x3d44df,this['_calculatePosition'](_0x3d44df['archivedAt'])):this['archivedThreads']['has'](_0x3d44df)&&this['archivedThreads']['remove'](_0x3d44df);});}),this['listenTo'](_0x45d907,'removeCommentThread',(_0x6113f0,{threadId:_0xf82166})=>{const _0x3c81fb=_0x45d907['getCommentThread'](_0xf82166);this['stopListening'](_0x3c81fb),this['archivedThreads']['has'](_0x3c81fb)&&this['archivedThreads']['remove'](_0x3c81fb);},{'priority':'highest'}),this['listenTo'](_0x21d1d2['collection'],'focus',(_0x34d6ee,_0x50cc4b)=>{_0x50cc4b['isVisible']||(_0x50cc4b['isActive']=!0x0,_0x21d1d2['activate'](_0x50cc4b));});}['_calculatePosition'](_0x3ac557){const _0x1b5d2a=[...this['archivedThreads']]['findIndex'](_0xb41f4c=>_0xb41f4c['archivedAt']<_0x3ac557);return _0x1b5d2a>-0x1?_0x1b5d2a:this['archivedThreads']['length'];}}class Mi extends _0x3eacd6{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x177bfe){super(_0x177bfe),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x1d2cdc=this['editor'],_0x5a734e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1d2cdc['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x542a2,!0x0)),_0x1d2cdc['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x54a667=this['_createCommentsArchiveButton'](ot);return _0x54a667['set']({'role':'menuitemcheckbox'}),_0x54a667;});const _0x45c41b=_0x1d2cdc['plugins']['get'](Oi),_0xdb700b=_0x1d2cdc['plugins']['get']('Annotations'),_0x49bc3e=_0x1d2cdc['plugins']['get']('CommentsRepository');_0x45c41b['archivedThreads']['forEach'](_0x44b4fa=>{this['_handleNewThread'](_0x44b4fa);}),this['listenTo'](_0x45c41b['archivedThreads'],'add',(_0x5cccf4,_0x5d34ad)=>{this['_handleNewThread'](_0x5d34ad);}),this['listenTo'](_0xdb700b['collection'],'add',(_0x403c60,_0x2825ee)=>{const _0x5c5d9b=this['_pendingThreads']['find'](_0x2aae33=>{const _0x53a3bd=_0x49bc3e['_threadToController']['get'](_0x2aae33);return _0x53a3bd&&_0x2825ee['innerView']===_0x53a3bd['view'];});if(_0x5c5d9b){const _0x32370d=this['_calculatePosition'](_0x5c5d9b['archivedAt']);this['_addAnnotationToArchive'](_0x2825ee,_0x32370d),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5c5d9b),0x1);}}),this['listenTo'](_0x45c41b['archivedThreads'],'remove',(_0x406345,_0x3fbc7e)=>{const _0xab02f9=_0x1d2cdc['config']['get']('collaboration.channelId');if(!_0xab02f9||_0x3fbc7e['channelId']===_0xab02f9){if(this['_pendingThreads']['includes'](_0x3fbc7e))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3fbc7e),0x1);else{const _0xf55ca4=_0x49bc3e['_threadToController']['get'](_0x3fbc7e),_0x5effd9=_0xdb700b['getByInnerView'](_0xf55ca4['view']);this['annotationViews']['remove'](_0x5effd9['view']),this['stopListening'](_0x5effd9),this['stopListening'](_0x5effd9['focusableElements']);}}}),this['listenTo'](_0xdb700b['collection'],'add',(_0x4bef0c,_0x53ddf1)=>{this['listenTo'](_0x53ddf1,'escape',_0x5a734e);}),this['listenTo'](_0xdb700b['collection'],'remove',(_0x237a40,_0x5b6fd3)=>{this['stopListening'](_0x5b6fd3,'escape',_0x5a734e);});}['_addAnnotationToArchive'](_0x481c81,_0x2bf0f6){this['listenTo'](_0x481c81,'set:isVisible',_0x10a195=>{_0x10a195['return']=!0x1,_0x10a195['stop']();}),this['annotationViews']['add'](_0x481c81['view'],_0x2bf0f6);}['_handleNewThread'](_0x4d062c){const _0x15ced6=this['editor']['plugins']['get']('CommentsRepository'),_0x53e926=this['editor']['plugins']['get']('Annotations'),_0x56b947=this['editor']['config']['get']('collaboration.channelId');if(!_0x56b947||_0x4d062c['channelId']===_0x56b947){const _0x1c21a9=_0x15ced6['_threadToController']['get'](_0x4d062c);if(!_0x1c21a9)return void this['_pendingThreads']['push'](_0x4d062c);const _0x3f74b7=this['_calculatePosition'](_0x4d062c['archivedAt']),_0xb22ac7=_0x53e926['getByInnerView'](_0x1c21a9['view']);_0xb22ac7['isVisible']&&_0x53e926['_visibleAnnotations']['remove'](_0xb22ac7),this['_addAnnotationToArchive'](_0xb22ac7,_0x3f74b7);}}['_calculatePosition'](_0x28e0f8){const _0x5a0bbf=this['editor']['config']['get']('collaboration.channelId'),_0x5c6d65=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x23f6ce=>_0x23f6ce['channelId']===_0x5a0bbf)['findIndex'](_0xc424a=>_0xc424a['archivedAt']<_0x28e0f8);return _0x5c6d65<0x0||_0x5c6d65>this['annotationViews']['length']?this['annotationViews']['length']:_0x5c6d65-0x1;}['_toggleDialog'](){const _0x3c5bf5=this['editor'],_0x19a2c0=_0x3c5bf5['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x3c5bf5['locale'],this['annotationViews'])),'commentsArchive'===_0x19a2c0['id']?_0x19a2c0['hide']():_0x19a2c0['show']({'id':'commentsArchive','title':bt(_0x3c5bf5['locale'],'COMMENTS_ARCHIVE'),'icon':_0x500afa,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x462bac,_0x7a9b77=!0x1){const _0x4ef386=this['editor']['locale'],_0x369bd3=this['editor']['plugins']['get']('Dialog'),_0x4b9151=new _0x462bac(_0x4ef386);return _0x4b9151['bind']('isEnabled')['to'](this,'isEnabled'),_0x4b9151['bind']('isOn')['to'](_0x369bd3,'id',_0x3ce027=>'commentsArchive'===_0x3ce027),_0x4b9151['set']({'label':bt(_0x4ef386,'COMMENTS_ARCHIVE'),'icon':_0x500afa,'isToggleable':!0x0}),_0x7a9b77&&(_0x4b9151['tooltip']=!0x0),this['listenTo'](_0x4b9151,'execute',()=>this['_toggleDialog']()),_0x4b9151;}['_hideDialogOnAnnotationEscape']=_0x201910=>{const _0x2d1599=_0x201910['source'];if(!this['annotationViews']['has'](_0x2d1599['view']))return;const _0xfde797=this['editor']['plugins']['get']('Dialog');_0xfde797['isOpen']&&'commentsArchive'===_0xfde797['id']&&(_0xfde797['hide'](),_0x201910['stop']());};}class Ri extends _0x3eacd6{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|