@ckeditor/ckeditor5-comments 48.0.0-alpha.3 → 48.0.0-alpha.4

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{Editor as _0x39dfe2,ContextPlugin as _0x10d0b1,PendingActions as _0x444982,Command as _0x3391ec,Plugin as _0x313055,Context as _0x1ff8d6}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x2628bf,uid as _0x564643,KeystrokeHandler as _0x3e4064,FocusTracker as _0x5d8869,diff as _0x4f864a,Collection as _0xb591f1,Rect as _0x511c86,CKEditorError as _0x495de2,first as _0x52e0d0,priorities as _0x5d4f03,scrollViewportToShowTarget as _0x4afd41,getEnvKeystrokeText as _0x1f7355,toUnit as _0x20d3f4,DomEmitterMixin as _0x215ca8,keyCodes as _0x12424a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2731b9,AriaDescriptionView as _0xca66aa,setupThreadKeyboardNavigation as _0x2ae185,ConfirmMixin as _0x5b3b9a,LateFocusButtonView as _0x2a5953,trimHtml as _0x3732f0,LateFocusDropdownButtonView as _0x556a74,FOCUS_ANNOTATION_KEYSTROKE as _0x71ab79,Users as _0x52a3ef,getDateTimeFormatter as _0x36995e,hashObject as _0xc59992,getAllMarkersDomElementsSorted as _0x2182b9,surroundingMarkersDetector as _0x165753}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0xd8eb54,cloneDeep as _0x175e20,set as _0x27e629,unset as _0x2ddb6b,isEqual as _0x21cea6,debounce as _0x5daa54}from'es-toolkit/compat';import{IconUndo as _0x549237,IconCheck as _0x4f7bc3,IconPencil as _0x4c3864,IconRemoveComment as _0x494648,IconThreeVerticalDots as _0x6abf05,IconAddComment as _0x24ff5b,IconCommentsArchive as _0x3deeef}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x5324d7,InlineEditableUIView as _0x587ab3,EditorUI as _0x5eecb5,View as _0x40361,FocusCycler as _0x89dbb6,ButtonView as _0xaaf754,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
24
- _0x2628bf(){['model'];['view'];constructor(_0x3ba62e,_0x57e2f3){super(),this['model']=_0x3ba62e,this['model']['_isAttached']=!0x0,this['view']=_0x57e2f3,this['listenTo'](_0x57e2f3,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x57e2f3,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x57e2f3,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x57e2f3,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x57e2f3,'addComment',(_0x3e9b38,_0xef6516)=>this['addComment'](_0xef6516)),this['listenTo'](_0x57e2f3,'updateComment',(_0x1fc40d,_0x3ac6e1,_0xce666b)=>this['updateComment'](_0x3ac6e1,_0xce666b)),this['listenTo'](_0x57e2f3,'removeComment',(_0x11e08b,_0x210a56)=>this['removeComment'](_0x210a56));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x330809){this['model']['addComment']({'content':_0x330809,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x121081,_0x82b2e6){this['model']['getComment'](_0x121081)['update']({'content':_0x82b2e6});}['removeComment'](_0x308779){this['model']['getComment'](_0x308779)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x562947,_0x51348f,_0x26f337){const t=_0x562947['t'];switch(_0x51348f){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'},_0x26f337);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x26f337);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'},_0x26f337);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'},_0x26f337);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x26f337);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'},_0x26f337);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'},_0x26f337);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'},_0x26f337);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Et extends _0x5324d7{['main'];['editable'];constructor(_0x389b27,_0x13b964){super(_0x389b27);const _0x1fea02=_0x564643();this['main']=this['createCollection'](),this['editable']=new _0x587ab3(_0x389b27,_0x13b964,void 0x0,{'label':()=>bt(_0x389b27,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x389b27['uiLanguageDirection'],'lang':_0x389b27['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x1fea02},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Nt extends _0x5eecb5{['view'];constructor(_0x522e81){super(_0x522e81),this['view']=new Et(_0x522e81['locale'],_0x522e81['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1ba0da=this['editor']['editing']['view'],_0xfc96e1=this['view']['editable'],_0x2be9c3=_0x1ba0da['document']['getRoot']();_0xfc96e1['name']=_0x2be9c3['rootName'],this['view']['render']();const _0x3e2ab5=_0xfc96e1['element'];this['setEditableElement'](_0xfc96e1['name'],_0x3e2ab5),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1ba0da['attachDomRoot'](_0x3e2ab5),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
25
- _0x2628bf(_0x39dfe2){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>kt)());constructor(_0x145104={}){function _0x4e79ea(_0x59137d){return _0x59137d['map'](_0x4e893b=>String['fromCharCode'](_0x4e893b))['join']('');}(_0x145104=Object['assign']({},_0x145104))['plugins']||(_0x145104['plugins']=Ot['defaultPlugins']),super(_0x145104),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[_0x4e79ea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e79ea([0x76,0x69,0x65,0x77])][_0x4e79ea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4e79ea([0x61,0x75,0x74,0x6f]),this[_0x4e79ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4e79ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4e79ea([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4e79ea([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4e79ea([0x6f,0x6b])});}['create'](){const _0x38509c=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x38509c))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1abd10=>{const _0x5f27ed=this['model']['document']['getRoot'](),_0x24edce=_0x5f27ed&&_0x5f27ed['getChild'](_0x5f27ed['childCount']-0x1);_0x1abd10['setSelection'](_0x24edce,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x860fde=this['editing']['view'],_0x1ee996=_0x860fde['document']['getRoot'](),_0xd6eb30=_0x1ee996['getChild'](0x0);_0x1ee996['childCount']>0x1||!_0xd6eb30||'p'!=_0xd6eb30['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x860fde,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0xd6eb30['placeholder']=this['placeholder']),ut({'view':_0x860fde,'element':_0xd6eb30,'keepOnFocus':!0x0}),this['placeholderElement']=_0xd6eb30);}}class Mt extends _0x40361{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x24a21f,_0x51cb55={}){super(_0x24a21f),this['editor']=null,this['_editorConfig']=_0x51cb55,this['set']('value',_0x51cb55['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x24a21f,'Reply...')),this['set']('submitLabel',bt(_0x24a21f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x3e4064(),this['focusTracker']=new _0x5d8869(),this['focusCycler']=new _0x89dbb6({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x38b6d1,_0x4fc050)=>{this['cancelButtonView']['fire']('execute'),_0x4fc050();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2aeb95,_0x87a371)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x87a371());}),this['on']('submit',(_0x49e4dc,_0x45c541)=>{_0x45c541['length']>0xfde8?(alert(bt(_0x24a21f,'TOO_LONG_COMMENT_ALERT',[_0x45c541['length'],0xfde8])),_0x49e4dc['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0xeff936=this['editor'];this['element']['insertBefore'](_0xeff936['ui']['element'],this['element']['firstChild']),_0xeff936['model']['document']['on']('change',()=>this['value']=_0xeff936['getData']()),_0xeff936['bind']('placeholder')['to'](this),this['focusables']['add'](_0xeff936['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x12345e){-0x1===_0x12345e?(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:_0x216326}=this,_0x11b37e=new _0xaaf754(_0x216326);return _0x11b37e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x11b37e['withText']=!0x0,_0x11b37e['bind']('label')['to'](this,'submitLabel'),_0x11b37e['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x11b37e['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2ff17c,_0xcc24b7)=>!_0xcc24b7&&!!_0x2ff17c['trim']()),_0x11b37e;}['_createCancelButton'](){const {locale:_0x38e86b}=this,_0x36e651=new _0xaaf754(_0x38e86b);return _0x36e651['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x36e651['label']=bt(_0x38e86b,'Cancel'),_0x36e651['withText']=!0x0,_0x36e651['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x36e651;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x42ee91=>{this['focusTracker']['add'](_0x42ee91['element']);}),this['focusables']['on']('change',(_0x39d8e8,_0xff04f2)=>{for(const _0x4a29c7 of Array['from'](_0xff04f2['added'])['reverse']())this['focusTracker']['add'](_0x4a29c7['element']);});}}class Rt extends _0x40361{constructor(_0x4cfd59,_0x477bb7,_0x2d4ac2){super(_0x4cfd59),this['commentInputView']=new Mt(_0x4cfd59,_0x2d4ac2),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x6bde3d,_0x6b0e1b)=>_0x6bde3d||!!_0x6b0e1b),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 _0x2731b9(_0x4cfd59,_0x477bb7),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'](_0x1b4f6b){this['commentInputView']['focus'](_0x1b4f6b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3dc181,_0x355b83)=>{const {submitButtonView:_0x4bc400,cancelButtonView:_0x162591,editor:_0x222b37}=this['commentInputView'];[_0x4bc400['element'],_0x162591['element'],_0x222b37?_0x222b37['editing']['view']['getDomRoot']():null]['filter'](_0x41f4f5=>_0x41f4f5)['some'](_0x412b99=>_0x412b99['contains'](_0x355b83['target']))||(this['focus'](),_0x355b83['preventDefault']());});}}class xt extends _0x40361{constructor(_0x582ddc){super(_0x582ddc);const _0x5d4d92=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5d4d92['to']('count',_0x5828ce=>bt(_0x582ddc,'NUMBER_OF_COMMENTS',_0x5828ce))}]});}}class St extends _0x40361{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x492f7b,_0x163881,_0x3b9504){super(_0x492f7b);const _0x384cb1=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x163881['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x163881,this['_config']=_0x3b9504,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5d8869(),this['keystrokes']=new _0x3e4064(),this['focusCycler']=new _0x89dbb6({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2cefbc=>this['commentViews']['map'](_0x5f0e00=>_0x5f0e00['element'])['includes'](_0x2cefbc['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x492f7b),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1e429b=>_0x1e429b-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2ee840 of _0x163881['comments'])this['_handleNewCommentModel'](_0x2ee840);this['_handleInfoComment'](),this['listenTo'](_0x163881['comments'],'add',(_0x47bbe,_0x519c9c)=>{const _0x120687=this['_calculatePosition'](_0x519c9c);this['length']++,this['_handleNewCommentModel'](_0x519c9c,_0x120687),this['refreshVisibleViews']();}),this['listenTo'](_0x163881['comments'],'remove',(_0x29795d,_0x4b4430)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4b4430),this['refreshVisibleViews']();}),this['listenTo'](_0x163881,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x163881,'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',_0x384cb1['if']('length','ck-hidden',_0x1c1ebb=>!_0x1c1ebb)],'aria-label':bt(_0x492f7b,'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'](_0x578a90){-0x1===_0x578a90?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x9a5db6 of this['commentViews'])_0x9a5db6['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x15f057,_0x4ea4e2){const _0x17c1a3=new this['_config']['CommentView'](this['locale'],_0x15f057,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x17c1a3['viewUid']=_0x15f057['id'],_0x17c1a3['delegate']('removeComment')['to'](this),_0x17c1a3['delegate']('updateComment')['to'](this),_0x17c1a3['delegate']('resolveCommentThread')['to'](this),_0x17c1a3['delegate']('editorReady')['to'](this),_0x17c1a3['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x17c1a3,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x17c1a3,_0x4ea4e2);}['_calculatePosition'](_0x4b77a6){const _0xec6afa=this['_model']['_findOptimalIndex'](_0x4b77a6);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x4b77a6['authoredAt']?_0xec6afa-0x1:_0xec6afa:_0xec6afa-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x53c9a9={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x53c9a9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x53c9a9));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3a8229){const _0x10e530=this['commentViews']['remove'](_0x3a8229['id']);this['stopListening'](_0x10e530),_0x10e530['isEditMode']&&this['_updateHasDirtyComment'](),_0x10e530['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x55eac0=>_0x55eac0['isEditMode']);}['_rearrangeCollapse'](){const _0x12a107=function(_0x539155){const _0x440bc7=new _0xb591f1();for(const _0x54ea7f of _0x539155)_0x440bc7['add'](_0x54ea7f);return _0x440bc7;}(this['commentViews']),_0x467a6c=this['_collapsedCommentsView']['count'];for(let _0x454aab=0x1;_0x454aab<=_0x467a6c;_0x454aab++)_0x12a107['remove'](0x1);for(const _0x319a2a of _0x12a107)_0x319a2a['collapse']();_0x467a6c>0x0&&_0x12a107['add'](this['_collapsedCommentsView'],0x1),Pt(_0x4f864a(Array['from'](this['visibleViews']),Array['from'](_0x12a107)),this['visibleViews'],_0x12a107);}['_rearrangeExpand'](){Pt(_0x4f864a(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4aa0c9 of this['visibleViews'])_0x4aa0c9['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x13cf05=>{this['focusTracker']['add'](_0x13cf05['element']),this['keystrokes']['listenTo'](_0x13cf05['element']);}),this['commentViews']['on']('change',(_0x1ef9bf,_0x3b8b08)=>{for(const _0x4343de of _0x3b8b08['removed'])this['focusTracker']['remove'](_0x4343de['element']),this['keystrokes']['stopListening'](_0x4343de['element']);for(const _0x3fff16 of Array['from'](_0x3b8b08['added'])['reverse']())this['focusTracker']['add'](_0x3fff16['element']),this['keystrokes']['listenTo'](_0x3fff16['element']);});}}function Pt(_0x2e50e5,_0x5d6954,_0x31314b){let _0x1f250a=0x0;for(const _0x7cf4b0 of _0x2e50e5)switch(_0x7cf4b0){case'insert':_0x5d6954['add'](_0x31314b['get'](_0x1f250a),_0x1f250a),_0x1f250a++;break;case'delete':_0x5d6954['remove'](_0x1f250a);break;case'equal':_0x1f250a++;}}class Lt extends _0x40361{constructor(_0x4a3d5c){super(_0x4a3d5c);const _0x291202=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x291202['to']('contextValue',_0xc167eb=>bt(_0x4a3d5c,'THREAD_CONTEXT_LABEL',_0xc167eb)),'tabindex':-0x1},'children':[{'text':_0x291202['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x40361{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x338873,_0x560ac2){super(_0x338873);const _0x7f40ca=this['bindTemplate'];this['_model']=_0x560ac2,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5d8869(),this['keystrokes']=new _0x3e4064(),this['focusCycler']=new _0x89dbb6({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x39e837=>!!_0x39e837),this['bind']('contextValue')['to'](this['_model'],'context',_0x505e0f=>_0x505e0f&&_0x505e0f['value']?this['_trimContextValue'](_0x505e0f['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x7f40ca['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 _0x389d35=new _0xaaf754(this['locale']);return _0x389d35['label']=bt(this['locale'],'Reopen'),_0x389d35['tooltip']=bt(this['locale'],'Reopen'),_0x389d35['icon']=_0x549237,_0x389d35['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x396f7e=>!_0x396f7e),_0x389d35['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x459b8d,_0x1125b1)=>_0x459b8d&&_0x1125b1),_0x389d35['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x389d35;}['_trimContextValue'](_0x4e0d1b){if(_0x4e0d1b['length']<0x96)return _0x4e0d1b;const _0x40ee07=_0x4e0d1b['lastIndexOf']('\x20',0x93);return _0x4e0d1b['substring'](0x0,_0x40ee07>-0x1?_0x40ee07:0x93)+'...';}['_attachContextActions'](){const _0x383bdf=this['element']['querySelector']('.ck-context'),_0x1bd796=_0x383bdf['querySelector']('.ck-context__value');this['listenTo'](_0x383bdf,'mouseenter',()=>{_0x1bd796['offsetWidth']<_0x1bd796['scrollWidth']&&_0x383bdf['classList']['add']('overlay');}),this['listenTo'](_0x383bdf,'mouseleave',()=>{_0x383bdf['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x51e787 of this['focusables'])this['focusTracker']['add'](_0x51e787['element']),this['keystrokes']['listenTo'](_0x51e787['element']);}['_createContextView'](){const _0x5b271d=new Lt(this['locale']);return _0x5b271d['bind']('contextValue')['to'](this),_0x5b271d;}}class Vt extends _0x40361{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x18ed67,_0xf7f95d,_0x509d6b,_0x187c7e){super(_0x18ed67),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xf7f95d,this['_localUser']=_0x509d6b,this['_config']=_0x187c7e,this['commentThreadHeaderView']=new Dt(_0x18ed67,_0xf7f95d),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0xca66aa(_0x18ed67,bt(_0x18ed67,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x18ed67,_0xf7f95d,Object['assign']({'CommentView':this['_config']['CommentView']},_0x187c7e)),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',(_0x2563ed,_0x243186)=>_0x2563ed||!!_0x243186),this['bind']('isUnlinked')['to'](_0xf7f95d,'unlinkedAt',_0x36cc7f=>!!_0x36cc7f),this['bind']('ariaLabel')['to'](this,'length',_0x58d0c1=>{const _0x1eb8b4=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x58d0c1,_0x1eb8b4]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5d8869(),this['keystrokes']=new _0x3e4064(),this['focusCycler']=new _0x89dbb6({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e96bb=>_0x3e96bb['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2ae185(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x4a5ccf=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5e56af=_0x4a5ccf['commentInputView'];return _0x4a5ccf['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5e56af,'value',(_0x2c09da,_0x5948a0,_0x2a554a,_0x8f665b,_0x1e9bd0)=>!!_0x1e9bd0||!!_0x8f665b&&_0x2a554a&&!_0x5948a0||_0x2c09da&&_0x2a554a&&!_0x5948a0),_0x5e56af['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x21f793,_0x2c91f4,_0x10001e)=>{let _0x328ed3;return _0x328ed3=_0x10001e&&_0x2c91f4?'Reply\x20to\x20reopen\x20discussion...':_0x21f793?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x328ed3);}),_0x5e56af['bind']('submitLabel')['to'](this,'length',_0x2ed5b9=>bt(this['locale'],_0x2ed5b9?'Reply':'Comment')),_0x5e56af['on']('submit',(_0x1cb11f,_0x2b1139)=>{this['fire']('addComment',_0x2b1139),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5e56af['on']('cancel',()=>{this['focus']();}),_0x5e56af['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5e56af['on']('cancel',_0x28ba3a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x28ba3a['stop']());}),this['on']('change:isActive',(_0x4c4d3c,_0x385e5a,_0x4f43b8)=>{_0x4f43b8||this['length']||_0x5e56af['value']||this['fire']('removeCommentThread');}),_0x4a5ccf;}}class Bt extends/* #__PURE__ -- @preserve */
27
- _0x5b3b9a(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x47fdc6,_0xd47626,_0x9c5cc1,_0x2734ce){super(_0x47fdc6,_0xd47626,_0x9c5cc1,_0x2734ce),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x47fdc6,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x338c20,_0x592d23,_0x1de755)=>{_0x1de755||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x18cf3e,_0x44e23b,_0x3e4ee2)=>{_0x3e4ee2&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5d5337=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5d5337['if']('isActive','ck-thread--active'),_0x5d5337['if']('isUnlinked','ck-thread--unlinked'),_0x5d5337['to']('actionIndicator',_0x28fcb2=>_0x28fcb2?'ck-thread--'+_0x28fcb2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5d5337['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 _0x4a64b3 of this['commentsListView']['commentViews'])_0x4a64b3['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x4c6f66}=this,_0x3a3662=this['commentsListView']['commentViews']['get'](0x0);_0x3a3662===this['_boundFirstCommentView']||_0x3a3662['isSystemComment']||(this['_boundFirstCommentView']=_0x3a3662,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3a3662,'actionIndicator',_0x2d9bcd=>'remove'===_0x2d9bcd?'remove':null),_0x3a3662['placeholder']=bt(_0x4c6f66,'Write\x20a\x20comment...'),_0x3a3662['removeButton']['on']('execute',_0x56a23c=>{_0x56a23c['stop'](),this['showConfirm'](bt(_0x4c6f66,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3a3662['focus']();}),_0x3a3662['actionBar']['add'](this['resolveButton'],0x0),_0x3a3662['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x33c1de=new _0x2a5953(this['locale']);return _0x33c1de['label']=bt(this['locale'],'Resolve'),_0x33c1de['tooltip']=bt(this['locale'],'Resolve'),_0x33c1de['icon']=_0x4f7bc3,_0x33c1de['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x33c1de['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5234b2=>!_0x5234b2),_0x33c1de['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xbd67ef,_0x4a6272)=>_0xbd67ef&&!_0x4a6272),_0x33c1de['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x33c1de;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class Ht extends _0x40361{constructor(_0x3af5a8){super(_0x3af5a8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x9957af,_0x33dfc7,_0x37a386)=>{this['element']['innerHTML']=_0x37a386;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x40361{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0xaee884,_0x5addfb,_0x14790f){super(_0xaee884),this['_model']=_0x5addfb,this['_config']=_0x14790f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5addfb,'content',_0x5addfb,'authoredAt',(_0x323fe8,_0x7d7605)=>bt(_0xaee884,'COMMENT_ARIA_LABEL',[_0x5addfb['author']['name'],_0x14790f['formatDateTime'](_0x7d7605),new DOMParser()['parseFromString'](_0x323fe8,'text/html')['body']['textContent'],_0x5addfb['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0xca66aa(_0xaee884,bt(_0xaee884,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x5d8869(),this['keystrokes']=new _0x3e4064(),this['focusCycler']=new _0x89dbb6({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4c06cb=>_0x4c06cb['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x7b011=new Ht(this['locale']);return _0x7b011['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x3c701b,_0x30c6e0)=>_0x30c6e0?_0x3732f0(_0x3c701b,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x3c701b),_0x7b011;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x473d8a=new Mt(this['locale'],this['_config']['editorConfig']);return _0x473d8a['value']=this['_model']['content'],_0x473d8a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x473d8a['submitLabel']=bt(this['locale'],'Save'),_0x473d8a['on']('submit',(_0x1a2e90,_0x15a74f)=>{this['fire']('updateComment',this['_model']['id'],_0x15a74f),this['switchToDisplayMode'](),this['focus']();}),_0x473d8a['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x473d8a['once']('editorReady',()=>{_0x473d8a['focus']();}),_0x473d8a['createEditor'](),_0x473d8a['delegate']('editorReady')['to'](this),_0x473d8a['delegate']('editorDestroyed')['to'](this),_0x473d8a;}['_setupKeyboardNavigation'](){const _0x3914ab=this['element'];this['keystrokes']['listenTo'](_0x3914ab);for(const _0x54b3c1 of this['focusables'])this['focusTracker']['add'](_0x54b3c1['element']),this['keystrokes']['listenTo'](_0x54b3c1['element']);this['focusables']['on']('change',(_0x57f319,_0x5dc43f)=>{for(const _0x20437b of _0x5dc43f['removed'])this['focusTracker']['remove'](_0x20437b['element']),this['keystrokes']['stopListening'](_0x20437b['element']);for(const _0x2d6439 of _0x5dc43f['added'])this['focusTracker']['add'](_0x2d6439['element']),this['keystrokes']['listenTo'](_0x2d6439['element']);}),this['keystrokes']['set']('enter',(_0x434038,_0x398530)=>{_0x3914ab===_0x434038['target']&&(this['focusCycler']['focusFirst'](),_0x398530());}),this['keystrokes']['set']('esc',(_0x4515f5,_0x3c6af9)=>{_0x3914ab!==_0x4515f5['target']&&(this['focus'](),_0x3c6af9());});}}class Ut extends/* #__PURE__ -- @preserve */
28
- _0x5b3b9a(Ft){['actionBar'];['userView'];constructor(_0x24dd6a,_0x5d4d00,_0x5b6f4e){super(_0x24dd6a,_0x5d4d00,_0x5b6f4e),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x24dd6a,'Reply...')),this['bind']('authoredAt')['to'](_0x5d4d00),this['bind']('resolvedAt')['to'](_0x5d4d00),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 _0x2731b9(_0x24dd6a,_0x5d4d00['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5d4d00,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x476a40=this['bindTemplate'],_0x43de33=[{'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':_0x476a40['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x476a40['to']('authoredAt',_0x5a079b=>this['_config']['formatDateTime'](_0x5a079b))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x476a40['if']('isEditMode','ck-comment__actions--hidden'),_0x476a40['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']&&_0x43de33['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x476a40['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x476a40['if']('isEditMode','ck-comment--edit'),_0x476a40['if']('isSystemComment','ck-comment--info'),_0x476a40['to']('actionIndicator',_0x591e56=>_0x591e56?'ck-comment--'+_0x591e56:'')],'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':_0x43de33}]}]};}['_createEditButton'](){const _0x1c7c6d=new _0xaaf754(this['locale']);return _0x1c7c6d['label']=bt(this['locale'],'Edit'),_0x1c7c6d['icon']=_0x4c3864,_0x1c7c6d['withText']=!0x0,_0x1c7c6d['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1c7c6d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xaaff9c=>!_0xaaff9c),_0x1c7c6d['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1c7c6d['on']('execute',()=>this['switchToEditMode']()),_0x1c7c6d;}['_createRemoveButton'](){const _0x2cb6eb=new _0xaaf754(this['locale']);return _0x2cb6eb['label']=bt(this['locale'],'Remove'),_0x2cb6eb['icon']=_0x494648,_0x2cb6eb['withText']=!0x0,_0x2cb6eb['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x2cb6eb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xc0250=>!_0xc0250),_0x2cb6eb['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x2cb6eb['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x2cb6eb;}['_createDropdown'](){const _0x2b882d=it(this['locale'],_0x556a74),_0x2c528b=_0x2b882d['panelView']['children'],_0x9ca74=new et(this['locale']),_0x5c579c=_0x2b882d['bindTemplate'];st(_0x2b882d,()=>this['items']['find'](_0x255068=>_0x255068['isVisible'])),_0x2b882d['extendTemplate']({'attributes':{'class':[_0x5c579c['if']('isVisible','ck-hidden',_0x743d25=>!_0x743d25)]}});const _0x276371=(_0x5b13a3,_0x2a9b4c=-0x1)=>{const _0x4d76b4=new nt(this['locale']);_0x4d76b4['children']['add'](_0x5b13a3);const _0x508619=_0x2a9b4c>-0x1?_0x2a9b4c:_0x9ca74['items']['length'];_0x9ca74['items']['add'](_0x4d76b4,_0x508619);const _0x1bf091=Array['from'](this['items']);_0x2b882d['unbind']('isEnabled','isVisible'),_0x2b882d['bind']('isEnabled')['toMany'](_0x1bf091,'isEnabled',(..._0x2742c4)=>_0x2742c4['some'](_0x569d6f=>_0x569d6f)),_0x2b882d['bind']('isVisible')['toMany'](_0x1bf091,'isVisible',(..._0x4a34b6)=>_0x4a34b6['some'](_0x3d9108=>_0x3d9108));};_0x2b882d['panelPosition']='sw',_0x2b882d['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x6abf05});for(const _0x4d369d of this['items'])_0x276371(_0x4d369d);return _0x2c528b['add'](_0x9ca74),_0x2b882d['listenTo'](this['items'],'add',(_0x5d6c0f,_0x4cf146,_0x165a6d)=>{_0x276371(_0x4cf146,_0x165a6d);}),_0x2b882d['listenTo'](this['items'],'remove',(_0x2acf58,_0x475e30,_0x5a2a7d)=>{_0x9ca74['items']['remove'](_0x5a2a7d);}),_0x2b882d;}['_attachActions'](_0x5eff98,_0x26c19e){const _0x53520e=_0x5eff98&&_0x5eff98['element'];_0x53520e&&(this['listenTo'](_0x53520e,'mouseenter',()=>this['actionIndicator']=_0x26c19e),this['listenTo'](_0x53520e,'focus',()=>this['actionIndicator']=_0x26c19e),this['listenTo'](_0x53520e,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x53520e,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x26cb01=super['_createCommentInputView']();return _0x26cb01['bind']('placeholder')['to'](this),_0x26cb01;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x2bbb02){const _0xb340d9=_0xd8eb54(_0x2bbb02,0x1e),_0xbfb1b1=new MutationObserver(_0x2bec89=>{for(const _0xfab00c of _0x2bec89)('attributes'==_0xfab00c['type']&&'class'==_0xfab00c['attributeName']||'childList'==_0xfab00c['type']||'characterData'==_0xfab00c['type'])&&_0xb340d9();});return{'attach'(_0x48facd){_0xbfb1b1['observe'](_0x48facd,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xbfb1b1['disconnect'](),_0xb340d9['cancel']();}};}class Kt extends _0x40361{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x21353f,_0x303928){super(_0x21353f),this['id']=_0x564643(),this['focusTracker']=new _0x5d8869(),this['keystrokes']=new _0x3e4064(),this['keystrokes']['set']('Esc',(_0x460e9b,_0x5bbc35)=>this['fire']('Esc',_0x5bbc35)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x303928),this['mainView']=_0x303928;const _0x2059df=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x2059df['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 _0x82fac2=this['element']['clientHeight'];_0x82fac2&&(this['height']=_0x82fac2);}}class Yt extends/* #__PURE__ -- @preserve */
29
- _0x2628bf(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4443f3,target:_0x341884,type:_0x5e2ecd,isVisible:_0x97a72f=!0x0}){super(),this['view']=_0x4443f3,this['view']['element']||this['view']['render'](),this['_type']=_0x5e2ecd,this['_target']=_0x341884,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xb591f1([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x8d421c,_0xdc3fea)=>{this['view']['focusTracker']['add'](_0xdc3fea);}),this['focusableElements']['on']('remove',(_0x5e417d,_0x204889)=>{this['view']['focusTracker']['remove'](_0x204889);}),this['set']('isVisible',_0x97a72f);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1fe4f0=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x1fe4f0),_0x1fe4f0;}get['targetRect'](){const _0x803848=this['target'];if(null===_0x803848)return null;if(_0x803848 instanceof _0x511c86)return _0x803848;const _0x432557=_0x803848['filter'](_0x4daa82=>function(_0x10fb74){const _0x367fb9=_0x10fb74['offsetParent'];if(_0x367fb9)return!0x0;const _0x53ebe6=_0x10fb74['getClientRects']()['item'](0x0);return!!_0x53ebe6;}(_0x4daa82));return 0x0===_0x432557['length']?null:_0x511c86['getDomElementRects'](_0x432557[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x512f48){this['view']['isActive']=_0x512f48,this['view']['mainView']['isActive']=_0x512f48;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xf0ae20){if(!(null===_0xf0ae20||_0xf0ae20 instanceof _0x511c86||Array['isArray'](_0xf0ae20)&&_0xf0ae20['every'](_0x482687=>Gt(_0x482687))))throw new _0x495de2('annotation-invalid-target',null,{'target':_0xf0ae20});}['_getNormalizedTarget'](){const _0x2cd5c2='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x2cd5c2)?[_0x2cd5c2]:_0x2cd5c2;}}function Gt(_0x22a7d5){return null!==_0x22a7d5&&'object'==typeof _0x22a7d5&&'nodeType'in _0x22a7d5&&0x1===_0x22a7d5['nodeType'];}class jt extends _0xb591f1{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x68999e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5d8869(),this['_focusTracker']['on']('change:isFocused',(_0x4034e6,_0x25dcf5,_0x4f4fcf)=>{_0x4f4fcf||this['fire']('blur');});for(const _0x413c19 of _0x68999e)this['add'](_0x413c19);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4fb59d){if(this['has'](_0x4fb59d))throw new _0x495de2('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4fb59d['innerView'],_0x4fb59d),this['_viewToAnnotation']['set'](_0x4fb59d['view'],_0x4fb59d);for(const _0x305b38 of _0x4fb59d['focusableElements'])this['_focusTracker']['add'](_0x305b38);this['listenTo'](_0x4fb59d['focusableElements'],'add',(_0x9df4,_0x128704)=>{this['_focusTracker']['add'](_0x128704);}),this['listenTo'](_0x4fb59d['focusableElements'],'remove',(_0x1cc6a8,_0x2ac0ae)=>{this['_focusTracker']['remove'](_0x2ac0ae);}),this['listenTo'](_0x4fb59d['view']['focusTracker'],'change:isFocused',(_0x461044,_0x4c61ba,_0x1a5007)=>{_0x1a5007&&this['fire']('focus',_0x4fb59d);}),_0x4fb59d['updateTargetRect']();const _0x65b999=this['_getOrderInContent'](_0x4fb59d['view']['targetRect']);return super['add'](_0x4fb59d,_0x65b999);}['remove'](_0x48626c){if(!this['has'](_0x48626c))throw new _0x495de2('annotationcollection-not-existing-item',null);this['stopListening'](_0x48626c['view']['focusTracker']),this['stopListening'](_0x48626c['focusableElements']);for(const _0x686739 of _0x48626c['focusableElements'])this['_focusTracker']['remove'](_0x686739);return this['_viewToAnnotation']['delete'](_0x48626c['view']),this['_innerViewToAnnotation']['delete'](_0x48626c['innerView']),super['remove'](_0x48626c);}['getByInnerView'](_0x3131b5){return this['_innerViewToAnnotation']['get'](_0x3131b5);}['getByView'](_0x600680){return this['_viewToAnnotation']['get'](_0x600680);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0xfd64e8 of this)_0xfd64e8['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3e39a5=Array['from'](this)['sort']((_0x981461,_0x52e361)=>qt(_0x981461['view']['targetRect'],_0x52e361['view']['targetRect']));for(let _0x225a7e=_0x3e39a5['length']-0x1;_0x225a7e>0x0;_0x225a7e--){const _0x424209=_0x3e39a5[_0x225a7e];_0x225a7e!==this['getIndex'](_0x424209)&&(this['remove'](_0x424209),this['add'](_0x424209));}}['_getOrderInContent'](_0x2ee0d1){let _0x18e63f=0x0;if(!_0x2ee0d1)return this['length'];for(const _0x5efcda of this){const _0x1ff64f=_0x5efcda['view']['targetRect'];if(_0x1ff64f){if(qt(_0x2ee0d1,_0x1ff64f)<0x0)return _0x18e63f;_0x18e63f++;}}return _0x18e63f;}}function Xt({source:_0x2faa27,target:_0x3b6918,filter:_0x2c1fe1}){for(const _0x53d660 of _0x2faa27)_0x2c1fe1(_0x53d660)&&_0x3b6918['add'](_0x53d660);_0x3b6918['listenTo'](_0x2faa27,'add',(_0x2391ff,_0xad920b)=>{_0x2c1fe1(_0xad920b)&&_0x3b6918['add'](_0xad920b);}),_0x3b6918['listenTo'](_0x2faa27,'remove',(_0x11184a,_0x589b70)=>{_0x3b6918['has'](_0x589b70)&&_0x3b6918['remove'](_0x589b70);});}function qt(_0x5b0e31,_0xb41edc){if(null===_0x5b0e31&&null===_0xb41edc)return 0x0;if(null===_0x5b0e31)return-0x1;if(null===_0xb41edc)return 0x1;const _0x290596=_0x5b0e31['top']-_0xb41edc['top'];return 0x0==_0x290596?_0x5b0e31['left']-_0xb41edc['left']:_0x290596;}class $t extends _0x10d0b1{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c7abd){if(super(_0x2c7abd),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2c7abd instanceof _0x39dfe2){const _0x28cbaf=_0x2c7abd['locale'];_0x2c7abd['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1121fb){this['collection']['add'](_0x1121fb);}['remove'](_0x4dd652){this['collection']['remove'](_0x4dd652),_0x4dd652['destroy']();}['refreshVisibility'](){for(const _0x2eaab5 of this['collection'])_0x2eaab5['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x170d16){return this['collection']['getByInnerView'](_0x170d16);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x48fa26 of this['collection'])_0x48fa26['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2de2dc){this['fire']('_activateAnnotation',_0x2de2dc);}['createAnnotation'](_0x4f7f99){return new Yt(_0x4f7f99);}['createAnnotationView'](_0x5c66a1,_0x42f51c){return new Kt(_0x5c66a1,_0x42f51c);}['_addActiveAnnotation'](_0x4c69b5){const _0x51d7e8=new Set(this['activeAnnotations']);_0x51d7e8['add'](_0x4c69b5),this['activeAnnotations']=_0x51d7e8;}['_removeActiveAnnotation'](_0x1e54f4){const _0x5b5d40=new Set(this['activeAnnotations']);_0x5b5d40['delete'](_0x1e54f4),this['activeAnnotations']=_0x5b5d40;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3de9bd=this['collection'],_0x2f4584=this['_visibleAnnotations'];function _0x4917e0(_0x3840aa){const _0x246260=_0x3840aa['source'];_0x246260['isVisible']&&!_0x2f4584['has'](_0x246260)?_0x2f4584['add'](_0x246260):!_0x246260['isVisible']&&_0x2f4584['has'](_0x246260)&&_0x2f4584['remove'](_0x246260),_0x246260['view']['focusTracker']['remove'](_0x246260['view']['element']),_0x246260['view']['focusTracker']['add'](_0x246260['view']['element']);}this['listenTo'](_0x3de9bd,'add',(_0x257429,_0x44ef6f)=>{_0x44ef6f['isVisible']&&_0x2f4584['add'](_0x44ef6f),this['listenTo'](_0x44ef6f,'change:isVisible',_0x4917e0);}),this['listenTo'](_0x3de9bd,'remove',(_0x2d6ba7,_0x215152)=>{_0x2f4584['has'](_0x215152)&&_0x2f4584['remove'](_0x215152),this['stopListening'](_0x215152,'change:isVisible',_0x4917e0);});}['_setupEnterAnnotationKeystroke'](){const _0x538ff8=_0x1c5846=>{_0x1c5846['on']('ready',()=>{_0x1c5846['keystrokes']['set'](_0x71ab79,(_0xb5b09d,_0x5a4c2c)=>{const _0x476421=_0x52e0d0(this['activeAnnotations']['values']());_0x476421&&(_0x476421['view']['focus'](),_0x5a4c2c());});});};this['context']instanceof _0x39dfe2?_0x538ff8(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3188fd,_0x38d771)=>{_0x538ff8(_0x38d771);});}['_setupEscapeAnnotationHandling'](){const _0x39a912=_0x2f7dd0=>{const _0x4efc75=_0x2f7dd0['source'],_0x496a5d=[];let _0x2d8953;if(Array['isArray'](_0x4efc75['target'])){_0x2d8953=_0x4efc75['target'][0x0],this['context']instanceof _0x39dfe2?_0x496a5d['push'](this['context']):this['context']['editors']&&_0x496a5d['push'](...this['context']['editors']);for(const _0x3f5616 of _0x496a5d)for(const _0x2ff36c of _0x3f5616['editing']['view']['domRoots']['values']())if(_0x2ff36c['contains'](_0x2d8953))return void _0x3f5616['editing']['view']['focus']();_0x2d8953['focus']();}};this['listenTo'](this['collection'],'add',(_0x396ce1,_0x28d76d)=>{this['listenTo'](_0x28d76d,'escape',_0x39a912,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x22e433,_0x22159e)=>{this['stopListening'](_0x22159e,'escape',_0x39a912);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x10d0b1{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x444982,_0x52a3ef];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2fe6ec){super(_0x2fe6ec),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4b9cfb=this['context']['config'];_0x4b9cfb['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4b9cfb['define']('comments.maxThreadTotalWeight',0x1f4),_0x4b9cfb['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4b9cfb['define']('comments.CommentThreadView',Bt),_0x4b9cfb['define']('comments.CommentView',Ut),_0x4b9cfb['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2929a1=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5b84f1,_0x13c7bc)=>this['_addCommentThread'](_0x13c7bc)),this['on']('submitCommentThread',(_0x2cb59c,_0xb40b94)=>this['_submitCommentThread'](_0xb40b94)),this['on']('resolveCommentThread',(_0x248a9d,_0x544154)=>this['_resolveCommentThread'](_0x544154)),this['on']('resolveCommentThread',(_0x5be0b3,_0x62e75a)=>this['_updateActiveAnnotation'](_0x62e75a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x177971,_0x3ee16e)=>this['_reopenCommentThread'](_0x3ee16e)),this['on']('reopenCommentThread',(_0x2bd463,_0x5723ea)=>this['_updateActiveAnnotation'](_0x5723ea),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x16485f,_0xa1c880)=>this['_removeCommentThread'](_0xa1c880)),this['on']('updateCommentThread',(_0x42177d,_0x22137e)=>this['_updateCommentThread'](_0x22137e)),this['on']('updateCommentThread',(_0x1357fd,_0x489095)=>this['_updateActiveAnnotation'](_0x489095),{'priority':'lowest'}),this['on']('addComment',(_0x3bd3dd,_0x21a19d)=>this['_addComment'](_0x21a19d)),this['on']('updateComment',(_0x34f4cd,_0x53a80)=>this['_updateComment'](_0x53a80)),this['on']('removeComment',(_0x2e851e,_0x5bae11)=>this['_removeComment'](_0x5bae11)),this['on']('addComment',(_0x731386,{threadId:_0x2ce553,isFromAdapter:_0x29b4f1})=>{if(_0x29b4f1)return;const _0x4cedb6=this['getCommentThread'](_0x2ce553),_0x2c0e8d=_0x4cedb6&&this['_threadToController']['get'](_0x4cedb6);_0x2c0e8d&&_0x2c0e8d['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2929a1,'change:activeAnnotations',(_0x5237f5,_0x435e75,_0x591d57)=>{const _0x135de9=Array['from'](_0x591d57)['map'](_0x114213=>this['_viewToController']['get'](_0x114213['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x135de9?_0x135de9['model']:null;});}set['adapter'](_0x3d9483){if(this['_adapter'])throw new _0x495de2('commentsrepository-adapter-already-set');this['_adapter']=_0x3d9483;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2c7adc=zt,threadId:_0x3be693=_0x564643(),comments:_0x20bb31=[],unlinkedAt:_0x5f101c=null,resolvedAt:_0x1ce6a5=null,resolvedBy:_0x78534=null,target:_0x2ea314=null,context:_0x448610=null,attributes:_0x18e6e1={},isResolvable:_0x41c6ae=!0x0,isSubmitted:_0xffc281=!0x1,isFromAdapter:_0x40912d=!0x1}={}){return this['fire'](ii('addCommentThread',_0x2c7adc),{'channelId':_0x2c7adc,'threadId':_0x3be693,'comments':_0x20bb31,'unlinkedAt':_0x5f101c,'resolvedAt':_0x1ce6a5,'resolvedBy':_0x78534,'target':_0x2ea314,'context':_0x448610,'attributes':_0x18e6e1,'isFromAdapter':_0x40912d,'isResolvable':_0x41c6ae,'isSubmitted':_0xffc281}),this['getCommentThread'](_0x3be693);}['openNewCommentThread']({channelId:_0x2e4519=zt,threadId:_0x4840a1=_0x564643(),target:_0x5f59fb,context:_0x4a4ea1=null,isResolvable:_0x5d343c=!0x0}){if(this['_readOnlyChannels']['has'](_0x2e4519)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5f59fb)throw new _0x495de2('commentsrepository-missing-target');const _0x5c5d45=this['addCommentThread']({'channelId':_0x2e4519,'threadId':_0x4840a1,'target':_0x5f59fb,'context':_0x4a4ea1,'isResolvable':_0x5d343c});if(!_0x5c5d45)return null;const _0xf642b7=this['_threadToController']['get'](_0x5c5d45),_0x103a70=_0xf642b7['view']['commentThreadInputView']['commentInputView'],_0x48b1fb=this['context']['plugins']['get']($t),_0x35dffc=_0x48b1fb['getByInnerView'](_0xf642b7['view']);return _0x48b1fb['activate'](_0x35dffc),_0x103a70['once']('editorReady',()=>_0x103a70['focus']()),_0x5c5d45;}['hasCommentThread'](_0x37e3a5){if('string'!=typeof _0x37e3a5)throw new _0x495de2('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x37e3a5);}['updateCommentThread']({channelId:_0x207db2=zt,threadId:_0x118ef4,context:_0x371b9f,unlinkedAt:_0x56bcac,attributes:_0x53aeb0,isFromAdapter:_0x260f6b=!0x1}){return this['fire'](ii('updateCommentThread',_0x207db2),{'channelId':_0x207db2,'threadId':_0x118ef4,'context':_0x371b9f,'unlinkedAt':_0x56bcac,'attributes':_0x53aeb0,'isFromAdapter':_0x260f6b}),this['getCommentThread'](_0x118ef4);}['getCommentThread'](_0x54bf9c){if('string'!=typeof _0x54bf9c)throw new _0x495de2('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x54bf9c);}['fetchCommentThread']({channelId:_0x2022cb,threadId:_0x1b6586}={}){const _0x244161=this['getCommentThread'](_0x1b6586);if(_0x244161)return Promise['resolve'](_0x244161);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x495de2('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2022cb,'threadId':_0x1b6586})['then'](_0x45e404=>this['hasCommentThread'](_0x1b6586)?this['getCommentThread'](_0x1b6586):_0x45e404?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2022cb},_0x45e404)):void 0x0)['catch'](_0x259c75=>{throw console['error'](_0x259c75),new _0x495de2('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4a43e1,skipNotAttached:_0x3dad2f=!0x1,skipEmpty:_0x633044=!0x1,toJSON:_0x27ce14=!0x1}={}){const _0x4b3611=[];for(const _0xb215d5 of this['_threads']['values']())_0x4a43e1&&_0xb215d5['channelId']!==_0x4a43e1||_0x3dad2f&&!_0xb215d5['isAttached']||_0x633044&&0x0===_0xb215d5['length']||_0x4b3611['push'](_0xb215d5);return _0x27ce14?_0x4b3611['map'](_0x39de47=>_0x39de47['toJSON']()):_0x4b3611;}['getAnnotationForCommentThread'](_0x2c95fa){const _0x4d1575=this['_threadToController']['get'](_0x2c95fa);if(!_0x4d1575)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x4d1575['view'])||null;}['getCommentThreadForAnnotation'](_0x486102){const _0x3d831b=this['_viewToController']['get'](_0x486102['innerView']);return _0x3d831b?_0x3d831b['model']:null;}['setActiveCommentThread'](_0x25cc42){const _0x468a67=this['context']['plugins']['get']($t);if(!_0x25cc42)return void(this['activeCommentThread']&&_0x468a67['deactivateAll']());const _0x55f2d9=this['getCommentThread'](_0x25cc42);if(!_0x55f2d9)throw new _0x495de2('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x25cc42});if(!this['_threadToController']['has'](_0x55f2d9))throw new _0x495de2('commentsrepository-active-not-attached',null,{'threadId':_0x25cc42});const _0x10e409=_0x468a67['getByInnerView'](this['_threadToController']['get'](_0x55f2d9)['view']);_0x468a67['activate'](_0x10e409);}['switchReadOnly'](_0x4f43a1,_0x101acc){_0x4f43a1?this['_readOnlyChannels']['add'](_0x101acc):this['_readOnlyChannels']['delete'](_0x101acc),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x508bc8){return this['_readOnlyChannels']['has'](_0x508bc8)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5cb852,_0x510db8){return new It(_0x5cb852,_0x510db8);}['setPermissions'](_0x5ed7e8,_0x3f60d3=zt){this['_permissions']['set'](_0x3f60d3,_0x5ed7e8),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1cca2d=zt){return this['_permissions']['has'](_0x1cca2d)?this['_permissions']['get'](_0x1cca2d):Jt;}['_addCommentThread']({channelId:_0x1fe521,threadId:_0x357c37,comments:_0x2db915,unlinkedAt:_0xae9d9c,resolvedAt:_0x589ef8,resolvedBy:_0x30a13e,target:_0x3778b8,context:_0x6f987,attributes:_0x57712d,isFromAdapter:_0x43b20c,isResolvable:_0x19c5ca,isSubmitted:_0x5c433b}){if('string'!=typeof _0x357c37)throw new _0x495de2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x357c37});if(this['hasCommentThread'](_0x357c37))throw new _0x495de2('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x357c37});const _0x22ebd9=new Zt(this,{'channelId':_0x1fe521,'id':_0x357c37,'context':_0x6f987,'attributes':_0x57712d,'unlinkedAt':_0xae9d9c,'resolvedAt':_0x589ef8,'resolvedBy':_0x30a13e?this['context']['plugins']['get'](_0x52a3ef)['getUser'](_0x30a13e):null,'isResolvable':_0x19c5ca,'isSubmitted':_0x5c433b||_0x43b20c});this['_threads']['set'](_0x357c37,_0x22ebd9);for(const _0x1dc490 of _0x2db915)_0x22ebd9['_add'](this['_createNewComment']({'threadId':_0x357c37,..._0x1dc490}));return _0x3778b8&&_0x22ebd9['attachTo'](_0x3778b8),_0x43b20c||!_0x22ebd9['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1fe521,'threadId':_0x357c37});}['_submitCommentThread']({channelId:_0x2cd844,threadId:_0x11ed0d}){if(!this['hasCommentThread'](_0x11ed0d))throw new _0x495de2('commentsrepository-missing-comment-thread',this);const _0x316c2e=this['getCommentThread'](_0x11ed0d);if(_0x316c2e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x556122,comments:_0x3b27ff,resolvedAt:_0x30fc62,resolvedBy:_0x5085d2,context:_0x35fb53,attributes:_0x5e966a}=_0x316c2e,_0x1f4a83=this['context']['plugins']['get']('PendingActions'),_0x253749=_0x1f4a83['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2cd844,'threadId':_0x556122,'comments':_0x3b27ff['map'](_0x15385c=>_0x15385c['toJSON']()),'resolvedAt':_0x30fc62,'resolvedBy':_0x5085d2?_0x5085d2['id']:_0x5085d2,'context':_0x35fb53,'attributes':_0x5e966a})['then'](({comments:_0x2a11d2})=>{_0x1f4a83['remove'](_0x253749);for(const _0x2f44c9 of _0x2a11d2)this['_updateComment']({'channelId':_0x2cd844,'threadId':_0x11ed0d,'commentId':_0x2f44c9['commentId'],'createdAt':_0x2f44c9['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5ac066=>{throw console['error'](_0x5ac066),new _0x495de2('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x503b7c,target:_0x33047c}){const _0x595697=this['getCommentThread'](_0x503b7c);if(!_0x595697)throw new _0x495de2('commentsrepository-attach-missing-comment-thread',this);const _0x4eceae=this['context']['plugins']['get']('PendingActions'),_0x37988c=this['context']['plugins']['get']($t),_0x3fe162=this['_createCommentThreadView'](_0x595697),_0x43f2cb=new It(_0x595697,_0x3fe162);let _0x1f6673=null;_0x3fe162['on']('change:isDirty',(_0x21a14c,_0x47931c,_0x4216ce)=>{_0x4216ce?_0x1f6673=_0x4eceae['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1f6673&&(_0x4eceae['remove'](_0x1f6673),_0x1f6673=null);}),this['_threadToController']['set'](_0x595697,_0x43f2cb),this['_viewToController']['set'](_0x3fe162,_0x43f2cb);const _0x142465=new Kt(this['context']['locale'],_0x3fe162);_0x142465['bind']('length')['to'](_0x3fe162),_0x142465['bind']('isDirty')['to'](_0x3fe162,'isDirty',_0x3fe162,'length',(_0x354387,_0x1d4234)=>_0x354387||!_0x1d4234),_0x142465['bind']('isActive')['to'](_0x3fe162),_0x142465['type']='comment';const _0x8c0af3=new Yt({'view':_0x142465,'target':_0x33047c,'type':'comment','isVisible':!_0x595697['archivedAt']&&!!('function'==typeof _0x33047c?_0x33047c():_0x33047c)});return _0x3fe162['on']('escape',()=>{_0x8c0af3['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3fe162,_0x8c0af3),_0x37988c['add'](_0x8c0af3),_0x8c0af3;}['_bindAnnotationToEditors'](_0x29db74,_0x53797c){this['listenTo'](_0x29db74,'editorReady',(_0x18527b,_0x3bc174)=>{const _0xd0a2d6=_0x3bc174['ui']['view']['body']['bodyCollectionContainer'];_0x53797c['focusableElements']['add'](_0xd0a2d6),this['context']instanceof _0x39dfe2&&this['context']['ui']['focusTracker']['add'](_0xd0a2d6);},{'priority':'highest'}),this['listenTo'](_0x29db74,'editorDestroyed',(_0x38620c,_0x46db8d)=>{const _0xfd5834=_0x46db8d['ui']['view']['body']['bodyCollectionContainer'];_0x53797c['focusableElements']['has'](_0xfd5834)&&_0x53797c['focusableElements']['remove'](_0xfd5834),this['context']instanceof _0x39dfe2&&this['context']['ui']['focusTracker']['remove'](_0xfd5834);});}['_unbindEditors'](_0x4d2bb2){this['stopListening'](_0x4d2bb2,'editorReady'),this['stopListening'](_0x4d2bb2,'editorDestroyed');}['_createCommentThreadView'](_0x4361bb){const _0x535b98=this['context']['plugins']['get'](_0x52a3ef),{config:_0x481453,locale:_0x779c0e}=this['context'],_0x40eba8=_0x36995e(_0x481453['get']('locale'),_0x779c0e);return new(0x0,(_0x481453['get']('comments'))['CommentThreadView'])(_0x779c0e,_0x4361bb,_0x535b98['me'],{'editorConfig':{..._0x481453['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x481453['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x481453['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x481453['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x481453['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x40eba8,'CommentView':_0x481453['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x28c045,channelId:_0x4b2255,resolvedAt:_0x3cf81b,resolvedBy:_0x50dd2c,isFromAdapter:_0x2ab1e0}){if(!this['hasCommentThread'](_0x28c045))throw new _0x495de2('commentsrepository-missing-comment-thread',null,{'threadId':_0x28c045});const _0xcca777=this['getCommentThread'](_0x28c045);if(_0xcca777['isResolved'])throw new _0x495de2('commentsrepository-resolved-comment-thread',null,{'threadId':_0x28c045});const _0x26e85a=this['context']['plugins']['get'](_0x52a3ef);if(_0xcca777['resolvedBy']=_0x26e85a['getUser'](_0x50dd2c),_0xcca777['resolvedAt']=_0x3cf81b,_0x2ab1e0||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2f9532=this['context']['plugins']['get']('PendingActions'),_0x25788c=_0x2f9532['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4b2255,'threadId':_0x28c045})['then'](({resolvedAt:_0x14e6bc,resolvedBy:_0x31785f})=>{_0x2f9532['remove'](_0x25788c),_0xcca777['resolvedBy']['id']!==_0x31785f&&(_0xcca777['resolvedBy']=_0x26e85a['getUser'](_0x31785f)),_0xcca777['resolvedAt']=_0x14e6bc;})['catch'](_0x54641a=>{throw console['error'](_0x54641a),new _0x495de2('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x430abd,channelId:_0x26dc8e,isFromAdapter:_0x1a3e43}){if(!this['hasCommentThread'](_0x430abd))throw new _0x495de2('commentsrepository-missing-comment-thread',null,{'threadId':_0x430abd});const _0x4aa03a=this['getCommentThread'](_0x430abd);if(!_0x4aa03a['isResolved'])throw new _0x495de2('commentsrepository-reopen-comment-thread',null,{'threadId':_0x430abd});if(_0x4aa03a['resolvedBy']=null,_0x4aa03a['resolvedAt']=null,_0x1a3e43||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3c0dec=this['context']['plugins']['get']('PendingActions'),_0x303668=_0x3c0dec['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x26dc8e,'threadId':_0x430abd})['then'](()=>_0x3c0dec['remove'](_0x303668))['catch'](_0x2e2079=>{throw console['error'](_0x2e2079),new _0x495de2('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3011d0,isFromAdapter:_0x820cc3}){const _0x15e619=this['getCommentThread'](_0x3011d0);if(!_0x15e619)throw new _0x495de2('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3011d0),this['_threads']['delete'](_0x3011d0),!_0x15e619['isSubmitted']||_0x820cc3||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x503e0a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x557a1a}=_0x15e619,_0x3c5256=_0x503e0a['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x557a1a,'threadId':_0x3011d0})['then'](()=>_0x503e0a['remove'](_0x3c5256))['catch'](_0x5ef210=>{throw console['error'](_0x5ef210),new _0x495de2('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x352b59,unlinkedAt:_0x2a34b8,context:_0x4e1c29,attributes:_0x190ca8,isFromAdapter:_0x2267fa}){if('string'!=typeof _0x352b59)throw new _0x495de2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x352b59});if(!this['hasCommentThread'](_0x352b59))throw new _0x495de2('commentsrepository-missing-comment-thread',null,{'threadId':_0x352b59});const _0x438053=this['getCommentThread'](_0x352b59);let _0x3568a0=!0x1;if(void 0x0!==_0x4e1c29&&_0x438053['context']!==_0x4e1c29&&(_0x438053['context']=_0x4e1c29,_0x3568a0=!0x0),void 0x0!==_0x2a34b8&&_0x438053['unlinkedAt']!==_0x2a34b8&&(_0x438053['unlinkedAt']=_0x2a34b8,_0x3568a0=!0x0),_0x190ca8&&!_0x21cea6(_0x190ca8,_0x438053['attributes'])&&(_0x438053['attributes']=_0x190ca8,_0x3568a0=!0x0),!_0x3568a0)return Promise['resolve']();if(!_0x438053['isSubmitted']||_0x2267fa||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x53eca6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x558ce8}=_0x438053,_0x31ada3=_0x53eca6['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x558ce8,'threadId':_0x352b59,'context':_0x4e1c29,'unlinkedAt':_0x2a34b8,'attributes':_0x190ca8})['then'](()=>_0x53eca6['remove'](_0x31ada3))['catch'](_0x250087=>{throw console['error'](_0x250087),new _0x495de2('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4fed3a){const _0x2d3374=this['context']['plugins']['get']($t),_0x35e659=this['getCommentThread'](_0x4fed3a);if(_0x35e659['_isAttached']=!0x1,this['_threadToController']['has'](_0x35e659)){const _0x2f3400=this['_threadToController']['get'](_0x35e659),_0x1e8dd=_0x2f3400['view'],_0x53842a=_0x2d3374['getByInnerView'](_0x1e8dd);this['_threadToController']['delete'](_0x35e659),this['_viewToController']['delete'](_0x1e8dd),_0x53842a&&_0x2d3374['remove'](_0x53842a),_0x2f3400['destroy'](),_0x1e8dd['destroy']()['then'](()=>{this['_unbindEditors'](_0x1e8dd);});}}['_updateActiveAnnotation']({threadId:_0x19ea91,resolvedAt:_0x49936e,unlinkedAt:_0x99aa7e}){const _0x5ee0ca=!!_0x49936e,_0x58d95a=this['context']['plugins']['get']($t),_0x2902fc=this['getCommentThread'](_0x19ea91);if(this['_threadToController']['has'](_0x2902fc)){const _0x383036=this['_threadToController']['get'](_0x2902fc)['view'],_0x3bbc58=_0x58d95a['getByInnerView'](_0x383036);_0x3bbc58&&(_0x5ee0ca&&_0x58d95a['_removeActiveAnnotation'](_0x3bbc58),_0x99aa7e?_0x3bbc58['isVisible']=!0x1:_0x3bbc58['refreshVisibility']());}}['_getExternalAuthor'](_0x4eae58){const _0x5980a8=this['context']['plugins']['get'](_0x52a3ef),_0x5dacb4=_0xc59992('external:'+_0x4eae58),_0x3f7e76=_0x5980a8['getUser'](_0x5dacb4);return _0x3f7e76||_0x5980a8['addUser']({'id':_0x5dacb4,'name':_0x4eae58});}['_createNewComment']({threadId:_0x1ca795,commentId:_0x1146a4=_0x564643(),content:_0x19745b,authorId:_0x43e08f,createdAt:_0x29e353,attributes:_0x20372a}){if('string'!=typeof _0x1146a4)throw new _0x495de2('commentsrepository-invalid-commentid');if('string'!=typeof _0x43e08f)throw new _0x495de2('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x19745b||!_0x19745b['trim']())throw new _0x495de2('commentsrepository-invalid-comment-content');const _0x4bc507=this['context']['plugins']['get'](_0x52a3ef)['getUser'](_0x43e08f);if(!_0x4bc507)throw new _0x495de2('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x43e08f});let _0x3b5cf0=null,_0x56adce=_0x29e353;return _0x20372a?.['@external']&&(_0x3b5cf0=this['_getExternalAuthor'](_0x20372a['@external']['authorName']),_0x56adce=new Date(_0x20372a['@external']['createdAt'])),new ti(this,{'threadId':_0x1ca795,'id':_0x1146a4,'author':_0x3b5cf0||_0x4bc507,'creator':_0x4bc507,'content':_0x19745b,'createdAt':_0x29e353,'authoredAt':_0x56adce,'attributes':_0x20372a});}['_addComment'](_0x1642a5){let {threadId:_0x53518d,content:_0x33a271,attributes:_0xa9add5,isFromAdapter:_0x7eeddb}=_0x1642a5;const _0x662311=this['getCommentThread'](_0x1642a5['threadId']);if(!_0x662311)throw new _0x495de2('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1f66c5=this['_createNewComment'](_0x1642a5),{id:_0x4c5ca8}=_0x1f66c5;if(_0x662311['_add'](_0x1f66c5),_0x7eeddb||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x662311['isSubmitted'])return Promise['resolve']();const _0x2cfea8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x59afb1}=_0x662311,_0x1cb662=_0x2cfea8['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xa9add5||(_0xa9add5={}),this['adapter']['addComment']({'channelId':_0x59afb1,'threadId':_0x53518d,'commentId':_0x4c5ca8,'content':_0x33a271,'attributes':_0xa9add5})['then'](_0x5e07a4=>{_0x2cfea8['remove'](_0x1cb662),_0x5e07a4&&this['_updateComment']({'channelId':_0x59afb1,'threadId':_0x53518d,'commentId':_0x4c5ca8,'createdAt':_0x5e07a4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5b1090=>{throw console['error'](_0x5b1090),new _0x495de2('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5cba95,commentId:_0x30ada0,content:_0x4c5b75,createdAt:_0x36e354,attributes:_0x2f8311,isFromAdapter:_0x388405}){if(void 0x0!==_0x4c5b75&&('string'!=typeof _0x4c5b75||!_0x4c5b75['trim']()['length']))throw new _0x495de2('commentsrepository-update-comment-invalid-content');const _0x470906=this['getCommentThread'](_0x5cba95),_0x59a214=_0x470906['getComment'](_0x30ada0);if(!_0x59a214)throw new _0x495de2('commentsrepository-update-missing-comment',this);let _0x48227e=!0x1;if(_0x4c5b75&&_0x4c5b75!==_0x59a214['content']&&(_0x59a214['isEditable']||_0x388405)&&(_0x59a214['content']=_0x4c5b75,_0x48227e=!0x0),_0x36e354&&_0x36e354!==_0x59a214['createdAt']&&(_0x59a214['createdAt']=_0x36e354,_0x59a214['attributes']&&_0x59a214['attributes']['@external']||(_0x59a214['authoredAt']=_0x36e354),_0x48227e=!0x0),_0x2f8311&&!_0x21cea6(_0x2f8311,_0x59a214['attributes'])&&(_0x59a214['attributes']=_0x2f8311,_0x48227e=!0x0),!_0x48227e)return Promise['resolve']();if(_0x470906['fire']('commentUpdated'),_0x388405||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2ce281=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4b12f6}=this['getCommentThread'](_0x59a214['threadId']),_0x5b140c=_0x2ce281['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4b12f6,'threadId':_0x5cba95,'commentId':_0x30ada0,'content':_0x4c5b75,'attributes':_0x2f8311})['then'](()=>_0x2ce281['remove'](_0x5b140c))['catch'](_0xf2e41f=>{throw console['error'](_0xf2e41f),new _0x495de2('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x410603,commentId:_0x23b9af,isFromAdapter:_0x3f4d22}){const _0x155929=this['getCommentThread'](_0x410603),_0x4e11cd=_0x155929['getComment'](_0x23b9af);if(!_0x4e11cd)throw new _0x495de2('commentsrepository-remove-missing-comment',this);if(_0x155929['_remove'](_0x4e11cd),_0x3f4d22||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2762c1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44670a}=_0x155929,_0x420f04=_0x2762c1['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x44670a,'threadId':_0x410603,'commentId':_0x23b9af})['then'](()=>_0x2762c1['remove'](_0x420f04))['catch'](_0x26e8f9=>{throw console['error'](_0x26e8f9),new _0x495de2('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
30
- _0x2628bf(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x41846d,_0xccc40){super();const _0x583e45=_0xccc40['isResolvable'];this['channelId']=_0xccc40['channelId'],this['id']=_0xccc40['id'],this['comments']=new _0xb591f1(),this['_repository']=_0x41846d,this['_isAttached']=!0x1,this['_isSubmitted']=_0xccc40['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x41846d,'_permissions',_0x41846d,'_readOnlyChannels',()=>_0x41846d['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x41846d,'_permissions',()=>_0x41846d['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x41846d,'_permissions',()=>{const _0x155dfe=_0x41846d['getPermissions'](this['channelId']);return _0x155dfe['write']||_0x155dfe['admin'];}),this['bind']('isResolvable')['to'](_0x41846d,'_permissions',()=>_0x583e45&&_0x41846d['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xccc40['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5b76e5,_0x1b6701)=>_0x5b76e5?_0x1b6701?_0x5b76e5<_0x1b6701?_0x5b76e5:_0x1b6701:_0x5b76e5:_0x1b6701),this['set']('unlinkedAt',_0xccc40['unlinkedAt']||null),this['set']('resolvedAt',_0xccc40['resolvedAt']||null),this['set']('resolvedBy',_0xccc40['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x41ab93=>!!_0x41ab93),this['set']('attributes',_0xccc40['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x5de07d,_0x181172)=>_0x5de07d+_0x181172['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x65fb26,id:_0x596227}=this;this['_repository']['fire'](ii('submitCommentThread',_0x65fb26),{'channelId':_0x65fb26,'threadId':_0x596227});}['setUnlinkedAt'](_0x33bb01){this['_update']({'unlinkedAt':_0x33bb01});}['resolve']({resolvedAt:_0x3833c9=new Date(),resolvedBy:_0x303e42='',isFromAdapter:_0xdbf3a8=!0x1}={}){const _0x5df8d9=this['_repository']['context']['plugins']['get'](_0x52a3ef)['me'],{channelId:_0x31fc8a,id:_0x5bfb53}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x31fc8a),{'channelId':_0x31fc8a,'threadId':_0x5bfb53,'resolvedAt':_0x3833c9,'resolvedBy':_0x303e42||_0x5df8d9['id'],'isFromAdapter':_0xdbf3a8});}['reopen']({isFromAdapter:_0x331b84=!0x1}={}){const {channelId:_0x466229,id:_0x49750d}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x466229),{'channelId':_0x466229,'threadId':_0x49750d,'isFromAdapter':_0x331b84});}['setContext'](_0x2e259e){this['context']||this['_update']({'context':_0x2e259e});}['setAttribute'](_0x11a99e,_0xaf7804){const _0x4f280c=_0x175e20(this['attributes']);_0x27e629(_0x4f280c,_0x11a99e,_0xaf7804),this['_update']({'attributes':_0x4f280c});}['removeAttribute'](_0xadfa6a){const _0x1ebbb0=_0x175e20(this['attributes']);_0x2ddb6b(_0x1ebbb0,_0xadfa6a),this['_update']({'attributes':_0x1ebbb0});}['remove']({isFromAdapter:_0x3d425a=!0x1}={}){const {channelId:_0x294e2a,id:_0x563df7}=this;this['_repository']['fire'](ii('removeCommentThread',_0x294e2a),{'channelId':_0x294e2a,'threadId':_0x563df7,'isFromAdapter':_0x3d425a});}['attachTo'](_0xd68d83){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xd68d83});}['addComment'](_0xb6241f){const {channelId:_0x4d9ca1,id:_0x485c64}=this;this['_repository']['fire'](ii('addComment',_0x4d9ca1,_0x485c64),Object['assign']({'channelId':_0x4d9ca1,'threadId':_0x485c64},_0xb6241f));}['getComment'](_0x2c48b8){if('string'!=typeof _0x2c48b8)throw new _0x495de2('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2c48b8});return this['comments']['get'](_0x2c48b8);}['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'](_0x5c9f72=>_0x5c9f72['toJSON']()),'attributes':this['attributes']};}['_add'](_0x3267f5){return this['listenTo'](_0x3267f5,'change:authoredAt',()=>{const _0x57baec=this['_findOptimalIndex'](_0x3267f5),_0x1129e8=this['comments'];_0x57baec-0x1!=_0x1129e8['getIndex'](_0x3267f5)&&_0x57baec+0x1!=_0x1129e8['getIndex'](_0x3267f5)&&(this['_remove'](_0x3267f5),this['_add'](_0x3267f5));}),this['comments']['add'](_0x3267f5,this['_findOptimalIndex'](_0x3267f5));}['_update'](_0x300ce4){const {channelId:_0x14b4ec,id:_0x937975}=this;this['_repository']['fire'](ii('updateCommentThread',_0x14b4ec),{..._0x300ce4,'channelId':_0x14b4ec,'threadId':_0x937975});}['_remove'](_0x5c80cf){return this['stopListening'](_0x5c80cf),_0x5c80cf['destroy'](),this['comments']['remove'](_0x5c80cf);}['_findOptimalIndex'](_0x74fc05){const _0x223727=this['comments']['find'](_0x38e683=>new Date(_0x38e683['authoredAt'])['getTime']()>new Date(_0x74fc05['authoredAt'])['getTime']());return _0x223727?this['comments']['getIndex'](_0x223727):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
31
- _0x2628bf(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1ff404,_0x575515){super();const _0x30d603=_0x1ff404['context']['plugins']['get'](_0x52a3ef)['me'],_0x3bf2ae=_0x1ff404['getCommentThread'](_0x575515['threadId']),_0x421e56=0x0===_0x3bf2ae['comments']['length'],_0x5ee030=_0x30d603===_0x575515['author'];this['id']=_0x575515['id'],this['threadId']=_0x575515['threadId'],this['author']=_0x575515['author'],this['creator']=_0x575515['creator'],this['isExternal']=Boolean(_0x575515['attributes']&&_0x575515['attributes']['@external']),this['set']('content',_0x575515['content']),this['createdAt']=_0x575515['createdAt']||new Date(),this['set']('authoredAt',_0x575515['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3bf2ae,'resolvedAt'),this['set']('attributes',_0x575515['attributes']||{}),this['bind']('isEditable')['to'](_0x1ff404,'_permissions',()=>{const _0x5232b0=_0x1ff404['getPermissions'](_0x3bf2ae['channelId'])['write'],_0x190744=_0x1ff404['getPermissions'](_0x3bf2ae['channelId'])['modifyAll'];return _0x5ee030&&_0x5232b0||!_0x5ee030&&_0x190744;}),this['bind']('isRemovable')['to'](_0x3bf2ae,'isRemovable',_0x1ff404,'_permissions',_0x20ca0a=>{const _0x148984=_0x1ff404['getPermissions'](_0x3bf2ae['channelId'])['write'],_0x412494=_0x1ff404['getPermissions'](_0x3bf2ae['channelId'])['modifyAll'];return _0x5ee030&&_0x148984||_0x20ca0a&&_0x421e56||!_0x5ee030&&_0x412494&&!_0x421e56;}),this['bind']('isReadOnly')['to'](_0x3bf2ae,'isReadOnly'),this['_repository']=_0x1ff404;}get['weight'](){return Math['max'](function(_0x327071){const _0xca2362=document['createElement']('div');return _0xca2362['innerHTML']=_0x327071,_0xca2362['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2555eb){const {threadId:_0x3f9a81,id:_0x3e3067}=this;if(!this['_repository']['hasCommentThread'](_0x3f9a81))throw new _0x495de2('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x541acd}=this['_repository']['getCommentThread'](_0x3f9a81);this['_repository']['fire'](ii('updateComment',_0x541acd,_0x3f9a81),{'channelId':_0x541acd,'threadId':_0x3f9a81,'commentId':_0x3e3067,..._0x2555eb});}['setAttribute'](_0x272371,_0x5e7d38){const _0x57c3f1=_0x175e20(this['attributes']);_0x27e629(_0x57c3f1,_0x272371,_0x5e7d38),this['update']({'attributes':_0x57c3f1});}['removeAttribute'](_0x58f8c4){const _0x5ac2bf=_0x175e20(this['attributes']);_0x2ddb6b(_0x5ac2bf,_0x58f8c4),this['update']({'attributes':_0x5ac2bf});}['remove'](_0x58c5d2={}){if(!_0x58c5d2['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3af90b,id:_0x176470}=this;if(!this['_repository']['hasCommentThread'](_0x3af90b))throw new _0x495de2('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2e92a4}=this['_repository']['getCommentThread'](_0x3af90b);this['_repository']['fire'](ii('removeComment',_0x2e92a4,_0x3af90b),{'channelId':_0x2e92a4,'threadId':_0x3af90b,'commentId':_0x176470,..._0x58c5d2});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x148581,..._0x1d0f9b){for(const _0xd4f44b of _0x1d0f9b)void 0x0!==_0xd4f44b&&(_0x148581+=':'+String(_0xd4f44b));return _0x148581;}class ei extends _0x3391ec{constructor(_0x2aa9e4){super(_0x2aa9e4),this['set']('hasContent',!0x1);}['refresh'](){const _0x2ef162=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x8a691f of _0x2ef162['getRanges']())if(this['_hasContent'](_0x8a691f))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x1b2366=_0x564643(),ranges:_0x173612,comment:_0x11a305}={}){const _0x94b853=this['editor']['model'],_0x40f3e2=_0x173612??Array['from'](_0x94b853['document']['selection']['getRanges']()),_0x4889aa=[];for(const _0x5de552 of _0x40f3e2)this['_hasContent'](_0x5de552)&&_0x4889aa['push'](this['_trimToContent'](_0x5de552));if(!_0x4889aa['length'])throw new _0x495de2('addcommentthreadcommand-incorrect-ranges',null);_0x11a305&&this['_createCommentThread'](_0x1b2366,_0x11a305),this['_createMarkersFromRanges'](_0x1b2366,_0x4889aa,!!_0x11a305);}['_createMarkersFromRanges'](_0x200d28,_0x2b6692,_0x517580){this['editor']['model']['change'](_0x5a4bd7=>{for(const _0xc4e688 of _0x2b6692){const _0x415e1c=_0x564643()['substr'](0x1,0x5),_0x45cbc4='comment:'+_0x200d28+':'+_0x415e1c;_0x5a4bd7['addMarker'](_0x45cbc4,{'range':_0xc4e688,'usingOperation':_0x517580,'affectsData':_0x517580});}});}['_createCommentThread'](_0x3b1d1a,_0xfc9304){const _0x3f314a=this['editor']['plugins']['get']('CommentsRepository'),_0x4d172b=this['editor']['config']['get']('collaboration.channelId'),_0x36b340=this['editor']['plugins']['get']('Users')['me'];if(!_0x36b340)throw new _0x495de2('addcommentthreadcommand-user-not-found',null);_0x3f314a['addCommentThread']({'threadId':_0x3b1d1a,'channelId':_0x4d172b,'comments':[{'authorId':_0x36b340['id'],'content':_0xfc9304,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x5f1d64){for(const _0x508efb of _0x5f1d64['getItems']())if(this['_itemIsContent'](_0x508efb))return!0x0;return!0x1;}['_itemIsContent'](_0x59a022){return _0x59a022['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x59a022)&&!_0x59a022['is']('element','tableCell');}['_trimToContent'](_0x4f13a4){const _0x254ecc=_0x4f23f5=>!this['_itemIsContent'](_0x4f23f5['item']),_0xdc0d89=_0x4f13a4['start']['getLastMatchingPosition'](_0x254ecc),_0x53f582=_0x4f13a4['end']['getLastMatchingPosition'](_0x254ecc,{'direction':'backward'});return this['editor']['model']['createRange'](_0xdc0d89,_0x53f582);}}class si extends _0x313055{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44dc97){super(_0x44dc97),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x457933=this['editor'],_0x4f6f25=_0x457933['model']['document']['selection'],_0x156720=_0x5daa54(()=>this['refreshSelectedViews'](),0xa);_0x4f6f25['on']('change:range',(_0x13f2c0,_0x26f497)=>{_0x26f497['directChange']&&(_0x156720['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x457933['editing']['view']['document'],'change:isFocused',(_0x400da3,_0x257737,_0xb8ed27)=>{_0xb8ed27&&_0x156720();}),this['listenTo'](_0x457933['ui']['focusTracker'],'change:isFocused',(_0x111569,_0x8351dc,_0x469540)=>{_0x469540||this['fire']('blur',{'isAnnotationTracked':_0x44efb3=>this['_editorAnnotationsData']['has'](_0x44efb3['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x297f52){if(this['_editorAnnotations']['has'](_0x297f52['view']))return;this['_editorAnnotations']['add'](_0x297f52['view']),this['editor']['ui']['focusTracker']['add'](_0x297f52['view']['element']);const _0x5653e8=this['editor']['plugins']['get']($t);this['listenTo'](_0x5653e8['collection'],'remove',(_0x244155,_0x3fba0b)=>{this['editor']['ui']['focusTracker']['remove'](_0x3fba0b['view']['element']),this['_editorAnnotations']['delete'](_0x3fba0b['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xfe673a){if('function'!=typeof _0xfe673a)throw new _0x495de2('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xfe673a);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xaa10fe,annotations:_0x2278b2}){const _0x129115=[],_0x44a332=this['editor']['model']['document']['selection'],_0x4799c2=Array['from'](_0x44a332['getRanges']());for(const [_0x1b308d,_0x53ff8a]of this['_editorAnnotationsData']){const _0x5e5e54=_0x11f7f9(_0x53ff8a),_0x31b27b=_0x2278b2['getByInnerView'](_0x1b308d);_0x5e5e54&&_0x31b27b&&_0x129115['push']({'annotation':_0x31b27b,'range':_0x5e5e54});}function _0x11f7f9(_0x1ddb86){for(const _0x1e1e27 of _0x1ddb86)for(const _0x117e1c of _0x4799c2)if(_0x1e1e27['containsRange'](_0x117e1c,!_0x44a332['isCollapsed']))return _0x1e1e27;return null;}return _0x129115['sort']((_0x234a4b,_0x4687f1)=>{const _0x2f1126=_0x234a4b['range'],_0x513ba0=_0x4687f1['range'];if(!_0x2f1126['isEqual'](_0x513ba0)){if(_0x2f1126['containsRange'](_0x513ba0,!0x0))return 0x1;if(_0x513ba0['containsRange'](_0x2f1126,!0x0))return-0x1;}return _0x234a4b['annotation']==_0xaa10fe?-0x1:_0x4687f1['annotation']==_0xaa10fe?0x1:0x0;})['map'](_0x1ad3ec=>_0x1ad3ec['annotation']);}get['_editorAnnotationsData'](){const _0x18b008=new Map();for(const _0x26b99c of Array['from'](this['_dataCollectors']))for(const [_0x44606c,_0x55b676]of _0x26b99c())_0x18b008['set'](_0x44606c,_0x55b676);return _0x18b008;}}class ni extends _0x313055{['afterInit'](){const _0x301ff2=this['editor'];if(!_0x301ff2['plugins']['has']('RestrictedEditingModeEditing'))return;_0x301ff2['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x313055{constructor(_0x2c00c9){super(_0x2c00c9),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1a645a=this['editor'],_0x13bc11=_0x1a645a['commands']['get']('importWord'),_0x20098b=_0x1a645a['plugins']['get'](_0x52a3ef);_0x13bc11&&(_0x13bc11['on']('execute',(_0x6f8eb0,[,_0x1dc200])=>{_0x1dc200['collaboration_features']={'comments':!0x0,'user_id':_0x20098b['me']['id']};},{'priority':_0x5d4f03['high']+0xa}),this['listenTo'](_0x13bc11,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x24dbf9,_0x40808b){const {comment_threads:_0x510d97}=_0x40808b;_0x510d97&&_0x510d97['forEach'](({thread_id:_0x390fef,comments:_0x5f2c4a,is_resolved:_0x4c273a})=>{const _0x23d259=new Date(),_0x4255c1=_0x5f2c4a['map'](({author:_0x45fb79,content:_0x3922db,created_at:_0x50bda5})=>({'content':_0x3922db,'authorId':this['editor']['plugins']['get'](_0x52a3ef)['me']['id'],'createdAt':_0x23d259,'attributes':{'@external':{'authorName':_0x45fb79,'createdAt':_0x50bda5?new Date(_0x50bda5):new Date(),'source':'importWord'}}})),_0x5ea4fe=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x5ea4fe,'threadId':_0x390fef,'comments':_0x4255c1,'resolvedAt':_0x4c273a?_0x23d259:null});});}}class ri extends _0x313055{constructor(_0x141c8d){super(_0x141c8d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x45f51d=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x45f51d,'contentInsertion',(_0x513e0a,_0x2c09f1)=>this['_removeMarkersWithoutThreads'](_0x2c09f1['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4c11f0){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4c11f0;const _0x2bb120=this['editor']['plugins']['get']('CommentsRepository');for(const _0x46c7e1 of _0x4c11f0['keys']()){const [_0x31a9cd,_0x1fc695]=_0x46c7e1['split'](':');'comment'!=_0x31a9cd||_0x2bb120['hasCommentThread'](_0x1fc695)||_0x4c11f0['delete'](_0x46c7e1);}return _0x4c11f0;}['_registerMarkerInClipboardPipeline'](){const _0x572ff8=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4fd14a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4fd14a&&_0x572ff8['_registerMarkerToCopy']('comment',_0x4fd14a);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2dd149){switch(_0x2dd149){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x5b3208){const _0x19b78c=_0x5b3208['split'](':');return{'group':_0x19b78c[0x0],'id':_0x19b78c[0x1],'part':_0x19b78c[0x2]};}class ai extends _0x313055{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2dc277,_0x30dfce)=>{if(!_0x30dfce['options']['showCommentHighlights'])return null;if(_0x30dfce['options']['ignoreResolvedComments']){const {id:_0x521702}=hi(_0x2dc277['markerName']),_0x29c7e2=this['editor']['plugins']['get'](Qt);if(_0x29c7e2['getCommentThread'](_0x521702)?.['isResolved']&&_0x2dc277['item'])return _0x30dfce['consumable']['consume'](_0x2dc277['item'],'addMarker:'+_0x2dc277['markerName']),_0x30dfce['consumable']['consume'](_0x2dc277['item'],'removeMarker:'+_0x2dc277['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x41b679=>{_0x41b679['on']('addMarker:comment',(_0x4d3fee,_0x2a481b,_0x78efe7)=>{if(!_0x78efe7['options']['showCommentHighlights'])return;const _0x50e789=_0x2a481b['item'];if(!_0x50e789)return;const _0x29c047=_0x78efe7['mapper']['toViewElement'](_0x50e789);this['editor']['model']['schema']['isObject'](_0x50e789)&&_0x29c047&&!_0x29c047['getCustomProperty']('widget')&&_0x29c047['is']('containerElement')&&Ct(_0x29c047,_0x78efe7['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1ab5e5,{writer:_0x1991a6,options:_0x22806b})=>{if(!_0x22806b['showCommentHighlights'])return null;const _0xb90c9=_0x1991a6['createContainerElement']('div'),_0x4c41ba=_0x1991a6['createEmptyElement']('hr');return _0x1991a6['addClass']('ck-horizontal-line',_0xb90c9),_0x1991a6['insert'](_0x1991a6['createPositionAt'](_0xb90c9,0x0),_0x4c41ba),_0xb90c9;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1141f9,{writer:_0x3cef25,options:_0x44fecc})=>{if(!_0x44fecc['showCommentHighlights'])return null;const _0xa7c957=_0x3cef25['createContainerElement']('span'),_0x357cbb=_0x3cef25['createEmptyElement']('img');return _0x3cef25['addClass']('image-inline',_0xa7c957),_0x3cef25['insert'](_0x3cef25['createPositionAt'](_0xa7c957,0x0),_0x357cbb),_0xa7c957;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1b50ea,{writer:_0x56cc95,options:_0x4f9771})=>{if(_0x4f9771['showCommentHighlights'])return _0x56cc95['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x759f53,_0x1d1c8a,_0x8e178b)=>{_0x8e178b['options']['showCommentHighlights']&&_0x759f53['stop']();},{'priority':'high'});}}class ci extends _0x313055{static get['requires'](){return[Qt,si,_0x52a3ef,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x467d20){super(_0x467d20),this['set']('isThreadsLoadingPaused',!0x0),_0x467d20['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5dc138,_0x13aeee,_0x469c95,_0x120638)=>{const _0x48803a=_0x467d20['plugins']['get'](Qt),_0x23a186=_0x469c95?hi(_0x469c95)['id']:null;_0x467d20['model']['change'](()=>{if(_0x23a186){const _0x31924f=this['getAllMarkersForId'](_0x23a186);for(const _0x1677cc of _0x31924f)_0x467d20['editing']['reconvertMarker'](_0x1677cc);}if(_0x120638){const {id:_0xd9f79c}=hi(_0x120638),_0x166c7c=_0x48803a['getCommentThread'](_0xd9f79c);if(_0x166c7c&&_0x166c7c['unlinkedAt'])return;if(_0x166c7c&&!_0x166c7c['isAttached'])return;const _0x539af6=this['getAllMarkersForId'](_0xd9f79c);for(const _0x218bbd of _0x539af6)_0x467d20['editing']['reconvertMarker'](_0x218bbd);}}),_0x23a186&&this['scrollToThreadMarker'](_0x23a186);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x13bc9b=this['editor'],_0x1c09fc=_0x13bc9b['plugins']['get'](Qt),_0x2074c5=_0x13bc9b['config']['get']('collaboration.channelId'),_0xbc314f=_0x1c09fc['getCommentThreads']()['filter'](_0x1ba3ff=>_0x1ba3ff['channelId']!==_0x2074c5);_0x13bc9b['commands']['add']('addCommentThread',new ei(_0x13bc9b)),this['listenTo'](_0x13bc9b,'change:isReadOnly',(_0x1e6633,_0xe2603b,_0x481c7b)=>{_0x1c09fc['switchReadOnly'](_0x481c7b,_0x13bc9b['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1c09fc,di('addCommentThread',_0x2074c5),(_0x238fd3,{threadId:_0x34788f})=>{const _0x49ce58=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x34788f);_0x49ce58?.['unlinkedAt']&&this['_attachArchivedThread'](_0x34788f);}),this['listenTo'](_0x1c09fc,di('removeCommentThread',_0x2074c5),(_0x4ae0de,{threadId:_0x3a10d6})=>{_0x13bc9b['model']['enqueueChange']({'isUndoable':!0x1},_0x273737=>{const _0x5b7624=this['getAllMarkersForId'](_0x3a10d6);for(const _0x4879e8 of _0x5b7624)_0x273737['removeMarker'](_0x4879e8);});}),this['listenTo'](_0x1c09fc,di('resolveCommentThread',_0x2074c5),(_0x8e6924,{threadId:_0xbfd865})=>{(this['_reconvertMarkers'](_0xbfd865),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0xbfd865)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1c09fc,di('reopenCommentThread',_0x2074c5),(_0x21fe06,{threadId:_0x411f8a})=>{this['_reconvertMarkers'](_0x411f8a);},{'priority':'low'}),this['listenTo'](_0x1c09fc,di('addComment',_0x2074c5),(_0x440936,{threadId:_0x12133d,isFromAdapter:_0x25a0c7})=>{const _0x575592=this['getAllMarkersForId'](_0x12133d);if(_0x25a0c7||0x0==_0x575592['length']||!_0x1c09fc['hasCommentThread'](_0x12133d))return;0x1===_0x1c09fc['getCommentThread'](_0x12133d)['length']&&_0x13bc9b['model']['enqueueChange']({'isUndoable':!0x1},_0x3e71f5=>{for(const _0x5ccf98 of _0x575592)_0x3e71f5['updateMarker'](_0x5ccf98,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xbc314f);}['afterInit'](){!async function(_0x21672c){const _0xf9b1af=_0x27e815([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x401f52=0x73460ab3,_0x56f77b=0x73418fa3^_0x401f52,_0x5e689b=window[_0x27e815([0x44,0x61,0x74,0x65])][_0x27e815([0x6e,0x6f,0x77])](),_0x4a9d91=_0x21672c[_0x27e815([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x21f0b8=new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1fd3f1=>{_0x4a9d91[_0x27e815([0x6f,0x6e,0x63,0x65])](_0x27e815([0x72,0x65,0x61,0x64,0x79]),_0x1fd3f1);}),_0x30e245={[_0x27e815([0x6b,0x74,0x79])]:_0x27e815([0x45,0x43]),[_0x27e815([0x75,0x73,0x65])]:_0x27e815([0x73,0x69,0x67]),[_0x27e815([0x63,0x72,0x76])]:_0x27e815([0x50,0x2d,0x32,0x35,0x36]),[_0x27e815([0x78])]:_0x27e815([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x27e815([0x79])]:_0x27e815([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x27e815([0x61,0x6c,0x67])]:_0x27e815([0x45,0x53,0x32,0x35,0x36])},_0x4a4d2b=_0x4a9d91[_0x27e815([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x27e815([0x67,0x65,0x74])](_0x27e815([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x15ae1f(){let _0x35fd75,_0x487e30=null,_0x1cdd5d=null;try{if(_0x4a4d2b==_0x27e815([0x47,0x50,0x4c]))return _0x27e815([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x35fd75=_0x3ed95f(),!_0x35fd75)return _0x27e815([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x35fd75[_0x27e815([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1cdd5d=_0x23a2f7(_0x35fd75[_0x27e815([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x35fd75[_0x27e815([0x6a,0x74,0x69])])),await _0x5f05de()?_0x5a0834()?_0x5a8140()?_0x27e815([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1ebfde()?(_0x35fd75[_0x27e815([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x27e815([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x487e30=_0x114cc6(_0x27e815([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x58aa09()):_0x27e815([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x27e815([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x27e815([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x27e815([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5a8140(){const _0x4a1a89=[_0x27e815([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x27e815([0x74,0x72,0x69,0x61,0x6c])][_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35fd75[_0x27e815([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5e689b/0x3e8:0xe10*_0x56f77b;return _0x35fd75[_0x27e815([0x65,0x78,0x70])]<_0x4a1a89;}function _0x5a0834(){const _0x4789fe=_0x35fd75[_0x27e815([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4789fe)return!0x1;if(_0x4789fe[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x2a])))return!0x0;if(_0x4789fe[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x43,0x4d,0x54])))return!0x0;if(_0x4789fe[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x81d8eb())return!0x0;if(_0x4789fe[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x52,0x43,0x4d,0x54]))){if(_0x262363())return!0x0;if(_0x1e8c4c()||_0x3a394c())return!0x0;}return!0x1;}function _0x1ebfde(){const _0x14be2c=_0x35fd75[_0x27e815([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x14be2c||0x0==_0x14be2c[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x41307d}=new URL(window[_0x27e815([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x14be2c[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41307d))return!0x0;const _0xf2b436=_0x41307d[_0x27e815([0x73,0x70,0x6c,0x69,0x74])](_0x27e815([0x2e]));return _0x14be2c[_0x27e815([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb32e87=>_0xb32e87[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x2a])))[_0x27e815([0x6d,0x61,0x70])](_0xdea7b5=>_0xdea7b5[_0x27e815([0x73,0x70,0x6c,0x69,0x74])](_0x27e815([0x2e])))[_0x27e815([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3e4440=>_0x3e4440[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xf2b436[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x27e815([0x6d,0x61,0x70])](_0x17323a=>Array(_0xf2b436[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x17323a[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x27e815([0x66,0x69,0x6c,0x6c])](_0x17323a[0x0]===_0x27e815([0x2a])?_0x27e815([0x2a]):'')[_0x27e815([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x17323a))[_0x27e815([0x73,0x6f,0x6d,0x65])](_0x4abdf1=>_0xf2b436[_0x27e815([0x65,0x76,0x65,0x72,0x79])]((_0x1b89e1,_0x1fe0f0)=>_0x4abdf1[_0x1fe0f0]===_0x1b89e1||_0x4abdf1[_0x1fe0f0]===_0x27e815([0x2a])));}function _0x58aa09(){return _0x487e30&&_0x1cdd5d?new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x443096,_0x4049d5)=>{_0x487e30[_0x27e815([0x74,0x68,0x65,0x6e])](_0x443096,_0x4049d5),_0x1cdd5d[_0x27e815([0x74,0x68,0x65,0x6e])](_0x4f9676=>{_0x4f9676!=_0x27e815([0x56,0x61,0x6c,0x69,0x64])&&_0x443096(_0x4f9676);},_0x4049d5);}):_0x487e30||_0x1cdd5d||_0x27e815([0x56,0x61,0x6c,0x69,0x64]);}}function _0x23a2f7(_0x534ebb,_0xa5f06f){return new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22dccc=>{if(_0x2cbb83())return _0x22dccc(_0x27e815([0x56,0x61,0x6c,0x69,0x64]));_0x2c98e7(),_0x4a9d91[_0x27e815([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x27e815([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x20557a=!0x1;const _0x5eea5e=_0x564643();function _0x1e1bc4(_0x1b9ec8){return!!_0x1b9ec8&&(typeof _0x1b9ec8===_0x27e815([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1b9ec8===_0x27e815([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1b9ec8[_0x27e815([0x74,0x68,0x65,0x6e])]===_0x27e815([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1b9ec8[_0x27e815([0x63,0x61,0x74,0x63,0x68])]===_0x27e815([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1cffb2(_0x42fd3b){_0x16ce7b(_0x42fd3b)[_0x27e815([0x74,0x68,0x65,0x6e])](_0x5c43b5=>{if(!_0x5c43b5||_0x5c43b5[_0x27e815([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x27e815([0x6f,0x6b]))return _0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4efef2(_0x41851d(_0x5eea5e+_0xa5f06f))!=_0x5c43b5[_0x27e815([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x27e815([0x56,0x61,0x6c,0x69,0x64]);})[_0x27e815([0x74,0x68,0x65,0x6e])](_0x41bfc8=>(_0x3fe8ac(),_0x41bfc8),()=>{const _0x262eae=_0x3d5276();return null==_0x262eae?(_0x3fe8ac(),_0x27e815([0x56,0x61,0x6c,0x69,0x64])):_0x27e815(_0x5e689b-_0x262eae>(0x574a8eb3^_0x401f52)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x27e815([0x74,0x68,0x65,0x6e])](_0x22dccc)[_0x27e815([0x63,0x61,0x74,0x63,0x68])](()=>{_0x22dccc(_0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1f782c=0x7370e433^_0x401f52;function _0x3fe8ac(){const _0x47f80a=_0x27e815([0x6c,0x6c,0x63,0x74,0x2d])+_0x4efef2(_0x41851d(_0x534ebb)),_0x3f4eab=_0x1c4453(_0x4efef2(window[_0x27e815([0x4d,0x61,0x74,0x68])][_0x27e815([0x63,0x65,0x69,0x6c])](_0x5e689b/_0x1f782c)));window[_0x27e815([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x27e815([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x47f80a,_0x3f4eab);}function _0x3d5276(){const _0x10565c=_0x27e815([0x6c,0x6c,0x63,0x74,0x2d])+_0x4efef2(_0x41851d(_0x534ebb)),_0xdfc4ed=window[_0x27e815([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x27e815([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10565c);return _0xdfc4ed?window[_0x27e815([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c4453(_0xdfc4ed),0x10)*_0x1f782c:null;}function _0x16ce7b(_0x2da9fc){return new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x387636,_0x362649)=>{_0x2da9fc[_0x27e815([0x74,0x68,0x65,0x6e])](_0x387636,_0x362649),window[_0x27e815([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x362649,0x7347de73^_0x401f52);});}}_0x4a9d91[_0x27e815([0x6f,0x6e])](_0x27e815([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x33e413,_0xe98f8b)=>{if(_0xe98f8b[0x0]!=_0x534ebb)return _0x22dccc(_0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xe98f8b[0x1]={..._0xe98f8b[0x1],[_0x27e815([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5eea5e};},{[_0x27e815([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x27e815([0x68,0x69,0x67,0x68])}),_0x4a9d91[_0x27e815([0x6f,0x6e])](_0x27e815([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x126137=>{_0x1e1bc4(_0x126137[_0x27e815([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x20557a=!0x0,_0x1cffb2(_0x126137[_0x27e815([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x27e815([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x27e815([0x6c,0x6f,0x77])}),_0x21f0b8[_0x27e815([0x74,0x68,0x65,0x6e])](()=>{_0x20557a||_0x22dccc(_0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2cbb83(){return _0x4a9d91[_0x27e815([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x27e815([0x76,0x69,0x65,0x77])][_0x27e815([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x27e815([0x61,0x75,0x74,0x6f]);}function _0x2c98e7(){_0x4a9d91[_0x27e815([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x27e815([0x76,0x69,0x65,0x77])][_0x27e815([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x27e815([0x61,0x75,0x74,0x6f]);}}function _0x114cc6(_0x4452b8){const _0x50fd46=[new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4cddb1=>setTimeout(_0x4cddb1,0x734f347f^_0x401f52)),_0x21f0b8[_0x27e815([0x74,0x68,0x65,0x6e])](()=>new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d3bbb=>{let _0x5879cd=0x0;_0x4a9d91[_0x27e815([0x6d,0x6f,0x64,0x65,0x6c])][_0x27e815([0x6f,0x6e])](_0x27e815([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x59afbb,_0x5a55f4)=>{_0x5a55f4[0x0][_0x27e815([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5879cd++,_0x5879cd==(0x73460f5b^_0x401f52)&&(_0x5d3bbb(),_0x59afbb[_0x27e815([0x6f,0x66,0x66])]());});}))];return window[_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x27e815([0x72,0x61,0x63,0x65])](_0x50fd46)[_0x27e815([0x74,0x68,0x65,0x6e])](()=>_0x4452b8);}async function _0x392494(){await _0x21f0b8,_0x4a9d91[_0x27e815([0x6d,0x6f,0x64,0x65,0x6c])][_0x27e815([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3590f6,_0x4a9d91[_0x27e815([0x6d,0x6f,0x64,0x65,0x6c])][_0x27e815([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3590f6,_0x4a9d91[_0x27e815([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x27e815([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x81d8eb(){return window[_0x27e815([0x67,0x6c,0x6f,0x62])]&&window[_0x27e815([0x67,0x6c,0x6f,0x62])][_0x27e815([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x262363(){return _0x4da6f2(_0x27e815([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x34c073(_0x27e815([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x27e815([0x73,0x74,0x61,0x74,0x65])]==_0x27e815([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1e8c4c(){return _0x4da6f2(_0x27e815([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x3a394c(){return _0x4da6f2(_0x27e815([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xe176ae(_0x2e2523){const _0x488abd=_0x3208fb();_0x4a9d91[_0x488abd]=_0x27e815([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2e2523,_0x2e2523!=_0x27e815([0x56,0x61,0x6c,0x69,0x64])&&_0x392494();}function _0x3208fb(){const _0x254e23=window[_0x27e815([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x27e815([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x27e815([0x6e,0x6f,0x77])]())[_0x27e815([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x27e815([0x2e]),'');let _0x1f3b32=_0x27e815([0x4b]);for(let _0x1ba945=0x0;_0x1ba945<_0x254e23[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ba945+=0x2){let _0x1e8a29=window[_0x27e815([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x254e23[_0x27e815([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ba945,_0x1ba945+0x2));_0x1e8a29>=_0xf9b1af[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1e8a29-=_0xf9b1af[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1f3b32+=_0xf9b1af[_0x1e8a29];}return _0x1f3b32;}function _0x3ed95f(){const _0x1f79fa=_0x4a4d2b[_0x27e815([0x73,0x70,0x6c,0x69,0x74])](_0x27e815([0x2e]));if(0x3!=_0x1f79fa[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3577bd(_0x1f79fa[0x1]);function _0x3577bd(_0x3a70a){const _0x4b1b2e=_0x56ccfd(_0x3a70a);return _0x4b1b2e&&_0x518bfa()?_0x4b1b2e:null;function _0x518bfa(){const _0x374610=_0x4b1b2e[_0x27e815([0x6a,0x74,0x69])],_0x4b4a6a=window[_0x27e815([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x374610[_0x27e815([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x374610[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x69735c={..._0x4b1b2e,[_0x27e815([0x6a,0x74,0x69])]:_0x374610[_0x27e815([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x374610[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x69735c[_0x27e815([0x76,0x63])],_0x41851d(_0x69735c)==_0x4b4a6a;}}}async function _0x5f05de(){let _0x392838=!0x0;try{const _0x845da1=_0x4a4d2b[_0x27e815([0x73,0x70,0x6c,0x69,0x74])](_0x27e815([0x2e])),[_0x40dff2,_0x485d8b,_0x1199f6]=_0x845da1;return _0x1c5824(_0x40dff2),await _0x5bc5e5(_0x40dff2,_0x485d8b,_0x1199f6),_0x392838;}catch{return!0x1;}function _0x1c5824(_0x598f5a){const _0x4e24f3=_0x56ccfd(_0x598f5a);_0x4e24f3&&_0x4e24f3[_0x27e815([0x61,0x6c,0x67])]==_0x27e815([0x45,0x53,0x32,0x35,0x36])||(_0x392838=!0x1);}async function _0x5bc5e5(_0x3ed332,_0x3ecd63,_0x26c450){const _0x3624dc=window[_0x27e815([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x27e815([0x66,0x72,0x6f,0x6d])](_0x2c355a(_0x26c450),_0x3cbe4c=>_0x3cbe4c[_0x27e815([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xb363d3=new window[(_0x27e815([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x27e815([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3ed332+_0x27e815([0x2e])+_0x3ecd63),_0x9730df=window[_0x27e815([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x27e815([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x9730df)return;const _0x3e81c3=await _0x9730df[_0x27e815([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x27e815([0x6a,0x77,0x6b]),_0x30e245,{[_0x27e815([0x6e,0x61,0x6d,0x65])]:_0x27e815([0x45,0x43,0x44,0x53,0x41]),[_0x27e815([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x27e815([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x27e815([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x9730df[_0x27e815([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x27e815([0x6e,0x61,0x6d,0x65])]:_0x27e815([0x45,0x43,0x44,0x53,0x41]),[_0x27e815([0x68,0x61,0x73,0x68])]:{[_0x27e815([0x6e,0x61,0x6d,0x65])]:_0x27e815([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3e81c3,_0x3624dc,_0xb363d3)||(_0x392838=!0x1);}}function _0x56ccfd(_0xb5223e){return _0xb5223e[_0x27e815([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x27e815([0x65,0x79]))?JSON[_0x27e815([0x70,0x61,0x72,0x73,0x65])](_0x2c355a(_0xb5223e)):null;}function _0x2c355a(_0x5b94fc){return window[_0x27e815([0x61,0x74,0x6f,0x62])](_0x5b94fc[_0x27e815([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x27e815([0x2b]))[_0x27e815([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x27e815([0x2f])));}function _0x41851d(_0x262dc5){let _0x11901f=0x1505;function _0x5ec89b(_0x521250){for(let _0x2fe9f4=0x0;_0x2fe9f4<_0x521250[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2fe9f4++){const _0x36a864=_0x521250[_0x27e815([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2fe9f4);_0x11901f=(_0x11901f<<0x5)+_0x11901f+_0x36a864,_0x11901f&=_0x11901f;}}function _0x34284b(_0x4d9213){Array[_0x27e815([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4d9213)?_0x4d9213[_0x27e815([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x34284b):_0x4d9213&&typeof _0x4d9213==_0x27e815([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x27e815([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4d9213)[_0x27e815([0x73,0x6f,0x72,0x74])]()[_0x27e815([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1c44ae,_0x22bed2])=>{_0x5ec89b(_0x1c44ae),_0x34284b(_0x22bed2);}):_0x5ec89b(window[_0x27e815([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4d9213));}return _0x34284b(_0x262dc5),_0x11901f>>>0x0;}function _0x4efef2(_0x5aafcf){return _0x5aafcf[_0x27e815([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x27e815([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x27e815([0x30]));}function _0x1c4453(_0x40ea1e){return _0x40ea1e[_0x27e815([0x73,0x70,0x6c,0x69,0x74])]('')[_0x27e815([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x27e815([0x6a,0x6f,0x69,0x6e])]('');}function _0x4da6f2(_0xbf69dd){return _0x4a9d91[_0x27e815([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x27e815([0x68,0x61,0x73])](_0xbf69dd);}function _0x34c073(_0x2344a9){return _0x4a9d91[_0x27e815([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x27e815([0x67,0x65,0x74])](_0x2344a9);}function _0x3590f6(){}function _0x27e815(_0x53095b){return _0x53095b['map'](_0x4176e7=>String['fromCharCode'](_0x4176e7))['join']('');}_0xe176ae(await _0x15ae1f());}(this);}['destroy'](){const _0x389c83=this['editor']['plugins']['get'](Qt),_0x517a7c=this['editor']['config']['get']('collaboration.channelId');for(const _0x3254c6 of _0x389c83['getCommentThreads']({'channelId':_0x517a7c}))_0x389c83['_detachCommentThread'](_0x3254c6['id']),_0x389c83['_threads']['delete'](_0x3254c6['id']);super['destroy']();}['hasMarkerForId'](_0x8922a){return this['getAllMarkersForId'](_0x8922a)['length']>0x0;}['getAllMarkersForId'](_0x40e952){const _0x4226b2=[];for(const _0x4a8d46 of this['editor']['model']['markers'])_0x4a8d46['name']['startsWith']('comment:'+_0x40e952)&&_0x4226b2['push'](_0x4a8d46);return _0x4226b2;}['scrollToThreadMarker'](_0x39fab0){setTimeout(()=>{const _0x21ad17=this['_getTargetForId'](_0x39fab0);if(!_0x21ad17)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x39fab0&&_0x4afd41({'target':_0x21ad17[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x546088){this['editor']['model']['change'](()=>{for(const _0x289cf0 of this['getAllMarkersForId'](_0x546088))this['editor']['editing']['reconvertMarker'](_0x289cf0);});}['_attachArchivedThread'](_0x5ce606){const _0x8d80c1=this['editor']['plugins']['get'](Qt),_0x79b037=this['editor']['plugins']['get'](si),_0x3b002f=_0x8d80c1['getCommentThread'](_0x5ce606);if(!_0x3b002f['isAttached']){const _0x18b4ff=_0x3b002f['attachTo'](()=>this['_getTargetForId'](_0x3b002f['id']));_0x79b037['registerAnnotation'](_0x18b4ff),_0x3b002f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1b0b87=this['editor'],_0x6d1c65=_0x1b0b87['plugins']['get'](_0x52a3ef);_0x1b0b87['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x244639,_0x28c954)=>{const {id:_0x3eb294}=hi(_0x244639['markerName']),_0x369d46=_0x1b0b87['plugins']['get'](Qt)['getCommentThread'](_0x3eb294),_0x492071=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x3eb294;let _0x3d77de;if(_0x369d46&&_0x369d46['isResolved']&&!_0x492071&&_0x244639['item'])return _0x28c954['consumable']['consume'](_0x244639['item'],'addMarker:'+_0x244639['markerName']),_0x28c954['consumable']['consume'](_0x244639['item'],'removeMarker:'+_0x244639['markerName']),null;const _0x2a5053=['ck-comment-marker'];return _0x492071&&_0x2a5053['push']('ck-comment-marker--active'),_0x3d77de=_0x369d46?.['length']?_0x369d46['comments']['first']['author']['id']:_0x6d1c65['me']['id'],{'classes':_0x2a5053,'attributes':{'data-comment':_0x3eb294,'data-author-id':_0x3d77de}};}}),_0x1b0b87['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x122f23,{options:_0x285918})=>{if(_0x285918['showCommentHighlights'])return null;const _0x154f5e=_0x1b0b87['plugins']['get'](Qt),_0x214342=_0x1b0b87['model']['markers']['get'](_0x122f23),{id:_0x405eaf,part:_0x1815b7}=hi(_0x122f23);return _0x214342&&!_0x214342['affectsData']||_0x285918['ignoreResolvedComments']&&_0x154f5e['getCommentThread'](_0x405eaf)?.['isResolved']?null:{'group':'comment','name':_0x1815b7?_0x405eaf+':'+_0x1815b7:_0x405eaf};}}),_0x1b0b87['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5e7043,{writer:_0x5aab2f})=>_0x5aab2f['createElement']('$marker',{'data-name':'comment:'+_0x5e7043['getAttribute']('id')})}),_0x1b0b87['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2c60c7=this['editor'],_0x2d83ba=_0x2c60c7['plugins']['get'](Qt),_0x574113=new Set(),_0x1eecd3=new Set();_0x2c60c7['model']['document']['registerPostFixer'](_0x270707=>{let _0x150196=!0x1;for(const {name:_0x482781,data:_0x1224ea}of _0x2c60c7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x397039,id:_0x55ad7c}=hi(_0x482781);let _0x4b010a=_0x1224ea['newRange'];if('comment'!==_0x397039||!_0x4b010a)continue;const _0x184539='$graveyard'===_0x4b010a['root']['rootName'];_0x184539||(_0x4b010a=li(_0x4b010a,_0x2c60c7['model']),!_0x4b010a||_0x4b010a['isCollapsed']||!_0x1224ea['newRange']||_0x4b010a['isEqual'](_0x1224ea['newRange']))?_0x2c60c7['model']['hasContent'](_0x4b010a)&&!_0x184539?this['isThreadsLoadingPaused']?_0x574113['add'](_0x482781):this['_handleThreadMarker'](_0x482781,_0x55ad7c):(_0x1eecd3['add'](_0x482781),_0x574113['delete'](_0x482781),_0x270707['removeMarker'](_0x482781),_0x150196=!0x0):(_0x270707['updateMarker'](_0x482781,{'range':_0x4b010a}),_0x150196=!0x0);}return _0x150196;}),this['on']('change:isThreadsLoadingPaused',(_0x3430c0,_0x578354,_0x4c285b)=>{if(!_0x4c285b&&_0x574113['size'])for(const _0x247795 of _0x574113){const {id:_0x557dcf}=hi(_0x247795);_0x574113['delete'](_0x247795),_0x2c60c7['model']['markers']['get'](_0x247795)&&this['_handleThreadMarker'](_0x247795,_0x557dcf);}}),this['listenTo'](_0x2c60c7['model']['document'],'change',()=>{for(const {name:_0x1577cb,data:{newRange:_0x1aa329}}of _0x2c60c7['model']['document']['differ']['getChangedMarkers']()){const {group:_0xd09153,id:_0x1e6107}=hi(_0x1577cb);if('comment'!==_0xd09153)continue;const _0x5651ad=_0x2d83ba['getCommentThread'](_0x1e6107),_0x13a399=this['hasMarkerForId'](_0x1e6107);_0x5651ad&&(!_0x5651ad['_hasTargetInContent']&&_0x1aa329&&_0x2c60c7['editing']['view']['once']('render',()=>{const _0x4a5228=_0x2c60c7['plugins']['get']($t),_0x76350=_0x2d83ba['_threadToController']['get'](_0x5651ad)['view'];_0x4a5228['getByInnerView'](_0x76350)['refreshVisibility']();},{'priority':'low'}),_0x5651ad['_hasTargetInContent']=_0x13a399||!!_0x1aa329),_0x1aa329||(_0x1eecd3['add'](_0x1577cb),_0x574113['delete'](_0x1577cb));}for(const _0x4d3e70 of _0x1eecd3){const {id:_0x14406c}=hi(_0x4d3e70),_0x257b07=_0x2d83ba['getCommentThread'](_0x14406c);if(_0x574113['delete'](_0x4d3e70),!_0x257b07)continue;const _0x12be5b=this['hasMarkerForId'](_0x14406c);_0x12be5b||_0x257b07['isSubmitted']?_0x12be5b||_0x257b07['unlinkedAt']||_0x257b07['setUnlinkedAt'](new Date()):_0x257b07['remove']();}_0x1eecd3['clear']();});}['_handleInitialThreads'](_0xe96af4){_0xe96af4['forEach'](_0x1e02b2=>{_0x1e02b2['unlinkedAt']&&this['_attachArchivedThread'](_0x1e02b2['id']);});}['_getTargetForId'](_0x429f07){const _0x31a2c4=this['editor'],_0x59b16b=this['getAllMarkersForId'](_0x429f07);return _0x2182b9(_0x31a2c4['editing'],_0x59b16b);}['_getTextContext'](_0x67fa15){const _0xc9910a=this['getAllMarkersForId'](_0x67fa15);let _0x122143='',_0x6a2bee=!0x1;for(const _0x2f4f85 of _0xc9910a){const _0x483ef8=_0x2f4f85['getRange']();for(const _0x26637e of Array['from'](_0x483ef8['getItems']()))_0x26637e['is']('$textProxy')?(_0x122143&&_0x6a2bee&&(_0x122143+='\x20',_0x6a2bee=!0x1),_0x122143+=_0x26637e['data']):_0x6a2bee=!0x0;_0x6a2bee=!0x0;}return _0x122143['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3eff27,_0x57c0cd){const _0x4286fe=this['editor'],_0x3695fd=_0x4286fe['plugins']['get'](Qt);let _0x3b0ff3=_0x3695fd['getCommentThread'](_0x57c0cd);const _0x453ef1=_0x4286fe['config']['get']('collaboration.channelId'),_0xae0d0e=_0x4286fe['plugins']['get'](si);if(_0x3b0ff3&&(_0x3b0ff3['unlinkedAt']&&_0x3b0ff3['setUnlinkedAt'](null),_0x3b0ff3['isAttached']))return _0x3b0ff3;return!this['getAllMarkersForId'](_0x57c0cd)[0x0]['managedUsingOperations']?_0x4286fe['editing']['view']['once']('render',()=>{if(_0x3695fd['getCommentThread'](_0x57c0cd))return;const _0xe58f08=_0x4286fe['plugins']['get']($t);_0x3b0ff3=_0x3695fd['openNewCommentThread']({'channelId':_0x453ef1,'threadId':_0x57c0cd,'target':()=>this['_getTargetForId'](_0x57c0cd),'context':{'type':'text','value':this['_getTextContext'](_0x57c0cd)}});const _0x30365a=_0x3695fd['_threadToController']['get'](_0x3b0ff3)['view'],_0x2068cc=_0xe58f08['getByInnerView'](_0x30365a);_0x2068cc&&_0xae0d0e['registerAnnotation'](_0x2068cc);},{'priority':'low'}):_0x3695fd['fetchCommentThread']({'channelId':_0x453ef1,'threadId':_0x57c0cd})['then'](_0x2e3e7f=>{if('destroyed'!==_0x4286fe['state']){if(_0x3b0ff3=_0x2e3e7f,_0x3b0ff3&&!_0x3b0ff3['isAttached']){const _0x26d2d2=_0x3b0ff3['attachTo'](()=>this['_getTargetForId'](_0x57c0cd));_0xae0d0e['registerAnnotation'](_0x26d2d2),_0x3b0ff3['isResolved']&&this['_reconvertMarkers'](_0x57c0cd);}else{if(!_0x3b0ff3){const _0x4cd6c7=this['getAllMarkersForId'](_0x57c0cd);_0x4286fe['model']['change'](_0x4c96b7=>{for(const _0x5a5057 of _0x4cd6c7)_0x4c96b7['removeMarker'](_0x5a5057);});}}}}),_0x3b0ff3;}['_handleThreadMarker'](_0x56b6ca,_0x3e1355){const _0x26e53a=this['_attachMarkerToThread'](_0x56b6ca,_0x3e1355);_0x26e53a&&!_0x26e53a['context']&&_0x26e53a['setContext']({'type':'text','value':this['_getTextContext'](_0x3e1355)});}['_initAriaMarkerChangeAnnouncements'](){const _0xaaa3d5=this['editor'];_0x165753(_0xaaa3d5['model'],({left:_0x3efd99,entered:_0x3a4434})=>{for(const _0x8ad580 of _0x3efd99)if(ui(_0x8ad580)){_0xaaa3d5['ui']['ariaLiveAnnouncer']['announce'](bt(_0xaaa3d5['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x8d0f82 of _0x3a4434)if(ui(_0x8d0f82)){_0xaaa3d5['ui']['ariaLiveAnnouncer']['announce'](bt(_0xaaa3d5['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x1f7355(_0x71ab79)));break;}});}}function di(_0x120807,_0x410549){return _0x410549?_0x120807+':'+_0x410549:_0x120807;}function li(_0x58e735,_0x4bb55){const _0x24941f=_0x4bb55['schema'],_0x44e61f=_0x4bb55['createRange'](_0x58e735['start']);for(const _0x4e137e of _0x58e735['getWalker']()){const {type:_0x214277,item:_0x2bcd30,nextPosition:_0x50d6f9}=_0x4e137e;if('text'===_0x214277||_0x24941f['isObject'](_0x2bcd30)){const _0x32cfc4=_0x4bb55['createPositionBefore'](_0x2bcd30);_0x44e61f['isCollapsed']&&(_0x44e61f['start']=_0x32cfc4),_0x44e61f['end']=_0x50d6f9;}}return _0x44e61f;}function ui(_0x2d6800){return'comment'===hi(_0x2d6800['name'])['group'];}class mi extends _0x313055{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0xa0c468=this['editor'],_0x3886bf=_0xa0c468['plugins']['get'](Qt),_0x369ff3=_0xa0c468['plugins']['get'](ci),_0x4a05ef=_0xa0c468['plugins']['get']($t),_0x57f44c=_0xa0c468['plugins']['get'](si);_0xa0c468['ui']['componentFactory']['add']('comment',()=>{const _0x5f0a90=this['_createUIButton'](_0xaaf754);return _0x5f0a90['tooltip']=!0x0,_0x5f0a90;}),_0xa0c468['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x57f44c['addSourceCollector'](()=>{const _0x29c5ff=[];for(const [_0x45d503,_0x5f2f02]of _0x3886bf['_threadToController']){const _0x22b58c=_0x369ff3['getAllMarkersForId'](_0x45d503['id']),_0x1d2a15=_0x22b58c['map'](_0x5aa694=>_0x5aa694['getRange']());_0x22b58c['length']>0x0&&_0x29c5ff['push']([_0x5f2f02['view'],_0x1d2a15]);}return _0x29c5ff;}),this['listenTo'](_0x4a05ef,'change:activeAnnotations',(_0x1374f0,_0x40bc59,_0x26fe93)=>{const _0x8b9b37=Array['from'](_0x26fe93)['map'](_0x492ee3=>_0x492ee3['innerView'])['find'](_0x5c9e59=>_0x3886bf['_viewToController']['has'](_0x5c9e59));if(!_0x8b9b37)return void(_0x369ff3['activeMarker']=null);const _0x5515c8=_0x3886bf['_viewToController']['get'](_0x8b9b37)['model']['id'],_0x1b6246='comment:'+_0x5515c8;_0x5515c8&&_0x369ff3['hasMarkerForId'](_0x5515c8)?_0x369ff3['activeMarker']=_0x1b6246:_0x369ff3['activeMarker']&&(_0x369ff3['activeMarker']=null);}),this['listenTo'](_0x3886bf,'removeCommentThread',(_0x5a6add,{threadId:_0x52a4b2,isFromAdapter:_0xb272e1})=>{!_0xb272e1&&_0xa0c468['ui']['focusTracker']['isFocused']&&_0x369ff3['hasMarkerForId'](_0x52a4b2)&&_0xa0c468['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3886bf,'addComment',(_0x1bbcdd,{threadId:_0x12b16a,isFromAdapter:_0x2624b2})=>{if(_0x2624b2||!_0x369ff3['hasMarkerForId'](_0x12b16a)||!_0x3886bf['hasCommentThread'](_0x12b16a))return;0x1===_0x3886bf['getCommentThread'](_0x12b16a)['length']&&(_0xa0c468['editing']['view']['focus'](),_0x1bbcdd['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x223f54=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xcceed1;for(const _0x5a8b64 in _0x223f54){const _0x145361=_0x5a8b64,_0x4994b5=_0x223f54[_0x145361];if('commentsLicenseKeyValid'==_0x4994b5||'commentsLicenseKeyInvalid'==_0x4994b5||'commentsLicenseKeyExpired'==_0x4994b5||'commentsLicenseKeyDomainLimit'==_0x4994b5||'commentsLicenseKeyNotAllowed'==_0x4994b5||'commentsLicenseKeyEvaluationLimit'==_0x4994b5||'commentsLicenseKeyUsageLimit'==_0x4994b5){delete _0x223f54[_0x145361],_0xcceed1=_0x4994b5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xcceed1&&_0x223f54['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xcceed1&&_0x223f54['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xcceed1&&_0x223f54['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xcceed1&&_0x223f54['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xcceed1&&_0x223f54['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0xcceed1&&_0x223f54['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2a21e5){const _0x5deb7a=this['editor'],_0x4d6b9e=new _0x2a21e5(_0x5deb7a['locale']),_0x2f9da4=_0x5deb7a['commands']['get']('addCommentThread');return _0x4d6b9e['set']({'label':bt(_0x5deb7a['locale'],'Comment'),'icon':_0x24ff5b}),_0x4d6b9e['bind']('isEnabled')['to'](_0x2f9da4,'isEnabled',_0x2f9da4,'hasContent',(_0x4467ff,_0x343143)=>_0x4467ff&&_0x343143),this['listenTo'](_0x4d6b9e,'execute',()=>{_0x2f9da4['execute']();}),_0x4d6b9e;}}class fi extends _0x313055{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x1f2c94){super(_0x1f2c94),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xfc673f,_0x1544a1,_0x33562a)=>{_0x33562a?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x141baa,_0x29204e]of this['editor']['commands'])_0x29204e['affectsData']&&'addCommentThread'!==_0x141baa&&_0x29204e['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 _0x442c8e=this['editor']['editing']['view']['document'];this['listenTo'](_0x442c8e,'cut',_0x2ec301=>_0x2ec301['stop'](),{'priority':'highest'}),this['listenTo'](_0x442c8e,'clipboardInput',_0x946b0=>_0x946b0['stop'](),{'priority':'highest'}),this['listenTo'](_0x442c8e,'delete',_0x4cef9b=>_0x4cef9b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x290a8b,_0x415545]of this['editor']['commands'])_0x415545['affectsData']&&'addCommentThread'!==_0x290a8b&&_0x415545['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x10d0b1{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49df68){super(_0x49df68),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1d3111=this['context']['plugins']['get']($t);this['listenTo'](_0x1d3111,'_activateAnnotation',(_0x43cff4,_0x2d9ee1)=>{for(const _0x59779c of this['activeUIs']){const _0x354ca0=this['_uis']['get'](_0x59779c);(0x0,this['uisData']['get'](_0x59779c)['filter'])(_0x2d9ee1)&&_0x354ca0['setActiveAnnotation'](_0x2d9ee1);}}),this['listenTo'](_0x1d3111,'_deactivateAllAnnotations',()=>{for(const _0x555468 of this['activeUIs']){this['_uis']['get'](_0x555468)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1d3111['_visibleAnnotations'],'add',(_0x565d6c,_0x3ce1b2)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3ce1b2);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4d7d2e){return this['activeUIs']['has'](_0x4d7d2e);}['activate'](_0x350879,_0x593be7=this['defaultFilter']){const _0xc08435=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x350879))throw new _0x495de2('annotationsuis-missing-ui',this,{'uiName':_0x350879});this['isActive'](_0x350879)&&this['deactivate'](_0x350879),this['activeUIs']['add'](_0x350879);const _0x1a4546=new jt();Xt({'source':_0xc08435['_visibleAnnotations'],'target':_0x1a4546,'filter':_0x593be7}),this['uisData']['set'](_0x350879,{'collection':_0x1a4546,'filter':_0x593be7});const _0x3e8166=this['_uis']['get'](_0x350879);_0x3e8166['attach'](_0x1a4546),this['listenTo'](_0x3e8166,'change:activeAnnotation',(_0x5799e7,_0x547afe,_0x1f7d7f,_0x33265f)=>{_0x33265f&&_0xc08435['_removeActiveAnnotation'](_0x33265f),_0x1f7d7f&&_0xc08435['_addActiveAnnotation'](_0x1f7d7f);});}['deactivate'](_0x417803){if(this['activeUIs']['delete'](_0x417803),!this['_uis']['has'](_0x417803))throw new _0x495de2('annotationsuis-missing-ui',this,{'uiName':_0x417803});const _0x557124=this['_uis']['get'](_0x417803);_0x557124['detach'](),this['stopListening'](_0x557124),this['uisData']['get'](_0x417803)['collection']['destroy'](),this['uisData']['delete'](_0x417803);}['switchTo'](_0x494cda){if(!this['_uis']['has'](_0x494cda))throw new _0x495de2('annotationsuis-missing-ui',this,{'uiName':_0x494cda});const _0x34e8d3=this['context']['plugins']['get']($t),_0x1c5b1b=Array['from'](_0x34e8d3['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x494cda);const _0x1d470b=this['_uis']['get'](_0x494cda);_0x1d470b['setActiveAnnotation'](_0x1c5b1b),_0x1d470b['_setSelectedAnnotations']&&_0x1c5b1b&&_0x1d470b['_setSelectedAnnotations']([_0x1c5b1b]);}['deactivateAll'](){for(const _0x514edd of this['activeUIs'])this['deactivate'](_0x514edd);}['register'](_0x31fea1,_0x2535d6){if(this['_uis']['has'](_0x31fea1))throw new _0x495de2('annotationsuis-register-already-registered');if('function'!=typeof _0x2535d6['attach']||'function'!=typeof _0x2535d6['detach']||'function'!=typeof _0x2535d6['setActiveAnnotation'])throw new _0x495de2('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x31fea1,_0x2535d6);}['refilterAnnotations'](){const _0x120285=this['context']['plugins']['get']($t)['collection'],_0x49bbbd=new Map(),_0xb56fd9=Array['from'](this['activeUIs']);for(const _0x41e559 of this['activeUIs']){const _0xfe9738=this['uisData']['get'](_0x41e559)['collection'];for(const _0x4db323 of _0xfe9738)_0x49bbbd['set'](_0x4db323,_0x41e559);}for(const _0x3caa30 of _0x120285){const _0x3cca7e=_0x49bbbd['get'](_0x3caa30);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3caa30);const _0x5c7978=_0xb56fd9['find'](_0x41f5dd=>this['uisData']['get'](_0x41f5dd)['filter'](_0x3caa30));_0x3cca7e!==_0x5c7978&&(_0x3cca7e&&this['uisData']['get'](_0x3cca7e)['collection']['remove'](_0x3caa30),_0x5c7978&&this['uisData']['get'](_0x5c7978)['collection']['add'](_0x3caa30));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x33d75f){const _0x30d9e4=[];for(const _0x1f030b of this['activeUIs']){(0x0,this['uisData']['get'](_0x1f030b)['filter'])(_0x33d75f)&&_0x30d9e4['push'](_0x1f030b);}if(_0x30d9e4['length']>0x1)throw new _0x495de2('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x30d9e4,'annotationType':_0x33d75f['type']});}}const wi=/* #__PURE__ -- @preserve */
32
- _0x20d3f4('px');class _i extends _0x40361{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x46fe59){super(_0x46fe59);const _0x54d92d=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 _0x5d8869(),this['focusCycler']=new _0x89dbb6({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x54d92d['to']('class')],'style':{'minHeight':_0x54d92d['to']('minHeight',_0x221068=>'number'==typeof _0x221068?wi(_0x221068+0xa):null)},'dir':_0x46fe59['uiLanguageDirection'],'role':'application','aria-label':bt(_0x46fe59,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x46fe59,'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',_0x5fb88c=>{this['_updateItemPositionInFocusables'](_0x5fb88c['source']);}),this['list']['forEach'](_0x154e2a=>{this['focusTracker']['add'](_0x154e2a['element']),this['_updateItemPositionInFocusables'](_0x154e2a);}),this['list']['on']('change',(_0x317c2b,_0x58bcc5)=>{for(const _0x2bbb78 of _0x58bcc5['removed'])this['focusTracker']['remove'](_0x2bbb78['element']),this['focusables']['remove'](_0x2bbb78);for(const _0x21e90c of _0x58bcc5['added'])this['focusTracker']['add'](_0x21e90c['element']),this['_updateItemPositionInFocusables'](_0x21e90c);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x20a5e9){const _0x282474=this['focusables']['getIndex'](_0x20a5e9);let _0x19ed6c,_0x55146a;for(const _0xa4c6f7 of this['focusables'])if(_0x20a5e9['top']<_0xa4c6f7['top']){_0x19ed6c=_0xa4c6f7;break;}if(_0x55146a=_0x19ed6c?this['focusables']['getIndex'](_0x19ed6c):this['focusables']['length'],-0x1!==_0x282474){if(_0x282474===_0x55146a-0x1)return;this['focusables']['remove'](_0x20a5e9),_0x55146a=_0x19ed6c?this['focusables']['getIndex'](_0x19ed6c):this['focusables']['length'];}this['focusables']['add'](_0x20a5e9,_0x55146a);}}const gi=/* #__PURE__ -- @preserve */
33
- _0x20d3f4('px');class Ai extends _0x40361{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x44c104){super(_0x44c104),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x39d64c,_0x4b19fa)=>_0x39d64c+_0x4b19fa),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5f2408=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5f2408['to']('isAnimationDisabled',_0x118f3b=>_0x118f3b?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5f2408['to']('top',_0x177128=>gi(_0x177128))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x10b3ca=this['element']['clientHeight'];_0x10b3ca&&(this['height']=_0x10b3ca);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x10d0b1{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2165da){super(_0x2165da),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 _0x2822e2=this['context']['config']['get']('sidebar.container');_0x2822e2&&this['setContainer'](_0x2822e2);}['setContainer'](_0x2910f6){if(!yi(_0x2910f6))throw new _0x495de2('sidebar-setcontainer-invalid-element');this['container']=_0x2910f6;}['_attachToContainer']({viewClass:_0x44d296='',spaceBetweenItems:_0xffa687=0x19}={}){if(!yi(this['container']))throw new _0x495de2('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x44d296,this['_spaceBetweenItems']=_0xffa687;}['rearrange']({removedAnnotation:_0x22e624,previousAnnotation:_0x417b4f,nextAnnotation:_0xefa545}){const _0x58b713=this['getSidebarItemView'](_0x22e624);this['view']['list']['remove'](_0x58b713),this['_destroySidebarItemView'](_0x22e624),_0x417b4f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x417b4f)),_0xefa545&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xefa545)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x35de77,activatedAnnotation:_0x4dadac,disableAnimationOnActivatedAnnotation:_0x1766c8}){if(this['_activeAnnotation']=_0x4dadac,_0x35de77){_0x35de77['isActive']=!0x1;const _0xd09562=this['getSidebarItemView'](_0x35de77);_0xd09562&&_0x1766c8&&(_0xd09562['isAnimationDisabled']=!0x1);}if(_0x4dadac){const _0x17d4f2=this['getSidebarItemView'](_0x4dadac);_0x17d4f2&&(_0x4dadac['isActive']=!0x0,_0x1766c8&&(_0x17d4f2['isAnimationDisabled']=!0x0,_0x17d4f2['top']+=0x1),this['_alignToTargetRect'](_0x17d4f2));}}['_detachFromContainer'](_0x54a2be){if(this['view']['element']['remove'](),_0x54a2be){for(const _0x4c63b1 of _0x54a2be)this['_destroySidebarItemView'](_0x4c63b1);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xbc0fd3,_0x20511f){_0x20511f||(_0x20511f=_0xbc0fd3['view']);const _0x3a9f86=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3a9f86,_0xbc0fd3),this['_annotationToSidebarItemView']['set'](_0xbc0fd3,_0x3a9f86),_0x3a9f86['content']['add'](_0x20511f),this['listenTo'](_0xbc0fd3['view'],'change:targetRect',(_0x24bd0d,_0x29135a,_0x590415)=>{const _0x347ba3=this['_getTargetTop'](_0xbc0fd3,_0x590415);_0x3a9f86['_targetTop']!=_0x347ba3&&(_0x3a9f86['_targetTop']=_0x347ba3,this['_setItemTop'](_0x3a9f86,_0x347ba3));}),this['listenTo'](_0x3a9f86,'change:top',()=>{this['_recalculate'](_0x3a9f86,'top');}),this['listenTo'](_0x3a9f86,'change:bottom',()=>{this['_recalculate'](_0x3a9f86,'bottom');}),this['_alignToTargetRect'](_0x3a9f86);const _0x126446=this['_getItemBefore'](_0x3a9f86);if(_0x126446)this['_alignAfterItem'](_0x126446,_0x3a9f86)||this['_alignToTargetRect'](_0x3a9f86);else this['_alignToTargetRect'](_0x3a9f86);return this['_updateLastItem'](),this['view']['list']['add'](_0x3a9f86),_0x3a9f86;}['_alignForTopChange'](_0x5df6a0){if(!_0x5df6a0['content']['length'])return;const _0x56c788=this['_getItemBefore'](_0x5df6a0);if(!_0x56c788)return;const _0x592e16=this['_sidebarItemViewToAnnotation']['get'](_0x56c788),_0x4d7e19=this['_activeAnnotation'];_0x4d7e19&&_0x4d7e19===_0x592e16?this['_alignAfterItem'](_0x56c788,_0x5df6a0):this['_alignBeforeItem'](_0x5df6a0,_0x56c788);}['_alignForBottomChange'](_0x27c156){if(!_0x27c156['content']['length'])return;const _0x46ecaf=this['_getItemAfter'](_0x27c156);if(!_0x46ecaf)return;const _0x139021=this['_sidebarItemViewToAnnotation']['get'](_0x46ecaf),_0x304be2=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5fbf0b=this['_activeAnnotation'];_0x5fbf0b&&_0x5fbf0b===_0x139021&&_0x304be2?(this['_alignBeforeItem'](_0x46ecaf,_0x27c156),this['_alignAfterItem'](_0x27c156,_0x46ecaf)):_0x5fbf0b&&_0x5fbf0b===_0x139021?this['_alignBeforeItem'](_0x46ecaf,_0x27c156):this['_alignAfterItem'](_0x27c156,_0x46ecaf);}['_recalculate'](_0x2c7e34,_0x741ba3){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5f2f3a,changedProp:_0x381c38}of this['_recalculateBuffer'])'top'===_0x381c38?this['_alignForTopChange'](_0x5f2f3a):this['_alignForBottomChange'](_0x5f2f3a);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2c7e34,'changedProp':_0x741ba3});}['getSidebarItemView'](_0x22e826){return this['_annotationToSidebarItemView']['get'](_0x22e826);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5954b3){const _0x14a66e=this['getSidebarItemView'](_0x5954b3);this['stopListening'](_0x14a66e),this['stopListening'](_0x5954b3['view']),_0x14a66e['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5954b3),this['_sidebarItemViewToAnnotation']['delete'](_0x14a66e);}['_createSidebarView'](){const _0x525dea=new _i(this['context']['locale']);return _0x525dea['render'](),this['on']('change:_lastItem',(_0x244b84,_0x57b21a,_0xd8b35a,_0x11b92f)=>{_0x11b92f&&_0x525dea['unbind']('minHeight'),_0xd8b35a?_0x525dea['bind']('minHeight')['to'](_0xd8b35a,'bottom'):_0x525dea['minHeight']=null;}),_0x525dea;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x24796c){const _0x1ecd8a=this['_sidebarItemViewToAnnotation']['get'](_0x24796c),_0x530492=_0x1ecd8a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1ecd8a)-0x1);return _0x530492&&this['getSidebarItemView'](_0x530492)||null;}['_getItemAfter'](_0x396af9){const _0x10f8de=this['_sidebarItemViewToAnnotation']['get'](_0x396af9),_0x28c59b=_0x10f8de&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x10f8de)+0x1);return _0x28c59b&&this['getSidebarItemView'](_0x28c59b)||null;}['_alignBeforeItem'](_0x132c35,_0x46f1fd){_0x132c35['updateHeight']();const _0x4a0ced=vi(_0x46f1fd['bottom']+this['_spaceBetweenItems'],_0x132c35['top']);return!!_0x4a0ced&&(this['_setItemTop'](_0x46f1fd,_0x46f1fd['top']-_0x4a0ced),!0x0);}['_alignAfterItem'](_0x56561b,_0x391eb7){_0x56561b['updateHeight']();const _0x528ea5=vi(_0x56561b['bottom']+this['_spaceBetweenItems'],_0x391eb7['top']);return!!_0x528ea5&&(this['_setItemTop'](_0x391eb7,_0x391eb7['top']+_0x528ea5,!0x1),!0x0);}['_alignToTargetRect'](_0x24face){const _0x5d6029=this['_sidebarItemViewToAnnotation']['get'](_0x24face);if(!_0x5d6029||!_0x5d6029['target']||!_0x5d6029['targetRect'])return;const _0x4ce62b=this['_getTargetTop'](_0x5d6029,_0x5d6029['targetRect']);this['_setItemTop'](_0x24face,_0x4ce62b);}['_getTargetTop'](_0x1b6cf3,_0xdecc35){if(null===_0xdecc35)return 0x0;if(_0x1b6cf3['target']instanceof _0x511c86)return _0xdecc35['top'];{const _0x743618=new _0x511c86(this['view']['element'])['top'];return _0xdecc35['top']-_0x743618;}}['_setItemTop'](_0x20ee21,_0xefddf4,_0x486fae=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x486fae&&(_0xefddf4=Math['max'](_0xefddf4,this['_getMaxAvailableTop'](_0x20ee21))),_0x20ee21['top']=_0xefddf4;}['_getMaxAvailableTop'](_0x347f6f){let _0x3a6323=this['_getItemBefore'](_0x347f6f),_0x6de81f=0x0;for(;_0x3a6323;)_0x3a6323['updateHeight'](),_0x6de81f+=this['_spaceBetweenItems']+_0x3a6323['height'],_0x3a6323=this['_getItemBefore'](_0x3a6323);return _0x6de81f;}}function vi(_0x2542fd,_0x202be5){return Math['max'](_0x2542fd-_0x202be5,0x0);}function yi(_0x19fd6a){return null!==_0x19fd6a&&'object'==typeof _0x19fd6a&&0x1===_0x19fd6a['nodeType'];}class Ci extends _0x10d0b1{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e6c47){super(_0x3e6c47),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xb591f1(),this['_refreshPositioningDebounced']=_0x5daa54(()=>{_0x3e6c47['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x27e774=this['context']['plugins']['get'](pi),_0x5c7281=this['context']['plugins']['get'](Ti);_0x27e774['register']('wideSidebar',this),_0x5c7281['container']&&_0x27e774['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x334812){if(_0x334812===this['activeAnnotation'])return;const _0xd2900c=this['context']['plugins']['get'](Ti);_0xd2900c['_activeAnnotation']=_0x334812;const _0x44232b=this['activeAnnotation'];_0xd2900c['refresh']({'blurredAnnotation':_0x44232b,'activatedAnnotation':_0x334812}),this['activeAnnotation']=_0x334812;}['attach'](_0x574cf7){this['annotations']=_0x574cf7;const _0x29584d=this['context']['plugins']['get'](Ti);if(_0x29584d['_annotations']=_0x574cf7,this['isAttached'])throw new _0x495de2('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x29584d,'set:container',()=>{this['detach'](),this['listenTo'](_0x29584d,'change:container',_0x3aea13=>{_0x3aea13['off'](),this['attach'](_0x574cf7);});}),_0x29584d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x17b598=_0x2c340a=>{_0x2c340a['updateTargetRect'](),_0x29584d['addAnnotation'](_0x2c340a);};for(const _0x4d5a7f of _0x574cf7)_0x17b598(_0x4d5a7f);this['listenTo'](_0x574cf7,'add',(_0x1b7193,_0x2052ed)=>{_0x17b598(_0x2052ed);}),this['listenTo'](_0x574cf7,'remove',(_0x53557a,_0x1d8518,_0x196579)=>{_0x29584d['rearrange']({'removedAnnotation':_0x1d8518,'previousAnnotation':_0x574cf7['get'](_0x196579-0x1),'nextAnnotation':_0x574cf7['get'](_0x196579+0x1)}),_0x1d8518===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x574cf7,'focus',(_0x346010,_0x47f1b5)=>{this['setActiveAnnotation'](_0x47f1b5);}),this['listenTo'](_0x574cf7,'blur',()=>{this['setActiveAnnotation'](null);});const _0xeeb1a8=this['context']instanceof _0x1ff8d6?this['context']['editors']:new _0xb591f1([this['context']]);for(const _0xd964e6 of _0xeeb1a8)this['_integrateWithEditorAnnotations'](_0xd964e6);this['listenTo'](_0xeeb1a8,'add',(_0x2d00c9,_0x4dc317)=>{this['listenTo'](_0x4dc317,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4dc317);});}),this['listenTo'](_0xeeb1a8,'remove',(_0x357183,_0x105eb6)=>{_0x105eb6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x105eb6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x495de2('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3bf318=this['context']['plugins']['get'](Ti);_0x3bf318['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3bf318),this['stopListening'](this['annotations']),this['context']instanceof _0x1ff8d6&&this['stopListening'](this['context']['editors']);for(const _0x27bebb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x27bebb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5c92ae){if(!_0x5c92ae['plugins']['has']('EditorAnnotations'))return;const _0x48387b=_0x5c92ae['plugins']['get']('EditorAnnotations'),_0x4c434d=()=>{const _0xb75146=_0x48387b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0xb75146[0x0]||null);};this['listenTo'](_0x48387b,'refresh',_0x4c434d),this['listenTo'](_0x48387b,'blur',(_0x591963,{isAnnotationTracked:_0x214a80})=>{this['activeAnnotation']&&_0x214a80(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x48387b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1a338b=>{_0x48387b['hasDomSelection']()&&(_0x4c434d(),_0x1a338b['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x48387b);}['_destroyEditorAnnotationsIntegration'](_0x57043d){this['stopListening'](_0x57043d),this['_editorAnnotations']['remove'](_0x57043d);}}class Ii extends _0xaaf754{['counterView'];constructor(_0x4b11fd){super(_0x4b11fd);const _0x466e70=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x49ddca,_0x3735b2)=>_0x49ddca?'...':_0x3735b2['toString']()),this['set']('annotationType',''),this['icon']=_0x24ff5b,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x40361(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x466e70['to']('annotationType',_0x4c463a=>'ck-annotation-counter__badge--'+_0x4c463a),_0x466e70['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x466e70['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x10d0b1{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c1745){super(_0x4c1745),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x215ca8())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xb591f1(),this['_refreshPositioningDebounced']=_0x5daa54(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x127954){this['annotations']=_0x127954;const _0x1c57fa=this['context']['plugins']['get'](Ti),_0x58489c=this['balloonPanelView'];if(_0x1c57fa['_annotations']=_0x127954,this['isAttached'])throw new _0x495de2('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1c57fa,'set:container',()=>{this['detach'](),this['listenTo'](_0x1c57fa,'change:container',_0x151ff6=>{_0x151ff6['off'](),this['attach'](_0x127954);});}),_0x1c57fa['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5c7704=_0xb379d0=>{const _0x293b75=new Ii(this['context']['locale']);_0x1c57fa['addAnnotation'](_0xb379d0,_0x293b75),this['_annotationToNarrowView']['set'](_0xb379d0,_0x293b75),_0x293b75['bind']('isDirty','annotationType','number')['to'](_0xb379d0['view'],'isDirty','type','length'),_0x293b75['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x58489c['content']['first']!==_0xb379d0['view']?(this['_showBalloon'](_0xb379d0),_0xb379d0['view']['element']['focus'](),this['setActiveAnnotation'](_0xb379d0)):this['setActiveAnnotation'](null);});};for(const _0x1bbb8e of _0x127954)_0x5c7704(_0x1bbb8e);this['listenTo'](_0x127954,'add',(_0x435ac2,_0x307351)=>{_0x5c7704(_0x307351);}),this['listenTo'](_0x127954,'remove',(_0x45c85b,_0x2fa353,_0x21b9b2)=>{this['_annotationToNarrowView']['get'](_0x2fa353)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2fa353),_0x1c57fa['rearrange']({'removedAnnotation':_0x2fa353,'previousAnnotation':_0x127954['get'](_0x21b9b2-0x1),'nextAnnotation':_0x127954['get'](_0x21b9b2+0x1)}),_0x2fa353===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x127954,'focus',(_0x6d4561,_0x37f608)=>{this['setActiveAnnotation'](_0x37f608);}),this['listenTo'](_0x127954,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3e844e,_0x1867a8)=>{_0x1867a8['keyCode']===_0x12424a['esc']&&_0x58489c['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x58489c['content']['first']),this['_hideBalloon'](),_0x1867a8['stopPropagation'](),_0x1867a8['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x13c2bc,_0x5b42b0)=>{const _0x4a3a0f=_0x5b42b0['target'];_0x58489c['isVisible']&&_0x58489c['element']['contains'](_0x4a3a0f)||_0x1c57fa['view']['element']['contains'](_0x4a3a0f)||_0x13c2bc['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4da467=>_0x4da467['contains'](_0x4a3a0f))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x361d8b=this['context']instanceof _0x1ff8d6?this['context']['editors']:new _0xb591f1([this['context']]);for(const _0x5cdba9 of _0x361d8b)this['_integrateWithEditorAnnotations'](_0x5cdba9);this['listenTo'](_0x361d8b,'add',(_0x41d06c,_0x4cf3ee)=>{this['listenTo'](_0x4cf3ee,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4cf3ee);});}),this['listenTo'](_0x361d8b,'remove',(_0x305ec7,_0x30f5e4)=>{_0x30f5e4['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x30f5e4['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3a53b4){if(_0x3a53b4===this['activeAnnotation'])return;const _0x48f962=this['context']['plugins']['get'](Ti);if(_0x48f962['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3a53b4,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3a53b4)_0x48f962['getSidebarItemView'](_0x3a53b4)?this['_showBalloon'](_0x3a53b4):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3a53b4;}['detach'](){if(!this['isAttached'])throw new _0x495de2('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5bf24b=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1875b2=>_0x1875b2['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5bf24b['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1ff8d6&&this['stopListening'](this['context']['editors']);for(const _0x4b924b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4b924b);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'](_0x3f652b){if(!_0x3f652b['plugins']['has']('EditorAnnotations'))return;const _0x3836ca=_0x3f652b['plugins']['get']('EditorAnnotations'),_0x3913d5=this['context']['plugins']['get'](Ti),_0x310a89=this['annotations'],_0x1e2ac0=this['balloonPanelView'],_0x354d28=()=>{const _0xff5180=_0x3836ca['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xff5180),this['setActiveAnnotation'](_0xff5180[0x0]||null);};this['listenTo'](_0x3836ca,'refresh',_0x354d28),this['listenTo'](_0x3836ca,'blur',(_0x676f0a,{isAnnotationTracked:_0x187394})=>{this['activeAnnotation']&&_0x187394(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3836ca,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x310a89,'blur',_0x4e78f3=>{_0x3836ca['hasDomSelection']()&&_0x4e78f3['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2244c3,_0x129229)=>{const _0x3145ac=_0x129229['target'];_0x1e2ac0['isVisible']&&_0x1e2ac0['element']['contains'](_0x3145ac)||_0x3913d5['view']['element']['contains'](_0x3145ac)||this['activeAnnotation']&&_0x3836ca['hasDomSelection']()&&(_0x354d28(),_0x2244c3['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3836ca);}['_destroyEditorAnnotationsIntegration'](_0x1beb0c){_0x1beb0c&&(this['stopListening'](_0x1beb0c),this['_editorAnnotations']['remove'](_0x1beb0c));}['_setSelectedAnnotations'](_0x270122){for(const _0x169b60 of this['_selectedAnnotations'])_0x270122['includes'](_0x169b60)||this['_manuallyClosedAnnotationViews']['delete'](_0x169b60['view']);this['_selectedAnnotations']=_0x270122;}['_refreshPositioning'](){const _0x2dfda0=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x2dfda0['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2382c0){if(this['_manuallyClosedAnnotationViews']['has'](_0x2382c0['view']))return;const _0x3da67e=this['balloonPanelView']['content']['first'];_0x3da67e!==_0x2382c0['view']?(_0x3da67e&&this['_detachListeners'](_0x3da67e),this['_attachListeners'](_0x2382c0['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2382c0['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xe1326d=this['balloonPanelView']['content']['first'],_0x5e9678=_0xe1326d&&this['annotations']['getByView'](_0xe1326d);if(!_0x5e9678||!this['_annotationToNarrowView']['has'](_0x5e9678))return;const _0x17ee25=this['_annotationToNarrowView']['get'](_0x5e9678)['element'],_0x2d0d44=(function(){const _0x54e868=ht['defaultPositions'];return[_0x54e868['southArrowNorthEast'],_0x54e868['northArrowSouthEast'],_0x54e868['southArrowNorth'],_0x54e868['northArrowSouth'],_0x54e868['southArrowNorthWest'],_0x54e868['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x17ee25,'positions':_0x2d0d44});}['_hideBalloon'](){const _0x44d56d=this['balloonPanelView'],_0x2d9a9a=_0x44d56d['content']['first'];_0x2d9a9a&&(this['_detachListeners'](_0x2d9a9a),_0x44d56d['unpin'](),_0x44d56d['content']['clear']());}['_attachListeners'](_0x84bd33){this['listenTo'](_0x84bd33,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x84bd33,'Esc',(_0x227209,_0x32ada2)=>{this['_manuallyClosedAnnotationViews']['add'](_0x84bd33),this['_hideBalloon'](),_0x32ada2();});}['_detachListeners'](_0x86d410){this['stopListening'](_0x86d410);}}class Ei extends _0x313055{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53786e){super(_0x53786e),_0x53786e['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x53786e['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5daa54(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x3de93e=this['editor']['plugins']['get'](pi);_0x3de93e['context']===this['editor']&&(_0x3de93e['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3a6356,_0x2886e8)=>{const _0x305906=this['_balloon'];if(this['isAttached']&&_0x305906['visibleView']){const _0x418a3e=this['annotations']['getByView'](_0x305906['visibleView']);_0x418a3e&&this['_closeAnnotation'](_0x418a3e),_0x2886e8();}}));}['afterInit'](){const _0x3db037=this['editor']['plugins']['get'](pi);_0x3db037['context']===this['editor']&&(_0x3db037['hasActive']()||_0x3db037['switchTo']('inline'));}['setActiveAnnotation'](_0x18d4a9){_0x18d4a9!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x18d4a9&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x18d4a9)&&this['_addAnnotationToBalloon'](_0x18d4a9,!0x0),_0x18d4a9['isActive']=!0x0),_0x18d4a9||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x18d4a9);}['attach'](_0x4cd872){this['annotations']=_0x4cd872;const _0x382101=this['editor']['plugins']['get'](pi),_0x5b4048=this['_balloon'];if(this['isAttached'])throw new _0x495de2('inlineannotations-attach-already-attached',this);if(_0x382101['context']!==this['editor'])throw new _0x495de2('inlineannotations-not-allowed-with-context',this);const _0x1a665d=this['editor']['plugins']['get'](si);this['listenTo'](_0x1a665d,'refresh',()=>{const _0x418d0e=_0x1a665d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x58ce72,_0x4be05e;!this['_forceRefresh']&&(_0x58ce72=_0x418d0e,_0x4be05e=this['_selectedAnnotations'],_0x58ce72['length']===_0x4be05e['length']&&_0x58ce72['every'](_0x2d030b=>_0x4be05e['includes'](_0x2d030b)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x418d0e),this['setActiveAnnotation'](_0x418d0e[0x0]||null));}),this['listenTo'](_0x1a665d,'blur',(_0x2ec340,{isAnnotationTracked:_0x1a11f6})=>{this['activeAnnotation']&&_0x1a11f6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1a665d,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x477e07,_0x52f969,_0x813d34)=>{_0x813d34||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4cd872,'remove',(_0x57a019,_0x580690)=>{this['_removeAnnotationFromBalloon'](_0x580690),_0x580690===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5b4048,'change:visibleView',(_0x3e14f6,_0xf73ca7,_0xf2918,_0x44b599)=>{_0x44b599&&this['stopListening'](_0x44b599);const _0x257d41=_0x4cd872['getByView'](_0xf2918);_0xf2918&&_0x257d41&&(this['listenTo'](_0xf2918,'change:height',()=>{_0x5b4048['updatePosition']();}),this['listenTo'](_0xf2918,'Esc',()=>{this['_closeAnnotation'](_0x257d41),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x257d41&&this['setActiveAnnotation'](_0x257d41));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5b4048['visibleView']&&(_0x4cd872['getByView'](_0x5b4048['visibleView'])&&_0x5b4048['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 _0x495de2('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2f76d2 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2f76d2);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x392ec3){for(const _0x4dff9e of this['_selectedAnnotations'])_0x392ec3['includes'](_0x4dff9e)||this['_manuallyClosed']['delete'](_0x4dff9e);for(const _0x2bccb4 of this['annotations'])_0x392ec3['includes'](_0x2bccb4)||this['_removeAnnotationFromBalloon'](_0x2bccb4);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5be44b of _0x392ec3)this['_addAnnotationToBalloon'](_0x5be44b);}this['_selectedAnnotations']=_0x392ec3;}['_addAnnotationToBalloon'](_0x4cb6b1,_0x3e1259=!0x1){this['_manuallyClosed']['has'](_0x4cb6b1)||(this['_addedAnnotations']['has'](_0x4cb6b1)||this['_balloon']['hasView'](_0x4cb6b1['view'])||(this['_addedAnnotations']['add'](_0x4cb6b1),this['_balloon']['add']({'stackId':_0x4cb6b1['view']['id'],'view':_0x4cb6b1['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4cb6b1)}})),_0x3e1259&&this['_balloon']['showStack'](_0x4cb6b1['view']['id']));}['_getBalloonTargetForAnnotation'](_0x33bbc5){const _0x2e6ea1=_0x33bbc5['target'],_0x3cd4d6=this['editor']['editing']['view'],_0x3fbd85=_0x3cd4d6['document']['selection']['getFirstRange'](),_0x5c6b42=_0x3cd4d6['domConverter']['viewRangeToDom'](_0x3fbd85);if(_0x5c6b42['collapse'](!0x0),_0x2e6ea1){if(_0x2e6ea1 instanceof _0x511c86)return _0x2e6ea1;let _0x49bb12=[];for(const _0x6fd43a of _0x2e6ea1)_0x49bb12['push'](..._0x511c86['getDomElementRects'](_0x6fd43a));_0x49bb12=function(_0x1f308f){const _0x390c01=[];let _0x3bcb82=_0x1f308f[0x0];for(let _0xc1173=0x1;_0xc1173<_0x1f308f['length'];_0xc1173++)if(Ni(_0x3bcb82,_0x1f308f[_0xc1173])){const _0x27978b=_0x1f308f[_0xc1173]['width'];_0x3bcb82['width']+=_0x27978b,_0x3bcb82['right']+=_0x27978b;}else _0x390c01['push'](_0x3bcb82),_0x3bcb82=_0x1f308f[_0xc1173];return _0x390c01['push'](_0x3bcb82),_0x390c01;}(_0x49bb12);const _0x146be0=_0x5c6b42['getBoundingClientRect']();return _0x49bb12['find'](_0x2e5005=>_0x2e5005['top']<=_0x146be0['top']&&_0x2e5005['bottom']>=_0x146be0['bottom']&&_0x2e5005['left']<=_0x146be0['left']&&_0x2e5005['right']>=_0x146be0['right'])||_0x49bb12[0x0];}return _0x33bbc5['targetRect']||_0x5c6b42;}['_removeAnnotationFromBalloon'](_0x44bc1e){this['_addedAnnotations']['has'](_0x44bc1e)&&this['_balloon']['hasView'](_0x44bc1e['view'])&&(this['_addedAnnotations']['delete'](_0x44bc1e),this['_balloon']['remove'](_0x44bc1e['view']));}['_closeAnnotation'](_0x30303d){this['_manuallyClosed']['add'](_0x30303d),this['_removeAnnotationFromBalloon'](_0x30303d);}}function Ni(_0x20eefc,_0x36d388){return _0x20eefc['top']===_0x36d388['top']&&_0x20eefc['bottom']===_0x36d388['bottom']&&_0x20eefc['right']===_0x36d388['left'];}class ki extends _0x40361{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x39108c,_0x9a374b){super(_0x39108c),this['set']('isEmpty',!_0x9a374b['length']),this['focusTracker']=new _0x5d8869(),this['_annotationViews']=_0x9a374b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x89dbb6({'focusables':_0x9a374b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x9a374b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x9a374b,'remove',(_0x36135f,_0x25df0f)=>{_0x25df0f['isActive']&&this['focus'](),_0x9a374b['length']||(this['isEmpty']=!0x0);});const _0x5157bb=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x39108c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x9a374b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5157bb['if']('isEmpty','ck-hidden',_0x5a490e=>!_0x5a490e)]},'children':[{'text':bt(_0x39108c,'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 _0x19da0a of this['_annotationViews'])this['focusTracker']['add'](_0x19da0a['element']);this['_annotationViews']['on']('change',(_0x149b0c,{added:_0x148bfe,removed:_0x5db2a9})=>{for(const _0x19aab8 of _0x148bfe)this['focusTracker']['add'](_0x19aab8['element']);for(const _0x583b37 of _0x5db2a9)this['focusTracker']['remove'](_0x583b37['element']);});}}class Oi extends _0x10d0b1{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x2a0505){super(_0x2a0505),this['archivedThreads']=new _0xb591f1();}['init'](){const _0x201b14=this['context'],_0x30f31d=_0x201b14['plugins']['get'](Qt),_0x1c8a60=_0x201b14['plugins']['get']($t);this['listenTo'](_0x30f31d,'addCommentThread',(_0x5b75c8,{threadId:_0x2afc38})=>{const _0xb84bc5=_0x30f31d['getCommentThread'](_0x2afc38);_0xb84bc5['archivedAt']&&this['archivedThreads']['add'](_0xb84bc5,this['_calculatePosition'](_0xb84bc5['archivedAt'])),this['listenTo'](_0xb84bc5,'change:archivedAt',(_0x16a3cb,_0x1c15d0,_0x35c3c4)=>{_0x35c3c4?this['archivedThreads']['has'](_0xb84bc5)||this['archivedThreads']['add'](_0xb84bc5,this['_calculatePosition'](_0xb84bc5['archivedAt'])):this['archivedThreads']['has'](_0xb84bc5)&&this['archivedThreads']['remove'](_0xb84bc5);});}),this['listenTo'](_0x30f31d,'removeCommentThread',(_0x5b1d33,{threadId:_0x34ab1d})=>{const _0x302abc=_0x30f31d['getCommentThread'](_0x34ab1d);this['stopListening'](_0x302abc),this['archivedThreads']['has'](_0x302abc)&&this['archivedThreads']['remove'](_0x302abc);},{'priority':'highest'}),this['listenTo'](_0x1c8a60['collection'],'focus',(_0x353511,_0xbfff7e)=>{_0xbfff7e['isVisible']||(_0xbfff7e['isActive']=!0x0,_0x1c8a60['activate'](_0xbfff7e));});}['_calculatePosition'](_0x452671){const _0x4565db=[...this['archivedThreads']]['findIndex'](_0x5a3f1b=>_0x5a3f1b['archivedAt']<_0x452671);return _0x4565db>-0x1?_0x4565db:this['archivedThreads']['length'];}}class Mi extends _0x313055{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x4135bb){super(_0x4135bb),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4f10e1=this['editor'],_0x1b0d46=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4f10e1['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xaaf754,!0x0)),_0x4f10e1['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x44b4ed=this['_createCommentsArchiveButton'](ot);return _0x44b4ed['set']({'role':'menuitemcheckbox'}),_0x44b4ed;});const _0x44b34c=_0x4f10e1['plugins']['get'](Oi),_0x116d7d=_0x4f10e1['plugins']['get']('Annotations'),_0x3cdc2b=_0x4f10e1['plugins']['get']('CommentsRepository');_0x44b34c['archivedThreads']['forEach'](_0x5ab7d1=>{this['_handleNewThread'](_0x5ab7d1);}),this['listenTo'](_0x44b34c['archivedThreads'],'add',(_0x423c35,_0x5f4f5d)=>{this['_handleNewThread'](_0x5f4f5d);}),this['listenTo'](_0x116d7d['collection'],'add',(_0x221b07,_0x12657f)=>{const _0x1a5c59=this['_pendingThreads']['find'](_0x517323=>{const _0x10d92e=_0x3cdc2b['_threadToController']['get'](_0x517323);return _0x10d92e&&_0x12657f['innerView']===_0x10d92e['view'];});if(_0x1a5c59){const _0x52577f=this['_calculatePosition'](_0x1a5c59['archivedAt']);this['_addAnnotationToArchive'](_0x12657f,_0x52577f),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1a5c59),0x1);}}),this['listenTo'](_0x44b34c['archivedThreads'],'remove',(_0x16cc0d,_0x39a57d)=>{const _0x3a4404=_0x4f10e1['config']['get']('collaboration.channelId');if(!_0x3a4404||_0x39a57d['channelId']===_0x3a4404){if(this['_pendingThreads']['includes'](_0x39a57d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x39a57d),0x1);else{const _0x426b16=_0x3cdc2b['_threadToController']['get'](_0x39a57d),_0x3e1422=_0x116d7d['getByInnerView'](_0x426b16['view']);this['annotationViews']['remove'](_0x3e1422['view']),this['stopListening'](_0x3e1422),this['stopListening'](_0x3e1422['focusableElements']);}}}),this['listenTo'](_0x116d7d['collection'],'add',(_0x3a4e6a,_0x2a2218)=>{this['listenTo'](_0x2a2218,'escape',_0x1b0d46);}),this['listenTo'](_0x116d7d['collection'],'remove',(_0x251f1b,_0x3568c9)=>{this['stopListening'](_0x3568c9,'escape',_0x1b0d46);});}['_addAnnotationToArchive'](_0x5cbcb5,_0x25ed11){this['listenTo'](_0x5cbcb5,'set:isVisible',_0x599da8=>{_0x599da8['return']=!0x1,_0x599da8['stop']();}),this['annotationViews']['add'](_0x5cbcb5['view'],_0x25ed11);}['_handleNewThread'](_0x1c326d){const _0x55a499=this['editor']['plugins']['get']('CommentsRepository'),_0x2a05fa=this['editor']['plugins']['get']('Annotations'),_0x1242fd=this['editor']['config']['get']('collaboration.channelId');if(!_0x1242fd||_0x1c326d['channelId']===_0x1242fd){const _0x50fa81=_0x55a499['_threadToController']['get'](_0x1c326d);if(!_0x50fa81)return void this['_pendingThreads']['push'](_0x1c326d);const _0x1d5f39=this['_calculatePosition'](_0x1c326d['archivedAt']),_0x4b8ff8=_0x2a05fa['getByInnerView'](_0x50fa81['view']);_0x4b8ff8['isVisible']&&_0x2a05fa['_visibleAnnotations']['remove'](_0x4b8ff8),this['_addAnnotationToArchive'](_0x4b8ff8,_0x1d5f39);}}['_calculatePosition'](_0x12b3f6){const _0x1608c5=this['editor']['config']['get']('collaboration.channelId'),_0x23d27b=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x1b38ef=>_0x1b38ef['channelId']===_0x1608c5)['findIndex'](_0x4f3520=>_0x4f3520['archivedAt']<_0x12b3f6);return _0x23d27b<0x0||_0x23d27b>this['annotationViews']['length']?this['annotationViews']['length']:_0x23d27b-0x1;}['_toggleDialog'](){const _0x593d48=this['editor'],_0x487191=_0x593d48['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x593d48['locale'],this['annotationViews'])),'commentsArchive'===_0x487191['id']?_0x487191['hide']():_0x487191['show']({'id':'commentsArchive','title':bt(_0x593d48['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3deeef,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x57371b,_0x5d8f8a=!0x1){const _0x2a6d5a=this['editor']['locale'],_0x2ecf1f=this['editor']['plugins']['get']('Dialog'),_0x248597=new _0x57371b(_0x2a6d5a);return _0x248597['bind']('isEnabled')['to'](this,'isEnabled'),_0x248597['bind']('isOn')['to'](_0x2ecf1f,'id',_0x118516=>'commentsArchive'===_0x118516),_0x248597['set']({'label':bt(_0x2a6d5a,'COMMENTS_ARCHIVE'),'icon':_0x3deeef,'isToggleable':!0x0}),_0x5d8f8a&&(_0x248597['tooltip']=!0x0),this['listenTo'](_0x248597,'execute',()=>this['_toggleDialog']()),_0x248597;}['_hideDialogOnAnnotationEscape']=_0x36a52a=>{const _0x462418=_0x36a52a['source'];if(!this['annotationViews']['has'](_0x462418['view']))return;const _0x224247=this['editor']['plugins']['get']('Dialog');_0x224247['isOpen']&&'commentsArchive'===_0x224247['id']&&(_0x224247['hide'](),_0x36a52a['stop']());};}class Ri extends _0x313055{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
23
+ import{Editor as _0x56aa75,ContextPlugin as _0x43feeb,PendingActions as _0x6827a9,Command as _0x53a89f,Plugin as _0x12ccca,Context as _0x1d9a04}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x2de6b9,uid as _0x5ea41d,KeystrokeHandler as _0x24cfe9,FocusTracker as _0x14b748,diff as _0x52e678,Collection as _0x3c06fe,Rect as _0x3d2807,CKEditorError as _0x4e692d,first as _0x504385,priorities as _0x2a14e5,scrollViewportToShowTarget as _0x4e5b6c,getEnvKeystrokeText as _0x56bf67,toUnit as _0x9eb1bb,DomEmitterMixin as _0x5249fd,keyCodes as _0x2db36d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x1fae30,AriaDescriptionView as _0x383a94,setupThreadKeyboardNavigation as _0x3babff,ConfirmMixin as _0x6704c5,LateFocusButtonView as _0xfa16af,trimHtml as _0x4bd3dd,LateFocusDropdownButtonView as _0x2e02a2,FOCUS_ANNOTATION_KEYSTROKE as _0x5bea71,Users as _0x3ff1f3,getDateTimeFormatter as _0x14058f,hashObject as _0x49c742,getAllMarkersDomElementsSorted as _0x7ef8e0,surroundingMarkersDetector as _0x2c7cec}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x3e11fd,cloneDeep as _0x3fb7f5,set as _0x1fcabb,unset as _0x381f55,isEqual as _0x6a1764,debounce as _0x33fa85}from'es-toolkit/compat';import{IconUndo as _0x1a1914,IconCheck as _0x5840a8,IconPencil as _0x2fd946,IconRemoveComment as _0x195e49,IconThreeVerticalDots as _0x52b38,IconAddComment as _0x27acc3,IconCommentsArchive as _0x4408eb}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x10780a,InlineEditableUIView as _0x4377e3,EditorUI as _0x2dcd1f,View as _0x3b6e1d,FocusCycler as _0x20e079,ButtonView as _0x29997a,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
24
+ _0x2de6b9(){['model'];['view'];constructor(_0x5b3b02,_0x503198){super(),this['model']=_0x5b3b02,this['model']['_isAttached']=!0x0,this['view']=_0x503198,this['listenTo'](_0x503198,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x503198,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x503198,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x503198,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x503198,'addComment',(_0x5b645a,_0x18128c)=>this['addComment'](_0x18128c)),this['listenTo'](_0x503198,'updateComment',(_0x209837,_0x3c9f49,_0x51eddb)=>this['updateComment'](_0x3c9f49,_0x51eddb)),this['listenTo'](_0x503198,'removeComment',(_0x5bcfc7,_0x42071e)=>this['removeComment'](_0x42071e));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0xd7b732){this['model']['addComment']({'content':_0xd7b732,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x447a7c,_0xa57d1d){this['model']['getComment'](_0x447a7c)['update']({'content':_0xa57d1d});}['removeComment'](_0x5afe6c){this['model']['getComment'](_0x5afe6c)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x19e78c,_0x316b51,_0x2ce2d9){const t=_0x19e78c['t'];switch(_0x316b51){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'},_0x2ce2d9);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x2ce2d9);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'},_0x2ce2d9);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'},_0x2ce2d9);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2ce2d9);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'},_0x2ce2d9);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'},_0x2ce2d9);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'},_0x2ce2d9);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Et extends _0x10780a{['main'];['editable'];constructor(_0x456f06,_0x3d0fcc){super(_0x456f06);const _0x381345=_0x5ea41d();this['main']=this['createCollection'](),this['editable']=new _0x4377e3(_0x456f06,_0x3d0fcc,void 0x0,{'label':()=>bt(_0x456f06,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x456f06['uiLanguageDirection'],'lang':_0x456f06['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x381345},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Nt extends _0x2dcd1f{['view'];constructor(_0x55bc86){super(_0x55bc86),this['view']=new Et(_0x55bc86['locale'],_0x55bc86['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x3986b0=this['editor']['editing']['view'],_0x10671d=this['view']['editable'],_0x3fd186=_0x3986b0['document']['getRoot']();_0x10671d['name']=_0x3fd186['rootName'],this['view']['render']();const _0x1264fa=_0x10671d['element'];this['setEditableElement'](_0x10671d['name'],_0x1264fa),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3986b0['attachDomRoot'](_0x1264fa),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
25
+ _0x2de6b9(_0x56aa75){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>kt)());constructor(_0x55108a={}){function _0x70074a(_0x5b67d6){return _0x5b67d6['map'](_0x491a10=>String['fromCharCode'](_0x491a10))['join']('');}(_0x55108a=Object['assign']({},_0x55108a))['plugins']||(_0x55108a['plugins']=Ot['defaultPlugins']),super(_0x55108a),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[_0x70074a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x70074a([0x76,0x69,0x65,0x77])][_0x70074a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x70074a([0x61,0x75,0x74,0x6f]),this[_0x70074a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x70074a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x70074a([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x70074a([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x70074a([0x6f,0x6b])});}['create'](){const _0x2b3b44=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2b3b44))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1a61b1=>{const _0x34c0e3=this['model']['document']['getRoot'](),_0x30283d=_0x34c0e3&&_0x34c0e3['getChild'](_0x34c0e3['childCount']-0x1);_0x1a61b1['setSelection'](_0x30283d,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x441840=this['editing']['view'],_0x56e2e9=_0x441840['document']['getRoot'](),_0x16c27f=_0x56e2e9['getChild'](0x0);_0x56e2e9['childCount']>0x1||!_0x16c27f||'p'!=_0x16c27f['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x441840,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x16c27f['placeholder']=this['placeholder']),ut({'view':_0x441840,'element':_0x16c27f,'keepOnFocus':!0x0}),this['placeholderElement']=_0x16c27f);}}class Mt extends _0x3b6e1d{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3c9493,_0x4f2500={}){super(_0x3c9493),this['editor']=null,this['_editorConfig']=_0x4f2500,this['set']('value',_0x4f2500['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x3c9493,'Reply...')),this['set']('submitLabel',bt(_0x3c9493,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x24cfe9(),this['focusTracker']=new _0x14b748(),this['focusCycler']=new _0x20e079({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x3beef0,_0x2505c9)=>{this['cancelButtonView']['fire']('execute'),_0x2505c9();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4ad50b,_0x4004f9)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4004f9());}),this['on']('submit',(_0x416c05,_0x2fb604)=>{_0x2fb604['length']>0xfde8?(alert(bt(_0x3c9493,'TOO_LONG_COMMENT_ALERT',[_0x2fb604['length'],0xfde8])),_0x416c05['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x26a3e8=this['editor'];this['element']['insertBefore'](_0x26a3e8['ui']['element'],this['element']['firstChild']),_0x26a3e8['model']['document']['on']('change',()=>this['value']=_0x26a3e8['getData']()),_0x26a3e8['bind']('placeholder')['to'](this),this['focusables']['add'](_0x26a3e8['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5e2634){-0x1===_0x5e2634?(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:_0x11026a}=this,_0x4b641f=new _0x29997a(_0x11026a);return _0x4b641f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4b641f['withText']=!0x0,_0x4b641f['bind']('label')['to'](this,'submitLabel'),_0x4b641f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4b641f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2fa571,_0x1e298c)=>!_0x1e298c&&!!_0x2fa571['trim']()),_0x4b641f;}['_createCancelButton'](){const {locale:_0x1e9f54}=this,_0x24f928=new _0x29997a(_0x1e9f54);return _0x24f928['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x24f928['label']=bt(_0x1e9f54,'Cancel'),_0x24f928['withText']=!0x0,_0x24f928['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x24f928;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x45db4e=>{this['focusTracker']['add'](_0x45db4e['element']);}),this['focusables']['on']('change',(_0x42db95,_0xeb41ec)=>{for(const _0x218e63 of Array['from'](_0xeb41ec['added'])['reverse']())this['focusTracker']['add'](_0x218e63['element']);});}}class Rt extends _0x3b6e1d{constructor(_0x2683d4,_0x211fc1,_0x110b63){super(_0x2683d4),this['commentInputView']=new Mt(_0x2683d4,_0x110b63),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5f1aa3,_0x6239c7)=>_0x5f1aa3||!!_0x6239c7),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 _0x1fae30(_0x2683d4,_0x211fc1),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'](_0x48fbdd){this['commentInputView']['focus'](_0x48fbdd);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5f0fd6,_0x3c01c9)=>{const {submitButtonView:_0x2ca030,cancelButtonView:_0x19babf,editor:_0x359f67}=this['commentInputView'];[_0x2ca030['element'],_0x19babf['element'],_0x359f67?_0x359f67['editing']['view']['getDomRoot']():null]['filter'](_0x1e64db=>_0x1e64db)['some'](_0x20a3f5=>_0x20a3f5['contains'](_0x3c01c9['target']))||(this['focus'](),_0x3c01c9['preventDefault']());});}}class xt extends _0x3b6e1d{constructor(_0x153343){super(_0x153343);const _0xa709c1=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xa709c1['to']('count',_0x285df0=>bt(_0x153343,'NUMBER_OF_COMMENTS',_0x285df0))}]});}}class St extends _0x3b6e1d{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2ef0e1,_0x13724e,_0x2b629c){super(_0x2ef0e1);const _0x34eed9=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x13724e['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x13724e,this['_config']=_0x2b629c,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x14b748(),this['keystrokes']=new _0x24cfe9(),this['focusCycler']=new _0x20e079({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x296c36=>this['commentViews']['map'](_0x4021ac=>_0x4021ac['element'])['includes'](_0x296c36['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x2ef0e1),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x6c946d=>_0x6c946d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x35a4c0 of _0x13724e['comments'])this['_handleNewCommentModel'](_0x35a4c0);this['_handleInfoComment'](),this['listenTo'](_0x13724e['comments'],'add',(_0x1caf8d,_0x58df04)=>{const _0x1b783c=this['_calculatePosition'](_0x58df04);this['length']++,this['_handleNewCommentModel'](_0x58df04,_0x1b783c),this['refreshVisibleViews']();}),this['listenTo'](_0x13724e['comments'],'remove',(_0x1e8de3,_0x3f732d)=>{this['length']--,this['_handleRemoveCommentModel'](_0x3f732d),this['refreshVisibleViews']();}),this['listenTo'](_0x13724e,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x13724e,'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',_0x34eed9['if']('length','ck-hidden',_0x5b0082=>!_0x5b0082)],'aria-label':bt(_0x2ef0e1,'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'](_0x2b81e7){-0x1===_0x2b81e7?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x573ab4 of this['commentViews'])_0x573ab4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x230662,_0x2368f4){const _0x1e0e60=new this['_config']['CommentView'](this['locale'],_0x230662,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1e0e60['viewUid']=_0x230662['id'],_0x1e0e60['delegate']('removeComment')['to'](this),_0x1e0e60['delegate']('updateComment')['to'](this),_0x1e0e60['delegate']('resolveCommentThread')['to'](this),_0x1e0e60['delegate']('editorReady')['to'](this),_0x1e0e60['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1e0e60,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1e0e60,_0x2368f4);}['_calculatePosition'](_0x4d0c90){const _0x468de9=this['_model']['_findOptimalIndex'](_0x4d0c90);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x4d0c90['authoredAt']?_0x468de9-0x1:_0x468de9:_0x468de9-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5ea55b={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x5ea55b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5ea55b));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5f5a2c){const _0x39ce5b=this['commentViews']['remove'](_0x5f5a2c['id']);this['stopListening'](_0x39ce5b),_0x39ce5b['isEditMode']&&this['_updateHasDirtyComment'](),_0x39ce5b['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x6900f8=>_0x6900f8['isEditMode']);}['_rearrangeCollapse'](){const _0x6db9ff=function(_0x23c0f1){const _0xf426f9=new _0x3c06fe();for(const _0xea2e94 of _0x23c0f1)_0xf426f9['add'](_0xea2e94);return _0xf426f9;}(this['commentViews']),_0x407080=this['_collapsedCommentsView']['count'];for(let _0x55459e=0x1;_0x55459e<=_0x407080;_0x55459e++)_0x6db9ff['remove'](0x1);for(const _0x4386a9 of _0x6db9ff)_0x4386a9['collapse']();_0x407080>0x0&&_0x6db9ff['add'](this['_collapsedCommentsView'],0x1),Pt(_0x52e678(Array['from'](this['visibleViews']),Array['from'](_0x6db9ff)),this['visibleViews'],_0x6db9ff);}['_rearrangeExpand'](){Pt(_0x52e678(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x55c25c of this['visibleViews'])_0x55c25c['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4ce7af=>{this['focusTracker']['add'](_0x4ce7af['element']),this['keystrokes']['listenTo'](_0x4ce7af['element']);}),this['commentViews']['on']('change',(_0x450a3f,_0x3c071c)=>{for(const _0x2f8215 of _0x3c071c['removed'])this['focusTracker']['remove'](_0x2f8215['element']),this['keystrokes']['stopListening'](_0x2f8215['element']);for(const _0x2d71de of Array['from'](_0x3c071c['added'])['reverse']())this['focusTracker']['add'](_0x2d71de['element']),this['keystrokes']['listenTo'](_0x2d71de['element']);});}}function Pt(_0xdd4505,_0x4fed23,_0x2210f2){let _0x1f4fb3=0x0;for(const _0xf26e1d of _0xdd4505)switch(_0xf26e1d){case'insert':_0x4fed23['add'](_0x2210f2['get'](_0x1f4fb3),_0x1f4fb3),_0x1f4fb3++;break;case'delete':_0x4fed23['remove'](_0x1f4fb3);break;case'equal':_0x1f4fb3++;}}class Lt extends _0x3b6e1d{constructor(_0x5b020a){super(_0x5b020a);const _0x2ac817=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2ac817['to']('contextValue',_0x29e68c=>bt(_0x5b020a,'THREAD_CONTEXT_LABEL',_0x29e68c)),'tabindex':-0x1},'children':[{'text':_0x2ac817['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x3b6e1d{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x726058,_0x471175){super(_0x726058);const _0x6cbe91=this['bindTemplate'];this['_model']=_0x471175,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x14b748(),this['keystrokes']=new _0x24cfe9(),this['focusCycler']=new _0x20e079({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xa5e85a=>!!_0xa5e85a),this['bind']('contextValue')['to'](this['_model'],'context',_0x45e8c1=>_0x45e8c1&&_0x45e8c1['value']?this['_trimContextValue'](_0x45e8c1['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x6cbe91['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 _0x164a23=new _0x29997a(this['locale']);return _0x164a23['label']=bt(this['locale'],'Reopen'),_0x164a23['tooltip']=bt(this['locale'],'Reopen'),_0x164a23['icon']=_0x1a1914,_0x164a23['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x51f506=>!_0x51f506),_0x164a23['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1aa7b5,_0x12c997)=>_0x1aa7b5&&_0x12c997),_0x164a23['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x164a23;}['_trimContextValue'](_0x395500){if(_0x395500['length']<0x96)return _0x395500;const _0xfe079d=_0x395500['lastIndexOf']('\x20',0x93);return _0x395500['substring'](0x0,_0xfe079d>-0x1?_0xfe079d:0x93)+'...';}['_attachContextActions'](){const _0x5ba626=this['element']['querySelector']('.ck-context'),_0x281506=_0x5ba626['querySelector']('.ck-context__value');this['listenTo'](_0x5ba626,'mouseenter',()=>{_0x281506['offsetWidth']<_0x281506['scrollWidth']&&_0x5ba626['classList']['add']('overlay');}),this['listenTo'](_0x5ba626,'mouseleave',()=>{_0x5ba626['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x17d5e3 of this['focusables'])this['focusTracker']['add'](_0x17d5e3['element']),this['keystrokes']['listenTo'](_0x17d5e3['element']);}['_createContextView'](){const _0x4badc1=new Lt(this['locale']);return _0x4badc1['bind']('contextValue')['to'](this),_0x4badc1;}}class Vt extends _0x3b6e1d{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x445e96,_0xa2ef10,_0x255f71,_0x340713){super(_0x445e96),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xa2ef10,this['_localUser']=_0x255f71,this['_config']=_0x340713,this['commentThreadHeaderView']=new Dt(_0x445e96,_0xa2ef10),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x383a94(_0x445e96,bt(_0x445e96,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x445e96,_0xa2ef10,Object['assign']({'CommentView':this['_config']['CommentView']},_0x340713)),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',(_0x59b71c,_0x550fe9)=>_0x59b71c||!!_0x550fe9),this['bind']('isUnlinked')['to'](_0xa2ef10,'unlinkedAt',_0x5b8ed7=>!!_0x5b8ed7),this['bind']('ariaLabel')['to'](this,'length',_0x31a0b8=>{const _0x37de91=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x31a0b8,_0x37de91]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x14b748(),this['keystrokes']=new _0x24cfe9(),this['focusCycler']=new _0x20e079({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2cd089=>_0x2cd089['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x3babff(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xc21a0c=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x13b525=_0xc21a0c['commentInputView'];return _0xc21a0c['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x13b525,'value',(_0x4e1e48,_0xa6cd9,_0x1a1eac,_0x4a19d6,_0x44f101)=>!!_0x44f101||!!_0x4a19d6&&_0x1a1eac&&!_0xa6cd9||_0x4e1e48&&_0x1a1eac&&!_0xa6cd9),_0x13b525['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1ed6d2,_0xc85704,_0x112281)=>{let _0x357cc1;return _0x357cc1=_0x112281&&_0xc85704?'Reply\x20to\x20reopen\x20discussion...':_0x1ed6d2?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x357cc1);}),_0x13b525['bind']('submitLabel')['to'](this,'length',_0x1a3820=>bt(this['locale'],_0x1a3820?'Reply':'Comment')),_0x13b525['on']('submit',(_0x3c726d,_0x2f8a06)=>{this['fire']('addComment',_0x2f8a06),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x13b525['on']('cancel',()=>{this['focus']();}),_0x13b525['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x13b525['on']('cancel',_0x2471cc=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2471cc['stop']());}),this['on']('change:isActive',(_0xded20b,_0x45a329,_0x28e1ea)=>{_0x28e1ea||this['length']||_0x13b525['value']||this['fire']('removeCommentThread');}),_0xc21a0c;}}class Bt extends/* #__PURE__ -- @preserve */
27
+ _0x6704c5(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1a8cd5,_0x3e73fc,_0x1c9701,_0x411ab4){super(_0x1a8cd5,_0x3e73fc,_0x1c9701,_0x411ab4),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1a8cd5,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x471c9d,_0x259571,_0x725e48)=>{_0x725e48||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3e3bf7,_0x90ebee,_0x4ec208)=>{_0x4ec208&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x49c178=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x49c178['if']('isActive','ck-thread--active'),_0x49c178['if']('isUnlinked','ck-thread--unlinked'),_0x49c178['to']('actionIndicator',_0x55fb2c=>_0x55fb2c?'ck-thread--'+_0x55fb2c:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x49c178['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 _0x54ea52 of this['commentsListView']['commentViews'])_0x54ea52['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x346e42}=this,_0x36f503=this['commentsListView']['commentViews']['get'](0x0);_0x36f503===this['_boundFirstCommentView']||_0x36f503['isSystemComment']||(this['_boundFirstCommentView']=_0x36f503,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x36f503,'actionIndicator',_0x3caebc=>'remove'===_0x3caebc?'remove':null),_0x36f503['placeholder']=bt(_0x346e42,'Write\x20a\x20comment...'),_0x36f503['removeButton']['on']('execute',_0x3405e6=>{_0x3405e6['stop'](),this['showConfirm'](bt(_0x346e42,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x36f503['focus']();}),_0x36f503['actionBar']['add'](this['resolveButton'],0x0),_0x36f503['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4a5cd2=new _0xfa16af(this['locale']);return _0x4a5cd2['label']=bt(this['locale'],'Resolve'),_0x4a5cd2['tooltip']=bt(this['locale'],'Resolve'),_0x4a5cd2['icon']=_0x5840a8,_0x4a5cd2['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4a5cd2['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x561cdc=>!_0x561cdc),_0x4a5cd2['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x450e8a,_0x58eea6)=>_0x450e8a&&!_0x58eea6),_0x4a5cd2['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4a5cd2;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class Ht extends _0x3b6e1d{constructor(_0x1e9941){super(_0x1e9941),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5e6add,_0x45913a,_0x4457a0)=>{this['element']['innerHTML']=_0x4457a0;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x3b6e1d{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x247fa3,_0x231a49,_0x1bb9a4){super(_0x247fa3),this['_model']=_0x231a49,this['_config']=_0x1bb9a4,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x231a49,'content',_0x231a49,'authoredAt',(_0x338a94,_0x54c905)=>bt(_0x247fa3,'COMMENT_ARIA_LABEL',[_0x231a49['author']['name'],_0x1bb9a4['formatDateTime'](_0x54c905),new DOMParser()['parseFromString'](_0x338a94,'text/html')['body']['textContent'],_0x231a49['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x383a94(_0x247fa3,bt(_0x247fa3,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x14b748(),this['keystrokes']=new _0x24cfe9(),this['focusCycler']=new _0x20e079({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x38a3f9=>_0x38a3f9['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x51685c=new Ht(this['locale']);return _0x51685c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x18899a,_0x2165ff)=>_0x2165ff?_0x4bd3dd(_0x18899a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x18899a),_0x51685c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x565605=new Mt(this['locale'],this['_config']['editorConfig']);return _0x565605['value']=this['_model']['content'],_0x565605['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x565605['submitLabel']=bt(this['locale'],'Save'),_0x565605['on']('submit',(_0x39de88,_0x4147e0)=>{this['fire']('updateComment',this['_model']['id'],_0x4147e0),this['switchToDisplayMode'](),this['focus']();}),_0x565605['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x565605['once']('editorReady',()=>{_0x565605['focus']();}),_0x565605['createEditor'](),_0x565605['delegate']('editorReady')['to'](this),_0x565605['delegate']('editorDestroyed')['to'](this),_0x565605;}['_setupKeyboardNavigation'](){const _0x2a2147=this['element'];this['keystrokes']['listenTo'](_0x2a2147);for(const _0x1b3224 of this['focusables'])this['focusTracker']['add'](_0x1b3224['element']),this['keystrokes']['listenTo'](_0x1b3224['element']);this['focusables']['on']('change',(_0x330aee,_0x243d27)=>{for(const _0x974c4c of _0x243d27['removed'])this['focusTracker']['remove'](_0x974c4c['element']),this['keystrokes']['stopListening'](_0x974c4c['element']);for(const _0x4e59e4 of _0x243d27['added'])this['focusTracker']['add'](_0x4e59e4['element']),this['keystrokes']['listenTo'](_0x4e59e4['element']);}),this['keystrokes']['set']('enter',(_0x3e7fbf,_0xcc40f8)=>{_0x2a2147===_0x3e7fbf['target']&&(this['focusCycler']['focusFirst'](),_0xcc40f8());}),this['keystrokes']['set']('esc',(_0xa585bf,_0x64c954)=>{_0x2a2147!==_0xa585bf['target']&&(this['focus'](),_0x64c954());});}}class Ut extends/* #__PURE__ -- @preserve */
28
+ _0x6704c5(Ft){['actionBar'];['userView'];constructor(_0x3073f3,_0x3f4169,_0x14fadd){super(_0x3073f3,_0x3f4169,_0x14fadd),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x3073f3,'Reply...')),this['bind']('authoredAt')['to'](_0x3f4169),this['bind']('resolvedAt')['to'](_0x3f4169),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 _0x1fae30(_0x3073f3,_0x3f4169['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3f4169,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x16a2b0=this['bindTemplate'],_0x33bfc3=[{'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':_0x16a2b0['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x16a2b0['to']('authoredAt',_0x46017a=>this['_config']['formatDateTime'](_0x46017a))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x16a2b0['if']('isEditMode','ck-comment__actions--hidden'),_0x16a2b0['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']&&_0x33bfc3['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x16a2b0['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x16a2b0['if']('isEditMode','ck-comment--edit'),_0x16a2b0['if']('isSystemComment','ck-comment--info'),_0x16a2b0['to']('actionIndicator',_0x197884=>_0x197884?'ck-comment--'+_0x197884:'')],'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':_0x33bfc3}]}]};}['_createEditButton'](){const _0x3c24fc=new _0x29997a(this['locale']);return _0x3c24fc['label']=bt(this['locale'],'Edit'),_0x3c24fc['icon']=_0x2fd946,_0x3c24fc['withText']=!0x0,_0x3c24fc['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x3c24fc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x477e1a=>!_0x477e1a),_0x3c24fc['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x3c24fc['on']('execute',()=>this['switchToEditMode']()),_0x3c24fc;}['_createRemoveButton'](){const _0x2238da=new _0x29997a(this['locale']);return _0x2238da['label']=bt(this['locale'],'Remove'),_0x2238da['icon']=_0x195e49,_0x2238da['withText']=!0x0,_0x2238da['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x2238da['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5d7808=>!_0x5d7808),_0x2238da['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x2238da['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x2238da;}['_createDropdown'](){const _0xbdf847=it(this['locale'],_0x2e02a2),_0x29130d=_0xbdf847['panelView']['children'],_0x35768a=new et(this['locale']),_0x4f844b=_0xbdf847['bindTemplate'];st(_0xbdf847,()=>this['items']['find'](_0x2bf601=>_0x2bf601['isVisible'])),_0xbdf847['extendTemplate']({'attributes':{'class':[_0x4f844b['if']('isVisible','ck-hidden',_0x1b6419=>!_0x1b6419)]}});const _0x36411b=(_0x4ea63d,_0xa67c94=-0x1)=>{const _0x1f5c6d=new nt(this['locale']);_0x1f5c6d['children']['add'](_0x4ea63d);const _0x2b8f5e=_0xa67c94>-0x1?_0xa67c94:_0x35768a['items']['length'];_0x35768a['items']['add'](_0x1f5c6d,_0x2b8f5e);const _0x3a3c69=Array['from'](this['items']);_0xbdf847['unbind']('isEnabled','isVisible'),_0xbdf847['bind']('isEnabled')['toMany'](_0x3a3c69,'isEnabled',(..._0x136f11)=>_0x136f11['some'](_0x165f0c=>_0x165f0c)),_0xbdf847['bind']('isVisible')['toMany'](_0x3a3c69,'isVisible',(..._0x442ec1)=>_0x442ec1['some'](_0x33b5aa=>_0x33b5aa));};_0xbdf847['panelPosition']='sw',_0xbdf847['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x52b38});for(const _0x3c8ce9 of this['items'])_0x36411b(_0x3c8ce9);return _0x29130d['add'](_0x35768a),_0xbdf847['listenTo'](this['items'],'add',(_0x4260a4,_0x1748c2,_0x27b5e3)=>{_0x36411b(_0x1748c2,_0x27b5e3);}),_0xbdf847['listenTo'](this['items'],'remove',(_0x4d0c0b,_0xe908d5,_0x433297)=>{_0x35768a['items']['remove'](_0x433297);}),_0xbdf847;}['_attachActions'](_0x41c1e9,_0x27d4ad){const _0x178160=_0x41c1e9&&_0x41c1e9['element'];_0x178160&&(this['listenTo'](_0x178160,'mouseenter',()=>this['actionIndicator']=_0x27d4ad),this['listenTo'](_0x178160,'focus',()=>this['actionIndicator']=_0x27d4ad),this['listenTo'](_0x178160,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x178160,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x2ad3a4=super['_createCommentInputView']();return _0x2ad3a4['bind']('placeholder')['to'](this),_0x2ad3a4;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x4724d7){const _0x22efde=_0x3e11fd(_0x4724d7,0x1e),_0x461a4d=new MutationObserver(_0x9299c3=>{for(const _0x5be450 of _0x9299c3)('attributes'==_0x5be450['type']&&'class'==_0x5be450['attributeName']||'childList'==_0x5be450['type']||'characterData'==_0x5be450['type'])&&_0x22efde();});return{'attach'(_0x4b34d8){_0x461a4d['observe'](_0x4b34d8,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x461a4d['disconnect'](),_0x22efde['cancel']();}};}class Kt extends _0x3b6e1d{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4414e9,_0x1d2e0f){super(_0x4414e9),this['id']=_0x5ea41d(),this['focusTracker']=new _0x14b748(),this['keystrokes']=new _0x24cfe9(),this['keystrokes']['set']('Esc',(_0x21fa33,_0x33cf03)=>this['fire']('Esc',_0x33cf03)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x1d2e0f),this['mainView']=_0x1d2e0f;const _0x5c3867=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x5c3867['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 _0xd09c37=this['element']['clientHeight'];_0xd09c37&&(this['height']=_0xd09c37);}}class Yt extends/* #__PURE__ -- @preserve */
29
+ _0x2de6b9(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5445c0,target:_0x40580a,type:_0x2ad797,isVisible:_0x88d209=!0x0}){super(),this['view']=_0x5445c0,this['view']['element']||this['view']['render'](),this['_type']=_0x2ad797,this['_target']=_0x40580a,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3c06fe([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x52dbfb,_0x4fec68)=>{this['view']['focusTracker']['add'](_0x4fec68);}),this['focusableElements']['on']('remove',(_0x3ffd81,_0x3c85cb)=>{this['view']['focusTracker']['remove'](_0x3c85cb);}),this['set']('isVisible',_0x88d209);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x190c0f=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x190c0f),_0x190c0f;}get['targetRect'](){const _0x338774=this['target'];if(null===_0x338774)return null;if(_0x338774 instanceof _0x3d2807)return _0x338774;const _0x1e869d=_0x338774['filter'](_0x4a4524=>function(_0x3a1eb6){const _0x4e7135=_0x3a1eb6['offsetParent'];if(_0x4e7135)return!0x0;const _0x4f335a=_0x3a1eb6['getClientRects']()['item'](0x0);return!!_0x4f335a;}(_0x4a4524));return 0x0===_0x1e869d['length']?null:_0x3d2807['getDomElementRects'](_0x1e869d[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4723c3){this['view']['isActive']=_0x4723c3,this['view']['mainView']['isActive']=_0x4723c3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3c2e63){if(!(null===_0x3c2e63||_0x3c2e63 instanceof _0x3d2807||Array['isArray'](_0x3c2e63)&&_0x3c2e63['every'](_0x1533d8=>Gt(_0x1533d8))))throw new _0x4e692d('annotation-invalid-target',null,{'target':_0x3c2e63});}['_getNormalizedTarget'](){const _0x3288fd='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x3288fd)?[_0x3288fd]:_0x3288fd;}}function Gt(_0x23580c){return null!==_0x23580c&&'object'==typeof _0x23580c&&'nodeType'in _0x23580c&&0x1===_0x23580c['nodeType'];}class jt extends _0x3c06fe{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x102cf4=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x14b748(),this['_focusTracker']['on']('change:isFocused',(_0x2664a1,_0x403d9c,_0x2f68e7)=>{_0x2f68e7||this['fire']('blur');});for(const _0x95de0e of _0x102cf4)this['add'](_0x95de0e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x5c0871){if(this['has'](_0x5c0871))throw new _0x4e692d('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x5c0871['innerView'],_0x5c0871),this['_viewToAnnotation']['set'](_0x5c0871['view'],_0x5c0871);for(const _0x18e6f1 of _0x5c0871['focusableElements'])this['_focusTracker']['add'](_0x18e6f1);this['listenTo'](_0x5c0871['focusableElements'],'add',(_0x3d4832,_0x100dde)=>{this['_focusTracker']['add'](_0x100dde);}),this['listenTo'](_0x5c0871['focusableElements'],'remove',(_0x4e0eec,_0x5334aa)=>{this['_focusTracker']['remove'](_0x5334aa);}),this['listenTo'](_0x5c0871['view']['focusTracker'],'change:isFocused',(_0x59cc38,_0x5e393e,_0x3d65eb)=>{_0x3d65eb&&this['fire']('focus',_0x5c0871);}),_0x5c0871['updateTargetRect']();const _0x38cc1f=this['_getOrderInContent'](_0x5c0871['view']['targetRect']);return super['add'](_0x5c0871,_0x38cc1f);}['remove'](_0x19de98){if(!this['has'](_0x19de98))throw new _0x4e692d('annotationcollection-not-existing-item',null);this['stopListening'](_0x19de98['view']['focusTracker']),this['stopListening'](_0x19de98['focusableElements']);for(const _0x3f4f98 of _0x19de98['focusableElements'])this['_focusTracker']['remove'](_0x3f4f98);return this['_viewToAnnotation']['delete'](_0x19de98['view']),this['_innerViewToAnnotation']['delete'](_0x19de98['innerView']),super['remove'](_0x19de98);}['getByInnerView'](_0x171ad4){return this['_innerViewToAnnotation']['get'](_0x171ad4);}['getByView'](_0x550bac){return this['_viewToAnnotation']['get'](_0x550bac);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1d4a7d of this)_0x1d4a7d['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3676d7=Array['from'](this)['sort']((_0x127c00,_0x5d4584)=>qt(_0x127c00['view']['targetRect'],_0x5d4584['view']['targetRect']));for(let _0x539fc0=_0x3676d7['length']-0x1;_0x539fc0>0x0;_0x539fc0--){const _0x20954c=_0x3676d7[_0x539fc0];_0x539fc0!==this['getIndex'](_0x20954c)&&(this['remove'](_0x20954c),this['add'](_0x20954c));}}['_getOrderInContent'](_0x419bad){let _0x5075b5=0x0;if(!_0x419bad)return this['length'];for(const _0x2cb011 of this){const _0x2649f9=_0x2cb011['view']['targetRect'];if(_0x2649f9){if(qt(_0x419bad,_0x2649f9)<0x0)return _0x5075b5;_0x5075b5++;}}return _0x5075b5;}}function Xt({source:_0x7aa3f,target:_0x273557,filter:_0x562442}){for(const _0x26e32e of _0x7aa3f)_0x562442(_0x26e32e)&&_0x273557['add'](_0x26e32e);_0x273557['listenTo'](_0x7aa3f,'add',(_0x3d61f5,_0x13a4e7)=>{_0x562442(_0x13a4e7)&&_0x273557['add'](_0x13a4e7);}),_0x273557['listenTo'](_0x7aa3f,'remove',(_0x580993,_0x24dcde)=>{_0x273557['has'](_0x24dcde)&&_0x273557['remove'](_0x24dcde);});}function qt(_0x4f16a6,_0x1b2cd5){if(null===_0x4f16a6&&null===_0x1b2cd5)return 0x0;if(null===_0x4f16a6)return-0x1;if(null===_0x1b2cd5)return 0x1;const _0x1d27e8=_0x4f16a6['top']-_0x1b2cd5['top'];return 0x0==_0x1d27e8?_0x4f16a6['left']-_0x1b2cd5['left']:_0x1d27e8;}class $t extends _0x43feeb{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ec734){if(super(_0x3ec734),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3ec734 instanceof _0x56aa75){const _0x15490d=_0x3ec734['locale'];_0x3ec734['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x15490d,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x15490d,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x15490d,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x15490d,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x15490d,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x15490d,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x15490d,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x101f5f){this['collection']['add'](_0x101f5f);}['remove'](_0x5e1890){this['collection']['remove'](_0x5e1890),_0x5e1890['destroy']();}['refreshVisibility'](){for(const _0x6dea22 of this['collection'])_0x6dea22['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x14635c){return this['collection']['getByInnerView'](_0x14635c);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x41b59a of this['collection'])_0x41b59a['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x20c1d9){this['fire']('_activateAnnotation',_0x20c1d9);}['createAnnotation'](_0x219532){return new Yt(_0x219532);}['createAnnotationView'](_0x5596e4,_0x3fbdc8){return new Kt(_0x5596e4,_0x3fbdc8);}['_addActiveAnnotation'](_0x1d6fa4){const _0x48708c=new Set(this['activeAnnotations']);_0x48708c['add'](_0x1d6fa4),this['activeAnnotations']=_0x48708c;}['_removeActiveAnnotation'](_0x1393bf){const _0x48452f=new Set(this['activeAnnotations']);_0x48452f['delete'](_0x1393bf),this['activeAnnotations']=_0x48452f;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3501a2=this['collection'],_0x4c51f6=this['_visibleAnnotations'];function _0x2a919f(_0x488bdc){const _0x5820f4=_0x488bdc['source'];_0x5820f4['isVisible']&&!_0x4c51f6['has'](_0x5820f4)?_0x4c51f6['add'](_0x5820f4):!_0x5820f4['isVisible']&&_0x4c51f6['has'](_0x5820f4)&&_0x4c51f6['remove'](_0x5820f4),_0x5820f4['view']['focusTracker']['remove'](_0x5820f4['view']['element']),_0x5820f4['view']['focusTracker']['add'](_0x5820f4['view']['element']);}this['listenTo'](_0x3501a2,'add',(_0x18a2e0,_0x33708c)=>{_0x33708c['isVisible']&&_0x4c51f6['add'](_0x33708c),this['listenTo'](_0x33708c,'change:isVisible',_0x2a919f);}),this['listenTo'](_0x3501a2,'remove',(_0x7d388e,_0x45f98e)=>{_0x4c51f6['has'](_0x45f98e)&&_0x4c51f6['remove'](_0x45f98e),this['stopListening'](_0x45f98e,'change:isVisible',_0x2a919f);});}['_setupEnterAnnotationKeystroke'](){const _0x45e540=_0x3b97e0=>{_0x3b97e0['on']('ready',()=>{_0x3b97e0['keystrokes']['set'](_0x5bea71,(_0x3da65b,_0x183b68)=>{const _0x97291b=_0x504385(this['activeAnnotations']['values']());_0x97291b&&(_0x97291b['view']['focus'](),_0x183b68());});});};this['context']instanceof _0x56aa75?_0x45e540(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x372861,_0x20efde)=>{_0x45e540(_0x20efde);});}['_setupEscapeAnnotationHandling'](){const _0x5d921f=_0x559775=>{const _0x48af96=_0x559775['source'],_0x24357a=[];let _0x566588;if(Array['isArray'](_0x48af96['target'])){_0x566588=_0x48af96['target'][0x0],this['context']instanceof _0x56aa75?_0x24357a['push'](this['context']):this['context']['editors']&&_0x24357a['push'](...this['context']['editors']);for(const _0x123a80 of _0x24357a)for(const _0x11ef2d of _0x123a80['editing']['view']['domRoots']['values']())if(_0x11ef2d['contains'](_0x566588))return void _0x123a80['editing']['view']['focus']();_0x566588['focus']();}};this['listenTo'](this['collection'],'add',(_0xf4b865,_0x265df2)=>{this['listenTo'](_0x265df2,'escape',_0x5d921f,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x43fcf6,_0x40f1b6)=>{this['stopListening'](_0x40f1b6,'escape',_0x5d921f);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x43feeb{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x6827a9,_0x3ff1f3];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x83f04d){super(_0x83f04d),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3756c7=this['context']['config'];_0x3756c7['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3756c7['define']('comments.maxThreadTotalWeight',0x1f4),_0x3756c7['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3756c7['define']('comments.CommentThreadView',Bt),_0x3756c7['define']('comments.CommentView',Ut),_0x3756c7['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x187cea=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x22399d,_0x2f5b89)=>this['_addCommentThread'](_0x2f5b89)),this['on']('submitCommentThread',(_0x3525d8,_0x31ec98)=>this['_submitCommentThread'](_0x31ec98)),this['on']('resolveCommentThread',(_0x45750d,_0x2937b0)=>this['_resolveCommentThread'](_0x2937b0)),this['on']('resolveCommentThread',(_0x1a8cb8,_0x486803)=>this['_updateActiveAnnotation'](_0x486803),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x16c65e,_0x3a248e)=>this['_reopenCommentThread'](_0x3a248e)),this['on']('reopenCommentThread',(_0x374990,_0x47cfea)=>this['_updateActiveAnnotation'](_0x47cfea),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1449e6,_0x15f49a)=>this['_removeCommentThread'](_0x15f49a)),this['on']('updateCommentThread',(_0x205dcf,_0x2b1711)=>this['_updateCommentThread'](_0x2b1711)),this['on']('updateCommentThread',(_0x1b9b9b,_0x32a561)=>this['_updateActiveAnnotation'](_0x32a561),{'priority':'lowest'}),this['on']('addComment',(_0x37b631,_0x58a203)=>this['_addComment'](_0x58a203)),this['on']('updateComment',(_0x3a9312,_0x1d0eec)=>this['_updateComment'](_0x1d0eec)),this['on']('removeComment',(_0x49bd94,_0x1b3604)=>this['_removeComment'](_0x1b3604)),this['on']('addComment',(_0x3b3007,{threadId:_0xeec59e,isFromAdapter:_0x235654})=>{if(_0x235654)return;const _0x5da023=this['getCommentThread'](_0xeec59e),_0x1137e4=_0x5da023&&this['_threadToController']['get'](_0x5da023);_0x1137e4&&_0x1137e4['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x187cea,'change:activeAnnotations',(_0xa0ff69,_0x18a723,_0xe92c2b)=>{const _0x124691=Array['from'](_0xe92c2b)['map'](_0x526563=>this['_viewToController']['get'](_0x526563['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x124691?_0x124691['model']:null;});}set['adapter'](_0x3c6e4d){if(this['_adapter'])throw new _0x4e692d('commentsrepository-adapter-already-set');this['_adapter']=_0x3c6e4d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x21a29d=zt,threadId:_0x596fd6=_0x5ea41d(),comments:_0x415e9c=[],unlinkedAt:_0x1f33a1=null,resolvedAt:_0xc8a78d=null,resolvedBy:_0x13e590=null,target:_0x380275=null,context:_0x269256=null,attributes:_0x151f9e={},isResolvable:_0x12700e=!0x0,isSubmitted:_0x25a4c9=!0x1,isFromAdapter:_0x1385b2=!0x1}={}){return this['fire'](ii('addCommentThread',_0x21a29d),{'channelId':_0x21a29d,'threadId':_0x596fd6,'comments':_0x415e9c,'unlinkedAt':_0x1f33a1,'resolvedAt':_0xc8a78d,'resolvedBy':_0x13e590,'target':_0x380275,'context':_0x269256,'attributes':_0x151f9e,'isFromAdapter':_0x1385b2,'isResolvable':_0x12700e,'isSubmitted':_0x25a4c9}),this['getCommentThread'](_0x596fd6);}['openNewCommentThread']({channelId:_0x37f810=zt,threadId:_0x45e289=_0x5ea41d(),target:_0x713b8d,context:_0x1d8fa1=null,isResolvable:_0x3e3529=!0x0}){if(this['_readOnlyChannels']['has'](_0x37f810)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x713b8d)throw new _0x4e692d('commentsrepository-missing-target');const _0x156ad6=this['addCommentThread']({'channelId':_0x37f810,'threadId':_0x45e289,'target':_0x713b8d,'context':_0x1d8fa1,'isResolvable':_0x3e3529});if(!_0x156ad6)return null;const _0x597ec1=this['_threadToController']['get'](_0x156ad6),_0xf3d8b4=_0x597ec1['view']['commentThreadInputView']['commentInputView'],_0x2e9de4=this['context']['plugins']['get']($t),_0x2435b8=_0x2e9de4['getByInnerView'](_0x597ec1['view']);return _0x2e9de4['activate'](_0x2435b8),_0xf3d8b4['once']('editorReady',()=>_0xf3d8b4['focus']()),_0x156ad6;}['hasCommentThread'](_0x116a7a){if('string'!=typeof _0x116a7a)throw new _0x4e692d('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x116a7a);}['updateCommentThread']({channelId:_0x54485f=zt,threadId:_0x806264,context:_0x3b755c,unlinkedAt:_0x486c32,attributes:_0xd3224f,isFromAdapter:_0x16d517=!0x1}){return this['fire'](ii('updateCommentThread',_0x54485f),{'channelId':_0x54485f,'threadId':_0x806264,'context':_0x3b755c,'unlinkedAt':_0x486c32,'attributes':_0xd3224f,'isFromAdapter':_0x16d517}),this['getCommentThread'](_0x806264);}['getCommentThread'](_0x13b3ec){if('string'!=typeof _0x13b3ec)throw new _0x4e692d('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x13b3ec);}['fetchCommentThread']({channelId:_0x5bb5ab,threadId:_0x4c9b4a}={}){const _0x3d67e2=this['getCommentThread'](_0x4c9b4a);if(_0x3d67e2)return Promise['resolve'](_0x3d67e2);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4e692d('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5bb5ab,'threadId':_0x4c9b4a})['then'](_0x1d7597=>this['hasCommentThread'](_0x4c9b4a)?this['getCommentThread'](_0x4c9b4a):_0x1d7597?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5bb5ab},_0x1d7597)):void 0x0)['catch'](_0x4c1fa7=>{throw console['error'](_0x4c1fa7),new _0x4e692d('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4a75c2,skipNotAttached:_0x1e3776=!0x1,skipEmpty:_0x50816b=!0x1,toJSON:_0x1e75f5=!0x1}={}){const _0x4d40b5=[];for(const _0x426c69 of this['_threads']['values']())_0x4a75c2&&_0x426c69['channelId']!==_0x4a75c2||_0x1e3776&&!_0x426c69['isAttached']||_0x50816b&&0x0===_0x426c69['length']||_0x4d40b5['push'](_0x426c69);return _0x1e75f5?_0x4d40b5['map'](_0x51d3df=>_0x51d3df['toJSON']()):_0x4d40b5;}['getAnnotationForCommentThread'](_0x3f5d9f){const _0x3ea7da=this['_threadToController']['get'](_0x3f5d9f);if(!_0x3ea7da)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x3ea7da['view'])||null;}['getCommentThreadForAnnotation'](_0x1811cc){const _0x3d0f17=this['_viewToController']['get'](_0x1811cc['innerView']);return _0x3d0f17?_0x3d0f17['model']:null;}['setActiveCommentThread'](_0x416356){const _0x8c8204=this['context']['plugins']['get']($t);if(!_0x416356)return void(this['activeCommentThread']&&_0x8c8204['deactivateAll']());const _0x12e378=this['getCommentThread'](_0x416356);if(!_0x12e378)throw new _0x4e692d('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x416356});if(!this['_threadToController']['has'](_0x12e378))throw new _0x4e692d('commentsrepository-active-not-attached',null,{'threadId':_0x416356});const _0x38205d=_0x8c8204['getByInnerView'](this['_threadToController']['get'](_0x12e378)['view']);_0x8c8204['activate'](_0x38205d);}['switchReadOnly'](_0x52c4e0,_0x29737b){_0x52c4e0?this['_readOnlyChannels']['add'](_0x29737b):this['_readOnlyChannels']['delete'](_0x29737b),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xbf981e){return this['_readOnlyChannels']['has'](_0xbf981e)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x542504,_0x114d50){return new It(_0x542504,_0x114d50);}['setPermissions'](_0x5c32da,_0x55da49=zt){this['_permissions']['set'](_0x55da49,_0x5c32da),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3114f4=zt){return this['_permissions']['has'](_0x3114f4)?this['_permissions']['get'](_0x3114f4):Jt;}['_addCommentThread']({channelId:_0x33419d,threadId:_0x3b52c2,comments:_0xd1ec7b,unlinkedAt:_0xbb7ef4,resolvedAt:_0x3d694c,resolvedBy:_0x548196,target:_0x359d11,context:_0x1c578a,attributes:_0x370b55,isFromAdapter:_0x45806f,isResolvable:_0x425495,isSubmitted:_0x3ddcbc}){if('string'!=typeof _0x3b52c2)throw new _0x4e692d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3b52c2});if(this['hasCommentThread'](_0x3b52c2))throw new _0x4e692d('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3b52c2});const _0x3789d6=new Zt(this,{'channelId':_0x33419d,'id':_0x3b52c2,'context':_0x1c578a,'attributes':_0x370b55,'unlinkedAt':_0xbb7ef4,'resolvedAt':_0x3d694c,'resolvedBy':_0x548196?this['context']['plugins']['get'](_0x3ff1f3)['getUser'](_0x548196):null,'isResolvable':_0x425495,'isSubmitted':_0x3ddcbc||_0x45806f});this['_threads']['set'](_0x3b52c2,_0x3789d6);for(const _0x4249a1 of _0xd1ec7b)_0x3789d6['_add'](this['_createNewComment']({'threadId':_0x3b52c2,..._0x4249a1}));return _0x359d11&&_0x3789d6['attachTo'](_0x359d11),_0x45806f||!_0x3789d6['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x33419d,'threadId':_0x3b52c2});}['_submitCommentThread']({channelId:_0x546cfb,threadId:_0x1be2ff}){if(!this['hasCommentThread'](_0x1be2ff))throw new _0x4e692d('commentsrepository-missing-comment-thread',this);const _0x474170=this['getCommentThread'](_0x1be2ff);if(_0x474170['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5e792b,comments:_0x3dc55d,resolvedAt:_0x3941ec,resolvedBy:_0x143e32,context:_0x1ff4f2,attributes:_0x4638b8}=_0x474170,_0x55792f=this['context']['plugins']['get']('PendingActions'),_0x4713d1=_0x55792f['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x546cfb,'threadId':_0x5e792b,'comments':_0x3dc55d['map'](_0x35acfd=>_0x35acfd['toJSON']()),'resolvedAt':_0x3941ec,'resolvedBy':_0x143e32?_0x143e32['id']:_0x143e32,'context':_0x1ff4f2,'attributes':_0x4638b8})['then'](({comments:_0x232b1c})=>{_0x55792f['remove'](_0x4713d1);for(const _0xcaa86a of _0x232b1c)this['_updateComment']({'channelId':_0x546cfb,'threadId':_0x1be2ff,'commentId':_0xcaa86a['commentId'],'createdAt':_0xcaa86a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4f15c4=>{throw console['error'](_0x4f15c4),new _0x4e692d('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x37e8cb,target:_0x286d0e}){const _0x5870c6=this['getCommentThread'](_0x37e8cb);if(!_0x5870c6)throw new _0x4e692d('commentsrepository-attach-missing-comment-thread',this);const _0x4169be=this['context']['plugins']['get']('PendingActions'),_0x818c2=this['context']['plugins']['get']($t),_0x5c7e38=this['_createCommentThreadView'](_0x5870c6),_0x5af8e3=new It(_0x5870c6,_0x5c7e38);let _0x5bd441=null;_0x5c7e38['on']('change:isDirty',(_0x63059e,_0x1b7b38,_0x33eae8)=>{_0x33eae8?_0x5bd441=_0x4169be['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5bd441&&(_0x4169be['remove'](_0x5bd441),_0x5bd441=null);}),this['_threadToController']['set'](_0x5870c6,_0x5af8e3),this['_viewToController']['set'](_0x5c7e38,_0x5af8e3);const _0x2f2300=new Kt(this['context']['locale'],_0x5c7e38);_0x2f2300['bind']('length')['to'](_0x5c7e38),_0x2f2300['bind']('isDirty')['to'](_0x5c7e38,'isDirty',_0x5c7e38,'length',(_0x18ced8,_0x5ea7c4)=>_0x18ced8||!_0x5ea7c4),_0x2f2300['bind']('isActive')['to'](_0x5c7e38),_0x2f2300['type']='comment';const _0xe9552a=new Yt({'view':_0x2f2300,'target':_0x286d0e,'type':'comment','isVisible':!_0x5870c6['archivedAt']&&!!('function'==typeof _0x286d0e?_0x286d0e():_0x286d0e)});return _0x5c7e38['on']('escape',()=>{_0xe9552a['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5c7e38,_0xe9552a),_0x818c2['add'](_0xe9552a),_0xe9552a;}['_bindAnnotationToEditors'](_0x135116,_0x23d834){this['listenTo'](_0x135116,'editorReady',(_0xe6a7b4,_0xe79772)=>{const _0x5753e4=_0xe79772['ui']['view']['body']['bodyCollectionContainer'];_0x23d834['focusableElements']['add'](_0x5753e4),this['context']instanceof _0x56aa75&&this['context']['ui']['focusTracker']['add'](_0x5753e4);},{'priority':'highest'}),this['listenTo'](_0x135116,'editorDestroyed',(_0x1efef0,_0x491219)=>{const _0x31b2ea=_0x491219['ui']['view']['body']['bodyCollectionContainer'];_0x23d834['focusableElements']['has'](_0x31b2ea)&&_0x23d834['focusableElements']['remove'](_0x31b2ea),this['context']instanceof _0x56aa75&&this['context']['ui']['focusTracker']['remove'](_0x31b2ea);});}['_unbindEditors'](_0x26cdfd){this['stopListening'](_0x26cdfd,'editorReady'),this['stopListening'](_0x26cdfd,'editorDestroyed');}['_createCommentThreadView'](_0x46cde1){const _0x3545be=this['context']['plugins']['get'](_0x3ff1f3),{config:_0x3d177d,locale:_0x58556c}=this['context'],_0x1fe20f=_0x14058f(_0x3d177d['get']('locale'),_0x58556c);return new(0x0,(_0x3d177d['get']('comments'))['CommentThreadView'])(_0x58556c,_0x46cde1,_0x3545be['me'],{'editorConfig':{..._0x3d177d['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3d177d['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3d177d['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3d177d['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3d177d['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1fe20f,'CommentView':_0x3d177d['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3e452f,channelId:_0x243ad9,resolvedAt:_0x36e21c,resolvedBy:_0x189266,isFromAdapter:_0x4c1bb1}){if(!this['hasCommentThread'](_0x3e452f))throw new _0x4e692d('commentsrepository-missing-comment-thread',null,{'threadId':_0x3e452f});const _0x54d5ae=this['getCommentThread'](_0x3e452f);if(_0x54d5ae['isResolved'])throw new _0x4e692d('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3e452f});const _0x1cc0ed=this['context']['plugins']['get'](_0x3ff1f3);if(_0x54d5ae['resolvedBy']=_0x1cc0ed['getUser'](_0x189266),_0x54d5ae['resolvedAt']=_0x36e21c,_0x4c1bb1||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3e4bc0=this['context']['plugins']['get']('PendingActions'),_0x237276=_0x3e4bc0['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x243ad9,'threadId':_0x3e452f})['then'](({resolvedAt:_0x5c10b3,resolvedBy:_0x4e6f45})=>{_0x3e4bc0['remove'](_0x237276),_0x54d5ae['resolvedBy']['id']!==_0x4e6f45&&(_0x54d5ae['resolvedBy']=_0x1cc0ed['getUser'](_0x4e6f45)),_0x54d5ae['resolvedAt']=_0x5c10b3;})['catch'](_0x488e93=>{throw console['error'](_0x488e93),new _0x4e692d('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1fcfc7,channelId:_0x43150f,isFromAdapter:_0x2739fe}){if(!this['hasCommentThread'](_0x1fcfc7))throw new _0x4e692d('commentsrepository-missing-comment-thread',null,{'threadId':_0x1fcfc7});const _0xa1a48a=this['getCommentThread'](_0x1fcfc7);if(!_0xa1a48a['isResolved'])throw new _0x4e692d('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1fcfc7});if(_0xa1a48a['resolvedBy']=null,_0xa1a48a['resolvedAt']=null,_0x2739fe||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x26d552=this['context']['plugins']['get']('PendingActions'),_0x4026a8=_0x26d552['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x43150f,'threadId':_0x1fcfc7})['then'](()=>_0x26d552['remove'](_0x4026a8))['catch'](_0x4c5dc4=>{throw console['error'](_0x4c5dc4),new _0x4e692d('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2cb8de,isFromAdapter:_0x5600e9}){const _0x2020ac=this['getCommentThread'](_0x2cb8de);if(!_0x2020ac)throw new _0x4e692d('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2cb8de),this['_threads']['delete'](_0x2cb8de),!_0x2020ac['isSubmitted']||_0x5600e9||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3afe2f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5516a8}=_0x2020ac,_0x64bbdb=_0x3afe2f['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5516a8,'threadId':_0x2cb8de})['then'](()=>_0x3afe2f['remove'](_0x64bbdb))['catch'](_0x41ab1f=>{throw console['error'](_0x41ab1f),new _0x4e692d('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x54ad35,unlinkedAt:_0x5058a4,context:_0x412d1f,attributes:_0x82e1f2,isFromAdapter:_0x2c722b}){if('string'!=typeof _0x54ad35)throw new _0x4e692d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x54ad35});if(!this['hasCommentThread'](_0x54ad35))throw new _0x4e692d('commentsrepository-missing-comment-thread',null,{'threadId':_0x54ad35});const _0x2dac9e=this['getCommentThread'](_0x54ad35);let _0x3232fe=!0x1;if(void 0x0!==_0x412d1f&&_0x2dac9e['context']!==_0x412d1f&&(_0x2dac9e['context']=_0x412d1f,_0x3232fe=!0x0),void 0x0!==_0x5058a4&&_0x2dac9e['unlinkedAt']!==_0x5058a4&&(_0x2dac9e['unlinkedAt']=_0x5058a4,_0x3232fe=!0x0),_0x82e1f2&&!_0x6a1764(_0x82e1f2,_0x2dac9e['attributes'])&&(_0x2dac9e['attributes']=_0x82e1f2,_0x3232fe=!0x0),!_0x3232fe)return Promise['resolve']();if(!_0x2dac9e['isSubmitted']||_0x2c722b||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x45eb1f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2244fe}=_0x2dac9e,_0xa73774=_0x45eb1f['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2244fe,'threadId':_0x54ad35,'context':_0x412d1f,'unlinkedAt':_0x5058a4,'attributes':_0x82e1f2})['then'](()=>_0x45eb1f['remove'](_0xa73774))['catch'](_0x4935b3=>{throw console['error'](_0x4935b3),new _0x4e692d('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x5ee69f){const _0x3d7d5a=this['context']['plugins']['get']($t),_0x3f6218=this['getCommentThread'](_0x5ee69f);if(_0x3f6218['_isAttached']=!0x1,this['_threadToController']['has'](_0x3f6218)){const _0x580f03=this['_threadToController']['get'](_0x3f6218),_0x491bf0=_0x580f03['view'],_0xa5026=_0x3d7d5a['getByInnerView'](_0x491bf0);this['_threadToController']['delete'](_0x3f6218),this['_viewToController']['delete'](_0x491bf0),_0xa5026&&_0x3d7d5a['remove'](_0xa5026),_0x580f03['destroy'](),_0x491bf0['destroy']()['then'](()=>{this['_unbindEditors'](_0x491bf0);});}}['_updateActiveAnnotation']({threadId:_0x4930af,resolvedAt:_0x5571b5,unlinkedAt:_0x579a5b}){const _0x487a0f=!!_0x5571b5,_0x47fa0c=this['context']['plugins']['get']($t),_0xaece33=this['getCommentThread'](_0x4930af);if(this['_threadToController']['has'](_0xaece33)){const _0x5de9c3=this['_threadToController']['get'](_0xaece33)['view'],_0x51bbd6=_0x47fa0c['getByInnerView'](_0x5de9c3);_0x51bbd6&&(_0x487a0f&&_0x47fa0c['_removeActiveAnnotation'](_0x51bbd6),_0x579a5b?_0x51bbd6['isVisible']=!0x1:_0x51bbd6['refreshVisibility']());}}['_getExternalAuthor'](_0x22dcdf){const _0x3b52bd=this['context']['plugins']['get'](_0x3ff1f3),_0x471938=_0x49c742('external:'+_0x22dcdf),_0x6f11fa=_0x3b52bd['getUser'](_0x471938);return _0x6f11fa||_0x3b52bd['addUser']({'id':_0x471938,'name':_0x22dcdf});}['_createNewComment']({threadId:_0x1bb9a1,commentId:_0x74d07c=_0x5ea41d(),content:_0x14e16c,authorId:_0x1d89e4,createdAt:_0x4da4af,attributes:_0x4e51d1}){if('string'!=typeof _0x74d07c)throw new _0x4e692d('commentsrepository-invalid-commentid');if('string'!=typeof _0x1d89e4)throw new _0x4e692d('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x14e16c||!_0x14e16c['trim']())throw new _0x4e692d('commentsrepository-invalid-comment-content');const _0xaef83e=this['context']['plugins']['get'](_0x3ff1f3)['getUser'](_0x1d89e4);if(!_0xaef83e)throw new _0x4e692d('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1d89e4});let _0x202074=null,_0x17bb81=_0x4da4af;return _0x4e51d1?.['@external']&&(_0x202074=this['_getExternalAuthor'](_0x4e51d1['@external']['authorName']),_0x17bb81=new Date(_0x4e51d1['@external']['createdAt'])),new ti(this,{'threadId':_0x1bb9a1,'id':_0x74d07c,'author':_0x202074||_0xaef83e,'creator':_0xaef83e,'content':_0x14e16c,'createdAt':_0x4da4af,'authoredAt':_0x17bb81,'attributes':_0x4e51d1});}['_addComment'](_0x501051){let {threadId:_0xe35090,content:_0x420d30,attributes:_0x5cf893,isFromAdapter:_0x90b9d1}=_0x501051;const _0x4802d6=this['getCommentThread'](_0x501051['threadId']);if(!_0x4802d6)throw new _0x4e692d('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x503da4=this['_createNewComment'](_0x501051),{id:_0x5dc6c5}=_0x503da4;if(_0x4802d6['_add'](_0x503da4),_0x90b9d1||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4802d6['isSubmitted'])return Promise['resolve']();const _0x2ef0df=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4d6444}=_0x4802d6,_0x1de658=_0x2ef0df['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5cf893||(_0x5cf893={}),this['adapter']['addComment']({'channelId':_0x4d6444,'threadId':_0xe35090,'commentId':_0x5dc6c5,'content':_0x420d30,'attributes':_0x5cf893})['then'](_0x4d7924=>{_0x2ef0df['remove'](_0x1de658),_0x4d7924&&this['_updateComment']({'channelId':_0x4d6444,'threadId':_0xe35090,'commentId':_0x5dc6c5,'createdAt':_0x4d7924['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x394fa0=>{throw console['error'](_0x394fa0),new _0x4e692d('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x50183c,commentId:_0x26ee17,content:_0x5bc381,createdAt:_0x2ca98d,attributes:_0x3eaabd,isFromAdapter:_0x338734}){if(void 0x0!==_0x5bc381&&('string'!=typeof _0x5bc381||!_0x5bc381['trim']()['length']))throw new _0x4e692d('commentsrepository-update-comment-invalid-content');const _0x824c16=this['getCommentThread'](_0x50183c),_0x1ba385=_0x824c16['getComment'](_0x26ee17);if(!_0x1ba385)throw new _0x4e692d('commentsrepository-update-missing-comment',this);let _0x3fe80b=!0x1;if(_0x5bc381&&_0x5bc381!==_0x1ba385['content']&&(_0x1ba385['isEditable']||_0x338734)&&(_0x1ba385['content']=_0x5bc381,_0x3fe80b=!0x0),_0x2ca98d&&_0x2ca98d!==_0x1ba385['createdAt']&&(_0x1ba385['createdAt']=_0x2ca98d,_0x1ba385['attributes']&&_0x1ba385['attributes']['@external']||(_0x1ba385['authoredAt']=_0x2ca98d),_0x3fe80b=!0x0),_0x3eaabd&&!_0x6a1764(_0x3eaabd,_0x1ba385['attributes'])&&(_0x1ba385['attributes']=_0x3eaabd,_0x3fe80b=!0x0),!_0x3fe80b)return Promise['resolve']();if(_0x824c16['fire']('commentUpdated'),_0x338734||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x16936d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x41da2e}=this['getCommentThread'](_0x1ba385['threadId']),_0x5343cf=_0x16936d['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x41da2e,'threadId':_0x50183c,'commentId':_0x26ee17,'content':_0x5bc381,'attributes':_0x3eaabd})['then'](()=>_0x16936d['remove'](_0x5343cf))['catch'](_0x558ce7=>{throw console['error'](_0x558ce7),new _0x4e692d('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x57502a,commentId:_0x60bb18,isFromAdapter:_0x13d6b8}){const _0x47cdc6=this['getCommentThread'](_0x57502a),_0x4043d5=_0x47cdc6['getComment'](_0x60bb18);if(!_0x4043d5)throw new _0x4e692d('commentsrepository-remove-missing-comment',this);if(_0x47cdc6['_remove'](_0x4043d5),_0x13d6b8||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xd225dd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a674d}=_0x47cdc6,_0x5586d5=_0xd225dd['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2a674d,'threadId':_0x57502a,'commentId':_0x60bb18})['then'](()=>_0xd225dd['remove'](_0x5586d5))['catch'](_0x4e182f=>{throw console['error'](_0x4e182f),new _0x4e692d('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
30
+ _0x2de6b9(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x230b56,_0x164bd3){super();const _0x62d3c4=_0x164bd3['isResolvable'];this['channelId']=_0x164bd3['channelId'],this['id']=_0x164bd3['id'],this['comments']=new _0x3c06fe(),this['_repository']=_0x230b56,this['_isAttached']=!0x1,this['_isSubmitted']=_0x164bd3['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x230b56,'_permissions',_0x230b56,'_readOnlyChannels',()=>_0x230b56['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x230b56,'_permissions',()=>_0x230b56['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x230b56,'_permissions',()=>{const _0x35ee59=_0x230b56['getPermissions'](this['channelId']);return _0x35ee59['write']||_0x35ee59['admin'];}),this['bind']('isResolvable')['to'](_0x230b56,'_permissions',()=>_0x62d3c4&&_0x230b56['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x164bd3['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4bbdb7,_0x24b01c)=>_0x4bbdb7?_0x24b01c?_0x4bbdb7<_0x24b01c?_0x4bbdb7:_0x24b01c:_0x4bbdb7:_0x24b01c),this['set']('unlinkedAt',_0x164bd3['unlinkedAt']||null),this['set']('resolvedAt',_0x164bd3['resolvedAt']||null),this['set']('resolvedBy',_0x164bd3['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x39455e=>!!_0x39455e),this['set']('attributes',_0x164bd3['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x250cc9,_0x35d947)=>_0x250cc9+_0x35d947['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x55853c,id:_0x1a8254}=this;this['_repository']['fire'](ii('submitCommentThread',_0x55853c),{'channelId':_0x55853c,'threadId':_0x1a8254});}['setUnlinkedAt'](_0x2bea60){this['_update']({'unlinkedAt':_0x2bea60});}['resolve']({resolvedAt:_0x528477=new Date(),resolvedBy:_0xd10522='',isFromAdapter:_0x202bce=!0x1}={}){const _0x33711d=this['_repository']['context']['plugins']['get'](_0x3ff1f3)['me'],{channelId:_0x1b01a6,id:_0x213a1e}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x1b01a6),{'channelId':_0x1b01a6,'threadId':_0x213a1e,'resolvedAt':_0x528477,'resolvedBy':_0xd10522||_0x33711d['id'],'isFromAdapter':_0x202bce});}['reopen']({isFromAdapter:_0x25e708=!0x1}={}){const {channelId:_0x12d891,id:_0x504d2b}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x12d891),{'channelId':_0x12d891,'threadId':_0x504d2b,'isFromAdapter':_0x25e708});}['setContext'](_0x1a5cbd){this['context']||this['_update']({'context':_0x1a5cbd});}['setAttribute'](_0x2684bb,_0x2917f4){const _0x3550ce=_0x3fb7f5(this['attributes']);_0x1fcabb(_0x3550ce,_0x2684bb,_0x2917f4),this['_update']({'attributes':_0x3550ce});}['removeAttribute'](_0xf150e6){const _0x302382=_0x3fb7f5(this['attributes']);_0x381f55(_0x302382,_0xf150e6),this['_update']({'attributes':_0x302382});}['remove']({isFromAdapter:_0xa4c1d0=!0x1}={}){const {channelId:_0x4445be,id:_0xc67a2c}=this;this['_repository']['fire'](ii('removeCommentThread',_0x4445be),{'channelId':_0x4445be,'threadId':_0xc67a2c,'isFromAdapter':_0xa4c1d0});}['attachTo'](_0x1c844c){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x1c844c});}['addComment'](_0x5d1246){const {channelId:_0x3348bb,id:_0x30f1bd}=this;this['_repository']['fire'](ii('addComment',_0x3348bb,_0x30f1bd),Object['assign']({'channelId':_0x3348bb,'threadId':_0x30f1bd},_0x5d1246));}['getComment'](_0x34928f){if('string'!=typeof _0x34928f)throw new _0x4e692d('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x34928f});return this['comments']['get'](_0x34928f);}['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'](_0x37aafa=>_0x37aafa['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4e5e6b){return this['listenTo'](_0x4e5e6b,'change:authoredAt',()=>{const _0xe84962=this['_findOptimalIndex'](_0x4e5e6b),_0x528c58=this['comments'];_0xe84962-0x1!=_0x528c58['getIndex'](_0x4e5e6b)&&_0xe84962+0x1!=_0x528c58['getIndex'](_0x4e5e6b)&&(this['_remove'](_0x4e5e6b),this['_add'](_0x4e5e6b));}),this['comments']['add'](_0x4e5e6b,this['_findOptimalIndex'](_0x4e5e6b));}['_update'](_0x556bd9){const {channelId:_0x3acd38,id:_0x2c5d8a}=this;this['_repository']['fire'](ii('updateCommentThread',_0x3acd38),{..._0x556bd9,'channelId':_0x3acd38,'threadId':_0x2c5d8a});}['_remove'](_0x461dda){return this['stopListening'](_0x461dda),_0x461dda['destroy'](),this['comments']['remove'](_0x461dda);}['_findOptimalIndex'](_0x4c4060){const _0x2676b0=this['comments']['find'](_0x500315=>new Date(_0x500315['authoredAt'])['getTime']()>new Date(_0x4c4060['authoredAt'])['getTime']());return _0x2676b0?this['comments']['getIndex'](_0x2676b0):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
31
+ _0x2de6b9(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3c88b0,_0x212cbb){super();const _0x3e8c78=_0x3c88b0['context']['plugins']['get'](_0x3ff1f3)['me'],_0x24292f=_0x3c88b0['getCommentThread'](_0x212cbb['threadId']),_0x3dc22e=0x0===_0x24292f['comments']['length'],_0x49c855=_0x3e8c78===_0x212cbb['author'];this['id']=_0x212cbb['id'],this['threadId']=_0x212cbb['threadId'],this['author']=_0x212cbb['author'],this['creator']=_0x212cbb['creator'],this['isExternal']=Boolean(_0x212cbb['attributes']&&_0x212cbb['attributes']['@external']),this['set']('content',_0x212cbb['content']),this['createdAt']=_0x212cbb['createdAt']||new Date(),this['set']('authoredAt',_0x212cbb['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x24292f,'resolvedAt'),this['set']('attributes',_0x212cbb['attributes']||{}),this['bind']('isEditable')['to'](_0x3c88b0,'_permissions',()=>{const _0x4cd321=_0x3c88b0['getPermissions'](_0x24292f['channelId'])['write'],_0xcd621f=_0x3c88b0['getPermissions'](_0x24292f['channelId'])['modifyAll'];return _0x49c855&&_0x4cd321||!_0x49c855&&_0xcd621f;}),this['bind']('isRemovable')['to'](_0x24292f,'isRemovable',_0x3c88b0,'_permissions',_0x2c023e=>{const _0x10b318=_0x3c88b0['getPermissions'](_0x24292f['channelId'])['write'],_0x3db080=_0x3c88b0['getPermissions'](_0x24292f['channelId'])['modifyAll'];return _0x49c855&&_0x10b318||_0x2c023e&&_0x3dc22e||!_0x49c855&&_0x3db080&&!_0x3dc22e;}),this['bind']('isReadOnly')['to'](_0x24292f,'isReadOnly'),this['_repository']=_0x3c88b0;}get['weight'](){return Math['max'](function(_0x31c416){const _0xb0e096=document['createElement']('div');return _0xb0e096['innerHTML']=_0x31c416,_0xb0e096['textContent']['length'];}(this['content']),0xc8);}['update'](_0x40641e){const {threadId:_0x44c2e6,id:_0x2aebb1}=this;if(!this['_repository']['hasCommentThread'](_0x44c2e6))throw new _0x4e692d('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x1bd1b3}=this['_repository']['getCommentThread'](_0x44c2e6);this['_repository']['fire'](ii('updateComment',_0x1bd1b3,_0x44c2e6),{'channelId':_0x1bd1b3,'threadId':_0x44c2e6,'commentId':_0x2aebb1,..._0x40641e});}['setAttribute'](_0x168f9e,_0x484944){const _0x581388=_0x3fb7f5(this['attributes']);_0x1fcabb(_0x581388,_0x168f9e,_0x484944),this['update']({'attributes':_0x581388});}['removeAttribute'](_0x2671b2){const _0xaa4fe0=_0x3fb7f5(this['attributes']);_0x381f55(_0xaa4fe0,_0x2671b2),this['update']({'attributes':_0xaa4fe0});}['remove'](_0xdf6003={}){if(!_0xdf6003['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x5b0777,id:_0x1a977d}=this;if(!this['_repository']['hasCommentThread'](_0x5b0777))throw new _0x4e692d('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x27d853}=this['_repository']['getCommentThread'](_0x5b0777);this['_repository']['fire'](ii('removeComment',_0x27d853,_0x5b0777),{'channelId':_0x27d853,'threadId':_0x5b0777,'commentId':_0x1a977d,..._0xdf6003});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0xd7abd7,..._0xa64bf2){for(const _0x3c3ed5 of _0xa64bf2)void 0x0!==_0x3c3ed5&&(_0xd7abd7+=':'+String(_0x3c3ed5));return _0xd7abd7;}class ei extends _0x53a89f{constructor(_0x351868){super(_0x351868),this['set']('hasContent',!0x1);}['refresh'](){const _0x1fff54=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x45602f of _0x1fff54['getRanges']())if(this['_hasContent'](_0x45602f))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x411ac6=_0x5ea41d(),ranges:_0x4cab66,comment:_0x216372}={}){const _0x5742b3=this['editor']['model'],_0x1a94c7=_0x4cab66??Array['from'](_0x5742b3['document']['selection']['getRanges']()),_0x30b58d=[];for(const _0x45b302 of _0x1a94c7)this['_hasContent'](_0x45b302)&&_0x30b58d['push'](this['_trimToContent'](_0x45b302));if(!_0x30b58d['length'])throw new _0x4e692d('addcommentthreadcommand-incorrect-ranges',null);_0x216372&&this['_createCommentThread'](_0x411ac6,_0x216372),this['_createMarkersFromRanges'](_0x411ac6,_0x30b58d,!!_0x216372);}['_createMarkersFromRanges'](_0x16ceaa,_0x26def2,_0x383154){this['editor']['model']['change'](_0x179e4e=>{for(const _0x14dbcd of _0x26def2){const _0x492d61=_0x5ea41d()['substr'](0x1,0x5),_0x296fdc='comment:'+_0x16ceaa+':'+_0x492d61;_0x179e4e['addMarker'](_0x296fdc,{'range':_0x14dbcd,'usingOperation':_0x383154,'affectsData':_0x383154});}});}['_createCommentThread'](_0x34db67,_0x35d885){const _0x5ecd76=this['editor']['plugins']['get']('CommentsRepository'),_0x30e327=this['editor']['config']['get']('collaboration.channelId'),_0x5a04ac=this['editor']['plugins']['get']('Users')['me'];if(!_0x5a04ac)throw new _0x4e692d('addcommentthreadcommand-user-not-found',null);_0x5ecd76['addCommentThread']({'threadId':_0x34db67,'channelId':_0x30e327,'comments':[{'authorId':_0x5a04ac['id'],'content':_0x35d885,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x30cdc8){for(const _0x29a7b2 of _0x30cdc8['getItems']())if(this['_itemIsContent'](_0x29a7b2))return!0x0;return!0x1;}['_itemIsContent'](_0x509742){return _0x509742['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x509742)&&!_0x509742['is']('element','tableCell');}['_trimToContent'](_0x592f53){const _0x107ee3=_0x40190b=>!this['_itemIsContent'](_0x40190b['item']),_0x3bb95a=_0x592f53['start']['getLastMatchingPosition'](_0x107ee3),_0x36a38e=_0x592f53['end']['getLastMatchingPosition'](_0x107ee3,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3bb95a,_0x36a38e);}}class si extends _0x12ccca{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5abd23){super(_0x5abd23),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5bb9ec=this['editor'],_0xa7fb0f=_0x5bb9ec['model']['document']['selection'],_0x55190e=_0x33fa85(()=>this['refreshSelectedViews'](),0xa);_0xa7fb0f['on']('change:range',(_0x5089b9,_0x15adde)=>{_0x15adde['directChange']&&(_0x55190e['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5bb9ec['editing']['view']['document'],'change:isFocused',(_0x22d594,_0x2616ab,_0x204086)=>{_0x204086&&_0x55190e();}),this['listenTo'](_0x5bb9ec['ui']['focusTracker'],'change:isFocused',(_0x3dde8e,_0x391ceb,_0x5381b1)=>{_0x5381b1||this['fire']('blur',{'isAnnotationTracked':_0x32edb5=>this['_editorAnnotationsData']['has'](_0x32edb5['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0xd33906){if(this['_editorAnnotations']['has'](_0xd33906['view']))return;this['_editorAnnotations']['add'](_0xd33906['view']),this['editor']['ui']['focusTracker']['add'](_0xd33906['view']['element']);const _0x2e5307=this['editor']['plugins']['get']($t);this['listenTo'](_0x2e5307['collection'],'remove',(_0x196b52,_0x4c2319)=>{this['editor']['ui']['focusTracker']['remove'](_0x4c2319['view']['element']),this['_editorAnnotations']['delete'](_0x4c2319['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x52c98f){if('function'!=typeof _0x52c98f)throw new _0x4e692d('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x52c98f);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x5a701d,annotations:_0x15eda9}){const _0x5cc5e6=[],_0x3816df=this['editor']['model']['document']['selection'],_0x397537=Array['from'](_0x3816df['getRanges']());for(const [_0x5dbdcc,_0x126d66]of this['_editorAnnotationsData']){const _0xaaa3be=_0x24a813(_0x126d66),_0x5b0c99=_0x15eda9['getByInnerView'](_0x5dbdcc);_0xaaa3be&&_0x5b0c99&&_0x5cc5e6['push']({'annotation':_0x5b0c99,'range':_0xaaa3be});}function _0x24a813(_0x2dcc99){for(const _0x28935a of _0x2dcc99)for(const _0x36e7da of _0x397537)if(_0x28935a['containsRange'](_0x36e7da,!_0x3816df['isCollapsed']))return _0x28935a;return null;}return _0x5cc5e6['sort']((_0x21d43a,_0x2ff1e8)=>{const _0x6604d0=_0x21d43a['range'],_0x545c70=_0x2ff1e8['range'];if(!_0x6604d0['isEqual'](_0x545c70)){if(_0x6604d0['containsRange'](_0x545c70,!0x0))return 0x1;if(_0x545c70['containsRange'](_0x6604d0,!0x0))return-0x1;}return _0x21d43a['annotation']==_0x5a701d?-0x1:_0x2ff1e8['annotation']==_0x5a701d?0x1:0x0;})['map'](_0x2fea13=>_0x2fea13['annotation']);}get['_editorAnnotationsData'](){const _0x3a26ad=new Map();for(const _0x10809d of Array['from'](this['_dataCollectors']))for(const [_0x44165c,_0x26dfed]of _0x10809d())_0x3a26ad['set'](_0x44165c,_0x26dfed);return _0x3a26ad;}}class ni extends _0x12ccca{['afterInit'](){const _0x4f3357=this['editor'];if(!_0x4f3357['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4f3357['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x12ccca{constructor(_0x47750c){super(_0x47750c),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x28345a=this['editor'],_0x4c23e6=_0x28345a['commands']['get']('importWord'),_0x7267c1=_0x28345a['plugins']['get'](_0x3ff1f3);_0x4c23e6&&(_0x4c23e6['on']('execute',(_0x37fa90,[,_0x2d6368])=>{_0x2d6368['collaboration_features']={'comments':!0x0,'user_id':_0x7267c1['me']['id']};},{'priority':_0x2a14e5['high']+0xa}),this['listenTo'](_0x4c23e6,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x56d783,_0x53165c){const {comment_threads:_0x51d203}=_0x53165c;_0x51d203&&_0x51d203['forEach'](({thread_id:_0x397761,comments:_0x58f874,is_resolved:_0x4ad95c})=>{const _0x5843b9=new Date(),_0x546d30=_0x58f874['map'](({author:_0x36b0fa,content:_0x50a4f2,created_at:_0x27b8d1})=>({'content':_0x50a4f2,'authorId':this['editor']['plugins']['get'](_0x3ff1f3)['me']['id'],'createdAt':_0x5843b9,'attributes':{'@external':{'authorName':_0x36b0fa,'createdAt':_0x27b8d1?new Date(_0x27b8d1):new Date(),'source':'importWord'}}})),_0x57e6c3=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x57e6c3,'threadId':_0x397761,'comments':_0x546d30,'resolvedAt':_0x4ad95c?_0x5843b9:null});});}}class ri extends _0x12ccca{constructor(_0x510ff6){super(_0x510ff6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x151bac=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x151bac,'contentInsertion',(_0x25d555,_0x1392fe)=>this['_removeMarkersWithoutThreads'](_0x1392fe['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3fce18){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3fce18;const _0x4645bc=this['editor']['plugins']['get']('CommentsRepository');for(const _0xa8655c of _0x3fce18['keys']()){const [_0x519110,_0x3612d9]=_0xa8655c['split'](':');'comment'!=_0x519110||_0x4645bc['hasCommentThread'](_0x3612d9)||_0x3fce18['delete'](_0xa8655c);}return _0x3fce18;}['_registerMarkerInClipboardPipeline'](){const _0x135383=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5a8cde=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5a8cde&&_0x135383['_registerMarkerToCopy']('comment',_0x5a8cde);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x43d9d9){switch(_0x43d9d9){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x420738){const _0x395664=_0x420738['split'](':');return{'group':_0x395664[0x0],'id':_0x395664[0x1],'part':_0x395664[0x2]};}class ai extends _0x12ccca{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1e3c7e,_0x5f3ae2)=>{if(!_0x5f3ae2['options']['showCommentHighlights'])return null;if(_0x5f3ae2['options']['ignoreResolvedComments']){const {id:_0x1a56c2}=hi(_0x1e3c7e['markerName']),_0x49cdae=this['editor']['plugins']['get'](Qt);if(_0x49cdae['getCommentThread'](_0x1a56c2)?.['isResolved']&&_0x1e3c7e['item'])return _0x5f3ae2['consumable']['consume'](_0x1e3c7e['item'],'addMarker:'+_0x1e3c7e['markerName']),_0x5f3ae2['consumable']['consume'](_0x1e3c7e['item'],'removeMarker:'+_0x1e3c7e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x54015f=>{_0x54015f['on']('addMarker:comment',(_0x48c86d,_0xa2cded,_0xbb9699)=>{if(!_0xbb9699['options']['showCommentHighlights'])return;const _0x3ac01a=_0xa2cded['item'];if(!_0x3ac01a)return;const _0x4afbca=_0xbb9699['mapper']['toViewElement'](_0x3ac01a);this['editor']['model']['schema']['isObject'](_0x3ac01a)&&_0x4afbca&&!_0x4afbca['getCustomProperty']('widget')&&_0x4afbca['is']('containerElement')&&Ct(_0x4afbca,_0xbb9699['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x155cd1,{writer:_0x51fcd4,options:_0x440c35})=>{if(!_0x440c35['showCommentHighlights'])return null;const _0x3dc7dd=_0x51fcd4['createContainerElement']('div'),_0x446861=_0x51fcd4['createEmptyElement']('hr');return _0x51fcd4['addClass']('ck-horizontal-line',_0x3dc7dd),_0x51fcd4['insert'](_0x51fcd4['createPositionAt'](_0x3dc7dd,0x0),_0x446861),_0x3dc7dd;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0xd97132,{writer:_0x5ca439,options:_0x102a8f})=>{if(!_0x102a8f['showCommentHighlights'])return null;const _0x86b9b5=_0x5ca439['createContainerElement']('span'),_0x137e5a=_0x5ca439['createEmptyElement']('img');return _0x5ca439['addClass']('image-inline',_0x86b9b5),_0x5ca439['insert'](_0x5ca439['createPositionAt'](_0x86b9b5,0x0),_0x137e5a),_0x86b9b5;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x23f147,{writer:_0x1125bf,options:_0x5c304f})=>{if(_0x5c304f['showCommentHighlights'])return _0x1125bf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4d6d9a,_0x272298,_0x9978ad)=>{_0x9978ad['options']['showCommentHighlights']&&_0x4d6d9a['stop']();},{'priority':'high'});}}class ci extends _0x12ccca{static get['requires'](){return[Qt,si,_0x3ff1f3,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x33abc7){super(_0x33abc7),this['set']('isThreadsLoadingPaused',!0x0),_0x33abc7['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xd95ab3,_0x295acb,_0xb306ff,_0x3678f1)=>{const _0x101873=_0x33abc7['plugins']['get'](Qt),_0x5ea6a0=_0xb306ff?hi(_0xb306ff)['id']:null;_0x33abc7['model']['change'](()=>{if(_0x5ea6a0){const _0x55818d=this['getAllMarkersForId'](_0x5ea6a0);for(const _0x13ca38 of _0x55818d)_0x33abc7['editing']['reconvertMarker'](_0x13ca38);}if(_0x3678f1){const {id:_0x55b06d}=hi(_0x3678f1),_0x2617ee=_0x101873['getCommentThread'](_0x55b06d);if(_0x2617ee&&_0x2617ee['unlinkedAt'])return;if(_0x2617ee&&!_0x2617ee['isAttached'])return;const _0x2c0ad8=this['getAllMarkersForId'](_0x55b06d);for(const _0x4d0caf of _0x2c0ad8)_0x33abc7['editing']['reconvertMarker'](_0x4d0caf);}}),_0x5ea6a0&&this['scrollToThreadMarker'](_0x5ea6a0);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x14d161=this['editor'],_0x4be20f=_0x14d161['plugins']['get'](Qt),_0x24a593=_0x14d161['config']['get']('collaboration.channelId'),_0xcbf99b=_0x4be20f['getCommentThreads']()['filter'](_0x74e8fe=>_0x74e8fe['channelId']!==_0x24a593);_0x14d161['commands']['add']('addCommentThread',new ei(_0x14d161)),this['listenTo'](_0x14d161,'change:isReadOnly',(_0x13c5b1,_0x58b851,_0x47e27e)=>{_0x4be20f['switchReadOnly'](_0x47e27e,_0x14d161['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4be20f,di('addCommentThread',_0x24a593),(_0xb4636e,{threadId:_0x3db46f})=>{const _0x53ef70=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x3db46f);_0x53ef70?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3db46f);}),this['listenTo'](_0x4be20f,di('removeCommentThread',_0x24a593),(_0xf49a2e,{threadId:_0x3010a3})=>{_0x14d161['model']['enqueueChange']({'isUndoable':!0x1},_0x390870=>{const _0x79c73e=this['getAllMarkersForId'](_0x3010a3);for(const _0x41e4a0 of _0x79c73e)_0x390870['removeMarker'](_0x41e4a0);});}),this['listenTo'](_0x4be20f,di('resolveCommentThread',_0x24a593),(_0x135a5f,{threadId:_0x56cd89})=>{(this['_reconvertMarkers'](_0x56cd89),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x56cd89)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4be20f,di('reopenCommentThread',_0x24a593),(_0x141948,{threadId:_0x5ad32d})=>{this['_reconvertMarkers'](_0x5ad32d);},{'priority':'low'}),this['listenTo'](_0x4be20f,di('addComment',_0x24a593),(_0x36c514,{threadId:_0x5f4d6b,isFromAdapter:_0x53a68b})=>{const _0x4408ee=this['getAllMarkersForId'](_0x5f4d6b);if(_0x53a68b||0x0==_0x4408ee['length']||!_0x4be20f['hasCommentThread'](_0x5f4d6b))return;0x1===_0x4be20f['getCommentThread'](_0x5f4d6b)['length']&&_0x14d161['model']['enqueueChange']({'isUndoable':!0x1},_0x224478=>{for(const _0x264013 of _0x4408ee)_0x224478['updateMarker'](_0x264013,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xcbf99b);}['afterInit'](){!async function(_0x580fff){const _0x1d933e=_0x354c02([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x44eb56=0x73460ab3,_0x1d90f6=0x73418f9b^_0x44eb56,_0x24bfb0=window[_0x354c02([0x44,0x61,0x74,0x65])][_0x354c02([0x6e,0x6f,0x77])](),_0x498941=_0x580fff[_0x354c02([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2e8d31=new window[(_0x354c02([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44951e=>{_0x498941[_0x354c02([0x6f,0x6e,0x63,0x65])](_0x354c02([0x72,0x65,0x61,0x64,0x79]),_0x44951e);}),_0x432d0f={[_0x354c02([0x6b,0x74,0x79])]:_0x354c02([0x45,0x43]),[_0x354c02([0x75,0x73,0x65])]:_0x354c02([0x73,0x69,0x67]),[_0x354c02([0x63,0x72,0x76])]:_0x354c02([0x50,0x2d,0x32,0x35,0x36]),[_0x354c02([0x78])]:_0x354c02([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x354c02([0x79])]:_0x354c02([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x354c02([0x61,0x6c,0x67])]:_0x354c02([0x45,0x53,0x32,0x35,0x36])},_0x20f8e6=_0x498941[_0x354c02([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x354c02([0x67,0x65,0x74])](_0x354c02([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x460949(){let _0x2dbb54,_0x46b71b=null,_0x4e97ca=null;try{if(_0x20f8e6==_0x354c02([0x47,0x50,0x4c]))return _0x354c02([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2dbb54=_0xc166cf(),!_0x2dbb54)return _0x354c02([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2dbb54[_0x354c02([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4e97ca=_0x1ea443(_0x2dbb54[_0x354c02([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2dbb54[_0x354c02([0x6a,0x74,0x69])])),await _0x53e67c()?_0x2fcd7a()?_0xd66f2a()?_0x354c02([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xcd09a1()?(_0x2dbb54[_0x354c02([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x354c02([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x46b71b=_0x4ce8b3(_0x354c02([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x19ee75()):_0x354c02([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x354c02([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x354c02([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x354c02([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xd66f2a(){const _0x1d7a49=[_0x354c02([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x354c02([0x74,0x72,0x69,0x61,0x6c])][_0x354c02([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dbb54[_0x354c02([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x24bfb0/0x3e8:0xe10*_0x1d90f6;return _0x2dbb54[_0x354c02([0x65,0x78,0x70])]<_0x1d7a49;}function _0x2fcd7a(){const _0x11e581=_0x2dbb54[_0x354c02([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x11e581)return!0x1;if(_0x11e581[_0x354c02([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x354c02([0x2a])))return!0x0;if(_0x11e581[_0x354c02([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x354c02([0x43,0x4d,0x54])))return!0x0;if(_0x11e581[_0x354c02([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x354c02([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x20d48d())return!0x0;if(_0x11e581[_0x354c02([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x354c02([0x52,0x43,0x4d,0x54]))){if(_0xa9103b())return!0x0;if(_0x19548c()||_0x344624())return!0x0;}return!0x1;}function _0xcd09a1(){const _0x41a42b=_0x2dbb54[_0x354c02([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x41a42b||0x0==_0x41a42b[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x131be0}=new URL(window[_0x354c02([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x41a42b[_0x354c02([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x131be0))return!0x0;const _0x32af4c=_0x131be0[_0x354c02([0x73,0x70,0x6c,0x69,0x74])](_0x354c02([0x2e]));return _0x41a42b[_0x354c02([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x292aff=>_0x292aff[_0x354c02([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x354c02([0x2a])))[_0x354c02([0x6d,0x61,0x70])](_0x428e13=>_0x428e13[_0x354c02([0x73,0x70,0x6c,0x69,0x74])](_0x354c02([0x2e])))[_0x354c02([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x20b317=>_0x20b317[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x32af4c[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x354c02([0x6d,0x61,0x70])](_0x194f5c=>Array(_0x32af4c[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x194f5c[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x354c02([0x66,0x69,0x6c,0x6c])](_0x194f5c[0x0]===_0x354c02([0x2a])?_0x354c02([0x2a]):'')[_0x354c02([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x194f5c))[_0x354c02([0x73,0x6f,0x6d,0x65])](_0x408607=>_0x32af4c[_0x354c02([0x65,0x76,0x65,0x72,0x79])]((_0x4a14a6,_0x4d512e)=>_0x408607[_0x4d512e]===_0x4a14a6||_0x408607[_0x4d512e]===_0x354c02([0x2a])));}function _0x19ee75(){return _0x46b71b&&_0x4e97ca?new window[(_0x354c02([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1cae3a,_0xfbfa35)=>{_0x46b71b[_0x354c02([0x74,0x68,0x65,0x6e])](_0x1cae3a,_0xfbfa35),_0x4e97ca[_0x354c02([0x74,0x68,0x65,0x6e])](_0x41c7c5=>{_0x41c7c5!=_0x354c02([0x56,0x61,0x6c,0x69,0x64])&&_0x1cae3a(_0x41c7c5);},_0xfbfa35);}):_0x46b71b||_0x4e97ca||_0x354c02([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1ea443(_0x2b717c,_0x115aae){return new window[(_0x354c02([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b5ad7=>{if(_0x22a1cd())return _0x3b5ad7(_0x354c02([0x56,0x61,0x6c,0x69,0x64]));_0x16c3fd(),_0x498941[_0x354c02([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x354c02([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2ea8b9=!0x1;const _0x9b743f=_0x5ea41d();function _0x236257(_0x38f945){return!!_0x38f945&&(typeof _0x38f945===_0x354c02([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x38f945===_0x354c02([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x38f945[_0x354c02([0x74,0x68,0x65,0x6e])]===_0x354c02([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x38f945[_0x354c02([0x63,0x61,0x74,0x63,0x68])]===_0x354c02([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x517cd5(_0x222dd5){_0x256e0a(_0x222dd5)[_0x354c02([0x74,0x68,0x65,0x6e])](_0x488bfc=>{if(!_0x488bfc||_0x488bfc[_0x354c02([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x354c02([0x6f,0x6b]))return _0x354c02([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1f2158(_0x444a8f(_0x9b743f+_0x115aae))!=_0x488bfc[_0x354c02([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x354c02([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x354c02([0x56,0x61,0x6c,0x69,0x64]);})[_0x354c02([0x74,0x68,0x65,0x6e])](_0x51b18c=>(_0x22f659(),_0x51b18c),()=>{const _0x30b87d=_0x4cfc14();return null==_0x30b87d?(_0x22f659(),_0x354c02([0x56,0x61,0x6c,0x69,0x64])):_0x354c02(_0x24bfb0-_0x30b87d>(0x574a8eb3^_0x44eb56)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x354c02([0x74,0x68,0x65,0x6e])](_0x3b5ad7)[_0x354c02([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3b5ad7(_0x354c02([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x20f03d=0x7370e433^_0x44eb56;function _0x22f659(){const _0xc26df6=_0x354c02([0x6c,0x6c,0x63,0x74,0x2d])+_0x1f2158(_0x444a8f(_0x2b717c)),_0x43c207=_0x2aaefd(_0x1f2158(window[_0x354c02([0x4d,0x61,0x74,0x68])][_0x354c02([0x63,0x65,0x69,0x6c])](_0x24bfb0/_0x20f03d)));window[_0x354c02([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x354c02([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xc26df6,_0x43c207);}function _0x4cfc14(){const _0x26c1cf=_0x354c02([0x6c,0x6c,0x63,0x74,0x2d])+_0x1f2158(_0x444a8f(_0x2b717c)),_0x213cf9=window[_0x354c02([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x354c02([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x26c1cf);return _0x213cf9?window[_0x354c02([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2aaefd(_0x213cf9),0x10)*_0x20f03d:null;}function _0x256e0a(_0xbf6239){return new window[(_0x354c02([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1e08b9,_0x1dea04)=>{_0xbf6239[_0x354c02([0x74,0x68,0x65,0x6e])](_0x1e08b9,_0x1dea04),window[_0x354c02([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1dea04,0x7347de73^_0x44eb56);});}}_0x498941[_0x354c02([0x6f,0x6e])](_0x354c02([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5eab26,_0x251798)=>{if(_0x251798[0x0]!=_0x2b717c)return _0x3b5ad7(_0x354c02([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x251798[0x1]={..._0x251798[0x1],[_0x354c02([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x9b743f};},{[_0x354c02([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x354c02([0x68,0x69,0x67,0x68])}),_0x498941[_0x354c02([0x6f,0x6e])](_0x354c02([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2563be=>{_0x236257(_0x2563be[_0x354c02([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2ea8b9=!0x0,_0x517cd5(_0x2563be[_0x354c02([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x354c02([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x354c02([0x6c,0x6f,0x77])}),_0x2e8d31[_0x354c02([0x74,0x68,0x65,0x6e])](()=>{_0x2ea8b9||_0x3b5ad7(_0x354c02([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x22a1cd(){return _0x498941[_0x354c02([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x354c02([0x76,0x69,0x65,0x77])][_0x354c02([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x354c02([0x61,0x75,0x74,0x6f]);}function _0x16c3fd(){_0x498941[_0x354c02([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x354c02([0x76,0x69,0x65,0x77])][_0x354c02([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x354c02([0x61,0x75,0x74,0x6f]);}}function _0x4ce8b3(_0x1f9bbd){const _0x51b449=[new window[(_0x354c02([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21ef7c=>setTimeout(_0x21ef7c,0x734f347f^_0x44eb56)),_0x2e8d31[_0x354c02([0x74,0x68,0x65,0x6e])](()=>new window[(_0x354c02([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x264e9f=>{let _0x16037b=0x0;_0x498941[_0x354c02([0x6d,0x6f,0x64,0x65,0x6c])][_0x354c02([0x6f,0x6e])](_0x354c02([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3ac4fa,_0x5ba3af)=>{_0x5ba3af[0x0][_0x354c02([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x16037b++,_0x16037b==(0x73460f5b^_0x44eb56)&&(_0x264e9f(),_0x3ac4fa[_0x354c02([0x6f,0x66,0x66])]());});}))];return window[_0x354c02([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x354c02([0x72,0x61,0x63,0x65])](_0x51b449)[_0x354c02([0x74,0x68,0x65,0x6e])](()=>_0x1f9bbd);}async function _0xd72680(){await _0x2e8d31,_0x498941[_0x354c02([0x6d,0x6f,0x64,0x65,0x6c])][_0x354c02([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x190f2d,_0x498941[_0x354c02([0x6d,0x6f,0x64,0x65,0x6c])][_0x354c02([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x190f2d,_0x498941[_0x354c02([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x354c02([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x20d48d(){return window[_0x354c02([0x67,0x6c,0x6f,0x62])]&&window[_0x354c02([0x67,0x6c,0x6f,0x62])][_0x354c02([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0xa9103b(){return _0xab0f65(_0x354c02([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4ec8d6(_0x354c02([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x354c02([0x73,0x74,0x61,0x74,0x65])]==_0x354c02([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x19548c(){return _0xab0f65(_0x354c02([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x344624(){return _0xab0f65(_0x354c02([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2fc29c(_0x1a79b8){const _0x3c03d6=_0x2d1058();_0x498941[_0x3c03d6]=_0x354c02([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1a79b8,_0x1a79b8!=_0x354c02([0x56,0x61,0x6c,0x69,0x64])&&_0xd72680();}function _0x2d1058(){const _0x1bf424=window[_0x354c02([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x354c02([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x354c02([0x6e,0x6f,0x77])]())[_0x354c02([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x354c02([0x2e]),'');let _0x4098ad=_0x354c02([0x4b]);for(let _0x10ca7d=0x0;_0x10ca7d<_0x1bf424[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x10ca7d+=0x2){let _0x25b8e0=window[_0x354c02([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1bf424[_0x354c02([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10ca7d,_0x10ca7d+0x2));_0x25b8e0>=_0x1d933e[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x25b8e0-=_0x1d933e[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4098ad+=_0x1d933e[_0x25b8e0];}return _0x4098ad;}function _0xc166cf(){const _0x2c93ca=_0x20f8e6[_0x354c02([0x73,0x70,0x6c,0x69,0x74])](_0x354c02([0x2e]));if(0x3!=_0x2c93ca[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2a484e(_0x2c93ca[0x1]);function _0x2a484e(_0x324a15){const _0x5e7060=_0x4804f4(_0x324a15);return _0x5e7060&&_0x2651cc()?_0x5e7060:null;function _0x2651cc(){const _0x2632c1=_0x5e7060[_0x354c02([0x6a,0x74,0x69])],_0x108d4a=window[_0x354c02([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2632c1[_0x354c02([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2632c1[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5199db={..._0x5e7060,[_0x354c02([0x6a,0x74,0x69])]:_0x2632c1[_0x354c02([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2632c1[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5199db[_0x354c02([0x76,0x63])],_0x444a8f(_0x5199db)==_0x108d4a;}}}async function _0x53e67c(){let _0x75c051=!0x0;try{const _0x515f92=_0x20f8e6[_0x354c02([0x73,0x70,0x6c,0x69,0x74])](_0x354c02([0x2e])),[_0x29a750,_0x144f53,_0x4631f9]=_0x515f92;return _0x540b0b(_0x29a750),await _0x18f669(_0x29a750,_0x144f53,_0x4631f9),_0x75c051;}catch{return!0x1;}function _0x540b0b(_0x5eb362){const _0x248182=_0x4804f4(_0x5eb362);_0x248182&&_0x248182[_0x354c02([0x61,0x6c,0x67])]==_0x354c02([0x45,0x53,0x32,0x35,0x36])||(_0x75c051=!0x1);}async function _0x18f669(_0x2cd843,_0x2944cf,_0x2f3dfe){const _0x1a45cb=window[_0x354c02([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x354c02([0x66,0x72,0x6f,0x6d])](_0x247455(_0x2f3dfe),_0x183a28=>_0x183a28[_0x354c02([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x664a5d=new window[(_0x354c02([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x354c02([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2cd843+_0x354c02([0x2e])+_0x2944cf),_0xc10550=window[_0x354c02([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x354c02([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xc10550)return;const _0x45992f=await _0xc10550[_0x354c02([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x354c02([0x6a,0x77,0x6b]),_0x432d0f,{[_0x354c02([0x6e,0x61,0x6d,0x65])]:_0x354c02([0x45,0x43,0x44,0x53,0x41]),[_0x354c02([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x354c02([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x354c02([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xc10550[_0x354c02([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x354c02([0x6e,0x61,0x6d,0x65])]:_0x354c02([0x45,0x43,0x44,0x53,0x41]),[_0x354c02([0x68,0x61,0x73,0x68])]:{[_0x354c02([0x6e,0x61,0x6d,0x65])]:_0x354c02([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x45992f,_0x1a45cb,_0x664a5d)||(_0x75c051=!0x1);}}function _0x4804f4(_0x2b75e9){return _0x2b75e9[_0x354c02([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x354c02([0x65,0x79]))?JSON[_0x354c02([0x70,0x61,0x72,0x73,0x65])](_0x247455(_0x2b75e9)):null;}function _0x247455(_0x30e6a7){return window[_0x354c02([0x61,0x74,0x6f,0x62])](_0x30e6a7[_0x354c02([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x354c02([0x2b]))[_0x354c02([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x354c02([0x2f])));}function _0x444a8f(_0x2d9317){let _0x18e888=0x1505;function _0xab113a(_0x50dc30){for(let _0x2bae68=0x0;_0x2bae68<_0x50dc30[_0x354c02([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2bae68++){const _0x124b05=_0x50dc30[_0x354c02([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2bae68);_0x18e888=(_0x18e888<<0x5)+_0x18e888+_0x124b05,_0x18e888&=_0x18e888;}}function _0xb3588a(_0x25a3fd){Array[_0x354c02([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x25a3fd)?_0x25a3fd[_0x354c02([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xb3588a):_0x25a3fd&&typeof _0x25a3fd==_0x354c02([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x354c02([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x25a3fd)[_0x354c02([0x73,0x6f,0x72,0x74])]()[_0x354c02([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x13d672,_0x46f53a])=>{_0xab113a(_0x13d672),_0xb3588a(_0x46f53a);}):_0xab113a(window[_0x354c02([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x25a3fd));}return _0xb3588a(_0x2d9317),_0x18e888>>>0x0;}function _0x1f2158(_0x5dded9){return _0x5dded9[_0x354c02([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x354c02([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x354c02([0x30]));}function _0x2aaefd(_0x255636){return _0x255636[_0x354c02([0x73,0x70,0x6c,0x69,0x74])]('')[_0x354c02([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x354c02([0x6a,0x6f,0x69,0x6e])]('');}function _0xab0f65(_0x3c2dc0){return _0x498941[_0x354c02([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x354c02([0x68,0x61,0x73])](_0x3c2dc0);}function _0x4ec8d6(_0x3210be){return _0x498941[_0x354c02([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x354c02([0x67,0x65,0x74])](_0x3210be);}function _0x190f2d(){}function _0x354c02(_0x266d33){return _0x266d33['map'](_0x21ec20=>String['fromCharCode'](_0x21ec20))['join']('');}_0x2fc29c(await _0x460949());}(this);}['destroy'](){const _0x2c4e12=this['editor']['plugins']['get'](Qt),_0x5ddae1=this['editor']['config']['get']('collaboration.channelId');for(const _0x3cfd45 of _0x2c4e12['getCommentThreads']({'channelId':_0x5ddae1}))_0x2c4e12['_detachCommentThread'](_0x3cfd45['id']),_0x2c4e12['_threads']['delete'](_0x3cfd45['id']);super['destroy']();}['hasMarkerForId'](_0x33b954){return this['getAllMarkersForId'](_0x33b954)['length']>0x0;}['getAllMarkersForId'](_0x4881d9){const _0x4528ac=[];for(const _0x4f78d3 of this['editor']['model']['markers'])_0x4f78d3['name']['startsWith']('comment:'+_0x4881d9)&&_0x4528ac['push'](_0x4f78d3);return _0x4528ac;}['scrollToThreadMarker'](_0x4029e6){setTimeout(()=>{const _0x4f44f7=this['_getTargetForId'](_0x4029e6);if(!_0x4f44f7)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x4029e6&&_0x4e5b6c({'target':_0x4f44f7[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x16ea51){this['editor']['model']['change'](()=>{for(const _0x434d81 of this['getAllMarkersForId'](_0x16ea51))this['editor']['editing']['reconvertMarker'](_0x434d81);});}['_attachArchivedThread'](_0x2537c4){const _0xa1b99a=this['editor']['plugins']['get'](Qt),_0x2d5b5b=this['editor']['plugins']['get'](si),_0x33d998=_0xa1b99a['getCommentThread'](_0x2537c4);if(!_0x33d998['isAttached']){const _0x59fa89=_0x33d998['attachTo'](()=>this['_getTargetForId'](_0x33d998['id']));_0x2d5b5b['registerAnnotation'](_0x59fa89),_0x33d998['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x59b104=this['editor'],_0x2167d2=_0x59b104['plugins']['get'](_0x3ff1f3);_0x59b104['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x44f0eb,_0x452202)=>{const {id:_0xb51eae}=hi(_0x44f0eb['markerName']),_0x57b636=_0x59b104['plugins']['get'](Qt)['getCommentThread'](_0xb51eae),_0x50267c=this['activeMarker']&&hi(this['activeMarker'])['id']===_0xb51eae;let _0x365dd3;if(_0x57b636&&_0x57b636['isResolved']&&!_0x50267c&&_0x44f0eb['item'])return _0x452202['consumable']['consume'](_0x44f0eb['item'],'addMarker:'+_0x44f0eb['markerName']),_0x452202['consumable']['consume'](_0x44f0eb['item'],'removeMarker:'+_0x44f0eb['markerName']),null;const _0x184b4b=['ck-comment-marker'];return _0x50267c&&_0x184b4b['push']('ck-comment-marker--active'),_0x365dd3=_0x57b636?.['length']?_0x57b636['comments']['first']['author']['id']:_0x2167d2['me']['id'],{'classes':_0x184b4b,'attributes':{'data-comment':_0xb51eae,'data-author-id':_0x365dd3}};}}),_0x59b104['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5a4a0b,{options:_0x40c596})=>{if(_0x40c596['showCommentHighlights'])return null;const _0x558b5c=_0x59b104['plugins']['get'](Qt),_0x4ff5ad=_0x59b104['model']['markers']['get'](_0x5a4a0b),{id:_0x4803bf,part:_0x1de85a}=hi(_0x5a4a0b);return _0x4ff5ad&&!_0x4ff5ad['affectsData']||_0x40c596['ignoreResolvedComments']&&_0x558b5c['getCommentThread'](_0x4803bf)?.['isResolved']?null:{'group':'comment','name':_0x1de85a?_0x4803bf+':'+_0x1de85a:_0x4803bf};}}),_0x59b104['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4fc72b,{writer:_0x3adb8b})=>_0x3adb8b['createElement']('$marker',{'data-name':'comment:'+_0x4fc72b['getAttribute']('id')})}),_0x59b104['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2feb53=this['editor'],_0x47b447=_0x2feb53['plugins']['get'](Qt),_0x3c2787=new Set(),_0x31b6e3=new Set();_0x2feb53['model']['document']['registerPostFixer'](_0x5a0bbb=>{let _0x20332d=!0x1;for(const {name:_0xb4daba,data:_0x381849}of _0x2feb53['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1ea258,id:_0x99c5da}=hi(_0xb4daba);let _0x29f26c=_0x381849['newRange'];if('comment'!==_0x1ea258||!_0x29f26c)continue;const _0x56097d='$graveyard'===_0x29f26c['root']['rootName'];_0x56097d||(_0x29f26c=li(_0x29f26c,_0x2feb53['model']),!_0x29f26c||_0x29f26c['isCollapsed']||!_0x381849['newRange']||_0x29f26c['isEqual'](_0x381849['newRange']))?_0x2feb53['model']['hasContent'](_0x29f26c)&&!_0x56097d?this['isThreadsLoadingPaused']?_0x3c2787['add'](_0xb4daba):this['_handleThreadMarker'](_0xb4daba,_0x99c5da):(_0x31b6e3['add'](_0xb4daba),_0x3c2787['delete'](_0xb4daba),_0x5a0bbb['removeMarker'](_0xb4daba),_0x20332d=!0x0):(_0x5a0bbb['updateMarker'](_0xb4daba,{'range':_0x29f26c}),_0x20332d=!0x0);}return _0x20332d;}),this['on']('change:isThreadsLoadingPaused',(_0x5f172c,_0x4efa40,_0x207103)=>{if(!_0x207103&&_0x3c2787['size'])for(const _0x49eda0 of _0x3c2787){const {id:_0x28e803}=hi(_0x49eda0);_0x3c2787['delete'](_0x49eda0),_0x2feb53['model']['markers']['get'](_0x49eda0)&&this['_handleThreadMarker'](_0x49eda0,_0x28e803);}}),this['listenTo'](_0x2feb53['model']['document'],'change',()=>{for(const {name:_0x40600d,data:{newRange:_0x37ff40}}of _0x2feb53['model']['document']['differ']['getChangedMarkers']()){const {group:_0x239bef,id:_0x56a84b}=hi(_0x40600d);if('comment'!==_0x239bef)continue;const _0x57f539=_0x47b447['getCommentThread'](_0x56a84b),_0x267895=this['hasMarkerForId'](_0x56a84b);_0x57f539&&(!_0x57f539['_hasTargetInContent']&&_0x37ff40&&_0x2feb53['editing']['view']['once']('render',()=>{const _0x5bd600=_0x2feb53['plugins']['get']($t),_0x42feb2=_0x47b447['_threadToController']['get'](_0x57f539)['view'];_0x5bd600['getByInnerView'](_0x42feb2)['refreshVisibility']();},{'priority':'low'}),_0x57f539['_hasTargetInContent']=_0x267895||!!_0x37ff40),_0x37ff40||(_0x31b6e3['add'](_0x40600d),_0x3c2787['delete'](_0x40600d));}for(const _0x252f5c of _0x31b6e3){const {id:_0x2e1ddd}=hi(_0x252f5c),_0x5632c0=_0x47b447['getCommentThread'](_0x2e1ddd);if(_0x3c2787['delete'](_0x252f5c),!_0x5632c0)continue;const _0x1eab57=this['hasMarkerForId'](_0x2e1ddd);_0x1eab57||_0x5632c0['isSubmitted']?_0x1eab57||_0x5632c0['unlinkedAt']||_0x5632c0['setUnlinkedAt'](new Date()):_0x5632c0['remove']();}_0x31b6e3['clear']();});}['_handleInitialThreads'](_0x322e60){_0x322e60['forEach'](_0x2e969a=>{_0x2e969a['unlinkedAt']&&this['_attachArchivedThread'](_0x2e969a['id']);});}['_getTargetForId'](_0x64eb0d){const _0x375695=this['editor'],_0x214657=this['getAllMarkersForId'](_0x64eb0d);return _0x7ef8e0(_0x375695['editing'],_0x214657);}['_getTextContext'](_0x11083d){const _0x1ccb00=this['getAllMarkersForId'](_0x11083d);let _0xf09fef='',_0x17994c=!0x1;for(const _0x4b892f of _0x1ccb00){const _0x2a2840=_0x4b892f['getRange']();for(const _0x2f2301 of Array['from'](_0x2a2840['getItems']()))_0x2f2301['is']('$textProxy')?(_0xf09fef&&_0x17994c&&(_0xf09fef+='\x20',_0x17994c=!0x1),_0xf09fef+=_0x2f2301['data']):_0x17994c=!0x0;_0x17994c=!0x0;}return _0xf09fef['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x47339c,_0x595ab1){const _0x3f34da=this['editor'],_0x45a32c=_0x3f34da['plugins']['get'](Qt);let _0x2db375=_0x45a32c['getCommentThread'](_0x595ab1);const _0x81471b=_0x3f34da['config']['get']('collaboration.channelId'),_0x33806b=_0x3f34da['plugins']['get'](si);if(_0x2db375&&(_0x2db375['unlinkedAt']&&_0x2db375['setUnlinkedAt'](null),_0x2db375['isAttached']))return _0x2db375;return!this['getAllMarkersForId'](_0x595ab1)[0x0]['managedUsingOperations']?_0x3f34da['editing']['view']['once']('render',()=>{if(_0x45a32c['getCommentThread'](_0x595ab1))return;const _0xe7d33f=_0x3f34da['plugins']['get']($t);_0x2db375=_0x45a32c['openNewCommentThread']({'channelId':_0x81471b,'threadId':_0x595ab1,'target':()=>this['_getTargetForId'](_0x595ab1),'context':{'type':'text','value':this['_getTextContext'](_0x595ab1)}});const _0x159a6a=_0x45a32c['_threadToController']['get'](_0x2db375)['view'],_0x412633=_0xe7d33f['getByInnerView'](_0x159a6a);_0x412633&&_0x33806b['registerAnnotation'](_0x412633);},{'priority':'low'}):_0x45a32c['fetchCommentThread']({'channelId':_0x81471b,'threadId':_0x595ab1})['then'](_0x461ecf=>{if('destroyed'!==_0x3f34da['state']){if(_0x2db375=_0x461ecf,_0x2db375&&!_0x2db375['isAttached']){const _0x2276a0=_0x2db375['attachTo'](()=>this['_getTargetForId'](_0x595ab1));_0x33806b['registerAnnotation'](_0x2276a0),_0x2db375['isResolved']&&this['_reconvertMarkers'](_0x595ab1);}else{if(!_0x2db375){const _0x232eb7=this['getAllMarkersForId'](_0x595ab1);_0x3f34da['model']['change'](_0x2db7da=>{for(const _0x34b369 of _0x232eb7)_0x2db7da['removeMarker'](_0x34b369);});}}}}),_0x2db375;}['_handleThreadMarker'](_0x17ab11,_0xf35eb9){const _0xe18822=this['_attachMarkerToThread'](_0x17ab11,_0xf35eb9);_0xe18822&&!_0xe18822['context']&&_0xe18822['setContext']({'type':'text','value':this['_getTextContext'](_0xf35eb9)});}['_initAriaMarkerChangeAnnouncements'](){const _0x100f14=this['editor'];_0x2c7cec(_0x100f14['model'],({left:_0x4c253a,entered:_0x396b6b})=>{for(const _0x25aaa9 of _0x4c253a)if(ui(_0x25aaa9)){_0x100f14['ui']['ariaLiveAnnouncer']['announce'](bt(_0x100f14['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x40be99 of _0x396b6b)if(ui(_0x40be99)){_0x100f14['ui']['ariaLiveAnnouncer']['announce'](bt(_0x100f14['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x56bf67(_0x5bea71)));break;}});}}function di(_0xa4b4f8,_0x297ada){return _0x297ada?_0xa4b4f8+':'+_0x297ada:_0xa4b4f8;}function li(_0x3be48d,_0x1eaf67){const _0x1c9394=_0x1eaf67['schema'],_0x403183=_0x1eaf67['createRange'](_0x3be48d['start']);for(const _0x22cc92 of _0x3be48d['getWalker']()){const {type:_0x55743,item:_0x2be874,nextPosition:_0x18fc13}=_0x22cc92;if('text'===_0x55743||_0x1c9394['isObject'](_0x2be874)){const _0x1b3556=_0x1eaf67['createPositionBefore'](_0x2be874);_0x403183['isCollapsed']&&(_0x403183['start']=_0x1b3556),_0x403183['end']=_0x18fc13;}}return _0x403183;}function ui(_0x11eabe){return'comment'===hi(_0x11eabe['name'])['group'];}class mi extends _0x12ccca{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x2a7d5e=this['editor'],_0x248ca9=_0x2a7d5e['plugins']['get'](Qt),_0x581275=_0x2a7d5e['plugins']['get'](ci),_0x4e80e5=_0x2a7d5e['plugins']['get']($t),_0x910066=_0x2a7d5e['plugins']['get'](si);_0x2a7d5e['ui']['componentFactory']['add']('comment',()=>{const _0xed9062=this['_createUIButton'](_0x29997a);return _0xed9062['tooltip']=!0x0,_0xed9062;}),_0x2a7d5e['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x910066['addSourceCollector'](()=>{const _0x58fdf0=[];for(const [_0x5e312b,_0x6308c1]of _0x248ca9['_threadToController']){const _0x2a1248=_0x581275['getAllMarkersForId'](_0x5e312b['id']),_0x10159b=_0x2a1248['map'](_0x21bf2c=>_0x21bf2c['getRange']());_0x2a1248['length']>0x0&&_0x58fdf0['push']([_0x6308c1['view'],_0x10159b]);}return _0x58fdf0;}),this['listenTo'](_0x4e80e5,'change:activeAnnotations',(_0x453a4e,_0x5e6617,_0x219bc4)=>{const _0x48dde0=Array['from'](_0x219bc4)['map'](_0x31a138=>_0x31a138['innerView'])['find'](_0x10224a=>_0x248ca9['_viewToController']['has'](_0x10224a));if(!_0x48dde0)return void(_0x581275['activeMarker']=null);const _0x568272=_0x248ca9['_viewToController']['get'](_0x48dde0)['model']['id'],_0x1ddbbb='comment:'+_0x568272;_0x568272&&_0x581275['hasMarkerForId'](_0x568272)?_0x581275['activeMarker']=_0x1ddbbb:_0x581275['activeMarker']&&(_0x581275['activeMarker']=null);}),this['listenTo'](_0x248ca9,'removeCommentThread',(_0x47e658,{threadId:_0x2ba93d,isFromAdapter:_0x3ae1f3})=>{!_0x3ae1f3&&_0x2a7d5e['ui']['focusTracker']['isFocused']&&_0x581275['hasMarkerForId'](_0x2ba93d)&&_0x2a7d5e['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x248ca9,'addComment',(_0x359c9e,{threadId:_0x42639c,isFromAdapter:_0x106a47})=>{if(_0x106a47||!_0x581275['hasMarkerForId'](_0x42639c)||!_0x248ca9['hasCommentThread'](_0x42639c))return;0x1===_0x248ca9['getCommentThread'](_0x42639c)['length']&&(_0x2a7d5e['editing']['view']['focus'](),_0x359c9e['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1b911c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x18e25f;for(const _0x1d4103 in _0x1b911c){const _0x3cb189=_0x1d4103,_0x3c5ab1=_0x1b911c[_0x3cb189];if('commentsLicenseKeyValid'==_0x3c5ab1||'commentsLicenseKeyInvalid'==_0x3c5ab1||'commentsLicenseKeyExpired'==_0x3c5ab1||'commentsLicenseKeyDomainLimit'==_0x3c5ab1||'commentsLicenseKeyNotAllowed'==_0x3c5ab1||'commentsLicenseKeyEvaluationLimit'==_0x3c5ab1||'commentsLicenseKeyUsageLimit'==_0x3c5ab1){delete _0x1b911c[_0x3cb189],_0x18e25f=_0x3c5ab1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x18e25f&&_0x1b911c['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x18e25f&&_0x1b911c['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x18e25f&&_0x1b911c['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x18e25f&&_0x1b911c['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x18e25f&&_0x1b911c['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x18e25f&&_0x1b911c['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x34b3d0){const _0x1b0de9=this['editor'],_0x320bbd=new _0x34b3d0(_0x1b0de9['locale']),_0x1862fd=_0x1b0de9['commands']['get']('addCommentThread');return _0x320bbd['set']({'label':bt(_0x1b0de9['locale'],'Comment'),'icon':_0x27acc3}),_0x320bbd['bind']('isEnabled')['to'](_0x1862fd,'isEnabled',_0x1862fd,'hasContent',(_0x36908f,_0x37dd71)=>_0x36908f&&_0x37dd71),this['listenTo'](_0x320bbd,'execute',()=>{_0x1862fd['execute']();}),_0x320bbd;}}class fi extends _0x12ccca{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x190829){super(_0x190829),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3a10da,_0x1def75,_0x2bf491)=>{_0x2bf491?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x290313,_0x18c03d]of this['editor']['commands'])_0x18c03d['affectsData']&&'addCommentThread'!==_0x290313&&_0x18c03d['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 _0x33a377=this['editor']['editing']['view']['document'];this['listenTo'](_0x33a377,'cut',_0x3af3db=>_0x3af3db['stop'](),{'priority':'highest'}),this['listenTo'](_0x33a377,'clipboardInput',_0x340b4c=>_0x340b4c['stop'](),{'priority':'highest'}),this['listenTo'](_0x33a377,'delete',_0x4ea1bc=>_0x4ea1bc['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1f998b,_0x495103]of this['editor']['commands'])_0x495103['affectsData']&&'addCommentThread'!==_0x1f998b&&_0x495103['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x43feeb{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x40fc84){super(_0x40fc84),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x7529ee=this['context']['plugins']['get']($t);this['listenTo'](_0x7529ee,'_activateAnnotation',(_0x43eabf,_0x5c6eb9)=>{for(const _0x1a2332 of this['activeUIs']){const _0x126c5b=this['_uis']['get'](_0x1a2332);(0x0,this['uisData']['get'](_0x1a2332)['filter'])(_0x5c6eb9)&&_0x126c5b['setActiveAnnotation'](_0x5c6eb9);}}),this['listenTo'](_0x7529ee,'_deactivateAllAnnotations',()=>{for(const _0x50a7f8 of this['activeUIs']){this['_uis']['get'](_0x50a7f8)['setActiveAnnotation'](null);}}),this['listenTo'](_0x7529ee['_visibleAnnotations'],'add',(_0x561a30,_0x484016)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x484016);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3acaac){return this['activeUIs']['has'](_0x3acaac);}['activate'](_0x297abc,_0x324a76=this['defaultFilter']){const _0x28c8e1=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x297abc))throw new _0x4e692d('annotationsuis-missing-ui',this,{'uiName':_0x297abc});this['isActive'](_0x297abc)&&this['deactivate'](_0x297abc),this['activeUIs']['add'](_0x297abc);const _0x644f4=new jt();Xt({'source':_0x28c8e1['_visibleAnnotations'],'target':_0x644f4,'filter':_0x324a76}),this['uisData']['set'](_0x297abc,{'collection':_0x644f4,'filter':_0x324a76});const _0x1f8922=this['_uis']['get'](_0x297abc);_0x1f8922['attach'](_0x644f4),this['listenTo'](_0x1f8922,'change:activeAnnotation',(_0x1d2e65,_0x571936,_0x45760c,_0x79a6c2)=>{_0x79a6c2&&_0x28c8e1['_removeActiveAnnotation'](_0x79a6c2),_0x45760c&&_0x28c8e1['_addActiveAnnotation'](_0x45760c);});}['deactivate'](_0x4c85b0){if(this['activeUIs']['delete'](_0x4c85b0),!this['_uis']['has'](_0x4c85b0))throw new _0x4e692d('annotationsuis-missing-ui',this,{'uiName':_0x4c85b0});const _0x51f921=this['_uis']['get'](_0x4c85b0);_0x51f921['detach'](),this['stopListening'](_0x51f921),this['uisData']['get'](_0x4c85b0)['collection']['destroy'](),this['uisData']['delete'](_0x4c85b0);}['switchTo'](_0x4404cb){if(!this['_uis']['has'](_0x4404cb))throw new _0x4e692d('annotationsuis-missing-ui',this,{'uiName':_0x4404cb});const _0x2027a1=this['context']['plugins']['get']($t),_0x433981=Array['from'](_0x2027a1['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4404cb);const _0x2218a5=this['_uis']['get'](_0x4404cb);_0x2218a5['setActiveAnnotation'](_0x433981),_0x2218a5['_setSelectedAnnotations']&&_0x433981&&_0x2218a5['_setSelectedAnnotations']([_0x433981]);}['deactivateAll'](){for(const _0x58fdb1 of this['activeUIs'])this['deactivate'](_0x58fdb1);}['register'](_0x3129db,_0x5f2937){if(this['_uis']['has'](_0x3129db))throw new _0x4e692d('annotationsuis-register-already-registered');if('function'!=typeof _0x5f2937['attach']||'function'!=typeof _0x5f2937['detach']||'function'!=typeof _0x5f2937['setActiveAnnotation'])throw new _0x4e692d('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3129db,_0x5f2937);}['refilterAnnotations'](){const _0x44153f=this['context']['plugins']['get']($t)['collection'],_0x15750b=new Map(),_0x3f63ec=Array['from'](this['activeUIs']);for(const _0x37d237 of this['activeUIs']){const _0x29da66=this['uisData']['get'](_0x37d237)['collection'];for(const _0x5c6411 of _0x29da66)_0x15750b['set'](_0x5c6411,_0x37d237);}for(const _0x5cbdc7 of _0x44153f){const _0x274f84=_0x15750b['get'](_0x5cbdc7);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5cbdc7);const _0x510111=_0x3f63ec['find'](_0x356245=>this['uisData']['get'](_0x356245)['filter'](_0x5cbdc7));_0x274f84!==_0x510111&&(_0x274f84&&this['uisData']['get'](_0x274f84)['collection']['remove'](_0x5cbdc7),_0x510111&&this['uisData']['get'](_0x510111)['collection']['add'](_0x5cbdc7));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5c293b){const _0x2efbf6=[];for(const _0x41a30f of this['activeUIs']){(0x0,this['uisData']['get'](_0x41a30f)['filter'])(_0x5c293b)&&_0x2efbf6['push'](_0x41a30f);}if(_0x2efbf6['length']>0x1)throw new _0x4e692d('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2efbf6,'annotationType':_0x5c293b['type']});}}const wi=/* #__PURE__ -- @preserve */
32
+ _0x9eb1bb('px');class _i extends _0x3b6e1d{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x20ecab){super(_0x20ecab);const _0x2469d4=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 _0x14b748(),this['focusCycler']=new _0x20e079({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2469d4['to']('class')],'style':{'minHeight':_0x2469d4['to']('minHeight',_0x56228a=>'number'==typeof _0x56228a?wi(_0x56228a+0xa):null)},'dir':_0x20ecab['uiLanguageDirection'],'role':'application','aria-label':bt(_0x20ecab,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x20ecab,'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',_0x188e5a=>{this['_updateItemPositionInFocusables'](_0x188e5a['source']);}),this['list']['forEach'](_0x406b54=>{this['focusTracker']['add'](_0x406b54['element']),this['_updateItemPositionInFocusables'](_0x406b54);}),this['list']['on']('change',(_0x2cd357,_0x253209)=>{for(const _0x799b3f of _0x253209['removed'])this['focusTracker']['remove'](_0x799b3f['element']),this['focusables']['remove'](_0x799b3f);for(const _0x190470 of _0x253209['added'])this['focusTracker']['add'](_0x190470['element']),this['_updateItemPositionInFocusables'](_0x190470);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x50aeb5){const _0xa8ec43=this['focusables']['getIndex'](_0x50aeb5);let _0x9f6c46,_0x3f28f2;for(const _0x3dfc09 of this['focusables'])if(_0x50aeb5['top']<_0x3dfc09['top']){_0x9f6c46=_0x3dfc09;break;}if(_0x3f28f2=_0x9f6c46?this['focusables']['getIndex'](_0x9f6c46):this['focusables']['length'],-0x1!==_0xa8ec43){if(_0xa8ec43===_0x3f28f2-0x1)return;this['focusables']['remove'](_0x50aeb5),_0x3f28f2=_0x9f6c46?this['focusables']['getIndex'](_0x9f6c46):this['focusables']['length'];}this['focusables']['add'](_0x50aeb5,_0x3f28f2);}}const gi=/* #__PURE__ -- @preserve */
33
+ _0x9eb1bb('px');class Ai extends _0x3b6e1d{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5bb204){super(_0x5bb204),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0xcbe195,_0x16c6a3)=>_0xcbe195+_0x16c6a3),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x29f457=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x29f457['to']('isAnimationDisabled',_0x3813d4=>_0x3813d4?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x29f457['to']('top',_0x4949f9=>gi(_0x4949f9))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x525869=this['element']['clientHeight'];_0x525869&&(this['height']=_0x525869);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x43feeb{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8ded1){super(_0x8ded1),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 _0x43d1ed=this['context']['config']['get']('sidebar.container');_0x43d1ed&&this['setContainer'](_0x43d1ed);}['setContainer'](_0x1ae07d){if(!yi(_0x1ae07d))throw new _0x4e692d('sidebar-setcontainer-invalid-element');this['container']=_0x1ae07d;}['_attachToContainer']({viewClass:_0x4c8273='',spaceBetweenItems:_0x946c80=0x19}={}){if(!yi(this['container']))throw new _0x4e692d('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4c8273,this['_spaceBetweenItems']=_0x946c80;}['rearrange']({removedAnnotation:_0x5ae5d8,previousAnnotation:_0x4fac7f,nextAnnotation:_0x5d8452}){const _0x3ed9e3=this['getSidebarItemView'](_0x5ae5d8);this['view']['list']['remove'](_0x3ed9e3),this['_destroySidebarItemView'](_0x5ae5d8),_0x4fac7f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4fac7f)),_0x5d8452&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5d8452)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x45dab8,activatedAnnotation:_0x9086e,disableAnimationOnActivatedAnnotation:_0x27b605}){if(this['_activeAnnotation']=_0x9086e,_0x45dab8){_0x45dab8['isActive']=!0x1;const _0x4c3b5b=this['getSidebarItemView'](_0x45dab8);_0x4c3b5b&&_0x27b605&&(_0x4c3b5b['isAnimationDisabled']=!0x1);}if(_0x9086e){const _0xcdcb3d=this['getSidebarItemView'](_0x9086e);_0xcdcb3d&&(_0x9086e['isActive']=!0x0,_0x27b605&&(_0xcdcb3d['isAnimationDisabled']=!0x0,_0xcdcb3d['top']+=0x1),this['_alignToTargetRect'](_0xcdcb3d));}}['_detachFromContainer'](_0xa0ac6e){if(this['view']['element']['remove'](),_0xa0ac6e){for(const _0x6c266a of _0xa0ac6e)this['_destroySidebarItemView'](_0x6c266a);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x507874,_0xfeb7d6){_0xfeb7d6||(_0xfeb7d6=_0x507874['view']);const _0x5c9b6c=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5c9b6c,_0x507874),this['_annotationToSidebarItemView']['set'](_0x507874,_0x5c9b6c),_0x5c9b6c['content']['add'](_0xfeb7d6),this['listenTo'](_0x507874['view'],'change:targetRect',(_0x4f436c,_0x121fc4,_0x24395d)=>{const _0x2b1ef4=this['_getTargetTop'](_0x507874,_0x24395d);_0x5c9b6c['_targetTop']!=_0x2b1ef4&&(_0x5c9b6c['_targetTop']=_0x2b1ef4,this['_setItemTop'](_0x5c9b6c,_0x2b1ef4));}),this['listenTo'](_0x5c9b6c,'change:top',()=>{this['_recalculate'](_0x5c9b6c,'top');}),this['listenTo'](_0x5c9b6c,'change:bottom',()=>{this['_recalculate'](_0x5c9b6c,'bottom');}),this['_alignToTargetRect'](_0x5c9b6c);const _0x3e6e81=this['_getItemBefore'](_0x5c9b6c);if(_0x3e6e81)this['_alignAfterItem'](_0x3e6e81,_0x5c9b6c)||this['_alignToTargetRect'](_0x5c9b6c);else this['_alignToTargetRect'](_0x5c9b6c);return this['_updateLastItem'](),this['view']['list']['add'](_0x5c9b6c),_0x5c9b6c;}['_alignForTopChange'](_0x693ebc){if(!_0x693ebc['content']['length'])return;const _0x16c294=this['_getItemBefore'](_0x693ebc);if(!_0x16c294)return;const _0x3b886a=this['_sidebarItemViewToAnnotation']['get'](_0x16c294),_0x43dd70=this['_activeAnnotation'];_0x43dd70&&_0x43dd70===_0x3b886a?this['_alignAfterItem'](_0x16c294,_0x693ebc):this['_alignBeforeItem'](_0x693ebc,_0x16c294);}['_alignForBottomChange'](_0x3542b4){if(!_0x3542b4['content']['length'])return;const _0x37bb6a=this['_getItemAfter'](_0x3542b4);if(!_0x37bb6a)return;const _0xef445a=this['_sidebarItemViewToAnnotation']['get'](_0x37bb6a),_0x927751=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3a4bd7=this['_activeAnnotation'];_0x3a4bd7&&_0x3a4bd7===_0xef445a&&_0x927751?(this['_alignBeforeItem'](_0x37bb6a,_0x3542b4),this['_alignAfterItem'](_0x3542b4,_0x37bb6a)):_0x3a4bd7&&_0x3a4bd7===_0xef445a?this['_alignBeforeItem'](_0x37bb6a,_0x3542b4):this['_alignAfterItem'](_0x3542b4,_0x37bb6a);}['_recalculate'](_0x523026,_0x17ced6){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x600479,changedProp:_0x5c2a32}of this['_recalculateBuffer'])'top'===_0x5c2a32?this['_alignForTopChange'](_0x600479):this['_alignForBottomChange'](_0x600479);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x523026,'changedProp':_0x17ced6});}['getSidebarItemView'](_0x2a7788){return this['_annotationToSidebarItemView']['get'](_0x2a7788);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xe70f8f){const _0x4a366e=this['getSidebarItemView'](_0xe70f8f);this['stopListening'](_0x4a366e),this['stopListening'](_0xe70f8f['view']),_0x4a366e['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xe70f8f),this['_sidebarItemViewToAnnotation']['delete'](_0x4a366e);}['_createSidebarView'](){const _0x1c10ec=new _i(this['context']['locale']);return _0x1c10ec['render'](),this['on']('change:_lastItem',(_0x10571c,_0x4fb518,_0x18e9fd,_0xbd4645)=>{_0xbd4645&&_0x1c10ec['unbind']('minHeight'),_0x18e9fd?_0x1c10ec['bind']('minHeight')['to'](_0x18e9fd,'bottom'):_0x1c10ec['minHeight']=null;}),_0x1c10ec;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4dcecb){const _0x5c8efb=this['_sidebarItemViewToAnnotation']['get'](_0x4dcecb),_0x141f95=_0x5c8efb&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5c8efb)-0x1);return _0x141f95&&this['getSidebarItemView'](_0x141f95)||null;}['_getItemAfter'](_0x57cc01){const _0x19558c=this['_sidebarItemViewToAnnotation']['get'](_0x57cc01),_0x4125d8=_0x19558c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x19558c)+0x1);return _0x4125d8&&this['getSidebarItemView'](_0x4125d8)||null;}['_alignBeforeItem'](_0x56ad87,_0x59db63){_0x56ad87['updateHeight']();const _0x38037e=vi(_0x59db63['bottom']+this['_spaceBetweenItems'],_0x56ad87['top']);return!!_0x38037e&&(this['_setItemTop'](_0x59db63,_0x59db63['top']-_0x38037e),!0x0);}['_alignAfterItem'](_0xe075e,_0x466082){_0xe075e['updateHeight']();const _0x3ee723=vi(_0xe075e['bottom']+this['_spaceBetweenItems'],_0x466082['top']);return!!_0x3ee723&&(this['_setItemTop'](_0x466082,_0x466082['top']+_0x3ee723,!0x1),!0x0);}['_alignToTargetRect'](_0x20a871){const _0x181284=this['_sidebarItemViewToAnnotation']['get'](_0x20a871);if(!_0x181284||!_0x181284['target']||!_0x181284['targetRect'])return;const _0xaafd34=this['_getTargetTop'](_0x181284,_0x181284['targetRect']);this['_setItemTop'](_0x20a871,_0xaafd34);}['_getTargetTop'](_0x1097b7,_0x90dcd4){if(null===_0x90dcd4)return 0x0;if(_0x1097b7['target']instanceof _0x3d2807)return _0x90dcd4['top'];{const _0x419526=new _0x3d2807(this['view']['element'])['top'];return _0x90dcd4['top']-_0x419526;}}['_setItemTop'](_0x22dbfc,_0x1cafe4,_0x39dde6=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x39dde6&&(_0x1cafe4=Math['max'](_0x1cafe4,this['_getMaxAvailableTop'](_0x22dbfc))),_0x22dbfc['top']=_0x1cafe4;}['_getMaxAvailableTop'](_0xf2d659){let _0x12adb7=this['_getItemBefore'](_0xf2d659),_0x51ce32=0x0;for(;_0x12adb7;)_0x12adb7['updateHeight'](),_0x51ce32+=this['_spaceBetweenItems']+_0x12adb7['height'],_0x12adb7=this['_getItemBefore'](_0x12adb7);return _0x51ce32;}}function vi(_0x43ad4c,_0x3fb219){return Math['max'](_0x43ad4c-_0x3fb219,0x0);}function yi(_0x141959){return null!==_0x141959&&'object'==typeof _0x141959&&0x1===_0x141959['nodeType'];}class Ci extends _0x43feeb{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19a69f){super(_0x19a69f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3c06fe(),this['_refreshPositioningDebounced']=_0x33fa85(()=>{_0x19a69f['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x12272c=this['context']['plugins']['get'](pi),_0x50be7f=this['context']['plugins']['get'](Ti);_0x12272c['register']('wideSidebar',this),_0x50be7f['container']&&_0x12272c['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x69441c){if(_0x69441c===this['activeAnnotation'])return;const _0x495202=this['context']['plugins']['get'](Ti);_0x495202['_activeAnnotation']=_0x69441c;const _0x3c0026=this['activeAnnotation'];_0x495202['refresh']({'blurredAnnotation':_0x3c0026,'activatedAnnotation':_0x69441c}),this['activeAnnotation']=_0x69441c;}['attach'](_0x5a4b1e){this['annotations']=_0x5a4b1e;const _0x59fe27=this['context']['plugins']['get'](Ti);if(_0x59fe27['_annotations']=_0x5a4b1e,this['isAttached'])throw new _0x4e692d('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x59fe27,'set:container',()=>{this['detach'](),this['listenTo'](_0x59fe27,'change:container',_0x54be69=>{_0x54be69['off'](),this['attach'](_0x5a4b1e);});}),_0x59fe27['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x282134=_0x3e6804=>{_0x3e6804['updateTargetRect'](),_0x59fe27['addAnnotation'](_0x3e6804);};for(const _0x683043 of _0x5a4b1e)_0x282134(_0x683043);this['listenTo'](_0x5a4b1e,'add',(_0x48412e,_0x1175ba)=>{_0x282134(_0x1175ba);}),this['listenTo'](_0x5a4b1e,'remove',(_0x1883db,_0x523dc5,_0x243ba3)=>{_0x59fe27['rearrange']({'removedAnnotation':_0x523dc5,'previousAnnotation':_0x5a4b1e['get'](_0x243ba3-0x1),'nextAnnotation':_0x5a4b1e['get'](_0x243ba3+0x1)}),_0x523dc5===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5a4b1e,'focus',(_0x19d2fb,_0x5e6481)=>{this['setActiveAnnotation'](_0x5e6481);}),this['listenTo'](_0x5a4b1e,'blur',()=>{this['setActiveAnnotation'](null);});const _0x155a29=this['context']instanceof _0x1d9a04?this['context']['editors']:new _0x3c06fe([this['context']]);for(const _0x300035 of _0x155a29)this['_integrateWithEditorAnnotations'](_0x300035);this['listenTo'](_0x155a29,'add',(_0x351fe3,_0x40e47d)=>{this['listenTo'](_0x40e47d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x40e47d);});}),this['listenTo'](_0x155a29,'remove',(_0xe12c91,_0x311297)=>{_0x311297['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x311297['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4e692d('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1c08cc=this['context']['plugins']['get'](Ti);_0x1c08cc['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1c08cc),this['stopListening'](this['annotations']),this['context']instanceof _0x1d9a04&&this['stopListening'](this['context']['editors']);for(const _0x29ed16 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x29ed16);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4b7ba5){if(!_0x4b7ba5['plugins']['has']('EditorAnnotations'))return;const _0x3bf39b=_0x4b7ba5['plugins']['get']('EditorAnnotations'),_0x72fac0=()=>{const _0x33aba6=_0x3bf39b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x33aba6[0x0]||null);};this['listenTo'](_0x3bf39b,'refresh',_0x72fac0),this['listenTo'](_0x3bf39b,'blur',(_0x21c3a2,{isAnnotationTracked:_0x137170})=>{this['activeAnnotation']&&_0x137170(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3bf39b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2f7684=>{_0x3bf39b['hasDomSelection']()&&(_0x72fac0(),_0x2f7684['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3bf39b);}['_destroyEditorAnnotationsIntegration'](_0x20a11b){this['stopListening'](_0x20a11b),this['_editorAnnotations']['remove'](_0x20a11b);}}class Ii extends _0x29997a{['counterView'];constructor(_0x146bef){super(_0x146bef);const _0x24fd6a=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4f65ba,_0x551c3a)=>_0x4f65ba?'...':_0x551c3a['toString']()),this['set']('annotationType',''),this['icon']=_0x27acc3,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x3b6e1d(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x24fd6a['to']('annotationType',_0x269f88=>'ck-annotation-counter__badge--'+_0x269f88),_0x24fd6a['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x24fd6a['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x43feeb{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d84ba){super(_0x5d84ba),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x5249fd())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3c06fe(),this['_refreshPositioningDebounced']=_0x33fa85(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x17d0b4){this['annotations']=_0x17d0b4;const _0x38cd2b=this['context']['plugins']['get'](Ti),_0x3ddbcf=this['balloonPanelView'];if(_0x38cd2b['_annotations']=_0x17d0b4,this['isAttached'])throw new _0x4e692d('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x38cd2b,'set:container',()=>{this['detach'](),this['listenTo'](_0x38cd2b,'change:container',_0x588360=>{_0x588360['off'](),this['attach'](_0x17d0b4);});}),_0x38cd2b['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x28b34b=_0xd82915=>{const _0x241710=new Ii(this['context']['locale']);_0x38cd2b['addAnnotation'](_0xd82915,_0x241710),this['_annotationToNarrowView']['set'](_0xd82915,_0x241710),_0x241710['bind']('isDirty','annotationType','number')['to'](_0xd82915['view'],'isDirty','type','length'),_0x241710['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3ddbcf['content']['first']!==_0xd82915['view']?(this['_showBalloon'](_0xd82915),_0xd82915['view']['element']['focus'](),this['setActiveAnnotation'](_0xd82915)):this['setActiveAnnotation'](null);});};for(const _0x5c3486 of _0x17d0b4)_0x28b34b(_0x5c3486);this['listenTo'](_0x17d0b4,'add',(_0x58f061,_0x56a2e8)=>{_0x28b34b(_0x56a2e8);}),this['listenTo'](_0x17d0b4,'remove',(_0x2ed15a,_0x21e51e,_0x185df8)=>{this['_annotationToNarrowView']['get'](_0x21e51e)['destroy'](),this['_annotationToNarrowView']['delete'](_0x21e51e),_0x38cd2b['rearrange']({'removedAnnotation':_0x21e51e,'previousAnnotation':_0x17d0b4['get'](_0x185df8-0x1),'nextAnnotation':_0x17d0b4['get'](_0x185df8+0x1)}),_0x21e51e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x17d0b4,'focus',(_0x10729f,_0x357fff)=>{this['setActiveAnnotation'](_0x357fff);}),this['listenTo'](_0x17d0b4,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x348447,_0x4afc00)=>{_0x4afc00['keyCode']===_0x2db36d['esc']&&_0x3ddbcf['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3ddbcf['content']['first']),this['_hideBalloon'](),_0x4afc00['stopPropagation'](),_0x4afc00['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x471960,_0x231a8f)=>{const _0x400d8a=_0x231a8f['target'];_0x3ddbcf['isVisible']&&_0x3ddbcf['element']['contains'](_0x400d8a)||_0x38cd2b['view']['element']['contains'](_0x400d8a)||_0x471960['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x284899=>_0x284899['contains'](_0x400d8a))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1e5824=this['context']instanceof _0x1d9a04?this['context']['editors']:new _0x3c06fe([this['context']]);for(const _0x2cfce8 of _0x1e5824)this['_integrateWithEditorAnnotations'](_0x2cfce8);this['listenTo'](_0x1e5824,'add',(_0x13cad6,_0x18bf79)=>{this['listenTo'](_0x18bf79,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x18bf79);});}),this['listenTo'](_0x1e5824,'remove',(_0xb13890,_0x4df427)=>{_0x4df427['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4df427['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4d6866){if(_0x4d6866===this['activeAnnotation'])return;const _0x2151f2=this['context']['plugins']['get'](Ti);if(_0x2151f2['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4d6866,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4d6866)_0x2151f2['getSidebarItemView'](_0x4d6866)?this['_showBalloon'](_0x4d6866):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4d6866;}['detach'](){if(!this['isAttached'])throw new _0x4e692d('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1c5f6d=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5f494c=>_0x5f494c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1c5f6d['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1d9a04&&this['stopListening'](this['context']['editors']);for(const _0x525f5d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x525f5d);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'](_0x151d25){if(!_0x151d25['plugins']['has']('EditorAnnotations'))return;const _0x21672e=_0x151d25['plugins']['get']('EditorAnnotations'),_0x252958=this['context']['plugins']['get'](Ti),_0x42903f=this['annotations'],_0x4641de=this['balloonPanelView'],_0x2ad1cd=()=>{const _0x5879ea=_0x21672e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x5879ea),this['setActiveAnnotation'](_0x5879ea[0x0]||null);};this['listenTo'](_0x21672e,'refresh',_0x2ad1cd),this['listenTo'](_0x21672e,'blur',(_0x5f0803,{isAnnotationTracked:_0x3c7ffd})=>{this['activeAnnotation']&&_0x3c7ffd(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x21672e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x42903f,'blur',_0x323684=>{_0x21672e['hasDomSelection']()&&_0x323684['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x25aa10,_0x38994a)=>{const _0x4e61ae=_0x38994a['target'];_0x4641de['isVisible']&&_0x4641de['element']['contains'](_0x4e61ae)||_0x252958['view']['element']['contains'](_0x4e61ae)||this['activeAnnotation']&&_0x21672e['hasDomSelection']()&&(_0x2ad1cd(),_0x25aa10['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x21672e);}['_destroyEditorAnnotationsIntegration'](_0x87d8fd){_0x87d8fd&&(this['stopListening'](_0x87d8fd),this['_editorAnnotations']['remove'](_0x87d8fd));}['_setSelectedAnnotations'](_0x42fce0){for(const _0x2f4ee1 of this['_selectedAnnotations'])_0x42fce0['includes'](_0x2f4ee1)||this['_manuallyClosedAnnotationViews']['delete'](_0x2f4ee1['view']);this['_selectedAnnotations']=_0x42fce0;}['_refreshPositioning'](){const _0x4f3954=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4f3954['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x486839){if(this['_manuallyClosedAnnotationViews']['has'](_0x486839['view']))return;const _0x52fb03=this['balloonPanelView']['content']['first'];_0x52fb03!==_0x486839['view']?(_0x52fb03&&this['_detachListeners'](_0x52fb03),this['_attachListeners'](_0x486839['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x486839['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3380b0=this['balloonPanelView']['content']['first'],_0x276712=_0x3380b0&&this['annotations']['getByView'](_0x3380b0);if(!_0x276712||!this['_annotationToNarrowView']['has'](_0x276712))return;const _0xf44e67=this['_annotationToNarrowView']['get'](_0x276712)['element'],_0x475dfa=(function(){const _0x2949ea=ht['defaultPositions'];return[_0x2949ea['southArrowNorthEast'],_0x2949ea['northArrowSouthEast'],_0x2949ea['southArrowNorth'],_0x2949ea['northArrowSouth'],_0x2949ea['southArrowNorthWest'],_0x2949ea['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xf44e67,'positions':_0x475dfa});}['_hideBalloon'](){const _0xbd59e3=this['balloonPanelView'],_0x539878=_0xbd59e3['content']['first'];_0x539878&&(this['_detachListeners'](_0x539878),_0xbd59e3['unpin'](),_0xbd59e3['content']['clear']());}['_attachListeners'](_0x2d5ec6){this['listenTo'](_0x2d5ec6,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2d5ec6,'Esc',(_0x59f019,_0x55427e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2d5ec6),this['_hideBalloon'](),_0x55427e();});}['_detachListeners'](_0x39a664){this['stopListening'](_0x39a664);}}class Ei extends _0x12ccca{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xc24edd){super(_0xc24edd),_0xc24edd['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xc24edd['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x33fa85(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x127f16=this['editor']['plugins']['get'](pi);_0x127f16['context']===this['editor']&&(_0x127f16['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4c16a2,_0x518ca0)=>{const _0x29d406=this['_balloon'];if(this['isAttached']&&_0x29d406['visibleView']){const _0x46f708=this['annotations']['getByView'](_0x29d406['visibleView']);_0x46f708&&this['_closeAnnotation'](_0x46f708),_0x518ca0();}}));}['afterInit'](){const _0x3fb828=this['editor']['plugins']['get'](pi);_0x3fb828['context']===this['editor']&&(_0x3fb828['hasActive']()||_0x3fb828['switchTo']('inline'));}['setActiveAnnotation'](_0x48b061){_0x48b061!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x48b061&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x48b061)&&this['_addAnnotationToBalloon'](_0x48b061,!0x0),_0x48b061['isActive']=!0x0),_0x48b061||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x48b061);}['attach'](_0x6e9890){this['annotations']=_0x6e9890;const _0x357365=this['editor']['plugins']['get'](pi),_0x4a71bf=this['_balloon'];if(this['isAttached'])throw new _0x4e692d('inlineannotations-attach-already-attached',this);if(_0x357365['context']!==this['editor'])throw new _0x4e692d('inlineannotations-not-allowed-with-context',this);const _0xdf6e57=this['editor']['plugins']['get'](si);this['listenTo'](_0xdf6e57,'refresh',()=>{const _0xa4cd77=_0xdf6e57['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5329ab,_0x3f6c2b;!this['_forceRefresh']&&(_0x5329ab=_0xa4cd77,_0x3f6c2b=this['_selectedAnnotations'],_0x5329ab['length']===_0x3f6c2b['length']&&_0x5329ab['every'](_0x407312=>_0x3f6c2b['includes'](_0x407312)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xa4cd77),this['setActiveAnnotation'](_0xa4cd77[0x0]||null));}),this['listenTo'](_0xdf6e57,'blur',(_0x176eed,{isAnnotationTracked:_0x5ac68f})=>{this['activeAnnotation']&&_0x5ac68f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xdf6e57,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x667567,_0x2ed0e2,_0x2f4692)=>{_0x2f4692||this['setActiveAnnotation'](null);}),this['listenTo'](_0x6e9890,'remove',(_0x2e0d8e,_0x106f79)=>{this['_removeAnnotationFromBalloon'](_0x106f79),_0x106f79===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4a71bf,'change:visibleView',(_0x3f3b7c,_0x3d877b,_0x444474,_0xacaab4)=>{_0xacaab4&&this['stopListening'](_0xacaab4);const _0x239284=_0x6e9890['getByView'](_0x444474);_0x444474&&_0x239284&&(this['listenTo'](_0x444474,'change:height',()=>{_0x4a71bf['updatePosition']();}),this['listenTo'](_0x444474,'Esc',()=>{this['_closeAnnotation'](_0x239284),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x239284&&this['setActiveAnnotation'](_0x239284));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4a71bf['visibleView']&&(_0x6e9890['getByView'](_0x4a71bf['visibleView'])&&_0x4a71bf['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 _0x4e692d('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x41b3bb of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x41b3bb);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x1832cb){for(const _0x47ea91 of this['_selectedAnnotations'])_0x1832cb['includes'](_0x47ea91)||this['_manuallyClosed']['delete'](_0x47ea91);for(const _0xb3c8a3 of this['annotations'])_0x1832cb['includes'](_0xb3c8a3)||this['_removeAnnotationFromBalloon'](_0xb3c8a3);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5b89d8 of _0x1832cb)this['_addAnnotationToBalloon'](_0x5b89d8);}this['_selectedAnnotations']=_0x1832cb;}['_addAnnotationToBalloon'](_0x1febc0,_0xdf2976=!0x1){this['_manuallyClosed']['has'](_0x1febc0)||(this['_addedAnnotations']['has'](_0x1febc0)||this['_balloon']['hasView'](_0x1febc0['view'])||(this['_addedAnnotations']['add'](_0x1febc0),this['_balloon']['add']({'stackId':_0x1febc0['view']['id'],'view':_0x1febc0['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1febc0)}})),_0xdf2976&&this['_balloon']['showStack'](_0x1febc0['view']['id']));}['_getBalloonTargetForAnnotation'](_0x9a725f){const _0xd02d4e=_0x9a725f['target'],_0x2efe56=this['editor']['editing']['view'],_0x259a5d=_0x2efe56['document']['selection']['getFirstRange'](),_0x5751b0=_0x2efe56['domConverter']['viewRangeToDom'](_0x259a5d);if(_0x5751b0['collapse'](!0x0),_0xd02d4e){if(_0xd02d4e instanceof _0x3d2807)return _0xd02d4e;let _0x3889ee=[];for(const _0x4963f0 of _0xd02d4e)_0x3889ee['push'](..._0x3d2807['getDomElementRects'](_0x4963f0));_0x3889ee=function(_0x168e3c){const _0x49bb66=[];let _0x48b943=_0x168e3c[0x0];for(let _0x25ea58=0x1;_0x25ea58<_0x168e3c['length'];_0x25ea58++)if(Ni(_0x48b943,_0x168e3c[_0x25ea58])){const _0x1b72c6=_0x168e3c[_0x25ea58]['width'];_0x48b943['width']+=_0x1b72c6,_0x48b943['right']+=_0x1b72c6;}else _0x49bb66['push'](_0x48b943),_0x48b943=_0x168e3c[_0x25ea58];return _0x49bb66['push'](_0x48b943),_0x49bb66;}(_0x3889ee);const _0x424aff=_0x5751b0['getBoundingClientRect']();return _0x3889ee['find'](_0x3b47ef=>_0x3b47ef['top']<=_0x424aff['top']&&_0x3b47ef['bottom']>=_0x424aff['bottom']&&_0x3b47ef['left']<=_0x424aff['left']&&_0x3b47ef['right']>=_0x424aff['right'])||_0x3889ee[0x0];}return _0x9a725f['targetRect']||_0x5751b0;}['_removeAnnotationFromBalloon'](_0x4927ed){this['_addedAnnotations']['has'](_0x4927ed)&&this['_balloon']['hasView'](_0x4927ed['view'])&&(this['_addedAnnotations']['delete'](_0x4927ed),this['_balloon']['remove'](_0x4927ed['view']));}['_closeAnnotation'](_0x288c77){this['_manuallyClosed']['add'](_0x288c77),this['_removeAnnotationFromBalloon'](_0x288c77);}}function Ni(_0x42d06b,_0x216f20){return _0x42d06b['top']===_0x216f20['top']&&_0x42d06b['bottom']===_0x216f20['bottom']&&_0x42d06b['right']===_0x216f20['left'];}class ki extends _0x3b6e1d{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1a99cf,_0x545ff1){super(_0x1a99cf),this['set']('isEmpty',!_0x545ff1['length']),this['focusTracker']=new _0x14b748(),this['_annotationViews']=_0x545ff1,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x20e079({'focusables':_0x545ff1,'focusTracker':this['focusTracker']}),this['listenTo'](_0x545ff1,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x545ff1,'remove',(_0x124b04,_0x2060a9)=>{_0x2060a9['isActive']&&this['focus'](),_0x545ff1['length']||(this['isEmpty']=!0x0);});const _0x2df78b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x1a99cf,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x545ff1},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2df78b['if']('isEmpty','ck-hidden',_0x1a4e94=>!_0x1a4e94)]},'children':[{'text':bt(_0x1a99cf,'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 _0x4f0246 of this['_annotationViews'])this['focusTracker']['add'](_0x4f0246['element']);this['_annotationViews']['on']('change',(_0x364a4b,{added:_0x22bd40,removed:_0x49fe40})=>{for(const _0x3216ab of _0x22bd40)this['focusTracker']['add'](_0x3216ab['element']);for(const _0x2ad729 of _0x49fe40)this['focusTracker']['remove'](_0x2ad729['element']);});}}class Oi extends _0x43feeb{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x78359){super(_0x78359),this['archivedThreads']=new _0x3c06fe();}['init'](){const _0x1ae675=this['context'],_0x4b5b03=_0x1ae675['plugins']['get'](Qt),_0x32bc57=_0x1ae675['plugins']['get']($t);this['listenTo'](_0x4b5b03,'addCommentThread',(_0x62f6e9,{threadId:_0x2a9136})=>{const _0x1ad665=_0x4b5b03['getCommentThread'](_0x2a9136);_0x1ad665['archivedAt']&&this['archivedThreads']['add'](_0x1ad665,this['_calculatePosition'](_0x1ad665['archivedAt'])),this['listenTo'](_0x1ad665,'change:archivedAt',(_0x2a25f2,_0x3c3095,_0xb3c1cb)=>{_0xb3c1cb?this['archivedThreads']['has'](_0x1ad665)||this['archivedThreads']['add'](_0x1ad665,this['_calculatePosition'](_0x1ad665['archivedAt'])):this['archivedThreads']['has'](_0x1ad665)&&this['archivedThreads']['remove'](_0x1ad665);});}),this['listenTo'](_0x4b5b03,'removeCommentThread',(_0x53ecfb,{threadId:_0x2e9ad7})=>{const _0x3ee13e=_0x4b5b03['getCommentThread'](_0x2e9ad7);this['stopListening'](_0x3ee13e),this['archivedThreads']['has'](_0x3ee13e)&&this['archivedThreads']['remove'](_0x3ee13e);},{'priority':'highest'}),this['listenTo'](_0x32bc57['collection'],'focus',(_0x78d4a4,_0x12fb6b)=>{_0x12fb6b['isVisible']||(_0x12fb6b['isActive']=!0x0,_0x32bc57['activate'](_0x12fb6b));});}['_calculatePosition'](_0x58e0c7){const _0x45217f=[...this['archivedThreads']]['findIndex'](_0x1952bf=>_0x1952bf['archivedAt']<_0x58e0c7);return _0x45217f>-0x1?_0x45217f:this['archivedThreads']['length'];}}class Mi extends _0x12ccca{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x3369ec){super(_0x3369ec),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x3ded9d=this['editor'],_0x187575=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3ded9d['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x29997a,!0x0)),_0x3ded9d['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x22554e=this['_createCommentsArchiveButton'](ot);return _0x22554e['set']({'role':'menuitemcheckbox'}),_0x22554e;});const _0x1b2233=_0x3ded9d['plugins']['get'](Oi),_0x3441c6=_0x3ded9d['plugins']['get']('Annotations'),_0x335971=_0x3ded9d['plugins']['get']('CommentsRepository');_0x1b2233['archivedThreads']['forEach'](_0x35e12a=>{this['_handleNewThread'](_0x35e12a);}),this['listenTo'](_0x1b2233['archivedThreads'],'add',(_0x41c69e,_0x4437b6)=>{this['_handleNewThread'](_0x4437b6);}),this['listenTo'](_0x3441c6['collection'],'add',(_0x5a0502,_0x4c4daf)=>{const _0xe6b42=this['_pendingThreads']['find'](_0x30ebc0=>{const _0x334224=_0x335971['_threadToController']['get'](_0x30ebc0);return _0x334224&&_0x4c4daf['innerView']===_0x334224['view'];});if(_0xe6b42){const _0x5b89e8=this['_calculatePosition'](_0xe6b42['archivedAt']);this['_addAnnotationToArchive'](_0x4c4daf,_0x5b89e8),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xe6b42),0x1);}}),this['listenTo'](_0x1b2233['archivedThreads'],'remove',(_0x2d40af,_0x4efe9a)=>{const _0x297078=_0x3ded9d['config']['get']('collaboration.channelId');if(!_0x297078||_0x4efe9a['channelId']===_0x297078){if(this['_pendingThreads']['includes'](_0x4efe9a))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4efe9a),0x1);else{const _0x1a6ce5=_0x335971['_threadToController']['get'](_0x4efe9a),_0x4115b8=_0x3441c6['getByInnerView'](_0x1a6ce5['view']);this['annotationViews']['remove'](_0x4115b8['view']),this['stopListening'](_0x4115b8),this['stopListening'](_0x4115b8['focusableElements']);}}}),this['listenTo'](_0x3441c6['collection'],'add',(_0x1cfe84,_0x1f8575)=>{this['listenTo'](_0x1f8575,'escape',_0x187575);}),this['listenTo'](_0x3441c6['collection'],'remove',(_0x14f0d0,_0x3a3751)=>{this['stopListening'](_0x3a3751,'escape',_0x187575);});}['_addAnnotationToArchive'](_0x368a03,_0xee489d){this['listenTo'](_0x368a03,'set:isVisible',_0x104359=>{_0x104359['return']=!0x1,_0x104359['stop']();}),this['annotationViews']['add'](_0x368a03['view'],_0xee489d);}['_handleNewThread'](_0x332577){const _0x347233=this['editor']['plugins']['get']('CommentsRepository'),_0x558d01=this['editor']['plugins']['get']('Annotations'),_0xe512aa=this['editor']['config']['get']('collaboration.channelId');if(!_0xe512aa||_0x332577['channelId']===_0xe512aa){const _0xb27048=_0x347233['_threadToController']['get'](_0x332577);if(!_0xb27048)return void this['_pendingThreads']['push'](_0x332577);const _0x87e8b4=this['_calculatePosition'](_0x332577['archivedAt']),_0x2c0293=_0x558d01['getByInnerView'](_0xb27048['view']);_0x2c0293['isVisible']&&_0x558d01['_visibleAnnotations']['remove'](_0x2c0293),this['_addAnnotationToArchive'](_0x2c0293,_0x87e8b4);}}['_calculatePosition'](_0x7e4023){const _0x5ac3ba=this['editor']['config']['get']('collaboration.channelId'),_0x20289b=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x486409=>_0x486409['channelId']===_0x5ac3ba)['findIndex'](_0x4d846a=>_0x4d846a['archivedAt']<_0x7e4023);return _0x20289b<0x0||_0x20289b>this['annotationViews']['length']?this['annotationViews']['length']:_0x20289b-0x1;}['_toggleDialog'](){const _0x45e471=this['editor'],_0x15f8da=_0x45e471['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x45e471['locale'],this['annotationViews'])),'commentsArchive'===_0x15f8da['id']?_0x15f8da['hide']():_0x15f8da['show']({'id':'commentsArchive','title':bt(_0x45e471['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4408eb,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x12e496,_0x2d5b3d=!0x1){const _0x4438ac=this['editor']['locale'],_0x252c6b=this['editor']['plugins']['get']('Dialog'),_0x33ac59=new _0x12e496(_0x4438ac);return _0x33ac59['bind']('isEnabled')['to'](this,'isEnabled'),_0x33ac59['bind']('isOn')['to'](_0x252c6b,'id',_0x879df7=>'commentsArchive'===_0x879df7),_0x33ac59['set']({'label':bt(_0x4438ac,'COMMENTS_ARCHIVE'),'icon':_0x4408eb,'isToggleable':!0x0}),_0x2d5b3d&&(_0x33ac59['tooltip']=!0x0),this['listenTo'](_0x33ac59,'execute',()=>this['_toggleDialog']()),_0x33ac59;}['_hideDialogOnAnnotationEscape']=_0x12869f=>{const _0x4d0512=_0x12869f['source'];if(!this['annotationViews']['has'](_0x4d0512['view']))return;const _0x484bfe=this['editor']['plugins']['get']('Dialog');_0x484bfe['isOpen']&&'commentsArchive'===_0x484bfe['id']&&(_0x484bfe['hide'](),_0x12869f['stop']());};}class Ri extends _0x12ccca{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};