UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

28 lines • 195 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ import{Editor as _0xfa10ea,icons as _0x1f311c,ContextPlugin as _0x503b91,PendingActions as ht,Command as _0x5ddfc6,Plugin as _0x47ea1a,Context as _0x3c507a}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0xfdf1bc,uid as _0x301cf4,KeystrokeHandler as jt,FocusTracker as _0x309532,diff as _0x229e77,Collection as _0x27b938,Rect as _0x48b81d,CKEditorError as _0x4f3696,first as _0x36aad9,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as Ht,DomEmitterMixin as _0x1ec067,keyCodes as _0x34e0fd}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0xa1c891,AriaDescriptionView as ts,setupThreadKeyboardNavigation as _0x9f358e,ConfirmMixin as ti,LateFocusButtonView as _0x218640,trimHtml as _0x17b66e,LateFocusDropdownButtonView as _0x22d429,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x3e775d}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x20c1b0}from'lodash-es';import{EditorUIView as Yt,InlineEditableUIView as $t,EditorUI as Vt,View as kt,FocusCycler as Ft,ButtonView as _0x37c84d,ViewCollection as _0x56d3ef,createDropdown as _0xc94d43,ListView as _0x4597c7,focusChildOnDropdownOpen as _0x2805be,ListItemView as _0x4c3a28,MenuBarMenuListItemButtonView as _0x392b93,BodyCollection as _0xaf1db4,BalloonPanelView as _0x36b129,ContextualBalloon as _0x40d153,Dialog as _0x23b28b,DialogViewPosition as _0x3a9b1c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as zt,enablePlaceholder as St,MouseObserver as _0x931a54}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as Bt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Et,ShiftEnter as Gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Jt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Kt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Nt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Qt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0xebbce8}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x4105c0}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */ _0xfdf1bc(){['model'];['view'];constructor(_0x59ad59,_0x15b27f){super(),this['model']=_0x59ad59,this['model']['_isAttached']=!0x0,this['view']=_0x15b27f,this['listenTo'](_0x15b27f,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x15b27f,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x15b27f,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x15b27f,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x15b27f,'addComment',(_0x4b8356,_0x279d91)=>this['addComment'](_0x279d91)),this['listenTo'](_0x15b27f,'updateComment',(_0x4c8f39,_0x492ded,_0x28a9e3)=>this['updateComment'](_0x492ded,_0x28a9e3)),this['listenTo'](_0x15b27f,'removeComment',(_0x3a82c6,_0x420a10)=>this['removeComment'](_0x420a10));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x38704f){this['model']['addComment']({'content':_0x38704f,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xffa292,_0x3494d7){this['model']['getComment'](_0xffa292)['update']({'content':_0x3494d7});}['removeComment'](_0x406c74){this['model']['getComment'](_0x406c74)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function S(_0x3cb7b7,_0x2c008c,_0x4ba482){const t=_0x3cb7b7['t'];switch(_0x2c008c){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'},_0x4ba482);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'},_0x4ba482);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'},_0x4ba482);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'},_0x4ba482);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x4ba482);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'},_0x4ba482);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'},_0x4ba482);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'},_0x4ba482);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 Xt extends Yt{['main'];['editable'];constructor(_0xe5c74d,_0x22b91f){super(_0xe5c74d);const _0x576235=_0x301cf4();this['main']=this['createCollection'](),this['editable']=new $t(_0xe5c74d,_0x22b91f,void 0x0,{'label':()=>S(_0xe5c74d,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xe5c74d['uiLanguageDirection'],'lang':_0xe5c74d['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x576235},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Vt{['view'];constructor(_0x1eb273){super(_0x1eb273),this['view']=new Xt(_0x1eb273['locale'],_0x1eb273['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x36c065=this['editor']['editing']['view'],_0x223ba0=this['view']['editable'],_0x5f205a=_0x36c065['document']['getRoot']();_0x223ba0['name']=_0x5f205a['rootName'],this['view']['render']();const _0x5863c6=_0x223ba0['element'];this['setEditableElement'](_0x223ba0['name'],_0x5863c6),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x36c065['attachDomRoot'](_0x5863c6),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Rt=[Bt,Et,Gt,Jt,Kt,Nt,Qt];class Ut extends/* #__PURE__ -- @preserve */ _0xfdf1bc(_0xfa10ea){static ['defaultPlugins']=/* #__PURE__ -- @preserve */ ((()=>Rt)());constructor(_0x16f7d7={}){function _0xaedfaa(_0x14949e){return _0x14949e['map'](_0x1a0053=>String['fromCharCode'](_0x1a0053))['join']('');}(_0x16f7d7=Object['assign']({},_0x16f7d7))['plugins']||(_0x16f7d7['plugins']=Ut['defaultPlugins']),super(_0x16f7d7),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xaedfaa([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xaedfaa([0x76,0x69,0x65,0x77])][_0xaedfaa([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xaedfaa([0x61,0x75,0x74,0x6f]),this[_0xaedfaa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xaedfaa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xaedfaa([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xaedfaa([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xaedfaa([0x6f,0x6b])});}['create'](){const _0x34825e=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x34825e))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1d8e4b=>{const _0x50c423=this['model']['document']['getRoot'](),_0x4f2dd7=_0x50c423&&_0x50c423['getChild'](_0x50c423['childCount']-0x1);_0x1d8e4b['setSelection'](_0x4f2dd7,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xcb9737=this['editing']['view'],_0x4fa7e6=_0xcb9737['document']['getRoot'](),_0x2a216e=_0x4fa7e6['getChild'](0x0);_0x4fa7e6['childCount']>0x1||!_0x2a216e||'p'!=_0x2a216e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(zt(_0xcb9737,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2a216e['placeholder']=this['placeholder']),St({'view':_0xcb9737,'element':_0x2a216e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2a216e);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4c743c,_0x24a8cb={}){super(_0x4c743c),this['editor']=null,this['_editorConfig']=_0x24a8cb,this['set']('value',_0x24a8cb['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',S(_0x4c743c,'Reply...')),this['set']('submitLabel',S(_0x4c743c,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x309532(),this['focusCycler']=new Ft({'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',(_0x3298d8,_0x54f694)=>{this['cancelButtonView']['fire']('execute'),_0x54f694();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4c2fe0,_0x5b4a55)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5b4a55());}),this['on']('submit',(_0x425000,_0x1e3260)=>{_0x1e3260['length']>0xfde8?(alert(S(_0x4c743c,'TOO_LONG_COMMENT_ALERT',[_0x1e3260['length'],0xfde8])),_0x425000['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ut(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0xa5e3=this['editor'];this['element']['insertBefore'](_0xa5e3['ui']['element'],this['element']['firstChild']),_0xa5e3['model']['document']['on']('change',()=>this['value']=_0xa5e3['getData']()),_0xa5e3['bind']('placeholder')['to'](this),this['focusables']['add'](_0xa5e3['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x464021){-0x1===_0x464021?(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:_0x16aca5}=this,_0xbb850a=new _0x37c84d(_0x16aca5);return _0xbb850a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xbb850a['withText']=!0x0,_0xbb850a['bind']('label')['to'](this,'submitLabel'),_0xbb850a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xbb850a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4ebdd3,_0xcce8e8)=>!_0xcce8e8&&!!_0x4ebdd3['trim']()),_0xbb850a;}['_createCancelButton'](){const {locale:_0xd093d9}=this,_0x2e470b=new _0x37c84d(_0xd093d9);return _0x2e470b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2e470b['label']=S(_0xd093d9,'Cancel'),_0x2e470b['withText']=!0x0,_0x2e470b['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2e470b;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x216a94=>{this['focusTracker']['add'](_0x216a94['element']);}),this['focusables']['on']('change',(_0x422063,_0x56e204)=>{for(const _0x46588c of Array['from'](_0x56e204['added'])['reverse']())this['focusTracker']['add'](_0x46588c['element']);});}}class ie extends kt{constructor(_0x1566cf,_0x21fa5e,_0x121796){super(_0x1566cf),this['commentInputView']=new os(_0x1566cf,_0x121796),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x322aca,_0x40b009)=>_0x322aca||!!_0x40b009),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 _0xa1c891(_0x1566cf,_0x21fa5e),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'](_0x127efe){this['commentInputView']['focus'](_0x127efe);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x22316f,_0x20934d)=>{const {submitButtonView:_0x377338,cancelButtonView:_0x2cb999,editor:_0x33bac6}=this['commentInputView'];[_0x377338['element'],_0x2cb999['element'],_0x33bac6?_0x33bac6['editing']['view']['getDomRoot']():null]['filter'](_0x5bddd8=>_0x5bddd8)['some'](_0x2811cc=>_0x2811cc['contains'](_0x20934d['target']))||(this['focus'](),_0x20934d['preventDefault']());});}}class cs extends kt{constructor(_0xf87c8f){super(_0xf87c8f);const _0x5077a4=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5077a4['to']('count',_0x293d89=>S(_0xf87c8f,'NUMBER_OF_COMMENTS',_0x293d89))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x442a05,_0xca358a,_0x36f655){super(_0x442a05);const _0x53c4b3=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xca358a['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xca358a,this['_config']=_0x36f655,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x309532(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x7e54c=>this['commentViews']['map'](_0x546b1e=>_0x546b1e['element'])['includes'](_0x7e54c['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x442a05),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5e4a00=>_0x5e4a00-this['_config']['maxCommentsWhenCollapsed']);for(const _0x53b11d of _0xca358a['comments'])this['_handleNewCommentModel'](_0x53b11d);this['_handleInfoComment'](),this['listenTo'](_0xca358a['comments'],'add',(_0x173a7d,_0x4adc3a)=>{const _0x3f7056=this['_calculatePosition'](_0x4adc3a);this['length']++,this['_handleNewCommentModel'](_0x4adc3a,_0x3f7056),this['refreshVisibleViews']();}),this['listenTo'](_0xca358a['comments'],'remove',(_0x4a4c66,_0x5b5b4e)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5b5b4e),this['refreshVisibleViews']();}),this['listenTo'](_0xca358a,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xca358a,'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',_0x53c4b3['if']('length','ck-hidden',_0x227115=>!_0x227115)],'aria-label':S(_0x442a05,'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'](_0x426e53){-0x1===_0x426e53?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2f43a5 of this['commentViews'])_0x2f43a5['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x34dafe,_0x62a7b0){const _0xa16f05=new this['_config']['CommentView'](this['locale'],_0x34dafe,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xa16f05['viewUid']=_0x34dafe['id'],_0xa16f05['delegate']('removeComment')['to'](this),_0xa16f05['delegate']('updateComment')['to'](this),_0xa16f05['delegate']('resolveCommentThread')['to'](this),_0xa16f05['delegate']('editorReady')['to'](this),_0xa16f05['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xa16f05,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xa16f05,_0x62a7b0);}['_calculatePosition'](_0x2f56cc){const _0x3e2163=this['_model']['_findOptimalIndex'](_0x2f56cc);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2f56cc['authoredAt']?_0x3e2163-0x1:_0x3e2163:_0x3e2163-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x9d1298={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':S(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x9d1298,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x9d1298));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x45365c){const _0x42feb9=this['commentViews']['remove'](_0x45365c['id']);this['stopListening'](_0x42feb9),_0x42feb9['isEditMode']&&this['_updateHasDirtyComment'](),_0x42feb9['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x157a17=>_0x157a17['isEditMode']);}['_rearrangeCollapse'](){const _0x283dc1=function(_0x465778){const _0x2ea056=new _0x27b938();for(const _0x47d594 of _0x465778)_0x2ea056['add'](_0x47d594);return _0x2ea056;}(this['commentViews']),_0x854671=this['_collapsedCommentsView']['count'];for(let _0x4834eb=0x1;_0x4834eb<=_0x854671;_0x4834eb++)_0x283dc1['remove'](0x1);for(const _0x856f7c of _0x283dc1)_0x856f7c['collapse']();_0x854671>0x0&&_0x283dc1['add'](this['_collapsedCommentsView'],0x1),as(_0x229e77(Array['from'](this['visibleViews']),Array['from'](_0x283dc1)),this['visibleViews'],_0x283dc1);}['_rearrangeExpand'](){as(_0x229e77(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x10508c of this['visibleViews'])_0x10508c['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x17570f=>{this['focusTracker']['add'](_0x17570f['element']),this['keystrokes']['listenTo'](_0x17570f['element']);}),this['commentViews']['on']('change',(_0x83f0e0,_0x3c8064)=>{for(const _0x211f90 of _0x3c8064['removed'])this['focusTracker']['remove'](_0x211f90['element']),this['keystrokes']['stopListening'](_0x211f90['element']);for(const _0x29ad49 of Array['from'](_0x3c8064['added'])['reverse']())this['focusTracker']['add'](_0x29ad49['element']),this['keystrokes']['listenTo'](_0x29ad49['element']);});}}function as(_0x172dc5,_0x5abd6e,_0x3b97c2){let _0x781f8e=0x0;for(const _0x5226dd of _0x172dc5)switch(_0x5226dd){case'insert':_0x5abd6e['add'](_0x3b97c2['get'](_0x781f8e),_0x781f8e),_0x781f8e++;break;case'delete':_0x5abd6e['remove'](_0x781f8e);break;case'equal':_0x781f8e++;}}class ls extends kt{constructor(_0x361bba){super(_0x361bba);const _0x59ae45=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x59ae45['to']('contextValue',_0x10a43c=>S(_0x361bba,'THREAD_CONTEXT_LABEL',_0x10a43c)),'tabindex':-0x1},'children':[{'text':_0x59ae45['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Zt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x546571,_0x222374){super(_0x546571);const _0x4f2ec9=this['bindTemplate'];this['_model']=_0x222374,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x309532(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3c83a1=>!!_0x3c83a1),this['bind']('contextValue')['to'](this['_model'],'context',_0x1d3b6e=>_0x1d3b6e&&_0x1d3b6e['value']?this['_trimContextValue'](_0x1d3b6e['value']):S(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',_0x4f2ec9['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 _0x1d6403=new _0x37c84d(this['locale']);return _0x1d6403['label']=S(this['locale'],'Reopen'),_0x1d6403['tooltip']=S(this['locale'],'Reopen'),_0x1d6403['icon']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22m5.042\x209.367\x202.189\x201.837a.75.75\x200\x200\x201-.965\x201.149l-3.788-3.18a.747.747\x200\x200\x201-.21-.284.75.75\x200\x200\x201\x20.17-.945L6.23\x204.762a.75.75\x200\x201\x201\x20.964\x201.15L4.863\x207.866h8.917A.75.75\x200\x200\x201\x2014\x207.9a4\x204\x200\x201\x201-1.477\x207.718l.344-1.489a2.5\x202.5\x200\x201\x200\x201.094-4.73l.008-.032H5.042z\x22/></svg>',_0x1d6403['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1b60b1=>!_0x1b60b1),_0x1d6403['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x49dd64,_0x19dfc8)=>_0x49dd64&&_0x19dfc8),_0x1d6403['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1d6403;}['_trimContextValue'](_0x551e18){if(_0x551e18['length']<0x96)return _0x551e18;const _0x189c8c=_0x551e18['lastIndexOf']('\x20',0x93);return _0x551e18['substring'](0x0,_0x189c8c>-0x1?_0x189c8c:0x93)+'...';}['_attachContextActions'](){const _0x1decaf=this['element']['querySelector']('.ck-context'),_0x557af8=_0x1decaf['querySelector']('.ck-context__value');this['listenTo'](_0x1decaf,'mouseenter',()=>{_0x557af8['offsetWidth']<_0x557af8['scrollWidth']&&_0x1decaf['classList']['add']('overlay');}),this['listenTo'](_0x1decaf,'mouseleave',()=>{_0x1decaf['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x1a5cfb of this['focusables'])this['focusTracker']['add'](_0x1a5cfb['element']),this['keystrokes']['listenTo'](_0x1a5cfb['element']);}['_createContextView'](){const _0x4cbdc1=new ls(this['locale']);return _0x4cbdc1['bind']('contextValue')['to'](this),_0x4cbdc1;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1b38cd,_0x30554e,_0x53e1fe,_0x230684){super(_0x1b38cd),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x30554e,this['_localUser']=_0x53e1fe,this['_config']=_0x230684,this['commentThreadHeaderView']=new Zt(_0x1b38cd,_0x30554e),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new ts(_0x1b38cd,S(_0x1b38cd,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1b38cd,_0x30554e,Object['assign']({'CommentView':this['_config']['CommentView']},_0x230684)),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',(_0xc2e5d5,_0xb9a193)=>_0xc2e5d5||!!_0xb9a193),this['bind']('isUnlinked')['to'](_0x30554e,'unlinkedAt',_0xf9a9ad=>!!_0xf9a9ad),this['bind']('ariaLabel')['to'](this,'length',_0x2f8677=>{const _0x4589ae=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return S(this['locale'],'COMMENT_THREAD_LABEL',[_0x2f8677,_0x4589ae]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x309532(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5ace8e=>_0x5ace8e['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x9f358e(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xcb8b10=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x380a06=_0xcb8b10['commentInputView'];return _0xcb8b10['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x380a06,'value',(_0x76f123,_0x4583cb,_0x58e09c,_0x146212,_0x45cdd3)=>!!_0x45cdd3||!!_0x146212&&_0x58e09c&&!_0x4583cb||_0x76f123&&_0x58e09c&&!_0x4583cb),_0x380a06['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x470e07,_0x2c3ca8,_0x26c318)=>{let _0x1234d4;return _0x1234d4=_0x26c318&&_0x2c3ca8?'Reply\x20to\x20reopen\x20discussion...':_0x470e07?'Reply...':'Write\x20a\x20comment...',S(this['locale'],_0x1234d4);}),_0x380a06['bind']('submitLabel')['to'](this,'length',_0x1ba93d=>S(this['locale'],_0x1ba93d?'Reply':'Comment')),_0x380a06['on']('submit',(_0x4067c2,_0x49c718)=>{this['fire']('addComment',_0x49c718),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x380a06['on']('cancel',()=>{this['focus']();}),_0x380a06['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x380a06['on']('cancel',_0x154faf=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x154faf['stop']());}),this['on']('change:isActive',(_0x4e0eb0,_0x4d172e,_0x39362f)=>{_0x39362f||this['length']||_0x380a06['value']||this['fire']('removeCommentThread');}),_0xcb8b10;}}class vt extends/* #__PURE__ -- @preserve */ ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x15d4df,_0x1d7875,_0x2c0982,_0x3fd4b1){super(_0x15d4df,_0x1d7875,_0x2c0982,_0x3fd4b1),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x15d4df,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x287224,_0x10c38e,_0x199071)=>{_0x199071||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3bb7e4,_0x329073,_0x204eed)=>{_0x204eed&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x27e470=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x27e470['if']('isActive','ck-thread--active'),_0x27e470['if']('isUnlinked','ck-thread--unlinked'),_0x27e470['if']('isConfirm','ck-thread--remove-confirmation'),_0x27e470['to']('actionIndicator',_0x5dd203=>_0x5dd203?'ck-thread--'+_0x5dd203:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x27e470['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 _0x28b2e0 of this['commentsListView']['commentViews'])_0x28b2e0['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0xf132aa}=this,_0x34f01c=this['commentsListView']['commentViews']['get'](0x0);_0x34f01c===this['_boundFirstCommentView']||_0x34f01c['isSystemComment']||(this['_boundFirstCommentView']=_0x34f01c,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x34f01c,'actionIndicator',_0x4192b3=>'remove'===_0x4192b3?'remove':null),_0x34f01c['placeholder']=S(_0xf132aa,'Write\x20a\x20comment...'),_0x34f01c['removeButton']['on']('execute',_0x101445=>{_0x101445['stop'](),this['showConfirm'](S(_0xf132aa,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x34f01c['focus']();}),_0x34f01c['actionBar']['add'](this['resolveButton'],0x0),_0x34f01c['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x20f0a0=new _0x218640(this['locale']);return _0x20f0a0['label']=S(this['locale'],'Resolve'),_0x20f0a0['tooltip']=S(this['locale'],'Resolve'),_0x20f0a0['icon']=_0x1f311c['check'],_0x20f0a0['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x20f0a0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4c8bf0=>!_0x4c8bf0),_0x20f0a0['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x34425d,_0x143afc)=>_0x34425d&&!_0x143afc),_0x20f0a0['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x20f0a0;}['_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 hs extends kt{constructor(_0x301692){super(_0x301692),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x2266a8,_0x1ce971,_0x43ad8b)=>{this['element']['innerHTML']=_0x43ad8b;}),this['element']['innerHTML']=this['content'];}}class rs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1de035,_0x430f72,_0x26deca){super(_0x1de035),this['_model']=_0x430f72,this['_config']=_0x26deca,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x430f72,'content',_0x430f72,'authoredAt',(_0x49ca5f,_0x1b28d0)=>S(_0x1de035,'COMMENT_ARIA_LABEL',[_0x430f72['author']['name'],_0x26deca['formatDateTime'](_0x1b28d0),new DOMParser()['parseFromString'](_0x49ca5f,'text/html')['body']['textContent'],_0x430f72['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new ts(_0x1de035,S(_0x1de035,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x56d3ef(),this['focusTracker']=new _0x309532(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x492be1=>_0x492be1['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']?S(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):S(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?S(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):S(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x3b1160=new hs(this['locale']);return _0x3b1160['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x371f50,_0x53f51a)=>_0x53f51a?_0x17b66e(_0x371f50,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x371f50),_0x3b1160;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x48f6a2=new os(this['locale'],this['_config']['editorConfig']);return _0x48f6a2['value']=this['_model']['content'],_0x48f6a2['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x48f6a2['submitLabel']=S(this['locale'],'Save'),_0x48f6a2['on']('submit',(_0x47a7ea,_0x56a36a)=>{this['fire']('updateComment',this['_model']['id'],_0x56a36a),this['switchToDisplayMode'](),this['focus']();}),_0x48f6a2['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x48f6a2['once']('editorReady',()=>{_0x48f6a2['focus']();}),_0x48f6a2['createEditor'](),_0x48f6a2['delegate']('editorReady')['to'](this),_0x48f6a2['delegate']('editorDestroyed')['to'](this),_0x48f6a2;}['_setupKeyboardNavigation'](){const _0x272ce1=this['element'];this['keystrokes']['listenTo'](_0x272ce1);for(const _0x2d1dbf of this['focusables'])this['focusTracker']['add'](_0x2d1dbf['element']),this['keystrokes']['listenTo'](_0x2d1dbf['element']);this['focusables']['on']('change',(_0x5735a3,_0x2e7360)=>{for(const _0x120196 of _0x2e7360['removed'])this['focusTracker']['remove'](_0x120196['element']),this['keystrokes']['stopListening'](_0x120196['element']);for(const _0x11af5f of _0x2e7360['added'])this['focusTracker']['add'](_0x11af5f['element']),this['keystrokes']['listenTo'](_0x11af5f['element']);}),this['keystrokes']['set']('enter',(_0x1873a2,_0x28bae3)=>{_0x272ce1===_0x1873a2['target']&&(this['focusCycler']['focusFirst'](),_0x28bae3());}),this['keystrokes']['set']('esc',(_0x367904,_0x3f6359)=>{_0x272ce1!==_0x367904['target']&&(this['focus'](),_0x3f6359());});}}class gt extends/* #__PURE__ -- @preserve */ ti(rs){['actionBar'];['userView'];constructor(_0x466256,_0x46ae19,_0x57727f){super(_0x466256,_0x46ae19,_0x57727f),this['set']('actionIndicator',null),this['set']('placeholder',S(_0x466256,'Reply...')),this['bind']('authoredAt')['to'](_0x46ae19),this['bind']('resolvedAt')['to'](_0x46ae19),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 _0xa1c891(_0x466256,_0x46ae19['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x46ae19,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x15324d=this['bindTemplate'],_0x48ff1e=[{'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':_0x15324d['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x15324d['to']('authoredAt',_0x5ec5e3=>this['_config']['formatDateTime'](_0x5ec5e3))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x15324d['if']('isEditMode','ck-comment__actions--hidden'),_0x15324d['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']&&_0x48ff1e['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x15324d['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x15324d['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x15324d['if']('isEditMode','ck-comment--edit'),_0x15324d['if']('isSystemComment','ck-comment--info'),_0x15324d['to']('actionIndicator',_0x3f6f0c=>_0x3f6f0c?'ck-comment--'+_0x3f6f0c:'')],'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':_0x48ff1e}]}]};}['_createEditButton'](){const _0x44d5b9=new _0x37c84d(this['locale']);return _0x44d5b9['label']=S(this['locale'],'Edit'),_0x44d5b9['icon']=_0x1f311c['pencil'],_0x44d5b9['withText']=!0x0,_0x44d5b9['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x44d5b9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x358053=>!_0x358053),_0x44d5b9['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x44d5b9['on']('execute',()=>this['switchToEditMode']()),_0x44d5b9;}['_createRemoveButton'](){const _0x256efd=new _0x37c84d(this['locale']);return _0x256efd['label']=S(this['locale'],'Remove'),_0x256efd['icon']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5.2\x207h9.2c.6\x200\x201\x20.4\x201\x201v9.9c0\x20.5-.4\x201-1\x201H5.2a1\x201\x200\x200\x201-1-1V8c0-.6.4-1\x201-1zm1\x201.5c-.3\x200-.5.2-.5.5v8c0\x20.3.2.5.5.5h.5c.2\x200\x20.5-.2.5-.5V9c0-.3-.3-.5-.5-.5h-.5zm3.2\x200c-.2\x200-.5.2-.5.5v8c0\x20.3.3.5.5.5h.5c.3\x200\x20.5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.4zm3.5\x200c-.2\x200-.5.2-.5.5v8c0\x20.3.3.5.5.5h.5c.3\x200\x20.5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.5zm-1.4-7.1H8.3L6.5\x203.6H3.8c-.5\x200-.7.3-.7.8s.2.7.7.7h12c.6\x200\x20.9-.2.9-.7\x200-.5-.3-.8-1-.8h-2.4l-1.8-2.2z\x22/></svg>\x0a',_0x256efd['withText']=!0x0,_0x256efd['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x256efd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3451dc=>!_0x3451dc),_0x256efd['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x256efd['on']('execute',()=>{this['showConfirm'](S(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x256efd;}['_createDropdown'](){const _0x13ea77=_0xc94d43(this['locale'],_0x22d429),_0x103149=_0x13ea77['panelView']['children'],_0x24c3a9=new _0x4597c7(this['locale']),_0x3c8136=_0x13ea77['bindTemplate'];_0x2805be(_0x13ea77,()=>this['items']['find'](_0x5e8254=>_0x5e8254['isVisible'])),_0x13ea77['extendTemplate']({'attributes':{'class':[_0x3c8136['if']('isVisible','ck-hidden',_0x12ff31=>!_0x12ff31)]}});const _0x1190d2=(_0xe902fa,_0x5c3659=-0x1)=>{const _0x26a4f1=new _0x4c3a28(this['locale']);_0x26a4f1['children']['add'](_0xe902fa);const _0x10fe07=_0x5c3659>-0x1?_0x5c3659:_0x24c3a9['items']['length'];_0x24c3a9['items']['add'](_0x26a4f1,_0x10fe07);const _0x3f6f27=Array['from'](this['items']);_0x13ea77['unbind']('isEnabled','isVisible'),_0x13ea77['bind']('isEnabled')['toMany'](_0x3f6f27,'isEnabled',(..._0x5d7008)=>_0x5d7008['some'](_0x29b657=>_0x29b657)),_0x13ea77['bind']('isVisible')['toMany'](_0x3f6f27,'isVisible',(..._0x34cf90)=>_0