@ckeditor/ckeditor5-comments 45.2.0-alpha.1 → 45.2.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,12 +20,12 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x17bd9d,ContextPlugin as _0x2c6a5a,PendingActions as ht,Command as _0x3ea4db,Plugin as _0x3136d3,Context as _0x5e197b}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3b9dd7,uid as _0x35b95b,KeystrokeHandler as jt,FocusTracker as _0x4998e4,diff as _0x693b90,Collection as _0x2a536e,Rect as _0x5708d8,CKEditorError as _0x15c172,first as _0x5d65fb,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x13575b,keyCodes as _0x16045e}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x12c1b5,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x4bb770,trimHtml as _0x2a709c,LateFocusDropdownButtonView as _0x5b1190,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x8ce7cf}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x356c72}from'es-toolkit/compat';import{IconUndo as _0x49b621,IconCheck as _0x56bad1,IconPencil as _0x2dd1d3,IconRemoveComment as _0x5207a8,IconThreeVerticalDots as _0x376907,IconAddComment as _0x4f9c07,IconCommentsArchive as _0x380c51}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x4a5462,ButtonView as _0x501ccc,ViewCollection as _0x1614c2,createDropdown as _0x173f07,ListView as _0x4478f6,focusChildOnDropdownOpen as _0x559ecd,ListItemView as _0x80f34e,MenuBarMenuListItemButtonView as _0x1d3340,BodyCollection as _0x4f0a56,BalloonPanelView as _0x34c707,ContextualBalloon as _0xf7176a,Dialog as _0x15c150,DialogViewPosition as _0x59b2e7}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x56d6e7}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x396715}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0xe8f520}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
24
- _0x3b9dd7(){['model'];['view'];constructor(_0x221e59,_0x377146){super(),this['model']=_0x221e59,this['model']['_isAttached']=!0x0,this['view']=_0x377146,this['listenTo'](_0x377146,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x377146,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x377146,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x377146,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x377146,'addComment',(_0x38693b,_0x2ead4b)=>this['addComment'](_0x2ead4b)),this['listenTo'](_0x377146,'updateComment',(_0x235741,_0x4a397c,_0x5849ce)=>this['updateComment'](_0x4a397c,_0x5849ce)),this['listenTo'](_0x377146,'removeComment',(_0x591234,_0x36ec4e)=>this['removeComment'](_0x36ec4e));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x29f1c7){this['model']['addComment']({'content':_0x29f1c7,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x24f30f,_0x3c63cc){this['model']['getComment'](_0x24f30f)['update']({'content':_0x3c63cc});}['removeComment'](_0x1d29c3){this['model']['getComment'](_0x1d29c3)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x2108e7,_0x581cc5,_0x502831){const t=_0x2108e7['t'];switch(_0x581cc5){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'},_0x502831);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'},_0x502831);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'},_0x502831);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'},_0x502831);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x502831);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'},_0x502831);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'},_0x502831);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'},_0x502831);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 Ut extends Vt{['main'];['editable'];constructor(_0x210e2d,_0x4547a2){super(_0x210e2d);const _0x21a24e=_0x35b95b();this['main']=this['createCollection'](),this['editable']=new $t(_0x210e2d,_0x4547a2,void 0x0,{'label':()=>E(_0x210e2d,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x210e2d['uiLanguageDirection'],'lang':_0x210e2d['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x21a24e},'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 Ot extends Rt{['view'];constructor(_0x1b9ec0){super(_0x1b9ec0),this['view']=new Ut(_0x1b9ec0['locale'],_0x1b9ec0['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x30214f=this['editor']['editing']['view'],_0x193eb0=this['view']['editable'],_0x3c4c98=_0x30214f['document']['getRoot']();_0x193eb0['name']=_0x3c4c98['rootName'],this['view']['render']();const _0x5a9e6a=_0x193eb0['element'];this['setEditableElement'](_0x193eb0['name'],_0x5a9e6a),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x30214f['attachDomRoot'](_0x5a9e6a),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
25
- _0x3b9dd7(_0x17bd9d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Nt)());constructor(_0x59b836={}){function _0x45d121(_0x129f80){return _0x129f80['map'](_0x1f0a7c=>String['fromCharCode'](_0x1f0a7c))['join']('');}(_0x59b836=Object['assign']({},_0x59b836))['plugins']||(_0x59b836['plugins']=Qt['defaultPlugins']),super(_0x59b836),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x45d121([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45d121([0x76,0x69,0x65,0x77])][_0x45d121([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x45d121([0x61,0x75,0x74,0x6f]),this[_0x45d121([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x45d121([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x45d121([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x45d121([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x45d121([0x6f,0x6b])});}['create'](){const _0x465509=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x465509))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x17e2ef=>{const _0x30920a=this['model']['document']['getRoot'](),_0x8099b5=_0x30920a&&_0x30920a['getChild'](_0x30920a['childCount']-0x1);_0x17e2ef['setSelection'](_0x8099b5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x28aeb4=this['editing']['view'],_0x56eb69=_0x28aeb4['document']['getRoot'](),_0x17f7db=_0x56eb69['getChild'](0x0);_0x56eb69['childCount']>0x1||!_0x17f7db||'p'!=_0x17f7db['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x28aeb4,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x17f7db['placeholder']=this['placeholder']),Ft({'view':_0x28aeb4,'element':_0x17f7db,'keepOnFocus':!0x0}),this['placeholderElement']=_0x17f7db);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2287c4,_0x19dc5c={}){super(_0x2287c4),this['editor']=null,this['_editorConfig']=_0x19dc5c,this['set']('value',_0x19dc5c['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x2287c4,'Reply...')),this['set']('submitLabel',E(_0x2287c4,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4998e4(),this['focusCycler']=new _0x4a5462({'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',(_0x28a9d4,_0x56dc30)=>{this['cancelButtonView']['fire']('execute'),_0x56dc30();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4e1ae3,_0x6aa80f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x6aa80f());}),this['on']('submit',(_0x51a747,_0x2a8ab3)=>{_0x2a8ab3['length']>0xfde8?(alert(E(_0x2287c4,'TOO_LONG_COMMENT_ALERT',[_0x2a8ab3['length'],0xfde8])),_0x51a747['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x46f15d=this['editor'];this['element']['insertBefore'](_0x46f15d['ui']['element'],this['element']['firstChild']),_0x46f15d['model']['document']['on']('change',()=>this['value']=_0x46f15d['getData']()),_0x46f15d['bind']('placeholder')['to'](this),this['focusables']['add'](_0x46f15d['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xe7b5c1){-0x1===_0xe7b5c1?(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:_0x10e004}=this,_0x27a7f8=new _0x501ccc(_0x10e004);return _0x27a7f8['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x27a7f8['withText']=!0x0,_0x27a7f8['bind']('label')['to'](this,'submitLabel'),_0x27a7f8['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x27a7f8['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2bb55b,_0x254500)=>!_0x254500&&!!_0x2bb55b['trim']()),_0x27a7f8;}['_createCancelButton'](){const {locale:_0x4ffb48}=this,_0x3726db=new _0x501ccc(_0x4ffb48);return _0x3726db['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3726db['label']=E(_0x4ffb48,'Cancel'),_0x3726db['withText']=!0x0,_0x3726db['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3726db;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5d362f=>{this['focusTracker']['add'](_0x5d362f['element']);}),this['focusables']['on']('change',(_0x461aa5,_0x2e52f1)=>{for(const _0x4df941 of Array['from'](_0x2e52f1['added'])['reverse']())this['focusTracker']['add'](_0x4df941['element']);});}}class ie extends kt{constructor(_0x3ff30c,_0x452af5,_0x508433){super(_0x3ff30c),this['commentInputView']=new os(_0x3ff30c,_0x508433),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x56ab71,_0x4d7049)=>_0x56ab71||!!_0x4d7049),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 _0x12c1b5(_0x3ff30c,_0x452af5),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'](_0xeb6952){this['commentInputView']['focus'](_0xeb6952);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x32b779,_0x4865ad)=>{const {submitButtonView:_0x1b7e7d,cancelButtonView:_0x358d4b,editor:_0x5e831a}=this['commentInputView'];[_0x1b7e7d['element'],_0x358d4b['element'],_0x5e831a?_0x5e831a['editing']['view']['getDomRoot']():null]['filter'](_0x5e1ba8=>_0x5e1ba8)['some'](_0x4b78ec=>_0x4b78ec['contains'](_0x4865ad['target']))||(this['focus'](),_0x4865ad['preventDefault']());});}}class cs extends kt{constructor(_0x522cd4){super(_0x522cd4);const _0x3b55fa=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3b55fa['to']('count',_0x333e6a=>E(_0x522cd4,'NUMBER_OF_COMMENTS',_0x333e6a))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3f2dd7,_0x381f6c,_0x3d51fd){super(_0x3f2dd7);const _0x1969b0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x381f6c['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x381f6c,this['_config']=_0x3d51fd,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a5462({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3dcdc5=>this['commentViews']['map'](_0x52a0a2=>_0x52a0a2['element'])['includes'](_0x3dcdc5['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x3f2dd7),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x13cf1d=>_0x13cf1d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x8c1dde of _0x381f6c['comments'])this['_handleNewCommentModel'](_0x8c1dde);this['_handleInfoComment'](),this['listenTo'](_0x381f6c['comments'],'add',(_0x2e07ae,_0x47f35a)=>{const _0x7096fe=this['_calculatePosition'](_0x47f35a);this['length']++,this['_handleNewCommentModel'](_0x47f35a,_0x7096fe),this['refreshVisibleViews']();}),this['listenTo'](_0x381f6c['comments'],'remove',(_0x1a4986,_0x450087)=>{this['length']--,this['_handleRemoveCommentModel'](_0x450087),this['refreshVisibleViews']();}),this['listenTo'](_0x381f6c,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x381f6c,'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',_0x1969b0['if']('length','ck-hidden',_0x268ecf=>!_0x268ecf)],'aria-label':E(_0x3f2dd7,'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'](_0x254490){-0x1===_0x254490?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2f3c52 of this['commentViews'])_0x2f3c52['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3fbe06,_0xc97f6a){const _0x1d9cb1=new this['_config']['CommentView'](this['locale'],_0x3fbe06,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1d9cb1['viewUid']=_0x3fbe06['id'],_0x1d9cb1['delegate']('removeComment')['to'](this),_0x1d9cb1['delegate']('updateComment')['to'](this),_0x1d9cb1['delegate']('resolveCommentThread')['to'](this),_0x1d9cb1['delegate']('editorReady')['to'](this),_0x1d9cb1['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1d9cb1,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1d9cb1,_0xc97f6a);}['_calculatePosition'](_0x429478){const _0x253d0c=this['_model']['_findOptimalIndex'](_0x429478);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x429478['authoredAt']?_0x253d0c-0x1:_0x253d0c:_0x253d0c-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x43fdea={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x43fdea,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x43fdea));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x918aa6){const _0x5dc428=this['commentViews']['remove'](_0x918aa6['id']);this['stopListening'](_0x5dc428),_0x5dc428['isEditMode']&&this['_updateHasDirtyComment'](),_0x5dc428['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x55d2e6=>_0x55d2e6['isEditMode']);}['_rearrangeCollapse'](){const _0x1ed489=function(_0x4b0f1d){const _0x4a620d=new _0x2a536e();for(const _0x44cc86 of _0x4b0f1d)_0x4a620d['add'](_0x44cc86);return _0x4a620d;}(this['commentViews']),_0x487ec4=this['_collapsedCommentsView']['count'];for(let _0x5b666b=0x1;_0x5b666b<=_0x487ec4;_0x5b666b++)_0x1ed489['remove'](0x1);for(const _0x142dd0 of _0x1ed489)_0x142dd0['collapse']();_0x487ec4>0x0&&_0x1ed489['add'](this['_collapsedCommentsView'],0x1),ns(_0x693b90(Array['from'](this['visibleViews']),Array['from'](_0x1ed489)),this['visibleViews'],_0x1ed489);}['_rearrangeExpand'](){ns(_0x693b90(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2a9335 of this['visibleViews'])_0x2a9335['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x32fc41=>{this['focusTracker']['add'](_0x32fc41['element']),this['keystrokes']['listenTo'](_0x32fc41['element']);}),this['commentViews']['on']('change',(_0x3acc42,_0x4a5b27)=>{for(const _0x50e322 of _0x4a5b27['removed'])this['focusTracker']['remove'](_0x50e322['element']),this['keystrokes']['stopListening'](_0x50e322['element']);for(const _0x2d8c32 of Array['from'](_0x4a5b27['added'])['reverse']())this['focusTracker']['add'](_0x2d8c32['element']),this['keystrokes']['listenTo'](_0x2d8c32['element']);});}}function ns(_0x373847,_0x22a734,_0x204cc2){let _0xd9406c=0x0;for(const _0x380b14 of _0x373847)switch(_0x380b14){case'insert':_0x22a734['add'](_0x204cc2['get'](_0xd9406c),_0xd9406c),_0xd9406c++;break;case'delete':_0x22a734['remove'](_0xd9406c);break;case'equal':_0xd9406c++;}}class as extends kt{constructor(_0xf5736b){super(_0xf5736b);const _0x1d3960=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1d3960['to']('contextValue',_0x2d83f9=>E(_0xf5736b,'THREAD_CONTEXT_LABEL',_0x2d83f9)),'tabindex':-0x1},'children':[{'text':_0x1d3960['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x238668,_0x25b669){super(_0x238668);const _0x3340b5=this['bindTemplate'];this['_model']=_0x25b669,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a5462({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xa9d99=>!!_0xa9d99),this['bind']('contextValue')['to'](this['_model'],'context',_0x5b9f52=>_0x5b9f52&&_0x5b9f52['value']?this['_trimContextValue'](_0x5b9f52['value']):E(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',_0x3340b5['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 _0x32d7b9=new _0x501ccc(this['locale']);return _0x32d7b9['label']=E(this['locale'],'Reopen'),_0x32d7b9['tooltip']=E(this['locale'],'Reopen'),_0x32d7b9['icon']=_0x49b621,_0x32d7b9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x306d70=>!_0x306d70),_0x32d7b9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x15531b,_0x13145d)=>_0x15531b&&_0x13145d),_0x32d7b9['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x32d7b9;}['_trimContextValue'](_0x115d1b){if(_0x115d1b['length']<0x96)return _0x115d1b;const _0x58c716=_0x115d1b['lastIndexOf']('\x20',0x93);return _0x115d1b['substring'](0x0,_0x58c716>-0x1?_0x58c716:0x93)+'...';}['_attachContextActions'](){const _0x4177bc=this['element']['querySelector']('.ck-context'),_0x285720=_0x4177bc['querySelector']('.ck-context__value');this['listenTo'](_0x4177bc,'mouseenter',()=>{_0x285720['offsetWidth']<_0x285720['scrollWidth']&&_0x4177bc['classList']['add']('overlay');}),this['listenTo'](_0x4177bc,'mouseleave',()=>{_0x4177bc['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3a11fa of this['focusables'])this['focusTracker']['add'](_0x3a11fa['element']),this['keystrokes']['listenTo'](_0x3a11fa['element']);}['_createContextView'](){const _0x58fb70=new as(this['locale']);return _0x58fb70['bind']('contextValue')['to'](this),_0x58fb70;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1331c6,_0x37a4d4,_0xb95f3e,_0x374fff){super(_0x1331c6),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x37a4d4,this['_localUser']=_0xb95f3e,this['_config']=_0x374fff,this['commentThreadHeaderView']=new Xt(_0x1331c6,_0x37a4d4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1331c6,E(_0x1331c6,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1331c6,_0x37a4d4,Object['assign']({'CommentView':this['_config']['CommentView']},_0x374fff)),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',(_0x5731f4,_0x245027)=>_0x5731f4||!!_0x245027),this['bind']('isUnlinked')['to'](_0x37a4d4,'unlinkedAt',_0x5ac605=>!!_0x5ac605),this['bind']('ariaLabel')['to'](this,'length',_0x25e50a=>{const _0x44f066=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x25e50a,_0x44f066]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a5462({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x121532=>_0x121532['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xb2259e=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3bff9a=_0xb2259e['commentInputView'];return _0xb2259e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3bff9a,'value',(_0x3aed7f,_0xe8bcaf,_0x2ceabd,_0x1b9fc4,_0x1a63af)=>!!_0x1a63af||!!_0x1b9fc4&&_0x2ceabd&&!_0xe8bcaf||_0x3aed7f&&_0x2ceabd&&!_0xe8bcaf),_0x3bff9a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4508a4,_0x57b312,_0x1067a4)=>{let _0x366016;return _0x366016=_0x1067a4&&_0x57b312?'Reply\x20to\x20reopen\x20discussion...':_0x4508a4?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x366016);}),_0x3bff9a['bind']('submitLabel')['to'](this,'length',_0x3879f0=>E(this['locale'],_0x3879f0?'Reply':'Comment')),_0x3bff9a['on']('submit',(_0x15e1aa,_0x500653)=>{this['fire']('addComment',_0x500653),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3bff9a['on']('cancel',()=>{this['focus']();}),_0x3bff9a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3bff9a['on']('cancel',_0x34f7f0=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x34f7f0['stop']());}),this['on']('change:isActive',(_0x3db6ed,_0x3d7c91,_0x132528)=>{_0x132528||this['length']||_0x3bff9a['value']||this['fire']('removeCommentThread');}),_0xb2259e;}}class vt extends/* #__PURE__ -- @preserve */
27
- ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x5be524,_0xd3c1cd,_0x3865ad,_0x5db0f9){super(_0x5be524,_0xd3c1cd,_0x3865ad,_0x5db0f9),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5be524,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x4d8a33,_0x63e3ae,_0x2a3523)=>{_0x2a3523||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3fb1dd,_0x39ac48,_0x1a4cbc)=>{_0x1a4cbc&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x54914e=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x54914e['if']('isActive','ck-thread--active'),_0x54914e['if']('isUnlinked','ck-thread--unlinked'),_0x54914e['if']('isConfirm','ck-thread--remove-confirmation'),_0x54914e['to']('actionIndicator',_0x2f90b7=>_0x2f90b7?'ck-thread--'+_0x2f90b7:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x54914e['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 _0x4d309d of this['commentsListView']['commentViews'])_0x4d309d['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x586859}=this,_0x45beab=this['commentsListView']['commentViews']['get'](0x0);_0x45beab===this['_boundFirstCommentView']||_0x45beab['isSystemComment']||(this['_boundFirstCommentView']=_0x45beab,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x45beab,'actionIndicator',_0x2a576a=>'remove'===_0x2a576a?'remove':null),_0x45beab['placeholder']=E(_0x586859,'Write\x20a\x20comment...'),_0x45beab['removeButton']['on']('execute',_0x53207c=>{_0x53207c['stop'](),this['showConfirm'](E(_0x586859,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x45beab['focus']();}),_0x45beab['actionBar']['add'](this['resolveButton'],0x0),_0x45beab['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4aa407=new _0x4bb770(this['locale']);return _0x4aa407['label']=E(this['locale'],'Resolve'),_0x4aa407['tooltip']=E(this['locale'],'Resolve'),_0x4aa407['icon']=_0x56bad1,_0x4aa407['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4aa407['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2261d0=>!_0x2261d0),_0x4aa407['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x39d0e7,_0x29f624)=>_0x39d0e7&&!_0x29f624),_0x4aa407['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4aa407;}['_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 es extends kt{constructor(_0x1dea76){super(_0x1dea76),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x14e0cd,_0x1efd82,_0x55fcc6)=>{this['element']['innerHTML']=_0x55fcc6;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x159101,_0x54c4e9,_0x32aec3){super(_0x159101),this['_model']=_0x54c4e9,this['_config']=_0x32aec3,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x54c4e9,'content',_0x54c4e9,'authoredAt',(_0x4c4860,_0x3bd4a9)=>E(_0x159101,'COMMENT_ARIA_LABEL',[_0x54c4e9['author']['name'],_0x32aec3['formatDateTime'](_0x3bd4a9),new DOMParser()['parseFromString'](_0x4c4860,'text/html')['body']['textContent'],_0x54c4e9['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x159101,E(_0x159101,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x1614c2(),this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a5462({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x29248e=>_0x29248e['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x33a813=new es(this['locale']);return _0x33a813['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x52bbd3,_0x3892c1)=>_0x3892c1?_0x2a709c(_0x52bbd3,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x52bbd3),_0x33a813;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x15fb3f=new os(this['locale'],this['_config']['editorConfig']);return _0x15fb3f['value']=this['_model']['content'],_0x15fb3f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x15fb3f['submitLabel']=E(this['locale'],'Save'),_0x15fb3f['on']('submit',(_0xb37829,_0x1c997b)=>{this['fire']('updateComment',this['_model']['id'],_0x1c997b),this['switchToDisplayMode'](),this['focus']();}),_0x15fb3f['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x15fb3f['once']('editorReady',()=>{_0x15fb3f['focus']();}),_0x15fb3f['createEditor'](),_0x15fb3f['delegate']('editorReady')['to'](this),_0x15fb3f['delegate']('editorDestroyed')['to'](this),_0x15fb3f;}['_setupKeyboardNavigation'](){const _0x16ff8d=this['element'];this['keystrokes']['listenTo'](_0x16ff8d);for(const _0x5e878d of this['focusables'])this['focusTracker']['add'](_0x5e878d['element']),this['keystrokes']['listenTo'](_0x5e878d['element']);this['focusables']['on']('change',(_0x5c8808,_0x7f9a0b)=>{for(const _0x170503 of _0x7f9a0b['removed'])this['focusTracker']['remove'](_0x170503['element']),this['keystrokes']['stopListening'](_0x170503['element']);for(const _0x494c07 of _0x7f9a0b['added'])this['focusTracker']['add'](_0x494c07['element']),this['keystrokes']['listenTo'](_0x494c07['element']);}),this['keystrokes']['set']('enter',(_0x5e72aa,_0x1792d4)=>{_0x16ff8d===_0x5e72aa['target']&&(this['focusCycler']['focusFirst'](),_0x1792d4());}),this['keystrokes']['set']('esc',(_0x2108b7,_0x518563)=>{_0x16ff8d!==_0x2108b7['target']&&(this['focus'](),_0x518563());});}}class gt extends/* #__PURE__ -- @preserve */
28
- ti(hs){['actionBar'];['userView'];constructor(_0xe58b7c,_0x212a86,_0x4a0fd5){super(_0xe58b7c,_0x212a86,_0x4a0fd5),this['set']('actionIndicator',null),this['set']('placeholder',E(_0xe58b7c,'Reply...')),this['bind']('authoredAt')['to'](_0x212a86),this['bind']('resolvedAt')['to'](_0x212a86),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 _0x12c1b5(_0xe58b7c,_0x212a86['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x212a86,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x260475=this['bindTemplate'],_0x3b02d1=[{'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':_0x260475['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x260475['to']('authoredAt',_0x1d1cdc=>this['_config']['formatDateTime'](_0x1d1cdc))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x260475['if']('isEditMode','ck-comment__actions--hidden'),_0x260475['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']&&_0x3b02d1['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x260475['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x260475['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x260475['if']('isEditMode','ck-comment--edit'),_0x260475['if']('isSystemComment','ck-comment--info'),_0x260475['to']('actionIndicator',_0x209ab9=>_0x209ab9?'ck-comment--'+_0x209ab9:'')],'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':_0x3b02d1}]}]};}['_createEditButton'](){const _0x1a1d6f=new _0x501ccc(this['locale']);return _0x1a1d6f['label']=E(this['locale'],'Edit'),_0x1a1d6f['icon']=_0x2dd1d3,_0x1a1d6f['withText']=!0x0,_0x1a1d6f['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1a1d6f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1dcbbb=>!_0x1dcbbb),_0x1a1d6f['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1a1d6f['on']('execute',()=>this['switchToEditMode']()),_0x1a1d6f;}['_createRemoveButton'](){const _0x4cad2e=new _0x501ccc(this['locale']);return _0x4cad2e['label']=E(this['locale'],'Remove'),_0x4cad2e['icon']=_0x5207a8,_0x4cad2e['withText']=!0x0,_0x4cad2e['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4cad2e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xdf495a=>!_0xdf495a),_0x4cad2e['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4cad2e['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4cad2e;}['_createDropdown'](){const _0x1403eb=_0x173f07(this['locale'],_0x5b1190),_0x4992dc=_0x1403eb['panelView']['children'],_0x134b93=new _0x4478f6(this['locale']),_0x4b4389=_0x1403eb['bindTemplate'];_0x559ecd(_0x1403eb,()=>this['items']['find'](_0x449020=>_0x449020['isVisible'])),_0x1403eb['extendTemplate']({'attributes':{'class':[_0x4b4389['if']('isVisible','ck-hidden',_0x2bc151=>!_0x2bc151)]}});const _0x260329=(_0x3b3639,_0x3254f7=-0x1)=>{const _0x2bdc52=new _0x80f34e(this['locale']);_0x2bdc52['children']['add'](_0x3b3639);const _0xa1477b=_0x3254f7>-0x1?_0x3254f7:_0x134b93['items']['length'];_0x134b93['items']['add'](_0x2bdc52,_0xa1477b);const _0x72a969=Array['from'](this['items']);_0x1403eb['unbind']('isEnabled','isVisible'),_0x1403eb['bind']('isEnabled')['toMany'](_0x72a969,'isEnabled',(..._0x4d55c1)=>_0x4d55c1['some'](_0x308a11=>_0x308a11)),_0x1403eb['bind']('isVisible')['toMany'](_0x72a969,'isVisible',(..._0x4bd193)=>_0x4bd193['some'](_0x5b5656=>_0x5b5656));};_0x1403eb['panelPosition']='sw',_0x1403eb['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x376907});for(const _0x501f7f of this['items'])_0x260329(_0x501f7f);return _0x4992dc['add'](_0x134b93),_0x1403eb['listenTo'](this['items'],'add',(_0x261319,_0x1fb1c8,_0xa4b404)=>{_0x260329(_0x1fb1c8,_0xa4b404);}),_0x1403eb['listenTo'](this['items'],'remove',(_0x2ee68a,_0x55c637,_0x5e4898)=>{_0x134b93['items']['remove'](_0x5e4898);}),_0x1403eb;}['_attachActions'](_0x4e0b2f,_0x247183){const _0x336f0b=_0x4e0b2f&&_0x4e0b2f['element'];_0x336f0b&&(this['listenTo'](_0x336f0b,'mouseenter',()=>this['actionIndicator']=_0x247183),this['listenTo'](_0x336f0b,'focus',()=>this['actionIndicator']=_0x247183),this['listenTo'](_0x336f0b,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x336f0b,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4ae3d1=super['_createCommentInputView']();return _0x4ae3d1['bind']('placeholder')['to'](this),_0x4ae3d1;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x153375){const _0xedb6b9=Dt(_0x153375,0x1e),_0x177d00=new MutationObserver(_0xdf7b7a=>{for(const _0x291f51 of _0xdf7b7a)('attributes'==_0x291f51['type']&&'class'==_0x291f51['attributeName']||'childList'==_0x291f51['type']||'characterData'==_0x291f51['type'])&&_0xedb6b9();});return{'attach'(_0x2e6b9){_0x177d00['observe'](_0x2e6b9,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x177d00['disconnect'](),_0xedb6b9['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x138993,_0x315492){super(_0x138993),this['id']=_0x35b95b(),this['focusTracker']=new _0x4998e4(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x7fc38f,_0x6a6ac0)=>this['fire']('Esc',_0x6a6ac0)),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']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x315492),this['mainView']=_0x315492;const _0x1cb97d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1cb97d['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 _0x4adf40=this['element']['clientHeight'];_0x4adf40&&(this['height']=_0x4adf40);}}class d extends/* #__PURE__ -- @preserve */
29
- _0x3b9dd7(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x45232b,target:_0x4a0753,type:_0x1af45c,isVisible:_0x40f432=!0x0}){super(),this['view']=_0x45232b,this['view']['element']||this['view']['render'](),this['_type']=_0x1af45c,this['_target']=_0x4a0753,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2a536e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x7d1e7f,_0x2e97e0)=>{this['view']['focusTracker']['add'](_0x2e97e0);}),this['focusableElements']['on']('remove',(_0x1f6dae,_0x502686)=>{this['view']['focusTracker']['remove'](_0x502686);}),this['set']('isVisible',_0x40f432);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5d7fef=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x5d7fef),_0x5d7fef;}get['targetRect'](){const _0x4a1646=this['target'];if(null===_0x4a1646)return null;if(_0x4a1646 instanceof _0x5708d8)return _0x4a1646;const _0x3b9d2c=_0x4a1646['filter'](_0xade569=>function(_0x5387e2){const _0x13017a=_0x5387e2['offsetParent'];if(_0x13017a)return!0x0;const _0x24a2e8=_0x5387e2['getClientRects']()['item'](0x0);return!!_0x24a2e8;}(_0xade569));return 0x0===_0x3b9d2c['length']?null:new _0x5708d8(_0x3b9d2c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5cd325){this['view']['isActive']=_0x5cd325,this['view']['mainView']['isActive']=_0x5cd325;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x449d1b){if(!(null===_0x449d1b||_0x449d1b instanceof _0x5708d8||Array['isArray'](_0x449d1b)&&_0x449d1b['every'](_0x4b0bdf=>li(_0x4b0bdf))))throw new _0x15c172('annotation-invalid-target',null,{'target':_0x449d1b});}['_getNormalizedTarget'](){const _0x178266='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x178266)?[_0x178266]:_0x178266;}}function li(_0x423574){return null!==_0x423574&&'object'==typeof _0x423574&&'nodeType'in _0x423574&&0x1===_0x423574['nodeType'];}class _ extends _0x2a536e{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4ecd81=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4998e4(),this['_focusTracker']['on']('change:isFocused',(_0x439f21,_0x49bc80,_0x498dec)=>{_0x498dec||this['fire']('blur');});for(const _0x49420f of _0x4ecd81)this['add'](_0x49420f);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2b9491){if(this['has'](_0x2b9491))throw new _0x15c172('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2b9491['innerView'],_0x2b9491),this['_viewToAnnotation']['set'](_0x2b9491['view'],_0x2b9491);for(const _0x3f6b35 of _0x2b9491['focusableElements'])this['_focusTracker']['add'](_0x3f6b35);this['listenTo'](_0x2b9491['focusableElements'],'add',(_0x408a21,_0x57344b)=>{this['_focusTracker']['add'](_0x57344b);}),this['listenTo'](_0x2b9491['focusableElements'],'remove',(_0x2645e4,_0x567145)=>{this['_focusTracker']['remove'](_0x567145);}),this['listenTo'](_0x2b9491['view']['focusTracker'],'change:isFocused',(_0x309d48,_0x5a561e,_0x26a4cf)=>{_0x26a4cf&&this['fire']('focus',_0x2b9491);}),_0x2b9491['updateTargetRect']();const _0x4b7f6f=this['_getOrderInContent'](_0x2b9491['view']['targetRect']);return super['add'](_0x2b9491,_0x4b7f6f);}['remove'](_0x58c0d5){if(!this['has'](_0x58c0d5))throw new _0x15c172('annotationcollection-not-existing-item',null);this['stopListening'](_0x58c0d5['view']['focusTracker']),this['stopListening'](_0x58c0d5['focusableElements']);for(const _0x13bd2e of _0x58c0d5['focusableElements'])this['_focusTracker']['remove'](_0x13bd2e);return this['_viewToAnnotation']['delete'](_0x58c0d5['view']),this['_innerViewToAnnotation']['delete'](_0x58c0d5['innerView']),super['remove'](_0x58c0d5);}['getByInnerView'](_0x6be1f4){return this['_innerViewToAnnotation']['get'](_0x6be1f4);}['getByView'](_0xd8310d){return this['_viewToAnnotation']['get'](_0xd8310d);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x166469 of this)_0x166469['updateTargetRect']();this['_sort']();}['_sort'](){const _0x485af8=Array['from'](this)['sort']((_0x3b8370,_0x1089fa)=>v(_0x3b8370['view']['targetRect'],_0x1089fa['view']['targetRect']));for(let _0x2206e2=_0x485af8['length']-0x1;_0x2206e2>0x0;_0x2206e2--){const _0x4e49bc=_0x485af8[_0x2206e2];_0x2206e2!==this['getIndex'](_0x4e49bc)&&(this['remove'](_0x4e49bc),this['add'](_0x4e49bc));}}['_getOrderInContent'](_0x25642d){let _0x6d23e5=0x0;if(!_0x25642d)return this['length'];for(const _0x82d42b of this){const _0x36d443=_0x82d42b['view']['targetRect'];if(_0x36d443){if(v(_0x25642d,_0x36d443)<0x0)return _0x6d23e5;_0x6d23e5++;}}return _0x6d23e5;}}function v(_0x959fc0,_0xa37af2){if(null===_0x959fc0&&null===_0xa37af2)return 0x0;if(null===_0x959fc0)return-0x1;if(null===_0xa37af2)return 0x1;const _0xfd23fc=_0x959fc0['top']-_0xa37af2['top'];return 0x0==_0xfd23fc?_0x959fc0['left']-_0xa37af2['left']:_0xfd23fc;}class O extends _0x2c6a5a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x379a2e){if(super(_0x379a2e),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x379a2e instanceof _0x17bd9d){const _0x5473e9=_0x379a2e['locale'];_0x379a2e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x5473e9,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x45d382){this['collection']['add'](_0x45d382);}['remove'](_0x2558a7){this['collection']['remove'](_0x2558a7),_0x2558a7['destroy']();}['refreshVisibility'](){for(const _0x5dc45c of this['collection'])_0x5dc45c['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x17b479){return this['collection']['getByInnerView'](_0x17b479);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x44a3bb of this['collection'])_0x44a3bb['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3b3729){this['fire']('_activateAnnotation',_0x3b3729);}['createAnnotation'](_0xbb0943){return new d(_0xbb0943);}['createAnnotationView'](_0x265e07,_0x842829){return new S(_0x265e07,_0x842829);}['_addActiveAnnotation'](_0x533c29){const _0xc436a7=new Set(this['activeAnnotations']);_0xc436a7['add'](_0x533c29),this['activeAnnotations']=_0xc436a7;}['_removeActiveAnnotation'](_0x491c51){const _0x2ad539=new Set(this['activeAnnotations']);_0x2ad539['delete'](_0x491c51),this['activeAnnotations']=_0x2ad539;}['_bindAnnotationsToVisibleAnnotations'](){const _0x23faaa=this['collection'],_0x273f1d=this['_visibleAnnotations'];function _0x5dfb46(_0x40882d){const _0x884452=_0x40882d['source'];_0x884452['isVisible']&&!_0x273f1d['has'](_0x884452)?_0x273f1d['add'](_0x884452):!_0x884452['isVisible']&&_0x273f1d['has'](_0x884452)&&_0x273f1d['remove'](_0x884452),_0x884452['view']['focusTracker']['remove'](_0x884452['view']['element']),_0x884452['view']['focusTracker']['add'](_0x884452['view']['element']);}this['listenTo'](_0x23faaa,'add',(_0x172096,_0x1d8a26)=>{_0x1d8a26['isVisible']&&_0x273f1d['add'](_0x1d8a26),this['listenTo'](_0x1d8a26,'change:isVisible',_0x5dfb46);}),this['listenTo'](_0x23faaa,'remove',(_0x3d9b70,_0x531d0f)=>{_0x273f1d['has'](_0x531d0f)&&_0x273f1d['remove'](_0x531d0f),this['stopListening'](_0x531d0f,'change:isVisible',_0x5dfb46);});}['_setupEnterAnnotationKeystroke'](){const _0x497648=_0x1b8794=>{_0x1b8794['on']('ready',()=>{_0x1b8794['keystrokes']['set'](_0x396715,(_0x2abe14,_0x572979)=>{const _0x1da2bf=_0x5d65fb(this['activeAnnotations']['values']());_0x1da2bf&&(_0x1da2bf['view']['focus'](),_0x572979());});});};this['context']instanceof _0x17bd9d?_0x497648(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x52582b,_0xc780c9)=>{_0x497648(_0xc780c9);});}['_setupEscapeAnnotationHandling'](){const _0x19e9a3=_0x3c46f8=>{const _0x245ef2=_0x3c46f8['source'],_0x465d31=[];let _0x4d6b0e;if(Array['isArray'](_0x245ef2['target'])){_0x4d6b0e=_0x245ef2['target'][0x0],this['context']instanceof _0x17bd9d?_0x465d31['push'](this['context']):this['context']['editors']&&_0x465d31['push'](...this['context']['editors']);for(const _0x22f164 of _0x465d31)for(const _0x51df26 of _0x22f164['editing']['view']['domRoots']['values']())if(_0x51df26['contains'](_0x4d6b0e))return void _0x22f164['editing']['view']['focus']();_0x4d6b0e['focus']();}};this['listenTo'](this['collection'],'add',(_0x152c66,_0x2438d8)=>{this['listenTo'](_0x2438d8,'escape',_0x19e9a3,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2e690f,_0x4ba55f)=>{this['stopListening'](_0x4ba55f,'escape',_0x19e9a3);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2c6a5a{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a0bfd){super(_0x4a0bfd),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xb05720=this['context']['config'];_0xb05720['define']('comments.maxCommentsWhenCollapsed',0x2),_0xb05720['define']('comments.maxThreadTotalWeight',0x1f4),_0xb05720['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xb05720['define']('comments.CommentThreadView',vt),_0xb05720['define']('comments.CommentView',gt),_0xb05720['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2f2e6c=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4da32e,_0x50e5a6)=>this['_addCommentThread'](_0x50e5a6)),this['on']('submitCommentThread',(_0x378bd2,_0x33dd20)=>this['_submitCommentThread'](_0x33dd20)),this['on']('resolveCommentThread',(_0x3ab859,_0x4c5d2a)=>this['_resolveCommentThread'](_0x4c5d2a)),this['on']('resolveCommentThread',(_0x589994,_0x390fac)=>this['_updateActiveAnnotation'](_0x390fac),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x58fcf5,_0x27fe76)=>this['_reopenCommentThread'](_0x27fe76)),this['on']('reopenCommentThread',(_0x47f201,_0x3c0b5a)=>this['_updateActiveAnnotation'](_0x3c0b5a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1c5890,_0x4f282f)=>this['_removeCommentThread'](_0x4f282f)),this['on']('updateCommentThread',(_0x29d0d2,_0xfeaca9)=>this['_updateCommentThread'](_0xfeaca9)),this['on']('updateCommentThread',(_0x3ed69f,_0xdbdb5f)=>this['_updateActiveAnnotation'](_0xdbdb5f),{'priority':'lowest'}),this['on']('addComment',(_0x4f74ba,_0x199ec2)=>this['_addComment'](_0x199ec2)),this['on']('updateComment',(_0x33dee2,_0x42d498)=>this['_updateComment'](_0x42d498)),this['on']('removeComment',(_0x1446d2,_0x47b290)=>this['_removeComment'](_0x47b290)),this['on']('addComment',(_0x52f4f5,{threadId:_0x5bc427,isFromAdapter:_0x898bfb})=>{if(_0x898bfb)return;const _0x14a9a1=this['getCommentThread'](_0x5bc427),_0x35d0ca=_0x14a9a1&&this['_threadToController']['get'](_0x14a9a1);_0x35d0ca&&_0x35d0ca['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2f2e6c,'change:activeAnnotations',(_0x5588ea,_0x9cab16,_0x3afb17)=>{const _0x1375a5=Array['from'](_0x3afb17)['map'](_0x448b8c=>this['_viewToController']['get'](_0x448b8c['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1375a5?_0x1375a5['model']:null;});}set['adapter'](_0x32e1d9){if(this['_adapter'])throw new _0x15c172('commentsrepository-adapter-already-set');this['_adapter']=_0x32e1d9;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4586d2=Tt,threadId:_0x54c847=_0x35b95b(),comments:_0x46121a=[],unlinkedAt:_0x490656=null,resolvedAt:_0x28ee6f=null,resolvedBy:_0x208a8d=null,target:_0x42da9b=null,context:_0x49df16=null,attributes:_0x115b51={},isResolvable:_0x3f8416=!0x0,isSubmitted:_0x10fa27=!0x1,isFromAdapter:_0x21ca2c=!0x1}={}){return this['fire'](bt('addCommentThread',_0x4586d2),{'channelId':_0x4586d2,'threadId':_0x54c847,'comments':_0x46121a,'unlinkedAt':_0x490656,'resolvedAt':_0x28ee6f,'resolvedBy':_0x208a8d,'target':_0x42da9b,'context':_0x49df16,'attributes':_0x115b51,'isFromAdapter':_0x21ca2c,'isResolvable':_0x3f8416,'isSubmitted':_0x10fa27}),this['getCommentThread'](_0x54c847);}['openNewCommentThread']({channelId:_0x2ddcff=Tt,threadId:_0x5065b9=_0x35b95b(),target:_0x1a4783,context:_0x2fe592=null,isResolvable:_0xac5ef0=!0x0}){if(this['_readOnlyChannels']['has'](_0x2ddcff)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1a4783)throw new _0x15c172('commentsrepository-missing-target');const _0x422de3=this['addCommentThread']({'channelId':_0x2ddcff,'threadId':_0x5065b9,'target':_0x1a4783,'context':_0x2fe592,'isResolvable':_0xac5ef0});if(!_0x422de3)return null;const _0x1265d9=this['_threadToController']['get'](_0x422de3),_0x2657c0=_0x1265d9['view']['commentThreadInputView']['commentInputView'],_0x4b551e=this['context']['plugins']['get'](O),_0x3c3eeb=_0x4b551e['getByInnerView'](_0x1265d9['view']);return _0x4b551e['activate'](_0x3c3eeb),_0x2657c0['once']('editorReady',()=>_0x2657c0['focus']()),_0x422de3;}['hasCommentThread'](_0x3f36c5){if('string'!=typeof _0x3f36c5)throw new _0x15c172('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3f36c5);}['updateCommentThread']({channelId:_0x50c3fb=Tt,threadId:_0x81bb93,context:_0x3032e8,unlinkedAt:_0x4b96fc,attributes:_0x47e2bc,isFromAdapter:_0x109335=!0x1}){return this['fire'](bt('updateCommentThread',_0x50c3fb),{'channelId':_0x50c3fb,'threadId':_0x81bb93,'context':_0x3032e8,'unlinkedAt':_0x4b96fc,'attributes':_0x47e2bc,'isFromAdapter':_0x109335}),this['getCommentThread'](_0x81bb93);}['getCommentThread'](_0x4fce12){if('string'!=typeof _0x4fce12)throw new _0x15c172('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4fce12);}['fetchCommentThread']({channelId:_0x34840a,threadId:_0xa311a7}={}){const _0x7bd410=this['getCommentThread'](_0xa311a7);if(_0x7bd410)return Promise['resolve'](_0x7bd410);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x15c172('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x34840a,'threadId':_0xa311a7})['then'](_0x2bfc83=>this['hasCommentThread'](_0xa311a7)?this['getCommentThread'](_0xa311a7):_0x2bfc83?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x34840a},_0x2bfc83)):void 0x0)['catch'](_0x42aa19=>{throw console['error'](_0x42aa19),new _0x15c172('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x49356d,skipNotAttached:_0x3b600c=!0x1,skipEmpty:_0x12da45=!0x1,toJSON:_0x4e1346=!0x1}={}){const _0x415382=[];for(const _0x48db00 of this['_threads']['values']())_0x49356d&&_0x48db00['channelId']!==_0x49356d||_0x3b600c&&!_0x48db00['isAttached']||_0x12da45&&0x0===_0x48db00['length']||_0x415382['push'](_0x48db00);return _0x4e1346?_0x415382['map'](_0x3578d0=>_0x3578d0['toJSON']()):_0x415382;}['setActiveCommentThread'](_0x3186c4){const _0xa07709=this['context']['plugins']['get'](O);if(!_0x3186c4)return void(this['activeCommentThread']&&_0xa07709['deactivateAll']());const _0x66bb21=this['getCommentThread'](_0x3186c4);if(!_0x66bb21)throw new _0x15c172('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3186c4});if(!this['_threadToController']['has'](_0x66bb21))throw new _0x15c172('commentsrepository-active-not-attached',null,{'threadId':_0x3186c4});const _0x16fa6b=_0xa07709['getByInnerView'](this['_threadToController']['get'](_0x66bb21)['view']);_0xa07709['activate'](_0x16fa6b);}['switchReadOnly'](_0x5f21fa,_0x2a72aa){_0x5f21fa?this['_readOnlyChannels']['add'](_0x2a72aa):this['_readOnlyChannels']['delete'](_0x2a72aa),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xbde589){return this['_readOnlyChannels']['has'](_0xbde589)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x53c1d6,_0x1db48e){return new Ct(_0x53c1d6,_0x1db48e);}['setPermissions'](_0x259b8e,_0x4c127e=Tt){this['_permissions']['set'](_0x4c127e,_0x259b8e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x245c23=Tt){return this['_permissions']['has'](_0x245c23)?this['_permissions']['get'](_0x245c23):_t;}['_addCommentThread']({channelId:_0x56d701,threadId:_0xf2b8c8,comments:_0x4cb569,unlinkedAt:_0x57ae7d,resolvedAt:_0x131d75,resolvedBy:_0x2dd1dd,target:_0x3805b7,context:_0x4186df,attributes:_0x4c7123,isFromAdapter:_0xdc6ad,isResolvable:_0x47db37,isSubmitted:_0x33af49}){if('string'!=typeof _0xf2b8c8)throw new _0x15c172('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xf2b8c8});if(this['hasCommentThread'](_0xf2b8c8))throw new _0x15c172('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xf2b8c8});const _0x1fd0b3=new ui(this,{'channelId':_0x56d701,'id':_0xf2b8c8,'context':_0x4186df,'attributes':_0x4c7123,'unlinkedAt':_0x57ae7d,'resolvedAt':_0x131d75,'resolvedBy':_0x2dd1dd?this['context']['plugins']['get'](it)['getUser'](_0x2dd1dd):null,'isResolvable':_0x47db37,'isSubmitted':_0x33af49||_0xdc6ad});this['_threads']['set'](_0xf2b8c8,_0x1fd0b3);for(const _0x1c2ff1 of _0x4cb569)_0x1fd0b3['_add'](this['_createNewComment']({'threadId':_0xf2b8c8,..._0x1c2ff1}));return _0x3805b7&&_0x1fd0b3['attachTo'](_0x3805b7),_0xdc6ad||!_0x1fd0b3['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x56d701,'threadId':_0xf2b8c8});}['_submitCommentThread']({channelId:_0x1037cb,threadId:_0x45ede9}){if(!this['hasCommentThread'](_0x45ede9))throw new _0x15c172('commentsrepository-missing-comment-thread',this);const _0x5f04aa=this['getCommentThread'](_0x45ede9);if(_0x5f04aa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x354aa0,comments:_0x534a86,resolvedAt:_0x1a258b,resolvedBy:_0x564fbd,context:_0x4ece6e,attributes:_0x23e0ae}=_0x5f04aa,_0x803f16=this['context']['plugins']['get']('PendingActions'),_0x4997e8=_0x803f16['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1037cb,'threadId':_0x354aa0,'comments':_0x534a86['map'](_0x935bb5=>_0x935bb5['toJSON']()),'resolvedAt':_0x1a258b,'resolvedBy':_0x564fbd?_0x564fbd['id']:_0x564fbd,'context':_0x4ece6e,'attributes':_0x23e0ae})['then'](({comments:_0x2fe341})=>{_0x803f16['remove'](_0x4997e8);for(const _0x52f5df of _0x2fe341)this['_updateComment']({'channelId':_0x1037cb,'threadId':_0x45ede9,'commentId':_0x52f5df['commentId'],'createdAt':_0x52f5df['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1a8e0c=>{throw console['error'](_0x1a8e0c),new _0x15c172('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0xc4a666,target:_0x29bd49}){const _0x3a7c5d=this['getCommentThread'](_0xc4a666);if(!_0x3a7c5d)throw new _0x15c172('commentsrepository-attach-missing-comment-thread',this);const _0x805e77=this['context']['plugins']['get']('PendingActions'),_0x33a543=this['context']['plugins']['get'](O),_0xd4dc91=this['_createCommentThreadView'](_0x3a7c5d),_0x4c4582=new Ct(_0x3a7c5d,_0xd4dc91);let _0x14fd71=null;_0xd4dc91['on']('change:isDirty',(_0x64c99b,_0x4045c2,_0x5907a8)=>{_0x5907a8?_0x14fd71=_0x805e77['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x14fd71&&(_0x805e77['remove'](_0x14fd71),_0x14fd71=null);}),this['_threadToController']['set'](_0x3a7c5d,_0x4c4582),this['_viewToController']['set'](_0xd4dc91,_0x4c4582);const _0x51e6b6=new S(this['context']['locale'],_0xd4dc91);_0x51e6b6['bind']('length')['to'](_0xd4dc91),_0x51e6b6['bind']('isDirty')['to'](_0xd4dc91,'isDirty',_0xd4dc91,'length',(_0x47562d,_0x5ff2eb)=>_0x47562d||!_0x5ff2eb),_0x51e6b6['bind']('isActive')['to'](_0xd4dc91),_0x51e6b6['type']='comment';const _0x7cd0c7=new d({'view':_0x51e6b6,'target':_0x29bd49,'type':'comment','isVisible':!_0x3a7c5d['archivedAt']});return _0xd4dc91['on']('escape',()=>{_0x7cd0c7['fire']('escape');}),this['_bindAnnotationToEditors'](_0xd4dc91,_0x7cd0c7),_0x33a543['add'](_0x7cd0c7),_0x7cd0c7;}['_bindAnnotationToEditors'](_0x16fbf5,_0x47cee3){this['listenTo'](_0x16fbf5,'editorReady',(_0x1b3559,_0x2e6315)=>{const _0xa102f6=_0x2e6315['ui']['view']['body']['bodyCollectionContainer'];_0x47cee3['focusableElements']['add'](_0xa102f6),this['context']instanceof _0x17bd9d&&this['context']['ui']['focusTracker']['add'](_0xa102f6);},{'priority':'highest'}),this['listenTo'](_0x16fbf5,'editorDestroyed',(_0x9308d4,_0x597886)=>{const _0x3c90a6=_0x597886['ui']['view']['body']['bodyCollectionContainer'];_0x47cee3['focusableElements']['has'](_0x3c90a6)&&_0x47cee3['focusableElements']['remove'](_0x3c90a6),this['context']instanceof _0x17bd9d&&this['context']['ui']['focusTracker']['remove'](_0x3c90a6);});}['_unbindEditors'](_0x5eb702){this['stopListening'](_0x5eb702,'editorReady'),this['stopListening'](_0x5eb702,'editorDestroyed');}['_createCommentThreadView'](_0x45f60a){const _0x26b615=this['context']['plugins']['get'](it),{config:_0x439630,locale:_0x597479}=this['context'],_0x19b1cb=lt(_0x439630['get']('locale'),_0x597479);return new(0x0,(_0x439630['get']('comments'))['CommentThreadView'])(_0x597479,_0x45f60a,_0x26b615['me'],{'editorConfig':{..._0x439630['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x439630['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x439630['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x439630['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x439630['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x19b1cb,'CommentView':_0x439630['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1d2c3d,channelId:_0x2d52d0,resolvedAt:_0x29a7d9,resolvedBy:_0x4bd03a,isFromAdapter:_0x101ef5}){if(!this['hasCommentThread'](_0x1d2c3d))throw new _0x15c172('commentsrepository-missing-comment-thread',null,{'threadId':_0x1d2c3d});const _0x164dce=this['getCommentThread'](_0x1d2c3d);if(_0x164dce['isResolved'])throw new _0x15c172('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1d2c3d});const _0x4a7e88=this['context']['plugins']['get'](it);if(_0x164dce['resolvedBy']=_0x4a7e88['getUser'](_0x4bd03a),_0x164dce['resolvedAt']=_0x29a7d9,_0x101ef5||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0xe61ece=this['context']['plugins']['get']('PendingActions'),_0x39ca27=_0xe61ece['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2d52d0,'threadId':_0x1d2c3d})['then'](({resolvedAt:_0x5d4df6,resolvedBy:_0x506bfb})=>{_0xe61ece['remove'](_0x39ca27),_0x164dce['resolvedBy']['id']!==_0x506bfb&&(_0x164dce['resolvedBy']=_0x4a7e88['getUser'](_0x506bfb)),_0x164dce['resolvedAt']=_0x5d4df6;})['catch'](_0x5494ff=>{throw console['error'](_0x5494ff),new _0x15c172('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x17f91d,channelId:_0x1e6535,isFromAdapter:_0xd57634}){if(!this['hasCommentThread'](_0x17f91d))throw new _0x15c172('commentsrepository-missing-comment-thread',null,{'threadId':_0x17f91d});const _0x29cac1=this['getCommentThread'](_0x17f91d);if(!_0x29cac1['isResolved'])throw new _0x15c172('commentsrepository-reopen-comment-thread',null,{'threadId':_0x17f91d});if(_0x29cac1['resolvedBy']=null,_0x29cac1['resolvedAt']=null,_0xd57634||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x121519=this['context']['plugins']['get']('PendingActions'),_0x347183=_0x121519['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1e6535,'threadId':_0x17f91d})['then'](()=>_0x121519['remove'](_0x347183))['catch'](_0x2299e7=>{throw console['error'](_0x2299e7),new _0x15c172('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2be539,isFromAdapter:_0x823ed5}){const _0x137ddb=this['getCommentThread'](_0x2be539);if(!_0x137ddb)throw new _0x15c172('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2be539),this['_threads']['delete'](_0x2be539),!_0x137ddb['isSubmitted']||_0x823ed5||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5ea47a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1fbaec}=_0x137ddb,_0x352cfc=_0x5ea47a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1fbaec,'threadId':_0x2be539})['then'](()=>_0x5ea47a['remove'](_0x352cfc))['catch'](_0x40ab74=>{throw console['error'](_0x40ab74),new _0x15c172('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x7ba645,unlinkedAt:_0x4e250d,context:_0x5c8fac,attributes:_0xdc26b5,isFromAdapter:_0x240fd7}){if('string'!=typeof _0x7ba645)throw new _0x15c172('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x7ba645});if(!this['hasCommentThread'](_0x7ba645))throw new _0x15c172('commentsrepository-missing-comment-thread',null,{'threadId':_0x7ba645});const _0x12e023=this['getCommentThread'](_0x7ba645);let _0x290545=!0x1;if(void 0x0!==_0x5c8fac&&_0x12e023['context']!==_0x5c8fac&&(_0x12e023['context']=_0x5c8fac,_0x290545=!0x0),void 0x0!==_0x4e250d&&_0x12e023['unlinkedAt']!==_0x4e250d&&(_0x12e023['unlinkedAt']=_0x4e250d,_0x290545=!0x0),_0xdc26b5&&!wt(_0xdc26b5,_0x12e023['attributes'])&&(_0x12e023['attributes']=_0xdc26b5,_0x290545=!0x0),!_0x290545)return Promise['resolve']();if(!_0x12e023['isSubmitted']||_0x240fd7||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2fe263=this['context']['plugins']['get']('PendingActions'),{channelId:_0x37ddbe}=_0x12e023,_0x384b8e=_0x2fe263['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x37ddbe,'threadId':_0x7ba645,'context':_0x5c8fac,'unlinkedAt':_0x4e250d,'attributes':_0xdc26b5})['then'](()=>_0x2fe263['remove'](_0x384b8e))['catch'](_0x3ccb5d=>{throw console['error'](_0x3ccb5d),new _0x15c172('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x556a44){const _0x36e869=this['context']['plugins']['get'](O),_0x33a880=this['getCommentThread'](_0x556a44);if(_0x33a880['_isAttached']=!0x1,this['_threadToController']['has'](_0x33a880)){const _0x51dd4f=this['_threadToController']['get'](_0x33a880),_0x49f7eb=_0x51dd4f['view'],_0x29e6e5=_0x36e869['getByInnerView'](_0x49f7eb);this['_threadToController']['delete'](_0x33a880),this['_viewToController']['delete'](_0x49f7eb),_0x29e6e5&&_0x36e869['remove'](_0x29e6e5),_0x51dd4f['destroy'](),_0x49f7eb['destroy']()['then'](()=>{this['_unbindEditors'](_0x49f7eb);});}}['_updateActiveAnnotation']({threadId:_0x10af0d,resolvedAt:_0xa0b232,unlinkedAt:_0x881cf5}){const _0x5c7a29=!!_0xa0b232,_0xf51afd=this['context']['plugins']['get'](O),_0x2dc6b9=this['getCommentThread'](_0x10af0d);if(this['_threadToController']['has'](_0x2dc6b9)){const _0x4f00c1=this['_threadToController']['get'](_0x2dc6b9)['view'],_0xcf2934=_0xf51afd['getByInnerView'](_0x4f00c1);_0xcf2934&&(_0x5c7a29&&_0xf51afd['_removeActiveAnnotation'](_0xcf2934),_0x881cf5?_0xcf2934['isVisible']=!0x1:_0xcf2934['refreshVisibility']());}}['_getExternalAuthor'](_0x50f13d){const _0x22a1d7=this['context']['plugins']['get'](it),_0x5e58ce=pt('external:'+_0x50f13d),_0x3beb27=_0x22a1d7['getUser'](_0x5e58ce);return _0x3beb27||_0x22a1d7['addUser']({'id':_0x5e58ce,'name':_0x50f13d});}['_createNewComment']({threadId:_0x4a32ef,commentId:_0xb26d4a=_0x35b95b(),content:_0x3bbf65,authorId:_0x155014,createdAt:_0x23d1f5,attributes:_0xc1cf1f}){if('string'!=typeof _0xb26d4a)throw new _0x15c172('commentsrepository-invalid-commentid');if('string'!=typeof _0x155014)throw new _0x15c172('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3bbf65||!_0x3bbf65['trim']())throw new _0x15c172('commentsrepository-invalid-comment-content');const _0x110af1=this['context']['plugins']['get'](it)['getUser'](_0x155014);if(!_0x110af1)throw new _0x15c172('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x155014});let _0x3c94fb=null,_0x3236d7=_0x23d1f5;return _0xc1cf1f?.['@external']&&(_0x3c94fb=this['_getExternalAuthor'](_0xc1cf1f['@external']['authorName']),_0x3236d7=new Date(_0xc1cf1f['@external']['createdAt'])),new fi(this,{'threadId':_0x4a32ef,'id':_0xb26d4a,'author':_0x3c94fb||_0x110af1,'creator':_0x110af1,'content':_0x3bbf65,'createdAt':_0x23d1f5,'authoredAt':_0x3236d7,'attributes':_0xc1cf1f});}['_addComment'](_0x9a76c9){let {threadId:_0x202550,content:_0x289496,attributes:_0xb2c8e5,isFromAdapter:_0x495492}=_0x9a76c9;const _0x168331=this['getCommentThread'](_0x9a76c9['threadId']);if(!_0x168331)throw new _0x15c172('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1d3df3=this['_createNewComment'](_0x9a76c9),{id:_0x5b5da8}=_0x1d3df3;if(_0x168331['_add'](_0x1d3df3),_0x495492||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x168331['isSubmitted'])return Promise['resolve']();const _0x59613c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5b5701}=_0x168331,_0x16ad8f=_0x59613c['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xb2c8e5||(_0xb2c8e5={}),this['adapter']['addComment']({'channelId':_0x5b5701,'threadId':_0x202550,'commentId':_0x5b5da8,'content':_0x289496,'attributes':_0xb2c8e5})['then'](_0x1baa03=>{_0x59613c['remove'](_0x16ad8f),_0x1baa03&&this['_updateComment']({'channelId':_0x5b5701,'threadId':_0x202550,'commentId':_0x5b5da8,'createdAt':_0x1baa03['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x24e696=>{throw console['error'](_0x24e696),new _0x15c172('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3af0b9,commentId:_0x1360a0,content:_0x10eafd,createdAt:_0x52f4ad,attributes:_0x2a245b,isFromAdapter:_0x5a47d5}){if(void 0x0!==_0x10eafd&&('string'!=typeof _0x10eafd||!_0x10eafd['trim']()['length']))throw new _0x15c172('commentsrepository-update-comment-invalid-content');const _0x5ae307=this['getCommentThread'](_0x3af0b9),_0x5c281c=_0x5ae307['getComment'](_0x1360a0);if(!_0x5c281c)throw new _0x15c172('commentsrepository-update-missing-comment',this);let _0x6ee5f9=!0x1;if(_0x10eafd&&_0x10eafd!==_0x5c281c['content']&&(_0x5c281c['isEditable']||_0x5a47d5)&&(_0x5c281c['content']=_0x10eafd,_0x6ee5f9=!0x0),_0x52f4ad&&_0x52f4ad!==_0x5c281c['createdAt']&&(_0x5c281c['createdAt']=_0x52f4ad,_0x5c281c['attributes']&&_0x5c281c['attributes']['@external']||(_0x5c281c['authoredAt']=_0x52f4ad),_0x6ee5f9=!0x0),_0x2a245b&&!wt(_0x2a245b,_0x5c281c['attributes'])&&(_0x5c281c['attributes']=_0x2a245b,_0x6ee5f9=!0x0),!_0x6ee5f9)return Promise['resolve']();if(_0x5ae307['fire']('commentUpdated'),_0x5a47d5||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x197224=this['context']['plugins']['get']('PendingActions'),{channelId:_0x311413}=this['getCommentThread'](_0x5c281c['threadId']),_0x33b18e=_0x197224['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x311413,'threadId':_0x3af0b9,'commentId':_0x1360a0,'content':_0x10eafd,'attributes':_0x2a245b})['then'](()=>_0x197224['remove'](_0x33b18e))['catch'](_0xb06cb1=>{throw console['error'](_0xb06cb1),new _0x15c172('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x202567,commentId:_0x816850,isFromAdapter:_0x1ddbdb}){const _0x149a18=this['getCommentThread'](_0x202567),_0x315b51=_0x149a18['getComment'](_0x816850);if(!_0x315b51)throw new _0x15c172('commentsrepository-remove-missing-comment',this);if(_0x149a18['_remove'](_0x315b51),_0x1ddbdb||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x38b42a=this['context']['plugins']['get']('PendingActions'),{channelId:_0xc56ee0}=_0x149a18,_0x31222d=_0x38b42a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xc56ee0,'threadId':_0x202567,'commentId':_0x816850})['then'](()=>_0x38b42a['remove'](_0x31222d))['catch'](_0x31421c=>{throw console['error'](_0x31421c),new _0x15c172('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
30
- _0x3b9dd7(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5050a2,_0x2761a0){super();const _0x2e7cca=_0x2761a0['isResolvable'];this['channelId']=_0x2761a0['channelId'],this['id']=_0x2761a0['id'],this['comments']=new _0x2a536e(),this['_repository']=_0x5050a2,this['_isAttached']=!0x1,this['_isSubmitted']=_0x2761a0['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5050a2,'_permissions',_0x5050a2,'_readOnlyChannels',()=>_0x5050a2['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5050a2,'_permissions',()=>_0x5050a2['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5050a2,'_permissions',()=>{const _0x5c7f3a=_0x5050a2['getPermissions'](this['channelId']);return _0x5c7f3a['write']||_0x5c7f3a['admin'];}),this['bind']('isResolvable')['to'](_0x5050a2,'_permissions',()=>_0x2e7cca&&_0x5050a2['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x2761a0['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4c89a0,_0x462ae5)=>_0x4c89a0?_0x462ae5?_0x4c89a0<_0x462ae5?_0x4c89a0:_0x462ae5:_0x4c89a0:_0x462ae5),this['set']('unlinkedAt',_0x2761a0['unlinkedAt']||null),this['set']('resolvedAt',_0x2761a0['resolvedAt']||null),this['set']('resolvedBy',_0x2761a0['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x201c56=>!!_0x201c56),this['set']('attributes',_0x2761a0['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2acd23,_0x53f651)=>_0x2acd23+_0x53f651['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x4db681,id:_0x43e808}=this;this['_repository']['fire'](bt('submitCommentThread',_0x4db681),{'channelId':_0x4db681,'threadId':_0x43e808});}['setUnlinkedAt'](_0x415e68){this['_update']({'unlinkedAt':_0x415e68});}['resolve']({resolvedAt:_0x37e6ca=new Date(),resolvedBy:_0x39f371=null,isFromAdapter:_0x164a24=!0x1}={}){const _0x375c1f=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x3eccb3,id:_0x5c8818}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x3eccb3),{'channelId':_0x3eccb3,'threadId':_0x5c8818,'resolvedAt':_0x37e6ca,'resolvedBy':_0x39f371||_0x375c1f['id'],'isFromAdapter':_0x164a24});}['reopen']({isFromAdapter:_0x30f0bb=!0x1}={}){const {channelId:_0xf96b6d,id:_0x248db9}=this;this['_repository']['fire'](bt('reopenCommentThread',_0xf96b6d),{'channelId':_0xf96b6d,'threadId':_0x248db9,'isFromAdapter':_0x30f0bb});}['setContext'](_0x1b4680){this['context']||this['_update']({'context':_0x1b4680});}['setAttribute'](_0x4fffa1,_0x443336){const _0x2ef0a4=It(this['attributes']);At(_0x2ef0a4,_0x4fffa1,_0x443336),this['_update']({'attributes':_0x2ef0a4});}['removeAttribute'](_0x46ba77){const _0xb9b255=It(this['attributes']);yt(_0xb9b255,_0x46ba77),this['_update']({'attributes':_0xb9b255});}['remove']({isFromAdapter:_0x2e1869=!0x1}={}){const {channelId:_0x360e89,id:_0x4ad577}=this;this['_repository']['fire'](bt('removeCommentThread',_0x360e89),{'channelId':_0x360e89,'threadId':_0x4ad577,'isFromAdapter':_0x2e1869});}['attachTo'](_0x3043b2){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x3043b2});}['addComment'](_0x87fc5a){const {channelId:_0x417b2e,id:_0x10a046}=this;this['_repository']['fire'](bt('addComment',_0x417b2e,_0x10a046),Object['assign']({'channelId':_0x417b2e,'threadId':_0x10a046},_0x87fc5a));}['getComment'](_0x803a3b){if('string'!=typeof _0x803a3b)throw new _0x15c172('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x803a3b});return this['comments']['get'](_0x803a3b);}['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'](_0x60c223=>_0x60c223['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4670f3){return this['listenTo'](_0x4670f3,'change:authoredAt',()=>{const _0x309874=this['_findOptimalIndex'](_0x4670f3),_0x5ead38=this['comments'];_0x309874-0x1!=_0x5ead38['getIndex'](_0x4670f3)&&_0x309874+0x1!=_0x5ead38['getIndex'](_0x4670f3)&&(this['_remove'](_0x4670f3),this['_add'](_0x4670f3));}),this['comments']['add'](_0x4670f3,this['_findOptimalIndex'](_0x4670f3));}['_update'](_0x402b26){const {channelId:_0x25aced,id:_0x3582af}=this;this['_repository']['fire'](bt('updateCommentThread',_0x25aced),{..._0x402b26,'channelId':_0x25aced,'threadId':_0x3582af});}['_remove'](_0x38cec0){return this['stopListening'](_0x38cec0),_0x38cec0['destroy'](),this['comments']['remove'](_0x38cec0);}['_findOptimalIndex'](_0xd77e8d){const _0x1dd8ef=this['comments']['find'](_0x4dd391=>new Date(_0x4dd391['authoredAt'])['getTime']()>new Date(_0xd77e8d['authoredAt'])['getTime']());return _0x1dd8ef?this['comments']['getIndex'](_0x1dd8ef):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
31
- _0x3b9dd7(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x23bbf6,_0x1ff399){super();const _0x1687e7=_0x23bbf6['context']['plugins']['get'](it)['me'],_0x3a08a7=_0x23bbf6['getCommentThread'](_0x1ff399['threadId']),_0x1affa7=0x0===_0x3a08a7['comments']['length'],_0x2f11b4=_0x1687e7===_0x1ff399['author'];this['id']=_0x1ff399['id'],this['threadId']=_0x1ff399['threadId'],this['author']=_0x1ff399['author'],this['creator']=_0x1ff399['creator'],this['isExternal']=Boolean(_0x1ff399['attributes']&&_0x1ff399['attributes']['@external']),this['set']('content',_0x1ff399['content']),this['createdAt']=_0x1ff399['createdAt']||new Date(),this['set']('authoredAt',_0x1ff399['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3a08a7,'resolvedAt'),this['set']('attributes',_0x1ff399['attributes']||{}),this['bind']('isEditable')['to'](_0x23bbf6,'_permissions',()=>{const _0x3994c5=_0x23bbf6['getPermissions'](_0x3a08a7['channelId'])['write'],_0x5823c6=_0x23bbf6['getPermissions'](_0x3a08a7['channelId'])['modifyAll'];return _0x2f11b4&&_0x3994c5||!_0x2f11b4&&_0x5823c6;}),this['bind']('isRemovable')['to'](_0x3a08a7,'isRemovable',_0x23bbf6,'_permissions',_0xc5475c=>{const _0x59a21f=_0x23bbf6['getPermissions'](_0x3a08a7['channelId'])['write'],_0x2031d8=_0x23bbf6['getPermissions'](_0x3a08a7['channelId'])['modifyAll'];return _0x2f11b4&&_0x59a21f||_0xc5475c&&_0x1affa7||!_0x2f11b4&&_0x2031d8&&!_0x1affa7;}),this['bind']('isReadOnly')['to'](_0x3a08a7,'isReadOnly'),this['_repository']=_0x23bbf6;}get['weight'](){return Math['max'](function(_0x56fa7f){const _0x1a1b49=document['createElement']('div');return _0x1a1b49['innerHTML']=_0x56fa7f,_0x1a1b49['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2d0598){const {threadId:_0x17cca1,id:_0x12429b}=this;if(!this['_repository']['hasCommentThread'](_0x17cca1))throw new _0x15c172('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3e9a0b}=this['_repository']['getCommentThread'](_0x17cca1);this['_repository']['fire'](bt('updateComment',_0x3e9a0b,_0x17cca1),{'channelId':_0x3e9a0b,'threadId':_0x17cca1,'commentId':_0x12429b,..._0x2d0598});}['setAttribute'](_0x1cfd7a,_0x5998be){const _0x16b6ce=It(this['attributes']);At(_0x16b6ce,_0x1cfd7a,_0x5998be),this['update']({'attributes':_0x16b6ce});}['removeAttribute'](_0x34bce1){const _0x524a27=It(this['attributes']);yt(_0x524a27,_0x34bce1),this['update']({'attributes':_0x524a27});}['remove'](_0x4225ce={}){if(!_0x4225ce['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1c514f,id:_0x33f5c6}=this;if(!this['_repository']['hasCommentThread'](_0x1c514f))throw new _0x15c172('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x58e247}=this['_repository']['getCommentThread'](_0x1c514f);this['_repository']['fire'](bt('removeComment',_0x58e247,_0x1c514f),{'channelId':_0x58e247,'threadId':_0x1c514f,'commentId':_0x33f5c6,..._0x4225ce});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x4443ac,..._0x5ba61f){for(const _0x2e62d9 of _0x5ba61f)void 0x0!==_0x2e62d9&&(_0x4443ac+=':'+String(_0x2e62d9));return _0x4443ac;}class J extends _0x3ea4db{['refresh'](){const _0x4bd75f=this['editor']['model']['document']['selection'];for(const _0x2c702b of _0x4bd75f['getRanges']())if(this['_hasContent'](_0x2c702b))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x3977f4=_0x35b95b()}={}){const _0x2421e3=this['editor']['model'],_0x344b58=[];for(const _0xb8ded4 of _0x2421e3['document']['selection']['getRanges']())this['_hasContent'](_0xb8ded4)&&_0x344b58['push'](this['_trimToContent'](_0xb8ded4));_0x2421e3['change'](_0x2f6ed8=>{for(const _0x644c7 of _0x344b58){const _0x4552a1=_0x35b95b()['substr'](0x1,0x5),_0x2d74fd='comment:'+_0x3977f4+':'+_0x4552a1;_0x2f6ed8['addMarker'](_0x2d74fd,{'range':_0x644c7,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x11efd5){for(const _0x20d0f1 of _0x11efd5['getItems']())if(this['_itemIsContent'](_0x20d0f1))return!0x0;return!0x1;}['_itemIsContent'](_0xd48ce1){return _0xd48ce1['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xd48ce1)&&!_0xd48ce1['is']('element','tableCell');}['_trimToContent'](_0x55a4a0){const _0x3a2ef6=_0x42ad7f=>!this['_itemIsContent'](_0x42ad7f['item']),_0x5835aa=_0x55a4a0['start']['getLastMatchingPosition'](_0x3a2ef6),_0x5e5d4b=_0x55a4a0['end']['getLastMatchingPosition'](_0x3a2ef6,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5835aa,_0x5e5d4b);}}class P extends _0x3136d3{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d235f){super(_0x5d235f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x35f21d=this['editor'],_0x2ab2ac=_0x35f21d['model']['document']['selection'],_0x6d80ec=_0x356c72(()=>this['refreshSelectedViews'](),0xa);_0x2ab2ac['on']('change:range',(_0x42e7b9,_0x3f7b27)=>{_0x3f7b27['directChange']&&(_0x6d80ec['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x35f21d['editing']['view']['document'],'change:isFocused',(_0x1ca7fb,_0x52f39b,_0x27611f)=>{_0x27611f&&_0x6d80ec();}),this['listenTo'](_0x35f21d['ui']['focusTracker'],'change:isFocused',(_0x265b0b,_0x2b0cfd,_0xd5454a)=>{_0xd5454a||_0x35f21d['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x3d754e=>this['_editorAnnotationsData']['has'](_0x3d754e['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x137c24){if(this['_editorAnnotations']['has'](_0x137c24['view']))return;this['_editorAnnotations']['add'](_0x137c24['view']),this['editor']['ui']['focusTracker']['add'](_0x137c24['view']['element']);const _0x641c97=this['editor']['plugins']['get'](O);this['listenTo'](_0x641c97['collection'],'remove',(_0x5a6f12,_0x25e9a)=>{this['editor']['ui']['focusTracker']['remove'](_0x25e9a['view']['element']),this['_editorAnnotations']['delete'](_0x25e9a['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x24b2dd){if('function'!=typeof _0x24b2dd)throw new _0x15c172('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x24b2dd);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x597214,annotations:_0x4a50d}){const _0x14f629=[],_0x233332=this['editor']['model']['document']['selection'],_0x43db40=Array['from'](_0x233332['getRanges']());for(const [_0xc21acf,_0x3bcbdc]of this['_editorAnnotationsData']){const _0x3c2908=_0x4cbdbf(_0x3bcbdc),_0x5efbae=_0x4a50d['getByInnerView'](_0xc21acf);_0x3c2908&&_0x5efbae&&_0x14f629['push']({'annotation':_0x5efbae,'range':_0x3c2908});}function _0x4cbdbf(_0x13093b){for(const _0x47ccd9 of _0x13093b)for(const _0x25f519 of _0x43db40)if(_0x47ccd9['containsRange'](_0x25f519,!_0x233332['isCollapsed']))return _0x47ccd9;return null;}return _0x14f629['sort']((_0x473272,_0x3e2b55)=>{const _0x2c274c=_0x473272['range'],_0x45c196=_0x3e2b55['range'];if(!_0x2c274c['isEqual'](_0x45c196)){if(_0x2c274c['containsRange'](_0x45c196,!0x0))return 0x1;if(_0x45c196['containsRange'](_0x2c274c,!0x0))return-0x1;}return _0x473272['annotation']==_0x597214?-0x1:_0x3e2b55['annotation']==_0x597214?0x1:0x0;})['map'](_0x4fa7e4=>_0x4fa7e4['annotation']);}get['_editorAnnotationsData'](){const _0x1f1e7d=new Map();for(const _0x285461 of Array['from'](this['_dataCollectors']))for(const [_0x3b95c9,_0x1c9878]of _0x285461())_0x1f1e7d['set'](_0x3b95c9,_0x1c9878);return _0x1f1e7d;}}class st extends _0x3136d3{['afterInit'](){const _0xe918a2=this['editor'];if(!_0xe918a2['plugins']['has']('RestrictedEditingModeEditing'))return;_0xe918a2['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3136d3{constructor(_0x42db4c){super(_0x42db4c),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x832c91=this['editor'],_0x1d1fed=_0x832c91['commands']['get']('importWord'),_0x2c4e4b=_0x832c91['plugins']['get'](it);_0x1d1fed&&(_0x1d1fed['on']('execute',(_0x461eb9,[,_0xb39b3a])=>{_0xb39b3a['collaboration_features']={'comments':!0x0,'user_id':_0x2c4e4b['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1d1fed,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x348bfe,_0x20857a){const {comment_threads:_0x2fdf2a}=_0x20857a;_0x2fdf2a&&_0x2fdf2a['forEach'](({thread_id:_0x469228,comments:_0x2a3942,is_resolved:_0x2fd2fb})=>{const _0x394cb3=new Date(),_0x127c06=_0x2a3942['map'](({author:_0x1f5092,content:_0x134402,created_at:_0x1db8e5})=>({'content':_0x134402,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x394cb3,'attributes':{'@external':{'authorName':_0x1f5092,'createdAt':_0x1db8e5?new Date(_0x1db8e5):new Date(),'source':'importWord'}}})),_0x2653ac=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x2653ac,'threadId':_0x469228,'comments':_0x127c06,'resolvedAt':_0x2fd2fb?_0x394cb3:null});});}}class at extends _0x3136d3{constructor(_0x18a57d){super(_0x18a57d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2060fc=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2060fc,'contentInsertion',(_0x3016b0,_0x464326)=>this['_removeMarkersWithoutThreads'](_0x464326['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xcc1686){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xcc1686;const _0x20195c=this['editor']['plugins']['get']('CommentsRepository');for(const _0x131bff of _0xcc1686['keys']()){const [_0x314f2e,_0x3f8ffd]=_0x131bff['split'](':');'comment'!=_0x314f2e||_0x20195c['hasCommentThread'](_0x3f8ffd)||_0xcc1686['delete'](_0x131bff);}return _0xcc1686;}['_registerMarkerInClipboardPipeline'](){const _0x4a67ce=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2fc2d3=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2fc2d3&&_0x4a67ce['_registerMarkerToCopy']('comment',_0x2fc2d3);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x51aaa8){switch(_0x51aaa8){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x3136d3{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x29996e,_0x254854)=>{if(!_0x254854['options']['showCommentHighlights'])return null;if(_0x254854['options']['ignoreResolvedComments']){const {id:_0x280ade}=er(_0x29996e['markerName']),_0xed20a9=this['editor']['plugins']['get'](o);if(_0xed20a9['getCommentThread'](_0x280ade)?.['isResolved']&&_0x29996e['item'])return _0x254854['consumable']['consume'](_0x29996e['item'],'addMarker:'+_0x29996e['markerName']),_0x254854['consumable']['consume'](_0x29996e['item'],'removeMarker:'+_0x29996e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x33efb9=>{_0x33efb9['on']('addMarker:comment',(_0xb35110,_0x4a8356,_0x404214)=>{if(!_0x404214['options']['showCommentHighlights'])return;const _0x1be0a9=_0x4a8356['item'];if(!_0x1be0a9)return;const _0x33e104=_0x404214['mapper']['toViewElement'](_0x1be0a9);this['editor']['model']['schema']['isObject'](_0x1be0a9)&&_0x33e104&&!_0x33e104['getCustomProperty']('widget')&&_0x33e104['is']('containerElement')&&_0xe8f520(_0x33e104,_0x404214['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x311e52,{writer:_0x24d68b,options:_0x2c78ea})=>{if(!_0x2c78ea['showCommentHighlights'])return null;const _0x58bb9c=_0x24d68b['createContainerElement']('div'),_0x5a7128=_0x24d68b['createEmptyElement']('hr');return _0x24d68b['addClass']('ck-horizontal-line',_0x58bb9c),_0x24d68b['insert'](_0x24d68b['createPositionAt'](_0x58bb9c,0x0),_0x5a7128),_0x58bb9c;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x36dd7f,{writer:_0x18bd28,options:_0x409592})=>{if(!_0x409592['showCommentHighlights'])return null;const _0x4d7b9d=_0x18bd28['createContainerElement']('span'),_0xd3dd47=_0x18bd28['createEmptyElement']('img');return _0x18bd28['addClass']('image-inline',_0x4d7b9d),_0x18bd28['insert'](_0x18bd28['createPositionAt'](_0x4d7b9d,0x0),_0xd3dd47),_0x4d7b9d;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2a03e3,{writer:_0x40f7f4,options:_0x34a995})=>{if(_0x34a995['showCommentHighlights'])return _0x40f7f4['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x30f2e6,_0x48b495,_0x4c0375)=>{_0x4c0375['options']['showCommentHighlights']&&_0x30f2e6['stop']();},{'priority':'high'});}}class r extends _0x3136d3{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x263b92){super(_0x263b92),this['set']('isThreadsLoadingPaused',!0x0),_0x263b92['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5b05c0,_0x308c9e,_0x2c2764,_0x8c04e1)=>{const _0x2042c2=_0x263b92['plugins']['get'](o),_0x59bd10=_0x2c2764?er(_0x2c2764)['id']:null;_0x263b92['model']['change'](()=>{if(_0x59bd10){const _0x2210be=this['getAllMarkersForId'](_0x59bd10);for(const _0x103589 of _0x2210be)_0x263b92['editing']['reconvertMarker'](_0x103589);}if(_0x8c04e1){const {id:_0x15a9fa}=er(_0x8c04e1),_0x13aebd=_0x2042c2['getCommentThread'](_0x15a9fa);if(_0x13aebd&&_0x13aebd['unlinkedAt'])return;if(_0x13aebd&&!_0x13aebd['isAttached'])return;const _0x41abb1=this['getAllMarkersForId'](_0x15a9fa);for(const _0x53d55c of _0x41abb1)_0x263b92['editing']['reconvertMarker'](_0x53d55c);}}),_0x59bd10&&this['scrollToThreadMarker'](_0x59bd10);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x224e26=this['editor'],_0x19a71e=_0x224e26['plugins']['get'](o),_0x315073=_0x224e26['config']['get']('collaboration.channelId'),_0x359135=_0x19a71e['getCommentThreads']()['filter'](_0x30201b=>_0x30201b['channelId']!==_0x315073);_0x224e26['commands']['add']('addCommentThread',new J(_0x224e26)),this['listenTo'](_0x224e26,'change:isReadOnly',(_0x3a1b64,_0x1223d9,_0x1175d5)=>{_0x19a71e['switchReadOnly'](_0x1175d5,_0x224e26['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x19a71e,ft('addCommentThread',_0x315073),(_0xafb203,{threadId:_0x4b2f65})=>{const _0x23342d=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4b2f65);_0x23342d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4b2f65);}),this['listenTo'](_0x19a71e,ft('removeCommentThread',_0x315073),(_0x24edbb,{threadId:_0x3f202d})=>{_0x224e26['model']['enqueueChange']({'isUndoable':!0x1},_0xb4fab7=>{const _0x496692=this['getAllMarkersForId'](_0x3f202d);for(const _0x5e3956 of _0x496692)_0xb4fab7['removeMarker'](_0x5e3956);});}),this['listenTo'](_0x19a71e,ft('resolveCommentThread',_0x315073),(_0x4c0e99,{threadId:_0x51430f})=>{(this['_reconvertMarkers'](_0x51430f),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x51430f)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x19a71e,ft('reopenCommentThread',_0x315073),(_0x1e7f34,{threadId:_0xa7738f})=>{this['_reconvertMarkers'](_0xa7738f);},{'priority':'low'}),this['listenTo'](_0x19a71e,ft('addComment',_0x315073),(_0x1a45b7,{threadId:_0xd4c69e,isFromAdapter:_0x50e0a4})=>{const _0x17836a=this['getAllMarkersForId'](_0xd4c69e);if(_0x50e0a4||0x0==_0x17836a['length']||!_0x19a71e['hasCommentThread'](_0xd4c69e))return;0x1===_0x19a71e['getCommentThread'](_0xd4c69e)['length']&&_0x224e26['model']['enqueueChange']({'isUndoable':!0x1},_0x24839e=>{for(const _0x2b7bb6 of _0x17836a)_0x24839e['updateMarker'](_0x2b7bb6,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x359135);}['afterInit'](){!async function(_0x18b26d){const _0x317dd5=_0x3434bd([0x72,0x67,0x78,0x63,0x79,0x6f,0x58,0x37,0x61,0x62,0x73,0x70,0x6c,0x53,0x52,0x45,0x6b,0x49,0x42,0x4b,0x32,0x69,0x76,0x4c,0x7a,0x44,0x59,0x65,0x75,0x66,0x77,0x71,0x46,0x35,0x34,0x5a,0x6e,0x51,0x4a,0x57,0x64,0x39,0x4f,0x4d,0x41,0x43,0x4e,0x38,0x30,0x48,0x47,0x6d,0x54,0x74,0x55,0x33,0x36,0x6a,0x50,0x56,0x31,0x68]),_0x121f2e=0x32ae8dd0,_0x504605=0x32a9e4e8^_0x121f2e,_0x367b1b=window[_0x3434bd([0x44,0x61,0x74,0x65])][_0x3434bd([0x6e,0x6f,0x77])](),_0x59082e=_0x18b26d[_0x3434bd([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3628d2=new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f8795=>{_0x59082e[_0x3434bd([0x6f,0x6e,0x63,0x65])](_0x3434bd([0x72,0x65,0x61,0x64,0x79]),_0x2f8795);}),_0x3e13b9={[_0x3434bd([0x6b,0x74,0x79])]:_0x3434bd([0x45,0x43]),[_0x3434bd([0x75,0x73,0x65])]:_0x3434bd([0x73,0x69,0x67]),[_0x3434bd([0x63,0x72,0x76])]:_0x3434bd([0x50,0x2d,0x32,0x35,0x36]),[_0x3434bd([0x78])]:_0x3434bd([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]),[_0x3434bd([0x79])]:_0x3434bd([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]),[_0x3434bd([0x61,0x6c,0x67])]:_0x3434bd([0x45,0x53,0x32,0x35,0x36])},_0x508cd7=_0x59082e[_0x3434bd([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3434bd([0x67,0x65,0x74])](_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2f6bb6(){let _0x213475,_0x45959f=null,_0xa1e8a8=null;try{if(_0x508cd7==_0x3434bd([0x47,0x50,0x4c]))return _0x3434bd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x213475=_0x128f21(),!_0x213475)return _0x3434bd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x213475[_0x3434bd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xa1e8a8=_0x3695a1(_0x213475[_0x3434bd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x213475[_0x3434bd([0x6a,0x74,0x69])])),await _0x412529()?_0x3551fb()?_0xdadfcb()?_0x3434bd([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5ca1c2()?(_0x213475[_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3434bd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x45959f=_0x4c70bb(_0x3434bd([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x213475[_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3434bd([0x74,0x72,0x69,0x61,0x6c])&&(_0x45959f=_0x4c70bb(_0x3434bd([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x20e536()):_0x3434bd([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3434bd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3434bd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3434bd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xdadfcb(){const _0x4a3883=[_0x3434bd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3434bd([0x74,0x72,0x69,0x61,0x6c])][_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213475[_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x367b1b/0x3e8:0xe10*_0x504605;return _0x213475[_0x3434bd([0x65,0x78,0x70])]<_0x4a3883;}function _0x3551fb(){const _0x4a4bb7=_0x213475[_0x3434bd([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4a4bb7)return!0x1;if(_0x4a4bb7[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3434bd([0x2a])))return!0x0;if(_0x4a4bb7[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3434bd([0x43,0x4d,0x54])))return!0x0;if(_0x4a4bb7[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3434bd([0x52,0x43,0x4d,0x54]))){if(_0x462582())return!0x0;if(_0x5920e1()||_0x1630fa())return!0x0;}return!0x1;}function _0x5ca1c2(){const _0x4e35c4=_0x213475[_0x3434bd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4e35c4||0x0==_0x4e35c4[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x11ca0a}=new URL(window[_0x3434bd([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4e35c4[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11ca0a))return!0x0;const _0x15e152=_0x11ca0a[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])](_0x3434bd([0x2e]));return _0x4e35c4[_0x3434bd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x39667d=>_0x39667d[_0x3434bd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3434bd([0x2a])))[_0x3434bd([0x6d,0x61,0x70])](_0x3248c0=>_0x3248c0[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])](_0x3434bd([0x2e])))[_0x3434bd([0x73,0x6f,0x6d,0x65])](_0x414c8d=>_0x15e152[_0x3434bd([0x65,0x76,0x65,0x72,0x79])]((_0x38ffca,_0xd9038c)=>_0x414c8d[_0xd9038c]===_0x38ffca||_0x414c8d[_0xd9038c]===_0x3434bd([0x2a])));}function _0x20e536(){return _0x45959f&&_0xa1e8a8?new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x352337,_0x3fc9ca)=>{_0x45959f[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x352337,_0x3fc9ca),_0xa1e8a8[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x47acad=>{_0x47acad!=_0x3434bd([0x56,0x61,0x6c,0x69,0x64])&&_0x352337(_0x47acad);},_0x3fc9ca);}):_0x45959f||_0xa1e8a8||_0x3434bd([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3695a1(_0x4a9b98,_0x5d04b7){return new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x177685=>{if(_0x1d0b3c())return _0x177685(_0x3434bd([0x56,0x61,0x6c,0x69,0x64]));_0x41b60f(),_0x59082e[_0x3434bd([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3434bd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2153a1=!0x1;const _0x41cc5a=_0x35b95b();function _0x139632(_0x207590){return!!_0x207590&&(typeof _0x207590===_0x3434bd([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x207590===_0x3434bd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x207590[_0x3434bd([0x74,0x68,0x65,0x6e])]===_0x3434bd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x207590[_0x3434bd([0x63,0x61,0x74,0x63,0x68])]===_0x3434bd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x27add9(_0x2e1b1f){_0x4bf40e(_0x2e1b1f)[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x8fbefa=>{if(!_0x8fbefa||_0x8fbefa[_0x3434bd([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3434bd([0x6f,0x6b]))return _0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xd1e0eb(_0x43acca(_0x41cc5a+_0x5d04b7))!=_0x8fbefa[_0x3434bd([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3434bd([0x56,0x61,0x6c,0x69,0x64]);})[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x41ec4b=>(_0x5dd00b(),_0x41ec4b),()=>{const _0x331fca=_0x748002();return null==_0x331fca?(_0x5dd00b(),_0x3434bd([0x56,0x61,0x6c,0x69,0x64])):_0x3434bd(_0x367b1b-_0x331fca>(0x16a209d0^_0x121f2e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x177685)[_0x3434bd([0x63,0x61,0x74,0x63,0x68])](()=>{_0x177685(_0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x24317a=0x32986350^_0x121f2e;function _0x5dd00b(){const _0x5a8d53=_0x3434bd([0x6c,0x6c,0x63,0x74,0x2d])+_0xd1e0eb(_0x43acca(_0x4a9b98)),_0xab0932=_0x2037eb(_0xd1e0eb(window[_0x3434bd([0x4d,0x61,0x74,0x68])][_0x3434bd([0x63,0x65,0x69,0x6c])](_0x367b1b/_0x24317a)));window[_0x3434bd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3434bd([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5a8d53,_0xab0932);}function _0x748002(){const _0xa97be6=_0x3434bd([0x6c,0x6c,0x63,0x74,0x2d])+_0xd1e0eb(_0x43acca(_0x4a9b98)),_0x408cab=window[_0x3434bd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3434bd([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xa97be6);return _0x408cab?window[_0x3434bd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2037eb(_0x408cab),0x10)*_0x24317a:null;}function _0x4bf40e(_0x1e45cd){return new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x179564,_0x49d45b)=>{_0x1e45cd[_0x3434bd([0x74,0x68,0x65,0x6e])](_0x179564,_0x49d45b),window[_0x3434bd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x49d45b,0x32af5910^_0x121f2e);});}}_0x59082e[_0x3434bd([0x6f,0x6e])](_0x3434bd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x46e75a,_0x4fef67)=>{if(_0x4fef67[0x0]!=_0x4a9b98)return _0x177685(_0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4fef67[0x1]={..._0x4fef67[0x1],[_0x3434bd([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x41cc5a};},{[_0x3434bd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3434bd([0x68,0x69,0x67,0x68])}),_0x59082e[_0x3434bd([0x6f,0x6e])](_0x3434bd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2554a2=>{_0x139632(_0x2554a2[_0x3434bd([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2153a1=!0x0,_0x27add9(_0x2554a2[_0x3434bd([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3434bd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3434bd([0x6c,0x6f,0x77])}),_0x3628d2[_0x3434bd([0x74,0x68,0x65,0x6e])](()=>{_0x2153a1||_0x177685(_0x3434bd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1d0b3c(){return _0x59082e[_0x3434bd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3434bd([0x76,0x69,0x65,0x77])][_0x3434bd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3434bd([0x61,0x75,0x74,0x6f]);}function _0x41b60f(){_0x59082e[_0x3434bd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3434bd([0x76,0x69,0x65,0x77])][_0x3434bd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3434bd([0x61,0x75,0x74,0x6f]);}}function _0x4c70bb(_0x268af2){const _0x1521d7=[new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3156ae=>setTimeout(_0x3156ae,0x32a7b31c^_0x121f2e)),_0x3628d2[_0x3434bd([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20f51a=>{let _0x458e84=0x0;_0x59082e[_0x3434bd([0x6d,0x6f,0x64,0x65,0x6c])][_0x3434bd([0x6f,0x6e])](_0x3434bd([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x36c670,_0x962781)=>{_0x962781[0x0][_0x3434bd([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x458e84++,_0x458e84==(0x32ae8c28^_0x121f2e)&&(_0x20f51a(),_0x36c670[_0x3434bd([0x6f,0x66,0x66])]());});}))];return window[_0x3434bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3434bd([0x72,0x61,0x63,0x65])](_0x1521d7)[_0x3434bd([0x74,0x68,0x65,0x6e])](()=>_0x268af2);}async function _0x1e5620(){await _0x3628d2,_0x59082e[_0x3434bd([0x6d,0x6f,0x64,0x65,0x6c])][_0x3434bd([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x26e947,_0x59082e[_0x3434bd([0x6d,0x6f,0x64,0x65,0x6c])][_0x3434bd([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x26e947,_0x59082e[_0x3434bd([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3434bd([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x462582(){return _0x4198d1(_0x3434bd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3fd727(_0x3434bd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3434bd([0x73,0x74,0x61,0x74,0x65])]==_0x3434bd([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5920e1(){return _0x4198d1(_0x3434bd([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 _0x1630fa(){return _0x4198d1(_0x3434bd([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xbd0f1c(_0x2a7d15){const _0x366184=_0x1448cc();_0x59082e[_0x366184]=_0x3434bd([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2a7d15,_0x2a7d15!=_0x3434bd([0x56,0x61,0x6c,0x69,0x64])&&_0x1e5620();}function _0x1448cc(){const _0x4563d2=window[_0x3434bd([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3434bd([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3434bd([0x6e,0x6f,0x77])]())[_0x3434bd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3434bd([0x2e]),'');let _0x4c4c19=_0x3434bd([0x72]);for(let _0x164b1e=0x0;_0x164b1e<_0x4563d2[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x164b1e+=0x2){let _0x33fb20=window[_0x3434bd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4563d2[_0x3434bd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x164b1e,_0x164b1e+0x2));_0x33fb20>=_0x317dd5[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x33fb20-=_0x317dd5[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4c4c19+=_0x317dd5[_0x33fb20];}return _0x4c4c19;}function _0x128f21(){const _0x53f161=_0x508cd7[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])](_0x3434bd([0x2e]));if(0x3!=_0x53f161[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x599f9d(_0x53f161[0x1]);function _0x599f9d(_0x1e0e2a){const _0x5e9a74=_0x35fe04(_0x1e0e2a);return _0x5e9a74&&_0x479115()?_0x5e9a74:null;function _0x479115(){const _0x1319e5=_0x5e9a74[_0x3434bd([0x6a,0x74,0x69])],_0x3fe69e=window[_0x3434bd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1319e5[_0x3434bd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1319e5[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3eda25={..._0x5e9a74,[_0x3434bd([0x6a,0x74,0x69])]:_0x1319e5[_0x3434bd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1319e5[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3eda25[_0x3434bd([0x76,0x63])],_0x43acca(_0x3eda25)==_0x3fe69e;}}}async function _0x412529(){let _0x931fad=!0x0;try{const _0x4ab61f=_0x508cd7[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])](_0x3434bd([0x2e])),[_0x18f826,_0x51fccd,_0x40778c]=_0x4ab61f;return _0x2e4028(_0x18f826),await _0x157d49(_0x18f826,_0x51fccd,_0x40778c),_0x931fad;}catch{return!0x1;}function _0x2e4028(_0x338f08){const _0x5b0d85=_0x35fe04(_0x338f08);_0x5b0d85&&_0x5b0d85[_0x3434bd([0x61,0x6c,0x67])]==_0x3434bd([0x45,0x53,0x32,0x35,0x36])||(_0x931fad=!0x1);}async function _0x157d49(_0x57f6e5,_0x53a9df,_0x38aefa){const _0x4c7377=window[_0x3434bd([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3434bd([0x66,0x72,0x6f,0x6d])](_0x1f5a3c(_0x38aefa),_0x9b75f2=>_0x9b75f2[_0x3434bd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xbd01a3=new window[(_0x3434bd([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3434bd([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x57f6e5+_0x3434bd([0x2e])+_0x53a9df),_0x14d4ac=window[_0x3434bd([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3434bd([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x14d4ac)return;const _0x3809b9=await _0x14d4ac[_0x3434bd([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3434bd([0x6a,0x77,0x6b]),_0x3e13b9,{[_0x3434bd([0x6e,0x61,0x6d,0x65])]:_0x3434bd([0x45,0x43,0x44,0x53,0x41]),[_0x3434bd([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3434bd([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3434bd([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x14d4ac[_0x3434bd([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3434bd([0x6e,0x61,0x6d,0x65])]:_0x3434bd([0x45,0x43,0x44,0x53,0x41]),[_0x3434bd([0x68,0x61,0x73,0x68])]:{[_0x3434bd([0x6e,0x61,0x6d,0x65])]:_0x3434bd([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3809b9,_0x4c7377,_0xbd01a3)||(_0x931fad=!0x1);}}function _0x35fe04(_0x2ec8a3){return _0x2ec8a3[_0x3434bd([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3434bd([0x65,0x79]))?JSON[_0x3434bd([0x70,0x61,0x72,0x73,0x65])](_0x1f5a3c(_0x2ec8a3)):null;}function _0x1f5a3c(_0x1bcdda){return window[_0x3434bd([0x61,0x74,0x6f,0x62])](_0x1bcdda[_0x3434bd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3434bd([0x2b]))[_0x3434bd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3434bd([0x2f])));}function _0x43acca(_0x3c947f){let _0x2cc6a6=0x1505;function _0x57bf11(_0x50ce11){for(let _0xcf2cc5=0x0;_0xcf2cc5<_0x50ce11[_0x3434bd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcf2cc5++){const _0x181ddb=_0x50ce11[_0x3434bd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xcf2cc5);_0x2cc6a6=(_0x2cc6a6<<0x5)+_0x2cc6a6+_0x181ddb,_0x2cc6a6&=_0x2cc6a6;}}function _0x402b42(_0x4ba1ae){Array[_0x3434bd([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4ba1ae)?_0x4ba1ae[_0x3434bd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x402b42):_0x4ba1ae&&typeof _0x4ba1ae==_0x3434bd([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3434bd([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4ba1ae)[_0x3434bd([0x73,0x6f,0x72,0x74])]()[_0x3434bd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2aba06,_0x33b638])=>{_0x57bf11(_0x2aba06),_0x402b42(_0x33b638);}):_0x57bf11(window[_0x3434bd([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4ba1ae));}return _0x402b42(_0x3c947f),_0x2cc6a6>>>0x0;}function _0xd1e0eb(_0xb9fe72){return _0xb9fe72[_0x3434bd([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3434bd([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3434bd([0x30]));}function _0x2037eb(_0x215ef4){return _0x215ef4[_0x3434bd([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3434bd([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3434bd([0x6a,0x6f,0x69,0x6e])]('');}function _0x4198d1(_0x3593a1){return _0x59082e[_0x3434bd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3434bd([0x68,0x61,0x73])](_0x3593a1);}function _0x3fd727(_0x5119ae){return _0x59082e[_0x3434bd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3434bd([0x67,0x65,0x74])](_0x5119ae);}function _0x26e947(){}function _0x3434bd(_0x4dc682){return _0x4dc682['map'](_0x3a314b=>String['fromCharCode'](_0x3a314b))['join']('');}_0xbd0f1c(await _0x2f6bb6());}(this);}['destroy'](){const _0x2800b6=this['editor']['plugins']['get'](o),_0xb7c8d8=this['editor']['config']['get']('collaboration.channelId');for(const _0x429dfd of _0x2800b6['getCommentThreads']({'channelId':_0xb7c8d8}))_0x2800b6['_detachCommentThread'](_0x429dfd['id']),_0x2800b6['_threads']['delete'](_0x429dfd['id']);super['destroy']();}['hasMarkerForId'](_0x46f2c2){return this['getAllMarkersForId'](_0x46f2c2)['length']>0x0;}['getAllMarkersForId'](_0x4a11c0){const _0x48b711=[];for(const _0x48aaa0 of this['editor']['model']['markers'])_0x48aaa0['name']['startsWith']('comment:'+_0x4a11c0)&&_0x48b711['push'](_0x48aaa0);return _0x48b711;}['scrollToThreadMarker'](_0x439015){const _0x2553a4=this['_getTargetForId'](_0x439015);_0x2553a4&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x439015&&rt({'target':_0x2553a4[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3c658d){this['editor']['model']['change'](()=>{for(const _0x22b994 of this['getAllMarkersForId'](_0x3c658d))this['editor']['editing']['reconvertMarker'](_0x22b994);});}['_attachArchivedThread'](_0x270c8b){const _0x1ed3ce=this['editor']['plugins']['get'](o),_0xccecab=this['editor']['plugins']['get'](P),_0x287e8c=_0x1ed3ce['getCommentThread'](_0x270c8b);if(!_0x287e8c['isAttached']){const _0x135864=_0x287e8c['attachTo'](()=>this['_getTargetForId'](_0x287e8c['id']));_0xccecab['registerAnnotation'](_0x135864),_0x287e8c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xd19b91=this['editor'],_0x281465=_0xd19b91['plugins']['get'](it);_0xd19b91['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x197747,_0x3ad018)=>{const {id:_0x2eba6d}=er(_0x197747['markerName']),_0x25f5e2=_0xd19b91['plugins']['get'](o)['getCommentThread'](_0x2eba6d),_0x187c46=this['activeMarker']&&er(this['activeMarker'])['id']===_0x2eba6d;let _0x1da78d;if(_0x25f5e2&&_0x25f5e2['isResolved']&&!_0x187c46&&_0x197747['item'])return _0x3ad018['consumable']['consume'](_0x197747['item'],'addMarker:'+_0x197747['markerName']),_0x3ad018['consumable']['consume'](_0x197747['item'],'removeMarker:'+_0x197747['markerName']),null;const _0x53bca1=['ck-comment-marker'];return _0x187c46&&_0x53bca1['push']('ck-comment-marker--active'),_0x1da78d=_0x25f5e2?.['length']?_0x25f5e2['comments']['first']['author']['id']:_0x281465['me']['id'],{'classes':_0x53bca1,'attributes':{'data-comment':_0x2eba6d,'data-author-id':_0x1da78d}};}}),_0xd19b91['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5976bf,{options:_0x53c1c5})=>{if(_0x53c1c5['showCommentHighlights'])return null;const _0x28523d=_0xd19b91['plugins']['get'](o),_0x58e71b=_0xd19b91['model']['markers']['get'](_0x5976bf),{id:_0x2ec3f5,part:_0x28d02f}=er(_0x5976bf);return _0x58e71b&&!_0x58e71b['affectsData']||_0x53c1c5['ignoreResolvedComments']&&_0x28523d['getCommentThread'](_0x2ec3f5)?.['isResolved']?null:{'group':'comment','name':_0x28d02f?_0x2ec3f5+':'+_0x28d02f:_0x2ec3f5};}}),_0xd19b91['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1c63cd,{writer:_0x1115b2})=>_0x1115b2['createElement']('$marker',{'data-name':'comment:'+_0x1c63cd['getAttribute']('id')})}),_0xd19b91['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x758080=this['editor'],_0x37ce67=_0x758080['plugins']['get'](o),_0x4a2f01=new Set(),_0x239df7=new Set();_0x758080['model']['document']['registerPostFixer'](_0x570bce=>{let _0x5297b6=!0x1;for(const {name:_0xaa7623,data:_0x1ac7fe}of _0x758080['model']['document']['differ']['getChangedMarkers']()){const {group:_0x6aadd6,id:_0x376579}=er(_0xaa7623);let _0x4a361c=_0x1ac7fe['newRange'];if('comment'!==_0x6aadd6||!_0x4a361c)continue;const _0x4d0485='$graveyard'===_0x4a361c['root']['rootName'];_0x4d0485||(_0x4a361c=dt(_0x4a361c,_0x758080['model']),!_0x4a361c||_0x4a361c['isCollapsed']||!_0x1ac7fe['newRange']||_0x4a361c['isEqual'](_0x1ac7fe['newRange']))?_0x758080['model']['hasContent'](_0x4a361c)&&!_0x4d0485?this['isThreadsLoadingPaused']?_0x4a2f01['add'](_0xaa7623):this['_handleThreadMarker'](_0xaa7623,_0x376579):(_0x239df7['add'](_0xaa7623),_0x4a2f01['delete'](_0xaa7623),_0x570bce['removeMarker'](_0xaa7623),_0x5297b6=!0x0):(_0x570bce['updateMarker'](_0xaa7623,{'range':_0x4a361c}),_0x5297b6=!0x0);}return _0x5297b6;}),this['on']('change:isThreadsLoadingPaused',(_0x570ed5,_0x472406,_0x7e03bb)=>{if(!_0x7e03bb&&_0x4a2f01['size'])for(const _0x3ad61e of _0x4a2f01){const {id:_0x45636c}=er(_0x3ad61e);_0x4a2f01['delete'](_0x3ad61e),_0x758080['model']['markers']['get'](_0x3ad61e)&&this['_handleThreadMarker'](_0x3ad61e,_0x45636c);}}),this['listenTo'](_0x758080['model']['document'],'change',()=>{for(const {name:_0x35dedf,data:{newRange:_0x1de249}}of _0x758080['model']['document']['differ']['getChangedMarkers']()){const {group:_0x178843,id:_0x40de01}=er(_0x35dedf);if('comment'!==_0x178843)continue;const _0x3b2de6=_0x37ce67['getCommentThread'](_0x40de01),_0x535230=this['hasMarkerForId'](_0x40de01);_0x3b2de6&&(!_0x3b2de6['_hasTargetInContent']&&_0x1de249&&_0x758080['editing']['view']['once']('render',()=>{const _0x43c1a3=_0x758080['plugins']['get'](O),_0x494bcc=_0x37ce67['_threadToController']['get'](_0x3b2de6)['view'];_0x43c1a3['getByInnerView'](_0x494bcc)['refreshVisibility']();},{'priority':'low'}),_0x3b2de6['_hasTargetInContent']=_0x535230||!!_0x1de249),_0x1de249||(_0x239df7['add'](_0x35dedf),_0x4a2f01['delete'](_0x35dedf));}for(const _0x421875 of _0x239df7){const {id:_0x273f56}=er(_0x421875),_0x4073a4=_0x37ce67['getCommentThread'](_0x273f56);if(_0x4a2f01['delete'](_0x421875),!_0x4073a4)continue;const _0x442db2=this['hasMarkerForId'](_0x273f56);_0x442db2||_0x4073a4['isSubmitted']?_0x442db2||_0x4073a4['unlinkedAt']||_0x4073a4['setUnlinkedAt'](new Date()):_0x4073a4['remove']();}_0x239df7['clear']();});}['_handleInitialThreads'](_0x16729d){_0x16729d['forEach'](_0x1df388=>{_0x1df388['unlinkedAt']&&this['_attachArchivedThread'](_0x1df388['id']);});}['_getTargetForId'](_0x5e7082){const _0x2e56a0=this['editor'],_0x5cfd71=this['getAllMarkersForId'](_0x5e7082);return et(_0x2e56a0['editing'],_0x5cfd71);}['_getTextContext'](_0x4c5813){const _0x5a60d9=this['getAllMarkersForId'](_0x4c5813);let _0x45852c='',_0x1d6f58=!0x1;for(const _0x2dbf95 of _0x5a60d9){const _0x183762=_0x2dbf95['getRange']();for(const _0xeef57a of Array['from'](_0x183762['getItems']()))_0xeef57a['is']('$textProxy')?(_0x45852c&&_0x1d6f58&&(_0x45852c+='\x20',_0x1d6f58=!0x1),_0x45852c+=_0xeef57a['data']):_0x1d6f58=!0x0;_0x1d6f58=!0x0;}return _0x45852c['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5b4cc4,_0x3db4bb){const _0x2524da=this['editor'],_0x3e07fe=_0x2524da['plugins']['get'](o);let _0x2746a8=_0x3e07fe['getCommentThread'](_0x3db4bb);const _0x1d6e5a=_0x2524da['config']['get']('collaboration.channelId'),_0x13b04a=_0x2524da['plugins']['get'](P);if(_0x2746a8&&(_0x2746a8['unlinkedAt']&&_0x2746a8['setUnlinkedAt'](null),_0x2746a8['isAttached']))return _0x2746a8;return!this['getAllMarkersForId'](_0x3db4bb)[0x0]['managedUsingOperations']?_0x2524da['editing']['view']['once']('render',()=>{if(_0x3e07fe['getCommentThread'](_0x3db4bb))return;const _0x558676=_0x2524da['plugins']['get'](O);_0x2746a8=_0x3e07fe['openNewCommentThread']({'channelId':_0x1d6e5a,'threadId':_0x3db4bb,'target':()=>this['_getTargetForId'](_0x3db4bb),'context':{'type':'text','value':this['_getTextContext'](_0x3db4bb)}});const _0x1ccaa3=_0x3e07fe['_threadToController']['get'](_0x2746a8)['view'],_0x1a8b38=_0x558676['getByInnerView'](_0x1ccaa3);_0x1a8b38&&_0x13b04a['registerAnnotation'](_0x1a8b38);},{'priority':'low'}):_0x3e07fe['fetchCommentThread']({'channelId':_0x1d6e5a,'threadId':_0x3db4bb})['then'](_0x40c1bb=>{if('destroyed'!==_0x2524da['state']){if(_0x2746a8=_0x40c1bb,_0x2746a8&&!_0x2746a8['isAttached']){const _0x55a64e=_0x2746a8['attachTo'](()=>this['_getTargetForId'](_0x3db4bb));_0x13b04a['registerAnnotation'](_0x55a64e),_0x2746a8['isResolved']&&this['_reconvertMarkers'](_0x3db4bb);}else{if(!_0x2746a8){const _0x3ae8cc=this['getAllMarkersForId'](_0x3db4bb);_0x2524da['model']['change'](_0x751c83=>{for(const _0x324ab0 of _0x3ae8cc)_0x751c83['removeMarker'](_0x324ab0);});}}}}),_0x2746a8;}['_handleThreadMarker'](_0x54e392,_0x5be235){const _0x2e5604=this['_attachMarkerToThread'](_0x54e392,_0x5be235);_0x2e5604&&!_0x2e5604['context']&&_0x2e5604['setContext']({'type':'text','value':this['_getTextContext'](_0x5be235)});}['_initAriaMarkerChangeAnnouncements'](){const _0x31a571=this['editor'];ot(_0x31a571['model'],({left:_0x5bf617,entered:_0x5ab22e})=>{for(const _0x8cc322 of _0x5bf617)if(mt(_0x8cc322)){_0x31a571['ui']['ariaLiveAnnouncer']['announce'](E(_0x31a571['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3e73fc of _0x5ab22e)if(mt(_0x3e73fc)){_0x31a571['ui']['ariaLiveAnnouncer']['announce'](E(_0x31a571['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x8ce7cf)));break;}});}}function ft(_0x571329,_0x26caf4){return _0x26caf4?_0x571329+':'+_0x26caf4:_0x571329;}function er(_0x1752eb){const _0x5b13a7=_0x1752eb['split'](':');return{'group':_0x5b13a7[0x0],'id':_0x5b13a7[0x1],'part':_0x5b13a7[0x2]};}function dt(_0x24be73,_0x39c9ae){const _0x1bf78f=_0x39c9ae['schema'],_0x4924ff=_0x39c9ae['createRange'](_0x24be73['start']);for(const _0x209410 of _0x24be73['getWalker']()){const {type:_0x5b5df8,item:_0x11cb02,nextPosition:_0x77fd39}=_0x209410;if('text'===_0x5b5df8||_0x1bf78f['isObject'](_0x11cb02)){const _0x36701f=_0x39c9ae['createPositionBefore'](_0x11cb02);_0x4924ff['isCollapsed']&&(_0x4924ff['start']=_0x36701f),_0x4924ff['end']=_0x77fd39;}}return _0x4924ff;}function mt(_0x2272d3){return'comment'===er(_0x2272d3['name'])['group'];}class i extends _0x3136d3{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x24404f=this['editor'],_0x48b910=_0x24404f['plugins']['get'](o),_0x323201=_0x24404f['plugins']['get'](r),_0x12ee92=_0x24404f['plugins']['get'](O),_0x55b229=_0x24404f['plugins']['get'](P);_0x24404f['ui']['componentFactory']['add']('comment',()=>{const _0x401d55=this['_createUIButton'](_0x501ccc);return _0x401d55['tooltip']=!0x0,_0x401d55;}),_0x24404f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1d3340)),_0x55b229['addSourceCollector'](()=>{const _0x35cb77=[];for(const [_0x40350b,_0x1284b8]of _0x48b910['_threadToController']){const _0x1d868e=_0x323201['getAllMarkersForId'](_0x40350b['id']),_0x2e71a9=_0x1d868e['map'](_0x3d60f5=>_0x3d60f5['getRange']());_0x1d868e['length']>0x0&&_0x35cb77['push']([_0x1284b8['view'],_0x2e71a9]);}return _0x35cb77;}),this['listenTo'](_0x12ee92,'change:activeAnnotations',(_0x29b37f,_0x154dd9,_0x3ed87c)=>{const _0x4c7133=Array['from'](_0x3ed87c)['map'](_0x39d7ac=>_0x39d7ac['innerView'])['find'](_0x1ec084=>_0x48b910['_viewToController']['has'](_0x1ec084));if(!_0x4c7133)return void(_0x323201['activeMarker']=null);const _0x504765=_0x48b910['_viewToController']['get'](_0x4c7133)['model']['id'],_0x4c30f8='comment:'+_0x504765;_0x504765&&_0x323201['hasMarkerForId'](_0x504765)?_0x323201['activeMarker']=_0x4c30f8:_0x323201['activeMarker']&&(_0x323201['activeMarker']=null);}),this['listenTo'](_0x48b910,'removeCommentThread',(_0x2eedd4,{threadId:_0x524ce2,isFromAdapter:_0x4b43de})=>{!_0x4b43de&&_0x24404f['ui']['focusTracker']['isFocused']&&_0x323201['hasMarkerForId'](_0x524ce2)&&_0x24404f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x48b910,'addComment',(_0x3386f2,{threadId:_0x7b58,isFromAdapter:_0x1fc98d})=>{if(_0x1fc98d||!_0x323201['hasMarkerForId'](_0x7b58)||!_0x48b910['hasCommentThread'](_0x7b58))return;0x1===_0x48b910['getCommentThread'](_0x7b58)['length']&&(_0x24404f['editing']['view']['focus'](),_0x3386f2['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4bafae=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4b2e03;for(const _0x207280 in _0x4bafae){const _0x1a240b=_0x207280,_0x3c760b=_0x4bafae[_0x1a240b];if('commentsLicenseKeyValid'==_0x3c760b||'commentsLicenseKeyInvalid'==_0x3c760b||'commentsLicenseKeyExpired'==_0x3c760b||'commentsLicenseKeyDomainLimit'==_0x3c760b||'commentsLicenseKeyNotAllowed'==_0x3c760b||'commentsLicenseKeyEvaluationLimit'==_0x3c760b||'commentsLicenseKeyTrialLimit'==_0x3c760b||'commentsLicenseKeyUsageLimit'==_0x3c760b){delete _0x4bafae[_0x1a240b],_0x4b2e03=_0x3c760b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4b2e03&&_0x4bafae['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4b2e03&&_0x4bafae['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4b2e03&&_0x4bafae['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4b2e03&&_0x4bafae['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4b2e03&&_0x4bafae['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x4b2e03&&_0x4bafae['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x4b2e03&&_0x4bafae['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xe651f7){const _0x5512b6=this['editor'],_0xa57560=new _0xe651f7(_0x5512b6['locale']),_0x438731=_0x5512b6['commands']['get']('addCommentThread');return _0xa57560['set']({'label':E(_0x5512b6['locale'],'Comment'),'icon':_0x4f9c07}),_0xa57560['bind']('isEnabled')['to'](_0x438731),this['listenTo'](_0xa57560,'execute',()=>{_0x438731['execute']();}),_0xa57560;}}class s extends _0x3136d3{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x32c04a){super(_0x32c04a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x204418,_0x379f52,_0x279463)=>{_0x279463?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x93b0d4,_0x3342d2]of this['editor']['commands'])_0x3342d2['affectsData']&&'addCommentThread'!==_0x93b0d4&&_0x3342d2['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x30dcda=this['editor']['editing']['view']['document'];this['listenTo'](_0x30dcda,'cut',_0xa55c05=>_0xa55c05['stop'](),{'priority':'highest'}),this['listenTo'](_0x30dcda,'clipboardInput',_0x8fb011=>_0x8fb011['stop'](),{'priority':'highest'}),this['listenTo'](_0x30dcda,'delete',_0x45ae14=>_0x45ae14['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5aefd3,_0x5f4e8f]of this['editor']['commands'])_0x5f4e8f['affectsData']&&'addCommentThread'!==_0x5aefd3&&_0x5f4e8f['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 M extends _0x2c6a5a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3be377){super(_0x3be377),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4893ee=this['context']['plugins']['get'](O);this['listenTo'](_0x4893ee,'_activateAnnotation',(_0x4a630a,_0x33a629)=>{for(const _0x130799 of this['activeUIs']){const _0x233736=this['_uis']['get'](_0x130799);(0x0,this['uisData']['get'](_0x130799)['filter'])(_0x33a629)&&_0x233736['setActiveAnnotation'](_0x33a629);}}),this['listenTo'](_0x4893ee,'_deactivateAllAnnotations',()=>{for(const _0x383ba0 of this['activeUIs']){this['_uis']['get'](_0x383ba0)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4893ee['_visibleAnnotations'],'add',(_0xca25ff,_0x56c98e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x56c98e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3c535e){return this['activeUIs']['has'](_0x3c535e);}['activate'](_0x207d88,_0x1e3cae=this['defaultFilter']){const _0xfc9a1c=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x207d88))throw new _0x15c172('annotationsuis-missing-ui',this,{'uiName':_0x207d88});this['isActive'](_0x207d88)&&this['deactivate'](_0x207d88),this['activeUIs']['add'](_0x207d88);const _0x5c0e16=new _();!function({source:_0x7aec5c,target:_0x5e531d,filter:_0x28b428}){for(const _0x1b1598 of _0x7aec5c)_0x28b428(_0x1b1598)&&_0x5e531d['add'](_0x1b1598);_0x5e531d['listenTo'](_0x7aec5c,'add',(_0x541b40,_0x35cbbb)=>{_0x28b428(_0x35cbbb)&&_0x5e531d['add'](_0x35cbbb);}),_0x5e531d['listenTo'](_0x7aec5c,'remove',(_0x23ad4a,_0x27ec94)=>{_0x5e531d['has'](_0x27ec94)&&_0x5e531d['remove'](_0x27ec94);});}({'source':_0xfc9a1c['_visibleAnnotations'],'target':_0x5c0e16,'filter':_0x1e3cae}),this['uisData']['set'](_0x207d88,{'collection':_0x5c0e16,'filter':_0x1e3cae});const _0x571a08=this['_uis']['get'](_0x207d88);_0x571a08['attach'](_0x5c0e16),this['listenTo'](_0x571a08,'change:activeAnnotation',(_0x3aace7,_0x2ec78c,_0x140a88,_0x607c32)=>{_0x607c32&&_0xfc9a1c['_removeActiveAnnotation'](_0x607c32),_0x140a88&&_0xfc9a1c['_addActiveAnnotation'](_0x140a88);});}['deactivate'](_0x2c3bb0){if(this['activeUIs']['delete'](_0x2c3bb0),!this['_uis']['has'](_0x2c3bb0))throw new _0x15c172('annotationsuis-missing-ui',this,{'uiName':_0x2c3bb0});const _0x530c97=this['_uis']['get'](_0x2c3bb0);_0x530c97['detach'](),this['stopListening'](_0x530c97),this['uisData']['get'](_0x2c3bb0)['collection']['destroy'](),this['uisData']['delete'](_0x2c3bb0);}['switchTo'](_0x1dc9c4){if(!this['_uis']['has'](_0x1dc9c4))throw new _0x15c172('annotationsuis-missing-ui',this,{'uiName':_0x1dc9c4});const _0x332040=this['context']['plugins']['get'](O),_0xc690ce=Array['from'](_0x332040['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1dc9c4);const _0x1140f2=this['_uis']['get'](_0x1dc9c4);_0x1140f2['setActiveAnnotation'](_0xc690ce),_0x1140f2['_setSelectedAnnotations']&&_0xc690ce&&_0x1140f2['_setSelectedAnnotations']([_0xc690ce]);}['deactivateAll'](){for(const _0x43fe3a of this['activeUIs'])this['deactivate'](_0x43fe3a);}['register'](_0x7e59b7,_0x3f3575){if(this['_uis']['has'](_0x7e59b7))throw new _0x15c172('annotationsuis-register-already-registered');if('function'!=typeof _0x3f3575['attach']||'function'!=typeof _0x3f3575['detach']||'function'!=typeof _0x3f3575['setActiveAnnotation'])throw new _0x15c172('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x7e59b7,_0x3f3575);}['refilterAnnotations'](){const _0x42d2e4=this['context']['plugins']['get'](O)['collection'],_0x2cee74=new Map(),_0x8a6cd2=Array['from'](this['activeUIs']);for(const _0x2fcfdd of this['activeUIs']){const _0xfe4a04=this['uisData']['get'](_0x2fcfdd)['collection'];for(const _0x5b863f of _0xfe4a04)_0x2cee74['set'](_0x5b863f,_0x2fcfdd);}for(const _0x1bda8d of _0x42d2e4){const _0x2ef813=_0x2cee74['get'](_0x1bda8d);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1bda8d);const _0x2c12ae=_0x8a6cd2['find'](_0x1d716d=>this['uisData']['get'](_0x1d716d)['filter'](_0x1bda8d));_0x2ef813!==_0x2c12ae&&(_0x2ef813&&this['uisData']['get'](_0x2ef813)['collection']['remove'](_0x1bda8d),_0x2c12ae&&this['uisData']['get'](_0x2c12ae)['collection']['add'](_0x1bda8d));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x566e07){const _0x110adb=[];for(const _0x139e06 of this['activeUIs']){(0x0,this['uisData']['get'](_0x139e06)['filter'])(_0x566e07)&&_0x110adb['push'](_0x139e06);}if(_0x110adb['length']>0x1)throw new _0x15c172('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x110adb,'annotationType':_0x566e07['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2c4ff2){super(_0x2c4ff2);const _0x5d956f=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 _0x4998e4(),this['focusCycler']=new _0x4a5462({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5d956f['to']('class')],'style':{'minHeight':_0x5d956f['to']('minHeight',_0x36a80b=>'number'==typeof _0x36a80b?pi(_0x36a80b+0xa):null)},'dir':_0x2c4ff2['uiLanguageDirection'],'role':'application','aria-label':E(_0x2c4ff2,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x2c4ff2,'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',_0xcce857=>{this['_updateItemPositionInFocusables'](_0xcce857['source']);}),this['list']['forEach'](_0xe3a70a=>{this['focusTracker']['add'](_0xe3a70a['element']),this['_updateItemPositionInFocusables'](_0xe3a70a);}),this['list']['on']('change',(_0x1b95a1,_0x5726ee)=>{for(const _0x2b96e9 of _0x5726ee['removed'])this['focusTracker']['remove'](_0x2b96e9['element']),this['focusables']['remove'](_0x2b96e9);for(const _0x1bbaae of _0x5726ee['added'])this['focusTracker']['add'](_0x1bbaae['element']),this['_updateItemPositionInFocusables'](_0x1bbaae);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x55bd13){const _0x4e2b6e=this['focusables']['getIndex'](_0x55bd13);let _0x22bb47,_0x4d4b43;for(const _0x2aa458 of this['focusables'])if(_0x55bd13['top']<_0x2aa458['top']){_0x22bb47=_0x2aa458;break;}if(_0x4d4b43=_0x22bb47?this['focusables']['getIndex'](_0x22bb47):this['focusables']['length'],-0x1!==_0x4e2b6e){if(_0x4e2b6e===_0x4d4b43-0x1)return;this['focusables']['remove'](_0x55bd13),_0x4d4b43=_0x22bb47?this['focusables']['getIndex'](_0x22bb47):this['focusables']['length'];}this['focusables']['add'](_0x55bd13,_0x4d4b43);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x47b82e){super(_0x47b82e),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x457519,_0x4d59dc)=>_0x457519+_0x4d59dc),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x48adad=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x48adad['to']('isAnimationDisabled',_0x3dd824=>_0x3dd824?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x48adad['to']('top',_0x4b195f=>Ht(_0x4b195f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3a6cc2=this['element']['clientHeight'];_0x3a6cc2&&(this['height']=_0x3a6cc2);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2c6a5a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x13bdd7){super(_0x13bdd7),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 _0x1c582f=this['context']['config']['get']('sidebar.container');_0x1c582f&&this['setContainer'](_0x1c582f);}['setContainer'](_0x40eac0){if(!y(_0x40eac0))throw new _0x15c172('sidebar-setcontainer-invalid-element');this['container']=_0x40eac0;}['_attachToContainer']({viewClass:_0x3e140e='',spaceBetweenItems:_0x56b74a=0x19}={}){if(!y(this['container']))throw new _0x15c172('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3e140e,this['_spaceBetweenItems']=_0x56b74a;}['rearrange']({removedAnnotation:_0x1694f1,previousAnnotation:_0x53c522,nextAnnotation:_0x3deecc}){const _0x2999b5=this['getSidebarItemView'](_0x1694f1);this['view']['list']['remove'](_0x2999b5),this['_destroySidebarItemView'](_0x1694f1),_0x53c522&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x53c522)),_0x3deecc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3deecc)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x369dc3,activatedAnnotation:_0x396ab4,disableAnimationOnActivatedAnnotation:_0x4bbd99}){if(this['_activeAnnotation']=_0x396ab4,_0x369dc3){_0x369dc3['isActive']=!0x1;const _0x5f31e2=this['getSidebarItemView'](_0x369dc3);_0x5f31e2&&_0x4bbd99&&(_0x5f31e2['isAnimationDisabled']=!0x1);}if(_0x396ab4){const _0x5e6e6c=this['getSidebarItemView'](_0x396ab4);_0x5e6e6c&&(_0x396ab4['isActive']=!0x0,_0x4bbd99&&(_0x5e6e6c['isAnimationDisabled']=!0x0,_0x5e6e6c['top']+=0x1),this['_alignToTargetRect'](_0x5e6e6c));}}['_detachFromContainer'](_0x36b1e2){if(this['view']['element']['remove'](),_0x36b1e2){for(const _0x47bcf2 of _0x36b1e2)this['_destroySidebarItemView'](_0x47bcf2);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3f94b2,_0x1d1dd0){_0x1d1dd0||(_0x1d1dd0=_0x3f94b2['view']);const _0x53494f=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x53494f,_0x3f94b2),this['_annotationToSidebarItemView']['set'](_0x3f94b2,_0x53494f),_0x53494f['content']['add'](_0x1d1dd0),this['listenTo'](_0x3f94b2['view'],'change:targetRect',(_0x52a8f0,_0x4fd710,_0x1d934f)=>{const _0x1b8e82=this['_getTargetTop'](_0x3f94b2,_0x1d934f);_0x53494f['_targetTop']!=_0x1b8e82&&(_0x53494f['_targetTop']=_0x1b8e82,this['_setItemTop'](_0x53494f,_0x1b8e82));}),this['listenTo'](_0x53494f,'change:top',()=>{this['_recalculate'](_0x53494f,'top');}),this['listenTo'](_0x53494f,'change:bottom',()=>{this['_recalculate'](_0x53494f,'bottom');}),this['_alignToTargetRect'](_0x53494f);const _0x144324=this['_getItemBefore'](_0x53494f);if(_0x144324)this['_alignAfterItem'](_0x144324,_0x53494f)||this['_alignToTargetRect'](_0x53494f);else this['_alignToTargetRect'](_0x53494f);return this['_updateLastItem'](),this['view']['list']['add'](_0x53494f),_0x53494f;}['_alignForTopChange'](_0x34c376){if(!_0x34c376['content']['length'])return;const _0x3ec280=this['_getItemBefore'](_0x34c376);if(!_0x3ec280)return;const _0x1ccdb7=this['_sidebarItemViewToAnnotation']['get'](_0x3ec280),_0x20dabd=this['_activeAnnotation'];_0x20dabd&&_0x20dabd===_0x1ccdb7?this['_alignAfterItem'](_0x3ec280,_0x34c376):this['_alignBeforeItem'](_0x34c376,_0x3ec280);}['_alignForBottomChange'](_0x637c01){if(!_0x637c01['content']['length'])return;const _0x47b3a6=this['_getItemAfter'](_0x637c01);if(!_0x47b3a6)return;const _0x23d485=this['_sidebarItemViewToAnnotation']['get'](_0x47b3a6),_0x446582=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x41983b=this['_activeAnnotation'];_0x41983b&&_0x41983b===_0x23d485&&_0x446582?(this['_alignBeforeItem'](_0x47b3a6,_0x637c01),this['_alignAfterItem'](_0x637c01,_0x47b3a6)):_0x41983b&&_0x41983b===_0x23d485?this['_alignBeforeItem'](_0x47b3a6,_0x637c01):this['_alignAfterItem'](_0x637c01,_0x47b3a6);}['_recalculate'](_0x31bd87,_0x35236f){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x499976,changedProp:_0x235831}of this['_recalculateBuffer'])'top'===_0x235831?this['_alignForTopChange'](_0x499976):this['_alignForBottomChange'](_0x499976);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x31bd87,'changedProp':_0x35236f});}['getSidebarItemView'](_0x978eee){return this['_annotationToSidebarItemView']['get'](_0x978eee);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x191916){const _0x3c0586=this['getSidebarItemView'](_0x191916);this['stopListening'](_0x3c0586),this['stopListening'](_0x191916['view']),_0x3c0586['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x191916),this['_sidebarItemViewToAnnotation']['delete'](_0x3c0586);}['_createSidebarView'](){const _0x2a1a43=new F(this['context']['locale']);return _0x2a1a43['render'](),this['on']('change:_lastItem',(_0x43d38e,_0x4e2166,_0x384ce5,_0x54a2e0)=>{_0x54a2e0&&_0x2a1a43['unbind']('minHeight'),_0x384ce5?_0x2a1a43['bind']('minHeight')['to'](_0x384ce5,'bottom'):_0x2a1a43['minHeight']=null;}),_0x2a1a43;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5f12f3){const _0x3eb4ef=this['_sidebarItemViewToAnnotation']['get'](_0x5f12f3),_0xbf229f=_0x3eb4ef&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3eb4ef)-0x1);return _0xbf229f&&this['getSidebarItemView'](_0xbf229f)||null;}['_getItemAfter'](_0x599e4d){const _0xe12095=this['_sidebarItemViewToAnnotation']['get'](_0x599e4d),_0x16458c=_0xe12095&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xe12095)+0x1);return _0x16458c&&this['getSidebarItemView'](_0x16458c)||null;}['_alignBeforeItem'](_0x47435a,_0x2b3988){_0x47435a['updateHeight']();const _0x6a6eec=R(_0x2b3988['bottom']+this['_spaceBetweenItems'],_0x47435a['top']);return!!_0x6a6eec&&(this['_setItemTop'](_0x2b3988,_0x2b3988['top']-_0x6a6eec),!0x0);}['_alignAfterItem'](_0x53d2fb,_0x41c189){_0x53d2fb['updateHeight']();const _0x271156=R(_0x53d2fb['bottom']+this['_spaceBetweenItems'],_0x41c189['top']);return!!_0x271156&&(this['_setItemTop'](_0x41c189,_0x41c189['top']+_0x271156,!0x1),!0x0);}['_alignToTargetRect'](_0x347f91){const _0x359323=this['_sidebarItemViewToAnnotation']['get'](_0x347f91);if(!_0x359323||!_0x359323['target']||!_0x359323['targetRect'])return;const _0x1123e1=this['_getTargetTop'](_0x359323,_0x359323['targetRect']);this['_setItemTop'](_0x347f91,_0x1123e1);}['_getTargetTop'](_0xae83c8,_0x6cc69d){if(null===_0x6cc69d)return 0x0;if(_0xae83c8['target']instanceof _0x5708d8)return _0x6cc69d['top'];{const _0x39fa54=new _0x5708d8(this['view']['element'])['top'];return _0x6cc69d['top']-_0x39fa54;}}['_setItemTop'](_0x2f0a11,_0x57fc40,_0xdd1601=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xdd1601&&(_0x57fc40=Math['max'](_0x57fc40,this['_getMaxAvailableTop'](_0x2f0a11))),_0x2f0a11['top']=_0x57fc40;}['_getMaxAvailableTop'](_0x422824){let _0x18e86c=this['_getItemBefore'](_0x422824),_0x2a52f6=0x0;for(;_0x18e86c;)_0x18e86c['updateHeight'](),_0x2a52f6+=this['_spaceBetweenItems']+_0x18e86c['height'],_0x18e86c=this['_getItemBefore'](_0x18e86c);return _0x2a52f6;}}function R(_0x3815ec,_0x2c742f){return Math['max'](_0x3815ec-_0x2c742f,0x0);}function y(_0x1d0d59){return null!==_0x1d0d59&&'object'==typeof _0x1d0d59&&0x1===_0x1d0d59['nodeType'];}class e extends _0x2c6a5a{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x30b2d9){super(_0x30b2d9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2a536e(),this['_refreshPositioningDebounced']=_0x356c72(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x349cad=this['context']['plugins']['get'](M),_0x165ab0=this['context']['plugins']['get'](z);_0x349cad['register']('wideSidebar',this),_0x165ab0['container']&&_0x349cad['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x291e31){if(_0x291e31===this['activeAnnotation'])return;const _0x4a4bb8=this['context']['plugins']['get'](z);_0x4a4bb8['_activeAnnotation']=_0x291e31;const _0x29e21e=this['activeAnnotation'];_0x4a4bb8['refresh']({'blurredAnnotation':_0x29e21e,'activatedAnnotation':_0x291e31}),this['activeAnnotation']=_0x291e31;}['attach'](_0x291718){this['annotations']=_0x291718;const _0x221b93=this['context']['plugins']['get'](z);if(_0x221b93['_annotations']=_0x291718,this['isAttached'])throw new _0x15c172('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x221b93,'set:container',()=>{this['detach'](),this['listenTo'](_0x221b93,'change:container',_0x60f550=>{_0x60f550['off'](),this['attach'](_0x291718);});}),_0x221b93['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5c628f=_0x418f6b=>{_0x418f6b['updateTargetRect'](),_0x221b93['addAnnotation'](_0x418f6b);};for(const _0xb32568 of _0x291718)_0x5c628f(_0xb32568);this['listenTo'](_0x291718,'add',(_0x1bcd19,_0xe81a8b)=>{_0x5c628f(_0xe81a8b);}),this['listenTo'](_0x291718,'remove',(_0x3fa8c7,_0x4e8135,_0x428dcc)=>{_0x221b93['rearrange']({'removedAnnotation':_0x4e8135,'previousAnnotation':_0x291718['get'](_0x428dcc-0x1),'nextAnnotation':_0x291718['get'](_0x428dcc+0x1)}),_0x4e8135===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x291718,'focus',(_0x372550,_0x2a5d4f)=>{this['setActiveAnnotation'](_0x2a5d4f);}),this['listenTo'](_0x291718,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2c92e2=this['context']instanceof _0x5e197b?this['context']['editors']:new _0x2a536e([this['context']]);for(const _0x458307 of _0x2c92e2)this['_integrateWithEditorAnnotations'](_0x458307);this['listenTo'](_0x2c92e2,'add',(_0x255bb0,_0x41cc0b)=>{this['listenTo'](_0x41cc0b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41cc0b);});}),this['listenTo'](_0x2c92e2,'remove',(_0x398571,_0x3de071)=>{_0x3de071['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3de071['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x15c172('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5cde45=this['context']['plugins']['get'](z);_0x5cde45['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5cde45),this['stopListening'](this['annotations']),this['context']instanceof _0x5e197b&&this['stopListening'](this['context']['editors']);for(const _0x120aeb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x120aeb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x226be2){if(!_0x226be2['plugins']['has']('EditorAnnotations'))return;const _0x2fc2de=_0x226be2['plugins']['get']('EditorAnnotations'),_0x196314=()=>{const _0x4c4c48=_0x2fc2de['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4c4c48[0x0]||null);};this['listenTo'](_0x2fc2de,'refresh',_0x196314),this['listenTo'](_0x2fc2de,'blur',(_0x309c8b,{isAnnotationTracked:_0x5f15d6})=>{this['activeAnnotation']&&_0x5f15d6(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2fc2de,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x38dcd2=>{_0x2fc2de['hasDomSelection']()&&(_0x196314(),_0x38dcd2['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2fc2de);}['_destroyEditorAnnotationsIntegration'](_0x2e5233){this['stopListening'](_0x2e5233),this['_editorAnnotations']['remove'](_0x2e5233);}}class C extends _0x501ccc{['counterView'];constructor(_0x5839a3){super(_0x5839a3);const _0x3eeca9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2c573e,_0x3a779f)=>_0x2c573e?'...':_0x3a779f['toString']()),this['set']('annotationType',''),this['icon']=_0x4f9c07,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3eeca9['to']('annotationType',_0x2e6656=>'ck-annotation-counter__badge--'+_0x2e6656),_0x3eeca9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3eeca9['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2c6a5a{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x588f2e){super(_0x588f2e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x13575b),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2a536e(),this['_refreshPositioningDebounced']=_0x356c72(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4f0a56(this['context']['locale']),this['balloonPanelView']=new _0x34c707(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x109b32){this['annotations']=_0x109b32;const _0x6b80a2=this['context']['plugins']['get'](z),_0x5a0896=this['balloonPanelView'];if(_0x6b80a2['_annotations']=_0x109b32,this['isAttached'])throw new _0x15c172('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x6b80a2,'set:container',()=>{this['detach'](),this['listenTo'](_0x6b80a2,'change:container',_0x48ba2f=>{_0x48ba2f['off'](),this['attach'](_0x109b32);});}),_0x6b80a2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3d547d=_0x5dfba0=>{const _0x1ac032=new C(this['context']['locale']);_0x6b80a2['addAnnotation'](_0x5dfba0,_0x1ac032),this['_annotationToNarrowView']['set'](_0x5dfba0,_0x1ac032),_0x1ac032['bind']('isDirty','annotationType','number')['to'](_0x5dfba0['view'],'isDirty','type','length'),_0x1ac032['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5a0896['content']['first']!==_0x5dfba0['view']?(this['_showBalloon'](_0x5dfba0),_0x5dfba0['view']['element']['focus'](),this['setActiveAnnotation'](_0x5dfba0)):this['setActiveAnnotation'](null);});};for(const _0x4fdc7d of _0x109b32)_0x3d547d(_0x4fdc7d);this['listenTo'](_0x109b32,'add',(_0x5018d4,_0x5781fa)=>{_0x3d547d(_0x5781fa);}),this['listenTo'](_0x109b32,'remove',(_0x3ebc32,_0x28fc59,_0x5a3e8b)=>{this['_annotationToNarrowView']['get'](_0x28fc59)['destroy'](),this['_annotationToNarrowView']['delete'](_0x28fc59),_0x6b80a2['rearrange']({'removedAnnotation':_0x28fc59,'previousAnnotation':_0x109b32['get'](_0x5a3e8b-0x1),'nextAnnotation':_0x109b32['get'](_0x5a3e8b+0x1)}),_0x28fc59===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x109b32,'focus',(_0x5c329c,_0x5b270b)=>{this['setActiveAnnotation'](_0x5b270b);}),this['listenTo'](_0x109b32,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1e5cab,_0x3a4525)=>{_0x3a4525['keyCode']===_0x16045e['esc']&&_0x5a0896['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5a0896['content']['first']),this['_hideBalloon'](),_0x3a4525['stopPropagation'](),_0x3a4525['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x49e585,_0x57e458)=>{const _0x39068e=_0x57e458['target'];_0x5a0896['isVisible']&&_0x5a0896['element']['contains'](_0x39068e)||_0x6b80a2['view']['element']['contains'](_0x39068e)||_0x49e585['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4c87a4=>_0x4c87a4['contains'](_0x39068e))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1a8cb0=this['context']instanceof _0x5e197b?this['context']['editors']:new _0x2a536e([this['context']]);for(const _0x42abf1 of _0x1a8cb0)this['_integrateWithEditorAnnotations'](_0x42abf1);this['listenTo'](_0x1a8cb0,'add',(_0x1eac2d,_0x2b4882)=>{this['listenTo'](_0x2b4882,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2b4882);});}),this['listenTo'](_0x1a8cb0,'remove',(_0x9a8461,_0x56eb31)=>{_0x56eb31['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x56eb31['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x1178de){if(_0x1178de===this['activeAnnotation'])return;const _0x31d241=this['context']['plugins']['get'](z);if(_0x31d241['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1178de,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1178de)_0x31d241['getSidebarItemView'](_0x1178de)?this['_showBalloon'](_0x1178de):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x1178de;}['detach'](){if(!this['isAttached'])throw new _0x15c172('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x34cdd1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x11cbd1=>_0x11cbd1['destroy']()),this['_annotationToNarrowView']['clear'](),_0x34cdd1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5e197b&&this['stopListening'](this['context']['editors']);for(const _0x6f608e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x6f608e);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'](_0x266a53){if(!_0x266a53['plugins']['has']('EditorAnnotations'))return;const _0x475843=_0x266a53['plugins']['get']('EditorAnnotations'),_0x282900=this['context']['plugins']['get'](z),_0x13a74f=this['annotations'],_0x24170d=this['balloonPanelView'],_0x232bc4=()=>{const _0x1540d3=_0x475843['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1540d3),this['setActiveAnnotation'](_0x1540d3[0x0]||null);};this['listenTo'](_0x475843,'refresh',_0x232bc4),this['listenTo'](_0x475843,'blur',(_0x23206e,{isAnnotationTracked:_0x4b1840})=>{this['activeAnnotation']&&_0x4b1840(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x475843,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x13a74f,'blur',_0x29c825=>{_0x475843['hasDomSelection']()&&_0x29c825['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5ef307,_0x133d83)=>{const _0x51003d=_0x133d83['target'];_0x24170d['isVisible']&&_0x24170d['element']['contains'](_0x51003d)||_0x282900['view']['element']['contains'](_0x51003d)||this['activeAnnotation']&&_0x475843['hasDomSelection']()&&(_0x232bc4(),_0x5ef307['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x475843);}['_destroyEditorAnnotationsIntegration'](_0x5223ef){_0x5223ef&&(this['stopListening'](_0x5223ef),this['_editorAnnotations']['remove'](_0x5223ef));}['_setSelectedAnnotations'](_0x175082){for(const _0x2c0069 of this['_selectedAnnotations'])_0x175082['includes'](_0x2c0069)||this['_manuallyClosedAnnotationViews']['delete'](_0x2c0069['view']);this['_selectedAnnotations']=_0x175082;}['_refreshPositioning'](){const _0x1c1693=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x1c1693['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x346dd8){if(this['_manuallyClosedAnnotationViews']['has'](_0x346dd8['view']))return;const _0x2078e2=this['balloonPanelView']['content']['first'];_0x2078e2!==_0x346dd8['view']?(_0x2078e2&&this['_detachListeners'](_0x2078e2),this['_attachListeners'](_0x346dd8['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x346dd8['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xda17cd=this['balloonPanelView']['content']['first'],_0x170402=_0xda17cd&&this['annotations']['getByView'](_0xda17cd);if(!_0x170402||!this['_annotationToNarrowView']['has'](_0x170402))return;const _0x5e89f0=this['_annotationToNarrowView']['get'](_0x170402)['element'],_0x41fb7c=(function(){const _0x3d18ce=_0x34c707['defaultPositions'];return[_0x3d18ce['southArrowNorthEast'],_0x3d18ce['northArrowSouthEast'],_0x3d18ce['southArrowNorth'],_0x3d18ce['northArrowSouth'],_0x3d18ce['southArrowNorthWest'],_0x3d18ce['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5e89f0,'positions':_0x41fb7c});}['_hideBalloon'](){const _0x4ac8e0=this['balloonPanelView'],_0x442d95=_0x4ac8e0['content']['first'];_0x442d95&&(this['_detachListeners'](_0x442d95),_0x4ac8e0['unpin'](),_0x4ac8e0['content']['clear']());}['_attachListeners'](_0x1212eb){this['listenTo'](_0x1212eb,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1212eb,'Esc',(_0x10e57f,_0x5dd585)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1212eb),this['_hideBalloon'](),_0x5dd585();});}['_detachListeners'](_0x1fb0cb){this['stopListening'](_0x1fb0cb);}}class c extends _0x3136d3{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0xf7176a,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8b7d56){super(_0x8b7d56),_0x8b7d56['editing']['view']['addObserver'](_0x56d6e7),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x8b7d56['plugins']['get'](_0xf7176a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x26ebfb=this['editor']['plugins']['get'](M);_0x26ebfb['context']===this['editor']&&(_0x26ebfb['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x2ba84f,_0x3970cc)=>{const _0x5d08af=this['_balloon'];if(this['isAttached']&&_0x5d08af['visibleView']){const _0x1de96=this['annotations']['getByView'](_0x5d08af['visibleView']);_0x1de96&&this['_closeAnnotation'](_0x1de96),_0x3970cc();}}));}['afterInit'](){const _0xa14160=this['editor']['plugins']['get'](M);_0xa14160['context']===this['editor']&&(_0xa14160['hasActive']()||_0xa14160['switchTo']('inline'));}['setActiveAnnotation'](_0x2c1444){_0x2c1444!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2c1444&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2c1444)&&this['_addAnnotationToBalloon'](_0x2c1444,!0x0),_0x2c1444['isActive']=!0x0),_0x2c1444||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2c1444);}['attach'](_0x54f49d){this['annotations']=_0x54f49d;const _0x34791c=this['editor']['plugins']['get'](M),_0x1d6aba=this['_balloon'];if(this['isAttached'])throw new _0x15c172('inlineannotations-attach-already-attached',this);if(_0x34791c['context']!==this['editor'])throw new _0x15c172('inlineannotations-not-allowed-with-context',this);const _0x5a01e3=this['editor']['plugins']['get'](P);this['listenTo'](_0x5a01e3,'refresh',()=>{const _0x3a6416=_0x5a01e3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x358c4e,_0x5862c4;!this['_forceRefresh']&&(_0x358c4e=_0x3a6416,_0x5862c4=this['_selectedAnnotations'],_0x358c4e['length']===_0x5862c4['length']&&_0x358c4e['every'](_0x4c1fde=>_0x5862c4['includes'](_0x4c1fde)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3a6416),this['setActiveAnnotation'](_0x3a6416[0x0]||null));}),this['listenTo'](_0x5a01e3,'blur',(_0x502e27,{isAnnotationTracked:_0x1a9222})=>{this['activeAnnotation']&&_0x1a9222(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x57a308,_0x6c2d5f,_0x764f1b)=>{_0x764f1b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x54f49d,'remove',(_0x136bfe,_0x1ffb34)=>{this['_removeAnnotationFromBalloon'](_0x1ffb34),_0x1ffb34===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1d6aba,'change:visibleView',(_0x1a49fe,_0x4342e0,_0x59ec46,_0x48266a)=>{_0x48266a&&this['stopListening'](_0x48266a);const _0x3856fb=_0x54f49d['getByView'](_0x59ec46);_0x59ec46&&_0x3856fb&&(this['listenTo'](_0x59ec46,'change:height',()=>{_0x1d6aba['updatePosition']();}),this['listenTo'](_0x59ec46,'Esc',()=>{this['_closeAnnotation'](_0x3856fb),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3856fb&&this['setActiveAnnotation'](_0x3856fb));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1d6aba['visibleView']&&(_0x54f49d['getByView'](_0x1d6aba['visibleView'])&&_0x1d6aba['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 _0x15c172('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x172400 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x172400);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x593c66){for(const _0x2decc9 of this['_selectedAnnotations'])_0x593c66['includes'](_0x2decc9)||this['_manuallyClosed']['delete'](_0x2decc9);for(const _0x2105fe of this['annotations'])_0x593c66['includes'](_0x2105fe)||this['_removeAnnotationFromBalloon'](_0x2105fe);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x45dad6 of _0x593c66)this['_addAnnotationToBalloon'](_0x45dad6);}this['_selectedAnnotations']=_0x593c66;}['_addAnnotationToBalloon'](_0x2e85bb,_0x48a285=!0x1){this['_manuallyClosed']['has'](_0x2e85bb)||(this['_addedAnnotations']['has'](_0x2e85bb)||this['_balloon']['hasView'](_0x2e85bb['view'])||(this['_addedAnnotations']['add'](_0x2e85bb),this['_balloon']['add']({'stackId':_0x2e85bb['view']['id'],'view':_0x2e85bb['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2e85bb)}})),_0x48a285&&this['_balloon']['showStack'](_0x2e85bb['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4486be){const _0x3ca19b=_0x4486be['target'],_0x470109=this['editor']['editing']['view'],_0x4a0618=_0x470109['document']['selection']['getFirstRange'](),_0x103108=_0x470109['domConverter']['viewRangeToDom'](_0x4a0618);if(_0x103108['collapse'](!0x0),_0x3ca19b){if(_0x3ca19b instanceof _0x5708d8)return _0x3ca19b;let _0x4f5ee4=[];for(const _0x517ed4 of _0x3ca19b)_0x4f5ee4['push'](...(_0x33dbfb=_0x517ed4['getClientRects'](),Array['from'](_0x33dbfb)['map'](DOMRect['fromRect'])));_0x4f5ee4=function(_0x367b04){const _0x16e269=[];let _0x1af9de=_0x367b04[0x0];for(let _0x3fb184=0x1;_0x3fb184<_0x367b04['length'];_0x3fb184++)B(_0x1af9de,_0x367b04[_0x3fb184])?_0x1af9de['width']+=_0x367b04[_0x3fb184]['width']:(_0x16e269['push'](_0x1af9de),_0x1af9de=_0x367b04[_0x3fb184]);return _0x16e269['push'](_0x1af9de),_0x16e269;}(_0x4f5ee4);const _0x4cb3aa=_0x103108['getBoundingClientRect']();return _0x4f5ee4['find'](_0x2bf6f3=>_0x2bf6f3['top']<=_0x4cb3aa['top']&&_0x2bf6f3['bottom']>=_0x4cb3aa['bottom']&&_0x2bf6f3['left']<=_0x4cb3aa['left']&&_0x2bf6f3['right']>=_0x4cb3aa['right'])||_0x4f5ee4[0x0];}var _0x33dbfb;return _0x4486be['targetRect']||_0x103108;}['_removeAnnotationFromBalloon'](_0x3bff69){this['_addedAnnotations']['has'](_0x3bff69)&&this['_balloon']['hasView'](_0x3bff69['view'])&&(this['_addedAnnotations']['delete'](_0x3bff69),this['_balloon']['remove'](_0x3bff69['view']));}['_closeAnnotation'](_0x50f2d1){this['_manuallyClosed']['add'](_0x50f2d1),this['_removeAnnotationFromBalloon'](_0x50f2d1);}}function B(_0x27979b,_0x56b9c3){return _0x27979b['top']===_0x56b9c3['top']&&_0x27979b['bottom']===_0x56b9c3['bottom']&&_0x27979b['right']===_0x56b9c3['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x294bf4,_0x629bb1){super(_0x294bf4),this['set']('isEmpty',!_0x629bb1['length']),this['focusTracker']=new _0x4998e4(),this['_annotationViews']=_0x629bb1,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4a5462({'focusables':_0x629bb1,'focusTracker':this['focusTracker']}),this['listenTo'](_0x629bb1,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x629bb1,'remove',(_0x4f0a6f,_0x66210)=>{_0x66210['isActive']&&this['focus'](),_0x629bb1['length']||(this['isEmpty']=!0x0);});const _0x243f9c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x294bf4,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x629bb1},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x243f9c['if']('isEmpty','ck-hidden',_0x5ab072=>!_0x5ab072)]},'children':[{'text':E(_0x294bf4,'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 _0x2362ec of this['_annotationViews'])this['focusTracker']['add'](_0x2362ec['element']);this['_annotationViews']['on']('change',(_0x1077f0,{added:_0xbc6d5b,removed:_0x233c76})=>{for(const _0x4ace75 of _0xbc6d5b)this['focusTracker']['add'](_0x4ace75['element']);for(const _0x5ece0f of _0x233c76)this['focusTracker']['remove'](_0x5ece0f['element']);});}}class f extends _0x2c6a5a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x1f5953){super(_0x1f5953),this['archivedThreads']=new _0x2a536e();}['init'](){const _0x523686=this['context'],_0x580aa8=_0x523686['plugins']['get'](o),_0x4d2704=_0x523686['plugins']['get'](O);this['listenTo'](_0x580aa8,'addCommentThread',(_0x34ef66,{threadId:_0x53f3a1})=>{const _0x46a5d9=_0x580aa8['getCommentThread'](_0x53f3a1);_0x46a5d9['archivedAt']&&this['archivedThreads']['add'](_0x46a5d9,this['_calculatePosition'](_0x46a5d9['archivedAt'])),this['listenTo'](_0x46a5d9,'change:archivedAt',(_0x530678,_0x18a263,_0x5e4caf)=>{_0x5e4caf?this['archivedThreads']['has'](_0x46a5d9)||this['archivedThreads']['add'](_0x46a5d9,this['_calculatePosition'](_0x46a5d9['archivedAt'])):this['archivedThreads']['has'](_0x46a5d9)&&this['archivedThreads']['remove'](_0x46a5d9);});}),this['listenTo'](_0x580aa8,'removeCommentThread',(_0x5634ee,{threadId:_0x1c35b0})=>{const _0x2148ab=_0x580aa8['getCommentThread'](_0x1c35b0);this['stopListening'](_0x2148ab),this['archivedThreads']['has'](_0x2148ab)&&this['archivedThreads']['remove'](_0x2148ab);},{'priority':'highest'}),this['listenTo'](_0x4d2704['collection'],'focus',(_0x46cac8,_0x47bb61)=>{_0x47bb61['isVisible']||(_0x47bb61['isActive']=!0x0,_0x4d2704['activate'](_0x47bb61));});}['_calculatePosition'](_0x209cf){const _0x22c67d=[...this['archivedThreads']]['findIndex'](_0x3c91cf=>_0x3c91cf['archivedAt']<_0x209cf);return _0x22c67d>-0x1?_0x22c67d:this['archivedThreads']['length'];}}class a extends _0x3136d3{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x15c150];}constructor(_0x2db29){super(_0x2db29),this['annotationViews']=new _0x1614c2(),this['_pendingThreads']=[];}['init'](){const _0x39e150=this['editor'],_0x3b75f4=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x39e150['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x501ccc,!0x0)),_0x39e150['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5a1fcf=this['_createCommentsArchiveButton'](_0x1d3340);return _0x5a1fcf['set']({'role':'menuitemcheckbox'}),_0x5a1fcf;});const _0x7d5f7d=_0x39e150['plugins']['get'](f),_0x3f5aa4=_0x39e150['plugins']['get']('Annotations'),_0x484de5=_0x39e150['plugins']['get']('CommentsRepository');_0x7d5f7d['archivedThreads']['forEach'](_0x2a0844=>{this['_handleNewThread'](_0x2a0844);}),this['listenTo'](_0x7d5f7d['archivedThreads'],'add',(_0x5e9380,_0x3384a4)=>{this['_handleNewThread'](_0x3384a4);}),this['listenTo'](_0x3f5aa4['collection'],'add',(_0x380e02,_0x2175d8)=>{const _0x5c4e30=this['_pendingThreads']['find'](_0x2c939b=>{const _0x18c45c=_0x484de5['_threadToController']['get'](_0x2c939b);return _0x18c45c&&_0x2175d8['innerView']===_0x18c45c['view'];});if(_0x5c4e30){const _0x26e9f1=this['_calculatePosition'](_0x5c4e30['archivedAt']);this['annotationViews']['add'](_0x2175d8['view'],_0x26e9f1),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5c4e30),0x1);}}),this['listenTo'](_0x7d5f7d['archivedThreads'],'remove',(_0x3cc82e,_0x5a182a)=>{const _0x4a73df=_0x39e150['config']['get']('collaboration.channelId');if(!_0x4a73df||_0x5a182a['channelId']===_0x4a73df){if(this['_pendingThreads']['includes'](_0x5a182a))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5a182a),0x1);else{const _0x228b0e=_0x484de5['_threadToController']['get'](_0x5a182a),_0x159ae3=_0x3f5aa4['getByInnerView'](_0x228b0e['view']);this['annotationViews']['remove'](_0x159ae3['view']),this['stopListening'](_0x159ae3['focusableElements']);}}}),this['listenTo'](_0x3f5aa4['collection'],'add',(_0x50a926,_0x5c139e)=>{this['listenTo'](_0x5c139e,'escape',_0x3b75f4);}),this['listenTo'](_0x3f5aa4['collection'],'remove',(_0x4bb06e,_0x92bbef)=>{this['stopListening'](_0x92bbef,'escape',_0x3b75f4);});}['_handleNewThread'](_0x23a2ba){const _0x446a06=this['editor']['plugins']['get']('CommentsRepository'),_0x3d7d27=this['editor']['plugins']['get']('Annotations'),_0x5bdbc2=this['editor']['config']['get']('collaboration.channelId');if(!_0x5bdbc2||_0x23a2ba['channelId']===_0x5bdbc2){const _0x27b9a1=_0x446a06['_threadToController']['get'](_0x23a2ba);if(!_0x27b9a1)return void this['_pendingThreads']['push'](_0x23a2ba);const _0x2a5ca4=this['_calculatePosition'](_0x23a2ba['archivedAt']),_0x4d4b18=_0x3d7d27['getByInnerView'](_0x27b9a1['view']);_0x4d4b18['isVisible']&&_0x3d7d27['_visibleAnnotations']['remove'](_0x4d4b18),this['annotationViews']['add'](_0x4d4b18['view'],_0x2a5ca4);}}['_calculatePosition'](_0x28565a){const _0x2f85db=this['editor']['config']['get']('collaboration.channelId'),_0x2cc919=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x1f440f=>_0x1f440f['channelId']===_0x2f85db)['findIndex'](_0x66fb26=>_0x66fb26['archivedAt']<_0x28565a);return _0x2cc919<0x0||_0x2cc919>this['annotationViews']['length']?this['annotationViews']['length']:_0x2cc919-0x1;}['_toggleDialog'](){const _0x24f80c=this['editor'],_0x4ca072=_0x24f80c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x24f80c['locale'],this['annotationViews'])),'commentsArchive'===_0x4ca072['id']?_0x4ca072['hide']():_0x4ca072['show']({'id':'commentsArchive','title':E(_0x24f80c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x380c51,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x59b2e7['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x13b5e9,_0x4dd87f=!0x1){const _0x114403=this['editor']['locale'],_0x357418=this['editor']['plugins']['get']('Dialog'),_0x4414d9=new _0x13b5e9(_0x114403);return _0x4414d9['bind']('isEnabled')['to'](this,'isEnabled'),_0x4414d9['bind']('isOn')['to'](_0x357418,'id',_0x8a0b39=>'commentsArchive'===_0x8a0b39),_0x4414d9['set']({'label':E(_0x114403,'COMMENTS_ARCHIVE'),'icon':_0x380c51,'isToggleable':!0x0}),_0x4dd87f&&(_0x4414d9['tooltip']=!0x0),this['listenTo'](_0x4414d9,'execute',()=>this['_toggleDialog']()),_0x4414d9;}['_hideDialogOnAnnotationEscape']=_0x3bedb2=>{const _0x1f8931=_0x3bedb2['source'];if(!this['annotationViews']['has'](_0x1f8931['view']))return;const _0x59cb06=this['editor']['plugins']['get']('Dialog');_0x59cb06['isOpen']&&'commentsArchive'===_0x59cb06['id']&&(_0x59cb06['hide'](),_0x3bedb2['stop']());};}class p extends _0x3136d3{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
23
+ import{Editor as _0x26d715,ContextPlugin as _0xbf5a6d,PendingActions as ht,Command as _0x165f32,Plugin as _0x28c70b,Context as _0x4c7dbf}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3c1a8c,uid as _0x210fd1,KeystrokeHandler as jt,FocusTracker as _0xda5a76,diff as _0x280c8e,Collection as _0x4d4610,Rect as _0x4481eb,CKEditorError as _0x4b5373,first as _0x54d855,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x1ba853,keyCodes as _0x2697b6}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x42fb37,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x33d565,trimHtml as _0x97b593,LateFocusDropdownButtonView as _0x1dec32,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x3977aa}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x8cae09}from'es-toolkit/compat';import{IconUndo as _0x51b324,IconCheck as _0xd5e34a,IconPencil as _0x41cd99,IconRemoveComment as _0x2d5b5c,IconThreeVerticalDots as _0x3907aa,IconAddComment as _0x29f3e4,IconCommentsArchive as _0x31a772}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x209ef2,ButtonView as _0x190959,ViewCollection as _0xed3852,createDropdown as _0x27503b,ListView as _0x3eca4e,focusChildOnDropdownOpen as _0x1b12ff,ListItemView as _0x15b431,MenuBarMenuListItemButtonView as _0x485dee,BodyCollection as _0x316427,BalloonPanelView as _0x43b01f,ContextualBalloon as _0x329210,Dialog as _0xafccfd,DialogViewPosition as _0x4eea7e}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x3934be}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x288022}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0xb6f417}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
24
+ _0x3c1a8c(){['model'];['view'];constructor(_0x595736,_0x1aae22){super(),this['model']=_0x595736,this['model']['_isAttached']=!0x0,this['view']=_0x1aae22,this['listenTo'](_0x1aae22,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1aae22,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1aae22,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1aae22,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1aae22,'addComment',(_0xfed99d,_0x52fc64)=>this['addComment'](_0x52fc64)),this['listenTo'](_0x1aae22,'updateComment',(_0x539c19,_0x10912a,_0x178a6b)=>this['updateComment'](_0x10912a,_0x178a6b)),this['listenTo'](_0x1aae22,'removeComment',(_0x15eb37,_0x4c20e5)=>this['removeComment'](_0x4c20e5));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x5ba8de){this['model']['addComment']({'content':_0x5ba8de,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x4760af,_0x56cf80){this['model']['getComment'](_0x4760af)['update']({'content':_0x56cf80});}['removeComment'](_0x4087ad){this['model']['getComment'](_0x4087ad)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x14a8e9,_0x3a0e09,_0x39c72c){const t=_0x14a8e9['t'];switch(_0x3a0e09){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'},_0x39c72c);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'},_0x39c72c);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'},_0x39c72c);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'},_0x39c72c);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x39c72c);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'},_0x39c72c);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'},_0x39c72c);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'},_0x39c72c);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 Ut extends Vt{['main'];['editable'];constructor(_0x9915a5,_0x200a1c){super(_0x9915a5);const _0x5dfcc5=_0x210fd1();this['main']=this['createCollection'](),this['editable']=new $t(_0x9915a5,_0x200a1c,void 0x0,{'label':()=>E(_0x9915a5,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x9915a5['uiLanguageDirection'],'lang':_0x9915a5['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5dfcc5},'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 Ot extends Rt{['view'];constructor(_0x445a4a){super(_0x445a4a),this['view']=new Ut(_0x445a4a['locale'],_0x445a4a['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x19d44a=this['editor']['editing']['view'],_0x3de801=this['view']['editable'],_0x27cfe0=_0x19d44a['document']['getRoot']();_0x3de801['name']=_0x27cfe0['rootName'],this['view']['render']();const _0x4de087=_0x3de801['element'];this['setEditableElement'](_0x3de801['name'],_0x4de087),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x19d44a['attachDomRoot'](_0x4de087),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
25
+ _0x3c1a8c(_0x26d715){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Nt)());constructor(_0x100278={}){function _0x23d86c(_0x5c3fe4){return _0x5c3fe4['map'](_0x1895b2=>String['fromCharCode'](_0x1895b2))['join']('');}(_0x100278=Object['assign']({},_0x100278))['plugins']||(_0x100278['plugins']=Qt['defaultPlugins']),super(_0x100278),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x23d86c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x23d86c([0x76,0x69,0x65,0x77])][_0x23d86c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x23d86c([0x61,0x75,0x74,0x6f]),this[_0x23d86c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x23d86c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x23d86c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x23d86c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x23d86c([0x6f,0x6b])});}['create'](){const _0x265016=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x265016))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2a47a0=>{const _0x4e7fd9=this['model']['document']['getRoot'](),_0x520cb8=_0x4e7fd9&&_0x4e7fd9['getChild'](_0x4e7fd9['childCount']-0x1);_0x2a47a0['setSelection'](_0x520cb8,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3d9a8b=this['editing']['view'],_0x54488c=_0x3d9a8b['document']['getRoot'](),_0x2621eb=_0x54488c['getChild'](0x0);_0x54488c['childCount']>0x1||!_0x2621eb||'p'!=_0x2621eb['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x3d9a8b,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2621eb['placeholder']=this['placeholder']),Ft({'view':_0x3d9a8b,'element':_0x2621eb,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2621eb);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4dd8c5,_0xe2effe={}){super(_0x4dd8c5),this['editor']=null,this['_editorConfig']=_0xe2effe,this['set']('value',_0xe2effe['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x4dd8c5,'Reply...')),this['set']('submitLabel',E(_0x4dd8c5,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xda5a76(),this['focusCycler']=new _0x209ef2({'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',(_0x40d534,_0x2f3a59)=>{this['cancelButtonView']['fire']('execute'),_0x2f3a59();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3d927b,_0x572b0b)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x572b0b());}),this['on']('submit',(_0x41f4de,_0x44cf18)=>{_0x44cf18['length']>0xfde8?(alert(E(_0x4dd8c5,'TOO_LONG_COMMENT_ALERT',[_0x44cf18['length'],0xfde8])),_0x41f4de['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x150e43=this['editor'];this['element']['insertBefore'](_0x150e43['ui']['element'],this['element']['firstChild']),_0x150e43['model']['document']['on']('change',()=>this['value']=_0x150e43['getData']()),_0x150e43['bind']('placeholder')['to'](this),this['focusables']['add'](_0x150e43['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5dae36){-0x1===_0x5dae36?(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:_0x48d3f9}=this,_0x3b102d=new _0x190959(_0x48d3f9);return _0x3b102d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3b102d['withText']=!0x0,_0x3b102d['bind']('label')['to'](this,'submitLabel'),_0x3b102d['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3b102d['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5d8b14,_0x13f5ce)=>!_0x13f5ce&&!!_0x5d8b14['trim']()),_0x3b102d;}['_createCancelButton'](){const {locale:_0x444b5e}=this,_0x2b7bd1=new _0x190959(_0x444b5e);return _0x2b7bd1['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2b7bd1['label']=E(_0x444b5e,'Cancel'),_0x2b7bd1['withText']=!0x0,_0x2b7bd1['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2b7bd1;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5c8b8b=>{this['focusTracker']['add'](_0x5c8b8b['element']);}),this['focusables']['on']('change',(_0x4cf7f8,_0x618ac2)=>{for(const _0x37534f of Array['from'](_0x618ac2['added'])['reverse']())this['focusTracker']['add'](_0x37534f['element']);});}}class ie extends kt{constructor(_0x59019c,_0x61569d,_0x311fa8){super(_0x59019c),this['commentInputView']=new os(_0x59019c,_0x311fa8),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x489259,_0x233aff)=>_0x489259||!!_0x233aff),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 _0x42fb37(_0x59019c,_0x61569d),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'](_0x424a7b){this['commentInputView']['focus'](_0x424a7b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x26503f,_0x3dd974)=>{const {submitButtonView:_0x39fbef,cancelButtonView:_0x5b395b,editor:_0x1d34e4}=this['commentInputView'];[_0x39fbef['element'],_0x5b395b['element'],_0x1d34e4?_0x1d34e4['editing']['view']['getDomRoot']():null]['filter'](_0x2ae09c=>_0x2ae09c)['some'](_0x4ff5b3=>_0x4ff5b3['contains'](_0x3dd974['target']))||(this['focus'](),_0x3dd974['preventDefault']());});}}class cs extends kt{constructor(_0x55ae9f){super(_0x55ae9f);const _0x214008=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x214008['to']('count',_0x95f4e3=>E(_0x55ae9f,'NUMBER_OF_COMMENTS',_0x95f4e3))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1743d1,_0x57f068,_0x4b4691){super(_0x1743d1);const _0x2b0b80=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x57f068['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x57f068,this['_config']=_0x4b4691,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xda5a76(),this['keystrokes']=new jt(),this['focusCycler']=new _0x209ef2({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1cd450=>this['commentViews']['map'](_0xd924a3=>_0xd924a3['element'])['includes'](_0x1cd450['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x1743d1),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x484ec5=>_0x484ec5-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4be7e3 of _0x57f068['comments'])this['_handleNewCommentModel'](_0x4be7e3);this['_handleInfoComment'](),this['listenTo'](_0x57f068['comments'],'add',(_0x4cc0,_0x9bb67)=>{const _0x5183c5=this['_calculatePosition'](_0x9bb67);this['length']++,this['_handleNewCommentModel'](_0x9bb67,_0x5183c5),this['refreshVisibleViews']();}),this['listenTo'](_0x57f068['comments'],'remove',(_0x176d3e,_0x50f2db)=>{this['length']--,this['_handleRemoveCommentModel'](_0x50f2db),this['refreshVisibleViews']();}),this['listenTo'](_0x57f068,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x57f068,'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',_0x2b0b80['if']('length','ck-hidden',_0x57f093=>!_0x57f093)],'aria-label':E(_0x1743d1,'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'](_0x167a39){-0x1===_0x167a39?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x49ec04 of this['commentViews'])_0x49ec04['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x42f7f0,_0x5453c4){const _0x47aca6=new this['_config']['CommentView'](this['locale'],_0x42f7f0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x47aca6['viewUid']=_0x42f7f0['id'],_0x47aca6['delegate']('removeComment')['to'](this),_0x47aca6['delegate']('updateComment')['to'](this),_0x47aca6['delegate']('resolveCommentThread')['to'](this),_0x47aca6['delegate']('editorReady')['to'](this),_0x47aca6['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x47aca6,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x47aca6,_0x5453c4);}['_calculatePosition'](_0x2de3a8){const _0x3efc6b=this['_model']['_findOptimalIndex'](_0x2de3a8);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2de3a8['authoredAt']?_0x3efc6b-0x1:_0x3efc6b:_0x3efc6b-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x10cf5c={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x10cf5c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x10cf5c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x142fe7){const _0x1b3727=this['commentViews']['remove'](_0x142fe7['id']);this['stopListening'](_0x1b3727),_0x1b3727['isEditMode']&&this['_updateHasDirtyComment'](),_0x1b3727['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1ba9b3=>_0x1ba9b3['isEditMode']);}['_rearrangeCollapse'](){const _0x14f358=function(_0x4aaa35){const _0x29ecba=new _0x4d4610();for(const _0xc7e281 of _0x4aaa35)_0x29ecba['add'](_0xc7e281);return _0x29ecba;}(this['commentViews']),_0x4019fe=this['_collapsedCommentsView']['count'];for(let _0x5bb3d1=0x1;_0x5bb3d1<=_0x4019fe;_0x5bb3d1++)_0x14f358['remove'](0x1);for(const _0x82653e of _0x14f358)_0x82653e['collapse']();_0x4019fe>0x0&&_0x14f358['add'](this['_collapsedCommentsView'],0x1),ns(_0x280c8e(Array['from'](this['visibleViews']),Array['from'](_0x14f358)),this['visibleViews'],_0x14f358);}['_rearrangeExpand'](){ns(_0x280c8e(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xaf9aab of this['visibleViews'])_0xaf9aab['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x37c487=>{this['focusTracker']['add'](_0x37c487['element']),this['keystrokes']['listenTo'](_0x37c487['element']);}),this['commentViews']['on']('change',(_0x341240,_0x167475)=>{for(const _0x2ffb0d of _0x167475['removed'])this['focusTracker']['remove'](_0x2ffb0d['element']),this['keystrokes']['stopListening'](_0x2ffb0d['element']);for(const _0x9f280f of Array['from'](_0x167475['added'])['reverse']())this['focusTracker']['add'](_0x9f280f['element']),this['keystrokes']['listenTo'](_0x9f280f['element']);});}}function ns(_0x3a6e57,_0x5e7b61,_0x4332cd){let _0x2cd4cf=0x0;for(const _0x40141a of _0x3a6e57)switch(_0x40141a){case'insert':_0x5e7b61['add'](_0x4332cd['get'](_0x2cd4cf),_0x2cd4cf),_0x2cd4cf++;break;case'delete':_0x5e7b61['remove'](_0x2cd4cf);break;case'equal':_0x2cd4cf++;}}class as extends kt{constructor(_0x5206e3){super(_0x5206e3);const _0x8025df=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x8025df['to']('contextValue',_0x4afe38=>E(_0x5206e3,'THREAD_CONTEXT_LABEL',_0x4afe38)),'tabindex':-0x1},'children':[{'text':_0x8025df['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5c47ef,_0x46baf2){super(_0x5c47ef);const _0x131661=this['bindTemplate'];this['_model']=_0x46baf2,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xda5a76(),this['keystrokes']=new jt(),this['focusCycler']=new _0x209ef2({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x43658f=>!!_0x43658f),this['bind']('contextValue')['to'](this['_model'],'context',_0x372f65=>_0x372f65&&_0x372f65['value']?this['_trimContextValue'](_0x372f65['value']):E(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',_0x131661['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 _0x40ac6a=new _0x190959(this['locale']);return _0x40ac6a['label']=E(this['locale'],'Reopen'),_0x40ac6a['tooltip']=E(this['locale'],'Reopen'),_0x40ac6a['icon']=_0x51b324,_0x40ac6a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x26cec=>!_0x26cec),_0x40ac6a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4fcee4,_0x4ed3e1)=>_0x4fcee4&&_0x4ed3e1),_0x40ac6a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x40ac6a;}['_trimContextValue'](_0x5c71ad){if(_0x5c71ad['length']<0x96)return _0x5c71ad;const _0x2460d1=_0x5c71ad['lastIndexOf']('\x20',0x93);return _0x5c71ad['substring'](0x0,_0x2460d1>-0x1?_0x2460d1:0x93)+'...';}['_attachContextActions'](){const _0x435b1b=this['element']['querySelector']('.ck-context'),_0x468bab=_0x435b1b['querySelector']('.ck-context__value');this['listenTo'](_0x435b1b,'mouseenter',()=>{_0x468bab['offsetWidth']<_0x468bab['scrollWidth']&&_0x435b1b['classList']['add']('overlay');}),this['listenTo'](_0x435b1b,'mouseleave',()=>{_0x435b1b['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x474017 of this['focusables'])this['focusTracker']['add'](_0x474017['element']),this['keystrokes']['listenTo'](_0x474017['element']);}['_createContextView'](){const _0x200af1=new as(this['locale']);return _0x200af1['bind']('contextValue')['to'](this),_0x200af1;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x164637,_0x407944,_0x1017d5,_0x48b65a){super(_0x164637),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x407944,this['_localUser']=_0x1017d5,this['_config']=_0x48b65a,this['commentThreadHeaderView']=new Xt(_0x164637,_0x407944),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x164637,E(_0x164637,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x164637,_0x407944,Object['assign']({'CommentView':this['_config']['CommentView']},_0x48b65a)),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',(_0x425f61,_0x484b31)=>_0x425f61||!!_0x484b31),this['bind']('isUnlinked')['to'](_0x407944,'unlinkedAt',_0x878e6d=>!!_0x878e6d),this['bind']('ariaLabel')['to'](this,'length',_0x3f2dfb=>{const _0x29d29c=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x3f2dfb,_0x29d29c]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xda5a76(),this['keystrokes']=new jt(),this['focusCycler']=new _0x209ef2({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3f4ca3=>_0x3f4ca3['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x442c57=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x398780=_0x442c57['commentInputView'];return _0x442c57['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x398780,'value',(_0x9fc743,_0x4197ae,_0x376afe,_0x27a54d,_0x58591e)=>!!_0x58591e||!!_0x27a54d&&_0x376afe&&!_0x4197ae||_0x9fc743&&_0x376afe&&!_0x4197ae),_0x398780['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x214f1e,_0x34bb87,_0x593b71)=>{let _0x1ed90c;return _0x1ed90c=_0x593b71&&_0x34bb87?'Reply\x20to\x20reopen\x20discussion...':_0x214f1e?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x1ed90c);}),_0x398780['bind']('submitLabel')['to'](this,'length',_0x4ab490=>E(this['locale'],_0x4ab490?'Reply':'Comment')),_0x398780['on']('submit',(_0x39d15d,_0x59d808)=>{this['fire']('addComment',_0x59d808),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x398780['on']('cancel',()=>{this['focus']();}),_0x398780['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x398780['on']('cancel',_0x111b06=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x111b06['stop']());}),this['on']('change:isActive',(_0x565240,_0x255068,_0x16dc86)=>{_0x16dc86||this['length']||_0x398780['value']||this['fire']('removeCommentThread');}),_0x442c57;}}class vt extends/* #__PURE__ -- @preserve */
27
+ ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x253c1e,_0x5c2bff,_0x536bcc,_0x50a861){super(_0x253c1e,_0x5c2bff,_0x536bcc,_0x50a861),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x253c1e,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0xdb00a7,_0x26f217,_0x447732)=>{_0x447732||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x585832,_0x127de1,_0x2a2c27)=>{_0x2a2c27&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x20dbd9=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x20dbd9['if']('isActive','ck-thread--active'),_0x20dbd9['if']('isUnlinked','ck-thread--unlinked'),_0x20dbd9['if']('isConfirm','ck-thread--remove-confirmation'),_0x20dbd9['to']('actionIndicator',_0x7f116a=>_0x7f116a?'ck-thread--'+_0x7f116a:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x20dbd9['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 _0x907a16 of this['commentsListView']['commentViews'])_0x907a16['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5c66c6}=this,_0x147532=this['commentsListView']['commentViews']['get'](0x0);_0x147532===this['_boundFirstCommentView']||_0x147532['isSystemComment']||(this['_boundFirstCommentView']=_0x147532,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x147532,'actionIndicator',_0x3d609a=>'remove'===_0x3d609a?'remove':null),_0x147532['placeholder']=E(_0x5c66c6,'Write\x20a\x20comment...'),_0x147532['removeButton']['on']('execute',_0x41ffd0=>{_0x41ffd0['stop'](),this['showConfirm'](E(_0x5c66c6,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x147532['focus']();}),_0x147532['actionBar']['add'](this['resolveButton'],0x0),_0x147532['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xfa7343=new _0x33d565(this['locale']);return _0xfa7343['label']=E(this['locale'],'Resolve'),_0xfa7343['tooltip']=E(this['locale'],'Resolve'),_0xfa7343['icon']=_0xd5e34a,_0xfa7343['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xfa7343['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x37ce20=>!_0x37ce20),_0xfa7343['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3ec08a,_0x3c8bc0)=>_0x3ec08a&&!_0x3c8bc0),_0xfa7343['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xfa7343;}['_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 es extends kt{constructor(_0xc4933d){super(_0xc4933d),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x4d2658,_0x160cf7,_0x2802c1)=>{this['element']['innerHTML']=_0x2802c1;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x87ff99,_0x11cf73,_0x2fb8ed){super(_0x87ff99),this['_model']=_0x11cf73,this['_config']=_0x2fb8ed,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x11cf73,'content',_0x11cf73,'authoredAt',(_0x34c732,_0xa50d8d)=>E(_0x87ff99,'COMMENT_ARIA_LABEL',[_0x11cf73['author']['name'],_0x2fb8ed['formatDateTime'](_0xa50d8d),new DOMParser()['parseFromString'](_0x34c732,'text/html')['body']['textContent'],_0x11cf73['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x87ff99,E(_0x87ff99,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xed3852(),this['focusTracker']=new _0xda5a76(),this['keystrokes']=new jt(),this['focusCycler']=new _0x209ef2({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1829eb=>_0x1829eb['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x1cbc04=new es(this['locale']);return _0x1cbc04['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xe1f9c4,_0x44d313)=>_0x44d313?_0x97b593(_0xe1f9c4,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xe1f9c4),_0x1cbc04;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x291b70=new os(this['locale'],this['_config']['editorConfig']);return _0x291b70['value']=this['_model']['content'],_0x291b70['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x291b70['submitLabel']=E(this['locale'],'Save'),_0x291b70['on']('submit',(_0x2f224b,_0x21f7c1)=>{this['fire']('updateComment',this['_model']['id'],_0x21f7c1),this['switchToDisplayMode'](),this['focus']();}),_0x291b70['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x291b70['once']('editorReady',()=>{_0x291b70['focus']();}),_0x291b70['createEditor'](),_0x291b70['delegate']('editorReady')['to'](this),_0x291b70['delegate']('editorDestroyed')['to'](this),_0x291b70;}['_setupKeyboardNavigation'](){const _0x4f51ac=this['element'];this['keystrokes']['listenTo'](_0x4f51ac);for(const _0x470ed of this['focusables'])this['focusTracker']['add'](_0x470ed['element']),this['keystrokes']['listenTo'](_0x470ed['element']);this['focusables']['on']('change',(_0x1d32c8,_0x2d5871)=>{for(const _0x7c98f5 of _0x2d5871['removed'])this['focusTracker']['remove'](_0x7c98f5['element']),this['keystrokes']['stopListening'](_0x7c98f5['element']);for(const _0x2e3683 of _0x2d5871['added'])this['focusTracker']['add'](_0x2e3683['element']),this['keystrokes']['listenTo'](_0x2e3683['element']);}),this['keystrokes']['set']('enter',(_0x3ab1e3,_0x115f71)=>{_0x4f51ac===_0x3ab1e3['target']&&(this['focusCycler']['focusFirst'](),_0x115f71());}),this['keystrokes']['set']('esc',(_0x2eba87,_0x3f84a2)=>{_0x4f51ac!==_0x2eba87['target']&&(this['focus'](),_0x3f84a2());});}}class gt extends/* #__PURE__ -- @preserve */
28
+ ti(hs){['actionBar'];['userView'];constructor(_0x44439f,_0x1a82dc,_0x8c9f3c){super(_0x44439f,_0x1a82dc,_0x8c9f3c),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x44439f,'Reply...')),this['bind']('authoredAt')['to'](_0x1a82dc),this['bind']('resolvedAt')['to'](_0x1a82dc),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 _0x42fb37(_0x44439f,_0x1a82dc['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x1a82dc,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x2571ea=this['bindTemplate'],_0x4fd611=[{'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':_0x2571ea['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2571ea['to']('authoredAt',_0x4438a9=>this['_config']['formatDateTime'](_0x4438a9))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2571ea['if']('isEditMode','ck-comment__actions--hidden'),_0x2571ea['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']&&_0x4fd611['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x2571ea['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x2571ea['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2571ea['if']('isEditMode','ck-comment--edit'),_0x2571ea['if']('isSystemComment','ck-comment--info'),_0x2571ea['to']('actionIndicator',_0x21828d=>_0x21828d?'ck-comment--'+_0x21828d:'')],'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':_0x4fd611}]}]};}['_createEditButton'](){const _0x283c31=new _0x190959(this['locale']);return _0x283c31['label']=E(this['locale'],'Edit'),_0x283c31['icon']=_0x41cd99,_0x283c31['withText']=!0x0,_0x283c31['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x283c31['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x37bf92=>!_0x37bf92),_0x283c31['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x283c31['on']('execute',()=>this['switchToEditMode']()),_0x283c31;}['_createRemoveButton'](){const _0x3061fc=new _0x190959(this['locale']);return _0x3061fc['label']=E(this['locale'],'Remove'),_0x3061fc['icon']=_0x2d5b5c,_0x3061fc['withText']=!0x0,_0x3061fc['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x3061fc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x19fd41=>!_0x19fd41),_0x3061fc['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x3061fc['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x3061fc;}['_createDropdown'](){const _0x2087c1=_0x27503b(this['locale'],_0x1dec32),_0x5bcd42=_0x2087c1['panelView']['children'],_0x482296=new _0x3eca4e(this['locale']),_0xcbd66f=_0x2087c1['bindTemplate'];_0x1b12ff(_0x2087c1,()=>this['items']['find'](_0x5d3e05=>_0x5d3e05['isVisible'])),_0x2087c1['extendTemplate']({'attributes':{'class':[_0xcbd66f['if']('isVisible','ck-hidden',_0x23adbf=>!_0x23adbf)]}});const _0x49c5f0=(_0x19ab81,_0x2bec60=-0x1)=>{const _0x15ede2=new _0x15b431(this['locale']);_0x15ede2['children']['add'](_0x19ab81);const _0x25183b=_0x2bec60>-0x1?_0x2bec60:_0x482296['items']['length'];_0x482296['items']['add'](_0x15ede2,_0x25183b);const _0x5d1754=Array['from'](this['items']);_0x2087c1['unbind']('isEnabled','isVisible'),_0x2087c1['bind']('isEnabled')['toMany'](_0x5d1754,'isEnabled',(..._0x5dd191)=>_0x5dd191['some'](_0xc00a0f=>_0xc00a0f)),_0x2087c1['bind']('isVisible')['toMany'](_0x5d1754,'isVisible',(..._0x23dc7d)=>_0x23dc7d['some'](_0x3f48e4=>_0x3f48e4));};_0x2087c1['panelPosition']='sw',_0x2087c1['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x3907aa});for(const _0x15ef28 of this['items'])_0x49c5f0(_0x15ef28);return _0x5bcd42['add'](_0x482296),_0x2087c1['listenTo'](this['items'],'add',(_0x49c9e2,_0x43013a,_0x5dc88b)=>{_0x49c5f0(_0x43013a,_0x5dc88b);}),_0x2087c1['listenTo'](this['items'],'remove',(_0x65483,_0x4f5360,_0x61ae50)=>{_0x482296['items']['remove'](_0x61ae50);}),_0x2087c1;}['_attachActions'](_0x2f9a7d,_0x292f19){const _0x222018=_0x2f9a7d&&_0x2f9a7d['element'];_0x222018&&(this['listenTo'](_0x222018,'mouseenter',()=>this['actionIndicator']=_0x292f19),this['listenTo'](_0x222018,'focus',()=>this['actionIndicator']=_0x292f19),this['listenTo'](_0x222018,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x222018,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x429c4c=super['_createCommentInputView']();return _0x429c4c['bind']('placeholder')['to'](this),_0x429c4c;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x1688d6){const _0x2d97d2=Dt(_0x1688d6,0x1e),_0x43ef00=new MutationObserver(_0x1d2604=>{for(const _0x4b46b9 of _0x1d2604)('attributes'==_0x4b46b9['type']&&'class'==_0x4b46b9['attributeName']||'childList'==_0x4b46b9['type']||'characterData'==_0x4b46b9['type'])&&_0x2d97d2();});return{'attach'(_0xed105a){_0x43ef00['observe'](_0xed105a,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x43ef00['disconnect'](),_0x2d97d2['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x319178,_0x476b56){super(_0x319178),this['id']=_0x210fd1(),this['focusTracker']=new _0xda5a76(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x238040,_0x5d555a)=>this['fire']('Esc',_0x5d555a)),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']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x476b56),this['mainView']=_0x476b56;const _0x5be20b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x5be20b['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 _0x577633=this['element']['clientHeight'];_0x577633&&(this['height']=_0x577633);}}class d extends/* #__PURE__ -- @preserve */
29
+ _0x3c1a8c(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2ff28f,target:_0x412d4a,type:_0x127ec6,isVisible:_0x31c303=!0x0}){super(),this['view']=_0x2ff28f,this['view']['element']||this['view']['render'](),this['_type']=_0x127ec6,this['_target']=_0x412d4a,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4d4610([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3a712d,_0x5b10d6)=>{this['view']['focusTracker']['add'](_0x5b10d6);}),this['focusableElements']['on']('remove',(_0x556a86,_0x390d02)=>{this['view']['focusTracker']['remove'](_0x390d02);}),this['set']('isVisible',_0x31c303);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x28d1bc=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x28d1bc),_0x28d1bc;}get['targetRect'](){const _0x4d8b8f=this['target'];if(null===_0x4d8b8f)return null;if(_0x4d8b8f instanceof _0x4481eb)return _0x4d8b8f;const _0x51bf5b=_0x4d8b8f['filter'](_0x253542=>function(_0x14e4cc){const _0x4386d3=_0x14e4cc['offsetParent'];if(_0x4386d3)return!0x0;const _0x177e4e=_0x14e4cc['getClientRects']()['item'](0x0);return!!_0x177e4e;}(_0x253542));return 0x0===_0x51bf5b['length']?null:new _0x4481eb(_0x51bf5b[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1a8fd3){this['view']['isActive']=_0x1a8fd3,this['view']['mainView']['isActive']=_0x1a8fd3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x403496){if(!(null===_0x403496||_0x403496 instanceof _0x4481eb||Array['isArray'](_0x403496)&&_0x403496['every'](_0x26087e=>li(_0x26087e))))throw new _0x4b5373('annotation-invalid-target',null,{'target':_0x403496});}['_getNormalizedTarget'](){const _0x52a10a='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x52a10a)?[_0x52a10a]:_0x52a10a;}}function li(_0x281ddb){return null!==_0x281ddb&&'object'==typeof _0x281ddb&&'nodeType'in _0x281ddb&&0x1===_0x281ddb['nodeType'];}class _ extends _0x4d4610{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1a911d=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xda5a76(),this['_focusTracker']['on']('change:isFocused',(_0x459d4e,_0x4477bd,_0x592b79)=>{_0x592b79||this['fire']('blur');});for(const _0x3760fd of _0x1a911d)this['add'](_0x3760fd);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x39781d){if(this['has'](_0x39781d))throw new _0x4b5373('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x39781d['innerView'],_0x39781d),this['_viewToAnnotation']['set'](_0x39781d['view'],_0x39781d);for(const _0xae27fa of _0x39781d['focusableElements'])this['_focusTracker']['add'](_0xae27fa);this['listenTo'](_0x39781d['focusableElements'],'add',(_0x22c717,_0xcc12bc)=>{this['_focusTracker']['add'](_0xcc12bc);}),this['listenTo'](_0x39781d['focusableElements'],'remove',(_0x4a51a8,_0x3ae57b)=>{this['_focusTracker']['remove'](_0x3ae57b);}),this['listenTo'](_0x39781d['view']['focusTracker'],'change:isFocused',(_0x5e0ef2,_0x567807,_0x2519a2)=>{_0x2519a2&&this['fire']('focus',_0x39781d);}),_0x39781d['updateTargetRect']();const _0x1ca5bd=this['_getOrderInContent'](_0x39781d['view']['targetRect']);return super['add'](_0x39781d,_0x1ca5bd);}['remove'](_0x37430f){if(!this['has'](_0x37430f))throw new _0x4b5373('annotationcollection-not-existing-item',null);this['stopListening'](_0x37430f['view']['focusTracker']),this['stopListening'](_0x37430f['focusableElements']);for(const _0x3fdab2 of _0x37430f['focusableElements'])this['_focusTracker']['remove'](_0x3fdab2);return this['_viewToAnnotation']['delete'](_0x37430f['view']),this['_innerViewToAnnotation']['delete'](_0x37430f['innerView']),super['remove'](_0x37430f);}['getByInnerView'](_0x4da288){return this['_innerViewToAnnotation']['get'](_0x4da288);}['getByView'](_0x4590d1){return this['_viewToAnnotation']['get'](_0x4590d1);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x9d5377 of this)_0x9d5377['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2277d1=Array['from'](this)['sort']((_0x1968c8,_0x29b614)=>v(_0x1968c8['view']['targetRect'],_0x29b614['view']['targetRect']));for(let _0x27484c=_0x2277d1['length']-0x1;_0x27484c>0x0;_0x27484c--){const _0x5e756a=_0x2277d1[_0x27484c];_0x27484c!==this['getIndex'](_0x5e756a)&&(this['remove'](_0x5e756a),this['add'](_0x5e756a));}}['_getOrderInContent'](_0x43d4f0){let _0x3096f5=0x0;if(!_0x43d4f0)return this['length'];for(const _0x49b03d of this){const _0x574b2b=_0x49b03d['view']['targetRect'];if(_0x574b2b){if(v(_0x43d4f0,_0x574b2b)<0x0)return _0x3096f5;_0x3096f5++;}}return _0x3096f5;}}function v(_0x3d96d1,_0x7796fb){if(null===_0x3d96d1&&null===_0x7796fb)return 0x0;if(null===_0x3d96d1)return-0x1;if(null===_0x7796fb)return 0x1;const _0x289465=_0x3d96d1['top']-_0x7796fb['top'];return 0x0==_0x289465?_0x3d96d1['left']-_0x7796fb['left']:_0x289465;}class O extends _0xbf5a6d{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5167e0){if(super(_0x5167e0),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x5167e0 instanceof _0x26d715){const _0x532379=_0x5167e0['locale'];_0x5167e0['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x532379,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x532379,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x532379,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x532379,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x532379,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x532379,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x532379,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0xc50ed0){this['collection']['add'](_0xc50ed0);}['remove'](_0x483349){this['collection']['remove'](_0x483349),_0x483349['destroy']();}['refreshVisibility'](){for(const _0x158ba2 of this['collection'])_0x158ba2['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x15ad16){return this['collection']['getByInnerView'](_0x15ad16);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4f98e0 of this['collection'])_0x4f98e0['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x11115a){this['fire']('_activateAnnotation',_0x11115a);}['createAnnotation'](_0x1fa0c3){return new d(_0x1fa0c3);}['createAnnotationView'](_0x38e266,_0x11ae41){return new S(_0x38e266,_0x11ae41);}['_addActiveAnnotation'](_0x2d7094){const _0x1d8243=new Set(this['activeAnnotations']);_0x1d8243['add'](_0x2d7094),this['activeAnnotations']=_0x1d8243;}['_removeActiveAnnotation'](_0x56608e){const _0xc2e9aa=new Set(this['activeAnnotations']);_0xc2e9aa['delete'](_0x56608e),this['activeAnnotations']=_0xc2e9aa;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3dedd4=this['collection'],_0x5cd312=this['_visibleAnnotations'];function _0x15c135(_0xd29b03){const _0x1e3d39=_0xd29b03['source'];_0x1e3d39['isVisible']&&!_0x5cd312['has'](_0x1e3d39)?_0x5cd312['add'](_0x1e3d39):!_0x1e3d39['isVisible']&&_0x5cd312['has'](_0x1e3d39)&&_0x5cd312['remove'](_0x1e3d39),_0x1e3d39['view']['focusTracker']['remove'](_0x1e3d39['view']['element']),_0x1e3d39['view']['focusTracker']['add'](_0x1e3d39['view']['element']);}this['listenTo'](_0x3dedd4,'add',(_0x4bdddf,_0x2177ff)=>{_0x2177ff['isVisible']&&_0x5cd312['add'](_0x2177ff),this['listenTo'](_0x2177ff,'change:isVisible',_0x15c135);}),this['listenTo'](_0x3dedd4,'remove',(_0x5b0504,_0xd172d8)=>{_0x5cd312['has'](_0xd172d8)&&_0x5cd312['remove'](_0xd172d8),this['stopListening'](_0xd172d8,'change:isVisible',_0x15c135);});}['_setupEnterAnnotationKeystroke'](){const _0x5f4dee=_0xc36b7d=>{_0xc36b7d['on']('ready',()=>{_0xc36b7d['keystrokes']['set'](_0x288022,(_0x41d4d2,_0xa0d079)=>{const _0x349e3f=_0x54d855(this['activeAnnotations']['values']());_0x349e3f&&(_0x349e3f['view']['focus'](),_0xa0d079());});});};this['context']instanceof _0x26d715?_0x5f4dee(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1bb9f8,_0x257b32)=>{_0x5f4dee(_0x257b32);});}['_setupEscapeAnnotationHandling'](){const _0x2ae249=_0x46dd6b=>{const _0x3fe137=_0x46dd6b['source'],_0x99bafc=[];let _0xd50694;if(Array['isArray'](_0x3fe137['target'])){_0xd50694=_0x3fe137['target'][0x0],this['context']instanceof _0x26d715?_0x99bafc['push'](this['context']):this['context']['editors']&&_0x99bafc['push'](...this['context']['editors']);for(const _0x1f7a64 of _0x99bafc)for(const _0x134434 of _0x1f7a64['editing']['view']['domRoots']['values']())if(_0x134434['contains'](_0xd50694))return void _0x1f7a64['editing']['view']['focus']();_0xd50694['focus']();}};this['listenTo'](this['collection'],'add',(_0x1e2b23,_0xb5e250)=>{this['listenTo'](_0xb5e250,'escape',_0x2ae249,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5b38d5,_0x3d7f8a)=>{this['stopListening'](_0x3d7f8a,'escape',_0x2ae249);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xbf5a6d{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xb3d4c7){super(_0xb3d4c7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x52569f=this['context']['config'];_0x52569f['define']('comments.maxCommentsWhenCollapsed',0x2),_0x52569f['define']('comments.maxThreadTotalWeight',0x1f4),_0x52569f['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x52569f['define']('comments.CommentThreadView',vt),_0x52569f['define']('comments.CommentView',gt),_0x52569f['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x27775f=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2f756a,_0x306e94)=>this['_addCommentThread'](_0x306e94)),this['on']('submitCommentThread',(_0x198c11,_0x2b8383)=>this['_submitCommentThread'](_0x2b8383)),this['on']('resolveCommentThread',(_0x54d392,_0x5836b5)=>this['_resolveCommentThread'](_0x5836b5)),this['on']('resolveCommentThread',(_0x41ed1d,_0x349908)=>this['_updateActiveAnnotation'](_0x349908),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3b708c,_0x1760ad)=>this['_reopenCommentThread'](_0x1760ad)),this['on']('reopenCommentThread',(_0x4bdcff,_0x567812)=>this['_updateActiveAnnotation'](_0x567812),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x281b2f,_0x5c00c8)=>this['_removeCommentThread'](_0x5c00c8)),this['on']('updateCommentThread',(_0x1ce1e7,_0x460231)=>this['_updateCommentThread'](_0x460231)),this['on']('updateCommentThread',(_0x52af85,_0x3fb1c7)=>this['_updateActiveAnnotation'](_0x3fb1c7),{'priority':'lowest'}),this['on']('addComment',(_0x417049,_0x1080f5)=>this['_addComment'](_0x1080f5)),this['on']('updateComment',(_0x491fbf,_0x421697)=>this['_updateComment'](_0x421697)),this['on']('removeComment',(_0x52cf52,_0x3993c6)=>this['_removeComment'](_0x3993c6)),this['on']('addComment',(_0x41a8dd,{threadId:_0x5208d4,isFromAdapter:_0x225bf6})=>{if(_0x225bf6)return;const _0x5b2da8=this['getCommentThread'](_0x5208d4),_0x2a1646=_0x5b2da8&&this['_threadToController']['get'](_0x5b2da8);_0x2a1646&&_0x2a1646['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x27775f,'change:activeAnnotations',(_0x486982,_0x11227c,_0x54a21)=>{const _0x33c674=Array['from'](_0x54a21)['map'](_0x4660ed=>this['_viewToController']['get'](_0x4660ed['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x33c674?_0x33c674['model']:null;});}set['adapter'](_0x51306a){if(this['_adapter'])throw new _0x4b5373('commentsrepository-adapter-already-set');this['_adapter']=_0x51306a;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x356ea6=Tt,threadId:_0x1dac98=_0x210fd1(),comments:_0x294343=[],unlinkedAt:_0x455685=null,resolvedAt:_0x17cee7=null,resolvedBy:_0xf937c8=null,target:_0x121774=null,context:_0x7b060e=null,attributes:_0xa0e071={},isResolvable:_0xce74ee=!0x0,isSubmitted:_0x34e6b2=!0x1,isFromAdapter:_0x55f207=!0x1}={}){return this['fire'](bt('addCommentThread',_0x356ea6),{'channelId':_0x356ea6,'threadId':_0x1dac98,'comments':_0x294343,'unlinkedAt':_0x455685,'resolvedAt':_0x17cee7,'resolvedBy':_0xf937c8,'target':_0x121774,'context':_0x7b060e,'attributes':_0xa0e071,'isFromAdapter':_0x55f207,'isResolvable':_0xce74ee,'isSubmitted':_0x34e6b2}),this['getCommentThread'](_0x1dac98);}['openNewCommentThread']({channelId:_0x4894ff=Tt,threadId:_0xa7bafb=_0x210fd1(),target:_0x24e161,context:_0x1b632a=null,isResolvable:_0x5ef9fd=!0x0}){if(this['_readOnlyChannels']['has'](_0x4894ff)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x24e161)throw new _0x4b5373('commentsrepository-missing-target');const _0x57a838=this['addCommentThread']({'channelId':_0x4894ff,'threadId':_0xa7bafb,'target':_0x24e161,'context':_0x1b632a,'isResolvable':_0x5ef9fd});if(!_0x57a838)return null;const _0x2f7d7b=this['_threadToController']['get'](_0x57a838),_0x351377=_0x2f7d7b['view']['commentThreadInputView']['commentInputView'],_0x3e83b9=this['context']['plugins']['get'](O),_0xda0e65=_0x3e83b9['getByInnerView'](_0x2f7d7b['view']);return _0x3e83b9['activate'](_0xda0e65),_0x351377['once']('editorReady',()=>_0x351377['focus']()),_0x57a838;}['hasCommentThread'](_0xefb38f){if('string'!=typeof _0xefb38f)throw new _0x4b5373('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xefb38f);}['updateCommentThread']({channelId:_0x43a8ff=Tt,threadId:_0x338d08,context:_0x452d36,unlinkedAt:_0xd25098,attributes:_0x46196d,isFromAdapter:_0x3d9d47=!0x1}){return this['fire'](bt('updateCommentThread',_0x43a8ff),{'channelId':_0x43a8ff,'threadId':_0x338d08,'context':_0x452d36,'unlinkedAt':_0xd25098,'attributes':_0x46196d,'isFromAdapter':_0x3d9d47}),this['getCommentThread'](_0x338d08);}['getCommentThread'](_0x9e283d){if('string'!=typeof _0x9e283d)throw new _0x4b5373('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x9e283d);}['fetchCommentThread']({channelId:_0x80c32e,threadId:_0x6e590c}={}){const _0x387d95=this['getCommentThread'](_0x6e590c);if(_0x387d95)return Promise['resolve'](_0x387d95);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4b5373('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x80c32e,'threadId':_0x6e590c})['then'](_0x1f0aa5=>this['hasCommentThread'](_0x6e590c)?this['getCommentThread'](_0x6e590c):_0x1f0aa5?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x80c32e},_0x1f0aa5)):void 0x0)['catch'](_0x2fb783=>{throw console['error'](_0x2fb783),new _0x4b5373('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3aebc6,skipNotAttached:_0x4ab72e=!0x1,skipEmpty:_0x5150ca=!0x1,toJSON:_0x5cfc1c=!0x1}={}){const _0x42d8de=[];for(const _0x2e281d of this['_threads']['values']())_0x3aebc6&&_0x2e281d['channelId']!==_0x3aebc6||_0x4ab72e&&!_0x2e281d['isAttached']||_0x5150ca&&0x0===_0x2e281d['length']||_0x42d8de['push'](_0x2e281d);return _0x5cfc1c?_0x42d8de['map'](_0x569643=>_0x569643['toJSON']()):_0x42d8de;}['setActiveCommentThread'](_0x265c68){const _0x4c6d8e=this['context']['plugins']['get'](O);if(!_0x265c68)return void(this['activeCommentThread']&&_0x4c6d8e['deactivateAll']());const _0x58d07b=this['getCommentThread'](_0x265c68);if(!_0x58d07b)throw new _0x4b5373('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x265c68});if(!this['_threadToController']['has'](_0x58d07b))throw new _0x4b5373('commentsrepository-active-not-attached',null,{'threadId':_0x265c68});const _0x47b963=_0x4c6d8e['getByInnerView'](this['_threadToController']['get'](_0x58d07b)['view']);_0x4c6d8e['activate'](_0x47b963);}['switchReadOnly'](_0x87434b,_0x48eed7){_0x87434b?this['_readOnlyChannels']['add'](_0x48eed7):this['_readOnlyChannels']['delete'](_0x48eed7),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x14937b){return this['_readOnlyChannels']['has'](_0x14937b)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x445685,_0x2605a6){return new Ct(_0x445685,_0x2605a6);}['setPermissions'](_0x460838,_0x1eb439=Tt){this['_permissions']['set'](_0x1eb439,_0x460838),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3bd077=Tt){return this['_permissions']['has'](_0x3bd077)?this['_permissions']['get'](_0x3bd077):_t;}['_addCommentThread']({channelId:_0x4bedb1,threadId:_0x5e9386,comments:_0x305a0c,unlinkedAt:_0x51f6df,resolvedAt:_0x3f26c9,resolvedBy:_0x495077,target:_0x8492a8,context:_0x37b60c,attributes:_0x413526,isFromAdapter:_0x5bf00f,isResolvable:_0x9c4044,isSubmitted:_0x1b60e7}){if('string'!=typeof _0x5e9386)throw new _0x4b5373('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5e9386});if(this['hasCommentThread'](_0x5e9386))throw new _0x4b5373('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5e9386});const _0x4e1f78=new ui(this,{'channelId':_0x4bedb1,'id':_0x5e9386,'context':_0x37b60c,'attributes':_0x413526,'unlinkedAt':_0x51f6df,'resolvedAt':_0x3f26c9,'resolvedBy':_0x495077?this['context']['plugins']['get'](it)['getUser'](_0x495077):null,'isResolvable':_0x9c4044,'isSubmitted':_0x1b60e7||_0x5bf00f});this['_threads']['set'](_0x5e9386,_0x4e1f78);for(const _0x23fc60 of _0x305a0c)_0x4e1f78['_add'](this['_createNewComment']({'threadId':_0x5e9386,..._0x23fc60}));return _0x8492a8&&_0x4e1f78['attachTo'](_0x8492a8),_0x5bf00f||!_0x4e1f78['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4bedb1,'threadId':_0x5e9386});}['_submitCommentThread']({channelId:_0x4ac878,threadId:_0x2578f6}){if(!this['hasCommentThread'](_0x2578f6))throw new _0x4b5373('commentsrepository-missing-comment-thread',this);const _0x2774db=this['getCommentThread'](_0x2578f6);if(_0x2774db['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x127c46,comments:_0x4062fd,resolvedAt:_0x5cd474,resolvedBy:_0x57b85b,context:_0x38edf2,attributes:_0x218d7d}=_0x2774db,_0x22109f=this['context']['plugins']['get']('PendingActions'),_0x36f4aa=_0x22109f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4ac878,'threadId':_0x127c46,'comments':_0x4062fd['map'](_0x215b15=>_0x215b15['toJSON']()),'resolvedAt':_0x5cd474,'resolvedBy':_0x57b85b?_0x57b85b['id']:_0x57b85b,'context':_0x38edf2,'attributes':_0x218d7d})['then'](({comments:_0x1f8929})=>{_0x22109f['remove'](_0x36f4aa);for(const _0x1021cd of _0x1f8929)this['_updateComment']({'channelId':_0x4ac878,'threadId':_0x2578f6,'commentId':_0x1021cd['commentId'],'createdAt':_0x1021cd['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x451323=>{throw console['error'](_0x451323),new _0x4b5373('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0xa8a734,target:_0x1b4b15}){const _0x280069=this['getCommentThread'](_0xa8a734);if(!_0x280069)throw new _0x4b5373('commentsrepository-attach-missing-comment-thread',this);const _0x166168=this['context']['plugins']['get']('PendingActions'),_0x484609=this['context']['plugins']['get'](O),_0xcfa3e3=this['_createCommentThreadView'](_0x280069),_0x43184f=new Ct(_0x280069,_0xcfa3e3);let _0x378a7f=null;_0xcfa3e3['on']('change:isDirty',(_0x160b39,_0x540b32,_0x2f2161)=>{_0x2f2161?_0x378a7f=_0x166168['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x378a7f&&(_0x166168['remove'](_0x378a7f),_0x378a7f=null);}),this['_threadToController']['set'](_0x280069,_0x43184f),this['_viewToController']['set'](_0xcfa3e3,_0x43184f);const _0x58bbc6=new S(this['context']['locale'],_0xcfa3e3);_0x58bbc6['bind']('length')['to'](_0xcfa3e3),_0x58bbc6['bind']('isDirty')['to'](_0xcfa3e3,'isDirty',_0xcfa3e3,'length',(_0x5801b,_0x8cb355)=>_0x5801b||!_0x8cb355),_0x58bbc6['bind']('isActive')['to'](_0xcfa3e3),_0x58bbc6['type']='comment';const _0x511b0b=new d({'view':_0x58bbc6,'target':_0x1b4b15,'type':'comment','isVisible':!_0x280069['archivedAt']});return _0xcfa3e3['on']('escape',()=>{_0x511b0b['fire']('escape');}),this['_bindAnnotationToEditors'](_0xcfa3e3,_0x511b0b),_0x484609['add'](_0x511b0b),_0x511b0b;}['_bindAnnotationToEditors'](_0x19df0a,_0x4e77ef){this['listenTo'](_0x19df0a,'editorReady',(_0x5b81ca,_0xbac58)=>{const _0x324156=_0xbac58['ui']['view']['body']['bodyCollectionContainer'];_0x4e77ef['focusableElements']['add'](_0x324156),this['context']instanceof _0x26d715&&this['context']['ui']['focusTracker']['add'](_0x324156);},{'priority':'highest'}),this['listenTo'](_0x19df0a,'editorDestroyed',(_0x1e32a6,_0x30663a)=>{const _0x43a8b2=_0x30663a['ui']['view']['body']['bodyCollectionContainer'];_0x4e77ef['focusableElements']['has'](_0x43a8b2)&&_0x4e77ef['focusableElements']['remove'](_0x43a8b2),this['context']instanceof _0x26d715&&this['context']['ui']['focusTracker']['remove'](_0x43a8b2);});}['_unbindEditors'](_0x55a5ec){this['stopListening'](_0x55a5ec,'editorReady'),this['stopListening'](_0x55a5ec,'editorDestroyed');}['_createCommentThreadView'](_0x1b133d){const _0x25f1b3=this['context']['plugins']['get'](it),{config:_0x15b802,locale:_0x16e333}=this['context'],_0x1c3a21=lt(_0x15b802['get']('locale'),_0x16e333);return new(0x0,(_0x15b802['get']('comments'))['CommentThreadView'])(_0x16e333,_0x1b133d,_0x25f1b3['me'],{'editorConfig':{..._0x15b802['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x15b802['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x15b802['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x15b802['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x15b802['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1c3a21,'CommentView':_0x15b802['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x23284c,channelId:_0x1a755f,resolvedAt:_0x380595,resolvedBy:_0x5acf5c,isFromAdapter:_0x6ca836}){if(!this['hasCommentThread'](_0x23284c))throw new _0x4b5373('commentsrepository-missing-comment-thread',null,{'threadId':_0x23284c});const _0x91c7f1=this['getCommentThread'](_0x23284c);if(_0x91c7f1['isResolved'])throw new _0x4b5373('commentsrepository-resolved-comment-thread',null,{'threadId':_0x23284c});const _0x245786=this['context']['plugins']['get'](it);if(_0x91c7f1['resolvedBy']=_0x245786['getUser'](_0x5acf5c),_0x91c7f1['resolvedAt']=_0x380595,_0x6ca836||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4078a1=this['context']['plugins']['get']('PendingActions'),_0x24661b=_0x4078a1['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1a755f,'threadId':_0x23284c})['then'](({resolvedAt:_0x4b2c4e,resolvedBy:_0x252026})=>{_0x4078a1['remove'](_0x24661b),_0x91c7f1['resolvedBy']['id']!==_0x252026&&(_0x91c7f1['resolvedBy']=_0x245786['getUser'](_0x252026)),_0x91c7f1['resolvedAt']=_0x4b2c4e;})['catch'](_0x58d0be=>{throw console['error'](_0x58d0be),new _0x4b5373('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3f127d,channelId:_0x2f4e6c,isFromAdapter:_0x43d0d6}){if(!this['hasCommentThread'](_0x3f127d))throw new _0x4b5373('commentsrepository-missing-comment-thread',null,{'threadId':_0x3f127d});const _0x259cd4=this['getCommentThread'](_0x3f127d);if(!_0x259cd4['isResolved'])throw new _0x4b5373('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3f127d});if(_0x259cd4['resolvedBy']=null,_0x259cd4['resolvedAt']=null,_0x43d0d6||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x243815=this['context']['plugins']['get']('PendingActions'),_0x5f390b=_0x243815['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2f4e6c,'threadId':_0x3f127d})['then'](()=>_0x243815['remove'](_0x5f390b))['catch'](_0x38d4ae=>{throw console['error'](_0x38d4ae),new _0x4b5373('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x118aa9,isFromAdapter:_0x154a87}){const _0x167fe3=this['getCommentThread'](_0x118aa9);if(!_0x167fe3)throw new _0x4b5373('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x118aa9),this['_threads']['delete'](_0x118aa9),!_0x167fe3['isSubmitted']||_0x154a87||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x24f265=this['context']['plugins']['get']('PendingActions'),{channelId:_0xc6822}=_0x167fe3,_0x149993=_0x24f265['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xc6822,'threadId':_0x118aa9})['then'](()=>_0x24f265['remove'](_0x149993))['catch'](_0xa216b2=>{throw console['error'](_0xa216b2),new _0x4b5373('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2717d8,unlinkedAt:_0x310704,context:_0x4146d8,attributes:_0xf9bbc5,isFromAdapter:_0x9b60cc}){if('string'!=typeof _0x2717d8)throw new _0x4b5373('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2717d8});if(!this['hasCommentThread'](_0x2717d8))throw new _0x4b5373('commentsrepository-missing-comment-thread',null,{'threadId':_0x2717d8});const _0x146eb6=this['getCommentThread'](_0x2717d8);let _0x61b2d1=!0x1;if(void 0x0!==_0x4146d8&&_0x146eb6['context']!==_0x4146d8&&(_0x146eb6['context']=_0x4146d8,_0x61b2d1=!0x0),void 0x0!==_0x310704&&_0x146eb6['unlinkedAt']!==_0x310704&&(_0x146eb6['unlinkedAt']=_0x310704,_0x61b2d1=!0x0),_0xf9bbc5&&!wt(_0xf9bbc5,_0x146eb6['attributes'])&&(_0x146eb6['attributes']=_0xf9bbc5,_0x61b2d1=!0x0),!_0x61b2d1)return Promise['resolve']();if(!_0x146eb6['isSubmitted']||_0x9b60cc||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4a8601=this['context']['plugins']['get']('PendingActions'),{channelId:_0xbc6a31}=_0x146eb6,_0x490a6e=_0x4a8601['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xbc6a31,'threadId':_0x2717d8,'context':_0x4146d8,'unlinkedAt':_0x310704,'attributes':_0xf9bbc5})['then'](()=>_0x4a8601['remove'](_0x490a6e))['catch'](_0x159240=>{throw console['error'](_0x159240),new _0x4b5373('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x46bd10){const _0x4145d1=this['context']['plugins']['get'](O),_0x2314b6=this['getCommentThread'](_0x46bd10);if(_0x2314b6['_isAttached']=!0x1,this['_threadToController']['has'](_0x2314b6)){const _0x3d523b=this['_threadToController']['get'](_0x2314b6),_0x4074f4=_0x3d523b['view'],_0x193996=_0x4145d1['getByInnerView'](_0x4074f4);this['_threadToController']['delete'](_0x2314b6),this['_viewToController']['delete'](_0x4074f4),_0x193996&&_0x4145d1['remove'](_0x193996),_0x3d523b['destroy'](),_0x4074f4['destroy']()['then'](()=>{this['_unbindEditors'](_0x4074f4);});}}['_updateActiveAnnotation']({threadId:_0x450e4a,resolvedAt:_0x1719f1,unlinkedAt:_0x373eec}){const _0xb761ec=!!_0x1719f1,_0x329a16=this['context']['plugins']['get'](O),_0x44f28a=this['getCommentThread'](_0x450e4a);if(this['_threadToController']['has'](_0x44f28a)){const _0x553d63=this['_threadToController']['get'](_0x44f28a)['view'],_0x5268a5=_0x329a16['getByInnerView'](_0x553d63);_0x5268a5&&(_0xb761ec&&_0x329a16['_removeActiveAnnotation'](_0x5268a5),_0x373eec?_0x5268a5['isVisible']=!0x1:_0x5268a5['refreshVisibility']());}}['_getExternalAuthor'](_0x1d3460){const _0x700d10=this['context']['plugins']['get'](it),_0x27c6c4=pt('external:'+_0x1d3460),_0x226242=_0x700d10['getUser'](_0x27c6c4);return _0x226242||_0x700d10['addUser']({'id':_0x27c6c4,'name':_0x1d3460});}['_createNewComment']({threadId:_0x2c5913,commentId:_0x380e5e=_0x210fd1(),content:_0x3980fe,authorId:_0x453ab6,createdAt:_0x233e9c,attributes:_0x4d1f3a}){if('string'!=typeof _0x380e5e)throw new _0x4b5373('commentsrepository-invalid-commentid');if('string'!=typeof _0x453ab6)throw new _0x4b5373('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3980fe||!_0x3980fe['trim']())throw new _0x4b5373('commentsrepository-invalid-comment-content');const _0x2c3e41=this['context']['plugins']['get'](it)['getUser'](_0x453ab6);if(!_0x2c3e41)throw new _0x4b5373('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x453ab6});let _0x1b9209=null,_0x5aed2b=_0x233e9c;return _0x4d1f3a?.['@external']&&(_0x1b9209=this['_getExternalAuthor'](_0x4d1f3a['@external']['authorName']),_0x5aed2b=new Date(_0x4d1f3a['@external']['createdAt'])),new fi(this,{'threadId':_0x2c5913,'id':_0x380e5e,'author':_0x1b9209||_0x2c3e41,'creator':_0x2c3e41,'content':_0x3980fe,'createdAt':_0x233e9c,'authoredAt':_0x5aed2b,'attributes':_0x4d1f3a});}['_addComment'](_0x1e0a65){let {threadId:_0x4217b5,content:_0x2e6e4d,attributes:_0xc710d4,isFromAdapter:_0x168818}=_0x1e0a65;const _0x2c7491=this['getCommentThread'](_0x1e0a65['threadId']);if(!_0x2c7491)throw new _0x4b5373('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3c4fe8=this['_createNewComment'](_0x1e0a65),{id:_0x346fea}=_0x3c4fe8;if(_0x2c7491['_add'](_0x3c4fe8),_0x168818||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2c7491['isSubmitted'])return Promise['resolve']();const _0xf12a4d=this['context']['plugins']['get']('PendingActions'),{channelId:_0xa4b5a9}=_0x2c7491,_0x206c91=_0xf12a4d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xc710d4||(_0xc710d4={}),this['adapter']['addComment']({'channelId':_0xa4b5a9,'threadId':_0x4217b5,'commentId':_0x346fea,'content':_0x2e6e4d,'attributes':_0xc710d4})['then'](_0x46bd00=>{_0xf12a4d['remove'](_0x206c91),_0x46bd00&&this['_updateComment']({'channelId':_0xa4b5a9,'threadId':_0x4217b5,'commentId':_0x346fea,'createdAt':_0x46bd00['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x389304=>{throw console['error'](_0x389304),new _0x4b5373('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xb4d7e1,commentId:_0x4fb69d,content:_0x3a74b3,createdAt:_0x5152d9,attributes:_0x29f1fd,isFromAdapter:_0x55fb65}){if(void 0x0!==_0x3a74b3&&('string'!=typeof _0x3a74b3||!_0x3a74b3['trim']()['length']))throw new _0x4b5373('commentsrepository-update-comment-invalid-content');const _0x468a73=this['getCommentThread'](_0xb4d7e1),_0x46ba7e=_0x468a73['getComment'](_0x4fb69d);if(!_0x46ba7e)throw new _0x4b5373('commentsrepository-update-missing-comment',this);let _0x973ab6=!0x1;if(_0x3a74b3&&_0x3a74b3!==_0x46ba7e['content']&&(_0x46ba7e['isEditable']||_0x55fb65)&&(_0x46ba7e['content']=_0x3a74b3,_0x973ab6=!0x0),_0x5152d9&&_0x5152d9!==_0x46ba7e['createdAt']&&(_0x46ba7e['createdAt']=_0x5152d9,_0x46ba7e['attributes']&&_0x46ba7e['attributes']['@external']||(_0x46ba7e['authoredAt']=_0x5152d9),_0x973ab6=!0x0),_0x29f1fd&&!wt(_0x29f1fd,_0x46ba7e['attributes'])&&(_0x46ba7e['attributes']=_0x29f1fd,_0x973ab6=!0x0),!_0x973ab6)return Promise['resolve']();if(_0x468a73['fire']('commentUpdated'),_0x55fb65||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x29b029=this['context']['plugins']['get']('PendingActions'),{channelId:_0x350888}=this['getCommentThread'](_0x46ba7e['threadId']),_0x421e02=_0x29b029['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x350888,'threadId':_0xb4d7e1,'commentId':_0x4fb69d,'content':_0x3a74b3,'attributes':_0x29f1fd})['then'](()=>_0x29b029['remove'](_0x421e02))['catch'](_0x84706c=>{throw console['error'](_0x84706c),new _0x4b5373('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xcdcad5,commentId:_0x515494,isFromAdapter:_0x310db9}){const _0x3c8c1e=this['getCommentThread'](_0xcdcad5),_0x6c3f92=_0x3c8c1e['getComment'](_0x515494);if(!_0x6c3f92)throw new _0x4b5373('commentsrepository-remove-missing-comment',this);if(_0x3c8c1e['_remove'](_0x6c3f92),_0x310db9||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2badbd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x138ccf}=_0x3c8c1e,_0x1bc1cb=_0x2badbd['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x138ccf,'threadId':_0xcdcad5,'commentId':_0x515494})['then'](()=>_0x2badbd['remove'](_0x1bc1cb))['catch'](_0x1fa27e=>{throw console['error'](_0x1fa27e),new _0x4b5373('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
30
+ _0x3c1a8c(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1723e8,_0x1f1af8){super();const _0xf25e46=_0x1f1af8['isResolvable'];this['channelId']=_0x1f1af8['channelId'],this['id']=_0x1f1af8['id'],this['comments']=new _0x4d4610(),this['_repository']=_0x1723e8,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1f1af8['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1723e8,'_permissions',_0x1723e8,'_readOnlyChannels',()=>_0x1723e8['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1723e8,'_permissions',()=>_0x1723e8['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1723e8,'_permissions',()=>{const _0x10c9ee=_0x1723e8['getPermissions'](this['channelId']);return _0x10c9ee['write']||_0x10c9ee['admin'];}),this['bind']('isResolvable')['to'](_0x1723e8,'_permissions',()=>_0xf25e46&&_0x1723e8['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1f1af8['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x44f21b,_0x234df5)=>_0x44f21b?_0x234df5?_0x44f21b<_0x234df5?_0x44f21b:_0x234df5:_0x44f21b:_0x234df5),this['set']('unlinkedAt',_0x1f1af8['unlinkedAt']||null),this['set']('resolvedAt',_0x1f1af8['resolvedAt']||null),this['set']('resolvedBy',_0x1f1af8['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x32b38a=>!!_0x32b38a),this['set']('attributes',_0x1f1af8['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x3e0448,_0xfbb122)=>_0x3e0448+_0xfbb122['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2ebcea,id:_0xaff44b}=this;this['_repository']['fire'](bt('submitCommentThread',_0x2ebcea),{'channelId':_0x2ebcea,'threadId':_0xaff44b});}['setUnlinkedAt'](_0x10f027){this['_update']({'unlinkedAt':_0x10f027});}['resolve']({resolvedAt:_0x5a1166=new Date(),resolvedBy:_0x4386a0=null,isFromAdapter:_0x539355=!0x1}={}){const _0x59d671=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x22842d,id:_0x12a4bc}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x22842d),{'channelId':_0x22842d,'threadId':_0x12a4bc,'resolvedAt':_0x5a1166,'resolvedBy':_0x4386a0||_0x59d671['id'],'isFromAdapter':_0x539355});}['reopen']({isFromAdapter:_0x408a4a=!0x1}={}){const {channelId:_0x462781,id:_0x54ad79}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x462781),{'channelId':_0x462781,'threadId':_0x54ad79,'isFromAdapter':_0x408a4a});}['setContext'](_0x14bf4e){this['context']||this['_update']({'context':_0x14bf4e});}['setAttribute'](_0x5bb7bb,_0x4668e4){const _0x91fcce=It(this['attributes']);At(_0x91fcce,_0x5bb7bb,_0x4668e4),this['_update']({'attributes':_0x91fcce});}['removeAttribute'](_0x30dc9e){const _0x1d98a9=It(this['attributes']);yt(_0x1d98a9,_0x30dc9e),this['_update']({'attributes':_0x1d98a9});}['remove']({isFromAdapter:_0x49180b=!0x1}={}){const {channelId:_0x1d8f00,id:_0x303756}=this;this['_repository']['fire'](bt('removeCommentThread',_0x1d8f00),{'channelId':_0x1d8f00,'threadId':_0x303756,'isFromAdapter':_0x49180b});}['attachTo'](_0x3eb269){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x3eb269});}['addComment'](_0x2add86){const {channelId:_0x2eb529,id:_0x55178d}=this;this['_repository']['fire'](bt('addComment',_0x2eb529,_0x55178d),Object['assign']({'channelId':_0x2eb529,'threadId':_0x55178d},_0x2add86));}['getComment'](_0x2a1554){if('string'!=typeof _0x2a1554)throw new _0x4b5373('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2a1554});return this['comments']['get'](_0x2a1554);}['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'](_0x54073d=>_0x54073d['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4e57ed){return this['listenTo'](_0x4e57ed,'change:authoredAt',()=>{const _0x2808e7=this['_findOptimalIndex'](_0x4e57ed),_0x24f0e4=this['comments'];_0x2808e7-0x1!=_0x24f0e4['getIndex'](_0x4e57ed)&&_0x2808e7+0x1!=_0x24f0e4['getIndex'](_0x4e57ed)&&(this['_remove'](_0x4e57ed),this['_add'](_0x4e57ed));}),this['comments']['add'](_0x4e57ed,this['_findOptimalIndex'](_0x4e57ed));}['_update'](_0x41697d){const {channelId:_0x569b1a,id:_0x2d8392}=this;this['_repository']['fire'](bt('updateCommentThread',_0x569b1a),{..._0x41697d,'channelId':_0x569b1a,'threadId':_0x2d8392});}['_remove'](_0x2da5eb){return this['stopListening'](_0x2da5eb),_0x2da5eb['destroy'](),this['comments']['remove'](_0x2da5eb);}['_findOptimalIndex'](_0x27101b){const _0x49807b=this['comments']['find'](_0x16a848=>new Date(_0x16a848['authoredAt'])['getTime']()>new Date(_0x27101b['authoredAt'])['getTime']());return _0x49807b?this['comments']['getIndex'](_0x49807b):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
31
+ _0x3c1a8c(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x50996,_0x3fb5ce){super();const _0x2207fb=_0x50996['context']['plugins']['get'](it)['me'],_0x7729c0=_0x50996['getCommentThread'](_0x3fb5ce['threadId']),_0x51d1c5=0x0===_0x7729c0['comments']['length'],_0x4b4998=_0x2207fb===_0x3fb5ce['author'];this['id']=_0x3fb5ce['id'],this['threadId']=_0x3fb5ce['threadId'],this['author']=_0x3fb5ce['author'],this['creator']=_0x3fb5ce['creator'],this['isExternal']=Boolean(_0x3fb5ce['attributes']&&_0x3fb5ce['attributes']['@external']),this['set']('content',_0x3fb5ce['content']),this['createdAt']=_0x3fb5ce['createdAt']||new Date(),this['set']('authoredAt',_0x3fb5ce['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x7729c0,'resolvedAt'),this['set']('attributes',_0x3fb5ce['attributes']||{}),this['bind']('isEditable')['to'](_0x50996,'_permissions',()=>{const _0xcb5991=_0x50996['getPermissions'](_0x7729c0['channelId'])['write'],_0x37af49=_0x50996['getPermissions'](_0x7729c0['channelId'])['modifyAll'];return _0x4b4998&&_0xcb5991||!_0x4b4998&&_0x37af49;}),this['bind']('isRemovable')['to'](_0x7729c0,'isRemovable',_0x50996,'_permissions',_0x4e3d17=>{const _0x162a54=_0x50996['getPermissions'](_0x7729c0['channelId'])['write'],_0x358880=_0x50996['getPermissions'](_0x7729c0['channelId'])['modifyAll'];return _0x4b4998&&_0x162a54||_0x4e3d17&&_0x51d1c5||!_0x4b4998&&_0x358880&&!_0x51d1c5;}),this['bind']('isReadOnly')['to'](_0x7729c0,'isReadOnly'),this['_repository']=_0x50996;}get['weight'](){return Math['max'](function(_0x28027d){const _0x4e5fba=document['createElement']('div');return _0x4e5fba['innerHTML']=_0x28027d,_0x4e5fba['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1bbcac){const {threadId:_0x535149,id:_0x52f0dd}=this;if(!this['_repository']['hasCommentThread'](_0x535149))throw new _0x4b5373('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x6025dd}=this['_repository']['getCommentThread'](_0x535149);this['_repository']['fire'](bt('updateComment',_0x6025dd,_0x535149),{'channelId':_0x6025dd,'threadId':_0x535149,'commentId':_0x52f0dd,..._0x1bbcac});}['setAttribute'](_0x3cf10c,_0x537ee2){const _0xa55bf2=It(this['attributes']);At(_0xa55bf2,_0x3cf10c,_0x537ee2),this['update']({'attributes':_0xa55bf2});}['removeAttribute'](_0x5d5503){const _0x329ffa=It(this['attributes']);yt(_0x329ffa,_0x5d5503),this['update']({'attributes':_0x329ffa});}['remove'](_0x1d505d={}){if(!_0x1d505d['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1f709c,id:_0x27b846}=this;if(!this['_repository']['hasCommentThread'](_0x1f709c))throw new _0x4b5373('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xeb7c38}=this['_repository']['getCommentThread'](_0x1f709c);this['_repository']['fire'](bt('removeComment',_0xeb7c38,_0x1f709c),{'channelId':_0xeb7c38,'threadId':_0x1f709c,'commentId':_0x27b846,..._0x1d505d});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x243c2e,..._0x180506){for(const _0x1e6b37 of _0x180506)void 0x0!==_0x1e6b37&&(_0x243c2e+=':'+String(_0x1e6b37));return _0x243c2e;}class J extends _0x165f32{['refresh'](){const _0x348fda=this['editor']['model']['document']['selection'];for(const _0x5abf71 of _0x348fda['getRanges']())if(this['_hasContent'](_0x5abf71))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x44cbd5=_0x210fd1()}={}){const _0x519b97=this['editor']['model'],_0xcbea2=[];for(const _0x3a5a7b of _0x519b97['document']['selection']['getRanges']())this['_hasContent'](_0x3a5a7b)&&_0xcbea2['push'](this['_trimToContent'](_0x3a5a7b));_0x519b97['change'](_0xb7c9de=>{for(const _0x4d2add of _0xcbea2){const _0x3eee0c=_0x210fd1()['substr'](0x1,0x5),_0x5ba8ef='comment:'+_0x44cbd5+':'+_0x3eee0c;_0xb7c9de['addMarker'](_0x5ba8ef,{'range':_0x4d2add,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x206b5f){for(const _0x5ce9af of _0x206b5f['getItems']())if(this['_itemIsContent'](_0x5ce9af))return!0x0;return!0x1;}['_itemIsContent'](_0x3acc29){return _0x3acc29['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3acc29)&&!_0x3acc29['is']('element','tableCell');}['_trimToContent'](_0x92b85c){const _0xb914b4=_0xaa388c=>!this['_itemIsContent'](_0xaa388c['item']),_0xf633a5=_0x92b85c['start']['getLastMatchingPosition'](_0xb914b4),_0x7d15b2=_0x92b85c['end']['getLastMatchingPosition'](_0xb914b4,{'direction':'backward'});return this['editor']['model']['createRange'](_0xf633a5,_0x7d15b2);}}class P extends _0x28c70b{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5885c1){super(_0x5885c1),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x169ddc=this['editor'],_0x233afd=_0x169ddc['model']['document']['selection'],_0x59708e=_0x8cae09(()=>this['refreshSelectedViews'](),0xa);_0x233afd['on']('change:range',(_0x3ea573,_0x17f97c)=>{_0x17f97c['directChange']&&(_0x59708e['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x169ddc['editing']['view']['document'],'change:isFocused',(_0x3777ac,_0x392818,_0x43e2a7)=>{_0x43e2a7&&_0x59708e();}),this['listenTo'](_0x169ddc['ui']['focusTracker'],'change:isFocused',(_0x42ad35,_0x1e0cb3,_0x1d9e8d)=>{_0x1d9e8d||_0x169ddc['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x29651a=>this['_editorAnnotationsData']['has'](_0x29651a['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x300966){if(this['_editorAnnotations']['has'](_0x300966['view']))return;this['_editorAnnotations']['add'](_0x300966['view']),this['editor']['ui']['focusTracker']['add'](_0x300966['view']['element']);const _0x2c98cf=this['editor']['plugins']['get'](O);this['listenTo'](_0x2c98cf['collection'],'remove',(_0x3ce680,_0x353aa6)=>{this['editor']['ui']['focusTracker']['remove'](_0x353aa6['view']['element']),this['_editorAnnotations']['delete'](_0x353aa6['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x57f6e0){if('function'!=typeof _0x57f6e0)throw new _0x4b5373('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x57f6e0);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x21dab9,annotations:_0x1d843d}){const _0x314f59=[],_0x2ae99e=this['editor']['model']['document']['selection'],_0x4ceda2=Array['from'](_0x2ae99e['getRanges']());for(const [_0x20578a,_0x102686]of this['_editorAnnotationsData']){const _0x1eb62a=_0x189e71(_0x102686),_0x536e03=_0x1d843d['getByInnerView'](_0x20578a);_0x1eb62a&&_0x536e03&&_0x314f59['push']({'annotation':_0x536e03,'range':_0x1eb62a});}function _0x189e71(_0x466db5){for(const _0x1e3dc6 of _0x466db5)for(const _0x2c6da7 of _0x4ceda2)if(_0x1e3dc6['containsRange'](_0x2c6da7,!_0x2ae99e['isCollapsed']))return _0x1e3dc6;return null;}return _0x314f59['sort']((_0x7bff00,_0x4ba7d5)=>{const _0x588f96=_0x7bff00['range'],_0x8ea8bb=_0x4ba7d5['range'];if(!_0x588f96['isEqual'](_0x8ea8bb)){if(_0x588f96['containsRange'](_0x8ea8bb,!0x0))return 0x1;if(_0x8ea8bb['containsRange'](_0x588f96,!0x0))return-0x1;}return _0x7bff00['annotation']==_0x21dab9?-0x1:_0x4ba7d5['annotation']==_0x21dab9?0x1:0x0;})['map'](_0x207935=>_0x207935['annotation']);}get['_editorAnnotationsData'](){const _0x2dcf25=new Map();for(const _0x1c7a6d of Array['from'](this['_dataCollectors']))for(const [_0xa63f48,_0x3e037d]of _0x1c7a6d())_0x2dcf25['set'](_0xa63f48,_0x3e037d);return _0x2dcf25;}}class st extends _0x28c70b{['afterInit'](){const _0x47e95f=this['editor'];if(!_0x47e95f['plugins']['has']('RestrictedEditingModeEditing'))return;_0x47e95f['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x28c70b{constructor(_0x5884a6){super(_0x5884a6),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2b2433=this['editor'],_0x3a1222=_0x2b2433['commands']['get']('importWord'),_0x476922=_0x2b2433['plugins']['get'](it);_0x3a1222&&(_0x3a1222['on']('execute',(_0x264926,[,_0xf7feb4])=>{_0xf7feb4['collaboration_features']={'comments':!0x0,'user_id':_0x476922['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x3a1222,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x25c957,_0xb9f6af){const {comment_threads:_0x3a970b}=_0xb9f6af;_0x3a970b&&_0x3a970b['forEach'](({thread_id:_0xbd198c,comments:_0x5ebe0f,is_resolved:_0x4dcbd2})=>{const _0xa75093=new Date(),_0x43203c=_0x5ebe0f['map'](({author:_0x5ee9b0,content:_0x3c5241,created_at:_0x4a1223})=>({'content':_0x3c5241,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xa75093,'attributes':{'@external':{'authorName':_0x5ee9b0,'createdAt':_0x4a1223?new Date(_0x4a1223):new Date(),'source':'importWord'}}})),_0x4b791f=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4b791f,'threadId':_0xbd198c,'comments':_0x43203c,'resolvedAt':_0x4dcbd2?_0xa75093:null});});}}class at extends _0x28c70b{constructor(_0x1fb155){super(_0x1fb155),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5ec46c=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5ec46c,'contentInsertion',(_0x3a34f7,_0x361425)=>this['_removeMarkersWithoutThreads'](_0x361425['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x55305d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x55305d;const _0x2af3a1=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1e21c8 of _0x55305d['keys']()){const [_0x42a5a9,_0x36bc20]=_0x1e21c8['split'](':');'comment'!=_0x42a5a9||_0x2af3a1['hasCommentThread'](_0x36bc20)||_0x55305d['delete'](_0x1e21c8);}return _0x55305d;}['_registerMarkerInClipboardPipeline'](){const _0x25e3b1=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x300858=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x300858&&_0x25e3b1['_registerMarkerToCopy']('comment',_0x300858);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4bab77){switch(_0x4bab77){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x28c70b{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3ee788,_0x12d80e)=>{if(!_0x12d80e['options']['showCommentHighlights'])return null;if(_0x12d80e['options']['ignoreResolvedComments']){const {id:_0x136e7b}=er(_0x3ee788['markerName']),_0x24f1df=this['editor']['plugins']['get'](o);if(_0x24f1df['getCommentThread'](_0x136e7b)?.['isResolved']&&_0x3ee788['item'])return _0x12d80e['consumable']['consume'](_0x3ee788['item'],'addMarker:'+_0x3ee788['markerName']),_0x12d80e['consumable']['consume'](_0x3ee788['item'],'removeMarker:'+_0x3ee788['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x49c00f=>{_0x49c00f['on']('addMarker:comment',(_0x354a62,_0x8dd6bc,_0x2be90c)=>{if(!_0x2be90c['options']['showCommentHighlights'])return;const _0x10b118=_0x8dd6bc['item'];if(!_0x10b118)return;const _0x1a5a17=_0x2be90c['mapper']['toViewElement'](_0x10b118);this['editor']['model']['schema']['isObject'](_0x10b118)&&_0x1a5a17&&!_0x1a5a17['getCustomProperty']('widget')&&_0x1a5a17['is']('containerElement')&&_0xb6f417(_0x1a5a17,_0x2be90c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x48b1eb,{writer:_0x582f0e,options:_0x55e7b9})=>{if(!_0x55e7b9['showCommentHighlights'])return null;const _0xd5a262=_0x582f0e['createContainerElement']('div'),_0x4bd8ad=_0x582f0e['createEmptyElement']('hr');return _0x582f0e['addClass']('ck-horizontal-line',_0xd5a262),_0x582f0e['insert'](_0x582f0e['createPositionAt'](_0xd5a262,0x0),_0x4bd8ad),_0xd5a262;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3729a3,{writer:_0x28e402,options:_0x2312da})=>{if(!_0x2312da['showCommentHighlights'])return null;const _0x18da96=_0x28e402['createContainerElement']('span'),_0x3d0b71=_0x28e402['createEmptyElement']('img');return _0x28e402['addClass']('image-inline',_0x18da96),_0x28e402['insert'](_0x28e402['createPositionAt'](_0x18da96,0x0),_0x3d0b71),_0x18da96;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2d6b64,{writer:_0x2e98c4,options:_0x8a8992})=>{if(_0x8a8992['showCommentHighlights'])return _0x2e98c4['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x18f2ef,_0x37c178,_0x43ffb0)=>{_0x43ffb0['options']['showCommentHighlights']&&_0x18f2ef['stop']();},{'priority':'high'});}}class r extends _0x28c70b{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x153ced){super(_0x153ced),this['set']('isThreadsLoadingPaused',!0x0),_0x153ced['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x15ea35,_0x57801a,_0x21da93,_0x5ca42d)=>{const _0x7d0c7d=_0x153ced['plugins']['get'](o),_0x5557a7=_0x21da93?er(_0x21da93)['id']:null;_0x153ced['model']['change'](()=>{if(_0x5557a7){const _0x3342ec=this['getAllMarkersForId'](_0x5557a7);for(const _0x437bad of _0x3342ec)_0x153ced['editing']['reconvertMarker'](_0x437bad);}if(_0x5ca42d){const {id:_0xb07766}=er(_0x5ca42d),_0x11be2c=_0x7d0c7d['getCommentThread'](_0xb07766);if(_0x11be2c&&_0x11be2c['unlinkedAt'])return;if(_0x11be2c&&!_0x11be2c['isAttached'])return;const _0x4426fc=this['getAllMarkersForId'](_0xb07766);for(const _0x30587c of _0x4426fc)_0x153ced['editing']['reconvertMarker'](_0x30587c);}}),_0x5557a7&&this['scrollToThreadMarker'](_0x5557a7);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x142a91=this['editor'],_0x5f3c96=_0x142a91['plugins']['get'](o),_0xc4d38=_0x142a91['config']['get']('collaboration.channelId'),_0x5b8262=_0x5f3c96['getCommentThreads']()['filter'](_0x2c19f8=>_0x2c19f8['channelId']!==_0xc4d38);_0x142a91['commands']['add']('addCommentThread',new J(_0x142a91)),this['listenTo'](_0x142a91,'change:isReadOnly',(_0x2b68af,_0x78b03e,_0x545884)=>{_0x5f3c96['switchReadOnly'](_0x545884,_0x142a91['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5f3c96,ft('addCommentThread',_0xc4d38),(_0x128fdb,{threadId:_0x280101})=>{const _0x25bed1=this['editor']['plugins']['get'](o)['getCommentThread'](_0x280101);_0x25bed1?.['unlinkedAt']&&this['_attachArchivedThread'](_0x280101);}),this['listenTo'](_0x5f3c96,ft('removeCommentThread',_0xc4d38),(_0x5c4e6c,{threadId:_0x3f4158})=>{_0x142a91['model']['enqueueChange']({'isUndoable':!0x1},_0x51969a=>{const _0x155da9=this['getAllMarkersForId'](_0x3f4158);for(const _0x4ca881 of _0x155da9)_0x51969a['removeMarker'](_0x4ca881);});}),this['listenTo'](_0x5f3c96,ft('resolveCommentThread',_0xc4d38),(_0x3b6830,{threadId:_0x4e0b4a})=>{(this['_reconvertMarkers'](_0x4e0b4a),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x4e0b4a)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5f3c96,ft('reopenCommentThread',_0xc4d38),(_0x101bae,{threadId:_0x4fc45f})=>{this['_reconvertMarkers'](_0x4fc45f);},{'priority':'low'}),this['listenTo'](_0x5f3c96,ft('addComment',_0xc4d38),(_0x1847b4,{threadId:_0x5c0426,isFromAdapter:_0x52c1c8})=>{const _0x4dd542=this['getAllMarkersForId'](_0x5c0426);if(_0x52c1c8||0x0==_0x4dd542['length']||!_0x5f3c96['hasCommentThread'](_0x5c0426))return;0x1===_0x5f3c96['getCommentThread'](_0x5c0426)['length']&&_0x142a91['model']['enqueueChange']({'isUndoable':!0x1},_0x241edd=>{for(const _0x444e54 of _0x4dd542)_0x241edd['updateMarker'](_0x444e54,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5b8262);}['afterInit'](){!async function(_0x34c587){const _0x2e01b8=_0x2a237f([0x4d,0x30,0x46,0x47,0x5a,0x75,0x6e,0x73,0x68,0x7a,0x44,0x53,0x69,0x35,0x51,0x4a,0x58,0x74,0x56,0x32,0x49,0x76,0x54,0x70,0x78,0x63,0x52,0x4f,0x77,0x64,0x38,0x6c,0x41,0x55,0x33,0x43,0x42,0x62,0x48,0x31,0x34,0x45,0x66,0x71,0x6a,0x37,0x72,0x6b,0x39,0x6f,0x4c,0x67,0x65,0x6d,0x79,0x4b,0x57,0x61,0x50,0x4e,0x36,0x59]),_0x404b6f=0x6c481090,_0x5126a7=0x6c4f79f8^_0x404b6f,_0x52aa50=window[_0x2a237f([0x44,0x61,0x74,0x65])][_0x2a237f([0x6e,0x6f,0x77])](),_0x4062c1=_0x34c587[_0x2a237f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x47687b=new window[(_0x2a237f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d5c67=>{_0x4062c1[_0x2a237f([0x6f,0x6e,0x63,0x65])](_0x2a237f([0x72,0x65,0x61,0x64,0x79]),_0x5d5c67);}),_0x282c91={[_0x2a237f([0x6b,0x74,0x79])]:_0x2a237f([0x45,0x43]),[_0x2a237f([0x75,0x73,0x65])]:_0x2a237f([0x73,0x69,0x67]),[_0x2a237f([0x63,0x72,0x76])]:_0x2a237f([0x50,0x2d,0x32,0x35,0x36]),[_0x2a237f([0x78])]:_0x2a237f([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]),[_0x2a237f([0x79])]:_0x2a237f([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]),[_0x2a237f([0x61,0x6c,0x67])]:_0x2a237f([0x45,0x53,0x32,0x35,0x36])},_0x448453=_0x4062c1[_0x2a237f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2a237f([0x67,0x65,0x74])](_0x2a237f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x395f3a(){let _0x157b45,_0x5a8dca=null,_0x9b8170=null;try{if(_0x448453==_0x2a237f([0x47,0x50,0x4c]))return _0x2a237f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x157b45=_0x34c559(),!_0x157b45)return _0x2a237f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x157b45[_0x2a237f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x9b8170=_0x6b486d(_0x157b45[_0x2a237f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x157b45[_0x2a237f([0x6a,0x74,0x69])])),await _0x2b1b5c()?_0x4d81f2()?_0x2c47a4()?_0x2a237f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3449f4()?(_0x157b45[_0x2a237f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2a237f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5a8dca=_0x7082f7(_0x2a237f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x157b45[_0x2a237f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2a237f([0x74,0x72,0x69,0x61,0x6c])&&(_0x5a8dca=_0x7082f7(_0x2a237f([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x228c41()):_0x2a237f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2a237f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2a237f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2a237f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2c47a4(){const _0x3367d1=[_0x2a237f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2a237f([0x74,0x72,0x69,0x61,0x6c])][_0x2a237f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x157b45[_0x2a237f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x52aa50/0x3e8:0xe10*_0x5126a7;return _0x157b45[_0x2a237f([0x65,0x78,0x70])]<_0x3367d1;}function _0x4d81f2(){const _0x2f0f2d=_0x157b45[_0x2a237f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2f0f2d)return!0x1;if(_0x2f0f2d[_0x2a237f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a237f([0x2a])))return!0x0;if(_0x2f0f2d[_0x2a237f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a237f([0x43,0x4d,0x54])))return!0x0;if(_0x2f0f2d[_0x2a237f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a237f([0x52,0x43,0x4d,0x54]))){if(_0x5c91e2())return!0x0;if(_0x2a0e05()||_0x413682())return!0x0;}return!0x1;}function _0x3449f4(){const _0x21ae2e=_0x157b45[_0x2a237f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x21ae2e||0x0==_0x21ae2e[_0x2a237f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x11fa59}=new URL(window[_0x2a237f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x21ae2e[_0x2a237f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11fa59))return!0x0;const _0x3fecd7=_0x11fa59[_0x2a237f([0x73,0x70,0x6c,0x69,0x74])](_0x2a237f([0x2e]));return _0x21ae2e[_0x2a237f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x46e88d=>_0x46e88d[_0x2a237f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a237f([0x2a])))[_0x2a237f([0x6d,0x61,0x70])](_0x4d7581=>_0x4d7581[_0x2a237f([0x73,0x70,0x6c,0x69,0x74])](_0x2a237f([0x2e])))[_0x2a237f([0x73,0x6f,0x6d,0x65])](_0x51436e=>_0x3fecd7[_0x2a237f([0x65,0x76,0x65,0x72,0x79])]((_0xcb5288,_0x5e8790)=>_0x51436e[_0x5e8790]===_0xcb5288||_0x51436e[_0x5e8790]===_0x2a237f([0x2a])));}function _0x228c41(){return _0x5a8dca&&_0x9b8170?new window[(_0x2a237f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa0a7a9,_0x2f6066)=>{_0x5a8dca[_0x2a237f([0x74,0x68,0x65,0x6e])](_0xa0a7a9,_0x2f6066),_0x9b8170[_0x2a237f([0x74,0x68,0x65,0x6e])](_0x2e57dc=>{_0x2e57dc!=_0x2a237f([0x56,0x61,0x6c,0x69,0x64])&&_0xa0a7a9(_0x2e57dc);},_0x2f6066);}):_0x5a8dca||_0x9b8170||_0x2a237f([0x56,0x61,0x6c,0x69,0x64]);}}function _0x6b486d(_0x5bafef,_0xb0fc8d){return new window[(_0x2a237f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59bffd=>{if(_0x2c340a())return _0x59bffd(_0x2a237f([0x56,0x61,0x6c,0x69,0x64]));_0x30b030(),_0x4062c1[_0x2a237f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2a237f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4f3f17=!0x1;const _0x186f33=_0x210fd1();function _0x2b1516(_0x1490e0){return!!_0x1490e0&&(typeof _0x1490e0===_0x2a237f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1490e0===_0x2a237f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1490e0[_0x2a237f([0x74,0x68,0x65,0x6e])]===_0x2a237f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1490e0[_0x2a237f([0x63,0x61,0x74,0x63,0x68])]===_0x2a237f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x41b095(_0x355abd){_0x231017(_0x355abd)[_0x2a237f([0x74,0x68,0x65,0x6e])](_0x4d62c3=>{if(!_0x4d62c3||_0x4d62c3[_0x2a237f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2a237f([0x6f,0x6b]))return _0x2a237f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3b5a73(_0x2c688b(_0x186f33+_0xb0fc8d))!=_0x4d62c3[_0x2a237f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2a237f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2a237f([0x56,0x61,0x6c,0x69,0x64]);})[_0x2a237f([0x74,0x68,0x65,0x6e])](_0x183679=>(_0x4496fe(),_0x183679),()=>{const _0x3a5b16=_0x5d93d2();return null==_0x3a5b16?(_0x4496fe(),_0x2a237f([0x56,0x61,0x6c,0x69,0x64])):_0x2a237f(_0x52aa50-_0x3a5b16>(0x48449490^_0x404b6f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2a237f([0x74,0x68,0x65,0x6e])](_0x59bffd)[_0x2a237f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x59bffd(_0x2a237f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x39b273=0x6c7efe10^_0x404b6f;function _0x4496fe(){const _0x4a98b7=_0x2a237f([0x6c,0x6c,0x63,0x74,0x2d])+_0x3b5a73(_0x2c688b(_0x5bafef)),_0x542248=_0x50b8eb(_0x3b5a73(window[_0x2a237f([0x4d,0x61,0x74,0x68])][_0x2a237f([0x63,0x65,0x69,0x6c])](_0x52aa50/_0x39b273)));window[_0x2a237f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2a237f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a98b7,_0x542248);}function _0x5d93d2(){const _0xd5f6a2=_0x2a237f([0x6c,0x6c,0x63,0x74,0x2d])+_0x3b5a73(_0x2c688b(_0x5bafef)),_0x3d3f57=window[_0x2a237f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2a237f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd5f6a2);return _0x3d3f57?window[_0x2a237f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x50b8eb(_0x3d3f57),0x10)*_0x39b273:null;}function _0x231017(_0x30ec1b){return new window[(_0x2a237f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3fcd76,_0x5b7e3f)=>{_0x30ec1b[_0x2a237f([0x74,0x68,0x65,0x6e])](_0x3fcd76,_0x5b7e3f),window[_0x2a237f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5b7e3f,0x6c49c450^_0x404b6f);});}}_0x4062c1[_0x2a237f([0x6f,0x6e])](_0x2a237f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3d56ac,_0x1afe8c)=>{if(_0x1afe8c[0x0]!=_0x5bafef)return _0x59bffd(_0x2a237f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1afe8c[0x1]={..._0x1afe8c[0x1],[_0x2a237f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x186f33};},{[_0x2a237f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2a237f([0x68,0x69,0x67,0x68])}),_0x4062c1[_0x2a237f([0x6f,0x6e])](_0x2a237f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x17de5b=>{_0x2b1516(_0x17de5b[_0x2a237f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4f3f17=!0x0,_0x41b095(_0x17de5b[_0x2a237f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2a237f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2a237f([0x6c,0x6f,0x77])}),_0x47687b[_0x2a237f([0x74,0x68,0x65,0x6e])](()=>{_0x4f3f17||_0x59bffd(_0x2a237f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2c340a(){return _0x4062c1[_0x2a237f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2a237f([0x76,0x69,0x65,0x77])][_0x2a237f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2a237f([0x61,0x75,0x74,0x6f]);}function _0x30b030(){_0x4062c1[_0x2a237f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2a237f([0x76,0x69,0x65,0x77])][_0x2a237f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2a237f([0x61,0x75,0x74,0x6f]);}}function _0x7082f7(_0x40c18e){const _0x2050f9=[new window[(_0x2a237f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b7bdb=>setTimeout(_0x3b7bdb,0x6c412e5c^_0x404b6f)),_0x47687b[_0x2a237f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2a237f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2dc40d=>{let _0x2de2d2=0x0;_0x4062c1[_0x2a237f([0x6d,0x6f,0x64,0x65,0x6c])][_0x2a237f([0x6f,0x6e])](_0x2a237f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1ad1db,_0x20b4ec)=>{_0x20b4ec[0x0][_0x2a237f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2de2d2++,_0x2de2d2==(0x6c481168^_0x404b6f)&&(_0x2dc40d(),_0x1ad1db[_0x2a237f([0x6f,0x66,0x66])]());});}))];return window[_0x2a237f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2a237f([0x72,0x61,0x63,0x65])](_0x2050f9)[_0x2a237f([0x74,0x68,0x65,0x6e])](()=>_0x40c18e);}async function _0x8b5766(){await _0x47687b,_0x4062c1[_0x2a237f([0x6d,0x6f,0x64,0x65,0x6c])][_0x2a237f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4b7bbc,_0x4062c1[_0x2a237f([0x6d,0x6f,0x64,0x65,0x6c])][_0x2a237f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4b7bbc,_0x4062c1[_0x2a237f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2a237f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5c91e2(){return _0x5d11a0(_0x2a237f([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x49f493(_0x2a237f([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2a237f([0x73,0x74,0x61,0x74,0x65])]==_0x2a237f([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2a0e05(){return _0x5d11a0(_0x2a237f([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 _0x413682(){return _0x5d11a0(_0x2a237f([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3431c3(_0x5bfb11){const _0x16eee3=_0x158b09();_0x4062c1[_0x16eee3]=_0x2a237f([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5bfb11,_0x5bfb11!=_0x2a237f([0x56,0x61,0x6c,0x69,0x64])&&_0x8b5766();}function _0x158b09(){const _0x50c232=window[_0x2a237f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2a237f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2a237f([0x6e,0x6f,0x77])]())[_0x2a237f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2a237f([0x2e]),'');let _0x3d6d32=_0x2a237f([0x4d]);for(let _0x4c09cc=0x0;_0x4c09cc<_0x50c232[_0x2a237f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4c09cc+=0x2){let _0x3477a6=window[_0x2a237f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x50c232[_0x2a237f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4c09cc,_0x4c09cc+0x2));_0x3477a6>=_0x2e01b8[_0x2a237f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3477a6-=_0x2e01b8[_0x2a237f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3d6d32+=_0x2e01b8[_0x3477a6];}return _0x3d6d32;}function _0x34c559(){const _0x58efc2=_0x448453[_0x2a237f([0x73,0x70,0x6c,0x69,0x74])](_0x2a237f([0x2e]));if(0x3!=_0x58efc2[_0x2a237f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3b4f94(_0x58efc2[0x1]);function _0x3b4f94(_0x222fe8){const _0xc90ea9=_0x467f4d(_0x222fe8);return _0xc90ea9&&_0x310571()?_0xc90ea9:null;function _0x310571(){const _0xf4d921=_0xc90ea9[_0x2a237f([0x6a,0x74,0x69])],_0x17ff38=window[_0x2a237f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xf4d921[_0x2a237f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xf4d921[_0x2a237f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5055df={..._0xc90ea9,[_0x2a237f([0x6a,0x74,0x69])]:_0xf4d921[_0x2a237f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xf4d921[_0x2a237f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5055df[_0x2a237f([0x76,0x63])],_0x2c688b(_0x5055df)==_0x17ff38;}}}async function _0x2b1b5c(){let _0x220cca=!0x0;try{const _0x4459ab=_0x448453[_0x2a237f([0x73,0x70,0x6c,0x69,0x74])](_0x2a237f([0x2e])),[_0xa1223b,_0xf700fc,_0x3ad317]=_0x4459ab;return _0x3ba228(_0xa1223b),await _0x59bf01(_0xa1223b,_0xf700fc,_0x3ad317),_0x220cca;}catch{return!0x1;}function _0x3ba228(_0x3a1ac9){const _0x392b04=_0x467f4d(_0x3a1ac9);_0x392b04&&_0x392b04[_0x2a237f([0x61,0x6c,0x67])]==_0x2a237f([0x45,0x53,0x32,0x35,0x36])||(_0x220cca=!0x1);}async function _0x59bf01(_0x2723ce,_0xb7cc5f,_0x2d1474){const _0x3f7303=window[_0x2a237f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2a237f([0x66,0x72,0x6f,0x6d])](_0x1fc45d(_0x2d1474),_0x1f4733=>_0x1f4733[_0x2a237f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x31635b=new window[(_0x2a237f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2a237f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2723ce+_0x2a237f([0x2e])+_0xb7cc5f),_0x1eb935=window[_0x2a237f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2a237f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1eb935)return;const _0x15ef80=await _0x1eb935[_0x2a237f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2a237f([0x6a,0x77,0x6b]),_0x282c91,{[_0x2a237f([0x6e,0x61,0x6d,0x65])]:_0x2a237f([0x45,0x43,0x44,0x53,0x41]),[_0x2a237f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2a237f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2a237f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1eb935[_0x2a237f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2a237f([0x6e,0x61,0x6d,0x65])]:_0x2a237f([0x45,0x43,0x44,0x53,0x41]),[_0x2a237f([0x68,0x61,0x73,0x68])]:{[_0x2a237f([0x6e,0x61,0x6d,0x65])]:_0x2a237f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x15ef80,_0x3f7303,_0x31635b)||(_0x220cca=!0x1);}}function _0x467f4d(_0x552069){return _0x552069[_0x2a237f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2a237f([0x65,0x79]))?JSON[_0x2a237f([0x70,0x61,0x72,0x73,0x65])](_0x1fc45d(_0x552069)):null;}function _0x1fc45d(_0x56cbe3){return window[_0x2a237f([0x61,0x74,0x6f,0x62])](_0x56cbe3[_0x2a237f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2a237f([0x2b]))[_0x2a237f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2a237f([0x2f])));}function _0x2c688b(_0x17bcfb){let _0x3c9c6a=0x1505;function _0x295042(_0x4087cb){for(let _0x34b19d=0x0;_0x34b19d<_0x4087cb[_0x2a237f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x34b19d++){const _0x57d3c4=_0x4087cb[_0x2a237f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x34b19d);_0x3c9c6a=(_0x3c9c6a<<0x5)+_0x3c9c6a+_0x57d3c4,_0x3c9c6a&=_0x3c9c6a;}}function _0x163edf(_0x54caea){Array[_0x2a237f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x54caea)?_0x54caea[_0x2a237f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x163edf):_0x54caea&&typeof _0x54caea==_0x2a237f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2a237f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x54caea)[_0x2a237f([0x73,0x6f,0x72,0x74])]()[_0x2a237f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x218d3d,_0x49cc9f])=>{_0x295042(_0x218d3d),_0x163edf(_0x49cc9f);}):_0x295042(window[_0x2a237f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x54caea));}return _0x163edf(_0x17bcfb),_0x3c9c6a>>>0x0;}function _0x3b5a73(_0x51bb25){return _0x51bb25[_0x2a237f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2a237f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2a237f([0x30]));}function _0x50b8eb(_0x4e3a8f){return _0x4e3a8f[_0x2a237f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2a237f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2a237f([0x6a,0x6f,0x69,0x6e])]('');}function _0x5d11a0(_0x3d62ed){return _0x4062c1[_0x2a237f([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2a237f([0x68,0x61,0x73])](_0x3d62ed);}function _0x49f493(_0x4615ca){return _0x4062c1[_0x2a237f([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2a237f([0x67,0x65,0x74])](_0x4615ca);}function _0x4b7bbc(){}function _0x2a237f(_0x14738a){return _0x14738a['map'](_0x8b3667=>String['fromCharCode'](_0x8b3667))['join']('');}_0x3431c3(await _0x395f3a());}(this);}['destroy'](){const _0x674c46=this['editor']['plugins']['get'](o),_0x5af024=this['editor']['config']['get']('collaboration.channelId');for(const _0x32f3e0 of _0x674c46['getCommentThreads']({'channelId':_0x5af024}))_0x674c46['_detachCommentThread'](_0x32f3e0['id']),_0x674c46['_threads']['delete'](_0x32f3e0['id']);super['destroy']();}['hasMarkerForId'](_0x2c6938){return this['getAllMarkersForId'](_0x2c6938)['length']>0x0;}['getAllMarkersForId'](_0x5a8cde){const _0x355830=[];for(const _0x4a394c of this['editor']['model']['markers'])_0x4a394c['name']['startsWith']('comment:'+_0x5a8cde)&&_0x355830['push'](_0x4a394c);return _0x355830;}['scrollToThreadMarker'](_0x2115b5){const _0xd2ace1=this['_getTargetForId'](_0x2115b5);_0xd2ace1&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x2115b5&&rt({'target':_0xd2ace1[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5eb21e){this['editor']['model']['change'](()=>{for(const _0x5a3d84 of this['getAllMarkersForId'](_0x5eb21e))this['editor']['editing']['reconvertMarker'](_0x5a3d84);});}['_attachArchivedThread'](_0x20e16f){const _0x4a4902=this['editor']['plugins']['get'](o),_0x596792=this['editor']['plugins']['get'](P),_0x273dc4=_0x4a4902['getCommentThread'](_0x20e16f);if(!_0x273dc4['isAttached']){const _0x30bfa1=_0x273dc4['attachTo'](()=>this['_getTargetForId'](_0x273dc4['id']));_0x596792['registerAnnotation'](_0x30bfa1),_0x273dc4['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4a1736=this['editor'],_0x3f14dc=_0x4a1736['plugins']['get'](it);_0x4a1736['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x56d56d,_0x504e4d)=>{const {id:_0x5a624e}=er(_0x56d56d['markerName']),_0x51aa83=_0x4a1736['plugins']['get'](o)['getCommentThread'](_0x5a624e),_0x4e7e1e=this['activeMarker']&&er(this['activeMarker'])['id']===_0x5a624e;let _0x52c64d;if(_0x51aa83&&_0x51aa83['isResolved']&&!_0x4e7e1e&&_0x56d56d['item'])return _0x504e4d['consumable']['consume'](_0x56d56d['item'],'addMarker:'+_0x56d56d['markerName']),_0x504e4d['consumable']['consume'](_0x56d56d['item'],'removeMarker:'+_0x56d56d['markerName']),null;const _0x47a9ff=['ck-comment-marker'];return _0x4e7e1e&&_0x47a9ff['push']('ck-comment-marker--active'),_0x52c64d=_0x51aa83?.['length']?_0x51aa83['comments']['first']['author']['id']:_0x3f14dc['me']['id'],{'classes':_0x47a9ff,'attributes':{'data-comment':_0x5a624e,'data-author-id':_0x52c64d}};}}),_0x4a1736['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2a68f0,{options:_0xffb18a})=>{if(_0xffb18a['showCommentHighlights'])return null;const _0x26b5c1=_0x4a1736['plugins']['get'](o),_0x4adcd4=_0x4a1736['model']['markers']['get'](_0x2a68f0),{id:_0x7591b1,part:_0xc930b0}=er(_0x2a68f0);return _0x4adcd4&&!_0x4adcd4['affectsData']||_0xffb18a['ignoreResolvedComments']&&_0x26b5c1['getCommentThread'](_0x7591b1)?.['isResolved']?null:{'group':'comment','name':_0xc930b0?_0x7591b1+':'+_0xc930b0:_0x7591b1};}}),_0x4a1736['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xe9b154,{writer:_0x4b19fa})=>_0x4b19fa['createElement']('$marker',{'data-name':'comment:'+_0xe9b154['getAttribute']('id')})}),_0x4a1736['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4a76c8=this['editor'],_0x409428=_0x4a76c8['plugins']['get'](o),_0x3c8955=new Set(),_0x35dd6a=new Set();_0x4a76c8['model']['document']['registerPostFixer'](_0x308c37=>{let _0x5a0834=!0x1;for(const {name:_0x254119,data:_0xd9eff0}of _0x4a76c8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x568db0,id:_0x3e8edc}=er(_0x254119);let _0x3d23cc=_0xd9eff0['newRange'];if('comment'!==_0x568db0||!_0x3d23cc)continue;const _0x387186='$graveyard'===_0x3d23cc['root']['rootName'];_0x387186||(_0x3d23cc=dt(_0x3d23cc,_0x4a76c8['model']),!_0x3d23cc||_0x3d23cc['isCollapsed']||!_0xd9eff0['newRange']||_0x3d23cc['isEqual'](_0xd9eff0['newRange']))?_0x4a76c8['model']['hasContent'](_0x3d23cc)&&!_0x387186?this['isThreadsLoadingPaused']?_0x3c8955['add'](_0x254119):this['_handleThreadMarker'](_0x254119,_0x3e8edc):(_0x35dd6a['add'](_0x254119),_0x3c8955['delete'](_0x254119),_0x308c37['removeMarker'](_0x254119),_0x5a0834=!0x0):(_0x308c37['updateMarker'](_0x254119,{'range':_0x3d23cc}),_0x5a0834=!0x0);}return _0x5a0834;}),this['on']('change:isThreadsLoadingPaused',(_0x139405,_0x5c254d,_0x372bb6)=>{if(!_0x372bb6&&_0x3c8955['size'])for(const _0xb8241e of _0x3c8955){const {id:_0x412e32}=er(_0xb8241e);_0x3c8955['delete'](_0xb8241e),_0x4a76c8['model']['markers']['get'](_0xb8241e)&&this['_handleThreadMarker'](_0xb8241e,_0x412e32);}}),this['listenTo'](_0x4a76c8['model']['document'],'change',()=>{for(const {name:_0x294bf3,data:{newRange:_0x101825}}of _0x4a76c8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x487368,id:_0x217fc0}=er(_0x294bf3);if('comment'!==_0x487368)continue;const _0x39550d=_0x409428['getCommentThread'](_0x217fc0),_0x14315c=this['hasMarkerForId'](_0x217fc0);_0x39550d&&(!_0x39550d['_hasTargetInContent']&&_0x101825&&_0x4a76c8['editing']['view']['once']('render',()=>{const _0x5a4ef6=_0x4a76c8['plugins']['get'](O),_0x1b725d=_0x409428['_threadToController']['get'](_0x39550d)['view'];_0x5a4ef6['getByInnerView'](_0x1b725d)['refreshVisibility']();},{'priority':'low'}),_0x39550d['_hasTargetInContent']=_0x14315c||!!_0x101825),_0x101825||(_0x35dd6a['add'](_0x294bf3),_0x3c8955['delete'](_0x294bf3));}for(const _0x56e046 of _0x35dd6a){const {id:_0x4cf8b2}=er(_0x56e046),_0x58c4e3=_0x409428['getCommentThread'](_0x4cf8b2);if(_0x3c8955['delete'](_0x56e046),!_0x58c4e3)continue;const _0x20fc2d=this['hasMarkerForId'](_0x4cf8b2);_0x20fc2d||_0x58c4e3['isSubmitted']?_0x20fc2d||_0x58c4e3['unlinkedAt']||_0x58c4e3['setUnlinkedAt'](new Date()):_0x58c4e3['remove']();}_0x35dd6a['clear']();});}['_handleInitialThreads'](_0x1f64af){_0x1f64af['forEach'](_0x479f4b=>{_0x479f4b['unlinkedAt']&&this['_attachArchivedThread'](_0x479f4b['id']);});}['_getTargetForId'](_0x28e749){const _0x58a8a0=this['editor'],_0x23be84=this['getAllMarkersForId'](_0x28e749);return et(_0x58a8a0['editing'],_0x23be84);}['_getTextContext'](_0x18d56a){const _0xc9e6da=this['getAllMarkersForId'](_0x18d56a);let _0x194442='',_0xd92a1d=!0x1;for(const _0x34611e of _0xc9e6da){const _0x4984d2=_0x34611e['getRange']();for(const _0x57a58d of Array['from'](_0x4984d2['getItems']()))_0x57a58d['is']('$textProxy')?(_0x194442&&_0xd92a1d&&(_0x194442+='\x20',_0xd92a1d=!0x1),_0x194442+=_0x57a58d['data']):_0xd92a1d=!0x0;_0xd92a1d=!0x0;}return _0x194442['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4df8e3,_0x28fee3){const _0x2ea000=this['editor'],_0x23ea14=_0x2ea000['plugins']['get'](o);let _0xb0d257=_0x23ea14['getCommentThread'](_0x28fee3);const _0x1e86f3=_0x2ea000['config']['get']('collaboration.channelId'),_0x4cc77c=_0x2ea000['plugins']['get'](P);if(_0xb0d257&&(_0xb0d257['unlinkedAt']&&_0xb0d257['setUnlinkedAt'](null),_0xb0d257['isAttached']))return _0xb0d257;return!this['getAllMarkersForId'](_0x28fee3)[0x0]['managedUsingOperations']?_0x2ea000['editing']['view']['once']('render',()=>{if(_0x23ea14['getCommentThread'](_0x28fee3))return;const _0x240dcb=_0x2ea000['plugins']['get'](O);_0xb0d257=_0x23ea14['openNewCommentThread']({'channelId':_0x1e86f3,'threadId':_0x28fee3,'target':()=>this['_getTargetForId'](_0x28fee3),'context':{'type':'text','value':this['_getTextContext'](_0x28fee3)}});const _0x437652=_0x23ea14['_threadToController']['get'](_0xb0d257)['view'],_0x4d7ab6=_0x240dcb['getByInnerView'](_0x437652);_0x4d7ab6&&_0x4cc77c['registerAnnotation'](_0x4d7ab6);},{'priority':'low'}):_0x23ea14['fetchCommentThread']({'channelId':_0x1e86f3,'threadId':_0x28fee3})['then'](_0x46560a=>{if('destroyed'!==_0x2ea000['state']){if(_0xb0d257=_0x46560a,_0xb0d257&&!_0xb0d257['isAttached']){const _0x382b17=_0xb0d257['attachTo'](()=>this['_getTargetForId'](_0x28fee3));_0x4cc77c['registerAnnotation'](_0x382b17),_0xb0d257['isResolved']&&this['_reconvertMarkers'](_0x28fee3);}else{if(!_0xb0d257){const _0x1e99df=this['getAllMarkersForId'](_0x28fee3);_0x2ea000['model']['change'](_0x4b0eec=>{for(const _0x1e0016 of _0x1e99df)_0x4b0eec['removeMarker'](_0x1e0016);});}}}}),_0xb0d257;}['_handleThreadMarker'](_0x133487,_0x1afece){const _0xaab5cf=this['_attachMarkerToThread'](_0x133487,_0x1afece);_0xaab5cf&&!_0xaab5cf['context']&&_0xaab5cf['setContext']({'type':'text','value':this['_getTextContext'](_0x1afece)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3a0c27=this['editor'];ot(_0x3a0c27['model'],({left:_0x4bb9a8,entered:_0x23caf8})=>{for(const _0x57505c of _0x4bb9a8)if(mt(_0x57505c)){_0x3a0c27['ui']['ariaLiveAnnouncer']['announce'](E(_0x3a0c27['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3f768d of _0x23caf8)if(mt(_0x3f768d)){_0x3a0c27['ui']['ariaLiveAnnouncer']['announce'](E(_0x3a0c27['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3977aa)));break;}});}}function ft(_0x18e4cd,_0x2dd85c){return _0x2dd85c?_0x18e4cd+':'+_0x2dd85c:_0x18e4cd;}function er(_0x593386){const _0x4bdcdd=_0x593386['split'](':');return{'group':_0x4bdcdd[0x0],'id':_0x4bdcdd[0x1],'part':_0x4bdcdd[0x2]};}function dt(_0x2ec99b,_0x1a24f3){const _0x54a445=_0x1a24f3['schema'],_0x33f4c7=_0x1a24f3['createRange'](_0x2ec99b['start']);for(const _0x275a68 of _0x2ec99b['getWalker']()){const {type:_0x50ac94,item:_0x27f837,nextPosition:_0x48410a}=_0x275a68;if('text'===_0x50ac94||_0x54a445['isObject'](_0x27f837)){const _0x4f17a9=_0x1a24f3['createPositionBefore'](_0x27f837);_0x33f4c7['isCollapsed']&&(_0x33f4c7['start']=_0x4f17a9),_0x33f4c7['end']=_0x48410a;}}return _0x33f4c7;}function mt(_0x5ef22c){return'comment'===er(_0x5ef22c['name'])['group'];}class i extends _0x28c70b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x4f7776=this['editor'],_0x165bed=_0x4f7776['plugins']['get'](o),_0x53de9b=_0x4f7776['plugins']['get'](r),_0x5a1ffd=_0x4f7776['plugins']['get'](O),_0x306266=_0x4f7776['plugins']['get'](P);_0x4f7776['ui']['componentFactory']['add']('comment',()=>{const _0x1cdc2a=this['_createUIButton'](_0x190959);return _0x1cdc2a['tooltip']=!0x0,_0x1cdc2a;}),_0x4f7776['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x485dee)),_0x306266['addSourceCollector'](()=>{const _0x1fbc48=[];for(const [_0x3d60d6,_0x228b3f]of _0x165bed['_threadToController']){const _0x4714fb=_0x53de9b['getAllMarkersForId'](_0x3d60d6['id']),_0xbd6fd8=_0x4714fb['map'](_0x545428=>_0x545428['getRange']());_0x4714fb['length']>0x0&&_0x1fbc48['push']([_0x228b3f['view'],_0xbd6fd8]);}return _0x1fbc48;}),this['listenTo'](_0x5a1ffd,'change:activeAnnotations',(_0x2c1577,_0x5c4b4a,_0x3acff2)=>{const _0x3ff2e5=Array['from'](_0x3acff2)['map'](_0x443042=>_0x443042['innerView'])['find'](_0x594ea6=>_0x165bed['_viewToController']['has'](_0x594ea6));if(!_0x3ff2e5)return void(_0x53de9b['activeMarker']=null);const _0x53f44a=_0x165bed['_viewToController']['get'](_0x3ff2e5)['model']['id'],_0x3eb67f='comment:'+_0x53f44a;_0x53f44a&&_0x53de9b['hasMarkerForId'](_0x53f44a)?_0x53de9b['activeMarker']=_0x3eb67f:_0x53de9b['activeMarker']&&(_0x53de9b['activeMarker']=null);}),this['listenTo'](_0x165bed,'removeCommentThread',(_0x3cbde2,{threadId:_0x6dd6ff,isFromAdapter:_0xf1c702})=>{!_0xf1c702&&_0x4f7776['ui']['focusTracker']['isFocused']&&_0x53de9b['hasMarkerForId'](_0x6dd6ff)&&_0x4f7776['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x165bed,'addComment',(_0x569c58,{threadId:_0x1f1072,isFromAdapter:_0x564a27})=>{if(_0x564a27||!_0x53de9b['hasMarkerForId'](_0x1f1072)||!_0x165bed['hasCommentThread'](_0x1f1072))return;0x1===_0x165bed['getCommentThread'](_0x1f1072)['length']&&(_0x4f7776['editing']['view']['focus'](),_0x569c58['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2a0680=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1bcec5;for(const _0x1725f5 in _0x2a0680){const _0x3604f9=_0x1725f5,_0x1c85e0=_0x2a0680[_0x3604f9];if('commentsLicenseKeyValid'==_0x1c85e0||'commentsLicenseKeyInvalid'==_0x1c85e0||'commentsLicenseKeyExpired'==_0x1c85e0||'commentsLicenseKeyDomainLimit'==_0x1c85e0||'commentsLicenseKeyNotAllowed'==_0x1c85e0||'commentsLicenseKeyEvaluationLimit'==_0x1c85e0||'commentsLicenseKeyTrialLimit'==_0x1c85e0||'commentsLicenseKeyUsageLimit'==_0x1c85e0){delete _0x2a0680[_0x3604f9],_0x1bcec5=_0x1c85e0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1bcec5&&_0x2a0680['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1bcec5&&_0x2a0680['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1bcec5&&_0x2a0680['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1bcec5&&_0x2a0680['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1bcec5&&_0x2a0680['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1bcec5&&_0x2a0680['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1bcec5&&_0x2a0680['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x367138){const _0x168f08=this['editor'],_0x595238=new _0x367138(_0x168f08['locale']),_0x402d94=_0x168f08['commands']['get']('addCommentThread');return _0x595238['set']({'label':E(_0x168f08['locale'],'Comment'),'icon':_0x29f3e4}),_0x595238['bind']('isEnabled')['to'](_0x402d94),this['listenTo'](_0x595238,'execute',()=>{_0x402d94['execute']();}),_0x595238;}}class s extends _0x28c70b{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1ec1b0){super(_0x1ec1b0),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1e0877,_0xc9a749,_0x1bf035)=>{_0x1bf035?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x55f7ce,_0x1f336b]of this['editor']['commands'])_0x1f336b['affectsData']&&'addCommentThread'!==_0x55f7ce&&_0x1f336b['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1ecbb7=this['editor']['editing']['view']['document'];this['listenTo'](_0x1ecbb7,'cut',_0x1bddfb=>_0x1bddfb['stop'](),{'priority':'highest'}),this['listenTo'](_0x1ecbb7,'clipboardInput',_0x3b45df=>_0x3b45df['stop'](),{'priority':'highest'}),this['listenTo'](_0x1ecbb7,'delete',_0x2de226=>_0x2de226['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x455b6c,_0x50b272]of this['editor']['commands'])_0x50b272['affectsData']&&'addCommentThread'!==_0x455b6c&&_0x50b272['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 M extends _0xbf5a6d{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x273210){super(_0x273210),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x22407f=this['context']['plugins']['get'](O);this['listenTo'](_0x22407f,'_activateAnnotation',(_0x5b915a,_0xa59e40)=>{for(const _0x3e20b6 of this['activeUIs']){const _0x553df0=this['_uis']['get'](_0x3e20b6);(0x0,this['uisData']['get'](_0x3e20b6)['filter'])(_0xa59e40)&&_0x553df0['setActiveAnnotation'](_0xa59e40);}}),this['listenTo'](_0x22407f,'_deactivateAllAnnotations',()=>{for(const _0x44c0b4 of this['activeUIs']){this['_uis']['get'](_0x44c0b4)['setActiveAnnotation'](null);}}),this['listenTo'](_0x22407f['_visibleAnnotations'],'add',(_0x38b141,_0x2cc96b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2cc96b);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5daf00){return this['activeUIs']['has'](_0x5daf00);}['activate'](_0x1479a0,_0x5c7de4=this['defaultFilter']){const _0x36cb22=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x1479a0))throw new _0x4b5373('annotationsuis-missing-ui',this,{'uiName':_0x1479a0});this['isActive'](_0x1479a0)&&this['deactivate'](_0x1479a0),this['activeUIs']['add'](_0x1479a0);const _0x1cf3b1=new _();!function({source:_0x52ca9f,target:_0x1e2cca,filter:_0x2e1433}){for(const _0x378afe of _0x52ca9f)_0x2e1433(_0x378afe)&&_0x1e2cca['add'](_0x378afe);_0x1e2cca['listenTo'](_0x52ca9f,'add',(_0x43acaa,_0x2d44c9)=>{_0x2e1433(_0x2d44c9)&&_0x1e2cca['add'](_0x2d44c9);}),_0x1e2cca['listenTo'](_0x52ca9f,'remove',(_0x446f83,_0xfa0392)=>{_0x1e2cca['has'](_0xfa0392)&&_0x1e2cca['remove'](_0xfa0392);});}({'source':_0x36cb22['_visibleAnnotations'],'target':_0x1cf3b1,'filter':_0x5c7de4}),this['uisData']['set'](_0x1479a0,{'collection':_0x1cf3b1,'filter':_0x5c7de4});const _0x1c6da8=this['_uis']['get'](_0x1479a0);_0x1c6da8['attach'](_0x1cf3b1),this['listenTo'](_0x1c6da8,'change:activeAnnotation',(_0x4a8e1d,_0x285a20,_0x47a762,_0x2407cc)=>{_0x2407cc&&_0x36cb22['_removeActiveAnnotation'](_0x2407cc),_0x47a762&&_0x36cb22['_addActiveAnnotation'](_0x47a762);});}['deactivate'](_0x115ae5){if(this['activeUIs']['delete'](_0x115ae5),!this['_uis']['has'](_0x115ae5))throw new _0x4b5373('annotationsuis-missing-ui',this,{'uiName':_0x115ae5});const _0x187699=this['_uis']['get'](_0x115ae5);_0x187699['detach'](),this['stopListening'](_0x187699),this['uisData']['get'](_0x115ae5)['collection']['destroy'](),this['uisData']['delete'](_0x115ae5);}['switchTo'](_0x9988a){if(!this['_uis']['has'](_0x9988a))throw new _0x4b5373('annotationsuis-missing-ui',this,{'uiName':_0x9988a});const _0x3edc9d=this['context']['plugins']['get'](O),_0x4bee35=Array['from'](_0x3edc9d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x9988a);const _0x5e19f1=this['_uis']['get'](_0x9988a);_0x5e19f1['setActiveAnnotation'](_0x4bee35),_0x5e19f1['_setSelectedAnnotations']&&_0x4bee35&&_0x5e19f1['_setSelectedAnnotations']([_0x4bee35]);}['deactivateAll'](){for(const _0x23aa89 of this['activeUIs'])this['deactivate'](_0x23aa89);}['register'](_0x3b61f6,_0x2478c8){if(this['_uis']['has'](_0x3b61f6))throw new _0x4b5373('annotationsuis-register-already-registered');if('function'!=typeof _0x2478c8['attach']||'function'!=typeof _0x2478c8['detach']||'function'!=typeof _0x2478c8['setActiveAnnotation'])throw new _0x4b5373('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3b61f6,_0x2478c8);}['refilterAnnotations'](){const _0xd31d05=this['context']['plugins']['get'](O)['collection'],_0x30df26=new Map(),_0x502325=Array['from'](this['activeUIs']);for(const _0x313a6d of this['activeUIs']){const _0x9749b=this['uisData']['get'](_0x313a6d)['collection'];for(const _0x28ca11 of _0x9749b)_0x30df26['set'](_0x28ca11,_0x313a6d);}for(const _0x8b58af of _0xd31d05){const _0x5b7f35=_0x30df26['get'](_0x8b58af);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x8b58af);const _0x4ff9d4=_0x502325['find'](_0x4f3968=>this['uisData']['get'](_0x4f3968)['filter'](_0x8b58af));_0x5b7f35!==_0x4ff9d4&&(_0x5b7f35&&this['uisData']['get'](_0x5b7f35)['collection']['remove'](_0x8b58af),_0x4ff9d4&&this['uisData']['get'](_0x4ff9d4)['collection']['add'](_0x8b58af));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3b7e35){const _0x41dc0a=[];for(const _0x226c0e of this['activeUIs']){(0x0,this['uisData']['get'](_0x226c0e)['filter'])(_0x3b7e35)&&_0x41dc0a['push'](_0x226c0e);}if(_0x41dc0a['length']>0x1)throw new _0x4b5373('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x41dc0a,'annotationType':_0x3b7e35['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x3c0282){super(_0x3c0282);const _0x15d0d7=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 _0xda5a76(),this['focusCycler']=new _0x209ef2({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x15d0d7['to']('class')],'style':{'minHeight':_0x15d0d7['to']('minHeight',_0x4b79ff=>'number'==typeof _0x4b79ff?pi(_0x4b79ff+0xa):null)},'dir':_0x3c0282['uiLanguageDirection'],'role':'application','aria-label':E(_0x3c0282,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x3c0282,'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',_0x22a66c=>{this['_updateItemPositionInFocusables'](_0x22a66c['source']);}),this['list']['forEach'](_0x28fe8d=>{this['focusTracker']['add'](_0x28fe8d['element']),this['_updateItemPositionInFocusables'](_0x28fe8d);}),this['list']['on']('change',(_0x2faab7,_0x4aa5c0)=>{for(const _0x52e671 of _0x4aa5c0['removed'])this['focusTracker']['remove'](_0x52e671['element']),this['focusables']['remove'](_0x52e671);for(const _0x5a1b85 of _0x4aa5c0['added'])this['focusTracker']['add'](_0x5a1b85['element']),this['_updateItemPositionInFocusables'](_0x5a1b85);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5dc156){const _0x521c9b=this['focusables']['getIndex'](_0x5dc156);let _0x55e49a,_0x106d7f;for(const _0x3377a3 of this['focusables'])if(_0x5dc156['top']<_0x3377a3['top']){_0x55e49a=_0x3377a3;break;}if(_0x106d7f=_0x55e49a?this['focusables']['getIndex'](_0x55e49a):this['focusables']['length'],-0x1!==_0x521c9b){if(_0x521c9b===_0x106d7f-0x1)return;this['focusables']['remove'](_0x5dc156),_0x106d7f=_0x55e49a?this['focusables']['getIndex'](_0x55e49a):this['focusables']['length'];}this['focusables']['add'](_0x5dc156,_0x106d7f);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x21f72a){super(_0x21f72a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4af4b3,_0x4dc930)=>_0x4af4b3+_0x4dc930),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x11db1b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x11db1b['to']('isAnimationDisabled',_0x4a71e9=>_0x4a71e9?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x11db1b['to']('top',_0x2a4206=>Ht(_0x2a4206))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x40af7d=this['element']['clientHeight'];_0x40af7d&&(this['height']=_0x40af7d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xbf5a6d{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e8718){super(_0x5e8718),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 _0x308861=this['context']['config']['get']('sidebar.container');_0x308861&&this['setContainer'](_0x308861);}['setContainer'](_0x6cedd){if(!y(_0x6cedd))throw new _0x4b5373('sidebar-setcontainer-invalid-element');this['container']=_0x6cedd;}['_attachToContainer']({viewClass:_0x1db347='',spaceBetweenItems:_0x9cbc01=0x19}={}){if(!y(this['container']))throw new _0x4b5373('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1db347,this['_spaceBetweenItems']=_0x9cbc01;}['rearrange']({removedAnnotation:_0x514baf,previousAnnotation:_0x4a409b,nextAnnotation:_0x3b6c24}){const _0x2b153d=this['getSidebarItemView'](_0x514baf);this['view']['list']['remove'](_0x2b153d),this['_destroySidebarItemView'](_0x514baf),_0x4a409b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4a409b)),_0x3b6c24&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3b6c24)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5a9cc8,activatedAnnotation:_0xf21ee4,disableAnimationOnActivatedAnnotation:_0x3ea735}){if(this['_activeAnnotation']=_0xf21ee4,_0x5a9cc8){_0x5a9cc8['isActive']=!0x1;const _0xae3f98=this['getSidebarItemView'](_0x5a9cc8);_0xae3f98&&_0x3ea735&&(_0xae3f98['isAnimationDisabled']=!0x1);}if(_0xf21ee4){const _0x29ddba=this['getSidebarItemView'](_0xf21ee4);_0x29ddba&&(_0xf21ee4['isActive']=!0x0,_0x3ea735&&(_0x29ddba['isAnimationDisabled']=!0x0,_0x29ddba['top']+=0x1),this['_alignToTargetRect'](_0x29ddba));}}['_detachFromContainer'](_0x504b67){if(this['view']['element']['remove'](),_0x504b67){for(const _0x3b0ba6 of _0x504b67)this['_destroySidebarItemView'](_0x3b0ba6);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xf13581,_0x8db6e6){_0x8db6e6||(_0x8db6e6=_0xf13581['view']);const _0x2d01ae=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2d01ae,_0xf13581),this['_annotationToSidebarItemView']['set'](_0xf13581,_0x2d01ae),_0x2d01ae['content']['add'](_0x8db6e6),this['listenTo'](_0xf13581['view'],'change:targetRect',(_0x58bf52,_0x40f520,_0x52b22a)=>{const _0xe64168=this['_getTargetTop'](_0xf13581,_0x52b22a);_0x2d01ae['_targetTop']!=_0xe64168&&(_0x2d01ae['_targetTop']=_0xe64168,this['_setItemTop'](_0x2d01ae,_0xe64168));}),this['listenTo'](_0x2d01ae,'change:top',()=>{this['_recalculate'](_0x2d01ae,'top');}),this['listenTo'](_0x2d01ae,'change:bottom',()=>{this['_recalculate'](_0x2d01ae,'bottom');}),this['_alignToTargetRect'](_0x2d01ae);const _0x31eabb=this['_getItemBefore'](_0x2d01ae);if(_0x31eabb)this['_alignAfterItem'](_0x31eabb,_0x2d01ae)||this['_alignToTargetRect'](_0x2d01ae);else this['_alignToTargetRect'](_0x2d01ae);return this['_updateLastItem'](),this['view']['list']['add'](_0x2d01ae),_0x2d01ae;}['_alignForTopChange'](_0x578c24){if(!_0x578c24['content']['length'])return;const _0x3c65ee=this['_getItemBefore'](_0x578c24);if(!_0x3c65ee)return;const _0x539080=this['_sidebarItemViewToAnnotation']['get'](_0x3c65ee),_0x53a286=this['_activeAnnotation'];_0x53a286&&_0x53a286===_0x539080?this['_alignAfterItem'](_0x3c65ee,_0x578c24):this['_alignBeforeItem'](_0x578c24,_0x3c65ee);}['_alignForBottomChange'](_0x8795ac){if(!_0x8795ac['content']['length'])return;const _0x55a391=this['_getItemAfter'](_0x8795ac);if(!_0x55a391)return;const _0xa917bd=this['_sidebarItemViewToAnnotation']['get'](_0x55a391),_0x5a54b4=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x37c676=this['_activeAnnotation'];_0x37c676&&_0x37c676===_0xa917bd&&_0x5a54b4?(this['_alignBeforeItem'](_0x55a391,_0x8795ac),this['_alignAfterItem'](_0x8795ac,_0x55a391)):_0x37c676&&_0x37c676===_0xa917bd?this['_alignBeforeItem'](_0x55a391,_0x8795ac):this['_alignAfterItem'](_0x8795ac,_0x55a391);}['_recalculate'](_0x427c11,_0xbc8ab2){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x58859b,changedProp:_0x34b798}of this['_recalculateBuffer'])'top'===_0x34b798?this['_alignForTopChange'](_0x58859b):this['_alignForBottomChange'](_0x58859b);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x427c11,'changedProp':_0xbc8ab2});}['getSidebarItemView'](_0xa14117){return this['_annotationToSidebarItemView']['get'](_0xa14117);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xd620fe){const _0x2772ba=this['getSidebarItemView'](_0xd620fe);this['stopListening'](_0x2772ba),this['stopListening'](_0xd620fe['view']),_0x2772ba['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xd620fe),this['_sidebarItemViewToAnnotation']['delete'](_0x2772ba);}['_createSidebarView'](){const _0x3469a6=new F(this['context']['locale']);return _0x3469a6['render'](),this['on']('change:_lastItem',(_0x5f22c2,_0x2ac64a,_0x1ec1e6,_0x2effc9)=>{_0x2effc9&&_0x3469a6['unbind']('minHeight'),_0x1ec1e6?_0x3469a6['bind']('minHeight')['to'](_0x1ec1e6,'bottom'):_0x3469a6['minHeight']=null;}),_0x3469a6;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2b844f){const _0x4f3017=this['_sidebarItemViewToAnnotation']['get'](_0x2b844f),_0x4c9f7e=_0x4f3017&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4f3017)-0x1);return _0x4c9f7e&&this['getSidebarItemView'](_0x4c9f7e)||null;}['_getItemAfter'](_0x315b93){const _0x48a11a=this['_sidebarItemViewToAnnotation']['get'](_0x315b93),_0x9ee4d4=_0x48a11a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x48a11a)+0x1);return _0x9ee4d4&&this['getSidebarItemView'](_0x9ee4d4)||null;}['_alignBeforeItem'](_0x41f5b8,_0x880da7){_0x41f5b8['updateHeight']();const _0x2dbe4b=R(_0x880da7['bottom']+this['_spaceBetweenItems'],_0x41f5b8['top']);return!!_0x2dbe4b&&(this['_setItemTop'](_0x880da7,_0x880da7['top']-_0x2dbe4b),!0x0);}['_alignAfterItem'](_0x1e2c91,_0x5ba04a){_0x1e2c91['updateHeight']();const _0x5b6b49=R(_0x1e2c91['bottom']+this['_spaceBetweenItems'],_0x5ba04a['top']);return!!_0x5b6b49&&(this['_setItemTop'](_0x5ba04a,_0x5ba04a['top']+_0x5b6b49,!0x1),!0x0);}['_alignToTargetRect'](_0x503dc9){const _0x2039af=this['_sidebarItemViewToAnnotation']['get'](_0x503dc9);if(!_0x2039af||!_0x2039af['target']||!_0x2039af['targetRect'])return;const _0x30aeec=this['_getTargetTop'](_0x2039af,_0x2039af['targetRect']);this['_setItemTop'](_0x503dc9,_0x30aeec);}['_getTargetTop'](_0x25ff86,_0x5e0939){if(null===_0x5e0939)return 0x0;if(_0x25ff86['target']instanceof _0x4481eb)return _0x5e0939['top'];{const _0x562f01=new _0x4481eb(this['view']['element'])['top'];return _0x5e0939['top']-_0x562f01;}}['_setItemTop'](_0x127ecc,_0x418d20,_0x18abfc=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x18abfc&&(_0x418d20=Math['max'](_0x418d20,this['_getMaxAvailableTop'](_0x127ecc))),_0x127ecc['top']=_0x418d20;}['_getMaxAvailableTop'](_0x4446c3){let _0x2601f4=this['_getItemBefore'](_0x4446c3),_0x16fc98=0x0;for(;_0x2601f4;)_0x2601f4['updateHeight'](),_0x16fc98+=this['_spaceBetweenItems']+_0x2601f4['height'],_0x2601f4=this['_getItemBefore'](_0x2601f4);return _0x16fc98;}}function R(_0x382bd8,_0x5ac0c1){return Math['max'](_0x382bd8-_0x5ac0c1,0x0);}function y(_0x4c6a3e){return null!==_0x4c6a3e&&'object'==typeof _0x4c6a3e&&0x1===_0x4c6a3e['nodeType'];}class e extends _0xbf5a6d{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x425019){super(_0x425019),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4d4610(),this['_refreshPositioningDebounced']=_0x8cae09(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x33787b=this['context']['plugins']['get'](M),_0x2254a0=this['context']['plugins']['get'](z);_0x33787b['register']('wideSidebar',this),_0x2254a0['container']&&_0x33787b['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4ee62c){if(_0x4ee62c===this['activeAnnotation'])return;const _0x3af641=this['context']['plugins']['get'](z);_0x3af641['_activeAnnotation']=_0x4ee62c;const _0x40b0f1=this['activeAnnotation'];_0x3af641['refresh']({'blurredAnnotation':_0x40b0f1,'activatedAnnotation':_0x4ee62c}),this['activeAnnotation']=_0x4ee62c;}['attach'](_0x4be93c){this['annotations']=_0x4be93c;const _0x2a8773=this['context']['plugins']['get'](z);if(_0x2a8773['_annotations']=_0x4be93c,this['isAttached'])throw new _0x4b5373('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2a8773,'set:container',()=>{this['detach'](),this['listenTo'](_0x2a8773,'change:container',_0x1a1b44=>{_0x1a1b44['off'](),this['attach'](_0x4be93c);});}),_0x2a8773['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4ad9d1=_0x49ea70=>{_0x49ea70['updateTargetRect'](),_0x2a8773['addAnnotation'](_0x49ea70);};for(const _0x18c77f of _0x4be93c)_0x4ad9d1(_0x18c77f);this['listenTo'](_0x4be93c,'add',(_0x4c2793,_0x3f8d7f)=>{_0x4ad9d1(_0x3f8d7f);}),this['listenTo'](_0x4be93c,'remove',(_0x30cf3f,_0x2988ae,_0x4a5901)=>{_0x2a8773['rearrange']({'removedAnnotation':_0x2988ae,'previousAnnotation':_0x4be93c['get'](_0x4a5901-0x1),'nextAnnotation':_0x4be93c['get'](_0x4a5901+0x1)}),_0x2988ae===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4be93c,'focus',(_0x53dd76,_0x2f085b)=>{this['setActiveAnnotation'](_0x2f085b);}),this['listenTo'](_0x4be93c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x169ff2=this['context']instanceof _0x4c7dbf?this['context']['editors']:new _0x4d4610([this['context']]);for(const _0x118ac6 of _0x169ff2)this['_integrateWithEditorAnnotations'](_0x118ac6);this['listenTo'](_0x169ff2,'add',(_0x4ff280,_0x36608f)=>{this['listenTo'](_0x36608f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x36608f);});}),this['listenTo'](_0x169ff2,'remove',(_0x1a4503,_0x31146d)=>{_0x31146d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x31146d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4b5373('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xa51483=this['context']['plugins']['get'](z);_0xa51483['_detachFromContainer'](this['annotations']),this['stopListening'](_0xa51483),this['stopListening'](this['annotations']),this['context']instanceof _0x4c7dbf&&this['stopListening'](this['context']['editors']);for(const _0x350aea of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x350aea);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2dbcde){if(!_0x2dbcde['plugins']['has']('EditorAnnotations'))return;const _0x5af3c4=_0x2dbcde['plugins']['get']('EditorAnnotations'),_0x1a48da=()=>{const _0x5a4bdf=_0x5af3c4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x5a4bdf[0x0]||null);};this['listenTo'](_0x5af3c4,'refresh',_0x1a48da),this['listenTo'](_0x5af3c4,'blur',(_0x47e9bf,{isAnnotationTracked:_0x1c110a})=>{this['activeAnnotation']&&_0x1c110a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5af3c4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x55915b=>{_0x5af3c4['hasDomSelection']()&&(_0x1a48da(),_0x55915b['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5af3c4);}['_destroyEditorAnnotationsIntegration'](_0xee2f43){this['stopListening'](_0xee2f43),this['_editorAnnotations']['remove'](_0xee2f43);}}class C extends _0x190959{['counterView'];constructor(_0x172a32){super(_0x172a32);const _0x42b32f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x362642,_0xcc731e)=>_0x362642?'...':_0xcc731e['toString']()),this['set']('annotationType',''),this['icon']=_0x29f3e4,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x42b32f['to']('annotationType',_0x3c3111=>'ck-annotation-counter__badge--'+_0x3c3111),_0x42b32f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x42b32f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xbf5a6d{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ea2c4){super(_0x1ea2c4),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x1ba853),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4d4610(),this['_refreshPositioningDebounced']=_0x8cae09(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x316427(this['context']['locale']),this['balloonPanelView']=new _0x43b01f(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2539ca){this['annotations']=_0x2539ca;const _0xaafc5c=this['context']['plugins']['get'](z),_0x3b8cf8=this['balloonPanelView'];if(_0xaafc5c['_annotations']=_0x2539ca,this['isAttached'])throw new _0x4b5373('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xaafc5c,'set:container',()=>{this['detach'](),this['listenTo'](_0xaafc5c,'change:container',_0x327e31=>{_0x327e31['off'](),this['attach'](_0x2539ca);});}),_0xaafc5c['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x582106=_0x19246c=>{const _0x707164=new C(this['context']['locale']);_0xaafc5c['addAnnotation'](_0x19246c,_0x707164),this['_annotationToNarrowView']['set'](_0x19246c,_0x707164),_0x707164['bind']('isDirty','annotationType','number')['to'](_0x19246c['view'],'isDirty','type','length'),_0x707164['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3b8cf8['content']['first']!==_0x19246c['view']?(this['_showBalloon'](_0x19246c),_0x19246c['view']['element']['focus'](),this['setActiveAnnotation'](_0x19246c)):this['setActiveAnnotation'](null);});};for(const _0x243779 of _0x2539ca)_0x582106(_0x243779);this['listenTo'](_0x2539ca,'add',(_0x426354,_0x48cbc3)=>{_0x582106(_0x48cbc3);}),this['listenTo'](_0x2539ca,'remove',(_0x3bce8b,_0x13eabe,_0x1e2b67)=>{this['_annotationToNarrowView']['get'](_0x13eabe)['destroy'](),this['_annotationToNarrowView']['delete'](_0x13eabe),_0xaafc5c['rearrange']({'removedAnnotation':_0x13eabe,'previousAnnotation':_0x2539ca['get'](_0x1e2b67-0x1),'nextAnnotation':_0x2539ca['get'](_0x1e2b67+0x1)}),_0x13eabe===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2539ca,'focus',(_0x59ac51,_0x54f26f)=>{this['setActiveAnnotation'](_0x54f26f);}),this['listenTo'](_0x2539ca,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x5a2484,_0x162e15)=>{_0x162e15['keyCode']===_0x2697b6['esc']&&_0x3b8cf8['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3b8cf8['content']['first']),this['_hideBalloon'](),_0x162e15['stopPropagation'](),_0x162e15['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3703e9,_0xc8feba)=>{const _0x487a44=_0xc8feba['target'];_0x3b8cf8['isVisible']&&_0x3b8cf8['element']['contains'](_0x487a44)||_0xaafc5c['view']['element']['contains'](_0x487a44)||_0x3703e9['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x28a801=>_0x28a801['contains'](_0x487a44))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1d67e3=this['context']instanceof _0x4c7dbf?this['context']['editors']:new _0x4d4610([this['context']]);for(const _0xbf7d6 of _0x1d67e3)this['_integrateWithEditorAnnotations'](_0xbf7d6);this['listenTo'](_0x1d67e3,'add',(_0x427d7a,_0x1a2f9a)=>{this['listenTo'](_0x1a2f9a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1a2f9a);});}),this['listenTo'](_0x1d67e3,'remove',(_0xb82dc8,_0x7b1ee4)=>{_0x7b1ee4['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x7b1ee4['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4f0208){if(_0x4f0208===this['activeAnnotation'])return;const _0x1e4ec9=this['context']['plugins']['get'](z);if(_0x1e4ec9['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4f0208,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4f0208)_0x1e4ec9['getSidebarItemView'](_0x4f0208)?this['_showBalloon'](_0x4f0208):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4f0208;}['detach'](){if(!this['isAttached'])throw new _0x4b5373('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5be2db=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x251f92=>_0x251f92['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5be2db['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4c7dbf&&this['stopListening'](this['context']['editors']);for(const _0x3b9f31 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3b9f31);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'](_0x84175c){if(!_0x84175c['plugins']['has']('EditorAnnotations'))return;const _0x54461d=_0x84175c['plugins']['get']('EditorAnnotations'),_0x5c58d8=this['context']['plugins']['get'](z),_0x5b705c=this['annotations'],_0x2b8b6b=this['balloonPanelView'],_0x452990=()=>{const _0x2776cc=_0x54461d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2776cc),this['setActiveAnnotation'](_0x2776cc[0x0]||null);};this['listenTo'](_0x54461d,'refresh',_0x452990),this['listenTo'](_0x54461d,'blur',(_0x48a1d4,{isAnnotationTracked:_0x2f4d46})=>{this['activeAnnotation']&&_0x2f4d46(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x54461d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x5b705c,'blur',_0x5c00b0=>{_0x54461d['hasDomSelection']()&&_0x5c00b0['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xab9892,_0x20db8e)=>{const _0x761367=_0x20db8e['target'];_0x2b8b6b['isVisible']&&_0x2b8b6b['element']['contains'](_0x761367)||_0x5c58d8['view']['element']['contains'](_0x761367)||this['activeAnnotation']&&_0x54461d['hasDomSelection']()&&(_0x452990(),_0xab9892['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x54461d);}['_destroyEditorAnnotationsIntegration'](_0x189562){_0x189562&&(this['stopListening'](_0x189562),this['_editorAnnotations']['remove'](_0x189562));}['_setSelectedAnnotations'](_0x6632ae){for(const _0x3e80ef of this['_selectedAnnotations'])_0x6632ae['includes'](_0x3e80ef)||this['_manuallyClosedAnnotationViews']['delete'](_0x3e80ef['view']);this['_selectedAnnotations']=_0x6632ae;}['_refreshPositioning'](){const _0x531e38=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x531e38['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xac1882){if(this['_manuallyClosedAnnotationViews']['has'](_0xac1882['view']))return;const _0x5140b2=this['balloonPanelView']['content']['first'];_0x5140b2!==_0xac1882['view']?(_0x5140b2&&this['_detachListeners'](_0x5140b2),this['_attachListeners'](_0xac1882['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xac1882['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x35d9f4=this['balloonPanelView']['content']['first'],_0x1c853c=_0x35d9f4&&this['annotations']['getByView'](_0x35d9f4);if(!_0x1c853c||!this['_annotationToNarrowView']['has'](_0x1c853c))return;const _0x9a2bdb=this['_annotationToNarrowView']['get'](_0x1c853c)['element'],_0x9846b9=(function(){const _0x1979f0=_0x43b01f['defaultPositions'];return[_0x1979f0['southArrowNorthEast'],_0x1979f0['northArrowSouthEast'],_0x1979f0['southArrowNorth'],_0x1979f0['northArrowSouth'],_0x1979f0['southArrowNorthWest'],_0x1979f0['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x9a2bdb,'positions':_0x9846b9});}['_hideBalloon'](){const _0x5ac3a6=this['balloonPanelView'],_0x5b3aff=_0x5ac3a6['content']['first'];_0x5b3aff&&(this['_detachListeners'](_0x5b3aff),_0x5ac3a6['unpin'](),_0x5ac3a6['content']['clear']());}['_attachListeners'](_0x44b01e){this['listenTo'](_0x44b01e,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x44b01e,'Esc',(_0x1c4ca9,_0x51a379)=>{this['_manuallyClosedAnnotationViews']['add'](_0x44b01e),this['_hideBalloon'](),_0x51a379();});}['_detachListeners'](_0x356ffe){this['stopListening'](_0x356ffe);}}class c extends _0x28c70b{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x329210,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10499f){super(_0x10499f),_0x10499f['editing']['view']['addObserver'](_0x3934be),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x10499f['plugins']['get'](_0x329210),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x163608=this['editor']['plugins']['get'](M);_0x163608['context']===this['editor']&&(_0x163608['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4dffb4,_0x5782cb)=>{const _0x51d3b6=this['_balloon'];if(this['isAttached']&&_0x51d3b6['visibleView']){const _0x12be72=this['annotations']['getByView'](_0x51d3b6['visibleView']);_0x12be72&&this['_closeAnnotation'](_0x12be72),_0x5782cb();}}));}['afterInit'](){const _0x1b59c2=this['editor']['plugins']['get'](M);_0x1b59c2['context']===this['editor']&&(_0x1b59c2['hasActive']()||_0x1b59c2['switchTo']('inline'));}['setActiveAnnotation'](_0x3e2521){_0x3e2521!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3e2521&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3e2521)&&this['_addAnnotationToBalloon'](_0x3e2521,!0x0),_0x3e2521['isActive']=!0x0),_0x3e2521||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3e2521);}['attach'](_0x25defe){this['annotations']=_0x25defe;const _0x100ab5=this['editor']['plugins']['get'](M),_0x35fe43=this['_balloon'];if(this['isAttached'])throw new _0x4b5373('inlineannotations-attach-already-attached',this);if(_0x100ab5['context']!==this['editor'])throw new _0x4b5373('inlineannotations-not-allowed-with-context',this);const _0x1bdc49=this['editor']['plugins']['get'](P);this['listenTo'](_0x1bdc49,'refresh',()=>{const _0x106f4b=_0x1bdc49['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0xac9afe,_0x3048a5;!this['_forceRefresh']&&(_0xac9afe=_0x106f4b,_0x3048a5=this['_selectedAnnotations'],_0xac9afe['length']===_0x3048a5['length']&&_0xac9afe['every'](_0x5dfcd1=>_0x3048a5['includes'](_0x5dfcd1)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x106f4b),this['setActiveAnnotation'](_0x106f4b[0x0]||null));}),this['listenTo'](_0x1bdc49,'blur',(_0x392cf5,{isAnnotationTracked:_0x12cc9c})=>{this['activeAnnotation']&&_0x12cc9c(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x33ac8e,_0x48a7fa,_0x283796)=>{_0x283796||this['setActiveAnnotation'](null);}),this['listenTo'](_0x25defe,'remove',(_0x5bbf45,_0x3e1606)=>{this['_removeAnnotationFromBalloon'](_0x3e1606),_0x3e1606===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x35fe43,'change:visibleView',(_0x2c2766,_0x42faaa,_0xab5e5f,_0x397d85)=>{_0x397d85&&this['stopListening'](_0x397d85);const _0xc0de6b=_0x25defe['getByView'](_0xab5e5f);_0xab5e5f&&_0xc0de6b&&(this['listenTo'](_0xab5e5f,'change:height',()=>{_0x35fe43['updatePosition']();}),this['listenTo'](_0xab5e5f,'Esc',()=>{this['_closeAnnotation'](_0xc0de6b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xc0de6b&&this['setActiveAnnotation'](_0xc0de6b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x35fe43['visibleView']&&(_0x25defe['getByView'](_0x35fe43['visibleView'])&&_0x35fe43['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 _0x4b5373('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x311ff2 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x311ff2);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x54c9ab){for(const _0x471578 of this['_selectedAnnotations'])_0x54c9ab['includes'](_0x471578)||this['_manuallyClosed']['delete'](_0x471578);for(const _0x33a703 of this['annotations'])_0x54c9ab['includes'](_0x33a703)||this['_removeAnnotationFromBalloon'](_0x33a703);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1ffccc of _0x54c9ab)this['_addAnnotationToBalloon'](_0x1ffccc);}this['_selectedAnnotations']=_0x54c9ab;}['_addAnnotationToBalloon'](_0x33af59,_0x18694a=!0x1){this['_manuallyClosed']['has'](_0x33af59)||(this['_addedAnnotations']['has'](_0x33af59)||this['_balloon']['hasView'](_0x33af59['view'])||(this['_addedAnnotations']['add'](_0x33af59),this['_balloon']['add']({'stackId':_0x33af59['view']['id'],'view':_0x33af59['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x33af59)}})),_0x18694a&&this['_balloon']['showStack'](_0x33af59['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5a528d){const _0x2d4845=_0x5a528d['target'],_0x3073e0=this['editor']['editing']['view'],_0x5a54bd=_0x3073e0['document']['selection']['getFirstRange'](),_0x42d230=_0x3073e0['domConverter']['viewRangeToDom'](_0x5a54bd);if(_0x42d230['collapse'](!0x0),_0x2d4845){if(_0x2d4845 instanceof _0x4481eb)return _0x2d4845;let _0x23d1e8=[];for(const _0x5aca05 of _0x2d4845)_0x23d1e8['push'](...(_0x52454b=_0x5aca05['getClientRects'](),Array['from'](_0x52454b)['map'](DOMRect['fromRect'])));_0x23d1e8=function(_0x11c62e){const _0x36acd7=[];let _0x14bfda=_0x11c62e[0x0];for(let _0x1e745d=0x1;_0x1e745d<_0x11c62e['length'];_0x1e745d++)B(_0x14bfda,_0x11c62e[_0x1e745d])?_0x14bfda['width']+=_0x11c62e[_0x1e745d]['width']:(_0x36acd7['push'](_0x14bfda),_0x14bfda=_0x11c62e[_0x1e745d]);return _0x36acd7['push'](_0x14bfda),_0x36acd7;}(_0x23d1e8);const _0x5c56cf=_0x42d230['getBoundingClientRect']();return _0x23d1e8['find'](_0x230e7e=>_0x230e7e['top']<=_0x5c56cf['top']&&_0x230e7e['bottom']>=_0x5c56cf['bottom']&&_0x230e7e['left']<=_0x5c56cf['left']&&_0x230e7e['right']>=_0x5c56cf['right'])||_0x23d1e8[0x0];}var _0x52454b;return _0x5a528d['targetRect']||_0x42d230;}['_removeAnnotationFromBalloon'](_0x103827){this['_addedAnnotations']['has'](_0x103827)&&this['_balloon']['hasView'](_0x103827['view'])&&(this['_addedAnnotations']['delete'](_0x103827),this['_balloon']['remove'](_0x103827['view']));}['_closeAnnotation'](_0x186fe9){this['_manuallyClosed']['add'](_0x186fe9),this['_removeAnnotationFromBalloon'](_0x186fe9);}}function B(_0x2fad26,_0x245c49){return _0x2fad26['top']===_0x245c49['top']&&_0x2fad26['bottom']===_0x245c49['bottom']&&_0x2fad26['right']===_0x245c49['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x36dcd0,_0x7d96ec){super(_0x36dcd0),this['set']('isEmpty',!_0x7d96ec['length']),this['focusTracker']=new _0xda5a76(),this['_annotationViews']=_0x7d96ec,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x209ef2({'focusables':_0x7d96ec,'focusTracker':this['focusTracker']}),this['listenTo'](_0x7d96ec,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x7d96ec,'remove',(_0x1affb6,_0x18a95a)=>{_0x18a95a['isActive']&&this['focus'](),_0x7d96ec['length']||(this['isEmpty']=!0x0);});const _0x55758e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x36dcd0,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x7d96ec},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x55758e['if']('isEmpty','ck-hidden',_0x437433=>!_0x437433)]},'children':[{'text':E(_0x36dcd0,'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 _0x226a76 of this['_annotationViews'])this['focusTracker']['add'](_0x226a76['element']);this['_annotationViews']['on']('change',(_0x31aeb6,{added:_0x299542,removed:_0x3b9ba4})=>{for(const _0x2ca72a of _0x299542)this['focusTracker']['add'](_0x2ca72a['element']);for(const _0x362e33 of _0x3b9ba4)this['focusTracker']['remove'](_0x362e33['element']);});}}class f extends _0xbf5a6d{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x15817e){super(_0x15817e),this['archivedThreads']=new _0x4d4610();}['init'](){const _0x10fc51=this['context'],_0x149810=_0x10fc51['plugins']['get'](o),_0x24ceaf=_0x10fc51['plugins']['get'](O);this['listenTo'](_0x149810,'addCommentThread',(_0x592a3d,{threadId:_0x359ffd})=>{const _0x409109=_0x149810['getCommentThread'](_0x359ffd);_0x409109['archivedAt']&&this['archivedThreads']['add'](_0x409109,this['_calculatePosition'](_0x409109['archivedAt'])),this['listenTo'](_0x409109,'change:archivedAt',(_0x31650e,_0x32f88f,_0x368f13)=>{_0x368f13?this['archivedThreads']['has'](_0x409109)||this['archivedThreads']['add'](_0x409109,this['_calculatePosition'](_0x409109['archivedAt'])):this['archivedThreads']['has'](_0x409109)&&this['archivedThreads']['remove'](_0x409109);});}),this['listenTo'](_0x149810,'removeCommentThread',(_0x489e08,{threadId:_0x2df90d})=>{const _0x36488c=_0x149810['getCommentThread'](_0x2df90d);this['stopListening'](_0x36488c),this['archivedThreads']['has'](_0x36488c)&&this['archivedThreads']['remove'](_0x36488c);},{'priority':'highest'}),this['listenTo'](_0x24ceaf['collection'],'focus',(_0x56be54,_0xb9a59d)=>{_0xb9a59d['isVisible']||(_0xb9a59d['isActive']=!0x0,_0x24ceaf['activate'](_0xb9a59d));});}['_calculatePosition'](_0x4c2c8c){const _0x3aa6d9=[...this['archivedThreads']]['findIndex'](_0x1c3363=>_0x1c3363['archivedAt']<_0x4c2c8c);return _0x3aa6d9>-0x1?_0x3aa6d9:this['archivedThreads']['length'];}}class a extends _0x28c70b{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0xafccfd];}constructor(_0x5b8230){super(_0x5b8230),this['annotationViews']=new _0xed3852(),this['_pendingThreads']=[];}['init'](){const _0x962454=this['editor'],_0x41f9f2=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x962454['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x190959,!0x0)),_0x962454['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x127fc9=this['_createCommentsArchiveButton'](_0x485dee);return _0x127fc9['set']({'role':'menuitemcheckbox'}),_0x127fc9;});const _0x5e6b1c=_0x962454['plugins']['get'](f),_0x45b067=_0x962454['plugins']['get']('Annotations'),_0x42e234=_0x962454['plugins']['get']('CommentsRepository');_0x5e6b1c['archivedThreads']['forEach'](_0x2123c7=>{this['_handleNewThread'](_0x2123c7);}),this['listenTo'](_0x5e6b1c['archivedThreads'],'add',(_0x499632,_0x108f4a)=>{this['_handleNewThread'](_0x108f4a);}),this['listenTo'](_0x45b067['collection'],'add',(_0x642de9,_0x3aec08)=>{const _0x467fb4=this['_pendingThreads']['find'](_0x57863b=>{const _0x27d726=_0x42e234['_threadToController']['get'](_0x57863b);return _0x27d726&&_0x3aec08['innerView']===_0x27d726['view'];});if(_0x467fb4){const _0x4e9fa5=this['_calculatePosition'](_0x467fb4['archivedAt']);this['annotationViews']['add'](_0x3aec08['view'],_0x4e9fa5),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x467fb4),0x1);}}),this['listenTo'](_0x5e6b1c['archivedThreads'],'remove',(_0xf04836,_0x3d725a)=>{const _0x169924=_0x962454['config']['get']('collaboration.channelId');if(!_0x169924||_0x3d725a['channelId']===_0x169924){if(this['_pendingThreads']['includes'](_0x3d725a))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3d725a),0x1);else{const _0x291f36=_0x42e234['_threadToController']['get'](_0x3d725a),_0x17e1e5=_0x45b067['getByInnerView'](_0x291f36['view']);this['annotationViews']['remove'](_0x17e1e5['view']),this['stopListening'](_0x17e1e5['focusableElements']);}}}),this['listenTo'](_0x45b067['collection'],'add',(_0x3a3748,_0x1aabdc)=>{this['listenTo'](_0x1aabdc,'escape',_0x41f9f2);}),this['listenTo'](_0x45b067['collection'],'remove',(_0x32f86f,_0x2f1a97)=>{this['stopListening'](_0x2f1a97,'escape',_0x41f9f2);});}['_handleNewThread'](_0x54fe58){const _0xa8e276=this['editor']['plugins']['get']('CommentsRepository'),_0x479de3=this['editor']['plugins']['get']('Annotations'),_0x153ae2=this['editor']['config']['get']('collaboration.channelId');if(!_0x153ae2||_0x54fe58['channelId']===_0x153ae2){const _0x2b5498=_0xa8e276['_threadToController']['get'](_0x54fe58);if(!_0x2b5498)return void this['_pendingThreads']['push'](_0x54fe58);const _0x12b4a0=this['_calculatePosition'](_0x54fe58['archivedAt']),_0x32931a=_0x479de3['getByInnerView'](_0x2b5498['view']);_0x32931a['isVisible']&&_0x479de3['_visibleAnnotations']['remove'](_0x32931a),this['annotationViews']['add'](_0x32931a['view'],_0x12b4a0);}}['_calculatePosition'](_0x262329){const _0x120fa9=this['editor']['config']['get']('collaboration.channelId'),_0x13ac5f=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x191bd1=>_0x191bd1['channelId']===_0x120fa9)['findIndex'](_0x5ec3fc=>_0x5ec3fc['archivedAt']<_0x262329);return _0x13ac5f<0x0||_0x13ac5f>this['annotationViews']['length']?this['annotationViews']['length']:_0x13ac5f-0x1;}['_toggleDialog'](){const _0x4941ea=this['editor'],_0x3fc559=_0x4941ea['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x4941ea['locale'],this['annotationViews'])),'commentsArchive'===_0x3fc559['id']?_0x3fc559['hide']():_0x3fc559['show']({'id':'commentsArchive','title':E(_0x4941ea['locale'],'COMMENTS_ARCHIVE'),'icon':_0x31a772,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4eea7e['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x5a18bf,_0x573862=!0x1){const _0xba13ed=this['editor']['locale'],_0x3737a8=this['editor']['plugins']['get']('Dialog'),_0x2c5bcb=new _0x5a18bf(_0xba13ed);return _0x2c5bcb['bind']('isEnabled')['to'](this,'isEnabled'),_0x2c5bcb['bind']('isOn')['to'](_0x3737a8,'id',_0x4606ab=>'commentsArchive'===_0x4606ab),_0x2c5bcb['set']({'label':E(_0xba13ed,'COMMENTS_ARCHIVE'),'icon':_0x31a772,'isToggleable':!0x0}),_0x573862&&(_0x2c5bcb['tooltip']=!0x0),this['listenTo'](_0x2c5bcb,'execute',()=>this['_toggleDialog']()),_0x2c5bcb;}['_hideDialogOnAnnotationEscape']=_0x5518b1=>{const _0x2240a3=_0x5518b1['source'];if(!this['annotationViews']['has'](_0x2240a3['view']))return;const _0x235206=this['editor']['plugins']['get']('Dialog');_0x235206['isOpen']&&'commentsArchive'===_0x235206['id']&&(_0x235206['hide'](),_0x5518b1['stop']());};}class p extends _0x28c70b{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};