@ckeditor/ckeditor5-comments 48.3.1-alpha.0 → 48.3.1-alpha.1

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -11
  2. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x2d8028,Context as _0x10af8d,ContextPlugin as _0x5263a8,Editor as _0x5ee731,PendingActions as _0x3a4ccf,Plugin as _0x24174e}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x44c5ce,Collection as _0x141c83,DomEmitterMixin as _0x5c783d,FocusTracker as _0x116564,KeystrokeHandler as _0x142bdc,ObservableMixin as _0x4f7c46,Rect as _0x12d113,diff as _0xba0a24,first as _0x372557,getEnvKeystrokeText as _0x3acf66,keyCodes as _0x33b97d,priorities as _0x519083,scrollViewportToShowTarget as _0x4fa0f2,toUnit as _0x25f4af,uid as _0x341e8a}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x1c5de6,ConfirmMixin as _0x504b41,FOCUS_ANNOTATION_KEYSTROKE as _0x3c98c6,LateFocusButtonView as _0x25fa03,LateFocusDropdownButtonView as _0x11ea9e,UserView as _0x15a01a,Users as _0x1278ff,getAllMarkersDomElementsSorted as _0x571da3,getDateTimeFormatter as _0x2c3d3f,hashObject as _0x167c02,setupThreadKeyboardNavigation as _0x13ffc6,surroundingMarkersDetector as _0x532f4b,trimHtml as _0x244061}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x1e2b2b,debounce as _0x2c3156,isEqual as _0xbf7351,set as _0x4d4ab,throttle as _0x5b0b03,unset as _0x9b4fa2}from'es-toolkit/compat';import{IconAddComment as _0x57551d,IconCheck as _0x45496a,IconCommentsArchive as _0x1e34b8,IconPencil as _0x3f702f,IconRemoveComment as _0x22070e,IconThreeVerticalDots as _0x42eaeb,IconUndo as _0x3cd5a2}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x1a33d1,BodyCollection as _0x15f0a0,ButtonView as _0x27efd5,ContextualBalloon as _0x521131,Dialog as _0x1e5a1d,DialogViewPosition as _0x11ba3f,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
- _0x4f7c46();var bt=class extends It{['model'];['view'];constructor(_0x54c2e0,_0x259726){super(),this['model']=_0x54c2e0,this['model']['_isAttached']=!0x0,this['view']=_0x259726,this['listenTo'](_0x259726,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x259726,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x259726,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x259726,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x259726,'addComment',(_0xd88470,_0x22590d)=>this['addComment'](_0x22590d)),this['listenTo'](_0x259726,'updateComment',(_0x34acbc,_0x41661d,_0x824464)=>this['updateComment'](_0x41661d,_0x824464)),this['listenTo'](_0x259726,'removeComment',(_0x1931ea,_0x1182e6)=>this['removeComment'](_0x1182e6));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x2a6075){this['model']['addComment']({'content':_0x2a6075,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3a398b,_0x2c6147){this['model']['getComment'](_0x3a398b)['update']({'content':_0x2c6147});}['removeComment'](_0x2b23c8){this['model']['getComment'](_0x2b23c8)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x25fd3c,_0x4bf606,_0x32030c){const t=_0x25fd3c['t'];switch(_0x4bf606){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'},_0x32030c);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'},_0x32030c);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'},_0x32030c);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'},_0x32030c);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x32030c);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'},_0x32030c);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'},_0x32030c);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'},_0x32030c);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(_0x237293,_0x558798){super(_0x237293);const _0x23e4d2=_0x341e8a();this['main']=this['createCollection'](),this['editable']=new st(_0x237293,_0x558798,void 0x0,{'label':()=>Et(_0x237293,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x237293['uiLanguageDirection'],'lang':_0x237293['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x23e4d2},'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(_0x307bac){super(_0x307bac),this['view']=new kt(_0x307bac['locale'],_0x307bac['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x511eea=this['editor']['editing']['view'],_0x5392c0=this['view']['editable'];_0x5392c0['name']=_0x511eea['document']['getRoot']()['rootName'],this['view']['render']();const _0x29c9cd=_0x5392c0['element'];this['setEditableElement'](_0x5392c0['name'],_0x29c9cd),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x511eea['attachDomRoot'](_0x29c9cd),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x4f7c46(_0x5ee731);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x4e3893={}){(_0x4e3893=Object['assign']({},_0x4e3893))['plugins']||(_0x4e3893['plugins']=CommentEditor['defaultPlugins']),super(_0x4e3893),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 _0x4d4510=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4d4510))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1c1445=>{const _0x1cc982=this['model']['document']['getRoot'](),_0x9aad92=_0x1cc982&&_0x1cc982['getChild'](_0x1cc982['childCount']-0x1);_0x1c1445['setSelection'](_0x9aad92,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2799d0=this['editing']['view'],_0x47a6e6=_0x2799d0['document']['getRoot'](),_0x4e2b62=_0x47a6e6['getChild'](0x0);_0x47a6e6['childCount']>0x1||!_0x4e2b62||'p'!=_0x4e2b62['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x2799d0,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4e2b62['placeholder']=this['placeholder']),ut({'view':_0x2799d0,'element':_0x4e2b62,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4e2b62);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0xc80608,_0x3ba7bf={}){super(_0xc80608),this['editor']=null,this['_editorConfig']=_0x3ba7bf,this['set']('value',_0x3ba7bf['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0xc80608,'Reply...')),this['set']('submitLabel',Et(_0xc80608,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x142bdc(),this['focusTracker']=new _0x116564(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3fad92=>!_0x3fad92['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',(_0x79580e,_0xb570d7)=>{this['cancelButtonView']['fire']('execute'),_0xb570d7();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2a8efe,_0x209a83)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x209a83());}),this['on']('submit',(_0x5068b7,_0x4cc537)=>{_0x4cc537['length']>0xfde8?(alert(Et(_0xc80608,'TOO_LONG_COMMENT_ALERT',[_0x4cc537['length'],0xfde8])),_0x5068b7['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 _0x16fff3=this['editor'];this['element']['insertBefore'](_0x16fff3['ui']['element'],this['element']['firstChild']),_0x16fff3['model']['document']['on']('change',()=>this['value']=_0x16fff3['getData']()),_0x16fff3['bind']('placeholder')['to'](this),this['focusables']['add'](_0x16fff3['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x390e71){-0x1===_0x390e71?(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:_0x2701e}=this,_0x4433c2=new _0x27efd5(_0x2701e);return _0x4433c2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4433c2['withText']=!0x0,_0x4433c2['bind']('label')['to'](this,'submitLabel'),_0x4433c2['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4433c2['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1515f1,_0xba2c07)=>!_0xba2c07&&!!_0x1515f1['trim']()),_0x4433c2;}['_createCancelButton'](){const {locale:_0x592607}=this,_0x45da7d=new _0x27efd5(_0x592607);return _0x45da7d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x45da7d['label']=Et(_0x592607,'Cancel'),_0x45da7d['withText']=!0x0,_0x45da7d['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x45da7d;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5af52b=>{this['focusTracker']['add'](_0x5af52b['element']);}),this['focusables']['on']('change',(_0x45e815,_0x49cbd9)=>{for(const _0x276789 of Array['from'](_0x49cbd9['added'])['reverse']())this['focusTracker']['add'](_0x276789['element']);});}},xt=class extends ht{constructor(_0x420ba6,_0x2f71c8,_0x24af5e){super(_0x420ba6),this['commentInputView']=new St(_0x420ba6,_0x24af5e),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x24797c,_0x1706f1)=>_0x24797c||!!_0x1706f1),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 _0x15a01a(_0x420ba6,_0x2f71c8),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'](_0xdb8a11){this['commentInputView']['focus'](_0xdb8a11);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x4ff053,_0x3fddcc)=>{const {submitButtonView:_0xeb412e,cancelButtonView:_0x7f0c43,editor:_0x4ae117}=this['commentInputView'];[_0xeb412e['element'],_0x7f0c43['element'],_0x4ae117?_0x4ae117['editing']['view']['getDomRoot']():null]['filter'](_0xf23159=>_0xf23159)['some'](_0x3e1f31=>_0x3e1f31['contains'](_0x3fddcc['target']))||(this['focus'](),_0x3fddcc['preventDefault']());});}},Pt=class extends ht{constructor(_0x24213f){super(_0x24213f);const _0x2d6490=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2d6490['to']('count',_0x57a1f2=>Et(_0x24213f,'NUMBER_OF_COMMENTS',_0x57a1f2))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3aead2,_0x5ab622,_0xdf55e8){super(_0x3aead2);const _0x4d09e0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5ab622['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5ab622,this['_config']=_0xdf55e8,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x116564(),this['keystrokes']=new _0x142bdc(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3f0a15=>this['commentViews']['map'](_0x1a4bd3=>_0x1a4bd3['element'])['includes'](_0x3f0a15['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x3aead2),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x350d70=>_0x350d70-this['_config']['maxCommentsWhenCollapsed']);for(const _0x544b93 of _0x5ab622['comments'])this['_handleNewCommentModel'](_0x544b93);this['_handleInfoComment'](),this['listenTo'](_0x5ab622['comments'],'add',(_0x3f207f,_0x53125c)=>{const _0xabd7cc=this['_calculatePosition'](_0x53125c);this['length']++,this['_handleNewCommentModel'](_0x53125c,_0xabd7cc),this['refreshVisibleViews']();}),this['listenTo'](_0x5ab622['comments'],'remove',(_0x5539cc,_0x378747)=>{this['length']--,this['_handleRemoveCommentModel'](_0x378747),this['refreshVisibleViews']();}),this['listenTo'](_0x5ab622,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5ab622,'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',_0x4d09e0['if']('length','ck-hidden',_0x1306a8=>!_0x1306a8)],'aria-label':Et(_0x3aead2,'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'](_0x1674d5){-0x1===_0x1674d5?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2ecbd7 of this['commentViews'])_0x2ecbd7['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x440380,_0x14a66a){const _0x5554f9=new this['_config']['CommentView'](this['locale'],_0x440380,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5554f9['viewUid']=_0x440380['id'],_0x5554f9['delegate']('removeComment')['to'](this),_0x5554f9['delegate']('updateComment')['to'](this),_0x5554f9['delegate']('resolveCommentThread')['to'](this),_0x5554f9['delegate']('editorReady')['to'](this),_0x5554f9['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5554f9,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5554f9,_0x14a66a);}['_calculatePosition'](_0x14a167){const _0x5fc96a=this['_model']['_findOptimalIndex'](_0x14a167);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x14a167['authoredAt']?_0x5fc96a-0x1:_0x5fc96a:_0x5fc96a-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xd0e6e1={'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'],_0xd0e6e1,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xd0e6e1));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x41dd81){const _0x35b16c=this['commentViews']['remove'](_0x41dd81['id']);this['stopListening'](_0x35b16c),_0x35b16c['isEditMode']&&this['_updateHasDirtyComment'](),_0x35b16c['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4aefc3=>_0x4aefc3['isEditMode']);}['_rearrangeCollapse'](){const _0x7ba3a0=function(_0x401814){const _0x2828ee=new _0x141c83();for(const _0x9e167c of _0x401814)_0x2828ee['add'](_0x9e167c);return _0x2828ee;}(this['commentViews']),_0x12b3b0=this['_collapsedCommentsView']['count'];for(let _0x5025c5=0x1;_0x5025c5<=_0x12b3b0;_0x5025c5++)_0x7ba3a0['remove'](0x1);for(const _0x5d9210 of _0x7ba3a0)_0x5d9210['collapse']();_0x12b3b0>0x0&&_0x7ba3a0['add'](this['_collapsedCommentsView'],0x1),Dt(_0xba0a24(Array['from'](this['visibleViews']),Array['from'](_0x7ba3a0)),this['visibleViews'],_0x7ba3a0);}['_rearrangeExpand'](){Dt(_0xba0a24(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x41d342 of this['visibleViews'])_0x41d342['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x493b2f=>{this['focusTracker']['add'](_0x493b2f['element']),this['keystrokes']['listenTo'](_0x493b2f['element']);}),this['commentViews']['on']('change',(_0x2f5015,_0x821d35)=>{for(const _0x276ff5 of _0x821d35['removed'])this['focusTracker']['remove'](_0x276ff5['element']),this['keystrokes']['stopListening'](_0x276ff5['element']);for(const _0x788a3b of Array['from'](_0x821d35['added'])['reverse']())this['focusTracker']['add'](_0x788a3b['element']),this['keystrokes']['listenTo'](_0x788a3b['element']);});}};function Dt(_0x2b4235,_0x36f1c1,_0x216618){let _0x4efb70=0x0;for(const _0x4883a5 of _0x2b4235)switch(_0x4883a5){case'insert':_0x36f1c1['add'](_0x216618['get'](_0x4efb70),_0x4efb70),_0x4efb70++;break;case'delete':_0x36f1c1['remove'](_0x4efb70);break;case'equal':_0x4efb70++;}}var Vt=class extends ht{constructor(_0x39af4c){super(_0x39af4c);const _0x3a81c7=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3a81c7['to']('contextValue',_0x2e4a33=>Et(_0x39af4c,'THREAD_CONTEXT_LABEL',_0x2e4a33)),'tabindex':-0x1},'children':[{'text':_0x3a81c7['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2d8c3f,_0x550d27){super(_0x2d8c3f);const _0x3c26fb=this['bindTemplate'];this['_model']=_0x550d27,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x116564(),this['keystrokes']=new _0x142bdc(),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',_0x85855=>!!_0x85855),this['bind']('contextValue')['to'](this['_model'],'context',_0x3a1079=>_0x3a1079&&_0x3a1079['value']?this['_trimContextValue'](_0x3a1079['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',_0x3c26fb['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 _0xc7544f=new _0x27efd5(this['locale']);return _0xc7544f['label']=Et(this['locale'],'Reopen'),_0xc7544f['tooltip']=Et(this['locale'],'Reopen'),_0xc7544f['icon']=_0x3cd5a2,_0xc7544f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1e3b06=>!_0x1e3b06),_0xc7544f['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4268f4,_0x5b6f52)=>_0x4268f4&&_0x5b6f52),_0xc7544f['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0xc7544f;}['_trimContextValue'](_0x1d828b){if(_0x1d828b['length']<0x96)return _0x1d828b;const _0x4c06ff=_0x1d828b['lastIndexOf']('\x20',0x93);return _0x1d828b['substring'](0x0,_0x4c06ff>-0x1?_0x4c06ff:0x93)+'...';}['_attachContextActions'](){const _0x266099=this['element']['querySelector']('.ck-context'),_0x4c310c=_0x266099['querySelector']('.ck-context__value');this['listenTo'](_0x266099,'mouseenter',()=>{_0x4c310c['offsetWidth']<_0x4c310c['scrollWidth']&&_0x266099['classList']['add']('overlay');}),this['listenTo'](_0x266099,'mouseleave',()=>{_0x266099['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x26dfaf of this['focusables'])this['focusTracker']['add'](_0x26dfaf['element']),this['keystrokes']['listenTo'](_0x26dfaf['element']);}['_createContextView'](){const _0x17c4e9=new Vt(this['locale']);return _0x17c4e9['bind']('contextValue')['to'](this),_0x17c4e9;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x11a3b4,_0x2d0ba9,_0xd44b66,_0x3cd13c){super(_0x11a3b4),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2d0ba9,this['_localUser']=_0xd44b66,this['_config']=_0x3cd13c,this['commentThreadHeaderView']=new Bt(_0x11a3b4,_0x2d0ba9),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x1c5de6(_0x11a3b4,Et(_0x11a3b4,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x11a3b4,_0x2d0ba9,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3cd13c)),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',(_0x2f1c3d,_0x411ec1)=>_0x2f1c3d||!!_0x411ec1),this['bind']('isUnlinked')['to'](_0x2d0ba9,'unlinkedAt',_0x1d23b4=>!!_0x1d23b4);let _0x4a6da2=null;const _0xf98b54=()=>{const _0x32b105=this['_model']['comments']['first']||null;_0x32b105!==_0x4a6da2&&(_0x4a6da2&&this['stopListening'](_0x4a6da2,'change:content'),_0x4a6da2=_0x32b105,_0x32b105&&this['listenTo'](_0x32b105,'change:content',_0xf98b54));const _0x373e9c=_0x32b105?_0x32b105['author']['name']:this['_localUser']['name'],_0x206404=_0x32b105?new DOMParser()['parseFromString'](_0x244061(_0x32b105['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x5eb7fc=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x373e9c]);this['set']('ariaLabel',_0x206404?_0x5eb7fc+'\x20'+_0x206404:_0x5eb7fc);};this['listenTo'](this['_model']['comments'],'change',_0xf98b54),_0xf98b54(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x116564(),this['keystrokes']=new _0x142bdc(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x52e132=>_0x52e132['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x13ffc6(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x42d5f7=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x43a8c5=_0x42d5f7['commentInputView'];return _0x42d5f7['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x43a8c5,'value',(_0x15f9ca,_0x23e61b,_0x139b3c,_0x53a022,_0x305682)=>!!_0x305682||!!_0x53a022&&_0x139b3c&&!_0x23e61b||_0x15f9ca&&_0x139b3c&&!_0x23e61b),_0x43a8c5['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x371b01,_0x20314f,_0x57d522)=>{let _0x4dbaad;return _0x4dbaad=_0x57d522&&_0x20314f?'Reply\x20to\x20reopen\x20discussion...':_0x371b01?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x4dbaad);}),_0x43a8c5['bind']('submitLabel')['to'](this,'length',_0xe5bf3=>Et(this['locale'],_0xe5bf3?'Reply':'Comment')),_0x43a8c5['on']('submit',(_0x2755b6,_0x529de6)=>{this['fire']('addComment',_0x529de6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x43a8c5['on']('cancel',()=>{this['focus']();}),_0x43a8c5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x43a8c5['on']('cancel',_0x252d0d=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x252d0d['stop']());}),this['on']('change:isActive',(_0xedc6d0,_0xf7a02c,_0x35d2e1)=>{_0x35d2e1||this['length']||_0x43a8c5['value']||this['fire']('removeCommentThread');}),_0x42d5f7;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x504b41(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1d9629,_0x666933,_0x18c9c4,_0x2329ee){super(_0x1d9629,_0x666933,_0x18c9c4,_0x2329ee),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1d9629,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x5528c0,_0x3d3efa,_0x26b3ce)=>{_0x26b3ce||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x2c2e79,_0xe4095b,_0x4ba6b7)=>{_0x4ba6b7&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x1e7787=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1e7787['if']('isActive','ck-thread--active'),_0x1e7787['if']('isUnlinked','ck-thread--unlinked'),_0x1e7787['to']('actionIndicator',_0x5514a0=>_0x5514a0?'ck-thread--'+_0x5514a0:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1e7787['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 _0x46994d of this['commentsListView']['commentViews'])_0x46994d['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0xbfade7}=this,_0x1b7f4d=this['commentsListView']['commentViews']['get'](0x0);_0x1b7f4d===this['_boundFirstCommentView']||_0x1b7f4d['isSystemComment']||(this['_boundFirstCommentView']=_0x1b7f4d,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1b7f4d,'actionIndicator',_0x265650=>'remove'===_0x265650?'remove':null),_0x1b7f4d['placeholder']=Et(_0xbfade7,'Write\x20a\x20comment...'),_0x1b7f4d['removeButton']['on']('execute',_0x423c8f=>{_0x423c8f['stop'](),this['showConfirm'](Et(_0xbfade7,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1b7f4d['focus']();}),_0x1b7f4d['actionBar']['add'](this['resolveButton'],0x0),_0x1b7f4d['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x651b3c=new _0x25fa03(this['locale']);return _0x651b3c['label']=Et(this['locale'],'Resolve'),_0x651b3c['tooltip']=Et(this['locale'],'Resolve'),_0x651b3c['icon']=_0x45496a,_0x651b3c['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x651b3c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x46b98f=>!_0x46b98f),_0x651b3c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3de071,_0x43b66f)=>_0x3de071&&!_0x43b66f),_0x651b3c['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x651b3c;}['_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(_0x2e4dc4){super(_0x2e4dc4),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x137279,_0x3971b7,_0x3bbb9c)=>{this['element']['innerHTML']=_0x3bbb9c;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0xab31a1,_0x5bd6fc,_0x44ef77){super(_0xab31a1),this['_model']=_0x5bd6fc,this['_config']=_0x44ef77,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5bd6fc,'content',_0x5bd6fc,'authoredAt',(_0x13c7ee,_0x2f4e23)=>Et(_0xab31a1,'COMMENT_ARIA_LABEL',[_0x5bd6fc['author']['name'],_0x44ef77['formatDateTime'](_0x2f4e23),new DOMParser()['parseFromString'](_0x13c7ee,'text/html')['body']['textContent'],_0x5bd6fc['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x1c5de6(_0xab31a1,Et(_0xab31a1,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x116564(),this['keystrokes']=new _0x142bdc(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x13b113=>_0x13b113['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 _0x2d7eb9=new Wt(this['locale']);return _0x2d7eb9['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2faafd,_0x56b7bd)=>_0x56b7bd?_0x244061(_0x2faafd,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2faafd),_0x2d7eb9;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2810c8=new St(this['locale'],this['_config']['editorConfig']);return _0x2810c8['value']=this['_model']['content'],_0x2810c8['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2810c8['submitLabel']=Et(this['locale'],'Save'),_0x2810c8['on']('submit',(_0x27b0c9,_0x2c5767)=>{this['fire']('updateComment',this['_model']['id'],_0x2c5767),this['switchToDisplayMode'](),this['focus']();}),_0x2810c8['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2810c8['once']('editorReady',()=>{_0x2810c8['focus']();}),_0x2810c8['createEditor'](),_0x2810c8['delegate']('editorReady')['to'](this),_0x2810c8['delegate']('editorDestroyed')['to'](this),_0x2810c8;}['_setupKeyboardNavigation'](){const _0x486a0a=this['element'];this['keystrokes']['listenTo'](_0x486a0a);for(const _0x13d573 of this['focusables'])this['focusTracker']['add'](_0x13d573['element']),this['keystrokes']['listenTo'](_0x13d573['element']);this['focusables']['on']('change',(_0x1b880b,_0x2676cd)=>{for(const _0x588861 of _0x2676cd['removed'])this['focusTracker']['remove'](_0x588861['element']),this['keystrokes']['stopListening'](_0x588861['element']);for(const _0x230d6c of _0x2676cd['added'])this['focusTracker']['add'](_0x230d6c['element']),this['keystrokes']['listenTo'](_0x230d6c['element']);}),this['keystrokes']['set']('enter',(_0xbdd564,_0x56d197)=>{_0x486a0a===_0xbdd564['target']&&(this['focusCycler']['focusFirst'](),_0x56d197());}),this['keystrokes']['set']('esc',(_0x445597,_0x5f4d99)=>{_0x486a0a!==_0x445597['target']&&(this['focus'](),_0x5f4d99());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x504b41(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x203f5f,_0x4a5c82,_0x485398){super(_0x203f5f,_0x4a5c82,_0x485398),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x203f5f,'Reply...')),this['bind']('authoredAt')['to'](_0x4a5c82),this['bind']('resolvedAt')['to'](_0x4a5c82),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 _0x15a01a(_0x203f5f,_0x4a5c82['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4a5c82,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0xc080a0=this['bindTemplate'],_0x198349=[{'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':_0xc080a0['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xc080a0['to']('authoredAt',_0x31fe66=>this['_config']['formatDateTime'](_0x31fe66))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0xc080a0['if']('isEditMode','ck-comment__actions--hidden'),_0xc080a0['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']&&_0x198349['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0xc080a0['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0xc080a0['if']('isEditMode','ck-comment--edit'),_0xc080a0['if']('isSystemComment','ck-comment--info'),_0xc080a0['to']('actionIndicator',_0x4ddd9a=>_0x4ddd9a?'ck-comment--'+_0x4ddd9a:'')],'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':_0x198349}]}]};}['_createEditButton'](){const _0x9a593d=new _0x27efd5(this['locale']);return _0x9a593d['label']=Et(this['locale'],'Edit'),_0x9a593d['icon']=_0x3f702f,_0x9a593d['withText']=!0x0,_0x9a593d['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x9a593d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1b2c90=>!_0x1b2c90),_0x9a593d['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x9a593d['on']('execute',()=>this['switchToEditMode']()),_0x9a593d;}['_createRemoveButton'](){const _0x33aafc=new _0x27efd5(this['locale']);return _0x33aafc['label']=Et(this['locale'],'Remove'),_0x33aafc['icon']=_0x22070e,_0x33aafc['withText']=!0x0,_0x33aafc['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x33aafc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x38f478=>!_0x38f478),_0x33aafc['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x33aafc['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x33aafc;}['_createDropdown'](){const _0x5a4675=ct(this['locale'],_0x11ea9e),_0x2f964c=_0x5a4675['panelView']['children'],_0x1df0b8=new ot(this['locale']),_0x4f653f=_0x5a4675['bindTemplate'];dt(_0x5a4675,()=>this['items']['find'](_0x42f17a=>_0x42f17a['isVisible'])),_0x5a4675['extendTemplate']({'attributes':{'class':[_0x4f653f['if']('isVisible','ck-hidden',_0x3cdbc7=>!_0x3cdbc7)]}});const _0x4af1fd=(_0x1e1e76,_0xbe4a59=-0x1)=>{const _0x3833d1=new nt(this['locale']);_0x3833d1['children']['add'](_0x1e1e76);const _0x23315f=_0xbe4a59>-0x1?_0xbe4a59:_0x1df0b8['items']['length'];_0x1df0b8['items']['add'](_0x3833d1,_0x23315f);const _0x35ccb4=Array['from'](this['items']);_0x5a4675['unbind']('isEnabled','isVisible'),_0x5a4675['bind']('isEnabled')['toMany'](_0x35ccb4,'isEnabled',(..._0x129cf0)=>_0x129cf0['some'](_0x463ba0=>_0x463ba0)),_0x5a4675['bind']('isVisible')['toMany'](_0x35ccb4,'isVisible',(..._0x1aa1e1)=>_0x1aa1e1['some'](_0x2ce79e=>_0x2ce79e));};_0x5a4675['panelPosition']='sw',_0x5a4675['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x42eaeb});for(const _0x3996d1 of this['items'])_0x4af1fd(_0x3996d1);return _0x2f964c['add'](_0x1df0b8),_0x5a4675['listenTo'](this['items'],'add',(_0x4bf3d9,_0x33c619,_0x667baf)=>{_0x4af1fd(_0x33c619,_0x667baf);}),_0x5a4675['listenTo'](this['items'],'remove',(_0x38a24c,_0x188d2a,_0x2cb662)=>{_0x1df0b8['items']['remove'](_0x2cb662);}),_0x5a4675;}['_attachActions'](_0x2394a6,_0x1c5437){const _0x202983=_0x2394a6&&_0x2394a6['element'];_0x202983&&(this['listenTo'](_0x202983,'mouseenter',()=>this['actionIndicator']=_0x1c5437),this['listenTo'](_0x202983,'focus',()=>this['actionIndicator']=_0x1c5437),this['listenTo'](_0x202983,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x202983,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4ed521=super['_createCommentInputView']();return _0x4ed521['bind']('placeholder')['to'](this),_0x4ed521;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x1f3e79){const _0x574671=_0x5b0b03(_0x1f3e79,0x1e),_0x5ef041=new MutationObserver(_0x2481ac=>{for(const _0x4d0655 of _0x2481ac)('attributes'==_0x4d0655['type']&&'class'==_0x4d0655['attributeName']||'childList'==_0x4d0655['type']||'characterData'==_0x4d0655['type'])&&_0x574671();});return{'attach'(_0x432d91){_0x5ef041['observe'](_0x432d91,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5ef041['disconnect'](),_0x574671['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2bfd15,_0x5588f4){super(_0x2bfd15),this['id']=_0x341e8a(),this['focusTracker']=new _0x116564(),this['keystrokes']=new _0x142bdc(),this['keystrokes']['set']('Esc',(_0x5537ec,_0x1b7f47)=>this['fire']('Esc',_0x1b7f47)),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'](_0x5588f4),this['mainView']=_0x5588f4;const _0x119edf=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x119edf['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 _0x6278d=this['element']['clientHeight'];_0x6278d&&(this['height']=_0x6278d);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x4f7c46();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2387da,target:_0x8fdd11,type:_0x16858c,isVisible:_0x589124=!0x0}){super(),this['view']=_0x2387da,this['view']['element']||this['view']['render'](),this['_type']=_0x16858c,this['_target']=_0x8fdd11,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x141c83([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x56dbd6,_0x1af59e)=>{this['view']['focusTracker']['add'](_0x1af59e);}),this['focusableElements']['on']('remove',(_0x2951dc,_0x131bb5)=>{this['view']['focusTracker']['remove'](_0x131bb5);}),this['set']('isVisible',_0x589124);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x9e2580=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x9e2580),_0x9e2580;}get['targetRect'](){const _0xbff161=this['target'];if(null===_0xbff161)return null;if(_0xbff161 instanceof _0x12d113)return _0xbff161;const _0x478832=_0xbff161['filter'](_0x59b940=>function(_0x125afa){return!!_0x125afa['offsetParent']||!!_0x125afa['getClientRects']()['item'](0x0);}(_0x59b940));return 0x0===_0x478832['length']?null:_0x12d113['getDomElementRects'](_0x478832[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x513fd3){this['view']['isActive']=_0x513fd3,this['view']['mainView']['isActive']=_0x513fd3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x10e92f){if(!(null===_0x10e92f||_0x10e92f instanceof _0x12d113||Array['isArray'](_0x10e92f)&&_0x10e92f['every'](_0x2dcb7f=>zt(_0x2dcb7f))))throw new _0x44c5ce('annotation-invalid-target',null,{'target':_0x10e92f});}['_getNormalizedTarget'](){const _0x4b3c0d='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x4b3c0d)?[_0x4b3c0d]:_0x4b3c0d;}};function zt(_0x4683ae){return null!==_0x4683ae&&'object'==typeof _0x4683ae&&'nodeType'in _0x4683ae&&0x1===_0x4683ae['nodeType'];}var Jt=class extends _0x141c83{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x31f8e7=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x116564(),this['_focusTracker']['on']('change:isFocused',(_0x2b04d6,_0x4dd072,_0xbb1695)=>{_0xbb1695||this['fire']('blur');});for(const _0x1849bc of _0x31f8e7)this['add'](_0x1849bc);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1514a5){if(this['has'](_0x1514a5))throw new _0x44c5ce('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1514a5['innerView'],_0x1514a5),this['_viewToAnnotation']['set'](_0x1514a5['view'],_0x1514a5);for(const _0x5009aa of _0x1514a5['focusableElements'])this['_focusTracker']['add'](_0x5009aa);if(this['listenTo'](_0x1514a5['focusableElements'],'add',(_0x3e3765,_0x5ee198)=>{this['_focusTracker']['add'](_0x5ee198);}),this['listenTo'](_0x1514a5['focusableElements'],'remove',(_0x36473a,_0x3cf527)=>{this['_focusTracker']['remove'](_0x3cf527);}),this['listenTo'](_0x1514a5['view']['focusTracker'],'change:isFocused',(_0x2d943e,_0x1a0aa7,_0x361a93)=>{_0x361a93&&this['fire']('focus',_0x1514a5);}),_0x1514a5['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x38d4c3 of this)_0x38d4c3['updateTargetRect']();}const _0x3b33a1=this['_getOrderInContent'](_0x1514a5['view']['targetRect']);return super['add'](_0x1514a5,_0x3b33a1);}['remove'](_0xba5fb){if(!this['has'](_0xba5fb))throw new _0x44c5ce('annotationcollection-not-existing-item',null);this['stopListening'](_0xba5fb['view']['focusTracker']),this['stopListening'](_0xba5fb['focusableElements']);for(const _0x357a97 of _0xba5fb['focusableElements'])this['_focusTracker']['remove'](_0x357a97);return this['_viewToAnnotation']['delete'](_0xba5fb['view']),this['_innerViewToAnnotation']['delete'](_0xba5fb['innerView']),super['remove'](_0xba5fb);}['getByInnerView'](_0x4f84e7){return this['_innerViewToAnnotation']['get'](_0x4f84e7);}['getByView'](_0x2eb168){return this['_viewToAnnotation']['get'](_0x2eb168);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x303e84 of this)_0x303e84['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1bb3f4=Array['from'](this)['sort']((_0x1b0414,_0x4180ff)=>Zt(_0x1b0414['view']['targetRect'],_0x4180ff['view']['targetRect']));for(let _0x174d9b=_0x1bb3f4['length']-0x1;_0x174d9b>0x0;_0x174d9b--){const _0x4c4abf=_0x1bb3f4[_0x174d9b];_0x174d9b!==this['getIndex'](_0x4c4abf)&&(this['remove'](_0x4c4abf),this['add'](_0x4c4abf));}}['_getOrderInContent'](_0x39be14){let _0x4e377c=0x0;if(!_0x39be14)return this['length'];for(const _0x3582ff of this){const _0x177ea1=_0x3582ff['view']['targetRect'];if(_0x177ea1){if(Zt(_0x39be14,_0x177ea1)<0x0)return _0x4e377c;_0x4e377c++;}}return _0x4e377c;}['_areCachedRectsStale'](){const _0x2106b2=this['get'](0x0);if(!_0x2106b2)return!0x1;const _0x43e2bb=_0x2106b2['view']['targetRect'],_0x36e35b=_0x2106b2['targetRect'];return!(!_0x43e2bb||!_0x36e35b)&&(_0x43e2bb['top']!==_0x36e35b['top']||_0x43e2bb['left']!==_0x36e35b['left']);}};function Qt({source:_0x39b4d0,target:_0x53969c,filter:_0x3cec63}){for(const _0x3ea65d of _0x39b4d0)_0x3cec63(_0x3ea65d)&&_0x53969c['add'](_0x3ea65d);_0x53969c['listenTo'](_0x39b4d0,'add',(_0x11e623,_0x21e55d)=>{_0x3cec63(_0x21e55d)&&_0x53969c['add'](_0x21e55d);}),_0x53969c['listenTo'](_0x39b4d0,'remove',(_0x54affb,_0x54ed8e)=>{_0x53969c['has'](_0x54ed8e)&&_0x53969c['remove'](_0x54ed8e);});}function Zt(_0x51b80f,_0xbbee44){if(null===_0x51b80f&&null===_0xbbee44)return 0x0;if(null===_0x51b80f)return-0x1;if(null===_0xbbee44)return 0x1;const _0x2b17ec=_0x51b80f['top']-_0xbbee44['top'];return 0x0==_0x2b17ec?_0x51b80f['left']-_0xbbee44['left']:_0x2b17ec;}var ti=class extends _0x5263a8{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x365c1e){if(super(_0x365c1e),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x365c1e instanceof _0x5ee731){const _0x5d35b0=_0x365c1e['locale'];_0x365c1e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x5d35b0,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x5d35b0,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x5d35b0,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x5d35b0,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x5d35b0,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x5d35b0,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x5d35b0,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x8072c5){this['collection']['add'](_0x8072c5);}['remove'](_0x4a9338){this['collection']['remove'](_0x4a9338),_0x4a9338['destroy']();}['refreshVisibility'](){for(const _0x14af5c of this['collection'])_0x14af5c['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3bafc9){return this['collection']['getByInnerView'](_0x3bafc9);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2a9891 of this['collection'])_0x2a9891['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x545369){this['fire']('_activateAnnotation',_0x545369);}['createAnnotation'](_0x4ab59f){return new $t(_0x4ab59f);}['createAnnotationView'](_0x2f7d74,_0x52426c){return new qt(_0x2f7d74,_0x52426c);}['_addActiveAnnotation'](_0x1a5978){const _0x2c0159=new Set(this['activeAnnotations']);_0x2c0159['add'](_0x1a5978),this['activeAnnotations']=_0x2c0159;}['_removeActiveAnnotation'](_0x32e614){const _0x4e0dd4=new Set(this['activeAnnotations']);_0x4e0dd4['delete'](_0x32e614),this['activeAnnotations']=_0x4e0dd4;}['_bindAnnotationsToVisibleAnnotations'](){const _0x256f9d=this['collection'],_0x4b5de4=this['_visibleAnnotations'];function _0xbbaf7(_0x1c76a3){const _0x1c44d1=_0x1c76a3['source'];_0x1c44d1['isVisible']&&!_0x4b5de4['has'](_0x1c44d1)?_0x4b5de4['add'](_0x1c44d1):!_0x1c44d1['isVisible']&&_0x4b5de4['has'](_0x1c44d1)&&_0x4b5de4['remove'](_0x1c44d1),_0x1c44d1['view']['focusTracker']['remove'](_0x1c44d1['view']['element']),_0x1c44d1['view']['focusTracker']['add'](_0x1c44d1['view']['element']);}this['listenTo'](_0x256f9d,'add',(_0x18ccb3,_0x552d5c)=>{_0x552d5c['isVisible']&&_0x4b5de4['add'](_0x552d5c),this['listenTo'](_0x552d5c,'change:isVisible',_0xbbaf7);}),this['listenTo'](_0x256f9d,'remove',(_0x4c1273,_0x5ed6dc)=>{_0x4b5de4['has'](_0x5ed6dc)&&_0x4b5de4['remove'](_0x5ed6dc),this['stopListening'](_0x5ed6dc,'change:isVisible',_0xbbaf7);});}['_setupEnterAnnotationKeystroke'](){const _0x879625=_0x13a36a=>{_0x13a36a['on']('ready',()=>{_0x13a36a['keystrokes']['set'](_0x3c98c6,(_0x2c85b2,_0x4e97ce)=>{const _0x5f6a04=_0x372557(this['activeAnnotations']['values']());_0x5f6a04&&(_0x5f6a04['view']['focus'](),_0x4e97ce());});});};this['context']instanceof _0x5ee731?_0x879625(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3761a4,_0x43cf38)=>{_0x879625(_0x43cf38);});}['_setupEscapeAnnotationHandling'](){const _0x5dfad3=_0x1f0550=>{const _0x26c686=_0x1f0550['source'],_0x223393=[];let _0xe164bc;if(Array['isArray'](_0x26c686['target'])){_0xe164bc=_0x26c686['target'][0x0],this['context']instanceof _0x5ee731?_0x223393['push'](this['context']):this['context']['editors']&&_0x223393['push'](...this['context']['editors']);for(const _0xa2b366 of _0x223393)for(const _0x2ae22a of _0xa2b366['editing']['view']['domRoots']['values']())if(_0x2ae22a['contains'](_0xe164bc))return void _0xa2b366['editing']['view']['focus']();_0xe164bc['focus']();}};this['listenTo'](this['collection'],'add',(_0xde6f4e,_0x3c3579)=>{this['listenTo'](_0x3c3579,'escape',_0x5dfad3,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xdeb0b1,_0x45cd8c)=>{this['stopListening'](_0x45cd8c,'escape',_0x5dfad3);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x4f7c46(),ni=/* #__PURE__ -- @preserve */
31
- _0x4f7c46();var oi=class extends _0x5263a8{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x3a4ccf,_0x1278ff];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x87402d){super(_0x87402d),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5adbc0=this['context']['config'];_0x5adbc0['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5adbc0['define']('comments.maxThreadTotalWeight',0x1f4),_0x5adbc0['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5adbc0['define']('comments.CommentThreadView',Ut),_0x5adbc0['define']('comments.CommentView',Yt),_0x5adbc0['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xab9274=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x316cd1,_0x28a91d)=>this['_addCommentThread'](_0x28a91d)),this['on']('submitCommentThread',(_0x422b9e,_0x52df0c)=>this['_submitCommentThread'](_0x52df0c)),this['on']('resolveCommentThread',(_0x50dc4f,_0x7ffdf5)=>this['_resolveCommentThread'](_0x7ffdf5)),this['on']('resolveCommentThread',(_0x19abea,_0x58d390)=>this['_updateActiveAnnotation'](_0x58d390),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x23143a,_0x1bc7f4)=>this['_reopenCommentThread'](_0x1bc7f4)),this['on']('reopenCommentThread',(_0x1545c1,_0x2307e3)=>this['_updateActiveAnnotation'](_0x2307e3),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1181f1,_0x181a1e)=>this['_removeCommentThread'](_0x181a1e)),this['on']('updateCommentThread',(_0x2730c0,_0x47616b)=>this['_updateCommentThread'](_0x47616b)),this['on']('updateCommentThread',(_0x4a7142,_0x2db810)=>this['_updateActiveAnnotation'](_0x2db810),{'priority':'lowest'}),this['on']('addComment',(_0x338eae,_0x3adafc)=>this['_addComment'](_0x3adafc)),this['on']('updateComment',(_0x2ee0e7,_0x478b34)=>this['_updateComment'](_0x478b34)),this['on']('removeComment',(_0x1b290e,_0x488b2a)=>this['_removeComment'](_0x488b2a)),this['on']('addComment',(_0x3e3c6a,{threadId:_0x13931b,isFromAdapter:_0x57278e})=>{if(_0x57278e)return;const _0xa28ad9=this['getCommentThread'](_0x13931b),_0xc6fa0d=_0xa28ad9&&this['_threadToController']['get'](_0xa28ad9);_0xc6fa0d&&_0xc6fa0d['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xab9274,'change:activeAnnotations',(_0x4d48d1,_0x457dcd,_0x58274c)=>{const _0x3d389e=Array['from'](_0x58274c)['map'](_0x1f89e2=>this['_viewToController']['get'](_0x1f89e2['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3d389e?_0x3d389e['model']:null;});}set['adapter'](_0x4ec8c9){if(this['_adapter'])throw new _0x44c5ce('commentsrepository-adapter-already-set');this['_adapter']=_0x4ec8c9;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3850f4=ii,threadId:_0x4285e9=_0x341e8a(),comments:_0x4c5c56=[],unlinkedAt:_0x34dfb7=null,resolvedAt:_0x20dafe=null,resolvedBy:_0x16d581=null,target:_0xf2e167=null,context:_0x2313a3=null,attributes:_0x521e11={},isResolvable:_0x2a178f=!0x0,isSubmitted:_0xb96514=!0x1,isFromAdapter:_0x2a8dd2=!0x1}={}){return this['fire'](ai('addCommentThread',_0x3850f4),{'channelId':_0x3850f4,'threadId':_0x4285e9,'comments':_0x4c5c56,'unlinkedAt':_0x34dfb7,'resolvedAt':_0x20dafe,'resolvedBy':_0x16d581,'target':_0xf2e167,'context':_0x2313a3,'attributes':_0x521e11,'isFromAdapter':_0x2a8dd2,'isResolvable':_0x2a178f,'isSubmitted':_0xb96514}),this['getCommentThread'](_0x4285e9);}['openNewCommentThread']({channelId:_0x5ccadc=ii,threadId:_0x35a12c=_0x341e8a(),target:_0x38c8ed,context:_0x4600f2=null,isResolvable:_0xdb157e=!0x0}){if(this['_readOnlyChannels']['has'](_0x5ccadc)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x38c8ed)throw new _0x44c5ce('commentsrepository-missing-target');const _0x253bab=this['addCommentThread']({'channelId':_0x5ccadc,'threadId':_0x35a12c,'target':_0x38c8ed,'context':_0x4600f2,'isResolvable':_0xdb157e});if(!_0x253bab)return null;const _0x3ab0eb=this['_threadToController']['get'](_0x253bab),_0x56f35c=_0x3ab0eb['view']['commentThreadInputView']['commentInputView'],_0x227441=this['context']['plugins']['get'](ti),_0x12db6e=_0x227441['getByInnerView'](_0x3ab0eb['view']);return _0x227441['activate'](_0x12db6e),_0x56f35c['once']('editorReady',()=>_0x56f35c['focus']()),_0x253bab;}['hasCommentThread'](_0x31f01f){if('string'!=typeof _0x31f01f)throw new _0x44c5ce('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x31f01f);}['updateCommentThread']({channelId:_0x56e467=ii,threadId:_0x36aac2,context:_0x102a87,unlinkedAt:_0x4caa90,attributes:_0x156332,isFromAdapter:_0x22d3ad=!0x1}){return this['fire'](ai('updateCommentThread',_0x56e467),{'channelId':_0x56e467,'threadId':_0x36aac2,'context':_0x102a87,'unlinkedAt':_0x4caa90,'attributes':_0x156332,'isFromAdapter':_0x22d3ad}),this['getCommentThread'](_0x36aac2);}['getCommentThread'](_0x1b32dd){if('string'!=typeof _0x1b32dd)throw new _0x44c5ce('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1b32dd);}['fetchCommentThread']({channelId:_0x12cf17,threadId:_0x2ab2e0}={}){const _0xd1780d=this['getCommentThread'](_0x2ab2e0);if(_0xd1780d)return Promise['resolve'](_0xd1780d);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x44c5ce('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x12cf17,'threadId':_0x2ab2e0})['then'](_0x19fa92=>this['hasCommentThread'](_0x2ab2e0)?this['getCommentThread'](_0x2ab2e0):_0x19fa92?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x12cf17},_0x19fa92)):void 0x0)['catch'](_0x21e95c=>{throw console['error'](_0x21e95c),new _0x44c5ce('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x19b0ea,skipNotAttached:_0x578ccc=!0x1,skipEmpty:_0x3a1b66=!0x1,toJSON:_0xceeb27=!0x1}={}){const _0x498011=[];for(const _0x1b7380 of this['_threads']['values']())_0x19b0ea&&_0x1b7380['channelId']!==_0x19b0ea||_0x578ccc&&!_0x1b7380['isAttached']||_0x3a1b66&&0x0===_0x1b7380['length']||_0x498011['push'](_0x1b7380);return _0xceeb27?_0x498011['map'](_0x2d8705=>_0x2d8705['toJSON']()):_0x498011;}['getAnnotationForCommentThread'](_0x3ac21e){const _0x59264a=this['_threadToController']['get'](_0x3ac21e);return _0x59264a&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x59264a['view'])||null;}['getCommentThreadForAnnotation'](_0x11c90a){const _0x1a2f01=this['_viewToController']['get'](_0x11c90a['innerView']);return _0x1a2f01?_0x1a2f01['model']:null;}['setActiveCommentThread'](_0x36a7a9){const _0x6cefb7=this['context']['plugins']['get'](ti);if(!_0x36a7a9)return void(this['activeCommentThread']&&_0x6cefb7['deactivateAll']());const _0x56b454=this['getCommentThread'](_0x36a7a9);if(!_0x56b454)throw new _0x44c5ce('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x36a7a9});if(!this['_threadToController']['has'](_0x56b454))throw new _0x44c5ce('commentsrepository-active-not-attached',null,{'threadId':_0x36a7a9});const _0x504fe7=_0x6cefb7['getByInnerView'](this['_threadToController']['get'](_0x56b454)['view']);_0x6cefb7['activate'](_0x504fe7);}['switchReadOnly'](_0x204aba,_0x19a3fd){_0x204aba?this['_readOnlyChannels']['add'](_0x19a3fd):this['_readOnlyChannels']['delete'](_0x19a3fd),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2f20df){return this['_readOnlyChannels']['has'](_0x2f20df)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x37d884,_0xd0a397){return new bt(_0x37d884,_0xd0a397);}['setPermissions'](_0x10d003,_0x2a85ab=ii){this['_permissions']['set'](_0x2a85ab,_0x10d003),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3329b0=ii){return this['_permissions']['has'](_0x3329b0)?this['_permissions']['get'](_0x3329b0):ei;}['_addCommentThread']({channelId:_0x5c8a07,threadId:_0x212d06,comments:_0x2406e3,unlinkedAt:_0x3c00f3,resolvedAt:_0x41e387,resolvedBy:_0x5a3978,target:_0x297538,context:_0x365b17,attributes:_0x23b6d2,isFromAdapter:_0xf21f21,isResolvable:_0x23e1e0,isSubmitted:_0x33e0b5}){if('string'!=typeof _0x212d06)throw new _0x44c5ce('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x212d06});if(this['hasCommentThread'](_0x212d06))throw new _0x44c5ce('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x212d06});const _0xb4a299=new ri(this,{'channelId':_0x5c8a07,'id':_0x212d06,'context':_0x365b17,'attributes':_0x23b6d2,'unlinkedAt':_0x3c00f3,'resolvedAt':_0x41e387,'resolvedBy':_0x5a3978?this['context']['plugins']['get'](_0x1278ff)['getUser'](_0x5a3978):null,'isResolvable':_0x23e1e0,'isSubmitted':_0x33e0b5||_0xf21f21});this['_threads']['set'](_0x212d06,_0xb4a299);for(const _0x4eae0d of _0x2406e3)_0xb4a299['_add'](this['_createNewComment']({'threadId':_0x212d06,..._0x4eae0d}));return _0x297538&&_0xb4a299['attachTo'](_0x297538),_0xf21f21||!_0xb4a299['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5c8a07,'threadId':_0x212d06});}['_submitCommentThread']({channelId:_0x63eb76,threadId:_0x510914}){if(!this['hasCommentThread'](_0x510914))throw new _0x44c5ce('commentsrepository-missing-comment-thread',this);const _0x6754fb=this['getCommentThread'](_0x510914);if(_0x6754fb['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x1fcb31,comments:_0x11247c,resolvedAt:_0x21f6d3,resolvedBy:_0x2f336d,context:_0x1417a8,attributes:_0x2d22c7}=_0x6754fb,_0x2e1135=this['context']['plugins']['get']('PendingActions'),_0x12d382=_0x2e1135['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x63eb76,'threadId':_0x1fcb31,'comments':_0x11247c['map'](_0xec9fab=>_0xec9fab['toJSON']()),'resolvedAt':_0x21f6d3,'resolvedBy':_0x2f336d?_0x2f336d['id']:_0x2f336d,'context':_0x1417a8,'attributes':_0x2d22c7})['then'](({comments:_0x496962})=>{_0x2e1135['remove'](_0x12d382);for(const _0x593983 of _0x496962)this['_updateComment']({'channelId':_0x63eb76,'threadId':_0x510914,'commentId':_0x593983['commentId'],'createdAt':_0x593983['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4f0347=>{throw console['error'](_0x4f0347),new _0x44c5ce('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x38eb0f,target:_0x352cfb}){const _0x415847=this['getCommentThread'](_0x38eb0f);if(!_0x415847)throw new _0x44c5ce('commentsrepository-attach-missing-comment-thread',this);const _0x11ea52=this['context']['plugins']['get']('PendingActions'),_0x556783=this['context']['plugins']['get'](ti),_0x2ae2ab=this['_createCommentThreadView'](_0x415847),_0x3de0f8=new bt(_0x415847,_0x2ae2ab);let _0x3666b8=null;_0x2ae2ab['on']('change:isDirty',(_0xf3097b,_0x218910,_0x4b9790)=>{_0x4b9790?_0x3666b8=_0x11ea52['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3666b8&&(_0x11ea52['remove'](_0x3666b8),_0x3666b8=null);}),this['_threadToController']['set'](_0x415847,_0x3de0f8),this['_viewToController']['set'](_0x2ae2ab,_0x3de0f8);const _0x2da8f6=new qt(this['context']['locale'],_0x2ae2ab);_0x2da8f6['bind']('length')['to'](_0x2ae2ab),_0x2da8f6['bind']('isDirty')['to'](_0x2ae2ab,'isDirty',_0x2ae2ab,'length',(_0x56eff0,_0x2fd879)=>_0x56eff0||!_0x2fd879),_0x2da8f6['bind']('isActive')['to'](_0x2ae2ab),_0x2da8f6['type']='comment';const _0x2bb45b=new $t({'view':_0x2da8f6,'target':_0x352cfb,'type':'comment','isVisible':!_0x415847['archivedAt']&&!!('function'==typeof _0x352cfb?_0x352cfb():_0x352cfb)});return _0x2ae2ab['on']('escape',()=>{_0x2bb45b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x2ae2ab,_0x2bb45b),_0x556783['add'](_0x2bb45b),_0x2bb45b;}['_bindAnnotationToEditors'](_0x21e0ac,_0x489af5){this['listenTo'](_0x21e0ac,'editorReady',(_0x530f10,_0x22a686)=>{const _0x5dff47=_0x22a686['ui']['view']['body']['bodyCollectionContainer'];_0x489af5['focusableElements']['add'](_0x5dff47),this['context']instanceof _0x5ee731&&this['context']['ui']['focusTracker']['add'](_0x5dff47);},{'priority':'highest'}),this['listenTo'](_0x21e0ac,'editorDestroyed',(_0x143279,_0x280e48)=>{const _0x396798=_0x280e48['ui']['view']['body']['bodyCollectionContainer'];_0x489af5['focusableElements']['has'](_0x396798)&&_0x489af5['focusableElements']['remove'](_0x396798),this['context']instanceof _0x5ee731&&this['context']['ui']['focusTracker']['remove'](_0x396798);});}['_unbindEditors'](_0x12a51e){this['stopListening'](_0x12a51e,'editorReady'),this['stopListening'](_0x12a51e,'editorDestroyed');}['_createCommentThreadView'](_0xe53ff4){const _0x23d568=this['context']['plugins']['get'](_0x1278ff),{config:_0x39df9d,locale:_0x14cd65}=this['context'],_0x1863ce=_0x2c3d3f(_0x39df9d['get']('locale'),_0x14cd65);return new(0x0,(_0x39df9d['get']('comments'))['CommentThreadView'])(_0x14cd65,_0xe53ff4,_0x23d568['me'],{'editorConfig':{..._0x39df9d['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x39df9d['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x39df9d['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x39df9d['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x39df9d['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1863ce,'CommentView':_0x39df9d['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x18b37b,channelId:_0x121471,resolvedAt:_0x5b225a,resolvedBy:_0x4584ea,isFromAdapter:_0x500775}){if(!this['hasCommentThread'](_0x18b37b))throw new _0x44c5ce('commentsrepository-missing-comment-thread',null,{'threadId':_0x18b37b});const _0x4c73b5=this['getCommentThread'](_0x18b37b);if(_0x4c73b5['isResolved'])throw new _0x44c5ce('commentsrepository-resolved-comment-thread',null,{'threadId':_0x18b37b});const _0x2b7147=this['context']['plugins']['get'](_0x1278ff);if(_0x4c73b5['resolvedBy']=_0x2b7147['getUser'](_0x4584ea),_0x4c73b5['resolvedAt']=_0x5b225a,_0x500775||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x455655=this['context']['plugins']['get']('PendingActions'),_0x14be0d=_0x455655['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x121471,'threadId':_0x18b37b})['then'](({resolvedAt:_0x818276,resolvedBy:_0x3a2eab})=>{_0x455655['remove'](_0x14be0d),_0x4c73b5['resolvedBy']['id']!==_0x3a2eab&&(_0x4c73b5['resolvedBy']=_0x2b7147['getUser'](_0x3a2eab)),_0x4c73b5['resolvedAt']=_0x818276;})['catch'](_0x2c73cb=>{throw console['error'](_0x2c73cb),new _0x44c5ce('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5b80ff,channelId:_0x2c0050,isFromAdapter:_0x4f2fb1}){if(!this['hasCommentThread'](_0x5b80ff))throw new _0x44c5ce('commentsrepository-missing-comment-thread',null,{'threadId':_0x5b80ff});const _0x333799=this['getCommentThread'](_0x5b80ff);if(!_0x333799['isResolved'])throw new _0x44c5ce('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5b80ff});if(_0x333799['resolvedBy']=null,_0x333799['resolvedAt']=null,_0x4f2fb1||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x503686=this['context']['plugins']['get']('PendingActions'),_0x38227e=_0x503686['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2c0050,'threadId':_0x5b80ff})['then'](()=>_0x503686['remove'](_0x38227e))['catch'](_0x2b8b1b=>{throw console['error'](_0x2b8b1b),new _0x44c5ce('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2f3154,isFromAdapter:_0x1ef9c1}){const _0x5828b7=this['getCommentThread'](_0x2f3154);if(!_0x5828b7)throw new _0x44c5ce('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2f3154),this['_threads']['delete'](_0x2f3154),!_0x5828b7['isSubmitted']||_0x1ef9c1||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5e1574=this['context']['plugins']['get']('PendingActions'),{channelId:_0x42c173}=_0x5828b7,_0x580503=_0x5e1574['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x42c173,'threadId':_0x2f3154})['then'](()=>_0x5e1574['remove'](_0x580503))['catch'](_0xe5ad51=>{throw console['error'](_0xe5ad51),new _0x44c5ce('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x13b513,unlinkedAt:_0x52933f,context:_0x5568c9,attributes:_0xa6b7bc,isFromAdapter:_0x5c6093}){if('string'!=typeof _0x13b513)throw new _0x44c5ce('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x13b513});if(!this['hasCommentThread'](_0x13b513))throw new _0x44c5ce('commentsrepository-missing-comment-thread',null,{'threadId':_0x13b513});const _0x180497=this['getCommentThread'](_0x13b513);let _0x15b5d4=!0x1;if(void 0x0!==_0x5568c9&&_0x180497['context']!==_0x5568c9&&(_0x180497['context']=_0x5568c9,_0x15b5d4=!0x0),void 0x0!==_0x52933f&&_0x180497['unlinkedAt']!==_0x52933f&&(_0x180497['unlinkedAt']=_0x52933f,_0x15b5d4=!0x0),_0xa6b7bc&&!_0xbf7351(_0xa6b7bc,_0x180497['attributes'])&&(_0x180497['attributes']=_0xa6b7bc,_0x15b5d4=!0x0),!_0x15b5d4)return Promise['resolve']();if(!_0x180497['isSubmitted']||_0x5c6093||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3faad5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2aacd2}=_0x180497,_0x291cd6=_0x3faad5['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2aacd2,'threadId':_0x13b513,'context':_0x5568c9,'unlinkedAt':_0x52933f,'attributes':_0xa6b7bc})['then'](()=>_0x3faad5['remove'](_0x291cd6))['catch'](_0x120cbd=>{throw console['error'](_0x120cbd),new _0x44c5ce('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1f4976){const _0x3331f7=this['context']['plugins']['get'](ti),_0x10d4ec=this['getCommentThread'](_0x1f4976);if(_0x10d4ec['_isAttached']=!0x1,this['_threadToController']['has'](_0x10d4ec)){const _0x3d901c=this['_threadToController']['get'](_0x10d4ec),_0x47021d=_0x3d901c['view'],_0x5dbf3e=_0x3331f7['getByInnerView'](_0x47021d);this['_threadToController']['delete'](_0x10d4ec),this['_viewToController']['delete'](_0x47021d),_0x5dbf3e&&_0x3331f7['remove'](_0x5dbf3e),_0x3d901c['destroy'](),_0x47021d['destroy']()['then'](()=>{this['_unbindEditors'](_0x47021d);});}}['_updateActiveAnnotation']({threadId:_0x3eb6fb,resolvedAt:_0x260d68,unlinkedAt:_0x506ee4}){const _0x1a9e5f=!!_0x260d68,_0x1eb4b5=this['context']['plugins']['get'](ti),_0x38d02c=this['getCommentThread'](_0x3eb6fb);if(this['_threadToController']['has'](_0x38d02c)){const _0x355843=this['_threadToController']['get'](_0x38d02c)['view'],_0x5bcd9c=_0x1eb4b5['getByInnerView'](_0x355843);_0x5bcd9c&&(_0x1a9e5f&&_0x1eb4b5['_removeActiveAnnotation'](_0x5bcd9c),_0x506ee4?_0x5bcd9c['isVisible']=!0x1:_0x5bcd9c['refreshVisibility']());}}['_getExternalAuthor'](_0x2cd397){const _0x486b82=this['context']['plugins']['get'](_0x1278ff),_0x327429=_0x167c02('external:'+_0x2cd397),_0x2a667d=_0x486b82['getUser'](_0x327429);return _0x2a667d||_0x486b82['addUser']({'id':_0x327429,'name':_0x2cd397});}['_createNewComment']({threadId:_0x5c28a9,commentId:_0x45b1df=_0x341e8a(),content:_0x587c4d,authorId:_0x58d97e,createdAt:_0x2786ec,attributes:_0xc1fd1a}){if('string'!=typeof _0x45b1df)throw new _0x44c5ce('commentsrepository-invalid-commentid');if('string'!=typeof _0x58d97e)throw new _0x44c5ce('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x587c4d||!_0x587c4d['trim']())throw new _0x44c5ce('commentsrepository-invalid-comment-content');const _0x149629=this['context']['plugins']['get'](_0x1278ff)['getUser'](_0x58d97e);if(!_0x149629)throw new _0x44c5ce('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x58d97e});let _0x541cb0=null,_0x452363=_0x2786ec;return _0xc1fd1a?.['@external']&&(_0x541cb0=this['_getExternalAuthor'](_0xc1fd1a['@external']['authorName']),_0x452363=new Date(_0xc1fd1a['@external']['createdAt'])),new hi(this,{'threadId':_0x5c28a9,'id':_0x45b1df,'author':_0x541cb0||_0x149629,'creator':_0x149629,'content':_0x587c4d,'createdAt':_0x2786ec,'authoredAt':_0x452363,'attributes':_0xc1fd1a});}['_addComment'](_0x20a00c){let {threadId:_0x37fc2d,content:_0x52f8cc,attributes:_0x11bf7e,isFromAdapter:_0x3203f7}=_0x20a00c;const _0x1d9f25=this['getCommentThread'](_0x20a00c['threadId']);if(!_0x1d9f25)throw new _0x44c5ce('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x383022=this['_createNewComment'](_0x20a00c),{id:_0x456482}=_0x383022;if(_0x1d9f25['_add'](_0x383022),_0x3203f7||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1d9f25['isSubmitted'])return Promise['resolve']();const _0x16a7f3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x27bfbc}=_0x1d9f25,_0x10bd12=_0x16a7f3['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x11bf7e||(_0x11bf7e={}),this['adapter']['addComment']({'channelId':_0x27bfbc,'threadId':_0x37fc2d,'commentId':_0x456482,'content':_0x52f8cc,'attributes':_0x11bf7e})['then'](_0x28bea8=>{_0x16a7f3['remove'](_0x10bd12),_0x28bea8&&this['_updateComment']({'channelId':_0x27bfbc,'threadId':_0x37fc2d,'commentId':_0x456482,'createdAt':_0x28bea8['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3c1b19=>{throw console['error'](_0x3c1b19),new _0x44c5ce('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x162f5b,commentId:_0x253446,content:_0x2a0676,createdAt:_0x22aebf,attributes:_0x52c38c,isFromAdapter:_0x542edf}){if(void 0x0!==_0x2a0676&&('string'!=typeof _0x2a0676||!_0x2a0676['trim']()['length']))throw new _0x44c5ce('commentsrepository-update-comment-invalid-content');const _0x36040d=this['getCommentThread'](_0x162f5b),_0x138dd0=_0x36040d['getComment'](_0x253446);if(!_0x138dd0)throw new _0x44c5ce('commentsrepository-update-missing-comment',this);let _0x5a0cd6=!0x1;if(_0x2a0676&&_0x2a0676!==_0x138dd0['content']&&(_0x138dd0['isEditable']||_0x542edf)&&(_0x138dd0['content']=_0x2a0676,_0x5a0cd6=!0x0),_0x22aebf&&_0x22aebf!==_0x138dd0['createdAt']&&(_0x138dd0['createdAt']=_0x22aebf,_0x138dd0['isExternal']||(_0x138dd0['authoredAt']=_0x22aebf),_0x5a0cd6=!0x0),_0x52c38c&&!_0xbf7351(_0x52c38c,_0x138dd0['attributes'])&&(_0x138dd0['attributes']=_0x52c38c,_0x5a0cd6=!0x0),!_0x5a0cd6)return Promise['resolve']();if(_0x36040d['fire']('commentUpdated'),_0x542edf||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x588e70=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3af016}=this['getCommentThread'](_0x138dd0['threadId']),_0x3f88e6=_0x588e70['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3af016,'threadId':_0x162f5b,'commentId':_0x253446,'content':_0x2a0676,'attributes':_0x52c38c})['then'](()=>_0x588e70['remove'](_0x3f88e6))['catch'](_0xcaa7be=>{throw console['error'](_0xcaa7be),new _0x44c5ce('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x40f202,commentId:_0x13509a,isFromAdapter:_0x39c4b7}){const _0x207af3=this['getCommentThread'](_0x40f202),_0x2586a3=_0x207af3['getComment'](_0x13509a);if(!_0x2586a3)throw new _0x44c5ce('commentsrepository-remove-missing-comment',this);if(_0x207af3['_remove'](_0x2586a3),_0x39c4b7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x54cbf5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1c995a}=_0x207af3,_0x154642=_0x54cbf5['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1c995a,'threadId':_0x40f202,'commentId':_0x13509a})['then'](()=>_0x54cbf5['remove'](_0x154642))['catch'](_0x5297c7=>{throw console['error'](_0x5297c7),new _0x44c5ce('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x54c72b,_0x159277){super();const _0x1d845b=_0x159277['isResolvable'];this['channelId']=_0x159277['channelId'],this['id']=_0x159277['id'],this['comments']=new _0x141c83(),this['_repository']=_0x54c72b,this['_isAttached']=!0x1,this['_isSubmitted']=_0x159277['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x54c72b,'_permissions',_0x54c72b,'_readOnlyChannels',()=>_0x54c72b['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x54c72b,'_permissions',()=>_0x54c72b['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x54c72b,'_permissions',()=>{const _0x3a554d=_0x54c72b['getPermissions'](this['channelId']);return _0x3a554d['write']||_0x3a554d['admin'];}),this['bind']('isResolvable')['to'](_0x54c72b,'_permissions',()=>_0x1d845b&&_0x54c72b['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x159277['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x421414,_0x41abf2)=>_0x421414?_0x41abf2?_0x421414<_0x41abf2?_0x421414:_0x41abf2:_0x421414:_0x41abf2),this['set']('unlinkedAt',_0x159277['unlinkedAt']||null),this['set']('resolvedAt',_0x159277['resolvedAt']||null),this['set']('resolvedBy',_0x159277['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5309e9=>!!_0x5309e9),this['set']('attributes',_0x159277['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x320134,_0x5d561c)=>_0x320134+_0x5d561c['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x11656d,id:_0x4b19a6}=this;this['_repository']['fire'](ai('submitCommentThread',_0x11656d),{'channelId':_0x11656d,'threadId':_0x4b19a6});}['setUnlinkedAt'](_0x52d7cb){this['_update']({'unlinkedAt':_0x52d7cb});}['resolve']({resolvedAt:_0x365f8e=new Date(),resolvedBy:_0x3c5a75='',isFromAdapter:_0x20e347=!0x1}={}){const _0x1d039a=this['_repository']['context']['plugins']['get'](_0x1278ff)['me'],{channelId:_0xe23bb1,id:_0x19c0b0}=this;this['_repository']['fire'](ai('resolveCommentThread',_0xe23bb1),{'channelId':_0xe23bb1,'threadId':_0x19c0b0,'resolvedAt':_0x365f8e,'resolvedBy':_0x3c5a75||_0x1d039a['id'],'isFromAdapter':_0x20e347});}['reopen']({isFromAdapter:_0x2edd9f=!0x1}={}){const {channelId:_0x3603b2,id:_0x2c4842}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x3603b2),{'channelId':_0x3603b2,'threadId':_0x2c4842,'isFromAdapter':_0x2edd9f});}['setContext'](_0x21b756){this['context']||this['_update']({'context':_0x21b756});}['setAttribute'](_0x1e1e90,_0x15cf0e){const _0x2cee78=_0x1e2b2b(this['attributes']);_0x4d4ab(_0x2cee78,_0x1e1e90,_0x15cf0e),this['_update']({'attributes':_0x2cee78});}['removeAttribute'](_0xe53b8b){const _0x581ed3=_0x1e2b2b(this['attributes']);_0x9b4fa2(_0x581ed3,_0xe53b8b),this['_update']({'attributes':_0x581ed3});}['remove']({isFromAdapter:_0x2c202a=!0x1}={}){const {channelId:_0xcb8d1b,id:_0x25082c}=this;this['_repository']['fire'](ai('removeCommentThread',_0xcb8d1b),{'channelId':_0xcb8d1b,'threadId':_0x25082c,'isFromAdapter':_0x2c202a});}['attachTo'](_0x26891b){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x26891b});}['addComment'](_0x2eb522){const {channelId:_0x4d1d50,id:_0x5b2249}=this;this['_repository']['fire'](ai('addComment',_0x4d1d50,_0x5b2249),Object['assign']({'channelId':_0x4d1d50,'threadId':_0x5b2249},_0x2eb522));}['getComment'](_0x37c671){if('string'!=typeof _0x37c671)throw new _0x44c5ce('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x37c671});return this['comments']['get'](_0x37c671);}['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'](_0x487118=>_0x487118['toJSON']()),'attributes':this['attributes']};}['_add'](_0x489743){return this['listenTo'](_0x489743,'change:authoredAt',()=>{const _0x11a0a6=this['_findOptimalIndex'](_0x489743),_0x20cdc8=this['comments'];_0x11a0a6-0x1!=_0x20cdc8['getIndex'](_0x489743)&&_0x11a0a6+0x1!=_0x20cdc8['getIndex'](_0x489743)&&(this['_remove'](_0x489743),this['_add'](_0x489743));}),this['comments']['add'](_0x489743,this['_findOptimalIndex'](_0x489743));}['_update'](_0x2060e0){const {channelId:_0x1d04d4,id:_0x1e6f71}=this;this['_repository']['fire'](ai('updateCommentThread',_0x1d04d4),{..._0x2060e0,'channelId':_0x1d04d4,'threadId':_0x1e6f71});}['_remove'](_0x4ddf16){return this['stopListening'](_0x4ddf16),_0x4ddf16['destroy'](),this['comments']['remove'](_0x4ddf16);}['_findOptimalIndex'](_0x218c30){const _0x3a23a7=this['comments']['find'](_0xa665a8=>new Date(_0xa665a8['authoredAt'])['getTime']()>new Date(_0x218c30['authoredAt'])['getTime']());return _0x3a23a7?this['comments']['getIndex'](_0x3a23a7):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x39ae5a,_0x6b163f){super();const _0x51f73d=_0x39ae5a['context']['plugins']['get'](_0x1278ff)['me'],_0x5e6330=_0x39ae5a['getCommentThread'](_0x6b163f['threadId']),_0x4e8f4c=0x0===_0x5e6330['comments']['length'],_0x239937=_0x51f73d===_0x6b163f['author'];this['id']=_0x6b163f['id'],this['threadId']=_0x6b163f['threadId'],this['author']=_0x6b163f['author'],this['creator']=_0x6b163f['creator'],this['set']('content',_0x6b163f['content']),this['createdAt']=_0x6b163f['createdAt']||new Date(),this['set']('authoredAt',_0x6b163f['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5e6330,'resolvedAt'),this['set']('attributes',_0x6b163f['attributes']||{}),this['bind']('isEditable')['to'](_0x39ae5a,'_permissions',()=>{const _0x5500db=_0x39ae5a['getPermissions'](_0x5e6330['channelId'])['write'],_0x20aec0=_0x39ae5a['getPermissions'](_0x5e6330['channelId'])['modifyAll'];return _0x239937&&_0x5500db||!_0x239937&&_0x20aec0;}),this['bind']('isRemovable')['to'](_0x5e6330,'isRemovable',_0x39ae5a,'_permissions',_0x54bc4b=>{const _0x146fb0=_0x39ae5a['getPermissions'](_0x5e6330['channelId'])['write'],_0x266c35=_0x39ae5a['getPermissions'](_0x5e6330['channelId'])['modifyAll'];return _0x239937&&_0x146fb0||_0x54bc4b&&_0x4e8f4c||!_0x239937&&_0x266c35&&!_0x4e8f4c;}),this['bind']('isReadOnly')['to'](_0x5e6330,'isReadOnly'),this['_repository']=_0x39ae5a;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x220ab0){const _0x2ff12e=document['createElement']('div');return _0x2ff12e['innerHTML']=_0x220ab0,_0x2ff12e['textContent']['length'];}(this['content']),0xc8);}['update'](_0x21a879){const {threadId:_0x4b9480,id:_0x2d1492}=this;if(!this['_repository']['hasCommentThread'](_0x4b9480))throw new _0x44c5ce('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x322591}=this['_repository']['getCommentThread'](_0x4b9480);this['_repository']['fire'](ai('updateComment',_0x322591,_0x4b9480),{'channelId':_0x322591,'threadId':_0x4b9480,'commentId':_0x2d1492,..._0x21a879});}['setAttribute'](_0x39767e,_0x45a6af){const _0x420dfb=_0x1e2b2b(this['attributes']);_0x4d4ab(_0x420dfb,_0x39767e,_0x45a6af),this['update']({'attributes':_0x420dfb});}['removeAttribute'](_0x567d59){const _0x1a1956=_0x1e2b2b(this['attributes']);_0x9b4fa2(_0x1a1956,_0x567d59),this['update']({'attributes':_0x1a1956});}['remove'](_0x641f6a={}){if(!_0x641f6a['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2df4f1,id:_0x2c9b3b}=this;if(!this['_repository']['hasCommentThread'](_0x2df4f1))throw new _0x44c5ce('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4b6ccb}=this['_repository']['getCommentThread'](_0x2df4f1);this['_repository']['fire'](ai('removeComment',_0x4b6ccb,_0x2df4f1),{'channelId':_0x4b6ccb,'threadId':_0x2df4f1,'commentId':_0x2c9b3b,..._0x641f6a});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x58e480,..._0x5b4d2c){for(const _0x3544eb of _0x5b4d2c)void 0x0!==_0x3544eb&&(_0x58e480+=':'+String(_0x3544eb));return _0x58e480;}var ci=class extends _0x2d8028{constructor(_0x5b5805){super(_0x5b5805),this['set']('hasContent',!0x1);}['refresh'](){const _0x2881ee=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x15d910 of _0x2881ee['getRanges']())if(this['_hasContent'](_0x15d910))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x5dd187=_0x341e8a(),ranges:_0x34d832,comment:_0x2850e1}={}){const _0x56c0ac=this['editor']['model'],_0x3576d9=_0x34d832??Array['from'](_0x56c0ac['document']['selection']['getRanges']()),_0x526182=[];for(const _0x371795 of _0x3576d9)this['_hasContent'](_0x371795)&&_0x526182['push'](this['_trimToContent'](_0x371795));if(!_0x526182['length'])throw new _0x44c5ce('addcommentthreadcommand-incorrect-ranges',null);_0x2850e1&&this['_createCommentThread'](_0x5dd187,_0x2850e1),this['_createMarkersFromRanges'](_0x5dd187,_0x526182,!!_0x2850e1);}['_createMarkersFromRanges'](_0x144233,_0x1d2fb2,_0x1d2350){this['editor']['model']['change'](_0xf0d929=>{for(const _0x4765b2 of _0x1d2fb2){const _0x1e3274='comment:'+_0x144233+':'+_0x341e8a()['substr'](0x1,0x5);_0xf0d929['addMarker'](_0x1e3274,{'range':_0x4765b2,'usingOperation':_0x1d2350,'affectsData':_0x1d2350});}});}['_createCommentThread'](_0x54973e,_0x4c0fae){const _0x4e6561=this['editor']['plugins']['get']('CommentsRepository'),_0x5eb820=this['editor']['config']['get']('collaboration.channelId'),_0x1b897b=this['editor']['plugins']['get']('Users')['me'];if(!_0x1b897b)throw new _0x44c5ce('addcommentthreadcommand-user-not-found',null);_0x4e6561['addCommentThread']({'threadId':_0x54973e,'channelId':_0x5eb820,'comments':[{'authorId':_0x1b897b['id'],'content':_0x4c0fae,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0xb0d712){for(const _0x40bae8 of _0xb0d712['getItems']())if(this['_itemIsContent'](_0x40bae8))return!0x0;return!0x1;}['_itemIsContent'](_0x483a84){return _0x483a84['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x483a84)&&!_0x483a84['is']('element','tableCell');}['_trimToContent'](_0x5abf43){const _0x4de271=_0x196f13=>!this['_itemIsContent'](_0x196f13['item']),_0x40975e=_0x5abf43['start']['getLastMatchingPosition'](_0x4de271),_0x441ea6=_0x5abf43['end']['getLastMatchingPosition'](_0x4de271,{'direction':'backward'});return this['editor']['model']['createRange'](_0x40975e,_0x441ea6);}},di=class extends _0x24174e{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d081a){super(_0x5d081a),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x430864=this['editor'],_0x5a0ac8=_0x430864['model']['document']['selection'],_0x4358d3=_0x2c3156(()=>this['refreshSelectedViews'](),0xa);_0x5a0ac8['on']('change:range',(_0xc0185c,_0x57f786)=>{_0x57f786['directChange']&&(_0x4358d3['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x430864['editing']['view']['document'],'change:isFocused',(_0x20daef,_0x1b496b,_0x6d6a44)=>{_0x6d6a44&&_0x4358d3();}),this['listenTo'](_0x430864['ui']['focusTracker'],'change:isFocused',(_0x24e3d4,_0x272600,_0x52ce38)=>{_0x52ce38||this['fire']('blur',{'isAnnotationTracked':_0x510cb5=>this['_editorAnnotationsData']['has'](_0x510cb5['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5f2974){if(this['_editorAnnotations']['has'](_0x5f2974['view']))return;this['_editorAnnotations']['add'](_0x5f2974['view']),this['editor']['ui']['focusTracker']['add'](_0x5f2974['view']['element']);const _0x38d882=this['editor']['plugins']['get'](ti);this['listenTo'](_0x38d882['collection'],'remove',(_0x21ddb1,_0x12a456)=>{this['editor']['ui']['focusTracker']['remove'](_0x12a456['view']['element']),this['_editorAnnotations']['delete'](_0x12a456['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2bec97){if('function'!=typeof _0x2bec97)throw new _0x44c5ce('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2bec97);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x293ed1,annotations:_0x19036b}){const _0x2c5c58=[],_0x50dd1a=this['editor']['model']['document']['selection'],_0x37d105=Array['from'](_0x50dd1a['getRanges']());for(const [_0x82f80e,_0x24982a]of this['_editorAnnotationsData']){const _0x4b3a47=_0x3e7f6d(_0x24982a),_0x4985ef=_0x19036b['getByInnerView'](_0x82f80e);_0x4b3a47&&_0x4985ef&&_0x2c5c58['push']({'annotation':_0x4985ef,'range':_0x4b3a47});}function _0x3e7f6d(_0x278e7b){for(const _0x269014 of _0x278e7b)for(const _0x528b69 of _0x37d105)if(_0x269014['containsRange'](_0x528b69,!_0x50dd1a['isCollapsed']))return _0x269014;return null;}return _0x2c5c58['sort']((_0x56ea94,_0x56c503)=>{const _0x33abc3=_0x56ea94['range'],_0x45402f=_0x56c503['range'];if(!_0x33abc3['isEqual'](_0x45402f)){if(_0x33abc3['containsRange'](_0x45402f,!0x0))return 0x1;if(_0x45402f['containsRange'](_0x33abc3,!0x0))return-0x1;}return _0x56ea94['annotation']==_0x293ed1?-0x1:_0x56c503['annotation']==_0x293ed1?0x1:0x0;})['map'](_0x1e6bf=>_0x1e6bf['annotation']);}get['_editorAnnotationsData'](){const _0x4c1937=new Map();for(const _0x1981e9 of Array['from'](this['_dataCollectors']))for(const [_0x231f39,_0x38e931]of _0x1981e9())_0x4c1937['set'](_0x231f39,_0x38e931);return _0x4c1937;}},li=class extends _0x24174e{['afterInit'](){const _0x741c20=this['editor'];_0x741c20['plugins']['has']('RestrictedEditingModeEditing')&&_0x741c20['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x24174e{constructor(_0x14ea70){super(_0x14ea70),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1be544=this['editor'],_0x2c8104=_0x1be544['commands']['get']('importWord'),_0x5bd14b=_0x1be544['plugins']['get'](_0x1278ff);_0x2c8104&&(_0x2c8104['on']('execute',(_0x118894,[,_0x1bbeb6])=>{_0x1bbeb6['collaboration_features']={'comments':!0x0,'user_id':_0x5bd14b['me']['id']};},{'priority':_0x519083['high']+0xa}),this['listenTo'](_0x2c8104,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5369ab,_0x3ba687){const {comment_threads:_0x179d08}=_0x3ba687;_0x179d08&&_0x179d08['forEach'](({thread_id:_0x5cdece,comments:_0xf69e91,is_resolved:_0x25068a})=>{const _0x5d2e62=new Date(),_0xd079a=_0xf69e91['map'](({author:_0x42434f,content:_0x291852,created_at:_0x35ea01})=>({'content':_0x291852,'authorId':this['editor']['plugins']['get'](_0x1278ff)['me']['id'],'createdAt':_0x5d2e62,'attributes':{'@external':{'authorName':_0x42434f,'createdAt':_0x35ea01?new Date(_0x35ea01):new Date(),'source':'importWord'}}})),_0x142482=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x142482,'threadId':_0x5cdece,'comments':_0xd079a,'resolvedAt':_0x25068a?_0x5d2e62:null});});}},ui=class extends _0x24174e{constructor(_0x207f01){super(_0x207f01),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x1e4a32=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1e4a32,'contentInsertion',(_0x40b8d1,_0x3de049)=>this['_removeMarkersWithoutThreads'](_0x3de049['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1600b8){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1600b8;const _0xb7ca11=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4cde81 of _0x1600b8['keys']()){const [_0x14712a,_0x1d460a]=_0x4cde81['split'](':');'comment'!=_0x14712a||_0xb7ca11['hasCommentThread'](_0x1d460a)||_0x1600b8['delete'](_0x4cde81);}return _0x1600b8;}['_registerMarkerInClipboardPipeline'](){const _0x175c65=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5f0a2a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5f0a2a&&_0x175c65['_registerMarkerToCopy']('comment',_0x5f0a2a);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x220b47){switch(_0x220b47){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x3c1869){const _0x4685b8=_0x3c1869['split'](':');return{'group':_0x4685b8[0x0],'id':_0x4685b8[0x1],'part':_0x4685b8[0x2]};}var pi=class extends _0x24174e{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2b8bc3,_0x4168bc)=>{if(!_0x4168bc['options']['showCommentHighlights'])return null;if(_0x4168bc['options']['ignoreResolvedComments']){const {id:_0x43bbd7}=fi(_0x2b8bc3['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x43bbd7)?.['isResolved']&&_0x2b8bc3['item'])return _0x4168bc['consumable']['consume'](_0x2b8bc3['item'],'addMarker:'+_0x2b8bc3['markerName']),_0x4168bc['consumable']['consume'](_0x2b8bc3['item'],'removeMarker:'+_0x2b8bc3['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x31fea4=>{_0x31fea4['on']('addMarker:comment',(_0x5e1621,_0x226c5c,_0x595535)=>{if(!_0x595535['options']['showCommentHighlights'])return;const _0x249a3=_0x226c5c['item'];if(!_0x249a3)return;const _0x1a4aa5=_0x595535['mapper']['toViewElement'](_0x249a3);this['editor']['model']['schema']['isObject'](_0x249a3)&&_0x1a4aa5&&!_0x1a4aa5['getCustomProperty']('widget')&&_0x1a4aa5['is']('containerElement')&&Ct(_0x1a4aa5,_0x595535['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3bfc96,{writer:_0x509d66,options:_0x58df53})=>{if(!_0x58df53['showCommentHighlights'])return null;const _0x278b9c=_0x509d66['createContainerElement']('div'),_0x501e0a=_0x509d66['createEmptyElement']('hr');return _0x509d66['addClass']('ck-horizontal-line',_0x278b9c),_0x509d66['insert'](_0x509d66['createPositionAt'](_0x278b9c,0x0),_0x501e0a),_0x278b9c;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2316ac,{writer:_0x5a67b4,options:_0x1a4cd9})=>{if(!_0x1a4cd9['showCommentHighlights'])return null;const _0x3424e8=_0x5a67b4['createContainerElement']('span'),_0x12085f=_0x5a67b4['createEmptyElement']('img');return _0x5a67b4['addClass']('image-inline',_0x3424e8),_0x5a67b4['insert'](_0x5a67b4['createPositionAt'](_0x3424e8,0x0),_0x12085f),_0x3424e8;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x163262,{writer:_0x48b6ef,options:_0x5c5aa3})=>{if(_0x5c5aa3['showCommentHighlights'])return _0x48b6ef['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x476c58,_0x7654e0,_0x1b8e7a)=>{_0x1b8e7a['options']['showCommentHighlights']&&_0x476c58['stop']();},{'priority':'high'});}},wi=class extends _0x24174e{static get['requires'](){return[oi,di,_0x1278ff,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10e899){super(_0x10e899),this['set']('isThreadsLoadingPaused',!0x0),_0x10e899['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1af559,_0x7daec5,_0x3fb70a,_0x17d0e3)=>{const _0x28e5f7=_0x10e899['plugins']['get'](oi),_0x147c9d=_0x3fb70a?fi(_0x3fb70a)['id']:null;_0x10e899['model']['change'](()=>{if(_0x147c9d){const _0x5a3042=this['getAllMarkersForId'](_0x147c9d);for(const _0x1c618f of _0x5a3042)_0x10e899['editing']['reconvertMarker'](_0x1c618f);}if(_0x17d0e3){const {id:_0x32fc92}=fi(_0x17d0e3),_0x5aa9b5=_0x28e5f7['getCommentThread'](_0x32fc92);if(_0x5aa9b5&&_0x5aa9b5['unlinkedAt'])return;if(_0x5aa9b5&&!_0x5aa9b5['isAttached'])return;const _0x298c5e=this['getAllMarkersForId'](_0x32fc92);for(const _0x201a15 of _0x298c5e)_0x10e899['editing']['reconvertMarker'](_0x201a15);}}),_0x147c9d&&this['scrollToThreadMarker'](_0x147c9d);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xfbf36d=this['editor'],_0x569520=_0xfbf36d['plugins']['get'](oi),_0x44f2c3=_0xfbf36d['config']['get']('collaboration.channelId'),_0xe85900=_0x569520['getCommentThreads']()['filter'](_0x3eb6f2=>_0x3eb6f2['channelId']!==_0x44f2c3);_0xfbf36d['commands']['add']('addCommentThread',new ci(_0xfbf36d)),this['listenTo'](_0xfbf36d,'change:isReadOnly',(_0x206ccf,_0x272e2c,_0x4f0220)=>{_0x569520['switchReadOnly'](_0x4f0220,_0xfbf36d['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x569520,gi('addCommentThread',_0x44f2c3),(_0x4c65fe,{threadId:_0x38b75d})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x38b75d)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x38b75d);}),this['listenTo'](_0x569520,gi('removeCommentThread',_0x44f2c3),(_0x1e9ea2,{threadId:_0x2bce7d})=>{_0xfbf36d['model']['enqueueChange']({'isUndoable':!0x1},_0x28e51a=>{const _0x58bc95=this['getAllMarkersForId'](_0x2bce7d);for(const _0x876b28 of _0x58bc95)_0x28e51a['removeMarker'](_0x876b28);});}),this['listenTo'](_0x569520,gi('resolveCommentThread',_0x44f2c3),(_0x3beee6,{threadId:_0x411f51})=>{this['_reconvertMarkers'](_0x411f51);const _0x41095c=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x41095c['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x411f51)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x569520,gi('reopenCommentThread',_0x44f2c3),(_0x11acc1,{threadId:_0x3b6c75})=>{this['_reconvertMarkers'](_0x3b6c75);},{'priority':'low'}),this['listenTo'](_0x569520,gi('addComment',_0x44f2c3),(_0x19b1f5,{threadId:_0x48a13b,isFromAdapter:_0xf007bc})=>{const _0x235cc4=this['getAllMarkersForId'](_0x48a13b);!_0xf007bc&&0x0!=_0x235cc4['length']&&_0x569520['hasCommentThread'](_0x48a13b)&&0x1===_0x569520['getCommentThread'](_0x48a13b)['length']&&_0xfbf36d['model']['enqueueChange']({'isUndoable':!0x1},_0x4f724c=>{for(const _0x269417 of _0x235cc4)_0x4f724c['updateMarker'](_0x269417,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xe85900);}['afterInit'](){!async function(_0x358b3c){const _0x145ce3='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x1e6e3b=0x78fa8,_0x141afb=window['Date']['now'](),_0x5ded08=_0x358b3c['editor'],_0x3f8e69=new window['Promise'](_0x266c77=>{_0x5ded08['once']('ready',_0x266c77);}),_0x19a98c={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x567a98=_0x5ded08['config']['get']('licenseKey');async function _0x14dcd0(){let _0x2c9f85,_0x46ffa5=null,_0x2875ac=null;try{return'GPL'==_0x567a98?'NotAllowed':(_0x2c9f85=_0x5bc374(),_0x2c9f85?(_0x2c9f85['usageEndpoint']&&(_0x2875ac=_0x14c579(_0x2c9f85['usageEndpoint'],_0x2c9f85['jti'])),await _0x15145d()?_0x5ba65d()?_0x49407e()?'Expired':_0x5c23cd()?('evaluation'==_0x2c9f85['licenseType']&&(_0x46ffa5=_0x308572('EvaluationLimit')),await _0x217a73()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x49407e(){const _0x3bbc62=['evaluation','trial']['includes'](_0x2c9f85['licenseType'])?_0x141afb/0x3e8:0xe10*_0x1e6e3b;return _0x2c9f85['exp']<_0x3bbc62;}function _0x5ba65d(){const _0x2ffb43=_0x2c9f85['features'];if(!_0x2ffb43)return!0x1;if(_0x2ffb43['includes']('*'))return!0x0;if(_0x2ffb43['includes']('CMT'))return!0x0;if(_0x2ffb43['includes']('TRILIUM')&&_0x5dad6f())return!0x0;if(_0x2ffb43['includes']('RCMT')){if(_0x271148())return!0x0;if(_0x408fb0()||_0x3c1ddb())return!0x0;}return!0x1;}function _0x5c23cd(){const _0xda0bde=_0x2c9f85['licensedHosts'];if(!_0xda0bde||0x0==_0xda0bde['length'])return!0x0;const {hostname:_0x3c8f28}=new URL(window['location']['href']);if(_0xda0bde['includes'](_0x3c8f28))return!0x0;const _0x10d320=_0x3c8f28['split']('.');return _0xda0bde['filter'](_0xefd8e5=>_0xefd8e5['includes']('*'))['map'](_0x1d15f8=>_0x1d15f8['split']('.'))['filter'](_0x2d9b0f=>_0x2d9b0f['length']<=_0x10d320['length'])['map'](_0x1d2998=>Array(_0x10d320['length']-_0x1d2998['length'])['fill']('*'===_0x1d2998[0x0]?'*':'')['concat'](_0x1d2998))['some'](_0x316b9c=>_0x10d320['every']((_0x42de92,_0x29dc81)=>_0x316b9c[_0x29dc81]===_0x42de92||'*'===_0x316b9c[_0x29dc81]));}function _0x217a73(){return _0x46ffa5&&_0x2875ac?new window['Promise']((_0x503920,_0x12457d)=>{_0x46ffa5['then'](_0x503920,_0x12457d),_0x2875ac['then'](_0x6a3eab=>{'Valid'!=_0x6a3eab&&_0x503920(_0x6a3eab);},_0x12457d);}):_0x46ffa5||_0x2875ac||'Valid';}}function _0x14c579(_0x571aab,_0x4f1eeb){return new window['Promise'](_0x41dc93=>{if(_0x5ca483())return _0x41dc93('Valid');_0x16303d(),_0x5ded08['decorate']('_sendUsageRequest');let _0xf0ee9e=!0x1;const _0x7c1907=_0x341e8a();function _0x422cc5(_0x4caa45){return!!_0x4caa45&&('object'==typeof _0x4caa45||'function'==typeof _0x4caa45)&&'function'==typeof _0x4caa45['then']&&'function'==typeof _0x4caa45['catch'];}function _0x44c6f3(_0x1524dc){_0xe33198(_0x1524dc)['then'](_0x1e75f3=>_0x1e75f3&&'ok'==_0x1e75f3['status']?_0x4df923(_0x2f1bc1(_0x7c1907+_0x4f1eeb))!=_0x1e75f3['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x3f35b6=>(_0x3bfb37(),_0x3f35b6),()=>{const _0x2d8af9=_0x14a102();return null==_0x2d8af9?(_0x3bfb37(),'Valid'):_0x141afb-_0x2d8af9>0x240c8400?'UsageLimit':'Valid';})['then'](_0x41dc93)['catch'](()=>{_0x41dc93('UsageLimit');});const _0x478454=0x36ee80;function _0x3bfb37(){const _0x3a31af='llct-'+_0x4df923(_0x2f1bc1(_0x571aab)),_0x4d7a43=_0x597991(_0x4df923(window['Math']['ceil'](_0x141afb/_0x478454)));window['localStorage']['setItem'](_0x3a31af,_0x4d7a43);}function _0x14a102(){const _0x5a063b='llct-'+_0x4df923(_0x2f1bc1(_0x571aab)),_0x450f03=window['localStorage']['getItem'](_0x5a063b);return _0x450f03?window['parseInt'](_0x597991(_0x450f03),0x10)*_0x478454:null;}function _0xe33198(_0x207b8b){return new window['Promise']((_0x5769be,_0x50bf8e)=>{_0x207b8b['then'](_0x5769be,_0x50bf8e),window['setTimeout'](_0x50bf8e,0x1d4c0);});}}_0x5ded08['on']('_sendUsageRequest',(_0x268a57,_0x4c5780)=>{if(_0x4c5780[0x0]!=_0x571aab)return _0x41dc93('UsageLimit');_0x4c5780[0x1]={..._0x4c5780[0x1],'requestId':_0x7c1907};},{'priority':'high'}),_0x5ded08['on']('_sendUsageRequest',_0x307d98=>{_0x422cc5(_0x307d98['return'])&&(_0xf0ee9e=!0x0,_0x44c6f3(_0x307d98['return']));},{'priority':'low'}),_0x3f8e69['then'](()=>{_0xf0ee9e||_0x41dc93('UsageLimit');});});function _0x5ca483(){return'auto'==_0x5ded08['editing']['view']['_overlayModeHint'];}function _0x16303d(){_0x5ded08['editing']['view']['_overlayModeHint']='auto';}}function _0x308572(_0x3ed0c7){const _0x390399=[new window['Promise'](_0x12f14c=>setTimeout(_0x12f14c,0x93ecc)),_0x3f8e69['then'](()=>new window['Promise'](_0x1a2355=>{let _0x3f56c5=0x0;_0x5ded08['model']['on']('applyOperation',(_0x299f72,_0x4d52aa)=>{_0x4d52aa[0x0]['isDocumentOperation']&&_0x3f56c5++,0x5e8==_0x3f56c5&&(_0x1a2355(),_0x299f72['off']());});}))];return window['Promise']['race'](_0x390399)['then'](()=>_0x3ed0c7);}async function _0x13ada0(){await _0x3f8e69,_0x5ded08['model']['change']=_0x38d577,_0x5ded08['model']['enqueueChange']=_0x38d577,_0x5ded08['enableReadOnlyMode']('model');}function _0x5dad6f(){return window['glob']&&window['glob']['triliumVersion'];}function _0x271148(){return _0x472001('WebSocketGateway')&&'connected'==_0x48a01c('WebSocketGateway')['state'];}function _0x408fb0(){return _0x472001('RevisionViewerIntegration');}function _0x3c1ddb(){return _0x472001('TrackChangesDataGetter');}function _0x5acf61(_0x22ba0e){const _0x5bb3eb=_0x2fa335();_0x5ded08[_0x5bb3eb]='commentsLicenseKey'+_0x22ba0e,'Valid'!=_0x22ba0e&&_0x13ada0();}function _0x2fa335(){const _0x238611=window['String'](window['performance']['now']())['replace']('.','');let _0x459382='K';for(let _0x1d79a9=0x0;_0x1d79a9<_0x238611['length'];_0x1d79a9+=0x2){let _0x299c9e=window['parseInt'](_0x238611['substring'](_0x1d79a9,_0x1d79a9+0x2));_0x299c9e>=0x3e&&(_0x299c9e-=0x3e),_0x459382+=_0x145ce3[_0x299c9e];}return _0x459382;}function _0x5bc374(){const _0x568e5b=_0x567a98['split']('.');if(0x3!=_0x568e5b['length'])return null;return _0x280a38(_0x568e5b[0x1]);function _0x280a38(_0x231ba2){const _0x4ebac8=_0x2dd868(_0x231ba2);return _0x4ebac8&&_0x5066dc()?_0x4ebac8:null;function _0x5066dc(){const _0x5b9b38=_0x4ebac8['jti'],_0x3cc837=window['parseInt'](_0x5b9b38['substring'](_0x5b9b38['length']-0x8),0x10),_0x112694={..._0x4ebac8,'jti':_0x5b9b38['substring'](0x0,_0x5b9b38['length']-0x8)};return delete _0x112694['vc'],_0x2f1bc1(_0x112694)==_0x3cc837;}}}async function _0x15145d(){let _0x28a56f=!0x0;try{const [_0x3448c3,_0x1612ce,_0x51fe5a]=_0x567a98['split']('.');return _0x59db4f(_0x3448c3),await _0x3451e1(_0x3448c3,_0x1612ce,_0x51fe5a),_0x28a56f;}catch{return!0x1;}function _0x59db4f(_0x3a9bd7){const _0x57df66=_0x2dd868(_0x3a9bd7);_0x57df66&&'ES256'==_0x57df66['alg']||(_0x28a56f=!0x1);}async function _0x3451e1(_0x4533d9,_0x550f0c,_0x193ac4){const _0xf640c5=window['Uint8Array']['from'](_0x410696(_0x193ac4),_0x11d46e=>_0x11d46e['charCodeAt'](0x0)),_0x4a3ba5=new window['TextEncoder']()['encode'](_0x4533d9+'.'+_0x550f0c),_0xce8c1b=window['crypto']['subtle'];if(!_0xce8c1b)return;const _0x2db037=await _0xce8c1b['importKey']('jwk',_0x19a98c,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xce8c1b['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2db037,_0xf640c5,_0x4a3ba5)||(_0x28a56f=!0x1);}}function _0x2dd868(_0x15d474){return _0x15d474['startsWith']('ey')?JSON['parse'](_0x410696(_0x15d474)):null;}function _0x410696(_0x5b8f95){return window['atob'](_0x5b8f95['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2f1bc1(_0x12a141){let _0x14eefd=0x1505;function _0x33933a(_0x5f0ce3){for(let _0x4050ec=0x0;_0x4050ec<_0x5f0ce3['length'];_0x4050ec++){const _0x1102fb=_0x5f0ce3['charCodeAt'](_0x4050ec);_0x14eefd=(_0x14eefd<<0x5)+_0x14eefd+_0x1102fb,_0x14eefd&=_0x14eefd;}}function _0x306e3b(_0x3f8d97){Array['isArray'](_0x3f8d97)?_0x3f8d97['forEach'](_0x306e3b):_0x3f8d97&&'object'==typeof _0x3f8d97?Object['entries'](_0x3f8d97)['sort']()['forEach'](([_0x325509,_0x2ac79c])=>{_0x33933a(_0x325509),_0x306e3b(_0x2ac79c);}):_0x33933a(window['String'](_0x3f8d97));}return _0x306e3b(_0x12a141),_0x14eefd>>>0x0;}function _0x4df923(_0x16fef4){return _0x16fef4['toString'](0x10)['padStart'](0x8,'0');}function _0x597991(_0x15f914){return _0x15f914['split']('')['reverse']()['join']('');}function _0x472001(_0x57e5c9){return _0x5ded08['plugins']['has'](_0x57e5c9);}function _0x48a01c(_0x4b0c65){return _0x5ded08['plugins']['get'](_0x4b0c65);}function _0x38d577(){}_0x5acf61(await _0x14dcd0());}(this);}['destroy'](){const _0x310fc1=this['editor']['plugins']['get'](oi),_0x38bfcf=this['editor']['config']['get']('collaboration.channelId');for(const _0x541717 of _0x310fc1['getCommentThreads']({'channelId':_0x38bfcf}))_0x310fc1['_detachCommentThread'](_0x541717['id']),_0x310fc1['_threads']['delete'](_0x541717['id']);super['destroy']();}['hasMarkerForId'](_0x1c26f8){return this['getAllMarkersForId'](_0x1c26f8)['length']>0x0;}['getAllMarkersForId'](_0xc328d0){const _0x3a992d=[];for(const _0x307dfa of this['editor']['model']['markers'])_0x307dfa['name']['startsWith']('comment:'+_0xc328d0)&&_0x3a992d['push'](_0x307dfa);return _0x3a992d;}['scrollToThreadMarker'](_0xada0b1){setTimeout(()=>{const _0x2697c0=this['_getTargetForId'](_0xada0b1);_0x2697c0&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0xada0b1&&_0x4fa0f2({'target':_0x2697c0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x36fdff){this['editor']['model']['change'](()=>{for(const _0x483fb7 of this['getAllMarkersForId'](_0x36fdff))this['editor']['editing']['reconvertMarker'](_0x483fb7);});}['_attachArchivedThread'](_0x1d06ec){const _0x1b8bf8=this['editor']['plugins']['get'](oi),_0x213bdb=this['editor']['plugins']['get'](di),_0x50415c=_0x1b8bf8['getCommentThread'](_0x1d06ec);if(!_0x50415c['isAttached']){const _0x4b9674=_0x50415c['attachTo'](()=>this['_getTargetForId'](_0x50415c['id']));_0x213bdb['registerAnnotation'](_0x4b9674),_0x50415c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x11b643=this['editor'],_0xed6749=_0x11b643['plugins']['get'](_0x1278ff);_0x11b643['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3851ac,_0x2f6e94)=>{const {id:_0x44082c}=fi(_0x3851ac['markerName']),_0x36ec44=_0x11b643['plugins']['get'](oi)['getCommentThread'](_0x44082c),_0x575184=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x44082c;let _0x3da9e6;if(_0x36ec44&&_0x36ec44['isResolved']&&!_0x575184&&_0x3851ac['item'])return _0x2f6e94['consumable']['consume'](_0x3851ac['item'],'addMarker:'+_0x3851ac['markerName']),_0x2f6e94['consumable']['consume'](_0x3851ac['item'],'removeMarker:'+_0x3851ac['markerName']),null;const _0xff910=['ck-comment-marker'];return _0x575184&&_0xff910['push']('ck-comment-marker--active'),_0x3da9e6=_0x36ec44?.['length']?_0x36ec44['comments']['first']['author']['id']:_0xed6749['me']['id'],{'classes':_0xff910,'attributes':{'data-comment':_0x44082c,'data-author-id':_0x3da9e6}};}}),_0x11b643['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1271a6,{options:_0x5859c1})=>{if(_0x5859c1['showCommentHighlights'])return null;const _0xb541ac=_0x11b643['plugins']['get'](oi),_0x356897=_0x11b643['model']['markers']['get'](_0x1271a6),{id:_0x1ca030,part:_0xda2329}=fi(_0x1271a6);return _0x356897&&!_0x356897['affectsData']||_0x5859c1['ignoreResolvedComments']&&_0xb541ac['getCommentThread'](_0x1ca030)?.['isResolved']?null:{'group':'comment','name':_0xda2329?_0x1ca030+':'+_0xda2329:_0x1ca030};}}),_0x11b643['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x167638,{writer:_0x3d8c51})=>_0x3d8c51['createElement']('$marker',{'data-name':'comment:'+_0x167638['getAttribute']('id')})}),_0x11b643['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x13ada2=this['editor'],_0x5f56e7=_0x13ada2['plugins']['get'](oi),_0x595de6=new Set(),_0xec77d1=new Set();_0x13ada2['model']['document']['registerPostFixer'](_0x628a5e=>{let _0x419651=!0x1;for(const {name:_0x41993c,data:_0x9003fd}of _0x13ada2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5d9a3e,id:_0x2e6add}=fi(_0x41993c);let _0x1779da=_0x9003fd['newRange'];if('comment'!==_0x5d9a3e||!_0x1779da)continue;const _0x377033='$graveyard'===_0x1779da['root']['rootName'];_0x377033||(_0x1779da=_i(_0x1779da,_0x13ada2['model']),!_0x1779da||_0x1779da['isCollapsed']||!_0x9003fd['newRange']||_0x1779da['isEqual'](_0x9003fd['newRange']))?_0x13ada2['model']['hasContent'](_0x1779da)&&!_0x377033?this['isThreadsLoadingPaused']?_0x595de6['add'](_0x41993c):this['_handleThreadMarker'](_0x41993c,_0x2e6add):(_0xec77d1['add'](_0x41993c),_0x595de6['delete'](_0x41993c),_0x628a5e['removeMarker'](_0x41993c),_0x419651=!0x0):(_0x628a5e['updateMarker'](_0x41993c,{'range':_0x1779da}),_0x419651=!0x0);}return _0x419651;}),this['on']('change:isThreadsLoadingPaused',(_0x1be2ff,_0x34d71d,_0x506fd4)=>{if(!_0x506fd4&&_0x595de6['size'])for(const _0x1789dc of _0x595de6){const {id:_0x524789}=fi(_0x1789dc);_0x595de6['delete'](_0x1789dc),_0x13ada2['model']['markers']['get'](_0x1789dc)&&this['_handleThreadMarker'](_0x1789dc,_0x524789);}}),this['listenTo'](_0x13ada2['model']['document'],'change',()=>{for(const {name:_0x1ed4fd,data:{newRange:_0x2a5723}}of _0x13ada2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x364282,id:_0x25f469}=fi(_0x1ed4fd);if('comment'!==_0x364282)continue;const _0x2d9862=_0x5f56e7['getCommentThread'](_0x25f469),_0x18c613=this['hasMarkerForId'](_0x25f469);_0x2d9862&&(!_0x2d9862['_hasTargetInContent']&&_0x2a5723&&_0x13ada2['editing']['view']['once']('render',()=>{const _0x319ca7=_0x13ada2['plugins']['get'](ti),_0x5dc787=_0x5f56e7['_threadToController']['get'](_0x2d9862)['view'];_0x319ca7['getByInnerView'](_0x5dc787)['refreshVisibility']();},{'priority':'low'}),_0x2d9862['_hasTargetInContent']=_0x18c613||!!_0x2a5723),_0x2a5723||(_0xec77d1['add'](_0x1ed4fd),_0x595de6['delete'](_0x1ed4fd));}for(const _0x483902 of _0xec77d1){const {id:_0xfc50a2}=fi(_0x483902),_0x5e0b2a=_0x5f56e7['getCommentThread'](_0xfc50a2);if(_0x595de6['delete'](_0x483902),!_0x5e0b2a)continue;const _0x2f29ae=this['hasMarkerForId'](_0xfc50a2);_0x2f29ae||_0x5e0b2a['isSubmitted']?_0x2f29ae||_0x5e0b2a['unlinkedAt']||_0x5e0b2a['setUnlinkedAt'](new Date()):_0x5e0b2a['remove']();}_0xec77d1['clear']();});}['_handleInitialThreads'](_0x3aee8d){_0x3aee8d['forEach'](_0x5adf50=>{_0x5adf50['unlinkedAt']&&this['_attachArchivedThread'](_0x5adf50['id']);});}['_getTargetForId'](_0x1ea267){const _0x724760=this['editor'],_0x1e08b6=this['getAllMarkersForId'](_0x1ea267);return _0x571da3(_0x724760['editing'],_0x1e08b6);}['_getTextContext'](_0x15c680){const _0x150eb6=this['getAllMarkersForId'](_0x15c680);let _0x1889f9='',_0x3c467c=!0x1;for(const _0x350c65 of _0x150eb6){const _0x235595=_0x350c65['getRange']();for(const _0x219b5b of Array['from'](_0x235595['getItems']()))_0x219b5b['is']('$textProxy')?(_0x1889f9&&_0x3c467c&&(_0x1889f9+='\x20',_0x3c467c=!0x1),_0x1889f9+=_0x219b5b['data']):_0x3c467c=!0x0;_0x3c467c=!0x0;}return _0x1889f9['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3c024c,_0x37976a){const _0x35c92c=this['editor'],_0x5489c2=_0x35c92c['plugins']['get'](oi);let _0x270cde=_0x5489c2['getCommentThread'](_0x37976a);const _0x4b056b=_0x35c92c['config']['get']('collaboration.channelId'),_0x30e012=_0x35c92c['plugins']['get'](di);return _0x270cde&&(_0x270cde['unlinkedAt']&&_0x270cde['setUnlinkedAt'](null),_0x270cde['isAttached'])||(this['getAllMarkersForId'](_0x37976a)[0x0]['managedUsingOperations']?_0x5489c2['fetchCommentThread']({'channelId':_0x4b056b,'threadId':_0x37976a})['then'](_0x57e108=>{if('destroyed'!==_0x35c92c['state']){if(_0x270cde=_0x57e108,_0x270cde&&!_0x270cde['isAttached']){const _0x393304=_0x270cde['attachTo'](()=>this['_getTargetForId'](_0x37976a));_0x30e012['registerAnnotation'](_0x393304),_0x270cde['isResolved']&&this['_reconvertMarkers'](_0x37976a);}else{if(!_0x270cde){const _0x4564b7=this['getAllMarkersForId'](_0x37976a);_0x35c92c['model']['change'](_0x17d4aa=>{for(const _0x4e440d of _0x4564b7)_0x17d4aa['removeMarker'](_0x4e440d);});}}}}):_0x35c92c['editing']['view']['once']('render',()=>{if(_0x5489c2['getCommentThread'](_0x37976a))return;const _0x2f5f61=_0x35c92c['plugins']['get'](ti);_0x270cde=_0x5489c2['openNewCommentThread']({'channelId':_0x4b056b,'threadId':_0x37976a,'target':()=>this['_getTargetForId'](_0x37976a),'context':{'type':'text','value':this['_getTextContext'](_0x37976a)}});const _0x1b5f5b=_0x5489c2['_threadToController']['get'](_0x270cde)['view'],_0x1a69c0=_0x2f5f61['getByInnerView'](_0x1b5f5b);_0x1a69c0&&_0x30e012['registerAnnotation'](_0x1a69c0);},{'priority':'low'})),_0x270cde;}['_handleThreadMarker'](_0x5d2b9f,_0x522b8e){const _0x4eb6f8=this['_attachMarkerToThread'](_0x5d2b9f,_0x522b8e);_0x4eb6f8&&!_0x4eb6f8['context']&&_0x4eb6f8['setContext']({'type':'text','value':this['_getTextContext'](_0x522b8e)});}['_initAriaMarkerChangeAnnouncements'](){const _0xff78f6=this['editor'];_0x532f4b(_0xff78f6['model'],({left:_0x583e90,entered:_0x1a44b6})=>{for(const _0x53b4c2 of _0x583e90)if(Ai(_0x53b4c2)){_0xff78f6['ui']['ariaLiveAnnouncer']['announce'](Et(_0xff78f6['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x50a489 of _0x1a44b6)if(Ai(_0x50a489)){_0xff78f6['ui']['ariaLiveAnnouncer']['announce'](Et(_0xff78f6['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x3acf66(_0x3c98c6)));break;}});}};function gi(_0x116034,_0x1e0b4a){return _0x1e0b4a?_0x116034+':'+_0x1e0b4a:_0x116034;}function _i(_0x6a6bb,_0x59f500){const _0x2cc6c8=_0x59f500['schema'],_0x1b6267=_0x59f500['createRange'](_0x6a6bb['start']);for(const _0x278c20 of _0x6a6bb['getWalker']()){const {type:_0x180a24,item:_0x54d4c0,nextPosition:_0x5adb77}=_0x278c20;if('text'===_0x180a24||_0x2cc6c8['isObject'](_0x54d4c0)){const _0x3d5431=_0x59f500['createPositionBefore'](_0x54d4c0);_0x1b6267['isCollapsed']&&(_0x1b6267['start']=_0x3d5431),_0x1b6267['end']=_0x5adb77;}}return _0x1b6267;}function Ai(_0x4ff8c5){return'comment'===fi(_0x4ff8c5['name'])['group'];}var vi=class extends _0x24174e{['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 _0x5bb46b=this['editor'],_0x71958a=_0x5bb46b['plugins']['get'](oi),_0x518b53=_0x5bb46b['plugins']['get'](wi),_0x2da302=_0x5bb46b['plugins']['get'](ti),_0x1df5f1=_0x5bb46b['plugins']['get'](di);_0x5bb46b['ui']['componentFactory']['add']('comment',()=>{const _0x20a185=this['_createUIButton'](_0x27efd5);return _0x20a185['tooltip']=!0x0,_0x20a185;}),_0x5bb46b['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x1df5f1['addSourceCollector'](()=>{const _0x52fa59=[];for(const [_0x397a69,_0x544e55]of _0x71958a['_threadToController']){const _0x412377=_0x518b53['getAllMarkersForId'](_0x397a69['id']),_0x4836ac=_0x412377['map'](_0x2aef45=>_0x2aef45['getRange']());_0x412377['length']>0x0&&_0x52fa59['push']([_0x544e55['view'],_0x4836ac]);}return _0x52fa59;}),this['listenTo'](_0x2da302,'change:activeAnnotations',(_0x2d75d8,_0x529d59,_0x467dc6)=>{const _0x2025b0=Array['from'](_0x467dc6)['map'](_0x20a912=>_0x20a912['innerView'])['find'](_0x1a7e5d=>_0x71958a['_viewToController']['has'](_0x1a7e5d));if(!_0x2025b0)return void(_0x518b53['activeMarker']=null);const _0x55ea7d=_0x71958a['_viewToController']['get'](_0x2025b0)['model']['id'],_0x2fd97e='comment:'+_0x55ea7d;_0x55ea7d&&_0x518b53['hasMarkerForId'](_0x55ea7d)?_0x518b53['activeMarker']=_0x2fd97e:_0x518b53['activeMarker']&&(_0x518b53['activeMarker']=null);}),this['listenTo'](_0x71958a,'removeCommentThread',(_0x16f97b,{threadId:_0x27bf42,isFromAdapter:_0x4f81be})=>{!_0x4f81be&&_0x5bb46b['ui']['focusTracker']['isFocused']&&_0x518b53['hasMarkerForId'](_0x27bf42)&&_0x5bb46b['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x71958a,'addComment',(_0x107d54,{threadId:_0x547fa7,isFromAdapter:_0x416b24})=>{!_0x416b24&&_0x518b53['hasMarkerForId'](_0x547fa7)&&_0x71958a['hasCommentThread'](_0x547fa7)&&0x1===_0x71958a['getCommentThread'](_0x547fa7)['length']&&(_0x5bb46b['editing']['view']['focus'](),_0x107d54['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x314363=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2b70ab;for(const _0x65ce5d in _0x314363){const _0x3fc138=_0x65ce5d,_0x24aa79=_0x314363[_0x3fc138];if('commentsLicenseKeyValid'==_0x24aa79||'commentsLicenseKeyInvalid'==_0x24aa79||'commentsLicenseKeyExpired'==_0x24aa79||'commentsLicenseKeyDomainLimit'==_0x24aa79||'commentsLicenseKeyNotAllowed'==_0x24aa79||'commentsLicenseKeyEvaluationLimit'==_0x24aa79||'commentsLicenseKeyUsageLimit'==_0x24aa79){delete _0x314363[_0x3fc138],_0x2b70ab=_0x24aa79,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2b70ab&&_0x314363['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2b70ab&&_0x314363['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2b70ab&&_0x314363['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2b70ab&&_0x314363['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2b70ab&&_0x314363['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x2b70ab&&_0x314363['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x92cc70){const _0x3241b1=this['editor'],_0x58f365=new _0x92cc70(_0x3241b1['locale']),_0x14fc93=_0x3241b1['commands']['get']('addCommentThread');return _0x58f365['set']({'label':Et(_0x3241b1['locale'],'Comment'),'icon':_0x57551d}),_0x58f365['bind']('isEnabled')['to'](_0x14fc93,'isEnabled',_0x14fc93,'hasContent',(_0x5bd9bc,_0x3b98cc)=>_0x5bd9bc&&_0x3b98cc),this['listenTo'](_0x58f365,'execute',()=>{_0x14fc93['execute']();}),_0x58f365;}},yi=class extends _0x24174e{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0xba8fcc){super(_0xba8fcc),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x85bf00,_0x4a3983,_0x497281)=>{_0x497281?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x223348,_0x428898]of this['editor']['commands'])_0x428898['affectsData']&&'addCommentThread'!==_0x223348&&_0x428898['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 _0x50ec5d=this['editor']['editing']['view']['document'];this['listenTo'](_0x50ec5d,'cut',_0x491f31=>_0x491f31['stop'](),{'priority':'highest'}),this['listenTo'](_0x50ec5d,'clipboardInput',_0x4b170d=>_0x4b170d['stop'](),{'priority':'highest'}),this['listenTo'](_0x50ec5d,'delete',_0x328524=>_0x328524['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3329b9,_0x10c0a7]of this['editor']['commands'])_0x10c0a7['affectsData']&&'addCommentThread'!==_0x3329b9&&_0x10c0a7['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 _0x5263a8{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x165197){super(_0x165197),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x31b85c=this['context']['plugins']['get'](ti);this['listenTo'](_0x31b85c,'_activateAnnotation',(_0x25402b,_0x19bf58)=>{for(const _0x53fd3c of this['activeUIs']){const _0x1f0ac5=this['_uis']['get'](_0x53fd3c);(0x0,this['uisData']['get'](_0x53fd3c)['filter'])(_0x19bf58)&&_0x1f0ac5['setActiveAnnotation'](_0x19bf58);}}),this['listenTo'](_0x31b85c,'_deactivateAllAnnotations',()=>{for(const _0x431761 of this['activeUIs'])this['_uis']['get'](_0x431761)['setActiveAnnotation'](null);}),this['listenTo'](_0x31b85c['_visibleAnnotations'],'add',(_0x484ee7,_0x5ab965)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5ab965);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4d402b){return this['activeUIs']['has'](_0x4d402b);}['activate'](_0x35d4e2,_0x314c6f=this['defaultFilter']){const _0x4a588a=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x35d4e2))throw new _0x44c5ce('annotationsuis-missing-ui',this,{'uiName':_0x35d4e2});this['isActive'](_0x35d4e2)&&this['deactivate'](_0x35d4e2),this['activeUIs']['add'](_0x35d4e2);const _0x9874ae=new Jt();Qt({'source':_0x4a588a['_visibleAnnotations'],'target':_0x9874ae,'filter':_0x314c6f}),this['uisData']['set'](_0x35d4e2,{'collection':_0x9874ae,'filter':_0x314c6f});const _0x5015c7=this['_uis']['get'](_0x35d4e2);_0x5015c7['attach'](_0x9874ae),this['listenTo'](_0x5015c7,'change:activeAnnotation',(_0x397db6,_0x3dd169,_0x5233f1,_0x2e62f5)=>{_0x2e62f5&&_0x4a588a['_removeActiveAnnotation'](_0x2e62f5),_0x5233f1&&_0x4a588a['_addActiveAnnotation'](_0x5233f1);});}['deactivate'](_0xf82432){if(this['activeUIs']['delete'](_0xf82432),!this['_uis']['has'](_0xf82432))throw new _0x44c5ce('annotationsuis-missing-ui',this,{'uiName':_0xf82432});const _0x446334=this['_uis']['get'](_0xf82432);_0x446334['detach'](),this['stopListening'](_0x446334),this['uisData']['get'](_0xf82432)['collection']['destroy'](),this['uisData']['delete'](_0xf82432);}['switchTo'](_0x12524e){if(!this['_uis']['has'](_0x12524e))throw new _0x44c5ce('annotationsuis-missing-ui',this,{'uiName':_0x12524e});const _0x1561f9=this['context']['plugins']['get'](ti),_0x4a2e52=Array['from'](_0x1561f9['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x12524e);const _0xf01ce4=this['_uis']['get'](_0x12524e);_0xf01ce4['setActiveAnnotation'](_0x4a2e52),_0xf01ce4['_setSelectedAnnotations']&&_0x4a2e52&&_0xf01ce4['_setSelectedAnnotations']([_0x4a2e52]);}['deactivateAll'](){for(const _0x261177 of this['activeUIs'])this['deactivate'](_0x261177);}['register'](_0x5064c2,_0x3fa12c){if(this['_uis']['has'](_0x5064c2))throw new _0x44c5ce('annotationsuis-register-already-registered');if('function'!=typeof _0x3fa12c['attach']||'function'!=typeof _0x3fa12c['detach']||'function'!=typeof _0x3fa12c['setActiveAnnotation'])throw new _0x44c5ce('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5064c2,_0x3fa12c);}['refilterAnnotations'](){const _0x1bfc18=this['context']['plugins']['get'](ti)['collection'],_0x105645=new Map(),_0x98ebd6=Array['from'](this['activeUIs']);for(const _0x74e3c7 of this['activeUIs']){const _0x4dcded=this['uisData']['get'](_0x74e3c7)['collection'];for(const _0x1c58f0 of _0x4dcded)_0x105645['set'](_0x1c58f0,_0x74e3c7);}for(const _0x36c41b of _0x1bfc18){const _0x4dd3ee=_0x105645['get'](_0x36c41b);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x36c41b);const _0x341e47=_0x98ebd6['find'](_0x57487c=>this['uisData']['get'](_0x57487c)['filter'](_0x36c41b));_0x4dd3ee!==_0x341e47&&(_0x4dd3ee&&this['uisData']['get'](_0x4dd3ee)['collection']['remove'](_0x36c41b),_0x341e47&&this['uisData']['get'](_0x341e47)['collection']['add'](_0x36c41b));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x33ed5b){const _0x377354=[];for(const _0x2a5cdb of this['activeUIs']){(0x0,this['uisData']['get'](_0x2a5cdb)['filter'])(_0x33ed5b)&&_0x377354['push'](_0x2a5cdb);}if(_0x377354['length']>0x1)throw new _0x44c5ce('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x377354,'annotationType':_0x33ed5b['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x25f4af('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1717a8){super(_0x1717a8);const _0x53360d=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 _0x116564(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x53360d['to']('class')],'style':{'minHeight':_0x53360d['to']('minHeight',_0x3481af=>'number'==typeof _0x3481af?Ci(_0x3481af+0xa):null)},'dir':_0x1717a8['uiLanguageDirection'],'role':'application','aria-label':Et(_0x1717a8,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x1717a8,'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',_0x3a398e=>{this['_updateItemPositionInFocusables'](_0x3a398e['source']);}),this['list']['forEach'](_0x15ee1e=>{this['focusTracker']['add'](_0x15ee1e['element']),this['_updateItemPositionInFocusables'](_0x15ee1e);}),this['list']['on']('change',(_0x242ab5,_0x5e5e4c)=>{for(const _0x3d6a22 of _0x5e5e4c['removed'])this['focusTracker']['remove'](_0x3d6a22['element']),this['focusables']['remove'](_0x3d6a22);for(const _0x24c7c7 of _0x5e5e4c['added'])this['focusTracker']['add'](_0x24c7c7['element']),this['_updateItemPositionInFocusables'](_0x24c7c7);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5c9349){const _0x77da83=this['focusables']['getIndex'](_0x5c9349);let _0x7cbfd2,_0xc44388;for(const _0x2e5f2d of this['focusables'])if(_0x5c9349['top']<_0x2e5f2d['top']){_0x7cbfd2=_0x2e5f2d;break;}if(_0xc44388=_0x7cbfd2?this['focusables']['getIndex'](_0x7cbfd2):this['focusables']['length'],-0x1!==_0x77da83){if(_0x77da83===_0xc44388-0x1)return;this['focusables']['remove'](_0x5c9349),_0xc44388=_0x7cbfd2?this['focusables']['getIndex'](_0x7cbfd2):this['focusables']['length'];}this['focusables']['add'](_0x5c9349,_0xc44388);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x25f4af('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x200c6d){super(_0x200c6d),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4e0869,_0x347d6f)=>_0x4e0869+_0x347d6f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x26b08d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x26b08d['to']('isAnimationDisabled',_0x550f5a=>_0x550f5a?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x26b08d['to']('top',_0x525ad0=>bi(_0x525ad0))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2df816=this['element']['clientHeight'];_0x2df816&&(this['height']=_0x2df816);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x5263a8{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x42026d){super(_0x42026d),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 _0x1b2993=this['context']['config']['get']('sidebar.container');_0x1b2993&&this['setContainer'](_0x1b2993);}['setContainer'](_0x494b5b){if(!Oi(_0x494b5b))throw new _0x44c5ce('sidebar-setcontainer-invalid-element');this['container']=_0x494b5b;}['_attachToContainer']({viewClass:_0x1078ec='',spaceBetweenItems:_0x14c9ef=0x19}={}){if(!Oi(this['container']))throw new _0x44c5ce('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1078ec,this['_spaceBetweenItems']=_0x14c9ef;}['rearrange']({removedAnnotation:_0x41d769,previousAnnotation:_0xadc714,nextAnnotation:_0xc712c7}){const _0x165111=this['getSidebarItemView'](_0x41d769);this['view']['list']['remove'](_0x165111),this['_destroySidebarItemView'](_0x41d769),_0xadc714&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xadc714)),_0xc712c7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xc712c7)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x302cc2,activatedAnnotation:_0x49708b,disableAnimationOnActivatedAnnotation:_0x1c6a17}){if(this['_activeAnnotation']=_0x49708b,_0x302cc2){_0x302cc2['isActive']=!0x1;const _0x5b6de3=this['getSidebarItemView'](_0x302cc2);_0x5b6de3&&_0x1c6a17&&(_0x5b6de3['isAnimationDisabled']=!0x1);}if(_0x49708b){const _0x514927=this['getSidebarItemView'](_0x49708b);_0x514927&&(_0x49708b['isActive']=!0x0,_0x1c6a17&&(_0x514927['isAnimationDisabled']=!0x0,_0x514927['top']+=0x1),this['_alignToTargetRect'](_0x514927));}}['_detachFromContainer'](_0x1765c8){if(this['view']['element']['remove'](),_0x1765c8){for(const _0x340cd0 of _0x1765c8)this['_destroySidebarItemView'](_0x340cd0);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5e3b19,_0x50d340){_0x50d340||(_0x50d340=_0x5e3b19['view']);const _0x26403d=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x26403d,_0x5e3b19),this['_annotationToSidebarItemView']['set'](_0x5e3b19,_0x26403d),_0x26403d['content']['add'](_0x50d340),this['listenTo'](_0x5e3b19['view'],'change:targetRect',(_0x4a70ce,_0x5a67e7,_0x22e6c4)=>{const _0xdaa460=this['_getTargetTop'](_0x5e3b19,_0x22e6c4);_0x26403d['_targetTop']!=_0xdaa460&&(_0x26403d['_targetTop']=_0xdaa460,this['_setItemTop'](_0x26403d,_0xdaa460));}),this['listenTo'](_0x26403d,'change:top',()=>{this['_recalculate'](_0x26403d,'top');}),this['listenTo'](_0x26403d,'change:bottom',()=>{this['_recalculate'](_0x26403d,'bottom');}),this['_alignToTargetRect'](_0x26403d);const _0x270d74=this['_getItemBefore'](_0x26403d);return _0x270d74&&this['_alignAfterItem'](_0x270d74,_0x26403d)||this['_alignToTargetRect'](_0x26403d),this['_updateLastItem'](),this['view']['list']['add'](_0x26403d),_0x26403d;}['_alignForTopChange'](_0x5244b7){if(!_0x5244b7['content']['length'])return;const _0x16fcb3=this['_getItemBefore'](_0x5244b7);if(!_0x16fcb3)return;const _0x13fae2=this['_sidebarItemViewToAnnotation']['get'](_0x16fcb3),_0x29d852=this['_activeAnnotation'];_0x29d852&&_0x29d852===_0x13fae2?this['_alignAfterItem'](_0x16fcb3,_0x5244b7):this['_alignBeforeItem'](_0x5244b7,_0x16fcb3);}['_alignForBottomChange'](_0x25dffa){if(!_0x25dffa['content']['length'])return;const _0x133bb2=this['_getItemAfter'](_0x25dffa);if(!_0x133bb2)return;const _0x518ae5=this['_sidebarItemViewToAnnotation']['get'](_0x133bb2),_0xc1edce=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x498ce9=this['_activeAnnotation'];_0x498ce9&&_0x498ce9===_0x518ae5&&_0xc1edce?(this['_alignBeforeItem'](_0x133bb2,_0x25dffa),this['_alignAfterItem'](_0x25dffa,_0x133bb2)):_0x498ce9&&_0x498ce9===_0x518ae5?this['_alignBeforeItem'](_0x133bb2,_0x25dffa):this['_alignAfterItem'](_0x25dffa,_0x133bb2);}['_recalculate'](_0x1ef835,_0x5499b4){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x56d469,changedProp:_0x3ab7d6}of this['_recalculateBuffer'])'top'===_0x3ab7d6?this['_alignForTopChange'](_0x56d469):this['_alignForBottomChange'](_0x56d469);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1ef835,'changedProp':_0x5499b4});}['getSidebarItemView'](_0x4479f8){return this['_annotationToSidebarItemView']['get'](_0x4479f8);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1621b0){const _0x18f6c5=this['getSidebarItemView'](_0x1621b0);this['stopListening'](_0x18f6c5),this['stopListening'](_0x1621b0['view']),_0x18f6c5['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1621b0),this['_sidebarItemViewToAnnotation']['delete'](_0x18f6c5);}['_createSidebarView'](){const _0x148c9e=new Ii(this['context']['locale']);return _0x148c9e['render'](),this['on']('change:_lastItem',(_0x5b1344,_0x1c27bb,_0x35e41b,_0x57210f)=>{_0x57210f&&_0x148c9e['unbind']('minHeight'),_0x35e41b?_0x148c9e['bind']('minHeight')['to'](_0x35e41b,'bottom'):_0x148c9e['minHeight']=null;}),_0x148c9e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x33a9d1){const _0x196086=this['_sidebarItemViewToAnnotation']['get'](_0x33a9d1),_0x2fd07c=_0x196086&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x196086)-0x1);return _0x2fd07c&&this['getSidebarItemView'](_0x2fd07c)||null;}['_getItemAfter'](_0x42a2f2){const _0x281bf5=this['_sidebarItemViewToAnnotation']['get'](_0x42a2f2),_0x36bb50=_0x281bf5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x281bf5)+0x1);return _0x36bb50&&this['getSidebarItemView'](_0x36bb50)||null;}['_alignBeforeItem'](_0x371e2e,_0x3aed98){_0x371e2e['updateHeight']();const _0x2941d7=Ni(_0x3aed98['bottom']+this['_spaceBetweenItems'],_0x371e2e['top']);return!!_0x2941d7&&(this['_setItemTop'](_0x3aed98,_0x3aed98['top']-_0x2941d7),!0x0);}['_alignAfterItem'](_0x336a17,_0x1b36b3){_0x336a17['updateHeight']();const _0x9c11f7=Ni(_0x336a17['bottom']+this['_spaceBetweenItems'],_0x1b36b3['top']);return!!_0x9c11f7&&(this['_setItemTop'](_0x1b36b3,_0x1b36b3['top']+_0x9c11f7,!0x1),!0x0);}['_alignToTargetRect'](_0x550ad5){const _0x1a5af6=this['_sidebarItemViewToAnnotation']['get'](_0x550ad5);if(!_0x1a5af6||!_0x1a5af6['target']||!_0x1a5af6['targetRect'])return;const _0xedc5cb=this['_getTargetTop'](_0x1a5af6,_0x1a5af6['targetRect']);this['_setItemTop'](_0x550ad5,_0xedc5cb);}['_getTargetTop'](_0x496a1e,_0x358388){if(null===_0x358388)return 0x0;if(_0x496a1e['target']instanceof _0x12d113)return _0x358388['top'];{const _0x456d88=new _0x12d113(this['view']['element'])['top'];return _0x358388['top']-_0x456d88;}}['_setItemTop'](_0x4e61a4,_0x2325c1,_0x93203e=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x93203e&&(_0x2325c1=Math['max'](_0x2325c1,this['_getMaxAvailableTop'](_0x4e61a4))),_0x4e61a4['top']=_0x2325c1;}['_getMaxAvailableTop'](_0x118d8a){let _0x311543=this['_getItemBefore'](_0x118d8a),_0x1503ad=0x0;for(;_0x311543;)_0x311543['updateHeight'](),_0x1503ad+=this['_spaceBetweenItems']+_0x311543['height'],_0x311543=this['_getItemBefore'](_0x311543);return _0x1503ad;}};function Ni(_0x27b428,_0x4b61f5){return Math['max'](_0x27b428-_0x4b61f5,0x0);}function Oi(_0x56e390){return null!==_0x56e390&&'object'==typeof _0x56e390&&0x1===_0x56e390['nodeType'];}var Mi=class extends _0x5263a8{['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(_0x372819){super(_0x372819),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x141c83(),this['_refreshPositioningDebounced']=_0x2c3156(()=>{_0x372819['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2156ad=this['context']['plugins']['get'](Ti),_0x4583fb=this['context']['plugins']['get'](ki);_0x2156ad['register']('wideSidebar',this),_0x4583fb['container']&&_0x2156ad['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x30cef1){if(_0x30cef1===this['activeAnnotation'])return;const _0x5b7c50=this['context']['plugins']['get'](ki);_0x5b7c50['_activeAnnotation']=_0x30cef1;const _0x31dae4=this['activeAnnotation'];_0x5b7c50['refresh']({'blurredAnnotation':_0x31dae4,'activatedAnnotation':_0x30cef1}),this['activeAnnotation']=_0x30cef1;}['attach'](_0x23e3e0){this['annotations']=_0x23e3e0;const _0x42e70d=this['context']['plugins']['get'](ki);if(_0x42e70d['_annotations']=_0x23e3e0,this['isAttached'])throw new _0x44c5ce('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x42e70d,'set:container',()=>{this['detach'](),this['listenTo'](_0x42e70d,'change:container',_0x192d16=>{_0x192d16['off'](),this['attach'](_0x23e3e0);});}),_0x42e70d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3eab3c=_0x3c826e=>{_0x3c826e['updateTargetRect'](),_0x42e70d['addAnnotation'](_0x3c826e);};for(const _0x5b73ec of _0x23e3e0)_0x3eab3c(_0x5b73ec);this['listenTo'](_0x23e3e0,'add',(_0x4dcece,_0x156508)=>{_0x3eab3c(_0x156508);}),this['listenTo'](_0x23e3e0,'remove',(_0x4a2354,_0x2528dc,_0x5e4eed)=>{_0x42e70d['rearrange']({'removedAnnotation':_0x2528dc,'previousAnnotation':_0x23e3e0['get'](_0x5e4eed-0x1),'nextAnnotation':_0x23e3e0['get'](_0x5e4eed+0x1)}),_0x2528dc===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x23e3e0,'focus',(_0x21a9f8,_0x7c07d1)=>{this['setActiveAnnotation'](_0x7c07d1);}),this['listenTo'](_0x23e3e0,'blur',()=>{this['setActiveAnnotation'](null);});const _0x381d35=this['context']instanceof _0x10af8d?this['context']['editors']:new _0x141c83([this['context']]);for(const _0x5a2a58 of _0x381d35)this['_integrateWithEditorAnnotations'](_0x5a2a58);this['listenTo'](_0x381d35,'add',(_0x4f3e70,_0x23bf17)=>{this['listenTo'](_0x23bf17,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x23bf17);});}),this['listenTo'](_0x381d35,'remove',(_0x407d41,_0x31118a)=>{_0x31118a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x31118a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x44c5ce('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x48478e=this['context']['plugins']['get'](ki);_0x48478e['_detachFromContainer'](this['annotations']),this['stopListening'](_0x48478e),this['stopListening'](this['annotations']),this['context']instanceof _0x10af8d&&this['stopListening'](this['context']['editors']);for(const _0x27badc of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x27badc);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x286de6){if(!_0x286de6['plugins']['has']('EditorAnnotations'))return;const _0x219e69=_0x286de6['plugins']['get']('EditorAnnotations'),_0x29d4bf=()=>{const _0x58f928=_0x219e69['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x58f928[0x0]||null);};this['listenTo'](_0x219e69,'refresh',_0x29d4bf),this['listenTo'](_0x219e69,'blur',(_0x42f403,{isAnnotationTracked:_0x136c0c})=>{this['activeAnnotation']&&_0x136c0c(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x219e69,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1ca256=>{_0x219e69['hasDomSelection']()&&(_0x29d4bf(),_0x1ca256['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x219e69);}['_destroyEditorAnnotationsIntegration'](_0x264ec8){this['stopListening'](_0x264ec8),this['_editorAnnotations']['remove'](_0x264ec8);}},Ri=class extends _0x27efd5{['counterView'];constructor(_0x38050d){super(_0x38050d);const _0x1689dd=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x305420,_0x4b3f93)=>_0x305420?'...':_0x4b3f93['toString']()),this['set']('annotationType',''),this['icon']=_0x57551d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1689dd['to']('annotationType',_0x27bdc7=>'ck-annotation-counter__badge--'+_0x27bdc7),_0x1689dd['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1689dd['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x5263a8{['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(_0xe280cb){super(_0xe280cb),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x5c783d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x141c83(),this['_refreshPositioningDebounced']=_0x2c3156(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x15f0a0(this['context']['locale']),this['balloonPanelView']=new _0x1a33d1(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2576dc){this['annotations']=_0x2576dc;const _0x344ed3=this['context']['plugins']['get'](ki),_0x3afb5b=this['balloonPanelView'];if(_0x344ed3['_annotations']=_0x2576dc,this['isAttached'])throw new _0x44c5ce('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x344ed3,'set:container',()=>{this['detach'](),this['listenTo'](_0x344ed3,'change:container',_0x43d0eb=>{_0x43d0eb['off'](),this['attach'](_0x2576dc);});}),_0x344ed3['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x14913c=_0x2e503e=>{const _0x3d0dd1=new Ri(this['context']['locale']);_0x344ed3['addAnnotation'](_0x2e503e,_0x3d0dd1),this['_annotationToNarrowView']['set'](_0x2e503e,_0x3d0dd1),_0x3d0dd1['bind']('isDirty','annotationType','number')['to'](_0x2e503e['view'],'isDirty','type','length'),_0x3d0dd1['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3afb5b['content']['first']!==_0x2e503e['view']?(this['_showBalloon'](_0x2e503e),_0x2e503e['view']['element']['focus'](),this['setActiveAnnotation'](_0x2e503e)):this['setActiveAnnotation'](null);});};for(const _0x54f677 of _0x2576dc)_0x14913c(_0x54f677);this['listenTo'](_0x2576dc,'add',(_0x4ecc50,_0x5c05e7)=>{_0x14913c(_0x5c05e7);}),this['listenTo'](_0x2576dc,'remove',(_0x2395f1,_0x2e276c,_0x541c13)=>{this['_annotationToNarrowView']['get'](_0x2e276c)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2e276c),_0x344ed3['rearrange']({'removedAnnotation':_0x2e276c,'previousAnnotation':_0x2576dc['get'](_0x541c13-0x1),'nextAnnotation':_0x2576dc['get'](_0x541c13+0x1)}),_0x2e276c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2576dc,'focus',(_0x40e7bd,_0x5cfa28)=>{this['setActiveAnnotation'](_0x5cfa28);}),this['listenTo'](_0x2576dc,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x30cb52,_0x19b704)=>{_0x19b704['keyCode']===_0x33b97d['esc']&&_0x3afb5b['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3afb5b['content']['first']),this['_hideBalloon'](),_0x19b704['stopPropagation'](),_0x19b704['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x530e4f,_0x3fe872)=>{const _0x17404b=_0x3fe872['target'];_0x3afb5b['isVisible']&&_0x3afb5b['element']['contains'](_0x17404b)||_0x344ed3['view']['element']['contains'](_0x17404b)||_0x530e4f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x28131c=>_0x28131c['contains'](_0x17404b))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x7a5737=this['context']instanceof _0x10af8d?this['context']['editors']:new _0x141c83([this['context']]);for(const _0x49d427 of _0x7a5737)this['_integrateWithEditorAnnotations'](_0x49d427);this['listenTo'](_0x7a5737,'add',(_0x5d6a6b,_0x152ad6)=>{this['listenTo'](_0x152ad6,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x152ad6);});}),this['listenTo'](_0x7a5737,'remove',(_0x5af260,_0x1546f3)=>{_0x1546f3['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1546f3['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3f33d7){if(_0x3f33d7===this['activeAnnotation'])return;const _0x38b820=this['context']['plugins']['get'](ki);_0x38b820['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3f33d7,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3f33d7&&_0x38b820['getSidebarItemView'](_0x3f33d7)?this['_showBalloon'](_0x3f33d7):this['_hideBalloon'](),this['activeAnnotation']=_0x3f33d7;}['detach'](){if(!this['isAttached'])throw new _0x44c5ce('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x480648=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x176a83=>_0x176a83['destroy']()),this['_annotationToNarrowView']['clear'](),_0x480648['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x10af8d&&this['stopListening'](this['context']['editors']);for(const _0x3d852d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3d852d);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'](_0x5e7d5f){if(!_0x5e7d5f['plugins']['has']('EditorAnnotations'))return;const _0x4d29a1=_0x5e7d5f['plugins']['get']('EditorAnnotations'),_0x3fa45e=this['context']['plugins']['get'](ki),_0x207259=this['annotations'],_0x356387=this['balloonPanelView'],_0x3bc76f=()=>{const _0x4a422f=_0x4d29a1['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4a422f),this['setActiveAnnotation'](_0x4a422f[0x0]||null);};this['listenTo'](_0x4d29a1,'refresh',_0x3bc76f),this['listenTo'](_0x4d29a1,'blur',(_0xb860f4,{isAnnotationTracked:_0x485097})=>{this['activeAnnotation']&&_0x485097(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4d29a1,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x207259,'blur',_0x39f043=>{_0x4d29a1['hasDomSelection']()&&_0x39f043['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3a4ec3,_0x3e28fc)=>{const _0x7dd5f7=_0x3e28fc['target'];_0x356387['isVisible']&&_0x356387['element']['contains'](_0x7dd5f7)||_0x3fa45e['view']['element']['contains'](_0x7dd5f7)||this['activeAnnotation']&&_0x4d29a1['hasDomSelection']()&&(_0x3bc76f(),_0x3a4ec3['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4d29a1);}['_destroyEditorAnnotationsIntegration'](_0x5c6fa6){_0x5c6fa6&&(this['stopListening'](_0x5c6fa6),this['_editorAnnotations']['remove'](_0x5c6fa6));}['_setSelectedAnnotations'](_0x40bfb2){for(const _0x25f3c6 of this['_selectedAnnotations'])_0x40bfb2['includes'](_0x25f3c6)||this['_manuallyClosedAnnotationViews']['delete'](_0x25f3c6['view']);this['_selectedAnnotations']=_0x40bfb2;}['_refreshPositioning'](){const _0x5801b4=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5801b4['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x31c037){if(this['_manuallyClosedAnnotationViews']['has'](_0x31c037['view']))return;const _0x2bf2de=this['balloonPanelView']['content']['first'];_0x2bf2de!==_0x31c037['view']?(_0x2bf2de&&this['_detachListeners'](_0x2bf2de),this['_attachListeners'](_0x31c037['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x31c037['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x486cf2=this['balloonPanelView']['content']['first'],_0x33e10d=_0x486cf2&&this['annotations']['getByView'](_0x486cf2);if(!_0x33e10d||!this['_annotationToNarrowView']['has'](_0x33e10d))return;const _0x3db93b=this['_annotationToNarrowView']['get'](_0x33e10d)['element'],_0xc06ac9=(function(){const _0x10f2e7=_0x1a33d1['defaultPositions'];return[_0x10f2e7['southArrowNorthEast'],_0x10f2e7['northArrowSouthEast'],_0x10f2e7['southArrowNorth'],_0x10f2e7['northArrowSouth'],_0x10f2e7['southArrowNorthWest'],_0x10f2e7['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3db93b,'positions':_0xc06ac9});}['_hideBalloon'](){const _0x4cbcac=this['balloonPanelView'],_0x9b5f20=_0x4cbcac['content']['first'];_0x9b5f20&&(this['_detachListeners'](_0x9b5f20),_0x4cbcac['unpin'](),_0x4cbcac['content']['clear']());}['_attachListeners'](_0x15cb59){this['listenTo'](_0x15cb59,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x15cb59,'Esc',(_0x4c60d8,_0xf33ce9)=>{this['_manuallyClosedAnnotationViews']['add'](_0x15cb59),this['_hideBalloon'](),_0xf33ce9();});}['_detachListeners'](_0x3392c2){this['stopListening'](_0x3392c2);}},xi=class extends _0x24174e{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x521131,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdfb92a){super(_0xdfb92a),_0xdfb92a['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xdfb92a['plugins']['get'](_0x521131),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x2c3156(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x4f6de9=this['editor']['plugins']['get'](Ti);_0x4f6de9['context']===this['editor']&&(_0x4f6de9['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x486886,_0x1f2583)=>{const _0x117285=this['_balloon'];if(this['isAttached']&&_0x117285['visibleView']){const _0x263f69=this['annotations']['getByView'](_0x117285['visibleView']);_0x263f69&&this['_closeAnnotation'](_0x263f69),_0x1f2583();}}));}['afterInit'](){const _0x576d60=this['editor']['plugins']['get'](Ti);_0x576d60['context']===this['editor']&&(_0x576d60['hasActive']()||_0x576d60['switchTo']('inline'));}['setActiveAnnotation'](_0x7487b0){_0x7487b0!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x7487b0&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x7487b0)&&this['_addAnnotationToBalloon'](_0x7487b0,!0x0),_0x7487b0['isActive']=!0x0),_0x7487b0||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x7487b0);}['attach'](_0x24a9b8){this['annotations']=_0x24a9b8;const _0x1c31f7=this['editor']['plugins']['get'](Ti),_0x3074a1=this['_balloon'];if(this['isAttached'])throw new _0x44c5ce('inlineannotations-attach-already-attached',this);if(_0x1c31f7['context']!==this['editor'])throw new _0x44c5ce('inlineannotations-not-allowed-with-context',this);const _0x2b914a=this['editor']['plugins']['get'](di);this['listenTo'](_0x2b914a,'refresh',()=>{const _0x44bce2=_0x2b914a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x522d8b,_0x31cb23;!this['_forceRefresh']&&(_0x522d8b=_0x44bce2,_0x31cb23=this['_selectedAnnotations'],_0x522d8b['length']===_0x31cb23['length']&&_0x522d8b['every'](_0x3cb7c1=>_0x31cb23['includes'](_0x3cb7c1)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x44bce2),this['setActiveAnnotation'](_0x44bce2[0x0]||null));}),this['listenTo'](_0x2b914a,'blur',(_0x35bc8a,{isAnnotationTracked:_0x211129})=>{this['activeAnnotation']&&_0x211129(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2b914a,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x398c63,_0xfe9e9b,_0x3a75d2)=>{_0x3a75d2||this['setActiveAnnotation'](null);}),this['listenTo'](_0x24a9b8,'remove',(_0x35df16,_0x28ca95)=>{this['_removeAnnotationFromBalloon'](_0x28ca95),_0x28ca95===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3074a1,'change:visibleView',(_0x53088f,_0x4ae9d2,_0x128af0,_0x244715)=>{_0x244715&&this['stopListening'](_0x244715);const _0x5165b9=_0x24a9b8['getByView'](_0x128af0);_0x128af0&&_0x5165b9&&(this['listenTo'](_0x128af0,'change:height',()=>{_0x3074a1['updatePosition']();}),this['listenTo'](_0x128af0,'Esc',()=>{this['_closeAnnotation'](_0x5165b9),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5165b9&&this['setActiveAnnotation'](_0x5165b9));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3074a1['visibleView']&&_0x24a9b8['getByView'](_0x3074a1['visibleView'])&&_0x3074a1['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 _0x44c5ce('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5d8b14 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5d8b14);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x41691d){for(const _0x55f388 of this['_selectedAnnotations'])_0x41691d['includes'](_0x55f388)||this['_manuallyClosed']['delete'](_0x55f388);for(const _0x5ef55c of this['annotations'])_0x41691d['includes'](_0x5ef55c)||this['_removeAnnotationFromBalloon'](_0x5ef55c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5a239d of _0x41691d)this['_addAnnotationToBalloon'](_0x5a239d);}this['_selectedAnnotations']=_0x41691d;}['_addAnnotationToBalloon'](_0x3668ad,_0x1a1234=!0x1){this['_manuallyClosed']['has'](_0x3668ad)||(this['_addedAnnotations']['has'](_0x3668ad)||this['_balloon']['hasView'](_0x3668ad['view'])||(this['_addedAnnotations']['add'](_0x3668ad),this['_balloon']['add']({'stackId':_0x3668ad['view']['id'],'view':_0x3668ad['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3668ad)}})),_0x1a1234&&this['_balloon']['showStack'](_0x3668ad['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2463a9){const _0x26897a=_0x2463a9['target'],_0x1fa523=this['editor']['editing']['view'],_0x4a658b=_0x1fa523['document']['selection']['getFirstRange'](),_0x4d2075=_0x1fa523['domConverter']['viewRangeToDom'](_0x4a658b);if(_0x4d2075['collapse'](!0x0),_0x26897a){if(_0x26897a instanceof _0x12d113)return _0x26897a;let _0x414aab=[];for(const _0x45c7b8 of _0x26897a)_0x414aab['push'](..._0x12d113['getDomElementRects'](_0x45c7b8));_0x414aab=function(_0xb6f2de){const _0x1289a3=[];let _0x34c6c7=_0xb6f2de[0x0];for(let _0x4ce149=0x1;_0x4ce149<_0xb6f2de['length'];_0x4ce149++)if(Pi(_0x34c6c7,_0xb6f2de[_0x4ce149])){const _0x59b79a=_0xb6f2de[_0x4ce149]['width'];_0x34c6c7['width']+=_0x59b79a,_0x34c6c7['right']+=_0x59b79a;}else _0x1289a3['push'](_0x34c6c7),_0x34c6c7=_0xb6f2de[_0x4ce149];return _0x1289a3['push'](_0x34c6c7),_0x1289a3;}(_0x414aab);const _0x525a21=_0x4d2075['getBoundingClientRect']();return _0x414aab['find'](_0x467213=>_0x467213['top']<=_0x525a21['top']&&_0x467213['bottom']>=_0x525a21['bottom']&&_0x467213['left']<=_0x525a21['left']&&_0x467213['right']>=_0x525a21['right'])||_0x414aab[0x0];}return _0x2463a9['targetRect']||_0x4d2075;}['_removeAnnotationFromBalloon'](_0x528729){this['_addedAnnotations']['has'](_0x528729)&&this['_balloon']['hasView'](_0x528729['view'])&&(this['_addedAnnotations']['delete'](_0x528729),this['_balloon']['remove'](_0x528729['view']));}['_closeAnnotation'](_0x530618){this['_manuallyClosed']['add'](_0x530618),this['_removeAnnotationFromBalloon'](_0x530618);}};function Pi(_0x28136c,_0x27e23e){return _0x28136c['top']===_0x27e23e['top']&&_0x28136c['bottom']===_0x27e23e['bottom']&&_0x28136c['right']===_0x27e23e['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5c92ba,_0x2659e1){super(_0x5c92ba),this['set']('isEmpty',!_0x2659e1['length']),this['focusTracker']=new _0x116564(),this['_annotationViews']=_0x2659e1,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x2659e1,'focusTracker':this['focusTracker']}),this['listenTo'](_0x2659e1,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x2659e1,'remove',(_0x3c2982,_0x1fe048)=>{_0x1fe048['isActive']&&this['focus'](),_0x2659e1['length']||(this['isEmpty']=!0x0);});const _0x1a58ad=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x5c92ba,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x2659e1},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1a58ad['if']('isEmpty','ck-hidden',_0x427c60=>!_0x427c60)]},'children':[{'text':Et(_0x5c92ba,'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 _0x5dee05 of this['_annotationViews'])this['focusTracker']['add'](_0x5dee05['element']);this['_annotationViews']['on']('change',(_0x3c65e2,{added:_0x8f3021,removed:_0x1e1945})=>{for(const _0x158a8c of _0x8f3021)this['focusTracker']['add'](_0x158a8c['element']);for(const _0x6646b of _0x1e1945)this['focusTracker']['remove'](_0x6646b['element']);});}},Di=class extends _0x5263a8{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x6bb01){super(_0x6bb01),this['archivedThreads']=new _0x141c83();}['init'](){const _0x2a07c5=this['context'],_0x2d3253=_0x2a07c5['plugins']['get'](oi),_0xd1db09=_0x2a07c5['plugins']['get'](ti);this['listenTo'](_0x2d3253,'addCommentThread',(_0x5652fc,{threadId:_0x22ea75})=>{const _0x1a1300=_0x2d3253['getCommentThread'](_0x22ea75);_0x1a1300['archivedAt']&&this['archivedThreads']['add'](_0x1a1300,this['_calculatePosition'](_0x1a1300['archivedAt'])),this['listenTo'](_0x1a1300,'change:archivedAt',(_0x59d5b1,_0xf81d62,_0x48b4b6)=>{_0x48b4b6?this['archivedThreads']['has'](_0x1a1300)||this['archivedThreads']['add'](_0x1a1300,this['_calculatePosition'](_0x1a1300['archivedAt'])):this['archivedThreads']['has'](_0x1a1300)&&this['archivedThreads']['remove'](_0x1a1300);});}),this['listenTo'](_0x2d3253,'removeCommentThread',(_0x14e380,{threadId:_0xb08d7b})=>{const _0xebb8e6=_0x2d3253['getCommentThread'](_0xb08d7b);this['stopListening'](_0xebb8e6),this['archivedThreads']['has'](_0xebb8e6)&&this['archivedThreads']['remove'](_0xebb8e6);},{'priority':'highest'}),this['listenTo'](_0xd1db09['collection'],'focus',(_0x4e1f03,_0x9605bd)=>{_0x9605bd['isVisible']||(_0x9605bd['isActive']=!0x0,_0xd1db09['activate'](_0x9605bd));});}['_calculatePosition'](_0x431dcb){const _0x5af974=[...this['archivedThreads']]['findIndex'](_0x421c3f=>_0x421c3f['archivedAt']<_0x431dcb);return _0x5af974>-0x1?_0x5af974:this['archivedThreads']['length'];}},Vi=class extends _0x24174e{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x1e5a1d];}constructor(_0x290d12){super(_0x290d12),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x42e56a=this['editor'],_0x38eca0=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x42e56a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x27efd5,!0x0)),_0x42e56a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x190ca7=this['_createCommentsArchiveButton'](rt);return _0x190ca7['set']({'role':'menuitemcheckbox'}),_0x190ca7;});const _0x3d981e=_0x42e56a['plugins']['get'](Di),_0x3f9df8=_0x42e56a['plugins']['get']('Annotations'),_0x466931=_0x42e56a['plugins']['get']('CommentsRepository');_0x3d981e['archivedThreads']['forEach'](_0x5a99bd=>{this['_handleNewThread'](_0x5a99bd);}),this['listenTo'](_0x3d981e['archivedThreads'],'add',(_0x274f06,_0x610d43)=>{this['_handleNewThread'](_0x610d43);}),this['listenTo'](_0x3f9df8['collection'],'add',(_0x2f02d2,_0x3b1a1b)=>{const _0x3c9451=this['_pendingThreads']['find'](_0x2d71b6=>{const _0x2f4ac1=_0x466931['_threadToController']['get'](_0x2d71b6);return _0x2f4ac1&&_0x3b1a1b['innerView']===_0x2f4ac1['view'];});if(_0x3c9451){const _0x3fe821=this['_calculatePosition'](_0x3c9451['archivedAt']);this['_addAnnotationToArchive'](_0x3b1a1b,_0x3fe821),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3c9451),0x1);}}),this['listenTo'](_0x3d981e['archivedThreads'],'remove',(_0x4d5130,_0x421ae9)=>{const _0x1890bd=_0x42e56a['config']['get']('collaboration.channelId');if(!_0x1890bd||_0x421ae9['channelId']===_0x1890bd){if(this['_pendingThreads']['includes'](_0x421ae9))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x421ae9),0x1);else{const _0x3b52af=_0x466931['_threadToController']['get'](_0x421ae9),_0x42f0ff=_0x3f9df8['getByInnerView'](_0x3b52af['view']);this['annotationViews']['remove'](_0x42f0ff['view']),this['stopListening'](_0x42f0ff),this['stopListening'](_0x42f0ff['focusableElements']);}}}),this['listenTo'](_0x3f9df8['collection'],'add',(_0x2a690f,_0x4517b4)=>{this['listenTo'](_0x4517b4,'escape',_0x38eca0);}),this['listenTo'](_0x3f9df8['collection'],'remove',(_0x592009,_0x18ef9c)=>{this['stopListening'](_0x18ef9c,'escape',_0x38eca0);});}['_addAnnotationToArchive'](_0x4ac49f,_0x217c87){this['listenTo'](_0x4ac49f,'set:isVisible',_0x31f68f=>{_0x31f68f['return']=!0x1,_0x31f68f['stop']();}),this['annotationViews']['add'](_0x4ac49f['view'],_0x217c87);}['_handleNewThread'](_0x424fc0){const _0x561b4c=this['editor']['plugins']['get']('CommentsRepository'),_0x45df70=this['editor']['plugins']['get']('Annotations'),_0x294a24=this['editor']['config']['get']('collaboration.channelId');if(!_0x294a24||_0x424fc0['channelId']===_0x294a24){const _0x323380=_0x561b4c['_threadToController']['get'](_0x424fc0);if(!_0x323380)return void this['_pendingThreads']['push'](_0x424fc0);const _0x5b97b1=this['_calculatePosition'](_0x424fc0['archivedAt']),_0x48bff4=_0x45df70['getByInnerView'](_0x323380['view']);_0x48bff4['isVisible']&&_0x45df70['_visibleAnnotations']['remove'](_0x48bff4),this['_addAnnotationToArchive'](_0x48bff4,_0x5b97b1);}}['_calculatePosition'](_0x213c63){const _0x2385e7=this['editor']['config']['get']('collaboration.channelId'),_0x4d6c7d=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x3f62ad=>_0x3f62ad['channelId']===_0x2385e7)['findIndex'](_0x4f0a43=>_0x4f0a43['archivedAt']<_0x213c63);return _0x4d6c7d<0x0||_0x4d6c7d>this['annotationViews']['length']?this['annotationViews']['length']:_0x4d6c7d-0x1;}['_toggleDialog'](){const _0x5b5a2c=this['editor'],_0x1c5216=_0x5b5a2c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x5b5a2c['locale'],this['annotationViews'])),'commentsArchive'===_0x1c5216['id']?_0x1c5216['hide']():_0x1c5216['show']({'id':'commentsArchive','title':Et(_0x5b5a2c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1e34b8,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x11ba3f['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4cdec5,_0x2d306f=!0x1){const _0x1bac21=this['editor']['locale'],_0x10ace7=this['editor']['plugins']['get']('Dialog'),_0x58c8fd=new _0x4cdec5(_0x1bac21);return _0x58c8fd['bind']('isEnabled')['to'](this,'isEnabled'),_0x58c8fd['bind']('isOn')['to'](_0x10ace7,'id',_0x1629ed=>'commentsArchive'===_0x1629ed),_0x58c8fd['set']({'label':Et(_0x1bac21,'COMMENTS_ARCHIVE'),'icon':_0x1e34b8,'isToggleable':!0x0}),_0x2d306f&&(_0x58c8fd['tooltip']=!0x0),this['listenTo'](_0x58c8fd,'execute',()=>this['_toggleDialog']()),_0x58c8fd;}['_hideDialogOnAnnotationEscape']=_0x334401=>{const _0x4cee99=_0x334401['source'];if(!this['annotationViews']['has'](_0x4cee99['view']))return;const _0x16c65f=this['editor']['plugins']['get']('Dialog');_0x16c65f['isOpen']&&'commentsArchive'===_0x16c65f['id']&&(_0x16c65f['hide'](),_0x334401['stop']());};},Bi=class extends _0x24174e{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 _0xe239e3,Context as _0x22859e,ContextPlugin as _0x1cd230,Editor as _0x374962,PendingActions as _0x15ea6a,Plugin as _0x5ae305}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x4272df,Collection as _0x353113,DomEmitterMixin as _0xa38af1,FocusTracker as _0x4a5771,KeystrokeHandler as _0x415d8c,ObservableMixin as _0x14b911,Rect as _0x5e0764,diff as _0x2853b9,first as _0x28c886,getEnvKeystrokeText as _0x523bde,keyCodes as _0x1f912e,priorities as _0x590ef9,scrollViewportToShowTarget as _0x113905,toUnit as _0x2afa96,uid as _0x1bbf8c}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x44d6d5,ConfirmMixin as _0x24be26,FOCUS_ANNOTATION_KEYSTROKE as _0x30fb95,LateFocusButtonView as _0xd2a28c,LateFocusDropdownButtonView as _0x864ed5,UserView as _0x18447c,Users as _0x530bbb,getAllMarkersDomElementsSorted as _0x505496,getDateTimeFormatter as _0x4b3f40,hashObject as _0x479ce7,setupThreadKeyboardNavigation as _0x34639f,surroundingMarkersDetector as _0x1db445,trimHtml as _0x5e58c5}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x3979fa,debounce as _0x8623cc,isEqual as _0x163c6f,set as _0x51d99d,throttle as _0x4e86f1,unset as _0x1c32aa}from'es-toolkit/compat';import{IconAddComment as _0x8b81f4,IconCheck as _0x401dc4,IconCommentsArchive as _0x4271cd,IconPencil as _0x3154cf,IconRemoveComment as _0x32d2eb,IconThreeVerticalDots as _0x1b812c,IconUndo as _0x5412c3}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x14119e,BodyCollection as _0x2e4ef4,ButtonView as _0x4d221b,ContextualBalloon as _0x34b916,Dialog as _0xc020e8,DialogViewPosition as _0x1c8870,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
+ _0x14b911();var bt=class extends It{['model'];['view'];constructor(_0x37accf,_0x5785a5){super(),this['model']=_0x37accf,this['model']['_isAttached']=!0x0,this['view']=_0x5785a5,this['listenTo'](_0x5785a5,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5785a5,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5785a5,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5785a5,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5785a5,'addComment',(_0xa7d5c0,_0x5429e5)=>this['addComment'](_0x5429e5)),this['listenTo'](_0x5785a5,'updateComment',(_0x3f6bb8,_0xa76466,_0xf6ff9f)=>this['updateComment'](_0xa76466,_0xf6ff9f)),this['listenTo'](_0x5785a5,'removeComment',(_0xe97b6d,_0x1a395c)=>this['removeComment'](_0x1a395c));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x108eec){this['model']['addComment']({'content':_0x108eec,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x45c033,_0x512203){this['model']['getComment'](_0x45c033)['update']({'content':_0x512203});}['removeComment'](_0x1f923f){this['model']['getComment'](_0x1f923f)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x1aa879,_0x47292b,_0x483270){const t=_0x1aa879['t'];switch(_0x47292b){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'},_0x483270);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'},_0x483270);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'},_0x483270);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'},_0x483270);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x483270);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'},_0x483270);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'},_0x483270);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'},_0x483270);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(_0x5047c7,_0x1bbf0f){super(_0x5047c7);const _0x199f1c=_0x1bbf8c();this['main']=this['createCollection'](),this['editable']=new st(_0x5047c7,_0x1bbf0f,void 0x0,{'label':()=>Et(_0x5047c7,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x5047c7['uiLanguageDirection'],'lang':_0x5047c7['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x199f1c},'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(_0x5b1342){super(_0x5b1342),this['view']=new kt(_0x5b1342['locale'],_0x5b1342['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x325dd6=this['editor']['editing']['view'],_0x58e722=this['view']['editable'];_0x58e722['name']=_0x325dd6['document']['getRoot']()['rootName'],this['view']['render']();const _0x411a1c=_0x58e722['element'];this['setEditableElement'](_0x58e722['name'],_0x411a1c),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x325dd6['attachDomRoot'](_0x411a1c),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x14b911(_0x374962);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x35a412={}){(_0x35a412=Object['assign']({},_0x35a412))['plugins']||(_0x35a412['plugins']=CommentEditor['defaultPlugins']),super(_0x35a412),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 _0x2822c9=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2822c9))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xf45328=>{const _0x1d616f=this['model']['document']['getRoot'](),_0x370bd5=_0x1d616f&&_0x1d616f['getChild'](_0x1d616f['childCount']-0x1);_0xf45328['setSelection'](_0x370bd5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x16fae0=this['editing']['view'],_0x28c371=_0x16fae0['document']['getRoot'](),_0x4a1095=_0x28c371['getChild'](0x0);_0x28c371['childCount']>0x1||!_0x4a1095||'p'!=_0x4a1095['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x16fae0,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4a1095['placeholder']=this['placeholder']),ut({'view':_0x16fae0,'element':_0x4a1095,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4a1095);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x29c905,_0x47278f={}){super(_0x29c905),this['editor']=null,this['_editorConfig']=_0x47278f,this['set']('value',_0x47278f['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x29c905,'Reply...')),this['set']('submitLabel',Et(_0x29c905,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x415d8c(),this['focusTracker']=new _0x4a5771(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x162850=>!_0x162850['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',(_0x1f5c07,_0x4f9c9f)=>{this['cancelButtonView']['fire']('execute'),_0x4f9c9f();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4f539f,_0xc12230)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xc12230());}),this['on']('submit',(_0x16a6e2,_0x2a04f7)=>{_0x2a04f7['length']>0xfde8?(alert(Et(_0x29c905,'TOO_LONG_COMMENT_ALERT',[_0x2a04f7['length'],0xfde8])),_0x16a6e2['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 _0x2afa85=this['editor'];this['element']['insertBefore'](_0x2afa85['ui']['element'],this['element']['firstChild']),_0x2afa85['model']['document']['on']('change',()=>this['value']=_0x2afa85['getData']()),_0x2afa85['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2afa85['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5440b7){-0x1===_0x5440b7?(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:_0x189e5d}=this,_0x7215f2=new _0x4d221b(_0x189e5d);return _0x7215f2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x7215f2['withText']=!0x0,_0x7215f2['bind']('label')['to'](this,'submitLabel'),_0x7215f2['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x7215f2['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x30e7cd,_0x1ab2c4)=>!_0x1ab2c4&&!!_0x30e7cd['trim']()),_0x7215f2;}['_createCancelButton'](){const {locale:_0x52f04a}=this,_0x12daad=new _0x4d221b(_0x52f04a);return _0x12daad['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x12daad['label']=Et(_0x52f04a,'Cancel'),_0x12daad['withText']=!0x0,_0x12daad['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x12daad;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x1d8284=>{this['focusTracker']['add'](_0x1d8284['element']);}),this['focusables']['on']('change',(_0x1478fd,_0x532419)=>{for(const _0x3cd01c of Array['from'](_0x532419['added'])['reverse']())this['focusTracker']['add'](_0x3cd01c['element']);});}},xt=class extends ht{constructor(_0x22597f,_0xf057ac,_0x2ec91f){super(_0x22597f),this['commentInputView']=new St(_0x22597f,_0x2ec91f),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x55fae8,_0x59c12e)=>_0x55fae8||!!_0x59c12e),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 _0x18447c(_0x22597f,_0xf057ac),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'](_0x559609){this['commentInputView']['focus'](_0x559609);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x496f3e,_0x2ebe3e)=>{const {submitButtonView:_0x225d1e,cancelButtonView:_0x571f02,editor:_0x208ae8}=this['commentInputView'];[_0x225d1e['element'],_0x571f02['element'],_0x208ae8?_0x208ae8['editing']['view']['getDomRoot']():null]['filter'](_0x4173a3=>_0x4173a3)['some'](_0x24813a=>_0x24813a['contains'](_0x2ebe3e['target']))||(this['focus'](),_0x2ebe3e['preventDefault']());});}},Pt=class extends ht{constructor(_0x9a915c){super(_0x9a915c);const _0x232373=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x232373['to']('count',_0x4eb342=>Et(_0x9a915c,'NUMBER_OF_COMMENTS',_0x4eb342))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xf7647e,_0x537bb4,_0x58ed75){super(_0xf7647e);const _0x2379ff=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x537bb4['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x537bb4,this['_config']=_0x58ed75,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4a5771(),this['keystrokes']=new _0x415d8c(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xb85a0a=>this['commentViews']['map'](_0x18535f=>_0x18535f['element'])['includes'](_0xb85a0a['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0xf7647e),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5706aa=>_0x5706aa-this['_config']['maxCommentsWhenCollapsed']);for(const _0x26b530 of _0x537bb4['comments'])this['_handleNewCommentModel'](_0x26b530);this['_handleInfoComment'](),this['listenTo'](_0x537bb4['comments'],'add',(_0x3afeea,_0x49f4c9)=>{const _0x432e08=this['_calculatePosition'](_0x49f4c9);this['length']++,this['_handleNewCommentModel'](_0x49f4c9,_0x432e08),this['refreshVisibleViews']();}),this['listenTo'](_0x537bb4['comments'],'remove',(_0x532850,_0x6be3e9)=>{this['length']--,this['_handleRemoveCommentModel'](_0x6be3e9),this['refreshVisibleViews']();}),this['listenTo'](_0x537bb4,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x537bb4,'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',_0x2379ff['if']('length','ck-hidden',_0x726b2=>!_0x726b2)],'aria-label':Et(_0xf7647e,'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'](_0x3957ec){-0x1===_0x3957ec?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5f2b8d of this['commentViews'])_0x5f2b8d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x56fe20,_0x44fefd){const _0x3d1abe=new this['_config']['CommentView'](this['locale'],_0x56fe20,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3d1abe['viewUid']=_0x56fe20['id'],_0x3d1abe['delegate']('removeComment')['to'](this),_0x3d1abe['delegate']('updateComment')['to'](this),_0x3d1abe['delegate']('resolveCommentThread')['to'](this),_0x3d1abe['delegate']('editorReady')['to'](this),_0x3d1abe['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3d1abe,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3d1abe,_0x44fefd);}['_calculatePosition'](_0x2b4866){const _0x4a8655=this['_model']['_findOptimalIndex'](_0x2b4866);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2b4866['authoredAt']?_0x4a8655-0x1:_0x4a8655:_0x4a8655-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xe0b2aa={'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'],_0xe0b2aa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xe0b2aa));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3ebc94){const _0x4d3fef=this['commentViews']['remove'](_0x3ebc94['id']);this['stopListening'](_0x4d3fef),_0x4d3fef['isEditMode']&&this['_updateHasDirtyComment'](),_0x4d3fef['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x323335=>_0x323335['isEditMode']);}['_rearrangeCollapse'](){const _0x56ac75=function(_0x2167e4){const _0x464d12=new _0x353113();for(const _0x99f268 of _0x2167e4)_0x464d12['add'](_0x99f268);return _0x464d12;}(this['commentViews']),_0x28558a=this['_collapsedCommentsView']['count'];for(let _0x1f7719=0x1;_0x1f7719<=_0x28558a;_0x1f7719++)_0x56ac75['remove'](0x1);for(const _0x54c8b7 of _0x56ac75)_0x54c8b7['collapse']();_0x28558a>0x0&&_0x56ac75['add'](this['_collapsedCommentsView'],0x1),Dt(_0x2853b9(Array['from'](this['visibleViews']),Array['from'](_0x56ac75)),this['visibleViews'],_0x56ac75);}['_rearrangeExpand'](){Dt(_0x2853b9(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x19f74d of this['visibleViews'])_0x19f74d['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x7fcf26=>{this['focusTracker']['add'](_0x7fcf26['element']),this['keystrokes']['listenTo'](_0x7fcf26['element']);}),this['commentViews']['on']('change',(_0xdae638,_0x37ae27)=>{for(const _0x45a0cf of _0x37ae27['removed'])this['focusTracker']['remove'](_0x45a0cf['element']),this['keystrokes']['stopListening'](_0x45a0cf['element']);for(const _0x2f72d7 of Array['from'](_0x37ae27['added'])['reverse']())this['focusTracker']['add'](_0x2f72d7['element']),this['keystrokes']['listenTo'](_0x2f72d7['element']);});}};function Dt(_0x1d86a0,_0x2c8084,_0x359f9b){let _0x481aa7=0x0;for(const _0x2118fd of _0x1d86a0)switch(_0x2118fd){case'insert':_0x2c8084['add'](_0x359f9b['get'](_0x481aa7),_0x481aa7),_0x481aa7++;break;case'delete':_0x2c8084['remove'](_0x481aa7);break;case'equal':_0x481aa7++;}}var Vt=class extends ht{constructor(_0x3af425){super(_0x3af425);const _0x1c02cf=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1c02cf['to']('contextValue',_0x2e3388=>Et(_0x3af425,'THREAD_CONTEXT_LABEL',_0x2e3388)),'tabindex':-0x1},'children':[{'text':_0x1c02cf['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x23779c,_0xc0d100){super(_0x23779c);const _0x5cea40=this['bindTemplate'];this['_model']=_0xc0d100,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4a5771(),this['keystrokes']=new _0x415d8c(),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',_0x9f4b47=>!!_0x9f4b47),this['bind']('contextValue')['to'](this['_model'],'context',_0x40e2af=>_0x40e2af&&_0x40e2af['value']?this['_trimContextValue'](_0x40e2af['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',_0x5cea40['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 _0x583459=new _0x4d221b(this['locale']);return _0x583459['label']=Et(this['locale'],'Reopen'),_0x583459['tooltip']=Et(this['locale'],'Reopen'),_0x583459['icon']=_0x5412c3,_0x583459['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4c88ce=>!_0x4c88ce),_0x583459['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2ce4b6,_0xc048d4)=>_0x2ce4b6&&_0xc048d4),_0x583459['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x583459;}['_trimContextValue'](_0x59db6c){if(_0x59db6c['length']<0x96)return _0x59db6c;const _0x4d671e=_0x59db6c['lastIndexOf']('\x20',0x93);return _0x59db6c['substring'](0x0,_0x4d671e>-0x1?_0x4d671e:0x93)+'...';}['_attachContextActions'](){const _0x169bc5=this['element']['querySelector']('.ck-context'),_0x9825c8=_0x169bc5['querySelector']('.ck-context__value');this['listenTo'](_0x169bc5,'mouseenter',()=>{_0x9825c8['offsetWidth']<_0x9825c8['scrollWidth']&&_0x169bc5['classList']['add']('overlay');}),this['listenTo'](_0x169bc5,'mouseleave',()=>{_0x169bc5['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x231093 of this['focusables'])this['focusTracker']['add'](_0x231093['element']),this['keystrokes']['listenTo'](_0x231093['element']);}['_createContextView'](){const _0x1dcbb1=new Vt(this['locale']);return _0x1dcbb1['bind']('contextValue')['to'](this),_0x1dcbb1;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x198580,_0x551eed,_0x251798,_0x207f38){super(_0x198580),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x551eed,this['_localUser']=_0x251798,this['_config']=_0x207f38,this['commentThreadHeaderView']=new Bt(_0x198580,_0x551eed),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x44d6d5(_0x198580,Et(_0x198580,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x198580,_0x551eed,Object['assign']({'CommentView':this['_config']['CommentView']},_0x207f38)),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',(_0x166bcd,_0x43f74d)=>_0x166bcd||!!_0x43f74d),this['bind']('isUnlinked')['to'](_0x551eed,'unlinkedAt',_0xf2a635=>!!_0xf2a635);let _0x2be358=null;const _0x500652=()=>{const _0x274a76=this['_model']['comments']['first']||null;_0x274a76!==_0x2be358&&(_0x2be358&&this['stopListening'](_0x2be358,'change:content'),_0x2be358=_0x274a76,_0x274a76&&this['listenTo'](_0x274a76,'change:content',_0x500652));const _0x295fb8=_0x274a76?_0x274a76['author']['name']:this['_localUser']['name'],_0x133c18=_0x274a76?new DOMParser()['parseFromString'](_0x5e58c5(_0x274a76['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x5171ca=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x295fb8]);this['set']('ariaLabel',_0x133c18?_0x5171ca+'\x20'+_0x133c18:_0x5171ca);};this['listenTo'](this['_model']['comments'],'change',_0x500652),_0x500652(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4a5771(),this['keystrokes']=new _0x415d8c(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x240a0c=>_0x240a0c['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x34639f(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x33409d=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x23292b=_0x33409d['commentInputView'];return _0x33409d['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x23292b,'value',(_0x2ad924,_0x112f53,_0x395575,_0x5cb56f,_0x5006b2)=>!!_0x5006b2||!!_0x5cb56f&&_0x395575&&!_0x112f53||_0x2ad924&&_0x395575&&!_0x112f53),_0x23292b['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2ab929,_0x502939,_0x5a67b8)=>{let _0x5dd5bc;return _0x5dd5bc=_0x5a67b8&&_0x502939?'Reply\x20to\x20reopen\x20discussion...':_0x2ab929?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x5dd5bc);}),_0x23292b['bind']('submitLabel')['to'](this,'length',_0x41d1cf=>Et(this['locale'],_0x41d1cf?'Reply':'Comment')),_0x23292b['on']('submit',(_0x3c1975,_0x588454)=>{this['fire']('addComment',_0x588454),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x23292b['on']('cancel',()=>{this['focus']();}),_0x23292b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x23292b['on']('cancel',_0x1d65c6=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1d65c6['stop']());}),this['on']('change:isActive',(_0x23e69e,_0x428132,_0x46b010)=>{_0x46b010||this['length']||_0x23292b['value']||this['fire']('removeCommentThread');}),_0x33409d;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x24be26(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x781ce1,_0x390b5d,_0x2a9f75,_0x3adc18){super(_0x781ce1,_0x390b5d,_0x2a9f75,_0x3adc18),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x781ce1,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x114e40,_0x15d36e,_0x21c15a)=>{_0x21c15a||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xa5ece3,_0xfd5ac3,_0x479dec)=>{_0x479dec&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x2edbee=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2edbee['if']('isActive','ck-thread--active'),_0x2edbee['if']('isUnlinked','ck-thread--unlinked'),_0x2edbee['to']('actionIndicator',_0x35d51d=>_0x35d51d?'ck-thread--'+_0x35d51d:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2edbee['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 _0x1b472f of this['commentsListView']['commentViews'])_0x1b472f['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x45419c}=this,_0x2e555c=this['commentsListView']['commentViews']['get'](0x0);_0x2e555c===this['_boundFirstCommentView']||_0x2e555c['isSystemComment']||(this['_boundFirstCommentView']=_0x2e555c,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2e555c,'actionIndicator',_0x445465=>'remove'===_0x445465?'remove':null),_0x2e555c['placeholder']=Et(_0x45419c,'Write\x20a\x20comment...'),_0x2e555c['removeButton']['on']('execute',_0x22c348=>{_0x22c348['stop'](),this['showConfirm'](Et(_0x45419c,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2e555c['focus']();}),_0x2e555c['actionBar']['add'](this['resolveButton'],0x0),_0x2e555c['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x3a8365=new _0xd2a28c(this['locale']);return _0x3a8365['label']=Et(this['locale'],'Resolve'),_0x3a8365['tooltip']=Et(this['locale'],'Resolve'),_0x3a8365['icon']=_0x401dc4,_0x3a8365['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3a8365['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3e0651=>!_0x3e0651),_0x3a8365['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4a33ab,_0x28a3a6)=>_0x4a33ab&&!_0x28a3a6),_0x3a8365['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3a8365;}['_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(_0x51c739){super(_0x51c739),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x46838c,_0xb4b86c,_0x4f9a48)=>{this['element']['innerHTML']=_0x4f9a48;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x4d00a8,_0x33d95d,_0x5f3e84){super(_0x4d00a8),this['_model']=_0x33d95d,this['_config']=_0x5f3e84,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x33d95d,'content',_0x33d95d,'authoredAt',(_0x54bc88,_0x2c0952)=>Et(_0x4d00a8,'COMMENT_ARIA_LABEL',[_0x33d95d['author']['name'],_0x5f3e84['formatDateTime'](_0x2c0952),new DOMParser()['parseFromString'](_0x54bc88,'text/html')['body']['textContent'],_0x33d95d['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x44d6d5(_0x4d00a8,Et(_0x4d00a8,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x4a5771(),this['keystrokes']=new _0x415d8c(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x495dc8=>_0x495dc8['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 _0x1c85dc=new Wt(this['locale']);return _0x1c85dc['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x3a0e22,_0x16ddef)=>_0x16ddef?_0x5e58c5(_0x3a0e22,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x3a0e22),_0x1c85dc;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x3d0448=new St(this['locale'],this['_config']['editorConfig']);return _0x3d0448['value']=this['_model']['content'],_0x3d0448['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3d0448['submitLabel']=Et(this['locale'],'Save'),_0x3d0448['on']('submit',(_0x274711,_0x50b41c)=>{this['fire']('updateComment',this['_model']['id'],_0x50b41c),this['switchToDisplayMode'](),this['focus']();}),_0x3d0448['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x3d0448['once']('editorReady',()=>{_0x3d0448['focus']();}),_0x3d0448['createEditor'](),_0x3d0448['delegate']('editorReady')['to'](this),_0x3d0448['delegate']('editorDestroyed')['to'](this),_0x3d0448;}['_setupKeyboardNavigation'](){const _0x301688=this['element'];this['keystrokes']['listenTo'](_0x301688);for(const _0x5de921 of this['focusables'])this['focusTracker']['add'](_0x5de921['element']),this['keystrokes']['listenTo'](_0x5de921['element']);this['focusables']['on']('change',(_0x528f82,_0x5017f3)=>{for(const _0x296453 of _0x5017f3['removed'])this['focusTracker']['remove'](_0x296453['element']),this['keystrokes']['stopListening'](_0x296453['element']);for(const _0x2278ed of _0x5017f3['added'])this['focusTracker']['add'](_0x2278ed['element']),this['keystrokes']['listenTo'](_0x2278ed['element']);}),this['keystrokes']['set']('enter',(_0xa1433e,_0x20344d)=>{_0x301688===_0xa1433e['target']&&(this['focusCycler']['focusFirst'](),_0x20344d());}),this['keystrokes']['set']('esc',(_0x3aa050,_0x4d54f2)=>{_0x301688!==_0x3aa050['target']&&(this['focus'](),_0x4d54f2());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x24be26(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0xedcc0,_0xaaad58,_0x470f3a){super(_0xedcc0,_0xaaad58,_0x470f3a),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0xedcc0,'Reply...')),this['bind']('authoredAt')['to'](_0xaaad58),this['bind']('resolvedAt')['to'](_0xaaad58),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 _0x18447c(_0xedcc0,_0xaaad58['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xaaad58,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x5c9d4c=this['bindTemplate'],_0x3d9856=[{'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':_0x5c9d4c['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x5c9d4c['to']('authoredAt',_0x16059c=>this['_config']['formatDateTime'](_0x16059c))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x5c9d4c['if']('isEditMode','ck-comment__actions--hidden'),_0x5c9d4c['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']&&_0x3d9856['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x5c9d4c['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x5c9d4c['if']('isEditMode','ck-comment--edit'),_0x5c9d4c['if']('isSystemComment','ck-comment--info'),_0x5c9d4c['to']('actionIndicator',_0x1b216d=>_0x1b216d?'ck-comment--'+_0x1b216d:'')],'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':_0x3d9856}]}]};}['_createEditButton'](){const _0x56772a=new _0x4d221b(this['locale']);return _0x56772a['label']=Et(this['locale'],'Edit'),_0x56772a['icon']=_0x3154cf,_0x56772a['withText']=!0x0,_0x56772a['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x56772a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x44c0fa=>!_0x44c0fa),_0x56772a['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x56772a['on']('execute',()=>this['switchToEditMode']()),_0x56772a;}['_createRemoveButton'](){const _0x36d102=new _0x4d221b(this['locale']);return _0x36d102['label']=Et(this['locale'],'Remove'),_0x36d102['icon']=_0x32d2eb,_0x36d102['withText']=!0x0,_0x36d102['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x36d102['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x15115f=>!_0x15115f),_0x36d102['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x36d102['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x36d102;}['_createDropdown'](){const _0x247da0=ct(this['locale'],_0x864ed5),_0x57f484=_0x247da0['panelView']['children'],_0x576c7d=new ot(this['locale']),_0x3e4237=_0x247da0['bindTemplate'];dt(_0x247da0,()=>this['items']['find'](_0x43bc00=>_0x43bc00['isVisible'])),_0x247da0['extendTemplate']({'attributes':{'class':[_0x3e4237['if']('isVisible','ck-hidden',_0x184fc1=>!_0x184fc1)]}});const _0x19aa21=(_0x43360b,_0x3963ab=-0x1)=>{const _0x9f2b53=new nt(this['locale']);_0x9f2b53['children']['add'](_0x43360b);const _0x1d9af7=_0x3963ab>-0x1?_0x3963ab:_0x576c7d['items']['length'];_0x576c7d['items']['add'](_0x9f2b53,_0x1d9af7);const _0x5dc281=Array['from'](this['items']);_0x247da0['unbind']('isEnabled','isVisible'),_0x247da0['bind']('isEnabled')['toMany'](_0x5dc281,'isEnabled',(..._0x37af29)=>_0x37af29['some'](_0x34d20c=>_0x34d20c)),_0x247da0['bind']('isVisible')['toMany'](_0x5dc281,'isVisible',(..._0x2d2ac2)=>_0x2d2ac2['some'](_0xcfa323=>_0xcfa323));};_0x247da0['panelPosition']='sw',_0x247da0['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x1b812c});for(const _0x5b37d0 of this['items'])_0x19aa21(_0x5b37d0);return _0x57f484['add'](_0x576c7d),_0x247da0['listenTo'](this['items'],'add',(_0x59ffda,_0x34d0c1,_0x1bd53c)=>{_0x19aa21(_0x34d0c1,_0x1bd53c);}),_0x247da0['listenTo'](this['items'],'remove',(_0x22fcc2,_0x3704d3,_0x5b1ad5)=>{_0x576c7d['items']['remove'](_0x5b1ad5);}),_0x247da0;}['_attachActions'](_0xa87090,_0x518aec){const _0x26ef27=_0xa87090&&_0xa87090['element'];_0x26ef27&&(this['listenTo'](_0x26ef27,'mouseenter',()=>this['actionIndicator']=_0x518aec),this['listenTo'](_0x26ef27,'focus',()=>this['actionIndicator']=_0x518aec),this['listenTo'](_0x26ef27,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x26ef27,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3c0565=super['_createCommentInputView']();return _0x3c0565['bind']('placeholder')['to'](this),_0x3c0565;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x18298b){const _0x1d875b=_0x4e86f1(_0x18298b,0x1e),_0x112668=new MutationObserver(_0x14bccc=>{for(const _0x6a1881 of _0x14bccc)('attributes'==_0x6a1881['type']&&'class'==_0x6a1881['attributeName']||'childList'==_0x6a1881['type']||'characterData'==_0x6a1881['type'])&&_0x1d875b();});return{'attach'(_0x58403e){_0x112668['observe'](_0x58403e,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x112668['disconnect'](),_0x1d875b['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x3389f3,_0x3ee181){super(_0x3389f3),this['id']=_0x1bbf8c(),this['focusTracker']=new _0x4a5771(),this['keystrokes']=new _0x415d8c(),this['keystrokes']['set']('Esc',(_0xab073d,_0x5c1fd6)=>this['fire']('Esc',_0x5c1fd6)),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'](_0x3ee181),this['mainView']=_0x3ee181;const _0x367336=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x367336['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 _0x313094=this['element']['clientHeight'];_0x313094&&(this['height']=_0x313094);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x14b911();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x48e73b,target:_0x50b6b2,type:_0x13929f,isVisible:_0x404f6a=!0x0}){super(),this['view']=_0x48e73b,this['view']['element']||this['view']['render'](),this['_type']=_0x13929f,this['_target']=_0x50b6b2,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x353113([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5a4d83,_0x4a88d9)=>{this['view']['focusTracker']['add'](_0x4a88d9);}),this['focusableElements']['on']('remove',(_0xc7e694,_0x23dfa)=>{this['view']['focusTracker']['remove'](_0x23dfa);}),this['set']('isVisible',_0x404f6a);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x37bfd6=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x37bfd6),_0x37bfd6;}get['targetRect'](){const _0x5de235=this['target'];if(null===_0x5de235)return null;if(_0x5de235 instanceof _0x5e0764)return _0x5de235;const _0x52558f=_0x5de235['filter'](_0x546966=>function(_0x479598){return!!_0x479598['offsetParent']||!!_0x479598['getClientRects']()['item'](0x0);}(_0x546966));return 0x0===_0x52558f['length']?null:_0x5e0764['getDomElementRects'](_0x52558f[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4c0e47){this['view']['isActive']=_0x4c0e47,this['view']['mainView']['isActive']=_0x4c0e47;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x5e1d91){if(!(null===_0x5e1d91||_0x5e1d91 instanceof _0x5e0764||Array['isArray'](_0x5e1d91)&&_0x5e1d91['every'](_0x342b77=>zt(_0x342b77))))throw new _0x4272df('annotation-invalid-target',null,{'target':_0x5e1d91});}['_getNormalizedTarget'](){const _0x430927='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x430927)?[_0x430927]:_0x430927;}};function zt(_0x4560d2){return null!==_0x4560d2&&'object'==typeof _0x4560d2&&'nodeType'in _0x4560d2&&0x1===_0x4560d2['nodeType'];}var Jt=class extends _0x353113{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1bf19e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4a5771(),this['_focusTracker']['on']('change:isFocused',(_0x428f61,_0xf2a3ae,_0x156403)=>{_0x156403||this['fire']('blur');});for(const _0x566e92 of _0x1bf19e)this['add'](_0x566e92);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2e8d12){if(this['has'](_0x2e8d12))throw new _0x4272df('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2e8d12['innerView'],_0x2e8d12),this['_viewToAnnotation']['set'](_0x2e8d12['view'],_0x2e8d12);for(const _0x108064 of _0x2e8d12['focusableElements'])this['_focusTracker']['add'](_0x108064);if(this['listenTo'](_0x2e8d12['focusableElements'],'add',(_0x21e0ac,_0x560f9f)=>{this['_focusTracker']['add'](_0x560f9f);}),this['listenTo'](_0x2e8d12['focusableElements'],'remove',(_0x90cc25,_0x393330)=>{this['_focusTracker']['remove'](_0x393330);}),this['listenTo'](_0x2e8d12['view']['focusTracker'],'change:isFocused',(_0x59beca,_0x3fcae2,_0x5dd1c4)=>{_0x5dd1c4&&this['fire']('focus',_0x2e8d12);}),_0x2e8d12['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x4bfd39 of this)_0x4bfd39['updateTargetRect']();}const _0x59d58c=this['_getOrderInContent'](_0x2e8d12['view']['targetRect']);return super['add'](_0x2e8d12,_0x59d58c);}['remove'](_0xa288dd){if(!this['has'](_0xa288dd))throw new _0x4272df('annotationcollection-not-existing-item',null);this['stopListening'](_0xa288dd['view']['focusTracker']),this['stopListening'](_0xa288dd['focusableElements']);for(const _0xe66a78 of _0xa288dd['focusableElements'])this['_focusTracker']['remove'](_0xe66a78);return this['_viewToAnnotation']['delete'](_0xa288dd['view']),this['_innerViewToAnnotation']['delete'](_0xa288dd['innerView']),super['remove'](_0xa288dd);}['getByInnerView'](_0x3c97d0){return this['_innerViewToAnnotation']['get'](_0x3c97d0);}['getByView'](_0x4d5262){return this['_viewToAnnotation']['get'](_0x4d5262);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x37db0c of this)_0x37db0c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x386584=Array['from'](this)['sort']((_0x5590ad,_0x3549e7)=>Zt(_0x5590ad['view']['targetRect'],_0x3549e7['view']['targetRect']));for(let _0x20c257=_0x386584['length']-0x1;_0x20c257>0x0;_0x20c257--){const _0x1b7c8f=_0x386584[_0x20c257];_0x20c257!==this['getIndex'](_0x1b7c8f)&&(this['remove'](_0x1b7c8f),this['add'](_0x1b7c8f));}}['_getOrderInContent'](_0x5b12e0){let _0x49236d=0x0;if(!_0x5b12e0)return this['length'];for(const _0x898f3f of this){const _0x2f4c19=_0x898f3f['view']['targetRect'];if(_0x2f4c19){if(Zt(_0x5b12e0,_0x2f4c19)<0x0)return _0x49236d;_0x49236d++;}}return _0x49236d;}['_areCachedRectsStale'](){const _0x4b7589=this['get'](0x0);if(!_0x4b7589)return!0x1;const _0x45219b=_0x4b7589['view']['targetRect'],_0x1815aa=_0x4b7589['targetRect'];return!(!_0x45219b||!_0x1815aa)&&(_0x45219b['top']!==_0x1815aa['top']||_0x45219b['left']!==_0x1815aa['left']);}};function Qt({source:_0x3443f9,target:_0xa4e5ec,filter:_0x29ff3e}){for(const _0x2769d1 of _0x3443f9)_0x29ff3e(_0x2769d1)&&_0xa4e5ec['add'](_0x2769d1);_0xa4e5ec['listenTo'](_0x3443f9,'add',(_0x22d3f0,_0x5723f2)=>{_0x29ff3e(_0x5723f2)&&_0xa4e5ec['add'](_0x5723f2);}),_0xa4e5ec['listenTo'](_0x3443f9,'remove',(_0x1dcef9,_0x2879bc)=>{_0xa4e5ec['has'](_0x2879bc)&&_0xa4e5ec['remove'](_0x2879bc);});}function Zt(_0x398b66,_0x231273){if(null===_0x398b66&&null===_0x231273)return 0x0;if(null===_0x398b66)return-0x1;if(null===_0x231273)return 0x1;const _0x3193e9=_0x398b66['top']-_0x231273['top'];return 0x0==_0x3193e9?_0x398b66['left']-_0x231273['left']:_0x3193e9;}var ti=class extends _0x1cd230{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e686d){if(super(_0x3e686d),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3e686d instanceof _0x374962){const _0x246655=_0x3e686d['locale'];_0x3e686d['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x246655,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x246655,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x246655,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x246655,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x246655,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x246655,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x246655,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4caff6){this['collection']['add'](_0x4caff6);}['remove'](_0x1fa852){this['collection']['remove'](_0x1fa852),_0x1fa852['destroy']();}['refreshVisibility'](){for(const _0x584911 of this['collection'])_0x584911['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xccf068){return this['collection']['getByInnerView'](_0xccf068);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xd0b928 of this['collection'])_0xd0b928['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x10501e){this['fire']('_activateAnnotation',_0x10501e);}['createAnnotation'](_0x2f4f06){return new $t(_0x2f4f06);}['createAnnotationView'](_0x131076,_0x3e3d0a){return new qt(_0x131076,_0x3e3d0a);}['_addActiveAnnotation'](_0x46f1f9){const _0x2613fd=new Set(this['activeAnnotations']);_0x2613fd['add'](_0x46f1f9),this['activeAnnotations']=_0x2613fd;}['_removeActiveAnnotation'](_0xac225f){const _0x455195=new Set(this['activeAnnotations']);_0x455195['delete'](_0xac225f),this['activeAnnotations']=_0x455195;}['_bindAnnotationsToVisibleAnnotations'](){const _0x568c3a=this['collection'],_0x5227e0=this['_visibleAnnotations'];function _0x254cd7(_0x4c419e){const _0x5cd100=_0x4c419e['source'];_0x5cd100['isVisible']&&!_0x5227e0['has'](_0x5cd100)?_0x5227e0['add'](_0x5cd100):!_0x5cd100['isVisible']&&_0x5227e0['has'](_0x5cd100)&&_0x5227e0['remove'](_0x5cd100),_0x5cd100['view']['focusTracker']['remove'](_0x5cd100['view']['element']),_0x5cd100['view']['focusTracker']['add'](_0x5cd100['view']['element']);}this['listenTo'](_0x568c3a,'add',(_0x395250,_0x53565f)=>{_0x53565f['isVisible']&&_0x5227e0['add'](_0x53565f),this['listenTo'](_0x53565f,'change:isVisible',_0x254cd7);}),this['listenTo'](_0x568c3a,'remove',(_0x125811,_0x5216fd)=>{_0x5227e0['has'](_0x5216fd)&&_0x5227e0['remove'](_0x5216fd),this['stopListening'](_0x5216fd,'change:isVisible',_0x254cd7);});}['_setupEnterAnnotationKeystroke'](){const _0x4680d4=_0x462ba8=>{_0x462ba8['on']('ready',()=>{_0x462ba8['keystrokes']['set'](_0x30fb95,(_0xbe767b,_0x58c3ad)=>{const _0x547959=_0x28c886(this['activeAnnotations']['values']());_0x547959&&(_0x547959['view']['focus'](),_0x58c3ad());});});};this['context']instanceof _0x374962?_0x4680d4(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x560423,_0x543139)=>{_0x4680d4(_0x543139);});}['_setupEscapeAnnotationHandling'](){const _0x2031ec=_0x2ad746=>{const _0x5d41fe=_0x2ad746['source'],_0x5dda61=[];let _0x57dabd;if(Array['isArray'](_0x5d41fe['target'])){_0x57dabd=_0x5d41fe['target'][0x0],this['context']instanceof _0x374962?_0x5dda61['push'](this['context']):this['context']['editors']&&_0x5dda61['push'](...this['context']['editors']);for(const _0x58089d of _0x5dda61)for(const _0x5b1bb8 of _0x58089d['editing']['view']['domRoots']['values']())if(_0x5b1bb8['contains'](_0x57dabd))return void _0x58089d['editing']['view']['focus']();_0x57dabd['focus']();}};this['listenTo'](this['collection'],'add',(_0x2872e1,_0x20be66)=>{this['listenTo'](_0x20be66,'escape',_0x2031ec,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x31da94,_0x19b860)=>{this['stopListening'](_0x19b860,'escape',_0x2031ec);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x14b911(),ni=/* #__PURE__ -- @preserve */
31
+ _0x14b911();var oi=class extends _0x1cd230{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x15ea6a,_0x530bbb];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x16ec02){super(_0x16ec02),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2d717f=this['context']['config'];_0x2d717f['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2d717f['define']('comments.maxThreadTotalWeight',0x1f4),_0x2d717f['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2d717f['define']('comments.CommentThreadView',Ut),_0x2d717f['define']('comments.CommentView',Yt),_0x2d717f['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xf878fc=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4a2488,_0x3cdd93)=>this['_addCommentThread'](_0x3cdd93)),this['on']('submitCommentThread',(_0x50e7d7,_0x5e6741)=>this['_submitCommentThread'](_0x5e6741)),this['on']('resolveCommentThread',(_0x2a3f6f,_0x551725)=>this['_resolveCommentThread'](_0x551725)),this['on']('resolveCommentThread',(_0x261c72,_0x46fff8)=>this['_updateActiveAnnotation'](_0x46fff8),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5d244a,_0x30b5fe)=>this['_reopenCommentThread'](_0x30b5fe)),this['on']('reopenCommentThread',(_0x1124db,_0x3ad544)=>this['_updateActiveAnnotation'](_0x3ad544),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x24a82b,_0x2db6ed)=>this['_removeCommentThread'](_0x2db6ed)),this['on']('updateCommentThread',(_0x306ff0,_0x3511bc)=>this['_updateCommentThread'](_0x3511bc)),this['on']('updateCommentThread',(_0x333298,_0x1e8778)=>this['_updateActiveAnnotation'](_0x1e8778),{'priority':'lowest'}),this['on']('addComment',(_0x3129d9,_0x3863fb)=>this['_addComment'](_0x3863fb)),this['on']('updateComment',(_0x27bd12,_0x5e1d62)=>this['_updateComment'](_0x5e1d62)),this['on']('removeComment',(_0x148470,_0x2cd3a5)=>this['_removeComment'](_0x2cd3a5)),this['on']('addComment',(_0x25f2f8,{threadId:_0x22a352,isFromAdapter:_0x1723d6})=>{if(_0x1723d6)return;const _0x3867dc=this['getCommentThread'](_0x22a352),_0x385ed9=_0x3867dc&&this['_threadToController']['get'](_0x3867dc);_0x385ed9&&_0x385ed9['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xf878fc,'change:activeAnnotations',(_0xf9f133,_0x9adf85,_0x2b7063)=>{const _0x230305=Array['from'](_0x2b7063)['map'](_0x11a0aa=>this['_viewToController']['get'](_0x11a0aa['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x230305?_0x230305['model']:null;});}set['adapter'](_0x2daff0){if(this['_adapter'])throw new _0x4272df('commentsrepository-adapter-already-set');this['_adapter']=_0x2daff0;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5d718e=ii,threadId:_0x2c4872=_0x1bbf8c(),comments:_0x5f1a9b=[],unlinkedAt:_0x886791=null,resolvedAt:_0x145202=null,resolvedBy:_0x5a0d09=null,target:_0x5ccaba=null,context:_0x2e59c5=null,attributes:_0x3f7866={},isResolvable:_0x55322c=!0x0,isSubmitted:_0x586c80=!0x1,isFromAdapter:_0x1de93e=!0x1}={}){return this['fire'](ai('addCommentThread',_0x5d718e),{'channelId':_0x5d718e,'threadId':_0x2c4872,'comments':_0x5f1a9b,'unlinkedAt':_0x886791,'resolvedAt':_0x145202,'resolvedBy':_0x5a0d09,'target':_0x5ccaba,'context':_0x2e59c5,'attributes':_0x3f7866,'isFromAdapter':_0x1de93e,'isResolvable':_0x55322c,'isSubmitted':_0x586c80}),this['getCommentThread'](_0x2c4872);}['openNewCommentThread']({channelId:_0x1db46d=ii,threadId:_0x1ed077=_0x1bbf8c(),target:_0x5a5c20,context:_0x2090f9=null,isResolvable:_0x2580f7=!0x0}){if(this['_readOnlyChannels']['has'](_0x1db46d)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5a5c20)throw new _0x4272df('commentsrepository-missing-target');const _0x63369d=this['addCommentThread']({'channelId':_0x1db46d,'threadId':_0x1ed077,'target':_0x5a5c20,'context':_0x2090f9,'isResolvable':_0x2580f7});if(!_0x63369d)return null;const _0x29775e=this['_threadToController']['get'](_0x63369d),_0x1b9e77=_0x29775e['view']['commentThreadInputView']['commentInputView'],_0x3651e1=this['context']['plugins']['get'](ti),_0x120a7d=_0x3651e1['getByInnerView'](_0x29775e['view']);return _0x3651e1['activate'](_0x120a7d),_0x1b9e77['once']('editorReady',()=>_0x1b9e77['focus']()),_0x63369d;}['hasCommentThread'](_0x443607){if('string'!=typeof _0x443607)throw new _0x4272df('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x443607);}['updateCommentThread']({channelId:_0x328544=ii,threadId:_0xe73c72,context:_0x4a64fb,unlinkedAt:_0x304c7e,attributes:_0x3738c5,isFromAdapter:_0xa196ba=!0x1}){return this['fire'](ai('updateCommentThread',_0x328544),{'channelId':_0x328544,'threadId':_0xe73c72,'context':_0x4a64fb,'unlinkedAt':_0x304c7e,'attributes':_0x3738c5,'isFromAdapter':_0xa196ba}),this['getCommentThread'](_0xe73c72);}['getCommentThread'](_0x226da1){if('string'!=typeof _0x226da1)throw new _0x4272df('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x226da1);}['fetchCommentThread']({channelId:_0x3a2e3f,threadId:_0x4cd4ab}={}){const _0x2959cc=this['getCommentThread'](_0x4cd4ab);if(_0x2959cc)return Promise['resolve'](_0x2959cc);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4272df('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3a2e3f,'threadId':_0x4cd4ab})['then'](_0xb61d50=>this['hasCommentThread'](_0x4cd4ab)?this['getCommentThread'](_0x4cd4ab):_0xb61d50?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3a2e3f},_0xb61d50)):void 0x0)['catch'](_0x4aa05e=>{throw console['error'](_0x4aa05e),new _0x4272df('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x51e8c0,skipNotAttached:_0x3a658b=!0x1,skipEmpty:_0x527efa=!0x1,toJSON:_0x40c9aa=!0x1}={}){const _0x5d3aae=[];for(const _0x474a98 of this['_threads']['values']())_0x51e8c0&&_0x474a98['channelId']!==_0x51e8c0||_0x3a658b&&!_0x474a98['isAttached']||_0x527efa&&0x0===_0x474a98['length']||_0x5d3aae['push'](_0x474a98);return _0x40c9aa?_0x5d3aae['map'](_0x5d7e69=>_0x5d7e69['toJSON']()):_0x5d3aae;}['getAnnotationForCommentThread'](_0x282141){const _0x497eeb=this['_threadToController']['get'](_0x282141);return _0x497eeb&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x497eeb['view'])||null;}['getCommentThreadForAnnotation'](_0x469e97){const _0x495a92=this['_viewToController']['get'](_0x469e97['innerView']);return _0x495a92?_0x495a92['model']:null;}['setActiveCommentThread'](_0x1adef6){const _0x5802e7=this['context']['plugins']['get'](ti);if(!_0x1adef6)return void(this['activeCommentThread']&&_0x5802e7['deactivateAll']());const _0xb257be=this['getCommentThread'](_0x1adef6);if(!_0xb257be)throw new _0x4272df('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1adef6});if(!this['_threadToController']['has'](_0xb257be))throw new _0x4272df('commentsrepository-active-not-attached',null,{'threadId':_0x1adef6});const _0x64ccba=_0x5802e7['getByInnerView'](this['_threadToController']['get'](_0xb257be)['view']);_0x5802e7['activate'](_0x64ccba);}['switchReadOnly'](_0x543206,_0x3c1d08){_0x543206?this['_readOnlyChannels']['add'](_0x3c1d08):this['_readOnlyChannels']['delete'](_0x3c1d08),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xd90c58){return this['_readOnlyChannels']['has'](_0xd90c58)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x29c96b,_0x1db378){return new bt(_0x29c96b,_0x1db378);}['setPermissions'](_0x3772e8,_0x2a4a9a=ii){this['_permissions']['set'](_0x2a4a9a,_0x3772e8),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2a11d8=ii){return this['_permissions']['has'](_0x2a11d8)?this['_permissions']['get'](_0x2a11d8):ei;}['_addCommentThread']({channelId:_0x78e866,threadId:_0xcc5d07,comments:_0x925b2a,unlinkedAt:_0x39e1f9,resolvedAt:_0x235031,resolvedBy:_0x734542,target:_0x422b16,context:_0x3324e2,attributes:_0x4d7152,isFromAdapter:_0x431d65,isResolvable:_0x3b14ab,isSubmitted:_0x1586bf}){if('string'!=typeof _0xcc5d07)throw new _0x4272df('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xcc5d07});if(this['hasCommentThread'](_0xcc5d07))throw new _0x4272df('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xcc5d07});const _0x4924b0=new ri(this,{'channelId':_0x78e866,'id':_0xcc5d07,'context':_0x3324e2,'attributes':_0x4d7152,'unlinkedAt':_0x39e1f9,'resolvedAt':_0x235031,'resolvedBy':_0x734542?this['context']['plugins']['get'](_0x530bbb)['getUser'](_0x734542):null,'isResolvable':_0x3b14ab,'isSubmitted':_0x1586bf||_0x431d65});this['_threads']['set'](_0xcc5d07,_0x4924b0);for(const _0x313198 of _0x925b2a)_0x4924b0['_add'](this['_createNewComment']({'threadId':_0xcc5d07,..._0x313198}));return _0x422b16&&_0x4924b0['attachTo'](_0x422b16),_0x431d65||!_0x4924b0['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x78e866,'threadId':_0xcc5d07});}['_submitCommentThread']({channelId:_0x37e39c,threadId:_0x23048b}){if(!this['hasCommentThread'](_0x23048b))throw new _0x4272df('commentsrepository-missing-comment-thread',this);const _0x1ebfba=this['getCommentThread'](_0x23048b);if(_0x1ebfba['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x481aa8,comments:_0x5a39f9,resolvedAt:_0x3a2b56,resolvedBy:_0x4e04ee,context:_0x4c949c,attributes:_0x1bfb37}=_0x1ebfba,_0x3fe05b=this['context']['plugins']['get']('PendingActions'),_0x4b8840=_0x3fe05b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x37e39c,'threadId':_0x481aa8,'comments':_0x5a39f9['map'](_0x7178de=>_0x7178de['toJSON']()),'resolvedAt':_0x3a2b56,'resolvedBy':_0x4e04ee?_0x4e04ee['id']:_0x4e04ee,'context':_0x4c949c,'attributes':_0x1bfb37})['then'](({comments:_0x45def1})=>{_0x3fe05b['remove'](_0x4b8840);for(const _0x5aecce of _0x45def1)this['_updateComment']({'channelId':_0x37e39c,'threadId':_0x23048b,'commentId':_0x5aecce['commentId'],'createdAt':_0x5aecce['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4427f2=>{throw console['error'](_0x4427f2),new _0x4272df('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x48cb93,target:_0x4dd827}){const _0x20a5d0=this['getCommentThread'](_0x48cb93);if(!_0x20a5d0)throw new _0x4272df('commentsrepository-attach-missing-comment-thread',this);const _0x581506=this['context']['plugins']['get']('PendingActions'),_0xea5e19=this['context']['plugins']['get'](ti),_0x1472e2=this['_createCommentThreadView'](_0x20a5d0),_0x3937ad=new bt(_0x20a5d0,_0x1472e2);let _0x4564e8=null;_0x1472e2['on']('change:isDirty',(_0x3231f3,_0x311445,_0x5df898)=>{_0x5df898?_0x4564e8=_0x581506['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4564e8&&(_0x581506['remove'](_0x4564e8),_0x4564e8=null);}),this['_threadToController']['set'](_0x20a5d0,_0x3937ad),this['_viewToController']['set'](_0x1472e2,_0x3937ad);const _0x24e447=new qt(this['context']['locale'],_0x1472e2);_0x24e447['bind']('length')['to'](_0x1472e2),_0x24e447['bind']('isDirty')['to'](_0x1472e2,'isDirty',_0x1472e2,'length',(_0x57e081,_0x58e991)=>_0x57e081||!_0x58e991),_0x24e447['bind']('isActive')['to'](_0x1472e2),_0x24e447['type']='comment';const _0x5d8247=new $t({'view':_0x24e447,'target':_0x4dd827,'type':'comment','isVisible':!_0x20a5d0['archivedAt']&&!!('function'==typeof _0x4dd827?_0x4dd827():_0x4dd827)});return _0x1472e2['on']('escape',()=>{_0x5d8247['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1472e2,_0x5d8247),_0xea5e19['add'](_0x5d8247),_0x5d8247;}['_bindAnnotationToEditors'](_0x32710,_0xa7f6ee){this['listenTo'](_0x32710,'editorReady',(_0x5c97b6,_0x87504)=>{const _0x5306eb=_0x87504['ui']['view']['body']['bodyCollectionContainer'];_0xa7f6ee['focusableElements']['add'](_0x5306eb),this['context']instanceof _0x374962&&this['context']['ui']['focusTracker']['add'](_0x5306eb);},{'priority':'highest'}),this['listenTo'](_0x32710,'editorDestroyed',(_0x3bef73,_0x56e8ee)=>{const _0x4611f4=_0x56e8ee['ui']['view']['body']['bodyCollectionContainer'];_0xa7f6ee['focusableElements']['has'](_0x4611f4)&&_0xa7f6ee['focusableElements']['remove'](_0x4611f4),this['context']instanceof _0x374962&&this['context']['ui']['focusTracker']['remove'](_0x4611f4);});}['_unbindEditors'](_0x18edc7){this['stopListening'](_0x18edc7,'editorReady'),this['stopListening'](_0x18edc7,'editorDestroyed');}['_createCommentThreadView'](_0x2ac2d6){const _0x540098=this['context']['plugins']['get'](_0x530bbb),{config:_0x306d7e,locale:_0x3c0508}=this['context'],_0x2db2bd=_0x4b3f40(_0x306d7e['get']('locale'),_0x3c0508);return new(0x0,(_0x306d7e['get']('comments'))['CommentThreadView'])(_0x3c0508,_0x2ac2d6,_0x540098['me'],{'editorConfig':{..._0x306d7e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x306d7e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x306d7e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x306d7e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x306d7e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2db2bd,'CommentView':_0x306d7e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5d6139,channelId:_0x46bbbf,resolvedAt:_0x2d1823,resolvedBy:_0x4e255a,isFromAdapter:_0x191383}){if(!this['hasCommentThread'](_0x5d6139))throw new _0x4272df('commentsrepository-missing-comment-thread',null,{'threadId':_0x5d6139});const _0x1c7930=this['getCommentThread'](_0x5d6139);if(_0x1c7930['isResolved'])throw new _0x4272df('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5d6139});const _0x173175=this['context']['plugins']['get'](_0x530bbb);if(_0x1c7930['resolvedBy']=_0x173175['getUser'](_0x4e255a),_0x1c7930['resolvedAt']=_0x2d1823,_0x191383||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x114be8=this['context']['plugins']['get']('PendingActions'),_0xc1114f=_0x114be8['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x46bbbf,'threadId':_0x5d6139})['then'](({resolvedAt:_0x23af98,resolvedBy:_0x34966e})=>{_0x114be8['remove'](_0xc1114f),_0x1c7930['resolvedBy']['id']!==_0x34966e&&(_0x1c7930['resolvedBy']=_0x173175['getUser'](_0x34966e)),_0x1c7930['resolvedAt']=_0x23af98;})['catch'](_0x53fa79=>{throw console['error'](_0x53fa79),new _0x4272df('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0xd78050,channelId:_0x3516a9,isFromAdapter:_0x199d00}){if(!this['hasCommentThread'](_0xd78050))throw new _0x4272df('commentsrepository-missing-comment-thread',null,{'threadId':_0xd78050});const _0x214316=this['getCommentThread'](_0xd78050);if(!_0x214316['isResolved'])throw new _0x4272df('commentsrepository-reopen-comment-thread',null,{'threadId':_0xd78050});if(_0x214316['resolvedBy']=null,_0x214316['resolvedAt']=null,_0x199d00||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x22ec11=this['context']['plugins']['get']('PendingActions'),_0x396793=_0x22ec11['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3516a9,'threadId':_0xd78050})['then'](()=>_0x22ec11['remove'](_0x396793))['catch'](_0x5738ea=>{throw console['error'](_0x5738ea),new _0x4272df('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x319043,isFromAdapter:_0x9444b}){const _0x4119ba=this['getCommentThread'](_0x319043);if(!_0x4119ba)throw new _0x4272df('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x319043),this['_threads']['delete'](_0x319043),!_0x4119ba['isSubmitted']||_0x9444b||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x122d9e=this['context']['plugins']['get']('PendingActions'),{channelId:_0xf9172b}=_0x4119ba,_0x4549e5=_0x122d9e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xf9172b,'threadId':_0x319043})['then'](()=>_0x122d9e['remove'](_0x4549e5))['catch'](_0x14d13c=>{throw console['error'](_0x14d13c),new _0x4272df('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4c36d8,unlinkedAt:_0xd1cced,context:_0x3aece8,attributes:_0x519361,isFromAdapter:_0x100485}){if('string'!=typeof _0x4c36d8)throw new _0x4272df('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4c36d8});if(!this['hasCommentThread'](_0x4c36d8))throw new _0x4272df('commentsrepository-missing-comment-thread',null,{'threadId':_0x4c36d8});const _0x193ed3=this['getCommentThread'](_0x4c36d8);let _0x1522ce=!0x1;if(void 0x0!==_0x3aece8&&_0x193ed3['context']!==_0x3aece8&&(_0x193ed3['context']=_0x3aece8,_0x1522ce=!0x0),void 0x0!==_0xd1cced&&_0x193ed3['unlinkedAt']!==_0xd1cced&&(_0x193ed3['unlinkedAt']=_0xd1cced,_0x1522ce=!0x0),_0x519361&&!_0x163c6f(_0x519361,_0x193ed3['attributes'])&&(_0x193ed3['attributes']=_0x519361,_0x1522ce=!0x0),!_0x1522ce)return Promise['resolve']();if(!_0x193ed3['isSubmitted']||_0x100485||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xb60237=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd4a846}=_0x193ed3,_0x5b85f5=_0xb60237['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xd4a846,'threadId':_0x4c36d8,'context':_0x3aece8,'unlinkedAt':_0xd1cced,'attributes':_0x519361})['then'](()=>_0xb60237['remove'](_0x5b85f5))['catch'](_0x18b991=>{throw console['error'](_0x18b991),new _0x4272df('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2b47b3){const _0x212d1e=this['context']['plugins']['get'](ti),_0xc7f9ac=this['getCommentThread'](_0x2b47b3);if(_0xc7f9ac['_isAttached']=!0x1,this['_threadToController']['has'](_0xc7f9ac)){const _0x2a3c02=this['_threadToController']['get'](_0xc7f9ac),_0x1e3d1e=_0x2a3c02['view'],_0x1a52b1=_0x212d1e['getByInnerView'](_0x1e3d1e);this['_threadToController']['delete'](_0xc7f9ac),this['_viewToController']['delete'](_0x1e3d1e),_0x1a52b1&&_0x212d1e['remove'](_0x1a52b1),_0x2a3c02['destroy'](),_0x1e3d1e['destroy']()['then'](()=>{this['_unbindEditors'](_0x1e3d1e);});}}['_updateActiveAnnotation']({threadId:_0x54cd22,resolvedAt:_0x3edcb9,unlinkedAt:_0x4af45c}){const _0x5ec779=!!_0x3edcb9,_0x35c7b6=this['context']['plugins']['get'](ti),_0x464b65=this['getCommentThread'](_0x54cd22);if(this['_threadToController']['has'](_0x464b65)){const _0x99cf60=this['_threadToController']['get'](_0x464b65)['view'],_0x48b47d=_0x35c7b6['getByInnerView'](_0x99cf60);_0x48b47d&&(_0x5ec779&&_0x35c7b6['_removeActiveAnnotation'](_0x48b47d),_0x4af45c?_0x48b47d['isVisible']=!0x1:_0x48b47d['refreshVisibility']());}}['_getExternalAuthor'](_0x405d10){const _0x29d531=this['context']['plugins']['get'](_0x530bbb),_0x3ec248=_0x479ce7('external:'+_0x405d10),_0x34f134=_0x29d531['getUser'](_0x3ec248);return _0x34f134||_0x29d531['addUser']({'id':_0x3ec248,'name':_0x405d10});}['_createNewComment']({threadId:_0x2ae1d3,commentId:_0x27a003=_0x1bbf8c(),content:_0x42bae5,authorId:_0x37da5c,createdAt:_0x94749d,attributes:_0x23fceb}){if('string'!=typeof _0x27a003)throw new _0x4272df('commentsrepository-invalid-commentid');if('string'!=typeof _0x37da5c)throw new _0x4272df('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x42bae5||!_0x42bae5['trim']())throw new _0x4272df('commentsrepository-invalid-comment-content');const _0x31c743=this['context']['plugins']['get'](_0x530bbb)['getUser'](_0x37da5c);if(!_0x31c743)throw new _0x4272df('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x37da5c});let _0x2a8213=null,_0x12415e=_0x94749d;return _0x23fceb?.['@external']&&(_0x2a8213=this['_getExternalAuthor'](_0x23fceb['@external']['authorName']),_0x12415e=new Date(_0x23fceb['@external']['createdAt'])),new hi(this,{'threadId':_0x2ae1d3,'id':_0x27a003,'author':_0x2a8213||_0x31c743,'creator':_0x31c743,'content':_0x42bae5,'createdAt':_0x94749d,'authoredAt':_0x12415e,'attributes':_0x23fceb});}['_addComment'](_0x35485c){let {threadId:_0xba6d1a,content:_0x4189ed,attributes:_0xfba775,isFromAdapter:_0x4bbebc}=_0x35485c;const _0x1848ba=this['getCommentThread'](_0x35485c['threadId']);if(!_0x1848ba)throw new _0x4272df('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2e5d29=this['_createNewComment'](_0x35485c),{id:_0xc1a9b8}=_0x2e5d29;if(_0x1848ba['_add'](_0x2e5d29),_0x4bbebc||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1848ba['isSubmitted'])return Promise['resolve']();const _0x4cbe6f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x413ddc}=_0x1848ba,_0x14f0d8=_0x4cbe6f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xfba775||(_0xfba775={}),this['adapter']['addComment']({'channelId':_0x413ddc,'threadId':_0xba6d1a,'commentId':_0xc1a9b8,'content':_0x4189ed,'attributes':_0xfba775})['then'](_0xc3c491=>{_0x4cbe6f['remove'](_0x14f0d8),_0xc3c491&&this['_updateComment']({'channelId':_0x413ddc,'threadId':_0xba6d1a,'commentId':_0xc1a9b8,'createdAt':_0xc3c491['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4b3c66=>{throw console['error'](_0x4b3c66),new _0x4272df('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x47b8ee,commentId:_0x1d2f92,content:_0x55308b,createdAt:_0x539d51,attributes:_0x2cdc6f,isFromAdapter:_0x31f183}){if(void 0x0!==_0x55308b&&('string'!=typeof _0x55308b||!_0x55308b['trim']()['length']))throw new _0x4272df('commentsrepository-update-comment-invalid-content');const _0x24725b=this['getCommentThread'](_0x47b8ee),_0x4ef23c=_0x24725b['getComment'](_0x1d2f92);if(!_0x4ef23c)throw new _0x4272df('commentsrepository-update-missing-comment',this);let _0x4f8986=!0x1;if(_0x55308b&&_0x55308b!==_0x4ef23c['content']&&(_0x4ef23c['isEditable']||_0x31f183)&&(_0x4ef23c['content']=_0x55308b,_0x4f8986=!0x0),_0x539d51&&_0x539d51!==_0x4ef23c['createdAt']&&(_0x4ef23c['createdAt']=_0x539d51,_0x4ef23c['isExternal']||(_0x4ef23c['authoredAt']=_0x539d51),_0x4f8986=!0x0),_0x2cdc6f&&!_0x163c6f(_0x2cdc6f,_0x4ef23c['attributes'])&&(_0x4ef23c['attributes']=_0x2cdc6f,_0x4f8986=!0x0),!_0x4f8986)return Promise['resolve']();if(_0x24725b['fire']('commentUpdated'),_0x31f183||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2511b6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x18bce1}=this['getCommentThread'](_0x4ef23c['threadId']),_0x5abfda=_0x2511b6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x18bce1,'threadId':_0x47b8ee,'commentId':_0x1d2f92,'content':_0x55308b,'attributes':_0x2cdc6f})['then'](()=>_0x2511b6['remove'](_0x5abfda))['catch'](_0x4005f5=>{throw console['error'](_0x4005f5),new _0x4272df('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x725e72,commentId:_0x583e53,isFromAdapter:_0x11e888}){const _0x574fc2=this['getCommentThread'](_0x725e72),_0x335a2a=_0x574fc2['getComment'](_0x583e53);if(!_0x335a2a)throw new _0x4272df('commentsrepository-remove-missing-comment',this);if(_0x574fc2['_remove'](_0x335a2a),_0x11e888||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4b11d8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x541a7c}=_0x574fc2,_0x4837a5=_0x4b11d8['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x541a7c,'threadId':_0x725e72,'commentId':_0x583e53})['then'](()=>_0x4b11d8['remove'](_0x4837a5))['catch'](_0x3a2cc8=>{throw console['error'](_0x3a2cc8),new _0x4272df('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5e4050,_0x44a593){super();const _0x441bad=_0x44a593['isResolvable'];this['channelId']=_0x44a593['channelId'],this['id']=_0x44a593['id'],this['comments']=new _0x353113(),this['_repository']=_0x5e4050,this['_isAttached']=!0x1,this['_isSubmitted']=_0x44a593['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5e4050,'_permissions',_0x5e4050,'_readOnlyChannels',()=>_0x5e4050['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5e4050,'_permissions',()=>_0x5e4050['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5e4050,'_permissions',()=>{const _0x5b5583=_0x5e4050['getPermissions'](this['channelId']);return _0x5b5583['write']||_0x5b5583['admin'];}),this['bind']('isResolvable')['to'](_0x5e4050,'_permissions',()=>_0x441bad&&_0x5e4050['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x44a593['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x380637,_0x3367ef)=>_0x380637?_0x3367ef?_0x380637<_0x3367ef?_0x380637:_0x3367ef:_0x380637:_0x3367ef),this['set']('unlinkedAt',_0x44a593['unlinkedAt']||null),this['set']('resolvedAt',_0x44a593['resolvedAt']||null),this['set']('resolvedBy',_0x44a593['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x3f3292=>!!_0x3f3292),this['set']('attributes',_0x44a593['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x45f2a1,_0xe40cf0)=>_0x45f2a1+_0xe40cf0['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x17a84e,id:_0x1d287d}=this;this['_repository']['fire'](ai('submitCommentThread',_0x17a84e),{'channelId':_0x17a84e,'threadId':_0x1d287d});}['setUnlinkedAt'](_0x5e9502){this['_update']({'unlinkedAt':_0x5e9502});}['resolve']({resolvedAt:_0x286ddc=new Date(),resolvedBy:_0x45f29b='',isFromAdapter:_0x6caa07=!0x1}={}){const _0x25ff0a=this['_repository']['context']['plugins']['get'](_0x530bbb)['me'],{channelId:_0x5c0919,id:_0x182129}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x5c0919),{'channelId':_0x5c0919,'threadId':_0x182129,'resolvedAt':_0x286ddc,'resolvedBy':_0x45f29b||_0x25ff0a['id'],'isFromAdapter':_0x6caa07});}['reopen']({isFromAdapter:_0x151b47=!0x1}={}){const {channelId:_0x479649,id:_0x30a7ed}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x479649),{'channelId':_0x479649,'threadId':_0x30a7ed,'isFromAdapter':_0x151b47});}['setContext'](_0x5da4bd){this['context']||this['_update']({'context':_0x5da4bd});}['setAttribute'](_0x392f47,_0x2f8e0f){const _0x52a116=_0x3979fa(this['attributes']);_0x51d99d(_0x52a116,_0x392f47,_0x2f8e0f),this['_update']({'attributes':_0x52a116});}['removeAttribute'](_0x28b280){const _0x16c26c=_0x3979fa(this['attributes']);_0x1c32aa(_0x16c26c,_0x28b280),this['_update']({'attributes':_0x16c26c});}['remove']({isFromAdapter:_0xe0a75c=!0x1}={}){const {channelId:_0xd75f8b,id:_0x4015cf}=this;this['_repository']['fire'](ai('removeCommentThread',_0xd75f8b),{'channelId':_0xd75f8b,'threadId':_0x4015cf,'isFromAdapter':_0xe0a75c});}['attachTo'](_0x14baac){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x14baac});}['addComment'](_0x3d7c88){const {channelId:_0x53a1df,id:_0x3f7b04}=this;this['_repository']['fire'](ai('addComment',_0x53a1df,_0x3f7b04),Object['assign']({'channelId':_0x53a1df,'threadId':_0x3f7b04},_0x3d7c88));}['getComment'](_0x5d5806){if('string'!=typeof _0x5d5806)throw new _0x4272df('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5d5806});return this['comments']['get'](_0x5d5806);}['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'](_0x415710=>_0x415710['toJSON']()),'attributes':this['attributes']};}['_add'](_0x233e49){return this['listenTo'](_0x233e49,'change:authoredAt',()=>{const _0x3339d4=this['_findOptimalIndex'](_0x233e49),_0x3bb5c4=this['comments'];_0x3339d4-0x1!=_0x3bb5c4['getIndex'](_0x233e49)&&_0x3339d4+0x1!=_0x3bb5c4['getIndex'](_0x233e49)&&(this['_remove'](_0x233e49),this['_add'](_0x233e49));}),this['comments']['add'](_0x233e49,this['_findOptimalIndex'](_0x233e49));}['_update'](_0xf0a2c2){const {channelId:_0x9d9bf2,id:_0x1198b3}=this;this['_repository']['fire'](ai('updateCommentThread',_0x9d9bf2),{..._0xf0a2c2,'channelId':_0x9d9bf2,'threadId':_0x1198b3});}['_remove'](_0x356d7c){return this['stopListening'](_0x356d7c),_0x356d7c['destroy'](),this['comments']['remove'](_0x356d7c);}['_findOptimalIndex'](_0x22e0f5){const _0x6938dd=this['comments']['find'](_0x5ece26=>new Date(_0x5ece26['authoredAt'])['getTime']()>new Date(_0x22e0f5['authoredAt'])['getTime']());return _0x6938dd?this['comments']['getIndex'](_0x6938dd):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x30e8b0,_0x31afc6){super();const _0x150a8c=_0x30e8b0['context']['plugins']['get'](_0x530bbb)['me'],_0x3e9bec=_0x30e8b0['getCommentThread'](_0x31afc6['threadId']),_0x295c56=0x0===_0x3e9bec['comments']['length'],_0xa4bf4a=_0x150a8c===_0x31afc6['author'];this['id']=_0x31afc6['id'],this['threadId']=_0x31afc6['threadId'],this['author']=_0x31afc6['author'],this['creator']=_0x31afc6['creator'],this['set']('content',_0x31afc6['content']),this['createdAt']=_0x31afc6['createdAt']||new Date(),this['set']('authoredAt',_0x31afc6['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3e9bec,'resolvedAt'),this['set']('attributes',_0x31afc6['attributes']||{}),this['bind']('isEditable')['to'](_0x30e8b0,'_permissions',()=>{const _0x56c0b5=_0x30e8b0['getPermissions'](_0x3e9bec['channelId'])['write'],_0x4549f3=_0x30e8b0['getPermissions'](_0x3e9bec['channelId'])['modifyAll'];return _0xa4bf4a&&_0x56c0b5||!_0xa4bf4a&&_0x4549f3;}),this['bind']('isRemovable')['to'](_0x3e9bec,'isRemovable',_0x30e8b0,'_permissions',_0x2d9073=>{const _0x45ae21=_0x30e8b0['getPermissions'](_0x3e9bec['channelId'])['write'],_0x3e2e99=_0x30e8b0['getPermissions'](_0x3e9bec['channelId'])['modifyAll'];return _0xa4bf4a&&_0x45ae21||_0x2d9073&&_0x295c56||!_0xa4bf4a&&_0x3e2e99&&!_0x295c56;}),this['bind']('isReadOnly')['to'](_0x3e9bec,'isReadOnly'),this['_repository']=_0x30e8b0;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x4dfca9){const _0xa1806f=document['createElement']('div');return _0xa1806f['innerHTML']=_0x4dfca9,_0xa1806f['textContent']['length'];}(this['content']),0xc8);}['update'](_0x19a64c){const {threadId:_0x608ba5,id:_0x361af8}=this;if(!this['_repository']['hasCommentThread'](_0x608ba5))throw new _0x4272df('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x2e4a72}=this['_repository']['getCommentThread'](_0x608ba5);this['_repository']['fire'](ai('updateComment',_0x2e4a72,_0x608ba5),{'channelId':_0x2e4a72,'threadId':_0x608ba5,'commentId':_0x361af8,..._0x19a64c});}['setAttribute'](_0x1a7dcf,_0x624812){const _0x3adeb3=_0x3979fa(this['attributes']);_0x51d99d(_0x3adeb3,_0x1a7dcf,_0x624812),this['update']({'attributes':_0x3adeb3});}['removeAttribute'](_0x8718a){const _0x2663a1=_0x3979fa(this['attributes']);_0x1c32aa(_0x2663a1,_0x8718a),this['update']({'attributes':_0x2663a1});}['remove'](_0x93f22f={}){if(!_0x93f22f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4d1b84,id:_0x25b5e5}=this;if(!this['_repository']['hasCommentThread'](_0x4d1b84))throw new _0x4272df('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5d815b}=this['_repository']['getCommentThread'](_0x4d1b84);this['_repository']['fire'](ai('removeComment',_0x5d815b,_0x4d1b84),{'channelId':_0x5d815b,'threadId':_0x4d1b84,'commentId':_0x25b5e5,..._0x93f22f});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x5a75bf,..._0x57d494){for(const _0x54799f of _0x57d494)void 0x0!==_0x54799f&&(_0x5a75bf+=':'+String(_0x54799f));return _0x5a75bf;}var ci=class extends _0xe239e3{constructor(_0x5d9673){super(_0x5d9673),this['set']('hasContent',!0x1);}['refresh'](){const _0x3e490e=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xccbe10 of _0x3e490e['getRanges']())if(this['_hasContent'](_0xccbe10))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x473ac0=_0x1bbf8c(),ranges:_0x3613bf,comment:_0x21d82a}={}){const _0x3dc7e1=this['editor']['model'],_0x5e53fd=_0x3613bf??Array['from'](_0x3dc7e1['document']['selection']['getRanges']()),_0xf6efb4=[];for(const _0x4ac647 of _0x5e53fd)this['_hasContent'](_0x4ac647)&&_0xf6efb4['push'](this['_trimToContent'](_0x4ac647));if(!_0xf6efb4['length'])throw new _0x4272df('addcommentthreadcommand-incorrect-ranges',null);_0x21d82a&&this['_createCommentThread'](_0x473ac0,_0x21d82a),this['_createMarkersFromRanges'](_0x473ac0,_0xf6efb4,!!_0x21d82a);}['_createMarkersFromRanges'](_0xad5843,_0x2192b2,_0x4dbcba){this['editor']['model']['change'](_0x257608=>{for(const _0x67ef7e of _0x2192b2){const _0x3cba1e='comment:'+_0xad5843+':'+_0x1bbf8c()['substr'](0x1,0x5);_0x257608['addMarker'](_0x3cba1e,{'range':_0x67ef7e,'usingOperation':_0x4dbcba,'affectsData':_0x4dbcba});}});}['_createCommentThread'](_0x457a6e,_0x26146b){const _0x13fbb7=this['editor']['plugins']['get']('CommentsRepository'),_0x25feeb=this['editor']['config']['get']('collaboration.channelId'),_0x6432a0=this['editor']['plugins']['get']('Users')['me'];if(!_0x6432a0)throw new _0x4272df('addcommentthreadcommand-user-not-found',null);_0x13fbb7['addCommentThread']({'threadId':_0x457a6e,'channelId':_0x25feeb,'comments':[{'authorId':_0x6432a0['id'],'content':_0x26146b,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x5ab853){for(const _0x1ee5b4 of _0x5ab853['getItems']())if(this['_itemIsContent'](_0x1ee5b4))return!0x0;return!0x1;}['_itemIsContent'](_0x5e2772){return _0x5e2772['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5e2772)&&!_0x5e2772['is']('element','tableCell');}['_trimToContent'](_0x287729){const _0x52ea80=_0x3593e8=>!this['_itemIsContent'](_0x3593e8['item']),_0x1b1d26=_0x287729['start']['getLastMatchingPosition'](_0x52ea80),_0x25d0ce=_0x287729['end']['getLastMatchingPosition'](_0x52ea80,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1b1d26,_0x25d0ce);}},di=class extends _0x5ae305{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31dc19){super(_0x31dc19),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2da4c4=this['editor'],_0x2caf5e=_0x2da4c4['model']['document']['selection'],_0x60dc03=_0x8623cc(()=>this['refreshSelectedViews'](),0xa);_0x2caf5e['on']('change:range',(_0x54c2a6,_0x41f834)=>{_0x41f834['directChange']&&(_0x60dc03['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2da4c4['editing']['view']['document'],'change:isFocused',(_0x33f2b3,_0x350f59,_0x34d73b)=>{_0x34d73b&&_0x60dc03();}),this['listenTo'](_0x2da4c4['ui']['focusTracker'],'change:isFocused',(_0x5a7c82,_0x42a9c2,_0x5260e1)=>{_0x5260e1||this['fire']('blur',{'isAnnotationTracked':_0x1dca8d=>this['_editorAnnotationsData']['has'](_0x1dca8d['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x198824){if(this['_editorAnnotations']['has'](_0x198824['view']))return;this['_editorAnnotations']['add'](_0x198824['view']),this['editor']['ui']['focusTracker']['add'](_0x198824['view']['element']);const _0x19006b=this['editor']['plugins']['get'](ti);this['listenTo'](_0x19006b['collection'],'remove',(_0x17fed3,_0x5186ba)=>{this['editor']['ui']['focusTracker']['remove'](_0x5186ba['view']['element']),this['_editorAnnotations']['delete'](_0x5186ba['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4510c8){if('function'!=typeof _0x4510c8)throw new _0x4272df('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4510c8);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x244076,annotations:_0x3c95fa}){const _0x52259e=[],_0x43690c=this['editor']['model']['document']['selection'],_0x25bbb0=Array['from'](_0x43690c['getRanges']());for(const [_0x156004,_0x312ce9]of this['_editorAnnotationsData']){const _0x30914e=_0x534cdb(_0x312ce9),_0x227499=_0x3c95fa['getByInnerView'](_0x156004);_0x30914e&&_0x227499&&_0x52259e['push']({'annotation':_0x227499,'range':_0x30914e});}function _0x534cdb(_0xbddce0){for(const _0x4afe19 of _0xbddce0)for(const _0x1fab41 of _0x25bbb0)if(_0x4afe19['containsRange'](_0x1fab41,!_0x43690c['isCollapsed']))return _0x4afe19;return null;}return _0x52259e['sort']((_0xda65b7,_0x254909)=>{const _0xacccc5=_0xda65b7['range'],_0x4cbb18=_0x254909['range'];if(!_0xacccc5['isEqual'](_0x4cbb18)){if(_0xacccc5['containsRange'](_0x4cbb18,!0x0))return 0x1;if(_0x4cbb18['containsRange'](_0xacccc5,!0x0))return-0x1;}return _0xda65b7['annotation']==_0x244076?-0x1:_0x254909['annotation']==_0x244076?0x1:0x0;})['map'](_0x1e79cd=>_0x1e79cd['annotation']);}get['_editorAnnotationsData'](){const _0x16b9f9=new Map();for(const _0xce0dcd of Array['from'](this['_dataCollectors']))for(const [_0x5a116e,_0x22f0f4]of _0xce0dcd())_0x16b9f9['set'](_0x5a116e,_0x22f0f4);return _0x16b9f9;}},li=class extends _0x5ae305{['afterInit'](){const _0x37b753=this['editor'];_0x37b753['plugins']['has']('RestrictedEditingModeEditing')&&_0x37b753['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x5ae305{constructor(_0x346ef7){super(_0x346ef7),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2938f4=this['editor'],_0x2056c6=_0x2938f4['commands']['get']('importWord'),_0x958bef=_0x2938f4['plugins']['get'](_0x530bbb);_0x2056c6&&(_0x2056c6['on']('execute',(_0x3fb821,[,_0x92f819])=>{_0x92f819['collaboration_features']={'comments':!0x0,'user_id':_0x958bef['me']['id']};},{'priority':_0x590ef9['high']+0xa}),this['listenTo'](_0x2056c6,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1e273e,_0x1dad0d){const {comment_threads:_0x415fbf}=_0x1dad0d;_0x415fbf&&_0x415fbf['forEach'](({thread_id:_0x361f2c,comments:_0x1bfd4a,is_resolved:_0x228ad3})=>{const _0x2ba434=new Date(),_0x48b2ba=_0x1bfd4a['map'](({author:_0x2eaadc,content:_0x54f397,created_at:_0x2637f2})=>({'content':_0x54f397,'authorId':this['editor']['plugins']['get'](_0x530bbb)['me']['id'],'createdAt':_0x2ba434,'attributes':{'@external':{'authorName':_0x2eaadc,'createdAt':_0x2637f2?new Date(_0x2637f2):new Date(),'source':'importWord'}}})),_0x109ba9=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x109ba9,'threadId':_0x361f2c,'comments':_0x48b2ba,'resolvedAt':_0x228ad3?_0x2ba434:null});});}},ui=class extends _0x5ae305{constructor(_0x205c19){super(_0x205c19),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x28ea80=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x28ea80,'contentInsertion',(_0x1334a8,_0x226283)=>this['_removeMarkersWithoutThreads'](_0x226283['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xf28f0d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xf28f0d;const _0xe5828=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5eb0a1 of _0xf28f0d['keys']()){const [_0x197e1d,_0x553b97]=_0x5eb0a1['split'](':');'comment'!=_0x197e1d||_0xe5828['hasCommentThread'](_0x553b97)||_0xf28f0d['delete'](_0x5eb0a1);}return _0xf28f0d;}['_registerMarkerInClipboardPipeline'](){const _0x4f828f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2ef4ca=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2ef4ca&&_0x4f828f['_registerMarkerToCopy']('comment',_0x2ef4ca);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1d8040){switch(_0x1d8040){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x22fb6c){const _0x936c63=_0x22fb6c['split'](':');return{'group':_0x936c63[0x0],'id':_0x936c63[0x1],'part':_0x936c63[0x2]};}var pi=class extends _0x5ae305{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xcfa3cd,_0x4f96a8)=>{if(!_0x4f96a8['options']['showCommentHighlights'])return null;if(_0x4f96a8['options']['ignoreResolvedComments']){const {id:_0x2f83a7}=fi(_0xcfa3cd['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2f83a7)?.['isResolved']&&_0xcfa3cd['item'])return _0x4f96a8['consumable']['consume'](_0xcfa3cd['item'],'addMarker:'+_0xcfa3cd['markerName']),_0x4f96a8['consumable']['consume'](_0xcfa3cd['item'],'removeMarker:'+_0xcfa3cd['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3b4728=>{_0x3b4728['on']('addMarker:comment',(_0x2e316d,_0x5ef8d3,_0x1f4f60)=>{if(!_0x1f4f60['options']['showCommentHighlights'])return;const _0x4618a5=_0x5ef8d3['item'];if(!_0x4618a5)return;const _0x228e7c=_0x1f4f60['mapper']['toViewElement'](_0x4618a5);this['editor']['model']['schema']['isObject'](_0x4618a5)&&_0x228e7c&&!_0x228e7c['getCustomProperty']('widget')&&_0x228e7c['is']('containerElement')&&Ct(_0x228e7c,_0x1f4f60['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3f7033,{writer:_0x2892f9,options:_0x24175a})=>{if(!_0x24175a['showCommentHighlights'])return null;const _0x5bac7a=_0x2892f9['createContainerElement']('div'),_0x2a3a4f=_0x2892f9['createEmptyElement']('hr');return _0x2892f9['addClass']('ck-horizontal-line',_0x5bac7a),_0x2892f9['insert'](_0x2892f9['createPositionAt'](_0x5bac7a,0x0),_0x2a3a4f),_0x5bac7a;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x42e11d,{writer:_0x2d9a05,options:_0x5c7b14})=>{if(!_0x5c7b14['showCommentHighlights'])return null;const _0xceeea3=_0x2d9a05['createContainerElement']('span'),_0x1bebc7=_0x2d9a05['createEmptyElement']('img');return _0x2d9a05['addClass']('image-inline',_0xceeea3),_0x2d9a05['insert'](_0x2d9a05['createPositionAt'](_0xceeea3,0x0),_0x1bebc7),_0xceeea3;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x204561,{writer:_0x1585b3,options:_0x9dd652})=>{if(_0x9dd652['showCommentHighlights'])return _0x1585b3['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4ccd73,_0x183bd7,_0x44c307)=>{_0x44c307['options']['showCommentHighlights']&&_0x4ccd73['stop']();},{'priority':'high'});}},wi=class extends _0x5ae305{static get['requires'](){return[oi,di,_0x530bbb,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x289677){super(_0x289677),this['set']('isThreadsLoadingPaused',!0x0),_0x289677['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x43d584,_0x1d05e9,_0x2e1f74,_0x384a4a)=>{const _0x295516=_0x289677['plugins']['get'](oi),_0x199705=_0x2e1f74?fi(_0x2e1f74)['id']:null;_0x289677['model']['change'](()=>{if(_0x199705){const _0x402384=this['getAllMarkersForId'](_0x199705);for(const _0x5f44aa of _0x402384)_0x289677['editing']['reconvertMarker'](_0x5f44aa);}if(_0x384a4a){const {id:_0x145d45}=fi(_0x384a4a),_0x5f09f3=_0x295516['getCommentThread'](_0x145d45);if(_0x5f09f3&&_0x5f09f3['unlinkedAt'])return;if(_0x5f09f3&&!_0x5f09f3['isAttached'])return;const _0x5b5125=this['getAllMarkersForId'](_0x145d45);for(const _0xfec718 of _0x5b5125)_0x289677['editing']['reconvertMarker'](_0xfec718);}}),_0x199705&&this['scrollToThreadMarker'](_0x199705);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x11f2f6=this['editor'],_0x4d2e28=_0x11f2f6['plugins']['get'](oi),_0x3a0c87=_0x11f2f6['config']['get']('collaboration.channelId'),_0x3e4016=_0x4d2e28['getCommentThreads']()['filter'](_0x1fcf05=>_0x1fcf05['channelId']!==_0x3a0c87);_0x11f2f6['commands']['add']('addCommentThread',new ci(_0x11f2f6)),this['listenTo'](_0x11f2f6,'change:isReadOnly',(_0x1682a9,_0x10f687,_0x1f44e4)=>{_0x4d2e28['switchReadOnly'](_0x1f44e4,_0x11f2f6['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4d2e28,gi('addCommentThread',_0x3a0c87),(_0x3944a7,{threadId:_0x37dc4b})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x37dc4b)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x37dc4b);}),this['listenTo'](_0x4d2e28,gi('removeCommentThread',_0x3a0c87),(_0x13c4fc,{threadId:_0x59d92c})=>{_0x11f2f6['model']['enqueueChange']({'isUndoable':!0x1},_0xdf64a3=>{const _0x1c15af=this['getAllMarkersForId'](_0x59d92c);for(const _0x3c3385 of _0x1c15af)_0xdf64a3['removeMarker'](_0x3c3385);});}),this['listenTo'](_0x4d2e28,gi('resolveCommentThread',_0x3a0c87),(_0x39c178,{threadId:_0x3e43b0})=>{this['_reconvertMarkers'](_0x3e43b0);const _0x3ff652=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x3ff652['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x3e43b0)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4d2e28,gi('reopenCommentThread',_0x3a0c87),(_0x1af9d5,{threadId:_0x4fb859})=>{this['_reconvertMarkers'](_0x4fb859);},{'priority':'low'}),this['listenTo'](_0x4d2e28,gi('addComment',_0x3a0c87),(_0xd04617,{threadId:_0x2800b1,isFromAdapter:_0x5ec2d6})=>{const _0x4e6e9a=this['getAllMarkersForId'](_0x2800b1);!_0x5ec2d6&&0x0!=_0x4e6e9a['length']&&_0x4d2e28['hasCommentThread'](_0x2800b1)&&0x1===_0x4d2e28['getCommentThread'](_0x2800b1)['length']&&_0x11f2f6['model']['enqueueChange']({'isUndoable':!0x1},_0x585fda=>{for(const _0x2da6df of _0x4e6e9a)_0x585fda['updateMarker'](_0x2da6df,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3e4016);}['afterInit'](){!async function(_0x3b93fd){const _0x58915b='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x47337e=0x78fc0,_0x3a6627=window['Date']['now'](),_0x1de2e5=_0x3b93fd['editor'],_0x427aab=new window['Promise'](_0x2a09ce=>{_0x1de2e5['once']('ready',_0x2a09ce);}),_0x429137={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x4756e6=_0x1de2e5['config']['get']('licenseKey');async function _0x54235a(){let _0x2d1c89,_0xcfe0c0=null,_0x6d1c06=null;try{return'GPL'==_0x4756e6?'NotAllowed':(_0x2d1c89=_0x473b2d(),_0x2d1c89?(_0x2d1c89['usageEndpoint']&&(_0x6d1c06=_0x46b53e(_0x2d1c89['usageEndpoint'],_0x2d1c89['jti'])),await _0x29198e()?_0x4bea77()?_0xadcee0()?'Expired':_0xc83e44()?('evaluation'==_0x2d1c89['licenseType']&&(_0xcfe0c0=_0x3f0cf2('EvaluationLimit')),await _0x30c8fa()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0xadcee0(){const _0x3a5a5c=['evaluation','trial']['includes'](_0x2d1c89['licenseType'])?_0x3a6627/0x3e8:0xe10*_0x47337e;return _0x2d1c89['exp']<_0x3a5a5c;}function _0x4bea77(){const _0x32269c=_0x2d1c89['features'];if(!_0x32269c)return!0x1;if(_0x32269c['includes']('*'))return!0x0;if(_0x32269c['includes']('CMT'))return!0x0;if(_0x32269c['includes']('TRILIUM')&&_0x394238())return!0x0;if(_0x32269c['includes']('RCMT')){if(_0x5d1207())return!0x0;if(_0x2e2b5e()||_0x3a7228())return!0x0;}return!0x1;}function _0xc83e44(){const _0x904bc2=_0x2d1c89['licensedHosts'];if(!_0x904bc2||0x0==_0x904bc2['length'])return!0x0;const {hostname:_0x26a65f}=new URL(window['location']['href']);if(_0x904bc2['includes'](_0x26a65f))return!0x0;const _0x17cbe9=_0x26a65f['split']('.');return _0x904bc2['filter'](_0x1a6d0e=>_0x1a6d0e['includes']('*'))['map'](_0x5aedd5=>_0x5aedd5['split']('.'))['filter'](_0x55f0bd=>_0x55f0bd['length']<=_0x17cbe9['length'])['map'](_0x43b712=>Array(_0x17cbe9['length']-_0x43b712['length'])['fill']('*'===_0x43b712[0x0]?'*':'')['concat'](_0x43b712))['some'](_0x54a1c3=>_0x17cbe9['every']((_0x5e1803,_0x195dae)=>_0x54a1c3[_0x195dae]===_0x5e1803||'*'===_0x54a1c3[_0x195dae]));}function _0x30c8fa(){return _0xcfe0c0&&_0x6d1c06?new window['Promise']((_0xe13097,_0x55912e)=>{_0xcfe0c0['then'](_0xe13097,_0x55912e),_0x6d1c06['then'](_0x21ef55=>{'Valid'!=_0x21ef55&&_0xe13097(_0x21ef55);},_0x55912e);}):_0xcfe0c0||_0x6d1c06||'Valid';}}function _0x46b53e(_0x2d4541,_0x3e201f){return new window['Promise'](_0x115b81=>{if(_0x5c90c8())return _0x115b81('Valid');_0x34622a(),_0x1de2e5['decorate']('_sendUsageRequest');let _0x32873f=!0x1;const _0x133893=_0x1bbf8c();function _0x53d02a(_0x463932){return!!_0x463932&&('object'==typeof _0x463932||'function'==typeof _0x463932)&&'function'==typeof _0x463932['then']&&'function'==typeof _0x463932['catch'];}function _0x25c612(_0x258efb){_0x54cc1c(_0x258efb)['then'](_0x39401a=>_0x39401a&&'ok'==_0x39401a['status']?_0x4d72f9(_0x98f4fd(_0x133893+_0x3e201f))!=_0x39401a['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5dce46=>(_0x2d591d(),_0x5dce46),()=>{const _0x549833=_0xd6c1ec();return null==_0x549833?(_0x2d591d(),'Valid'):_0x3a6627-_0x549833>0x240c8400?'UsageLimit':'Valid';})['then'](_0x115b81)['catch'](()=>{_0x115b81('UsageLimit');});const _0x5b33be=0x36ee80;function _0x2d591d(){const _0x340a25='llct-'+_0x4d72f9(_0x98f4fd(_0x2d4541)),_0x31bfa0=_0x3990ed(_0x4d72f9(window['Math']['ceil'](_0x3a6627/_0x5b33be)));window['localStorage']['setItem'](_0x340a25,_0x31bfa0);}function _0xd6c1ec(){const _0x487dbd='llct-'+_0x4d72f9(_0x98f4fd(_0x2d4541)),_0x11ceee=window['localStorage']['getItem'](_0x487dbd);return _0x11ceee?window['parseInt'](_0x3990ed(_0x11ceee),0x10)*_0x5b33be:null;}function _0x54cc1c(_0x330a66){return new window['Promise']((_0x4b0c41,_0x4adc1e)=>{_0x330a66['then'](_0x4b0c41,_0x4adc1e),window['setTimeout'](_0x4adc1e,0x1d4c0);});}}_0x1de2e5['on']('_sendUsageRequest',(_0x31ac67,_0x328880)=>{if(_0x328880[0x0]!=_0x2d4541)return _0x115b81('UsageLimit');_0x328880[0x1]={..._0x328880[0x1],'requestId':_0x133893};},{'priority':'high'}),_0x1de2e5['on']('_sendUsageRequest',_0x28037e=>{_0x53d02a(_0x28037e['return'])&&(_0x32873f=!0x0,_0x25c612(_0x28037e['return']));},{'priority':'low'}),_0x427aab['then'](()=>{_0x32873f||_0x115b81('UsageLimit');});});function _0x5c90c8(){return'auto'==_0x1de2e5['editing']['view']['_overlayModeHint'];}function _0x34622a(){_0x1de2e5['editing']['view']['_overlayModeHint']='auto';}}function _0x3f0cf2(_0xa3a94){const _0x40313d=[new window['Promise'](_0x4eb202=>setTimeout(_0x4eb202,0x93ecc)),_0x427aab['then'](()=>new window['Promise'](_0x481d2f=>{let _0x4ab431=0x0;_0x1de2e5['model']['on']('applyOperation',(_0x382fd6,_0x1e2f15)=>{_0x1e2f15[0x0]['isDocumentOperation']&&_0x4ab431++,0x5e8==_0x4ab431&&(_0x481d2f(),_0x382fd6['off']());});}))];return window['Promise']['race'](_0x40313d)['then'](()=>_0xa3a94);}async function _0x281211(){await _0x427aab,_0x1de2e5['model']['change']=_0x55b116,_0x1de2e5['model']['enqueueChange']=_0x55b116,_0x1de2e5['enableReadOnlyMode']('model');}function _0x394238(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5d1207(){return _0x4f1b52('WebSocketGateway')&&'connected'==_0x2b62c8('WebSocketGateway')['state'];}function _0x2e2b5e(){return _0x4f1b52('RevisionViewerIntegration');}function _0x3a7228(){return _0x4f1b52('TrackChangesDataGetter');}function _0x3ea000(_0x2066e2){const _0x56fadd=_0x1d20b8();_0x1de2e5[_0x56fadd]='commentsLicenseKey'+_0x2066e2,'Valid'!=_0x2066e2&&_0x281211();}function _0x1d20b8(){const _0x500631=window['String'](window['performance']['now']())['replace']('.','');let _0x36d935='K';for(let _0x464f44=0x0;_0x464f44<_0x500631['length'];_0x464f44+=0x2){let _0x27b73f=window['parseInt'](_0x500631['substring'](_0x464f44,_0x464f44+0x2));_0x27b73f>=0x3e&&(_0x27b73f-=0x3e),_0x36d935+=_0x58915b[_0x27b73f];}return _0x36d935;}function _0x473b2d(){const _0xf1fe06=_0x4756e6['split']('.');if(0x3!=_0xf1fe06['length'])return null;return _0x645db7(_0xf1fe06[0x1]);function _0x645db7(_0x386e37){const _0x4b8c9b=_0x430642(_0x386e37);return _0x4b8c9b&&_0x38ddfd()?_0x4b8c9b:null;function _0x38ddfd(){const _0x4002b8=_0x4b8c9b['jti'],_0x2f217a=window['parseInt'](_0x4002b8['substring'](_0x4002b8['length']-0x8),0x10),_0x43d04f={..._0x4b8c9b,'jti':_0x4002b8['substring'](0x0,_0x4002b8['length']-0x8)};return delete _0x43d04f['vc'],_0x98f4fd(_0x43d04f)==_0x2f217a;}}}async function _0x29198e(){let _0x58d305=!0x0;try{const [_0x188aa1,_0x3aaf76,_0x55b6c1]=_0x4756e6['split']('.');return _0x293604(_0x188aa1),await _0x3d2fbf(_0x188aa1,_0x3aaf76,_0x55b6c1),_0x58d305;}catch{return!0x1;}function _0x293604(_0x193fce){const _0x402e19=_0x430642(_0x193fce);_0x402e19&&'ES256'==_0x402e19['alg']||(_0x58d305=!0x1);}async function _0x3d2fbf(_0x32d736,_0x1dfee7,_0x47dcfc){const _0x5b8108=window['Uint8Array']['from'](_0x10cd3a(_0x47dcfc),_0x3c0507=>_0x3c0507['charCodeAt'](0x0)),_0x5a757b=new window['TextEncoder']()['encode'](_0x32d736+'.'+_0x1dfee7),_0x141b90=window['crypto']['subtle'];if(!_0x141b90)return;const _0x4f6ad2=await _0x141b90['importKey']('jwk',_0x429137,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x141b90['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4f6ad2,_0x5b8108,_0x5a757b)||(_0x58d305=!0x1);}}function _0x430642(_0x52f1db){return _0x52f1db['startsWith']('ey')?JSON['parse'](_0x10cd3a(_0x52f1db)):null;}function _0x10cd3a(_0x19fb3b){return window['atob'](_0x19fb3b['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x98f4fd(_0x53c475){let _0x5dce95=0x1505;function _0x2fd885(_0xa2a407){for(let _0x5b48ea=0x0;_0x5b48ea<_0xa2a407['length'];_0x5b48ea++){const _0x47d13f=_0xa2a407['charCodeAt'](_0x5b48ea);_0x5dce95=(_0x5dce95<<0x5)+_0x5dce95+_0x47d13f,_0x5dce95&=_0x5dce95;}}function _0x76580e(_0x8ba470){Array['isArray'](_0x8ba470)?_0x8ba470['forEach'](_0x76580e):_0x8ba470&&'object'==typeof _0x8ba470?Object['entries'](_0x8ba470)['sort']()['forEach'](([_0x18643a,_0x101f8a])=>{_0x2fd885(_0x18643a),_0x76580e(_0x101f8a);}):_0x2fd885(window['String'](_0x8ba470));}return _0x76580e(_0x53c475),_0x5dce95>>>0x0;}function _0x4d72f9(_0x4daf86){return _0x4daf86['toString'](0x10)['padStart'](0x8,'0');}function _0x3990ed(_0x5230db){return _0x5230db['split']('')['reverse']()['join']('');}function _0x4f1b52(_0x590773){return _0x1de2e5['plugins']['has'](_0x590773);}function _0x2b62c8(_0x28571a){return _0x1de2e5['plugins']['get'](_0x28571a);}function _0x55b116(){}_0x3ea000(await _0x54235a());}(this);}['destroy'](){const _0x26d121=this['editor']['plugins']['get'](oi),_0x5000b8=this['editor']['config']['get']('collaboration.channelId');for(const _0x154cb3 of _0x26d121['getCommentThreads']({'channelId':_0x5000b8}))_0x26d121['_detachCommentThread'](_0x154cb3['id']),_0x26d121['_threads']['delete'](_0x154cb3['id']);super['destroy']();}['hasMarkerForId'](_0x353685){return this['getAllMarkersForId'](_0x353685)['length']>0x0;}['getAllMarkersForId'](_0x1d4b93){const _0x55109e=[];for(const _0x5682a2 of this['editor']['model']['markers'])_0x5682a2['name']['startsWith']('comment:'+_0x1d4b93)&&_0x55109e['push'](_0x5682a2);return _0x55109e;}['scrollToThreadMarker'](_0x5c3710){setTimeout(()=>{const _0x35b7bb=this['_getTargetForId'](_0x5c3710);_0x35b7bb&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x5c3710&&_0x113905({'target':_0x35b7bb[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1bd6b0){this['editor']['model']['change'](()=>{for(const _0x54498e of this['getAllMarkersForId'](_0x1bd6b0))this['editor']['editing']['reconvertMarker'](_0x54498e);});}['_attachArchivedThread'](_0x4b56e0){const _0x3e18ab=this['editor']['plugins']['get'](oi),_0x21d8fd=this['editor']['plugins']['get'](di),_0x432f24=_0x3e18ab['getCommentThread'](_0x4b56e0);if(!_0x432f24['isAttached']){const _0x1223e7=_0x432f24['attachTo'](()=>this['_getTargetForId'](_0x432f24['id']));_0x21d8fd['registerAnnotation'](_0x1223e7),_0x432f24['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xa9a6cb=this['editor'],_0x451394=_0xa9a6cb['plugins']['get'](_0x530bbb);_0xa9a6cb['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x771b0a,_0x4a60a0)=>{const {id:_0x1437e4}=fi(_0x771b0a['markerName']),_0x4f28de=_0xa9a6cb['plugins']['get'](oi)['getCommentThread'](_0x1437e4),_0x48cabc=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x1437e4;let _0xfde9b0;if(_0x4f28de&&_0x4f28de['isResolved']&&!_0x48cabc&&_0x771b0a['item'])return _0x4a60a0['consumable']['consume'](_0x771b0a['item'],'addMarker:'+_0x771b0a['markerName']),_0x4a60a0['consumable']['consume'](_0x771b0a['item'],'removeMarker:'+_0x771b0a['markerName']),null;const _0x3a5c3d=['ck-comment-marker'];return _0x48cabc&&_0x3a5c3d['push']('ck-comment-marker--active'),_0xfde9b0=_0x4f28de?.['length']?_0x4f28de['comments']['first']['author']['id']:_0x451394['me']['id'],{'classes':_0x3a5c3d,'attributes':{'data-comment':_0x1437e4,'data-author-id':_0xfde9b0}};}}),_0xa9a6cb['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3c157d,{options:_0x4d2cec})=>{if(_0x4d2cec['showCommentHighlights'])return null;const _0x428d70=_0xa9a6cb['plugins']['get'](oi),_0x90267c=_0xa9a6cb['model']['markers']['get'](_0x3c157d),{id:_0x2d46b7,part:_0x36d773}=fi(_0x3c157d);return _0x90267c&&!_0x90267c['affectsData']||_0x4d2cec['ignoreResolvedComments']&&_0x428d70['getCommentThread'](_0x2d46b7)?.['isResolved']?null:{'group':'comment','name':_0x36d773?_0x2d46b7+':'+_0x36d773:_0x2d46b7};}}),_0xa9a6cb['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3ed40a,{writer:_0x2d77c4})=>_0x2d77c4['createElement']('$marker',{'data-name':'comment:'+_0x3ed40a['getAttribute']('id')})}),_0xa9a6cb['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x218f0a=this['editor'],_0x5af17b=_0x218f0a['plugins']['get'](oi),_0x51c28d=new Set(),_0x4a1c20=new Set();_0x218f0a['model']['document']['registerPostFixer'](_0x24a614=>{let _0x105808=!0x1;for(const {name:_0x470a88,data:_0x54df89}of _0x218f0a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2f0cf4,id:_0x1cbd08}=fi(_0x470a88);let _0x5f3353=_0x54df89['newRange'];if('comment'!==_0x2f0cf4||!_0x5f3353)continue;const _0x20e4b5='$graveyard'===_0x5f3353['root']['rootName'];_0x20e4b5||(_0x5f3353=_i(_0x5f3353,_0x218f0a['model']),!_0x5f3353||_0x5f3353['isCollapsed']||!_0x54df89['newRange']||_0x5f3353['isEqual'](_0x54df89['newRange']))?_0x218f0a['model']['hasContent'](_0x5f3353)&&!_0x20e4b5?this['isThreadsLoadingPaused']?_0x51c28d['add'](_0x470a88):this['_handleThreadMarker'](_0x470a88,_0x1cbd08):(_0x4a1c20['add'](_0x470a88),_0x51c28d['delete'](_0x470a88),_0x24a614['removeMarker'](_0x470a88),_0x105808=!0x0):(_0x24a614['updateMarker'](_0x470a88,{'range':_0x5f3353}),_0x105808=!0x0);}return _0x105808;}),this['on']('change:isThreadsLoadingPaused',(_0x4f5a83,_0x2523e4,_0x49d8c6)=>{if(!_0x49d8c6&&_0x51c28d['size'])for(const _0x4bad66 of _0x51c28d){const {id:_0x5ee1bd}=fi(_0x4bad66);_0x51c28d['delete'](_0x4bad66),_0x218f0a['model']['markers']['get'](_0x4bad66)&&this['_handleThreadMarker'](_0x4bad66,_0x5ee1bd);}}),this['listenTo'](_0x218f0a['model']['document'],'change',()=>{for(const {name:_0x1cd1ef,data:{newRange:_0x45f697}}of _0x218f0a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2f2f49,id:_0x20eeb4}=fi(_0x1cd1ef);if('comment'!==_0x2f2f49)continue;const _0xd3f163=_0x5af17b['getCommentThread'](_0x20eeb4),_0x20b725=this['hasMarkerForId'](_0x20eeb4);_0xd3f163&&(!_0xd3f163['_hasTargetInContent']&&_0x45f697&&_0x218f0a['editing']['view']['once']('render',()=>{const _0x53072f=_0x218f0a['plugins']['get'](ti),_0xe7f140=_0x5af17b['_threadToController']['get'](_0xd3f163)['view'];_0x53072f['getByInnerView'](_0xe7f140)['refreshVisibility']();},{'priority':'low'}),_0xd3f163['_hasTargetInContent']=_0x20b725||!!_0x45f697),_0x45f697||(_0x4a1c20['add'](_0x1cd1ef),_0x51c28d['delete'](_0x1cd1ef));}for(const _0xc27d83 of _0x4a1c20){const {id:_0xc7acf5}=fi(_0xc27d83),_0x2b93ff=_0x5af17b['getCommentThread'](_0xc7acf5);if(_0x51c28d['delete'](_0xc27d83),!_0x2b93ff)continue;const _0xbce5e8=this['hasMarkerForId'](_0xc7acf5);_0xbce5e8||_0x2b93ff['isSubmitted']?_0xbce5e8||_0x2b93ff['unlinkedAt']||_0x2b93ff['setUnlinkedAt'](new Date()):_0x2b93ff['remove']();}_0x4a1c20['clear']();});}['_handleInitialThreads'](_0x2bb95d){_0x2bb95d['forEach'](_0x4cdedd=>{_0x4cdedd['unlinkedAt']&&this['_attachArchivedThread'](_0x4cdedd['id']);});}['_getTargetForId'](_0xb8feac){const _0x232ce0=this['editor'],_0x46b7a5=this['getAllMarkersForId'](_0xb8feac);return _0x505496(_0x232ce0['editing'],_0x46b7a5);}['_getTextContext'](_0x220ee3){const _0x53319f=this['getAllMarkersForId'](_0x220ee3);let _0x176136='',_0x475586=!0x1;for(const _0x41ca13 of _0x53319f){const _0x43c57f=_0x41ca13['getRange']();for(const _0x9485ac of Array['from'](_0x43c57f['getItems']()))_0x9485ac['is']('$textProxy')?(_0x176136&&_0x475586&&(_0x176136+='\x20',_0x475586=!0x1),_0x176136+=_0x9485ac['data']):_0x475586=!0x0;_0x475586=!0x0;}return _0x176136['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x43ae71,_0x822176){const _0x575c18=this['editor'],_0x19a070=_0x575c18['plugins']['get'](oi);let _0x59a43a=_0x19a070['getCommentThread'](_0x822176);const _0x2f311c=_0x575c18['config']['get']('collaboration.channelId'),_0xfe060b=_0x575c18['plugins']['get'](di);return _0x59a43a&&(_0x59a43a['unlinkedAt']&&_0x59a43a['setUnlinkedAt'](null),_0x59a43a['isAttached'])||(this['getAllMarkersForId'](_0x822176)[0x0]['managedUsingOperations']?_0x19a070['fetchCommentThread']({'channelId':_0x2f311c,'threadId':_0x822176})['then'](_0x43f04f=>{if('destroyed'!==_0x575c18['state']){if(_0x59a43a=_0x43f04f,_0x59a43a&&!_0x59a43a['isAttached']){const _0x5209d3=_0x59a43a['attachTo'](()=>this['_getTargetForId'](_0x822176));_0xfe060b['registerAnnotation'](_0x5209d3),_0x59a43a['isResolved']&&this['_reconvertMarkers'](_0x822176);}else{if(!_0x59a43a){const _0x82f5d6=this['getAllMarkersForId'](_0x822176);_0x575c18['model']['change'](_0x5f4be4=>{for(const _0x1647a4 of _0x82f5d6)_0x5f4be4['removeMarker'](_0x1647a4);});}}}}):_0x575c18['editing']['view']['once']('render',()=>{if(_0x19a070['getCommentThread'](_0x822176))return;const _0x1ef4fe=_0x575c18['plugins']['get'](ti);_0x59a43a=_0x19a070['openNewCommentThread']({'channelId':_0x2f311c,'threadId':_0x822176,'target':()=>this['_getTargetForId'](_0x822176),'context':{'type':'text','value':this['_getTextContext'](_0x822176)}});const _0x14c4a6=_0x19a070['_threadToController']['get'](_0x59a43a)['view'],_0x5c814b=_0x1ef4fe['getByInnerView'](_0x14c4a6);_0x5c814b&&_0xfe060b['registerAnnotation'](_0x5c814b);},{'priority':'low'})),_0x59a43a;}['_handleThreadMarker'](_0xaec9f0,_0x4aa747){const _0xbf0a28=this['_attachMarkerToThread'](_0xaec9f0,_0x4aa747);_0xbf0a28&&!_0xbf0a28['context']&&_0xbf0a28['setContext']({'type':'text','value':this['_getTextContext'](_0x4aa747)});}['_initAriaMarkerChangeAnnouncements'](){const _0xf79c3=this['editor'];_0x1db445(_0xf79c3['model'],({left:_0x535bd0,entered:_0x216c15})=>{for(const _0x22beda of _0x535bd0)if(Ai(_0x22beda)){_0xf79c3['ui']['ariaLiveAnnouncer']['announce'](Et(_0xf79c3['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x399687 of _0x216c15)if(Ai(_0x399687)){_0xf79c3['ui']['ariaLiveAnnouncer']['announce'](Et(_0xf79c3['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x523bde(_0x30fb95)));break;}});}};function gi(_0x43bbda,_0x11e3ec){return _0x11e3ec?_0x43bbda+':'+_0x11e3ec:_0x43bbda;}function _i(_0x1534e7,_0xe43267){const _0x315111=_0xe43267['schema'],_0x2b89df=_0xe43267['createRange'](_0x1534e7['start']);for(const _0x1a10d9 of _0x1534e7['getWalker']()){const {type:_0x2bae6a,item:_0x4e515b,nextPosition:_0x15573d}=_0x1a10d9;if('text'===_0x2bae6a||_0x315111['isObject'](_0x4e515b)){const _0x1edbcb=_0xe43267['createPositionBefore'](_0x4e515b);_0x2b89df['isCollapsed']&&(_0x2b89df['start']=_0x1edbcb),_0x2b89df['end']=_0x15573d;}}return _0x2b89df;}function Ai(_0x42c1db){return'comment'===fi(_0x42c1db['name'])['group'];}var vi=class extends _0x5ae305{['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 _0x340a2e=this['editor'],_0x4f96a7=_0x340a2e['plugins']['get'](oi),_0x3ecee1=_0x340a2e['plugins']['get'](wi),_0x26bbfc=_0x340a2e['plugins']['get'](ti),_0x2c5747=_0x340a2e['plugins']['get'](di);_0x340a2e['ui']['componentFactory']['add']('comment',()=>{const _0x5d842d=this['_createUIButton'](_0x4d221b);return _0x5d842d['tooltip']=!0x0,_0x5d842d;}),_0x340a2e['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x2c5747['addSourceCollector'](()=>{const _0x44ed5e=[];for(const [_0x5511b5,_0x585a09]of _0x4f96a7['_threadToController']){const _0x2b28aa=_0x3ecee1['getAllMarkersForId'](_0x5511b5['id']),_0x4ea3f4=_0x2b28aa['map'](_0xddfa04=>_0xddfa04['getRange']());_0x2b28aa['length']>0x0&&_0x44ed5e['push']([_0x585a09['view'],_0x4ea3f4]);}return _0x44ed5e;}),this['listenTo'](_0x26bbfc,'change:activeAnnotations',(_0x1a11f5,_0x2f4451,_0xa1b519)=>{const _0x4e0c54=Array['from'](_0xa1b519)['map'](_0x194524=>_0x194524['innerView'])['find'](_0x2ae3b2=>_0x4f96a7['_viewToController']['has'](_0x2ae3b2));if(!_0x4e0c54)return void(_0x3ecee1['activeMarker']=null);const _0x3af4ab=_0x4f96a7['_viewToController']['get'](_0x4e0c54)['model']['id'],_0x2be1c9='comment:'+_0x3af4ab;_0x3af4ab&&_0x3ecee1['hasMarkerForId'](_0x3af4ab)?_0x3ecee1['activeMarker']=_0x2be1c9:_0x3ecee1['activeMarker']&&(_0x3ecee1['activeMarker']=null);}),this['listenTo'](_0x4f96a7,'removeCommentThread',(_0x63ef23,{threadId:_0x5021ff,isFromAdapter:_0x448174})=>{!_0x448174&&_0x340a2e['ui']['focusTracker']['isFocused']&&_0x3ecee1['hasMarkerForId'](_0x5021ff)&&_0x340a2e['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4f96a7,'addComment',(_0x5e87c5,{threadId:_0x56c520,isFromAdapter:_0xdf74a9})=>{!_0xdf74a9&&_0x3ecee1['hasMarkerForId'](_0x56c520)&&_0x4f96a7['hasCommentThread'](_0x56c520)&&0x1===_0x4f96a7['getCommentThread'](_0x56c520)['length']&&(_0x340a2e['editing']['view']['focus'](),_0x5e87c5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4aa001=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1667bf;for(const _0x21714b in _0x4aa001){const _0x2b94eb=_0x21714b,_0x31b266=_0x4aa001[_0x2b94eb];if('commentsLicenseKeyValid'==_0x31b266||'commentsLicenseKeyInvalid'==_0x31b266||'commentsLicenseKeyExpired'==_0x31b266||'commentsLicenseKeyDomainLimit'==_0x31b266||'commentsLicenseKeyNotAllowed'==_0x31b266||'commentsLicenseKeyEvaluationLimit'==_0x31b266||'commentsLicenseKeyUsageLimit'==_0x31b266){delete _0x4aa001[_0x2b94eb],_0x1667bf=_0x31b266,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1667bf&&_0x4aa001['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1667bf&&_0x4aa001['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1667bf&&_0x4aa001['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1667bf&&_0x4aa001['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1667bf&&_0x4aa001['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1667bf&&_0x4aa001['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3b39d9){const _0x1cc7b7=this['editor'],_0x181f5=new _0x3b39d9(_0x1cc7b7['locale']),_0x2c8d29=_0x1cc7b7['commands']['get']('addCommentThread');return _0x181f5['set']({'label':Et(_0x1cc7b7['locale'],'Comment'),'icon':_0x8b81f4}),_0x181f5['bind']('isEnabled')['to'](_0x2c8d29,'isEnabled',_0x2c8d29,'hasContent',(_0xf5ec88,_0x287ca9)=>_0xf5ec88&&_0x287ca9),this['listenTo'](_0x181f5,'execute',()=>{_0x2c8d29['execute']();}),_0x181f5;}},yi=class extends _0x5ae305{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x4989d8){super(_0x4989d8),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x20cea6,_0x1258a8,_0x48fed6)=>{_0x48fed6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x144a0f,_0x54eeaf]of this['editor']['commands'])_0x54eeaf['affectsData']&&'addCommentThread'!==_0x144a0f&&_0x54eeaf['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 _0xaf6749=this['editor']['editing']['view']['document'];this['listenTo'](_0xaf6749,'cut',_0x4c9404=>_0x4c9404['stop'](),{'priority':'highest'}),this['listenTo'](_0xaf6749,'clipboardInput',_0x4c8339=>_0x4c8339['stop'](),{'priority':'highest'}),this['listenTo'](_0xaf6749,'delete',_0x4f28ef=>_0x4f28ef['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1cf505,_0x49f4bc]of this['editor']['commands'])_0x49f4bc['affectsData']&&'addCommentThread'!==_0x1cf505&&_0x49f4bc['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 _0x1cd230{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e75b1){super(_0x1e75b1),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x40012b=this['context']['plugins']['get'](ti);this['listenTo'](_0x40012b,'_activateAnnotation',(_0x128a63,_0x256ab6)=>{for(const _0x4eeca1 of this['activeUIs']){const _0x2898cf=this['_uis']['get'](_0x4eeca1);(0x0,this['uisData']['get'](_0x4eeca1)['filter'])(_0x256ab6)&&_0x2898cf['setActiveAnnotation'](_0x256ab6);}}),this['listenTo'](_0x40012b,'_deactivateAllAnnotations',()=>{for(const _0x3307d1 of this['activeUIs'])this['_uis']['get'](_0x3307d1)['setActiveAnnotation'](null);}),this['listenTo'](_0x40012b['_visibleAnnotations'],'add',(_0x495f4f,_0x1885e7)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1885e7);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x323cdf){return this['activeUIs']['has'](_0x323cdf);}['activate'](_0x37c0b8,_0xdf86a=this['defaultFilter']){const _0x210f4f=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x37c0b8))throw new _0x4272df('annotationsuis-missing-ui',this,{'uiName':_0x37c0b8});this['isActive'](_0x37c0b8)&&this['deactivate'](_0x37c0b8),this['activeUIs']['add'](_0x37c0b8);const _0x2c59c2=new Jt();Qt({'source':_0x210f4f['_visibleAnnotations'],'target':_0x2c59c2,'filter':_0xdf86a}),this['uisData']['set'](_0x37c0b8,{'collection':_0x2c59c2,'filter':_0xdf86a});const _0xcaa6f7=this['_uis']['get'](_0x37c0b8);_0xcaa6f7['attach'](_0x2c59c2),this['listenTo'](_0xcaa6f7,'change:activeAnnotation',(_0x11b03b,_0x593c81,_0x18e1fe,_0x428ad7)=>{_0x428ad7&&_0x210f4f['_removeActiveAnnotation'](_0x428ad7),_0x18e1fe&&_0x210f4f['_addActiveAnnotation'](_0x18e1fe);});}['deactivate'](_0x2f0da6){if(this['activeUIs']['delete'](_0x2f0da6),!this['_uis']['has'](_0x2f0da6))throw new _0x4272df('annotationsuis-missing-ui',this,{'uiName':_0x2f0da6});const _0x3be22d=this['_uis']['get'](_0x2f0da6);_0x3be22d['detach'](),this['stopListening'](_0x3be22d),this['uisData']['get'](_0x2f0da6)['collection']['destroy'](),this['uisData']['delete'](_0x2f0da6);}['switchTo'](_0x362f1c){if(!this['_uis']['has'](_0x362f1c))throw new _0x4272df('annotationsuis-missing-ui',this,{'uiName':_0x362f1c});const _0x534cc8=this['context']['plugins']['get'](ti),_0x5c3484=Array['from'](_0x534cc8['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x362f1c);const _0x472147=this['_uis']['get'](_0x362f1c);_0x472147['setActiveAnnotation'](_0x5c3484),_0x472147['_setSelectedAnnotations']&&_0x5c3484&&_0x472147['_setSelectedAnnotations']([_0x5c3484]);}['deactivateAll'](){for(const _0x20da52 of this['activeUIs'])this['deactivate'](_0x20da52);}['register'](_0x413df8,_0x54ac04){if(this['_uis']['has'](_0x413df8))throw new _0x4272df('annotationsuis-register-already-registered');if('function'!=typeof _0x54ac04['attach']||'function'!=typeof _0x54ac04['detach']||'function'!=typeof _0x54ac04['setActiveAnnotation'])throw new _0x4272df('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x413df8,_0x54ac04);}['refilterAnnotations'](){const _0x15459a=this['context']['plugins']['get'](ti)['collection'],_0x177af5=new Map(),_0x2dcbe2=Array['from'](this['activeUIs']);for(const _0x3ff4db of this['activeUIs']){const _0x1a8adf=this['uisData']['get'](_0x3ff4db)['collection'];for(const _0xe7f247 of _0x1a8adf)_0x177af5['set'](_0xe7f247,_0x3ff4db);}for(const _0x5e25d9 of _0x15459a){const _0x5153b2=_0x177af5['get'](_0x5e25d9);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5e25d9);const _0x5a244a=_0x2dcbe2['find'](_0x712343=>this['uisData']['get'](_0x712343)['filter'](_0x5e25d9));_0x5153b2!==_0x5a244a&&(_0x5153b2&&this['uisData']['get'](_0x5153b2)['collection']['remove'](_0x5e25d9),_0x5a244a&&this['uisData']['get'](_0x5a244a)['collection']['add'](_0x5e25d9));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3a7058){const _0x500496=[];for(const _0x480117 of this['activeUIs']){(0x0,this['uisData']['get'](_0x480117)['filter'])(_0x3a7058)&&_0x500496['push'](_0x480117);}if(_0x500496['length']>0x1)throw new _0x4272df('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x500496,'annotationType':_0x3a7058['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x2afa96('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x252c65){super(_0x252c65);const _0x4abe54=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 _0x4a5771(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4abe54['to']('class')],'style':{'minHeight':_0x4abe54['to']('minHeight',_0x1ba6c6=>'number'==typeof _0x1ba6c6?Ci(_0x1ba6c6+0xa):null)},'dir':_0x252c65['uiLanguageDirection'],'role':'application','aria-label':Et(_0x252c65,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x252c65,'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',_0x590ef3=>{this['_updateItemPositionInFocusables'](_0x590ef3['source']);}),this['list']['forEach'](_0x20466b=>{this['focusTracker']['add'](_0x20466b['element']),this['_updateItemPositionInFocusables'](_0x20466b);}),this['list']['on']('change',(_0x2ae9d4,_0x513c47)=>{for(const _0x359722 of _0x513c47['removed'])this['focusTracker']['remove'](_0x359722['element']),this['focusables']['remove'](_0x359722);for(const _0x4d8224 of _0x513c47['added'])this['focusTracker']['add'](_0x4d8224['element']),this['_updateItemPositionInFocusables'](_0x4d8224);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x239638){const _0x6b1e5d=this['focusables']['getIndex'](_0x239638);let _0xa051b,_0x2d29ab;for(const _0x199488 of this['focusables'])if(_0x239638['top']<_0x199488['top']){_0xa051b=_0x199488;break;}if(_0x2d29ab=_0xa051b?this['focusables']['getIndex'](_0xa051b):this['focusables']['length'],-0x1!==_0x6b1e5d){if(_0x6b1e5d===_0x2d29ab-0x1)return;this['focusables']['remove'](_0x239638),_0x2d29ab=_0xa051b?this['focusables']['getIndex'](_0xa051b):this['focusables']['length'];}this['focusables']['add'](_0x239638,_0x2d29ab);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x2afa96('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x519706){super(_0x519706),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x365bbf,_0x16e620)=>_0x365bbf+_0x16e620),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x531d3f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x531d3f['to']('isAnimationDisabled',_0x45af2c=>_0x45af2c?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x531d3f['to']('top',_0x9c0b5a=>bi(_0x9c0b5a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3fbebb=this['element']['clientHeight'];_0x3fbebb&&(this['height']=_0x3fbebb);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x1cd230{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ce0b3){super(_0x4ce0b3),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 _0x40bb9c=this['context']['config']['get']('sidebar.container');_0x40bb9c&&this['setContainer'](_0x40bb9c);}['setContainer'](_0x8b7279){if(!Oi(_0x8b7279))throw new _0x4272df('sidebar-setcontainer-invalid-element');this['container']=_0x8b7279;}['_attachToContainer']({viewClass:_0x450d3a='',spaceBetweenItems:_0xf6b097=0x19}={}){if(!Oi(this['container']))throw new _0x4272df('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x450d3a,this['_spaceBetweenItems']=_0xf6b097;}['rearrange']({removedAnnotation:_0x1872af,previousAnnotation:_0x5030bb,nextAnnotation:_0x4f1545}){const _0x7b7926=this['getSidebarItemView'](_0x1872af);this['view']['list']['remove'](_0x7b7926),this['_destroySidebarItemView'](_0x1872af),_0x5030bb&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5030bb)),_0x4f1545&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4f1545)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4676d7,activatedAnnotation:_0x127a31,disableAnimationOnActivatedAnnotation:_0x1177e6}){if(this['_activeAnnotation']=_0x127a31,_0x4676d7){_0x4676d7['isActive']=!0x1;const _0x5278d2=this['getSidebarItemView'](_0x4676d7);_0x5278d2&&_0x1177e6&&(_0x5278d2['isAnimationDisabled']=!0x1);}if(_0x127a31){const _0x29a178=this['getSidebarItemView'](_0x127a31);_0x29a178&&(_0x127a31['isActive']=!0x0,_0x1177e6&&(_0x29a178['isAnimationDisabled']=!0x0,_0x29a178['top']+=0x1),this['_alignToTargetRect'](_0x29a178));}}['_detachFromContainer'](_0x1dbd5f){if(this['view']['element']['remove'](),_0x1dbd5f){for(const _0x2ff11c of _0x1dbd5f)this['_destroySidebarItemView'](_0x2ff11c);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5bfac4,_0x566f90){_0x566f90||(_0x566f90=_0x5bfac4['view']);const _0x4d3536=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4d3536,_0x5bfac4),this['_annotationToSidebarItemView']['set'](_0x5bfac4,_0x4d3536),_0x4d3536['content']['add'](_0x566f90),this['listenTo'](_0x5bfac4['view'],'change:targetRect',(_0x3f8bba,_0x4e07ce,_0x399f1b)=>{const _0x23a437=this['_getTargetTop'](_0x5bfac4,_0x399f1b);_0x4d3536['_targetTop']!=_0x23a437&&(_0x4d3536['_targetTop']=_0x23a437,this['_setItemTop'](_0x4d3536,_0x23a437));}),this['listenTo'](_0x4d3536,'change:top',()=>{this['_recalculate'](_0x4d3536,'top');}),this['listenTo'](_0x4d3536,'change:bottom',()=>{this['_recalculate'](_0x4d3536,'bottom');}),this['_alignToTargetRect'](_0x4d3536);const _0x4e66e4=this['_getItemBefore'](_0x4d3536);return _0x4e66e4&&this['_alignAfterItem'](_0x4e66e4,_0x4d3536)||this['_alignToTargetRect'](_0x4d3536),this['_updateLastItem'](),this['view']['list']['add'](_0x4d3536),_0x4d3536;}['_alignForTopChange'](_0x1b1af5){if(!_0x1b1af5['content']['length'])return;const _0xb09f45=this['_getItemBefore'](_0x1b1af5);if(!_0xb09f45)return;const _0x1cc0d7=this['_sidebarItemViewToAnnotation']['get'](_0xb09f45),_0x278a7d=this['_activeAnnotation'];_0x278a7d&&_0x278a7d===_0x1cc0d7?this['_alignAfterItem'](_0xb09f45,_0x1b1af5):this['_alignBeforeItem'](_0x1b1af5,_0xb09f45);}['_alignForBottomChange'](_0x37d02f){if(!_0x37d02f['content']['length'])return;const _0x2db225=this['_getItemAfter'](_0x37d02f);if(!_0x2db225)return;const _0xbaab7b=this['_sidebarItemViewToAnnotation']['get'](_0x2db225),_0x30f172=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5c1065=this['_activeAnnotation'];_0x5c1065&&_0x5c1065===_0xbaab7b&&_0x30f172?(this['_alignBeforeItem'](_0x2db225,_0x37d02f),this['_alignAfterItem'](_0x37d02f,_0x2db225)):_0x5c1065&&_0x5c1065===_0xbaab7b?this['_alignBeforeItem'](_0x2db225,_0x37d02f):this['_alignAfterItem'](_0x37d02f,_0x2db225);}['_recalculate'](_0x42f161,_0x5238){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5e8503,changedProp:_0x45628f}of this['_recalculateBuffer'])'top'===_0x45628f?this['_alignForTopChange'](_0x5e8503):this['_alignForBottomChange'](_0x5e8503);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x42f161,'changedProp':_0x5238});}['getSidebarItemView'](_0x1fb1eb){return this['_annotationToSidebarItemView']['get'](_0x1fb1eb);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4eec6a){const _0x51d675=this['getSidebarItemView'](_0x4eec6a);this['stopListening'](_0x51d675),this['stopListening'](_0x4eec6a['view']),_0x51d675['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4eec6a),this['_sidebarItemViewToAnnotation']['delete'](_0x51d675);}['_createSidebarView'](){const _0x2ca7aa=new Ii(this['context']['locale']);return _0x2ca7aa['render'](),this['on']('change:_lastItem',(_0x334a9c,_0x557e07,_0x3a4e89,_0x32ca71)=>{_0x32ca71&&_0x2ca7aa['unbind']('minHeight'),_0x3a4e89?_0x2ca7aa['bind']('minHeight')['to'](_0x3a4e89,'bottom'):_0x2ca7aa['minHeight']=null;}),_0x2ca7aa;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x28a30a){const _0xcf7592=this['_sidebarItemViewToAnnotation']['get'](_0x28a30a),_0x1dd7a0=_0xcf7592&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xcf7592)-0x1);return _0x1dd7a0&&this['getSidebarItemView'](_0x1dd7a0)||null;}['_getItemAfter'](_0x272031){const _0x59093b=this['_sidebarItemViewToAnnotation']['get'](_0x272031),_0x46f8cc=_0x59093b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x59093b)+0x1);return _0x46f8cc&&this['getSidebarItemView'](_0x46f8cc)||null;}['_alignBeforeItem'](_0x2669b0,_0x2f5e45){_0x2669b0['updateHeight']();const _0x34d033=Ni(_0x2f5e45['bottom']+this['_spaceBetweenItems'],_0x2669b0['top']);return!!_0x34d033&&(this['_setItemTop'](_0x2f5e45,_0x2f5e45['top']-_0x34d033),!0x0);}['_alignAfterItem'](_0x4ac390,_0x46da09){_0x4ac390['updateHeight']();const _0x588165=Ni(_0x4ac390['bottom']+this['_spaceBetweenItems'],_0x46da09['top']);return!!_0x588165&&(this['_setItemTop'](_0x46da09,_0x46da09['top']+_0x588165,!0x1),!0x0);}['_alignToTargetRect'](_0x2445c9){const _0x334ef4=this['_sidebarItemViewToAnnotation']['get'](_0x2445c9);if(!_0x334ef4||!_0x334ef4['target']||!_0x334ef4['targetRect'])return;const _0x66ce57=this['_getTargetTop'](_0x334ef4,_0x334ef4['targetRect']);this['_setItemTop'](_0x2445c9,_0x66ce57);}['_getTargetTop'](_0x3a7048,_0x528981){if(null===_0x528981)return 0x0;if(_0x3a7048['target']instanceof _0x5e0764)return _0x528981['top'];{const _0x35d611=new _0x5e0764(this['view']['element'])['top'];return _0x528981['top']-_0x35d611;}}['_setItemTop'](_0x1be76d,_0x5e973e,_0x4ee45b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x4ee45b&&(_0x5e973e=Math['max'](_0x5e973e,this['_getMaxAvailableTop'](_0x1be76d))),_0x1be76d['top']=_0x5e973e;}['_getMaxAvailableTop'](_0x3b2357){let _0x3927b7=this['_getItemBefore'](_0x3b2357),_0x24d639=0x0;for(;_0x3927b7;)_0x3927b7['updateHeight'](),_0x24d639+=this['_spaceBetweenItems']+_0x3927b7['height'],_0x3927b7=this['_getItemBefore'](_0x3927b7);return _0x24d639;}};function Ni(_0x5c2cb2,_0x28f588){return Math['max'](_0x5c2cb2-_0x28f588,0x0);}function Oi(_0x1bd48d){return null!==_0x1bd48d&&'object'==typeof _0x1bd48d&&0x1===_0x1bd48d['nodeType'];}var Mi=class extends _0x1cd230{['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(_0x858c78){super(_0x858c78),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x353113(),this['_refreshPositioningDebounced']=_0x8623cc(()=>{_0x858c78['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2d1077=this['context']['plugins']['get'](Ti),_0x4cce97=this['context']['plugins']['get'](ki);_0x2d1077['register']('wideSidebar',this),_0x4cce97['container']&&_0x2d1077['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x20068a){if(_0x20068a===this['activeAnnotation'])return;const _0x105832=this['context']['plugins']['get'](ki);_0x105832['_activeAnnotation']=_0x20068a;const _0xfcc6fe=this['activeAnnotation'];_0x105832['refresh']({'blurredAnnotation':_0xfcc6fe,'activatedAnnotation':_0x20068a}),this['activeAnnotation']=_0x20068a;}['attach'](_0x8ba170){this['annotations']=_0x8ba170;const _0x4e6872=this['context']['plugins']['get'](ki);if(_0x4e6872['_annotations']=_0x8ba170,this['isAttached'])throw new _0x4272df('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4e6872,'set:container',()=>{this['detach'](),this['listenTo'](_0x4e6872,'change:container',_0x3e5da1=>{_0x3e5da1['off'](),this['attach'](_0x8ba170);});}),_0x4e6872['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4c559e=_0x95200e=>{_0x95200e['updateTargetRect'](),_0x4e6872['addAnnotation'](_0x95200e);};for(const _0x2bdf93 of _0x8ba170)_0x4c559e(_0x2bdf93);this['listenTo'](_0x8ba170,'add',(_0x12ed7e,_0x250f79)=>{_0x4c559e(_0x250f79);}),this['listenTo'](_0x8ba170,'remove',(_0x367b19,_0x527227,_0x2153ce)=>{_0x4e6872['rearrange']({'removedAnnotation':_0x527227,'previousAnnotation':_0x8ba170['get'](_0x2153ce-0x1),'nextAnnotation':_0x8ba170['get'](_0x2153ce+0x1)}),_0x527227===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x8ba170,'focus',(_0x5163d3,_0x29a7d7)=>{this['setActiveAnnotation'](_0x29a7d7);}),this['listenTo'](_0x8ba170,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1f0c06=this['context']instanceof _0x22859e?this['context']['editors']:new _0x353113([this['context']]);for(const _0x46b160 of _0x1f0c06)this['_integrateWithEditorAnnotations'](_0x46b160);this['listenTo'](_0x1f0c06,'add',(_0x429ef5,_0x5daf51)=>{this['listenTo'](_0x5daf51,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5daf51);});}),this['listenTo'](_0x1f0c06,'remove',(_0x35ee5b,_0x2533d3)=>{_0x2533d3['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2533d3['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4272df('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1a01a6=this['context']['plugins']['get'](ki);_0x1a01a6['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1a01a6),this['stopListening'](this['annotations']),this['context']instanceof _0x22859e&&this['stopListening'](this['context']['editors']);for(const _0x586e1f of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x586e1f);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2a3db6){if(!_0x2a3db6['plugins']['has']('EditorAnnotations'))return;const _0xc673db=_0x2a3db6['plugins']['get']('EditorAnnotations'),_0x2e5cdb=()=>{const _0x2899da=_0xc673db['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2899da[0x0]||null);};this['listenTo'](_0xc673db,'refresh',_0x2e5cdb),this['listenTo'](_0xc673db,'blur',(_0x14a884,{isAnnotationTracked:_0x4ccb40})=>{this['activeAnnotation']&&_0x4ccb40(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xc673db,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xe8b65a=>{_0xc673db['hasDomSelection']()&&(_0x2e5cdb(),_0xe8b65a['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xc673db);}['_destroyEditorAnnotationsIntegration'](_0x405aab){this['stopListening'](_0x405aab),this['_editorAnnotations']['remove'](_0x405aab);}},Ri=class extends _0x4d221b{['counterView'];constructor(_0x177aae){super(_0x177aae);const _0x35bf14=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5c5db3,_0xd74565)=>_0x5c5db3?'...':_0xd74565['toString']()),this['set']('annotationType',''),this['icon']=_0x8b81f4,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x35bf14['to']('annotationType',_0x42977c=>'ck-annotation-counter__badge--'+_0x42977c),_0x35bf14['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x35bf14['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x1cd230{['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(_0x5002f2){super(_0x5002f2),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xa38af1())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x353113(),this['_refreshPositioningDebounced']=_0x8623cc(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2e4ef4(this['context']['locale']),this['balloonPanelView']=new _0x14119e(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2904b1){this['annotations']=_0x2904b1;const _0x28ecab=this['context']['plugins']['get'](ki),_0x3f4583=this['balloonPanelView'];if(_0x28ecab['_annotations']=_0x2904b1,this['isAttached'])throw new _0x4272df('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x28ecab,'set:container',()=>{this['detach'](),this['listenTo'](_0x28ecab,'change:container',_0x4540c1=>{_0x4540c1['off'](),this['attach'](_0x2904b1);});}),_0x28ecab['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xa74540=_0x5c2d68=>{const _0x161b82=new Ri(this['context']['locale']);_0x28ecab['addAnnotation'](_0x5c2d68,_0x161b82),this['_annotationToNarrowView']['set'](_0x5c2d68,_0x161b82),_0x161b82['bind']('isDirty','annotationType','number')['to'](_0x5c2d68['view'],'isDirty','type','length'),_0x161b82['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3f4583['content']['first']!==_0x5c2d68['view']?(this['_showBalloon'](_0x5c2d68),_0x5c2d68['view']['element']['focus'](),this['setActiveAnnotation'](_0x5c2d68)):this['setActiveAnnotation'](null);});};for(const _0x1a06b9 of _0x2904b1)_0xa74540(_0x1a06b9);this['listenTo'](_0x2904b1,'add',(_0x1a127c,_0x5f5165)=>{_0xa74540(_0x5f5165);}),this['listenTo'](_0x2904b1,'remove',(_0x20b6f8,_0x29a81d,_0x591ef5)=>{this['_annotationToNarrowView']['get'](_0x29a81d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x29a81d),_0x28ecab['rearrange']({'removedAnnotation':_0x29a81d,'previousAnnotation':_0x2904b1['get'](_0x591ef5-0x1),'nextAnnotation':_0x2904b1['get'](_0x591ef5+0x1)}),_0x29a81d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2904b1,'focus',(_0x82c2e2,_0x534e53)=>{this['setActiveAnnotation'](_0x534e53);}),this['listenTo'](_0x2904b1,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x178a67,_0x1638f6)=>{_0x1638f6['keyCode']===_0x1f912e['esc']&&_0x3f4583['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3f4583['content']['first']),this['_hideBalloon'](),_0x1638f6['stopPropagation'](),_0x1638f6['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1ce0b0,_0x2bec9c)=>{const _0x42a71c=_0x2bec9c['target'];_0x3f4583['isVisible']&&_0x3f4583['element']['contains'](_0x42a71c)||_0x28ecab['view']['element']['contains'](_0x42a71c)||_0x1ce0b0['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x5b0c20=>_0x5b0c20['contains'](_0x42a71c))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x49f5a5=this['context']instanceof _0x22859e?this['context']['editors']:new _0x353113([this['context']]);for(const _0x578aba of _0x49f5a5)this['_integrateWithEditorAnnotations'](_0x578aba);this['listenTo'](_0x49f5a5,'add',(_0x52ba05,_0x533c1d)=>{this['listenTo'](_0x533c1d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x533c1d);});}),this['listenTo'](_0x49f5a5,'remove',(_0x4db6b8,_0x32e502)=>{_0x32e502['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x32e502['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x6f061a){if(_0x6f061a===this['activeAnnotation'])return;const _0x4b2c78=this['context']['plugins']['get'](ki);_0x4b2c78['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x6f061a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x6f061a&&_0x4b2c78['getSidebarItemView'](_0x6f061a)?this['_showBalloon'](_0x6f061a):this['_hideBalloon'](),this['activeAnnotation']=_0x6f061a;}['detach'](){if(!this['isAttached'])throw new _0x4272df('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1012c2=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xa0a92b=>_0xa0a92b['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1012c2['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x22859e&&this['stopListening'](this['context']['editors']);for(const _0x3fbca5 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3fbca5);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'](_0x5214cf){if(!_0x5214cf['plugins']['has']('EditorAnnotations'))return;const _0x4e8854=_0x5214cf['plugins']['get']('EditorAnnotations'),_0x1a7a72=this['context']['plugins']['get'](ki),_0x4bde18=this['annotations'],_0x1483a8=this['balloonPanelView'],_0x3b68c2=()=>{const _0x34f045=_0x4e8854['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x34f045),this['setActiveAnnotation'](_0x34f045[0x0]||null);};this['listenTo'](_0x4e8854,'refresh',_0x3b68c2),this['listenTo'](_0x4e8854,'blur',(_0x19f4ec,{isAnnotationTracked:_0xe31aeb})=>{this['activeAnnotation']&&_0xe31aeb(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4e8854,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4bde18,'blur',_0x36214c=>{_0x4e8854['hasDomSelection']()&&_0x36214c['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x378cdb,_0x148a66)=>{const _0x147bab=_0x148a66['target'];_0x1483a8['isVisible']&&_0x1483a8['element']['contains'](_0x147bab)||_0x1a7a72['view']['element']['contains'](_0x147bab)||this['activeAnnotation']&&_0x4e8854['hasDomSelection']()&&(_0x3b68c2(),_0x378cdb['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4e8854);}['_destroyEditorAnnotationsIntegration'](_0x1aebdd){_0x1aebdd&&(this['stopListening'](_0x1aebdd),this['_editorAnnotations']['remove'](_0x1aebdd));}['_setSelectedAnnotations'](_0x1a1a3b){for(const _0x4595ae of this['_selectedAnnotations'])_0x1a1a3b['includes'](_0x4595ae)||this['_manuallyClosedAnnotationViews']['delete'](_0x4595ae['view']);this['_selectedAnnotations']=_0x1a1a3b;}['_refreshPositioning'](){const _0x49e2c2=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x49e2c2['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xec0c1e){if(this['_manuallyClosedAnnotationViews']['has'](_0xec0c1e['view']))return;const _0x123414=this['balloonPanelView']['content']['first'];_0x123414!==_0xec0c1e['view']?(_0x123414&&this['_detachListeners'](_0x123414),this['_attachListeners'](_0xec0c1e['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xec0c1e['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3b12b3=this['balloonPanelView']['content']['first'],_0x4c1dad=_0x3b12b3&&this['annotations']['getByView'](_0x3b12b3);if(!_0x4c1dad||!this['_annotationToNarrowView']['has'](_0x4c1dad))return;const _0x4fcefa=this['_annotationToNarrowView']['get'](_0x4c1dad)['element'],_0x87001=(function(){const _0x5cf84c=_0x14119e['defaultPositions'];return[_0x5cf84c['southArrowNorthEast'],_0x5cf84c['northArrowSouthEast'],_0x5cf84c['southArrowNorth'],_0x5cf84c['northArrowSouth'],_0x5cf84c['southArrowNorthWest'],_0x5cf84c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4fcefa,'positions':_0x87001});}['_hideBalloon'](){const _0xa97c9b=this['balloonPanelView'],_0x296456=_0xa97c9b['content']['first'];_0x296456&&(this['_detachListeners'](_0x296456),_0xa97c9b['unpin'](),_0xa97c9b['content']['clear']());}['_attachListeners'](_0x497bf0){this['listenTo'](_0x497bf0,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x497bf0,'Esc',(_0x27b591,_0x4c662c)=>{this['_manuallyClosedAnnotationViews']['add'](_0x497bf0),this['_hideBalloon'](),_0x4c662c();});}['_detachListeners'](_0x4e5c0b){this['stopListening'](_0x4e5c0b);}},xi=class extends _0x5ae305{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x34b916,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xaa2c4e){super(_0xaa2c4e),_0xaa2c4e['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xaa2c4e['plugins']['get'](_0x34b916),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x8623cc(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x49f990=this['editor']['plugins']['get'](Ti);_0x49f990['context']===this['editor']&&(_0x49f990['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x5e5465,_0x53622c)=>{const _0x2bbff8=this['_balloon'];if(this['isAttached']&&_0x2bbff8['visibleView']){const _0x194788=this['annotations']['getByView'](_0x2bbff8['visibleView']);_0x194788&&this['_closeAnnotation'](_0x194788),_0x53622c();}}));}['afterInit'](){const _0x2042bb=this['editor']['plugins']['get'](Ti);_0x2042bb['context']===this['editor']&&(_0x2042bb['hasActive']()||_0x2042bb['switchTo']('inline'));}['setActiveAnnotation'](_0x887f57){_0x887f57!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x887f57&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x887f57)&&this['_addAnnotationToBalloon'](_0x887f57,!0x0),_0x887f57['isActive']=!0x0),_0x887f57||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x887f57);}['attach'](_0x13e42b){this['annotations']=_0x13e42b;const _0x41b253=this['editor']['plugins']['get'](Ti),_0x5e1b08=this['_balloon'];if(this['isAttached'])throw new _0x4272df('inlineannotations-attach-already-attached',this);if(_0x41b253['context']!==this['editor'])throw new _0x4272df('inlineannotations-not-allowed-with-context',this);const _0x3bf50d=this['editor']['plugins']['get'](di);this['listenTo'](_0x3bf50d,'refresh',()=>{const _0x81a179=_0x3bf50d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x25d25b,_0x43554d;!this['_forceRefresh']&&(_0x25d25b=_0x81a179,_0x43554d=this['_selectedAnnotations'],_0x25d25b['length']===_0x43554d['length']&&_0x25d25b['every'](_0x4154c8=>_0x43554d['includes'](_0x4154c8)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x81a179),this['setActiveAnnotation'](_0x81a179[0x0]||null));}),this['listenTo'](_0x3bf50d,'blur',(_0x56dae1,{isAnnotationTracked:_0x13fb48})=>{this['activeAnnotation']&&_0x13fb48(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3bf50d,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4c1ba3,_0x2d0aa3,_0x1de881)=>{_0x1de881||this['setActiveAnnotation'](null);}),this['listenTo'](_0x13e42b,'remove',(_0x2aab4e,_0x457731)=>{this['_removeAnnotationFromBalloon'](_0x457731),_0x457731===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5e1b08,'change:visibleView',(_0x15245e,_0x52033b,_0x196d0b,_0x344495)=>{_0x344495&&this['stopListening'](_0x344495);const _0x366d27=_0x13e42b['getByView'](_0x196d0b);_0x196d0b&&_0x366d27&&(this['listenTo'](_0x196d0b,'change:height',()=>{_0x5e1b08['updatePosition']();}),this['listenTo'](_0x196d0b,'Esc',()=>{this['_closeAnnotation'](_0x366d27),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x366d27&&this['setActiveAnnotation'](_0x366d27));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5e1b08['visibleView']&&_0x13e42b['getByView'](_0x5e1b08['visibleView'])&&_0x5e1b08['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 _0x4272df('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2df376 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2df376);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x6ed389){for(const _0x375df9 of this['_selectedAnnotations'])_0x6ed389['includes'](_0x375df9)||this['_manuallyClosed']['delete'](_0x375df9);for(const _0x1640d1 of this['annotations'])_0x6ed389['includes'](_0x1640d1)||this['_removeAnnotationFromBalloon'](_0x1640d1);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x77941a of _0x6ed389)this['_addAnnotationToBalloon'](_0x77941a);}this['_selectedAnnotations']=_0x6ed389;}['_addAnnotationToBalloon'](_0xef3835,_0x4cb0b2=!0x1){this['_manuallyClosed']['has'](_0xef3835)||(this['_addedAnnotations']['has'](_0xef3835)||this['_balloon']['hasView'](_0xef3835['view'])||(this['_addedAnnotations']['add'](_0xef3835),this['_balloon']['add']({'stackId':_0xef3835['view']['id'],'view':_0xef3835['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xef3835)}})),_0x4cb0b2&&this['_balloon']['showStack'](_0xef3835['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4a96be){const _0x573c35=_0x4a96be['target'],_0x114e32=this['editor']['editing']['view'],_0x42e66=_0x114e32['document']['selection']['getFirstRange'](),_0x2aee20=_0x114e32['domConverter']['viewRangeToDom'](_0x42e66);if(_0x2aee20['collapse'](!0x0),_0x573c35){if(_0x573c35 instanceof _0x5e0764)return _0x573c35;let _0x49a46a=[];for(const _0x1b1585 of _0x573c35)_0x49a46a['push'](..._0x5e0764['getDomElementRects'](_0x1b1585));_0x49a46a=function(_0x1adc4c){const _0x198f1c=[];let _0xb13e3e=_0x1adc4c[0x0];for(let _0xbf14bf=0x1;_0xbf14bf<_0x1adc4c['length'];_0xbf14bf++)if(Pi(_0xb13e3e,_0x1adc4c[_0xbf14bf])){const _0x1a9727=_0x1adc4c[_0xbf14bf]['width'];_0xb13e3e['width']+=_0x1a9727,_0xb13e3e['right']+=_0x1a9727;}else _0x198f1c['push'](_0xb13e3e),_0xb13e3e=_0x1adc4c[_0xbf14bf];return _0x198f1c['push'](_0xb13e3e),_0x198f1c;}(_0x49a46a);const _0x239f67=_0x2aee20['getBoundingClientRect']();return _0x49a46a['find'](_0x537b6a=>_0x537b6a['top']<=_0x239f67['top']&&_0x537b6a['bottom']>=_0x239f67['bottom']&&_0x537b6a['left']<=_0x239f67['left']&&_0x537b6a['right']>=_0x239f67['right'])||_0x49a46a[0x0];}return _0x4a96be['targetRect']||_0x2aee20;}['_removeAnnotationFromBalloon'](_0x4cb168){this['_addedAnnotations']['has'](_0x4cb168)&&this['_balloon']['hasView'](_0x4cb168['view'])&&(this['_addedAnnotations']['delete'](_0x4cb168),this['_balloon']['remove'](_0x4cb168['view']));}['_closeAnnotation'](_0x11c1f1){this['_manuallyClosed']['add'](_0x11c1f1),this['_removeAnnotationFromBalloon'](_0x11c1f1);}};function Pi(_0x268042,_0x2b6bb8){return _0x268042['top']===_0x2b6bb8['top']&&_0x268042['bottom']===_0x2b6bb8['bottom']&&_0x268042['right']===_0x2b6bb8['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x186ff3,_0x349f99){super(_0x186ff3),this['set']('isEmpty',!_0x349f99['length']),this['focusTracker']=new _0x4a5771(),this['_annotationViews']=_0x349f99,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x349f99,'focusTracker':this['focusTracker']}),this['listenTo'](_0x349f99,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x349f99,'remove',(_0x16eec8,_0x292632)=>{_0x292632['isActive']&&this['focus'](),_0x349f99['length']||(this['isEmpty']=!0x0);});const _0x1fb74d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x186ff3,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x349f99},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1fb74d['if']('isEmpty','ck-hidden',_0x458ee2=>!_0x458ee2)]},'children':[{'text':Et(_0x186ff3,'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 _0x313f14 of this['_annotationViews'])this['focusTracker']['add'](_0x313f14['element']);this['_annotationViews']['on']('change',(_0x18f6fc,{added:_0x5be9fc,removed:_0xd31946})=>{for(const _0x560874 of _0x5be9fc)this['focusTracker']['add'](_0x560874['element']);for(const _0xdf560b of _0xd31946)this['focusTracker']['remove'](_0xdf560b['element']);});}},Di=class extends _0x1cd230{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x8d5045){super(_0x8d5045),this['archivedThreads']=new _0x353113();}['init'](){const _0x4dc7d6=this['context'],_0x312b7f=_0x4dc7d6['plugins']['get'](oi),_0xae2698=_0x4dc7d6['plugins']['get'](ti);this['listenTo'](_0x312b7f,'addCommentThread',(_0x2133df,{threadId:_0x53e39f})=>{const _0x5449e2=_0x312b7f['getCommentThread'](_0x53e39f);_0x5449e2['archivedAt']&&this['archivedThreads']['add'](_0x5449e2,this['_calculatePosition'](_0x5449e2['archivedAt'])),this['listenTo'](_0x5449e2,'change:archivedAt',(_0x163815,_0x421134,_0x35f3b0)=>{_0x35f3b0?this['archivedThreads']['has'](_0x5449e2)||this['archivedThreads']['add'](_0x5449e2,this['_calculatePosition'](_0x5449e2['archivedAt'])):this['archivedThreads']['has'](_0x5449e2)&&this['archivedThreads']['remove'](_0x5449e2);});}),this['listenTo'](_0x312b7f,'removeCommentThread',(_0x41450c,{threadId:_0x26ae2a})=>{const _0x506bc0=_0x312b7f['getCommentThread'](_0x26ae2a);this['stopListening'](_0x506bc0),this['archivedThreads']['has'](_0x506bc0)&&this['archivedThreads']['remove'](_0x506bc0);},{'priority':'highest'}),this['listenTo'](_0xae2698['collection'],'focus',(_0x103047,_0x2b28ed)=>{_0x2b28ed['isVisible']||(_0x2b28ed['isActive']=!0x0,_0xae2698['activate'](_0x2b28ed));});}['_calculatePosition'](_0x1d37fb){const _0x130cde=[...this['archivedThreads']]['findIndex'](_0xd40573=>_0xd40573['archivedAt']<_0x1d37fb);return _0x130cde>-0x1?_0x130cde:this['archivedThreads']['length'];}},Vi=class extends _0x5ae305{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0xc020e8];}constructor(_0x2e5b7d){super(_0x2e5b7d),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x2b448b=this['editor'],_0x168ad9=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2b448b['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4d221b,!0x0)),_0x2b448b['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3369d8=this['_createCommentsArchiveButton'](rt);return _0x3369d8['set']({'role':'menuitemcheckbox'}),_0x3369d8;});const _0x2fabf7=_0x2b448b['plugins']['get'](Di),_0x4edf79=_0x2b448b['plugins']['get']('Annotations'),_0x4a19e8=_0x2b448b['plugins']['get']('CommentsRepository');_0x2fabf7['archivedThreads']['forEach'](_0x421b06=>{this['_handleNewThread'](_0x421b06);}),this['listenTo'](_0x2fabf7['archivedThreads'],'add',(_0x2f2a0c,_0x1af609)=>{this['_handleNewThread'](_0x1af609);}),this['listenTo'](_0x4edf79['collection'],'add',(_0x5185d6,_0x5b6b01)=>{const _0x2fe123=this['_pendingThreads']['find'](_0x1fa7a7=>{const _0x495f73=_0x4a19e8['_threadToController']['get'](_0x1fa7a7);return _0x495f73&&_0x5b6b01['innerView']===_0x495f73['view'];});if(_0x2fe123){const _0x472ddf=this['_calculatePosition'](_0x2fe123['archivedAt']);this['_addAnnotationToArchive'](_0x5b6b01,_0x472ddf),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2fe123),0x1);}}),this['listenTo'](_0x2fabf7['archivedThreads'],'remove',(_0x34f68a,_0x451da1)=>{const _0x386034=_0x2b448b['config']['get']('collaboration.channelId');if(!_0x386034||_0x451da1['channelId']===_0x386034){if(this['_pendingThreads']['includes'](_0x451da1))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x451da1),0x1);else{const _0x34a555=_0x4a19e8['_threadToController']['get'](_0x451da1),_0x78a817=_0x4edf79['getByInnerView'](_0x34a555['view']);this['annotationViews']['remove'](_0x78a817['view']),this['stopListening'](_0x78a817),this['stopListening'](_0x78a817['focusableElements']);}}}),this['listenTo'](_0x4edf79['collection'],'add',(_0x36ef7d,_0x339ac2)=>{this['listenTo'](_0x339ac2,'escape',_0x168ad9);}),this['listenTo'](_0x4edf79['collection'],'remove',(_0x25cd23,_0x23bc3a)=>{this['stopListening'](_0x23bc3a,'escape',_0x168ad9);});}['_addAnnotationToArchive'](_0x227216,_0x52127c){this['listenTo'](_0x227216,'set:isVisible',_0x5cb65a=>{_0x5cb65a['return']=!0x1,_0x5cb65a['stop']();}),this['annotationViews']['add'](_0x227216['view'],_0x52127c);}['_handleNewThread'](_0x2eb843){const _0x4ea06b=this['editor']['plugins']['get']('CommentsRepository'),_0x271364=this['editor']['plugins']['get']('Annotations'),_0x1a3329=this['editor']['config']['get']('collaboration.channelId');if(!_0x1a3329||_0x2eb843['channelId']===_0x1a3329){const _0x4d5e65=_0x4ea06b['_threadToController']['get'](_0x2eb843);if(!_0x4d5e65)return void this['_pendingThreads']['push'](_0x2eb843);const _0xa599b6=this['_calculatePosition'](_0x2eb843['archivedAt']),_0x57fa2e=_0x271364['getByInnerView'](_0x4d5e65['view']);_0x57fa2e['isVisible']&&_0x271364['_visibleAnnotations']['remove'](_0x57fa2e),this['_addAnnotationToArchive'](_0x57fa2e,_0xa599b6);}}['_calculatePosition'](_0x4e7a73){const _0x5b08d6=this['editor']['config']['get']('collaboration.channelId'),_0x326c75=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x8c5ed8=>_0x8c5ed8['channelId']===_0x5b08d6)['findIndex'](_0x5ae882=>_0x5ae882['archivedAt']<_0x4e7a73);return _0x326c75<0x0||_0x326c75>this['annotationViews']['length']?this['annotationViews']['length']:_0x326c75-0x1;}['_toggleDialog'](){const _0x54dbb2=this['editor'],_0x3dd63f=_0x54dbb2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x54dbb2['locale'],this['annotationViews'])),'commentsArchive'===_0x3dd63f['id']?_0x3dd63f['hide']():_0x3dd63f['show']({'id':'commentsArchive','title':Et(_0x54dbb2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4271cd,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1c8870['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4442df,_0x262e25=!0x1){const _0x12bd31=this['editor']['locale'],_0x575793=this['editor']['plugins']['get']('Dialog'),_0x18a4ce=new _0x4442df(_0x12bd31);return _0x18a4ce['bind']('isEnabled')['to'](this,'isEnabled'),_0x18a4ce['bind']('isOn')['to'](_0x575793,'id',_0x1472b3=>'commentsArchive'===_0x1472b3),_0x18a4ce['set']({'label':Et(_0x12bd31,'COMMENTS_ARCHIVE'),'icon':_0x4271cd,'isToggleable':!0x0}),_0x262e25&&(_0x18a4ce['tooltip']=!0x0),this['listenTo'](_0x18a4ce,'execute',()=>this['_toggleDialog']()),_0x18a4ce;}['_hideDialogOnAnnotationEscape']=_0x167cf8=>{const _0xed39dc=_0x167cf8['source'];if(!this['annotationViews']['has'](_0xed39dc['view']))return;const _0x5bfce3=this['editor']['plugins']['get']('Dialog');_0x5bfce3['isOpen']&&'commentsArchive'===_0x5bfce3['id']&&(_0x5bfce3['hide'](),_0x167cf8['stop']());};},Bi=class extends _0x5ae305{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};