@ckeditor/ckeditor5-comments 48.0.0-alpha.10 → 48.0.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +11 -11
  2. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x3bc9ee,ContextPlugin as _0x3455c6,PendingActions as _0x1dbd41,Command as _0x28c190,Plugin as _0x26a1e4,Context as _0x3b68bd}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x353416,uid as _0x53cf7b,KeystrokeHandler as _0x4993cb,FocusTracker as _0xb01d3d,diff as _0x3f490b,Collection as _0x2905f3,Rect as _0x4b7761,CKEditorError as _0x5a6372,first as _0x3bf5c4,priorities as _0x5810a3,scrollViewportToShowTarget as _0x1c9dcd,getEnvKeystrokeText as _0x323d00,toUnit as _0x2b4c4d,DomEmitterMixin as _0x1e2c28,keyCodes as _0x47e3e4}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x23a91d,AriaDescriptionView as _0x7b67db,setupThreadKeyboardNavigation as _0x57564d,ConfirmMixin as _0x5bb8d3,LateFocusButtonView as _0x23b231,trimHtml as _0xe027e7,LateFocusDropdownButtonView as _0x2b3c21,FOCUS_ANNOTATION_KEYSTROKE as _0x565a10,Users as _0x788207,getDateTimeFormatter as _0x46a3b6,hashObject as _0x43d269,getAllMarkersDomElementsSorted as _0x2eee3d,surroundingMarkersDetector as _0xdfcc92}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x453cd9,cloneDeep as _0x1da91b,set as _0x32d5ae,unset as _0x17ccfb,isEqual as _0x4f39af,debounce as _0x21b888}from'es-toolkit/compat';import{IconUndo as _0x520b43,IconCheck as _0x1543c6,IconPencil as _0x5c4a76,IconRemoveComment as _0x32b973,IconThreeVerticalDots as _0x476f18,IconAddComment as _0x4079b6,IconCommentsArchive as _0xc7f879}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0xfd4271,InlineEditableUIView as _0x3bf0d9,EditorUI as _0xb788f5,View as _0x11143f,FocusCycler as _0x241393,ButtonView as _0x2b6d9d,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
24
- _0x353416(){['model'];['view'];constructor(_0x1da46a,_0xfbee77){super(),this['model']=_0x1da46a,this['model']['_isAttached']=!0x0,this['view']=_0xfbee77,this['listenTo'](_0xfbee77,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0xfbee77,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0xfbee77,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0xfbee77,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0xfbee77,'addComment',(_0x36d248,_0x49af38)=>this['addComment'](_0x49af38)),this['listenTo'](_0xfbee77,'updateComment',(_0xeb923,_0x49c96a,_0x477aae)=>this['updateComment'](_0x49c96a,_0x477aae)),this['listenTo'](_0xfbee77,'removeComment',(_0x3a89a9,_0xc097a7)=>this['removeComment'](_0xc097a7));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1b9f19){this['model']['addComment']({'content':_0x1b9f19,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2d9874,_0x414f78){this['model']['getComment'](_0x2d9874)['update']({'content':_0x414f78});}['removeComment'](_0x1b0baf){this['model']['getComment'](_0x1b0baf)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x462516,_0x3ed131,_0x4ea375){const t=_0x462516['t'];switch(_0x3ed131){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'},_0x4ea375);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'},_0x4ea375);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'},_0x4ea375);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'},_0x4ea375);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x4ea375);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'},_0x4ea375);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'},_0x4ea375);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'},_0x4ea375);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Et extends _0xfd4271{['main'];['editable'];constructor(_0x1d0111,_0x414cc5){super(_0x1d0111);const _0x55597b=_0x53cf7b();this['main']=this['createCollection'](),this['editable']=new _0x3bf0d9(_0x1d0111,_0x414cc5,void 0x0,{'label':()=>bt(_0x1d0111,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1d0111['uiLanguageDirection'],'lang':_0x1d0111['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x55597b},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Nt extends _0xb788f5{['view'];constructor(_0x5f2f78){super(_0x5f2f78),this['view']=new Et(_0x5f2f78['locale'],_0x5f2f78['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1e64e9=this['editor']['editing']['view'],_0x585576=this['view']['editable'],_0x3d5dcc=_0x1e64e9['document']['getRoot']();_0x585576['name']=_0x3d5dcc['rootName'],this['view']['render']();const _0x1631d4=_0x585576['element'];this['setEditableElement'](_0x585576['name'],_0x1631d4),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1e64e9['attachDomRoot'](_0x1631d4),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
25
- _0x353416(_0x3bc9ee){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>kt)());constructor(_0x5ad395={}){function _0x1bf336(_0x482222){return _0x482222['map'](_0x364f19=>String['fromCharCode'](_0x364f19))['join']('');}(_0x5ad395=Object['assign']({},_0x5ad395))['plugins']||(_0x5ad395['plugins']=Ot['defaultPlugins']),super(_0x5ad395),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x1bf336([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1bf336([0x76,0x69,0x65,0x77])][_0x1bf336([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1bf336([0x61,0x75,0x74,0x6f]),this[_0x1bf336([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1bf336([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1bf336([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1bf336([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1bf336([0x6f,0x6b])});}['create'](){const _0x3577ee=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3577ee))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x56e659=>{const _0x5edcd9=this['model']['document']['getRoot'](),_0x4ffdb4=_0x5edcd9&&_0x5edcd9['getChild'](_0x5edcd9['childCount']-0x1);_0x56e659['setSelection'](_0x4ffdb4,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x28781c=this['editing']['view'],_0x4890c0=_0x28781c['document']['getRoot'](),_0x556c12=_0x4890c0['getChild'](0x0);_0x4890c0['childCount']>0x1||!_0x556c12||'p'!=_0x556c12['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x28781c,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x556c12['placeholder']=this['placeholder']),ut({'view':_0x28781c,'element':_0x556c12,'keepOnFocus':!0x0}),this['placeholderElement']=_0x556c12);}}class Mt extends _0x11143f{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x157d4e,_0x18c832={}){super(_0x157d4e),this['editor']=null,this['_editorConfig']=_0x18c832,this['set']('value',_0x18c832['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x157d4e,'Reply...')),this['set']('submitLabel',bt(_0x157d4e,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x4993cb(),this['focusTracker']=new _0xb01d3d(),this['focusCycler']=new _0x241393({'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',(_0x9bb8b7,_0x2b89ba)=>{this['cancelButtonView']['fire']('execute'),_0x2b89ba();}),this['keystrokes']['set']('Ctrl+Enter',(_0xcff7f2,_0x50b4aa)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x50b4aa());}),this['on']('submit',(_0x427b12,_0x2cbfa8)=>{_0x2cbfa8['length']>0xfde8?(alert(bt(_0x157d4e,'TOO_LONG_COMMENT_ALERT',[_0x2cbfa8['length'],0xfde8])),_0x427b12['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4cf730=this['editor'];this['element']['insertBefore'](_0x4cf730['ui']['element'],this['element']['firstChild']),_0x4cf730['model']['document']['on']('change',()=>this['value']=_0x4cf730['getData']()),_0x4cf730['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4cf730['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xbe2a30){-0x1===_0xbe2a30?(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:_0x810884}=this,_0x4f1f04=new _0x2b6d9d(_0x810884);return _0x4f1f04['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4f1f04['withText']=!0x0,_0x4f1f04['bind']('label')['to'](this,'submitLabel'),_0x4f1f04['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4f1f04['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x298f81,_0x3fc323)=>!_0x3fc323&&!!_0x298f81['trim']()),_0x4f1f04;}['_createCancelButton'](){const {locale:_0x5a54e7}=this,_0x1f614d=new _0x2b6d9d(_0x5a54e7);return _0x1f614d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1f614d['label']=bt(_0x5a54e7,'Cancel'),_0x1f614d['withText']=!0x0,_0x1f614d['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1f614d;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x28acbc=>{this['focusTracker']['add'](_0x28acbc['element']);}),this['focusables']['on']('change',(_0x17a531,_0x290d7b)=>{for(const _0x517e83 of Array['from'](_0x290d7b['added'])['reverse']())this['focusTracker']['add'](_0x517e83['element']);});}}class Rt extends _0x11143f{constructor(_0x5f330c,_0x4c90bb,_0x501cd0){super(_0x5f330c),this['commentInputView']=new Mt(_0x5f330c,_0x501cd0),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3259d4,_0x52789b)=>_0x3259d4||!!_0x52789b),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 _0x23a91d(_0x5f330c,_0x4c90bb),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'](_0x12d579){this['commentInputView']['focus'](_0x12d579);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1e4f60,_0x3af251)=>{const {submitButtonView:_0x234612,cancelButtonView:_0x5e5a6b,editor:_0x26d378}=this['commentInputView'];[_0x234612['element'],_0x5e5a6b['element'],_0x26d378?_0x26d378['editing']['view']['getDomRoot']():null]['filter'](_0x12bf00=>_0x12bf00)['some'](_0x4dc5ed=>_0x4dc5ed['contains'](_0x3af251['target']))||(this['focus'](),_0x3af251['preventDefault']());});}}class xt extends _0x11143f{constructor(_0x454f85){super(_0x454f85);const _0x36912f=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x36912f['to']('count',_0x5a062e=>bt(_0x454f85,'NUMBER_OF_COMMENTS',_0x5a062e))}]});}}class St extends _0x11143f{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x39cf2f,_0x32011c,_0x5c3745){super(_0x39cf2f);const _0x509dc1=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x32011c['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x32011c,this['_config']=_0x5c3745,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xb01d3d(),this['keystrokes']=new _0x4993cb(),this['focusCycler']=new _0x241393({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xf80a39=>this['commentViews']['map'](_0xe4a3e0=>_0xe4a3e0['element'])['includes'](_0xf80a39['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x39cf2f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2e79f5=>_0x2e79f5-this['_config']['maxCommentsWhenCollapsed']);for(const _0x539235 of _0x32011c['comments'])this['_handleNewCommentModel'](_0x539235);this['_handleInfoComment'](),this['listenTo'](_0x32011c['comments'],'add',(_0x4db49e,_0x16e147)=>{const _0x482843=this['_calculatePosition'](_0x16e147);this['length']++,this['_handleNewCommentModel'](_0x16e147,_0x482843),this['refreshVisibleViews']();}),this['listenTo'](_0x32011c['comments'],'remove',(_0x4b0e20,_0x31d782)=>{this['length']--,this['_handleRemoveCommentModel'](_0x31d782),this['refreshVisibleViews']();}),this['listenTo'](_0x32011c,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x32011c,'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',_0x509dc1['if']('length','ck-hidden',_0x12dd16=>!_0x12dd16)],'aria-label':bt(_0x39cf2f,'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'](_0x1a4ca7){-0x1===_0x1a4ca7?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x19b247 of this['commentViews'])_0x19b247['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x42573f,_0x380b9e){const _0x32a4e1=new this['_config']['CommentView'](this['locale'],_0x42573f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x32a4e1['viewUid']=_0x42573f['id'],_0x32a4e1['delegate']('removeComment')['to'](this),_0x32a4e1['delegate']('updateComment')['to'](this),_0x32a4e1['delegate']('resolveCommentThread')['to'](this),_0x32a4e1['delegate']('editorReady')['to'](this),_0x32a4e1['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x32a4e1,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x32a4e1,_0x380b9e);}['_calculatePosition'](_0x102606){const _0x2418c2=this['_model']['_findOptimalIndex'](_0x102606);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x102606['authoredAt']?_0x2418c2-0x1:_0x2418c2:_0x2418c2-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1b7438={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x1b7438,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1b7438));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x25f112){const _0xdab383=this['commentViews']['remove'](_0x25f112['id']);this['stopListening'](_0xdab383),_0xdab383['isEditMode']&&this['_updateHasDirtyComment'](),_0xdab383['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x148eb1=>_0x148eb1['isEditMode']);}['_rearrangeCollapse'](){const _0x15f38d=function(_0x3d1e87){const _0xfbfd1a=new _0x2905f3();for(const _0x464a75 of _0x3d1e87)_0xfbfd1a['add'](_0x464a75);return _0xfbfd1a;}(this['commentViews']),_0xe5c5fc=this['_collapsedCommentsView']['count'];for(let _0x2c2a41=0x1;_0x2c2a41<=_0xe5c5fc;_0x2c2a41++)_0x15f38d['remove'](0x1);for(const _0x3f3f75 of _0x15f38d)_0x3f3f75['collapse']();_0xe5c5fc>0x0&&_0x15f38d['add'](this['_collapsedCommentsView'],0x1),Pt(_0x3f490b(Array['from'](this['visibleViews']),Array['from'](_0x15f38d)),this['visibleViews'],_0x15f38d);}['_rearrangeExpand'](){Pt(_0x3f490b(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x59279f of this['visibleViews'])_0x59279f['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5382d9=>{this['focusTracker']['add'](_0x5382d9['element']),this['keystrokes']['listenTo'](_0x5382d9['element']);}),this['commentViews']['on']('change',(_0x1d91fc,_0x504bd5)=>{for(const _0x444fd1 of _0x504bd5['removed'])this['focusTracker']['remove'](_0x444fd1['element']),this['keystrokes']['stopListening'](_0x444fd1['element']);for(const _0x1654e5 of Array['from'](_0x504bd5['added'])['reverse']())this['focusTracker']['add'](_0x1654e5['element']),this['keystrokes']['listenTo'](_0x1654e5['element']);});}}function Pt(_0x216683,_0xd65149,_0x5b6230){let _0x2a63c8=0x0;for(const _0xea28aa of _0x216683)switch(_0xea28aa){case'insert':_0xd65149['add'](_0x5b6230['get'](_0x2a63c8),_0x2a63c8),_0x2a63c8++;break;case'delete':_0xd65149['remove'](_0x2a63c8);break;case'equal':_0x2a63c8++;}}class Lt extends _0x11143f{constructor(_0x52d739){super(_0x52d739);const _0x2d45d5=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2d45d5['to']('contextValue',_0x1c2a0e=>bt(_0x52d739,'THREAD_CONTEXT_LABEL',_0x1c2a0e)),'tabindex':-0x1},'children':[{'text':_0x2d45d5['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x11143f{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3fbb4d,_0x4abf19){super(_0x3fbb4d);const _0x3e8c5d=this['bindTemplate'];this['_model']=_0x4abf19,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xb01d3d(),this['keystrokes']=new _0x4993cb(),this['focusCycler']=new _0x241393({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4c7db8=>!!_0x4c7db8),this['bind']('contextValue')['to'](this['_model'],'context',_0x50ab2=>_0x50ab2&&_0x50ab2['value']?this['_trimContextValue'](_0x50ab2['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x3e8c5d['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 _0x3da23a=new _0x2b6d9d(this['locale']);return _0x3da23a['label']=bt(this['locale'],'Reopen'),_0x3da23a['tooltip']=bt(this['locale'],'Reopen'),_0x3da23a['icon']=_0x520b43,_0x3da23a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x977d66=>!_0x977d66),_0x3da23a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x493171,_0x751624)=>_0x493171&&_0x751624),_0x3da23a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3da23a;}['_trimContextValue'](_0x382f82){if(_0x382f82['length']<0x96)return _0x382f82;const _0x366c73=_0x382f82['lastIndexOf']('\x20',0x93);return _0x382f82['substring'](0x0,_0x366c73>-0x1?_0x366c73:0x93)+'...';}['_attachContextActions'](){const _0x3c8475=this['element']['querySelector']('.ck-context'),_0x1a0afc=_0x3c8475['querySelector']('.ck-context__value');this['listenTo'](_0x3c8475,'mouseenter',()=>{_0x1a0afc['offsetWidth']<_0x1a0afc['scrollWidth']&&_0x3c8475['classList']['add']('overlay');}),this['listenTo'](_0x3c8475,'mouseleave',()=>{_0x3c8475['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5e85f1 of this['focusables'])this['focusTracker']['add'](_0x5e85f1['element']),this['keystrokes']['listenTo'](_0x5e85f1['element']);}['_createContextView'](){const _0x4509cf=new Lt(this['locale']);return _0x4509cf['bind']('contextValue')['to'](this),_0x4509cf;}}class Vt extends _0x11143f{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xb61ae4,_0x52e078,_0x338a2d,_0x1ac776){super(_0xb61ae4),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x52e078,this['_localUser']=_0x338a2d,this['_config']=_0x1ac776,this['commentThreadHeaderView']=new Dt(_0xb61ae4,_0x52e078),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x7b67db(_0xb61ae4,bt(_0xb61ae4,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0xb61ae4,_0x52e078,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1ac776)),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',(_0x1cb8d2,_0x261609)=>_0x1cb8d2||!!_0x261609),this['bind']('isUnlinked')['to'](_0x52e078,'unlinkedAt',_0x222c23=>!!_0x222c23),this['bind']('ariaLabel')['to'](this,'length',_0x4a7b6b=>{const _0x3122a8=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x4a7b6b,_0x3122a8]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xb01d3d(),this['keystrokes']=new _0x4993cb(),this['focusCycler']=new _0x241393({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x17db5c=>_0x17db5c['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x57564d(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2c91b2=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3c37aa=_0x2c91b2['commentInputView'];return _0x2c91b2['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3c37aa,'value',(_0x3fa9f1,_0x2aa2fd,_0x2f4f37,_0x18561e,_0x953bb0)=>!!_0x953bb0||!!_0x18561e&&_0x2f4f37&&!_0x2aa2fd||_0x3fa9f1&&_0x2f4f37&&!_0x2aa2fd),_0x3c37aa['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2e1e78,_0x202b84,_0x58d877)=>{let _0x449926;return _0x449926=_0x58d877&&_0x202b84?'Reply\x20to\x20reopen\x20discussion...':_0x2e1e78?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x449926);}),_0x3c37aa['bind']('submitLabel')['to'](this,'length',_0x470dc3=>bt(this['locale'],_0x470dc3?'Reply':'Comment')),_0x3c37aa['on']('submit',(_0x31dd60,_0x2bfb84)=>{this['fire']('addComment',_0x2bfb84),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3c37aa['on']('cancel',()=>{this['focus']();}),_0x3c37aa['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3c37aa['on']('cancel',_0x4e52f9=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4e52f9['stop']());}),this['on']('change:isActive',(_0x365f84,_0x2755f8,_0x10594b)=>{_0x10594b||this['length']||_0x3c37aa['value']||this['fire']('removeCommentThread');}),_0x2c91b2;}}class Bt extends/* #__PURE__ -- @preserve */
27
- _0x5bb8d3(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x2337b1,_0xa335d9,_0x1ef74c,_0x548a71){super(_0x2337b1,_0xa335d9,_0x1ef74c,_0x548a71),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2337b1,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2867c3,_0x15b237,_0x2f8f03)=>{_0x2f8f03||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1c3daf,_0x25f0eb,_0x53b374)=>{_0x53b374&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0xcd68d3=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0xcd68d3['if']('isActive','ck-thread--active'),_0xcd68d3['if']('isUnlinked','ck-thread--unlinked'),_0xcd68d3['to']('actionIndicator',_0x303ce1=>_0x303ce1?'ck-thread--'+_0x303ce1:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0xcd68d3['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 _0x399fc4 of this['commentsListView']['commentViews'])_0x399fc4['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x2e5240}=this,_0x51e245=this['commentsListView']['commentViews']['get'](0x0);_0x51e245===this['_boundFirstCommentView']||_0x51e245['isSystemComment']||(this['_boundFirstCommentView']=_0x51e245,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x51e245,'actionIndicator',_0x437c43=>'remove'===_0x437c43?'remove':null),_0x51e245['placeholder']=bt(_0x2e5240,'Write\x20a\x20comment...'),_0x51e245['removeButton']['on']('execute',_0x50a63c=>{_0x50a63c['stop'](),this['showConfirm'](bt(_0x2e5240,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x51e245['focus']();}),_0x51e245['actionBar']['add'](this['resolveButton'],0x0),_0x51e245['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x3c2a66=new _0x23b231(this['locale']);return _0x3c2a66['label']=bt(this['locale'],'Resolve'),_0x3c2a66['tooltip']=bt(this['locale'],'Resolve'),_0x3c2a66['icon']=_0x1543c6,_0x3c2a66['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3c2a66['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x54f567=>!_0x54f567),_0x3c2a66['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x21fb06,_0x46fd21)=>_0x21fb06&&!_0x46fd21),_0x3c2a66['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3c2a66;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class Ht extends _0x11143f{constructor(_0xccaa51){super(_0xccaa51),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x2e68f4,_0x491fa8,_0x89e03d)=>{this['element']['innerHTML']=_0x89e03d;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x11143f{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x59c4d4,_0x5c56d6,_0x1eec3f){super(_0x59c4d4),this['_model']=_0x5c56d6,this['_config']=_0x1eec3f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5c56d6,'content',_0x5c56d6,'authoredAt',(_0x2d47d4,_0x11c020)=>bt(_0x59c4d4,'COMMENT_ARIA_LABEL',[_0x5c56d6['author']['name'],_0x1eec3f['formatDateTime'](_0x11c020),new DOMParser()['parseFromString'](_0x2d47d4,'text/html')['body']['textContent'],_0x5c56d6['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x7b67db(_0x59c4d4,bt(_0x59c4d4,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0xb01d3d(),this['keystrokes']=new _0x4993cb(),this['focusCycler']=new _0x241393({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5f49ec=>_0x5f49ec['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x2adce0=new Ht(this['locale']);return _0x2adce0['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x5d0165,_0x33fe5a)=>_0x33fe5a?_0xe027e7(_0x5d0165,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x5d0165),_0x2adce0;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2e39d7=new Mt(this['locale'],this['_config']['editorConfig']);return _0x2e39d7['value']=this['_model']['content'],_0x2e39d7['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2e39d7['submitLabel']=bt(this['locale'],'Save'),_0x2e39d7['on']('submit',(_0x8c1e7f,_0x331c88)=>{this['fire']('updateComment',this['_model']['id'],_0x331c88),this['switchToDisplayMode'](),this['focus']();}),_0x2e39d7['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2e39d7['once']('editorReady',()=>{_0x2e39d7['focus']();}),_0x2e39d7['createEditor'](),_0x2e39d7['delegate']('editorReady')['to'](this),_0x2e39d7['delegate']('editorDestroyed')['to'](this),_0x2e39d7;}['_setupKeyboardNavigation'](){const _0x45adde=this['element'];this['keystrokes']['listenTo'](_0x45adde);for(const _0x5c1419 of this['focusables'])this['focusTracker']['add'](_0x5c1419['element']),this['keystrokes']['listenTo'](_0x5c1419['element']);this['focusables']['on']('change',(_0xdf29da,_0x1ece4c)=>{for(const _0x2e026a of _0x1ece4c['removed'])this['focusTracker']['remove'](_0x2e026a['element']),this['keystrokes']['stopListening'](_0x2e026a['element']);for(const _0x14cbbe of _0x1ece4c['added'])this['focusTracker']['add'](_0x14cbbe['element']),this['keystrokes']['listenTo'](_0x14cbbe['element']);}),this['keystrokes']['set']('enter',(_0x5562e1,_0xbcb60e)=>{_0x45adde===_0x5562e1['target']&&(this['focusCycler']['focusFirst'](),_0xbcb60e());}),this['keystrokes']['set']('esc',(_0x20eebe,_0xa05a50)=>{_0x45adde!==_0x20eebe['target']&&(this['focus'](),_0xa05a50());});}}class Ut extends/* #__PURE__ -- @preserve */
28
- _0x5bb8d3(Ft){['actionBar'];['userView'];constructor(_0x129c44,_0x19b060,_0x7a27a6){super(_0x129c44,_0x19b060,_0x7a27a6),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x129c44,'Reply...')),this['bind']('authoredAt')['to'](_0x19b060),this['bind']('resolvedAt')['to'](_0x19b060),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 _0x23a91d(_0x129c44,_0x19b060['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x19b060,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x2fd9d5=this['bindTemplate'],_0x2d28c1=[{'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':_0x2fd9d5['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2fd9d5['to']('authoredAt',_0x31b057=>this['_config']['formatDateTime'](_0x31b057))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2fd9d5['if']('isEditMode','ck-comment__actions--hidden'),_0x2fd9d5['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']&&_0x2d28c1['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x2fd9d5['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2fd9d5['if']('isEditMode','ck-comment--edit'),_0x2fd9d5['if']('isSystemComment','ck-comment--info'),_0x2fd9d5['to']('actionIndicator',_0x4449d9=>_0x4449d9?'ck-comment--'+_0x4449d9:'')],'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':_0x2d28c1}]}]};}['_createEditButton'](){const _0xcf7e3f=new _0x2b6d9d(this['locale']);return _0xcf7e3f['label']=bt(this['locale'],'Edit'),_0xcf7e3f['icon']=_0x5c4a76,_0xcf7e3f['withText']=!0x0,_0xcf7e3f['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xcf7e3f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x224912=>!_0x224912),_0xcf7e3f['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xcf7e3f['on']('execute',()=>this['switchToEditMode']()),_0xcf7e3f;}['_createRemoveButton'](){const _0x10920d=new _0x2b6d9d(this['locale']);return _0x10920d['label']=bt(this['locale'],'Remove'),_0x10920d['icon']=_0x32b973,_0x10920d['withText']=!0x0,_0x10920d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x10920d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x349c38=>!_0x349c38),_0x10920d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x10920d['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x10920d;}['_createDropdown'](){const _0x39b842=it(this['locale'],_0x2b3c21),_0x2066d7=_0x39b842['panelView']['children'],_0x103ba8=new et(this['locale']),_0x3036b=_0x39b842['bindTemplate'];st(_0x39b842,()=>this['items']['find'](_0x2a4ef2=>_0x2a4ef2['isVisible'])),_0x39b842['extendTemplate']({'attributes':{'class':[_0x3036b['if']('isVisible','ck-hidden',_0x2e9b9e=>!_0x2e9b9e)]}});const _0x17aa0c=(_0x457794,_0x5876e1=-0x1)=>{const _0x443ca9=new nt(this['locale']);_0x443ca9['children']['add'](_0x457794);const _0x4fc71b=_0x5876e1>-0x1?_0x5876e1:_0x103ba8['items']['length'];_0x103ba8['items']['add'](_0x443ca9,_0x4fc71b);const _0x1fe186=Array['from'](this['items']);_0x39b842['unbind']('isEnabled','isVisible'),_0x39b842['bind']('isEnabled')['toMany'](_0x1fe186,'isEnabled',(..._0x11cd77)=>_0x11cd77['some'](_0x4ac1c6=>_0x4ac1c6)),_0x39b842['bind']('isVisible')['toMany'](_0x1fe186,'isVisible',(..._0x160cd0)=>_0x160cd0['some'](_0x194141=>_0x194141));};_0x39b842['panelPosition']='sw',_0x39b842['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x476f18});for(const _0x237537 of this['items'])_0x17aa0c(_0x237537);return _0x2066d7['add'](_0x103ba8),_0x39b842['listenTo'](this['items'],'add',(_0x1aa84f,_0x2bf266,_0x3fa9ce)=>{_0x17aa0c(_0x2bf266,_0x3fa9ce);}),_0x39b842['listenTo'](this['items'],'remove',(_0x2aa92d,_0x15597a,_0x1d53eb)=>{_0x103ba8['items']['remove'](_0x1d53eb);}),_0x39b842;}['_attachActions'](_0x391cb8,_0x29a5f0){const _0x5f526d=_0x391cb8&&_0x391cb8['element'];_0x5f526d&&(this['listenTo'](_0x5f526d,'mouseenter',()=>this['actionIndicator']=_0x29a5f0),this['listenTo'](_0x5f526d,'focus',()=>this['actionIndicator']=_0x29a5f0),this['listenTo'](_0x5f526d,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5f526d,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x5104e2=super['_createCommentInputView']();return _0x5104e2['bind']('placeholder')['to'](this),_0x5104e2;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x1a3e7c){const _0x3bd0c3=_0x453cd9(_0x1a3e7c,0x1e),_0x482cb0=new MutationObserver(_0x80ae38=>{for(const _0x46ba0f of _0x80ae38)('attributes'==_0x46ba0f['type']&&'class'==_0x46ba0f['attributeName']||'childList'==_0x46ba0f['type']||'characterData'==_0x46ba0f['type'])&&_0x3bd0c3();});return{'attach'(_0x22a040){_0x482cb0['observe'](_0x22a040,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x482cb0['disconnect'](),_0x3bd0c3['cancel']();}};}class Kt extends _0x11143f{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2cac18,_0x26bb04){super(_0x2cac18),this['id']=_0x53cf7b(),this['focusTracker']=new _0xb01d3d(),this['keystrokes']=new _0x4993cb(),this['keystrokes']['set']('Esc',(_0x25e656,_0xc0bf6d)=>this['fire']('Esc',_0xc0bf6d)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x26bb04),this['mainView']=_0x26bb04;const _0x25833b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x25833b['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 _0x31ab79=this['element']['clientHeight'];_0x31ab79&&(this['height']=_0x31ab79);}}class Yt extends/* #__PURE__ -- @preserve */
29
- _0x353416(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x7a192a,target:_0x2be060,type:_0xe0c76e,isVisible:_0x4ea67f=!0x0}){super(),this['view']=_0x7a192a,this['view']['element']||this['view']['render'](),this['_type']=_0xe0c76e,this['_target']=_0x2be060,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2905f3([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4f8f6a,_0x349d26)=>{this['view']['focusTracker']['add'](_0x349d26);}),this['focusableElements']['on']('remove',(_0x1abc00,_0x22be3c)=>{this['view']['focusTracker']['remove'](_0x22be3c);}),this['set']('isVisible',_0x4ea67f);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4952e0=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x4952e0),_0x4952e0;}get['targetRect'](){const _0x4bc9dc=this['target'];if(null===_0x4bc9dc)return null;if(_0x4bc9dc instanceof _0x4b7761)return _0x4bc9dc;const _0x5ca615=_0x4bc9dc['filter'](_0x308f78=>function(_0x4e0ab8){const _0x2a42a0=_0x4e0ab8['offsetParent'];if(_0x2a42a0)return!0x0;const _0x2b9e88=_0x4e0ab8['getClientRects']()['item'](0x0);return!!_0x2b9e88;}(_0x308f78));return 0x0===_0x5ca615['length']?null:_0x4b7761['getDomElementRects'](_0x5ca615[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x346f65){this['view']['isActive']=_0x346f65,this['view']['mainView']['isActive']=_0x346f65;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4dd227){if(!(null===_0x4dd227||_0x4dd227 instanceof _0x4b7761||Array['isArray'](_0x4dd227)&&_0x4dd227['every'](_0x2cefe9=>Gt(_0x2cefe9))))throw new _0x5a6372('annotation-invalid-target',null,{'target':_0x4dd227});}['_getNormalizedTarget'](){const _0x18723f='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x18723f)?[_0x18723f]:_0x18723f;}}function Gt(_0x2cef4c){return null!==_0x2cef4c&&'object'==typeof _0x2cef4c&&'nodeType'in _0x2cef4c&&0x1===_0x2cef4c['nodeType'];}class jt extends _0x2905f3{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4f0cb1=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xb01d3d(),this['_focusTracker']['on']('change:isFocused',(_0x437ab5,_0x96a051,_0x3e30f4)=>{_0x3e30f4||this['fire']('blur');});for(const _0x8c2452 of _0x4f0cb1)this['add'](_0x8c2452);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1aa268){if(this['has'](_0x1aa268))throw new _0x5a6372('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1aa268['innerView'],_0x1aa268),this['_viewToAnnotation']['set'](_0x1aa268['view'],_0x1aa268);for(const _0x539d37 of _0x1aa268['focusableElements'])this['_focusTracker']['add'](_0x539d37);this['listenTo'](_0x1aa268['focusableElements'],'add',(_0x60845c,_0x510817)=>{this['_focusTracker']['add'](_0x510817);}),this['listenTo'](_0x1aa268['focusableElements'],'remove',(_0x3d0df8,_0x26da76)=>{this['_focusTracker']['remove'](_0x26da76);}),this['listenTo'](_0x1aa268['view']['focusTracker'],'change:isFocused',(_0xeed02f,_0x21cfa0,_0x354338)=>{_0x354338&&this['fire']('focus',_0x1aa268);}),_0x1aa268['updateTargetRect']();const _0x5783bb=this['_getOrderInContent'](_0x1aa268['view']['targetRect']);return super['add'](_0x1aa268,_0x5783bb);}['remove'](_0x1fa60b){if(!this['has'](_0x1fa60b))throw new _0x5a6372('annotationcollection-not-existing-item',null);this['stopListening'](_0x1fa60b['view']['focusTracker']),this['stopListening'](_0x1fa60b['focusableElements']);for(const _0x5d3e08 of _0x1fa60b['focusableElements'])this['_focusTracker']['remove'](_0x5d3e08);return this['_viewToAnnotation']['delete'](_0x1fa60b['view']),this['_innerViewToAnnotation']['delete'](_0x1fa60b['innerView']),super['remove'](_0x1fa60b);}['getByInnerView'](_0x1bb4ec){return this['_innerViewToAnnotation']['get'](_0x1bb4ec);}['getByView'](_0x97bbd0){return this['_viewToAnnotation']['get'](_0x97bbd0);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x27ca0e of this)_0x27ca0e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1ba84d=Array['from'](this)['sort']((_0x56467b,_0xe4f578)=>qt(_0x56467b['view']['targetRect'],_0xe4f578['view']['targetRect']));for(let _0x1d6b8=_0x1ba84d['length']-0x1;_0x1d6b8>0x0;_0x1d6b8--){const _0x228a85=_0x1ba84d[_0x1d6b8];_0x1d6b8!==this['getIndex'](_0x228a85)&&(this['remove'](_0x228a85),this['add'](_0x228a85));}}['_getOrderInContent'](_0x130f65){let _0x44cde2=0x0;if(!_0x130f65)return this['length'];for(const _0x5987e5 of this){const _0x51d2b2=_0x5987e5['view']['targetRect'];if(_0x51d2b2){if(qt(_0x130f65,_0x51d2b2)<0x0)return _0x44cde2;_0x44cde2++;}}return _0x44cde2;}}function Xt({source:_0x34f96d,target:_0x140d89,filter:_0x4bf98e}){for(const _0x18120a of _0x34f96d)_0x4bf98e(_0x18120a)&&_0x140d89['add'](_0x18120a);_0x140d89['listenTo'](_0x34f96d,'add',(_0x436c87,_0x2427d8)=>{_0x4bf98e(_0x2427d8)&&_0x140d89['add'](_0x2427d8);}),_0x140d89['listenTo'](_0x34f96d,'remove',(_0x1d3bbb,_0xcf6736)=>{_0x140d89['has'](_0xcf6736)&&_0x140d89['remove'](_0xcf6736);});}function qt(_0x4f9fbe,_0x3e308c){if(null===_0x4f9fbe&&null===_0x3e308c)return 0x0;if(null===_0x4f9fbe)return-0x1;if(null===_0x3e308c)return 0x1;const _0xc8b798=_0x4f9fbe['top']-_0x3e308c['top'];return 0x0==_0xc8b798?_0x4f9fbe['left']-_0x3e308c['left']:_0xc8b798;}class $t extends _0x3455c6{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22d6ba){if(super(_0x22d6ba),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x22d6ba instanceof _0x3bc9ee){const _0x43a3a9=_0x22d6ba['locale'];_0x22d6ba['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x43a3a9,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x43a3a9,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x43a3a9,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x43a3a9,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x43a3a9,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x43a3a9,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x43a3a9,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x33bab6){this['collection']['add'](_0x33bab6);}['remove'](_0x246c66){this['collection']['remove'](_0x246c66),_0x246c66['destroy']();}['refreshVisibility'](){for(const _0x59559c of this['collection'])_0x59559c['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x45e239){return this['collection']['getByInnerView'](_0x45e239);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1602d2 of this['collection'])_0x1602d2['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x573e8a){this['fire']('_activateAnnotation',_0x573e8a);}['createAnnotation'](_0x47d4e9){return new Yt(_0x47d4e9);}['createAnnotationView'](_0x3864a7,_0xd59d02){return new Kt(_0x3864a7,_0xd59d02);}['_addActiveAnnotation'](_0x2dc396){const _0x5609b2=new Set(this['activeAnnotations']);_0x5609b2['add'](_0x2dc396),this['activeAnnotations']=_0x5609b2;}['_removeActiveAnnotation'](_0x1b1a9c){const _0x45e298=new Set(this['activeAnnotations']);_0x45e298['delete'](_0x1b1a9c),this['activeAnnotations']=_0x45e298;}['_bindAnnotationsToVisibleAnnotations'](){const _0x16b75f=this['collection'],_0x2432f4=this['_visibleAnnotations'];function _0x17b5fe(_0x669550){const _0x44ab70=_0x669550['source'];_0x44ab70['isVisible']&&!_0x2432f4['has'](_0x44ab70)?_0x2432f4['add'](_0x44ab70):!_0x44ab70['isVisible']&&_0x2432f4['has'](_0x44ab70)&&_0x2432f4['remove'](_0x44ab70),_0x44ab70['view']['focusTracker']['remove'](_0x44ab70['view']['element']),_0x44ab70['view']['focusTracker']['add'](_0x44ab70['view']['element']);}this['listenTo'](_0x16b75f,'add',(_0xe9df97,_0xe2514b)=>{_0xe2514b['isVisible']&&_0x2432f4['add'](_0xe2514b),this['listenTo'](_0xe2514b,'change:isVisible',_0x17b5fe);}),this['listenTo'](_0x16b75f,'remove',(_0x343505,_0x374002)=>{_0x2432f4['has'](_0x374002)&&_0x2432f4['remove'](_0x374002),this['stopListening'](_0x374002,'change:isVisible',_0x17b5fe);});}['_setupEnterAnnotationKeystroke'](){const _0x27b949=_0x30ebbe=>{_0x30ebbe['on']('ready',()=>{_0x30ebbe['keystrokes']['set'](_0x565a10,(_0x50c945,_0x23a615)=>{const _0xdcd6d1=_0x3bf5c4(this['activeAnnotations']['values']());_0xdcd6d1&&(_0xdcd6d1['view']['focus'](),_0x23a615());});});};this['context']instanceof _0x3bc9ee?_0x27b949(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x35a6d3,_0x1b9987)=>{_0x27b949(_0x1b9987);});}['_setupEscapeAnnotationHandling'](){const _0x15690c=_0x403d2e=>{const _0x284c9f=_0x403d2e['source'],_0xbadf6a=[];let _0x414122;if(Array['isArray'](_0x284c9f['target'])){_0x414122=_0x284c9f['target'][0x0],this['context']instanceof _0x3bc9ee?_0xbadf6a['push'](this['context']):this['context']['editors']&&_0xbadf6a['push'](...this['context']['editors']);for(const _0x3bdf20 of _0xbadf6a)for(const _0x2aab14 of _0x3bdf20['editing']['view']['domRoots']['values']())if(_0x2aab14['contains'](_0x414122))return void _0x3bdf20['editing']['view']['focus']();_0x414122['focus']();}};this['listenTo'](this['collection'],'add',(_0x356bfd,_0x398786)=>{this['listenTo'](_0x398786,'escape',_0x15690c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1c7605,_0x5ecaf6)=>{this['stopListening'](_0x5ecaf6,'escape',_0x15690c);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x3455c6{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x1dbd41,_0x788207];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x223b34){super(_0x223b34),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x19a4c6=this['context']['config'];_0x19a4c6['define']('comments.maxCommentsWhenCollapsed',0x2),_0x19a4c6['define']('comments.maxThreadTotalWeight',0x1f4),_0x19a4c6['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x19a4c6['define']('comments.CommentThreadView',Bt),_0x19a4c6['define']('comments.CommentView',Ut),_0x19a4c6['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1e9e73=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5b6b1c,_0x1370b5)=>this['_addCommentThread'](_0x1370b5)),this['on']('submitCommentThread',(_0x2e34f2,_0x33f27d)=>this['_submitCommentThread'](_0x33f27d)),this['on']('resolveCommentThread',(_0x5b16b2,_0x363b40)=>this['_resolveCommentThread'](_0x363b40)),this['on']('resolveCommentThread',(_0x4229d3,_0x1f7d5a)=>this['_updateActiveAnnotation'](_0x1f7d5a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x582789,_0xfbc27)=>this['_reopenCommentThread'](_0xfbc27)),this['on']('reopenCommentThread',(_0x2aca04,_0x2cabf5)=>this['_updateActiveAnnotation'](_0x2cabf5),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x50febb,_0x1575ee)=>this['_removeCommentThread'](_0x1575ee)),this['on']('updateCommentThread',(_0x3b173b,_0x55ed82)=>this['_updateCommentThread'](_0x55ed82)),this['on']('updateCommentThread',(_0x23559c,_0x4eae89)=>this['_updateActiveAnnotation'](_0x4eae89),{'priority':'lowest'}),this['on']('addComment',(_0x34129a,_0x27333d)=>this['_addComment'](_0x27333d)),this['on']('updateComment',(_0x3e79d9,_0x3c91c2)=>this['_updateComment'](_0x3c91c2)),this['on']('removeComment',(_0x1e8bf3,_0x13dc0d)=>this['_removeComment'](_0x13dc0d)),this['on']('addComment',(_0x3faea0,{threadId:_0x16544b,isFromAdapter:_0x1ba06b})=>{if(_0x1ba06b)return;const _0x5e4109=this['getCommentThread'](_0x16544b),_0x9255c7=_0x5e4109&&this['_threadToController']['get'](_0x5e4109);_0x9255c7&&_0x9255c7['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1e9e73,'change:activeAnnotations',(_0x2f677d,_0x4ab559,_0x14c6e5)=>{const _0x51f26f=Array['from'](_0x14c6e5)['map'](_0x535c0e=>this['_viewToController']['get'](_0x535c0e['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x51f26f?_0x51f26f['model']:null;});}set['adapter'](_0x52f0ac){if(this['_adapter'])throw new _0x5a6372('commentsrepository-adapter-already-set');this['_adapter']=_0x52f0ac;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5722ff=zt,threadId:_0x1848f0=_0x53cf7b(),comments:_0x5609ac=[],unlinkedAt:_0x391b8e=null,resolvedAt:_0xbb4ef5=null,resolvedBy:_0x50d7b2=null,target:_0x3da203=null,context:_0x50f8ca=null,attributes:_0x37bbe4={},isResolvable:_0x52e2c4=!0x0,isSubmitted:_0x1d49ea=!0x1,isFromAdapter:_0x51b487=!0x1}={}){return this['fire'](ii('addCommentThread',_0x5722ff),{'channelId':_0x5722ff,'threadId':_0x1848f0,'comments':_0x5609ac,'unlinkedAt':_0x391b8e,'resolvedAt':_0xbb4ef5,'resolvedBy':_0x50d7b2,'target':_0x3da203,'context':_0x50f8ca,'attributes':_0x37bbe4,'isFromAdapter':_0x51b487,'isResolvable':_0x52e2c4,'isSubmitted':_0x1d49ea}),this['getCommentThread'](_0x1848f0);}['openNewCommentThread']({channelId:_0xdc714d=zt,threadId:_0x4438b5=_0x53cf7b(),target:_0x5e1dfe,context:_0x26f9a8=null,isResolvable:_0x397cd5=!0x0}){if(this['_readOnlyChannels']['has'](_0xdc714d)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5e1dfe)throw new _0x5a6372('commentsrepository-missing-target');const _0x5a5140=this['addCommentThread']({'channelId':_0xdc714d,'threadId':_0x4438b5,'target':_0x5e1dfe,'context':_0x26f9a8,'isResolvable':_0x397cd5});if(!_0x5a5140)return null;const _0x46ed35=this['_threadToController']['get'](_0x5a5140),_0x2fa5e5=_0x46ed35['view']['commentThreadInputView']['commentInputView'],_0x57d360=this['context']['plugins']['get']($t),_0x5b3c03=_0x57d360['getByInnerView'](_0x46ed35['view']);return _0x57d360['activate'](_0x5b3c03),_0x2fa5e5['once']('editorReady',()=>_0x2fa5e5['focus']()),_0x5a5140;}['hasCommentThread'](_0xcf9cb4){if('string'!=typeof _0xcf9cb4)throw new _0x5a6372('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xcf9cb4);}['updateCommentThread']({channelId:_0x4ecb12=zt,threadId:_0x3591ba,context:_0xffa163,unlinkedAt:_0x1d5c29,attributes:_0x40d8c7,isFromAdapter:_0x48465f=!0x1}){return this['fire'](ii('updateCommentThread',_0x4ecb12),{'channelId':_0x4ecb12,'threadId':_0x3591ba,'context':_0xffa163,'unlinkedAt':_0x1d5c29,'attributes':_0x40d8c7,'isFromAdapter':_0x48465f}),this['getCommentThread'](_0x3591ba);}['getCommentThread'](_0x3a1dff){if('string'!=typeof _0x3a1dff)throw new _0x5a6372('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3a1dff);}['fetchCommentThread']({channelId:_0x4b98d1,threadId:_0x38e459}={}){const _0x1cf7c7=this['getCommentThread'](_0x38e459);if(_0x1cf7c7)return Promise['resolve'](_0x1cf7c7);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5a6372('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4b98d1,'threadId':_0x38e459})['then'](_0xd32427=>this['hasCommentThread'](_0x38e459)?this['getCommentThread'](_0x38e459):_0xd32427?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4b98d1},_0xd32427)):void 0x0)['catch'](_0xe4d651=>{throw console['error'](_0xe4d651),new _0x5a6372('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x27816b,skipNotAttached:_0x32b2c5=!0x1,skipEmpty:_0x20a3a1=!0x1,toJSON:_0x50d51a=!0x1}={}){const _0x3ca756=[];for(const _0x55a179 of this['_threads']['values']())_0x27816b&&_0x55a179['channelId']!==_0x27816b||_0x32b2c5&&!_0x55a179['isAttached']||_0x20a3a1&&0x0===_0x55a179['length']||_0x3ca756['push'](_0x55a179);return _0x50d51a?_0x3ca756['map'](_0x10607f=>_0x10607f['toJSON']()):_0x3ca756;}['getAnnotationForCommentThread'](_0x1b1bb7){const _0x44888b=this['_threadToController']['get'](_0x1b1bb7);if(!_0x44888b)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x44888b['view'])||null;}['getCommentThreadForAnnotation'](_0x55d2d4){const _0x511c10=this['_viewToController']['get'](_0x55d2d4['innerView']);return _0x511c10?_0x511c10['model']:null;}['setActiveCommentThread'](_0x4604d0){const _0x47a54a=this['context']['plugins']['get']($t);if(!_0x4604d0)return void(this['activeCommentThread']&&_0x47a54a['deactivateAll']());const _0x4ffa4e=this['getCommentThread'](_0x4604d0);if(!_0x4ffa4e)throw new _0x5a6372('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4604d0});if(!this['_threadToController']['has'](_0x4ffa4e))throw new _0x5a6372('commentsrepository-active-not-attached',null,{'threadId':_0x4604d0});const _0x3b8c06=_0x47a54a['getByInnerView'](this['_threadToController']['get'](_0x4ffa4e)['view']);_0x47a54a['activate'](_0x3b8c06);}['switchReadOnly'](_0x8dca87,_0x50d71a){_0x8dca87?this['_readOnlyChannels']['add'](_0x50d71a):this['_readOnlyChannels']['delete'](_0x50d71a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x480487){return this['_readOnlyChannels']['has'](_0x480487)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x54566e,_0x407fdb){return new It(_0x54566e,_0x407fdb);}['setPermissions'](_0x4814e9,_0x56e969=zt){this['_permissions']['set'](_0x56e969,_0x4814e9),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1141bc=zt){return this['_permissions']['has'](_0x1141bc)?this['_permissions']['get'](_0x1141bc):Jt;}['_addCommentThread']({channelId:_0x4444c1,threadId:_0xe869d5,comments:_0x29ede5,unlinkedAt:_0x1c756b,resolvedAt:_0x4bed14,resolvedBy:_0x376666,target:_0x20f189,context:_0x53dacd,attributes:_0x3d2563,isFromAdapter:_0x498934,isResolvable:_0x48e6ca,isSubmitted:_0x4d239d}){if('string'!=typeof _0xe869d5)throw new _0x5a6372('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xe869d5});if(this['hasCommentThread'](_0xe869d5))throw new _0x5a6372('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xe869d5});const _0x31e815=new Zt(this,{'channelId':_0x4444c1,'id':_0xe869d5,'context':_0x53dacd,'attributes':_0x3d2563,'unlinkedAt':_0x1c756b,'resolvedAt':_0x4bed14,'resolvedBy':_0x376666?this['context']['plugins']['get'](_0x788207)['getUser'](_0x376666):null,'isResolvable':_0x48e6ca,'isSubmitted':_0x4d239d||_0x498934});this['_threads']['set'](_0xe869d5,_0x31e815);for(const _0x5d3889 of _0x29ede5)_0x31e815['_add'](this['_createNewComment']({'threadId':_0xe869d5,..._0x5d3889}));return _0x20f189&&_0x31e815['attachTo'](_0x20f189),_0x498934||!_0x31e815['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4444c1,'threadId':_0xe869d5});}['_submitCommentThread']({channelId:_0x50fccd,threadId:_0x174129}){if(!this['hasCommentThread'](_0x174129))throw new _0x5a6372('commentsrepository-missing-comment-thread',this);const _0x5e7f74=this['getCommentThread'](_0x174129);if(_0x5e7f74['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5230c8,comments:_0x48576d,resolvedAt:_0x5affa4,resolvedBy:_0xabdc56,context:_0x4db0a7,attributes:_0x5655f4}=_0x5e7f74,_0x429cbf=this['context']['plugins']['get']('PendingActions'),_0x598853=_0x429cbf['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x50fccd,'threadId':_0x5230c8,'comments':_0x48576d['map'](_0x4ea712=>_0x4ea712['toJSON']()),'resolvedAt':_0x5affa4,'resolvedBy':_0xabdc56?_0xabdc56['id']:_0xabdc56,'context':_0x4db0a7,'attributes':_0x5655f4})['then'](({comments:_0x13d333})=>{_0x429cbf['remove'](_0x598853);for(const _0x4b24eb of _0x13d333)this['_updateComment']({'channelId':_0x50fccd,'threadId':_0x174129,'commentId':_0x4b24eb['commentId'],'createdAt':_0x4b24eb['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xe447d1=>{throw console['error'](_0xe447d1),new _0x5a6372('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x3788e6,target:_0x5096e6}){const _0x17a725=this['getCommentThread'](_0x3788e6);if(!_0x17a725)throw new _0x5a6372('commentsrepository-attach-missing-comment-thread',this);const _0x53352e=this['context']['plugins']['get']('PendingActions'),_0x4e797f=this['context']['plugins']['get']($t),_0x55dfaf=this['_createCommentThreadView'](_0x17a725),_0xaab308=new It(_0x17a725,_0x55dfaf);let _0x1add33=null;_0x55dfaf['on']('change:isDirty',(_0x7ed9a,_0x53fdc9,_0x5c4b08)=>{_0x5c4b08?_0x1add33=_0x53352e['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1add33&&(_0x53352e['remove'](_0x1add33),_0x1add33=null);}),this['_threadToController']['set'](_0x17a725,_0xaab308),this['_viewToController']['set'](_0x55dfaf,_0xaab308);const _0x2f29ea=new Kt(this['context']['locale'],_0x55dfaf);_0x2f29ea['bind']('length')['to'](_0x55dfaf),_0x2f29ea['bind']('isDirty')['to'](_0x55dfaf,'isDirty',_0x55dfaf,'length',(_0x5dcab7,_0x1f2e12)=>_0x5dcab7||!_0x1f2e12),_0x2f29ea['bind']('isActive')['to'](_0x55dfaf),_0x2f29ea['type']='comment';const _0x49ea14=new Yt({'view':_0x2f29ea,'target':_0x5096e6,'type':'comment','isVisible':!_0x17a725['archivedAt']&&!!('function'==typeof _0x5096e6?_0x5096e6():_0x5096e6)});return _0x55dfaf['on']('escape',()=>{_0x49ea14['fire']('escape');}),this['_bindAnnotationToEditors'](_0x55dfaf,_0x49ea14),_0x4e797f['add'](_0x49ea14),_0x49ea14;}['_bindAnnotationToEditors'](_0x580e11,_0x39edbd){this['listenTo'](_0x580e11,'editorReady',(_0x2a5d23,_0x4a2ca3)=>{const _0x4df7d0=_0x4a2ca3['ui']['view']['body']['bodyCollectionContainer'];_0x39edbd['focusableElements']['add'](_0x4df7d0),this['context']instanceof _0x3bc9ee&&this['context']['ui']['focusTracker']['add'](_0x4df7d0);},{'priority':'highest'}),this['listenTo'](_0x580e11,'editorDestroyed',(_0x15c31b,_0x4f9ffc)=>{const _0x1c09aa=_0x4f9ffc['ui']['view']['body']['bodyCollectionContainer'];_0x39edbd['focusableElements']['has'](_0x1c09aa)&&_0x39edbd['focusableElements']['remove'](_0x1c09aa),this['context']instanceof _0x3bc9ee&&this['context']['ui']['focusTracker']['remove'](_0x1c09aa);});}['_unbindEditors'](_0x447289){this['stopListening'](_0x447289,'editorReady'),this['stopListening'](_0x447289,'editorDestroyed');}['_createCommentThreadView'](_0xa3d3a6){const _0x5e26df=this['context']['plugins']['get'](_0x788207),{config:_0x34d613,locale:_0x39ead6}=this['context'],_0x27e6e7=_0x46a3b6(_0x34d613['get']('locale'),_0x39ead6);return new(0x0,(_0x34d613['get']('comments'))['CommentThreadView'])(_0x39ead6,_0xa3d3a6,_0x5e26df['me'],{'editorConfig':{..._0x34d613['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x34d613['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x34d613['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x34d613['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x34d613['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x27e6e7,'CommentView':_0x34d613['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x20e346,channelId:_0x271e93,resolvedAt:_0x1862e2,resolvedBy:_0x13eec7,isFromAdapter:_0x1532c3}){if(!this['hasCommentThread'](_0x20e346))throw new _0x5a6372('commentsrepository-missing-comment-thread',null,{'threadId':_0x20e346});const _0x40d1b8=this['getCommentThread'](_0x20e346);if(_0x40d1b8['isResolved'])throw new _0x5a6372('commentsrepository-resolved-comment-thread',null,{'threadId':_0x20e346});const _0xe4986=this['context']['plugins']['get'](_0x788207);if(_0x40d1b8['resolvedBy']=_0xe4986['getUser'](_0x13eec7),_0x40d1b8['resolvedAt']=_0x1862e2,_0x1532c3||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4a4626=this['context']['plugins']['get']('PendingActions'),_0x288057=_0x4a4626['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x271e93,'threadId':_0x20e346})['then'](({resolvedAt:_0x1ebfae,resolvedBy:_0x195b10})=>{_0x4a4626['remove'](_0x288057),_0x40d1b8['resolvedBy']['id']!==_0x195b10&&(_0x40d1b8['resolvedBy']=_0xe4986['getUser'](_0x195b10)),_0x40d1b8['resolvedAt']=_0x1ebfae;})['catch'](_0x5a3024=>{throw console['error'](_0x5a3024),new _0x5a6372('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x35c3e7,channelId:_0x1c6cdf,isFromAdapter:_0xe5e0ba}){if(!this['hasCommentThread'](_0x35c3e7))throw new _0x5a6372('commentsrepository-missing-comment-thread',null,{'threadId':_0x35c3e7});const _0x1f7db8=this['getCommentThread'](_0x35c3e7);if(!_0x1f7db8['isResolved'])throw new _0x5a6372('commentsrepository-reopen-comment-thread',null,{'threadId':_0x35c3e7});if(_0x1f7db8['resolvedBy']=null,_0x1f7db8['resolvedAt']=null,_0xe5e0ba||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x36f1e2=this['context']['plugins']['get']('PendingActions'),_0x3b4acd=_0x36f1e2['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1c6cdf,'threadId':_0x35c3e7})['then'](()=>_0x36f1e2['remove'](_0x3b4acd))['catch'](_0x46c28d=>{throw console['error'](_0x46c28d),new _0x5a6372('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x512196,isFromAdapter:_0x1a5c18}){const _0x4d2400=this['getCommentThread'](_0x512196);if(!_0x4d2400)throw new _0x5a6372('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x512196),this['_threads']['delete'](_0x512196),!_0x4d2400['isSubmitted']||_0x1a5c18||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x41838f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x486217}=_0x4d2400,_0x4219d1=_0x41838f['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x486217,'threadId':_0x512196})['then'](()=>_0x41838f['remove'](_0x4219d1))['catch'](_0x3626d9=>{throw console['error'](_0x3626d9),new _0x5a6372('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x294548,unlinkedAt:_0x4bf4c4,context:_0x29987e,attributes:_0x3953d9,isFromAdapter:_0x4d72de}){if('string'!=typeof _0x294548)throw new _0x5a6372('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x294548});if(!this['hasCommentThread'](_0x294548))throw new _0x5a6372('commentsrepository-missing-comment-thread',null,{'threadId':_0x294548});const _0x56abdb=this['getCommentThread'](_0x294548);let _0x510630=!0x1;if(void 0x0!==_0x29987e&&_0x56abdb['context']!==_0x29987e&&(_0x56abdb['context']=_0x29987e,_0x510630=!0x0),void 0x0!==_0x4bf4c4&&_0x56abdb['unlinkedAt']!==_0x4bf4c4&&(_0x56abdb['unlinkedAt']=_0x4bf4c4,_0x510630=!0x0),_0x3953d9&&!_0x4f39af(_0x3953d9,_0x56abdb['attributes'])&&(_0x56abdb['attributes']=_0x3953d9,_0x510630=!0x0),!_0x510630)return Promise['resolve']();if(!_0x56abdb['isSubmitted']||_0x4d72de||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x137cd9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x98bb91}=_0x56abdb,_0x10cba9=_0x137cd9['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x98bb91,'threadId':_0x294548,'context':_0x29987e,'unlinkedAt':_0x4bf4c4,'attributes':_0x3953d9})['then'](()=>_0x137cd9['remove'](_0x10cba9))['catch'](_0x3a1fbd=>{throw console['error'](_0x3a1fbd),new _0x5a6372('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x40424b){const _0x925a75=this['context']['plugins']['get']($t),_0x411358=this['getCommentThread'](_0x40424b);if(_0x411358['_isAttached']=!0x1,this['_threadToController']['has'](_0x411358)){const _0x2534ea=this['_threadToController']['get'](_0x411358),_0x8fa245=_0x2534ea['view'],_0x3b6d6b=_0x925a75['getByInnerView'](_0x8fa245);this['_threadToController']['delete'](_0x411358),this['_viewToController']['delete'](_0x8fa245),_0x3b6d6b&&_0x925a75['remove'](_0x3b6d6b),_0x2534ea['destroy'](),_0x8fa245['destroy']()['then'](()=>{this['_unbindEditors'](_0x8fa245);});}}['_updateActiveAnnotation']({threadId:_0x53dc1b,resolvedAt:_0x52f063,unlinkedAt:_0x320dc6}){const _0x4c6d12=!!_0x52f063,_0x1b0d49=this['context']['plugins']['get']($t),_0x325450=this['getCommentThread'](_0x53dc1b);if(this['_threadToController']['has'](_0x325450)){const _0x4d93c7=this['_threadToController']['get'](_0x325450)['view'],_0x530cb3=_0x1b0d49['getByInnerView'](_0x4d93c7);_0x530cb3&&(_0x4c6d12&&_0x1b0d49['_removeActiveAnnotation'](_0x530cb3),_0x320dc6?_0x530cb3['isVisible']=!0x1:_0x530cb3['refreshVisibility']());}}['_getExternalAuthor'](_0xc7968a){const _0x1470ad=this['context']['plugins']['get'](_0x788207),_0x5a2fcb=_0x43d269('external:'+_0xc7968a),_0x10af67=_0x1470ad['getUser'](_0x5a2fcb);return _0x10af67||_0x1470ad['addUser']({'id':_0x5a2fcb,'name':_0xc7968a});}['_createNewComment']({threadId:_0x5b35e2,commentId:_0x2cdb05=_0x53cf7b(),content:_0xc7b261,authorId:_0x3f4c82,createdAt:_0x2c949c,attributes:_0x33a4dc}){if('string'!=typeof _0x2cdb05)throw new _0x5a6372('commentsrepository-invalid-commentid');if('string'!=typeof _0x3f4c82)throw new _0x5a6372('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xc7b261||!_0xc7b261['trim']())throw new _0x5a6372('commentsrepository-invalid-comment-content');const _0x5189e5=this['context']['plugins']['get'](_0x788207)['getUser'](_0x3f4c82);if(!_0x5189e5)throw new _0x5a6372('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3f4c82});let _0x31e299=null,_0x20fb16=_0x2c949c;return _0x33a4dc?.['@external']&&(_0x31e299=this['_getExternalAuthor'](_0x33a4dc['@external']['authorName']),_0x20fb16=new Date(_0x33a4dc['@external']['createdAt'])),new ti(this,{'threadId':_0x5b35e2,'id':_0x2cdb05,'author':_0x31e299||_0x5189e5,'creator':_0x5189e5,'content':_0xc7b261,'createdAt':_0x2c949c,'authoredAt':_0x20fb16,'attributes':_0x33a4dc});}['_addComment'](_0x3c0c61){let {threadId:_0x539a77,content:_0xd68a28,attributes:_0x596f20,isFromAdapter:_0x40eafd}=_0x3c0c61;const _0x42a871=this['getCommentThread'](_0x3c0c61['threadId']);if(!_0x42a871)throw new _0x5a6372('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5761c=this['_createNewComment'](_0x3c0c61),{id:_0x4f10c8}=_0x5761c;if(_0x42a871['_add'](_0x5761c),_0x40eafd||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x42a871['isSubmitted'])return Promise['resolve']();const _0x2bca74=this['context']['plugins']['get']('PendingActions'),{channelId:_0x388dd8}=_0x42a871,_0x5b7f40=_0x2bca74['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x596f20||(_0x596f20={}),this['adapter']['addComment']({'channelId':_0x388dd8,'threadId':_0x539a77,'commentId':_0x4f10c8,'content':_0xd68a28,'attributes':_0x596f20})['then'](_0x32b829=>{_0x2bca74['remove'](_0x5b7f40),_0x32b829&&this['_updateComment']({'channelId':_0x388dd8,'threadId':_0x539a77,'commentId':_0x4f10c8,'createdAt':_0x32b829['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x189e07=>{throw console['error'](_0x189e07),new _0x5a6372('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x57f1ab,commentId:_0x298c58,content:_0x3d37af,createdAt:_0x731370,attributes:_0x3e5360,isFromAdapter:_0x8a9d8c}){if(void 0x0!==_0x3d37af&&('string'!=typeof _0x3d37af||!_0x3d37af['trim']()['length']))throw new _0x5a6372('commentsrepository-update-comment-invalid-content');const _0x58aaf7=this['getCommentThread'](_0x57f1ab),_0x2779cf=_0x58aaf7['getComment'](_0x298c58);if(!_0x2779cf)throw new _0x5a6372('commentsrepository-update-missing-comment',this);let _0x5eab5a=!0x1;if(_0x3d37af&&_0x3d37af!==_0x2779cf['content']&&(_0x2779cf['isEditable']||_0x8a9d8c)&&(_0x2779cf['content']=_0x3d37af,_0x5eab5a=!0x0),_0x731370&&_0x731370!==_0x2779cf['createdAt']&&(_0x2779cf['createdAt']=_0x731370,_0x2779cf['attributes']&&_0x2779cf['attributes']['@external']||(_0x2779cf['authoredAt']=_0x731370),_0x5eab5a=!0x0),_0x3e5360&&!_0x4f39af(_0x3e5360,_0x2779cf['attributes'])&&(_0x2779cf['attributes']=_0x3e5360,_0x5eab5a=!0x0),!_0x5eab5a)return Promise['resolve']();if(_0x58aaf7['fire']('commentUpdated'),_0x8a9d8c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x485877=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1b3bf1}=this['getCommentThread'](_0x2779cf['threadId']),_0x2db892=_0x485877['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1b3bf1,'threadId':_0x57f1ab,'commentId':_0x298c58,'content':_0x3d37af,'attributes':_0x3e5360})['then'](()=>_0x485877['remove'](_0x2db892))['catch'](_0x294433=>{throw console['error'](_0x294433),new _0x5a6372('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5a965d,commentId:_0x4be108,isFromAdapter:_0x3d7620}){const _0xbf653a=this['getCommentThread'](_0x5a965d),_0x39b033=_0xbf653a['getComment'](_0x4be108);if(!_0x39b033)throw new _0x5a6372('commentsrepository-remove-missing-comment',this);if(_0xbf653a['_remove'](_0x39b033),_0x3d7620||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x11d00b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x530c04}=_0xbf653a,_0x1a252f=_0x11d00b['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x530c04,'threadId':_0x5a965d,'commentId':_0x4be108})['then'](()=>_0x11d00b['remove'](_0x1a252f))['catch'](_0x1d09a6=>{throw console['error'](_0x1d09a6),new _0x5a6372('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
30
- _0x353416(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x28375f,_0xc34661){super();const _0x383e46=_0xc34661['isResolvable'];this['channelId']=_0xc34661['channelId'],this['id']=_0xc34661['id'],this['comments']=new _0x2905f3(),this['_repository']=_0x28375f,this['_isAttached']=!0x1,this['_isSubmitted']=_0xc34661['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x28375f,'_permissions',_0x28375f,'_readOnlyChannels',()=>_0x28375f['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x28375f,'_permissions',()=>_0x28375f['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x28375f,'_permissions',()=>{const _0x1c84f0=_0x28375f['getPermissions'](this['channelId']);return _0x1c84f0['write']||_0x1c84f0['admin'];}),this['bind']('isResolvable')['to'](_0x28375f,'_permissions',()=>_0x383e46&&_0x28375f['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xc34661['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5c7850,_0x42f8f2)=>_0x5c7850?_0x42f8f2?_0x5c7850<_0x42f8f2?_0x5c7850:_0x42f8f2:_0x5c7850:_0x42f8f2),this['set']('unlinkedAt',_0xc34661['unlinkedAt']||null),this['set']('resolvedAt',_0xc34661['resolvedAt']||null),this['set']('resolvedBy',_0xc34661['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5b0cd3=>!!_0x5b0cd3),this['set']('attributes',_0xc34661['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x3455e8,_0x490909)=>_0x3455e8+_0x490909['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x49c96e,id:_0x2a57d7}=this;this['_repository']['fire'](ii('submitCommentThread',_0x49c96e),{'channelId':_0x49c96e,'threadId':_0x2a57d7});}['setUnlinkedAt'](_0x333a47){this['_update']({'unlinkedAt':_0x333a47});}['resolve']({resolvedAt:_0x5221a3=new Date(),resolvedBy:_0x9af8f3='',isFromAdapter:_0x16e1fd=!0x1}={}){const _0x17368d=this['_repository']['context']['plugins']['get'](_0x788207)['me'],{channelId:_0x24cc0c,id:_0x2e73a5}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x24cc0c),{'channelId':_0x24cc0c,'threadId':_0x2e73a5,'resolvedAt':_0x5221a3,'resolvedBy':_0x9af8f3||_0x17368d['id'],'isFromAdapter':_0x16e1fd});}['reopen']({isFromAdapter:_0x15e05f=!0x1}={}){const {channelId:_0x298ea3,id:_0x562091}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x298ea3),{'channelId':_0x298ea3,'threadId':_0x562091,'isFromAdapter':_0x15e05f});}['setContext'](_0x1c495d){this['context']||this['_update']({'context':_0x1c495d});}['setAttribute'](_0x3bba44,_0x16e258){const _0x28a046=_0x1da91b(this['attributes']);_0x32d5ae(_0x28a046,_0x3bba44,_0x16e258),this['_update']({'attributes':_0x28a046});}['removeAttribute'](_0x4ea39e){const _0x101d36=_0x1da91b(this['attributes']);_0x17ccfb(_0x101d36,_0x4ea39e),this['_update']({'attributes':_0x101d36});}['remove']({isFromAdapter:_0x5877c9=!0x1}={}){const {channelId:_0x3baf21,id:_0x494c95}=this;this['_repository']['fire'](ii('removeCommentThread',_0x3baf21),{'channelId':_0x3baf21,'threadId':_0x494c95,'isFromAdapter':_0x5877c9});}['attachTo'](_0x5acb03){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x5acb03});}['addComment'](_0x176b99){const {channelId:_0x1adfec,id:_0x553f34}=this;this['_repository']['fire'](ii('addComment',_0x1adfec,_0x553f34),Object['assign']({'channelId':_0x1adfec,'threadId':_0x553f34},_0x176b99));}['getComment'](_0x1f9e67){if('string'!=typeof _0x1f9e67)throw new _0x5a6372('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x1f9e67});return this['comments']['get'](_0x1f9e67);}['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'](_0x4b3597=>_0x4b3597['toJSON']()),'attributes':this['attributes']};}['_add'](_0x40950){return this['listenTo'](_0x40950,'change:authoredAt',()=>{const _0x2ac9b5=this['_findOptimalIndex'](_0x40950),_0x311eff=this['comments'];_0x2ac9b5-0x1!=_0x311eff['getIndex'](_0x40950)&&_0x2ac9b5+0x1!=_0x311eff['getIndex'](_0x40950)&&(this['_remove'](_0x40950),this['_add'](_0x40950));}),this['comments']['add'](_0x40950,this['_findOptimalIndex'](_0x40950));}['_update'](_0x2b6088){const {channelId:_0xdfd64c,id:_0x463cb2}=this;this['_repository']['fire'](ii('updateCommentThread',_0xdfd64c),{..._0x2b6088,'channelId':_0xdfd64c,'threadId':_0x463cb2});}['_remove'](_0x5adf20){return this['stopListening'](_0x5adf20),_0x5adf20['destroy'](),this['comments']['remove'](_0x5adf20);}['_findOptimalIndex'](_0x7fec8d){const _0x1fb964=this['comments']['find'](_0x237e13=>new Date(_0x237e13['authoredAt'])['getTime']()>new Date(_0x7fec8d['authoredAt'])['getTime']());return _0x1fb964?this['comments']['getIndex'](_0x1fb964):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
31
- _0x353416(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x43d9ce,_0x5b1d08){super();const _0x1692ab=_0x43d9ce['context']['plugins']['get'](_0x788207)['me'],_0xed8d6a=_0x43d9ce['getCommentThread'](_0x5b1d08['threadId']),_0x1e7f60=0x0===_0xed8d6a['comments']['length'],_0x42ebfd=_0x1692ab===_0x5b1d08['author'];this['id']=_0x5b1d08['id'],this['threadId']=_0x5b1d08['threadId'],this['author']=_0x5b1d08['author'],this['creator']=_0x5b1d08['creator'],this['isExternal']=Boolean(_0x5b1d08['attributes']&&_0x5b1d08['attributes']['@external']),this['set']('content',_0x5b1d08['content']),this['createdAt']=_0x5b1d08['createdAt']||new Date(),this['set']('authoredAt',_0x5b1d08['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xed8d6a,'resolvedAt'),this['set']('attributes',_0x5b1d08['attributes']||{}),this['bind']('isEditable')['to'](_0x43d9ce,'_permissions',()=>{const _0x1f3f8b=_0x43d9ce['getPermissions'](_0xed8d6a['channelId'])['write'],_0x5ea4a3=_0x43d9ce['getPermissions'](_0xed8d6a['channelId'])['modifyAll'];return _0x42ebfd&&_0x1f3f8b||!_0x42ebfd&&_0x5ea4a3;}),this['bind']('isRemovable')['to'](_0xed8d6a,'isRemovable',_0x43d9ce,'_permissions',_0x410761=>{const _0x590c0c=_0x43d9ce['getPermissions'](_0xed8d6a['channelId'])['write'],_0xbe35f9=_0x43d9ce['getPermissions'](_0xed8d6a['channelId'])['modifyAll'];return _0x42ebfd&&_0x590c0c||_0x410761&&_0x1e7f60||!_0x42ebfd&&_0xbe35f9&&!_0x1e7f60;}),this['bind']('isReadOnly')['to'](_0xed8d6a,'isReadOnly'),this['_repository']=_0x43d9ce;}get['weight'](){return Math['max'](function(_0x50f326){const _0x17ab54=document['createElement']('div');return _0x17ab54['innerHTML']=_0x50f326,_0x17ab54['textContent']['length'];}(this['content']),0xc8);}['update'](_0x38c114){const {threadId:_0x4baef1,id:_0xf36746}=this;if(!this['_repository']['hasCommentThread'](_0x4baef1))throw new _0x5a6372('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xac3b30}=this['_repository']['getCommentThread'](_0x4baef1);this['_repository']['fire'](ii('updateComment',_0xac3b30,_0x4baef1),{'channelId':_0xac3b30,'threadId':_0x4baef1,'commentId':_0xf36746,..._0x38c114});}['setAttribute'](_0x1d182b,_0x20c12b){const _0x4f6b9e=_0x1da91b(this['attributes']);_0x32d5ae(_0x4f6b9e,_0x1d182b,_0x20c12b),this['update']({'attributes':_0x4f6b9e});}['removeAttribute'](_0x201493){const _0x5c8175=_0x1da91b(this['attributes']);_0x17ccfb(_0x5c8175,_0x201493),this['update']({'attributes':_0x5c8175});}['remove'](_0x320a4e={}){if(!_0x320a4e['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3ad931,id:_0x4e94e2}=this;if(!this['_repository']['hasCommentThread'](_0x3ad931))throw new _0x5a6372('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4f2ef1}=this['_repository']['getCommentThread'](_0x3ad931);this['_repository']['fire'](ii('removeComment',_0x4f2ef1,_0x3ad931),{'channelId':_0x4f2ef1,'threadId':_0x3ad931,'commentId':_0x4e94e2,..._0x320a4e});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x56e6b9,..._0x3cf9a4){for(const _0x45ea24 of _0x3cf9a4)void 0x0!==_0x45ea24&&(_0x56e6b9+=':'+String(_0x45ea24));return _0x56e6b9;}class ei extends _0x28c190{constructor(_0x5d4909){super(_0x5d4909),this['set']('hasContent',!0x1);}['refresh'](){const _0x63f671=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x1aa963 of _0x63f671['getRanges']())if(this['_hasContent'](_0x1aa963))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x57b7b7=_0x53cf7b(),ranges:_0x2ff0ee,comment:_0x48a3a6}={}){const _0x4ce298=this['editor']['model'],_0x11131b=_0x2ff0ee??Array['from'](_0x4ce298['document']['selection']['getRanges']()),_0x35bdb5=[];for(const _0x4b17b7 of _0x11131b)this['_hasContent'](_0x4b17b7)&&_0x35bdb5['push'](this['_trimToContent'](_0x4b17b7));if(!_0x35bdb5['length'])throw new _0x5a6372('addcommentthreadcommand-incorrect-ranges',null);_0x48a3a6&&this['_createCommentThread'](_0x57b7b7,_0x48a3a6),this['_createMarkersFromRanges'](_0x57b7b7,_0x35bdb5,!!_0x48a3a6);}['_createMarkersFromRanges'](_0x208a2a,_0x349513,_0x23b1a0){this['editor']['model']['change'](_0x1fda84=>{for(const _0xb7f79f of _0x349513){const _0x171bbb=_0x53cf7b()['substr'](0x1,0x5),_0x3680ce='comment:'+_0x208a2a+':'+_0x171bbb;_0x1fda84['addMarker'](_0x3680ce,{'range':_0xb7f79f,'usingOperation':_0x23b1a0,'affectsData':_0x23b1a0});}});}['_createCommentThread'](_0x2c0059,_0x163d7d){const _0x4f53ac=this['editor']['plugins']['get']('CommentsRepository'),_0x55df8a=this['editor']['config']['get']('collaboration.channelId'),_0x2e1a84=this['editor']['plugins']['get']('Users')['me'];if(!_0x2e1a84)throw new _0x5a6372('addcommentthreadcommand-user-not-found',null);_0x4f53ac['addCommentThread']({'threadId':_0x2c0059,'channelId':_0x55df8a,'comments':[{'authorId':_0x2e1a84['id'],'content':_0x163d7d,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0xa1104e){for(const _0x42feaf of _0xa1104e['getItems']())if(this['_itemIsContent'](_0x42feaf))return!0x0;return!0x1;}['_itemIsContent'](_0x345b2f){return _0x345b2f['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x345b2f)&&!_0x345b2f['is']('element','tableCell');}['_trimToContent'](_0x1000db){const _0x4c327f=_0x400e71=>!this['_itemIsContent'](_0x400e71['item']),_0x3aa03b=_0x1000db['start']['getLastMatchingPosition'](_0x4c327f),_0x479ac5=_0x1000db['end']['getLastMatchingPosition'](_0x4c327f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3aa03b,_0x479ac5);}}class si extends _0x26a1e4{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xfcea67){super(_0xfcea67),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x8489d5=this['editor'],_0x22f5cf=_0x8489d5['model']['document']['selection'],_0xb24a6f=_0x21b888(()=>this['refreshSelectedViews'](),0xa);_0x22f5cf['on']('change:range',(_0x1dc319,_0x262c2b)=>{_0x262c2b['directChange']&&(_0xb24a6f['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x8489d5['editing']['view']['document'],'change:isFocused',(_0x9d87cf,_0x19e2e7,_0x1612ca)=>{_0x1612ca&&_0xb24a6f();}),this['listenTo'](_0x8489d5['ui']['focusTracker'],'change:isFocused',(_0x111a52,_0x633c6d,_0x5d0eb6)=>{_0x5d0eb6||this['fire']('blur',{'isAnnotationTracked':_0x8ba9b4=>this['_editorAnnotationsData']['has'](_0x8ba9b4['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x45d157){if(this['_editorAnnotations']['has'](_0x45d157['view']))return;this['_editorAnnotations']['add'](_0x45d157['view']),this['editor']['ui']['focusTracker']['add'](_0x45d157['view']['element']);const _0x4f6a53=this['editor']['plugins']['get']($t);this['listenTo'](_0x4f6a53['collection'],'remove',(_0x5a803f,_0x39b11f)=>{this['editor']['ui']['focusTracker']['remove'](_0x39b11f['view']['element']),this['_editorAnnotations']['delete'](_0x39b11f['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xf697ed){if('function'!=typeof _0xf697ed)throw new _0x5a6372('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xf697ed);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x293b1d,annotations:_0x4b6b8d}){const _0x34889b=[],_0x21f1cb=this['editor']['model']['document']['selection'],_0x9c0914=Array['from'](_0x21f1cb['getRanges']());for(const [_0x4b070c,_0x5473b5]of this['_editorAnnotationsData']){const _0x38ebe8=_0x5b3592(_0x5473b5),_0x19fae1=_0x4b6b8d['getByInnerView'](_0x4b070c);_0x38ebe8&&_0x19fae1&&_0x34889b['push']({'annotation':_0x19fae1,'range':_0x38ebe8});}function _0x5b3592(_0x1db3c2){for(const _0x5a5959 of _0x1db3c2)for(const _0x50381c of _0x9c0914)if(_0x5a5959['containsRange'](_0x50381c,!_0x21f1cb['isCollapsed']))return _0x5a5959;return null;}return _0x34889b['sort']((_0x2ec355,_0x5685ce)=>{const _0x53b500=_0x2ec355['range'],_0x566f0a=_0x5685ce['range'];if(!_0x53b500['isEqual'](_0x566f0a)){if(_0x53b500['containsRange'](_0x566f0a,!0x0))return 0x1;if(_0x566f0a['containsRange'](_0x53b500,!0x0))return-0x1;}return _0x2ec355['annotation']==_0x293b1d?-0x1:_0x5685ce['annotation']==_0x293b1d?0x1:0x0;})['map'](_0x36e474=>_0x36e474['annotation']);}get['_editorAnnotationsData'](){const _0x3f88da=new Map();for(const _0x215ffd of Array['from'](this['_dataCollectors']))for(const [_0x24e43f,_0x46fd9d]of _0x215ffd())_0x3f88da['set'](_0x24e43f,_0x46fd9d);return _0x3f88da;}}class ni extends _0x26a1e4{['afterInit'](){const _0x2e3708=this['editor'];if(!_0x2e3708['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2e3708['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x26a1e4{constructor(_0x14a31f){super(_0x14a31f),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3edb54=this['editor'],_0x3e3b0e=_0x3edb54['commands']['get']('importWord'),_0x1fe69f=_0x3edb54['plugins']['get'](_0x788207);_0x3e3b0e&&(_0x3e3b0e['on']('execute',(_0x51ba7f,[,_0x2902ca])=>{_0x2902ca['collaboration_features']={'comments':!0x0,'user_id':_0x1fe69f['me']['id']};},{'priority':_0x5810a3['high']+0xa}),this['listenTo'](_0x3e3b0e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x42a3af,_0xebe359){const {comment_threads:_0x400008}=_0xebe359;_0x400008&&_0x400008['forEach'](({thread_id:_0xe37a95,comments:_0xa57008,is_resolved:_0x5db84e})=>{const _0x459c00=new Date(),_0x56bca5=_0xa57008['map'](({author:_0x1e2c1a,content:_0x1d3caa,created_at:_0x470cb2})=>({'content':_0x1d3caa,'authorId':this['editor']['plugins']['get'](_0x788207)['me']['id'],'createdAt':_0x459c00,'attributes':{'@external':{'authorName':_0x1e2c1a,'createdAt':_0x470cb2?new Date(_0x470cb2):new Date(),'source':'importWord'}}})),_0x14d48f=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x14d48f,'threadId':_0xe37a95,'comments':_0x56bca5,'resolvedAt':_0x5db84e?_0x459c00:null});});}}class ri extends _0x26a1e4{constructor(_0x535649){super(_0x535649),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x50c624=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x50c624,'contentInsertion',(_0x44e997,_0x2cf10a)=>this['_removeMarkersWithoutThreads'](_0x2cf10a['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x97137){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x97137;const _0x31113c=this['editor']['plugins']['get']('CommentsRepository');for(const _0xb71575 of _0x97137['keys']()){const [_0x5caf59,_0x3a0f53]=_0xb71575['split'](':');'comment'!=_0x5caf59||_0x31113c['hasCommentThread'](_0x3a0f53)||_0x97137['delete'](_0xb71575);}return _0x97137;}['_registerMarkerInClipboardPipeline'](){const _0x356dea=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1c7b0e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1c7b0e&&_0x356dea['_registerMarkerToCopy']('comment',_0x1c7b0e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x5b7da8){switch(_0x5b7da8){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x586bf9){const _0x10f812=_0x586bf9['split'](':');return{'group':_0x10f812[0x0],'id':_0x10f812[0x1],'part':_0x10f812[0x2]};}class ai extends _0x26a1e4{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x56d43c,_0xeb6e62)=>{if(!_0xeb6e62['options']['showCommentHighlights'])return null;if(_0xeb6e62['options']['ignoreResolvedComments']){const {id:_0x367882}=hi(_0x56d43c['markerName']),_0x1808d6=this['editor']['plugins']['get'](Qt);if(_0x1808d6['getCommentThread'](_0x367882)?.['isResolved']&&_0x56d43c['item'])return _0xeb6e62['consumable']['consume'](_0x56d43c['item'],'addMarker:'+_0x56d43c['markerName']),_0xeb6e62['consumable']['consume'](_0x56d43c['item'],'removeMarker:'+_0x56d43c['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x55d9bf=>{_0x55d9bf['on']('addMarker:comment',(_0x1f4b1c,_0x48f2db,_0xb214ac)=>{if(!_0xb214ac['options']['showCommentHighlights'])return;const _0x4ed950=_0x48f2db['item'];if(!_0x4ed950)return;const _0x1b1d5f=_0xb214ac['mapper']['toViewElement'](_0x4ed950);this['editor']['model']['schema']['isObject'](_0x4ed950)&&_0x1b1d5f&&!_0x1b1d5f['getCustomProperty']('widget')&&_0x1b1d5f['is']('containerElement')&&Ct(_0x1b1d5f,_0xb214ac['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x54958c,{writer:_0x2a7845,options:_0x45f2ac})=>{if(!_0x45f2ac['showCommentHighlights'])return null;const _0x1f5bba=_0x2a7845['createContainerElement']('div'),_0x465e77=_0x2a7845['createEmptyElement']('hr');return _0x2a7845['addClass']('ck-horizontal-line',_0x1f5bba),_0x2a7845['insert'](_0x2a7845['createPositionAt'](_0x1f5bba,0x0),_0x465e77),_0x1f5bba;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3a1fe7,{writer:_0x4dfd0e,options:_0x51769d})=>{if(!_0x51769d['showCommentHighlights'])return null;const _0x5cb68e=_0x4dfd0e['createContainerElement']('span'),_0x8a8260=_0x4dfd0e['createEmptyElement']('img');return _0x4dfd0e['addClass']('image-inline',_0x5cb68e),_0x4dfd0e['insert'](_0x4dfd0e['createPositionAt'](_0x5cb68e,0x0),_0x8a8260),_0x5cb68e;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x553b93,{writer:_0x49dd07,options:_0xcdce24})=>{if(_0xcdce24['showCommentHighlights'])return _0x49dd07['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4a160a,_0x960fcb,_0x361bf0)=>{_0x361bf0['options']['showCommentHighlights']&&_0x4a160a['stop']();},{'priority':'high'});}}class ci extends _0x26a1e4{static get['requires'](){return[Qt,si,_0x788207,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf5771d){super(_0xf5771d),this['set']('isThreadsLoadingPaused',!0x0),_0xf5771d['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x18ede4,_0x249842,_0x37ac72,_0x1e52a8)=>{const _0x2085d3=_0xf5771d['plugins']['get'](Qt),_0x35331a=_0x37ac72?hi(_0x37ac72)['id']:null;_0xf5771d['model']['change'](()=>{if(_0x35331a){const _0x15d213=this['getAllMarkersForId'](_0x35331a);for(const _0x17d6ac of _0x15d213)_0xf5771d['editing']['reconvertMarker'](_0x17d6ac);}if(_0x1e52a8){const {id:_0x4e8f4f}=hi(_0x1e52a8),_0x59666b=_0x2085d3['getCommentThread'](_0x4e8f4f);if(_0x59666b&&_0x59666b['unlinkedAt'])return;if(_0x59666b&&!_0x59666b['isAttached'])return;const _0x2a99dd=this['getAllMarkersForId'](_0x4e8f4f);for(const _0x1252e8 of _0x2a99dd)_0xf5771d['editing']['reconvertMarker'](_0x1252e8);}}),_0x35331a&&this['scrollToThreadMarker'](_0x35331a);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x103d2a=this['editor'],_0x23311a=_0x103d2a['plugins']['get'](Qt),_0x2f13a7=_0x103d2a['config']['get']('collaboration.channelId'),_0x4cd1b4=_0x23311a['getCommentThreads']()['filter'](_0x2318f5=>_0x2318f5['channelId']!==_0x2f13a7);_0x103d2a['commands']['add']('addCommentThread',new ei(_0x103d2a)),this['listenTo'](_0x103d2a,'change:isReadOnly',(_0x1c2335,_0x39fdfc,_0x4e117c)=>{_0x23311a['switchReadOnly'](_0x4e117c,_0x103d2a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x23311a,di('addCommentThread',_0x2f13a7),(_0x5660f3,{threadId:_0x4c4cd8})=>{const _0x569a18=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x4c4cd8);_0x569a18?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4c4cd8);}),this['listenTo'](_0x23311a,di('removeCommentThread',_0x2f13a7),(_0x48f5d1,{threadId:_0x98c08e})=>{_0x103d2a['model']['enqueueChange']({'isUndoable':!0x1},_0x3c95bd=>{const _0x37d526=this['getAllMarkersForId'](_0x98c08e);for(const _0x4a777c of _0x37d526)_0x3c95bd['removeMarker'](_0x4a777c);});}),this['listenTo'](_0x23311a,di('resolveCommentThread',_0x2f13a7),(_0x2ab2b8,{threadId:_0x291101})=>{(this['_reconvertMarkers'](_0x291101),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x291101)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x23311a,di('reopenCommentThread',_0x2f13a7),(_0x22c10f,{threadId:_0x8749d4})=>{this['_reconvertMarkers'](_0x8749d4);},{'priority':'low'}),this['listenTo'](_0x23311a,di('addComment',_0x2f13a7),(_0x4df0c2,{threadId:_0x16a72d,isFromAdapter:_0x4a3ee7})=>{const _0x4c7d78=this['getAllMarkersForId'](_0x16a72d);if(_0x4a3ee7||0x0==_0x4c7d78['length']||!_0x23311a['hasCommentThread'](_0x16a72d))return;0x1===_0x23311a['getCommentThread'](_0x16a72d)['length']&&_0x103d2a['model']['enqueueChange']({'isUndoable':!0x1},_0x21df46=>{for(const _0x5d567e of _0x4c7d78)_0x21df46['updateMarker'](_0x5d567e,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4cd1b4);}['afterInit'](){!async function(_0xc210b6){const _0x2f929d=_0x58d56d([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x105e01=0x73460ab3,_0x17bafb=0x73418f0b^_0x105e01,_0x2c2f25=window[_0x58d56d([0x44,0x61,0x74,0x65])][_0x58d56d([0x6e,0x6f,0x77])](),_0x4c451c=_0xc210b6[_0x58d56d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2de924=new window[(_0x58d56d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47213d=>{_0x4c451c[_0x58d56d([0x6f,0x6e,0x63,0x65])](_0x58d56d([0x72,0x65,0x61,0x64,0x79]),_0x47213d);}),_0x200e18={[_0x58d56d([0x6b,0x74,0x79])]:_0x58d56d([0x45,0x43]),[_0x58d56d([0x75,0x73,0x65])]:_0x58d56d([0x73,0x69,0x67]),[_0x58d56d([0x63,0x72,0x76])]:_0x58d56d([0x50,0x2d,0x32,0x35,0x36]),[_0x58d56d([0x78])]:_0x58d56d([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]),[_0x58d56d([0x79])]:_0x58d56d([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]),[_0x58d56d([0x61,0x6c,0x67])]:_0x58d56d([0x45,0x53,0x32,0x35,0x36])},_0x16abd8=_0x4c451c[_0x58d56d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x58d56d([0x67,0x65,0x74])](_0x58d56d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1dba9a(){let _0x4f201d,_0x556dc2=null,_0x5f4fba=null;try{if(_0x16abd8==_0x58d56d([0x47,0x50,0x4c]))return _0x58d56d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4f201d=_0x3c2f5b(),!_0x4f201d)return _0x58d56d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4f201d[_0x58d56d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5f4fba=_0x34de72(_0x4f201d[_0x58d56d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4f201d[_0x58d56d([0x6a,0x74,0x69])])),await _0x4adacd()?_0x1750c8()?_0x215d76()?_0x58d56d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x7ffa80()?(_0x4f201d[_0x58d56d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x58d56d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x556dc2=_0x3708af(_0x58d56d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5bb10c()):_0x58d56d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x58d56d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x58d56d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x58d56d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x215d76(){const _0x1eb541=[_0x58d56d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x58d56d([0x74,0x72,0x69,0x61,0x6c])][_0x58d56d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f201d[_0x58d56d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2c2f25/0x3e8:0xe10*_0x17bafb;return _0x4f201d[_0x58d56d([0x65,0x78,0x70])]<_0x1eb541;}function _0x1750c8(){const _0xe6cd21=_0x4f201d[_0x58d56d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xe6cd21)return!0x1;if(_0xe6cd21[_0x58d56d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58d56d([0x2a])))return!0x0;if(_0xe6cd21[_0x58d56d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58d56d([0x43,0x4d,0x54])))return!0x0;if(_0xe6cd21[_0x58d56d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58d56d([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x3e3730())return!0x0;if(_0xe6cd21[_0x58d56d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58d56d([0x52,0x43,0x4d,0x54]))){if(_0x52a610())return!0x0;if(_0x5283f2()||_0x11b202())return!0x0;}return!0x1;}function _0x7ffa80(){const _0x54f81a=_0x4f201d[_0x58d56d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x54f81a||0x0==_0x54f81a[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x35fcb8}=new URL(window[_0x58d56d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x54f81a[_0x58d56d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35fcb8))return!0x0;const _0xae93e7=_0x35fcb8[_0x58d56d([0x73,0x70,0x6c,0x69,0x74])](_0x58d56d([0x2e]));return _0x54f81a[_0x58d56d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x53286d=>_0x53286d[_0x58d56d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58d56d([0x2a])))[_0x58d56d([0x6d,0x61,0x70])](_0x4848c1=>_0x4848c1[_0x58d56d([0x73,0x70,0x6c,0x69,0x74])](_0x58d56d([0x2e])))[_0x58d56d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x386f81=>_0x386f81[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xae93e7[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x58d56d([0x6d,0x61,0x70])](_0x548127=>Array(_0xae93e7[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x548127[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x58d56d([0x66,0x69,0x6c,0x6c])](_0x548127[0x0]===_0x58d56d([0x2a])?_0x58d56d([0x2a]):'')[_0x58d56d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x548127))[_0x58d56d([0x73,0x6f,0x6d,0x65])](_0x1d266e=>_0xae93e7[_0x58d56d([0x65,0x76,0x65,0x72,0x79])]((_0x321844,_0x26acfc)=>_0x1d266e[_0x26acfc]===_0x321844||_0x1d266e[_0x26acfc]===_0x58d56d([0x2a])));}function _0x5bb10c(){return _0x556dc2&&_0x5f4fba?new window[(_0x58d56d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59e8a7,_0x54c0d7)=>{_0x556dc2[_0x58d56d([0x74,0x68,0x65,0x6e])](_0x59e8a7,_0x54c0d7),_0x5f4fba[_0x58d56d([0x74,0x68,0x65,0x6e])](_0x279d12=>{_0x279d12!=_0x58d56d([0x56,0x61,0x6c,0x69,0x64])&&_0x59e8a7(_0x279d12);},_0x54c0d7);}):_0x556dc2||_0x5f4fba||_0x58d56d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x34de72(_0x3f3b11,_0x18b085){return new window[(_0x58d56d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4f7bc2=>{if(_0x333664())return _0x4f7bc2(_0x58d56d([0x56,0x61,0x6c,0x69,0x64]));_0x598006(),_0x4c451c[_0x58d56d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x58d56d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3eef8c=!0x1;const _0x1da807=_0x53cf7b();function _0x26c15a(_0x33a037){return!!_0x33a037&&(typeof _0x33a037===_0x58d56d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x33a037===_0x58d56d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x33a037[_0x58d56d([0x74,0x68,0x65,0x6e])]===_0x58d56d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x33a037[_0x58d56d([0x63,0x61,0x74,0x63,0x68])]===_0x58d56d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2b5bee(_0x3710d2){_0x14d616(_0x3710d2)[_0x58d56d([0x74,0x68,0x65,0x6e])](_0x368b97=>{if(!_0x368b97||_0x368b97[_0x58d56d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x58d56d([0x6f,0x6b]))return _0x58d56d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4747d2(_0x2d87b1(_0x1da807+_0x18b085))!=_0x368b97[_0x58d56d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x58d56d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x58d56d([0x56,0x61,0x6c,0x69,0x64]);})[_0x58d56d([0x74,0x68,0x65,0x6e])](_0x280117=>(_0x312314(),_0x280117),()=>{const _0x947f7f=_0x274d7e();return null==_0x947f7f?(_0x312314(),_0x58d56d([0x56,0x61,0x6c,0x69,0x64])):_0x58d56d(_0x2c2f25-_0x947f7f>(0x574a8eb3^_0x105e01)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x58d56d([0x74,0x68,0x65,0x6e])](_0x4f7bc2)[_0x58d56d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4f7bc2(_0x58d56d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2afd36=0x7370e433^_0x105e01;function _0x312314(){const _0x5ca6ae=_0x58d56d([0x6c,0x6c,0x63,0x74,0x2d])+_0x4747d2(_0x2d87b1(_0x3f3b11)),_0x3361a0=_0x580016(_0x4747d2(window[_0x58d56d([0x4d,0x61,0x74,0x68])][_0x58d56d([0x63,0x65,0x69,0x6c])](_0x2c2f25/_0x2afd36)));window[_0x58d56d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x58d56d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5ca6ae,_0x3361a0);}function _0x274d7e(){const _0x128198=_0x58d56d([0x6c,0x6c,0x63,0x74,0x2d])+_0x4747d2(_0x2d87b1(_0x3f3b11)),_0x2cac89=window[_0x58d56d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x58d56d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x128198);return _0x2cac89?window[_0x58d56d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x580016(_0x2cac89),0x10)*_0x2afd36:null;}function _0x14d616(_0x332bf1){return new window[(_0x58d56d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15a2b0,_0x5d2399)=>{_0x332bf1[_0x58d56d([0x74,0x68,0x65,0x6e])](_0x15a2b0,_0x5d2399),window[_0x58d56d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5d2399,0x7347de73^_0x105e01);});}}_0x4c451c[_0x58d56d([0x6f,0x6e])](_0x58d56d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x15894f,_0x587b5c)=>{if(_0x587b5c[0x0]!=_0x3f3b11)return _0x4f7bc2(_0x58d56d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x587b5c[0x1]={..._0x587b5c[0x1],[_0x58d56d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1da807};},{[_0x58d56d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x58d56d([0x68,0x69,0x67,0x68])}),_0x4c451c[_0x58d56d([0x6f,0x6e])](_0x58d56d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x41daac=>{_0x26c15a(_0x41daac[_0x58d56d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3eef8c=!0x0,_0x2b5bee(_0x41daac[_0x58d56d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x58d56d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x58d56d([0x6c,0x6f,0x77])}),_0x2de924[_0x58d56d([0x74,0x68,0x65,0x6e])](()=>{_0x3eef8c||_0x4f7bc2(_0x58d56d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x333664(){return _0x4c451c[_0x58d56d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x58d56d([0x76,0x69,0x65,0x77])][_0x58d56d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x58d56d([0x61,0x75,0x74,0x6f]);}function _0x598006(){_0x4c451c[_0x58d56d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x58d56d([0x76,0x69,0x65,0x77])][_0x58d56d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x58d56d([0x61,0x75,0x74,0x6f]);}}function _0x3708af(_0x2d55f7){const _0x58bece=[new window[(_0x58d56d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e27db=>setTimeout(_0x1e27db,0x734f347f^_0x105e01)),_0x2de924[_0x58d56d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x58d56d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50bc4e=>{let _0x359daa=0x0;_0x4c451c[_0x58d56d([0x6d,0x6f,0x64,0x65,0x6c])][_0x58d56d([0x6f,0x6e])](_0x58d56d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xe763c2,_0x3dfd98)=>{_0x3dfd98[0x0][_0x58d56d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x359daa++,_0x359daa==(0x73460f5b^_0x105e01)&&(_0x50bc4e(),_0xe763c2[_0x58d56d([0x6f,0x66,0x66])]());});}))];return window[_0x58d56d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x58d56d([0x72,0x61,0x63,0x65])](_0x58bece)[_0x58d56d([0x74,0x68,0x65,0x6e])](()=>_0x2d55f7);}async function _0x4a565d(){await _0x2de924,_0x4c451c[_0x58d56d([0x6d,0x6f,0x64,0x65,0x6c])][_0x58d56d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x243d81,_0x4c451c[_0x58d56d([0x6d,0x6f,0x64,0x65,0x6c])][_0x58d56d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x243d81,_0x4c451c[_0x58d56d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x58d56d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3e3730(){return window[_0x58d56d([0x67,0x6c,0x6f,0x62])]&&window[_0x58d56d([0x67,0x6c,0x6f,0x62])][_0x58d56d([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x52a610(){return _0x4f7cd3(_0x58d56d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5bf0fb(_0x58d56d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x58d56d([0x73,0x74,0x61,0x74,0x65])]==_0x58d56d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5283f2(){return _0x4f7cd3(_0x58d56d([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 _0x11b202(){return _0x4f7cd3(_0x58d56d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4ea7ca(_0xc0b247){const _0x5555bf=_0x41c422();_0x4c451c[_0x5555bf]=_0x58d56d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xc0b247,_0xc0b247!=_0x58d56d([0x56,0x61,0x6c,0x69,0x64])&&_0x4a565d();}function _0x41c422(){const _0x37355b=window[_0x58d56d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x58d56d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x58d56d([0x6e,0x6f,0x77])]())[_0x58d56d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x58d56d([0x2e]),'');let _0xf5068e=_0x58d56d([0x4b]);for(let _0x234ac3=0x0;_0x234ac3<_0x37355b[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x234ac3+=0x2){let _0x22d2d7=window[_0x58d56d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x37355b[_0x58d56d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x234ac3,_0x234ac3+0x2));_0x22d2d7>=_0x2f929d[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x22d2d7-=_0x2f929d[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xf5068e+=_0x2f929d[_0x22d2d7];}return _0xf5068e;}function _0x3c2f5b(){const _0x3184e7=_0x16abd8[_0x58d56d([0x73,0x70,0x6c,0x69,0x74])](_0x58d56d([0x2e]));if(0x3!=_0x3184e7[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1068ab(_0x3184e7[0x1]);function _0x1068ab(_0x23bcc0){const _0x38a3a7=_0x460997(_0x23bcc0);return _0x38a3a7&&_0xc5629e()?_0x38a3a7:null;function _0xc5629e(){const _0x2fb1ae=_0x38a3a7[_0x58d56d([0x6a,0x74,0x69])],_0x25a497=window[_0x58d56d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2fb1ae[_0x58d56d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2fb1ae[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x319728={..._0x38a3a7,[_0x58d56d([0x6a,0x74,0x69])]:_0x2fb1ae[_0x58d56d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2fb1ae[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x319728[_0x58d56d([0x76,0x63])],_0x2d87b1(_0x319728)==_0x25a497;}}}async function _0x4adacd(){let _0x211adf=!0x0;try{const _0x4f7709=_0x16abd8[_0x58d56d([0x73,0x70,0x6c,0x69,0x74])](_0x58d56d([0x2e])),[_0x2021d8,_0x11ecde,_0x5dc6a7]=_0x4f7709;return _0x47548f(_0x2021d8),await _0x43fa1e(_0x2021d8,_0x11ecde,_0x5dc6a7),_0x211adf;}catch{return!0x1;}function _0x47548f(_0x16e752){const _0x23b971=_0x460997(_0x16e752);_0x23b971&&_0x23b971[_0x58d56d([0x61,0x6c,0x67])]==_0x58d56d([0x45,0x53,0x32,0x35,0x36])||(_0x211adf=!0x1);}async function _0x43fa1e(_0x545d5b,_0x804a23,_0x32268e){const _0x578f4d=window[_0x58d56d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x58d56d([0x66,0x72,0x6f,0x6d])](_0x42423d(_0x32268e),_0x426034=>_0x426034[_0x58d56d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x46d1aa=new window[(_0x58d56d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x58d56d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x545d5b+_0x58d56d([0x2e])+_0x804a23),_0xdfd59a=window[_0x58d56d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x58d56d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xdfd59a)return;const _0xed98bc=await _0xdfd59a[_0x58d56d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x58d56d([0x6a,0x77,0x6b]),_0x200e18,{[_0x58d56d([0x6e,0x61,0x6d,0x65])]:_0x58d56d([0x45,0x43,0x44,0x53,0x41]),[_0x58d56d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x58d56d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x58d56d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xdfd59a[_0x58d56d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x58d56d([0x6e,0x61,0x6d,0x65])]:_0x58d56d([0x45,0x43,0x44,0x53,0x41]),[_0x58d56d([0x68,0x61,0x73,0x68])]:{[_0x58d56d([0x6e,0x61,0x6d,0x65])]:_0x58d56d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xed98bc,_0x578f4d,_0x46d1aa)||(_0x211adf=!0x1);}}function _0x460997(_0x17fe70){return _0x17fe70[_0x58d56d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x58d56d([0x65,0x79]))?JSON[_0x58d56d([0x70,0x61,0x72,0x73,0x65])](_0x42423d(_0x17fe70)):null;}function _0x42423d(_0x256768){return window[_0x58d56d([0x61,0x74,0x6f,0x62])](_0x256768[_0x58d56d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x58d56d([0x2b]))[_0x58d56d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x58d56d([0x2f])));}function _0x2d87b1(_0x25e9ff){let _0x4855ab=0x1505;function _0x92b5ee(_0x3c7a66){for(let _0x543333=0x0;_0x543333<_0x3c7a66[_0x58d56d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x543333++){const _0x22b24f=_0x3c7a66[_0x58d56d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x543333);_0x4855ab=(_0x4855ab<<0x5)+_0x4855ab+_0x22b24f,_0x4855ab&=_0x4855ab;}}function _0x7e06c0(_0x357726){Array[_0x58d56d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x357726)?_0x357726[_0x58d56d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x7e06c0):_0x357726&&typeof _0x357726==_0x58d56d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x58d56d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x357726)[_0x58d56d([0x73,0x6f,0x72,0x74])]()[_0x58d56d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4654f2,_0x3482ce])=>{_0x92b5ee(_0x4654f2),_0x7e06c0(_0x3482ce);}):_0x92b5ee(window[_0x58d56d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x357726));}return _0x7e06c0(_0x25e9ff),_0x4855ab>>>0x0;}function _0x4747d2(_0xd45895){return _0xd45895[_0x58d56d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x58d56d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x58d56d([0x30]));}function _0x580016(_0xe0cc39){return _0xe0cc39[_0x58d56d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x58d56d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x58d56d([0x6a,0x6f,0x69,0x6e])]('');}function _0x4f7cd3(_0x5d548f){return _0x4c451c[_0x58d56d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x58d56d([0x68,0x61,0x73])](_0x5d548f);}function _0x5bf0fb(_0x505585){return _0x4c451c[_0x58d56d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x58d56d([0x67,0x65,0x74])](_0x505585);}function _0x243d81(){}function _0x58d56d(_0x12cb73){return _0x12cb73['map'](_0x2bb2d8=>String['fromCharCode'](_0x2bb2d8))['join']('');}_0x4ea7ca(await _0x1dba9a());}(this);}['destroy'](){const _0x4d7206=this['editor']['plugins']['get'](Qt),_0x3e7143=this['editor']['config']['get']('collaboration.channelId');for(const _0x1d30f2 of _0x4d7206['getCommentThreads']({'channelId':_0x3e7143}))_0x4d7206['_detachCommentThread'](_0x1d30f2['id']),_0x4d7206['_threads']['delete'](_0x1d30f2['id']);super['destroy']();}['hasMarkerForId'](_0xc7000d){return this['getAllMarkersForId'](_0xc7000d)['length']>0x0;}['getAllMarkersForId'](_0x316cc3){const _0x7554a7=[];for(const _0x34ac6d of this['editor']['model']['markers'])_0x34ac6d['name']['startsWith']('comment:'+_0x316cc3)&&_0x7554a7['push'](_0x34ac6d);return _0x7554a7;}['scrollToThreadMarker'](_0x5f122e){setTimeout(()=>{const _0x581d2e=this['_getTargetForId'](_0x5f122e);if(!_0x581d2e)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x5f122e&&_0x1c9dcd({'target':_0x581d2e[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x24838f){this['editor']['model']['change'](()=>{for(const _0x51edac of this['getAllMarkersForId'](_0x24838f))this['editor']['editing']['reconvertMarker'](_0x51edac);});}['_attachArchivedThread'](_0x45f4ba){const _0x72c725=this['editor']['plugins']['get'](Qt),_0x405429=this['editor']['plugins']['get'](si),_0x1b3565=_0x72c725['getCommentThread'](_0x45f4ba);if(!_0x1b3565['isAttached']){const _0x2c363d=_0x1b3565['attachTo'](()=>this['_getTargetForId'](_0x1b3565['id']));_0x405429['registerAnnotation'](_0x2c363d),_0x1b3565['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x31b7e7=this['editor'],_0x23d2fa=_0x31b7e7['plugins']['get'](_0x788207);_0x31b7e7['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x293aa1,_0x11a418)=>{const {id:_0x13181e}=hi(_0x293aa1['markerName']),_0x4695e3=_0x31b7e7['plugins']['get'](Qt)['getCommentThread'](_0x13181e),_0x1db7fa=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x13181e;let _0x46423e;if(_0x4695e3&&_0x4695e3['isResolved']&&!_0x1db7fa&&_0x293aa1['item'])return _0x11a418['consumable']['consume'](_0x293aa1['item'],'addMarker:'+_0x293aa1['markerName']),_0x11a418['consumable']['consume'](_0x293aa1['item'],'removeMarker:'+_0x293aa1['markerName']),null;const _0x34e1b5=['ck-comment-marker'];return _0x1db7fa&&_0x34e1b5['push']('ck-comment-marker--active'),_0x46423e=_0x4695e3?.['length']?_0x4695e3['comments']['first']['author']['id']:_0x23d2fa['me']['id'],{'classes':_0x34e1b5,'attributes':{'data-comment':_0x13181e,'data-author-id':_0x46423e}};}}),_0x31b7e7['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1b8fd4,{options:_0x500b6a})=>{if(_0x500b6a['showCommentHighlights'])return null;const _0x596e5e=_0x31b7e7['plugins']['get'](Qt),_0x339f83=_0x31b7e7['model']['markers']['get'](_0x1b8fd4),{id:_0x40c6e6,part:_0x370d26}=hi(_0x1b8fd4);return _0x339f83&&!_0x339f83['affectsData']||_0x500b6a['ignoreResolvedComments']&&_0x596e5e['getCommentThread'](_0x40c6e6)?.['isResolved']?null:{'group':'comment','name':_0x370d26?_0x40c6e6+':'+_0x370d26:_0x40c6e6};}}),_0x31b7e7['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x25f164,{writer:_0x5e1ae9})=>_0x5e1ae9['createElement']('$marker',{'data-name':'comment:'+_0x25f164['getAttribute']('id')})}),_0x31b7e7['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0xf59760=this['editor'],_0x450374=_0xf59760['plugins']['get'](Qt),_0x149dcc=new Set(),_0x410be3=new Set();_0xf59760['model']['document']['registerPostFixer'](_0x989dda=>{let _0x146779=!0x1;for(const {name:_0x877879,data:_0x3a44fd}of _0xf59760['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2d0f33,id:_0x48732b}=hi(_0x877879);let _0x38fa13=_0x3a44fd['newRange'];if('comment'!==_0x2d0f33||!_0x38fa13)continue;const _0x1a226f='$graveyard'===_0x38fa13['root']['rootName'];_0x1a226f||(_0x38fa13=li(_0x38fa13,_0xf59760['model']),!_0x38fa13||_0x38fa13['isCollapsed']||!_0x3a44fd['newRange']||_0x38fa13['isEqual'](_0x3a44fd['newRange']))?_0xf59760['model']['hasContent'](_0x38fa13)&&!_0x1a226f?this['isThreadsLoadingPaused']?_0x149dcc['add'](_0x877879):this['_handleThreadMarker'](_0x877879,_0x48732b):(_0x410be3['add'](_0x877879),_0x149dcc['delete'](_0x877879),_0x989dda['removeMarker'](_0x877879),_0x146779=!0x0):(_0x989dda['updateMarker'](_0x877879,{'range':_0x38fa13}),_0x146779=!0x0);}return _0x146779;}),this['on']('change:isThreadsLoadingPaused',(_0xfbcea7,_0x3c494f,_0x25cefc)=>{if(!_0x25cefc&&_0x149dcc['size'])for(const _0x2dcd76 of _0x149dcc){const {id:_0x1d44b9}=hi(_0x2dcd76);_0x149dcc['delete'](_0x2dcd76),_0xf59760['model']['markers']['get'](_0x2dcd76)&&this['_handleThreadMarker'](_0x2dcd76,_0x1d44b9);}}),this['listenTo'](_0xf59760['model']['document'],'change',()=>{for(const {name:_0x342f78,data:{newRange:_0x54d4d6}}of _0xf59760['model']['document']['differ']['getChangedMarkers']()){const {group:_0x490d07,id:_0x1ed3df}=hi(_0x342f78);if('comment'!==_0x490d07)continue;const _0x149311=_0x450374['getCommentThread'](_0x1ed3df),_0x7e39aa=this['hasMarkerForId'](_0x1ed3df);_0x149311&&(!_0x149311['_hasTargetInContent']&&_0x54d4d6&&_0xf59760['editing']['view']['once']('render',()=>{const _0x475fad=_0xf59760['plugins']['get']($t),_0x2c0c8f=_0x450374['_threadToController']['get'](_0x149311)['view'];_0x475fad['getByInnerView'](_0x2c0c8f)['refreshVisibility']();},{'priority':'low'}),_0x149311['_hasTargetInContent']=_0x7e39aa||!!_0x54d4d6),_0x54d4d6||(_0x410be3['add'](_0x342f78),_0x149dcc['delete'](_0x342f78));}for(const _0xf0ed53 of _0x410be3){const {id:_0x5956f3}=hi(_0xf0ed53),_0x5880e1=_0x450374['getCommentThread'](_0x5956f3);if(_0x149dcc['delete'](_0xf0ed53),!_0x5880e1)continue;const _0x4b66e9=this['hasMarkerForId'](_0x5956f3);_0x4b66e9||_0x5880e1['isSubmitted']?_0x4b66e9||_0x5880e1['unlinkedAt']||_0x5880e1['setUnlinkedAt'](new Date()):_0x5880e1['remove']();}_0x410be3['clear']();});}['_handleInitialThreads'](_0x31badc){_0x31badc['forEach'](_0x3ad5aa=>{_0x3ad5aa['unlinkedAt']&&this['_attachArchivedThread'](_0x3ad5aa['id']);});}['_getTargetForId'](_0x50866b){const _0x51b2e3=this['editor'],_0x22011b=this['getAllMarkersForId'](_0x50866b);return _0x2eee3d(_0x51b2e3['editing'],_0x22011b);}['_getTextContext'](_0xe91801){const _0x523652=this['getAllMarkersForId'](_0xe91801);let _0x5b5ec9='',_0xc9993d=!0x1;for(const _0x26ca37 of _0x523652){const _0x35bbd9=_0x26ca37['getRange']();for(const _0xe5a495 of Array['from'](_0x35bbd9['getItems']()))_0xe5a495['is']('$textProxy')?(_0x5b5ec9&&_0xc9993d&&(_0x5b5ec9+='\x20',_0xc9993d=!0x1),_0x5b5ec9+=_0xe5a495['data']):_0xc9993d=!0x0;_0xc9993d=!0x0;}return _0x5b5ec9['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xfa6ca7,_0x1aea1d){const _0x3a77f1=this['editor'],_0x10cd9a=_0x3a77f1['plugins']['get'](Qt);let _0x289fd6=_0x10cd9a['getCommentThread'](_0x1aea1d);const _0x4465a1=_0x3a77f1['config']['get']('collaboration.channelId'),_0x13d03a=_0x3a77f1['plugins']['get'](si);if(_0x289fd6&&(_0x289fd6['unlinkedAt']&&_0x289fd6['setUnlinkedAt'](null),_0x289fd6['isAttached']))return _0x289fd6;return!this['getAllMarkersForId'](_0x1aea1d)[0x0]['managedUsingOperations']?_0x3a77f1['editing']['view']['once']('render',()=>{if(_0x10cd9a['getCommentThread'](_0x1aea1d))return;const _0x5111a6=_0x3a77f1['plugins']['get']($t);_0x289fd6=_0x10cd9a['openNewCommentThread']({'channelId':_0x4465a1,'threadId':_0x1aea1d,'target':()=>this['_getTargetForId'](_0x1aea1d),'context':{'type':'text','value':this['_getTextContext'](_0x1aea1d)}});const _0x1f7861=_0x10cd9a['_threadToController']['get'](_0x289fd6)['view'],_0x39a35f=_0x5111a6['getByInnerView'](_0x1f7861);_0x39a35f&&_0x13d03a['registerAnnotation'](_0x39a35f);},{'priority':'low'}):_0x10cd9a['fetchCommentThread']({'channelId':_0x4465a1,'threadId':_0x1aea1d})['then'](_0x42c8c2=>{if('destroyed'!==_0x3a77f1['state']){if(_0x289fd6=_0x42c8c2,_0x289fd6&&!_0x289fd6['isAttached']){const _0x1d6dd5=_0x289fd6['attachTo'](()=>this['_getTargetForId'](_0x1aea1d));_0x13d03a['registerAnnotation'](_0x1d6dd5),_0x289fd6['isResolved']&&this['_reconvertMarkers'](_0x1aea1d);}else{if(!_0x289fd6){const _0x50fa86=this['getAllMarkersForId'](_0x1aea1d);_0x3a77f1['model']['change'](_0x5d45c4=>{for(const _0x307a66 of _0x50fa86)_0x5d45c4['removeMarker'](_0x307a66);});}}}}),_0x289fd6;}['_handleThreadMarker'](_0x2f8c39,_0x5337f9){const _0x1959ba=this['_attachMarkerToThread'](_0x2f8c39,_0x5337f9);_0x1959ba&&!_0x1959ba['context']&&_0x1959ba['setContext']({'type':'text','value':this['_getTextContext'](_0x5337f9)});}['_initAriaMarkerChangeAnnouncements'](){const _0x11e2df=this['editor'];_0xdfcc92(_0x11e2df['model'],({left:_0x346974,entered:_0x476423})=>{for(const _0x27d033 of _0x346974)if(ui(_0x27d033)){_0x11e2df['ui']['ariaLiveAnnouncer']['announce'](bt(_0x11e2df['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x414b38 of _0x476423)if(ui(_0x414b38)){_0x11e2df['ui']['ariaLiveAnnouncer']['announce'](bt(_0x11e2df['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x323d00(_0x565a10)));break;}});}}function di(_0x371c9e,_0x89e931){return _0x89e931?_0x371c9e+':'+_0x89e931:_0x371c9e;}function li(_0xff62a4,_0x5ef7c3){const _0x240a84=_0x5ef7c3['schema'],_0x3e652f=_0x5ef7c3['createRange'](_0xff62a4['start']);for(const _0x2cdab1 of _0xff62a4['getWalker']()){const {type:_0x2d5165,item:_0x46b116,nextPosition:_0x2cfb13}=_0x2cdab1;if('text'===_0x2d5165||_0x240a84['isObject'](_0x46b116)){const _0x21dc36=_0x5ef7c3['createPositionBefore'](_0x46b116);_0x3e652f['isCollapsed']&&(_0x3e652f['start']=_0x21dc36),_0x3e652f['end']=_0x2cfb13;}}return _0x3e652f;}function ui(_0x172876){return'comment'===hi(_0x172876['name'])['group'];}class mi extends _0x26a1e4{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x4c659e=this['editor'],_0x5cca62=_0x4c659e['plugins']['get'](Qt),_0x257bc0=_0x4c659e['plugins']['get'](ci),_0x5e5dc5=_0x4c659e['plugins']['get']($t),_0x3ff76e=_0x4c659e['plugins']['get'](si);_0x4c659e['ui']['componentFactory']['add']('comment',()=>{const _0x41651a=this['_createUIButton'](_0x2b6d9d);return _0x41651a['tooltip']=!0x0,_0x41651a;}),_0x4c659e['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x3ff76e['addSourceCollector'](()=>{const _0x4b4d2b=[];for(const [_0x2f2e04,_0x439cb2]of _0x5cca62['_threadToController']){const _0x36fb69=_0x257bc0['getAllMarkersForId'](_0x2f2e04['id']),_0x3b4fa2=_0x36fb69['map'](_0xf8079f=>_0xf8079f['getRange']());_0x36fb69['length']>0x0&&_0x4b4d2b['push']([_0x439cb2['view'],_0x3b4fa2]);}return _0x4b4d2b;}),this['listenTo'](_0x5e5dc5,'change:activeAnnotations',(_0x4dcb89,_0x190711,_0xb28649)=>{const _0x4d467b=Array['from'](_0xb28649)['map'](_0x66b86f=>_0x66b86f['innerView'])['find'](_0x596d60=>_0x5cca62['_viewToController']['has'](_0x596d60));if(!_0x4d467b)return void(_0x257bc0['activeMarker']=null);const _0x180cd2=_0x5cca62['_viewToController']['get'](_0x4d467b)['model']['id'],_0x3380fa='comment:'+_0x180cd2;_0x180cd2&&_0x257bc0['hasMarkerForId'](_0x180cd2)?_0x257bc0['activeMarker']=_0x3380fa:_0x257bc0['activeMarker']&&(_0x257bc0['activeMarker']=null);}),this['listenTo'](_0x5cca62,'removeCommentThread',(_0x2ade48,{threadId:_0x4099e6,isFromAdapter:_0x5789be})=>{!_0x5789be&&_0x4c659e['ui']['focusTracker']['isFocused']&&_0x257bc0['hasMarkerForId'](_0x4099e6)&&_0x4c659e['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5cca62,'addComment',(_0x2881a9,{threadId:_0x4b3ccd,isFromAdapter:_0x364a8d})=>{if(_0x364a8d||!_0x257bc0['hasMarkerForId'](_0x4b3ccd)||!_0x5cca62['hasCommentThread'](_0x4b3ccd))return;0x1===_0x5cca62['getCommentThread'](_0x4b3ccd)['length']&&(_0x4c659e['editing']['view']['focus'](),_0x2881a9['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x41fac1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1752dd;for(const _0x1e95cb in _0x41fac1){const _0x22240b=_0x1e95cb,_0xfa704c=_0x41fac1[_0x22240b];if('commentsLicenseKeyValid'==_0xfa704c||'commentsLicenseKeyInvalid'==_0xfa704c||'commentsLicenseKeyExpired'==_0xfa704c||'commentsLicenseKeyDomainLimit'==_0xfa704c||'commentsLicenseKeyNotAllowed'==_0xfa704c||'commentsLicenseKeyEvaluationLimit'==_0xfa704c||'commentsLicenseKeyUsageLimit'==_0xfa704c){delete _0x41fac1[_0x22240b],_0x1752dd=_0xfa704c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1752dd&&_0x41fac1['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1752dd&&_0x41fac1['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1752dd&&_0x41fac1['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1752dd&&_0x41fac1['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1752dd&&_0x41fac1['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1752dd&&_0x41fac1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x59401a){const _0x49a5fb=this['editor'],_0x2de9b3=new _0x59401a(_0x49a5fb['locale']),_0x22ad04=_0x49a5fb['commands']['get']('addCommentThread');return _0x2de9b3['set']({'label':bt(_0x49a5fb['locale'],'Comment'),'icon':_0x4079b6}),_0x2de9b3['bind']('isEnabled')['to'](_0x22ad04,'isEnabled',_0x22ad04,'hasContent',(_0x3e3fa8,_0x18e3f8)=>_0x3e3fa8&&_0x18e3f8),this['listenTo'](_0x2de9b3,'execute',()=>{_0x22ad04['execute']();}),_0x2de9b3;}}class fi extends _0x26a1e4{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x51ec42){super(_0x51ec42),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5c1288,_0x3d3660,_0x72c0dc)=>{_0x72c0dc?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2f0bb9,_0x3d8881]of this['editor']['commands'])_0x3d8881['affectsData']&&'addCommentThread'!==_0x2f0bb9&&_0x3d8881['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x43d3ca=this['editor']['editing']['view']['document'];this['listenTo'](_0x43d3ca,'cut',_0x3c3cf3=>_0x3c3cf3['stop'](),{'priority':'highest'}),this['listenTo'](_0x43d3ca,'clipboardInput',_0xa7f6ac=>_0xa7f6ac['stop'](),{'priority':'highest'}),this['listenTo'](_0x43d3ca,'delete',_0x1c5463=>_0x1c5463['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4a65e9,_0x507cc0]of this['editor']['commands'])_0x507cc0['affectsData']&&'addCommentThread'!==_0x4a65e9&&_0x507cc0['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x3455c6{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x532d58){super(_0x532d58),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x12f0f8=this['context']['plugins']['get']($t);this['listenTo'](_0x12f0f8,'_activateAnnotation',(_0x9bac19,_0x34731a)=>{for(const _0xd68cb6 of this['activeUIs']){const _0x487a04=this['_uis']['get'](_0xd68cb6);(0x0,this['uisData']['get'](_0xd68cb6)['filter'])(_0x34731a)&&_0x487a04['setActiveAnnotation'](_0x34731a);}}),this['listenTo'](_0x12f0f8,'_deactivateAllAnnotations',()=>{for(const _0x4afb91 of this['activeUIs']){this['_uis']['get'](_0x4afb91)['setActiveAnnotation'](null);}}),this['listenTo'](_0x12f0f8['_visibleAnnotations'],'add',(_0x2be3cb,_0x4ba6aa)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4ba6aa);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x111c09){return this['activeUIs']['has'](_0x111c09);}['activate'](_0x351fd6,_0x117888=this['defaultFilter']){const _0xc79227=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x351fd6))throw new _0x5a6372('annotationsuis-missing-ui',this,{'uiName':_0x351fd6});this['isActive'](_0x351fd6)&&this['deactivate'](_0x351fd6),this['activeUIs']['add'](_0x351fd6);const _0x264389=new jt();Xt({'source':_0xc79227['_visibleAnnotations'],'target':_0x264389,'filter':_0x117888}),this['uisData']['set'](_0x351fd6,{'collection':_0x264389,'filter':_0x117888});const _0x50434c=this['_uis']['get'](_0x351fd6);_0x50434c['attach'](_0x264389),this['listenTo'](_0x50434c,'change:activeAnnotation',(_0x9b2eea,_0x4ea8ae,_0x130578,_0x51ccd9)=>{_0x51ccd9&&_0xc79227['_removeActiveAnnotation'](_0x51ccd9),_0x130578&&_0xc79227['_addActiveAnnotation'](_0x130578);});}['deactivate'](_0x379a9c){if(this['activeUIs']['delete'](_0x379a9c),!this['_uis']['has'](_0x379a9c))throw new _0x5a6372('annotationsuis-missing-ui',this,{'uiName':_0x379a9c});const _0x5a2b11=this['_uis']['get'](_0x379a9c);_0x5a2b11['detach'](),this['stopListening'](_0x5a2b11),this['uisData']['get'](_0x379a9c)['collection']['destroy'](),this['uisData']['delete'](_0x379a9c);}['switchTo'](_0xdb75c1){if(!this['_uis']['has'](_0xdb75c1))throw new _0x5a6372('annotationsuis-missing-ui',this,{'uiName':_0xdb75c1});const _0x12453d=this['context']['plugins']['get']($t),_0x61ef20=Array['from'](_0x12453d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xdb75c1);const _0x585036=this['_uis']['get'](_0xdb75c1);_0x585036['setActiveAnnotation'](_0x61ef20),_0x585036['_setSelectedAnnotations']&&_0x61ef20&&_0x585036['_setSelectedAnnotations']([_0x61ef20]);}['deactivateAll'](){for(const _0x4b9ba7 of this['activeUIs'])this['deactivate'](_0x4b9ba7);}['register'](_0x1a4e84,_0x15b83e){if(this['_uis']['has'](_0x1a4e84))throw new _0x5a6372('annotationsuis-register-already-registered');if('function'!=typeof _0x15b83e['attach']||'function'!=typeof _0x15b83e['detach']||'function'!=typeof _0x15b83e['setActiveAnnotation'])throw new _0x5a6372('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1a4e84,_0x15b83e);}['refilterAnnotations'](){const _0x40b6bc=this['context']['plugins']['get']($t)['collection'],_0x669e5e=new Map(),_0x4bb438=Array['from'](this['activeUIs']);for(const _0x47f274 of this['activeUIs']){const _0x180792=this['uisData']['get'](_0x47f274)['collection'];for(const _0x1f9842 of _0x180792)_0x669e5e['set'](_0x1f9842,_0x47f274);}for(const _0xd4f216 of _0x40b6bc){const _0x4f406a=_0x669e5e['get'](_0xd4f216);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd4f216);const _0x573719=_0x4bb438['find'](_0x437187=>this['uisData']['get'](_0x437187)['filter'](_0xd4f216));_0x4f406a!==_0x573719&&(_0x4f406a&&this['uisData']['get'](_0x4f406a)['collection']['remove'](_0xd4f216),_0x573719&&this['uisData']['get'](_0x573719)['collection']['add'](_0xd4f216));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x7df15b){const _0x38c6d2=[];for(const _0x31fb38 of this['activeUIs']){(0x0,this['uisData']['get'](_0x31fb38)['filter'])(_0x7df15b)&&_0x38c6d2['push'](_0x31fb38);}if(_0x38c6d2['length']>0x1)throw new _0x5a6372('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x38c6d2,'annotationType':_0x7df15b['type']});}}const wi=/* #__PURE__ -- @preserve */
32
- _0x2b4c4d('px');class _i extends _0x11143f{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4345da){super(_0x4345da);const _0x24a00c=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 _0xb01d3d(),this['focusCycler']=new _0x241393({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x24a00c['to']('class')],'style':{'minHeight':_0x24a00c['to']('minHeight',_0x1a8e80=>'number'==typeof _0x1a8e80?wi(_0x1a8e80+0xa):null)},'dir':_0x4345da['uiLanguageDirection'],'role':'application','aria-label':bt(_0x4345da,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x4345da,'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',_0x505d45=>{this['_updateItemPositionInFocusables'](_0x505d45['source']);}),this['list']['forEach'](_0x37dc87=>{this['focusTracker']['add'](_0x37dc87['element']),this['_updateItemPositionInFocusables'](_0x37dc87);}),this['list']['on']('change',(_0x554912,_0x260686)=>{for(const _0x477d48 of _0x260686['removed'])this['focusTracker']['remove'](_0x477d48['element']),this['focusables']['remove'](_0x477d48);for(const _0x241d20 of _0x260686['added'])this['focusTracker']['add'](_0x241d20['element']),this['_updateItemPositionInFocusables'](_0x241d20);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x348002){const _0x69a069=this['focusables']['getIndex'](_0x348002);let _0x47208e,_0x6d2f6a;for(const _0x3a1adb of this['focusables'])if(_0x348002['top']<_0x3a1adb['top']){_0x47208e=_0x3a1adb;break;}if(_0x6d2f6a=_0x47208e?this['focusables']['getIndex'](_0x47208e):this['focusables']['length'],-0x1!==_0x69a069){if(_0x69a069===_0x6d2f6a-0x1)return;this['focusables']['remove'](_0x348002),_0x6d2f6a=_0x47208e?this['focusables']['getIndex'](_0x47208e):this['focusables']['length'];}this['focusables']['add'](_0x348002,_0x6d2f6a);}}const gi=/* #__PURE__ -- @preserve */
33
- _0x2b4c4d('px');class Ai extends _0x11143f{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x41eb04){super(_0x41eb04),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x28eaf2,_0x4c97ac)=>_0x28eaf2+_0x4c97ac),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5fc318=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5fc318['to']('isAnimationDisabled',_0x8dee8d=>_0x8dee8d?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5fc318['to']('top',_0x391813=>gi(_0x391813))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2de63d=this['element']['clientHeight'];_0x2de63d&&(this['height']=_0x2de63d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x3455c6{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x532563){super(_0x532563),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 _0x2075f8=this['context']['config']['get']('sidebar.container');_0x2075f8&&this['setContainer'](_0x2075f8);}['setContainer'](_0x11efee){if(!yi(_0x11efee))throw new _0x5a6372('sidebar-setcontainer-invalid-element');this['container']=_0x11efee;}['_attachToContainer']({viewClass:_0x57eba4='',spaceBetweenItems:_0x4e9d0d=0x19}={}){if(!yi(this['container']))throw new _0x5a6372('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x57eba4,this['_spaceBetweenItems']=_0x4e9d0d;}['rearrange']({removedAnnotation:_0x58e720,previousAnnotation:_0x106dbb,nextAnnotation:_0x350d5e}){const _0x513d8b=this['getSidebarItemView'](_0x58e720);this['view']['list']['remove'](_0x513d8b),this['_destroySidebarItemView'](_0x58e720),_0x106dbb&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x106dbb)),_0x350d5e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x350d5e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3fc5e9,activatedAnnotation:_0x4e63b8,disableAnimationOnActivatedAnnotation:_0x15b90c}){if(this['_activeAnnotation']=_0x4e63b8,_0x3fc5e9){_0x3fc5e9['isActive']=!0x1;const _0x1feeb2=this['getSidebarItemView'](_0x3fc5e9);_0x1feeb2&&_0x15b90c&&(_0x1feeb2['isAnimationDisabled']=!0x1);}if(_0x4e63b8){const _0x1bcf73=this['getSidebarItemView'](_0x4e63b8);_0x1bcf73&&(_0x4e63b8['isActive']=!0x0,_0x15b90c&&(_0x1bcf73['isAnimationDisabled']=!0x0,_0x1bcf73['top']+=0x1),this['_alignToTargetRect'](_0x1bcf73));}}['_detachFromContainer'](_0x5b85e5){if(this['view']['element']['remove'](),_0x5b85e5){for(const _0x1213ef of _0x5b85e5)this['_destroySidebarItemView'](_0x1213ef);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5e78b7,_0x3406ae){_0x3406ae||(_0x3406ae=_0x5e78b7['view']);const _0x34d163=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x34d163,_0x5e78b7),this['_annotationToSidebarItemView']['set'](_0x5e78b7,_0x34d163),_0x34d163['content']['add'](_0x3406ae),this['listenTo'](_0x5e78b7['view'],'change:targetRect',(_0x32989c,_0x47f052,_0x4cb708)=>{const _0x506346=this['_getTargetTop'](_0x5e78b7,_0x4cb708);_0x34d163['_targetTop']!=_0x506346&&(_0x34d163['_targetTop']=_0x506346,this['_setItemTop'](_0x34d163,_0x506346));}),this['listenTo'](_0x34d163,'change:top',()=>{this['_recalculate'](_0x34d163,'top');}),this['listenTo'](_0x34d163,'change:bottom',()=>{this['_recalculate'](_0x34d163,'bottom');}),this['_alignToTargetRect'](_0x34d163);const _0x1469d3=this['_getItemBefore'](_0x34d163);if(_0x1469d3)this['_alignAfterItem'](_0x1469d3,_0x34d163)||this['_alignToTargetRect'](_0x34d163);else this['_alignToTargetRect'](_0x34d163);return this['_updateLastItem'](),this['view']['list']['add'](_0x34d163),_0x34d163;}['_alignForTopChange'](_0x343e81){if(!_0x343e81['content']['length'])return;const _0x594fa3=this['_getItemBefore'](_0x343e81);if(!_0x594fa3)return;const _0x8bc29=this['_sidebarItemViewToAnnotation']['get'](_0x594fa3),_0x123a2e=this['_activeAnnotation'];_0x123a2e&&_0x123a2e===_0x8bc29?this['_alignAfterItem'](_0x594fa3,_0x343e81):this['_alignBeforeItem'](_0x343e81,_0x594fa3);}['_alignForBottomChange'](_0x2935a7){if(!_0x2935a7['content']['length'])return;const _0x1bd71e=this['_getItemAfter'](_0x2935a7);if(!_0x1bd71e)return;const _0x544df4=this['_sidebarItemViewToAnnotation']['get'](_0x1bd71e),_0x41d13c=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x163d93=this['_activeAnnotation'];_0x163d93&&_0x163d93===_0x544df4&&_0x41d13c?(this['_alignBeforeItem'](_0x1bd71e,_0x2935a7),this['_alignAfterItem'](_0x2935a7,_0x1bd71e)):_0x163d93&&_0x163d93===_0x544df4?this['_alignBeforeItem'](_0x1bd71e,_0x2935a7):this['_alignAfterItem'](_0x2935a7,_0x1bd71e);}['_recalculate'](_0x183cca,_0xce361f){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x533463,changedProp:_0x28939b}of this['_recalculateBuffer'])'top'===_0x28939b?this['_alignForTopChange'](_0x533463):this['_alignForBottomChange'](_0x533463);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x183cca,'changedProp':_0xce361f});}['getSidebarItemView'](_0x409851){return this['_annotationToSidebarItemView']['get'](_0x409851);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x587b00){const _0x501d3e=this['getSidebarItemView'](_0x587b00);this['stopListening'](_0x501d3e),this['stopListening'](_0x587b00['view']),_0x501d3e['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x587b00),this['_sidebarItemViewToAnnotation']['delete'](_0x501d3e);}['_createSidebarView'](){const _0xc058ae=new _i(this['context']['locale']);return _0xc058ae['render'](),this['on']('change:_lastItem',(_0x126319,_0xdb19f1,_0x3925b9,_0x2cd5d4)=>{_0x2cd5d4&&_0xc058ae['unbind']('minHeight'),_0x3925b9?_0xc058ae['bind']('minHeight')['to'](_0x3925b9,'bottom'):_0xc058ae['minHeight']=null;}),_0xc058ae;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0xe0c5e){const _0x13ca32=this['_sidebarItemViewToAnnotation']['get'](_0xe0c5e),_0x420069=_0x13ca32&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x13ca32)-0x1);return _0x420069&&this['getSidebarItemView'](_0x420069)||null;}['_getItemAfter'](_0x18ece3){const _0x4da04e=this['_sidebarItemViewToAnnotation']['get'](_0x18ece3),_0x8ddb6f=_0x4da04e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4da04e)+0x1);return _0x8ddb6f&&this['getSidebarItemView'](_0x8ddb6f)||null;}['_alignBeforeItem'](_0x2127a1,_0x488bbd){_0x2127a1['updateHeight']();const _0x57c06f=vi(_0x488bbd['bottom']+this['_spaceBetweenItems'],_0x2127a1['top']);return!!_0x57c06f&&(this['_setItemTop'](_0x488bbd,_0x488bbd['top']-_0x57c06f),!0x0);}['_alignAfterItem'](_0x154860,_0x341c33){_0x154860['updateHeight']();const _0x4f7245=vi(_0x154860['bottom']+this['_spaceBetweenItems'],_0x341c33['top']);return!!_0x4f7245&&(this['_setItemTop'](_0x341c33,_0x341c33['top']+_0x4f7245,!0x1),!0x0);}['_alignToTargetRect'](_0x541c9c){const _0x282e70=this['_sidebarItemViewToAnnotation']['get'](_0x541c9c);if(!_0x282e70||!_0x282e70['target']||!_0x282e70['targetRect'])return;const _0x34d5ac=this['_getTargetTop'](_0x282e70,_0x282e70['targetRect']);this['_setItemTop'](_0x541c9c,_0x34d5ac);}['_getTargetTop'](_0x549867,_0x7be2d){if(null===_0x7be2d)return 0x0;if(_0x549867['target']instanceof _0x4b7761)return _0x7be2d['top'];{const _0x2dd9cc=new _0x4b7761(this['view']['element'])['top'];return _0x7be2d['top']-_0x2dd9cc;}}['_setItemTop'](_0x101f0b,_0x4c37ca,_0x954e70=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x954e70&&(_0x4c37ca=Math['max'](_0x4c37ca,this['_getMaxAvailableTop'](_0x101f0b))),_0x101f0b['top']=_0x4c37ca;}['_getMaxAvailableTop'](_0x251969){let _0x335aa0=this['_getItemBefore'](_0x251969),_0x12e48d=0x0;for(;_0x335aa0;)_0x335aa0['updateHeight'](),_0x12e48d+=this['_spaceBetweenItems']+_0x335aa0['height'],_0x335aa0=this['_getItemBefore'](_0x335aa0);return _0x12e48d;}}function vi(_0x3d579d,_0x1bccb4){return Math['max'](_0x3d579d-_0x1bccb4,0x0);}function yi(_0x2dea21){return null!==_0x2dea21&&'object'==typeof _0x2dea21&&0x1===_0x2dea21['nodeType'];}class Ci extends _0x3455c6{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x32a7ff){super(_0x32a7ff),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2905f3(),this['_refreshPositioningDebounced']=_0x21b888(()=>{_0x32a7ff['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x53e4b2=this['context']['plugins']['get'](pi),_0x26632e=this['context']['plugins']['get'](Ti);_0x53e4b2['register']('wideSidebar',this),_0x26632e['container']&&_0x53e4b2['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2cc8f1){if(_0x2cc8f1===this['activeAnnotation'])return;const _0x2ed6f3=this['context']['plugins']['get'](Ti);_0x2ed6f3['_activeAnnotation']=_0x2cc8f1;const _0xbceb10=this['activeAnnotation'];_0x2ed6f3['refresh']({'blurredAnnotation':_0xbceb10,'activatedAnnotation':_0x2cc8f1}),this['activeAnnotation']=_0x2cc8f1;}['attach'](_0x27277c){this['annotations']=_0x27277c;const _0x40c9fd=this['context']['plugins']['get'](Ti);if(_0x40c9fd['_annotations']=_0x27277c,this['isAttached'])throw new _0x5a6372('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x40c9fd,'set:container',()=>{this['detach'](),this['listenTo'](_0x40c9fd,'change:container',_0x1bcc80=>{_0x1bcc80['off'](),this['attach'](_0x27277c);});}),_0x40c9fd['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x35d4d1=_0x1c81b4=>{_0x1c81b4['updateTargetRect'](),_0x40c9fd['addAnnotation'](_0x1c81b4);};for(const _0x11c140 of _0x27277c)_0x35d4d1(_0x11c140);this['listenTo'](_0x27277c,'add',(_0x49c7e5,_0x543a16)=>{_0x35d4d1(_0x543a16);}),this['listenTo'](_0x27277c,'remove',(_0x3f5b81,_0x32ae66,_0x20a676)=>{_0x40c9fd['rearrange']({'removedAnnotation':_0x32ae66,'previousAnnotation':_0x27277c['get'](_0x20a676-0x1),'nextAnnotation':_0x27277c['get'](_0x20a676+0x1)}),_0x32ae66===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x27277c,'focus',(_0x165894,_0x3c7a0c)=>{this['setActiveAnnotation'](_0x3c7a0c);}),this['listenTo'](_0x27277c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1f2f66=this['context']instanceof _0x3b68bd?this['context']['editors']:new _0x2905f3([this['context']]);for(const _0x4a58e6 of _0x1f2f66)this['_integrateWithEditorAnnotations'](_0x4a58e6);this['listenTo'](_0x1f2f66,'add',(_0x287481,_0x331710)=>{this['listenTo'](_0x331710,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x331710);});}),this['listenTo'](_0x1f2f66,'remove',(_0xe6508b,_0x15e509)=>{_0x15e509['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x15e509['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5a6372('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1b5026=this['context']['plugins']['get'](Ti);_0x1b5026['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1b5026),this['stopListening'](this['annotations']),this['context']instanceof _0x3b68bd&&this['stopListening'](this['context']['editors']);for(const _0x1eeb23 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1eeb23);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4c15e4){if(!_0x4c15e4['plugins']['has']('EditorAnnotations'))return;const _0x573236=_0x4c15e4['plugins']['get']('EditorAnnotations'),_0x3cf438=()=>{const _0x1b8be6=_0x573236['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1b8be6[0x0]||null);};this['listenTo'](_0x573236,'refresh',_0x3cf438),this['listenTo'](_0x573236,'blur',(_0x33730b,{isAnnotationTracked:_0x21c518})=>{this['activeAnnotation']&&_0x21c518(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x573236,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xcf904b=>{_0x573236['hasDomSelection']()&&(_0x3cf438(),_0xcf904b['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x573236);}['_destroyEditorAnnotationsIntegration'](_0x3f88b8){this['stopListening'](_0x3f88b8),this['_editorAnnotations']['remove'](_0x3f88b8);}}class Ii extends _0x2b6d9d{['counterView'];constructor(_0x1b1697){super(_0x1b1697);const _0x171374=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x390de1,_0x3c80ed)=>_0x390de1?'...':_0x3c80ed['toString']()),this['set']('annotationType',''),this['icon']=_0x4079b6,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x11143f(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x171374['to']('annotationType',_0x52bb7c=>'ck-annotation-counter__badge--'+_0x52bb7c),_0x171374['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x171374['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x3455c6{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e08eb){super(_0x4e08eb),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1e2c28())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2905f3(),this['_refreshPositioningDebounced']=_0x21b888(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2db83f){this['annotations']=_0x2db83f;const _0x1462d1=this['context']['plugins']['get'](Ti),_0x9bb601=this['balloonPanelView'];if(_0x1462d1['_annotations']=_0x2db83f,this['isAttached'])throw new _0x5a6372('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1462d1,'set:container',()=>{this['detach'](),this['listenTo'](_0x1462d1,'change:container',_0x77ba68=>{_0x77ba68['off'](),this['attach'](_0x2db83f);});}),_0x1462d1['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5a978b=_0x1af2f3=>{const _0x1fb10e=new Ii(this['context']['locale']);_0x1462d1['addAnnotation'](_0x1af2f3,_0x1fb10e),this['_annotationToNarrowView']['set'](_0x1af2f3,_0x1fb10e),_0x1fb10e['bind']('isDirty','annotationType','number')['to'](_0x1af2f3['view'],'isDirty','type','length'),_0x1fb10e['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x9bb601['content']['first']!==_0x1af2f3['view']?(this['_showBalloon'](_0x1af2f3),_0x1af2f3['view']['element']['focus'](),this['setActiveAnnotation'](_0x1af2f3)):this['setActiveAnnotation'](null);});};for(const _0x2ba993 of _0x2db83f)_0x5a978b(_0x2ba993);this['listenTo'](_0x2db83f,'add',(_0x3f1483,_0x26cdee)=>{_0x5a978b(_0x26cdee);}),this['listenTo'](_0x2db83f,'remove',(_0x4f14d7,_0xe3dd0c,_0x4997fb)=>{this['_annotationToNarrowView']['get'](_0xe3dd0c)['destroy'](),this['_annotationToNarrowView']['delete'](_0xe3dd0c),_0x1462d1['rearrange']({'removedAnnotation':_0xe3dd0c,'previousAnnotation':_0x2db83f['get'](_0x4997fb-0x1),'nextAnnotation':_0x2db83f['get'](_0x4997fb+0x1)}),_0xe3dd0c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2db83f,'focus',(_0x561272,_0x50684f)=>{this['setActiveAnnotation'](_0x50684f);}),this['listenTo'](_0x2db83f,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x37f34e,_0x3cd0bf)=>{_0x3cd0bf['keyCode']===_0x47e3e4['esc']&&_0x9bb601['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x9bb601['content']['first']),this['_hideBalloon'](),_0x3cd0bf['stopPropagation'](),_0x3cd0bf['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x38f220,_0x1427aa)=>{const _0xc501c3=_0x1427aa['target'];_0x9bb601['isVisible']&&_0x9bb601['element']['contains'](_0xc501c3)||_0x1462d1['view']['element']['contains'](_0xc501c3)||_0x38f220['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x13e275=>_0x13e275['contains'](_0xc501c3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3489e8=this['context']instanceof _0x3b68bd?this['context']['editors']:new _0x2905f3([this['context']]);for(const _0x333d0f of _0x3489e8)this['_integrateWithEditorAnnotations'](_0x333d0f);this['listenTo'](_0x3489e8,'add',(_0x28d4fc,_0x4cd0ca)=>{this['listenTo'](_0x4cd0ca,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4cd0ca);});}),this['listenTo'](_0x3489e8,'remove',(_0x2fc7ca,_0x2225b2)=>{_0x2225b2['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2225b2['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5e69d1){if(_0x5e69d1===this['activeAnnotation'])return;const _0x25edf0=this['context']['plugins']['get'](Ti);if(_0x25edf0['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5e69d1,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5e69d1)_0x25edf0['getSidebarItemView'](_0x5e69d1)?this['_showBalloon'](_0x5e69d1):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5e69d1;}['detach'](){if(!this['isAttached'])throw new _0x5a6372('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x367f6f=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4dd693=>_0x4dd693['destroy']()),this['_annotationToNarrowView']['clear'](),_0x367f6f['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3b68bd&&this['stopListening'](this['context']['editors']);for(const _0x412a0a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x412a0a);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'](_0x5210c8){if(!_0x5210c8['plugins']['has']('EditorAnnotations'))return;const _0x177189=_0x5210c8['plugins']['get']('EditorAnnotations'),_0x1a7629=this['context']['plugins']['get'](Ti),_0x47f60b=this['annotations'],_0x38818f=this['balloonPanelView'],_0x367676=()=>{const _0x26795e=_0x177189['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x26795e),this['setActiveAnnotation'](_0x26795e[0x0]||null);};this['listenTo'](_0x177189,'refresh',_0x367676),this['listenTo'](_0x177189,'blur',(_0x5a9568,{isAnnotationTracked:_0x1ec5f1})=>{this['activeAnnotation']&&_0x1ec5f1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x177189,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x47f60b,'blur',_0x31de0e=>{_0x177189['hasDomSelection']()&&_0x31de0e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2e6432,_0x255536)=>{const _0x3c8474=_0x255536['target'];_0x38818f['isVisible']&&_0x38818f['element']['contains'](_0x3c8474)||_0x1a7629['view']['element']['contains'](_0x3c8474)||this['activeAnnotation']&&_0x177189['hasDomSelection']()&&(_0x367676(),_0x2e6432['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x177189);}['_destroyEditorAnnotationsIntegration'](_0x20583f){_0x20583f&&(this['stopListening'](_0x20583f),this['_editorAnnotations']['remove'](_0x20583f));}['_setSelectedAnnotations'](_0x6c32dc){for(const _0x598f56 of this['_selectedAnnotations'])_0x6c32dc['includes'](_0x598f56)||this['_manuallyClosedAnnotationViews']['delete'](_0x598f56['view']);this['_selectedAnnotations']=_0x6c32dc;}['_refreshPositioning'](){const _0x534ade=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x534ade['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1e28a9){if(this['_manuallyClosedAnnotationViews']['has'](_0x1e28a9['view']))return;const _0x5902ce=this['balloonPanelView']['content']['first'];_0x5902ce!==_0x1e28a9['view']?(_0x5902ce&&this['_detachListeners'](_0x5902ce),this['_attachListeners'](_0x1e28a9['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1e28a9['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xf9cac4=this['balloonPanelView']['content']['first'],_0x487dc7=_0xf9cac4&&this['annotations']['getByView'](_0xf9cac4);if(!_0x487dc7||!this['_annotationToNarrowView']['has'](_0x487dc7))return;const _0x1e3caf=this['_annotationToNarrowView']['get'](_0x487dc7)['element'],_0x30a991=(function(){const _0x5ace57=ht['defaultPositions'];return[_0x5ace57['southArrowNorthEast'],_0x5ace57['northArrowSouthEast'],_0x5ace57['southArrowNorth'],_0x5ace57['northArrowSouth'],_0x5ace57['southArrowNorthWest'],_0x5ace57['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1e3caf,'positions':_0x30a991});}['_hideBalloon'](){const _0x153f21=this['balloonPanelView'],_0xac1158=_0x153f21['content']['first'];_0xac1158&&(this['_detachListeners'](_0xac1158),_0x153f21['unpin'](),_0x153f21['content']['clear']());}['_attachListeners'](_0x4ac20f){this['listenTo'](_0x4ac20f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4ac20f,'Esc',(_0x3f6247,_0x16b501)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4ac20f),this['_hideBalloon'](),_0x16b501();});}['_detachListeners'](_0x297efa){this['stopListening'](_0x297efa);}}class Ei extends _0x26a1e4{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1eb14b){super(_0x1eb14b),_0x1eb14b['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1eb14b['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x21b888(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0xca1ca2=this['editor']['plugins']['get'](pi);_0xca1ca2['context']===this['editor']&&(_0xca1ca2['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x356fd3,_0x568cda)=>{const _0x4d43e3=this['_balloon'];if(this['isAttached']&&_0x4d43e3['visibleView']){const _0x52efee=this['annotations']['getByView'](_0x4d43e3['visibleView']);_0x52efee&&this['_closeAnnotation'](_0x52efee),_0x568cda();}}));}['afterInit'](){const _0x2656d3=this['editor']['plugins']['get'](pi);_0x2656d3['context']===this['editor']&&(_0x2656d3['hasActive']()||_0x2656d3['switchTo']('inline'));}['setActiveAnnotation'](_0x3e88a2){_0x3e88a2!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3e88a2&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3e88a2)&&this['_addAnnotationToBalloon'](_0x3e88a2,!0x0),_0x3e88a2['isActive']=!0x0),_0x3e88a2||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3e88a2);}['attach'](_0x2c3baf){this['annotations']=_0x2c3baf;const _0x5f1582=this['editor']['plugins']['get'](pi),_0x74da41=this['_balloon'];if(this['isAttached'])throw new _0x5a6372('inlineannotations-attach-already-attached',this);if(_0x5f1582['context']!==this['editor'])throw new _0x5a6372('inlineannotations-not-allowed-with-context',this);const _0x51555a=this['editor']['plugins']['get'](si);this['listenTo'](_0x51555a,'refresh',()=>{const _0x3161fb=_0x51555a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2bbd96,_0x3624a0;!this['_forceRefresh']&&(_0x2bbd96=_0x3161fb,_0x3624a0=this['_selectedAnnotations'],_0x2bbd96['length']===_0x3624a0['length']&&_0x2bbd96['every'](_0x1b6d67=>_0x3624a0['includes'](_0x1b6d67)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3161fb),this['setActiveAnnotation'](_0x3161fb[0x0]||null));}),this['listenTo'](_0x51555a,'blur',(_0x4d9f8c,{isAnnotationTracked:_0x44639c})=>{this['activeAnnotation']&&_0x44639c(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x51555a,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5d6797,_0x174189,_0x4b511f)=>{_0x4b511f||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2c3baf,'remove',(_0x4df415,_0x4d0574)=>{this['_removeAnnotationFromBalloon'](_0x4d0574),_0x4d0574===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x74da41,'change:visibleView',(_0x2a1d4c,_0xdca0de,_0x292bbb,_0x4e5dba)=>{_0x4e5dba&&this['stopListening'](_0x4e5dba);const _0x2a6b40=_0x2c3baf['getByView'](_0x292bbb);_0x292bbb&&_0x2a6b40&&(this['listenTo'](_0x292bbb,'change:height',()=>{_0x74da41['updatePosition']();}),this['listenTo'](_0x292bbb,'Esc',()=>{this['_closeAnnotation'](_0x2a6b40),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2a6b40&&this['setActiveAnnotation'](_0x2a6b40));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x74da41['visibleView']&&(_0x2c3baf['getByView'](_0x74da41['visibleView'])&&_0x74da41['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 _0x5a6372('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x37e6ca of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x37e6ca);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x49403b){for(const _0x4079af of this['_selectedAnnotations'])_0x49403b['includes'](_0x4079af)||this['_manuallyClosed']['delete'](_0x4079af);for(const _0x2a89ea of this['annotations'])_0x49403b['includes'](_0x2a89ea)||this['_removeAnnotationFromBalloon'](_0x2a89ea);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xf08141 of _0x49403b)this['_addAnnotationToBalloon'](_0xf08141);}this['_selectedAnnotations']=_0x49403b;}['_addAnnotationToBalloon'](_0x10ec32,_0x3b6830=!0x1){this['_manuallyClosed']['has'](_0x10ec32)||(this['_addedAnnotations']['has'](_0x10ec32)||this['_balloon']['hasView'](_0x10ec32['view'])||(this['_addedAnnotations']['add'](_0x10ec32),this['_balloon']['add']({'stackId':_0x10ec32['view']['id'],'view':_0x10ec32['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x10ec32)}})),_0x3b6830&&this['_balloon']['showStack'](_0x10ec32['view']['id']));}['_getBalloonTargetForAnnotation'](_0x463cab){const _0x2daa47=_0x463cab['target'],_0x2d75df=this['editor']['editing']['view'],_0xa88237=_0x2d75df['document']['selection']['getFirstRange'](),_0x3b745c=_0x2d75df['domConverter']['viewRangeToDom'](_0xa88237);if(_0x3b745c['collapse'](!0x0),_0x2daa47){if(_0x2daa47 instanceof _0x4b7761)return _0x2daa47;let _0x6b1dc7=[];for(const _0x1f72c7 of _0x2daa47)_0x6b1dc7['push'](..._0x4b7761['getDomElementRects'](_0x1f72c7));_0x6b1dc7=function(_0x43d17a){const _0x2a908d=[];let _0x3b1d3e=_0x43d17a[0x0];for(let _0x1540e7=0x1;_0x1540e7<_0x43d17a['length'];_0x1540e7++)if(Ni(_0x3b1d3e,_0x43d17a[_0x1540e7])){const _0x3888ac=_0x43d17a[_0x1540e7]['width'];_0x3b1d3e['width']+=_0x3888ac,_0x3b1d3e['right']+=_0x3888ac;}else _0x2a908d['push'](_0x3b1d3e),_0x3b1d3e=_0x43d17a[_0x1540e7];return _0x2a908d['push'](_0x3b1d3e),_0x2a908d;}(_0x6b1dc7);const _0x5ec704=_0x3b745c['getBoundingClientRect']();return _0x6b1dc7['find'](_0x6b282f=>_0x6b282f['top']<=_0x5ec704['top']&&_0x6b282f['bottom']>=_0x5ec704['bottom']&&_0x6b282f['left']<=_0x5ec704['left']&&_0x6b282f['right']>=_0x5ec704['right'])||_0x6b1dc7[0x0];}return _0x463cab['targetRect']||_0x3b745c;}['_removeAnnotationFromBalloon'](_0x4b055e){this['_addedAnnotations']['has'](_0x4b055e)&&this['_balloon']['hasView'](_0x4b055e['view'])&&(this['_addedAnnotations']['delete'](_0x4b055e),this['_balloon']['remove'](_0x4b055e['view']));}['_closeAnnotation'](_0x1d24be){this['_manuallyClosed']['add'](_0x1d24be),this['_removeAnnotationFromBalloon'](_0x1d24be);}}function Ni(_0x591285,_0xa3f804){return _0x591285['top']===_0xa3f804['top']&&_0x591285['bottom']===_0xa3f804['bottom']&&_0x591285['right']===_0xa3f804['left'];}class ki extends _0x11143f{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x11bf63,_0x1ef910){super(_0x11bf63),this['set']('isEmpty',!_0x1ef910['length']),this['focusTracker']=new _0xb01d3d(),this['_annotationViews']=_0x1ef910,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x241393({'focusables':_0x1ef910,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1ef910,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1ef910,'remove',(_0x182a4c,_0x2bf666)=>{_0x2bf666['isActive']&&this['focus'](),_0x1ef910['length']||(this['isEmpty']=!0x0);});const _0x42c58a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x11bf63,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1ef910},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x42c58a['if']('isEmpty','ck-hidden',_0x187ba3=>!_0x187ba3)]},'children':[{'text':bt(_0x11bf63,'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 _0x435bae of this['_annotationViews'])this['focusTracker']['add'](_0x435bae['element']);this['_annotationViews']['on']('change',(_0x113b58,{added:_0xc30e41,removed:_0x52d2af})=>{for(const _0x18f98b of _0xc30e41)this['focusTracker']['add'](_0x18f98b['element']);for(const _0x12ea62 of _0x52d2af)this['focusTracker']['remove'](_0x12ea62['element']);});}}class Oi extends _0x3455c6{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x30548d){super(_0x30548d),this['archivedThreads']=new _0x2905f3();}['init'](){const _0x1159a3=this['context'],_0x2a19c7=_0x1159a3['plugins']['get'](Qt),_0x1656bd=_0x1159a3['plugins']['get']($t);this['listenTo'](_0x2a19c7,'addCommentThread',(_0x2a4954,{threadId:_0x342b97})=>{const _0x5b1789=_0x2a19c7['getCommentThread'](_0x342b97);_0x5b1789['archivedAt']&&this['archivedThreads']['add'](_0x5b1789,this['_calculatePosition'](_0x5b1789['archivedAt'])),this['listenTo'](_0x5b1789,'change:archivedAt',(_0x2327f4,_0x3b0ec2,_0x5406bd)=>{_0x5406bd?this['archivedThreads']['has'](_0x5b1789)||this['archivedThreads']['add'](_0x5b1789,this['_calculatePosition'](_0x5b1789['archivedAt'])):this['archivedThreads']['has'](_0x5b1789)&&this['archivedThreads']['remove'](_0x5b1789);});}),this['listenTo'](_0x2a19c7,'removeCommentThread',(_0x39f798,{threadId:_0x46d006})=>{const _0x5ee729=_0x2a19c7['getCommentThread'](_0x46d006);this['stopListening'](_0x5ee729),this['archivedThreads']['has'](_0x5ee729)&&this['archivedThreads']['remove'](_0x5ee729);},{'priority':'highest'}),this['listenTo'](_0x1656bd['collection'],'focus',(_0x5b96dd,_0x148341)=>{_0x148341['isVisible']||(_0x148341['isActive']=!0x0,_0x1656bd['activate'](_0x148341));});}['_calculatePosition'](_0x1df3e2){const _0x2700b2=[...this['archivedThreads']]['findIndex'](_0x1fedd4=>_0x1fedd4['archivedAt']<_0x1df3e2);return _0x2700b2>-0x1?_0x2700b2:this['archivedThreads']['length'];}}class Mi extends _0x26a1e4{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x29e732){super(_0x29e732),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x291422=this['editor'],_0x527eac=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x291422['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2b6d9d,!0x0)),_0x291422['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xfb24bd=this['_createCommentsArchiveButton'](ot);return _0xfb24bd['set']({'role':'menuitemcheckbox'}),_0xfb24bd;});const _0x205f53=_0x291422['plugins']['get'](Oi),_0x15a7a6=_0x291422['plugins']['get']('Annotations'),_0x36a71a=_0x291422['plugins']['get']('CommentsRepository');_0x205f53['archivedThreads']['forEach'](_0x1b72ab=>{this['_handleNewThread'](_0x1b72ab);}),this['listenTo'](_0x205f53['archivedThreads'],'add',(_0x4140e4,_0x48a507)=>{this['_handleNewThread'](_0x48a507);}),this['listenTo'](_0x15a7a6['collection'],'add',(_0x4068ca,_0x2b6e8d)=>{const _0x231e8e=this['_pendingThreads']['find'](_0x45b442=>{const _0x1d0c7c=_0x36a71a['_threadToController']['get'](_0x45b442);return _0x1d0c7c&&_0x2b6e8d['innerView']===_0x1d0c7c['view'];});if(_0x231e8e){const _0x493713=this['_calculatePosition'](_0x231e8e['archivedAt']);this['_addAnnotationToArchive'](_0x2b6e8d,_0x493713),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x231e8e),0x1);}}),this['listenTo'](_0x205f53['archivedThreads'],'remove',(_0x567da9,_0xe3adc5)=>{const _0x4f5e68=_0x291422['config']['get']('collaboration.channelId');if(!_0x4f5e68||_0xe3adc5['channelId']===_0x4f5e68){if(this['_pendingThreads']['includes'](_0xe3adc5))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xe3adc5),0x1);else{const _0x4f8b5e=_0x36a71a['_threadToController']['get'](_0xe3adc5),_0x4199ba=_0x15a7a6['getByInnerView'](_0x4f8b5e['view']);this['annotationViews']['remove'](_0x4199ba['view']),this['stopListening'](_0x4199ba),this['stopListening'](_0x4199ba['focusableElements']);}}}),this['listenTo'](_0x15a7a6['collection'],'add',(_0x3915f9,_0x40efcc)=>{this['listenTo'](_0x40efcc,'escape',_0x527eac);}),this['listenTo'](_0x15a7a6['collection'],'remove',(_0x420e5b,_0x18f626)=>{this['stopListening'](_0x18f626,'escape',_0x527eac);});}['_addAnnotationToArchive'](_0x1e548c,_0x24dbeb){this['listenTo'](_0x1e548c,'set:isVisible',_0x57c393=>{_0x57c393['return']=!0x1,_0x57c393['stop']();}),this['annotationViews']['add'](_0x1e548c['view'],_0x24dbeb);}['_handleNewThread'](_0x5e9bbf){const _0x1fd180=this['editor']['plugins']['get']('CommentsRepository'),_0x35e2ca=this['editor']['plugins']['get']('Annotations'),_0x3ccc0f=this['editor']['config']['get']('collaboration.channelId');if(!_0x3ccc0f||_0x5e9bbf['channelId']===_0x3ccc0f){const _0x558c18=_0x1fd180['_threadToController']['get'](_0x5e9bbf);if(!_0x558c18)return void this['_pendingThreads']['push'](_0x5e9bbf);const _0x2e0bab=this['_calculatePosition'](_0x5e9bbf['archivedAt']),_0x4fc53d=_0x35e2ca['getByInnerView'](_0x558c18['view']);_0x4fc53d['isVisible']&&_0x35e2ca['_visibleAnnotations']['remove'](_0x4fc53d),this['_addAnnotationToArchive'](_0x4fc53d,_0x2e0bab);}}['_calculatePosition'](_0x4a672f){const _0x4d994d=this['editor']['config']['get']('collaboration.channelId'),_0x6162c6=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x396398=>_0x396398['channelId']===_0x4d994d)['findIndex'](_0x26bc34=>_0x26bc34['archivedAt']<_0x4a672f);return _0x6162c6<0x0||_0x6162c6>this['annotationViews']['length']?this['annotationViews']['length']:_0x6162c6-0x1;}['_toggleDialog'](){const _0x878268=this['editor'],_0x54df34=_0x878268['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x878268['locale'],this['annotationViews'])),'commentsArchive'===_0x54df34['id']?_0x54df34['hide']():_0x54df34['show']({'id':'commentsArchive','title':bt(_0x878268['locale'],'COMMENTS_ARCHIVE'),'icon':_0xc7f879,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x1dc4a2,_0x49b9f4=!0x1){const _0x2c743a=this['editor']['locale'],_0x389867=this['editor']['plugins']['get']('Dialog'),_0x5b8b73=new _0x1dc4a2(_0x2c743a);return _0x5b8b73['bind']('isEnabled')['to'](this,'isEnabled'),_0x5b8b73['bind']('isOn')['to'](_0x389867,'id',_0x177f67=>'commentsArchive'===_0x177f67),_0x5b8b73['set']({'label':bt(_0x2c743a,'COMMENTS_ARCHIVE'),'icon':_0xc7f879,'isToggleable':!0x0}),_0x49b9f4&&(_0x5b8b73['tooltip']=!0x0),this['listenTo'](_0x5b8b73,'execute',()=>this['_toggleDialog']()),_0x5b8b73;}['_hideDialogOnAnnotationEscape']=_0x166a47=>{const _0x1087fc=_0x166a47['source'];if(!this['annotationViews']['has'](_0x1087fc['view']))return;const _0x4dd6c4=this['editor']['plugins']['get']('Dialog');_0x4dd6c4['isOpen']&&'commentsArchive'===_0x4dd6c4['id']&&(_0x4dd6c4['hide'](),_0x166a47['stop']());};}class Ri extends _0x26a1e4{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
23
+ import{Editor as _0x4fc054,ContextPlugin as _0xb27427,PendingActions as _0x2ed1f6,Command as _0x31abbd,Plugin as _0x4bbe68,Context as _0x4ac0d8}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x4ddf56,uid as _0x940a35,KeystrokeHandler as _0x509705,FocusTracker as _0x5eabc8,diff as _0x4d61d,Collection as _0x1b7f5e,Rect as _0x3f2835,CKEditorError as _0x22464a,first as _0x322b1a,priorities as _0x5bb197,scrollViewportToShowTarget as _0x10d1ea,getEnvKeystrokeText as _0x510c81,toUnit as _0x4dd385,DomEmitterMixin as _0x18ed30,keyCodes as _0x4ec1a3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x21e8f4,AriaDescriptionView as _0x482b06,setupThreadKeyboardNavigation as _0x4d5c2a,ConfirmMixin as _0x5d32d6,LateFocusButtonView as _0x4b07ac,trimHtml as _0x1b69c1,LateFocusDropdownButtonView as _0x22d2fa,FOCUS_ANNOTATION_KEYSTROKE as _0x3b6ce4,Users as _0x1144d3,getDateTimeFormatter as _0x72cfd4,hashObject as _0x582319,getAllMarkersDomElementsSorted as _0x2a1160,surroundingMarkersDetector as _0x382293}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x1c086c,cloneDeep as _0x5808c4,set as _0x46ed99,unset as _0x4e79d5,isEqual as _0x4af9ed,debounce as _0x5551ef}from'es-toolkit/compat';import{IconUndo as _0x4bbd72,IconCheck as _0x860d3c,IconPencil as _0x5f245b,IconRemoveComment as _0x405826,IconThreeVerticalDots as _0x391e8f,IconAddComment as _0x25812f,IconCommentsArchive as _0x3f0ee7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0xcb877,InlineEditableUIView as _0x1f9778,EditorUI as _0x6741f9,View as _0x52cc1d,FocusCycler as _0x2b6197,ButtonView as _0x56992c,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
24
+ _0x4ddf56(){['model'];['view'];constructor(_0xb300bd,_0x4724da){super(),this['model']=_0xb300bd,this['model']['_isAttached']=!0x0,this['view']=_0x4724da,this['listenTo'](_0x4724da,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4724da,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4724da,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4724da,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4724da,'addComment',(_0xd87bb1,_0x2154e6)=>this['addComment'](_0x2154e6)),this['listenTo'](_0x4724da,'updateComment',(_0x273ae3,_0x545bd5,_0x35bff6)=>this['updateComment'](_0x545bd5,_0x35bff6)),this['listenTo'](_0x4724da,'removeComment',(_0x404841,_0x6aa79f)=>this['removeComment'](_0x6aa79f));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x381ea4){this['model']['addComment']({'content':_0x381ea4,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x4b8469,_0x1c0229){this['model']['getComment'](_0x4b8469)['update']({'content':_0x1c0229});}['removeComment'](_0x2fe530){this['model']['getComment'](_0x2fe530)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x41c55a,_0xbac866,_0x4e2c13){const t=_0x41c55a['t'];switch(_0xbac866){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'},_0x4e2c13);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'},_0x4e2c13);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'},_0x4e2c13);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'},_0x4e2c13);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x4e2c13);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'},_0x4e2c13);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'},_0x4e2c13);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'},_0x4e2c13);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Et extends _0xcb877{['main'];['editable'];constructor(_0x3e51f0,_0x4a07aa){super(_0x3e51f0);const _0x5a6107=_0x940a35();this['main']=this['createCollection'](),this['editable']=new _0x1f9778(_0x3e51f0,_0x4a07aa,void 0x0,{'label':()=>bt(_0x3e51f0,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3e51f0['uiLanguageDirection'],'lang':_0x3e51f0['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5a6107},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Nt extends _0x6741f9{['view'];constructor(_0x157334){super(_0x157334),this['view']=new Et(_0x157334['locale'],_0x157334['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x458645=this['editor']['editing']['view'],_0x1fead9=this['view']['editable'],_0x27e7c0=_0x458645['document']['getRoot']();_0x1fead9['name']=_0x27e7c0['rootName'],this['view']['render']();const _0x4949c2=_0x1fead9['element'];this['setEditableElement'](_0x1fead9['name'],_0x4949c2),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x458645['attachDomRoot'](_0x4949c2),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
25
+ _0x4ddf56(_0x4fc054){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>kt)());constructor(_0x598c04={}){function _0x29fe53(_0x7f38e8){return _0x7f38e8['map'](_0x259716=>String['fromCharCode'](_0x259716))['join']('');}(_0x598c04=Object['assign']({},_0x598c04))['plugins']||(_0x598c04['plugins']=Ot['defaultPlugins']),super(_0x598c04),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x29fe53([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x29fe53([0x76,0x69,0x65,0x77])][_0x29fe53([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x29fe53([0x61,0x75,0x74,0x6f]),this[_0x29fe53([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x29fe53([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x29fe53([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x29fe53([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x29fe53([0x6f,0x6b])});}['create'](){const _0x2ad2d6=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2ad2d6))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4533e9=>{const _0x47c45a=this['model']['document']['getRoot'](),_0x4bfc28=_0x47c45a&&_0x47c45a['getChild'](_0x47c45a['childCount']-0x1);_0x4533e9['setSelection'](_0x4bfc28,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x176ec6=this['editing']['view'],_0x4684ce=_0x176ec6['document']['getRoot'](),_0x3cea20=_0x4684ce['getChild'](0x0);_0x4684ce['childCount']>0x1||!_0x3cea20||'p'!=_0x3cea20['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x176ec6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3cea20['placeholder']=this['placeholder']),ut({'view':_0x176ec6,'element':_0x3cea20,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3cea20);}}class Mt extends _0x52cc1d{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x41513d,_0x16bd7d={}){super(_0x41513d),this['editor']=null,this['_editorConfig']=_0x16bd7d,this['set']('value',_0x16bd7d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x41513d,'Reply...')),this['set']('submitLabel',bt(_0x41513d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x509705(),this['focusTracker']=new _0x5eabc8(),this['focusCycler']=new _0x2b6197({'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',(_0x463b01,_0x234647)=>{this['cancelButtonView']['fire']('execute'),_0x234647();}),this['keystrokes']['set']('Ctrl+Enter',(_0x6c5043,_0x3c465d)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3c465d());}),this['on']('submit',(_0x2cb798,_0x3c8854)=>{_0x3c8854['length']>0xfde8?(alert(bt(_0x41513d,'TOO_LONG_COMMENT_ALERT',[_0x3c8854['length'],0xfde8])),_0x2cb798['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x13142f=this['editor'];this['element']['insertBefore'](_0x13142f['ui']['element'],this['element']['firstChild']),_0x13142f['model']['document']['on']('change',()=>this['value']=_0x13142f['getData']()),_0x13142f['bind']('placeholder')['to'](this),this['focusables']['add'](_0x13142f['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2f5aeb){-0x1===_0x2f5aeb?(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:_0x35b4d6}=this,_0x1126ad=new _0x56992c(_0x35b4d6);return _0x1126ad['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1126ad['withText']=!0x0,_0x1126ad['bind']('label')['to'](this,'submitLabel'),_0x1126ad['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1126ad['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x15b396,_0x1a86d9)=>!_0x1a86d9&&!!_0x15b396['trim']()),_0x1126ad;}['_createCancelButton'](){const {locale:_0x256dc4}=this,_0x21a481=new _0x56992c(_0x256dc4);return _0x21a481['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x21a481['label']=bt(_0x256dc4,'Cancel'),_0x21a481['withText']=!0x0,_0x21a481['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x21a481;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x6e80f1=>{this['focusTracker']['add'](_0x6e80f1['element']);}),this['focusables']['on']('change',(_0x17aa2e,_0x2c40b6)=>{for(const _0x381c84 of Array['from'](_0x2c40b6['added'])['reverse']())this['focusTracker']['add'](_0x381c84['element']);});}}class Rt extends _0x52cc1d{constructor(_0xfa99b8,_0x123c0d,_0x16dfbd){super(_0xfa99b8),this['commentInputView']=new Mt(_0xfa99b8,_0x16dfbd),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4aef0d,_0x37aa8e)=>_0x4aef0d||!!_0x37aa8e),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 _0x21e8f4(_0xfa99b8,_0x123c0d),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'](_0x4b245e){this['commentInputView']['focus'](_0x4b245e);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x502776,_0x429b9d)=>{const {submitButtonView:_0x40dcf3,cancelButtonView:_0x2c1fd3,editor:_0x3e1f83}=this['commentInputView'];[_0x40dcf3['element'],_0x2c1fd3['element'],_0x3e1f83?_0x3e1f83['editing']['view']['getDomRoot']():null]['filter'](_0x2eb840=>_0x2eb840)['some'](_0x498c1c=>_0x498c1c['contains'](_0x429b9d['target']))||(this['focus'](),_0x429b9d['preventDefault']());});}}class xt extends _0x52cc1d{constructor(_0x4fe146){super(_0x4fe146);const _0x4fda3c=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4fda3c['to']('count',_0x2b96e4=>bt(_0x4fe146,'NUMBER_OF_COMMENTS',_0x2b96e4))}]});}}class St extends _0x52cc1d{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x21704f,_0x143744,_0x464482){super(_0x21704f);const _0x4e3952=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x143744['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x143744,this['_config']=_0x464482,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5eabc8(),this['keystrokes']=new _0x509705(),this['focusCycler']=new _0x2b6197({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4cfdde=>this['commentViews']['map'](_0x4e1b95=>_0x4e1b95['element'])['includes'](_0x4cfdde['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x21704f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x34fc31=>_0x34fc31-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1e14a5 of _0x143744['comments'])this['_handleNewCommentModel'](_0x1e14a5);this['_handleInfoComment'](),this['listenTo'](_0x143744['comments'],'add',(_0x10fa63,_0x4003ec)=>{const _0x2b4f48=this['_calculatePosition'](_0x4003ec);this['length']++,this['_handleNewCommentModel'](_0x4003ec,_0x2b4f48),this['refreshVisibleViews']();}),this['listenTo'](_0x143744['comments'],'remove',(_0x32b497,_0x349f15)=>{this['length']--,this['_handleRemoveCommentModel'](_0x349f15),this['refreshVisibleViews']();}),this['listenTo'](_0x143744,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x143744,'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',_0x4e3952['if']('length','ck-hidden',_0x4a5712=>!_0x4a5712)],'aria-label':bt(_0x21704f,'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'](_0x22c3f6){-0x1===_0x22c3f6?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5a7876 of this['commentViews'])_0x5a7876['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x49b6d8,_0x3d63f7){const _0x1e1fee=new this['_config']['CommentView'](this['locale'],_0x49b6d8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1e1fee['viewUid']=_0x49b6d8['id'],_0x1e1fee['delegate']('removeComment')['to'](this),_0x1e1fee['delegate']('updateComment')['to'](this),_0x1e1fee['delegate']('resolveCommentThread')['to'](this),_0x1e1fee['delegate']('editorReady')['to'](this),_0x1e1fee['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1e1fee,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1e1fee,_0x3d63f7);}['_calculatePosition'](_0x1e10ef){const _0x4278fa=this['_model']['_findOptimalIndex'](_0x1e10ef);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1e10ef['authoredAt']?_0x4278fa-0x1:_0x4278fa:_0x4278fa-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x18a26a={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x18a26a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x18a26a));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x79d062){const _0x5ac3df=this['commentViews']['remove'](_0x79d062['id']);this['stopListening'](_0x5ac3df),_0x5ac3df['isEditMode']&&this['_updateHasDirtyComment'](),_0x5ac3df['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x49595f=>_0x49595f['isEditMode']);}['_rearrangeCollapse'](){const _0x57eea4=function(_0x28f115){const _0x18c16f=new _0x1b7f5e();for(const _0xf9b958 of _0x28f115)_0x18c16f['add'](_0xf9b958);return _0x18c16f;}(this['commentViews']),_0xf1b5aa=this['_collapsedCommentsView']['count'];for(let _0x5234ee=0x1;_0x5234ee<=_0xf1b5aa;_0x5234ee++)_0x57eea4['remove'](0x1);for(const _0x5dc78a of _0x57eea4)_0x5dc78a['collapse']();_0xf1b5aa>0x0&&_0x57eea4['add'](this['_collapsedCommentsView'],0x1),Pt(_0x4d61d(Array['from'](this['visibleViews']),Array['from'](_0x57eea4)),this['visibleViews'],_0x57eea4);}['_rearrangeExpand'](){Pt(_0x4d61d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x37817b of this['visibleViews'])_0x37817b['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4302b3=>{this['focusTracker']['add'](_0x4302b3['element']),this['keystrokes']['listenTo'](_0x4302b3['element']);}),this['commentViews']['on']('change',(_0x2f0cba,_0x417fab)=>{for(const _0x488b40 of _0x417fab['removed'])this['focusTracker']['remove'](_0x488b40['element']),this['keystrokes']['stopListening'](_0x488b40['element']);for(const _0x4f96b3 of Array['from'](_0x417fab['added'])['reverse']())this['focusTracker']['add'](_0x4f96b3['element']),this['keystrokes']['listenTo'](_0x4f96b3['element']);});}}function Pt(_0x19935d,_0x3b3cfc,_0x3e855d){let _0x4755b5=0x0;for(const _0x58aed4 of _0x19935d)switch(_0x58aed4){case'insert':_0x3b3cfc['add'](_0x3e855d['get'](_0x4755b5),_0x4755b5),_0x4755b5++;break;case'delete':_0x3b3cfc['remove'](_0x4755b5);break;case'equal':_0x4755b5++;}}class Lt extends _0x52cc1d{constructor(_0xe2154c){super(_0xe2154c);const _0x55401a=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x55401a['to']('contextValue',_0x39493a=>bt(_0xe2154c,'THREAD_CONTEXT_LABEL',_0x39493a)),'tabindex':-0x1},'children':[{'text':_0x55401a['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x52cc1d{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x47242e,_0x411caf){super(_0x47242e);const _0x4952fd=this['bindTemplate'];this['_model']=_0x411caf,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5eabc8(),this['keystrokes']=new _0x509705(),this['focusCycler']=new _0x2b6197({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x277693=>!!_0x277693),this['bind']('contextValue')['to'](this['_model'],'context',_0x3a46a3=>_0x3a46a3&&_0x3a46a3['value']?this['_trimContextValue'](_0x3a46a3['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x4952fd['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 _0x453bb7=new _0x56992c(this['locale']);return _0x453bb7['label']=bt(this['locale'],'Reopen'),_0x453bb7['tooltip']=bt(this['locale'],'Reopen'),_0x453bb7['icon']=_0x4bbd72,_0x453bb7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x594a76=>!_0x594a76),_0x453bb7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xb8c264,_0x34fe0a)=>_0xb8c264&&_0x34fe0a),_0x453bb7['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x453bb7;}['_trimContextValue'](_0x1646c9){if(_0x1646c9['length']<0x96)return _0x1646c9;const _0x2ac813=_0x1646c9['lastIndexOf']('\x20',0x93);return _0x1646c9['substring'](0x0,_0x2ac813>-0x1?_0x2ac813:0x93)+'...';}['_attachContextActions'](){const _0x43a8cc=this['element']['querySelector']('.ck-context'),_0x4086d0=_0x43a8cc['querySelector']('.ck-context__value');this['listenTo'](_0x43a8cc,'mouseenter',()=>{_0x4086d0['offsetWidth']<_0x4086d0['scrollWidth']&&_0x43a8cc['classList']['add']('overlay');}),this['listenTo'](_0x43a8cc,'mouseleave',()=>{_0x43a8cc['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x244f61 of this['focusables'])this['focusTracker']['add'](_0x244f61['element']),this['keystrokes']['listenTo'](_0x244f61['element']);}['_createContextView'](){const _0x684f5d=new Lt(this['locale']);return _0x684f5d['bind']('contextValue')['to'](this),_0x684f5d;}}class Vt extends _0x52cc1d{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1cbc70,_0x16a892,_0x1863b1,_0x340159){super(_0x1cbc70),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x16a892,this['_localUser']=_0x1863b1,this['_config']=_0x340159,this['commentThreadHeaderView']=new Dt(_0x1cbc70,_0x16a892),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x482b06(_0x1cbc70,bt(_0x1cbc70,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x1cbc70,_0x16a892,Object['assign']({'CommentView':this['_config']['CommentView']},_0x340159)),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',(_0x40bc63,_0x5ac1af)=>_0x40bc63||!!_0x5ac1af),this['bind']('isUnlinked')['to'](_0x16a892,'unlinkedAt',_0x3431ce=>!!_0x3431ce),this['bind']('ariaLabel')['to'](this,'length',_0x1cc961=>{const _0x2f0c2f=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x1cc961,_0x2f0c2f]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5eabc8(),this['keystrokes']=new _0x509705(),this['focusCycler']=new _0x2b6197({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2c72c6=>_0x2c72c6['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x4d5c2a(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xb9d6a4=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1bafca=_0xb9d6a4['commentInputView'];return _0xb9d6a4['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1bafca,'value',(_0x49f511,_0x141dc4,_0x30b5d3,_0x44437b,_0x5f4ca4)=>!!_0x5f4ca4||!!_0x44437b&&_0x30b5d3&&!_0x141dc4||_0x49f511&&_0x30b5d3&&!_0x141dc4),_0x1bafca['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x53b357,_0x27328f,_0x1df13a)=>{let _0x406c6d;return _0x406c6d=_0x1df13a&&_0x27328f?'Reply\x20to\x20reopen\x20discussion...':_0x53b357?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x406c6d);}),_0x1bafca['bind']('submitLabel')['to'](this,'length',_0x30e636=>bt(this['locale'],_0x30e636?'Reply':'Comment')),_0x1bafca['on']('submit',(_0x33f1bd,_0x307cbe)=>{this['fire']('addComment',_0x307cbe),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1bafca['on']('cancel',()=>{this['focus']();}),_0x1bafca['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1bafca['on']('cancel',_0x34c020=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x34c020['stop']());}),this['on']('change:isActive',(_0xe889f8,_0x140bfb,_0x5052cc)=>{_0x5052cc||this['length']||_0x1bafca['value']||this['fire']('removeCommentThread');}),_0xb9d6a4;}}class Bt extends/* #__PURE__ -- @preserve */
27
+ _0x5d32d6(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x3dedec,_0x204501,_0x143429,_0x32c83c){super(_0x3dedec,_0x204501,_0x143429,_0x32c83c),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x3dedec,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x379b90,_0xcd0990,_0x1d906a)=>{_0x1d906a||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5aa42f,_0x102ae0,_0x441885)=>{_0x441885&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4ced59=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4ced59['if']('isActive','ck-thread--active'),_0x4ced59['if']('isUnlinked','ck-thread--unlinked'),_0x4ced59['to']('actionIndicator',_0xfefba1=>_0xfefba1?'ck-thread--'+_0xfefba1:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4ced59['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 _0x471e4c of this['commentsListView']['commentViews'])_0x471e4c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x51a100}=this,_0x406391=this['commentsListView']['commentViews']['get'](0x0);_0x406391===this['_boundFirstCommentView']||_0x406391['isSystemComment']||(this['_boundFirstCommentView']=_0x406391,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x406391,'actionIndicator',_0x476db1=>'remove'===_0x476db1?'remove':null),_0x406391['placeholder']=bt(_0x51a100,'Write\x20a\x20comment...'),_0x406391['removeButton']['on']('execute',_0x1828a8=>{_0x1828a8['stop'](),this['showConfirm'](bt(_0x51a100,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x406391['focus']();}),_0x406391['actionBar']['add'](this['resolveButton'],0x0),_0x406391['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x282662=new _0x4b07ac(this['locale']);return _0x282662['label']=bt(this['locale'],'Resolve'),_0x282662['tooltip']=bt(this['locale'],'Resolve'),_0x282662['icon']=_0x860d3c,_0x282662['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x282662['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2e3695=>!_0x2e3695),_0x282662['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x249dc9,_0x2ad81e)=>_0x249dc9&&!_0x2ad81e),_0x282662['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x282662;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class Ht extends _0x52cc1d{constructor(_0x3bbc8c){super(_0x3bbc8c),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x95414,_0x5bfddd,_0x27096e)=>{this['element']['innerHTML']=_0x27096e;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x52cc1d{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1f2b52,_0x473d05,_0x5b643c){super(_0x1f2b52),this['_model']=_0x473d05,this['_config']=_0x5b643c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x473d05,'content',_0x473d05,'authoredAt',(_0x595833,_0x43c554)=>bt(_0x1f2b52,'COMMENT_ARIA_LABEL',[_0x473d05['author']['name'],_0x5b643c['formatDateTime'](_0x43c554),new DOMParser()['parseFromString'](_0x595833,'text/html')['body']['textContent'],_0x473d05['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x482b06(_0x1f2b52,bt(_0x1f2b52,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x5eabc8(),this['keystrokes']=new _0x509705(),this['focusCycler']=new _0x2b6197({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3c11ce=>_0x3c11ce['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x48dd29=new Ht(this['locale']);return _0x48dd29['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x57bf71,_0x4dfc04)=>_0x4dfc04?_0x1b69c1(_0x57bf71,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x57bf71),_0x48dd29;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2424f5=new Mt(this['locale'],this['_config']['editorConfig']);return _0x2424f5['value']=this['_model']['content'],_0x2424f5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2424f5['submitLabel']=bt(this['locale'],'Save'),_0x2424f5['on']('submit',(_0x34a2a8,_0x13073f)=>{this['fire']('updateComment',this['_model']['id'],_0x13073f),this['switchToDisplayMode'](),this['focus']();}),_0x2424f5['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2424f5['once']('editorReady',()=>{_0x2424f5['focus']();}),_0x2424f5['createEditor'](),_0x2424f5['delegate']('editorReady')['to'](this),_0x2424f5['delegate']('editorDestroyed')['to'](this),_0x2424f5;}['_setupKeyboardNavigation'](){const _0x357385=this['element'];this['keystrokes']['listenTo'](_0x357385);for(const _0x149c0b of this['focusables'])this['focusTracker']['add'](_0x149c0b['element']),this['keystrokes']['listenTo'](_0x149c0b['element']);this['focusables']['on']('change',(_0x5ec8e1,_0x8fd978)=>{for(const _0x379b89 of _0x8fd978['removed'])this['focusTracker']['remove'](_0x379b89['element']),this['keystrokes']['stopListening'](_0x379b89['element']);for(const _0x1f87aa of _0x8fd978['added'])this['focusTracker']['add'](_0x1f87aa['element']),this['keystrokes']['listenTo'](_0x1f87aa['element']);}),this['keystrokes']['set']('enter',(_0xb7dc10,_0x5660d9)=>{_0x357385===_0xb7dc10['target']&&(this['focusCycler']['focusFirst'](),_0x5660d9());}),this['keystrokes']['set']('esc',(_0x4c257f,_0x51b116)=>{_0x357385!==_0x4c257f['target']&&(this['focus'](),_0x51b116());});}}class Ut extends/* #__PURE__ -- @preserve */
28
+ _0x5d32d6(Ft){['actionBar'];['userView'];constructor(_0x573958,_0x285d6e,_0x201e85){super(_0x573958,_0x285d6e,_0x201e85),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x573958,'Reply...')),this['bind']('authoredAt')['to'](_0x285d6e),this['bind']('resolvedAt')['to'](_0x285d6e),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 _0x21e8f4(_0x573958,_0x285d6e['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x285d6e,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x58ce29=this['bindTemplate'],_0xd4bd19=[{'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':_0x58ce29['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x58ce29['to']('authoredAt',_0x41d60d=>this['_config']['formatDateTime'](_0x41d60d))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x58ce29['if']('isEditMode','ck-comment__actions--hidden'),_0x58ce29['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']&&_0xd4bd19['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x58ce29['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x58ce29['if']('isEditMode','ck-comment--edit'),_0x58ce29['if']('isSystemComment','ck-comment--info'),_0x58ce29['to']('actionIndicator',_0x2d79c7=>_0x2d79c7?'ck-comment--'+_0x2d79c7:'')],'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':_0xd4bd19}]}]};}['_createEditButton'](){const _0x284d3f=new _0x56992c(this['locale']);return _0x284d3f['label']=bt(this['locale'],'Edit'),_0x284d3f['icon']=_0x5f245b,_0x284d3f['withText']=!0x0,_0x284d3f['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x284d3f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x415c23=>!_0x415c23),_0x284d3f['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x284d3f['on']('execute',()=>this['switchToEditMode']()),_0x284d3f;}['_createRemoveButton'](){const _0xb90f89=new _0x56992c(this['locale']);return _0xb90f89['label']=bt(this['locale'],'Remove'),_0xb90f89['icon']=_0x405826,_0xb90f89['withText']=!0x0,_0xb90f89['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xb90f89['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x21439e=>!_0x21439e),_0xb90f89['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xb90f89['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xb90f89;}['_createDropdown'](){const _0x160d73=it(this['locale'],_0x22d2fa),_0x495cbd=_0x160d73['panelView']['children'],_0x1c30a4=new et(this['locale']),_0x33031f=_0x160d73['bindTemplate'];st(_0x160d73,()=>this['items']['find'](_0x3a53b0=>_0x3a53b0['isVisible'])),_0x160d73['extendTemplate']({'attributes':{'class':[_0x33031f['if']('isVisible','ck-hidden',_0x218ca6=>!_0x218ca6)]}});const _0x3dd87e=(_0x435771,_0x493ea3=-0x1)=>{const _0x39a1df=new nt(this['locale']);_0x39a1df['children']['add'](_0x435771);const _0x429efa=_0x493ea3>-0x1?_0x493ea3:_0x1c30a4['items']['length'];_0x1c30a4['items']['add'](_0x39a1df,_0x429efa);const _0x3c8310=Array['from'](this['items']);_0x160d73['unbind']('isEnabled','isVisible'),_0x160d73['bind']('isEnabled')['toMany'](_0x3c8310,'isEnabled',(..._0x1faeaa)=>_0x1faeaa['some'](_0x1f7192=>_0x1f7192)),_0x160d73['bind']('isVisible')['toMany'](_0x3c8310,'isVisible',(..._0x5620e3)=>_0x5620e3['some'](_0x553e14=>_0x553e14));};_0x160d73['panelPosition']='sw',_0x160d73['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x391e8f});for(const _0x182a64 of this['items'])_0x3dd87e(_0x182a64);return _0x495cbd['add'](_0x1c30a4),_0x160d73['listenTo'](this['items'],'add',(_0x41ff10,_0x5372ab,_0x24c637)=>{_0x3dd87e(_0x5372ab,_0x24c637);}),_0x160d73['listenTo'](this['items'],'remove',(_0xd8a035,_0x30b3f8,_0x50d65a)=>{_0x1c30a4['items']['remove'](_0x50d65a);}),_0x160d73;}['_attachActions'](_0xe38a5,_0x3a8666){const _0x6b397c=_0xe38a5&&_0xe38a5['element'];_0x6b397c&&(this['listenTo'](_0x6b397c,'mouseenter',()=>this['actionIndicator']=_0x3a8666),this['listenTo'](_0x6b397c,'focus',()=>this['actionIndicator']=_0x3a8666),this['listenTo'](_0x6b397c,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x6b397c,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3fa6db=super['_createCommentInputView']();return _0x3fa6db['bind']('placeholder')['to'](this),_0x3fa6db;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x2a815e){const _0x1bae5f=_0x1c086c(_0x2a815e,0x1e),_0x4b4394=new MutationObserver(_0x234cb1=>{for(const _0xbeb695 of _0x234cb1)('attributes'==_0xbeb695['type']&&'class'==_0xbeb695['attributeName']||'childList'==_0xbeb695['type']||'characterData'==_0xbeb695['type'])&&_0x1bae5f();});return{'attach'(_0x4a5460){_0x4b4394['observe'](_0x4a5460,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4b4394['disconnect'](),_0x1bae5f['cancel']();}};}class Kt extends _0x52cc1d{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x21946b,_0x2a05ce){super(_0x21946b),this['id']=_0x940a35(),this['focusTracker']=new _0x5eabc8(),this['keystrokes']=new _0x509705(),this['keystrokes']['set']('Esc',(_0x4e22be,_0x361338)=>this['fire']('Esc',_0x361338)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x2a05ce),this['mainView']=_0x2a05ce;const _0x5971b8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x5971b8['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 _0x4fc994=this['element']['clientHeight'];_0x4fc994&&(this['height']=_0x4fc994);}}class Yt extends/* #__PURE__ -- @preserve */
29
+ _0x4ddf56(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xab50f8,target:_0x142679,type:_0x57149d,isVisible:_0x31f689=!0x0}){super(),this['view']=_0xab50f8,this['view']['element']||this['view']['render'](),this['_type']=_0x57149d,this['_target']=_0x142679,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1b7f5e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3a67d9,_0x236093)=>{this['view']['focusTracker']['add'](_0x236093);}),this['focusableElements']['on']('remove',(_0x46b8b9,_0x52fb31)=>{this['view']['focusTracker']['remove'](_0x52fb31);}),this['set']('isVisible',_0x31f689);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x276689=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x276689),_0x276689;}get['targetRect'](){const _0x3ea5f9=this['target'];if(null===_0x3ea5f9)return null;if(_0x3ea5f9 instanceof _0x3f2835)return _0x3ea5f9;const _0x20b855=_0x3ea5f9['filter'](_0x5016af=>function(_0x516db1){const _0x45393a=_0x516db1['offsetParent'];if(_0x45393a)return!0x0;const _0x475941=_0x516db1['getClientRects']()['item'](0x0);return!!_0x475941;}(_0x5016af));return 0x0===_0x20b855['length']?null:_0x3f2835['getDomElementRects'](_0x20b855[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2a3b6f){this['view']['isActive']=_0x2a3b6f,this['view']['mainView']['isActive']=_0x2a3b6f;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x40cb72){if(!(null===_0x40cb72||_0x40cb72 instanceof _0x3f2835||Array['isArray'](_0x40cb72)&&_0x40cb72['every'](_0x5b3d9f=>Gt(_0x5b3d9f))))throw new _0x22464a('annotation-invalid-target',null,{'target':_0x40cb72});}['_getNormalizedTarget'](){const _0x5acb87='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x5acb87)?[_0x5acb87]:_0x5acb87;}}function Gt(_0x4dc1ab){return null!==_0x4dc1ab&&'object'==typeof _0x4dc1ab&&'nodeType'in _0x4dc1ab&&0x1===_0x4dc1ab['nodeType'];}class jt extends _0x1b7f5e{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x307006=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5eabc8(),this['_focusTracker']['on']('change:isFocused',(_0x36ef44,_0x24684c,_0x2ccf0d)=>{_0x2ccf0d||this['fire']('blur');});for(const _0x670f4b of _0x307006)this['add'](_0x670f4b);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x687a47){if(this['has'](_0x687a47))throw new _0x22464a('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x687a47['innerView'],_0x687a47),this['_viewToAnnotation']['set'](_0x687a47['view'],_0x687a47);for(const _0x352c19 of _0x687a47['focusableElements'])this['_focusTracker']['add'](_0x352c19);this['listenTo'](_0x687a47['focusableElements'],'add',(_0x51b3e8,_0x5b957e)=>{this['_focusTracker']['add'](_0x5b957e);}),this['listenTo'](_0x687a47['focusableElements'],'remove',(_0x4f02d6,_0x3a4a17)=>{this['_focusTracker']['remove'](_0x3a4a17);}),this['listenTo'](_0x687a47['view']['focusTracker'],'change:isFocused',(_0x42b797,_0x458d29,_0x3f20ff)=>{_0x3f20ff&&this['fire']('focus',_0x687a47);}),_0x687a47['updateTargetRect']();const _0x2f12ad=this['_getOrderInContent'](_0x687a47['view']['targetRect']);return super['add'](_0x687a47,_0x2f12ad);}['remove'](_0x29641c){if(!this['has'](_0x29641c))throw new _0x22464a('annotationcollection-not-existing-item',null);this['stopListening'](_0x29641c['view']['focusTracker']),this['stopListening'](_0x29641c['focusableElements']);for(const _0x1cf26d of _0x29641c['focusableElements'])this['_focusTracker']['remove'](_0x1cf26d);return this['_viewToAnnotation']['delete'](_0x29641c['view']),this['_innerViewToAnnotation']['delete'](_0x29641c['innerView']),super['remove'](_0x29641c);}['getByInnerView'](_0x4a4384){return this['_innerViewToAnnotation']['get'](_0x4a4384);}['getByView'](_0x55e310){return this['_viewToAnnotation']['get'](_0x55e310);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3601ee of this)_0x3601ee['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4a7b69=Array['from'](this)['sort']((_0x9b8e6f,_0xf34228)=>qt(_0x9b8e6f['view']['targetRect'],_0xf34228['view']['targetRect']));for(let _0x581e14=_0x4a7b69['length']-0x1;_0x581e14>0x0;_0x581e14--){const _0x4143d8=_0x4a7b69[_0x581e14];_0x581e14!==this['getIndex'](_0x4143d8)&&(this['remove'](_0x4143d8),this['add'](_0x4143d8));}}['_getOrderInContent'](_0x917e18){let _0x18724c=0x0;if(!_0x917e18)return this['length'];for(const _0x2a7ee0 of this){const _0x43b8fa=_0x2a7ee0['view']['targetRect'];if(_0x43b8fa){if(qt(_0x917e18,_0x43b8fa)<0x0)return _0x18724c;_0x18724c++;}}return _0x18724c;}}function Xt({source:_0x6f844a,target:_0x32b8e6,filter:_0x161e99}){for(const _0x282603 of _0x6f844a)_0x161e99(_0x282603)&&_0x32b8e6['add'](_0x282603);_0x32b8e6['listenTo'](_0x6f844a,'add',(_0x267afb,_0x29a37f)=>{_0x161e99(_0x29a37f)&&_0x32b8e6['add'](_0x29a37f);}),_0x32b8e6['listenTo'](_0x6f844a,'remove',(_0x4c81ce,_0x1763c1)=>{_0x32b8e6['has'](_0x1763c1)&&_0x32b8e6['remove'](_0x1763c1);});}function qt(_0x431631,_0x5ef587){if(null===_0x431631&&null===_0x5ef587)return 0x0;if(null===_0x431631)return-0x1;if(null===_0x5ef587)return 0x1;const _0x1c6c84=_0x431631['top']-_0x5ef587['top'];return 0x0==_0x1c6c84?_0x431631['left']-_0x5ef587['left']:_0x1c6c84;}class $t extends _0xb27427{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f9c4d){if(super(_0x3f9c4d),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3f9c4d instanceof _0x4fc054){const _0x40c632=_0x3f9c4d['locale'];_0x3f9c4d['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x40c632,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x40c632,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x40c632,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x40c632,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x40c632,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x40c632,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x40c632,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4a99a9){this['collection']['add'](_0x4a99a9);}['remove'](_0x14833c){this['collection']['remove'](_0x14833c),_0x14833c['destroy']();}['refreshVisibility'](){for(const _0x439877 of this['collection'])_0x439877['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x40f290){return this['collection']['getByInnerView'](_0x40f290);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5676b4 of this['collection'])_0x5676b4['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x256828){this['fire']('_activateAnnotation',_0x256828);}['createAnnotation'](_0x561f79){return new Yt(_0x561f79);}['createAnnotationView'](_0x3dfad,_0xc93b0b){return new Kt(_0x3dfad,_0xc93b0b);}['_addActiveAnnotation'](_0x1f6df4){const _0x4d7261=new Set(this['activeAnnotations']);_0x4d7261['add'](_0x1f6df4),this['activeAnnotations']=_0x4d7261;}['_removeActiveAnnotation'](_0x2e809a){const _0x3ac528=new Set(this['activeAnnotations']);_0x3ac528['delete'](_0x2e809a),this['activeAnnotations']=_0x3ac528;}['_bindAnnotationsToVisibleAnnotations'](){const _0x918591=this['collection'],_0xcce4c9=this['_visibleAnnotations'];function _0xc0d3f1(_0x5ce505){const _0x2f9c93=_0x5ce505['source'];_0x2f9c93['isVisible']&&!_0xcce4c9['has'](_0x2f9c93)?_0xcce4c9['add'](_0x2f9c93):!_0x2f9c93['isVisible']&&_0xcce4c9['has'](_0x2f9c93)&&_0xcce4c9['remove'](_0x2f9c93),_0x2f9c93['view']['focusTracker']['remove'](_0x2f9c93['view']['element']),_0x2f9c93['view']['focusTracker']['add'](_0x2f9c93['view']['element']);}this['listenTo'](_0x918591,'add',(_0x5cabb2,_0x5520ee)=>{_0x5520ee['isVisible']&&_0xcce4c9['add'](_0x5520ee),this['listenTo'](_0x5520ee,'change:isVisible',_0xc0d3f1);}),this['listenTo'](_0x918591,'remove',(_0x276346,_0x3b937c)=>{_0xcce4c9['has'](_0x3b937c)&&_0xcce4c9['remove'](_0x3b937c),this['stopListening'](_0x3b937c,'change:isVisible',_0xc0d3f1);});}['_setupEnterAnnotationKeystroke'](){const _0x27dddb=_0xca9dc=>{_0xca9dc['on']('ready',()=>{_0xca9dc['keystrokes']['set'](_0x3b6ce4,(_0x487cee,_0x2c39c8)=>{const _0x1fa275=_0x322b1a(this['activeAnnotations']['values']());_0x1fa275&&(_0x1fa275['view']['focus'](),_0x2c39c8());});});};this['context']instanceof _0x4fc054?_0x27dddb(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5ec7c1,_0x5e031a)=>{_0x27dddb(_0x5e031a);});}['_setupEscapeAnnotationHandling'](){const _0x3a6242=_0x4cc66e=>{const _0x4ba006=_0x4cc66e['source'],_0x4e5b29=[];let _0x5e14f0;if(Array['isArray'](_0x4ba006['target'])){_0x5e14f0=_0x4ba006['target'][0x0],this['context']instanceof _0x4fc054?_0x4e5b29['push'](this['context']):this['context']['editors']&&_0x4e5b29['push'](...this['context']['editors']);for(const _0x160b5d of _0x4e5b29)for(const _0x180211 of _0x160b5d['editing']['view']['domRoots']['values']())if(_0x180211['contains'](_0x5e14f0))return void _0x160b5d['editing']['view']['focus']();_0x5e14f0['focus']();}};this['listenTo'](this['collection'],'add',(_0x3aeebe,_0x11cb1a)=>{this['listenTo'](_0x11cb1a,'escape',_0x3a6242,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x52f7c4,_0x3ce834)=>{this['stopListening'](_0x3ce834,'escape',_0x3a6242);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0xb27427{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x2ed1f6,_0x1144d3];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15fb63){super(_0x15fb63),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x44f0b2=this['context']['config'];_0x44f0b2['define']('comments.maxCommentsWhenCollapsed',0x2),_0x44f0b2['define']('comments.maxThreadTotalWeight',0x1f4),_0x44f0b2['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x44f0b2['define']('comments.CommentThreadView',Bt),_0x44f0b2['define']('comments.CommentView',Ut),_0x44f0b2['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3cf56a=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x361f44,_0x38ee10)=>this['_addCommentThread'](_0x38ee10)),this['on']('submitCommentThread',(_0x44a456,_0xf1ce)=>this['_submitCommentThread'](_0xf1ce)),this['on']('resolveCommentThread',(_0x102079,_0x324277)=>this['_resolveCommentThread'](_0x324277)),this['on']('resolveCommentThread',(_0x3717c3,_0x5c61a7)=>this['_updateActiveAnnotation'](_0x5c61a7),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1887c5,_0x1be994)=>this['_reopenCommentThread'](_0x1be994)),this['on']('reopenCommentThread',(_0xf594d2,_0x20967b)=>this['_updateActiveAnnotation'](_0x20967b),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x788bf7,_0xaeadf7)=>this['_removeCommentThread'](_0xaeadf7)),this['on']('updateCommentThread',(_0x94f265,_0x49950d)=>this['_updateCommentThread'](_0x49950d)),this['on']('updateCommentThread',(_0x678164,_0x3ade48)=>this['_updateActiveAnnotation'](_0x3ade48),{'priority':'lowest'}),this['on']('addComment',(_0x2a13dc,_0xca96a4)=>this['_addComment'](_0xca96a4)),this['on']('updateComment',(_0x1a4c2d,_0x4afb1f)=>this['_updateComment'](_0x4afb1f)),this['on']('removeComment',(_0x51afef,_0x306d0c)=>this['_removeComment'](_0x306d0c)),this['on']('addComment',(_0x148a91,{threadId:_0x3b06c7,isFromAdapter:_0x557da1})=>{if(_0x557da1)return;const _0x580e1a=this['getCommentThread'](_0x3b06c7),_0x3c61a8=_0x580e1a&&this['_threadToController']['get'](_0x580e1a);_0x3c61a8&&_0x3c61a8['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3cf56a,'change:activeAnnotations',(_0x38e075,_0x1788b9,_0x219e47)=>{const _0x249024=Array['from'](_0x219e47)['map'](_0x5a5afd=>this['_viewToController']['get'](_0x5a5afd['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x249024?_0x249024['model']:null;});}set['adapter'](_0x5e8186){if(this['_adapter'])throw new _0x22464a('commentsrepository-adapter-already-set');this['_adapter']=_0x5e8186;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x202ff6=zt,threadId:_0x895977=_0x940a35(),comments:_0x33f4fd=[],unlinkedAt:_0x504e4c=null,resolvedAt:_0x50a87f=null,resolvedBy:_0x4f6c5d=null,target:_0x19f6a5=null,context:_0x1e9ec8=null,attributes:_0x2d2735={},isResolvable:_0x3af733=!0x0,isSubmitted:_0x36ccc1=!0x1,isFromAdapter:_0x1b1822=!0x1}={}){return this['fire'](ii('addCommentThread',_0x202ff6),{'channelId':_0x202ff6,'threadId':_0x895977,'comments':_0x33f4fd,'unlinkedAt':_0x504e4c,'resolvedAt':_0x50a87f,'resolvedBy':_0x4f6c5d,'target':_0x19f6a5,'context':_0x1e9ec8,'attributes':_0x2d2735,'isFromAdapter':_0x1b1822,'isResolvable':_0x3af733,'isSubmitted':_0x36ccc1}),this['getCommentThread'](_0x895977);}['openNewCommentThread']({channelId:_0x2498ef=zt,threadId:_0x2e4f7f=_0x940a35(),target:_0x1a1882,context:_0x32056b=null,isResolvable:_0x216942=!0x0}){if(this['_readOnlyChannels']['has'](_0x2498ef)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1a1882)throw new _0x22464a('commentsrepository-missing-target');const _0x373107=this['addCommentThread']({'channelId':_0x2498ef,'threadId':_0x2e4f7f,'target':_0x1a1882,'context':_0x32056b,'isResolvable':_0x216942});if(!_0x373107)return null;const _0x39cf00=this['_threadToController']['get'](_0x373107),_0x1e8527=_0x39cf00['view']['commentThreadInputView']['commentInputView'],_0x5651db=this['context']['plugins']['get']($t),_0x3ed67f=_0x5651db['getByInnerView'](_0x39cf00['view']);return _0x5651db['activate'](_0x3ed67f),_0x1e8527['once']('editorReady',()=>_0x1e8527['focus']()),_0x373107;}['hasCommentThread'](_0x115257){if('string'!=typeof _0x115257)throw new _0x22464a('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x115257);}['updateCommentThread']({channelId:_0x10af2d=zt,threadId:_0x3fcc5c,context:_0x2fc4e0,unlinkedAt:_0x3669c3,attributes:_0x52f0b4,isFromAdapter:_0x1d7f95=!0x1}){return this['fire'](ii('updateCommentThread',_0x10af2d),{'channelId':_0x10af2d,'threadId':_0x3fcc5c,'context':_0x2fc4e0,'unlinkedAt':_0x3669c3,'attributes':_0x52f0b4,'isFromAdapter':_0x1d7f95}),this['getCommentThread'](_0x3fcc5c);}['getCommentThread'](_0x4b8b25){if('string'!=typeof _0x4b8b25)throw new _0x22464a('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4b8b25);}['fetchCommentThread']({channelId:_0x98afc,threadId:_0x1df4ef}={}){const _0x3ac00d=this['getCommentThread'](_0x1df4ef);if(_0x3ac00d)return Promise['resolve'](_0x3ac00d);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x22464a('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x98afc,'threadId':_0x1df4ef})['then'](_0xf38cb7=>this['hasCommentThread'](_0x1df4ef)?this['getCommentThread'](_0x1df4ef):_0xf38cb7?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x98afc},_0xf38cb7)):void 0x0)['catch'](_0x72f1d4=>{throw console['error'](_0x72f1d4),new _0x22464a('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x23041c,skipNotAttached:_0x2a0a9d=!0x1,skipEmpty:_0x45cebe=!0x1,toJSON:_0x47f936=!0x1}={}){const _0x3b38a6=[];for(const _0x56c17b of this['_threads']['values']())_0x23041c&&_0x56c17b['channelId']!==_0x23041c||_0x2a0a9d&&!_0x56c17b['isAttached']||_0x45cebe&&0x0===_0x56c17b['length']||_0x3b38a6['push'](_0x56c17b);return _0x47f936?_0x3b38a6['map'](_0x584000=>_0x584000['toJSON']()):_0x3b38a6;}['getAnnotationForCommentThread'](_0x1e7b1c){const _0x595b4f=this['_threadToController']['get'](_0x1e7b1c);if(!_0x595b4f)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x595b4f['view'])||null;}['getCommentThreadForAnnotation'](_0x16c232){const _0x278be6=this['_viewToController']['get'](_0x16c232['innerView']);return _0x278be6?_0x278be6['model']:null;}['setActiveCommentThread'](_0x227636){const _0x35dd0f=this['context']['plugins']['get']($t);if(!_0x227636)return void(this['activeCommentThread']&&_0x35dd0f['deactivateAll']());const _0x1df7df=this['getCommentThread'](_0x227636);if(!_0x1df7df)throw new _0x22464a('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x227636});if(!this['_threadToController']['has'](_0x1df7df))throw new _0x22464a('commentsrepository-active-not-attached',null,{'threadId':_0x227636});const _0x34ae48=_0x35dd0f['getByInnerView'](this['_threadToController']['get'](_0x1df7df)['view']);_0x35dd0f['activate'](_0x34ae48);}['switchReadOnly'](_0x1fa7b8,_0x13da01){_0x1fa7b8?this['_readOnlyChannels']['add'](_0x13da01):this['_readOnlyChannels']['delete'](_0x13da01),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x7cd736){return this['_readOnlyChannels']['has'](_0x7cd736)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3a6757,_0x29d8e7){return new It(_0x3a6757,_0x29d8e7);}['setPermissions'](_0x54f8ca,_0x57911c=zt){this['_permissions']['set'](_0x57911c,_0x54f8ca),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1a4e6f=zt){return this['_permissions']['has'](_0x1a4e6f)?this['_permissions']['get'](_0x1a4e6f):Jt;}['_addCommentThread']({channelId:_0x248723,threadId:_0x2c8f8f,comments:_0x98211e,unlinkedAt:_0x3cc7a4,resolvedAt:_0x59c91f,resolvedBy:_0x34300a,target:_0x443044,context:_0x59e7ba,attributes:_0x3089b6,isFromAdapter:_0x4aa9f4,isResolvable:_0x5d8b26,isSubmitted:_0x3e7bf5}){if('string'!=typeof _0x2c8f8f)throw new _0x22464a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2c8f8f});if(this['hasCommentThread'](_0x2c8f8f))throw new _0x22464a('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2c8f8f});const _0xa23817=new Zt(this,{'channelId':_0x248723,'id':_0x2c8f8f,'context':_0x59e7ba,'attributes':_0x3089b6,'unlinkedAt':_0x3cc7a4,'resolvedAt':_0x59c91f,'resolvedBy':_0x34300a?this['context']['plugins']['get'](_0x1144d3)['getUser'](_0x34300a):null,'isResolvable':_0x5d8b26,'isSubmitted':_0x3e7bf5||_0x4aa9f4});this['_threads']['set'](_0x2c8f8f,_0xa23817);for(const _0x3f31ad of _0x98211e)_0xa23817['_add'](this['_createNewComment']({'threadId':_0x2c8f8f,..._0x3f31ad}));return _0x443044&&_0xa23817['attachTo'](_0x443044),_0x4aa9f4||!_0xa23817['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x248723,'threadId':_0x2c8f8f});}['_submitCommentThread']({channelId:_0xaeddb6,threadId:_0x3d5ceb}){if(!this['hasCommentThread'](_0x3d5ceb))throw new _0x22464a('commentsrepository-missing-comment-thread',this);const _0x211ad6=this['getCommentThread'](_0x3d5ceb);if(_0x211ad6['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xe20347,comments:_0x58abf8,resolvedAt:_0x41d3c2,resolvedBy:_0x42afac,context:_0x59059a,attributes:_0x302f7f}=_0x211ad6,_0x2cf92b=this['context']['plugins']['get']('PendingActions'),_0x12bbcc=_0x2cf92b['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0xaeddb6,'threadId':_0xe20347,'comments':_0x58abf8['map'](_0x47792d=>_0x47792d['toJSON']()),'resolvedAt':_0x41d3c2,'resolvedBy':_0x42afac?_0x42afac['id']:_0x42afac,'context':_0x59059a,'attributes':_0x302f7f})['then'](({comments:_0x2f5cb5})=>{_0x2cf92b['remove'](_0x12bbcc);for(const _0x61a6f5 of _0x2f5cb5)this['_updateComment']({'channelId':_0xaeddb6,'threadId':_0x3d5ceb,'commentId':_0x61a6f5['commentId'],'createdAt':_0x61a6f5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3bda74=>{throw console['error'](_0x3bda74),new _0x22464a('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x40aed5,target:_0x31a467}){const _0x4d7012=this['getCommentThread'](_0x40aed5);if(!_0x4d7012)throw new _0x22464a('commentsrepository-attach-missing-comment-thread',this);const _0x219da6=this['context']['plugins']['get']('PendingActions'),_0x24e797=this['context']['plugins']['get']($t),_0xf59efc=this['_createCommentThreadView'](_0x4d7012),_0x10aea3=new It(_0x4d7012,_0xf59efc);let _0x57630b=null;_0xf59efc['on']('change:isDirty',(_0x52d213,_0x1e4594,_0x970a32)=>{_0x970a32?_0x57630b=_0x219da6['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x57630b&&(_0x219da6['remove'](_0x57630b),_0x57630b=null);}),this['_threadToController']['set'](_0x4d7012,_0x10aea3),this['_viewToController']['set'](_0xf59efc,_0x10aea3);const _0x4887af=new Kt(this['context']['locale'],_0xf59efc);_0x4887af['bind']('length')['to'](_0xf59efc),_0x4887af['bind']('isDirty')['to'](_0xf59efc,'isDirty',_0xf59efc,'length',(_0x341d1d,_0x5babea)=>_0x341d1d||!_0x5babea),_0x4887af['bind']('isActive')['to'](_0xf59efc),_0x4887af['type']='comment';const _0x488801=new Yt({'view':_0x4887af,'target':_0x31a467,'type':'comment','isVisible':!_0x4d7012['archivedAt']&&!!('function'==typeof _0x31a467?_0x31a467():_0x31a467)});return _0xf59efc['on']('escape',()=>{_0x488801['fire']('escape');}),this['_bindAnnotationToEditors'](_0xf59efc,_0x488801),_0x24e797['add'](_0x488801),_0x488801;}['_bindAnnotationToEditors'](_0x4c86c7,_0x5c8fd4){this['listenTo'](_0x4c86c7,'editorReady',(_0x2f37de,_0x8afae4)=>{const _0x3b23b5=_0x8afae4['ui']['view']['body']['bodyCollectionContainer'];_0x5c8fd4['focusableElements']['add'](_0x3b23b5),this['context']instanceof _0x4fc054&&this['context']['ui']['focusTracker']['add'](_0x3b23b5);},{'priority':'highest'}),this['listenTo'](_0x4c86c7,'editorDestroyed',(_0x28494d,_0x54887d)=>{const _0x1c9584=_0x54887d['ui']['view']['body']['bodyCollectionContainer'];_0x5c8fd4['focusableElements']['has'](_0x1c9584)&&_0x5c8fd4['focusableElements']['remove'](_0x1c9584),this['context']instanceof _0x4fc054&&this['context']['ui']['focusTracker']['remove'](_0x1c9584);});}['_unbindEditors'](_0x496871){this['stopListening'](_0x496871,'editorReady'),this['stopListening'](_0x496871,'editorDestroyed');}['_createCommentThreadView'](_0x376daa){const _0xc4f305=this['context']['plugins']['get'](_0x1144d3),{config:_0x223e89,locale:_0x327694}=this['context'],_0x4b8f57=_0x72cfd4(_0x223e89['get']('locale'),_0x327694);return new(0x0,(_0x223e89['get']('comments'))['CommentThreadView'])(_0x327694,_0x376daa,_0xc4f305['me'],{'editorConfig':{..._0x223e89['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x223e89['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x223e89['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x223e89['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x223e89['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4b8f57,'CommentView':_0x223e89['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2730c5,channelId:_0x6d740,resolvedAt:_0x38f765,resolvedBy:_0x621a8e,isFromAdapter:_0x41bbb4}){if(!this['hasCommentThread'](_0x2730c5))throw new _0x22464a('commentsrepository-missing-comment-thread',null,{'threadId':_0x2730c5});const _0x4c926f=this['getCommentThread'](_0x2730c5);if(_0x4c926f['isResolved'])throw new _0x22464a('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2730c5});const _0x249433=this['context']['plugins']['get'](_0x1144d3);if(_0x4c926f['resolvedBy']=_0x249433['getUser'](_0x621a8e),_0x4c926f['resolvedAt']=_0x38f765,_0x41bbb4||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5e252c=this['context']['plugins']['get']('PendingActions'),_0x17c56c=_0x5e252c['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x6d740,'threadId':_0x2730c5})['then'](({resolvedAt:_0x597fdb,resolvedBy:_0x41739b})=>{_0x5e252c['remove'](_0x17c56c),_0x4c926f['resolvedBy']['id']!==_0x41739b&&(_0x4c926f['resolvedBy']=_0x249433['getUser'](_0x41739b)),_0x4c926f['resolvedAt']=_0x597fdb;})['catch'](_0xb73c2f=>{throw console['error'](_0xb73c2f),new _0x22464a('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5a4a5a,channelId:_0x107ec9,isFromAdapter:_0x4ac334}){if(!this['hasCommentThread'](_0x5a4a5a))throw new _0x22464a('commentsrepository-missing-comment-thread',null,{'threadId':_0x5a4a5a});const _0x5ec72c=this['getCommentThread'](_0x5a4a5a);if(!_0x5ec72c['isResolved'])throw new _0x22464a('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5a4a5a});if(_0x5ec72c['resolvedBy']=null,_0x5ec72c['resolvedAt']=null,_0x4ac334||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3fbbc2=this['context']['plugins']['get']('PendingActions'),_0xcbe507=_0x3fbbc2['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x107ec9,'threadId':_0x5a4a5a})['then'](()=>_0x3fbbc2['remove'](_0xcbe507))['catch'](_0x25ffaa=>{throw console['error'](_0x25ffaa),new _0x22464a('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x44d4d2,isFromAdapter:_0x3557d0}){const _0x5e2588=this['getCommentThread'](_0x44d4d2);if(!_0x5e2588)throw new _0x22464a('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x44d4d2),this['_threads']['delete'](_0x44d4d2),!_0x5e2588['isSubmitted']||_0x3557d0||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5d9f94=this['context']['plugins']['get']('PendingActions'),{channelId:_0x580e50}=_0x5e2588,_0x440a5c=_0x5d9f94['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x580e50,'threadId':_0x44d4d2})['then'](()=>_0x5d9f94['remove'](_0x440a5c))['catch'](_0x596f31=>{throw console['error'](_0x596f31),new _0x22464a('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4ea241,unlinkedAt:_0x5579c4,context:_0x26ec81,attributes:_0x87627c,isFromAdapter:_0x763843}){if('string'!=typeof _0x4ea241)throw new _0x22464a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4ea241});if(!this['hasCommentThread'](_0x4ea241))throw new _0x22464a('commentsrepository-missing-comment-thread',null,{'threadId':_0x4ea241});const _0x4ce438=this['getCommentThread'](_0x4ea241);let _0x1c38c6=!0x1;if(void 0x0!==_0x26ec81&&_0x4ce438['context']!==_0x26ec81&&(_0x4ce438['context']=_0x26ec81,_0x1c38c6=!0x0),void 0x0!==_0x5579c4&&_0x4ce438['unlinkedAt']!==_0x5579c4&&(_0x4ce438['unlinkedAt']=_0x5579c4,_0x1c38c6=!0x0),_0x87627c&&!_0x4af9ed(_0x87627c,_0x4ce438['attributes'])&&(_0x4ce438['attributes']=_0x87627c,_0x1c38c6=!0x0),!_0x1c38c6)return Promise['resolve']();if(!_0x4ce438['isSubmitted']||_0x763843||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xae0f06=this['context']['plugins']['get']('PendingActions'),{channelId:_0x196b5b}=_0x4ce438,_0x814c41=_0xae0f06['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x196b5b,'threadId':_0x4ea241,'context':_0x26ec81,'unlinkedAt':_0x5579c4,'attributes':_0x87627c})['then'](()=>_0xae0f06['remove'](_0x814c41))['catch'](_0x1c1269=>{throw console['error'](_0x1c1269),new _0x22464a('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x154c33){const _0x214043=this['context']['plugins']['get']($t),_0x5e7120=this['getCommentThread'](_0x154c33);if(_0x5e7120['_isAttached']=!0x1,this['_threadToController']['has'](_0x5e7120)){const _0x4c65eb=this['_threadToController']['get'](_0x5e7120),_0x161cc1=_0x4c65eb['view'],_0x1f3a6b=_0x214043['getByInnerView'](_0x161cc1);this['_threadToController']['delete'](_0x5e7120),this['_viewToController']['delete'](_0x161cc1),_0x1f3a6b&&_0x214043['remove'](_0x1f3a6b),_0x4c65eb['destroy'](),_0x161cc1['destroy']()['then'](()=>{this['_unbindEditors'](_0x161cc1);});}}['_updateActiveAnnotation']({threadId:_0x1388f6,resolvedAt:_0x4c58f3,unlinkedAt:_0x504192}){const _0x46fb5f=!!_0x4c58f3,_0x29ab40=this['context']['plugins']['get']($t),_0x2a063f=this['getCommentThread'](_0x1388f6);if(this['_threadToController']['has'](_0x2a063f)){const _0x49f99e=this['_threadToController']['get'](_0x2a063f)['view'],_0x1870af=_0x29ab40['getByInnerView'](_0x49f99e);_0x1870af&&(_0x46fb5f&&_0x29ab40['_removeActiveAnnotation'](_0x1870af),_0x504192?_0x1870af['isVisible']=!0x1:_0x1870af['refreshVisibility']());}}['_getExternalAuthor'](_0xd10e80){const _0x157911=this['context']['plugins']['get'](_0x1144d3),_0x3f50f2=_0x582319('external:'+_0xd10e80),_0x11ae4c=_0x157911['getUser'](_0x3f50f2);return _0x11ae4c||_0x157911['addUser']({'id':_0x3f50f2,'name':_0xd10e80});}['_createNewComment']({threadId:_0xd3b9cb,commentId:_0xaff69f=_0x940a35(),content:_0x3906e2,authorId:_0x18b886,createdAt:_0x4d3b87,attributes:_0x552a7f}){if('string'!=typeof _0xaff69f)throw new _0x22464a('commentsrepository-invalid-commentid');if('string'!=typeof _0x18b886)throw new _0x22464a('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3906e2||!_0x3906e2['trim']())throw new _0x22464a('commentsrepository-invalid-comment-content');const _0x3fedc4=this['context']['plugins']['get'](_0x1144d3)['getUser'](_0x18b886);if(!_0x3fedc4)throw new _0x22464a('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x18b886});let _0x5b948b=null,_0x4538c6=_0x4d3b87;return _0x552a7f?.['@external']&&(_0x5b948b=this['_getExternalAuthor'](_0x552a7f['@external']['authorName']),_0x4538c6=new Date(_0x552a7f['@external']['createdAt'])),new ti(this,{'threadId':_0xd3b9cb,'id':_0xaff69f,'author':_0x5b948b||_0x3fedc4,'creator':_0x3fedc4,'content':_0x3906e2,'createdAt':_0x4d3b87,'authoredAt':_0x4538c6,'attributes':_0x552a7f});}['_addComment'](_0x284ea8){let {threadId:_0x68d929,content:_0x52ef19,attributes:_0x239d2b,isFromAdapter:_0x1d0a6a}=_0x284ea8;const _0x3f822e=this['getCommentThread'](_0x284ea8['threadId']);if(!_0x3f822e)throw new _0x22464a('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4de1ae=this['_createNewComment'](_0x284ea8),{id:_0x5f13ee}=_0x4de1ae;if(_0x3f822e['_add'](_0x4de1ae),_0x1d0a6a||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3f822e['isSubmitted'])return Promise['resolve']();const _0x10588c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x22ea56}=_0x3f822e,_0x570b62=_0x10588c['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x239d2b||(_0x239d2b={}),this['adapter']['addComment']({'channelId':_0x22ea56,'threadId':_0x68d929,'commentId':_0x5f13ee,'content':_0x52ef19,'attributes':_0x239d2b})['then'](_0x270c09=>{_0x10588c['remove'](_0x570b62),_0x270c09&&this['_updateComment']({'channelId':_0x22ea56,'threadId':_0x68d929,'commentId':_0x5f13ee,'createdAt':_0x270c09['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4c7986=>{throw console['error'](_0x4c7986),new _0x22464a('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x283dab,commentId:_0x48eb60,content:_0xcc165e,createdAt:_0x393e58,attributes:_0x431e89,isFromAdapter:_0x11abd7}){if(void 0x0!==_0xcc165e&&('string'!=typeof _0xcc165e||!_0xcc165e['trim']()['length']))throw new _0x22464a('commentsrepository-update-comment-invalid-content');const _0x290134=this['getCommentThread'](_0x283dab),_0x515732=_0x290134['getComment'](_0x48eb60);if(!_0x515732)throw new _0x22464a('commentsrepository-update-missing-comment',this);let _0x2e16d3=!0x1;if(_0xcc165e&&_0xcc165e!==_0x515732['content']&&(_0x515732['isEditable']||_0x11abd7)&&(_0x515732['content']=_0xcc165e,_0x2e16d3=!0x0),_0x393e58&&_0x393e58!==_0x515732['createdAt']&&(_0x515732['createdAt']=_0x393e58,_0x515732['attributes']&&_0x515732['attributes']['@external']||(_0x515732['authoredAt']=_0x393e58),_0x2e16d3=!0x0),_0x431e89&&!_0x4af9ed(_0x431e89,_0x515732['attributes'])&&(_0x515732['attributes']=_0x431e89,_0x2e16d3=!0x0),!_0x2e16d3)return Promise['resolve']();if(_0x290134['fire']('commentUpdated'),_0x11abd7||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xb26a1a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x169d1d}=this['getCommentThread'](_0x515732['threadId']),_0x231316=_0xb26a1a['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x169d1d,'threadId':_0x283dab,'commentId':_0x48eb60,'content':_0xcc165e,'attributes':_0x431e89})['then'](()=>_0xb26a1a['remove'](_0x231316))['catch'](_0xb79a81=>{throw console['error'](_0xb79a81),new _0x22464a('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x2061f2,commentId:_0x531a87,isFromAdapter:_0x2e5c45}){const _0x1a8184=this['getCommentThread'](_0x2061f2),_0x336ff3=_0x1a8184['getComment'](_0x531a87);if(!_0x336ff3)throw new _0x22464a('commentsrepository-remove-missing-comment',this);if(_0x1a8184['_remove'](_0x336ff3),_0x2e5c45||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3372f3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x12500a}=_0x1a8184,_0x47e35d=_0x3372f3['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x12500a,'threadId':_0x2061f2,'commentId':_0x531a87})['then'](()=>_0x3372f3['remove'](_0x47e35d))['catch'](_0x9476d4=>{throw console['error'](_0x9476d4),new _0x22464a('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
30
+ _0x4ddf56(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x30c307,_0x98f58c){super();const _0x52258c=_0x98f58c['isResolvable'];this['channelId']=_0x98f58c['channelId'],this['id']=_0x98f58c['id'],this['comments']=new _0x1b7f5e(),this['_repository']=_0x30c307,this['_isAttached']=!0x1,this['_isSubmitted']=_0x98f58c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x30c307,'_permissions',_0x30c307,'_readOnlyChannels',()=>_0x30c307['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x30c307,'_permissions',()=>_0x30c307['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x30c307,'_permissions',()=>{const _0x2d9c5a=_0x30c307['getPermissions'](this['channelId']);return _0x2d9c5a['write']||_0x2d9c5a['admin'];}),this['bind']('isResolvable')['to'](_0x30c307,'_permissions',()=>_0x52258c&&_0x30c307['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x98f58c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x3a1446,_0x3ca827)=>_0x3a1446?_0x3ca827?_0x3a1446<_0x3ca827?_0x3a1446:_0x3ca827:_0x3a1446:_0x3ca827),this['set']('unlinkedAt',_0x98f58c['unlinkedAt']||null),this['set']('resolvedAt',_0x98f58c['resolvedAt']||null),this['set']('resolvedBy',_0x98f58c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x227c53=>!!_0x227c53),this['set']('attributes',_0x98f58c['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x4aee0b,_0x5b2694)=>_0x4aee0b+_0x5b2694['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xfcfb2f,id:_0x3e1645}=this;this['_repository']['fire'](ii('submitCommentThread',_0xfcfb2f),{'channelId':_0xfcfb2f,'threadId':_0x3e1645});}['setUnlinkedAt'](_0x26afc0){this['_update']({'unlinkedAt':_0x26afc0});}['resolve']({resolvedAt:_0x5c24ed=new Date(),resolvedBy:_0x52b9e7='',isFromAdapter:_0x513280=!0x1}={}){const _0x1f31ea=this['_repository']['context']['plugins']['get'](_0x1144d3)['me'],{channelId:_0x37333d,id:_0x1b5c53}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x37333d),{'channelId':_0x37333d,'threadId':_0x1b5c53,'resolvedAt':_0x5c24ed,'resolvedBy':_0x52b9e7||_0x1f31ea['id'],'isFromAdapter':_0x513280});}['reopen']({isFromAdapter:_0x19ad49=!0x1}={}){const {channelId:_0x56988f,id:_0x112229}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x56988f),{'channelId':_0x56988f,'threadId':_0x112229,'isFromAdapter':_0x19ad49});}['setContext'](_0x5ed3c1){this['context']||this['_update']({'context':_0x5ed3c1});}['setAttribute'](_0x5daa45,_0x44a7df){const _0x968f06=_0x5808c4(this['attributes']);_0x46ed99(_0x968f06,_0x5daa45,_0x44a7df),this['_update']({'attributes':_0x968f06});}['removeAttribute'](_0x2616a0){const _0x6f4524=_0x5808c4(this['attributes']);_0x4e79d5(_0x6f4524,_0x2616a0),this['_update']({'attributes':_0x6f4524});}['remove']({isFromAdapter:_0x5d7b5f=!0x1}={}){const {channelId:_0x548160,id:_0x1bbceb}=this;this['_repository']['fire'](ii('removeCommentThread',_0x548160),{'channelId':_0x548160,'threadId':_0x1bbceb,'isFromAdapter':_0x5d7b5f});}['attachTo'](_0x2664b3){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2664b3});}['addComment'](_0x1ac12d){const {channelId:_0x19f0f3,id:_0x19a30d}=this;this['_repository']['fire'](ii('addComment',_0x19f0f3,_0x19a30d),Object['assign']({'channelId':_0x19f0f3,'threadId':_0x19a30d},_0x1ac12d));}['getComment'](_0x390f21){if('string'!=typeof _0x390f21)throw new _0x22464a('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x390f21});return this['comments']['get'](_0x390f21);}['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'](_0x26cbc1=>_0x26cbc1['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5a3088){return this['listenTo'](_0x5a3088,'change:authoredAt',()=>{const _0x1849f7=this['_findOptimalIndex'](_0x5a3088),_0x14e04d=this['comments'];_0x1849f7-0x1!=_0x14e04d['getIndex'](_0x5a3088)&&_0x1849f7+0x1!=_0x14e04d['getIndex'](_0x5a3088)&&(this['_remove'](_0x5a3088),this['_add'](_0x5a3088));}),this['comments']['add'](_0x5a3088,this['_findOptimalIndex'](_0x5a3088));}['_update'](_0x354bea){const {channelId:_0x13c222,id:_0x21c0c3}=this;this['_repository']['fire'](ii('updateCommentThread',_0x13c222),{..._0x354bea,'channelId':_0x13c222,'threadId':_0x21c0c3});}['_remove'](_0x2cbc97){return this['stopListening'](_0x2cbc97),_0x2cbc97['destroy'](),this['comments']['remove'](_0x2cbc97);}['_findOptimalIndex'](_0x52a8a3){const _0x483654=this['comments']['find'](_0x46c999=>new Date(_0x46c999['authoredAt'])['getTime']()>new Date(_0x52a8a3['authoredAt'])['getTime']());return _0x483654?this['comments']['getIndex'](_0x483654):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
31
+ _0x4ddf56(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3d0c13,_0x4ffded){super();const _0xfec6b=_0x3d0c13['context']['plugins']['get'](_0x1144d3)['me'],_0x19ef96=_0x3d0c13['getCommentThread'](_0x4ffded['threadId']),_0x538927=0x0===_0x19ef96['comments']['length'],_0x10df9b=_0xfec6b===_0x4ffded['author'];this['id']=_0x4ffded['id'],this['threadId']=_0x4ffded['threadId'],this['author']=_0x4ffded['author'],this['creator']=_0x4ffded['creator'],this['isExternal']=Boolean(_0x4ffded['attributes']&&_0x4ffded['attributes']['@external']),this['set']('content',_0x4ffded['content']),this['createdAt']=_0x4ffded['createdAt']||new Date(),this['set']('authoredAt',_0x4ffded['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x19ef96,'resolvedAt'),this['set']('attributes',_0x4ffded['attributes']||{}),this['bind']('isEditable')['to'](_0x3d0c13,'_permissions',()=>{const _0xb357b5=_0x3d0c13['getPermissions'](_0x19ef96['channelId'])['write'],_0x5548d8=_0x3d0c13['getPermissions'](_0x19ef96['channelId'])['modifyAll'];return _0x10df9b&&_0xb357b5||!_0x10df9b&&_0x5548d8;}),this['bind']('isRemovable')['to'](_0x19ef96,'isRemovable',_0x3d0c13,'_permissions',_0x5b0027=>{const _0x173f5e=_0x3d0c13['getPermissions'](_0x19ef96['channelId'])['write'],_0x2f1cae=_0x3d0c13['getPermissions'](_0x19ef96['channelId'])['modifyAll'];return _0x10df9b&&_0x173f5e||_0x5b0027&&_0x538927||!_0x10df9b&&_0x2f1cae&&!_0x538927;}),this['bind']('isReadOnly')['to'](_0x19ef96,'isReadOnly'),this['_repository']=_0x3d0c13;}get['weight'](){return Math['max'](function(_0x24dccc){const _0xd9feee=document['createElement']('div');return _0xd9feee['innerHTML']=_0x24dccc,_0xd9feee['textContent']['length'];}(this['content']),0xc8);}['update'](_0x4bcb66){const {threadId:_0x21a41a,id:_0x8074e1}=this;if(!this['_repository']['hasCommentThread'](_0x21a41a))throw new _0x22464a('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x23aced}=this['_repository']['getCommentThread'](_0x21a41a);this['_repository']['fire'](ii('updateComment',_0x23aced,_0x21a41a),{'channelId':_0x23aced,'threadId':_0x21a41a,'commentId':_0x8074e1,..._0x4bcb66});}['setAttribute'](_0x316a81,_0x1f9309){const _0x2ebdf7=_0x5808c4(this['attributes']);_0x46ed99(_0x2ebdf7,_0x316a81,_0x1f9309),this['update']({'attributes':_0x2ebdf7});}['removeAttribute'](_0x589068){const _0x170a59=_0x5808c4(this['attributes']);_0x4e79d5(_0x170a59,_0x589068),this['update']({'attributes':_0x170a59});}['remove'](_0x3dcef1={}){if(!_0x3dcef1['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x42c9d5,id:_0x22bd5a}=this;if(!this['_repository']['hasCommentThread'](_0x42c9d5))throw new _0x22464a('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xb9e39d}=this['_repository']['getCommentThread'](_0x42c9d5);this['_repository']['fire'](ii('removeComment',_0xb9e39d,_0x42c9d5),{'channelId':_0xb9e39d,'threadId':_0x42c9d5,'commentId':_0x22bd5a,..._0x3dcef1});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x2b07a1,..._0x1f8534){for(const _0x390af0 of _0x1f8534)void 0x0!==_0x390af0&&(_0x2b07a1+=':'+String(_0x390af0));return _0x2b07a1;}class ei extends _0x31abbd{constructor(_0x2fa588){super(_0x2fa588),this['set']('hasContent',!0x1);}['refresh'](){const _0x46cfd1=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x31074e of _0x46cfd1['getRanges']())if(this['_hasContent'](_0x31074e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0xc4a79c=_0x940a35(),ranges:_0x94fc5c,comment:_0x4ada58}={}){const _0x39845e=this['editor']['model'],_0x2ecfd8=_0x94fc5c??Array['from'](_0x39845e['document']['selection']['getRanges']()),_0x574236=[];for(const _0x3053bc of _0x2ecfd8)this['_hasContent'](_0x3053bc)&&_0x574236['push'](this['_trimToContent'](_0x3053bc));if(!_0x574236['length'])throw new _0x22464a('addcommentthreadcommand-incorrect-ranges',null);_0x4ada58&&this['_createCommentThread'](_0xc4a79c,_0x4ada58),this['_createMarkersFromRanges'](_0xc4a79c,_0x574236,!!_0x4ada58);}['_createMarkersFromRanges'](_0x5b5ea2,_0x27e9ec,_0x49b9d9){this['editor']['model']['change'](_0x22277c=>{for(const _0x56195e of _0x27e9ec){const _0x3ee977=_0x940a35()['substr'](0x1,0x5),_0x1645f1='comment:'+_0x5b5ea2+':'+_0x3ee977;_0x22277c['addMarker'](_0x1645f1,{'range':_0x56195e,'usingOperation':_0x49b9d9,'affectsData':_0x49b9d9});}});}['_createCommentThread'](_0x1172e6,_0x438631){const _0x40f6f3=this['editor']['plugins']['get']('CommentsRepository'),_0x3ef461=this['editor']['config']['get']('collaboration.channelId'),_0x12c77e=this['editor']['plugins']['get']('Users')['me'];if(!_0x12c77e)throw new _0x22464a('addcommentthreadcommand-user-not-found',null);_0x40f6f3['addCommentThread']({'threadId':_0x1172e6,'channelId':_0x3ef461,'comments':[{'authorId':_0x12c77e['id'],'content':_0x438631,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x595dc9){for(const _0x1c1a0b of _0x595dc9['getItems']())if(this['_itemIsContent'](_0x1c1a0b))return!0x0;return!0x1;}['_itemIsContent'](_0x3d10e0){return _0x3d10e0['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3d10e0)&&!_0x3d10e0['is']('element','tableCell');}['_trimToContent'](_0x145e8a){const _0x1b5e77=_0x39a5dd=>!this['_itemIsContent'](_0x39a5dd['item']),_0x225b5e=_0x145e8a['start']['getLastMatchingPosition'](_0x1b5e77),_0x3c44d8=_0x145e8a['end']['getLastMatchingPosition'](_0x1b5e77,{'direction':'backward'});return this['editor']['model']['createRange'](_0x225b5e,_0x3c44d8);}}class si extends _0x4bbe68{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5cdec4){super(_0x5cdec4),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4c9247=this['editor'],_0x7a8638=_0x4c9247['model']['document']['selection'],_0x11a3fc=_0x5551ef(()=>this['refreshSelectedViews'](),0xa);_0x7a8638['on']('change:range',(_0x21d3a0,_0x26d5b6)=>{_0x26d5b6['directChange']&&(_0x11a3fc['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4c9247['editing']['view']['document'],'change:isFocused',(_0x12e1cc,_0x219978,_0x40d8d1)=>{_0x40d8d1&&_0x11a3fc();}),this['listenTo'](_0x4c9247['ui']['focusTracker'],'change:isFocused',(_0x188cd3,_0x3ab4a5,_0x7c3a3b)=>{_0x7c3a3b||this['fire']('blur',{'isAnnotationTracked':_0x8a98d2=>this['_editorAnnotationsData']['has'](_0x8a98d2['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5b4feb){if(this['_editorAnnotations']['has'](_0x5b4feb['view']))return;this['_editorAnnotations']['add'](_0x5b4feb['view']),this['editor']['ui']['focusTracker']['add'](_0x5b4feb['view']['element']);const _0xd4ead9=this['editor']['plugins']['get']($t);this['listenTo'](_0xd4ead9['collection'],'remove',(_0x60c733,_0x4da926)=>{this['editor']['ui']['focusTracker']['remove'](_0x4da926['view']['element']),this['_editorAnnotations']['delete'](_0x4da926['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x375094){if('function'!=typeof _0x375094)throw new _0x22464a('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x375094);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1b3772,annotations:_0x25b943}){const _0x5c361b=[],_0x55d58b=this['editor']['model']['document']['selection'],_0x147205=Array['from'](_0x55d58b['getRanges']());for(const [_0x23043d,_0x138013]of this['_editorAnnotationsData']){const _0x532c71=_0x1db204(_0x138013),_0x17d5ed=_0x25b943['getByInnerView'](_0x23043d);_0x532c71&&_0x17d5ed&&_0x5c361b['push']({'annotation':_0x17d5ed,'range':_0x532c71});}function _0x1db204(_0x421f5e){for(const _0x4e607b of _0x421f5e)for(const _0x908b17 of _0x147205)if(_0x4e607b['containsRange'](_0x908b17,!_0x55d58b['isCollapsed']))return _0x4e607b;return null;}return _0x5c361b['sort']((_0x1c4882,_0x2400ce)=>{const _0xc5c43e=_0x1c4882['range'],_0x544754=_0x2400ce['range'];if(!_0xc5c43e['isEqual'](_0x544754)){if(_0xc5c43e['containsRange'](_0x544754,!0x0))return 0x1;if(_0x544754['containsRange'](_0xc5c43e,!0x0))return-0x1;}return _0x1c4882['annotation']==_0x1b3772?-0x1:_0x2400ce['annotation']==_0x1b3772?0x1:0x0;})['map'](_0x4c54bd=>_0x4c54bd['annotation']);}get['_editorAnnotationsData'](){const _0x30ea88=new Map();for(const _0x5b4a16 of Array['from'](this['_dataCollectors']))for(const [_0x77a454,_0xd3e35b]of _0x5b4a16())_0x30ea88['set'](_0x77a454,_0xd3e35b);return _0x30ea88;}}class ni extends _0x4bbe68{['afterInit'](){const _0x5083ae=this['editor'];if(!_0x5083ae['plugins']['has']('RestrictedEditingModeEditing'))return;_0x5083ae['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x4bbe68{constructor(_0x5611a3){super(_0x5611a3),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4790c6=this['editor'],_0x4b260f=_0x4790c6['commands']['get']('importWord'),_0x1ca4a4=_0x4790c6['plugins']['get'](_0x1144d3);_0x4b260f&&(_0x4b260f['on']('execute',(_0x5ce309,[,_0x1fa1ba])=>{_0x1fa1ba['collaboration_features']={'comments':!0x0,'user_id':_0x1ca4a4['me']['id']};},{'priority':_0x5bb197['high']+0xa}),this['listenTo'](_0x4b260f,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x110e5d,_0x950a80){const {comment_threads:_0x580866}=_0x950a80;_0x580866&&_0x580866['forEach'](({thread_id:_0x50b75c,comments:_0x96b7de,is_resolved:_0x199997})=>{const _0x145eaf=new Date(),_0x5a3e4c=_0x96b7de['map'](({author:_0x31c63b,content:_0x1ba8ae,created_at:_0x2ad0ab})=>({'content':_0x1ba8ae,'authorId':this['editor']['plugins']['get'](_0x1144d3)['me']['id'],'createdAt':_0x145eaf,'attributes':{'@external':{'authorName':_0x31c63b,'createdAt':_0x2ad0ab?new Date(_0x2ad0ab):new Date(),'source':'importWord'}}})),_0x217ffc=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x217ffc,'threadId':_0x50b75c,'comments':_0x5a3e4c,'resolvedAt':_0x199997?_0x145eaf:null});});}}class ri extends _0x4bbe68{constructor(_0x466dd1){super(_0x466dd1),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0xbfb6f0=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0xbfb6f0,'contentInsertion',(_0x3cf7ac,_0x4845fe)=>this['_removeMarkersWithoutThreads'](_0x4845fe['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x34a86c){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x34a86c;const _0x39a81f=this['editor']['plugins']['get']('CommentsRepository');for(const _0xed1258 of _0x34a86c['keys']()){const [_0x175f6e,_0x4a959b]=_0xed1258['split'](':');'comment'!=_0x175f6e||_0x39a81f['hasCommentThread'](_0x4a959b)||_0x34a86c['delete'](_0xed1258);}return _0x34a86c;}['_registerMarkerInClipboardPipeline'](){const _0x11d7e9=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5094c2=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5094c2&&_0x11d7e9['_registerMarkerToCopy']('comment',_0x5094c2);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x69fdc0){switch(_0x69fdc0){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x45bb01){const _0x135705=_0x45bb01['split'](':');return{'group':_0x135705[0x0],'id':_0x135705[0x1],'part':_0x135705[0x2]};}class ai extends _0x4bbe68{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x41491a,_0x2738ee)=>{if(!_0x2738ee['options']['showCommentHighlights'])return null;if(_0x2738ee['options']['ignoreResolvedComments']){const {id:_0x18afb6}=hi(_0x41491a['markerName']),_0x41c290=this['editor']['plugins']['get'](Qt);if(_0x41c290['getCommentThread'](_0x18afb6)?.['isResolved']&&_0x41491a['item'])return _0x2738ee['consumable']['consume'](_0x41491a['item'],'addMarker:'+_0x41491a['markerName']),_0x2738ee['consumable']['consume'](_0x41491a['item'],'removeMarker:'+_0x41491a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4aa2f4=>{_0x4aa2f4['on']('addMarker:comment',(_0x20d99e,_0x11176b,_0x5c0c5a)=>{if(!_0x5c0c5a['options']['showCommentHighlights'])return;const _0x532559=_0x11176b['item'];if(!_0x532559)return;const _0x3ff29b=_0x5c0c5a['mapper']['toViewElement'](_0x532559);this['editor']['model']['schema']['isObject'](_0x532559)&&_0x3ff29b&&!_0x3ff29b['getCustomProperty']('widget')&&_0x3ff29b['is']('containerElement')&&Ct(_0x3ff29b,_0x5c0c5a['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3ff516,{writer:_0x2679f2,options:_0x4bf153})=>{if(!_0x4bf153['showCommentHighlights'])return null;const _0x28d2a8=_0x2679f2['createContainerElement']('div'),_0x258411=_0x2679f2['createEmptyElement']('hr');return _0x2679f2['addClass']('ck-horizontal-line',_0x28d2a8),_0x2679f2['insert'](_0x2679f2['createPositionAt'](_0x28d2a8,0x0),_0x258411),_0x28d2a8;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3a4a6a,{writer:_0x5b9638,options:_0x4df4a6})=>{if(!_0x4df4a6['showCommentHighlights'])return null;const _0x486086=_0x5b9638['createContainerElement']('span'),_0x4af582=_0x5b9638['createEmptyElement']('img');return _0x5b9638['addClass']('image-inline',_0x486086),_0x5b9638['insert'](_0x5b9638['createPositionAt'](_0x486086,0x0),_0x4af582),_0x486086;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x913d87,{writer:_0x71d07f,options:_0x23d4b5})=>{if(_0x23d4b5['showCommentHighlights'])return _0x71d07f['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x16fbb5,_0x58ff29,_0xaec34b)=>{_0xaec34b['options']['showCommentHighlights']&&_0x16fbb5['stop']();},{'priority':'high'});}}class ci extends _0x4bbe68{static get['requires'](){return[Qt,si,_0x1144d3,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x164f55){super(_0x164f55),this['set']('isThreadsLoadingPaused',!0x0),_0x164f55['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3e43a3,_0x516d09,_0x46fd67,_0x45a732)=>{const _0x5eba4f=_0x164f55['plugins']['get'](Qt),_0x2fa0e3=_0x46fd67?hi(_0x46fd67)['id']:null;_0x164f55['model']['change'](()=>{if(_0x2fa0e3){const _0x23e486=this['getAllMarkersForId'](_0x2fa0e3);for(const _0x376c39 of _0x23e486)_0x164f55['editing']['reconvertMarker'](_0x376c39);}if(_0x45a732){const {id:_0x39942b}=hi(_0x45a732),_0x3c724f=_0x5eba4f['getCommentThread'](_0x39942b);if(_0x3c724f&&_0x3c724f['unlinkedAt'])return;if(_0x3c724f&&!_0x3c724f['isAttached'])return;const _0x5534b1=this['getAllMarkersForId'](_0x39942b);for(const _0xa05c58 of _0x5534b1)_0x164f55['editing']['reconvertMarker'](_0xa05c58);}}),_0x2fa0e3&&this['scrollToThreadMarker'](_0x2fa0e3);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4ffca5=this['editor'],_0x2aebb9=_0x4ffca5['plugins']['get'](Qt),_0x17556c=_0x4ffca5['config']['get']('collaboration.channelId'),_0x3418c3=_0x2aebb9['getCommentThreads']()['filter'](_0x1823a1=>_0x1823a1['channelId']!==_0x17556c);_0x4ffca5['commands']['add']('addCommentThread',new ei(_0x4ffca5)),this['listenTo'](_0x4ffca5,'change:isReadOnly',(_0x59668b,_0x3519d4,_0x170614)=>{_0x2aebb9['switchReadOnly'](_0x170614,_0x4ffca5['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2aebb9,di('addCommentThread',_0x17556c),(_0xe1a4c3,{threadId:_0x5460e4})=>{const _0x529b3d=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x5460e4);_0x529b3d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5460e4);}),this['listenTo'](_0x2aebb9,di('removeCommentThread',_0x17556c),(_0x5f0f9f,{threadId:_0x4b7293})=>{_0x4ffca5['model']['enqueueChange']({'isUndoable':!0x1},_0x5cda76=>{const _0x1f3b47=this['getAllMarkersForId'](_0x4b7293);for(const _0x67fe52 of _0x1f3b47)_0x5cda76['removeMarker'](_0x67fe52);});}),this['listenTo'](_0x2aebb9,di('resolveCommentThread',_0x17556c),(_0x1e7a06,{threadId:_0x3ebf93})=>{(this['_reconvertMarkers'](_0x3ebf93),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x3ebf93)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2aebb9,di('reopenCommentThread',_0x17556c),(_0x2252ce,{threadId:_0x2c71f7})=>{this['_reconvertMarkers'](_0x2c71f7);},{'priority':'low'}),this['listenTo'](_0x2aebb9,di('addComment',_0x17556c),(_0x27d0f9,{threadId:_0xe23aa4,isFromAdapter:_0x5c5212})=>{const _0x1c1d10=this['getAllMarkersForId'](_0xe23aa4);if(_0x5c5212||0x0==_0x1c1d10['length']||!_0x2aebb9['hasCommentThread'](_0xe23aa4))return;0x1===_0x2aebb9['getCommentThread'](_0xe23aa4)['length']&&_0x4ffca5['model']['enqueueChange']({'isUndoable':!0x1},_0x5b58f4=>{for(const _0x40e92a of _0x1c1d10)_0x5b58f4['updateMarker'](_0x40e92a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3418c3);}['afterInit'](){!async function(_0x14f3fa){const _0x46a93c=_0x5830b0([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x4101c5=0x73460ab3,_0x10db07=0x73418f63^_0x4101c5,_0x3f1e5b=window[_0x5830b0([0x44,0x61,0x74,0x65])][_0x5830b0([0x6e,0x6f,0x77])](),_0x1160cb=_0x14f3fa[_0x5830b0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5a2df2=new window[(_0x5830b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4da3df=>{_0x1160cb[_0x5830b0([0x6f,0x6e,0x63,0x65])](_0x5830b0([0x72,0x65,0x61,0x64,0x79]),_0x4da3df);}),_0x5f2557={[_0x5830b0([0x6b,0x74,0x79])]:_0x5830b0([0x45,0x43]),[_0x5830b0([0x75,0x73,0x65])]:_0x5830b0([0x73,0x69,0x67]),[_0x5830b0([0x63,0x72,0x76])]:_0x5830b0([0x50,0x2d,0x32,0x35,0x36]),[_0x5830b0([0x78])]:_0x5830b0([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]),[_0x5830b0([0x79])]:_0x5830b0([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]),[_0x5830b0([0x61,0x6c,0x67])]:_0x5830b0([0x45,0x53,0x32,0x35,0x36])},_0x3e5998=_0x1160cb[_0x5830b0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5830b0([0x67,0x65,0x74])](_0x5830b0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2eb9ad(){let _0x773456,_0x59a05a=null,_0x158d81=null;try{if(_0x3e5998==_0x5830b0([0x47,0x50,0x4c]))return _0x5830b0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x773456=_0x177402(),!_0x773456)return _0x5830b0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x773456[_0x5830b0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x158d81=_0x3accac(_0x773456[_0x5830b0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x773456[_0x5830b0([0x6a,0x74,0x69])])),await _0x4e76a7()?_0x81d7e0()?_0x533495()?_0x5830b0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4b32a3()?(_0x773456[_0x5830b0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5830b0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x59a05a=_0x65ce7a(_0x5830b0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x257c6b()):_0x5830b0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5830b0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5830b0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5830b0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x533495(){const _0x37378f=[_0x5830b0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5830b0([0x74,0x72,0x69,0x61,0x6c])][_0x5830b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x773456[_0x5830b0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3f1e5b/0x3e8:0xe10*_0x10db07;return _0x773456[_0x5830b0([0x65,0x78,0x70])]<_0x37378f;}function _0x81d7e0(){const _0x202f62=_0x773456[_0x5830b0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x202f62)return!0x1;if(_0x202f62[_0x5830b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5830b0([0x2a])))return!0x0;if(_0x202f62[_0x5830b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5830b0([0x43,0x4d,0x54])))return!0x0;if(_0x202f62[_0x5830b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5830b0([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x35dff4())return!0x0;if(_0x202f62[_0x5830b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5830b0([0x52,0x43,0x4d,0x54]))){if(_0x5081d9())return!0x0;if(_0x55972b()||_0x150938())return!0x0;}return!0x1;}function _0x4b32a3(){const _0x5f45de=_0x773456[_0x5830b0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5f45de||0x0==_0x5f45de[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2246b7}=new URL(window[_0x5830b0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5f45de[_0x5830b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2246b7))return!0x0;const _0xd22920=_0x2246b7[_0x5830b0([0x73,0x70,0x6c,0x69,0x74])](_0x5830b0([0x2e]));return _0x5f45de[_0x5830b0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x27a56f=>_0x27a56f[_0x5830b0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5830b0([0x2a])))[_0x5830b0([0x6d,0x61,0x70])](_0x4b1ed7=>_0x4b1ed7[_0x5830b0([0x73,0x70,0x6c,0x69,0x74])](_0x5830b0([0x2e])))[_0x5830b0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2df3e2=>_0x2df3e2[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xd22920[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5830b0([0x6d,0x61,0x70])](_0x334ebd=>Array(_0xd22920[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x334ebd[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5830b0([0x66,0x69,0x6c,0x6c])](_0x334ebd[0x0]===_0x5830b0([0x2a])?_0x5830b0([0x2a]):'')[_0x5830b0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x334ebd))[_0x5830b0([0x73,0x6f,0x6d,0x65])](_0xa78399=>_0xd22920[_0x5830b0([0x65,0x76,0x65,0x72,0x79])]((_0x700704,_0x296491)=>_0xa78399[_0x296491]===_0x700704||_0xa78399[_0x296491]===_0x5830b0([0x2a])));}function _0x257c6b(){return _0x59a05a&&_0x158d81?new window[(_0x5830b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15b972,_0x26c496)=>{_0x59a05a[_0x5830b0([0x74,0x68,0x65,0x6e])](_0x15b972,_0x26c496),_0x158d81[_0x5830b0([0x74,0x68,0x65,0x6e])](_0x31e8b6=>{_0x31e8b6!=_0x5830b0([0x56,0x61,0x6c,0x69,0x64])&&_0x15b972(_0x31e8b6);},_0x26c496);}):_0x59a05a||_0x158d81||_0x5830b0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3accac(_0x41a0be,_0x34985f){return new window[(_0x5830b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x177a91=>{if(_0x3889a())return _0x177a91(_0x5830b0([0x56,0x61,0x6c,0x69,0x64]));_0x378a82(),_0x1160cb[_0x5830b0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5830b0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2deed5=!0x1;const _0x3a7959=_0x940a35();function _0x1e4f15(_0x2f922d){return!!_0x2f922d&&(typeof _0x2f922d===_0x5830b0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2f922d===_0x5830b0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2f922d[_0x5830b0([0x74,0x68,0x65,0x6e])]===_0x5830b0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2f922d[_0x5830b0([0x63,0x61,0x74,0x63,0x68])]===_0x5830b0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x11dcea(_0x4c307c){_0x3506db(_0x4c307c)[_0x5830b0([0x74,0x68,0x65,0x6e])](_0x2ce38b=>{if(!_0x2ce38b||_0x2ce38b[_0x5830b0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5830b0([0x6f,0x6b]))return _0x5830b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x35f745(_0x1bc19e(_0x3a7959+_0x34985f))!=_0x2ce38b[_0x5830b0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5830b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5830b0([0x56,0x61,0x6c,0x69,0x64]);})[_0x5830b0([0x74,0x68,0x65,0x6e])](_0xbfbeae=>(_0x31e02c(),_0xbfbeae),()=>{const _0xd6e74a=_0x4fe1ca();return null==_0xd6e74a?(_0x31e02c(),_0x5830b0([0x56,0x61,0x6c,0x69,0x64])):_0x5830b0(_0x3f1e5b-_0xd6e74a>(0x574a8eb3^_0x4101c5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5830b0([0x74,0x68,0x65,0x6e])](_0x177a91)[_0x5830b0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x177a91(_0x5830b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x422d1d=0x7370e433^_0x4101c5;function _0x31e02c(){const _0x2cf44=_0x5830b0([0x6c,0x6c,0x63,0x74,0x2d])+_0x35f745(_0x1bc19e(_0x41a0be)),_0x27c50b=_0x5245e8(_0x35f745(window[_0x5830b0([0x4d,0x61,0x74,0x68])][_0x5830b0([0x63,0x65,0x69,0x6c])](_0x3f1e5b/_0x422d1d)));window[_0x5830b0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5830b0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2cf44,_0x27c50b);}function _0x4fe1ca(){const _0x132512=_0x5830b0([0x6c,0x6c,0x63,0x74,0x2d])+_0x35f745(_0x1bc19e(_0x41a0be)),_0x53fc98=window[_0x5830b0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5830b0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x132512);return _0x53fc98?window[_0x5830b0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5245e8(_0x53fc98),0x10)*_0x422d1d:null;}function _0x3506db(_0x4696b9){return new window[(_0x5830b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d533e,_0x367720)=>{_0x4696b9[_0x5830b0([0x74,0x68,0x65,0x6e])](_0x2d533e,_0x367720),window[_0x5830b0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x367720,0x7347de73^_0x4101c5);});}}_0x1160cb[_0x5830b0([0x6f,0x6e])](_0x5830b0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xe037a8,_0x3a2041)=>{if(_0x3a2041[0x0]!=_0x41a0be)return _0x177a91(_0x5830b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3a2041[0x1]={..._0x3a2041[0x1],[_0x5830b0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3a7959};},{[_0x5830b0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5830b0([0x68,0x69,0x67,0x68])}),_0x1160cb[_0x5830b0([0x6f,0x6e])](_0x5830b0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x405d31=>{_0x1e4f15(_0x405d31[_0x5830b0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2deed5=!0x0,_0x11dcea(_0x405d31[_0x5830b0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5830b0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5830b0([0x6c,0x6f,0x77])}),_0x5a2df2[_0x5830b0([0x74,0x68,0x65,0x6e])](()=>{_0x2deed5||_0x177a91(_0x5830b0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3889a(){return _0x1160cb[_0x5830b0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5830b0([0x76,0x69,0x65,0x77])][_0x5830b0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5830b0([0x61,0x75,0x74,0x6f]);}function _0x378a82(){_0x1160cb[_0x5830b0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5830b0([0x76,0x69,0x65,0x77])][_0x5830b0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5830b0([0x61,0x75,0x74,0x6f]);}}function _0x65ce7a(_0x234e4a){const _0x8e0904=[new window[(_0x5830b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26b135=>setTimeout(_0x26b135,0x734f347f^_0x4101c5)),_0x5a2df2[_0x5830b0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5830b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b0512=>{let _0x257f69=0x0;_0x1160cb[_0x5830b0([0x6d,0x6f,0x64,0x65,0x6c])][_0x5830b0([0x6f,0x6e])](_0x5830b0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5e7334,_0x1aa2ec)=>{_0x1aa2ec[0x0][_0x5830b0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x257f69++,_0x257f69==(0x73460f5b^_0x4101c5)&&(_0x5b0512(),_0x5e7334[_0x5830b0([0x6f,0x66,0x66])]());});}))];return window[_0x5830b0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5830b0([0x72,0x61,0x63,0x65])](_0x8e0904)[_0x5830b0([0x74,0x68,0x65,0x6e])](()=>_0x234e4a);}async function _0x4d9d42(){await _0x5a2df2,_0x1160cb[_0x5830b0([0x6d,0x6f,0x64,0x65,0x6c])][_0x5830b0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x443fc5,_0x1160cb[_0x5830b0([0x6d,0x6f,0x64,0x65,0x6c])][_0x5830b0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x443fc5,_0x1160cb[_0x5830b0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5830b0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x35dff4(){return window[_0x5830b0([0x67,0x6c,0x6f,0x62])]&&window[_0x5830b0([0x67,0x6c,0x6f,0x62])][_0x5830b0([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x5081d9(){return _0x76d186(_0x5830b0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x331000(_0x5830b0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5830b0([0x73,0x74,0x61,0x74,0x65])]==_0x5830b0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x55972b(){return _0x76d186(_0x5830b0([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 _0x150938(){return _0x76d186(_0x5830b0([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x442c65(_0x2ab250){const _0x1e4580=_0x5a1aa7();_0x1160cb[_0x1e4580]=_0x5830b0([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2ab250,_0x2ab250!=_0x5830b0([0x56,0x61,0x6c,0x69,0x64])&&_0x4d9d42();}function _0x5a1aa7(){const _0x51176d=window[_0x5830b0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5830b0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5830b0([0x6e,0x6f,0x77])]())[_0x5830b0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5830b0([0x2e]),'');let _0x262d17=_0x5830b0([0x4b]);for(let _0x119b2e=0x0;_0x119b2e<_0x51176d[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x119b2e+=0x2){let _0xfca034=window[_0x5830b0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x51176d[_0x5830b0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x119b2e,_0x119b2e+0x2));_0xfca034>=_0x46a93c[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xfca034-=_0x46a93c[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x262d17+=_0x46a93c[_0xfca034];}return _0x262d17;}function _0x177402(){const _0x28f034=_0x3e5998[_0x5830b0([0x73,0x70,0x6c,0x69,0x74])](_0x5830b0([0x2e]));if(0x3!=_0x28f034[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x662333(_0x28f034[0x1]);function _0x662333(_0x361cb1){const _0x3af449=_0x1af423(_0x361cb1);return _0x3af449&&_0x28eabd()?_0x3af449:null;function _0x28eabd(){const _0x2e6e89=_0x3af449[_0x5830b0([0x6a,0x74,0x69])],_0x4febf1=window[_0x5830b0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e6e89[_0x5830b0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2e6e89[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3439b4={..._0x3af449,[_0x5830b0([0x6a,0x74,0x69])]:_0x2e6e89[_0x5830b0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2e6e89[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3439b4[_0x5830b0([0x76,0x63])],_0x1bc19e(_0x3439b4)==_0x4febf1;}}}async function _0x4e76a7(){let _0x79abb3=!0x0;try{const _0x58259d=_0x3e5998[_0x5830b0([0x73,0x70,0x6c,0x69,0x74])](_0x5830b0([0x2e])),[_0x4183f9,_0x42cf13,_0x3428c3]=_0x58259d;return _0x3ce44c(_0x4183f9),await _0x395826(_0x4183f9,_0x42cf13,_0x3428c3),_0x79abb3;}catch{return!0x1;}function _0x3ce44c(_0x201003){const _0x446364=_0x1af423(_0x201003);_0x446364&&_0x446364[_0x5830b0([0x61,0x6c,0x67])]==_0x5830b0([0x45,0x53,0x32,0x35,0x36])||(_0x79abb3=!0x1);}async function _0x395826(_0x146627,_0x569fa9,_0x297320){const _0x38965a=window[_0x5830b0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5830b0([0x66,0x72,0x6f,0x6d])](_0x35183e(_0x297320),_0x12423a=>_0x12423a[_0x5830b0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x91291c=new window[(_0x5830b0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5830b0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x146627+_0x5830b0([0x2e])+_0x569fa9),_0x549cd7=window[_0x5830b0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5830b0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x549cd7)return;const _0x2a71e9=await _0x549cd7[_0x5830b0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5830b0([0x6a,0x77,0x6b]),_0x5f2557,{[_0x5830b0([0x6e,0x61,0x6d,0x65])]:_0x5830b0([0x45,0x43,0x44,0x53,0x41]),[_0x5830b0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5830b0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5830b0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x549cd7[_0x5830b0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5830b0([0x6e,0x61,0x6d,0x65])]:_0x5830b0([0x45,0x43,0x44,0x53,0x41]),[_0x5830b0([0x68,0x61,0x73,0x68])]:{[_0x5830b0([0x6e,0x61,0x6d,0x65])]:_0x5830b0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2a71e9,_0x38965a,_0x91291c)||(_0x79abb3=!0x1);}}function _0x1af423(_0x2c1a3e){return _0x2c1a3e[_0x5830b0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5830b0([0x65,0x79]))?JSON[_0x5830b0([0x70,0x61,0x72,0x73,0x65])](_0x35183e(_0x2c1a3e)):null;}function _0x35183e(_0x9c7fdf){return window[_0x5830b0([0x61,0x74,0x6f,0x62])](_0x9c7fdf[_0x5830b0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5830b0([0x2b]))[_0x5830b0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5830b0([0x2f])));}function _0x1bc19e(_0x517cc1){let _0x5eb590=0x1505;function _0xd8a713(_0x360c28){for(let _0x4f2523=0x0;_0x4f2523<_0x360c28[_0x5830b0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4f2523++){const _0x375da8=_0x360c28[_0x5830b0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4f2523);_0x5eb590=(_0x5eb590<<0x5)+_0x5eb590+_0x375da8,_0x5eb590&=_0x5eb590;}}function _0x5680de(_0x1eb50c){Array[_0x5830b0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1eb50c)?_0x1eb50c[_0x5830b0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5680de):_0x1eb50c&&typeof _0x1eb50c==_0x5830b0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5830b0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1eb50c)[_0x5830b0([0x73,0x6f,0x72,0x74])]()[_0x5830b0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3fd3ed,_0x9d7e1c])=>{_0xd8a713(_0x3fd3ed),_0x5680de(_0x9d7e1c);}):_0xd8a713(window[_0x5830b0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1eb50c));}return _0x5680de(_0x517cc1),_0x5eb590>>>0x0;}function _0x35f745(_0x48453b){return _0x48453b[_0x5830b0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5830b0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5830b0([0x30]));}function _0x5245e8(_0x529c15){return _0x529c15[_0x5830b0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5830b0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5830b0([0x6a,0x6f,0x69,0x6e])]('');}function _0x76d186(_0x3bef2c){return _0x1160cb[_0x5830b0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5830b0([0x68,0x61,0x73])](_0x3bef2c);}function _0x331000(_0x280a6e){return _0x1160cb[_0x5830b0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5830b0([0x67,0x65,0x74])](_0x280a6e);}function _0x443fc5(){}function _0x5830b0(_0x44c638){return _0x44c638['map'](_0xe5f2fc=>String['fromCharCode'](_0xe5f2fc))['join']('');}_0x442c65(await _0x2eb9ad());}(this);}['destroy'](){const _0x4b35ea=this['editor']['plugins']['get'](Qt),_0x9f94cc=this['editor']['config']['get']('collaboration.channelId');for(const _0x4f0b36 of _0x4b35ea['getCommentThreads']({'channelId':_0x9f94cc}))_0x4b35ea['_detachCommentThread'](_0x4f0b36['id']),_0x4b35ea['_threads']['delete'](_0x4f0b36['id']);super['destroy']();}['hasMarkerForId'](_0x1877fc){return this['getAllMarkersForId'](_0x1877fc)['length']>0x0;}['getAllMarkersForId'](_0x89db9d){const _0x16b5fb=[];for(const _0x2ce6e6 of this['editor']['model']['markers'])_0x2ce6e6['name']['startsWith']('comment:'+_0x89db9d)&&_0x16b5fb['push'](_0x2ce6e6);return _0x16b5fb;}['scrollToThreadMarker'](_0x411bac){setTimeout(()=>{const _0x52b650=this['_getTargetForId'](_0x411bac);if(!_0x52b650)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x411bac&&_0x10d1ea({'target':_0x52b650[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1648f7){this['editor']['model']['change'](()=>{for(const _0x41d2e4 of this['getAllMarkersForId'](_0x1648f7))this['editor']['editing']['reconvertMarker'](_0x41d2e4);});}['_attachArchivedThread'](_0x32f5b6){const _0x15bc68=this['editor']['plugins']['get'](Qt),_0x2e9709=this['editor']['plugins']['get'](si),_0x2e0f67=_0x15bc68['getCommentThread'](_0x32f5b6);if(!_0x2e0f67['isAttached']){const _0x1c3880=_0x2e0f67['attachTo'](()=>this['_getTargetForId'](_0x2e0f67['id']));_0x2e9709['registerAnnotation'](_0x1c3880),_0x2e0f67['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1bf090=this['editor'],_0x5ba1d1=_0x1bf090['plugins']['get'](_0x1144d3);_0x1bf090['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1f0ed1,_0x27efb2)=>{const {id:_0x30466f}=hi(_0x1f0ed1['markerName']),_0xd4d97a=_0x1bf090['plugins']['get'](Qt)['getCommentThread'](_0x30466f),_0x17983b=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x30466f;let _0x1fe4c0;if(_0xd4d97a&&_0xd4d97a['isResolved']&&!_0x17983b&&_0x1f0ed1['item'])return _0x27efb2['consumable']['consume'](_0x1f0ed1['item'],'addMarker:'+_0x1f0ed1['markerName']),_0x27efb2['consumable']['consume'](_0x1f0ed1['item'],'removeMarker:'+_0x1f0ed1['markerName']),null;const _0x159f43=['ck-comment-marker'];return _0x17983b&&_0x159f43['push']('ck-comment-marker--active'),_0x1fe4c0=_0xd4d97a?.['length']?_0xd4d97a['comments']['first']['author']['id']:_0x5ba1d1['me']['id'],{'classes':_0x159f43,'attributes':{'data-comment':_0x30466f,'data-author-id':_0x1fe4c0}};}}),_0x1bf090['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x53c845,{options:_0x3aa142})=>{if(_0x3aa142['showCommentHighlights'])return null;const _0x47cb0e=_0x1bf090['plugins']['get'](Qt),_0x40c8cf=_0x1bf090['model']['markers']['get'](_0x53c845),{id:_0x3daf85,part:_0x1fe60f}=hi(_0x53c845);return _0x40c8cf&&!_0x40c8cf['affectsData']||_0x3aa142['ignoreResolvedComments']&&_0x47cb0e['getCommentThread'](_0x3daf85)?.['isResolved']?null:{'group':'comment','name':_0x1fe60f?_0x3daf85+':'+_0x1fe60f:_0x3daf85};}}),_0x1bf090['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4707f3,{writer:_0xa37e9d})=>_0xa37e9d['createElement']('$marker',{'data-name':'comment:'+_0x4707f3['getAttribute']('id')})}),_0x1bf090['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5e58fd=this['editor'],_0x1156e4=_0x5e58fd['plugins']['get'](Qt),_0x50bdb2=new Set(),_0x37a1e5=new Set();_0x5e58fd['model']['document']['registerPostFixer'](_0x3c0519=>{let _0x44a0fb=!0x1;for(const {name:_0x21ba91,data:_0x201d1b}of _0x5e58fd['model']['document']['differ']['getChangedMarkers']()){const {group:_0x10b912,id:_0xc87d32}=hi(_0x21ba91);let _0xe53b43=_0x201d1b['newRange'];if('comment'!==_0x10b912||!_0xe53b43)continue;const _0x2942c2='$graveyard'===_0xe53b43['root']['rootName'];_0x2942c2||(_0xe53b43=li(_0xe53b43,_0x5e58fd['model']),!_0xe53b43||_0xe53b43['isCollapsed']||!_0x201d1b['newRange']||_0xe53b43['isEqual'](_0x201d1b['newRange']))?_0x5e58fd['model']['hasContent'](_0xe53b43)&&!_0x2942c2?this['isThreadsLoadingPaused']?_0x50bdb2['add'](_0x21ba91):this['_handleThreadMarker'](_0x21ba91,_0xc87d32):(_0x37a1e5['add'](_0x21ba91),_0x50bdb2['delete'](_0x21ba91),_0x3c0519['removeMarker'](_0x21ba91),_0x44a0fb=!0x0):(_0x3c0519['updateMarker'](_0x21ba91,{'range':_0xe53b43}),_0x44a0fb=!0x0);}return _0x44a0fb;}),this['on']('change:isThreadsLoadingPaused',(_0x3313e1,_0x22251a,_0x1f61d8)=>{if(!_0x1f61d8&&_0x50bdb2['size'])for(const _0x4b8d49 of _0x50bdb2){const {id:_0x4aa6e9}=hi(_0x4b8d49);_0x50bdb2['delete'](_0x4b8d49),_0x5e58fd['model']['markers']['get'](_0x4b8d49)&&this['_handleThreadMarker'](_0x4b8d49,_0x4aa6e9);}}),this['listenTo'](_0x5e58fd['model']['document'],'change',()=>{for(const {name:_0x229a2b,data:{newRange:_0x4392ae}}of _0x5e58fd['model']['document']['differ']['getChangedMarkers']()){const {group:_0x18cdcc,id:_0x36d298}=hi(_0x229a2b);if('comment'!==_0x18cdcc)continue;const _0x4bf1e0=_0x1156e4['getCommentThread'](_0x36d298),_0x47c04e=this['hasMarkerForId'](_0x36d298);_0x4bf1e0&&(!_0x4bf1e0['_hasTargetInContent']&&_0x4392ae&&_0x5e58fd['editing']['view']['once']('render',()=>{const _0x18ed36=_0x5e58fd['plugins']['get']($t),_0x2b96ee=_0x1156e4['_threadToController']['get'](_0x4bf1e0)['view'];_0x18ed36['getByInnerView'](_0x2b96ee)['refreshVisibility']();},{'priority':'low'}),_0x4bf1e0['_hasTargetInContent']=_0x47c04e||!!_0x4392ae),_0x4392ae||(_0x37a1e5['add'](_0x229a2b),_0x50bdb2['delete'](_0x229a2b));}for(const _0x14e74d of _0x37a1e5){const {id:_0x54b71f}=hi(_0x14e74d),_0x5c8edd=_0x1156e4['getCommentThread'](_0x54b71f);if(_0x50bdb2['delete'](_0x14e74d),!_0x5c8edd)continue;const _0x27bc53=this['hasMarkerForId'](_0x54b71f);_0x27bc53||_0x5c8edd['isSubmitted']?_0x27bc53||_0x5c8edd['unlinkedAt']||_0x5c8edd['setUnlinkedAt'](new Date()):_0x5c8edd['remove']();}_0x37a1e5['clear']();});}['_handleInitialThreads'](_0x2f2bb5){_0x2f2bb5['forEach'](_0x195a81=>{_0x195a81['unlinkedAt']&&this['_attachArchivedThread'](_0x195a81['id']);});}['_getTargetForId'](_0x202c8e){const _0x5cb746=this['editor'],_0x36d3ca=this['getAllMarkersForId'](_0x202c8e);return _0x2a1160(_0x5cb746['editing'],_0x36d3ca);}['_getTextContext'](_0x21d97b){const _0x3cca35=this['getAllMarkersForId'](_0x21d97b);let _0x285e2e='',_0x5e7750=!0x1;for(const _0x14a5de of _0x3cca35){const _0x40e8dd=_0x14a5de['getRange']();for(const _0x5d7f91 of Array['from'](_0x40e8dd['getItems']()))_0x5d7f91['is']('$textProxy')?(_0x285e2e&&_0x5e7750&&(_0x285e2e+='\x20',_0x5e7750=!0x1),_0x285e2e+=_0x5d7f91['data']):_0x5e7750=!0x0;_0x5e7750=!0x0;}return _0x285e2e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5fd4e9,_0xc25a6e){const _0x1adb9a=this['editor'],_0x3bc660=_0x1adb9a['plugins']['get'](Qt);let _0x4ac091=_0x3bc660['getCommentThread'](_0xc25a6e);const _0x1036a8=_0x1adb9a['config']['get']('collaboration.channelId'),_0x96d989=_0x1adb9a['plugins']['get'](si);if(_0x4ac091&&(_0x4ac091['unlinkedAt']&&_0x4ac091['setUnlinkedAt'](null),_0x4ac091['isAttached']))return _0x4ac091;return!this['getAllMarkersForId'](_0xc25a6e)[0x0]['managedUsingOperations']?_0x1adb9a['editing']['view']['once']('render',()=>{if(_0x3bc660['getCommentThread'](_0xc25a6e))return;const _0x379ed6=_0x1adb9a['plugins']['get']($t);_0x4ac091=_0x3bc660['openNewCommentThread']({'channelId':_0x1036a8,'threadId':_0xc25a6e,'target':()=>this['_getTargetForId'](_0xc25a6e),'context':{'type':'text','value':this['_getTextContext'](_0xc25a6e)}});const _0x528486=_0x3bc660['_threadToController']['get'](_0x4ac091)['view'],_0x494acc=_0x379ed6['getByInnerView'](_0x528486);_0x494acc&&_0x96d989['registerAnnotation'](_0x494acc);},{'priority':'low'}):_0x3bc660['fetchCommentThread']({'channelId':_0x1036a8,'threadId':_0xc25a6e})['then'](_0x5d0c92=>{if('destroyed'!==_0x1adb9a['state']){if(_0x4ac091=_0x5d0c92,_0x4ac091&&!_0x4ac091['isAttached']){const _0x1dae88=_0x4ac091['attachTo'](()=>this['_getTargetForId'](_0xc25a6e));_0x96d989['registerAnnotation'](_0x1dae88),_0x4ac091['isResolved']&&this['_reconvertMarkers'](_0xc25a6e);}else{if(!_0x4ac091){const _0x5febc=this['getAllMarkersForId'](_0xc25a6e);_0x1adb9a['model']['change'](_0x42881b=>{for(const _0x48df7e of _0x5febc)_0x42881b['removeMarker'](_0x48df7e);});}}}}),_0x4ac091;}['_handleThreadMarker'](_0x5f0a01,_0x4d5680){const _0x5273c7=this['_attachMarkerToThread'](_0x5f0a01,_0x4d5680);_0x5273c7&&!_0x5273c7['context']&&_0x5273c7['setContext']({'type':'text','value':this['_getTextContext'](_0x4d5680)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4d0bc7=this['editor'];_0x382293(_0x4d0bc7['model'],({left:_0x577a4f,entered:_0x27cc9a})=>{for(const _0x2e72ba of _0x577a4f)if(ui(_0x2e72ba)){_0x4d0bc7['ui']['ariaLiveAnnouncer']['announce'](bt(_0x4d0bc7['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x18a8c2 of _0x27cc9a)if(ui(_0x18a8c2)){_0x4d0bc7['ui']['ariaLiveAnnouncer']['announce'](bt(_0x4d0bc7['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x510c81(_0x3b6ce4)));break;}});}}function di(_0x30fe37,_0x3dd717){return _0x3dd717?_0x30fe37+':'+_0x3dd717:_0x30fe37;}function li(_0x48f3af,_0x13b848){const _0x10ca4e=_0x13b848['schema'],_0x1ce559=_0x13b848['createRange'](_0x48f3af['start']);for(const _0x2f8d1c of _0x48f3af['getWalker']()){const {type:_0x1b70ca,item:_0x2448ef,nextPosition:_0x2b4028}=_0x2f8d1c;if('text'===_0x1b70ca||_0x10ca4e['isObject'](_0x2448ef)){const _0x3574ca=_0x13b848['createPositionBefore'](_0x2448ef);_0x1ce559['isCollapsed']&&(_0x1ce559['start']=_0x3574ca),_0x1ce559['end']=_0x2b4028;}}return _0x1ce559;}function ui(_0x57b5b4){return'comment'===hi(_0x57b5b4['name'])['group'];}class mi extends _0x4bbe68{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x502efd=this['editor'],_0x6af365=_0x502efd['plugins']['get'](Qt),_0x4c06c0=_0x502efd['plugins']['get'](ci),_0x6d9a8d=_0x502efd['plugins']['get']($t),_0x282bd3=_0x502efd['plugins']['get'](si);_0x502efd['ui']['componentFactory']['add']('comment',()=>{const _0x48e80f=this['_createUIButton'](_0x56992c);return _0x48e80f['tooltip']=!0x0,_0x48e80f;}),_0x502efd['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x282bd3['addSourceCollector'](()=>{const _0x1bd378=[];for(const [_0x8a2db3,_0x378cb1]of _0x6af365['_threadToController']){const _0x21cb8c=_0x4c06c0['getAllMarkersForId'](_0x8a2db3['id']),_0x3dc1c5=_0x21cb8c['map'](_0x2ca5d6=>_0x2ca5d6['getRange']());_0x21cb8c['length']>0x0&&_0x1bd378['push']([_0x378cb1['view'],_0x3dc1c5]);}return _0x1bd378;}),this['listenTo'](_0x6d9a8d,'change:activeAnnotations',(_0x43d726,_0x67a2c4,_0x1f7aa7)=>{const _0x63fd4e=Array['from'](_0x1f7aa7)['map'](_0x2b5ecf=>_0x2b5ecf['innerView'])['find'](_0x582976=>_0x6af365['_viewToController']['has'](_0x582976));if(!_0x63fd4e)return void(_0x4c06c0['activeMarker']=null);const _0x117144=_0x6af365['_viewToController']['get'](_0x63fd4e)['model']['id'],_0x36989c='comment:'+_0x117144;_0x117144&&_0x4c06c0['hasMarkerForId'](_0x117144)?_0x4c06c0['activeMarker']=_0x36989c:_0x4c06c0['activeMarker']&&(_0x4c06c0['activeMarker']=null);}),this['listenTo'](_0x6af365,'removeCommentThread',(_0x33294a,{threadId:_0xe5523e,isFromAdapter:_0x1e3ab2})=>{!_0x1e3ab2&&_0x502efd['ui']['focusTracker']['isFocused']&&_0x4c06c0['hasMarkerForId'](_0xe5523e)&&_0x502efd['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x6af365,'addComment',(_0x40ad76,{threadId:_0x100476,isFromAdapter:_0x5eef58})=>{if(_0x5eef58||!_0x4c06c0['hasMarkerForId'](_0x100476)||!_0x6af365['hasCommentThread'](_0x100476))return;0x1===_0x6af365['getCommentThread'](_0x100476)['length']&&(_0x502efd['editing']['view']['focus'](),_0x40ad76['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x19d31d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4ae2e6;for(const _0x207eb7 in _0x19d31d){const _0x173832=_0x207eb7,_0x1aee72=_0x19d31d[_0x173832];if('commentsLicenseKeyValid'==_0x1aee72||'commentsLicenseKeyInvalid'==_0x1aee72||'commentsLicenseKeyExpired'==_0x1aee72||'commentsLicenseKeyDomainLimit'==_0x1aee72||'commentsLicenseKeyNotAllowed'==_0x1aee72||'commentsLicenseKeyEvaluationLimit'==_0x1aee72||'commentsLicenseKeyUsageLimit'==_0x1aee72){delete _0x19d31d[_0x173832],_0x4ae2e6=_0x1aee72,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4ae2e6&&_0x19d31d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4ae2e6&&_0x19d31d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4ae2e6&&_0x19d31d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4ae2e6&&_0x19d31d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4ae2e6&&_0x19d31d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x4ae2e6&&_0x19d31d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4d53ed){const _0x598744=this['editor'],_0x4ad7d0=new _0x4d53ed(_0x598744['locale']),_0x294b18=_0x598744['commands']['get']('addCommentThread');return _0x4ad7d0['set']({'label':bt(_0x598744['locale'],'Comment'),'icon':_0x25812f}),_0x4ad7d0['bind']('isEnabled')['to'](_0x294b18,'isEnabled',_0x294b18,'hasContent',(_0x499e15,_0x2b72c7)=>_0x499e15&&_0x2b72c7),this['listenTo'](_0x4ad7d0,'execute',()=>{_0x294b18['execute']();}),_0x4ad7d0;}}class fi extends _0x4bbe68{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x4a04f8){super(_0x4a04f8),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x53c22,_0x3bed0e,_0x5d30f0)=>{_0x5d30f0?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5ca1e3,_0x567db7]of this['editor']['commands'])_0x567db7['affectsData']&&'addCommentThread'!==_0x5ca1e3&&_0x567db7['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0xeceda0=this['editor']['editing']['view']['document'];this['listenTo'](_0xeceda0,'cut',_0x1c0397=>_0x1c0397['stop'](),{'priority':'highest'}),this['listenTo'](_0xeceda0,'clipboardInput',_0x54366b=>_0x54366b['stop'](),{'priority':'highest'}),this['listenTo'](_0xeceda0,'delete',_0x23890d=>_0x23890d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4f29d3,_0x5aac6e]of this['editor']['commands'])_0x5aac6e['affectsData']&&'addCommentThread'!==_0x4f29d3&&_0x5aac6e['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0xb27427{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4685f0){super(_0x4685f0),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x5d2d2a=this['context']['plugins']['get']($t);this['listenTo'](_0x5d2d2a,'_activateAnnotation',(_0x49f5ac,_0x2c451d)=>{for(const _0x1800c9 of this['activeUIs']){const _0x25a05b=this['_uis']['get'](_0x1800c9);(0x0,this['uisData']['get'](_0x1800c9)['filter'])(_0x2c451d)&&_0x25a05b['setActiveAnnotation'](_0x2c451d);}}),this['listenTo'](_0x5d2d2a,'_deactivateAllAnnotations',()=>{for(const _0xe366fe of this['activeUIs']){this['_uis']['get'](_0xe366fe)['setActiveAnnotation'](null);}}),this['listenTo'](_0x5d2d2a['_visibleAnnotations'],'add',(_0x424f09,_0x1141f9)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1141f9);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3cf7eb){return this['activeUIs']['has'](_0x3cf7eb);}['activate'](_0x47d3f7,_0x570e8d=this['defaultFilter']){const _0x58a167=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x47d3f7))throw new _0x22464a('annotationsuis-missing-ui',this,{'uiName':_0x47d3f7});this['isActive'](_0x47d3f7)&&this['deactivate'](_0x47d3f7),this['activeUIs']['add'](_0x47d3f7);const _0x497f87=new jt();Xt({'source':_0x58a167['_visibleAnnotations'],'target':_0x497f87,'filter':_0x570e8d}),this['uisData']['set'](_0x47d3f7,{'collection':_0x497f87,'filter':_0x570e8d});const _0x4dec7a=this['_uis']['get'](_0x47d3f7);_0x4dec7a['attach'](_0x497f87),this['listenTo'](_0x4dec7a,'change:activeAnnotation',(_0x396654,_0x3b6b28,_0x369337,_0x374069)=>{_0x374069&&_0x58a167['_removeActiveAnnotation'](_0x374069),_0x369337&&_0x58a167['_addActiveAnnotation'](_0x369337);});}['deactivate'](_0x545313){if(this['activeUIs']['delete'](_0x545313),!this['_uis']['has'](_0x545313))throw new _0x22464a('annotationsuis-missing-ui',this,{'uiName':_0x545313});const _0x436c78=this['_uis']['get'](_0x545313);_0x436c78['detach'](),this['stopListening'](_0x436c78),this['uisData']['get'](_0x545313)['collection']['destroy'](),this['uisData']['delete'](_0x545313);}['switchTo'](_0x14d7a0){if(!this['_uis']['has'](_0x14d7a0))throw new _0x22464a('annotationsuis-missing-ui',this,{'uiName':_0x14d7a0});const _0x7c2a14=this['context']['plugins']['get']($t),_0x25af51=Array['from'](_0x7c2a14['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x14d7a0);const _0x4b91a9=this['_uis']['get'](_0x14d7a0);_0x4b91a9['setActiveAnnotation'](_0x25af51),_0x4b91a9['_setSelectedAnnotations']&&_0x25af51&&_0x4b91a9['_setSelectedAnnotations']([_0x25af51]);}['deactivateAll'](){for(const _0x4df43c of this['activeUIs'])this['deactivate'](_0x4df43c);}['register'](_0x405d4a,_0x45051a){if(this['_uis']['has'](_0x405d4a))throw new _0x22464a('annotationsuis-register-already-registered');if('function'!=typeof _0x45051a['attach']||'function'!=typeof _0x45051a['detach']||'function'!=typeof _0x45051a['setActiveAnnotation'])throw new _0x22464a('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x405d4a,_0x45051a);}['refilterAnnotations'](){const _0x2007d8=this['context']['plugins']['get']($t)['collection'],_0x13f219=new Map(),_0x1608f3=Array['from'](this['activeUIs']);for(const _0x37bb70 of this['activeUIs']){const _0x49c5ab=this['uisData']['get'](_0x37bb70)['collection'];for(const _0x1ddf0e of _0x49c5ab)_0x13f219['set'](_0x1ddf0e,_0x37bb70);}for(const _0x3b31a4 of _0x2007d8){const _0x31b719=_0x13f219['get'](_0x3b31a4);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3b31a4);const _0x2bcad9=_0x1608f3['find'](_0x1c383f=>this['uisData']['get'](_0x1c383f)['filter'](_0x3b31a4));_0x31b719!==_0x2bcad9&&(_0x31b719&&this['uisData']['get'](_0x31b719)['collection']['remove'](_0x3b31a4),_0x2bcad9&&this['uisData']['get'](_0x2bcad9)['collection']['add'](_0x3b31a4));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x215d1b){const _0x4d5e8c=[];for(const _0x19013a of this['activeUIs']){(0x0,this['uisData']['get'](_0x19013a)['filter'])(_0x215d1b)&&_0x4d5e8c['push'](_0x19013a);}if(_0x4d5e8c['length']>0x1)throw new _0x22464a('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4d5e8c,'annotationType':_0x215d1b['type']});}}const wi=/* #__PURE__ -- @preserve */
32
+ _0x4dd385('px');class _i extends _0x52cc1d{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x57102d){super(_0x57102d);const _0x1a7a88=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 _0x5eabc8(),this['focusCycler']=new _0x2b6197({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1a7a88['to']('class')],'style':{'minHeight':_0x1a7a88['to']('minHeight',_0x26986a=>'number'==typeof _0x26986a?wi(_0x26986a+0xa):null)},'dir':_0x57102d['uiLanguageDirection'],'role':'application','aria-label':bt(_0x57102d,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x57102d,'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',_0x5c1e59=>{this['_updateItemPositionInFocusables'](_0x5c1e59['source']);}),this['list']['forEach'](_0x5ed1cd=>{this['focusTracker']['add'](_0x5ed1cd['element']),this['_updateItemPositionInFocusables'](_0x5ed1cd);}),this['list']['on']('change',(_0x80fc28,_0x5d6e75)=>{for(const _0x12e24c of _0x5d6e75['removed'])this['focusTracker']['remove'](_0x12e24c['element']),this['focusables']['remove'](_0x12e24c);for(const _0xdc7502 of _0x5d6e75['added'])this['focusTracker']['add'](_0xdc7502['element']),this['_updateItemPositionInFocusables'](_0xdc7502);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x38fd25){const _0x3c4f3c=this['focusables']['getIndex'](_0x38fd25);let _0x5b016e,_0x3ceaea;for(const _0x3ce9cd of this['focusables'])if(_0x38fd25['top']<_0x3ce9cd['top']){_0x5b016e=_0x3ce9cd;break;}if(_0x3ceaea=_0x5b016e?this['focusables']['getIndex'](_0x5b016e):this['focusables']['length'],-0x1!==_0x3c4f3c){if(_0x3c4f3c===_0x3ceaea-0x1)return;this['focusables']['remove'](_0x38fd25),_0x3ceaea=_0x5b016e?this['focusables']['getIndex'](_0x5b016e):this['focusables']['length'];}this['focusables']['add'](_0x38fd25,_0x3ceaea);}}const gi=/* #__PURE__ -- @preserve */
33
+ _0x4dd385('px');class Ai extends _0x52cc1d{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1a7bd5){super(_0x1a7bd5),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4ad248,_0x33e482)=>_0x4ad248+_0x33e482),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x178a6c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x178a6c['to']('isAnimationDisabled',_0x2e04a4=>_0x2e04a4?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x178a6c['to']('top',_0x12fa50=>gi(_0x12fa50))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5e36ec=this['element']['clientHeight'];_0x5e36ec&&(this['height']=_0x5e36ec);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0xb27427{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3606c5){super(_0x3606c5),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 _0x1e7cdc=this['context']['config']['get']('sidebar.container');_0x1e7cdc&&this['setContainer'](_0x1e7cdc);}['setContainer'](_0x5ab6c){if(!yi(_0x5ab6c))throw new _0x22464a('sidebar-setcontainer-invalid-element');this['container']=_0x5ab6c;}['_attachToContainer']({viewClass:_0x4ee574='',spaceBetweenItems:_0x4f1235=0x19}={}){if(!yi(this['container']))throw new _0x22464a('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4ee574,this['_spaceBetweenItems']=_0x4f1235;}['rearrange']({removedAnnotation:_0x254bc6,previousAnnotation:_0x2cb80f,nextAnnotation:_0x3bc0f0}){const _0x16549b=this['getSidebarItemView'](_0x254bc6);this['view']['list']['remove'](_0x16549b),this['_destroySidebarItemView'](_0x254bc6),_0x2cb80f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2cb80f)),_0x3bc0f0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3bc0f0)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x173ea0,activatedAnnotation:_0x1ce8c9,disableAnimationOnActivatedAnnotation:_0x4b063a}){if(this['_activeAnnotation']=_0x1ce8c9,_0x173ea0){_0x173ea0['isActive']=!0x1;const _0x3aa6de=this['getSidebarItemView'](_0x173ea0);_0x3aa6de&&_0x4b063a&&(_0x3aa6de['isAnimationDisabled']=!0x1);}if(_0x1ce8c9){const _0x2ee8d2=this['getSidebarItemView'](_0x1ce8c9);_0x2ee8d2&&(_0x1ce8c9['isActive']=!0x0,_0x4b063a&&(_0x2ee8d2['isAnimationDisabled']=!0x0,_0x2ee8d2['top']+=0x1),this['_alignToTargetRect'](_0x2ee8d2));}}['_detachFromContainer'](_0x36abae){if(this['view']['element']['remove'](),_0x36abae){for(const _0x3edfe4 of _0x36abae)this['_destroySidebarItemView'](_0x3edfe4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1f5134,_0x5644d4){_0x5644d4||(_0x5644d4=_0x1f5134['view']);const _0x4cdad6=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4cdad6,_0x1f5134),this['_annotationToSidebarItemView']['set'](_0x1f5134,_0x4cdad6),_0x4cdad6['content']['add'](_0x5644d4),this['listenTo'](_0x1f5134['view'],'change:targetRect',(_0x15ad16,_0x5f5c2c,_0x3aa7a1)=>{const _0x4748c4=this['_getTargetTop'](_0x1f5134,_0x3aa7a1);_0x4cdad6['_targetTop']!=_0x4748c4&&(_0x4cdad6['_targetTop']=_0x4748c4,this['_setItemTop'](_0x4cdad6,_0x4748c4));}),this['listenTo'](_0x4cdad6,'change:top',()=>{this['_recalculate'](_0x4cdad6,'top');}),this['listenTo'](_0x4cdad6,'change:bottom',()=>{this['_recalculate'](_0x4cdad6,'bottom');}),this['_alignToTargetRect'](_0x4cdad6);const _0x39504a=this['_getItemBefore'](_0x4cdad6);if(_0x39504a)this['_alignAfterItem'](_0x39504a,_0x4cdad6)||this['_alignToTargetRect'](_0x4cdad6);else this['_alignToTargetRect'](_0x4cdad6);return this['_updateLastItem'](),this['view']['list']['add'](_0x4cdad6),_0x4cdad6;}['_alignForTopChange'](_0x45db8f){if(!_0x45db8f['content']['length'])return;const _0x58e488=this['_getItemBefore'](_0x45db8f);if(!_0x58e488)return;const _0x588d99=this['_sidebarItemViewToAnnotation']['get'](_0x58e488),_0x554574=this['_activeAnnotation'];_0x554574&&_0x554574===_0x588d99?this['_alignAfterItem'](_0x58e488,_0x45db8f):this['_alignBeforeItem'](_0x45db8f,_0x58e488);}['_alignForBottomChange'](_0x44fa80){if(!_0x44fa80['content']['length'])return;const _0x5a4c38=this['_getItemAfter'](_0x44fa80);if(!_0x5a4c38)return;const _0x1570c1=this['_sidebarItemViewToAnnotation']['get'](_0x5a4c38),_0x36af85=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4f6d94=this['_activeAnnotation'];_0x4f6d94&&_0x4f6d94===_0x1570c1&&_0x36af85?(this['_alignBeforeItem'](_0x5a4c38,_0x44fa80),this['_alignAfterItem'](_0x44fa80,_0x5a4c38)):_0x4f6d94&&_0x4f6d94===_0x1570c1?this['_alignBeforeItem'](_0x5a4c38,_0x44fa80):this['_alignAfterItem'](_0x44fa80,_0x5a4c38);}['_recalculate'](_0xf089d9,_0xd21322){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5b1da0,changedProp:_0x304998}of this['_recalculateBuffer'])'top'===_0x304998?this['_alignForTopChange'](_0x5b1da0):this['_alignForBottomChange'](_0x5b1da0);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xf089d9,'changedProp':_0xd21322});}['getSidebarItemView'](_0x132bfe){return this['_annotationToSidebarItemView']['get'](_0x132bfe);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1073c2){const _0x417820=this['getSidebarItemView'](_0x1073c2);this['stopListening'](_0x417820),this['stopListening'](_0x1073c2['view']),_0x417820['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1073c2),this['_sidebarItemViewToAnnotation']['delete'](_0x417820);}['_createSidebarView'](){const _0x426cf5=new _i(this['context']['locale']);return _0x426cf5['render'](),this['on']('change:_lastItem',(_0x1b0d41,_0x1fd850,_0x3674df,_0x1f362e)=>{_0x1f362e&&_0x426cf5['unbind']('minHeight'),_0x3674df?_0x426cf5['bind']('minHeight')['to'](_0x3674df,'bottom'):_0x426cf5['minHeight']=null;}),_0x426cf5;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4f001c){const _0x847653=this['_sidebarItemViewToAnnotation']['get'](_0x4f001c),_0xf68bfe=_0x847653&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x847653)-0x1);return _0xf68bfe&&this['getSidebarItemView'](_0xf68bfe)||null;}['_getItemAfter'](_0x59d2cc){const _0x3ae626=this['_sidebarItemViewToAnnotation']['get'](_0x59d2cc),_0x2232fc=_0x3ae626&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3ae626)+0x1);return _0x2232fc&&this['getSidebarItemView'](_0x2232fc)||null;}['_alignBeforeItem'](_0x28388f,_0x27a475){_0x28388f['updateHeight']();const _0x413142=vi(_0x27a475['bottom']+this['_spaceBetweenItems'],_0x28388f['top']);return!!_0x413142&&(this['_setItemTop'](_0x27a475,_0x27a475['top']-_0x413142),!0x0);}['_alignAfterItem'](_0x538926,_0x25feb1){_0x538926['updateHeight']();const _0x55d71d=vi(_0x538926['bottom']+this['_spaceBetweenItems'],_0x25feb1['top']);return!!_0x55d71d&&(this['_setItemTop'](_0x25feb1,_0x25feb1['top']+_0x55d71d,!0x1),!0x0);}['_alignToTargetRect'](_0x153e9a){const _0x537c8d=this['_sidebarItemViewToAnnotation']['get'](_0x153e9a);if(!_0x537c8d||!_0x537c8d['target']||!_0x537c8d['targetRect'])return;const _0x3bb108=this['_getTargetTop'](_0x537c8d,_0x537c8d['targetRect']);this['_setItemTop'](_0x153e9a,_0x3bb108);}['_getTargetTop'](_0x310383,_0x2f9fc0){if(null===_0x2f9fc0)return 0x0;if(_0x310383['target']instanceof _0x3f2835)return _0x2f9fc0['top'];{const _0x33f392=new _0x3f2835(this['view']['element'])['top'];return _0x2f9fc0['top']-_0x33f392;}}['_setItemTop'](_0x4148a0,_0x593f8a,_0x59a114=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x59a114&&(_0x593f8a=Math['max'](_0x593f8a,this['_getMaxAvailableTop'](_0x4148a0))),_0x4148a0['top']=_0x593f8a;}['_getMaxAvailableTop'](_0x24a15e){let _0x2b61ca=this['_getItemBefore'](_0x24a15e),_0x4534c4=0x0;for(;_0x2b61ca;)_0x2b61ca['updateHeight'](),_0x4534c4+=this['_spaceBetweenItems']+_0x2b61ca['height'],_0x2b61ca=this['_getItemBefore'](_0x2b61ca);return _0x4534c4;}}function vi(_0x3fb263,_0x3cbd9e){return Math['max'](_0x3fb263-_0x3cbd9e,0x0);}function yi(_0x668a22){return null!==_0x668a22&&'object'==typeof _0x668a22&&0x1===_0x668a22['nodeType'];}class Ci extends _0xb27427{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2af97a){super(_0x2af97a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1b7f5e(),this['_refreshPositioningDebounced']=_0x5551ef(()=>{_0x2af97a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5ab9aa=this['context']['plugins']['get'](pi),_0x5d6a9b=this['context']['plugins']['get'](Ti);_0x5ab9aa['register']('wideSidebar',this),_0x5d6a9b['container']&&_0x5ab9aa['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2f31e4){if(_0x2f31e4===this['activeAnnotation'])return;const _0x12058d=this['context']['plugins']['get'](Ti);_0x12058d['_activeAnnotation']=_0x2f31e4;const _0x50e364=this['activeAnnotation'];_0x12058d['refresh']({'blurredAnnotation':_0x50e364,'activatedAnnotation':_0x2f31e4}),this['activeAnnotation']=_0x2f31e4;}['attach'](_0xfd5fd9){this['annotations']=_0xfd5fd9;const _0x3d8ba8=this['context']['plugins']['get'](Ti);if(_0x3d8ba8['_annotations']=_0xfd5fd9,this['isAttached'])throw new _0x22464a('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3d8ba8,'set:container',()=>{this['detach'](),this['listenTo'](_0x3d8ba8,'change:container',_0x3bed5a=>{_0x3bed5a['off'](),this['attach'](_0xfd5fd9);});}),_0x3d8ba8['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x19f3ab=_0x635eae=>{_0x635eae['updateTargetRect'](),_0x3d8ba8['addAnnotation'](_0x635eae);};for(const _0x151d4e of _0xfd5fd9)_0x19f3ab(_0x151d4e);this['listenTo'](_0xfd5fd9,'add',(_0x3e79fa,_0x1f1068)=>{_0x19f3ab(_0x1f1068);}),this['listenTo'](_0xfd5fd9,'remove',(_0x25c412,_0x35239a,_0x18101d)=>{_0x3d8ba8['rearrange']({'removedAnnotation':_0x35239a,'previousAnnotation':_0xfd5fd9['get'](_0x18101d-0x1),'nextAnnotation':_0xfd5fd9['get'](_0x18101d+0x1)}),_0x35239a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xfd5fd9,'focus',(_0x53aa51,_0x432459)=>{this['setActiveAnnotation'](_0x432459);}),this['listenTo'](_0xfd5fd9,'blur',()=>{this['setActiveAnnotation'](null);});const _0x168f36=this['context']instanceof _0x4ac0d8?this['context']['editors']:new _0x1b7f5e([this['context']]);for(const _0x57de8b of _0x168f36)this['_integrateWithEditorAnnotations'](_0x57de8b);this['listenTo'](_0x168f36,'add',(_0x43fba4,_0xc4a528)=>{this['listenTo'](_0xc4a528,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xc4a528);});}),this['listenTo'](_0x168f36,'remove',(_0x59873b,_0x32d266)=>{_0x32d266['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x32d266['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x22464a('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1e1b75=this['context']['plugins']['get'](Ti);_0x1e1b75['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1e1b75),this['stopListening'](this['annotations']),this['context']instanceof _0x4ac0d8&&this['stopListening'](this['context']['editors']);for(const _0xf456cb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xf456cb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x333e49){if(!_0x333e49['plugins']['has']('EditorAnnotations'))return;const _0x2986e7=_0x333e49['plugins']['get']('EditorAnnotations'),_0x49a205=()=>{const _0x15b5e9=_0x2986e7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x15b5e9[0x0]||null);};this['listenTo'](_0x2986e7,'refresh',_0x49a205),this['listenTo'](_0x2986e7,'blur',(_0x11fb6e,{isAnnotationTracked:_0x34a780})=>{this['activeAnnotation']&&_0x34a780(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2986e7,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x413f48=>{_0x2986e7['hasDomSelection']()&&(_0x49a205(),_0x413f48['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2986e7);}['_destroyEditorAnnotationsIntegration'](_0x357558){this['stopListening'](_0x357558),this['_editorAnnotations']['remove'](_0x357558);}}class Ii extends _0x56992c{['counterView'];constructor(_0x21d1ed){super(_0x21d1ed);const _0x12e23d=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x23ce6e,_0x4df0e7)=>_0x23ce6e?'...':_0x4df0e7['toString']()),this['set']('annotationType',''),this['icon']=_0x25812f,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x52cc1d(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x12e23d['to']('annotationType',_0x4114f0=>'ck-annotation-counter__badge--'+_0x4114f0),_0x12e23d['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x12e23d['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0xb27427{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2d63df){super(_0x2d63df),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x18ed30())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1b7f5e(),this['_refreshPositioningDebounced']=_0x5551ef(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x160b60){this['annotations']=_0x160b60;const _0x577dda=this['context']['plugins']['get'](Ti),_0x6d4442=this['balloonPanelView'];if(_0x577dda['_annotations']=_0x160b60,this['isAttached'])throw new _0x22464a('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x577dda,'set:container',()=>{this['detach'](),this['listenTo'](_0x577dda,'change:container',_0x261a1d=>{_0x261a1d['off'](),this['attach'](_0x160b60);});}),_0x577dda['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4e43d2=_0x4814c8=>{const _0x481c54=new Ii(this['context']['locale']);_0x577dda['addAnnotation'](_0x4814c8,_0x481c54),this['_annotationToNarrowView']['set'](_0x4814c8,_0x481c54),_0x481c54['bind']('isDirty','annotationType','number')['to'](_0x4814c8['view'],'isDirty','type','length'),_0x481c54['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x6d4442['content']['first']!==_0x4814c8['view']?(this['_showBalloon'](_0x4814c8),_0x4814c8['view']['element']['focus'](),this['setActiveAnnotation'](_0x4814c8)):this['setActiveAnnotation'](null);});};for(const _0x479c96 of _0x160b60)_0x4e43d2(_0x479c96);this['listenTo'](_0x160b60,'add',(_0x421c4d,_0x3dd02a)=>{_0x4e43d2(_0x3dd02a);}),this['listenTo'](_0x160b60,'remove',(_0x3d2478,_0x42f908,_0x28df71)=>{this['_annotationToNarrowView']['get'](_0x42f908)['destroy'](),this['_annotationToNarrowView']['delete'](_0x42f908),_0x577dda['rearrange']({'removedAnnotation':_0x42f908,'previousAnnotation':_0x160b60['get'](_0x28df71-0x1),'nextAnnotation':_0x160b60['get'](_0x28df71+0x1)}),_0x42f908===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x160b60,'focus',(_0x2ab654,_0x2a66fc)=>{this['setActiveAnnotation'](_0x2a66fc);}),this['listenTo'](_0x160b60,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4684ee,_0x37b0a8)=>{_0x37b0a8['keyCode']===_0x4ec1a3['esc']&&_0x6d4442['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x6d4442['content']['first']),this['_hideBalloon'](),_0x37b0a8['stopPropagation'](),_0x37b0a8['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x52da94,_0x9f0f27)=>{const _0x3702b4=_0x9f0f27['target'];_0x6d4442['isVisible']&&_0x6d4442['element']['contains'](_0x3702b4)||_0x577dda['view']['element']['contains'](_0x3702b4)||_0x52da94['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xa7b120=>_0xa7b120['contains'](_0x3702b4))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x491b7c=this['context']instanceof _0x4ac0d8?this['context']['editors']:new _0x1b7f5e([this['context']]);for(const _0x5392e6 of _0x491b7c)this['_integrateWithEditorAnnotations'](_0x5392e6);this['listenTo'](_0x491b7c,'add',(_0x527c0f,_0x3e8477)=>{this['listenTo'](_0x3e8477,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3e8477);});}),this['listenTo'](_0x491b7c,'remove',(_0x8cc7b9,_0x1091e5)=>{_0x1091e5['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1091e5['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4153a9){if(_0x4153a9===this['activeAnnotation'])return;const _0x16a383=this['context']['plugins']['get'](Ti);if(_0x16a383['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4153a9,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4153a9)_0x16a383['getSidebarItemView'](_0x4153a9)?this['_showBalloon'](_0x4153a9):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4153a9;}['detach'](){if(!this['isAttached'])throw new _0x22464a('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x166654=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x43a225=>_0x43a225['destroy']()),this['_annotationToNarrowView']['clear'](),_0x166654['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4ac0d8&&this['stopListening'](this['context']['editors']);for(const _0x30f4e8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x30f4e8);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'](_0x12f1ca){if(!_0x12f1ca['plugins']['has']('EditorAnnotations'))return;const _0x3437d8=_0x12f1ca['plugins']['get']('EditorAnnotations'),_0x258a19=this['context']['plugins']['get'](Ti),_0x3588e7=this['annotations'],_0x462bf7=this['balloonPanelView'],_0xec5408=()=>{const _0x2464b9=_0x3437d8['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2464b9),this['setActiveAnnotation'](_0x2464b9[0x0]||null);};this['listenTo'](_0x3437d8,'refresh',_0xec5408),this['listenTo'](_0x3437d8,'blur',(_0x1ddbad,{isAnnotationTracked:_0x3bc5fc})=>{this['activeAnnotation']&&_0x3bc5fc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3437d8,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3588e7,'blur',_0x5aaf13=>{_0x3437d8['hasDomSelection']()&&_0x5aaf13['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4ff100,_0x57e30a)=>{const _0xa8faf5=_0x57e30a['target'];_0x462bf7['isVisible']&&_0x462bf7['element']['contains'](_0xa8faf5)||_0x258a19['view']['element']['contains'](_0xa8faf5)||this['activeAnnotation']&&_0x3437d8['hasDomSelection']()&&(_0xec5408(),_0x4ff100['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3437d8);}['_destroyEditorAnnotationsIntegration'](_0x30eda4){_0x30eda4&&(this['stopListening'](_0x30eda4),this['_editorAnnotations']['remove'](_0x30eda4));}['_setSelectedAnnotations'](_0x463338){for(const _0xb1ece5 of this['_selectedAnnotations'])_0x463338['includes'](_0xb1ece5)||this['_manuallyClosedAnnotationViews']['delete'](_0xb1ece5['view']);this['_selectedAnnotations']=_0x463338;}['_refreshPositioning'](){const _0x270acf=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x270acf['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2057dd){if(this['_manuallyClosedAnnotationViews']['has'](_0x2057dd['view']))return;const _0x2773b2=this['balloonPanelView']['content']['first'];_0x2773b2!==_0x2057dd['view']?(_0x2773b2&&this['_detachListeners'](_0x2773b2),this['_attachListeners'](_0x2057dd['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2057dd['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x397c78=this['balloonPanelView']['content']['first'],_0xca442c=_0x397c78&&this['annotations']['getByView'](_0x397c78);if(!_0xca442c||!this['_annotationToNarrowView']['has'](_0xca442c))return;const _0x3dcca6=this['_annotationToNarrowView']['get'](_0xca442c)['element'],_0xeca97f=(function(){const _0x42fd49=ht['defaultPositions'];return[_0x42fd49['southArrowNorthEast'],_0x42fd49['northArrowSouthEast'],_0x42fd49['southArrowNorth'],_0x42fd49['northArrowSouth'],_0x42fd49['southArrowNorthWest'],_0x42fd49['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3dcca6,'positions':_0xeca97f});}['_hideBalloon'](){const _0x53d547=this['balloonPanelView'],_0x49dc94=_0x53d547['content']['first'];_0x49dc94&&(this['_detachListeners'](_0x49dc94),_0x53d547['unpin'](),_0x53d547['content']['clear']());}['_attachListeners'](_0x658ef1){this['listenTo'](_0x658ef1,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x658ef1,'Esc',(_0x22969d,_0x592dcf)=>{this['_manuallyClosedAnnotationViews']['add'](_0x658ef1),this['_hideBalloon'](),_0x592dcf();});}['_detachListeners'](_0x56296c){this['stopListening'](_0x56296c);}}class Ei extends _0x4bbe68{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3974d2){super(_0x3974d2),_0x3974d2['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x3974d2['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5551ef(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x2bce92=this['editor']['plugins']['get'](pi);_0x2bce92['context']===this['editor']&&(_0x2bce92['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x60ffd,_0x2803b1)=>{const _0x3f42a0=this['_balloon'];if(this['isAttached']&&_0x3f42a0['visibleView']){const _0xa14f8b=this['annotations']['getByView'](_0x3f42a0['visibleView']);_0xa14f8b&&this['_closeAnnotation'](_0xa14f8b),_0x2803b1();}}));}['afterInit'](){const _0x602f1a=this['editor']['plugins']['get'](pi);_0x602f1a['context']===this['editor']&&(_0x602f1a['hasActive']()||_0x602f1a['switchTo']('inline'));}['setActiveAnnotation'](_0x339da2){_0x339da2!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x339da2&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x339da2)&&this['_addAnnotationToBalloon'](_0x339da2,!0x0),_0x339da2['isActive']=!0x0),_0x339da2||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x339da2);}['attach'](_0x4547de){this['annotations']=_0x4547de;const _0x24867e=this['editor']['plugins']['get'](pi),_0x5c22d4=this['_balloon'];if(this['isAttached'])throw new _0x22464a('inlineannotations-attach-already-attached',this);if(_0x24867e['context']!==this['editor'])throw new _0x22464a('inlineannotations-not-allowed-with-context',this);const _0x2fa2e7=this['editor']['plugins']['get'](si);this['listenTo'](_0x2fa2e7,'refresh',()=>{const _0x329caa=_0x2fa2e7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x34952b,_0x134d60;!this['_forceRefresh']&&(_0x34952b=_0x329caa,_0x134d60=this['_selectedAnnotations'],_0x34952b['length']===_0x134d60['length']&&_0x34952b['every'](_0x5125f8=>_0x134d60['includes'](_0x5125f8)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x329caa),this['setActiveAnnotation'](_0x329caa[0x0]||null));}),this['listenTo'](_0x2fa2e7,'blur',(_0x3b0984,{isAnnotationTracked:_0x3da521})=>{this['activeAnnotation']&&_0x3da521(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2fa2e7,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x174bfa,_0x279978,_0x43c850)=>{_0x43c850||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4547de,'remove',(_0x2befac,_0x318505)=>{this['_removeAnnotationFromBalloon'](_0x318505),_0x318505===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5c22d4,'change:visibleView',(_0x49101d,_0xd51ea5,_0x15422c,_0x809f61)=>{_0x809f61&&this['stopListening'](_0x809f61);const _0x58f402=_0x4547de['getByView'](_0x15422c);_0x15422c&&_0x58f402&&(this['listenTo'](_0x15422c,'change:height',()=>{_0x5c22d4['updatePosition']();}),this['listenTo'](_0x15422c,'Esc',()=>{this['_closeAnnotation'](_0x58f402),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x58f402&&this['setActiveAnnotation'](_0x58f402));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5c22d4['visibleView']&&(_0x4547de['getByView'](_0x5c22d4['visibleView'])&&_0x5c22d4['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 _0x22464a('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xca719b of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xca719b);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x37f54b){for(const _0x204c44 of this['_selectedAnnotations'])_0x37f54b['includes'](_0x204c44)||this['_manuallyClosed']['delete'](_0x204c44);for(const _0x2c156c of this['annotations'])_0x37f54b['includes'](_0x2c156c)||this['_removeAnnotationFromBalloon'](_0x2c156c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xfcc3e6 of _0x37f54b)this['_addAnnotationToBalloon'](_0xfcc3e6);}this['_selectedAnnotations']=_0x37f54b;}['_addAnnotationToBalloon'](_0x5bd4ca,_0x178099=!0x1){this['_manuallyClosed']['has'](_0x5bd4ca)||(this['_addedAnnotations']['has'](_0x5bd4ca)||this['_balloon']['hasView'](_0x5bd4ca['view'])||(this['_addedAnnotations']['add'](_0x5bd4ca),this['_balloon']['add']({'stackId':_0x5bd4ca['view']['id'],'view':_0x5bd4ca['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5bd4ca)}})),_0x178099&&this['_balloon']['showStack'](_0x5bd4ca['view']['id']));}['_getBalloonTargetForAnnotation'](_0x56c169){const _0x831fa=_0x56c169['target'],_0xb8de7=this['editor']['editing']['view'],_0x2c1975=_0xb8de7['document']['selection']['getFirstRange'](),_0xb24a1b=_0xb8de7['domConverter']['viewRangeToDom'](_0x2c1975);if(_0xb24a1b['collapse'](!0x0),_0x831fa){if(_0x831fa instanceof _0x3f2835)return _0x831fa;let _0x29f779=[];for(const _0x39e7f6 of _0x831fa)_0x29f779['push'](..._0x3f2835['getDomElementRects'](_0x39e7f6));_0x29f779=function(_0x33a195){const _0x2a56f5=[];let _0x340b40=_0x33a195[0x0];for(let _0x1e7b23=0x1;_0x1e7b23<_0x33a195['length'];_0x1e7b23++)if(Ni(_0x340b40,_0x33a195[_0x1e7b23])){const _0x55d565=_0x33a195[_0x1e7b23]['width'];_0x340b40['width']+=_0x55d565,_0x340b40['right']+=_0x55d565;}else _0x2a56f5['push'](_0x340b40),_0x340b40=_0x33a195[_0x1e7b23];return _0x2a56f5['push'](_0x340b40),_0x2a56f5;}(_0x29f779);const _0x232b4b=_0xb24a1b['getBoundingClientRect']();return _0x29f779['find'](_0x321073=>_0x321073['top']<=_0x232b4b['top']&&_0x321073['bottom']>=_0x232b4b['bottom']&&_0x321073['left']<=_0x232b4b['left']&&_0x321073['right']>=_0x232b4b['right'])||_0x29f779[0x0];}return _0x56c169['targetRect']||_0xb24a1b;}['_removeAnnotationFromBalloon'](_0x1e18dc){this['_addedAnnotations']['has'](_0x1e18dc)&&this['_balloon']['hasView'](_0x1e18dc['view'])&&(this['_addedAnnotations']['delete'](_0x1e18dc),this['_balloon']['remove'](_0x1e18dc['view']));}['_closeAnnotation'](_0x2db76d){this['_manuallyClosed']['add'](_0x2db76d),this['_removeAnnotationFromBalloon'](_0x2db76d);}}function Ni(_0x2b8632,_0x4e8ecb){return _0x2b8632['top']===_0x4e8ecb['top']&&_0x2b8632['bottom']===_0x4e8ecb['bottom']&&_0x2b8632['right']===_0x4e8ecb['left'];}class ki extends _0x52cc1d{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1cc82e,_0x4171d9){super(_0x1cc82e),this['set']('isEmpty',!_0x4171d9['length']),this['focusTracker']=new _0x5eabc8(),this['_annotationViews']=_0x4171d9,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2b6197({'focusables':_0x4171d9,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4171d9,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4171d9,'remove',(_0x2b225e,_0x33bed2)=>{_0x33bed2['isActive']&&this['focus'](),_0x4171d9['length']||(this['isEmpty']=!0x0);});const _0x27743d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x1cc82e,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4171d9},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x27743d['if']('isEmpty','ck-hidden',_0x3255a0=>!_0x3255a0)]},'children':[{'text':bt(_0x1cc82e,'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 _0x5abe86 of this['_annotationViews'])this['focusTracker']['add'](_0x5abe86['element']);this['_annotationViews']['on']('change',(_0x372ed5,{added:_0x32c915,removed:_0x100351})=>{for(const _0x839c3d of _0x32c915)this['focusTracker']['add'](_0x839c3d['element']);for(const _0x30441d of _0x100351)this['focusTracker']['remove'](_0x30441d['element']);});}}class Oi extends _0xb27427{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x562d9f){super(_0x562d9f),this['archivedThreads']=new _0x1b7f5e();}['init'](){const _0x4b52e9=this['context'],_0x1a168a=_0x4b52e9['plugins']['get'](Qt),_0x212255=_0x4b52e9['plugins']['get']($t);this['listenTo'](_0x1a168a,'addCommentThread',(_0xf31f54,{threadId:_0x52b002})=>{const _0x290851=_0x1a168a['getCommentThread'](_0x52b002);_0x290851['archivedAt']&&this['archivedThreads']['add'](_0x290851,this['_calculatePosition'](_0x290851['archivedAt'])),this['listenTo'](_0x290851,'change:archivedAt',(_0x21d654,_0xe8ccdc,_0x4d522a)=>{_0x4d522a?this['archivedThreads']['has'](_0x290851)||this['archivedThreads']['add'](_0x290851,this['_calculatePosition'](_0x290851['archivedAt'])):this['archivedThreads']['has'](_0x290851)&&this['archivedThreads']['remove'](_0x290851);});}),this['listenTo'](_0x1a168a,'removeCommentThread',(_0x457850,{threadId:_0x58b9fa})=>{const _0x3f0c4f=_0x1a168a['getCommentThread'](_0x58b9fa);this['stopListening'](_0x3f0c4f),this['archivedThreads']['has'](_0x3f0c4f)&&this['archivedThreads']['remove'](_0x3f0c4f);},{'priority':'highest'}),this['listenTo'](_0x212255['collection'],'focus',(_0x4d6c13,_0x2dc865)=>{_0x2dc865['isVisible']||(_0x2dc865['isActive']=!0x0,_0x212255['activate'](_0x2dc865));});}['_calculatePosition'](_0x25281f){const _0x26b73a=[...this['archivedThreads']]['findIndex'](_0x35f755=>_0x35f755['archivedAt']<_0x25281f);return _0x26b73a>-0x1?_0x26b73a:this['archivedThreads']['length'];}}class Mi extends _0x4bbe68{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x5d0b96){super(_0x5d0b96),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0xfd3115=this['editor'],_0x1fd3dc=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xfd3115['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x56992c,!0x0)),_0xfd3115['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x52044b=this['_createCommentsArchiveButton'](ot);return _0x52044b['set']({'role':'menuitemcheckbox'}),_0x52044b;});const _0x36b36b=_0xfd3115['plugins']['get'](Oi),_0x5935b7=_0xfd3115['plugins']['get']('Annotations'),_0x56898c=_0xfd3115['plugins']['get']('CommentsRepository');_0x36b36b['archivedThreads']['forEach'](_0x4fc3d6=>{this['_handleNewThread'](_0x4fc3d6);}),this['listenTo'](_0x36b36b['archivedThreads'],'add',(_0x46f3c0,_0x3965c6)=>{this['_handleNewThread'](_0x3965c6);}),this['listenTo'](_0x5935b7['collection'],'add',(_0x17e42c,_0x194aaa)=>{const _0x4832b1=this['_pendingThreads']['find'](_0x307bf6=>{const _0x78cc62=_0x56898c['_threadToController']['get'](_0x307bf6);return _0x78cc62&&_0x194aaa['innerView']===_0x78cc62['view'];});if(_0x4832b1){const _0x47a53b=this['_calculatePosition'](_0x4832b1['archivedAt']);this['_addAnnotationToArchive'](_0x194aaa,_0x47a53b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4832b1),0x1);}}),this['listenTo'](_0x36b36b['archivedThreads'],'remove',(_0x48bc71,_0x3567c3)=>{const _0x2953a7=_0xfd3115['config']['get']('collaboration.channelId');if(!_0x2953a7||_0x3567c3['channelId']===_0x2953a7){if(this['_pendingThreads']['includes'](_0x3567c3))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3567c3),0x1);else{const _0x3a844c=_0x56898c['_threadToController']['get'](_0x3567c3),_0x39fc72=_0x5935b7['getByInnerView'](_0x3a844c['view']);this['annotationViews']['remove'](_0x39fc72['view']),this['stopListening'](_0x39fc72),this['stopListening'](_0x39fc72['focusableElements']);}}}),this['listenTo'](_0x5935b7['collection'],'add',(_0x155a45,_0x4cf301)=>{this['listenTo'](_0x4cf301,'escape',_0x1fd3dc);}),this['listenTo'](_0x5935b7['collection'],'remove',(_0x295f5a,_0x13c9f1)=>{this['stopListening'](_0x13c9f1,'escape',_0x1fd3dc);});}['_addAnnotationToArchive'](_0x28fc14,_0x58e03d){this['listenTo'](_0x28fc14,'set:isVisible',_0x4b2536=>{_0x4b2536['return']=!0x1,_0x4b2536['stop']();}),this['annotationViews']['add'](_0x28fc14['view'],_0x58e03d);}['_handleNewThread'](_0x3f09ee){const _0x12114d=this['editor']['plugins']['get']('CommentsRepository'),_0x37c77a=this['editor']['plugins']['get']('Annotations'),_0x39ab05=this['editor']['config']['get']('collaboration.channelId');if(!_0x39ab05||_0x3f09ee['channelId']===_0x39ab05){const _0x451870=_0x12114d['_threadToController']['get'](_0x3f09ee);if(!_0x451870)return void this['_pendingThreads']['push'](_0x3f09ee);const _0x85111=this['_calculatePosition'](_0x3f09ee['archivedAt']),_0x5a614f=_0x37c77a['getByInnerView'](_0x451870['view']);_0x5a614f['isVisible']&&_0x37c77a['_visibleAnnotations']['remove'](_0x5a614f),this['_addAnnotationToArchive'](_0x5a614f,_0x85111);}}['_calculatePosition'](_0x2c2089){const _0x4b438c=this['editor']['config']['get']('collaboration.channelId'),_0x21662d=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x5b2747=>_0x5b2747['channelId']===_0x4b438c)['findIndex'](_0x80f6ca=>_0x80f6ca['archivedAt']<_0x2c2089);return _0x21662d<0x0||_0x21662d>this['annotationViews']['length']?this['annotationViews']['length']:_0x21662d-0x1;}['_toggleDialog'](){const _0x58de76=this['editor'],_0x4aac35=_0x58de76['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x58de76['locale'],this['annotationViews'])),'commentsArchive'===_0x4aac35['id']?_0x4aac35['hide']():_0x4aac35['show']({'id':'commentsArchive','title':bt(_0x58de76['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3f0ee7,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x49bf68,_0x3bc380=!0x1){const _0x13c1f6=this['editor']['locale'],_0x4f46ea=this['editor']['plugins']['get']('Dialog'),_0x5893d4=new _0x49bf68(_0x13c1f6);return _0x5893d4['bind']('isEnabled')['to'](this,'isEnabled'),_0x5893d4['bind']('isOn')['to'](_0x4f46ea,'id',_0x3601e9=>'commentsArchive'===_0x3601e9),_0x5893d4['set']({'label':bt(_0x13c1f6,'COMMENTS_ARCHIVE'),'icon':_0x3f0ee7,'isToggleable':!0x0}),_0x3bc380&&(_0x5893d4['tooltip']=!0x0),this['listenTo'](_0x5893d4,'execute',()=>this['_toggleDialog']()),_0x5893d4;}['_hideDialogOnAnnotationEscape']=_0x338382=>{const _0x256f7e=_0x338382['source'];if(!this['annotationViews']['has'](_0x256f7e['view']))return;const _0x18c625=this['editor']['plugins']['get']('Dialog');_0x18c625['isOpen']&&'commentsArchive'===_0x18c625['id']&&(_0x18c625['hide'](),_0x338382['stop']());};}class Ri extends _0x4bbe68{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};