@ckeditor/ckeditor5-comments 48.3.0-alpha.6 → 48.3.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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{Command as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Ot)());constructor(_0x30d825={}){(_0x30d825=Object['assign']({},_0x30d825))['plugins']||(_0x30d825['plugins']=CommentEditor['defaultPlugins']),super(_0x30d825),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['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0x2faa8d=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2faa8d))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3a57f2=>{const _0x219ab1=this['model']['document']['getRoot'](),_0x1083e0=_0x219ab1&&_0x219ab1['getChild'](_0x219ab1['childCount']-0x1);_0x3a57f2['setSelection'](_0x1083e0,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x19deda=this['editing']['view'],_0x4873d6=_0x19deda['document']['getRoot'](),_0x2023ca=_0x4873d6['getChild'](0x0);_0x4873d6['childCount']>0x1||!_0x2023ca||'p'!=_0x2023ca['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x19deda,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2023ca['placeholder']=this['placeholder']),ut({'view':_0x19deda,'element':_0x2023ca,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2023ca);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x509ef2,_0x3e9028={}){super(_0x509ef2),this['editor']=null,this['_editorConfig']=_0x3e9028,this['set']('value',_0x3e9028['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x509ef2,'Reply...')),this['set']('submitLabel',Et(_0x509ef2,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x17fd77(),this['focusTracker']=new _0x17ba74(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x31bceb=>!_0x31bceb['defaultPrevented']},'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',(_0x480e7e,_0x132654)=>{this['cancelButtonView']['fire']('execute'),_0x132654();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5ec59e,_0x4ef645)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4ef645());}),this['on']('submit',(_0x47d16b,_0xd4205a)=>{_0xd4205a['length']>0xfde8?(alert(Et(_0x509ef2,'TOO_LONG_COMMENT_ALERT',[_0xd4205a['length'],0xfde8])),_0x47d16b['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3dbd58=this['editor'];this['element']['insertBefore'](_0x3dbd58['ui']['element'],this['element']['firstChild']),_0x3dbd58['model']['document']['on']('change',()=>this['value']=_0x3dbd58['getData']()),_0x3dbd58['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3dbd58['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x14cc95){-0x1===_0x14cc95?(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:_0x1d2dab}=this,_0x5b528c=new _0x352ef3(_0x1d2dab);return _0x5b528c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5b528c['withText']=!0x0,_0x5b528c['bind']('label')['to'](this,'submitLabel'),_0x5b528c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5b528c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xd373a2,_0x213354)=>!_0x213354&&!!_0xd373a2['trim']()),_0x5b528c;}['_createCancelButton'](){const {locale:_0x428bde}=this,_0x551ab4=new _0x352ef3(_0x428bde);return _0x551ab4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x551ab4['label']=Et(_0x428bde,'Cancel'),_0x551ab4['withText']=!0x0,_0x551ab4['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x551ab4;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xb832aa=>{this['focusTracker']['add'](_0xb832aa['element']);}),this['focusables']['on']('change',(_0x536e41,_0x4e3a6d)=>{for(const _0xb23926 of Array['from'](_0x4e3a6d['added'])['reverse']())this['focusTracker']['add'](_0xb23926['element']);});}},xt=class extends ht{constructor(_0x332a1b,_0xf71272,_0x41ee7a){super(_0x332a1b),this['commentInputView']=new St(_0x332a1b,_0x41ee7a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x53af5c,_0x10eb16)=>_0x53af5c||!!_0x10eb16),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 _0x394548(_0x332a1b,_0xf71272),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'](_0x6037ff){this['commentInputView']['focus'](_0x6037ff);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5d9b9d,_0x3411ad)=>{const {submitButtonView:_0x113f5a,cancelButtonView:_0x3b4581,editor:_0x5ea000}=this['commentInputView'];[_0x113f5a['element'],_0x3b4581['element'],_0x5ea000?_0x5ea000['editing']['view']['getDomRoot']():null]['filter'](_0x1a7aa0=>_0x1a7aa0)['some'](_0x118aa1=>_0x118aa1['contains'](_0x3411ad['target']))||(this['focus'](),_0x3411ad['preventDefault']());});}},Pt=class extends ht{constructor(_0xa89095){super(_0xa89095);const _0x4eddfe=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4eddfe['to']('count',_0x5beed2=>Et(_0xa89095,'NUMBER_OF_COMMENTS',_0x5beed2))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x12d4f9,_0x40da95,_0xa504a8){super(_0x12d4f9);const _0x5dfda2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x40da95['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x40da95,this['_config']=_0xa504a8,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x17ba74(),this['keystrokes']=new _0x17fd77(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x300990=>this['commentViews']['map'](_0x53ccac=>_0x53ccac['element'])['includes'](_0x300990['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x12d4f9),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x348ca3=>_0x348ca3-this['_config']['maxCommentsWhenCollapsed']);for(const _0x21c7f3 of _0x40da95['comments'])this['_handleNewCommentModel'](_0x21c7f3);this['_handleInfoComment'](),this['listenTo'](_0x40da95['comments'],'add',(_0x76d944,_0x16658b)=>{const _0x3f6d51=this['_calculatePosition'](_0x16658b);this['length']++,this['_handleNewCommentModel'](_0x16658b,_0x3f6d51),this['refreshVisibleViews']();}),this['listenTo'](_0x40da95['comments'],'remove',(_0x154aaf,_0x41d54f)=>{this['length']--,this['_handleRemoveCommentModel'](_0x41d54f),this['refreshVisibleViews']();}),this['listenTo'](_0x40da95,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x40da95,'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',_0x5dfda2['if']('length','ck-hidden',_0x6be7a=>!_0x6be7a)],'aria-label':Et(_0x12d4f9,'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'](_0x54a63a){-0x1===_0x54a63a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x454713 of this['commentViews'])_0x454713['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x480365,_0x2f380e){const _0xceb03e=new this['_config']['CommentView'](this['locale'],_0x480365,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xceb03e['viewUid']=_0x480365['id'],_0xceb03e['delegate']('removeComment')['to'](this),_0xceb03e['delegate']('updateComment')['to'](this),_0xceb03e['delegate']('resolveCommentThread')['to'](this),_0xceb03e['delegate']('editorReady')['to'](this),_0xceb03e['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xceb03e,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xceb03e,_0x2f380e);}['_calculatePosition'](_0x5446d9){const _0x335701=this['_model']['_findOptimalIndex'](_0x5446d9);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5446d9['authoredAt']?_0x335701-0x1:_0x335701:_0x335701-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x315f19={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x315f19,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x315f19));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x4d6684){const _0x2469c2=this['commentViews']['remove'](_0x4d6684['id']);this['stopListening'](_0x2469c2),_0x2469c2['isEditMode']&&this['_updateHasDirtyComment'](),_0x2469c2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x45b055=>_0x45b055['isEditMode']);}['_rearrangeCollapse'](){const _0x3a22da=function(_0x2426cb){const _0x3a8445=new _0x55d760();for(const _0x7582ed of _0x2426cb)_0x3a8445['add'](_0x7582ed);return _0x3a8445;}(this['commentViews']),_0x1797d5=this['_collapsedCommentsView']['count'];for(let _0xfc087e=0x1;_0xfc087e<=_0x1797d5;_0xfc087e++)_0x3a22da['remove'](0x1);for(const _0x502ea6 of _0x3a22da)_0x502ea6['collapse']();_0x1797d5>0x0&&_0x3a22da['add'](this['_collapsedCommentsView'],0x1),Dt(_0x1de298(Array['from'](this['visibleViews']),Array['from'](_0x3a22da)),this['visibleViews'],_0x3a22da);}['_rearrangeExpand'](){Dt(_0x1de298(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1bbba0 of this['visibleViews'])_0x1bbba0['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x10aff2=>{this['focusTracker']['add'](_0x10aff2['element']),this['keystrokes']['listenTo'](_0x10aff2['element']);}),this['commentViews']['on']('change',(_0x3c8631,_0x8ce7d7)=>{for(const _0x5346e8 of _0x8ce7d7['removed'])this['focusTracker']['remove'](_0x5346e8['element']),this['keystrokes']['stopListening'](_0x5346e8['element']);for(const _0x523346 of Array['from'](_0x8ce7d7['added'])['reverse']())this['focusTracker']['add'](_0x523346['element']),this['keystrokes']['listenTo'](_0x523346['element']);});}};function Dt(_0x1ac181,_0x1eb36b,_0x1ddee9){let _0x5b0d27=0x0;for(const _0x3d0829 of _0x1ac181)switch(_0x3d0829){case'insert':_0x1eb36b['add'](_0x1ddee9['get'](_0x5b0d27),_0x5b0d27),_0x5b0d27++;break;case'delete':_0x1eb36b['remove'](_0x5b0d27);break;case'equal':_0x5b0d27++;}}var Vt=class extends ht{constructor(_0x5be532){super(_0x5be532);const _0xa3cccd=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xa3cccd['to']('contextValue',_0x288406=>Et(_0x5be532,'THREAD_CONTEXT_LABEL',_0x288406)),'tabindex':-0x1},'children':[{'text':_0xa3cccd['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x26319a,_0xafb6e8){super(_0x26319a);const _0x10490b=this['bindTemplate'];this['_model']=_0xafb6e8,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x17ba74(),this['keystrokes']=new _0x17fd77(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1316a5=>!!_0x1316a5),this['bind']('contextValue')['to'](this['_model'],'context',_0x861025=>_0x861025&&_0x861025['value']?this['_trimContextValue'](_0x861025['value']):Et(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',_0x10490b['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 _0x11357e=new _0x352ef3(this['locale']);return _0x11357e['label']=Et(this['locale'],'Reopen'),_0x11357e['tooltip']=Et(this['locale'],'Reopen'),_0x11357e['icon']=_0xae80cd,_0x11357e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x9507a2=>!_0x9507a2),_0x11357e['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x27f023,_0x592c11)=>_0x27f023&&_0x592c11),_0x11357e['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x11357e;}['_trimContextValue'](_0x548583){if(_0x548583['length']<0x96)return _0x548583;const _0x4dfc87=_0x548583['lastIndexOf']('\x20',0x93);return _0x548583['substring'](0x0,_0x4dfc87>-0x1?_0x4dfc87:0x93)+'...';}['_attachContextActions'](){const _0x512972=this['element']['querySelector']('.ck-context'),_0x1d6fb7=_0x512972['querySelector']('.ck-context__value');this['listenTo'](_0x512972,'mouseenter',()=>{_0x1d6fb7['offsetWidth']<_0x1d6fb7['scrollWidth']&&_0x512972['classList']['add']('overlay');}),this['listenTo'](_0x512972,'mouseleave',()=>{_0x512972['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x388d78 of this['focusables'])this['focusTracker']['add'](_0x388d78['element']),this['keystrokes']['listenTo'](_0x388d78['element']);}['_createContextView'](){const _0x530595=new Vt(this['locale']);return _0x530595['bind']('contextValue')['to'](this),_0x530595;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3685a0,_0x3400b6,_0x7e816d,_0x44710f){super(_0x3685a0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3400b6,this['_localUser']=_0x7e816d,this['_config']=_0x44710f,this['commentThreadHeaderView']=new Bt(_0x3685a0,_0x3400b6),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3592bf(_0x3685a0,Et(_0x3685a0,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x3685a0,_0x3400b6,Object['assign']({'CommentView':this['_config']['CommentView']},_0x44710f)),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',(_0x49f338,_0xea1136)=>_0x49f338||!!_0xea1136),this['bind']('isUnlinked')['to'](_0x3400b6,'unlinkedAt',_0x597b4b=>!!_0x597b4b);let _0x378c8e=null;const _0x58896c=()=>{const _0x341a12=this['_model']['comments']['first']||null;_0x341a12!==_0x378c8e&&(_0x378c8e&&this['stopListening'](_0x378c8e,'change:content'),_0x378c8e=_0x341a12,_0x341a12&&this['listenTo'](_0x341a12,'change:content',_0x58896c));const _0x37a8d3=_0x341a12?_0x341a12['author']['name']:this['_localUser']['name'],_0x8ed02d=_0x341a12?new DOMParser()['parseFromString'](_0x23e7f7(_0x341a12['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x420428=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x37a8d3]);this['set']('ariaLabel',_0x8ed02d?_0x420428+'\x20'+_0x8ed02d:_0x420428);};this['listenTo'](this['_model']['comments'],'change',_0x58896c),_0x58896c(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x17ba74(),this['keystrokes']=new _0x17fd77(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x55e5ed=>_0x55e5ed['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x550d39(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x48732c=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x299ebd=_0x48732c['commentInputView'];return _0x48732c['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x299ebd,'value',(_0x245b3d,_0x64d1d1,_0x59bef5,_0x440f74,_0x4ca0e7)=>!!_0x4ca0e7||!!_0x440f74&&_0x59bef5&&!_0x64d1d1||_0x245b3d&&_0x59bef5&&!_0x64d1d1),_0x299ebd['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2d13aa,_0x41650e,_0x42d148)=>{let _0x1564a8;return _0x1564a8=_0x42d148&&_0x41650e?'Reply\x20to\x20reopen\x20discussion...':_0x2d13aa?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x1564a8);}),_0x299ebd['bind']('submitLabel')['to'](this,'length',_0x2dcf77=>Et(this['locale'],_0x2dcf77?'Reply':'Comment')),_0x299ebd['on']('submit',(_0x135d86,_0x1755b1)=>{this['fire']('addComment',_0x1755b1),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x299ebd['on']('cancel',()=>{this['focus']();}),_0x299ebd['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x299ebd['on']('cancel',_0x59484f=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x59484f['stop']());}),this['on']('change:isActive',(_0x6ce874,_0x5e1dc,_0x1085e7)=>{_0x1085e7||this['length']||_0x299ebd['value']||this['fire']('removeCommentThread');}),_0x48732c;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x50d712();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x22b9c9,target:_0x1c067a,type:_0xcfd672,isVisible:_0x35a798=!0x0}){super(),this['view']=_0x22b9c9,this['view']['element']||this['view']['render'](),this['_type']=_0xcfd672,this['_target']=_0x1c067a,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x55d760([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x45961e,_0x47a497)=>{this['view']['focusTracker']['add'](_0x47a497);}),this['focusableElements']['on']('remove',(_0x4cbb39,_0x1dda16)=>{this['view']['focusTracker']['remove'](_0x1dda16);}),this['set']('isVisible',_0x35a798);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xe3a007=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0xe3a007),_0xe3a007;}get['targetRect'](){const _0x400535=this['target'];if(null===_0x400535)return null;if(_0x400535 instanceof _0x3f7499)return _0x400535;const _0x1207cf=_0x400535['filter'](_0x2d36cc=>function(_0x129678){return!!_0x129678['offsetParent']||!!_0x129678['getClientRects']()['item'](0x0);}(_0x2d36cc));return 0x0===_0x1207cf['length']?null:_0x3f7499['getDomElementRects'](_0x1207cf[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3af2fe){this['view']['isActive']=_0x3af2fe,this['view']['mainView']['isActive']=_0x3af2fe;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3e7e59){if(!(null===_0x3e7e59||_0x3e7e59 instanceof _0x3f7499||Array['isArray'](_0x3e7e59)&&_0x3e7e59['every'](_0x1fef9f=>zt(_0x1fef9f))))throw new _0x3973a7('annotation-invalid-target',null,{'target':_0x3e7e59});}['_getNormalizedTarget'](){const _0x1cc140='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x1cc140)?[_0x1cc140]:_0x1cc140;}};function zt(_0x1daedd){return null!==_0x1daedd&&'object'==typeof _0x1daedd&&'nodeType'in _0x1daedd&&0x1===_0x1daedd['nodeType'];}var Jt=class extends _0x55d760{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2d172e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x17ba74(),this['_focusTracker']['on']('change:isFocused',(_0x16710b,_0x361ab6,_0x22233e)=>{_0x22233e||this['fire']('blur');});for(const _0xc9abba of _0x2d172e)this['add'](_0xc9abba);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x5eae5b){if(this['has'](_0x5eae5b))throw new _0x3973a7('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x5eae5b['innerView'],_0x5eae5b),this['_viewToAnnotation']['set'](_0x5eae5b['view'],_0x5eae5b);for(const _0x1fdd18 of _0x5eae5b['focusableElements'])this['_focusTracker']['add'](_0x1fdd18);if(this['listenTo'](_0x5eae5b['focusableElements'],'add',(_0x91f6c1,_0x135fce)=>{this['_focusTracker']['add'](_0x135fce);}),this['listenTo'](_0x5eae5b['focusableElements'],'remove',(_0x52cbcc,_0x365d12)=>{this['_focusTracker']['remove'](_0x365d12);}),this['listenTo'](_0x5eae5b['view']['focusTracker'],'change:isFocused',(_0x259a9e,_0x20c20d,_0x28b66d)=>{_0x28b66d&&this['fire']('focus',_0x5eae5b);}),_0x5eae5b['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x3e32cf of this)_0x3e32cf['updateTargetRect']();}const _0x4ad341=this['_getOrderInContent'](_0x5eae5b['view']['targetRect']);return super['add'](_0x5eae5b,_0x4ad341);}['remove'](_0x49c5b7){if(!this['has'](_0x49c5b7))throw new _0x3973a7('annotationcollection-not-existing-item',null);this['stopListening'](_0x49c5b7['view']['focusTracker']),this['stopListening'](_0x49c5b7['focusableElements']);for(const _0x2867e3 of _0x49c5b7['focusableElements'])this['_focusTracker']['remove'](_0x2867e3);return this['_viewToAnnotation']['delete'](_0x49c5b7['view']),this['_innerViewToAnnotation']['delete'](_0x49c5b7['innerView']),super['remove'](_0x49c5b7);}['getByInnerView'](_0x38b2e6){return this['_innerViewToAnnotation']['get'](_0x38b2e6);}['getByView'](_0x2e9fed){return this['_viewToAnnotation']['get'](_0x2e9fed);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x27459c of this)_0x27459c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x252629=Array['from'](this)['sort']((_0x386fa9,_0x5c5e72)=>Zt(_0x386fa9['view']['targetRect'],_0x5c5e72['view']['targetRect']));for(let _0x3aa15d=_0x252629['length']-0x1;_0x3aa15d>0x0;_0x3aa15d--){const _0x47a936=_0x252629[_0x3aa15d];_0x3aa15d!==this['getIndex'](_0x47a936)&&(this['remove'](_0x47a936),this['add'](_0x47a936));}}['_getOrderInContent'](_0x265710){let _0x424e7a=0x0;if(!_0x265710)return this['length'];for(const _0x5575c5 of this){const _0x1824be=_0x5575c5['view']['targetRect'];if(_0x1824be){if(Zt(_0x265710,_0x1824be)<0x0)return _0x424e7a;_0x424e7a++;}}return _0x424e7a;}['_areCachedRectsStale'](){const _0x26c495=this['get'](0x0);if(!_0x26c495)return!0x1;const _0x3c8ed9=_0x26c495['view']['targetRect'],_0x22ca52=_0x26c495['targetRect'];return!(!_0x3c8ed9||!_0x22ca52)&&(_0x3c8ed9['top']!==_0x22ca52['top']||_0x3c8ed9['left']!==_0x22ca52['left']);}};function Qt({source:_0x4f3b33,target:_0x47b8c7,filter:_0x14377a}){for(const _0x4f4804 of _0x4f3b33)_0x14377a(_0x4f4804)&&_0x47b8c7['add'](_0x4f4804);_0x47b8c7['listenTo'](_0x4f3b33,'add',(_0x4795ba,_0x452c9e)=>{_0x14377a(_0x452c9e)&&_0x47b8c7['add'](_0x452c9e);}),_0x47b8c7['listenTo'](_0x4f3b33,'remove',(_0x337301,_0x4c5e3f)=>{_0x47b8c7['has'](_0x4c5e3f)&&_0x47b8c7['remove'](_0x4c5e3f);});}function Zt(_0x5b40cf,_0x401e9d){if(null===_0x5b40cf&&null===_0x401e9d)return 0x0;if(null===_0x5b40cf)return-0x1;if(null===_0x401e9d)return 0x1;const _0x3ca39f=_0x5b40cf['top']-_0x401e9d['top'];return 0x0==_0x3ca39f?_0x5b40cf['left']-_0x401e9d['left']:_0x3ca39f;}var ti=class extends _0x584f12{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x129a91){if(super(_0x129a91),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x129a91 instanceof _0x3c4137){const _0x2edd72=_0x129a91['locale'];_0x129a91['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1094b4){this['collection']['add'](_0x1094b4);}['remove'](_0x173c19){this['collection']['remove'](_0x173c19),_0x173c19['destroy']();}['refreshVisibility'](){for(const _0x471fa8 of this['collection'])_0x471fa8['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xb43232){return this['collection']['getByInnerView'](_0xb43232);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5237be of this['collection'])_0x5237be['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x851989){this['fire']('_activateAnnotation',_0x851989);}['createAnnotation'](_0xc6bbf6){return new $t(_0xc6bbf6);}['createAnnotationView'](_0x12b121,_0x166002){return new qt(_0x12b121,_0x166002);}['_addActiveAnnotation'](_0x3eb8b9){const _0xcabf99=new Set(this['activeAnnotations']);_0xcabf99['add'](_0x3eb8b9),this['activeAnnotations']=_0xcabf99;}['_removeActiveAnnotation'](_0x10c441){const _0x2abb56=new Set(this['activeAnnotations']);_0x2abb56['delete'](_0x10c441),this['activeAnnotations']=_0x2abb56;}['_bindAnnotationsToVisibleAnnotations'](){const _0x29f2ac=this['collection'],_0x329315=this['_visibleAnnotations'];function _0x36778e(_0x389549){const _0x541727=_0x389549['source'];_0x541727['isVisible']&&!_0x329315['has'](_0x541727)?_0x329315['add'](_0x541727):!_0x541727['isVisible']&&_0x329315['has'](_0x541727)&&_0x329315['remove'](_0x541727),_0x541727['view']['focusTracker']['remove'](_0x541727['view']['element']),_0x541727['view']['focusTracker']['add'](_0x541727['view']['element']);}this['listenTo'](_0x29f2ac,'add',(_0x513a47,_0x242574)=>{_0x242574['isVisible']&&_0x329315['add'](_0x242574),this['listenTo'](_0x242574,'change:isVisible',_0x36778e);}),this['listenTo'](_0x29f2ac,'remove',(_0x3f66fd,_0x3f50c5)=>{_0x329315['has'](_0x3f50c5)&&_0x329315['remove'](_0x3f50c5),this['stopListening'](_0x3f50c5,'change:isVisible',_0x36778e);});}['_setupEnterAnnotationKeystroke'](){const _0x58ebee=_0x10383a=>{_0x10383a['on']('ready',()=>{_0x10383a['keystrokes']['set'](_0x2f877e,(_0x5873b1,_0x30039b)=>{const _0x348dd6=_0x90b9b4(this['activeAnnotations']['values']());_0x348dd6&&(_0x348dd6['view']['focus'](),_0x30039b());});});};this['context']instanceof _0x3c4137?_0x58ebee(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4a7efa,_0x33a55b)=>{_0x58ebee(_0x33a55b);});}['_setupEscapeAnnotationHandling'](){const _0x2b4869=_0x54730c=>{const _0x2268e2=_0x54730c['source'],_0x1025fb=[];let _0x942d53;if(Array['isArray'](_0x2268e2['target'])){_0x942d53=_0x2268e2['target'][0x0],this['context']instanceof _0x3c4137?_0x1025fb['push'](this['context']):this['context']['editors']&&_0x1025fb['push'](...this['context']['editors']);for(const _0xd6d08a of _0x1025fb)for(const _0x2d78bd of _0xd6d08a['editing']['view']['domRoots']['values']())if(_0x2d78bd['contains'](_0x942d53))return void _0xd6d08a['editing']['view']['focus']();_0x942d53['focus']();}};this['listenTo'](this['collection'],'add',(_0xfe2a7,_0x1b69f8)=>{this['listenTo'](_0x1b69f8,'escape',_0x2b4869,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5c7237,_0x8eb3a0)=>{this['stopListening'](_0x8eb3a0,'escape',_0x2b4869);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x50d712();var oi=class extends _0x584f12{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x5a9d3d,_0x29eb39];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ee1f0){super(_0x4ee1f0),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x38a6b0=this['context']['config'];_0x38a6b0['define']('comments.maxCommentsWhenCollapsed',0x2),_0x38a6b0['define']('comments.maxThreadTotalWeight',0x1f4),_0x38a6b0['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x38a6b0['define']('comments.CommentThreadView',Ut),_0x38a6b0['define']('comments.CommentView',Yt),_0x38a6b0['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3f1b6b=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x391438,_0x5a5f76)=>this['_addCommentThread'](_0x5a5f76)),this['on']('submitCommentThread',(_0x594012,_0x5a3d3d)=>this['_submitCommentThread'](_0x5a3d3d)),this['on']('resolveCommentThread',(_0x484140,_0x32f940)=>this['_resolveCommentThread'](_0x32f940)),this['on']('resolveCommentThread',(_0x49a9e6,_0x6d5d72)=>this['_updateActiveAnnotation'](_0x6d5d72),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x488e0f,_0x2879f7)=>this['_reopenCommentThread'](_0x2879f7)),this['on']('reopenCommentThread',(_0x2093da,_0x1f254c)=>this['_updateActiveAnnotation'](_0x1f254c),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4f19a0,_0x395baa)=>this['_removeCommentThread'](_0x395baa)),this['on']('updateCommentThread',(_0x2cade3,_0x2f38b0)=>this['_updateCommentThread'](_0x2f38b0)),this['on']('updateCommentThread',(_0x2afd8d,_0x5c1114)=>this['_updateActiveAnnotation'](_0x5c1114),{'priority':'lowest'}),this['on']('addComment',(_0x235b1e,_0x1a92e7)=>this['_addComment'](_0x1a92e7)),this['on']('updateComment',(_0x347273,_0x2e40e1)=>this['_updateComment'](_0x2e40e1)),this['on']('removeComment',(_0x315b00,_0x104052)=>this['_removeComment'](_0x104052)),this['on']('addComment',(_0x35e204,{threadId:_0x56850,isFromAdapter:_0x34cb8c})=>{if(_0x34cb8c)return;const _0x3796d6=this['getCommentThread'](_0x56850),_0x51b59a=_0x3796d6&&this['_threadToController']['get'](_0x3796d6);_0x51b59a&&_0x51b59a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3f1b6b,'change:activeAnnotations',(_0x5bf035,_0x44583d,_0x555c00)=>{const _0x1d4dc8=Array['from'](_0x555c00)['map'](_0x4b80b6=>this['_viewToController']['get'](_0x4b80b6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1d4dc8?_0x1d4dc8['model']:null;});}set['adapter'](_0xe6bd1f){if(this['_adapter'])throw new _0x3973a7('commentsrepository-adapter-already-set');this['_adapter']=_0xe6bd1f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x374eea=ii,threadId:_0x36afbf=_0x228023(),comments:_0x447d34=[],unlinkedAt:_0x815bf6=null,resolvedAt:_0x32db8d=null,resolvedBy:_0x407a2a=null,target:_0x107f5a=null,context:_0x5e2496=null,attributes:_0x4e39a8={},isResolvable:_0x488740=!0x0,isSubmitted:_0xa8560b=!0x1,isFromAdapter:_0x53d593=!0x1}={}){return this['fire'](ai('addCommentThread',_0x374eea),{'channelId':_0x374eea,'threadId':_0x36afbf,'comments':_0x447d34,'unlinkedAt':_0x815bf6,'resolvedAt':_0x32db8d,'resolvedBy':_0x407a2a,'target':_0x107f5a,'context':_0x5e2496,'attributes':_0x4e39a8,'isFromAdapter':_0x53d593,'isResolvable':_0x488740,'isSubmitted':_0xa8560b}),this['getCommentThread'](_0x36afbf);}['openNewCommentThread']({channelId:_0x559653=ii,threadId:_0x24eef5=_0x228023(),target:_0x4af00c,context:_0x14c59d=null,isResolvable:_0x4d863b=!0x0}){if(this['_readOnlyChannels']['has'](_0x559653)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4af00c)throw new _0x3973a7('commentsrepository-missing-target');const _0x3af8e1=this['addCommentThread']({'channelId':_0x559653,'threadId':_0x24eef5,'target':_0x4af00c,'context':_0x14c59d,'isResolvable':_0x4d863b});if(!_0x3af8e1)return null;const _0x18311e=this['_threadToController']['get'](_0x3af8e1),_0x2777f5=_0x18311e['view']['commentThreadInputView']['commentInputView'],_0x2744ee=this['context']['plugins']['get'](ti),_0x159f31=_0x2744ee['getByInnerView'](_0x18311e['view']);return _0x2744ee['activate'](_0x159f31),_0x2777f5['once']('editorReady',()=>_0x2777f5['focus']()),_0x3af8e1;}['hasCommentThread'](_0x393f04){if('string'!=typeof _0x393f04)throw new _0x3973a7('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x393f04);}['updateCommentThread']({channelId:_0x407e2b=ii,threadId:_0x41acb6,context:_0x5a6513,unlinkedAt:_0x32e252,attributes:_0x4c87da,isFromAdapter:_0x2fdafe=!0x1}){return this['fire'](ai('updateCommentThread',_0x407e2b),{'channelId':_0x407e2b,'threadId':_0x41acb6,'context':_0x5a6513,'unlinkedAt':_0x32e252,'attributes':_0x4c87da,'isFromAdapter':_0x2fdafe}),this['getCommentThread'](_0x41acb6);}['getCommentThread'](_0xa3095d){if('string'!=typeof _0xa3095d)throw new _0x3973a7('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0xa3095d);}['fetchCommentThread']({channelId:_0x26354a,threadId:_0x1e95d1}={}){const _0x530a46=this['getCommentThread'](_0x1e95d1);if(_0x530a46)return Promise['resolve'](_0x530a46);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3973a7('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x26354a,'threadId':_0x1e95d1})['then'](_0x555fba=>this['hasCommentThread'](_0x1e95d1)?this['getCommentThread'](_0x1e95d1):_0x555fba?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x26354a},_0x555fba)):void 0x0)['catch'](_0xd44b2a=>{throw console['error'](_0xd44b2a),new _0x3973a7('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x8f9908,skipNotAttached:_0x1f5634=!0x1,skipEmpty:_0xcf5af1=!0x1,toJSON:_0x52c32f=!0x1}={}){const _0x44a78a=[];for(const _0x5b3146 of this['_threads']['values']())_0x8f9908&&_0x5b3146['channelId']!==_0x8f9908||_0x1f5634&&!_0x5b3146['isAttached']||_0xcf5af1&&0x0===_0x5b3146['length']||_0x44a78a['push'](_0x5b3146);return _0x52c32f?_0x44a78a['map'](_0x377208=>_0x377208['toJSON']()):_0x44a78a;}['getAnnotationForCommentThread'](_0x220808){const _0x35b657=this['_threadToController']['get'](_0x220808);return _0x35b657&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x35b657['view'])||null;}['getCommentThreadForAnnotation'](_0x58bdf0){const _0x4a9257=this['_viewToController']['get'](_0x58bdf0['innerView']);return _0x4a9257?_0x4a9257['model']:null;}['setActiveCommentThread'](_0x73228){const _0x3f277c=this['context']['plugins']['get'](ti);if(!_0x73228)return void(this['activeCommentThread']&&_0x3f277c['deactivateAll']());const _0x3d6cf3=this['getCommentThread'](_0x73228);if(!_0x3d6cf3)throw new _0x3973a7('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x73228});if(!this['_threadToController']['has'](_0x3d6cf3))throw new _0x3973a7('commentsrepository-active-not-attached',null,{'threadId':_0x73228});const _0x363d5f=_0x3f277c['getByInnerView'](this['_threadToController']['get'](_0x3d6cf3)['view']);_0x3f277c['activate'](_0x363d5f);}['switchReadOnly'](_0x570d37,_0x4475bd){_0x570d37?this['_readOnlyChannels']['add'](_0x4475bd):this['_readOnlyChannels']['delete'](_0x4475bd),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x41f852){return this['_readOnlyChannels']['has'](_0x41f852)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3bc956,_0x123372){return new bt(_0x3bc956,_0x123372);}['setPermissions'](_0x11ed2f,_0x4b4333=ii){this['_permissions']['set'](_0x4b4333,_0x11ed2f),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x22de91=ii){return this['_permissions']['has'](_0x22de91)?this['_permissions']['get'](_0x22de91):ei;}['_addCommentThread']({channelId:_0x5f0ab0,threadId:_0x40c375,comments:_0x1fc163,unlinkedAt:_0x25931d,resolvedAt:_0x40761a,resolvedBy:_0x22b63d,target:_0x3b1411,context:_0xc66627,attributes:_0x24b47e,isFromAdapter:_0x1f417c,isResolvable:_0x256b1b,isSubmitted:_0x5aa50c}){if('string'!=typeof _0x40c375)throw new _0x3973a7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x40c375});if(this['hasCommentThread'](_0x40c375))throw new _0x3973a7('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x40c375});const _0x21a972=new ri(this,{'channelId':_0x5f0ab0,'id':_0x40c375,'context':_0xc66627,'attributes':_0x24b47e,'unlinkedAt':_0x25931d,'resolvedAt':_0x40761a,'resolvedBy':_0x22b63d?this['context']['plugins']['get'](_0x29eb39)['getUser'](_0x22b63d):null,'isResolvable':_0x256b1b,'isSubmitted':_0x5aa50c||_0x1f417c});this['_threads']['set'](_0x40c375,_0x21a972);for(const _0x1b9f18 of _0x1fc163)_0x21a972['_add'](this['_createNewComment']({'threadId':_0x40c375,..._0x1b9f18}));return _0x3b1411&&_0x21a972['attachTo'](_0x3b1411),_0x1f417c||!_0x21a972['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5f0ab0,'threadId':_0x40c375});}['_submitCommentThread']({channelId:_0xa71acf,threadId:_0x40202b}){if(!this['hasCommentThread'](_0x40202b))throw new _0x3973a7('commentsrepository-missing-comment-thread',this);const _0x2e093d=this['getCommentThread'](_0x40202b);if(_0x2e093d['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2f5214,comments:_0x6faac,resolvedAt:_0x19aa26,resolvedBy:_0x56fd1b,context:_0x2151b4,attributes:_0x43a8fe}=_0x2e093d,_0x4f1647=this['context']['plugins']['get']('PendingActions'),_0x23dbe6=_0x4f1647['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0xa71acf,'threadId':_0x2f5214,'comments':_0x6faac['map'](_0x1869a1=>_0x1869a1['toJSON']()),'resolvedAt':_0x19aa26,'resolvedBy':_0x56fd1b?_0x56fd1b['id']:_0x56fd1b,'context':_0x2151b4,'attributes':_0x43a8fe})['then'](({comments:_0x4ac47f})=>{_0x4f1647['remove'](_0x23dbe6);for(const _0x248d6f of _0x4ac47f)this['_updateComment']({'channelId':_0xa71acf,'threadId':_0x40202b,'commentId':_0x248d6f['commentId'],'createdAt':_0x248d6f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x215a02=>{throw console['error'](_0x215a02),new _0x3973a7('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4f6e78,target:_0x1314ba}){const _0x1b0f8e=this['getCommentThread'](_0x4f6e78);if(!_0x1b0f8e)throw new _0x3973a7('commentsrepository-attach-missing-comment-thread',this);const _0x75edfb=this['context']['plugins']['get']('PendingActions'),_0x435146=this['context']['plugins']['get'](ti),_0x4c597d=this['_createCommentThreadView'](_0x1b0f8e),_0x3183c9=new bt(_0x1b0f8e,_0x4c597d);let _0x3ca647=null;_0x4c597d['on']('change:isDirty',(_0x147550,_0x13084f,_0x1d690b)=>{_0x1d690b?_0x3ca647=_0x75edfb['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3ca647&&(_0x75edfb['remove'](_0x3ca647),_0x3ca647=null);}),this['_threadToController']['set'](_0x1b0f8e,_0x3183c9),this['_viewToController']['set'](_0x4c597d,_0x3183c9);const _0x452661=new qt(this['context']['locale'],_0x4c597d);_0x452661['bind']('length')['to'](_0x4c597d),_0x452661['bind']('isDirty')['to'](_0x4c597d,'isDirty',_0x4c597d,'length',(_0x26b1b6,_0x50974b)=>_0x26b1b6||!_0x50974b),_0x452661['bind']('isActive')['to'](_0x4c597d),_0x452661['type']='comment';const _0x49f247=new $t({'view':_0x452661,'target':_0x1314ba,'type':'comment','isVisible':!_0x1b0f8e['archivedAt']&&!!('function'==typeof _0x1314ba?_0x1314ba():_0x1314ba)});return _0x4c597d['on']('escape',()=>{_0x49f247['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4c597d,_0x49f247),_0x435146['add'](_0x49f247),_0x49f247;}['_bindAnnotationToEditors'](_0x2c7b9e,_0x1d6ab5){this['listenTo'](_0x2c7b9e,'editorReady',(_0x1e2f29,_0x30a3ee)=>{const _0x38208a=_0x30a3ee['ui']['view']['body']['bodyCollectionContainer'];_0x1d6ab5['focusableElements']['add'](_0x38208a),this['context']instanceof _0x3c4137&&this['context']['ui']['focusTracker']['add'](_0x38208a);},{'priority':'highest'}),this['listenTo'](_0x2c7b9e,'editorDestroyed',(_0x22a16a,_0x424b6c)=>{const _0x12e114=_0x424b6c['ui']['view']['body']['bodyCollectionContainer'];_0x1d6ab5['focusableElements']['has'](_0x12e114)&&_0x1d6ab5['focusableElements']['remove'](_0x12e114),this['context']instanceof _0x3c4137&&this['context']['ui']['focusTracker']['remove'](_0x12e114);});}['_unbindEditors'](_0x291a89){this['stopListening'](_0x291a89,'editorReady'),this['stopListening'](_0x291a89,'editorDestroyed');}['_createCommentThreadView'](_0x3c5edc){const _0x287141=this['context']['plugins']['get'](_0x29eb39),{config:_0x4174ba,locale:_0x33fb35}=this['context'],_0x3fa20a=_0x120c49(_0x4174ba['get']('locale'),_0x33fb35);return new(0x0,(_0x4174ba['get']('comments'))['CommentThreadView'])(_0x33fb35,_0x3c5edc,_0x287141['me'],{'editorConfig':{..._0x4174ba['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4174ba['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4174ba['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4174ba['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4174ba['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3fa20a,'CommentView':_0x4174ba['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x50608f,channelId:_0x2f34b4,resolvedAt:_0x341d7c,resolvedBy:_0x3d27de,isFromAdapter:_0x2ced30}){if(!this['hasCommentThread'](_0x50608f))throw new _0x3973a7('commentsrepository-missing-comment-thread',null,{'threadId':_0x50608f});const _0x2b0fa0=this['getCommentThread'](_0x50608f);if(_0x2b0fa0['isResolved'])throw new _0x3973a7('commentsrepository-resolved-comment-thread',null,{'threadId':_0x50608f});const _0x18d694=this['context']['plugins']['get'](_0x29eb39);if(_0x2b0fa0['resolvedBy']=_0x18d694['getUser'](_0x3d27de),_0x2b0fa0['resolvedAt']=_0x341d7c,_0x2ced30||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x480de8=this['context']['plugins']['get']('PendingActions'),_0x53701c=_0x480de8['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2f34b4,'threadId':_0x50608f})['then'](({resolvedAt:_0x5453c8,resolvedBy:_0x1978b6})=>{_0x480de8['remove'](_0x53701c),_0x2b0fa0['resolvedBy']['id']!==_0x1978b6&&(_0x2b0fa0['resolvedBy']=_0x18d694['getUser'](_0x1978b6)),_0x2b0fa0['resolvedAt']=_0x5453c8;})['catch'](_0x222640=>{throw console['error'](_0x222640),new _0x3973a7('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x218867,channelId:_0x59dea9,isFromAdapter:_0x1c959a}){if(!this['hasCommentThread'](_0x218867))throw new _0x3973a7('commentsrepository-missing-comment-thread',null,{'threadId':_0x218867});const _0x139042=this['getCommentThread'](_0x218867);if(!_0x139042['isResolved'])throw new _0x3973a7('commentsrepository-reopen-comment-thread',null,{'threadId':_0x218867});if(_0x139042['resolvedBy']=null,_0x139042['resolvedAt']=null,_0x1c959a||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4fd6ba=this['context']['plugins']['get']('PendingActions'),_0xab7686=_0x4fd6ba['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x59dea9,'threadId':_0x218867})['then'](()=>_0x4fd6ba['remove'](_0xab7686))['catch'](_0x1dfe4c=>{throw console['error'](_0x1dfe4c),new _0x3973a7('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x13cda2,isFromAdapter:_0x98a159}){const _0x113d82=this['getCommentThread'](_0x13cda2);if(!_0x113d82)throw new _0x3973a7('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x13cda2),this['_threads']['delete'](_0x13cda2),!_0x113d82['isSubmitted']||_0x98a159||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x563c52=this['context']['plugins']['get']('PendingActions'),{channelId:_0x346830}=_0x113d82,_0x524b77=_0x563c52['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x346830,'threadId':_0x13cda2})['then'](()=>_0x563c52['remove'](_0x524b77))['catch'](_0x40fe54=>{throw console['error'](_0x40fe54),new _0x3973a7('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3c06d6,unlinkedAt:_0x5ec88e,context:_0x585dc8,attributes:_0x9ec9f5,isFromAdapter:_0x21db14}){if('string'!=typeof _0x3c06d6)throw new _0x3973a7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3c06d6});if(!this['hasCommentThread'](_0x3c06d6))throw new _0x3973a7('commentsrepository-missing-comment-thread',null,{'threadId':_0x3c06d6});const _0x5b1860=this['getCommentThread'](_0x3c06d6);let _0x140f96=!0x1;if(void 0x0!==_0x585dc8&&_0x5b1860['context']!==_0x585dc8&&(_0x5b1860['context']=_0x585dc8,_0x140f96=!0x0),void 0x0!==_0x5ec88e&&_0x5b1860['unlinkedAt']!==_0x5ec88e&&(_0x5b1860['unlinkedAt']=_0x5ec88e,_0x140f96=!0x0),_0x9ec9f5&&!_0x3a45f3(_0x9ec9f5,_0x5b1860['attributes'])&&(_0x5b1860['attributes']=_0x9ec9f5,_0x140f96=!0x0),!_0x140f96)return Promise['resolve']();if(!_0x5b1860['isSubmitted']||_0x21db14||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x286b91=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2df400}=_0x5b1860,_0x217f1d=_0x286b91['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2df400,'threadId':_0x3c06d6,'context':_0x585dc8,'unlinkedAt':_0x5ec88e,'attributes':_0x9ec9f5})['then'](()=>_0x286b91['remove'](_0x217f1d))['catch'](_0x41c863=>{throw console['error'](_0x41c863),new _0x3973a7('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x33d949){const _0xfc9d35=this['context']['plugins']['get'](ti),_0x25db5e=this['getCommentThread'](_0x33d949);if(_0x25db5e['_isAttached']=!0x1,this['_threadToController']['has'](_0x25db5e)){const _0x2f8f66=this['_threadToController']['get'](_0x25db5e),_0x2fdaf4=_0x2f8f66['view'],_0x27c365=_0xfc9d35['getByInnerView'](_0x2fdaf4);this['_threadToController']['delete'](_0x25db5e),this['_viewToController']['delete'](_0x2fdaf4),_0x27c365&&_0xfc9d35['remove'](_0x27c365),_0x2f8f66['destroy'](),_0x2fdaf4['destroy']()['then'](()=>{this['_unbindEditors'](_0x2fdaf4);});}}['_updateActiveAnnotation']({threadId:_0x2a0c6d,resolvedAt:_0x3d14bf,unlinkedAt:_0x35a338}){const _0x148c69=!!_0x3d14bf,_0x233dde=this['context']['plugins']['get'](ti),_0x4f8424=this['getCommentThread'](_0x2a0c6d);if(this['_threadToController']['has'](_0x4f8424)){const _0x53308e=this['_threadToController']['get'](_0x4f8424)['view'],_0x57459b=_0x233dde['getByInnerView'](_0x53308e);_0x57459b&&(_0x148c69&&_0x233dde['_removeActiveAnnotation'](_0x57459b),_0x35a338?_0x57459b['isVisible']=!0x1:_0x57459b['refreshVisibility']());}}['_getExternalAuthor'](_0x41d4ac){const _0x5c993f=this['context']['plugins']['get'](_0x29eb39),_0x13bd80=_0x191b3b('external:'+_0x41d4ac),_0x518f00=_0x5c993f['getUser'](_0x13bd80);return _0x518f00||_0x5c993f['addUser']({'id':_0x13bd80,'name':_0x41d4ac});}['_createNewComment']({threadId:_0x1c05e3,commentId:_0x11ed8a=_0x228023(),content:_0x3292b5,authorId:_0x5cb21a,createdAt:_0x1ae0a2,attributes:_0x447f6e}){if('string'!=typeof _0x11ed8a)throw new _0x3973a7('commentsrepository-invalid-commentid');if('string'!=typeof _0x5cb21a)throw new _0x3973a7('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3292b5||!_0x3292b5['trim']())throw new _0x3973a7('commentsrepository-invalid-comment-content');const _0x1ede43=this['context']['plugins']['get'](_0x29eb39)['getUser'](_0x5cb21a);if(!_0x1ede43)throw new _0x3973a7('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5cb21a});let _0x1a0cc9=null,_0x3edbfe=_0x1ae0a2;return _0x447f6e?.['@external']&&(_0x1a0cc9=this['_getExternalAuthor'](_0x447f6e['@external']['authorName']),_0x3edbfe=new Date(_0x447f6e['@external']['createdAt'])),new hi(this,{'threadId':_0x1c05e3,'id':_0x11ed8a,'author':_0x1a0cc9||_0x1ede43,'creator':_0x1ede43,'content':_0x3292b5,'createdAt':_0x1ae0a2,'authoredAt':_0x3edbfe,'attributes':_0x447f6e});}['_addComment'](_0x2733bc){let {threadId:_0xc78b3b,content:_0x2758e8,attributes:_0x24d543,isFromAdapter:_0x159aaa}=_0x2733bc;const _0x8b38fa=this['getCommentThread'](_0x2733bc['threadId']);if(!_0x8b38fa)throw new _0x3973a7('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2cf414=this['_createNewComment'](_0x2733bc),{id:_0x44c5d0}=_0x2cf414;if(_0x8b38fa['_add'](_0x2cf414),_0x159aaa||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x8b38fa['isSubmitted'])return Promise['resolve']();const _0x5410fb=this['context']['plugins']['get']('PendingActions'),{channelId:_0x524730}=_0x8b38fa,_0x522738=_0x5410fb['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x24d543||(_0x24d543={}),this['adapter']['addComment']({'channelId':_0x524730,'threadId':_0xc78b3b,'commentId':_0x44c5d0,'content':_0x2758e8,'attributes':_0x24d543})['then'](_0xcf835f=>{_0x5410fb['remove'](_0x522738),_0xcf835f&&this['_updateComment']({'channelId':_0x524730,'threadId':_0xc78b3b,'commentId':_0x44c5d0,'createdAt':_0xcf835f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x53903f=>{throw console['error'](_0x53903f),new _0x3973a7('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3d7129,commentId:_0x154b1b,content:_0x237be2,createdAt:_0x4a449d,attributes:_0x296459,isFromAdapter:_0x8c8b89}){if(void 0x0!==_0x237be2&&('string'!=typeof _0x237be2||!_0x237be2['trim']()['length']))throw new _0x3973a7('commentsrepository-update-comment-invalid-content');const _0x51aae2=this['getCommentThread'](_0x3d7129),_0x2ae94a=_0x51aae2['getComment'](_0x154b1b);if(!_0x2ae94a)throw new _0x3973a7('commentsrepository-update-missing-comment',this);let _0x514229=!0x1;if(_0x237be2&&_0x237be2!==_0x2ae94a['content']&&(_0x2ae94a['isEditable']||_0x8c8b89)&&(_0x2ae94a['content']=_0x237be2,_0x514229=!0x0),_0x4a449d&&_0x4a449d!==_0x2ae94a['createdAt']&&(_0x2ae94a['createdAt']=_0x4a449d,_0x2ae94a['isExternal']||(_0x2ae94a['authoredAt']=_0x4a449d),_0x514229=!0x0),_0x296459&&!_0x3a45f3(_0x296459,_0x2ae94a['attributes'])&&(_0x2ae94a['attributes']=_0x296459,_0x514229=!0x0),!_0x514229)return Promise['resolve']();if(_0x51aae2['fire']('commentUpdated'),_0x8c8b89||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x37f0dd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x202ab3}=this['getCommentThread'](_0x2ae94a['threadId']),_0x398a38=_0x37f0dd['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x202ab3,'threadId':_0x3d7129,'commentId':_0x154b1b,'content':_0x237be2,'attributes':_0x296459})['then'](()=>_0x37f0dd['remove'](_0x398a38))['catch'](_0x4747fe=>{throw console['error'](_0x4747fe),new _0x3973a7('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3379c6,commentId:_0x1b69af,isFromAdapter:_0x319eb7}){const _0x3354cb=this['getCommentThread'](_0x3379c6),_0x574b2e=_0x3354cb['getComment'](_0x1b69af);if(!_0x574b2e)throw new _0x3973a7('commentsrepository-remove-missing-comment',this);if(_0x3354cb['_remove'](_0x574b2e),_0x319eb7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5adb41=this['context']['plugins']['get']('PendingActions'),{channelId:_0x30239c}=_0x3354cb,_0x4d640f=_0x5adb41['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x30239c,'threadId':_0x3379c6,'commentId':_0x1b69af})['then'](()=>_0x5adb41['remove'](_0x4d640f))['catch'](_0x3f7752=>{throw console['error'](_0x3f7752),new _0x3973a7('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x2e47d9,_0x556baf){super();const _0x17942b=_0x556baf['isResolvable'];this['channelId']=_0x556baf['channelId'],this['id']=_0x556baf['id'],this['comments']=new _0x55d760(),this['_repository']=_0x2e47d9,this['_isAttached']=!0x1,this['_isSubmitted']=_0x556baf['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2e47d9,'_permissions',_0x2e47d9,'_readOnlyChannels',()=>_0x2e47d9['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2e47d9,'_permissions',()=>_0x2e47d9['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2e47d9,'_permissions',()=>{const _0x1cc8ce=_0x2e47d9['getPermissions'](this['channelId']);return _0x1cc8ce['write']||_0x1cc8ce['admin'];}),this['bind']('isResolvable')['to'](_0x2e47d9,'_permissions',()=>_0x17942b&&_0x2e47d9['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x556baf['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5f5db3,_0x3bc357)=>_0x5f5db3?_0x3bc357?_0x5f5db3<_0x3bc357?_0x5f5db3:_0x3bc357:_0x5f5db3:_0x3bc357),this['set']('unlinkedAt',_0x556baf['unlinkedAt']||null),this['set']('resolvedAt',_0x556baf['resolvedAt']||null),this['set']('resolvedBy',_0x556baf['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1fa938=>!!_0x1fa938),this['set']('attributes',_0x556baf['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xc85afd,_0x3c1bfc)=>_0xc85afd+_0x3c1bfc['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5c685d,id:_0xd51693}=this;this['_repository']['fire'](ai('submitCommentThread',_0x5c685d),{'channelId':_0x5c685d,'threadId':_0xd51693});}['setUnlinkedAt'](_0x5a491d){this['_update']({'unlinkedAt':_0x5a491d});}['resolve']({resolvedAt:_0x5afb52=new Date(),resolvedBy:_0x5d2f60='',isFromAdapter:_0x31018b=!0x1}={}){const _0x4d1923=this['_repository']['context']['plugins']['get'](_0x29eb39)['me'],{channelId:_0x4d9141,id:_0x2889c0}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x4d9141),{'channelId':_0x4d9141,'threadId':_0x2889c0,'resolvedAt':_0x5afb52,'resolvedBy':_0x5d2f60||_0x4d1923['id'],'isFromAdapter':_0x31018b});}['reopen']({isFromAdapter:_0x486042=!0x1}={}){const {channelId:_0x3cd7d8,id:_0x42fdae}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x3cd7d8),{'channelId':_0x3cd7d8,'threadId':_0x42fdae,'isFromAdapter':_0x486042});}['setContext'](_0xbcecb8){this['context']||this['_update']({'context':_0xbcecb8});}['setAttribute'](_0x33b216,_0x58a8cc){const _0x141610=_0x3bbce8(this['attributes']);_0x1c2903(_0x141610,_0x33b216,_0x58a8cc),this['_update']({'attributes':_0x141610});}['removeAttribute'](_0x4f09da){const _0x2985da=_0x3bbce8(this['attributes']);_0x4899cc(_0x2985da,_0x4f09da),this['_update']({'attributes':_0x2985da});}['remove']({isFromAdapter:_0x4432c8=!0x1}={}){const {channelId:_0x12f726,id:_0x317a60}=this;this['_repository']['fire'](ai('removeCommentThread',_0x12f726),{'channelId':_0x12f726,'threadId':_0x317a60,'isFromAdapter':_0x4432c8});}['attachTo'](_0x435176){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x435176});}['addComment'](_0x1861c4){const {channelId:_0x56738e,id:_0x31f7ef}=this;this['_repository']['fire'](ai('addComment',_0x56738e,_0x31f7ef),Object['assign']({'channelId':_0x56738e,'threadId':_0x31f7ef},_0x1861c4));}['getComment'](_0x6a9043){if('string'!=typeof _0x6a9043)throw new _0x3973a7('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x6a9043});return this['comments']['get'](_0x6a9043);}['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'](_0x2f4cc7=>_0x2f4cc7['toJSON']()),'attributes':this['attributes']};}['_add'](_0x12089d){return this['listenTo'](_0x12089d,'change:authoredAt',()=>{const _0x52bf76=this['_findOptimalIndex'](_0x12089d),_0x1175a5=this['comments'];_0x52bf76-0x1!=_0x1175a5['getIndex'](_0x12089d)&&_0x52bf76+0x1!=_0x1175a5['getIndex'](_0x12089d)&&(this['_remove'](_0x12089d),this['_add'](_0x12089d));}),this['comments']['add'](_0x12089d,this['_findOptimalIndex'](_0x12089d));}['_update'](_0x5c1dc8){const {channelId:_0x3a5346,id:_0x90df5a}=this;this['_repository']['fire'](ai('updateCommentThread',_0x3a5346),{..._0x5c1dc8,'channelId':_0x3a5346,'threadId':_0x90df5a});}['_remove'](_0x56c889){return this['stopListening'](_0x56c889),_0x56c889['destroy'](),this['comments']['remove'](_0x56c889);}['_findOptimalIndex'](_0x1da091){const _0x7f9742=this['comments']['find'](_0x2f5487=>new Date(_0x2f5487['authoredAt'])['getTime']()>new Date(_0x1da091['authoredAt'])['getTime']());return _0x7f9742?this['comments']['getIndex'](_0x7f9742):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x258c66,_0x3d69c4){super();const _0x1bbca0=_0x258c66['context']['plugins']['get'](_0x29eb39)['me'],_0x5b13b0=_0x258c66['getCommentThread'](_0x3d69c4['threadId']),_0x54379b=0x0===_0x5b13b0['comments']['length'],_0x26593f=_0x1bbca0===_0x3d69c4['author'];this['id']=_0x3d69c4['id'],this['threadId']=_0x3d69c4['threadId'],this['author']=_0x3d69c4['author'],this['creator']=_0x3d69c4['creator'],this['set']('content',_0x3d69c4['content']),this['createdAt']=_0x3d69c4['createdAt']||new Date(),this['set']('authoredAt',_0x3d69c4['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5b13b0,'resolvedAt'),this['set']('attributes',_0x3d69c4['attributes']||{}),this['bind']('isEditable')['to'](_0x258c66,'_permissions',()=>{const _0x1db467=_0x258c66['getPermissions'](_0x5b13b0['channelId'])['write'],_0x18a054=_0x258c66['getPermissions'](_0x5b13b0['channelId'])['modifyAll'];return _0x26593f&&_0x1db467||!_0x26593f&&_0x18a054;}),this['bind']('isRemovable')['to'](_0x5b13b0,'isRemovable',_0x258c66,'_permissions',_0x3c827c=>{const _0xaeac37=_0x258c66['getPermissions'](_0x5b13b0['channelId'])['write'],_0xe109a4=_0x258c66['getPermissions'](_0x5b13b0['channelId'])['modifyAll'];return _0x26593f&&_0xaeac37||_0x3c827c&&_0x54379b||!_0x26593f&&_0xe109a4&&!_0x54379b;}),this['bind']('isReadOnly')['to'](_0x5b13b0,'isReadOnly'),this['_repository']=_0x258c66;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x1297d1){const _0x57a809=document['createElement']('div');return _0x57a809['innerHTML']=_0x1297d1,_0x57a809['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3c63d4){const {threadId:_0x1865d2,id:_0x360c67}=this;if(!this['_repository']['hasCommentThread'](_0x1865d2))throw new _0x3973a7('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x23f2d3}=this['_repository']['getCommentThread'](_0x1865d2);this['_repository']['fire'](ai('updateComment',_0x23f2d3,_0x1865d2),{'channelId':_0x23f2d3,'threadId':_0x1865d2,'commentId':_0x360c67,..._0x3c63d4});}['setAttribute'](_0x4cc897,_0x2491a4){const _0x4d2f92=_0x3bbce8(this['attributes']);_0x1c2903(_0x4d2f92,_0x4cc897,_0x2491a4),this['update']({'attributes':_0x4d2f92});}['removeAttribute'](_0x320bea){const _0x29e55a=_0x3bbce8(this['attributes']);_0x4899cc(_0x29e55a,_0x320bea),this['update']({'attributes':_0x29e55a});}['remove'](_0x42c0a3={}){if(!_0x42c0a3['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1339b1,id:_0x4dba15}=this;if(!this['_repository']['hasCommentThread'](_0x1339b1))throw new _0x3973a7('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5912bc}=this['_repository']['getCommentThread'](_0x1339b1);this['_repository']['fire'](ai('removeComment',_0x5912bc,_0x1339b1),{'channelId':_0x5912bc,'threadId':_0x1339b1,'commentId':_0x4dba15,..._0x42c0a3});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x2a9096,..._0x3cc62b){for(const _0x5e902c of _0x3cc62b)void 0x0!==_0x5e902c&&(_0x2a9096+=':'+String(_0x5e902c));return _0x2a9096;}var ci=class extends _0x25fd83{constructor(_0x1deb36){super(_0x1deb36),this['set']('hasContent',!0x1);}['refresh'](){const _0x21014b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x1bc33e of _0x21014b['getRanges']())if(this['_hasContent'](_0x1bc33e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x309e39=_0x228023(),ranges:_0x1d6a25,comment:_0x209604}={}){const _0x342c76=this['editor']['model'],_0x82f962=_0x1d6a25??Array['from'](_0x342c76['document']['selection']['getRanges']()),_0x50b929=[];for(const _0x307388 of _0x82f962)this['_hasContent'](_0x307388)&&_0x50b929['push'](this['_trimToContent'](_0x307388));if(!_0x50b929['length'])throw new _0x3973a7('addcommentthreadcommand-incorrect-ranges',null);_0x209604&&this['_createCommentThread'](_0x309e39,_0x209604),this['_createMarkersFromRanges'](_0x309e39,_0x50b929,!!_0x209604);}['_createMarkersFromRanges'](_0x2fa52e,_0x40f117,_0x12e0e1){this['editor']['model']['change'](_0x28c973=>{for(const _0x51fe6a of _0x40f117){const _0x36ccbd='comment:'+_0x2fa52e+':'+_0x228023()['substr'](0x1,0x5);_0x28c973['addMarker'](_0x36ccbd,{'range':_0x51fe6a,'usingOperation':_0x12e0e1,'affectsData':_0x12e0e1});}});}['_createCommentThread'](_0x5c8042,_0x43a4b3){const _0x4bae5b=this['editor']['plugins']['get']('CommentsRepository'),_0x465311=this['editor']['config']['get']('collaboration.channelId'),_0x4e282c=this['editor']['plugins']['get']('Users')['me'];if(!_0x4e282c)throw new _0x3973a7('addcommentthreadcommand-user-not-found',null);_0x4bae5b['addCommentThread']({'threadId':_0x5c8042,'channelId':_0x465311,'comments':[{'authorId':_0x4e282c['id'],'content':_0x43a4b3,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1aba4a){for(const _0x2b8e84 of _0x1aba4a['getItems']())if(this['_itemIsContent'](_0x2b8e84))return!0x0;return!0x1;}['_itemIsContent'](_0x302ab7){return _0x302ab7['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x302ab7)&&!_0x302ab7['is']('element','tableCell');}['_trimToContent'](_0x481332){const _0x1dbe04=_0x5af515=>!this['_itemIsContent'](_0x5af515['item']),_0x3f13f4=_0x481332['start']['getLastMatchingPosition'](_0x1dbe04),_0x44b39e=_0x481332['end']['getLastMatchingPosition'](_0x1dbe04,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3f13f4,_0x44b39e);}},di=class extends _0x580aef{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xad3598){super(_0xad3598),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x14a158=this['editor'],_0x35070d=_0x14a158['model']['document']['selection'],_0xfb2df7=_0x488046(()=>this['refreshSelectedViews'](),0xa);_0x35070d['on']('change:range',(_0x259b4c,_0x53bb53)=>{_0x53bb53['directChange']&&(_0xfb2df7['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x14a158['editing']['view']['document'],'change:isFocused',(_0x2968f8,_0x1607a0,_0x34e9aa)=>{_0x34e9aa&&_0xfb2df7();}),this['listenTo'](_0x14a158['ui']['focusTracker'],'change:isFocused',(_0x2ece4f,_0x395b23,_0x290315)=>{_0x290315||this['fire']('blur',{'isAnnotationTracked':_0x2b7a23=>this['_editorAnnotationsData']['has'](_0x2b7a23['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x32b8f6){if(this['_editorAnnotations']['has'](_0x32b8f6['view']))return;this['_editorAnnotations']['add'](_0x32b8f6['view']),this['editor']['ui']['focusTracker']['add'](_0x32b8f6['view']['element']);const _0x44eda7=this['editor']['plugins']['get'](ti);this['listenTo'](_0x44eda7['collection'],'remove',(_0x274b90,_0xefc0fc)=>{this['editor']['ui']['focusTracker']['remove'](_0xefc0fc['view']['element']),this['_editorAnnotations']['delete'](_0xefc0fc['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x10cb26){if('function'!=typeof _0x10cb26)throw new _0x3973a7('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x10cb26);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x426a89,annotations:_0x393c2c}){const _0x52aefb=[],_0x16c83a=this['editor']['model']['document']['selection'],_0x365037=Array['from'](_0x16c83a['getRanges']());for(const [_0x3b5712,_0x5e2a0e]of this['_editorAnnotationsData']){const _0x501bfa=_0x2043df(_0x5e2a0e),_0x7d239a=_0x393c2c['getByInnerView'](_0x3b5712);_0x501bfa&&_0x7d239a&&_0x52aefb['push']({'annotation':_0x7d239a,'range':_0x501bfa});}function _0x2043df(_0x11d8fe){for(const _0x1981ae of _0x11d8fe)for(const _0xa12117 of _0x365037)if(_0x1981ae['containsRange'](_0xa12117,!_0x16c83a['isCollapsed']))return _0x1981ae;return null;}return _0x52aefb['sort']((_0x1180bf,_0x543fcf)=>{const _0x33fd77=_0x1180bf['range'],_0x4a062b=_0x543fcf['range'];if(!_0x33fd77['isEqual'](_0x4a062b)){if(_0x33fd77['containsRange'](_0x4a062b,!0x0))return 0x1;if(_0x4a062b['containsRange'](_0x33fd77,!0x0))return-0x1;}return _0x1180bf['annotation']==_0x426a89?-0x1:_0x543fcf['annotation']==_0x426a89?0x1:0x0;})['map'](_0x19beca=>_0x19beca['annotation']);}get['_editorAnnotationsData'](){const _0x57444f=new Map();for(const _0x25d508 of Array['from'](this['_dataCollectors']))for(const [_0x45a707,_0x24d2de]of _0x25d508())_0x57444f['set'](_0x45a707,_0x24d2de);return _0x57444f;}},li=class extends _0x580aef{['afterInit'](){const _0x459262=this['editor'];_0x459262['plugins']['has']('RestrictedEditingModeEditing')&&_0x459262['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x580aef{constructor(_0x51307c){super(_0x51307c),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2948a0=this['editor'],_0xc0d08c=_0x2948a0['commands']['get']('importWord'),_0x2a4bd2=_0x2948a0['plugins']['get'](_0x29eb39);_0xc0d08c&&(_0xc0d08c['on']('execute',(_0x4614cc,[,_0x21b80a])=>{_0x21b80a['collaboration_features']={'comments':!0x0,'user_id':_0x2a4bd2['me']['id']};},{'priority':_0x454ece['high']+0xa}),this['listenTo'](_0xc0d08c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3b0bbf,_0x5e0ffc){const {comment_threads:_0x285700}=_0x5e0ffc;_0x285700&&_0x285700['forEach'](({thread_id:_0x31e578,comments:_0x19aab4,is_resolved:_0x1fff39})=>{const _0x239045=new Date(),_0x14dc9c=_0x19aab4['map'](({author:_0x213655,content:_0x4bb0e3,created_at:_0x326086})=>({'content':_0x4bb0e3,'authorId':this['editor']['plugins']['get'](_0x29eb39)['me']['id'],'createdAt':_0x239045,'attributes':{'@external':{'authorName':_0x213655,'createdAt':_0x326086?new Date(_0x326086):new Date(),'source':'importWord'}}})),_0x246749=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x246749,'threadId':_0x31e578,'comments':_0x14dc9c,'resolvedAt':_0x1fff39?_0x239045:null});});}},ui=class extends _0x580aef{constructor(_0x57fcba){super(_0x57fcba),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x4c8d37=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4c8d37,'contentInsertion',(_0x54f1f2,_0x412b32)=>this['_removeMarkersWithoutThreads'](_0x412b32['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x408f61){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x408f61;const _0x48c0a2=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5a0b11 of _0x408f61['keys']()){const [_0x57e3ec,_0x30de25]=_0x5a0b11['split'](':');'comment'!=_0x57e3ec||_0x48c0a2['hasCommentThread'](_0x30de25)||_0x408f61['delete'](_0x5a0b11);}return _0x408f61;}['_registerMarkerInClipboardPipeline'](){const _0x1e62ec=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5971db=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5971db&&_0x1e62ec['_registerMarkerToCopy']('comment',_0x5971db);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3bc4b9){switch(_0x3bc4b9){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0xb20474){const _0x1a9cf9=_0xb20474['split'](':');return{'group':_0x1a9cf9[0x0],'id':_0x1a9cf9[0x1],'part':_0x1a9cf9[0x2]};}var pi=class extends _0x580aef{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x481d3d,_0x390c97)=>{if(!_0x390c97['options']['showCommentHighlights'])return null;if(_0x390c97['options']['ignoreResolvedComments']){const {id:_0x248160}=fi(_0x481d3d['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x248160)?.['isResolved']&&_0x481d3d['item'])return _0x390c97['consumable']['consume'](_0x481d3d['item'],'addMarker:'+_0x481d3d['markerName']),_0x390c97['consumable']['consume'](_0x481d3d['item'],'removeMarker:'+_0x481d3d['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x19b2f7=>{_0x19b2f7['on']('addMarker:comment',(_0x1b6bc6,_0x569ea3,_0x2d034f)=>{if(!_0x2d034f['options']['showCommentHighlights'])return;const _0x5a877e=_0x569ea3['item'];if(!_0x5a877e)return;const _0x3f1695=_0x2d034f['mapper']['toViewElement'](_0x5a877e);this['editor']['model']['schema']['isObject'](_0x5a877e)&&_0x3f1695&&!_0x3f1695['getCustomProperty']('widget')&&_0x3f1695['is']('containerElement')&&Ct(_0x3f1695,_0x2d034f['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4efbdc,{writer:_0x466e20,options:_0x45a58d})=>{if(!_0x45a58d['showCommentHighlights'])return null;const _0x2c5cf7=_0x466e20['createContainerElement']('div'),_0x2bf859=_0x466e20['createEmptyElement']('hr');return _0x466e20['addClass']('ck-horizontal-line',_0x2c5cf7),_0x466e20['insert'](_0x466e20['createPositionAt'](_0x2c5cf7,0x0),_0x2bf859),_0x2c5cf7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3ab856,{writer:_0x29b7d9,options:_0xc7e717})=>{if(!_0xc7e717['showCommentHighlights'])return null;const _0x58b399=_0x29b7d9['createContainerElement']('span'),_0x3054ca=_0x29b7d9['createEmptyElement']('img');return _0x29b7d9['addClass']('image-inline',_0x58b399),_0x29b7d9['insert'](_0x29b7d9['createPositionAt'](_0x58b399,0x0),_0x3054ca),_0x58b399;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x190421,{writer:_0x4651d5,options:_0x8ad628})=>{if(_0x8ad628['showCommentHighlights'])return _0x4651d5['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1c68b5,_0x3da35a,_0x36cbbd)=>{_0x36cbbd['options']['showCommentHighlights']&&_0x1c68b5['stop']();},{'priority':'high'});}},wi=class extends _0x580aef{static get['requires'](){return[oi,di,_0x29eb39,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2d7218){super(_0x2d7218),this['set']('isThreadsLoadingPaused',!0x0),_0x2d7218['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3c760e,_0x24333d,_0x5c3f52,_0x1da73f)=>{const _0x3c9858=_0x2d7218['plugins']['get'](oi),_0x571d9b=_0x5c3f52?fi(_0x5c3f52)['id']:null;_0x2d7218['model']['change'](()=>{if(_0x571d9b){const _0x14cdff=this['getAllMarkersForId'](_0x571d9b);for(const _0x31224d of _0x14cdff)_0x2d7218['editing']['reconvertMarker'](_0x31224d);}if(_0x1da73f){const {id:_0x4b3ead}=fi(_0x1da73f),_0x2c8da4=_0x3c9858['getCommentThread'](_0x4b3ead);if(_0x2c8da4&&_0x2c8da4['unlinkedAt'])return;if(_0x2c8da4&&!_0x2c8da4['isAttached'])return;const _0x21a2ea=this['getAllMarkersForId'](_0x4b3ead);for(const _0x49cc84 of _0x21a2ea)_0x2d7218['editing']['reconvertMarker'](_0x49cc84);}}),_0x571d9b&&this['scrollToThreadMarker'](_0x571d9b);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2f8c10=this['editor'],_0x32d2f3=_0x2f8c10['plugins']['get'](oi),_0x30ef1b=_0x2f8c10['config']['get']('collaboration.channelId'),_0x30def9=_0x32d2f3['getCommentThreads']()['filter'](_0x41d47e=>_0x41d47e['channelId']!==_0x30ef1b);_0x2f8c10['commands']['add']('addCommentThread',new ci(_0x2f8c10)),this['listenTo'](_0x2f8c10,'change:isReadOnly',(_0x1b5491,_0x4dd554,_0x1f8b90)=>{_0x32d2f3['switchReadOnly'](_0x1f8b90,_0x2f8c10['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x32d2f3,gi('addCommentThread',_0x30ef1b),(_0x21f347,{threadId:_0x42f755})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x42f755)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x42f755);}),this['listenTo'](_0x32d2f3,gi('removeCommentThread',_0x30ef1b),(_0x57cd01,{threadId:_0xe3cc8a})=>{_0x2f8c10['model']['enqueueChange']({'isUndoable':!0x1},_0x114a64=>{const _0x3b34a9=this['getAllMarkersForId'](_0xe3cc8a);for(const _0x4797cf of _0x3b34a9)_0x114a64['removeMarker'](_0x4797cf);});}),this['listenTo'](_0x32d2f3,gi('resolveCommentThread',_0x30ef1b),(_0x10ab4a,{threadId:_0x2a3c22})=>{this['_reconvertMarkers'](_0x2a3c22);const _0x573646=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x573646['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2a3c22)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x32d2f3,gi('reopenCommentThread',_0x30ef1b),(_0x4def81,{threadId:_0x500f5f})=>{this['_reconvertMarkers'](_0x500f5f);},{'priority':'low'}),this['listenTo'](_0x32d2f3,gi('addComment',_0x30ef1b),(_0x3b4d72,{threadId:_0x210dfa,isFromAdapter:_0x4e65f0})=>{const _0x5183c7=this['getAllMarkersForId'](_0x210dfa);!_0x4e65f0&&0x0!=_0x5183c7['length']&&_0x32d2f3['hasCommentThread'](_0x210dfa)&&0x1===_0x32d2f3['getCommentThread'](_0x210dfa)['length']&&_0x2f8c10['model']['enqueueChange']({'isUndoable':!0x1},_0x47330e=>{for(const _0x4be70f of _0x5183c7)_0x47330e['updateMarker'](_0x4be70f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x30def9);}['afterInit'](){!async function(_0x57c772){const _0x4581ac='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x55865f=0x78e58,_0x3397e9=window['Date']['now'](),_0x807ae8=_0x57c772['editor'],_0x52bd34=new window['Promise'](_0x2413e7=>{_0x807ae8['once']('ready',_0x2413e7);}),_0x4e49e7={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5e71d3=_0x807ae8['config']['get']('licenseKey');async function _0x5b0ea5(){let _0x441da0,_0x5aa7dc=null,_0x369b67=null;try{return'GPL'==_0x5e71d3?'NotAllowed':(_0x441da0=_0x4fcdf1(),_0x441da0?(_0x441da0['usageEndpoint']&&(_0x369b67=_0x57c05b(_0x441da0['usageEndpoint'],_0x441da0['jti'])),await _0x34584d()?_0x345fa1()?_0x1eb3f0()?'Expired':_0x2bcaf8()?('evaluation'==_0x441da0['licenseType']&&(_0x5aa7dc=_0x2ac3ff('EvaluationLimit')),await _0x282795()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1eb3f0(){const _0x7284aa=['evaluation','trial']['includes'](_0x441da0['licenseType'])?_0x3397e9/0x3e8:0xe10*_0x55865f;return _0x441da0['exp']<_0x7284aa;}function _0x345fa1(){const _0x4982aa=_0x441da0['features'];if(!_0x4982aa)return!0x1;if(_0x4982aa['includes']('*'))return!0x0;if(_0x4982aa['includes']('CMT'))return!0x0;if(_0x4982aa['includes']('TRILIUM')&&_0x1cd196())return!0x0;if(_0x4982aa['includes']('RCMT')){if(_0x587ad3())return!0x0;if(_0x2b34b3()||_0x1b3953())return!0x0;}return!0x1;}function _0x2bcaf8(){const _0x7316e3=_0x441da0['licensedHosts'];if(!_0x7316e3||0x0==_0x7316e3['length'])return!0x0;const {hostname:_0x88ecb6}=new URL(window['location']['href']);if(_0x7316e3['includes'](_0x88ecb6))return!0x0;const _0x3ab719=_0x88ecb6['split']('.');return _0x7316e3['filter'](_0x1db525=>_0x1db525['includes']('*'))['map'](_0x19bbe2=>_0x19bbe2['split']('.'))['filter'](_0x53e09a=>_0x53e09a['length']<=_0x3ab719['length'])['map'](_0x508a28=>Array(_0x3ab719['length']-_0x508a28['length'])['fill']('*'===_0x508a28[0x0]?'*':'')['concat'](_0x508a28))['some'](_0x514c79=>_0x3ab719['every']((_0x349e38,_0x228e13)=>_0x514c79[_0x228e13]===_0x349e38||'*'===_0x514c79[_0x228e13]));}function _0x282795(){return _0x5aa7dc&&_0x369b67?new window['Promise']((_0x35afe0,_0x511825)=>{_0x5aa7dc['then'](_0x35afe0,_0x511825),_0x369b67['then'](_0xd75116=>{'Valid'!=_0xd75116&&_0x35afe0(_0xd75116);},_0x511825);}):_0x5aa7dc||_0x369b67||'Valid';}}function _0x57c05b(_0x5a4e93,_0x5144fb){return new window['Promise'](_0x5d5536=>{if(_0x397633())return _0x5d5536('Valid');_0x3a6023(),_0x807ae8['decorate']('_sendUsageRequest');let _0xf364f7=!0x1;const _0x2d0917=_0x228023();function _0x547d5e(_0xa61184){return!!_0xa61184&&('object'==typeof _0xa61184||'function'==typeof _0xa61184)&&'function'==typeof _0xa61184['then']&&'function'==typeof _0xa61184['catch'];}function _0x274598(_0x3c56cf){_0x302c84(_0x3c56cf)['then'](_0x3b3bef=>_0x3b3bef&&'ok'==_0x3b3bef['status']?_0x1510bb(_0xa29369(_0x2d0917+_0x5144fb))!=_0x3b3bef['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x547618=>(_0x358ef1(),_0x547618),()=>{const _0x404678=_0x3e36b9();return null==_0x404678?(_0x358ef1(),'Valid'):_0x3397e9-_0x404678>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5d5536)['catch'](()=>{_0x5d5536('UsageLimit');});const _0x64a7ef=0x36ee80;function _0x358ef1(){const _0x11bd73='llct-'+_0x1510bb(_0xa29369(_0x5a4e93)),_0x46a05c=_0x443bbb(_0x1510bb(window['Math']['ceil'](_0x3397e9/_0x64a7ef)));window['localStorage']['setItem'](_0x11bd73,_0x46a05c);}function _0x3e36b9(){const _0xd74521='llct-'+_0x1510bb(_0xa29369(_0x5a4e93)),_0x58e6b4=window['localStorage']['getItem'](_0xd74521);return _0x58e6b4?window['parseInt'](_0x443bbb(_0x58e6b4),0x10)*_0x64a7ef:null;}function _0x302c84(_0x241efb){return new window['Promise']((_0x356643,_0x7699ce)=>{_0x241efb['then'](_0x356643,_0x7699ce),window['setTimeout'](_0x7699ce,0x1d4c0);});}}_0x807ae8['on']('_sendUsageRequest',(_0x47726d,_0xf7a26c)=>{if(_0xf7a26c[0x0]!=_0x5a4e93)return _0x5d5536('UsageLimit');_0xf7a26c[0x1]={..._0xf7a26c[0x1],'requestId':_0x2d0917};},{'priority':'high'}),_0x807ae8['on']('_sendUsageRequest',_0x1c5fca=>{_0x547d5e(_0x1c5fca['return'])&&(_0xf364f7=!0x0,_0x274598(_0x1c5fca['return']));},{'priority':'low'}),_0x52bd34['then'](()=>{_0xf364f7||_0x5d5536('UsageLimit');});});function _0x397633(){return'auto'==_0x807ae8['editing']['view']['_overlayModeHint'];}function _0x3a6023(){_0x807ae8['editing']['view']['_overlayModeHint']='auto';}}function _0x2ac3ff(_0x30af07){const _0x12460b=[new window['Promise'](_0x38d551=>setTimeout(_0x38d551,0x93ecc)),_0x52bd34['then'](()=>new window['Promise'](_0x5f1cda=>{let _0x402470=0x0;_0x807ae8['model']['on']('applyOperation',(_0x28fa73,_0x56562b)=>{_0x56562b[0x0]['isDocumentOperation']&&_0x402470++,0x5e8==_0x402470&&(_0x5f1cda(),_0x28fa73['off']());});}))];return window['Promise']['race'](_0x12460b)['then'](()=>_0x30af07);}async function _0x46e5ce(){await _0x52bd34,_0x807ae8['model']['change']=_0x367c34,_0x807ae8['model']['enqueueChange']=_0x367c34,_0x807ae8['enableReadOnlyMode']('model');}function _0x1cd196(){return window['glob']&&window['glob']['triliumVersion'];}function _0x587ad3(){return _0x309677('WebSocketGateway')&&'connected'==_0x239b8a('WebSocketGateway')['state'];}function _0x2b34b3(){return _0x309677('RevisionViewerIntegration');}function _0x1b3953(){return _0x309677('TrackChangesDataGetter');}function _0x312667(_0x305fd2){const _0x12e180=_0x45108d();_0x807ae8[_0x12e180]='commentsLicenseKey'+_0x305fd2,'Valid'!=_0x305fd2&&_0x46e5ce();}function _0x45108d(){const _0x12b92=window['String'](window['performance']['now']())['replace']('.','');let _0x1a80cc='K';for(let _0x3d3445=0x0;_0x3d3445<_0x12b92['length'];_0x3d3445+=0x2){let _0x2adb03=window['parseInt'](_0x12b92['substring'](_0x3d3445,_0x3d3445+0x2));_0x2adb03>=0x3e&&(_0x2adb03-=0x3e),_0x1a80cc+=_0x4581ac[_0x2adb03];}return _0x1a80cc;}function _0x4fcdf1(){const _0x58d97a=_0x5e71d3['split']('.');if(0x3!=_0x58d97a['length'])return null;return _0x4d375b(_0x58d97a[0x1]);function _0x4d375b(_0x2f67ea){const _0x1e0e1b=_0x30b7b3(_0x2f67ea);return _0x1e0e1b&&_0x5c706a()?_0x1e0e1b:null;function _0x5c706a(){const _0x4196c3=_0x1e0e1b['jti'],_0x39dc00=window['parseInt'](_0x4196c3['substring'](_0x4196c3['length']-0x8),0x10),_0x11b029={..._0x1e0e1b,'jti':_0x4196c3['substring'](0x0,_0x4196c3['length']-0x8)};return delete _0x11b029['vc'],_0xa29369(_0x11b029)==_0x39dc00;}}}async function _0x34584d(){let _0x4ef82f=!0x0;try{const [_0xd4ed3a,_0x5b40ba,_0x3569b7]=_0x5e71d3['split']('.');return _0x14b1c5(_0xd4ed3a),await _0x48448f(_0xd4ed3a,_0x5b40ba,_0x3569b7),_0x4ef82f;}catch{return!0x1;}function _0x14b1c5(_0x11da0d){const _0x5bd00c=_0x30b7b3(_0x11da0d);_0x5bd00c&&'ES256'==_0x5bd00c['alg']||(_0x4ef82f=!0x1);}async function _0x48448f(_0xb2b6c2,_0x7de9fe,_0x5453d0){const _0x30cf9b=window['Uint8Array']['from'](_0x109a68(_0x5453d0),_0x21512d=>_0x21512d['charCodeAt'](0x0)),_0x64be48=new window['TextEncoder']()['encode'](_0xb2b6c2+'.'+_0x7de9fe),_0x476daa=window['crypto']['subtle'];if(!_0x476daa)return;const _0x5dc8db=await _0x476daa['importKey']('jwk',_0x4e49e7,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x476daa['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x5dc8db,_0x30cf9b,_0x64be48)||(_0x4ef82f=!0x1);}}function _0x30b7b3(_0x115c60){return _0x115c60['startsWith']('ey')?JSON['parse'](_0x109a68(_0x115c60)):null;}function _0x109a68(_0x1b3cab){return window['atob'](_0x1b3cab['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xa29369(_0x147c97){let _0x30bc71=0x1505;function _0x36c096(_0x4fee32){for(let _0x1501da=0x0;_0x1501da<_0x4fee32['length'];_0x1501da++){const _0x16f838=_0x4fee32['charCodeAt'](_0x1501da);_0x30bc71=(_0x30bc71<<0x5)+_0x30bc71+_0x16f838,_0x30bc71&=_0x30bc71;}}function _0x27c1e6(_0x39fe2f){Array['isArray'](_0x39fe2f)?_0x39fe2f['forEach'](_0x27c1e6):_0x39fe2f&&'object'==typeof _0x39fe2f?Object['entries'](_0x39fe2f)['sort']()['forEach'](([_0x534adb,_0x2ed328])=>{_0x36c096(_0x534adb),_0x27c1e6(_0x2ed328);}):_0x36c096(window['String'](_0x39fe2f));}return _0x27c1e6(_0x147c97),_0x30bc71>>>0x0;}function _0x1510bb(_0x815ba2){return _0x815ba2['toString'](0x10)['padStart'](0x8,'0');}function _0x443bbb(_0x473b0e){return _0x473b0e['split']('')['reverse']()['join']('');}function _0x309677(_0x56396f){return _0x807ae8['plugins']['has'](_0x56396f);}function _0x239b8a(_0x1c788e){return _0x807ae8['plugins']['get'](_0x1c788e);}function _0x367c34(){}_0x312667(await _0x5b0ea5());}(this);}['destroy'](){const _0x36f777=this['editor']['plugins']['get'](oi),_0xc3e13b=this['editor']['config']['get']('collaboration.channelId');for(const _0x16031c of _0x36f777['getCommentThreads']({'channelId':_0xc3e13b}))_0x36f777['_detachCommentThread'](_0x16031c['id']),_0x36f777['_threads']['delete'](_0x16031c['id']);super['destroy']();}['hasMarkerForId'](_0x8235db){return this['getAllMarkersForId'](_0x8235db)['length']>0x0;}['getAllMarkersForId'](_0x228719){const _0x47ef8e=[];for(const _0x15a264 of this['editor']['model']['markers'])_0x15a264['name']['startsWith']('comment:'+_0x228719)&&_0x47ef8e['push'](_0x15a264);return _0x47ef8e;}['scrollToThreadMarker'](_0x20bf3a){setTimeout(()=>{const _0x2b8aed=this['_getTargetForId'](_0x20bf3a);_0x2b8aed&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x20bf3a&&_0x3650d4({'target':_0x2b8aed[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5cdc32){this['editor']['model']['change'](()=>{for(const _0x40f0fa of this['getAllMarkersForId'](_0x5cdc32))this['editor']['editing']['reconvertMarker'](_0x40f0fa);});}['_attachArchivedThread'](_0x4cb7f1){const _0x3ccd95=this['editor']['plugins']['get'](oi),_0x22304f=this['editor']['plugins']['get'](di),_0x3683e0=_0x3ccd95['getCommentThread'](_0x4cb7f1);if(!_0x3683e0['isAttached']){const _0x317a02=_0x3683e0['attachTo'](()=>this['_getTargetForId'](_0x3683e0['id']));_0x22304f['registerAnnotation'](_0x317a02),_0x3683e0['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x275f09=this['editor'],_0x556583=_0x275f09['plugins']['get'](_0x29eb39);_0x275f09['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x37d592,_0x5a105e)=>{const {id:_0x4a77bf}=fi(_0x37d592['markerName']),_0x101175=_0x275f09['plugins']['get'](oi)['getCommentThread'](_0x4a77bf),_0xe9c135=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4a77bf;let _0x23f946;if(_0x101175&&_0x101175['isResolved']&&!_0xe9c135&&_0x37d592['item'])return _0x5a105e['consumable']['consume'](_0x37d592['item'],'addMarker:'+_0x37d592['markerName']),_0x5a105e['consumable']['consume'](_0x37d592['item'],'removeMarker:'+_0x37d592['markerName']),null;const _0x4d3952=['ck-comment-marker'];return _0xe9c135&&_0x4d3952['push']('ck-comment-marker--active'),_0x23f946=_0x101175?.['length']?_0x101175['comments']['first']['author']['id']:_0x556583['me']['id'],{'classes':_0x4d3952,'attributes':{'data-comment':_0x4a77bf,'data-author-id':_0x23f946}};}}),_0x275f09['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3b85cb,{options:_0x4396ff})=>{if(_0x4396ff['showCommentHighlights'])return null;const _0x1bb2d7=_0x275f09['plugins']['get'](oi),_0x282a6f=_0x275f09['model']['markers']['get'](_0x3b85cb),{id:_0x4e4729,part:_0x172891}=fi(_0x3b85cb);return _0x282a6f&&!_0x282a6f['affectsData']||_0x4396ff['ignoreResolvedComments']&&_0x1bb2d7['getCommentThread'](_0x4e4729)?.['isResolved']?null:{'group':'comment','name':_0x172891?_0x4e4729+':'+_0x172891:_0x4e4729};}}),_0x275f09['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3c9b39,{writer:_0x42fc13})=>_0x42fc13['createElement']('$marker',{'data-name':'comment:'+_0x3c9b39['getAttribute']('id')})}),_0x275f09['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4f79e7=this['editor'],_0x5c3316=_0x4f79e7['plugins']['get'](oi),_0x579d8d=new Set(),_0x2c1863=new Set();_0x4f79e7['model']['document']['registerPostFixer'](_0x279f2a=>{let _0x32e734=!0x1;for(const {name:_0x730740,data:_0x31c3b0}of _0x4f79e7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x50c848,id:_0xa9862c}=fi(_0x730740);let _0x196dd1=_0x31c3b0['newRange'];if('comment'!==_0x50c848||!_0x196dd1)continue;const _0xd98212='$graveyard'===_0x196dd1['root']['rootName'];_0xd98212||(_0x196dd1=_i(_0x196dd1,_0x4f79e7['model']),!_0x196dd1||_0x196dd1['isCollapsed']||!_0x31c3b0['newRange']||_0x196dd1['isEqual'](_0x31c3b0['newRange']))?_0x4f79e7['model']['hasContent'](_0x196dd1)&&!_0xd98212?this['isThreadsLoadingPaused']?_0x579d8d['add'](_0x730740):this['_handleThreadMarker'](_0x730740,_0xa9862c):(_0x2c1863['add'](_0x730740),_0x579d8d['delete'](_0x730740),_0x279f2a['removeMarker'](_0x730740),_0x32e734=!0x0):(_0x279f2a['updateMarker'](_0x730740,{'range':_0x196dd1}),_0x32e734=!0x0);}return _0x32e734;}),this['on']('change:isThreadsLoadingPaused',(_0x2a4ce0,_0x3f3076,_0x3e0d3a)=>{if(!_0x3e0d3a&&_0x579d8d['size'])for(const _0x448efd of _0x579d8d){const {id:_0x536f63}=fi(_0x448efd);_0x579d8d['delete'](_0x448efd),_0x4f79e7['model']['markers']['get'](_0x448efd)&&this['_handleThreadMarker'](_0x448efd,_0x536f63);}}),this['listenTo'](_0x4f79e7['model']['document'],'change',()=>{for(const {name:_0x25789c,data:{newRange:_0x3e7b2c}}of _0x4f79e7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x564cc0,id:_0x2ba1a4}=fi(_0x25789c);if('comment'!==_0x564cc0)continue;const _0x190316=_0x5c3316['getCommentThread'](_0x2ba1a4),_0x25d8e1=this['hasMarkerForId'](_0x2ba1a4);_0x190316&&(!_0x190316['_hasTargetInContent']&&_0x3e7b2c&&_0x4f79e7['editing']['view']['once']('render',()=>{const _0x10adcb=_0x4f79e7['plugins']['get'](ti),_0x50c95f=_0x5c3316['_threadToController']['get'](_0x190316)['view'];_0x10adcb['getByInnerView'](_0x50c95f)['refreshVisibility']();},{'priority':'low'}),_0x190316['_hasTargetInContent']=_0x25d8e1||!!_0x3e7b2c),_0x3e7b2c||(_0x2c1863['add'](_0x25789c),_0x579d8d['delete'](_0x25789c));}for(const _0x28d2c0 of _0x2c1863){const {id:_0x70b39f}=fi(_0x28d2c0),_0xf02f1=_0x5c3316['getCommentThread'](_0x70b39f);if(_0x579d8d['delete'](_0x28d2c0),!_0xf02f1)continue;const _0x1f0cb4=this['hasMarkerForId'](_0x70b39f);_0x1f0cb4||_0xf02f1['isSubmitted']?_0x1f0cb4||_0xf02f1['unlinkedAt']||_0xf02f1['setUnlinkedAt'](new Date()):_0xf02f1['remove']();}_0x2c1863['clear']();});}['_handleInitialThreads'](_0xfad73b){_0xfad73b['forEach'](_0xdbfa25=>{_0xdbfa25['unlinkedAt']&&this['_attachArchivedThread'](_0xdbfa25['id']);});}['_getTargetForId'](_0x41bddd){const _0x4c02c9=this['editor'],_0x264bce=this['getAllMarkersForId'](_0x41bddd);return _0x1bc54f(_0x4c02c9['editing'],_0x264bce);}['_getTextContext'](_0x33d30f){const _0x3e4bd0=this['getAllMarkersForId'](_0x33d30f);let _0x1b203c='',_0x4b5ef4=!0x1;for(const _0x58ba9c of _0x3e4bd0){const _0x5c9272=_0x58ba9c['getRange']();for(const _0x2b9266 of Array['from'](_0x5c9272['getItems']()))_0x2b9266['is']('$textProxy')?(_0x1b203c&&_0x4b5ef4&&(_0x1b203c+='\x20',_0x4b5ef4=!0x1),_0x1b203c+=_0x2b9266['data']):_0x4b5ef4=!0x0;_0x4b5ef4=!0x0;}return _0x1b203c['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2b41c5,_0xdcb77d){const _0x2c56d7=this['editor'],_0x4018e4=_0x2c56d7['plugins']['get'](oi);let _0x47d979=_0x4018e4['getCommentThread'](_0xdcb77d);const _0x196a6e=_0x2c56d7['config']['get']('collaboration.channelId'),_0x2c6983=_0x2c56d7['plugins']['get'](di);return _0x47d979&&(_0x47d979['unlinkedAt']&&_0x47d979['setUnlinkedAt'](null),_0x47d979['isAttached'])||(this['getAllMarkersForId'](_0xdcb77d)[0x0]['managedUsingOperations']?_0x4018e4['fetchCommentThread']({'channelId':_0x196a6e,'threadId':_0xdcb77d})['then'](_0x3c7776=>{if('destroyed'!==_0x2c56d7['state']){if(_0x47d979=_0x3c7776,_0x47d979&&!_0x47d979['isAttached']){const _0x1f2b78=_0x47d979['attachTo'](()=>this['_getTargetForId'](_0xdcb77d));_0x2c6983['registerAnnotation'](_0x1f2b78),_0x47d979['isResolved']&&this['_reconvertMarkers'](_0xdcb77d);}else{if(!_0x47d979){const _0x219d23=this['getAllMarkersForId'](_0xdcb77d);_0x2c56d7['model']['change'](_0xdf2eee=>{for(const _0x1a0437 of _0x219d23)_0xdf2eee['removeMarker'](_0x1a0437);});}}}}):_0x2c56d7['editing']['view']['once']('render',()=>{if(_0x4018e4['getCommentThread'](_0xdcb77d))return;const _0xbee152=_0x2c56d7['plugins']['get'](ti);_0x47d979=_0x4018e4['openNewCommentThread']({'channelId':_0x196a6e,'threadId':_0xdcb77d,'target':()=>this['_getTargetForId'](_0xdcb77d),'context':{'type':'text','value':this['_getTextContext'](_0xdcb77d)}});const _0x3ace55=_0x4018e4['_threadToController']['get'](_0x47d979)['view'],_0x1b1b03=_0xbee152['getByInnerView'](_0x3ace55);_0x1b1b03&&_0x2c6983['registerAnnotation'](_0x1b1b03);},{'priority':'low'})),_0x47d979;}['_handleThreadMarker'](_0x20233b,_0x3b3a97){const _0x580706=this['_attachMarkerToThread'](_0x20233b,_0x3b3a97);_0x580706&&!_0x580706['context']&&_0x580706['setContext']({'type':'text','value':this['_getTextContext'](_0x3b3a97)});}['_initAriaMarkerChangeAnnouncements'](){const _0x534f2b=this['editor'];_0x969ef6(_0x534f2b['model'],({left:_0x177a55,entered:_0x2dd665})=>{for(const _0x563d87 of _0x177a55)if(Ai(_0x563d87)){_0x534f2b['ui']['ariaLiveAnnouncer']['announce'](Et(_0x534f2b['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5de91c of _0x2dd665)if(Ai(_0x5de91c)){_0x534f2b['ui']['ariaLiveAnnouncer']['announce'](Et(_0x534f2b['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x470c6f(_0x2f877e)));break;}});}};function gi(_0x419803,_0x501a70){return _0x501a70?_0x419803+':'+_0x501a70:_0x419803;}function _i(_0x541e01,_0xc41390){const _0xcfb923=_0xc41390['schema'],_0x8043ee=_0xc41390['createRange'](_0x541e01['start']);for(const _0x597805 of _0x541e01['getWalker']()){const {type:_0x4748f7,item:_0x844bcf,nextPosition:_0x35ba42}=_0x597805;if('text'===_0x4748f7||_0xcfb923['isObject'](_0x844bcf)){const _0x44528f=_0xc41390['createPositionBefore'](_0x844bcf);_0x8043ee['isCollapsed']&&(_0x8043ee['start']=_0x44528f),_0x8043ee['end']=_0x35ba42;}}return _0x8043ee;}function Ai(_0x22cd68){return'comment'===fi(_0x22cd68['name'])['group'];}var vi=class extends _0x580aef{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0x439616=this['editor'],_0x247edf=_0x439616['plugins']['get'](oi),_0xc3b06d=_0x439616['plugins']['get'](wi),_0x29812e=_0x439616['plugins']['get'](ti),_0x451944=_0x439616['plugins']['get'](di);_0x439616['ui']['componentFactory']['add']('comment',()=>{const _0x14b747=this['_createUIButton'](_0x352ef3);return _0x14b747['tooltip']=!0x0,_0x14b747;}),_0x439616['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x451944['addSourceCollector'](()=>{const _0x6c95a0=[];for(const [_0x46850e,_0x333d9a]of _0x247edf['_threadToController']){const _0x43bb46=_0xc3b06d['getAllMarkersForId'](_0x46850e['id']),_0x341de0=_0x43bb46['map'](_0x5125b4=>_0x5125b4['getRange']());_0x43bb46['length']>0x0&&_0x6c95a0['push']([_0x333d9a['view'],_0x341de0]);}return _0x6c95a0;}),this['listenTo'](_0x29812e,'change:activeAnnotations',(_0x5c8da1,_0x26c8ee,_0x4731a4)=>{const _0x226399=Array['from'](_0x4731a4)['map'](_0x4ed1ac=>_0x4ed1ac['innerView'])['find'](_0x5515c4=>_0x247edf['_viewToController']['has'](_0x5515c4));if(!_0x226399)return void(_0xc3b06d['activeMarker']=null);const _0x38fdbb=_0x247edf['_viewToController']['get'](_0x226399)['model']['id'],_0x1192fc='comment:'+_0x38fdbb;_0x38fdbb&&_0xc3b06d['hasMarkerForId'](_0x38fdbb)?_0xc3b06d['activeMarker']=_0x1192fc:_0xc3b06d['activeMarker']&&(_0xc3b06d['activeMarker']=null);}),this['listenTo'](_0x247edf,'removeCommentThread',(_0x3910eb,{threadId:_0x4363e8,isFromAdapter:_0x4e7502})=>{!_0x4e7502&&_0x439616['ui']['focusTracker']['isFocused']&&_0xc3b06d['hasMarkerForId'](_0x4363e8)&&_0x439616['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x247edf,'addComment',(_0x24ab65,{threadId:_0x16cef4,isFromAdapter:_0x45831d})=>{!_0x45831d&&_0xc3b06d['hasMarkerForId'](_0x16cef4)&&_0x247edf['hasCommentThread'](_0x16cef4)&&0x1===_0x247edf['getCommentThread'](_0x16cef4)['length']&&(_0x439616['editing']['view']['focus'](),_0x24ab65['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x16742f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x45e4bf;for(const _0x427f50 in _0x16742f){const _0x20e3ea=_0x427f50,_0x3530f0=_0x16742f[_0x20e3ea];if('commentsLicenseKeyValid'==_0x3530f0||'commentsLicenseKeyInvalid'==_0x3530f0||'commentsLicenseKeyExpired'==_0x3530f0||'commentsLicenseKeyDomainLimit'==_0x3530f0||'commentsLicenseKeyNotAllowed'==_0x3530f0||'commentsLicenseKeyEvaluationLimit'==_0x3530f0||'commentsLicenseKeyUsageLimit'==_0x3530f0){delete _0x16742f[_0x20e3ea],_0x45e4bf=_0x3530f0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x45e4bf&&_0x16742f['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x45e4bf&&_0x16742f['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x45e4bf&&_0x16742f['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x45e4bf&&_0x16742f['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x45e4bf&&_0x16742f['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x45e4bf&&_0x16742f['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xff2d1d){const _0x1d98ee=this['editor'],_0x189a46=new _0xff2d1d(_0x1d98ee['locale']),_0x1500df=_0x1d98ee['commands']['get']('addCommentThread');return _0x189a46['set']({'label':Et(_0x1d98ee['locale'],'Comment'),'icon':_0x52d241}),_0x189a46['bind']('isEnabled')['to'](_0x1500df,'isEnabled',_0x1500df,'hasContent',(_0x26d5be,_0xfe102d)=>_0x26d5be&&_0xfe102d),this['listenTo'](_0x189a46,'execute',()=>{_0x1500df['execute']();}),_0x189a46;}},yi=class extends _0x580aef{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x3c5a05){super(_0x3c5a05),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1b8bb4,_0x5a8c4c,_0x5162ee)=>{_0x5162ee?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1f251e,_0x134a1d]of this['editor']['commands'])_0x134a1d['affectsData']&&'addCommentThread'!==_0x1f251e&&_0x134a1d['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 _0x1cef63=this['editor']['editing']['view']['document'];this['listenTo'](_0x1cef63,'cut',_0x3fd5b9=>_0x3fd5b9['stop'](),{'priority':'highest'}),this['listenTo'](_0x1cef63,'clipboardInput',_0x3b8d43=>_0x3b8d43['stop'](),{'priority':'highest'}),this['listenTo'](_0x1cef63,'delete',_0x4138c2=>_0x4138c2['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x413022,_0x3705a9]of this['editor']['commands'])_0x3705a9['affectsData']&&'addCommentThread'!==_0x413022&&_0x3705a9['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']);}},Ti=class extends _0x584f12{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x558930){super(_0x558930),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x127e7d=this['context']['plugins']['get'](ti);this['listenTo'](_0x127e7d,'_activateAnnotation',(_0x1acde2,_0x24ec4c)=>{for(const _0x17326d of this['activeUIs']){const _0x24e9a4=this['_uis']['get'](_0x17326d);(0x0,this['uisData']['get'](_0x17326d)['filter'])(_0x24ec4c)&&_0x24e9a4['setActiveAnnotation'](_0x24ec4c);}}),this['listenTo'](_0x127e7d,'_deactivateAllAnnotations',()=>{for(const _0x1e548c of this['activeUIs'])this['_uis']['get'](_0x1e548c)['setActiveAnnotation'](null);}),this['listenTo'](_0x127e7d['_visibleAnnotations'],'add',(_0x5e3339,_0x4c989e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4c989e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x21ad2c){return this['activeUIs']['has'](_0x21ad2c);}['activate'](_0x8c089e,_0xf98d30=this['defaultFilter']){const _0x1b7531=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x8c089e))throw new _0x3973a7('annotationsuis-missing-ui',this,{'uiName':_0x8c089e});this['isActive'](_0x8c089e)&&this['deactivate'](_0x8c089e),this['activeUIs']['add'](_0x8c089e);const _0x29af05=new Jt();Qt({'source':_0x1b7531['_visibleAnnotations'],'target':_0x29af05,'filter':_0xf98d30}),this['uisData']['set'](_0x8c089e,{'collection':_0x29af05,'filter':_0xf98d30});const _0x33a382=this['_uis']['get'](_0x8c089e);_0x33a382['attach'](_0x29af05),this['listenTo'](_0x33a382,'change:activeAnnotation',(_0x4caa54,_0x47401b,_0x22279f,_0x4cb0ef)=>{_0x4cb0ef&&_0x1b7531['_removeActiveAnnotation'](_0x4cb0ef),_0x22279f&&_0x1b7531['_addActiveAnnotation'](_0x22279f);});}['deactivate'](_0x39dd9e){if(this['activeUIs']['delete'](_0x39dd9e),!this['_uis']['has'](_0x39dd9e))throw new _0x3973a7('annotationsuis-missing-ui',this,{'uiName':_0x39dd9e});const _0xa60959=this['_uis']['get'](_0x39dd9e);_0xa60959['detach'](),this['stopListening'](_0xa60959),this['uisData']['get'](_0x39dd9e)['collection']['destroy'](),this['uisData']['delete'](_0x39dd9e);}['switchTo'](_0x4c4f28){if(!this['_uis']['has'](_0x4c4f28))throw new _0x3973a7('annotationsuis-missing-ui',this,{'uiName':_0x4c4f28});const _0x5473f4=this['context']['plugins']['get'](ti),_0x8ba770=Array['from'](_0x5473f4['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4c4f28);const _0x42f150=this['_uis']['get'](_0x4c4f28);_0x42f150['setActiveAnnotation'](_0x8ba770),_0x42f150['_setSelectedAnnotations']&&_0x8ba770&&_0x42f150['_setSelectedAnnotations']([_0x8ba770]);}['deactivateAll'](){for(const _0x226fb1 of this['activeUIs'])this['deactivate'](_0x226fb1);}['register'](_0x2ec7b9,_0x5bedc3){if(this['_uis']['has'](_0x2ec7b9))throw new _0x3973a7('annotationsuis-register-already-registered');if('function'!=typeof _0x5bedc3['attach']||'function'!=typeof _0x5bedc3['detach']||'function'!=typeof _0x5bedc3['setActiveAnnotation'])throw new _0x3973a7('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2ec7b9,_0x5bedc3);}['refilterAnnotations'](){const _0x2898f1=this['context']['plugins']['get'](ti)['collection'],_0x246215=new Map(),_0x3013b3=Array['from'](this['activeUIs']);for(const _0x325f86 of this['activeUIs']){const _0x5203db=this['uisData']['get'](_0x325f86)['collection'];for(const _0x41f40c of _0x5203db)_0x246215['set'](_0x41f40c,_0x325f86);}for(const _0x4bed5e of _0x2898f1){const _0x2dd5e6=_0x246215['get'](_0x4bed5e);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4bed5e);const _0xb97570=_0x3013b3['find'](_0x4a789f=>this['uisData']['get'](_0x4a789f)['filter'](_0x4bed5e));_0x2dd5e6!==_0xb97570&&(_0x2dd5e6&&this['uisData']['get'](_0x2dd5e6)['collection']['remove'](_0x4bed5e),_0xb97570&&this['uisData']['get'](_0xb97570)['collection']['add'](_0x4bed5e));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x494769){const _0x5bca94=[];for(const _0x5cae09 of this['activeUIs']){(0x0,this['uisData']['get'](_0x5cae09)['filter'])(_0x494769)&&_0x5bca94['push'](_0x5cae09);}if(_0x5bca94['length']>0x1)throw new _0x3973a7('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5bca94,'annotationType':_0x494769['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x3b2cc3('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5ba3f0){super(_0x5ba3f0),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5137cf,_0xda0773)=>_0x5137cf+_0xda0773),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x352a08=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x352a08['to']('isAnimationDisabled',_0x202280=>_0x202280?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x352a08['to']('top',_0x5c89c0=>bi(_0x5c89c0))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1fb676=this['element']['clientHeight'];_0x1fb676&&(this['height']=_0x1fb676);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x584f12{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c92ab){super(_0x2c92ab),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 _0x1f017e=this['context']['config']['get']('sidebar.container');_0x1f017e&&this['setContainer'](_0x1f017e);}['setContainer'](_0x3de092){if(!Oi(_0x3de092))throw new _0x3973a7('sidebar-setcontainer-invalid-element');this['container']=_0x3de092;}['_attachToContainer']({viewClass:_0x5d06b2='',spaceBetweenItems:_0x126e1e=0x19}={}){if(!Oi(this['container']))throw new _0x3973a7('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5d06b2,this['_spaceBetweenItems']=_0x126e1e;}['rearrange']({removedAnnotation:_0xb88bda,previousAnnotation:_0x2bdb37,nextAnnotation:_0x292400}){const _0x589a14=this['getSidebarItemView'](_0xb88bda);this['view']['list']['remove'](_0x589a14),this['_destroySidebarItemView'](_0xb88bda),_0x2bdb37&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2bdb37)),_0x292400&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x292400)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x393cbe,activatedAnnotation:_0x4dbea9,disableAnimationOnActivatedAnnotation:_0x452fa3}){if(this['_activeAnnotation']=_0x4dbea9,_0x393cbe){_0x393cbe['isActive']=!0x1;const _0x58de96=this['getSidebarItemView'](_0x393cbe);_0x58de96&&_0x452fa3&&(_0x58de96['isAnimationDisabled']=!0x1);}if(_0x4dbea9){const _0x4db1d6=this['getSidebarItemView'](_0x4dbea9);_0x4db1d6&&(_0x4dbea9['isActive']=!0x0,_0x452fa3&&(_0x4db1d6['isAnimationDisabled']=!0x0,_0x4db1d6['top']+=0x1),this['_alignToTargetRect'](_0x4db1d6));}}['_detachFromContainer'](_0x4edc83){if(this['view']['element']['remove'](),_0x4edc83){for(const _0x2cdfb3 of _0x4edc83)this['_destroySidebarItemView'](_0x2cdfb3);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x415856,_0x3c9cc9){_0x3c9cc9||(_0x3c9cc9=_0x415856['view']);const _0x29db2f=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x29db2f,_0x415856),this['_annotationToSidebarItemView']['set'](_0x415856,_0x29db2f),_0x29db2f['content']['add'](_0x3c9cc9),this['listenTo'](_0x415856['view'],'change:targetRect',(_0x2cfd5f,_0x332389,_0x2f0f10)=>{const _0x137cec=this['_getTargetTop'](_0x415856,_0x2f0f10);_0x29db2f['_targetTop']!=_0x137cec&&(_0x29db2f['_targetTop']=_0x137cec,this['_setItemTop'](_0x29db2f,_0x137cec));}),this['listenTo'](_0x29db2f,'change:top',()=>{this['_recalculate'](_0x29db2f,'top');}),this['listenTo'](_0x29db2f,'change:bottom',()=>{this['_recalculate'](_0x29db2f,'bottom');}),this['_alignToTargetRect'](_0x29db2f);const _0x13db97=this['_getItemBefore'](_0x29db2f);return _0x13db97&&this['_alignAfterItem'](_0x13db97,_0x29db2f)||this['_alignToTargetRect'](_0x29db2f),this['_updateLastItem'](),this['view']['list']['add'](_0x29db2f),_0x29db2f;}['_alignForTopChange'](_0x358492){if(!_0x358492['content']['length'])return;const _0x2d4b3e=this['_getItemBefore'](_0x358492);if(!_0x2d4b3e)return;const _0x216bf3=this['_sidebarItemViewToAnnotation']['get'](_0x2d4b3e),_0x463484=this['_activeAnnotation'];_0x463484&&_0x463484===_0x216bf3?this['_alignAfterItem'](_0x2d4b3e,_0x358492):this['_alignBeforeItem'](_0x358492,_0x2d4b3e);}['_alignForBottomChange'](_0x255e81){if(!_0x255e81['content']['length'])return;const _0x28a217=this['_getItemAfter'](_0x255e81);if(!_0x28a217)return;const _0x41690f=this['_sidebarItemViewToAnnotation']['get'](_0x28a217),_0x3cb8bf=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x36958d=this['_activeAnnotation'];_0x36958d&&_0x36958d===_0x41690f&&_0x3cb8bf?(this['_alignBeforeItem'](_0x28a217,_0x255e81),this['_alignAfterItem'](_0x255e81,_0x28a217)):_0x36958d&&_0x36958d===_0x41690f?this['_alignBeforeItem'](_0x28a217,_0x255e81):this['_alignAfterItem'](_0x255e81,_0x28a217);}['_recalculate'](_0x464099,_0xebfad7){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2f87c2,changedProp:_0x33458d}of this['_recalculateBuffer'])'top'===_0x33458d?this['_alignForTopChange'](_0x2f87c2):this['_alignForBottomChange'](_0x2f87c2);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x464099,'changedProp':_0xebfad7});}['getSidebarItemView'](_0x1f79db){return this['_annotationToSidebarItemView']['get'](_0x1f79db);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x419d4a){const _0x1402b7=this['getSidebarItemView'](_0x419d4a);this['stopListening'](_0x1402b7),this['stopListening'](_0x419d4a['view']),_0x1402b7['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x419d4a),this['_sidebarItemViewToAnnotation']['delete'](_0x1402b7);}['_createSidebarView'](){const _0x499e10=new Ii(this['context']['locale']);return _0x499e10['render'](),this['on']('change:_lastItem',(_0x52110f,_0x2e602e,_0x327b00,_0x5618f4)=>{_0x5618f4&&_0x499e10['unbind']('minHeight'),_0x327b00?_0x499e10['bind']('minHeight')['to'](_0x327b00,'bottom'):_0x499e10['minHeight']=null;}),_0x499e10;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3c9c18){const _0x31a2f1=this['_sidebarItemViewToAnnotation']['get'](_0x3c9c18),_0x5f711c=_0x31a2f1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x31a2f1)-0x1);return _0x5f711c&&this['getSidebarItemView'](_0x5f711c)||null;}['_getItemAfter'](_0x1c7f7b){const _0x107cc9=this['_sidebarItemViewToAnnotation']['get'](_0x1c7f7b),_0x3fa642=_0x107cc9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x107cc9)+0x1);return _0x3fa642&&this['getSidebarItemView'](_0x3fa642)||null;}['_alignBeforeItem'](_0x5bbe61,_0xeef54a){_0x5bbe61['updateHeight']();const _0x3f41de=Ni(_0xeef54a['bottom']+this['_spaceBetweenItems'],_0x5bbe61['top']);return!!_0x3f41de&&(this['_setItemTop'](_0xeef54a,_0xeef54a['top']-_0x3f41de),!0x0);}['_alignAfterItem'](_0x217d49,_0x5c5332){_0x217d49['updateHeight']();const _0x2321f6=Ni(_0x217d49['bottom']+this['_spaceBetweenItems'],_0x5c5332['top']);return!!_0x2321f6&&(this['_setItemTop'](_0x5c5332,_0x5c5332['top']+_0x2321f6,!0x1),!0x0);}['_alignToTargetRect'](_0x44325f){const _0x82ca5c=this['_sidebarItemViewToAnnotation']['get'](_0x44325f);if(!_0x82ca5c||!_0x82ca5c['target']||!_0x82ca5c['targetRect'])return;const _0x405229=this['_getTargetTop'](_0x82ca5c,_0x82ca5c['targetRect']);this['_setItemTop'](_0x44325f,_0x405229);}['_getTargetTop'](_0x2b3ff1,_0x151181){if(null===_0x151181)return 0x0;if(_0x2b3ff1['target']instanceof _0x3f7499)return _0x151181['top'];{const _0x11bc99=new _0x3f7499(this['view']['element'])['top'];return _0x151181['top']-_0x11bc99;}}['_setItemTop'](_0x1fb9b9,_0x5908b1,_0x53f521=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x53f521&&(_0x5908b1=Math['max'](_0x5908b1,this['_getMaxAvailableTop'](_0x1fb9b9))),_0x1fb9b9['top']=_0x5908b1;}['_getMaxAvailableTop'](_0x46fbd8){let _0x574e24=this['_getItemBefore'](_0x46fbd8),_0x49ce47=0x0;for(;_0x574e24;)_0x574e24['updateHeight'](),_0x49ce47+=this['_spaceBetweenItems']+_0x574e24['height'],_0x574e24=this['_getItemBefore'](_0x574e24);return _0x49ce47;}};function Ni(_0x35595f,_0x419e3f){return Math['max'](_0x35595f-_0x419e3f,0x0);}function Oi(_0x3dadb6){return null!==_0x3dadb6&&'object'==typeof _0x3dadb6&&0x1===_0x3dadb6['nodeType'];}var Mi=class extends _0x584f12{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x231dc3){super(_0x231dc3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x55d760(),this['_refreshPositioningDebounced']=_0x488046(()=>{_0x231dc3['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x373faf=this['context']['plugins']['get'](Ti),_0x328209=this['context']['plugins']['get'](ki);_0x373faf['register']('wideSidebar',this),_0x328209['container']&&_0x373faf['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x571afa){if(_0x571afa===this['activeAnnotation'])return;const _0x5ef8d4=this['context']['plugins']['get'](ki);_0x5ef8d4['_activeAnnotation']=_0x571afa;const _0xe43231=this['activeAnnotation'];_0x5ef8d4['refresh']({'blurredAnnotation':_0xe43231,'activatedAnnotation':_0x571afa}),this['activeAnnotation']=_0x571afa;}['attach'](_0x2271c4){this['annotations']=_0x2271c4;const _0x23d98e=this['context']['plugins']['get'](ki);if(_0x23d98e['_annotations']=_0x2271c4,this['isAttached'])throw new _0x3973a7('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x23d98e,'set:container',()=>{this['detach'](),this['listenTo'](_0x23d98e,'change:container',_0x32ad37=>{_0x32ad37['off'](),this['attach'](_0x2271c4);});}),_0x23d98e['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5e07ed=_0x14af5c=>{_0x14af5c['updateTargetRect'](),_0x23d98e['addAnnotation'](_0x14af5c);};for(const _0x2d74f8 of _0x2271c4)_0x5e07ed(_0x2d74f8);this['listenTo'](_0x2271c4,'add',(_0xd8323,_0x774b2e)=>{_0x5e07ed(_0x774b2e);}),this['listenTo'](_0x2271c4,'remove',(_0x48f45f,_0x10f984,_0x3f8893)=>{_0x23d98e['rearrange']({'removedAnnotation':_0x10f984,'previousAnnotation':_0x2271c4['get'](_0x3f8893-0x1),'nextAnnotation':_0x2271c4['get'](_0x3f8893+0x1)}),_0x10f984===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2271c4,'focus',(_0x143ce2,_0x286218)=>{this['setActiveAnnotation'](_0x286218);}),this['listenTo'](_0x2271c4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2101e7=this['context']instanceof _0x3ea8d1?this['context']['editors']:new _0x55d760([this['context']]);for(const _0x1a7a79 of _0x2101e7)this['_integrateWithEditorAnnotations'](_0x1a7a79);this['listenTo'](_0x2101e7,'add',(_0x51f8d1,_0x15e302)=>{this['listenTo'](_0x15e302,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x15e302);});}),this['listenTo'](_0x2101e7,'remove',(_0x592a87,_0x73b8b7)=>{_0x73b8b7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x73b8b7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3973a7('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3160ad=this['context']['plugins']['get'](ki);_0x3160ad['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3160ad),this['stopListening'](this['annotations']),this['context']instanceof _0x3ea8d1&&this['stopListening'](this['context']['editors']);for(const _0x361226 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x361226);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x593db4){if(!_0x593db4['plugins']['has']('EditorAnnotations'))return;const _0x8a5e1d=_0x593db4['plugins']['get']('EditorAnnotations'),_0x38b4f2=()=>{const _0x269f6c=_0x8a5e1d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x269f6c[0x0]||null);};this['listenTo'](_0x8a5e1d,'refresh',_0x38b4f2),this['listenTo'](_0x8a5e1d,'blur',(_0x16101f,{isAnnotationTracked:_0x17ced6})=>{this['activeAnnotation']&&_0x17ced6(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x8a5e1d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3a55e6=>{_0x8a5e1d['hasDomSelection']()&&(_0x38b4f2(),_0x3a55e6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x8a5e1d);}['_destroyEditorAnnotationsIntegration'](_0x2fd0a1){this['stopListening'](_0x2fd0a1),this['_editorAnnotations']['remove'](_0x2fd0a1);}},Ri=class extends _0x352ef3{['counterView'];constructor(_0x4822a2){super(_0x4822a2);const _0x52eca3=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x19156c,_0x4523eb)=>_0x19156c?'...':_0x4523eb['toString']()),this['set']('annotationType',''),this['icon']=_0x52d241,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x52eca3['to']('annotationType',_0x44f5af=>'ck-annotation-counter__badge--'+_0x44f5af),_0x52eca3['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x52eca3['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x584f12{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ffb2f){super(_0x2ffb2f),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4c115d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x55d760(),this['_refreshPositioningDebounced']=_0x488046(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4b697d(this['context']['locale']),this['balloonPanelView']=new _0x162878(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x11c8b0){this['annotations']=_0x11c8b0;const _0x513248=this['context']['plugins']['get'](ki),_0x20b2de=this['balloonPanelView'];if(_0x513248['_annotations']=_0x11c8b0,this['isAttached'])throw new _0x3973a7('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x513248,'set:container',()=>{this['detach'](),this['listenTo'](_0x513248,'change:container',_0x26180c=>{_0x26180c['off'](),this['attach'](_0x11c8b0);});}),_0x513248['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4be20a=_0x1053cd=>{const _0x7c1489=new Ri(this['context']['locale']);_0x513248['addAnnotation'](_0x1053cd,_0x7c1489),this['_annotationToNarrowView']['set'](_0x1053cd,_0x7c1489),_0x7c1489['bind']('isDirty','annotationType','number')['to'](_0x1053cd['view'],'isDirty','type','length'),_0x7c1489['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x20b2de['content']['first']!==_0x1053cd['view']?(this['_showBalloon'](_0x1053cd),_0x1053cd['view']['element']['focus'](),this['setActiveAnnotation'](_0x1053cd)):this['setActiveAnnotation'](null);});};for(const _0x49eb6f of _0x11c8b0)_0x4be20a(_0x49eb6f);this['listenTo'](_0x11c8b0,'add',(_0x1063de,_0x50787c)=>{_0x4be20a(_0x50787c);}),this['listenTo'](_0x11c8b0,'remove',(_0xf66c0f,_0x11bfb7,_0x27aa5e)=>{this['_annotationToNarrowView']['get'](_0x11bfb7)['destroy'](),this['_annotationToNarrowView']['delete'](_0x11bfb7),_0x513248['rearrange']({'removedAnnotation':_0x11bfb7,'previousAnnotation':_0x11c8b0['get'](_0x27aa5e-0x1),'nextAnnotation':_0x11c8b0['get'](_0x27aa5e+0x1)}),_0x11bfb7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x11c8b0,'focus',(_0x332a19,_0x5efd76)=>{this['setActiveAnnotation'](_0x5efd76);}),this['listenTo'](_0x11c8b0,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2bc0c8,_0x3029a8)=>{_0x3029a8['keyCode']===_0x31d699['esc']&&_0x20b2de['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x20b2de['content']['first']),this['_hideBalloon'](),_0x3029a8['stopPropagation'](),_0x3029a8['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x566e1b,_0x94d6bb)=>{const _0x7a57c2=_0x94d6bb['target'];_0x20b2de['isVisible']&&_0x20b2de['element']['contains'](_0x7a57c2)||_0x513248['view']['element']['contains'](_0x7a57c2)||_0x566e1b['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3e6a4e=>_0x3e6a4e['contains'](_0x7a57c2))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xd12715=this['context']instanceof _0x3ea8d1?this['context']['editors']:new _0x55d760([this['context']]);for(const _0x2303da of _0xd12715)this['_integrateWithEditorAnnotations'](_0x2303da);this['listenTo'](_0xd12715,'add',(_0x58ae09,_0x2f6d60)=>{this['listenTo'](_0x2f6d60,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2f6d60);});}),this['listenTo'](_0xd12715,'remove',(_0x577598,_0x22d3bf)=>{_0x22d3bf['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x22d3bf['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x89188c){if(_0x89188c===this['activeAnnotation'])return;const _0x9caffb=this['context']['plugins']['get'](ki);_0x9caffb['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x89188c,'disableAnimationOnActivatedAnnotation':!0x0}),_0x89188c&&_0x9caffb['getSidebarItemView'](_0x89188c)?this['_showBalloon'](_0x89188c):this['_hideBalloon'](),this['activeAnnotation']=_0x89188c;}['detach'](){if(!this['isAttached'])throw new _0x3973a7('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x289beb=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1c2c3b=>_0x1c2c3b['destroy']()),this['_annotationToNarrowView']['clear'](),_0x289beb['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3ea8d1&&this['stopListening'](this['context']['editors']);for(const _0x2eb3bb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2eb3bb);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'](_0x1f3933){if(!_0x1f3933['plugins']['has']('EditorAnnotations'))return;const _0x452eba=_0x1f3933['plugins']['get']('EditorAnnotations'),_0x5691c8=this['context']['plugins']['get'](ki),_0x51bb54=this['annotations'],_0x26e1fc=this['balloonPanelView'],_0x5751d3=()=>{const _0x407023=_0x452eba['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x407023),this['setActiveAnnotation'](_0x407023[0x0]||null);};this['listenTo'](_0x452eba,'refresh',_0x5751d3),this['listenTo'](_0x452eba,'blur',(_0x4cf845,{isAnnotationTracked:_0x2bd7b9})=>{this['activeAnnotation']&&_0x2bd7b9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x452eba,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x51bb54,'blur',_0x4638ca=>{_0x452eba['hasDomSelection']()&&_0x4638ca['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x341fbb,_0x2027a1)=>{const _0x52e4b2=_0x2027a1['target'];_0x26e1fc['isVisible']&&_0x26e1fc['element']['contains'](_0x52e4b2)||_0x5691c8['view']['element']['contains'](_0x52e4b2)||this['activeAnnotation']&&_0x452eba['hasDomSelection']()&&(_0x5751d3(),_0x341fbb['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x452eba);}['_destroyEditorAnnotationsIntegration'](_0x21e7d7){_0x21e7d7&&(this['stopListening'](_0x21e7d7),this['_editorAnnotations']['remove'](_0x21e7d7));}['_setSelectedAnnotations'](_0x5a4fd9){for(const _0xf3c9ba of this['_selectedAnnotations'])_0x5a4fd9['includes'](_0xf3c9ba)||this['_manuallyClosedAnnotationViews']['delete'](_0xf3c9ba['view']);this['_selectedAnnotations']=_0x5a4fd9;}['_refreshPositioning'](){const _0x53a315=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x53a315['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x24e4db){if(this['_manuallyClosedAnnotationViews']['has'](_0x24e4db['view']))return;const _0x3ea459=this['balloonPanelView']['content']['first'];_0x3ea459!==_0x24e4db['view']?(_0x3ea459&&this['_detachListeners'](_0x3ea459),this['_attachListeners'](_0x24e4db['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x24e4db['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1dddcd=this['balloonPanelView']['content']['first'],_0x1d58ec=_0x1dddcd&&this['annotations']['getByView'](_0x1dddcd);if(!_0x1d58ec||!this['_annotationToNarrowView']['has'](_0x1d58ec))return;const _0x44fc0a=this['_annotationToNarrowView']['get'](_0x1d58ec)['element'],_0x296c2d=(function(){const _0x39e99c=_0x162878['defaultPositions'];return[_0x39e99c['southArrowNorthEast'],_0x39e99c['northArrowSouthEast'],_0x39e99c['southArrowNorth'],_0x39e99c['northArrowSouth'],_0x39e99c['southArrowNorthWest'],_0x39e99c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x44fc0a,'positions':_0x296c2d});}['_hideBalloon'](){const _0x99f191=this['balloonPanelView'],_0x321ea2=_0x99f191['content']['first'];_0x321ea2&&(this['_detachListeners'](_0x321ea2),_0x99f191['unpin'](),_0x99f191['content']['clear']());}['_attachListeners'](_0x35a6c8){this['listenTo'](_0x35a6c8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x35a6c8,'Esc',(_0x242af0,_0x1d8a4a)=>{this['_manuallyClosedAnnotationViews']['add'](_0x35a6c8),this['_hideBalloon'](),_0x1d8a4a();});}['_detachListeners'](_0x58d41c){this['stopListening'](_0x58d41c);}},xi=class extends _0x580aef{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x39675d,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x48486d){super(_0x48486d),_0x48486d['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x48486d['plugins']['get'](_0x39675d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x488046(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x2493d4=this['editor']['plugins']['get'](Ti);_0x2493d4['context']===this['editor']&&(_0x2493d4['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x171adb,_0x54bbe2)=>{const _0x4c8e60=this['_balloon'];if(this['isAttached']&&_0x4c8e60['visibleView']){const _0x52a3ca=this['annotations']['getByView'](_0x4c8e60['visibleView']);_0x52a3ca&&this['_closeAnnotation'](_0x52a3ca),_0x54bbe2();}}));}['afterInit'](){const _0x1a0a1f=this['editor']['plugins']['get'](Ti);_0x1a0a1f['context']===this['editor']&&(_0x1a0a1f['hasActive']()||_0x1a0a1f['switchTo']('inline'));}['setActiveAnnotation'](_0x323d15){_0x323d15!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x323d15&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x323d15)&&this['_addAnnotationToBalloon'](_0x323d15,!0x0),_0x323d15['isActive']=!0x0),_0x323d15||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x323d15);}['attach'](_0x12f9c4){this['annotations']=_0x12f9c4;const _0x54dbce=this['editor']['plugins']['get'](Ti),_0x32fe68=this['_balloon'];if(this['isAttached'])throw new _0x3973a7('inlineannotations-attach-already-attached',this);if(_0x54dbce['context']!==this['editor'])throw new _0x3973a7('inlineannotations-not-allowed-with-context',this);const _0x3a5ed7=this['editor']['plugins']['get'](di);this['listenTo'](_0x3a5ed7,'refresh',()=>{const _0x45bea7=_0x3a5ed7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x39c9d1,_0x425b3b;!this['_forceRefresh']&&(_0x39c9d1=_0x45bea7,_0x425b3b=this['_selectedAnnotations'],_0x39c9d1['length']===_0x425b3b['length']&&_0x39c9d1['every'](_0x54f654=>_0x425b3b['includes'](_0x54f654)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x45bea7),this['setActiveAnnotation'](_0x45bea7[0x0]||null));}),this['listenTo'](_0x3a5ed7,'blur',(_0x14279b,{isAnnotationTracked:_0x15e89f})=>{this['activeAnnotation']&&_0x15e89f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3a5ed7,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x43a837,_0x50656e,_0x875655)=>{_0x875655||this['setActiveAnnotation'](null);}),this['listenTo'](_0x12f9c4,'remove',(_0x582091,_0x1662e0)=>{this['_removeAnnotationFromBalloon'](_0x1662e0),_0x1662e0===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x32fe68,'change:visibleView',(_0x228a6b,_0x56fa57,_0x2a65ae,_0x278743)=>{_0x278743&&this['stopListening'](_0x278743);const _0x3a3193=_0x12f9c4['getByView'](_0x2a65ae);_0x2a65ae&&_0x3a3193&&(this['listenTo'](_0x2a65ae,'change:height',()=>{_0x32fe68['updatePosition']();}),this['listenTo'](_0x2a65ae,'Esc',()=>{this['_closeAnnotation'](_0x3a3193),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3a3193&&this['setActiveAnnotation'](_0x3a3193));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x32fe68['visibleView']&&_0x12f9c4['getByView'](_0x32fe68['visibleView'])&&_0x32fe68['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 _0x3973a7('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x28f9c6 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x28f9c6);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x564bb9){for(const _0x294249 of this['_selectedAnnotations'])_0x564bb9['includes'](_0x294249)||this['_manuallyClosed']['delete'](_0x294249);for(const _0x10d0dc of this['annotations'])_0x564bb9['includes'](_0x10d0dc)||this['_removeAnnotationFromBalloon'](_0x10d0dc);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4d2038 of _0x564bb9)this['_addAnnotationToBalloon'](_0x4d2038);}this['_selectedAnnotations']=_0x564bb9;}['_addAnnotationToBalloon'](_0x1a08f8,_0x5dd05c=!0x1){this['_manuallyClosed']['has'](_0x1a08f8)||(this['_addedAnnotations']['has'](_0x1a08f8)||this['_balloon']['hasView'](_0x1a08f8['view'])||(this['_addedAnnotations']['add'](_0x1a08f8),this['_balloon']['add']({'stackId':_0x1a08f8['view']['id'],'view':_0x1a08f8['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1a08f8)}})),_0x5dd05c&&this['_balloon']['showStack'](_0x1a08f8['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5cb2ef){const _0xdea8d3=_0x5cb2ef['target'],_0x6d3f26=this['editor']['editing']['view'],_0x2e3d68=_0x6d3f26['document']['selection']['getFirstRange'](),_0x3451cc=_0x6d3f26['domConverter']['viewRangeToDom'](_0x2e3d68);if(_0x3451cc['collapse'](!0x0),_0xdea8d3){if(_0xdea8d3 instanceof _0x3f7499)return _0xdea8d3;let _0x12d990=[];for(const _0x4d405d of _0xdea8d3)_0x12d990['push'](..._0x3f7499['getDomElementRects'](_0x4d405d));_0x12d990=function(_0x5b0ac9){const _0x275bb4=[];let _0x8d0f40=_0x5b0ac9[0x0];for(let _0xf03250=0x1;_0xf03250<_0x5b0ac9['length'];_0xf03250++)if(Pi(_0x8d0f40,_0x5b0ac9[_0xf03250])){const _0x8d4563=_0x5b0ac9[_0xf03250]['width'];_0x8d0f40['width']+=_0x8d4563,_0x8d0f40['right']+=_0x8d4563;}else _0x275bb4['push'](_0x8d0f40),_0x8d0f40=_0x5b0ac9[_0xf03250];return _0x275bb4['push'](_0x8d0f40),_0x275bb4;}(_0x12d990);const _0x1f8766=_0x3451cc['getBoundingClientRect']();return _0x12d990['find'](_0x3fe822=>_0x3fe822['top']<=_0x1f8766['top']&&_0x3fe822['bottom']>=_0x1f8766['bottom']&&_0x3fe822['left']<=_0x1f8766['left']&&_0x3fe822['right']>=_0x1f8766['right'])||_0x12d990[0x0];}return _0x5cb2ef['targetRect']||_0x3451cc;}['_removeAnnotationFromBalloon'](_0x374ce9){this['_addedAnnotations']['has'](_0x374ce9)&&this['_balloon']['hasView'](_0x374ce9['view'])&&(this['_addedAnnotations']['delete'](_0x374ce9),this['_balloon']['remove'](_0x374ce9['view']));}['_closeAnnotation'](_0x46188e){this['_manuallyClosed']['add'](_0x46188e),this['_removeAnnotationFromBalloon'](_0x46188e);}};function Pi(_0x585ac2,_0x2226b4){return _0x585ac2['top']===_0x2226b4['top']&&_0x585ac2['bottom']===_0x2226b4['bottom']&&_0x585ac2['right']===_0x2226b4['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x6d1936,_0xde6e8c){super(_0x6d1936),this['set']('isEmpty',!_0xde6e8c['length']),this['focusTracker']=new _0x17ba74(),this['_annotationViews']=_0xde6e8c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0xde6e8c,'focusTracker':this['focusTracker']}),this['listenTo'](_0xde6e8c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xde6e8c,'remove',(_0x325709,_0xa942e0)=>{_0xa942e0['isActive']&&this['focus'](),_0xde6e8c['length']||(this['isEmpty']=!0x0);});const _0x2ff769=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x6d1936,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xde6e8c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2ff769['if']('isEmpty','ck-hidden',_0x4f3fcd=>!_0x4f3fcd)]},'children':[{'text':Et(_0x6d1936,'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 _0x4cb533 of this['_annotationViews'])this['focusTracker']['add'](_0x4cb533['element']);this['_annotationViews']['on']('change',(_0x27363c,{added:_0x56e62f,removed:_0x63d444})=>{for(const _0x38fbe4 of _0x56e62f)this['focusTracker']['add'](_0x38fbe4['element']);for(const _0x2eee25 of _0x63d444)this['focusTracker']['remove'](_0x2eee25['element']);});}},Di=class extends _0x584f12{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x1a6ef4){super(_0x1a6ef4),this['archivedThreads']=new _0x55d760();}['init'](){const _0x480403=this['context'],_0x321fd1=_0x480403['plugins']['get'](oi),_0x1c0865=_0x480403['plugins']['get'](ti);this['listenTo'](_0x321fd1,'addCommentThread',(_0x55f0b8,{threadId:_0x23afb5})=>{const _0x22129c=_0x321fd1['getCommentThread'](_0x23afb5);_0x22129c['archivedAt']&&this['archivedThreads']['add'](_0x22129c,this['_calculatePosition'](_0x22129c['archivedAt'])),this['listenTo'](_0x22129c,'change:archivedAt',(_0x1a6570,_0x5ad876,_0x5452a2)=>{_0x5452a2?this['archivedThreads']['has'](_0x22129c)||this['archivedThreads']['add'](_0x22129c,this['_calculatePosition'](_0x22129c['archivedAt'])):this['archivedThreads']['has'](_0x22129c)&&this['archivedThreads']['remove'](_0x22129c);});}),this['listenTo'](_0x321fd1,'removeCommentThread',(_0x3f48eb,{threadId:_0x214c58})=>{const _0x58b7ce=_0x321fd1['getCommentThread'](_0x214c58);this['stopListening'](_0x58b7ce),this['archivedThreads']['has'](_0x58b7ce)&&this['archivedThreads']['remove'](_0x58b7ce);},{'priority':'highest'}),this['listenTo'](_0x1c0865['collection'],'focus',(_0x403011,_0x27dffa)=>{_0x27dffa['isVisible']||(_0x27dffa['isActive']=!0x0,_0x1c0865['activate'](_0x27dffa));});}['_calculatePosition'](_0x4f7069){const _0x31c626=[...this['archivedThreads']]['findIndex'](_0x4a3381=>_0x4a3381['archivedAt']<_0x4f7069);return _0x31c626>-0x1?_0x31c626:this['archivedThreads']['length'];}},Vi=class extends _0x580aef{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x4abe2b];}constructor(_0x1bdcb2){super(_0x1bdcb2),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x2a20f5=this['editor'],_0x102570=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2a20f5['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x352ef3,!0x0)),_0x2a20f5['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4233da=this['_createCommentsArchiveButton'](rt);return _0x4233da['set']({'role':'menuitemcheckbox'}),_0x4233da;});const _0x376d53=_0x2a20f5['plugins']['get'](Di),_0x492134=_0x2a20f5['plugins']['get']('Annotations'),_0x905e4c=_0x2a20f5['plugins']['get']('CommentsRepository');_0x376d53['archivedThreads']['forEach'](_0x4a63fb=>{this['_handleNewThread'](_0x4a63fb);}),this['listenTo'](_0x376d53['archivedThreads'],'add',(_0x4edfd5,_0x604196)=>{this['_handleNewThread'](_0x604196);}),this['listenTo'](_0x492134['collection'],'add',(_0x2346f9,_0x421429)=>{const _0x48e630=this['_pendingThreads']['find'](_0x44bbd0=>{const _0x1983a3=_0x905e4c['_threadToController']['get'](_0x44bbd0);return _0x1983a3&&_0x421429['innerView']===_0x1983a3['view'];});if(_0x48e630){const _0xf0f888=this['_calculatePosition'](_0x48e630['archivedAt']);this['_addAnnotationToArchive'](_0x421429,_0xf0f888),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x48e630),0x1);}}),this['listenTo'](_0x376d53['archivedThreads'],'remove',(_0x3387eb,_0x2f6135)=>{const _0x587ff5=_0x2a20f5['config']['get']('collaboration.channelId');if(!_0x587ff5||_0x2f6135['channelId']===_0x587ff5){if(this['_pendingThreads']['includes'](_0x2f6135))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2f6135),0x1);else{const _0x30c52f=_0x905e4c['_threadToController']['get'](_0x2f6135),_0x39a257=_0x492134['getByInnerView'](_0x30c52f['view']);this['annotationViews']['remove'](_0x39a257['view']),this['stopListening'](_0x39a257),this['stopListening'](_0x39a257['focusableElements']);}}}),this['listenTo'](_0x492134['collection'],'add',(_0xb658f1,_0x404455)=>{this['listenTo'](_0x404455,'escape',_0x102570);}),this['listenTo'](_0x492134['collection'],'remove',(_0x3fc3cf,_0x546d11)=>{this['stopListening'](_0x546d11,'escape',_0x102570);});}['_addAnnotationToArchive'](_0x568f1e,_0x40ac76){this['listenTo'](_0x568f1e,'set:isVisible',_0x54c2ee=>{_0x54c2ee['return']=!0x1,_0x54c2ee['stop']();}),this['annotationViews']['add'](_0x568f1e['view'],_0x40ac76);}['_handleNewThread'](_0x1c88f3){const _0x40c034=this['editor']['plugins']['get']('CommentsRepository'),_0x5a6af3=this['editor']['plugins']['get']('Annotations'),_0x41ce44=this['editor']['config']['get']('collaboration.channelId');if(!_0x41ce44||_0x1c88f3['channelId']===_0x41ce44){const _0xf0240c=_0x40c034['_threadToController']['get'](_0x1c88f3);if(!_0xf0240c)return void this['_pendingThreads']['push'](_0x1c88f3);const _0x4c8231=this['_calculatePosition'](_0x1c88f3['archivedAt']),_0x5ba9cb=_0x5a6af3['getByInnerView'](_0xf0240c['view']);_0x5ba9cb['isVisible']&&_0x5a6af3['_visibleAnnotations']['remove'](_0x5ba9cb),this['_addAnnotationToArchive'](_0x5ba9cb,_0x4c8231);}}['_calculatePosition'](_0x5040a4){const _0x4a1de1=this['editor']['config']['get']('collaboration.channelId'),_0x2703f5=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x37ef82=>_0x37ef82['channelId']===_0x4a1de1)['findIndex'](_0x4749c4=>_0x4749c4['archivedAt']<_0x5040a4);return _0x2703f5<0x0||_0x2703f5>this['annotationViews']['length']?this['annotationViews']['length']:_0x2703f5-0x1;}['_toggleDialog'](){const _0x2fb16e=this['editor'],_0x196182=_0x2fb16e['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x2fb16e['locale'],this['annotationViews'])),'commentsArchive'===_0x196182['id']?_0x196182['hide']():_0x196182['show']({'id':'commentsArchive','title':Et(_0x2fb16e['locale'],'COMMENTS_ARCHIVE'),'icon':_0x104917,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xdcd457['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x50c410,_0x464c0d=!0x1){const _0x5cf364=this['editor']['locale'],_0x184f21=this['editor']['plugins']['get']('Dialog'),_0x3badad=new _0x50c410(_0x5cf364);return _0x3badad['bind']('isEnabled')['to'](this,'isEnabled'),_0x3badad['bind']('isOn')['to'](_0x184f21,'id',_0x294008=>'commentsArchive'===_0x294008),_0x3badad['set']({'label':Et(_0x5cf364,'COMMENTS_ARCHIVE'),'icon':_0x104917,'isToggleable':!0x0}),_0x464c0d&&(_0x3badad['tooltip']=!0x0),this['listenTo'](_0x3badad,'execute',()=>this['_toggleDialog']()),_0x3badad;}['_hideDialogOnAnnotationEscape']=_0xf77f63=>{const _0xc53205=_0xf77f63['source'];if(!this['annotationViews']['has'](_0xc53205['view']))return;const _0x57c213=this['editor']['plugins']['get']('Dialog');_0x57c213['isOpen']&&'commentsArchive'===_0x57c213['id']&&(_0x57c213['hide'](),_0xf77f63['stop']());};},Bi=class extends _0x580aef{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
|
|
23
|
+
import{Command as _0x5de849,Context as _0x2e85d8,ContextPlugin as _0x5d945e,Editor as _0x8c9b70,PendingActions as _0x4019cf,Plugin as _0x32d196}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x460944,Collection as _0x1d3c5e,DomEmitterMixin as _0x270b14,FocusTracker as _0x46cfaf,KeystrokeHandler as _0x44e221,ObservableMixin as _0x4f4856,Rect as _0x3f41c9,diff as _0x4d2557,first as _0x1a2afb,getEnvKeystrokeText as _0x5bcf0b,keyCodes as _0x40bd72,priorities as _0x48ddaa,scrollViewportToShowTarget as _0x474fe7,toUnit as _0x4b19c0,uid as _0x4ff4e9}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x30e892,ConfirmMixin as _0x505bcf,FOCUS_ANNOTATION_KEYSTROKE as _0x4e8a21,LateFocusButtonView as _0x4ccc42,LateFocusDropdownButtonView as _0x3bd6df,UserView as _0x95843f,Users as _0x5d61c1,getAllMarkersDomElementsSorted as _0x3df547,getDateTimeFormatter as _0x5b4e92,hashObject as _0x5ab5a3,setupThreadKeyboardNavigation as _0x2c8780,surroundingMarkersDetector as _0x5a3dd3,trimHtml as _0x3e71f1}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x172f46,debounce as _0x1ebf5f,isEqual as _0x440498,set as _0x4f2003,throttle as _0x17f62c,unset as _0x59ab04}from'es-toolkit/compat';import{IconAddComment as _0x1f3af2,IconCheck as _0x3aa4d1,IconCommentsArchive as _0x4a6a61,IconPencil as _0xb8044e,IconRemoveComment as _0x2d40b9,IconThreeVerticalDots as _0x4b53ab,IconUndo as _0x16ab3a}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0xd4a3f7,BodyCollection as _0x701dbb,ButtonView as _0x5a263d,ContextualBalloon as _0x63646c,Dialog as _0x3da067,DialogViewPosition as _0x3cf2f2,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4f4856();var bt=class extends It{['model'];['view'];constructor(_0x494d1d,_0x5a515c){super(),this['model']=_0x494d1d,this['model']['_isAttached']=!0x0,this['view']=_0x5a515c,this['listenTo'](_0x5a515c,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5a515c,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5a515c,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5a515c,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5a515c,'addComment',(_0x3e2272,_0x17e785)=>this['addComment'](_0x17e785)),this['listenTo'](_0x5a515c,'updateComment',(_0x1795d0,_0x1af990,_0x5c0eab)=>this['updateComment'](_0x1af990,_0x5c0eab)),this['listenTo'](_0x5a515c,'removeComment',(_0x5df4d1,_0x4874fe)=>this['removeComment'](_0x4874fe));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3994db){this['model']['addComment']({'content':_0x3994db,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x5054ca,_0x45ef48){this['model']['getComment'](_0x5054ca)['update']({'content':_0x45ef48});}['removeComment'](_0x324560){this['model']['getComment'](_0x324560)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x38e5f1,_0x8f1cf,_0x582ee3){const t=_0x38e5f1['t'];switch(_0x8f1cf){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'},_0x582ee3);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x582ee3);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'},_0x582ee3);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'},_0x582ee3);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x582ee3);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'},_0x582ee3);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'},_0x582ee3);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'},_0x582ee3);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'';}}var kt=class extends it{['main'];['editable'];constructor(_0x322a5f,_0x5196d7){super(_0x322a5f);const _0x14c587=_0x4ff4e9();this['main']=this['createCollection'](),this['editable']=new st(_0x322a5f,_0x5196d7,void 0x0,{'label':()=>Et(_0x322a5f,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x322a5f['uiLanguageDirection'],'lang':_0x322a5f['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x14c587},'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']();}},Nt=class extends tt{['view'];constructor(_0x1343d7){super(_0x1343d7),this['view']=new kt(_0x1343d7['locale'],_0x1343d7['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2045e7=this['editor']['editing']['view'],_0xc99982=this['view']['editable'];_0xc99982['name']=_0x2045e7['document']['getRoot']()['rootName'],this['view']['render']();const _0x2fbda9=_0xc99982['element'];this['setEditableElement'](_0xc99982['name'],_0x2fbda9),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2045e7['attachDomRoot'](_0x2fbda9),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4f4856(_0x8c9b70);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Ot)());constructor(_0x822e7e={}){(_0x822e7e=Object['assign']({},_0x822e7e))['plugins']||(_0x822e7e['plugins']=CommentEditor['defaultPlugins']),super(_0x822e7e),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['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0x2f185f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2f185f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5dd30a=>{const _0x4f02d4=this['model']['document']['getRoot'](),_0x12b37e=_0x4f02d4&&_0x4f02d4['getChild'](_0x4f02d4['childCount']-0x1);_0x5dd30a['setSelection'](_0x12b37e,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1d22f8=this['editing']['view'],_0x377e9a=_0x1d22f8['document']['getRoot'](),_0x546e1e=_0x377e9a['getChild'](0x0);_0x377e9a['childCount']>0x1||!_0x546e1e||'p'!=_0x546e1e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x1d22f8,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x546e1e['placeholder']=this['placeholder']),ut({'view':_0x1d22f8,'element':_0x546e1e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x546e1e);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x40664d,_0x54b9fd={}){super(_0x40664d),this['editor']=null,this['_editorConfig']=_0x54b9fd,this['set']('value',_0x54b9fd['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x40664d,'Reply...')),this['set']('submitLabel',Et(_0x40664d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x44e221(),this['focusTracker']=new _0x46cfaf(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x406e21=>!_0x406e21['defaultPrevented']},'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',(_0x4a0df5,_0x274328)=>{this['cancelButtonView']['fire']('execute'),_0x274328();}),this['keystrokes']['set']('Ctrl+Enter',(_0x23f65f,_0x42dec2)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x42dec2());}),this['on']('submit',(_0x424440,_0x30e4ce)=>{_0x30e4ce['length']>0xfde8?(alert(Et(_0x40664d,'TOO_LONG_COMMENT_ALERT',[_0x30e4ce['length'],0xfde8])),_0x424440['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4656d4=this['editor'];this['element']['insertBefore'](_0x4656d4['ui']['element'],this['element']['firstChild']),_0x4656d4['model']['document']['on']('change',()=>this['value']=_0x4656d4['getData']()),_0x4656d4['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4656d4['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2f5265){-0x1===_0x2f5265?(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:_0x3f51a9}=this,_0xc934d4=new _0x5a263d(_0x3f51a9);return _0xc934d4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xc934d4['withText']=!0x0,_0xc934d4['bind']('label')['to'](this,'submitLabel'),_0xc934d4['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xc934d4['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x630cd5,_0x2e45ae)=>!_0x2e45ae&&!!_0x630cd5['trim']()),_0xc934d4;}['_createCancelButton'](){const {locale:_0x4db6f5}=this,_0x484228=new _0x5a263d(_0x4db6f5);return _0x484228['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x484228['label']=Et(_0x4db6f5,'Cancel'),_0x484228['withText']=!0x0,_0x484228['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x484228;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x38b223=>{this['focusTracker']['add'](_0x38b223['element']);}),this['focusables']['on']('change',(_0x23c0f8,_0x17bacc)=>{for(const _0x58c280 of Array['from'](_0x17bacc['added'])['reverse']())this['focusTracker']['add'](_0x58c280['element']);});}},xt=class extends ht{constructor(_0x43f68d,_0x2a8c04,_0x45bb7b){super(_0x43f68d),this['commentInputView']=new St(_0x43f68d,_0x45bb7b),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x118229,_0x4321a5)=>_0x118229||!!_0x4321a5),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 _0x95843f(_0x43f68d,_0x2a8c04),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'](_0x475a0b){this['commentInputView']['focus'](_0x475a0b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x27adb0,_0x4281e3)=>{const {submitButtonView:_0x4ee7c8,cancelButtonView:_0x360777,editor:_0x219ea1}=this['commentInputView'];[_0x4ee7c8['element'],_0x360777['element'],_0x219ea1?_0x219ea1['editing']['view']['getDomRoot']():null]['filter'](_0x42a9b6=>_0x42a9b6)['some'](_0xc47986=>_0xc47986['contains'](_0x4281e3['target']))||(this['focus'](),_0x4281e3['preventDefault']());});}},Pt=class extends ht{constructor(_0x2def75){super(_0x2def75);const _0x149537=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x149537['to']('count',_0x11c34a=>Et(_0x2def75,'NUMBER_OF_COMMENTS',_0x11c34a))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1d864f,_0x8c9843,_0x1c9cbe){super(_0x1d864f);const _0x213902=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x8c9843['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x8c9843,this['_config']=_0x1c9cbe,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3681f3=>this['commentViews']['map'](_0x168a05=>_0x168a05['element'])['includes'](_0x3681f3['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x1d864f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x14dec0=>_0x14dec0-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5b56a9 of _0x8c9843['comments'])this['_handleNewCommentModel'](_0x5b56a9);this['_handleInfoComment'](),this['listenTo'](_0x8c9843['comments'],'add',(_0x35001b,_0x32c6fc)=>{const _0x1290f6=this['_calculatePosition'](_0x32c6fc);this['length']++,this['_handleNewCommentModel'](_0x32c6fc,_0x1290f6),this['refreshVisibleViews']();}),this['listenTo'](_0x8c9843['comments'],'remove',(_0x532604,_0x40b744)=>{this['length']--,this['_handleRemoveCommentModel'](_0x40b744),this['refreshVisibleViews']();}),this['listenTo'](_0x8c9843,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x8c9843,'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',_0x213902['if']('length','ck-hidden',_0x5c5f12=>!_0x5c5f12)],'aria-label':Et(_0x1d864f,'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'](_0x494c72){-0x1===_0x494c72?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1e7cad of this['commentViews'])_0x1e7cad['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x8b8237,_0x5ae593){const _0x562c40=new this['_config']['CommentView'](this['locale'],_0x8b8237,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x562c40['viewUid']=_0x8b8237['id'],_0x562c40['delegate']('removeComment')['to'](this),_0x562c40['delegate']('updateComment')['to'](this),_0x562c40['delegate']('resolveCommentThread')['to'](this),_0x562c40['delegate']('editorReady')['to'](this),_0x562c40['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x562c40,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x562c40,_0x5ae593);}['_calculatePosition'](_0xbaaa76){const _0x13d461=this['_model']['_findOptimalIndex'](_0xbaaa76);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xbaaa76['authoredAt']?_0x13d461-0x1:_0x13d461:_0x13d461-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x29cd10={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x29cd10,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x29cd10));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x143125){const _0x28b79e=this['commentViews']['remove'](_0x143125['id']);this['stopListening'](_0x28b79e),_0x28b79e['isEditMode']&&this['_updateHasDirtyComment'](),_0x28b79e['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5e6470=>_0x5e6470['isEditMode']);}['_rearrangeCollapse'](){const _0x1a17dc=function(_0x1bd657){const _0x3b6ad2=new _0x1d3c5e();for(const _0x4199ec of _0x1bd657)_0x3b6ad2['add'](_0x4199ec);return _0x3b6ad2;}(this['commentViews']),_0x53e5e0=this['_collapsedCommentsView']['count'];for(let _0xd5a7f2=0x1;_0xd5a7f2<=_0x53e5e0;_0xd5a7f2++)_0x1a17dc['remove'](0x1);for(const _0x2cf8ed of _0x1a17dc)_0x2cf8ed['collapse']();_0x53e5e0>0x0&&_0x1a17dc['add'](this['_collapsedCommentsView'],0x1),Dt(_0x4d2557(Array['from'](this['visibleViews']),Array['from'](_0x1a17dc)),this['visibleViews'],_0x1a17dc);}['_rearrangeExpand'](){Dt(_0x4d2557(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3ba061 of this['visibleViews'])_0x3ba061['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x37e9ce=>{this['focusTracker']['add'](_0x37e9ce['element']),this['keystrokes']['listenTo'](_0x37e9ce['element']);}),this['commentViews']['on']('change',(_0x12a9bf,_0x138601)=>{for(const _0x59f434 of _0x138601['removed'])this['focusTracker']['remove'](_0x59f434['element']),this['keystrokes']['stopListening'](_0x59f434['element']);for(const _0x14c02e of Array['from'](_0x138601['added'])['reverse']())this['focusTracker']['add'](_0x14c02e['element']),this['keystrokes']['listenTo'](_0x14c02e['element']);});}};function Dt(_0xac38fe,_0x9325d1,_0x1b036c){let _0x46b3f2=0x0;for(const _0x5d2646 of _0xac38fe)switch(_0x5d2646){case'insert':_0x9325d1['add'](_0x1b036c['get'](_0x46b3f2),_0x46b3f2),_0x46b3f2++;break;case'delete':_0x9325d1['remove'](_0x46b3f2);break;case'equal':_0x46b3f2++;}}var Vt=class extends ht{constructor(_0x169269){super(_0x169269);const _0x359cd6=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x359cd6['to']('contextValue',_0x5812b1=>Et(_0x169269,'THREAD_CONTEXT_LABEL',_0x5812b1)),'tabindex':-0x1},'children':[{'text':_0x359cd6['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4601fe,_0x5522ca){super(_0x4601fe);const _0x3498d7=this['bindTemplate'];this['_model']=_0x5522ca,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xba422=>!!_0xba422),this['bind']('contextValue')['to'](this['_model'],'context',_0xe29092=>_0xe29092&&_0xe29092['value']?this['_trimContextValue'](_0xe29092['value']):Et(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',_0x3498d7['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 _0x3e56fa=new _0x5a263d(this['locale']);return _0x3e56fa['label']=Et(this['locale'],'Reopen'),_0x3e56fa['tooltip']=Et(this['locale'],'Reopen'),_0x3e56fa['icon']=_0x16ab3a,_0x3e56fa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x393f80=>!_0x393f80),_0x3e56fa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3357ff,_0x202f3d)=>_0x3357ff&&_0x202f3d),_0x3e56fa['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3e56fa;}['_trimContextValue'](_0x312959){if(_0x312959['length']<0x96)return _0x312959;const _0x2ab65d=_0x312959['lastIndexOf']('\x20',0x93);return _0x312959['substring'](0x0,_0x2ab65d>-0x1?_0x2ab65d:0x93)+'...';}['_attachContextActions'](){const _0xdb275e=this['element']['querySelector']('.ck-context'),_0x57a004=_0xdb275e['querySelector']('.ck-context__value');this['listenTo'](_0xdb275e,'mouseenter',()=>{_0x57a004['offsetWidth']<_0x57a004['scrollWidth']&&_0xdb275e['classList']['add']('overlay');}),this['listenTo'](_0xdb275e,'mouseleave',()=>{_0xdb275e['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2bd506 of this['focusables'])this['focusTracker']['add'](_0x2bd506['element']),this['keystrokes']['listenTo'](_0x2bd506['element']);}['_createContextView'](){const _0x36b0a6=new Vt(this['locale']);return _0x36b0a6['bind']('contextValue')['to'](this),_0x36b0a6;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x25a382,_0x295a65,_0x4342da,_0x222e5e){super(_0x25a382),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x295a65,this['_localUser']=_0x4342da,this['_config']=_0x222e5e,this['commentThreadHeaderView']=new Bt(_0x25a382,_0x295a65),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x30e892(_0x25a382,Et(_0x25a382,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x25a382,_0x295a65,Object['assign']({'CommentView':this['_config']['CommentView']},_0x222e5e)),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',(_0x3f61e7,_0x4458ea)=>_0x3f61e7||!!_0x4458ea),this['bind']('isUnlinked')['to'](_0x295a65,'unlinkedAt',_0x385660=>!!_0x385660);let _0x429abb=null;const _0x47e1c3=()=>{const _0x69e296=this['_model']['comments']['first']||null;_0x69e296!==_0x429abb&&(_0x429abb&&this['stopListening'](_0x429abb,'change:content'),_0x429abb=_0x69e296,_0x69e296&&this['listenTo'](_0x69e296,'change:content',_0x47e1c3));const _0x224c03=_0x69e296?_0x69e296['author']['name']:this['_localUser']['name'],_0x21a8ee=_0x69e296?new DOMParser()['parseFromString'](_0x3e71f1(_0x69e296['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x35c4cb=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x224c03]);this['set']('ariaLabel',_0x21a8ee?_0x35c4cb+'\x20'+_0x21a8ee:_0x35c4cb);};this['listenTo'](this['_model']['comments'],'change',_0x47e1c3),_0x47e1c3(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x300152=>_0x300152['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2c8780(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x357e2f=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x11501f=_0x357e2f['commentInputView'];return _0x357e2f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x11501f,'value',(_0xe871b,_0x2d45ca,_0x5b2158,_0x232892,_0x27e3e6)=>!!_0x27e3e6||!!_0x232892&&_0x5b2158&&!_0x2d45ca||_0xe871b&&_0x5b2158&&!_0x2d45ca),_0x11501f['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1c88fc,_0x2f35bd,_0x43b485)=>{let _0x217c91;return _0x217c91=_0x43b485&&_0x2f35bd?'Reply\x20to\x20reopen\x20discussion...':_0x1c88fc?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x217c91);}),_0x11501f['bind']('submitLabel')['to'](this,'length',_0x5c7506=>Et(this['locale'],_0x5c7506?'Reply':'Comment')),_0x11501f['on']('submit',(_0x228877,_0x5981d0)=>{this['fire']('addComment',_0x5981d0),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x11501f['on']('cancel',()=>{this['focus']();}),_0x11501f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x11501f['on']('cancel',_0x465109=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x465109['stop']());}),this['on']('change:isActive',(_0x230326,_0x359d21,_0x308afe)=>{_0x308afe||this['length']||_0x11501f['value']||this['fire']('removeCommentThread');}),_0x357e2f;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x505bcf(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x2feeda,_0x32dd10,_0x2bed55,_0x284d96){super(_0x2feeda,_0x32dd10,_0x2bed55,_0x284d96),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2feeda,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3935c6,_0x551d68,_0x2a8ed2)=>{_0x2a8ed2||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xf754e2,_0x1bfcc5,_0x3142a0)=>{_0x3142a0&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3e6cdb=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3e6cdb['if']('isActive','ck-thread--active'),_0x3e6cdb['if']('isUnlinked','ck-thread--unlinked'),_0x3e6cdb['to']('actionIndicator',_0x36413c=>_0x36413c?'ck-thread--'+_0x36413c:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3e6cdb['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 _0xfdaef8 of this['commentsListView']['commentViews'])_0xfdaef8['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x214c74}=this,_0x293cfc=this['commentsListView']['commentViews']['get'](0x0);_0x293cfc===this['_boundFirstCommentView']||_0x293cfc['isSystemComment']||(this['_boundFirstCommentView']=_0x293cfc,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x293cfc,'actionIndicator',_0x5b41f0=>'remove'===_0x5b41f0?'remove':null),_0x293cfc['placeholder']=Et(_0x214c74,'Write\x20a\x20comment...'),_0x293cfc['removeButton']['on']('execute',_0x4d90f1=>{_0x4d90f1['stop'](),this['showConfirm'](Et(_0x214c74,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x293cfc['focus']();}),_0x293cfc['actionBar']['add'](this['resolveButton'],0x0),_0x293cfc['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5d7454=new _0x4ccc42(this['locale']);return _0x5d7454['label']=Et(this['locale'],'Resolve'),_0x5d7454['tooltip']=Et(this['locale'],'Resolve'),_0x5d7454['icon']=_0x3aa4d1,_0x5d7454['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5d7454['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x59a239=>!_0x59a239),_0x5d7454['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3ca23f,_0x4ab7f5)=>_0x3ca23f&&!_0x4ab7f5),_0x5d7454['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5d7454;}['_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']));}},Wt=class extends ht{constructor(_0x4d8399){super(_0x4d8399),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x15917b,_0x4aea08,_0x4dbeb5)=>{this['element']['innerHTML']=_0x4dbeb5;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x35c469,_0x30538f,_0x5177f6){super(_0x35c469),this['_model']=_0x30538f,this['_config']=_0x5177f6,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x30538f,'content',_0x30538f,'authoredAt',(_0x5ef655,_0x9b5348)=>Et(_0x35c469,'COMMENT_ARIA_LABEL',[_0x30538f['author']['name'],_0x5177f6['formatDateTime'](_0x9b5348),new DOMParser()['parseFromString'](_0x5ef655,'text/html')['body']['textContent'],_0x30538f['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x30e892(_0x35c469,Et(_0x35c469,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x410e99=>_0x410e99['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x54f75c=new Wt(this['locale']);return _0x54f75c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xd48704,_0x596b8f)=>_0x596b8f?_0x3e71f1(_0xd48704,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xd48704),_0x54f75c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4a84b9=new St(this['locale'],this['_config']['editorConfig']);return _0x4a84b9['value']=this['_model']['content'],_0x4a84b9['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4a84b9['submitLabel']=Et(this['locale'],'Save'),_0x4a84b9['on']('submit',(_0x45646e,_0x484aa4)=>{this['fire']('updateComment',this['_model']['id'],_0x484aa4),this['switchToDisplayMode'](),this['focus']();}),_0x4a84b9['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4a84b9['once']('editorReady',()=>{_0x4a84b9['focus']();}),_0x4a84b9['createEditor'](),_0x4a84b9['delegate']('editorReady')['to'](this),_0x4a84b9['delegate']('editorDestroyed')['to'](this),_0x4a84b9;}['_setupKeyboardNavigation'](){const _0x4790a5=this['element'];this['keystrokes']['listenTo'](_0x4790a5);for(const _0xdf5d7e of this['focusables'])this['focusTracker']['add'](_0xdf5d7e['element']),this['keystrokes']['listenTo'](_0xdf5d7e['element']);this['focusables']['on']('change',(_0x4255cb,_0x62915c)=>{for(const _0x4afe9b of _0x62915c['removed'])this['focusTracker']['remove'](_0x4afe9b['element']),this['keystrokes']['stopListening'](_0x4afe9b['element']);for(const _0x445887 of _0x62915c['added'])this['focusTracker']['add'](_0x445887['element']),this['keystrokes']['listenTo'](_0x445887['element']);}),this['keystrokes']['set']('enter',(_0x105e10,_0xa5c4e3)=>{_0x4790a5===_0x105e10['target']&&(this['focusCycler']['focusFirst'](),_0xa5c4e3());}),this['keystrokes']['set']('esc',(_0x45bad2,_0x107672)=>{_0x4790a5!==_0x45bad2['target']&&(this['focus'](),_0x107672());});}};const Gt=/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x505bcf(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x3faaaf,_0x133b61,_0x1e16f6){super(_0x3faaaf,_0x133b61,_0x1e16f6),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x3faaaf,'Reply...')),this['bind']('authoredAt')['to'](_0x133b61),this['bind']('resolvedAt')['to'](_0x133b61),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 _0x95843f(_0x3faaaf,_0x133b61['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x133b61,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x10c053=this['bindTemplate'],_0x50bdb3=[{'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':_0x10c053['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x10c053['to']('authoredAt',_0x40024=>this['_config']['formatDateTime'](_0x40024))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x10c053['if']('isEditMode','ck-comment__actions--hidden'),_0x10c053['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']&&_0x50bdb3['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x10c053['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x10c053['if']('isEditMode','ck-comment--edit'),_0x10c053['if']('isSystemComment','ck-comment--info'),_0x10c053['to']('actionIndicator',_0x1b058d=>_0x1b058d?'ck-comment--'+_0x1b058d:'')],'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':_0x50bdb3}]}]};}['_createEditButton'](){const _0x2f63e5=new _0x5a263d(this['locale']);return _0x2f63e5['label']=Et(this['locale'],'Edit'),_0x2f63e5['icon']=_0xb8044e,_0x2f63e5['withText']=!0x0,_0x2f63e5['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2f63e5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5c856a=>!_0x5c856a),_0x2f63e5['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2f63e5['on']('execute',()=>this['switchToEditMode']()),_0x2f63e5;}['_createRemoveButton'](){const _0x488a62=new _0x5a263d(this['locale']);return _0x488a62['label']=Et(this['locale'],'Remove'),_0x488a62['icon']=_0x2d40b9,_0x488a62['withText']=!0x0,_0x488a62['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x488a62['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x57272d=>!_0x57272d),_0x488a62['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x488a62['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x488a62;}['_createDropdown'](){const _0x4cdc19=ct(this['locale'],_0x3bd6df),_0x43cfb1=_0x4cdc19['panelView']['children'],_0x222ba8=new ot(this['locale']),_0x4da45a=_0x4cdc19['bindTemplate'];dt(_0x4cdc19,()=>this['items']['find'](_0x5d31ca=>_0x5d31ca['isVisible'])),_0x4cdc19['extendTemplate']({'attributes':{'class':[_0x4da45a['if']('isVisible','ck-hidden',_0x354f67=>!_0x354f67)]}});const _0x56a757=(_0x80ef74,_0x314728=-0x1)=>{const _0x38ec92=new nt(this['locale']);_0x38ec92['children']['add'](_0x80ef74);const _0x5cbe6b=_0x314728>-0x1?_0x314728:_0x222ba8['items']['length'];_0x222ba8['items']['add'](_0x38ec92,_0x5cbe6b);const _0x1092ba=Array['from'](this['items']);_0x4cdc19['unbind']('isEnabled','isVisible'),_0x4cdc19['bind']('isEnabled')['toMany'](_0x1092ba,'isEnabled',(..._0x2eec7a)=>_0x2eec7a['some'](_0x518e39=>_0x518e39)),_0x4cdc19['bind']('isVisible')['toMany'](_0x1092ba,'isVisible',(..._0x513463)=>_0x513463['some'](_0x19e213=>_0x19e213));};_0x4cdc19['panelPosition']='sw',_0x4cdc19['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x4b53ab});for(const _0x46f3c3 of this['items'])_0x56a757(_0x46f3c3);return _0x43cfb1['add'](_0x222ba8),_0x4cdc19['listenTo'](this['items'],'add',(_0x43d699,_0x440b27,_0x10c33a)=>{_0x56a757(_0x440b27,_0x10c33a);}),_0x4cdc19['listenTo'](this['items'],'remove',(_0x1720dc,_0x4c784d,_0x1a2479)=>{_0x222ba8['items']['remove'](_0x1a2479);}),_0x4cdc19;}['_attachActions'](_0x12914b,_0x4764c9){const _0x474dc2=_0x12914b&&_0x12914b['element'];_0x474dc2&&(this['listenTo'](_0x474dc2,'mouseenter',()=>this['actionIndicator']=_0x4764c9),this['listenTo'](_0x474dc2,'focus',()=>this['actionIndicator']=_0x4764c9),this['listenTo'](_0x474dc2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x474dc2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x21b587=super['_createCommentInputView']();return _0x21b587['bind']('placeholder')['to'](this),_0x21b587;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0xb0dd0){const _0x3b9c66=_0x17f62c(_0xb0dd0,0x1e),_0xa76c01=new MutationObserver(_0x2d3521=>{for(const _0x24d914 of _0x2d3521)('attributes'==_0x24d914['type']&&'class'==_0x24d914['attributeName']||'childList'==_0x24d914['type']||'characterData'==_0x24d914['type'])&&_0x3b9c66();});return{'attach'(_0x40881d){_0xa76c01['observe'](_0x40881d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xa76c01['disconnect'](),_0x3b9c66['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x55bbeb,_0x33e634){super(_0x55bbeb),this['id']=_0x4ff4e9(),this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['keystrokes']['set']('Esc',(_0x1b21c6,_0xe279e9)=>this['fire']('Esc',_0xe279e9)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x33e634),this['mainView']=_0x33e634;const _0x261d6c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x261d6c['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 _0x1cb6e5=this['element']['clientHeight'];_0x1cb6e5&&(this['height']=_0x1cb6e5);}};const jt=/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x4f4856();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3a1036,target:_0x2b475f,type:_0x554d91,isVisible:_0x222c15=!0x0}){super(),this['view']=_0x3a1036,this['view']['element']||this['view']['render'](),this['_type']=_0x554d91,this['_target']=_0x2b475f,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1d3c5e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1ba863,_0xd299cf)=>{this['view']['focusTracker']['add'](_0xd299cf);}),this['focusableElements']['on']('remove',(_0x1364d4,_0x69f047)=>{this['view']['focusTracker']['remove'](_0x69f047);}),this['set']('isVisible',_0x222c15);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x56842a=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x56842a),_0x56842a;}get['targetRect'](){const _0x25a390=this['target'];if(null===_0x25a390)return null;if(_0x25a390 instanceof _0x3f41c9)return _0x25a390;const _0x28e9a9=_0x25a390['filter'](_0x310ba0=>function(_0x177aac){return!!_0x177aac['offsetParent']||!!_0x177aac['getClientRects']()['item'](0x0);}(_0x310ba0));return 0x0===_0x28e9a9['length']?null:_0x3f41c9['getDomElementRects'](_0x28e9a9[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1cd855){this['view']['isActive']=_0x1cd855,this['view']['mainView']['isActive']=_0x1cd855;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x37f22a){if(!(null===_0x37f22a||_0x37f22a instanceof _0x3f41c9||Array['isArray'](_0x37f22a)&&_0x37f22a['every'](_0x3f51be=>zt(_0x3f51be))))throw new _0x460944('annotation-invalid-target',null,{'target':_0x37f22a});}['_getNormalizedTarget'](){const _0x171e7b='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x171e7b)?[_0x171e7b]:_0x171e7b;}};function zt(_0x19fa7c){return null!==_0x19fa7c&&'object'==typeof _0x19fa7c&&'nodeType'in _0x19fa7c&&0x1===_0x19fa7c['nodeType'];}var Jt=class extends _0x1d3c5e{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x53fd5d=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x46cfaf(),this['_focusTracker']['on']('change:isFocused',(_0x241bc5,_0x2ca7eb,_0x18e89f)=>{_0x18e89f||this['fire']('blur');});for(const _0x19df96 of _0x53fd5d)this['add'](_0x19df96);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3a9288){if(this['has'](_0x3a9288))throw new _0x460944('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3a9288['innerView'],_0x3a9288),this['_viewToAnnotation']['set'](_0x3a9288['view'],_0x3a9288);for(const _0x1a12d5 of _0x3a9288['focusableElements'])this['_focusTracker']['add'](_0x1a12d5);if(this['listenTo'](_0x3a9288['focusableElements'],'add',(_0x30ed70,_0x3004c3)=>{this['_focusTracker']['add'](_0x3004c3);}),this['listenTo'](_0x3a9288['focusableElements'],'remove',(_0x535a8b,_0x5d3073)=>{this['_focusTracker']['remove'](_0x5d3073);}),this['listenTo'](_0x3a9288['view']['focusTracker'],'change:isFocused',(_0x28f5d9,_0x528f86,_0x155003)=>{_0x155003&&this['fire']('focus',_0x3a9288);}),_0x3a9288['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x10e392 of this)_0x10e392['updateTargetRect']();}const _0x32571d=this['_getOrderInContent'](_0x3a9288['view']['targetRect']);return super['add'](_0x3a9288,_0x32571d);}['remove'](_0x55405e){if(!this['has'](_0x55405e))throw new _0x460944('annotationcollection-not-existing-item',null);this['stopListening'](_0x55405e['view']['focusTracker']),this['stopListening'](_0x55405e['focusableElements']);for(const _0x122a2d of _0x55405e['focusableElements'])this['_focusTracker']['remove'](_0x122a2d);return this['_viewToAnnotation']['delete'](_0x55405e['view']),this['_innerViewToAnnotation']['delete'](_0x55405e['innerView']),super['remove'](_0x55405e);}['getByInnerView'](_0x13993c){return this['_innerViewToAnnotation']['get'](_0x13993c);}['getByView'](_0x563103){return this['_viewToAnnotation']['get'](_0x563103);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x44ba46 of this)_0x44ba46['updateTargetRect']();this['_sort']();}['_sort'](){const _0x45b55=Array['from'](this)['sort']((_0x4bd9d6,_0x27edec)=>Zt(_0x4bd9d6['view']['targetRect'],_0x27edec['view']['targetRect']));for(let _0xedf91d=_0x45b55['length']-0x1;_0xedf91d>0x0;_0xedf91d--){const _0x47f137=_0x45b55[_0xedf91d];_0xedf91d!==this['getIndex'](_0x47f137)&&(this['remove'](_0x47f137),this['add'](_0x47f137));}}['_getOrderInContent'](_0x2795af){let _0x1b2872=0x0;if(!_0x2795af)return this['length'];for(const _0x47cbfe of this){const _0x444264=_0x47cbfe['view']['targetRect'];if(_0x444264){if(Zt(_0x2795af,_0x444264)<0x0)return _0x1b2872;_0x1b2872++;}}return _0x1b2872;}['_areCachedRectsStale'](){const _0x135955=this['get'](0x0);if(!_0x135955)return!0x1;const _0x2c5bb1=_0x135955['view']['targetRect'],_0x16e21a=_0x135955['targetRect'];return!(!_0x2c5bb1||!_0x16e21a)&&(_0x2c5bb1['top']!==_0x16e21a['top']||_0x2c5bb1['left']!==_0x16e21a['left']);}};function Qt({source:_0x334f1c,target:_0x194053,filter:_0x4aa610}){for(const _0x2103ad of _0x334f1c)_0x4aa610(_0x2103ad)&&_0x194053['add'](_0x2103ad);_0x194053['listenTo'](_0x334f1c,'add',(_0x468599,_0x1079c7)=>{_0x4aa610(_0x1079c7)&&_0x194053['add'](_0x1079c7);}),_0x194053['listenTo'](_0x334f1c,'remove',(_0x21e59b,_0x2ab17e)=>{_0x194053['has'](_0x2ab17e)&&_0x194053['remove'](_0x2ab17e);});}function Zt(_0x1b5159,_0x1b4dc2){if(null===_0x1b5159&&null===_0x1b4dc2)return 0x0;if(null===_0x1b5159)return-0x1;if(null===_0x1b4dc2)return 0x1;const _0x25924d=_0x1b5159['top']-_0x1b4dc2['top'];return 0x0==_0x25924d?_0x1b5159['left']-_0x1b4dc2['left']:_0x25924d;}var ti=class extends _0x5d945e{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x122b18){if(super(_0x122b18),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x122b18 instanceof _0x8c9b70){const _0x589a94=_0x122b18['locale'];_0x122b18['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4a0a73){this['collection']['add'](_0x4a0a73);}['remove'](_0x5bc3e2){this['collection']['remove'](_0x5bc3e2),_0x5bc3e2['destroy']();}['refreshVisibility'](){for(const _0x23c9de of this['collection'])_0x23c9de['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1f3cdc){return this['collection']['getByInnerView'](_0x1f3cdc);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x217e62 of this['collection'])_0x217e62['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x49decc){this['fire']('_activateAnnotation',_0x49decc);}['createAnnotation'](_0x3547dd){return new $t(_0x3547dd);}['createAnnotationView'](_0x5e875e,_0x26dac7){return new qt(_0x5e875e,_0x26dac7);}['_addActiveAnnotation'](_0x4bc73d){const _0x39b5ed=new Set(this['activeAnnotations']);_0x39b5ed['add'](_0x4bc73d),this['activeAnnotations']=_0x39b5ed;}['_removeActiveAnnotation'](_0x2551a5){const _0x52f468=new Set(this['activeAnnotations']);_0x52f468['delete'](_0x2551a5),this['activeAnnotations']=_0x52f468;}['_bindAnnotationsToVisibleAnnotations'](){const _0x269f6f=this['collection'],_0x497aff=this['_visibleAnnotations'];function _0x5d2a7d(_0x2827a3){const _0x32cd6d=_0x2827a3['source'];_0x32cd6d['isVisible']&&!_0x497aff['has'](_0x32cd6d)?_0x497aff['add'](_0x32cd6d):!_0x32cd6d['isVisible']&&_0x497aff['has'](_0x32cd6d)&&_0x497aff['remove'](_0x32cd6d),_0x32cd6d['view']['focusTracker']['remove'](_0x32cd6d['view']['element']),_0x32cd6d['view']['focusTracker']['add'](_0x32cd6d['view']['element']);}this['listenTo'](_0x269f6f,'add',(_0x89dce0,_0x141bdf)=>{_0x141bdf['isVisible']&&_0x497aff['add'](_0x141bdf),this['listenTo'](_0x141bdf,'change:isVisible',_0x5d2a7d);}),this['listenTo'](_0x269f6f,'remove',(_0x1cb60a,_0x4b4da3)=>{_0x497aff['has'](_0x4b4da3)&&_0x497aff['remove'](_0x4b4da3),this['stopListening'](_0x4b4da3,'change:isVisible',_0x5d2a7d);});}['_setupEnterAnnotationKeystroke'](){const _0x11d9e5=_0x3b2fca=>{_0x3b2fca['on']('ready',()=>{_0x3b2fca['keystrokes']['set'](_0x4e8a21,(_0x430587,_0x37f283)=>{const _0x418479=_0x1a2afb(this['activeAnnotations']['values']());_0x418479&&(_0x418479['view']['focus'](),_0x37f283());});});};this['context']instanceof _0x8c9b70?_0x11d9e5(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x569376,_0x5a4d54)=>{_0x11d9e5(_0x5a4d54);});}['_setupEscapeAnnotationHandling'](){const _0x7d781=_0x3b3e8e=>{const _0x5eb3ca=_0x3b3e8e['source'],_0x4598cc=[];let _0x2adad9;if(Array['isArray'](_0x5eb3ca['target'])){_0x2adad9=_0x5eb3ca['target'][0x0],this['context']instanceof _0x8c9b70?_0x4598cc['push'](this['context']):this['context']['editors']&&_0x4598cc['push'](...this['context']['editors']);for(const _0x1edfc8 of _0x4598cc)for(const _0x168984 of _0x1edfc8['editing']['view']['domRoots']['values']())if(_0x168984['contains'](_0x2adad9))return void _0x1edfc8['editing']['view']['focus']();_0x2adad9['focus']();}};this['listenTo'](this['collection'],'add',(_0x4a1eb1,_0x16f043)=>{this['listenTo'](_0x16f043,'escape',_0x7d781,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x53f1e1,_0x14afe3)=>{this['stopListening'](_0x14afe3,'escape',_0x7d781);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4f4856(),ni=/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x4f4856();var oi=class extends _0x5d945e{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x4019cf,_0x5d61c1];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x27c564){super(_0x27c564),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5d2086=this['context']['config'];_0x5d2086['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5d2086['define']('comments.maxThreadTotalWeight',0x1f4),_0x5d2086['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5d2086['define']('comments.CommentThreadView',Ut),_0x5d2086['define']('comments.CommentView',Yt),_0x5d2086['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4d885e=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x20382f,_0x49c43c)=>this['_addCommentThread'](_0x49c43c)),this['on']('submitCommentThread',(_0x4b20d5,_0x166e63)=>this['_submitCommentThread'](_0x166e63)),this['on']('resolveCommentThread',(_0x17bc49,_0x18a096)=>this['_resolveCommentThread'](_0x18a096)),this['on']('resolveCommentThread',(_0x558800,_0x31e1c2)=>this['_updateActiveAnnotation'](_0x31e1c2),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x57f57c,_0x58c645)=>this['_reopenCommentThread'](_0x58c645)),this['on']('reopenCommentThread',(_0xa0886,_0x2662b2)=>this['_updateActiveAnnotation'](_0x2662b2),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3fc8fc,_0x184a94)=>this['_removeCommentThread'](_0x184a94)),this['on']('updateCommentThread',(_0x2d21aa,_0x5af93e)=>this['_updateCommentThread'](_0x5af93e)),this['on']('updateCommentThread',(_0x7808a0,_0x2603b0)=>this['_updateActiveAnnotation'](_0x2603b0),{'priority':'lowest'}),this['on']('addComment',(_0x46fb25,_0x20364f)=>this['_addComment'](_0x20364f)),this['on']('updateComment',(_0x298419,_0xd96fb6)=>this['_updateComment'](_0xd96fb6)),this['on']('removeComment',(_0x2baf26,_0x5ce2b1)=>this['_removeComment'](_0x5ce2b1)),this['on']('addComment',(_0x3b2938,{threadId:_0x20c2c9,isFromAdapter:_0x2b5463})=>{if(_0x2b5463)return;const _0x4e5b0d=this['getCommentThread'](_0x20c2c9),_0x19655f=_0x4e5b0d&&this['_threadToController']['get'](_0x4e5b0d);_0x19655f&&_0x19655f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4d885e,'change:activeAnnotations',(_0x1fe4a0,_0x18157a,_0x4364c8)=>{const _0x465be1=Array['from'](_0x4364c8)['map'](_0x31d11e=>this['_viewToController']['get'](_0x31d11e['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x465be1?_0x465be1['model']:null;});}set['adapter'](_0x1bd9db){if(this['_adapter'])throw new _0x460944('commentsrepository-adapter-already-set');this['_adapter']=_0x1bd9db;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3ba01f=ii,threadId:_0x45b9b5=_0x4ff4e9(),comments:_0x5cd4a0=[],unlinkedAt:_0x2e7fac=null,resolvedAt:_0x58da71=null,resolvedBy:_0x459a20=null,target:_0x5d8f9c=null,context:_0x5a2450=null,attributes:_0x541cad={},isResolvable:_0x50b5e2=!0x0,isSubmitted:_0x7641c9=!0x1,isFromAdapter:_0x5e722c=!0x1}={}){return this['fire'](ai('addCommentThread',_0x3ba01f),{'channelId':_0x3ba01f,'threadId':_0x45b9b5,'comments':_0x5cd4a0,'unlinkedAt':_0x2e7fac,'resolvedAt':_0x58da71,'resolvedBy':_0x459a20,'target':_0x5d8f9c,'context':_0x5a2450,'attributes':_0x541cad,'isFromAdapter':_0x5e722c,'isResolvable':_0x50b5e2,'isSubmitted':_0x7641c9}),this['getCommentThread'](_0x45b9b5);}['openNewCommentThread']({channelId:_0x5afac6=ii,threadId:_0x4d5095=_0x4ff4e9(),target:_0x100565,context:_0x23f866=null,isResolvable:_0x2a7782=!0x0}){if(this['_readOnlyChannels']['has'](_0x5afac6)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x100565)throw new _0x460944('commentsrepository-missing-target');const _0x3ddf97=this['addCommentThread']({'channelId':_0x5afac6,'threadId':_0x4d5095,'target':_0x100565,'context':_0x23f866,'isResolvable':_0x2a7782});if(!_0x3ddf97)return null;const _0x1b71f2=this['_threadToController']['get'](_0x3ddf97),_0x3dadfd=_0x1b71f2['view']['commentThreadInputView']['commentInputView'],_0x15fc39=this['context']['plugins']['get'](ti),_0x498e91=_0x15fc39['getByInnerView'](_0x1b71f2['view']);return _0x15fc39['activate'](_0x498e91),_0x3dadfd['once']('editorReady',()=>_0x3dadfd['focus']()),_0x3ddf97;}['hasCommentThread'](_0x172298){if('string'!=typeof _0x172298)throw new _0x460944('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x172298);}['updateCommentThread']({channelId:_0x974ae6=ii,threadId:_0x39b369,context:_0x2b8ba3,unlinkedAt:_0x158c61,attributes:_0x4d1b0d,isFromAdapter:_0x49ebbf=!0x1}){return this['fire'](ai('updateCommentThread',_0x974ae6),{'channelId':_0x974ae6,'threadId':_0x39b369,'context':_0x2b8ba3,'unlinkedAt':_0x158c61,'attributes':_0x4d1b0d,'isFromAdapter':_0x49ebbf}),this['getCommentThread'](_0x39b369);}['getCommentThread'](_0x5a1335){if('string'!=typeof _0x5a1335)throw new _0x460944('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5a1335);}['fetchCommentThread']({channelId:_0x14ddfb,threadId:_0x135e28}={}){const _0x27f9e3=this['getCommentThread'](_0x135e28);if(_0x27f9e3)return Promise['resolve'](_0x27f9e3);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x460944('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x14ddfb,'threadId':_0x135e28})['then'](_0x35113a=>this['hasCommentThread'](_0x135e28)?this['getCommentThread'](_0x135e28):_0x35113a?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x14ddfb},_0x35113a)):void 0x0)['catch'](_0x57dcd3=>{throw console['error'](_0x57dcd3),new _0x460944('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x25ea81,skipNotAttached:_0x35ad2f=!0x1,skipEmpty:_0x3dcc3d=!0x1,toJSON:_0x2d19ac=!0x1}={}){const _0x101399=[];for(const _0x1a5a42 of this['_threads']['values']())_0x25ea81&&_0x1a5a42['channelId']!==_0x25ea81||_0x35ad2f&&!_0x1a5a42['isAttached']||_0x3dcc3d&&0x0===_0x1a5a42['length']||_0x101399['push'](_0x1a5a42);return _0x2d19ac?_0x101399['map'](_0x5b7838=>_0x5b7838['toJSON']()):_0x101399;}['getAnnotationForCommentThread'](_0x1a3136){const _0x4bca85=this['_threadToController']['get'](_0x1a3136);return _0x4bca85&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x4bca85['view'])||null;}['getCommentThreadForAnnotation'](_0x155a04){const _0x5cc7d7=this['_viewToController']['get'](_0x155a04['innerView']);return _0x5cc7d7?_0x5cc7d7['model']:null;}['setActiveCommentThread'](_0x14ba3f){const _0x5411a2=this['context']['plugins']['get'](ti);if(!_0x14ba3f)return void(this['activeCommentThread']&&_0x5411a2['deactivateAll']());const _0x516ed2=this['getCommentThread'](_0x14ba3f);if(!_0x516ed2)throw new _0x460944('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x14ba3f});if(!this['_threadToController']['has'](_0x516ed2))throw new _0x460944('commentsrepository-active-not-attached',null,{'threadId':_0x14ba3f});const _0x35df2b=_0x5411a2['getByInnerView'](this['_threadToController']['get'](_0x516ed2)['view']);_0x5411a2['activate'](_0x35df2b);}['switchReadOnly'](_0x5a6656,_0x363e25){_0x5a6656?this['_readOnlyChannels']['add'](_0x363e25):this['_readOnlyChannels']['delete'](_0x363e25),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x201cbf){return this['_readOnlyChannels']['has'](_0x201cbf)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x333abe,_0x51e2fe){return new bt(_0x333abe,_0x51e2fe);}['setPermissions'](_0x4f95d0,_0x2d83d5=ii){this['_permissions']['set'](_0x2d83d5,_0x4f95d0),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x30b611=ii){return this['_permissions']['has'](_0x30b611)?this['_permissions']['get'](_0x30b611):ei;}['_addCommentThread']({channelId:_0x8f635a,threadId:_0x22c83e,comments:_0x1101de,unlinkedAt:_0x1d21cd,resolvedAt:_0x5a1748,resolvedBy:_0x44701f,target:_0x30291a,context:_0x4b789c,attributes:_0x39594a,isFromAdapter:_0x179852,isResolvable:_0xbc433c,isSubmitted:_0x8d16ac}){if('string'!=typeof _0x22c83e)throw new _0x460944('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x22c83e});if(this['hasCommentThread'](_0x22c83e))throw new _0x460944('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x22c83e});const _0x94b4e7=new ri(this,{'channelId':_0x8f635a,'id':_0x22c83e,'context':_0x4b789c,'attributes':_0x39594a,'unlinkedAt':_0x1d21cd,'resolvedAt':_0x5a1748,'resolvedBy':_0x44701f?this['context']['plugins']['get'](_0x5d61c1)['getUser'](_0x44701f):null,'isResolvable':_0xbc433c,'isSubmitted':_0x8d16ac||_0x179852});this['_threads']['set'](_0x22c83e,_0x94b4e7);for(const _0x5b8b97 of _0x1101de)_0x94b4e7['_add'](this['_createNewComment']({'threadId':_0x22c83e,..._0x5b8b97}));return _0x30291a&&_0x94b4e7['attachTo'](_0x30291a),_0x179852||!_0x94b4e7['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x8f635a,'threadId':_0x22c83e});}['_submitCommentThread']({channelId:_0x2ce4f7,threadId:_0x271c4e}){if(!this['hasCommentThread'](_0x271c4e))throw new _0x460944('commentsrepository-missing-comment-thread',this);const _0x2e2860=this['getCommentThread'](_0x271c4e);if(_0x2e2860['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x290b6a,comments:_0xaf6a88,resolvedAt:_0x3eb9ee,resolvedBy:_0x26fc8a,context:_0x5b1402,attributes:_0x11aa9b}=_0x2e2860,_0x6b0c5b=this['context']['plugins']['get']('PendingActions'),_0x333678=_0x6b0c5b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2ce4f7,'threadId':_0x290b6a,'comments':_0xaf6a88['map'](_0x48cad1=>_0x48cad1['toJSON']()),'resolvedAt':_0x3eb9ee,'resolvedBy':_0x26fc8a?_0x26fc8a['id']:_0x26fc8a,'context':_0x5b1402,'attributes':_0x11aa9b})['then'](({comments:_0x283820})=>{_0x6b0c5b['remove'](_0x333678);for(const _0x25f4d9 of _0x283820)this['_updateComment']({'channelId':_0x2ce4f7,'threadId':_0x271c4e,'commentId':_0x25f4d9['commentId'],'createdAt':_0x25f4d9['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x7865e0=>{throw console['error'](_0x7865e0),new _0x460944('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x54cd8a,target:_0x42475c}){const _0x338cf7=this['getCommentThread'](_0x54cd8a);if(!_0x338cf7)throw new _0x460944('commentsrepository-attach-missing-comment-thread',this);const _0x28f52a=this['context']['plugins']['get']('PendingActions'),_0x4ce622=this['context']['plugins']['get'](ti),_0x5d1eb6=this['_createCommentThreadView'](_0x338cf7),_0x27374b=new bt(_0x338cf7,_0x5d1eb6);let _0x13cec0=null;_0x5d1eb6['on']('change:isDirty',(_0x2a8205,_0xc84226,_0x502c6a)=>{_0x502c6a?_0x13cec0=_0x28f52a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x13cec0&&(_0x28f52a['remove'](_0x13cec0),_0x13cec0=null);}),this['_threadToController']['set'](_0x338cf7,_0x27374b),this['_viewToController']['set'](_0x5d1eb6,_0x27374b);const _0x291f0f=new qt(this['context']['locale'],_0x5d1eb6);_0x291f0f['bind']('length')['to'](_0x5d1eb6),_0x291f0f['bind']('isDirty')['to'](_0x5d1eb6,'isDirty',_0x5d1eb6,'length',(_0x44a78e,_0x15e4c0)=>_0x44a78e||!_0x15e4c0),_0x291f0f['bind']('isActive')['to'](_0x5d1eb6),_0x291f0f['type']='comment';const _0xa14c4f=new $t({'view':_0x291f0f,'target':_0x42475c,'type':'comment','isVisible':!_0x338cf7['archivedAt']&&!!('function'==typeof _0x42475c?_0x42475c():_0x42475c)});return _0x5d1eb6['on']('escape',()=>{_0xa14c4f['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5d1eb6,_0xa14c4f),_0x4ce622['add'](_0xa14c4f),_0xa14c4f;}['_bindAnnotationToEditors'](_0x313683,_0x576f86){this['listenTo'](_0x313683,'editorReady',(_0x4e1265,_0x49f927)=>{const _0x11093a=_0x49f927['ui']['view']['body']['bodyCollectionContainer'];_0x576f86['focusableElements']['add'](_0x11093a),this['context']instanceof _0x8c9b70&&this['context']['ui']['focusTracker']['add'](_0x11093a);},{'priority':'highest'}),this['listenTo'](_0x313683,'editorDestroyed',(_0x597612,_0x476cfe)=>{const _0x125ed6=_0x476cfe['ui']['view']['body']['bodyCollectionContainer'];_0x576f86['focusableElements']['has'](_0x125ed6)&&_0x576f86['focusableElements']['remove'](_0x125ed6),this['context']instanceof _0x8c9b70&&this['context']['ui']['focusTracker']['remove'](_0x125ed6);});}['_unbindEditors'](_0x3860b0){this['stopListening'](_0x3860b0,'editorReady'),this['stopListening'](_0x3860b0,'editorDestroyed');}['_createCommentThreadView'](_0x563a61){const _0x321ecb=this['context']['plugins']['get'](_0x5d61c1),{config:_0xb4ae0a,locale:_0xbf1e0}=this['context'],_0x10fefd=_0x5b4e92(_0xb4ae0a['get']('locale'),_0xbf1e0);return new(0x0,(_0xb4ae0a['get']('comments'))['CommentThreadView'])(_0xbf1e0,_0x563a61,_0x321ecb['me'],{'editorConfig':{..._0xb4ae0a['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xb4ae0a['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xb4ae0a['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xb4ae0a['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xb4ae0a['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x10fefd,'CommentView':_0xb4ae0a['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x36d6ac,channelId:_0x161f3f,resolvedAt:_0x424123,resolvedBy:_0x315ccc,isFromAdapter:_0x357fbf}){if(!this['hasCommentThread'](_0x36d6ac))throw new _0x460944('commentsrepository-missing-comment-thread',null,{'threadId':_0x36d6ac});const _0x207d7f=this['getCommentThread'](_0x36d6ac);if(_0x207d7f['isResolved'])throw new _0x460944('commentsrepository-resolved-comment-thread',null,{'threadId':_0x36d6ac});const _0x2c7882=this['context']['plugins']['get'](_0x5d61c1);if(_0x207d7f['resolvedBy']=_0x2c7882['getUser'](_0x315ccc),_0x207d7f['resolvedAt']=_0x424123,_0x357fbf||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1be579=this['context']['plugins']['get']('PendingActions'),_0x448d17=_0x1be579['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x161f3f,'threadId':_0x36d6ac})['then'](({resolvedAt:_0x54fc7d,resolvedBy:_0xe6bf8a})=>{_0x1be579['remove'](_0x448d17),_0x207d7f['resolvedBy']['id']!==_0xe6bf8a&&(_0x207d7f['resolvedBy']=_0x2c7882['getUser'](_0xe6bf8a)),_0x207d7f['resolvedAt']=_0x54fc7d;})['catch'](_0x17bb95=>{throw console['error'](_0x17bb95),new _0x460944('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0xd87127,channelId:_0x9ba8c,isFromAdapter:_0x5e399e}){if(!this['hasCommentThread'](_0xd87127))throw new _0x460944('commentsrepository-missing-comment-thread',null,{'threadId':_0xd87127});const _0x228a79=this['getCommentThread'](_0xd87127);if(!_0x228a79['isResolved'])throw new _0x460944('commentsrepository-reopen-comment-thread',null,{'threadId':_0xd87127});if(_0x228a79['resolvedBy']=null,_0x228a79['resolvedAt']=null,_0x5e399e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1d8126=this['context']['plugins']['get']('PendingActions'),_0x35aa99=_0x1d8126['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x9ba8c,'threadId':_0xd87127})['then'](()=>_0x1d8126['remove'](_0x35aa99))['catch'](_0x58b2e1=>{throw console['error'](_0x58b2e1),new _0x460944('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2648e2,isFromAdapter:_0x341e94}){const _0x485c71=this['getCommentThread'](_0x2648e2);if(!_0x485c71)throw new _0x460944('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2648e2),this['_threads']['delete'](_0x2648e2),!_0x485c71['isSubmitted']||_0x341e94||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x25c4fe=this['context']['plugins']['get']('PendingActions'),{channelId:_0x428c00}=_0x485c71,_0x3f903c=_0x25c4fe['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x428c00,'threadId':_0x2648e2})['then'](()=>_0x25c4fe['remove'](_0x3f903c))['catch'](_0xc8620c=>{throw console['error'](_0xc8620c),new _0x460944('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4ebe43,unlinkedAt:_0x3988fe,context:_0x301d2c,attributes:_0x5631d6,isFromAdapter:_0x1dbf54}){if('string'!=typeof _0x4ebe43)throw new _0x460944('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4ebe43});if(!this['hasCommentThread'](_0x4ebe43))throw new _0x460944('commentsrepository-missing-comment-thread',null,{'threadId':_0x4ebe43});const _0x536ed4=this['getCommentThread'](_0x4ebe43);let _0x8ea661=!0x1;if(void 0x0!==_0x301d2c&&_0x536ed4['context']!==_0x301d2c&&(_0x536ed4['context']=_0x301d2c,_0x8ea661=!0x0),void 0x0!==_0x3988fe&&_0x536ed4['unlinkedAt']!==_0x3988fe&&(_0x536ed4['unlinkedAt']=_0x3988fe,_0x8ea661=!0x0),_0x5631d6&&!_0x440498(_0x5631d6,_0x536ed4['attributes'])&&(_0x536ed4['attributes']=_0x5631d6,_0x8ea661=!0x0),!_0x8ea661)return Promise['resolve']();if(!_0x536ed4['isSubmitted']||_0x1dbf54||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4cd8e7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3886b7}=_0x536ed4,_0x3d3d27=_0x4cd8e7['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3886b7,'threadId':_0x4ebe43,'context':_0x301d2c,'unlinkedAt':_0x3988fe,'attributes':_0x5631d6})['then'](()=>_0x4cd8e7['remove'](_0x3d3d27))['catch'](_0x26b681=>{throw console['error'](_0x26b681),new _0x460944('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x6c0cf5){const _0x524401=this['context']['plugins']['get'](ti),_0xd5d2d4=this['getCommentThread'](_0x6c0cf5);if(_0xd5d2d4['_isAttached']=!0x1,this['_threadToController']['has'](_0xd5d2d4)){const _0x481f4=this['_threadToController']['get'](_0xd5d2d4),_0x3a8983=_0x481f4['view'],_0x56bc93=_0x524401['getByInnerView'](_0x3a8983);this['_threadToController']['delete'](_0xd5d2d4),this['_viewToController']['delete'](_0x3a8983),_0x56bc93&&_0x524401['remove'](_0x56bc93),_0x481f4['destroy'](),_0x3a8983['destroy']()['then'](()=>{this['_unbindEditors'](_0x3a8983);});}}['_updateActiveAnnotation']({threadId:_0x314c27,resolvedAt:_0x51a036,unlinkedAt:_0xc11b7a}){const _0x4b5391=!!_0x51a036,_0x157aa7=this['context']['plugins']['get'](ti),_0x45d902=this['getCommentThread'](_0x314c27);if(this['_threadToController']['has'](_0x45d902)){const _0x4f2fef=this['_threadToController']['get'](_0x45d902)['view'],_0x2cbadb=_0x157aa7['getByInnerView'](_0x4f2fef);_0x2cbadb&&(_0x4b5391&&_0x157aa7['_removeActiveAnnotation'](_0x2cbadb),_0xc11b7a?_0x2cbadb['isVisible']=!0x1:_0x2cbadb['refreshVisibility']());}}['_getExternalAuthor'](_0x27a6ae){const _0x258a05=this['context']['plugins']['get'](_0x5d61c1),_0x485504=_0x5ab5a3('external:'+_0x27a6ae),_0x4c685b=_0x258a05['getUser'](_0x485504);return _0x4c685b||_0x258a05['addUser']({'id':_0x485504,'name':_0x27a6ae});}['_createNewComment']({threadId:_0x5a5d10,commentId:_0x267bfc=_0x4ff4e9(),content:_0x366901,authorId:_0x1271cb,createdAt:_0x3d9381,attributes:_0x186c04}){if('string'!=typeof _0x267bfc)throw new _0x460944('commentsrepository-invalid-commentid');if('string'!=typeof _0x1271cb)throw new _0x460944('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x366901||!_0x366901['trim']())throw new _0x460944('commentsrepository-invalid-comment-content');const _0x5e992c=this['context']['plugins']['get'](_0x5d61c1)['getUser'](_0x1271cb);if(!_0x5e992c)throw new _0x460944('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1271cb});let _0x318f33=null,_0x4567a9=_0x3d9381;return _0x186c04?.['@external']&&(_0x318f33=this['_getExternalAuthor'](_0x186c04['@external']['authorName']),_0x4567a9=new Date(_0x186c04['@external']['createdAt'])),new hi(this,{'threadId':_0x5a5d10,'id':_0x267bfc,'author':_0x318f33||_0x5e992c,'creator':_0x5e992c,'content':_0x366901,'createdAt':_0x3d9381,'authoredAt':_0x4567a9,'attributes':_0x186c04});}['_addComment'](_0x570400){let {threadId:_0x5bad59,content:_0x37ecf9,attributes:_0x1cda9a,isFromAdapter:_0x15f8cb}=_0x570400;const _0x4c8a5f=this['getCommentThread'](_0x570400['threadId']);if(!_0x4c8a5f)throw new _0x460944('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x7157c9=this['_createNewComment'](_0x570400),{id:_0xe43a60}=_0x7157c9;if(_0x4c8a5f['_add'](_0x7157c9),_0x15f8cb||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4c8a5f['isSubmitted'])return Promise['resolve']();const _0x299b7d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x69c78c}=_0x4c8a5f,_0x3a1049=_0x299b7d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1cda9a||(_0x1cda9a={}),this['adapter']['addComment']({'channelId':_0x69c78c,'threadId':_0x5bad59,'commentId':_0xe43a60,'content':_0x37ecf9,'attributes':_0x1cda9a})['then'](_0x3900fe=>{_0x299b7d['remove'](_0x3a1049),_0x3900fe&&this['_updateComment']({'channelId':_0x69c78c,'threadId':_0x5bad59,'commentId':_0xe43a60,'createdAt':_0x3900fe['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3d890b=>{throw console['error'](_0x3d890b),new _0x460944('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x17410e,commentId:_0x275c12,content:_0x14d6b2,createdAt:_0x4230f5,attributes:_0x1a2884,isFromAdapter:_0x31c31e}){if(void 0x0!==_0x14d6b2&&('string'!=typeof _0x14d6b2||!_0x14d6b2['trim']()['length']))throw new _0x460944('commentsrepository-update-comment-invalid-content');const _0x5a42c2=this['getCommentThread'](_0x17410e),_0x5d51f6=_0x5a42c2['getComment'](_0x275c12);if(!_0x5d51f6)throw new _0x460944('commentsrepository-update-missing-comment',this);let _0x3591ba=!0x1;if(_0x14d6b2&&_0x14d6b2!==_0x5d51f6['content']&&(_0x5d51f6['isEditable']||_0x31c31e)&&(_0x5d51f6['content']=_0x14d6b2,_0x3591ba=!0x0),_0x4230f5&&_0x4230f5!==_0x5d51f6['createdAt']&&(_0x5d51f6['createdAt']=_0x4230f5,_0x5d51f6['isExternal']||(_0x5d51f6['authoredAt']=_0x4230f5),_0x3591ba=!0x0),_0x1a2884&&!_0x440498(_0x1a2884,_0x5d51f6['attributes'])&&(_0x5d51f6['attributes']=_0x1a2884,_0x3591ba=!0x0),!_0x3591ba)return Promise['resolve']();if(_0x5a42c2['fire']('commentUpdated'),_0x31c31e||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5a430d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x45760d}=this['getCommentThread'](_0x5d51f6['threadId']),_0x107a66=_0x5a430d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x45760d,'threadId':_0x17410e,'commentId':_0x275c12,'content':_0x14d6b2,'attributes':_0x1a2884})['then'](()=>_0x5a430d['remove'](_0x107a66))['catch'](_0x43f147=>{throw console['error'](_0x43f147),new _0x460944('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3bdd47,commentId:_0x31f638,isFromAdapter:_0x26dba4}){const _0x4608e0=this['getCommentThread'](_0x3bdd47),_0x44e995=_0x4608e0['getComment'](_0x31f638);if(!_0x44e995)throw new _0x460944('commentsrepository-remove-missing-comment',this);if(_0x4608e0['_remove'](_0x44e995),_0x26dba4||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2e9546=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d588d}=_0x4608e0,_0xd10c9=_0x2e9546['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3d588d,'threadId':_0x3bdd47,'commentId':_0x31f638})['then'](()=>_0x2e9546['remove'](_0xd10c9))['catch'](_0x4467f3=>{throw console['error'](_0x4467f3),new _0x460944('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x70eb2c,_0x5a4bcf){super();const _0x5e12aa=_0x5a4bcf['isResolvable'];this['channelId']=_0x5a4bcf['channelId'],this['id']=_0x5a4bcf['id'],this['comments']=new _0x1d3c5e(),this['_repository']=_0x70eb2c,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5a4bcf['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x70eb2c,'_permissions',_0x70eb2c,'_readOnlyChannels',()=>_0x70eb2c['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x70eb2c,'_permissions',()=>_0x70eb2c['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x70eb2c,'_permissions',()=>{const _0x8de44=_0x70eb2c['getPermissions'](this['channelId']);return _0x8de44['write']||_0x8de44['admin'];}),this['bind']('isResolvable')['to'](_0x70eb2c,'_permissions',()=>_0x5e12aa&&_0x70eb2c['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5a4bcf['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0xd9d9db,_0x76fa27)=>_0xd9d9db?_0x76fa27?_0xd9d9db<_0x76fa27?_0xd9d9db:_0x76fa27:_0xd9d9db:_0x76fa27),this['set']('unlinkedAt',_0x5a4bcf['unlinkedAt']||null),this['set']('resolvedAt',_0x5a4bcf['resolvedAt']||null),this['set']('resolvedBy',_0x5a4bcf['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1aacd2=>!!_0x1aacd2),this['set']('attributes',_0x5a4bcf['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x4d8740,_0x4db0cc)=>_0x4d8740+_0x4db0cc['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x10a4ff,id:_0x998ad}=this;this['_repository']['fire'](ai('submitCommentThread',_0x10a4ff),{'channelId':_0x10a4ff,'threadId':_0x998ad});}['setUnlinkedAt'](_0x400c43){this['_update']({'unlinkedAt':_0x400c43});}['resolve']({resolvedAt:_0x5897bb=new Date(),resolvedBy:_0x26c599='',isFromAdapter:_0x156747=!0x1}={}){const _0x4fd281=this['_repository']['context']['plugins']['get'](_0x5d61c1)['me'],{channelId:_0x3166af,id:_0x54f193}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x3166af),{'channelId':_0x3166af,'threadId':_0x54f193,'resolvedAt':_0x5897bb,'resolvedBy':_0x26c599||_0x4fd281['id'],'isFromAdapter':_0x156747});}['reopen']({isFromAdapter:_0x36ddf0=!0x1}={}){const {channelId:_0x47da46,id:_0x19de0b}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x47da46),{'channelId':_0x47da46,'threadId':_0x19de0b,'isFromAdapter':_0x36ddf0});}['setContext'](_0x43dff8){this['context']||this['_update']({'context':_0x43dff8});}['setAttribute'](_0x40bccb,_0x32c85e){const _0x35a0d7=_0x172f46(this['attributes']);_0x4f2003(_0x35a0d7,_0x40bccb,_0x32c85e),this['_update']({'attributes':_0x35a0d7});}['removeAttribute'](_0x580dc9){const _0x38e961=_0x172f46(this['attributes']);_0x59ab04(_0x38e961,_0x580dc9),this['_update']({'attributes':_0x38e961});}['remove']({isFromAdapter:_0x500e8a=!0x1}={}){const {channelId:_0x560ee6,id:_0x6f00bb}=this;this['_repository']['fire'](ai('removeCommentThread',_0x560ee6),{'channelId':_0x560ee6,'threadId':_0x6f00bb,'isFromAdapter':_0x500e8a});}['attachTo'](_0x3c836a){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x3c836a});}['addComment'](_0x44ce53){const {channelId:_0x280c1d,id:_0x632580}=this;this['_repository']['fire'](ai('addComment',_0x280c1d,_0x632580),Object['assign']({'channelId':_0x280c1d,'threadId':_0x632580},_0x44ce53));}['getComment'](_0x450ae7){if('string'!=typeof _0x450ae7)throw new _0x460944('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x450ae7});return this['comments']['get'](_0x450ae7);}['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'](_0xfbcd82=>_0xfbcd82['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4650ce){return this['listenTo'](_0x4650ce,'change:authoredAt',()=>{const _0x5220dd=this['_findOptimalIndex'](_0x4650ce),_0x2fd4fc=this['comments'];_0x5220dd-0x1!=_0x2fd4fc['getIndex'](_0x4650ce)&&_0x5220dd+0x1!=_0x2fd4fc['getIndex'](_0x4650ce)&&(this['_remove'](_0x4650ce),this['_add'](_0x4650ce));}),this['comments']['add'](_0x4650ce,this['_findOptimalIndex'](_0x4650ce));}['_update'](_0x324099){const {channelId:_0xcbb0d2,id:_0x21bbe2}=this;this['_repository']['fire'](ai('updateCommentThread',_0xcbb0d2),{..._0x324099,'channelId':_0xcbb0d2,'threadId':_0x21bbe2});}['_remove'](_0x441ffa){return this['stopListening'](_0x441ffa),_0x441ffa['destroy'](),this['comments']['remove'](_0x441ffa);}['_findOptimalIndex'](_0x3e02ce){const _0x497d43=this['comments']['find'](_0x5a804e=>new Date(_0x5a804e['authoredAt'])['getTime']()>new Date(_0x3e02ce['authoredAt'])['getTime']());return _0x497d43?this['comments']['getIndex'](_0x497d43):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x2cd43e,_0x4a7eeb){super();const _0x1992de=_0x2cd43e['context']['plugins']['get'](_0x5d61c1)['me'],_0x479696=_0x2cd43e['getCommentThread'](_0x4a7eeb['threadId']),_0x509800=0x0===_0x479696['comments']['length'],_0x555403=_0x1992de===_0x4a7eeb['author'];this['id']=_0x4a7eeb['id'],this['threadId']=_0x4a7eeb['threadId'],this['author']=_0x4a7eeb['author'],this['creator']=_0x4a7eeb['creator'],this['set']('content',_0x4a7eeb['content']),this['createdAt']=_0x4a7eeb['createdAt']||new Date(),this['set']('authoredAt',_0x4a7eeb['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x479696,'resolvedAt'),this['set']('attributes',_0x4a7eeb['attributes']||{}),this['bind']('isEditable')['to'](_0x2cd43e,'_permissions',()=>{const _0x165212=_0x2cd43e['getPermissions'](_0x479696['channelId'])['write'],_0x379cfe=_0x2cd43e['getPermissions'](_0x479696['channelId'])['modifyAll'];return _0x555403&&_0x165212||!_0x555403&&_0x379cfe;}),this['bind']('isRemovable')['to'](_0x479696,'isRemovable',_0x2cd43e,'_permissions',_0x32766a=>{const _0x450c82=_0x2cd43e['getPermissions'](_0x479696['channelId'])['write'],_0x4025e4=_0x2cd43e['getPermissions'](_0x479696['channelId'])['modifyAll'];return _0x555403&&_0x450c82||_0x32766a&&_0x509800||!_0x555403&&_0x4025e4&&!_0x509800;}),this['bind']('isReadOnly')['to'](_0x479696,'isReadOnly'),this['_repository']=_0x2cd43e;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x113fb1){const _0x529d92=document['createElement']('div');return _0x529d92['innerHTML']=_0x113fb1,_0x529d92['textContent']['length'];}(this['content']),0xc8);}['update'](_0x50621b){const {threadId:_0x2bf5fe,id:_0x2f3593}=this;if(!this['_repository']['hasCommentThread'](_0x2bf5fe))throw new _0x460944('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x151af3}=this['_repository']['getCommentThread'](_0x2bf5fe);this['_repository']['fire'](ai('updateComment',_0x151af3,_0x2bf5fe),{'channelId':_0x151af3,'threadId':_0x2bf5fe,'commentId':_0x2f3593,..._0x50621b});}['setAttribute'](_0x417a75,_0x324e28){const _0xb67f70=_0x172f46(this['attributes']);_0x4f2003(_0xb67f70,_0x417a75,_0x324e28),this['update']({'attributes':_0xb67f70});}['removeAttribute'](_0x5240e5){const _0x1ab404=_0x172f46(this['attributes']);_0x59ab04(_0x1ab404,_0x5240e5),this['update']({'attributes':_0x1ab404});}['remove'](_0x336c86={}){if(!_0x336c86['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1137b8,id:_0x48bb91}=this;if(!this['_repository']['hasCommentThread'](_0x1137b8))throw new _0x460944('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2a10cd}=this['_repository']['getCommentThread'](_0x1137b8);this['_repository']['fire'](ai('removeComment',_0x2a10cd,_0x1137b8),{'channelId':_0x2a10cd,'threadId':_0x1137b8,'commentId':_0x48bb91,..._0x336c86});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x2da6ba,..._0x24a5a1){for(const _0x4606da of _0x24a5a1)void 0x0!==_0x4606da&&(_0x2da6ba+=':'+String(_0x4606da));return _0x2da6ba;}var ci=class extends _0x5de849{constructor(_0x436454){super(_0x436454),this['set']('hasContent',!0x1);}['refresh'](){const _0xf705cb=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x35f941 of _0xf705cb['getRanges']())if(this['_hasContent'](_0x35f941))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x55211a=_0x4ff4e9(),ranges:_0x599575,comment:_0x670932}={}){const _0x2a1f92=this['editor']['model'],_0x74232c=_0x599575??Array['from'](_0x2a1f92['document']['selection']['getRanges']()),_0x10af65=[];for(const _0x595abb of _0x74232c)this['_hasContent'](_0x595abb)&&_0x10af65['push'](this['_trimToContent'](_0x595abb));if(!_0x10af65['length'])throw new _0x460944('addcommentthreadcommand-incorrect-ranges',null);_0x670932&&this['_createCommentThread'](_0x55211a,_0x670932),this['_createMarkersFromRanges'](_0x55211a,_0x10af65,!!_0x670932);}['_createMarkersFromRanges'](_0x552f5b,_0x134be5,_0x53ab77){this['editor']['model']['change'](_0x154b06=>{for(const _0x4eb246 of _0x134be5){const _0x2ba665='comment:'+_0x552f5b+':'+_0x4ff4e9()['substr'](0x1,0x5);_0x154b06['addMarker'](_0x2ba665,{'range':_0x4eb246,'usingOperation':_0x53ab77,'affectsData':_0x53ab77});}});}['_createCommentThread'](_0x46401f,_0x42b7e8){const _0xfdaa4d=this['editor']['plugins']['get']('CommentsRepository'),_0x1255a9=this['editor']['config']['get']('collaboration.channelId'),_0x3643d0=this['editor']['plugins']['get']('Users')['me'];if(!_0x3643d0)throw new _0x460944('addcommentthreadcommand-user-not-found',null);_0xfdaa4d['addCommentThread']({'threadId':_0x46401f,'channelId':_0x1255a9,'comments':[{'authorId':_0x3643d0['id'],'content':_0x42b7e8,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4d58cd){for(const _0x187a4c of _0x4d58cd['getItems']())if(this['_itemIsContent'](_0x187a4c))return!0x0;return!0x1;}['_itemIsContent'](_0x1551e5){return _0x1551e5['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1551e5)&&!_0x1551e5['is']('element','tableCell');}['_trimToContent'](_0x4ae84d){const _0x8f32a4=_0x3770ee=>!this['_itemIsContent'](_0x3770ee['item']),_0x3d650c=_0x4ae84d['start']['getLastMatchingPosition'](_0x8f32a4),_0x39144b=_0x4ae84d['end']['getLastMatchingPosition'](_0x8f32a4,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3d650c,_0x39144b);}},di=class extends _0x32d196{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x123cdd){super(_0x123cdd),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x511c34=this['editor'],_0x4a1fe4=_0x511c34['model']['document']['selection'],_0x1db6e2=_0x1ebf5f(()=>this['refreshSelectedViews'](),0xa);_0x4a1fe4['on']('change:range',(_0x60a4db,_0x2caf89)=>{_0x2caf89['directChange']&&(_0x1db6e2['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x511c34['editing']['view']['document'],'change:isFocused',(_0x549847,_0xe676e2,_0x4f39e0)=>{_0x4f39e0&&_0x1db6e2();}),this['listenTo'](_0x511c34['ui']['focusTracker'],'change:isFocused',(_0x4e3aa2,_0x48933f,_0xb03452)=>{_0xb03452||this['fire']('blur',{'isAnnotationTracked':_0x889c84=>this['_editorAnnotationsData']['has'](_0x889c84['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3befd1){if(this['_editorAnnotations']['has'](_0x3befd1['view']))return;this['_editorAnnotations']['add'](_0x3befd1['view']),this['editor']['ui']['focusTracker']['add'](_0x3befd1['view']['element']);const _0x4a49bb=this['editor']['plugins']['get'](ti);this['listenTo'](_0x4a49bb['collection'],'remove',(_0x357e02,_0x5cce79)=>{this['editor']['ui']['focusTracker']['remove'](_0x5cce79['view']['element']),this['_editorAnnotations']['delete'](_0x5cce79['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2929fd){if('function'!=typeof _0x2929fd)throw new _0x460944('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2929fd);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3be1e0,annotations:_0x4d3ed6}){const _0x4d97b0=[],_0x164aa2=this['editor']['model']['document']['selection'],_0x54bbbc=Array['from'](_0x164aa2['getRanges']());for(const [_0xdf6565,_0x5dafe5]of this['_editorAnnotationsData']){const _0x325327=_0x441caa(_0x5dafe5),_0x41bf5c=_0x4d3ed6['getByInnerView'](_0xdf6565);_0x325327&&_0x41bf5c&&_0x4d97b0['push']({'annotation':_0x41bf5c,'range':_0x325327});}function _0x441caa(_0xf14d9a){for(const _0x4099f5 of _0xf14d9a)for(const _0x5337b5 of _0x54bbbc)if(_0x4099f5['containsRange'](_0x5337b5,!_0x164aa2['isCollapsed']))return _0x4099f5;return null;}return _0x4d97b0['sort']((_0xb8d081,_0x5649c2)=>{const _0x59b7c9=_0xb8d081['range'],_0x226488=_0x5649c2['range'];if(!_0x59b7c9['isEqual'](_0x226488)){if(_0x59b7c9['containsRange'](_0x226488,!0x0))return 0x1;if(_0x226488['containsRange'](_0x59b7c9,!0x0))return-0x1;}return _0xb8d081['annotation']==_0x3be1e0?-0x1:_0x5649c2['annotation']==_0x3be1e0?0x1:0x0;})['map'](_0x4be6dd=>_0x4be6dd['annotation']);}get['_editorAnnotationsData'](){const _0x57a2cd=new Map();for(const _0x4ac1be of Array['from'](this['_dataCollectors']))for(const [_0x41c782,_0xf83dd1]of _0x4ac1be())_0x57a2cd['set'](_0x41c782,_0xf83dd1);return _0x57a2cd;}},li=class extends _0x32d196{['afterInit'](){const _0x3292e1=this['editor'];_0x3292e1['plugins']['has']('RestrictedEditingModeEditing')&&_0x3292e1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x32d196{constructor(_0x3ed21e){super(_0x3ed21e),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x228e41=this['editor'],_0x555cdf=_0x228e41['commands']['get']('importWord'),_0x57e40a=_0x228e41['plugins']['get'](_0x5d61c1);_0x555cdf&&(_0x555cdf['on']('execute',(_0x4e2651,[,_0x176f0d])=>{_0x176f0d['collaboration_features']={'comments':!0x0,'user_id':_0x57e40a['me']['id']};},{'priority':_0x48ddaa['high']+0xa}),this['listenTo'](_0x555cdf,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1b3c4e,_0x5209b0){const {comment_threads:_0x4af752}=_0x5209b0;_0x4af752&&_0x4af752['forEach'](({thread_id:_0x2a3c5e,comments:_0x9b0138,is_resolved:_0x1df748})=>{const _0x15f95b=new Date(),_0x43884d=_0x9b0138['map'](({author:_0x128efd,content:_0x8c6d42,created_at:_0x2aaef6})=>({'content':_0x8c6d42,'authorId':this['editor']['plugins']['get'](_0x5d61c1)['me']['id'],'createdAt':_0x15f95b,'attributes':{'@external':{'authorName':_0x128efd,'createdAt':_0x2aaef6?new Date(_0x2aaef6):new Date(),'source':'importWord'}}})),_0x126ca9=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x126ca9,'threadId':_0x2a3c5e,'comments':_0x43884d,'resolvedAt':_0x1df748?_0x15f95b:null});});}},ui=class extends _0x32d196{constructor(_0x5a4826){super(_0x5a4826),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x1b09df=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1b09df,'contentInsertion',(_0x27ba3b,_0x1b797c)=>this['_removeMarkersWithoutThreads'](_0x1b797c['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2667fb){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2667fb;const _0x1a0ab3=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2ceb9c of _0x2667fb['keys']()){const [_0x201ab6,_0xd4dabd]=_0x2ceb9c['split'](':');'comment'!=_0x201ab6||_0x1a0ab3['hasCommentThread'](_0xd4dabd)||_0x2667fb['delete'](_0x2ceb9c);}return _0x2667fb;}['_registerMarkerInClipboardPipeline'](){const _0x2c6f82=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x223acf=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x223acf&&_0x2c6f82['_registerMarkerToCopy']('comment',_0x223acf);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xd8b7bc){switch(_0xd8b7bc){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0xf41e4a){const _0x28ab46=_0xf41e4a['split'](':');return{'group':_0x28ab46[0x0],'id':_0x28ab46[0x1],'part':_0x28ab46[0x2]};}var pi=class extends _0x32d196{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x209233,_0x795c9d)=>{if(!_0x795c9d['options']['showCommentHighlights'])return null;if(_0x795c9d['options']['ignoreResolvedComments']){const {id:_0x37d45c}=fi(_0x209233['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x37d45c)?.['isResolved']&&_0x209233['item'])return _0x795c9d['consumable']['consume'](_0x209233['item'],'addMarker:'+_0x209233['markerName']),_0x795c9d['consumable']['consume'](_0x209233['item'],'removeMarker:'+_0x209233['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x947b43=>{_0x947b43['on']('addMarker:comment',(_0x38ae3a,_0x3ba1d0,_0x1c43e8)=>{if(!_0x1c43e8['options']['showCommentHighlights'])return;const _0x33d025=_0x3ba1d0['item'];if(!_0x33d025)return;const _0x253514=_0x1c43e8['mapper']['toViewElement'](_0x33d025);this['editor']['model']['schema']['isObject'](_0x33d025)&&_0x253514&&!_0x253514['getCustomProperty']('widget')&&_0x253514['is']('containerElement')&&Ct(_0x253514,_0x1c43e8['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x10381a,{writer:_0x5740a2,options:_0x5ea43b})=>{if(!_0x5ea43b['showCommentHighlights'])return null;const _0x5d5d07=_0x5740a2['createContainerElement']('div'),_0x1b64f8=_0x5740a2['createEmptyElement']('hr');return _0x5740a2['addClass']('ck-horizontal-line',_0x5d5d07),_0x5740a2['insert'](_0x5740a2['createPositionAt'](_0x5d5d07,0x0),_0x1b64f8),_0x5d5d07;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4e3d61,{writer:_0x3b51cc,options:_0x4c77e9})=>{if(!_0x4c77e9['showCommentHighlights'])return null;const _0x2292d9=_0x3b51cc['createContainerElement']('span'),_0x37f43d=_0x3b51cc['createEmptyElement']('img');return _0x3b51cc['addClass']('image-inline',_0x2292d9),_0x3b51cc['insert'](_0x3b51cc['createPositionAt'](_0x2292d9,0x0),_0x37f43d),_0x2292d9;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5dfda5,{writer:_0x2155b8,options:_0x45d321})=>{if(_0x45d321['showCommentHighlights'])return _0x2155b8['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2b361b,_0x3c63ca,_0x13bd88)=>{_0x13bd88['options']['showCommentHighlights']&&_0x2b361b['stop']();},{'priority':'high'});}},wi=class extends _0x32d196{static get['requires'](){return[oi,di,_0x5d61c1,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4afc67){super(_0x4afc67),this['set']('isThreadsLoadingPaused',!0x0),_0x4afc67['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2aec27,_0x18a461,_0x8aae2,_0x4027ff)=>{const _0x2e4b3a=_0x4afc67['plugins']['get'](oi),_0x2a60cd=_0x8aae2?fi(_0x8aae2)['id']:null;_0x4afc67['model']['change'](()=>{if(_0x2a60cd){const _0x45940f=this['getAllMarkersForId'](_0x2a60cd);for(const _0x53a61e of _0x45940f)_0x4afc67['editing']['reconvertMarker'](_0x53a61e);}if(_0x4027ff){const {id:_0x15d6e4}=fi(_0x4027ff),_0x5f0040=_0x2e4b3a['getCommentThread'](_0x15d6e4);if(_0x5f0040&&_0x5f0040['unlinkedAt'])return;if(_0x5f0040&&!_0x5f0040['isAttached'])return;const _0x1aad8c=this['getAllMarkersForId'](_0x15d6e4);for(const _0x463e2a of _0x1aad8c)_0x4afc67['editing']['reconvertMarker'](_0x463e2a);}}),_0x2a60cd&&this['scrollToThreadMarker'](_0x2a60cd);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x307ab0=this['editor'],_0x9e6930=_0x307ab0['plugins']['get'](oi),_0x57f786=_0x307ab0['config']['get']('collaboration.channelId'),_0x582941=_0x9e6930['getCommentThreads']()['filter'](_0x16bfbd=>_0x16bfbd['channelId']!==_0x57f786);_0x307ab0['commands']['add']('addCommentThread',new ci(_0x307ab0)),this['listenTo'](_0x307ab0,'change:isReadOnly',(_0x3b5e37,_0x3ab2c0,_0x4c7f06)=>{_0x9e6930['switchReadOnly'](_0x4c7f06,_0x307ab0['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x9e6930,gi('addCommentThread',_0x57f786),(_0x321566,{threadId:_0xb4e5a1})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0xb4e5a1)?.['unlinkedAt']&&this['_attachArchivedThread'](_0xb4e5a1);}),this['listenTo'](_0x9e6930,gi('removeCommentThread',_0x57f786),(_0x1c7836,{threadId:_0x4a90e1})=>{_0x307ab0['model']['enqueueChange']({'isUndoable':!0x1},_0x1b5cd0=>{const _0x215cd9=this['getAllMarkersForId'](_0x4a90e1);for(const _0x31f0e8 of _0x215cd9)_0x1b5cd0['removeMarker'](_0x31f0e8);});}),this['listenTo'](_0x9e6930,gi('resolveCommentThread',_0x57f786),(_0x57490c,{threadId:_0x253c82})=>{this['_reconvertMarkers'](_0x253c82);const _0x4282ed=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x4282ed['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x253c82)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x9e6930,gi('reopenCommentThread',_0x57f786),(_0x179efe,{threadId:_0x5d142f})=>{this['_reconvertMarkers'](_0x5d142f);},{'priority':'low'}),this['listenTo'](_0x9e6930,gi('addComment',_0x57f786),(_0x52c97b,{threadId:_0x2a36f1,isFromAdapter:_0x2d45be})=>{const _0x86c972=this['getAllMarkersForId'](_0x2a36f1);!_0x2d45be&&0x0!=_0x86c972['length']&&_0x9e6930['hasCommentThread'](_0x2a36f1)&&0x1===_0x9e6930['getCommentThread'](_0x2a36f1)['length']&&_0x307ab0['model']['enqueueChange']({'isUndoable':!0x1},_0x4dfd1a=>{for(const _0x486105 of _0x86c972)_0x4dfd1a['updateMarker'](_0x486105,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x582941);}['afterInit'](){!async function(_0x5da337){const _0x3fe405='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x538abe=0x78e88,_0x3d94b3=window['Date']['now'](),_0x2ba4b1=_0x5da337['editor'],_0x42f6b6=new window['Promise'](_0x1ab350=>{_0x2ba4b1['once']('ready',_0x1ab350);}),_0x5f5806={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x195e16=_0x2ba4b1['config']['get']('licenseKey');async function _0x2a5713(){let _0x573a92,_0x47598=null,_0xc774b4=null;try{return'GPL'==_0x195e16?'NotAllowed':(_0x573a92=_0x12b016(),_0x573a92?(_0x573a92['usageEndpoint']&&(_0xc774b4=_0x506d8e(_0x573a92['usageEndpoint'],_0x573a92['jti'])),await _0x38c191()?_0xf630fb()?_0x92de51()?'Expired':_0x116b4a()?('evaluation'==_0x573a92['licenseType']&&(_0x47598=_0x4d7351('EvaluationLimit')),await _0xbea8fe()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x92de51(){const _0x3d9033=['evaluation','trial']['includes'](_0x573a92['licenseType'])?_0x3d94b3/0x3e8:0xe10*_0x538abe;return _0x573a92['exp']<_0x3d9033;}function _0xf630fb(){const _0x35de1b=_0x573a92['features'];if(!_0x35de1b)return!0x1;if(_0x35de1b['includes']('*'))return!0x0;if(_0x35de1b['includes']('CMT'))return!0x0;if(_0x35de1b['includes']('TRILIUM')&&_0x808cd6())return!0x0;if(_0x35de1b['includes']('RCMT')){if(_0x2236c3())return!0x0;if(_0x456122()||_0x243590())return!0x0;}return!0x1;}function _0x116b4a(){const _0xa65b=_0x573a92['licensedHosts'];if(!_0xa65b||0x0==_0xa65b['length'])return!0x0;const {hostname:_0x4bc24a}=new URL(window['location']['href']);if(_0xa65b['includes'](_0x4bc24a))return!0x0;const _0x5162dd=_0x4bc24a['split']('.');return _0xa65b['filter'](_0x4847fe=>_0x4847fe['includes']('*'))['map'](_0x4e2857=>_0x4e2857['split']('.'))['filter'](_0x586ab3=>_0x586ab3['length']<=_0x5162dd['length'])['map'](_0x275a2a=>Array(_0x5162dd['length']-_0x275a2a['length'])['fill']('*'===_0x275a2a[0x0]?'*':'')['concat'](_0x275a2a))['some'](_0x551800=>_0x5162dd['every']((_0x980a58,_0x40ddc2)=>_0x551800[_0x40ddc2]===_0x980a58||'*'===_0x551800[_0x40ddc2]));}function _0xbea8fe(){return _0x47598&&_0xc774b4?new window['Promise']((_0x2486d8,_0x26ffb1)=>{_0x47598['then'](_0x2486d8,_0x26ffb1),_0xc774b4['then'](_0x3f8e0d=>{'Valid'!=_0x3f8e0d&&_0x2486d8(_0x3f8e0d);},_0x26ffb1);}):_0x47598||_0xc774b4||'Valid';}}function _0x506d8e(_0x1a9baa,_0x42e0ae){return new window['Promise'](_0x4eb131=>{if(_0x47ddef())return _0x4eb131('Valid');_0x234d46(),_0x2ba4b1['decorate']('_sendUsageRequest');let _0x481d1a=!0x1;const _0x5f7136=_0x4ff4e9();function _0xe97b22(_0x3d2b07){return!!_0x3d2b07&&('object'==typeof _0x3d2b07||'function'==typeof _0x3d2b07)&&'function'==typeof _0x3d2b07['then']&&'function'==typeof _0x3d2b07['catch'];}function _0x4865a3(_0x471672){_0x23e0a6(_0x471672)['then'](_0x177190=>_0x177190&&'ok'==_0x177190['status']?_0x443a39(_0x5cd2ab(_0x5f7136+_0x42e0ae))!=_0x177190['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x53e430=>(_0x290a5e(),_0x53e430),()=>{const _0x1ca1ca=_0x58d282();return null==_0x1ca1ca?(_0x290a5e(),'Valid'):_0x3d94b3-_0x1ca1ca>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4eb131)['catch'](()=>{_0x4eb131('UsageLimit');});const _0x163215=0x36ee80;function _0x290a5e(){const _0x576a2f='llct-'+_0x443a39(_0x5cd2ab(_0x1a9baa)),_0x260fcf=_0x53ae60(_0x443a39(window['Math']['ceil'](_0x3d94b3/_0x163215)));window['localStorage']['setItem'](_0x576a2f,_0x260fcf);}function _0x58d282(){const _0x525003='llct-'+_0x443a39(_0x5cd2ab(_0x1a9baa)),_0x17b579=window['localStorage']['getItem'](_0x525003);return _0x17b579?window['parseInt'](_0x53ae60(_0x17b579),0x10)*_0x163215:null;}function _0x23e0a6(_0x296e74){return new window['Promise']((_0x4c5531,_0x2dc47a)=>{_0x296e74['then'](_0x4c5531,_0x2dc47a),window['setTimeout'](_0x2dc47a,0x1d4c0);});}}_0x2ba4b1['on']('_sendUsageRequest',(_0x4c5a39,_0x5b55c1)=>{if(_0x5b55c1[0x0]!=_0x1a9baa)return _0x4eb131('UsageLimit');_0x5b55c1[0x1]={..._0x5b55c1[0x1],'requestId':_0x5f7136};},{'priority':'high'}),_0x2ba4b1['on']('_sendUsageRequest',_0x59ba06=>{_0xe97b22(_0x59ba06['return'])&&(_0x481d1a=!0x0,_0x4865a3(_0x59ba06['return']));},{'priority':'low'}),_0x42f6b6['then'](()=>{_0x481d1a||_0x4eb131('UsageLimit');});});function _0x47ddef(){return'auto'==_0x2ba4b1['editing']['view']['_overlayModeHint'];}function _0x234d46(){_0x2ba4b1['editing']['view']['_overlayModeHint']='auto';}}function _0x4d7351(_0x285f92){const _0x1469ce=[new window['Promise'](_0x2a0cf7=>setTimeout(_0x2a0cf7,0x93ecc)),_0x42f6b6['then'](()=>new window['Promise'](_0x319be2=>{let _0x56ee16=0x0;_0x2ba4b1['model']['on']('applyOperation',(_0x27cc49,_0x42beea)=>{_0x42beea[0x0]['isDocumentOperation']&&_0x56ee16++,0x5e8==_0x56ee16&&(_0x319be2(),_0x27cc49['off']());});}))];return window['Promise']['race'](_0x1469ce)['then'](()=>_0x285f92);}async function _0x3c2aae(){await _0x42f6b6,_0x2ba4b1['model']['change']=_0x1850ec,_0x2ba4b1['model']['enqueueChange']=_0x1850ec,_0x2ba4b1['enableReadOnlyMode']('model');}function _0x808cd6(){return window['glob']&&window['glob']['triliumVersion'];}function _0x2236c3(){return _0x47cadc('WebSocketGateway')&&'connected'==_0x75849e('WebSocketGateway')['state'];}function _0x456122(){return _0x47cadc('RevisionViewerIntegration');}function _0x243590(){return _0x47cadc('TrackChangesDataGetter');}function _0x59381c(_0x50f8ac){const _0x26ad35=_0x563546();_0x2ba4b1[_0x26ad35]='commentsLicenseKey'+_0x50f8ac,'Valid'!=_0x50f8ac&&_0x3c2aae();}function _0x563546(){const _0x3c1ad1=window['String'](window['performance']['now']())['replace']('.','');let _0x385415='K';for(let _0x341437=0x0;_0x341437<_0x3c1ad1['length'];_0x341437+=0x2){let _0x1cbe95=window['parseInt'](_0x3c1ad1['substring'](_0x341437,_0x341437+0x2));_0x1cbe95>=0x3e&&(_0x1cbe95-=0x3e),_0x385415+=_0x3fe405[_0x1cbe95];}return _0x385415;}function _0x12b016(){const _0x42bcba=_0x195e16['split']('.');if(0x3!=_0x42bcba['length'])return null;return _0x12d0af(_0x42bcba[0x1]);function _0x12d0af(_0x3a5b30){const _0x43d767=_0x4d0759(_0x3a5b30);return _0x43d767&&_0x3455af()?_0x43d767:null;function _0x3455af(){const _0x50dcf4=_0x43d767['jti'],_0x5781bd=window['parseInt'](_0x50dcf4['substring'](_0x50dcf4['length']-0x8),0x10),_0x34716d={..._0x43d767,'jti':_0x50dcf4['substring'](0x0,_0x50dcf4['length']-0x8)};return delete _0x34716d['vc'],_0x5cd2ab(_0x34716d)==_0x5781bd;}}}async function _0x38c191(){let _0x54bd37=!0x0;try{const [_0x1fefcd,_0x19ece8,_0x2651b7]=_0x195e16['split']('.');return _0x59a75f(_0x1fefcd),await _0x278132(_0x1fefcd,_0x19ece8,_0x2651b7),_0x54bd37;}catch{return!0x1;}function _0x59a75f(_0xfbd31f){const _0x393f25=_0x4d0759(_0xfbd31f);_0x393f25&&'ES256'==_0x393f25['alg']||(_0x54bd37=!0x1);}async function _0x278132(_0x11c5fe,_0x5e5779,_0x5f3b86){const _0x3e4606=window['Uint8Array']['from'](_0x32f8e9(_0x5f3b86),_0x4b70e5=>_0x4b70e5['charCodeAt'](0x0)),_0x32338a=new window['TextEncoder']()['encode'](_0x11c5fe+'.'+_0x5e5779),_0x45a1e1=window['crypto']['subtle'];if(!_0x45a1e1)return;const _0x1ba60b=await _0x45a1e1['importKey']('jwk',_0x5f5806,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x45a1e1['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x1ba60b,_0x3e4606,_0x32338a)||(_0x54bd37=!0x1);}}function _0x4d0759(_0x49a879){return _0x49a879['startsWith']('ey')?JSON['parse'](_0x32f8e9(_0x49a879)):null;}function _0x32f8e9(_0x41ab47){return window['atob'](_0x41ab47['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5cd2ab(_0xd0757c){let _0x58e516=0x1505;function _0x144373(_0x1e3b5b){for(let _0x16bf71=0x0;_0x16bf71<_0x1e3b5b['length'];_0x16bf71++){const _0xb67252=_0x1e3b5b['charCodeAt'](_0x16bf71);_0x58e516=(_0x58e516<<0x5)+_0x58e516+_0xb67252,_0x58e516&=_0x58e516;}}function _0x20de73(_0x522b26){Array['isArray'](_0x522b26)?_0x522b26['forEach'](_0x20de73):_0x522b26&&'object'==typeof _0x522b26?Object['entries'](_0x522b26)['sort']()['forEach'](([_0x4dc7f9,_0x138212])=>{_0x144373(_0x4dc7f9),_0x20de73(_0x138212);}):_0x144373(window['String'](_0x522b26));}return _0x20de73(_0xd0757c),_0x58e516>>>0x0;}function _0x443a39(_0x3e105a){return _0x3e105a['toString'](0x10)['padStart'](0x8,'0');}function _0x53ae60(_0x34d0dd){return _0x34d0dd['split']('')['reverse']()['join']('');}function _0x47cadc(_0x2d0554){return _0x2ba4b1['plugins']['has'](_0x2d0554);}function _0x75849e(_0x3b75ed){return _0x2ba4b1['plugins']['get'](_0x3b75ed);}function _0x1850ec(){}_0x59381c(await _0x2a5713());}(this);}['destroy'](){const _0x4291e7=this['editor']['plugins']['get'](oi),_0x1a7bee=this['editor']['config']['get']('collaboration.channelId');for(const _0x308a5b of _0x4291e7['getCommentThreads']({'channelId':_0x1a7bee}))_0x4291e7['_detachCommentThread'](_0x308a5b['id']),_0x4291e7['_threads']['delete'](_0x308a5b['id']);super['destroy']();}['hasMarkerForId'](_0xb40550){return this['getAllMarkersForId'](_0xb40550)['length']>0x0;}['getAllMarkersForId'](_0x10c23e){const _0x16fe55=[];for(const _0x385f1f of this['editor']['model']['markers'])_0x385f1f['name']['startsWith']('comment:'+_0x10c23e)&&_0x16fe55['push'](_0x385f1f);return _0x16fe55;}['scrollToThreadMarker'](_0x1a4fae){setTimeout(()=>{const _0xfa1f66=this['_getTargetForId'](_0x1a4fae);_0xfa1f66&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x1a4fae&&_0x474fe7({'target':_0xfa1f66[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x520ec7){this['editor']['model']['change'](()=>{for(const _0x35d468 of this['getAllMarkersForId'](_0x520ec7))this['editor']['editing']['reconvertMarker'](_0x35d468);});}['_attachArchivedThread'](_0xf45db){const _0x5d048d=this['editor']['plugins']['get'](oi),_0x293ddd=this['editor']['plugins']['get'](di),_0x12d4ce=_0x5d048d['getCommentThread'](_0xf45db);if(!_0x12d4ce['isAttached']){const _0x151f23=_0x12d4ce['attachTo'](()=>this['_getTargetForId'](_0x12d4ce['id']));_0x293ddd['registerAnnotation'](_0x151f23),_0x12d4ce['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x40f7f3=this['editor'],_0xd0510d=_0x40f7f3['plugins']['get'](_0x5d61c1);_0x40f7f3['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5189f1,_0x40ed98)=>{const {id:_0x46eebb}=fi(_0x5189f1['markerName']),_0x4c4daa=_0x40f7f3['plugins']['get'](oi)['getCommentThread'](_0x46eebb),_0x308e96=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x46eebb;let _0x57603f;if(_0x4c4daa&&_0x4c4daa['isResolved']&&!_0x308e96&&_0x5189f1['item'])return _0x40ed98['consumable']['consume'](_0x5189f1['item'],'addMarker:'+_0x5189f1['markerName']),_0x40ed98['consumable']['consume'](_0x5189f1['item'],'removeMarker:'+_0x5189f1['markerName']),null;const _0x31166e=['ck-comment-marker'];return _0x308e96&&_0x31166e['push']('ck-comment-marker--active'),_0x57603f=_0x4c4daa?.['length']?_0x4c4daa['comments']['first']['author']['id']:_0xd0510d['me']['id'],{'classes':_0x31166e,'attributes':{'data-comment':_0x46eebb,'data-author-id':_0x57603f}};}}),_0x40f7f3['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x14aed9,{options:_0x47599b})=>{if(_0x47599b['showCommentHighlights'])return null;const _0x3a008e=_0x40f7f3['plugins']['get'](oi),_0x1d650f=_0x40f7f3['model']['markers']['get'](_0x14aed9),{id:_0x4dbe95,part:_0x469955}=fi(_0x14aed9);return _0x1d650f&&!_0x1d650f['affectsData']||_0x47599b['ignoreResolvedComments']&&_0x3a008e['getCommentThread'](_0x4dbe95)?.['isResolved']?null:{'group':'comment','name':_0x469955?_0x4dbe95+':'+_0x469955:_0x4dbe95};}}),_0x40f7f3['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x338c7c,{writer:_0x539fd9})=>_0x539fd9['createElement']('$marker',{'data-name':'comment:'+_0x338c7c['getAttribute']('id')})}),_0x40f7f3['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2b20b7=this['editor'],_0x50753a=_0x2b20b7['plugins']['get'](oi),_0x163352=new Set(),_0x120339=new Set();_0x2b20b7['model']['document']['registerPostFixer'](_0x529cbd=>{let _0x12c712=!0x1;for(const {name:_0x5a8a26,data:_0x2d1550}of _0x2b20b7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2d616c,id:_0x408a48}=fi(_0x5a8a26);let _0x207263=_0x2d1550['newRange'];if('comment'!==_0x2d616c||!_0x207263)continue;const _0x51c5b3='$graveyard'===_0x207263['root']['rootName'];_0x51c5b3||(_0x207263=_i(_0x207263,_0x2b20b7['model']),!_0x207263||_0x207263['isCollapsed']||!_0x2d1550['newRange']||_0x207263['isEqual'](_0x2d1550['newRange']))?_0x2b20b7['model']['hasContent'](_0x207263)&&!_0x51c5b3?this['isThreadsLoadingPaused']?_0x163352['add'](_0x5a8a26):this['_handleThreadMarker'](_0x5a8a26,_0x408a48):(_0x120339['add'](_0x5a8a26),_0x163352['delete'](_0x5a8a26),_0x529cbd['removeMarker'](_0x5a8a26),_0x12c712=!0x0):(_0x529cbd['updateMarker'](_0x5a8a26,{'range':_0x207263}),_0x12c712=!0x0);}return _0x12c712;}),this['on']('change:isThreadsLoadingPaused',(_0x3496c0,_0x4e159d,_0x212cb6)=>{if(!_0x212cb6&&_0x163352['size'])for(const _0x546865 of _0x163352){const {id:_0x107536}=fi(_0x546865);_0x163352['delete'](_0x546865),_0x2b20b7['model']['markers']['get'](_0x546865)&&this['_handleThreadMarker'](_0x546865,_0x107536);}}),this['listenTo'](_0x2b20b7['model']['document'],'change',()=>{for(const {name:_0x3779fd,data:{newRange:_0x49fc25}}of _0x2b20b7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x561df4,id:_0x4376e8}=fi(_0x3779fd);if('comment'!==_0x561df4)continue;const _0x306bef=_0x50753a['getCommentThread'](_0x4376e8),_0x54d77d=this['hasMarkerForId'](_0x4376e8);_0x306bef&&(!_0x306bef['_hasTargetInContent']&&_0x49fc25&&_0x2b20b7['editing']['view']['once']('render',()=>{const _0x1ed81b=_0x2b20b7['plugins']['get'](ti),_0x3c44fc=_0x50753a['_threadToController']['get'](_0x306bef)['view'];_0x1ed81b['getByInnerView'](_0x3c44fc)['refreshVisibility']();},{'priority':'low'}),_0x306bef['_hasTargetInContent']=_0x54d77d||!!_0x49fc25),_0x49fc25||(_0x120339['add'](_0x3779fd),_0x163352['delete'](_0x3779fd));}for(const _0x73680b of _0x120339){const {id:_0x1778fe}=fi(_0x73680b),_0x46dda1=_0x50753a['getCommentThread'](_0x1778fe);if(_0x163352['delete'](_0x73680b),!_0x46dda1)continue;const _0x3d7958=this['hasMarkerForId'](_0x1778fe);_0x3d7958||_0x46dda1['isSubmitted']?_0x3d7958||_0x46dda1['unlinkedAt']||_0x46dda1['setUnlinkedAt'](new Date()):_0x46dda1['remove']();}_0x120339['clear']();});}['_handleInitialThreads'](_0x1d0dca){_0x1d0dca['forEach'](_0x2b2794=>{_0x2b2794['unlinkedAt']&&this['_attachArchivedThread'](_0x2b2794['id']);});}['_getTargetForId'](_0x5ce277){const _0x20b825=this['editor'],_0x180300=this['getAllMarkersForId'](_0x5ce277);return _0x3df547(_0x20b825['editing'],_0x180300);}['_getTextContext'](_0x19f5ff){const _0xe7c2=this['getAllMarkersForId'](_0x19f5ff);let _0x24cd49='',_0x484a22=!0x1;for(const _0x2d55cc of _0xe7c2){const _0x53454a=_0x2d55cc['getRange']();for(const _0x2746cc of Array['from'](_0x53454a['getItems']()))_0x2746cc['is']('$textProxy')?(_0x24cd49&&_0x484a22&&(_0x24cd49+='\x20',_0x484a22=!0x1),_0x24cd49+=_0x2746cc['data']):_0x484a22=!0x0;_0x484a22=!0x0;}return _0x24cd49['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2500ea,_0x2e1e2f){const _0x1b9563=this['editor'],_0x1c353c=_0x1b9563['plugins']['get'](oi);let _0x2f574e=_0x1c353c['getCommentThread'](_0x2e1e2f);const _0x368a4d=_0x1b9563['config']['get']('collaboration.channelId'),_0x366555=_0x1b9563['plugins']['get'](di);return _0x2f574e&&(_0x2f574e['unlinkedAt']&&_0x2f574e['setUnlinkedAt'](null),_0x2f574e['isAttached'])||(this['getAllMarkersForId'](_0x2e1e2f)[0x0]['managedUsingOperations']?_0x1c353c['fetchCommentThread']({'channelId':_0x368a4d,'threadId':_0x2e1e2f})['then'](_0x5829fc=>{if('destroyed'!==_0x1b9563['state']){if(_0x2f574e=_0x5829fc,_0x2f574e&&!_0x2f574e['isAttached']){const _0x28430c=_0x2f574e['attachTo'](()=>this['_getTargetForId'](_0x2e1e2f));_0x366555['registerAnnotation'](_0x28430c),_0x2f574e['isResolved']&&this['_reconvertMarkers'](_0x2e1e2f);}else{if(!_0x2f574e){const _0x5884c2=this['getAllMarkersForId'](_0x2e1e2f);_0x1b9563['model']['change'](_0x7d3e81=>{for(const _0x37acac of _0x5884c2)_0x7d3e81['removeMarker'](_0x37acac);});}}}}):_0x1b9563['editing']['view']['once']('render',()=>{if(_0x1c353c['getCommentThread'](_0x2e1e2f))return;const _0x4291ae=_0x1b9563['plugins']['get'](ti);_0x2f574e=_0x1c353c['openNewCommentThread']({'channelId':_0x368a4d,'threadId':_0x2e1e2f,'target':()=>this['_getTargetForId'](_0x2e1e2f),'context':{'type':'text','value':this['_getTextContext'](_0x2e1e2f)}});const _0x2c8f4d=_0x1c353c['_threadToController']['get'](_0x2f574e)['view'],_0x11e20c=_0x4291ae['getByInnerView'](_0x2c8f4d);_0x11e20c&&_0x366555['registerAnnotation'](_0x11e20c);},{'priority':'low'})),_0x2f574e;}['_handleThreadMarker'](_0x2f7e9f,_0x4f400a){const _0x5ba1a2=this['_attachMarkerToThread'](_0x2f7e9f,_0x4f400a);_0x5ba1a2&&!_0x5ba1a2['context']&&_0x5ba1a2['setContext']({'type':'text','value':this['_getTextContext'](_0x4f400a)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5bbf35=this['editor'];_0x5a3dd3(_0x5bbf35['model'],({left:_0x347ced,entered:_0x1c37fb})=>{for(const _0x12b52a of _0x347ced)if(Ai(_0x12b52a)){_0x5bbf35['ui']['ariaLiveAnnouncer']['announce'](Et(_0x5bbf35['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1c55df of _0x1c37fb)if(Ai(_0x1c55df)){_0x5bbf35['ui']['ariaLiveAnnouncer']['announce'](Et(_0x5bbf35['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x5bcf0b(_0x4e8a21)));break;}});}};function gi(_0x3dff11,_0x12b093){return _0x12b093?_0x3dff11+':'+_0x12b093:_0x3dff11;}function _i(_0x18e461,_0x43074e){const _0xfe8341=_0x43074e['schema'],_0x202973=_0x43074e['createRange'](_0x18e461['start']);for(const _0x5410ff of _0x18e461['getWalker']()){const {type:_0x30b9c3,item:_0x25a968,nextPosition:_0x2daeb2}=_0x5410ff;if('text'===_0x30b9c3||_0xfe8341['isObject'](_0x25a968)){const _0x33b046=_0x43074e['createPositionBefore'](_0x25a968);_0x202973['isCollapsed']&&(_0x202973['start']=_0x33b046),_0x202973['end']=_0x2daeb2;}}return _0x202973;}function Ai(_0x4f1ad6){return'comment'===fi(_0x4f1ad6['name'])['group'];}var vi=class extends _0x32d196{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0x4ff740=this['editor'],_0x46c66a=_0x4ff740['plugins']['get'](oi),_0x5b46bd=_0x4ff740['plugins']['get'](wi),_0x54702f=_0x4ff740['plugins']['get'](ti),_0x58823a=_0x4ff740['plugins']['get'](di);_0x4ff740['ui']['componentFactory']['add']('comment',()=>{const _0xe91c13=this['_createUIButton'](_0x5a263d);return _0xe91c13['tooltip']=!0x0,_0xe91c13;}),_0x4ff740['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x58823a['addSourceCollector'](()=>{const _0x3724ae=[];for(const [_0x4658bc,_0xfaa567]of _0x46c66a['_threadToController']){const _0xfc645e=_0x5b46bd['getAllMarkersForId'](_0x4658bc['id']),_0x5e1949=_0xfc645e['map'](_0x464948=>_0x464948['getRange']());_0xfc645e['length']>0x0&&_0x3724ae['push']([_0xfaa567['view'],_0x5e1949]);}return _0x3724ae;}),this['listenTo'](_0x54702f,'change:activeAnnotations',(_0x497c17,_0x4c2ef2,_0x4fdc90)=>{const _0xfbb003=Array['from'](_0x4fdc90)['map'](_0x51e6ef=>_0x51e6ef['innerView'])['find'](_0x4bfe50=>_0x46c66a['_viewToController']['has'](_0x4bfe50));if(!_0xfbb003)return void(_0x5b46bd['activeMarker']=null);const _0x23850e=_0x46c66a['_viewToController']['get'](_0xfbb003)['model']['id'],_0x524413='comment:'+_0x23850e;_0x23850e&&_0x5b46bd['hasMarkerForId'](_0x23850e)?_0x5b46bd['activeMarker']=_0x524413:_0x5b46bd['activeMarker']&&(_0x5b46bd['activeMarker']=null);}),this['listenTo'](_0x46c66a,'removeCommentThread',(_0x5d95f2,{threadId:_0x134a7e,isFromAdapter:_0xbe5895})=>{!_0xbe5895&&_0x4ff740['ui']['focusTracker']['isFocused']&&_0x5b46bd['hasMarkerForId'](_0x134a7e)&&_0x4ff740['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x46c66a,'addComment',(_0x3d75ec,{threadId:_0x17740a,isFromAdapter:_0x4f0382})=>{!_0x4f0382&&_0x5b46bd['hasMarkerForId'](_0x17740a)&&_0x46c66a['hasCommentThread'](_0x17740a)&&0x1===_0x46c66a['getCommentThread'](_0x17740a)['length']&&(_0x4ff740['editing']['view']['focus'](),_0x3d75ec['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5f14a6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x236bab;for(const _0x18d6a6 in _0x5f14a6){const _0x3f654f=_0x18d6a6,_0x36e542=_0x5f14a6[_0x3f654f];if('commentsLicenseKeyValid'==_0x36e542||'commentsLicenseKeyInvalid'==_0x36e542||'commentsLicenseKeyExpired'==_0x36e542||'commentsLicenseKeyDomainLimit'==_0x36e542||'commentsLicenseKeyNotAllowed'==_0x36e542||'commentsLicenseKeyEvaluationLimit'==_0x36e542||'commentsLicenseKeyUsageLimit'==_0x36e542){delete _0x5f14a6[_0x3f654f],_0x236bab=_0x36e542,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x236bab&&_0x5f14a6['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x236bab&&_0x5f14a6['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x236bab&&_0x5f14a6['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x236bab&&_0x5f14a6['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x236bab&&_0x5f14a6['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x236bab&&_0x5f14a6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4e109f){const _0x3e884f=this['editor'],_0x99888a=new _0x4e109f(_0x3e884f['locale']),_0xac0514=_0x3e884f['commands']['get']('addCommentThread');return _0x99888a['set']({'label':Et(_0x3e884f['locale'],'Comment'),'icon':_0x1f3af2}),_0x99888a['bind']('isEnabled')['to'](_0xac0514,'isEnabled',_0xac0514,'hasContent',(_0x34d0d5,_0x473361)=>_0x34d0d5&&_0x473361),this['listenTo'](_0x99888a,'execute',()=>{_0xac0514['execute']();}),_0x99888a;}},yi=class extends _0x32d196{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x5263dd){super(_0x5263dd),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5e07f3,_0xfa5a61,_0x172cc5)=>{_0x172cc5?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1910ee,_0x48c348]of this['editor']['commands'])_0x48c348['affectsData']&&'addCommentThread'!==_0x1910ee&&_0x48c348['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 _0x4e3bd2=this['editor']['editing']['view']['document'];this['listenTo'](_0x4e3bd2,'cut',_0x4d6a12=>_0x4d6a12['stop'](),{'priority':'highest'}),this['listenTo'](_0x4e3bd2,'clipboardInput',_0x648c3a=>_0x648c3a['stop'](),{'priority':'highest'}),this['listenTo'](_0x4e3bd2,'delete',_0x244fc8=>_0x244fc8['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5e1137,_0x17962a]of this['editor']['commands'])_0x17962a['affectsData']&&'addCommentThread'!==_0x5e1137&&_0x17962a['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']);}},Ti=class extends _0x5d945e{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ce4bb){super(_0x3ce4bb),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x506dca=this['context']['plugins']['get'](ti);this['listenTo'](_0x506dca,'_activateAnnotation',(_0x1a6e0f,_0x3ed533)=>{for(const _0x3318a7 of this['activeUIs']){const _0x271959=this['_uis']['get'](_0x3318a7);(0x0,this['uisData']['get'](_0x3318a7)['filter'])(_0x3ed533)&&_0x271959['setActiveAnnotation'](_0x3ed533);}}),this['listenTo'](_0x506dca,'_deactivateAllAnnotations',()=>{for(const _0x36483d of this['activeUIs'])this['_uis']['get'](_0x36483d)['setActiveAnnotation'](null);}),this['listenTo'](_0x506dca['_visibleAnnotations'],'add',(_0x56a783,_0x5d3fd0)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5d3fd0);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3673c0){return this['activeUIs']['has'](_0x3673c0);}['activate'](_0x36f0a4,_0x3c4ddd=this['defaultFilter']){const _0x377c2d=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x36f0a4))throw new _0x460944('annotationsuis-missing-ui',this,{'uiName':_0x36f0a4});this['isActive'](_0x36f0a4)&&this['deactivate'](_0x36f0a4),this['activeUIs']['add'](_0x36f0a4);const _0x4d0376=new Jt();Qt({'source':_0x377c2d['_visibleAnnotations'],'target':_0x4d0376,'filter':_0x3c4ddd}),this['uisData']['set'](_0x36f0a4,{'collection':_0x4d0376,'filter':_0x3c4ddd});const _0x39c5f7=this['_uis']['get'](_0x36f0a4);_0x39c5f7['attach'](_0x4d0376),this['listenTo'](_0x39c5f7,'change:activeAnnotation',(_0xd9d17d,_0x46b713,_0x1ba2c3,_0x2f6b66)=>{_0x2f6b66&&_0x377c2d['_removeActiveAnnotation'](_0x2f6b66),_0x1ba2c3&&_0x377c2d['_addActiveAnnotation'](_0x1ba2c3);});}['deactivate'](_0x5972aa){if(this['activeUIs']['delete'](_0x5972aa),!this['_uis']['has'](_0x5972aa))throw new _0x460944('annotationsuis-missing-ui',this,{'uiName':_0x5972aa});const _0x889e3b=this['_uis']['get'](_0x5972aa);_0x889e3b['detach'](),this['stopListening'](_0x889e3b),this['uisData']['get'](_0x5972aa)['collection']['destroy'](),this['uisData']['delete'](_0x5972aa);}['switchTo'](_0x2944a2){if(!this['_uis']['has'](_0x2944a2))throw new _0x460944('annotationsuis-missing-ui',this,{'uiName':_0x2944a2});const _0x23ac4a=this['context']['plugins']['get'](ti),_0x141f60=Array['from'](_0x23ac4a['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2944a2);const _0x467970=this['_uis']['get'](_0x2944a2);_0x467970['setActiveAnnotation'](_0x141f60),_0x467970['_setSelectedAnnotations']&&_0x141f60&&_0x467970['_setSelectedAnnotations']([_0x141f60]);}['deactivateAll'](){for(const _0x1a2271 of this['activeUIs'])this['deactivate'](_0x1a2271);}['register'](_0x125f1a,_0x3655d0){if(this['_uis']['has'](_0x125f1a))throw new _0x460944('annotationsuis-register-already-registered');if('function'!=typeof _0x3655d0['attach']||'function'!=typeof _0x3655d0['detach']||'function'!=typeof _0x3655d0['setActiveAnnotation'])throw new _0x460944('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x125f1a,_0x3655d0);}['refilterAnnotations'](){const _0x2b404e=this['context']['plugins']['get'](ti)['collection'],_0x201d8b=new Map(),_0xafded8=Array['from'](this['activeUIs']);for(const _0x3272e2 of this['activeUIs']){const _0x1e8044=this['uisData']['get'](_0x3272e2)['collection'];for(const _0x57f0a0 of _0x1e8044)_0x201d8b['set'](_0x57f0a0,_0x3272e2);}for(const _0x4bedf9 of _0x2b404e){const _0x576db7=_0x201d8b['get'](_0x4bedf9);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4bedf9);const _0x1fb7b5=_0xafded8['find'](_0x4563aa=>this['uisData']['get'](_0x4563aa)['filter'](_0x4bedf9));_0x576db7!==_0x1fb7b5&&(_0x576db7&&this['uisData']['get'](_0x576db7)['collection']['remove'](_0x4bedf9),_0x1fb7b5&&this['uisData']['get'](_0x1fb7b5)['collection']['add'](_0x4bedf9));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x44bc03){const _0x1af047=[];for(const _0x4f07b2 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4f07b2)['filter'])(_0x44bc03)&&_0x1af047['push'](_0x4f07b2);}if(_0x1af047['length']>0x1)throw new _0x460944('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1af047,'annotationType':_0x44bc03['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x4b19c0('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x73215){super(_0x73215);const _0x10c9c9=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 _0x46cfaf(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x10c9c9['to']('class')],'style':{'minHeight':_0x10c9c9['to']('minHeight',_0x19788b=>'number'==typeof _0x19788b?Ci(_0x19788b+0xa):null)},'dir':_0x73215['uiLanguageDirection'],'role':'application','aria-label':Et(_0x73215,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x73215,'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',_0x1e7f1e=>{this['_updateItemPositionInFocusables'](_0x1e7f1e['source']);}),this['list']['forEach'](_0x3bdc4b=>{this['focusTracker']['add'](_0x3bdc4b['element']),this['_updateItemPositionInFocusables'](_0x3bdc4b);}),this['list']['on']('change',(_0x214792,_0x4b0676)=>{for(const _0x2b4cd1 of _0x4b0676['removed'])this['focusTracker']['remove'](_0x2b4cd1['element']),this['focusables']['remove'](_0x2b4cd1);for(const _0x120842 of _0x4b0676['added'])this['focusTracker']['add'](_0x120842['element']),this['_updateItemPositionInFocusables'](_0x120842);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2624fe){const _0x82783a=this['focusables']['getIndex'](_0x2624fe);let _0x332612,_0x51b358;for(const _0x336153 of this['focusables'])if(_0x2624fe['top']<_0x336153['top']){_0x332612=_0x336153;break;}if(_0x51b358=_0x332612?this['focusables']['getIndex'](_0x332612):this['focusables']['length'],-0x1!==_0x82783a){if(_0x82783a===_0x51b358-0x1)return;this['focusables']['remove'](_0x2624fe),_0x51b358=_0x332612?this['focusables']['getIndex'](_0x332612):this['focusables']['length'];}this['focusables']['add'](_0x2624fe,_0x51b358);}};const bi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x4b19c0('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x7f38c1){super(_0x7f38c1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x444bdb,_0x2eb9c6)=>_0x444bdb+_0x2eb9c6),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x126736=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x126736['to']('isAnimationDisabled',_0x23c4f2=>_0x23c4f2?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x126736['to']('top',_0x4739a7=>bi(_0x4739a7))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xf96e6a=this['element']['clientHeight'];_0xf96e6a&&(this['height']=_0xf96e6a);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x5d945e{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2dc7fb){super(_0x2dc7fb),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 _0x2090e6=this['context']['config']['get']('sidebar.container');_0x2090e6&&this['setContainer'](_0x2090e6);}['setContainer'](_0x4f775e){if(!Oi(_0x4f775e))throw new _0x460944('sidebar-setcontainer-invalid-element');this['container']=_0x4f775e;}['_attachToContainer']({viewClass:_0x4202af='',spaceBetweenItems:_0x4bb81a=0x19}={}){if(!Oi(this['container']))throw new _0x460944('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4202af,this['_spaceBetweenItems']=_0x4bb81a;}['rearrange']({removedAnnotation:_0x4adad9,previousAnnotation:_0x2e2509,nextAnnotation:_0x45e068}){const _0x23b504=this['getSidebarItemView'](_0x4adad9);this['view']['list']['remove'](_0x23b504),this['_destroySidebarItemView'](_0x4adad9),_0x2e2509&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2e2509)),_0x45e068&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x45e068)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3ee469,activatedAnnotation:_0x35e37f,disableAnimationOnActivatedAnnotation:_0x26883d}){if(this['_activeAnnotation']=_0x35e37f,_0x3ee469){_0x3ee469['isActive']=!0x1;const _0x2e63c8=this['getSidebarItemView'](_0x3ee469);_0x2e63c8&&_0x26883d&&(_0x2e63c8['isAnimationDisabled']=!0x1);}if(_0x35e37f){const _0x121050=this['getSidebarItemView'](_0x35e37f);_0x121050&&(_0x35e37f['isActive']=!0x0,_0x26883d&&(_0x121050['isAnimationDisabled']=!0x0,_0x121050['top']+=0x1),this['_alignToTargetRect'](_0x121050));}}['_detachFromContainer'](_0x47745b){if(this['view']['element']['remove'](),_0x47745b){for(const _0x5b4969 of _0x47745b)this['_destroySidebarItemView'](_0x5b4969);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3bb077,_0x2eba40){_0x2eba40||(_0x2eba40=_0x3bb077['view']);const _0x5c941b=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5c941b,_0x3bb077),this['_annotationToSidebarItemView']['set'](_0x3bb077,_0x5c941b),_0x5c941b['content']['add'](_0x2eba40),this['listenTo'](_0x3bb077['view'],'change:targetRect',(_0x299a82,_0x4748e8,_0x33429e)=>{const _0x216f18=this['_getTargetTop'](_0x3bb077,_0x33429e);_0x5c941b['_targetTop']!=_0x216f18&&(_0x5c941b['_targetTop']=_0x216f18,this['_setItemTop'](_0x5c941b,_0x216f18));}),this['listenTo'](_0x5c941b,'change:top',()=>{this['_recalculate'](_0x5c941b,'top');}),this['listenTo'](_0x5c941b,'change:bottom',()=>{this['_recalculate'](_0x5c941b,'bottom');}),this['_alignToTargetRect'](_0x5c941b);const _0x808b4a=this['_getItemBefore'](_0x5c941b);return _0x808b4a&&this['_alignAfterItem'](_0x808b4a,_0x5c941b)||this['_alignToTargetRect'](_0x5c941b),this['_updateLastItem'](),this['view']['list']['add'](_0x5c941b),_0x5c941b;}['_alignForTopChange'](_0x3b554c){if(!_0x3b554c['content']['length'])return;const _0x31305c=this['_getItemBefore'](_0x3b554c);if(!_0x31305c)return;const _0x23d998=this['_sidebarItemViewToAnnotation']['get'](_0x31305c),_0x4a7351=this['_activeAnnotation'];_0x4a7351&&_0x4a7351===_0x23d998?this['_alignAfterItem'](_0x31305c,_0x3b554c):this['_alignBeforeItem'](_0x3b554c,_0x31305c);}['_alignForBottomChange'](_0x1ff244){if(!_0x1ff244['content']['length'])return;const _0x48bff8=this['_getItemAfter'](_0x1ff244);if(!_0x48bff8)return;const _0x41bc4d=this['_sidebarItemViewToAnnotation']['get'](_0x48bff8),_0x4bb9ac=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x169bf9=this['_activeAnnotation'];_0x169bf9&&_0x169bf9===_0x41bc4d&&_0x4bb9ac?(this['_alignBeforeItem'](_0x48bff8,_0x1ff244),this['_alignAfterItem'](_0x1ff244,_0x48bff8)):_0x169bf9&&_0x169bf9===_0x41bc4d?this['_alignBeforeItem'](_0x48bff8,_0x1ff244):this['_alignAfterItem'](_0x1ff244,_0x48bff8);}['_recalculate'](_0x3ea34d,_0x2a36ee){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1a0d82,changedProp:_0x4e62f2}of this['_recalculateBuffer'])'top'===_0x4e62f2?this['_alignForTopChange'](_0x1a0d82):this['_alignForBottomChange'](_0x1a0d82);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3ea34d,'changedProp':_0x2a36ee});}['getSidebarItemView'](_0x2532dd){return this['_annotationToSidebarItemView']['get'](_0x2532dd);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x434750){const _0x1abf53=this['getSidebarItemView'](_0x434750);this['stopListening'](_0x1abf53),this['stopListening'](_0x434750['view']),_0x1abf53['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x434750),this['_sidebarItemViewToAnnotation']['delete'](_0x1abf53);}['_createSidebarView'](){const _0x4c9c76=new Ii(this['context']['locale']);return _0x4c9c76['render'](),this['on']('change:_lastItem',(_0x32f03e,_0x4a5a22,_0x2757c2,_0x278f04)=>{_0x278f04&&_0x4c9c76['unbind']('minHeight'),_0x2757c2?_0x4c9c76['bind']('minHeight')['to'](_0x2757c2,'bottom'):_0x4c9c76['minHeight']=null;}),_0x4c9c76;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1a01d3){const _0x423796=this['_sidebarItemViewToAnnotation']['get'](_0x1a01d3),_0x402ecd=_0x423796&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x423796)-0x1);return _0x402ecd&&this['getSidebarItemView'](_0x402ecd)||null;}['_getItemAfter'](_0x216457){const _0x1ca63b=this['_sidebarItemViewToAnnotation']['get'](_0x216457),_0x1b9a40=_0x1ca63b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1ca63b)+0x1);return _0x1b9a40&&this['getSidebarItemView'](_0x1b9a40)||null;}['_alignBeforeItem'](_0x40809e,_0xaa981){_0x40809e['updateHeight']();const _0x13eb56=Ni(_0xaa981['bottom']+this['_spaceBetweenItems'],_0x40809e['top']);return!!_0x13eb56&&(this['_setItemTop'](_0xaa981,_0xaa981['top']-_0x13eb56),!0x0);}['_alignAfterItem'](_0x536c18,_0x40ab21){_0x536c18['updateHeight']();const _0x11feb4=Ni(_0x536c18['bottom']+this['_spaceBetweenItems'],_0x40ab21['top']);return!!_0x11feb4&&(this['_setItemTop'](_0x40ab21,_0x40ab21['top']+_0x11feb4,!0x1),!0x0);}['_alignToTargetRect'](_0x52bfeb){const _0x133795=this['_sidebarItemViewToAnnotation']['get'](_0x52bfeb);if(!_0x133795||!_0x133795['target']||!_0x133795['targetRect'])return;const _0x1ebb5f=this['_getTargetTop'](_0x133795,_0x133795['targetRect']);this['_setItemTop'](_0x52bfeb,_0x1ebb5f);}['_getTargetTop'](_0x4e99e5,_0x5a93b4){if(null===_0x5a93b4)return 0x0;if(_0x4e99e5['target']instanceof _0x3f41c9)return _0x5a93b4['top'];{const _0x3d292b=new _0x3f41c9(this['view']['element'])['top'];return _0x5a93b4['top']-_0x3d292b;}}['_setItemTop'](_0x3c6503,_0x477878,_0x45b18e=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x45b18e&&(_0x477878=Math['max'](_0x477878,this['_getMaxAvailableTop'](_0x3c6503))),_0x3c6503['top']=_0x477878;}['_getMaxAvailableTop'](_0x125dd5){let _0x775260=this['_getItemBefore'](_0x125dd5),_0x4bc781=0x0;for(;_0x775260;)_0x775260['updateHeight'](),_0x4bc781+=this['_spaceBetweenItems']+_0x775260['height'],_0x775260=this['_getItemBefore'](_0x775260);return _0x4bc781;}};function Ni(_0x4389f7,_0x1a2d5a){return Math['max'](_0x4389f7-_0x1a2d5a,0x0);}function Oi(_0x42d46d){return null!==_0x42d46d&&'object'==typeof _0x42d46d&&0x1===_0x42d46d['nodeType'];}var Mi=class extends _0x5d945e{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3b78a2){super(_0x3b78a2),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1d3c5e(),this['_refreshPositioningDebounced']=_0x1ebf5f(()=>{_0x3b78a2['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x125153=this['context']['plugins']['get'](Ti),_0x4847eb=this['context']['plugins']['get'](ki);_0x125153['register']('wideSidebar',this),_0x4847eb['container']&&_0x125153['switchTo']('wideSidebar');}['setActiveAnnotation'](_0xd48eab){if(_0xd48eab===this['activeAnnotation'])return;const _0x3049ae=this['context']['plugins']['get'](ki);_0x3049ae['_activeAnnotation']=_0xd48eab;const _0x38ac58=this['activeAnnotation'];_0x3049ae['refresh']({'blurredAnnotation':_0x38ac58,'activatedAnnotation':_0xd48eab}),this['activeAnnotation']=_0xd48eab;}['attach'](_0x1ab435){this['annotations']=_0x1ab435;const _0x50490b=this['context']['plugins']['get'](ki);if(_0x50490b['_annotations']=_0x1ab435,this['isAttached'])throw new _0x460944('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x50490b,'set:container',()=>{this['detach'](),this['listenTo'](_0x50490b,'change:container',_0x119abd=>{_0x119abd['off'](),this['attach'](_0x1ab435);});}),_0x50490b['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x418034=_0x274d2f=>{_0x274d2f['updateTargetRect'](),_0x50490b['addAnnotation'](_0x274d2f);};for(const _0x1bc1a9 of _0x1ab435)_0x418034(_0x1bc1a9);this['listenTo'](_0x1ab435,'add',(_0x4b1ada,_0x26393e)=>{_0x418034(_0x26393e);}),this['listenTo'](_0x1ab435,'remove',(_0x4609ea,_0xf75f4e,_0x3dad1e)=>{_0x50490b['rearrange']({'removedAnnotation':_0xf75f4e,'previousAnnotation':_0x1ab435['get'](_0x3dad1e-0x1),'nextAnnotation':_0x1ab435['get'](_0x3dad1e+0x1)}),_0xf75f4e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1ab435,'focus',(_0x3c1e04,_0x43f6ad)=>{this['setActiveAnnotation'](_0x43f6ad);}),this['listenTo'](_0x1ab435,'blur',()=>{this['setActiveAnnotation'](null);});const _0xa31834=this['context']instanceof _0x2e85d8?this['context']['editors']:new _0x1d3c5e([this['context']]);for(const _0x8e9f9a of _0xa31834)this['_integrateWithEditorAnnotations'](_0x8e9f9a);this['listenTo'](_0xa31834,'add',(_0x3bcb34,_0x149705)=>{this['listenTo'](_0x149705,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x149705);});}),this['listenTo'](_0xa31834,'remove',(_0xa15fb3,_0x4ef5fa)=>{_0x4ef5fa['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4ef5fa['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x460944('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x315745=this['context']['plugins']['get'](ki);_0x315745['_detachFromContainer'](this['annotations']),this['stopListening'](_0x315745),this['stopListening'](this['annotations']),this['context']instanceof _0x2e85d8&&this['stopListening'](this['context']['editors']);for(const _0x4b2113 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4b2113);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4b963e){if(!_0x4b963e['plugins']['has']('EditorAnnotations'))return;const _0x178170=_0x4b963e['plugins']['get']('EditorAnnotations'),_0x244e9f=()=>{const _0x44b463=_0x178170['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x44b463[0x0]||null);};this['listenTo'](_0x178170,'refresh',_0x244e9f),this['listenTo'](_0x178170,'blur',(_0x56cc58,{isAnnotationTracked:_0x5b7cbd})=>{this['activeAnnotation']&&_0x5b7cbd(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x178170,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x21fd07=>{_0x178170['hasDomSelection']()&&(_0x244e9f(),_0x21fd07['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x178170);}['_destroyEditorAnnotationsIntegration'](_0x2683f7){this['stopListening'](_0x2683f7),this['_editorAnnotations']['remove'](_0x2683f7);}},Ri=class extends _0x5a263d{['counterView'];constructor(_0x378d37){super(_0x378d37);const _0x12aab7=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x17a33d,_0x284025)=>_0x17a33d?'...':_0x284025['toString']()),this['set']('annotationType',''),this['icon']=_0x1f3af2,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x12aab7['to']('annotationType',_0x40a326=>'ck-annotation-counter__badge--'+_0x40a326),_0x12aab7['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x12aab7['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x5d945e{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xb1ed5d){super(_0xb1ed5d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x270b14())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1d3c5e(),this['_refreshPositioningDebounced']=_0x1ebf5f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x701dbb(this['context']['locale']),this['balloonPanelView']=new _0xd4a3f7(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xaa16f5){this['annotations']=_0xaa16f5;const _0x344bbd=this['context']['plugins']['get'](ki),_0x422b4e=this['balloonPanelView'];if(_0x344bbd['_annotations']=_0xaa16f5,this['isAttached'])throw new _0x460944('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x344bbd,'set:container',()=>{this['detach'](),this['listenTo'](_0x344bbd,'change:container',_0x424c36=>{_0x424c36['off'](),this['attach'](_0xaa16f5);});}),_0x344bbd['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4860c5=_0x378384=>{const _0x4756de=new Ri(this['context']['locale']);_0x344bbd['addAnnotation'](_0x378384,_0x4756de),this['_annotationToNarrowView']['set'](_0x378384,_0x4756de),_0x4756de['bind']('isDirty','annotationType','number')['to'](_0x378384['view'],'isDirty','type','length'),_0x4756de['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x422b4e['content']['first']!==_0x378384['view']?(this['_showBalloon'](_0x378384),_0x378384['view']['element']['focus'](),this['setActiveAnnotation'](_0x378384)):this['setActiveAnnotation'](null);});};for(const _0x32f103 of _0xaa16f5)_0x4860c5(_0x32f103);this['listenTo'](_0xaa16f5,'add',(_0x453e94,_0x290a67)=>{_0x4860c5(_0x290a67);}),this['listenTo'](_0xaa16f5,'remove',(_0x433dbd,_0x3b7cfd,_0x13ea50)=>{this['_annotationToNarrowView']['get'](_0x3b7cfd)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3b7cfd),_0x344bbd['rearrange']({'removedAnnotation':_0x3b7cfd,'previousAnnotation':_0xaa16f5['get'](_0x13ea50-0x1),'nextAnnotation':_0xaa16f5['get'](_0x13ea50+0x1)}),_0x3b7cfd===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xaa16f5,'focus',(_0x2eb13b,_0x3b9a70)=>{this['setActiveAnnotation'](_0x3b9a70);}),this['listenTo'](_0xaa16f5,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x58cdf9,_0x52c7dc)=>{_0x52c7dc['keyCode']===_0x40bd72['esc']&&_0x422b4e['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x422b4e['content']['first']),this['_hideBalloon'](),_0x52c7dc['stopPropagation'](),_0x52c7dc['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5b8942,_0x705c76)=>{const _0x37de22=_0x705c76['target'];_0x422b4e['isVisible']&&_0x422b4e['element']['contains'](_0x37de22)||_0x344bbd['view']['element']['contains'](_0x37de22)||_0x5b8942['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x15a115=>_0x15a115['contains'](_0x37de22))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x351bb5=this['context']instanceof _0x2e85d8?this['context']['editors']:new _0x1d3c5e([this['context']]);for(const _0x560e21 of _0x351bb5)this['_integrateWithEditorAnnotations'](_0x560e21);this['listenTo'](_0x351bb5,'add',(_0x36d912,_0x31f843)=>{this['listenTo'](_0x31f843,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x31f843);});}),this['listenTo'](_0x351bb5,'remove',(_0x42ac2c,_0x57e5b9)=>{_0x57e5b9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x57e5b9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x245c50){if(_0x245c50===this['activeAnnotation'])return;const _0x31e796=this['context']['plugins']['get'](ki);_0x31e796['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x245c50,'disableAnimationOnActivatedAnnotation':!0x0}),_0x245c50&&_0x31e796['getSidebarItemView'](_0x245c50)?this['_showBalloon'](_0x245c50):this['_hideBalloon'](),this['activeAnnotation']=_0x245c50;}['detach'](){if(!this['isAttached'])throw new _0x460944('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3235a5=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2e3037=>_0x2e3037['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3235a5['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2e85d8&&this['stopListening'](this['context']['editors']);for(const _0x30c7a8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x30c7a8);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'](_0x5ce3c2){if(!_0x5ce3c2['plugins']['has']('EditorAnnotations'))return;const _0x1d6af8=_0x5ce3c2['plugins']['get']('EditorAnnotations'),_0x160198=this['context']['plugins']['get'](ki),_0x4d5a60=this['annotations'],_0x280a2c=this['balloonPanelView'],_0x992c47=()=>{const _0x475f0a=_0x1d6af8['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x475f0a),this['setActiveAnnotation'](_0x475f0a[0x0]||null);};this['listenTo'](_0x1d6af8,'refresh',_0x992c47),this['listenTo'](_0x1d6af8,'blur',(_0x17cda6,{isAnnotationTracked:_0x1c959f})=>{this['activeAnnotation']&&_0x1c959f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1d6af8,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4d5a60,'blur',_0x24cd55=>{_0x1d6af8['hasDomSelection']()&&_0x24cd55['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x260e50,_0x1d7456)=>{const _0x371fb9=_0x1d7456['target'];_0x280a2c['isVisible']&&_0x280a2c['element']['contains'](_0x371fb9)||_0x160198['view']['element']['contains'](_0x371fb9)||this['activeAnnotation']&&_0x1d6af8['hasDomSelection']()&&(_0x992c47(),_0x260e50['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1d6af8);}['_destroyEditorAnnotationsIntegration'](_0x35f898){_0x35f898&&(this['stopListening'](_0x35f898),this['_editorAnnotations']['remove'](_0x35f898));}['_setSelectedAnnotations'](_0x5d7320){for(const _0xc152ff of this['_selectedAnnotations'])_0x5d7320['includes'](_0xc152ff)||this['_manuallyClosedAnnotationViews']['delete'](_0xc152ff['view']);this['_selectedAnnotations']=_0x5d7320;}['_refreshPositioning'](){const _0x5a08ec=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5a08ec['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x236801){if(this['_manuallyClosedAnnotationViews']['has'](_0x236801['view']))return;const _0x8494c=this['balloonPanelView']['content']['first'];_0x8494c!==_0x236801['view']?(_0x8494c&&this['_detachListeners'](_0x8494c),this['_attachListeners'](_0x236801['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x236801['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1f1e74=this['balloonPanelView']['content']['first'],_0x56ae7c=_0x1f1e74&&this['annotations']['getByView'](_0x1f1e74);if(!_0x56ae7c||!this['_annotationToNarrowView']['has'](_0x56ae7c))return;const _0xe55e5c=this['_annotationToNarrowView']['get'](_0x56ae7c)['element'],_0x2eb7c3=(function(){const _0x3acc1c=_0xd4a3f7['defaultPositions'];return[_0x3acc1c['southArrowNorthEast'],_0x3acc1c['northArrowSouthEast'],_0x3acc1c['southArrowNorth'],_0x3acc1c['northArrowSouth'],_0x3acc1c['southArrowNorthWest'],_0x3acc1c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xe55e5c,'positions':_0x2eb7c3});}['_hideBalloon'](){const _0x20a492=this['balloonPanelView'],_0x18f70b=_0x20a492['content']['first'];_0x18f70b&&(this['_detachListeners'](_0x18f70b),_0x20a492['unpin'](),_0x20a492['content']['clear']());}['_attachListeners'](_0x46fbb9){this['listenTo'](_0x46fbb9,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x46fbb9,'Esc',(_0x5d0c79,_0x926823)=>{this['_manuallyClosedAnnotationViews']['add'](_0x46fbb9),this['_hideBalloon'](),_0x926823();});}['_detachListeners'](_0x48be37){this['stopListening'](_0x48be37);}},xi=class extends _0x32d196{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x63646c,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x278913){super(_0x278913),_0x278913['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x278913['plugins']['get'](_0x63646c),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x1ebf5f(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x395578=this['editor']['plugins']['get'](Ti);_0x395578['context']===this['editor']&&(_0x395578['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4d32c4,_0x581489)=>{const _0x307d67=this['_balloon'];if(this['isAttached']&&_0x307d67['visibleView']){const _0x36b3a9=this['annotations']['getByView'](_0x307d67['visibleView']);_0x36b3a9&&this['_closeAnnotation'](_0x36b3a9),_0x581489();}}));}['afterInit'](){const _0x487250=this['editor']['plugins']['get'](Ti);_0x487250['context']===this['editor']&&(_0x487250['hasActive']()||_0x487250['switchTo']('inline'));}['setActiveAnnotation'](_0x475d7d){_0x475d7d!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x475d7d&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x475d7d)&&this['_addAnnotationToBalloon'](_0x475d7d,!0x0),_0x475d7d['isActive']=!0x0),_0x475d7d||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x475d7d);}['attach'](_0x3ae315){this['annotations']=_0x3ae315;const _0x565522=this['editor']['plugins']['get'](Ti),_0x300553=this['_balloon'];if(this['isAttached'])throw new _0x460944('inlineannotations-attach-already-attached',this);if(_0x565522['context']!==this['editor'])throw new _0x460944('inlineannotations-not-allowed-with-context',this);const _0x421eb0=this['editor']['plugins']['get'](di);this['listenTo'](_0x421eb0,'refresh',()=>{const _0x55eba4=_0x421eb0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4db6d8,_0x35770a;!this['_forceRefresh']&&(_0x4db6d8=_0x55eba4,_0x35770a=this['_selectedAnnotations'],_0x4db6d8['length']===_0x35770a['length']&&_0x4db6d8['every'](_0x3789ff=>_0x35770a['includes'](_0x3789ff)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x55eba4),this['setActiveAnnotation'](_0x55eba4[0x0]||null));}),this['listenTo'](_0x421eb0,'blur',(_0x5dc874,{isAnnotationTracked:_0x42f11b})=>{this['activeAnnotation']&&_0x42f11b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x421eb0,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4e3df1,_0x152abd,_0x3d22ad)=>{_0x3d22ad||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3ae315,'remove',(_0x106a8c,_0x382957)=>{this['_removeAnnotationFromBalloon'](_0x382957),_0x382957===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x300553,'change:visibleView',(_0x1a8f96,_0x3f1825,_0xcf748f,_0x2b67d7)=>{_0x2b67d7&&this['stopListening'](_0x2b67d7);const _0xd2e8c7=_0x3ae315['getByView'](_0xcf748f);_0xcf748f&&_0xd2e8c7&&(this['listenTo'](_0xcf748f,'change:height',()=>{_0x300553['updatePosition']();}),this['listenTo'](_0xcf748f,'Esc',()=>{this['_closeAnnotation'](_0xd2e8c7),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xd2e8c7&&this['setActiveAnnotation'](_0xd2e8c7));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x300553['visibleView']&&_0x3ae315['getByView'](_0x300553['visibleView'])&&_0x300553['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 _0x460944('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x360c41 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x360c41);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x517ac0){for(const _0x46ae0b of this['_selectedAnnotations'])_0x517ac0['includes'](_0x46ae0b)||this['_manuallyClosed']['delete'](_0x46ae0b);for(const _0x27d5d2 of this['annotations'])_0x517ac0['includes'](_0x27d5d2)||this['_removeAnnotationFromBalloon'](_0x27d5d2);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2d17bf of _0x517ac0)this['_addAnnotationToBalloon'](_0x2d17bf);}this['_selectedAnnotations']=_0x517ac0;}['_addAnnotationToBalloon'](_0x11da9e,_0x1ea460=!0x1){this['_manuallyClosed']['has'](_0x11da9e)||(this['_addedAnnotations']['has'](_0x11da9e)||this['_balloon']['hasView'](_0x11da9e['view'])||(this['_addedAnnotations']['add'](_0x11da9e),this['_balloon']['add']({'stackId':_0x11da9e['view']['id'],'view':_0x11da9e['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x11da9e)}})),_0x1ea460&&this['_balloon']['showStack'](_0x11da9e['view']['id']));}['_getBalloonTargetForAnnotation'](_0x29aab9){const _0x50adfb=_0x29aab9['target'],_0x26ad89=this['editor']['editing']['view'],_0x2e40f7=_0x26ad89['document']['selection']['getFirstRange'](),_0x43d86c=_0x26ad89['domConverter']['viewRangeToDom'](_0x2e40f7);if(_0x43d86c['collapse'](!0x0),_0x50adfb){if(_0x50adfb instanceof _0x3f41c9)return _0x50adfb;let _0x4884b4=[];for(const _0x3913d6 of _0x50adfb)_0x4884b4['push'](..._0x3f41c9['getDomElementRects'](_0x3913d6));_0x4884b4=function(_0x26c065){const _0x1dde1a=[];let _0x4b2aa=_0x26c065[0x0];for(let _0x3bb831=0x1;_0x3bb831<_0x26c065['length'];_0x3bb831++)if(Pi(_0x4b2aa,_0x26c065[_0x3bb831])){const _0x5d622f=_0x26c065[_0x3bb831]['width'];_0x4b2aa['width']+=_0x5d622f,_0x4b2aa['right']+=_0x5d622f;}else _0x1dde1a['push'](_0x4b2aa),_0x4b2aa=_0x26c065[_0x3bb831];return _0x1dde1a['push'](_0x4b2aa),_0x1dde1a;}(_0x4884b4);const _0x3e8892=_0x43d86c['getBoundingClientRect']();return _0x4884b4['find'](_0x50541c=>_0x50541c['top']<=_0x3e8892['top']&&_0x50541c['bottom']>=_0x3e8892['bottom']&&_0x50541c['left']<=_0x3e8892['left']&&_0x50541c['right']>=_0x3e8892['right'])||_0x4884b4[0x0];}return _0x29aab9['targetRect']||_0x43d86c;}['_removeAnnotationFromBalloon'](_0x57f65e){this['_addedAnnotations']['has'](_0x57f65e)&&this['_balloon']['hasView'](_0x57f65e['view'])&&(this['_addedAnnotations']['delete'](_0x57f65e),this['_balloon']['remove'](_0x57f65e['view']));}['_closeAnnotation'](_0x3ac424){this['_manuallyClosed']['add'](_0x3ac424),this['_removeAnnotationFromBalloon'](_0x3ac424);}};function Pi(_0xb3bcb4,_0x23928b){return _0xb3bcb4['top']===_0x23928b['top']&&_0xb3bcb4['bottom']===_0x23928b['bottom']&&_0xb3bcb4['right']===_0x23928b['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5038c7,_0x1f7df8){super(_0x5038c7),this['set']('isEmpty',!_0x1f7df8['length']),this['focusTracker']=new _0x46cfaf(),this['_annotationViews']=_0x1f7df8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x1f7df8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1f7df8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1f7df8,'remove',(_0x1ec123,_0x3bfcfe)=>{_0x3bfcfe['isActive']&&this['focus'](),_0x1f7df8['length']||(this['isEmpty']=!0x0);});const _0x394579=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x5038c7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1f7df8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x394579['if']('isEmpty','ck-hidden',_0x4ffe70=>!_0x4ffe70)]},'children':[{'text':Et(_0x5038c7,'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 _0x52d876 of this['_annotationViews'])this['focusTracker']['add'](_0x52d876['element']);this['_annotationViews']['on']('change',(_0x33a865,{added:_0xc02967,removed:_0x3040ae})=>{for(const _0x32d596 of _0xc02967)this['focusTracker']['add'](_0x32d596['element']);for(const _0x3eb3a0 of _0x3040ae)this['focusTracker']['remove'](_0x3eb3a0['element']);});}},Di=class extends _0x5d945e{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x5df9ff){super(_0x5df9ff),this['archivedThreads']=new _0x1d3c5e();}['init'](){const _0x4ec483=this['context'],_0x3945be=_0x4ec483['plugins']['get'](oi),_0x5e91ef=_0x4ec483['plugins']['get'](ti);this['listenTo'](_0x3945be,'addCommentThread',(_0x310100,{threadId:_0x21f6c5})=>{const _0x43e261=_0x3945be['getCommentThread'](_0x21f6c5);_0x43e261['archivedAt']&&this['archivedThreads']['add'](_0x43e261,this['_calculatePosition'](_0x43e261['archivedAt'])),this['listenTo'](_0x43e261,'change:archivedAt',(_0x3fcc26,_0x3bef96,_0x4d5b7f)=>{_0x4d5b7f?this['archivedThreads']['has'](_0x43e261)||this['archivedThreads']['add'](_0x43e261,this['_calculatePosition'](_0x43e261['archivedAt'])):this['archivedThreads']['has'](_0x43e261)&&this['archivedThreads']['remove'](_0x43e261);});}),this['listenTo'](_0x3945be,'removeCommentThread',(_0xfd8be2,{threadId:_0x4c09bc})=>{const _0x231048=_0x3945be['getCommentThread'](_0x4c09bc);this['stopListening'](_0x231048),this['archivedThreads']['has'](_0x231048)&&this['archivedThreads']['remove'](_0x231048);},{'priority':'highest'}),this['listenTo'](_0x5e91ef['collection'],'focus',(_0x348406,_0xef5188)=>{_0xef5188['isVisible']||(_0xef5188['isActive']=!0x0,_0x5e91ef['activate'](_0xef5188));});}['_calculatePosition'](_0x335619){const _0x1d9fe3=[...this['archivedThreads']]['findIndex'](_0x4362f1=>_0x4362f1['archivedAt']<_0x335619);return _0x1d9fe3>-0x1?_0x1d9fe3:this['archivedThreads']['length'];}},Vi=class extends _0x32d196{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x3da067];}constructor(_0x5a87c6){super(_0x5a87c6),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x5efbaf=this['editor'],_0x13792c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5efbaf['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5a263d,!0x0)),_0x5efbaf['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xe6ebf3=this['_createCommentsArchiveButton'](rt);return _0xe6ebf3['set']({'role':'menuitemcheckbox'}),_0xe6ebf3;});const _0x43bd19=_0x5efbaf['plugins']['get'](Di),_0x59023b=_0x5efbaf['plugins']['get']('Annotations'),_0x36fc7e=_0x5efbaf['plugins']['get']('CommentsRepository');_0x43bd19['archivedThreads']['forEach'](_0x33e8c3=>{this['_handleNewThread'](_0x33e8c3);}),this['listenTo'](_0x43bd19['archivedThreads'],'add',(_0x17672b,_0x217147)=>{this['_handleNewThread'](_0x217147);}),this['listenTo'](_0x59023b['collection'],'add',(_0x1cebb1,_0x4778c2)=>{const _0x3277ee=this['_pendingThreads']['find'](_0x17ab74=>{const _0xe8f750=_0x36fc7e['_threadToController']['get'](_0x17ab74);return _0xe8f750&&_0x4778c2['innerView']===_0xe8f750['view'];});if(_0x3277ee){const _0x25406a=this['_calculatePosition'](_0x3277ee['archivedAt']);this['_addAnnotationToArchive'](_0x4778c2,_0x25406a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3277ee),0x1);}}),this['listenTo'](_0x43bd19['archivedThreads'],'remove',(_0x164a41,_0x472430)=>{const _0xda49a3=_0x5efbaf['config']['get']('collaboration.channelId');if(!_0xda49a3||_0x472430['channelId']===_0xda49a3){if(this['_pendingThreads']['includes'](_0x472430))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x472430),0x1);else{const _0x14f857=_0x36fc7e['_threadToController']['get'](_0x472430),_0x23f461=_0x59023b['getByInnerView'](_0x14f857['view']);this['annotationViews']['remove'](_0x23f461['view']),this['stopListening'](_0x23f461),this['stopListening'](_0x23f461['focusableElements']);}}}),this['listenTo'](_0x59023b['collection'],'add',(_0xe0e6d4,_0x386c9c)=>{this['listenTo'](_0x386c9c,'escape',_0x13792c);}),this['listenTo'](_0x59023b['collection'],'remove',(_0x533e3d,_0x1e41f9)=>{this['stopListening'](_0x1e41f9,'escape',_0x13792c);});}['_addAnnotationToArchive'](_0x419b8e,_0x18cdc3){this['listenTo'](_0x419b8e,'set:isVisible',_0x34d13f=>{_0x34d13f['return']=!0x1,_0x34d13f['stop']();}),this['annotationViews']['add'](_0x419b8e['view'],_0x18cdc3);}['_handleNewThread'](_0x17298d){const _0x3fc6dc=this['editor']['plugins']['get']('CommentsRepository'),_0x52ec90=this['editor']['plugins']['get']('Annotations'),_0x199658=this['editor']['config']['get']('collaboration.channelId');if(!_0x199658||_0x17298d['channelId']===_0x199658){const _0x371ca4=_0x3fc6dc['_threadToController']['get'](_0x17298d);if(!_0x371ca4)return void this['_pendingThreads']['push'](_0x17298d);const _0x4257bf=this['_calculatePosition'](_0x17298d['archivedAt']),_0x3fc573=_0x52ec90['getByInnerView'](_0x371ca4['view']);_0x3fc573['isVisible']&&_0x52ec90['_visibleAnnotations']['remove'](_0x3fc573),this['_addAnnotationToArchive'](_0x3fc573,_0x4257bf);}}['_calculatePosition'](_0x31baba){const _0x438b34=this['editor']['config']['get']('collaboration.channelId'),_0x7bdea5=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x3b1ddb=>_0x3b1ddb['channelId']===_0x438b34)['findIndex'](_0x169771=>_0x169771['archivedAt']<_0x31baba);return _0x7bdea5<0x0||_0x7bdea5>this['annotationViews']['length']?this['annotationViews']['length']:_0x7bdea5-0x1;}['_toggleDialog'](){const _0xa1bf80=this['editor'],_0x15e4c3=_0xa1bf80['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0xa1bf80['locale'],this['annotationViews'])),'commentsArchive'===_0x15e4c3['id']?_0x15e4c3['hide']():_0x15e4c3['show']({'id':'commentsArchive','title':Et(_0xa1bf80['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4a6a61,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3cf2f2['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0xecb46,_0x542bac=!0x1){const _0x2d8b89=this['editor']['locale'],_0x3830db=this['editor']['plugins']['get']('Dialog'),_0x960a3a=new _0xecb46(_0x2d8b89);return _0x960a3a['bind']('isEnabled')['to'](this,'isEnabled'),_0x960a3a['bind']('isOn')['to'](_0x3830db,'id',_0x3eaa85=>'commentsArchive'===_0x3eaa85),_0x960a3a['set']({'label':Et(_0x2d8b89,'COMMENTS_ARCHIVE'),'icon':_0x4a6a61,'isToggleable':!0x0}),_0x542bac&&(_0x960a3a['tooltip']=!0x0),this['listenTo'](_0x960a3a,'execute',()=>this['_toggleDialog']()),_0x960a3a;}['_hideDialogOnAnnotationEscape']=_0x108e59=>{const _0x4aafc8=_0x108e59['source'];if(!this['annotationViews']['has'](_0x4aafc8['view']))return;const _0x1f3050=this['editor']['plugins']['get']('Dialog');_0x1f3050['isOpen']&&'commentsArchive'===_0x1f3050['id']&&(_0x1f3050['hide'](),_0x108e59['stop']());};},Bi=class extends _0x32d196{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
|