@ckeditor/ckeditor5-comments 48.5.0-alpha.5 → 48.5.0-alpha.6

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 (75) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.umd.js +1 -1
  3. package/dist/translations/ar.umd.js +1 -1
  4. package/dist/translations/ast.umd.js +1 -1
  5. package/dist/translations/az.umd.js +1 -1
  6. package/dist/translations/be.umd.js +1 -1
  7. package/dist/translations/bg.umd.js +1 -1
  8. package/dist/translations/bn.umd.js +1 -1
  9. package/dist/translations/bs.umd.js +1 -1
  10. package/dist/translations/ca.umd.js +1 -1
  11. package/dist/translations/cs.umd.js +1 -1
  12. package/dist/translations/da.umd.js +1 -1
  13. package/dist/translations/de-ch.umd.js +1 -1
  14. package/dist/translations/de.umd.js +1 -1
  15. package/dist/translations/el.umd.js +1 -1
  16. package/dist/translations/en-au.umd.js +1 -1
  17. package/dist/translations/en-gb.umd.js +1 -1
  18. package/dist/translations/en.umd.js +1 -1
  19. package/dist/translations/eo.umd.js +1 -1
  20. package/dist/translations/es-co.umd.js +1 -1
  21. package/dist/translations/es.umd.js +1 -1
  22. package/dist/translations/et.umd.js +1 -1
  23. package/dist/translations/eu.umd.js +1 -1
  24. package/dist/translations/fa.umd.js +1 -1
  25. package/dist/translations/fi.umd.js +1 -1
  26. package/dist/translations/fr.umd.js +1 -1
  27. package/dist/translations/gl.umd.js +1 -1
  28. package/dist/translations/gu.umd.js +1 -1
  29. package/dist/translations/he.umd.js +1 -1
  30. package/dist/translations/hi.umd.js +1 -1
  31. package/dist/translations/hr.umd.js +1 -1
  32. package/dist/translations/hu.umd.js +1 -1
  33. package/dist/translations/hy.umd.js +1 -1
  34. package/dist/translations/id.umd.js +1 -1
  35. package/dist/translations/it.umd.js +1 -1
  36. package/dist/translations/ja.umd.js +1 -1
  37. package/dist/translations/jv.umd.js +1 -1
  38. package/dist/translations/kk.umd.js +1 -1
  39. package/dist/translations/km.umd.js +1 -1
  40. package/dist/translations/kn.umd.js +1 -1
  41. package/dist/translations/ko.umd.js +1 -1
  42. package/dist/translations/ku.umd.js +1 -1
  43. package/dist/translations/lt.umd.js +1 -1
  44. package/dist/translations/lv.umd.js +1 -1
  45. package/dist/translations/ms.umd.js +1 -1
  46. package/dist/translations/nb.umd.js +1 -1
  47. package/dist/translations/ne.umd.js +1 -1
  48. package/dist/translations/nl.umd.js +1 -1
  49. package/dist/translations/no.umd.js +1 -1
  50. package/dist/translations/oc.umd.js +1 -1
  51. package/dist/translations/pl.umd.js +1 -1
  52. package/dist/translations/pt-br.umd.js +1 -1
  53. package/dist/translations/pt.umd.js +1 -1
  54. package/dist/translations/ro.umd.js +1 -1
  55. package/dist/translations/ru.umd.js +1 -1
  56. package/dist/translations/si.umd.js +1 -1
  57. package/dist/translations/sk.umd.js +1 -1
  58. package/dist/translations/sl.umd.js +1 -1
  59. package/dist/translations/sq.umd.js +1 -1
  60. package/dist/translations/sr-latn.umd.js +1 -1
  61. package/dist/translations/sr.umd.js +1 -1
  62. package/dist/translations/sv.umd.js +1 -1
  63. package/dist/translations/th.umd.js +1 -1
  64. package/dist/translations/ti.umd.js +1 -1
  65. package/dist/translations/tk.umd.js +1 -1
  66. package/dist/translations/tr.umd.js +1 -1
  67. package/dist/translations/tt.umd.js +1 -1
  68. package/dist/translations/ug.umd.js +1 -1
  69. package/dist/translations/uk.umd.js +1 -1
  70. package/dist/translations/ur.umd.js +1 -1
  71. package/dist/translations/uz.umd.js +1 -1
  72. package/dist/translations/vi.umd.js +1 -1
  73. package/dist/translations/zh-cn.umd.js +1 -1
  74. package/dist/translations/zh.umd.js +1 -1
  75. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x44703a,Context as _0x4d8ccf,ContextPlugin as _0xe32c07,Editor as _0x458c52,PendingActions as _0x24dddb,Plugin as _0x12b188}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x3fd207,Collection as _0x5d687e,DomEmitterMixin as _0x30f8a8,FocusTracker as _0x4804cc,KeystrokeHandler as _0x225c8d,ObservableMixin as _0x1bcd46,Rect as _0x1f4f60,diff as _0x46451d,first as _0x9ba8a7,getEnvKeystrokeText as _0x10baf1,keyCodes as _0x5f035e,priorities as _0x4103ab,scrollViewportToShowTarget as _0x38c3bf,toUnit as _0x26abaa,uid as _0x185ea0}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x5319be,ConfirmMixin as _0x327e2c,FOCUS_ANNOTATION_KEYSTROKE as _0x14d518,LateFocusButtonView as _0x3a79be,LateFocusDropdownButtonView as _0x1dc2cf,UserView as _0x29d00e,Users as _0x23b29b,getAllMarkersDomElementsSorted as _0x71726c,getDateTimeFormatter as _0x110226,hashObject as _0x4543c7,setupThreadKeyboardNavigation as _0x146ecb,surroundingMarkersDetector as _0x1b50a0,trimHtml as _0x1f45e6}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x2dad8a,debounce as _0x98290e,isEqual as _0x11ae2a,set as _0x200648,throttle as _0xdb138e,unset as _0x4c0a55}from'es-toolkit/compat';import{IconAddComment as _0x1aed3d,IconCheck as _0x3237c4,IconCommentsArchive as _0x2a22ba,IconPencil as _0x38ac55,IconRemoveComment as _0x52171e,IconThreeVerticalDots as _0x2c70f9,IconUndo as _0x4884c7}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x4f61cf,BodyCollection as _0x456151,ButtonView as _0x422b1d,ContextualBalloon as _0xbf878f,Dialog as _0x3da253,DialogViewPosition as _0x56ba8b,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
- _0x1bcd46();var bt=class extends It{['model'];['view'];constructor(_0x45c665,_0xbbfe45){super(),this['model']=_0x45c665,this['model']['_isAttached']=!0x0,this['view']=_0xbbfe45,this['listenTo'](_0xbbfe45,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0xbbfe45,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0xbbfe45,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0xbbfe45,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0xbbfe45,'addComment',(_0x27f93e,_0x6bd991)=>this['addComment'](_0x6bd991)),this['listenTo'](_0xbbfe45,'updateComment',(_0x5a1135,_0x534849,_0x53e3a9)=>this['updateComment'](_0x534849,_0x53e3a9)),this['listenTo'](_0xbbfe45,'removeComment',(_0x4d008b,_0xa6e9fb)=>this['removeComment'](_0xa6e9fb));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x4d45d4){this['model']['addComment']({'content':_0x4d45d4,'authorId':this['view']['_localUser']['id']});}updateComment(_0x210a3f,_0x98e91c){this['model']['getComment'](_0x210a3f)['update']({'content':_0x98e91c});}removeComment(_0x1f9099){this['model']['getComment'](_0x1f9099)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x2c66e4,_0x51e9c7,_0x1de845){const t=_0x2c66e4['t'];switch(_0x51e9c7){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'},_0x1de845);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x1de845);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'},_0x1de845);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'},_0x1de845);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1de845);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'},_0x1de845);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'},_0x1de845);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'},_0x1de845);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}var kt=class extends it{['main'];editable;constructor(_0x59d09d,_0x1df671){super(_0x59d09d);const _0xef0b36=_0x185ea0();this['main']=this['createCollection'](),this['editable']=new st(_0x59d09d,_0x1df671,void 0x0,{'label':()=>Et(_0x59d09d,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x59d09d['uiLanguageDirection'],'lang':_0x59d09d['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xef0b36},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}},Nt=class extends tt{['view'];constructor(_0xc6d1a0){super(_0xc6d1a0),this['view']=new kt(_0xc6d1a0['locale'],_0xc6d1a0['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x11c928=this['editor']['editing']['view'],_0x4f4353=this['view']['editable'];_0x4f4353['name']=_0x11c928['document']['getRoot']()['rootName'],this['view']['render']();const _0x3f54c4=_0x4f4353['element'];this['setEditableElement'](_0x4f4353['name'],_0x3f54c4),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x11c928['attachDomRoot'](_0x3f54c4),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x1bcd46(_0x458c52);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x391ad5={}){(_0x391ad5=Object['assign']({},_0x391ad5))['plugins']||(_0x391ad5['plugins']=CommentEditor['defaultPlugins']),super(_0x391ad5),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0x57cddd=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x57cddd))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3ca089=>{const _0x1631f2=this['model']['document']['getRoot'](),_0x3186bc=_0x1631f2&&_0x1631f2['getChild'](_0x1631f2['childCount']-0x1);_0x3ca089['setSelection'](_0x3186bc,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x414654=this['editing']['view'],_0x1e55b6=_0x414654['document']['getRoot'](),_0x372c1e=_0x1e55b6['getChild'](0x0);_0x1e55b6['childCount']>0x1||!_0x372c1e||'p'!=_0x372c1e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x414654,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x372c1e['placeholder']=this['placeholder']),ut({'view':_0x414654,'element':_0x372c1e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x372c1e);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x3ac517,_0x2d1a2d={}){super(_0x3ac517),this['editor']=null,this['_editorConfig']=_0x2d1a2d,this['set']('value',_0x2d1a2d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x3ac517,'Reply...')),this['set']('submitLabel',Et(_0x3ac517,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x225c8d(),this['focusTracker']=new _0x4804cc(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5d3268=>!_0x5d3268['defaultPrevented']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x4966b3,_0x438be2)=>{this['cancelButtonView']['fire']('execute'),_0x438be2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x1dbfe9,_0x4772de)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4772de());}),this['on']('submit',(_0x3005a9,_0x255629)=>{_0x255629['length']>0xfde8?(alert(Et(_0x3ac517,'TOO_LONG_COMMENT_ALERT',[_0x255629['length'],0xfde8])),_0x3005a9['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2ac213=this['editor'];this['element']['insertBefore'](_0x2ac213['ui']['element'],this['element']['firstChild']),_0x2ac213['model']['document']['on']('change',()=>this['value']=_0x2ac213['getData']()),_0x2ac213['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2ac213['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x56fedf){-0x1===_0x56fedf?(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:_0x14cd1d}=this,_0x50a0ff=new _0x422b1d(_0x14cd1d);return _0x50a0ff['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x50a0ff['withText']=!0x0,_0x50a0ff['bind']('label')['to'](this,'submitLabel'),_0x50a0ff['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x50a0ff['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x53cbd5,_0x539e9d)=>!_0x539e9d&&!!_0x53cbd5['trim']()),_0x50a0ff;}_createCancelButton(){const {locale:_0x2f0df5}=this,_0x56c0fb=new _0x422b1d(_0x2f0df5);return _0x56c0fb['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x56c0fb['label']=Et(_0x2f0df5,'Cancel'),_0x56c0fb['withText']=!0x0,_0x56c0fb['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x56c0fb;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xead881=>{this['focusTracker']['add'](_0xead881['element']);}),this['focusables']['on']('change',(_0x1effbb,_0x4a20fc)=>{for(const _0x37c6d8 of Array['from'](_0x4a20fc['added'])['reverse']())this['focusTracker']['add'](_0x37c6d8['element']);});}},xt=class extends ht{constructor(_0x9a9658,_0x58988d,_0x572ecc){super(_0x9a9658),this['commentInputView']=new St(_0x9a9658,_0x572ecc),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3a4bb1,_0x34d7a6)=>_0x3a4bb1||!!_0x34d7a6),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 _0x29d00e(_0x9a9658,_0x58988d),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'](_0x1ac69b){this['commentInputView']['focus'](_0x1ac69b);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x3061f1,_0x4e5fb5)=>{const {submitButtonView:_0x17428d,cancelButtonView:_0x31b24c,editor:_0x15eee8}=this['commentInputView'];[_0x17428d['element'],_0x31b24c['element'],_0x15eee8?_0x15eee8['editing']['view']['getDomRoot']():null]['filter'](_0xc7168a=>_0xc7168a)['some'](_0x52b617=>_0x52b617['contains'](_0x4e5fb5['target']))||(this['focus'](),_0x4e5fb5['preventDefault']());});}},Pt=class extends ht{constructor(_0x19d513){super(_0x19d513);const _0x33f646=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x33f646['to']('count',_0x5e1177=>Et(_0x19d513,'NUMBER_OF_COMMENTS',_0x5e1177))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x37d100,_0x8faf96,_0x2144b3){super(_0x37d100);const _0x44ae22=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x8faf96['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x8faf96,this['_config']=_0x2144b3,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1312d9=>this['commentViews']['map'](_0x1cbad5=>_0x1cbad5['element'])['includes'](_0x1312d9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x37d100),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5be0b0=>_0x5be0b0-this['_config']['maxCommentsWhenCollapsed']);for(const _0x9e42d7 of _0x8faf96['comments'])this['_handleNewCommentModel'](_0x9e42d7);this['_handleInfoComment'](),this['listenTo'](_0x8faf96['comments'],'add',(_0x4b365c,_0x5b071b)=>{const _0x2e873b=this['_calculatePosition'](_0x5b071b);this['length']++,this['_handleNewCommentModel'](_0x5b071b,_0x2e873b),this['refreshVisibleViews']();}),this['listenTo'](_0x8faf96['comments'],'remove',(_0x71749,_0x4b7f64)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4b7f64),this['refreshVisibleViews']();}),this['listenTo'](_0x8faf96,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x8faf96,'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',_0x44ae22['if']('length','ck-hidden',_0x1b5a0c=>!_0x1b5a0c)],'aria-label':Et(_0x37d100,'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'](_0x117502){-0x1===_0x117502?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x496a72 of this['commentViews'])_0x496a72['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x2bede2,_0x32245e){const _0x4f3fbb=new this['_config']['CommentView'](this['locale'],_0x2bede2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4f3fbb['viewUid']=_0x2bede2['id'],_0x4f3fbb['delegate']('removeComment')['to'](this),_0x4f3fbb['delegate']('updateComment')['to'](this),_0x4f3fbb['delegate']('resolveCommentThread')['to'](this),_0x4f3fbb['delegate']('editorReady')['to'](this),_0x4f3fbb['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4f3fbb,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4f3fbb,_0x32245e);}_calculatePosition(_0x14f447){const _0x37ebbe=this['_model']['_findOptimalIndex'](_0x14f447);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x14f447['authoredAt']?_0x37ebbe-0x1:_0x37ebbe:_0x37ebbe-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x12d023={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x12d023,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x12d023));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x5235d5){const _0x4ef485=this['commentViews']['remove'](_0x5235d5['id']);this['stopListening'](_0x4ef485),_0x4ef485['isEditMode']&&this['_updateHasDirtyComment'](),_0x4ef485['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1910bc=>_0x1910bc['isEditMode']);}['_rearrangeCollapse'](){const _0x2fc1f1=function(_0xcbee23){const _0x40b705=new _0x5d687e();for(const _0x1a643c of _0xcbee23)_0x40b705['add'](_0x1a643c);return _0x40b705;}(this['commentViews']),_0x530733=this['_collapsedCommentsView']['count'];for(let _0x2979d6=0x1;_0x2979d6<=_0x530733;_0x2979d6++)_0x2fc1f1['remove'](0x1);for(const _0x158f2c of _0x2fc1f1)_0x158f2c['collapse']();_0x530733>0x0&&_0x2fc1f1['add'](this['_collapsedCommentsView'],0x1),Dt(_0x46451d(Array['from'](this['visibleViews']),Array['from'](_0x2fc1f1)),this['visibleViews'],_0x2fc1f1);}['_rearrangeExpand'](){Dt(_0x46451d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x569d04 of this['visibleViews'])_0x569d04['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x2a962b=>{this['focusTracker']['add'](_0x2a962b['element']),this['keystrokes']['listenTo'](_0x2a962b['element']);}),this['commentViews']['on']('change',(_0x20010d,_0x11e875)=>{for(const _0x301ed3 of _0x11e875['removed'])this['focusTracker']['remove'](_0x301ed3['element']),this['keystrokes']['stopListening'](_0x301ed3['element']);for(const _0x1ebd5f of Array['from'](_0x11e875['added'])['reverse']())this['focusTracker']['add'](_0x1ebd5f['element']),this['keystrokes']['listenTo'](_0x1ebd5f['element']);});}};function Dt(_0x1a6281,_0x495cca,_0x3b40b0){let _0x2b73bd=0x0;for(const _0x37b7b1 of _0x1a6281)switch(_0x37b7b1){case'insert':_0x495cca['add'](_0x3b40b0['get'](_0x2b73bd),_0x2b73bd),_0x2b73bd++;break;case'delete':_0x495cca['remove'](_0x2b73bd);break;case'equal':_0x2b73bd++;}}var Vt=class extends ht{constructor(_0x3c0c10){super(_0x3c0c10);const _0x2d5ce9=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2d5ce9['to']('contextValue',_0xefef5a=>Et(_0x3c0c10,'THREAD_CONTEXT_LABEL',_0xefef5a)),'tabindex':-0x1},'children':[{'text':_0x2d5ce9['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x5259e3,_0x405230){super(_0x5259e3);const _0x557b71=this['bindTemplate'];this['_model']=_0x405230,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4f1bfa=>!!_0x4f1bfa),this['bind']('contextValue')['to'](this['_model'],'context',_0x3dcd57=>_0x3dcd57&&_0x3dcd57['value']?this['_trimContextValue'](_0x3dcd57['value']):Et(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x557b71['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 _0x30d218=new _0x422b1d(this['locale']);return _0x30d218['label']=Et(this['locale'],'Reopen'),_0x30d218['tooltip']=Et(this['locale'],'Reopen'),_0x30d218['icon']=_0x4884c7,_0x30d218['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a4322=>!_0x2a4322),_0x30d218['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x12a50e,_0x3b2e70)=>_0x12a50e&&_0x3b2e70),_0x30d218['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x30d218;}_trimContextValue(_0x57e2aa){if(_0x57e2aa['length']<0x96)return _0x57e2aa;const _0x3f9e04=_0x57e2aa['lastIndexOf']('\x20',0x93);return _0x57e2aa['substring'](0x0,_0x3f9e04>-0x1?_0x3f9e04:0x93)+'...';}_attachContextActions(){const _0x34b0b8=this['element']['querySelector']('.ck-context'),_0x11f668=_0x34b0b8['querySelector']('.ck-context__value');this['listenTo'](_0x34b0b8,'mouseenter',()=>{_0x11f668['offsetWidth']<_0x11f668['scrollWidth']&&_0x34b0b8['classList']['add']('overlay');}),this['listenTo'](_0x34b0b8,'mouseleave',()=>{_0x34b0b8['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x3f308c of this['focusables'])this['focusTracker']['add'](_0x3f308c['element']),this['keystrokes']['listenTo'](_0x3f308c['element']);}_createContextView(){const _0x5d0bea=new Vt(this['locale']);return _0x5d0bea['bind']('contextValue')['to'](this),_0x5d0bea;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x209854,_0x23801d,_0x572b95,_0x7b49d){super(_0x209854),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x23801d,this['_localUser']=_0x572b95,this['_config']=_0x7b49d,this['commentThreadHeaderView']=new Bt(_0x209854,_0x23801d),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x5319be(_0x209854,Et(_0x209854,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x209854,_0x23801d,Object['assign']({'CommentView':this['_config']['CommentView']},_0x7b49d)),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',(_0x170528,_0x2da179)=>_0x170528||!!_0x2da179),this['bind']('isUnlinked')['to'](_0x23801d,'unlinkedAt',_0x2b8aa6=>!!_0x2b8aa6);let _0x461452=null;const _0x22ed13=()=>{const _0xe9f70d=this['_model']['comments']['first']||null;_0xe9f70d!==_0x461452&&(_0x461452&&this['stopListening'](_0x461452,'change:content'),_0x461452=_0xe9f70d,_0xe9f70d&&this['listenTo'](_0xe9f70d,'change:content',_0x22ed13));const _0x548ae4=_0xe9f70d?_0xe9f70d['author']['name']:this['_localUser']['name'],_0x580166=_0xe9f70d?new DOMParser()['parseFromString'](_0x1f45e6(_0xe9f70d['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x7f409=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x548ae4]);this['set']('ariaLabel',_0x580166?_0x7f409+'\x20'+_0x580166:_0x7f409);};this['listenTo'](this['_model']['comments'],'change',_0x22ed13),_0x22ed13(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x396035=>_0x396035['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x146ecb(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x54c10e=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x55d472=_0x54c10e['commentInputView'];return _0x54c10e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x55d472,'value',(_0x18f2ee,_0x1c0c62,_0x2fa3da,_0xee38a3,_0x52fdb5)=>!!_0x52fdb5||!!_0xee38a3&&_0x2fa3da&&!_0x1c0c62||_0x18f2ee&&_0x2fa3da&&!_0x1c0c62),_0x55d472['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x23e51f,_0x4cea5c,_0x4b6a10)=>{let _0x25311;return _0x25311=_0x4b6a10&&_0x4cea5c?'Reply\x20to\x20reopen\x20discussion...':_0x23e51f?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x25311);}),_0x55d472['bind']('submitLabel')['to'](this,'length',_0x136cc9=>Et(this['locale'],_0x136cc9?'Reply':'Comment')),_0x55d472['on']('submit',(_0x38da2d,_0x3ede04)=>{this['fire']('addComment',_0x3ede04),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x55d472['on']('cancel',()=>{this['focus']();}),_0x55d472['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x55d472['on']('cancel',_0x501c69=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x501c69['stop']());}),this['on']('change:isActive',(_0x23d05c,_0x51939c,_0x5ef1a7)=>{_0x5ef1a7||this['length']||_0x55d472['value']||this['fire']('removeCommentThread');}),_0x54c10e;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x327e2c(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x5c14ea,_0x3fad2f,_0x4d1f6a,_0x4a29cb){super(_0x5c14ea,_0x3fad2f,_0x4d1f6a,_0x4a29cb),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5c14ea,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x24a83a,_0x2dc2ae,_0x511aee)=>{_0x511aee||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x4e18b7,_0x4d0952,_0xf6e88e)=>{_0xf6e88e&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0xbab00d=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0xbab00d['if']('isActive','ck-thread--active'),_0xbab00d['if']('isUnlinked','ck-thread--unlinked'),_0xbab00d['to']('actionIndicator',_0x4b29a2=>_0x4b29a2?'ck-thread--'+_0x4b29a2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0xbab00d['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 _0x40546c of this['commentsListView']['commentViews'])_0x40546c['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x2a78e9}=this,_0x296400=this['commentsListView']['commentViews']['get'](0x0);_0x296400===this['_boundFirstCommentView']||_0x296400['isSystemComment']||(this['_boundFirstCommentView']=_0x296400,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x296400,'actionIndicator',_0x5b1a62=>'remove'===_0x5b1a62?'remove':null),_0x296400['placeholder']=Et(_0x2a78e9,'Write\x20a\x20comment...'),_0x296400['removeButton']['on']('execute',_0x21081a=>{_0x21081a['stop'](),this['showConfirm'](Et(_0x2a78e9,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x296400['focus']();}),_0x296400['actionBar']['add'](this['resolveButton'],0x0),_0x296400['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x272ac8=new _0x3a79be(this['locale']);return _0x272ac8['label']=Et(this['locale'],'Resolve'),_0x272ac8['tooltip']=Et(this['locale'],'Resolve'),_0x272ac8['icon']=_0x3237c4,_0x272ac8['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x272ac8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x35ba83=>!_0x35ba83),_0x272ac8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x28c6f7,_0x2d3c99)=>_0x28c6f7&&!_0x2d3c99),_0x272ac8['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x272ac8;}_updateArchivedThreadHeader(){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}},Wt=class extends ht{constructor(_0x54cc6){super(_0x54cc6),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x12bc2e,_0x16194a,_0x33c37f)=>{this['element']['innerHTML']=_0x33c37f;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x1b97e7,_0x5bedd9,_0x255769){super(_0x1b97e7),this['_model']=_0x5bedd9,this['_config']=_0x255769,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5bedd9,'content',_0x5bedd9,'authoredAt',(_0x59fe68,_0xcb7ef4)=>Et(_0x1b97e7,'COMMENT_ARIA_LABEL',[_0x5bedd9['author']['name'],_0x255769['formatDateTime'](_0xcb7ef4),new DOMParser()['parseFromString'](_0x59fe68,'text/html')['body']['textContent'],_0x5bedd9['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x5319be(_0x1b97e7,Et(_0x1b97e7,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1891f0=>_0x1891f0['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async destroy(){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}switchToEditMode(){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}switchToDisplayMode(){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}getExternalCommentNote(){return'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x42707b=new Wt(this['locale']);return _0x42707b['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2bb3e3,_0xe7e608)=>_0xe7e608?_0x1f45e6(_0x2bb3e3,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2bb3e3),_0x42707b;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x490018=new St(this['locale'],this['_config']['editorConfig']);return _0x490018['value']=this['_model']['content'],_0x490018['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x490018['submitLabel']=Et(this['locale'],'Save'),_0x490018['on']('submit',(_0x18df50,_0x1b9317)=>{this['fire']('updateComment',this['_model']['id'],_0x1b9317),this['switchToDisplayMode'](),this['focus']();}),_0x490018['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x490018['once']('editorReady',()=>{_0x490018['focus']();}),_0x490018['createEditor'](),_0x490018['delegate']('editorReady')['to'](this),_0x490018['delegate']('editorDestroyed')['to'](this),_0x490018;}_setupKeyboardNavigation(){const _0x15e512=this['element'];this['keystrokes']['listenTo'](_0x15e512);for(const _0x255d4f of this['focusables'])this['focusTracker']['add'](_0x255d4f['element']),this['keystrokes']['listenTo'](_0x255d4f['element']);this['focusables']['on']('change',(_0x4d2613,_0x74d6b3)=>{for(const _0x21a8fd of _0x74d6b3['removed'])this['focusTracker']['remove'](_0x21a8fd['element']),this['keystrokes']['stopListening'](_0x21a8fd['element']);for(const _0x12575b of _0x74d6b3['added'])this['focusTracker']['add'](_0x12575b['element']),this['keystrokes']['listenTo'](_0x12575b['element']);}),this['keystrokes']['set']('enter',(_0x627ff2,_0x287359)=>{_0x15e512===_0x627ff2['target']&&(this['focusCycler']['focusFirst'](),_0x287359());}),this['keystrokes']['set']('esc',(_0x382575,_0x484c97)=>{_0x15e512!==_0x382575['target']&&(this['focus'](),_0x484c97());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x327e2c(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x14c354,_0x30bcf3,_0x2b5b55){super(_0x14c354,_0x30bcf3,_0x2b5b55),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x14c354,'Reply...')),this['bind']('authoredAt')['to'](_0x30bcf3),this['bind']('resolvedAt')['to'](_0x30bcf3),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 _0x29d00e(_0x14c354,_0x30bcf3['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x30bcf3,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x25b980=this['bindTemplate'],_0x33b3d2=[{'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':_0x25b980['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x25b980['to']('authoredAt',_0x7c0640=>this['_config']['formatDateTime'](_0x7c0640))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x25b980['if']('isEditMode','ck-comment__actions--hidden'),_0x25b980['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']&&_0x33b3d2['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x25b980['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x25b980['if']('isEditMode','ck-comment--edit'),_0x25b980['if']('isSystemComment','ck-comment--info'),_0x25b980['to']('actionIndicator',_0x2434d1=>_0x2434d1?'ck-comment--'+_0x2434d1:'')],'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':_0x33b3d2}]}]};}_createEditButton(){const _0x57ba1c=new _0x422b1d(this['locale']);return _0x57ba1c['label']=Et(this['locale'],'Edit'),_0x57ba1c['icon']=_0x38ac55,_0x57ba1c['withText']=!0x0,_0x57ba1c['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x57ba1c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1e2b97=>!_0x1e2b97),_0x57ba1c['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x57ba1c['on']('execute',()=>this['switchToEditMode']()),_0x57ba1c;}_createRemoveButton(){const _0x1b48c1=new _0x422b1d(this['locale']);return _0x1b48c1['label']=Et(this['locale'],'Remove'),_0x1b48c1['icon']=_0x52171e,_0x1b48c1['withText']=!0x0,_0x1b48c1['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1b48c1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x433697=>!_0x433697),_0x1b48c1['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1b48c1['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1b48c1;}_createDropdown(){const _0x2b9f86=ct(this['locale'],_0x1dc2cf),_0x520869=_0x2b9f86['panelView']['children'],_0x2aab17=new ot(this['locale']),_0x4d4c96=_0x2b9f86['bindTemplate'];dt(_0x2b9f86,()=>this['items']['find'](_0x62eb21=>_0x62eb21['isVisible'])),_0x2b9f86['extendTemplate']({'attributes':{'class':[_0x4d4c96['if']('isVisible','ck-hidden',_0x8c379c=>!_0x8c379c)]}});const _0x2463dc=(_0xde8bfc,_0x5e56f1=-0x1)=>{const _0x2da68f=new nt(this['locale']);_0x2da68f['children']['add'](_0xde8bfc);const _0x140572=_0x5e56f1>-0x1?_0x5e56f1:_0x2aab17['items']['length'];_0x2aab17['items']['add'](_0x2da68f,_0x140572);const _0x54ae05=Array['from'](this['items']);_0x2b9f86['unbind']('isEnabled','isVisible'),_0x2b9f86['bind']('isEnabled')['toMany'](_0x54ae05,'isEnabled',(..._0x3028f9)=>_0x3028f9['some'](_0x3285f1=>_0x3285f1)),_0x2b9f86['bind']('isVisible')['toMany'](_0x54ae05,'isVisible',(..._0x7e0e2f)=>_0x7e0e2f['some'](_0x3105bc=>_0x3105bc));};_0x2b9f86['panelPosition']='sw',_0x2b9f86['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x2c70f9});for(const _0x444b8b of this['items'])_0x2463dc(_0x444b8b);return _0x520869['add'](_0x2aab17),_0x2b9f86['listenTo'](this['items'],'add',(_0x31c259,_0xa67ad8,_0x1aada8)=>{_0x2463dc(_0xa67ad8,_0x1aada8);}),_0x2b9f86['listenTo'](this['items'],'remove',(_0x53c8ee,_0x1a10e6,_0x239407)=>{_0x2aab17['items']['remove'](_0x239407);}),_0x2b9f86;}_attachActions(_0x603f81,_0x332d3b){const _0xbba5db=_0x603f81&&_0x603f81['element'];_0xbba5db&&(this['listenTo'](_0xbba5db,'mouseenter',()=>this['actionIndicator']=_0x332d3b),this['listenTo'](_0xbba5db,'focus',()=>this['actionIndicator']=_0x332d3b),this['listenTo'](_0xbba5db,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0xbba5db,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x36d0b3=super['_createCommentInputView']();return _0x36d0b3['bind']('placeholder')['to'](this),_0x36d0b3;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x2262f2){const _0x4f9996=_0xdb138e(_0x2262f2,0x1e),_0x3078ce=new MutationObserver(_0x17fe03=>{for(const _0x3bf8ae of _0x17fe03)('attributes'==_0x3bf8ae['type']&&'class'==_0x3bf8ae['attributeName']||'childList'==_0x3bf8ae['type']||'characterData'==_0x3bf8ae['type'])&&_0x4f9996();});return{'attach'(_0x5dca7c){_0x3078ce['observe'](_0x5dca7c,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x3078ce['disconnect'](),_0x4f9996['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x34b28d,_0x57e9f3){super(_0x34b28d),this['id']=_0x185ea0(),this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['keystrokes']['set']('Esc',(_0x255497,_0x419cb8)=>this['fire']('Esc',_0x419cb8)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x57e9f3),this['mainView']=_0x57e9f3;const _0x1eaf6e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1eaf6e['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 _0x174be4=this['element']['clientHeight'];_0x174be4&&(this['height']=_0x174be4);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x1bcd46();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x2c2b5a,target:_0x14142e,type:_0x25f38a,isVisible:_0x47a679=!0x0}){super(),this['view']=_0x2c2b5a,this['view']['element']||this['view']['render'](),this['_type']=_0x25f38a,this['_target']=_0x14142e,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5d687e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x50db16,_0x3c5ce6)=>{this['view']['focusTracker']['add'](_0x3c5ce6);}),this['focusableElements']['on']('remove',(_0x11d72e,_0x2fabff)=>{this['view']['focusTracker']['remove'](_0x2fabff);}),this['set']('isVisible',_0x47a679);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x860d9b=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x860d9b),_0x860d9b;}get targetRect(){const _0x1b525b=this['target'];if(null===_0x1b525b)return null;if(_0x1b525b instanceof _0x1f4f60)return _0x1b525b;const _0x19dc3a=_0x1b525b['filter'](_0x4fee4d=>function(_0x564f02){return!!_0x564f02['offsetParent']||!!_0x564f02['getClientRects']()['item'](0x0);}(_0x4fee4d));return 0x0===_0x19dc3a['length']?null:_0x1f4f60['getDomElementRects'](_0x19dc3a[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x2904a9){this['view']['isActive']=_0x2904a9,this['view']['mainView']['isActive']=_0x2904a9;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x6190ac){if(!(null===_0x6190ac||_0x6190ac instanceof _0x1f4f60||Array['isArray'](_0x6190ac)&&_0x6190ac['every'](_0x3556bc=>zt(_0x3556bc))))throw new _0x3fd207('annotation-invalid-target',null,{'target':_0x6190ac});}_getNormalizedTarget(){const _0x41d226='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x41d226)?[_0x41d226]:_0x41d226;}};function zt(_0x359e58){return null!==_0x359e58&&'object'==typeof _0x359e58&&'nodeType'in _0x359e58&&0x1===_0x359e58['nodeType'];}var Jt=class extends _0x5d687e{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x11858b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4804cc(),this['_focusTracker']['on']('change:isFocused',(_0x27631a,_0x5a2985,_0x531253)=>{_0x531253||this['fire']('blur');});for(const _0x16eda9 of _0x11858b)this['add'](_0x16eda9);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x564da4){if(this['has'](_0x564da4))throw new _0x3fd207('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x564da4['innerView'],_0x564da4),this['_viewToAnnotation']['set'](_0x564da4['view'],_0x564da4);for(const _0xfd4a7c of _0x564da4['focusableElements'])this['_focusTracker']['add'](_0xfd4a7c);if(this['listenTo'](_0x564da4['focusableElements'],'add',(_0x6a0871,_0x2a8f13)=>{this['_focusTracker']['add'](_0x2a8f13);}),this['listenTo'](_0x564da4['focusableElements'],'remove',(_0x44651b,_0x1d54d2)=>{this['_focusTracker']['remove'](_0x1d54d2);}),this['listenTo'](_0x564da4['view']['focusTracker'],'change:isFocused',(_0x3d6a23,_0x161ec6,_0x4948b5)=>{_0x4948b5&&this['fire']('focus',_0x564da4);}),_0x564da4['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x29eb1b of this)_0x29eb1b['updateTargetRect']();}const _0xa857c5=this['_getOrderInContent'](_0x564da4['view']['targetRect']);return super['add'](_0x564da4,_0xa857c5);}['remove'](_0x251505){if(!this['has'](_0x251505))throw new _0x3fd207('annotationcollection-not-existing-item',null);this['stopListening'](_0x251505['view']['focusTracker']),this['stopListening'](_0x251505['focusableElements']);for(const _0x3fefac of _0x251505['focusableElements'])this['_focusTracker']['remove'](_0x3fefac);return this['_viewToAnnotation']['delete'](_0x251505['view']),this['_innerViewToAnnotation']['delete'](_0x251505['innerView']),super['remove'](_0x251505);}getByInnerView(_0x31bd88){return this['_innerViewToAnnotation']['get'](_0x31bd88);}getByView(_0x5a4e97){return this['_viewToAnnotation']['get'](_0x5a4e97);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0xc316c8 of this)_0xc316c8['updateTargetRect']();this['_sort']();}_sort(){const _0x1d725f=Array['from'](this)['sort']((_0x363a53,_0x59f909)=>Zt(_0x363a53['view']['targetRect'],_0x59f909['view']['targetRect']));for(let _0x2393f9=_0x1d725f['length']-0x1;_0x2393f9>0x0;_0x2393f9--){const _0x244e30=_0x1d725f[_0x2393f9];_0x2393f9!==this['getIndex'](_0x244e30)&&(this['remove'](_0x244e30),this['add'](_0x244e30));}}_getOrderInContent(_0x11f695){let _0x4957c4=0x0;if(!_0x11f695)return this['length'];for(const _0x5c465c of this){const _0x193c5c=_0x5c465c['view']['targetRect'];if(_0x193c5c){if(Zt(_0x11f695,_0x193c5c)<0x0)return _0x4957c4;_0x4957c4++;}}return _0x4957c4;}_areCachedRectsStale(){const _0x273ca2=this['get'](0x0);if(!_0x273ca2)return!0x1;const _0x3f80b7=_0x273ca2['view']['targetRect'],_0x30c59f=_0x273ca2['targetRect'];return!(!_0x3f80b7||!_0x30c59f)&&(_0x3f80b7['top']!==_0x30c59f['top']||_0x3f80b7['left']!==_0x30c59f['left']);}};function Qt({source:_0x59f035,target:_0x5bb0f3,filter:_0x508ac7}){for(const _0x5a1f58 of _0x59f035)_0x508ac7(_0x5a1f58)&&_0x5bb0f3['add'](_0x5a1f58);_0x5bb0f3['listenTo'](_0x59f035,'add',(_0x2c23ba,_0x39c0a3)=>{_0x508ac7(_0x39c0a3)&&_0x5bb0f3['add'](_0x39c0a3);}),_0x5bb0f3['listenTo'](_0x59f035,'remove',(_0x4653fe,_0x45f2f6)=>{_0x5bb0f3['has'](_0x45f2f6)&&_0x5bb0f3['remove'](_0x45f2f6);});}function Zt(_0x288449,_0x515904){if(null===_0x288449&&null===_0x515904)return 0x0;if(null===_0x288449)return-0x1;if(null===_0x515904)return 0x1;const _0x450b16=_0x288449['top']-_0x515904['top'];return 0x0==_0x450b16?_0x288449['left']-_0x515904['left']:_0x450b16;}var ti=class extends _0xe32c07{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ca6c9){if(super(_0x2ca6c9),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2ca6c9 instanceof _0x458c52){const _0x30f70b=_0x2ca6c9['locale'];_0x2ca6c9['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4f3a64){this['collection']['add'](_0x4f3a64);}['remove'](_0x531b9c){this['collection']['remove'](_0x531b9c),_0x531b9c['destroy']();}refreshVisibility(){for(const _0x42d96a of this['collection'])_0x42d96a['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x3e70cf){return this['collection']['getByInnerView'](_0x3e70cf);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x29f870 of this['collection'])_0x29f870['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x51d9e3){this['fire']('_activateAnnotation',_0x51d9e3);}createAnnotation(_0x6e1a62){return new $t(_0x6e1a62);}createAnnotationView(_0x191de1,_0x1e5a83){return new qt(_0x191de1,_0x1e5a83);}_addActiveAnnotation(_0x3936d2){const _0x585191=new Set(this['activeAnnotations']);_0x585191['add'](_0x3936d2),this['activeAnnotations']=_0x585191;}_removeActiveAnnotation(_0x5839fc){const _0x3a6649=new Set(this['activeAnnotations']);_0x3a6649['delete'](_0x5839fc),this['activeAnnotations']=_0x3a6649;}_bindAnnotationsToVisibleAnnotations(){const _0x2d8880=this['collection'],_0x570f44=this['_visibleAnnotations'];function _0x435994(_0x59fe79){const _0x2eabf7=_0x59fe79['source'];_0x2eabf7['isVisible']&&!_0x570f44['has'](_0x2eabf7)?_0x570f44['add'](_0x2eabf7):!_0x2eabf7['isVisible']&&_0x570f44['has'](_0x2eabf7)&&_0x570f44['remove'](_0x2eabf7),_0x2eabf7['view']['focusTracker']['remove'](_0x2eabf7['view']['element']),_0x2eabf7['view']['focusTracker']['add'](_0x2eabf7['view']['element']);}this['listenTo'](_0x2d8880,'add',(_0x55f14f,_0x52a73d)=>{_0x52a73d['isVisible']&&_0x570f44['add'](_0x52a73d),this['listenTo'](_0x52a73d,'change:isVisible',_0x435994);}),this['listenTo'](_0x2d8880,'remove',(_0x25ceab,_0x2664dc)=>{_0x570f44['has'](_0x2664dc)&&_0x570f44['remove'](_0x2664dc),this['stopListening'](_0x2664dc,'change:isVisible',_0x435994);});}_setupEnterAnnotationKeystroke(){const _0x534a67=_0x1eceb5=>{_0x1eceb5['on']('ready',()=>{_0x1eceb5['keystrokes']['set'](_0x14d518,(_0x2ef573,_0x191edb)=>{const _0x1da2d5=_0x9ba8a7(this['activeAnnotations']['values']());_0x1da2d5&&(_0x1da2d5['view']['focus'](),_0x191edb());});});};this['context']instanceof _0x458c52?_0x534a67(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x277f26,_0x164b20)=>{_0x534a67(_0x164b20);});}_setupEscapeAnnotationHandling(){const _0x541f3a=_0xcc5e4f=>{const _0x122230=_0xcc5e4f['source'],_0xc77d7e=[];let _0x251779;if(Array['isArray'](_0x122230['target'])){_0x251779=_0x122230['target'][0x0],this['context']instanceof _0x458c52?_0xc77d7e['push'](this['context']):this['context']['editors']&&_0xc77d7e['push'](...this['context']['editors']);for(const _0x5e0ea6 of _0xc77d7e)for(const _0x448f58 of _0x5e0ea6['editing']['view']['domRoots']['values']())if(_0x448f58['contains'](_0x251779))return void _0x5e0ea6['editing']['view']['focus']();_0x251779['focus']();}};this['listenTo'](this['collection'],'add',(_0x1dfe59,_0x38f8fd)=>{this['listenTo'](_0x38f8fd,'escape',_0x541f3a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x133ec9,_0x4c4452)=>{this['stopListening'](_0x4c4452,'escape',_0x541f3a);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x1bcd46(),ni=/* #__PURE__ -- @preserve */
31
- _0x1bcd46();var oi=class extends _0xe32c07{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x24dddb,_0x23b29b];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24f841){super(_0x24f841),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x564a18=this['context']['config'];_0x564a18['define']('comments.maxCommentsWhenCollapsed',0x2),_0x564a18['define']('comments.maxThreadTotalWeight',0x1f4),_0x564a18['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x564a18['define']('comments.CommentThreadView',Ut),_0x564a18['define']('comments.CommentView',Yt),_0x564a18['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x176a8f=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5cf516,_0x51f02e)=>this['_addCommentThread'](_0x51f02e)),this['on']('submitCommentThread',(_0x2457f1,_0x3b0c18)=>this['_submitCommentThread'](_0x3b0c18)),this['on']('resolveCommentThread',(_0x5d20ec,_0x1965d9)=>this['_resolveCommentThread'](_0x1965d9)),this['on']('resolveCommentThread',(_0x1969e3,_0x392f13)=>this['_updateActiveAnnotation'](_0x392f13),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x55a40c,_0x39a68f)=>this['_reopenCommentThread'](_0x39a68f)),this['on']('reopenCommentThread',(_0x4da64a,_0x4e050a)=>this['_updateActiveAnnotation'](_0x4e050a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x300f2b,_0x3fff61)=>this['_removeCommentThread'](_0x3fff61)),this['on']('updateCommentThread',(_0x2e3562,_0x37b2f7)=>this['_updateCommentThread'](_0x37b2f7)),this['on']('updateCommentThread',(_0x519269,_0x4a34b6)=>this['_updateActiveAnnotation'](_0x4a34b6),{'priority':'lowest'}),this['on']('addComment',(_0x336d0d,_0x4a13e6)=>this['_addComment'](_0x4a13e6)),this['on']('updateComment',(_0x1313ce,_0x595d14)=>this['_updateComment'](_0x595d14)),this['on']('removeComment',(_0xe3b55f,_0x3bb5ce)=>this['_removeComment'](_0x3bb5ce)),this['on']('addComment',(_0x4967e9,{threadId:_0x2b913b,isFromAdapter:_0x5a0894})=>{if(_0x5a0894)return;const _0x154add=this['getCommentThread'](_0x2b913b),_0x52b2f0=_0x154add&&this['_threadToController']['get'](_0x154add);_0x52b2f0&&_0x52b2f0['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x176a8f,'change:activeAnnotations',(_0x1b31fe,_0x5f7317,_0x4dc2d1)=>{const _0x5cf8ad=Array['from'](_0x4dc2d1)['map'](_0x22a773=>this['_viewToController']['get'](_0x22a773['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5cf8ad?_0x5cf8ad['model']:null;});}set adapter(_0x1c54f5){if(this['_adapter'])throw new _0x3fd207('commentsrepository-adapter-already-set');this['_adapter']=_0x1c54f5;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x2c2036=ii,threadId:_0x14c980=_0x185ea0(),comments:_0xf89ebc=[],unlinkedAt:_0x5c9bb5=null,resolvedAt:_0x2df93b=null,resolvedBy:_0x82ebe4=null,target:_0x2e45ee=null,context:_0x346d68=null,attributes:_0x185448={},isResolvable:_0x20967c=!0x0,isSubmitted:_0x55fa9b=!0x1,isFromAdapter:_0x3b8a44=!0x1}={}){return this['fire'](ai('addCommentThread',_0x2c2036),{'channelId':_0x2c2036,'threadId':_0x14c980,'comments':_0xf89ebc,'unlinkedAt':_0x5c9bb5,'resolvedAt':_0x2df93b,'resolvedBy':_0x82ebe4,'target':_0x2e45ee,'context':_0x346d68,'attributes':_0x185448,'isFromAdapter':_0x3b8a44,'isResolvable':_0x20967c,'isSubmitted':_0x55fa9b}),this['getCommentThread'](_0x14c980);}openNewCommentThread({channelId:_0x188ebc=ii,threadId:_0x41dea7=_0x185ea0(),target:_0x3b933f,context:_0x346434=null,isResolvable:_0xc1d47b=!0x0}){if(this['_readOnlyChannels']['has'](_0x188ebc)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3b933f)throw new _0x3fd207('commentsrepository-missing-target');const _0x51baf5=this['addCommentThread']({'channelId':_0x188ebc,'threadId':_0x41dea7,'target':_0x3b933f,'context':_0x346434,'isResolvable':_0xc1d47b});if(!_0x51baf5)return null;const _0x5eb87a=this['_threadToController']['get'](_0x51baf5),_0x56fcfb=_0x5eb87a['view']['commentThreadInputView']['commentInputView'],_0x2a4a3e=this['context']['plugins']['get'](ti),_0x55ed11=_0x2a4a3e['getByInnerView'](_0x5eb87a['view']);return _0x2a4a3e['activate'](_0x55ed11),_0x56fcfb['once']('editorReady',()=>_0x56fcfb['focus']()),_0x51baf5;}hasCommentThread(_0x192410){if('string'!=typeof _0x192410)throw new _0x3fd207('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x192410);}updateCommentThread({channelId:_0x524708=ii,threadId:_0x4cabfb,context:_0x52b679,unlinkedAt:_0x1ce96,attributes:_0x49fb0f,isFromAdapter:_0x297396=!0x1}){return this['fire'](ai('updateCommentThread',_0x524708),{'channelId':_0x524708,'threadId':_0x4cabfb,'context':_0x52b679,'unlinkedAt':_0x1ce96,'attributes':_0x49fb0f,'isFromAdapter':_0x297396}),this['getCommentThread'](_0x4cabfb);}getCommentThread(_0x6118a1){if('string'!=typeof _0x6118a1)throw new _0x3fd207('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x6118a1);}fetchCommentThread({channelId:_0x34f961,threadId:_0x4a2a7c}={}){const _0x589afe=this['getCommentThread'](_0x4a2a7c);if(_0x589afe)return Promise['resolve'](_0x589afe);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3fd207('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x34f961,'threadId':_0x4a2a7c})['then'](_0x1fca77=>this['hasCommentThread'](_0x4a2a7c)?this['getCommentThread'](_0x4a2a7c):_0x1fca77?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x34f961},_0x1fca77)):void 0x0)['catch'](_0xdfc986=>{throw console['error'](_0xdfc986),new _0x3fd207('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x3f21da,skipNotAttached:_0x37cb36=!0x1,skipEmpty:_0x31e879=!0x1,toJSON:_0x3462fb=!0x1}={}){const _0x2d8635=[];for(const _0x15e613 of this['_threads']['values']())_0x3f21da&&_0x15e613['channelId']!==_0x3f21da||_0x37cb36&&!_0x15e613['isAttached']||_0x31e879&&0x0===_0x15e613['length']||_0x2d8635['push'](_0x15e613);return _0x3462fb?_0x2d8635['map'](_0xb08269=>_0xb08269['toJSON']()):_0x2d8635;}getAnnotationForCommentThread(_0x281c38){const _0x1bdea9=this['_threadToController']['get'](_0x281c38);return _0x1bdea9&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x1bdea9['view'])||null;}getCommentThreadForAnnotation(_0x57d463){const _0x3cee23=this['_viewToController']['get'](_0x57d463['innerView']);return _0x3cee23?_0x3cee23['model']:null;}setActiveCommentThread(_0x110b1d){const _0x2fc8fd=this['context']['plugins']['get'](ti);if(!_0x110b1d)return void(this['activeCommentThread']&&_0x2fc8fd['deactivateAll']());const _0x16213f=this['getCommentThread'](_0x110b1d);if(!_0x16213f)throw new _0x3fd207('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x110b1d});if(!this['_threadToController']['has'](_0x16213f))throw new _0x3fd207('commentsrepository-active-not-attached',null,{'threadId':_0x110b1d});const _0x5468c8=_0x2fc8fd['getByInnerView'](this['_threadToController']['get'](_0x16213f)['view']);_0x2fc8fd['activate'](_0x5468c8);}switchReadOnly(_0x3234a8,_0x59b05e){_0x3234a8?this['_readOnlyChannels']['add'](_0x59b05e):this['_readOnlyChannels']['delete'](_0x59b05e),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5a846e){return this['_readOnlyChannels']['has'](_0x5a846e)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x1fbf51,_0x4f284b){return new bt(_0x1fbf51,_0x4f284b);}setPermissions(_0x5de380,_0x39cd73=ii){this['_permissions']['set'](_0x39cd73,_0x5de380),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x34ace2=ii){return this['_permissions']['has'](_0x34ace2)?this['_permissions']['get'](_0x34ace2):ei;}_addCommentThread({channelId:_0x3aab75,threadId:_0x310a39,comments:_0x4270e7,unlinkedAt:_0x1a1e3e,resolvedAt:_0x192fa6,resolvedBy:_0x4ecaf4,target:_0x21d475,context:_0x3e37ee,attributes:_0x43b738,isFromAdapter:_0x30d718,isResolvable:_0x5f421a,isSubmitted:_0x867fd1}){if('string'!=typeof _0x310a39)throw new _0x3fd207('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x310a39});if(this['hasCommentThread'](_0x310a39))throw new _0x3fd207('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x310a39});const _0x4911ae=new ri(this,{'channelId':_0x3aab75,'id':_0x310a39,'context':_0x3e37ee,'attributes':_0x43b738,'unlinkedAt':_0x1a1e3e,'resolvedAt':_0x192fa6,'resolvedBy':_0x4ecaf4?this['context']['plugins']['get'](_0x23b29b)['getUser'](_0x4ecaf4):null,'isResolvable':_0x5f421a,'isSubmitted':_0x867fd1||_0x30d718});this['_threads']['set'](_0x310a39,_0x4911ae);for(const _0xdbe1cd of _0x4270e7)_0x4911ae['_add'](this['_createNewComment']({'threadId':_0x310a39,..._0xdbe1cd}));return _0x21d475&&_0x4911ae['attachTo'](_0x21d475),_0x30d718||!_0x4911ae['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3aab75,'threadId':_0x310a39});}_submitCommentThread({channelId:_0x2d5a17,threadId:_0x3c104a}){if(!this['hasCommentThread'](_0x3c104a))throw new _0x3fd207('commentsrepository-missing-comment-thread',this);const _0x50807e=this['getCommentThread'](_0x3c104a);if(_0x50807e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x42355b,comments:_0x3b7a66,resolvedAt:_0x195599,resolvedBy:_0x53c89f,context:_0xb5b81f,attributes:_0x149621}=_0x50807e,_0x1f9467=this['context']['plugins']['get']('PendingActions'),_0x41f951=_0x1f9467['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2d5a17,'threadId':_0x42355b,'comments':_0x3b7a66['map'](_0x4aefdd=>_0x4aefdd['toJSON']()),'resolvedAt':_0x195599,'resolvedBy':_0x53c89f?_0x53c89f['id']:_0x53c89f,'context':_0xb5b81f,'attributes':_0x149621})['then'](({comments:_0x56b1db})=>{_0x1f9467['remove'](_0x41f951);for(const _0x2bab1d of _0x56b1db)this['_updateComment']({'channelId':_0x2d5a17,'threadId':_0x3c104a,'commentId':_0x2bab1d['commentId'],'createdAt':_0x2bab1d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2b0646=>{throw console['error'](_0x2b0646),new _0x3fd207('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x5b5c43,target:_0x532854}){const _0x219eb4=this['getCommentThread'](_0x5b5c43);if(!_0x219eb4)throw new _0x3fd207('commentsrepository-attach-missing-comment-thread',this);const _0x271389=this['context']['plugins']['get']('PendingActions'),_0x488cac=this['context']['plugins']['get'](ti),_0x177b14=this['_createCommentThreadView'](_0x219eb4),_0x36dc61=new bt(_0x219eb4,_0x177b14);let _0x606565=null;_0x177b14['on']('change:isDirty',(_0x1cec8c,_0x3cf6b3,_0x5d14cc)=>{_0x5d14cc?_0x606565=_0x271389['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x606565&&(_0x271389['remove'](_0x606565),_0x606565=null);}),this['_threadToController']['set'](_0x219eb4,_0x36dc61),this['_viewToController']['set'](_0x177b14,_0x36dc61);const _0x35f3f9=new qt(this['context']['locale'],_0x177b14);_0x35f3f9['bind']('length')['to'](_0x177b14),_0x35f3f9['bind']('isDirty')['to'](_0x177b14,'isDirty',_0x177b14,'length',(_0x1268eb,_0x167e10)=>_0x1268eb||!_0x167e10),_0x35f3f9['bind']('isActive')['to'](_0x177b14),_0x35f3f9['type']='comment';const _0x5b363e=new $t({'view':_0x35f3f9,'target':_0x532854,'type':'comment','isVisible':!_0x219eb4['archivedAt']&&!!('function'==typeof _0x532854?_0x532854():_0x532854)});return _0x177b14['on']('escape',()=>{_0x5b363e['fire']('escape');}),this['_bindAnnotationToEditors'](_0x177b14,_0x5b363e),_0x488cac['add'](_0x5b363e),_0x5b363e;}_bindAnnotationToEditors(_0x2812b0,_0x1dc1ba){this['listenTo'](_0x2812b0,'editorReady',(_0x5757f7,_0x1194ab)=>{const _0x5a83f4=_0x1194ab['ui']['view']['body']['bodyCollectionContainer'];_0x1dc1ba['focusableElements']['add'](_0x5a83f4),this['context']instanceof _0x458c52&&this['context']['ui']['focusTracker']['add'](_0x5a83f4);},{'priority':'highest'}),this['listenTo'](_0x2812b0,'editorDestroyed',(_0x216861,_0x46ebc3)=>{const _0x4b6a29=_0x46ebc3['ui']['view']['body']['bodyCollectionContainer'];_0x1dc1ba['focusableElements']['has'](_0x4b6a29)&&_0x1dc1ba['focusableElements']['remove'](_0x4b6a29),this['context']instanceof _0x458c52&&this['context']['ui']['focusTracker']['remove'](_0x4b6a29);});}_unbindEditors(_0x49c6cc){this['stopListening'](_0x49c6cc,'editorReady'),this['stopListening'](_0x49c6cc,'editorDestroyed');}_createCommentThreadView(_0x4efad7){const _0x447f46=this['context']['plugins']['get'](_0x23b29b),{config:_0xfd0b87,locale:_0x40de55}=this['context'],_0xdf4443=_0x110226(_0xfd0b87['get']('locale'),_0x40de55);return new(0x0,(_0xfd0b87['get']('comments'))['CommentThreadView'])(_0x40de55,_0x4efad7,_0x447f46['me'],{'editorConfig':{..._0xfd0b87['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xfd0b87['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xfd0b87['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xfd0b87['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xfd0b87['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xdf4443,'CommentView':_0xfd0b87['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x814e34,channelId:_0x25bb10,resolvedAt:_0x3edda6,resolvedBy:_0x1e1018,isFromAdapter:_0xb1e893}){if(!this['hasCommentThread'](_0x814e34))throw new _0x3fd207('commentsrepository-missing-comment-thread',null,{'threadId':_0x814e34});const _0x2382f8=this['getCommentThread'](_0x814e34);if(_0x2382f8['isResolved'])throw new _0x3fd207('commentsrepository-resolved-comment-thread',null,{'threadId':_0x814e34});const _0x4b5aac=this['context']['plugins']['get'](_0x23b29b);if(_0x2382f8['resolvedBy']=_0x4b5aac['getUser'](_0x1e1018),_0x2382f8['resolvedAt']=_0x3edda6,_0xb1e893||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4a29f9=this['context']['plugins']['get']('PendingActions'),_0x1c06c9=_0x4a29f9['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x25bb10,'threadId':_0x814e34})['then'](({resolvedAt:_0x38f791,resolvedBy:_0x1bd16d})=>{_0x4a29f9['remove'](_0x1c06c9),_0x2382f8['resolvedBy']['id']!==_0x1bd16d&&(_0x2382f8['resolvedBy']=_0x4b5aac['getUser'](_0x1bd16d)),_0x2382f8['resolvedAt']=_0x38f791;})['catch'](_0x436f28=>{throw console['error'](_0x436f28),new _0x3fd207('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x389cd5,channelId:_0x5a9258,isFromAdapter:_0xc1af68}){if(!this['hasCommentThread'](_0x389cd5))throw new _0x3fd207('commentsrepository-missing-comment-thread',null,{'threadId':_0x389cd5});const _0x51f852=this['getCommentThread'](_0x389cd5);if(!_0x51f852['isResolved'])throw new _0x3fd207('commentsrepository-reopen-comment-thread',null,{'threadId':_0x389cd5});if(_0x51f852['resolvedBy']=null,_0x51f852['resolvedAt']=null,_0xc1af68||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x34457b=this['context']['plugins']['get']('PendingActions'),_0xf2167b=_0x34457b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5a9258,'threadId':_0x389cd5})['then'](()=>_0x34457b['remove'](_0xf2167b))['catch'](_0xb66d2=>{throw console['error'](_0xb66d2),new _0x3fd207('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x4ccfe7,isFromAdapter:_0x11e8b2}){const _0x280e4e=this['getCommentThread'](_0x4ccfe7);if(!_0x280e4e)throw new _0x3fd207('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4ccfe7),this['_threads']['delete'](_0x4ccfe7),!_0x280e4e['isSubmitted']||_0x11e8b2||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4b5438=this['context']['plugins']['get']('PendingActions'),{channelId:_0x231b06}=_0x280e4e,_0x3356bc=_0x4b5438['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x231b06,'threadId':_0x4ccfe7})['then'](()=>_0x4b5438['remove'](_0x3356bc))['catch'](_0x5290b8=>{throw console['error'](_0x5290b8),new _0x3fd207('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x373f7b,unlinkedAt:_0xdcbaff,context:_0x28f5eb,attributes:_0x3fe3c4,isFromAdapter:_0x52b3d2}){if('string'!=typeof _0x373f7b)throw new _0x3fd207('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x373f7b});if(!this['hasCommentThread'](_0x373f7b))throw new _0x3fd207('commentsrepository-missing-comment-thread',null,{'threadId':_0x373f7b});const _0x268a39=this['getCommentThread'](_0x373f7b);let _0x520cc6=!0x1;if(void 0x0!==_0x28f5eb&&_0x268a39['context']!==_0x28f5eb&&(_0x268a39['context']=_0x28f5eb,_0x520cc6=!0x0),void 0x0!==_0xdcbaff&&_0x268a39['unlinkedAt']!==_0xdcbaff&&(_0x268a39['unlinkedAt']=_0xdcbaff,_0x520cc6=!0x0),_0x3fe3c4&&!_0x11ae2a(_0x3fe3c4,_0x268a39['attributes'])&&(_0x268a39['attributes']=_0x3fe3c4,_0x520cc6=!0x0),!_0x520cc6)return Promise['resolve']();if(!_0x268a39['isSubmitted']||_0x52b3d2||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1a4a9a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5304b1}=_0x268a39,_0x3a0b2a=_0x1a4a9a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5304b1,'threadId':_0x373f7b,'context':_0x28f5eb,'unlinkedAt':_0xdcbaff,'attributes':_0x3fe3c4})['then'](()=>_0x1a4a9a['remove'](_0x3a0b2a))['catch'](_0x182242=>{throw console['error'](_0x182242),new _0x3fd207('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0xbac409){const _0xf0f7c7=this['context']['plugins']['get'](ti),_0x90f696=this['getCommentThread'](_0xbac409);if(_0x90f696['_isAttached']=!0x1,this['_threadToController']['has'](_0x90f696)){const _0x23a490=this['_threadToController']['get'](_0x90f696),_0x38c54d=_0x23a490['view'],_0x4469c7=_0xf0f7c7['getByInnerView'](_0x38c54d);this['_threadToController']['delete'](_0x90f696),this['_viewToController']['delete'](_0x38c54d),_0x4469c7&&_0xf0f7c7['remove'](_0x4469c7),_0x23a490['destroy'](),_0x38c54d['destroy']()['then'](()=>{this['_unbindEditors'](_0x38c54d);});}}_updateActiveAnnotation({threadId:_0x269509,resolvedAt:_0x50f3ea,unlinkedAt:_0x52a0a8}){const _0x5668ea=!!_0x50f3ea,_0x5f355f=this['context']['plugins']['get'](ti),_0x14335b=this['getCommentThread'](_0x269509);if(this['_threadToController']['has'](_0x14335b)){const _0x4a67a5=this['_threadToController']['get'](_0x14335b)['view'],_0x14ad4b=_0x5f355f['getByInnerView'](_0x4a67a5);_0x14ad4b&&(_0x5668ea&&_0x5f355f['_removeActiveAnnotation'](_0x14ad4b),_0x52a0a8?_0x14ad4b['isVisible']=!0x1:_0x14ad4b['refreshVisibility']());}}_getExternalAuthor(_0x5338c9){const _0x834aa2=this['context']['plugins']['get'](_0x23b29b),_0x4af14c=_0x4543c7('external:'+_0x5338c9),_0x4cb06d=_0x834aa2['getUser'](_0x4af14c);return _0x4cb06d||_0x834aa2['addUser']({'id':_0x4af14c,'name':_0x5338c9});}_createNewComment({threadId:_0x40e81e,commentId:_0x267ded=_0x185ea0(),content:_0x4d7c4e,authorId:_0x1c5013,createdAt:_0x146aa5,attributes:_0x2a1734}){if('string'!=typeof _0x267ded)throw new _0x3fd207('commentsrepository-invalid-commentid');if('string'!=typeof _0x1c5013)throw new _0x3fd207('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4d7c4e||!_0x4d7c4e['trim']())throw new _0x3fd207('commentsrepository-invalid-comment-content');const _0x4a1ebe=this['context']['plugins']['get'](_0x23b29b)['getUser'](_0x1c5013);if(!_0x4a1ebe)throw new _0x3fd207('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1c5013});let _0x280284=null,_0x291c17=_0x146aa5;return _0x2a1734?.['@external']&&(_0x280284=this['_getExternalAuthor'](_0x2a1734['@external']['authorName']),_0x291c17=new Date(_0x2a1734['@external']['createdAt'])),new hi(this,{'threadId':_0x40e81e,'id':_0x267ded,'author':_0x280284||_0x4a1ebe,'creator':_0x4a1ebe,'content':_0x4d7c4e,'createdAt':_0x146aa5,'authoredAt':_0x291c17,'attributes':_0x2a1734});}_addComment(_0x1fef8d){let {threadId:_0x6c425,content:_0x40a494,attributes:_0x130cb7,isFromAdapter:_0x52fa25}=_0x1fef8d;const _0x360d60=this['getCommentThread'](_0x1fef8d['threadId']);if(!_0x360d60)throw new _0x3fd207('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x40f132=this['_createNewComment'](_0x1fef8d),{id:_0x6ed61f}=_0x40f132;if(_0x360d60['_add'](_0x40f132),_0x52fa25||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x360d60['isSubmitted'])return Promise['resolve']();const _0x40a85a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5a64b5}=_0x360d60,_0x438ac9=_0x40a85a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x130cb7||(_0x130cb7={}),this['adapter']['addComment']({'channelId':_0x5a64b5,'threadId':_0x6c425,'commentId':_0x6ed61f,'content':_0x40a494,'attributes':_0x130cb7})['then'](_0x5e1a4f=>{_0x40a85a['remove'](_0x438ac9),_0x5e1a4f&&this['_updateComment']({'channelId':_0x5a64b5,'threadId':_0x6c425,'commentId':_0x6ed61f,'createdAt':_0x5e1a4f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5d16cc=>{throw console['error'](_0x5d16cc),new _0x3fd207('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x40d683,commentId:_0x5c5086,content:_0x1d070d,createdAt:_0x45629c,attributes:_0x108d43,isFromAdapter:_0x45b711}){if(void 0x0!==_0x1d070d&&('string'!=typeof _0x1d070d||!_0x1d070d['trim']()['length']))throw new _0x3fd207('commentsrepository-update-comment-invalid-content');const _0x16e78c=this['getCommentThread'](_0x40d683),_0xc253a1=_0x16e78c['getComment'](_0x5c5086);if(!_0xc253a1)throw new _0x3fd207('commentsrepository-update-missing-comment',this);let _0x1b7a9e=!0x1;if(_0x1d070d&&_0x1d070d!==_0xc253a1['content']&&(_0xc253a1['isEditable']||_0x45b711)&&(_0xc253a1['content']=_0x1d070d,_0x1b7a9e=!0x0),_0x45629c&&_0x45629c!==_0xc253a1['createdAt']&&(_0xc253a1['createdAt']=_0x45629c,_0xc253a1['isExternal']||(_0xc253a1['authoredAt']=_0x45629c),_0x1b7a9e=!0x0),_0x108d43&&!_0x11ae2a(_0x108d43,_0xc253a1['attributes'])&&(_0xc253a1['attributes']=_0x108d43,_0x1b7a9e=!0x0),!_0x1b7a9e)return Promise['resolve']();if(_0x16e78c['fire']('commentUpdated'),_0x45b711||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x3170cf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x254724}=this['getCommentThread'](_0xc253a1['threadId']),_0xabaaa9=_0x3170cf['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x254724,'threadId':_0x40d683,'commentId':_0x5c5086,'content':_0x1d070d,'attributes':_0x108d43})['then'](()=>_0x3170cf['remove'](_0xabaaa9))['catch'](_0x2a3823=>{throw console['error'](_0x2a3823),new _0x3fd207('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x4c8005,commentId:_0x57d4fa,isFromAdapter:_0x1c101f}){const _0x47f5a2=this['getCommentThread'](_0x4c8005),_0x249b2b=_0x47f5a2['getComment'](_0x57d4fa);if(!_0x249b2b)throw new _0x3fd207('commentsrepository-remove-missing-comment',this);if(_0x47f5a2['_remove'](_0x249b2b),_0x1c101f||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x297f83=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4f8c9c}=_0x47f5a2,_0x177a9d=_0x297f83['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4f8c9c,'threadId':_0x4c8005,'commentId':_0x57d4fa})['then'](()=>_0x297f83['remove'](_0x177a9d))['catch'](_0x2a85ec=>{throw console['error'](_0x2a85ec),new _0x3fd207('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x35948c,_0x51dee6){super();const _0x3fa95a=_0x51dee6['isResolvable'];this['channelId']=_0x51dee6['channelId'],this['id']=_0x51dee6['id'],this['comments']=new _0x5d687e(),this['_repository']=_0x35948c,this['_isAttached']=!0x1,this['_isSubmitted']=_0x51dee6['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x35948c,'_permissions',_0x35948c,'_readOnlyChannels',()=>_0x35948c['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x35948c,'_permissions',()=>_0x35948c['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x35948c,'_permissions',()=>{const _0x33346e=_0x35948c['getPermissions'](this['channelId']);return _0x33346e['write']||_0x33346e['admin'];}),this['bind']('isResolvable')['to'](_0x35948c,'_permissions',()=>_0x3fa95a&&_0x35948c['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x51dee6['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x140768,_0x586012)=>_0x140768?_0x586012?_0x140768<_0x586012?_0x140768:_0x586012:_0x140768:_0x586012),this['set']('unlinkedAt',_0x51dee6['unlinkedAt']||null),this['set']('resolvedAt',_0x51dee6['resolvedAt']||null),this['set']('resolvedBy',_0x51dee6['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x332fb8=>!!_0x332fb8),this['set']('attributes',_0x51dee6['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x3685f1,_0x56e507)=>_0x3685f1+_0x56e507['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x307926,id:_0x3dab8f}=this;this['_repository']['fire'](ai('submitCommentThread',_0x307926),{'channelId':_0x307926,'threadId':_0x3dab8f});}setUnlinkedAt(_0x2141d5){this['_update']({'unlinkedAt':_0x2141d5});}['resolve']({resolvedAt:_0x14186e=new Date(),resolvedBy:_0x489692='',isFromAdapter:_0x26b9b5=!0x1}={}){const _0x403a54=this['_repository']['context']['plugins']['get'](_0x23b29b)['me'],{channelId:_0x12aef3,id:_0x118360}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x12aef3),{'channelId':_0x12aef3,'threadId':_0x118360,'resolvedAt':_0x14186e,'resolvedBy':_0x489692||_0x403a54['id'],'isFromAdapter':_0x26b9b5});}['reopen']({isFromAdapter:_0x2104b8=!0x1}={}){const {channelId:_0x2c28df,id:_0x82d56b}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x2c28df),{'channelId':_0x2c28df,'threadId':_0x82d56b,'isFromAdapter':_0x2104b8});}setContext(_0x4e93ea){this['context']||this['_update']({'context':_0x4e93ea});}setAttribute(_0x50171c,_0x5a95fd){const _0x1b4328=_0x2dad8a(this['attributes']);_0x200648(_0x1b4328,_0x50171c,_0x5a95fd),this['_update']({'attributes':_0x1b4328});}removeAttribute(_0x26ac3b){const _0x4409c3=_0x2dad8a(this['attributes']);_0x4c0a55(_0x4409c3,_0x26ac3b),this['_update']({'attributes':_0x4409c3});}['remove']({isFromAdapter:_0xbf09e0=!0x1}={}){const {channelId:_0x44c97d,id:_0x259cca}=this;this['_repository']['fire'](ai('removeCommentThread',_0x44c97d),{'channelId':_0x44c97d,'threadId':_0x259cca,'isFromAdapter':_0xbf09e0});}attachTo(_0xc60275){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xc60275});}addComment(_0x2020b5){const {channelId:_0xcfd44c,id:_0x43907d}=this;this['_repository']['fire'](ai('addComment',_0xcfd44c,_0x43907d),Object['assign']({'channelId':_0xcfd44c,'threadId':_0x43907d},_0x2020b5));}getComment(_0x42d17c){if('string'!=typeof _0x42d17c)throw new _0x3fd207('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x42d17c});return this['comments']['get'](_0x42d17c);}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'](_0x45b668=>_0x45b668['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2f3451){return this['listenTo'](_0x2f3451,'change:authoredAt',()=>{const _0x5aec04=this['_findOptimalIndex'](_0x2f3451),_0x3d13d6=this['comments'];_0x5aec04-0x1!=_0x3d13d6['getIndex'](_0x2f3451)&&_0x5aec04+0x1!=_0x3d13d6['getIndex'](_0x2f3451)&&(this['_remove'](_0x2f3451),this['_add'](_0x2f3451));}),this['comments']['add'](_0x2f3451,this['_findOptimalIndex'](_0x2f3451));}_update(_0x3a74dd){const {channelId:_0x3fd2a5,id:_0x507dd9}=this;this['_repository']['fire'](ai('updateCommentThread',_0x3fd2a5),{..._0x3a74dd,'channelId':_0x3fd2a5,'threadId':_0x507dd9});}['_remove'](_0xf86e44){return this['stopListening'](_0xf86e44),_0xf86e44['destroy'](),this['comments']['remove'](_0xf86e44);}_findOptimalIndex(_0x27ff23){const _0x47a178=this['comments']['find'](_0x19b64d=>new Date(_0x19b64d['authoredAt'])['getTime']()>new Date(_0x27ff23['authoredAt'])['getTime']());return _0x47a178?this['comments']['getIndex'](_0x47a178):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x31e091,_0xc27955){super();const _0x5f21ea=_0x31e091['context']['plugins']['get'](_0x23b29b)['me'],_0x3b6237=_0x31e091['getCommentThread'](_0xc27955['threadId']),_0x53d864=0x0===_0x3b6237['comments']['length'],_0x2ec38e=_0x5f21ea===_0xc27955['author'];this['id']=_0xc27955['id'],this['threadId']=_0xc27955['threadId'],this['author']=_0xc27955['author'],this['creator']=_0xc27955['creator'],this['set']('content',_0xc27955['content']),this['createdAt']=_0xc27955['createdAt']||new Date(),this['set']('authoredAt',_0xc27955['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3b6237,'resolvedAt'),this['set']('attributes',_0xc27955['attributes']||{}),this['bind']('isEditable')['to'](_0x31e091,'_permissions',()=>{const _0x1f5176=_0x31e091['getPermissions'](_0x3b6237['channelId'])['write'],_0x172c3a=_0x31e091['getPermissions'](_0x3b6237['channelId'])['modifyAll'];return _0x2ec38e&&_0x1f5176||!_0x2ec38e&&_0x172c3a;}),this['bind']('isRemovable')['to'](_0x3b6237,'isRemovable',_0x31e091,'_permissions',_0x2775a9=>{const _0x371616=_0x31e091['getPermissions'](_0x3b6237['channelId'])['write'],_0x21343f=_0x31e091['getPermissions'](_0x3b6237['channelId'])['modifyAll'];return _0x2ec38e&&_0x371616||_0x2775a9&&_0x53d864||!_0x2ec38e&&_0x21343f&&!_0x53d864;}),this['bind']('isReadOnly')['to'](_0x3b6237,'isReadOnly'),this['_repository']=_0x31e091;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x105b4a){const _0x4f989e=document['createElement']('div');return _0x4f989e['innerHTML']=_0x105b4a,_0x4f989e['textContent']['length'];}(this['content']),0xc8);}update(_0x158adb){const {threadId:_0x16e0d3,id:_0x2b0b7e}=this;if(!this['_repository']['hasCommentThread'](_0x16e0d3))throw new _0x3fd207('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5ef944}=this['_repository']['getCommentThread'](_0x16e0d3);this['_repository']['fire'](ai('updateComment',_0x5ef944,_0x16e0d3),{'channelId':_0x5ef944,'threadId':_0x16e0d3,'commentId':_0x2b0b7e,..._0x158adb});}setAttribute(_0x47c46f,_0xb93e33){const _0x108b47=_0x2dad8a(this['attributes']);_0x200648(_0x108b47,_0x47c46f,_0xb93e33),this['update']({'attributes':_0x108b47});}removeAttribute(_0x1cd5f8){const _0xe41560=_0x2dad8a(this['attributes']);_0x4c0a55(_0xe41560,_0x1cd5f8),this['update']({'attributes':_0xe41560});}['remove'](_0x551bd4={}){if(!_0x551bd4['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x60a099,id:_0x29066b}=this;if(!this['_repository']['hasCommentThread'](_0x60a099))throw new _0x3fd207('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x375ddc}=this['_repository']['getCommentThread'](_0x60a099);this['_repository']['fire'](ai('removeComment',_0x375ddc,_0x60a099),{'channelId':_0x375ddc,'threadId':_0x60a099,'commentId':_0x29066b,..._0x551bd4});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x587c82,..._0x47579a){for(const _0x51c810 of _0x47579a)void 0x0!==_0x51c810&&(_0x587c82+=':'+String(_0x51c810));return _0x587c82;}var ci=class extends _0x44703a{constructor(_0x4630f0){super(_0x4630f0),this['set']('hasContent',!0x1);}['refresh'](){const _0x5a73c2=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3e8505 of _0x5a73c2['getRanges']())if(this['_hasContent'](_0x3e8505))return void(this['hasContent']=!0x0);}execute({threadId:_0x4db5c3=_0x185ea0(),ranges:_0xdafc3e,comment:_0x5ed376}={}){const _0x2f4c48=this['editor']['model'],_0x286c5e=_0xdafc3e??Array['from'](_0x2f4c48['document']['selection']['getRanges']()),_0x145c3b=[];for(const _0x225e1c of _0x286c5e)this['_hasContent'](_0x225e1c)&&_0x145c3b['push'](this['_trimToContent'](_0x225e1c));if(!_0x145c3b['length'])throw new _0x3fd207('addcommentthreadcommand-incorrect-ranges',null);_0x5ed376&&this['_createCommentThread'](_0x4db5c3,_0x5ed376),this['_createMarkersFromRanges'](_0x4db5c3,_0x145c3b,!!_0x5ed376);}_createMarkersFromRanges(_0x525bac,_0x4405d3,_0x46246c){this['editor']['model']['change'](_0x5c6c34=>{for(const _0x143ef7 of _0x4405d3){const _0x27ddae='comment:'+_0x525bac+':'+_0x185ea0()['substr'](0x1,0x5);_0x5c6c34['addMarker'](_0x27ddae,{'range':_0x143ef7,'usingOperation':_0x46246c,'affectsData':_0x46246c});}});}_createCommentThread(_0x1d22f8,_0x15b757){const _0x1db476=this['editor']['plugins']['get']('CommentsRepository'),_0xfd9341=this['editor']['config']['get']('collaboration.channelId'),_0x32b0c2=this['editor']['plugins']['get']('Users')['me'];if(!_0x32b0c2)throw new _0x3fd207('addcommentthreadcommand-user-not-found',null);_0x1db476['addCommentThread']({'threadId':_0x1d22f8,'channelId':_0xfd9341,'comments':[{'authorId':_0x32b0c2['id'],'content':_0x15b757,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x359e3c){for(const _0x965d0f of _0x359e3c['getItems']())if(this['_itemIsContent'](_0x965d0f))return!0x0;return!0x1;}_itemIsContent(_0x586e36){return _0x586e36['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x586e36)&&!_0x586e36['is']('element','tableCell');}_trimToContent(_0x665871){const _0x2ab4c0=_0x2247be=>!this['_itemIsContent'](_0x2247be['item']),_0x598d0d=_0x665871['start']['getLastMatchingPosition'](_0x2ab4c0),_0x451b36=_0x665871['end']['getLastMatchingPosition'](_0x2ab4c0,{'direction':'backward'});return this['editor']['model']['createRange'](_0x598d0d,_0x451b36);}},di=class extends _0x12b188{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3fcfa8){super(_0x3fcfa8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x5f55cc=this['editor'],_0x20f846=_0x5f55cc['model']['document']['selection'],_0x1e06ae=_0x98290e(()=>this['refreshSelectedViews'](),0xa);_0x20f846['on']('change:range',(_0x2b8da2,_0x147523)=>{_0x147523['directChange']&&(_0x1e06ae['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5f55cc['editing']['view']['document'],'change:isFocused',(_0x5e8b45,_0x5984b,_0x5c6dac)=>{_0x5c6dac&&_0x1e06ae();}),this['listenTo'](_0x5f55cc['ui']['focusTracker'],'change:isFocused',(_0x2c4fad,_0x5982d3,_0xd21e6c)=>{_0xd21e6c||this['fire']('blur',{'isAnnotationTracked':_0x5ec8de=>this['_editorAnnotationsData']['has'](_0x5ec8de['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x56a01a){if(this['_editorAnnotations']['has'](_0x56a01a['view']))return;this['_editorAnnotations']['add'](_0x56a01a['view']),this['editor']['ui']['focusTracker']['add'](_0x56a01a['view']['element']);const _0x2fae1e=this['editor']['plugins']['get'](ti);this['listenTo'](_0x2fae1e['collection'],'remove',(_0x598f5d,_0x1ddd16)=>{this['editor']['ui']['focusTracker']['remove'](_0x1ddd16['view']['element']),this['_editorAnnotations']['delete'](_0x1ddd16['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x1745e8){if('function'!=typeof _0x1745e8)throw new _0x3fd207('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1745e8);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x4e1c28,annotations:_0x7f89db}){const _0x157743=[],_0x19ed73=this['editor']['model']['document']['selection'],_0x55dd44=Array['from'](_0x19ed73['getRanges']());for(const [_0x521776,_0xcac468]of this['_editorAnnotationsData']){const _0x171fa1=_0x51413a(_0xcac468),_0x3f8749=_0x7f89db['getByInnerView'](_0x521776);_0x171fa1&&_0x3f8749&&_0x157743['push']({'annotation':_0x3f8749,'range':_0x171fa1});}function _0x51413a(_0x454bf0){for(const _0x4f1b1b of _0x454bf0)for(const _0x4b41d7 of _0x55dd44)if(_0x4f1b1b['containsRange'](_0x4b41d7,!_0x19ed73['isCollapsed']))return _0x4f1b1b;return null;}const _0xcdcf6f=new Map(Array['from'](_0x7f89db,(_0x3d9e7c,_0x519fad)=>[_0x3d9e7c,_0x519fad]));return _0x157743['sort']((_0x46e3d2,_0x31b346)=>{const _0x3b3464=_0x46e3d2['range'],_0x2a625e=_0x31b346['range'];if(!_0x3b3464['isEqual'](_0x2a625e)){if(_0x3b3464['containsRange'](_0x2a625e,!0x0))return 0x1;if(_0x2a625e['containsRange'](_0x3b3464,!0x0))return-0x1;}return _0x46e3d2['annotation']==_0x4e1c28?-0x1:_0x31b346['annotation']==_0x4e1c28?0x1:(_0xcdcf6f['get'](_0x46e3d2['annotation'])??0x0)-(_0xcdcf6f['get'](_0x31b346['annotation'])??0x0);})['map'](_0x52c3f5=>_0x52c3f5['annotation']);}get _editorAnnotationsData(){const _0x3b409c=new Map();for(const _0x30e1bf of Array['from'](this['_dataCollectors']))for(const [_0x3b3062,_0x4d9f35]of _0x30e1bf())_0x3b409c['set'](_0x3b3062,_0x4d9f35);return _0x3b409c;}},li=class extends _0x12b188{afterInit(){const _0x34d1c0=this['editor'];_0x34d1c0['plugins']['has']('RestrictedEditingModeEditing')&&_0x34d1c0['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x12b188{constructor(_0x21caf6){super(_0x21caf6),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x2c77ba=this['editor'],_0x17ab4e=_0x2c77ba['commands']['get']('importWord'),_0x1ed75e=_0x2c77ba['plugins']['get'](_0x23b29b);_0x17ab4e&&(_0x17ab4e['on']('execute',(_0x12ec83,[,_0x246721])=>{_0x246721['collaboration_features']={'comments':!0x0,'user_id':_0x1ed75e['me']['id']};},{'priority':_0x4103ab['high']+0xa}),this['listenTo'](_0x17ab4e,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x397d69,_0x439f70){const {comment_threads:_0x463c27}=_0x439f70;_0x463c27&&_0x463c27['forEach'](({thread_id:_0x320bbc,comments:_0x20ccd5,is_resolved:_0x971c93})=>{const _0x7b4b72=new Date(),_0x10e523=_0x20ccd5['map'](({author:_0x54e965,content:_0x1558e0,created_at:_0x276bd0})=>({'content':_0x1558e0,'authorId':this['editor']['plugins']['get'](_0x23b29b)['me']['id'],'createdAt':_0x7b4b72,'attributes':{'@external':{'authorName':_0x54e965,'createdAt':_0x276bd0?new Date(_0x276bd0):new Date(),'source':'importWord'}}})),_0x261002=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x261002,'threadId':_0x320bbc,'comments':_0x10e523,'resolvedAt':_0x971c93?_0x7b4b72:null});});}},ui=class extends _0x12b188{constructor(_0x262a83){super(_0x262a83),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x386b26=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x386b26,'contentInsertion',(_0x4070d5,_0x2d033e)=>this['_removeMarkersWithoutThreads'](_0x2d033e['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x333539){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x333539;const _0xfedb0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x58cf8d of _0x333539['keys']()){const [_0x281347,_0x5e725e]=_0x58cf8d['split'](':');'comment'!=_0x281347||_0xfedb0['hasCommentThread'](_0x5e725e)||_0x333539['delete'](_0x58cf8d);}return _0x333539;}_registerMarkerInClipboardPipeline(){const _0x43a295=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x360651=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x360651&&_0x43a295['_registerMarkerToCopy']('comment',_0x360651);}_mapCommentsCopyConfigToRegisterConfiguration(_0x536275){switch(_0x536275){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x499736){const _0x2959e5=_0x499736['split'](':');return{'group':_0x2959e5[0x0],'id':_0x2959e5[0x1],'part':_0x2959e5[0x2]};}var pi=class extends _0x12b188{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d2269,_0x152d81)=>{if(!_0x152d81['options']['showCommentHighlights'])return null;if(_0x152d81['options']['ignoreResolvedComments']){const {id:_0x3e5624}=fi(_0x5d2269['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x3e5624)?.['isResolved']&&_0x5d2269['item'])return _0x152d81['consumable']['consume'](_0x5d2269['item'],'addMarker:'+_0x5d2269['markerName']),_0x152d81['consumable']['consume'](_0x5d2269['item'],'removeMarker:'+_0x5d2269['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2690dc=>{_0x2690dc['on']('addMarker:comment',(_0xcad72d,_0x2e3937,_0x7bf824)=>{if(!_0x7bf824['options']['showCommentHighlights'])return;const _0x1f567a=_0x2e3937['item'];if(!_0x1f567a)return;const _0x2d223e=_0x7bf824['mapper']['toViewElement'](_0x1f567a);this['editor']['model']['schema']['isObject'](_0x1f567a)&&_0x2d223e&&!_0x2d223e['getCustomProperty']('widget')&&_0x2d223e['is']('containerElement')&&Ct(_0x2d223e,_0x7bf824['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x569f1a,{writer:_0x250be5,options:_0x2485c5})=>{if(!_0x2485c5['showCommentHighlights'])return null;const _0x37314c=_0x250be5['createContainerElement']('div'),_0x338939=_0x250be5['createEmptyElement']('hr');return _0x250be5['addClass']('ck-horizontal-line',_0x37314c),_0x250be5['insert'](_0x250be5['createPositionAt'](_0x37314c,0x0),_0x338939),_0x37314c;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x48e589,{writer:_0x1958a3,options:_0x55f580})=>{if(!_0x55f580['showCommentHighlights'])return null;const _0x365755=_0x1958a3['createContainerElement']('span'),_0x20c8b5=_0x1958a3['createEmptyElement']('img');return _0x1958a3['addClass']('image-inline',_0x365755),_0x1958a3['insert'](_0x1958a3['createPositionAt'](_0x365755,0x0),_0x20c8b5),_0x365755;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x368540,{writer:_0x611a75,options:_0x1b2b79})=>{if(_0x1b2b79['showCommentHighlights'])return _0x611a75['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x47cae9,_0x1e010d,_0x56f802)=>{_0x56f802['options']['showCommentHighlights']&&_0x47cae9['stop']();},{'priority':'high'});}},wi=class extends _0x12b188{static get requires(){return[oi,di,_0x23b29b,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xcd736e){super(_0xcd736e),this['set']('isThreadsLoadingPaused',!0x0),_0xcd736e['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x431838,_0x226c7c,_0x118464,_0x55b0c9)=>{const _0x2b14a1=_0xcd736e['plugins']['get'](oi),_0x920d19=_0x118464?fi(_0x118464)['id']:null;_0xcd736e['model']['change'](()=>{if(_0x920d19){const _0x4f2c23=this['getAllMarkersForId'](_0x920d19);for(const _0x1c5481 of _0x4f2c23)_0xcd736e['editing']['reconvertMarker'](_0x1c5481);}if(_0x55b0c9){const {id:_0x4263c4}=fi(_0x55b0c9),_0x29dba2=_0x2b14a1['getCommentThread'](_0x4263c4);if(_0x29dba2&&_0x29dba2['unlinkedAt'])return;if(_0x29dba2&&!_0x29dba2['isAttached'])return;const _0x4049f0=this['getAllMarkersForId'](_0x4263c4);for(const _0x379023 of _0x4049f0)_0xcd736e['editing']['reconvertMarker'](_0x379023);}}),_0x920d19&&this['scrollToThreadMarker'](_0x920d19);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x495ec9=this['editor'],_0x3cccec=_0x495ec9['plugins']['get'](oi),_0x1394eb=_0x495ec9['config']['get']('collaboration.channelId'),_0x180890=_0x3cccec['getCommentThreads']()['filter'](_0x1dff6c=>_0x1dff6c['channelId']!==_0x1394eb);_0x495ec9['commands']['add']('addCommentThread',new ci(_0x495ec9)),this['listenTo'](_0x495ec9,'change:isReadOnly',(_0x4fc34b,_0x3a5a22,_0xbf211a)=>{_0x3cccec['switchReadOnly'](_0xbf211a,_0x495ec9['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3cccec,gi('addCommentThread',_0x1394eb),(_0x4921be,{threadId:_0x4e3bdf})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x4e3bdf)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4e3bdf);}),this['listenTo'](_0x3cccec,gi('removeCommentThread',_0x1394eb),(_0x751279,{threadId:_0x4290ad})=>{_0x495ec9['model']['enqueueChange']({'isUndoable':!0x1},_0x4ee70f=>{const _0x3c9d98=this['getAllMarkersForId'](_0x4290ad);for(const _0x8f6275 of _0x3c9d98)_0x4ee70f['removeMarker'](_0x8f6275);});}),this['listenTo'](_0x3cccec,gi('resolveCommentThread',_0x1394eb),(_0x4cca58,{threadId:_0x5c4f67})=>{this['_reconvertMarkers'](_0x5c4f67);const _0x3f3df4=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x3f3df4['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5c4f67)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3cccec,gi('reopenCommentThread',_0x1394eb),(_0x5f07cd,{threadId:_0x1f17f7})=>{this['_reconvertMarkers'](_0x1f17f7);},{'priority':'low'}),this['listenTo'](_0x3cccec,gi('addComment',_0x1394eb),(_0x260c2e,{threadId:_0xe263cd,isFromAdapter:_0x3aaccf})=>{const _0x10b1b0=this['getAllMarkersForId'](_0xe263cd);!_0x3aaccf&&0x0!=_0x10b1b0['length']&&_0x3cccec['hasCommentThread'](_0xe263cd)&&0x1===_0x3cccec['getCommentThread'](_0xe263cd)['length']&&_0x495ec9['model']['enqueueChange']({'isUndoable':!0x1},_0x3b50fd=>{for(const _0x551a13 of _0x10b1b0)_0x3b50fd['updateMarker'](_0x551a13,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x180890);}afterInit(){!async function(_0x318ffb){const _0x32ba48='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x8dea20=0x79440,_0x2e4434={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x29cc88(_0x5045f9){const _0xc47546=new window['Promise'](_0x15bfb2=>{_0x5045f9['once']('ready',_0x15bfb2);}),_0x2cac14=window['Date']['now'](),_0x5481fb=_0x5045f9['config']['get']('licenseKey');async function _0x2ae980(){let _0x159e5b,_0x44b63b=null,_0x3fdfb6=null;try{return'GPL'==_0x5481fb?'NotAllowed':(_0x159e5b=_0xf82203(),_0x159e5b?(_0x159e5b['usageEndpoint']&&(_0x3fdfb6=_0x22e3f2(_0x159e5b['usageEndpoint'],_0x159e5b['jti'])),await _0x25e317()?_0x6b920a()?_0x48d1ef()?'Expired':_0x5457b4()?('evaluation'==_0x159e5b['licenseType']&&(_0x44b63b=_0x4d4c62('EvaluationLimit')),await _0x53a75e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x48d1ef(){const _0x49ad6c=['evaluation','trial']['includes'](_0x159e5b['licenseType'])?_0x2cac14/0x3e8:0xe10*_0x8dea20;return _0x159e5b['exp']<_0x49ad6c;}function _0x6b920a(){const _0x111bd3=_0x159e5b['features'];if(!_0x111bd3)return!0x1;if(_0x111bd3['includes']('*'))return!0x0;if(_0x111bd3['includes']('CMT'))return!0x0;if(_0x111bd3['includes']('TRILIUM')&&_0x3b5c62())return!0x0;if(_0x111bd3['includes']('RCMT')){if(_0x11c9b5())return!0x0;if(_0x336f58()||_0x37d112())return!0x0;}return!0x1;}function _0x5457b4(){const _0x2903bd=_0x159e5b['licensedHosts'];if(!_0x2903bd||0x0==_0x2903bd['length'])return!0x0;const {hostname:_0x2775df}=new URL(window['location']['href']);if(_0x2903bd['includes'](_0x2775df))return!0x0;const _0x10f47b=_0x2775df['split']('.');return _0x2903bd['filter'](_0x378e85=>_0x378e85['includes']('*'))['map'](_0x9aadce=>_0x9aadce['split']('.'))['filter'](_0x108379=>_0x108379['length']<=_0x10f47b['length'])['map'](_0x35305b=>Array(_0x10f47b['length']-_0x35305b['length'])['fill']('*'===_0x35305b[0x0]?'*':'')['concat'](_0x35305b))['some'](_0x3b407c=>_0x10f47b['every']((_0x95ddee,_0x3fa734)=>_0x3b407c[_0x3fa734]===_0x95ddee||'*'===_0x3b407c[_0x3fa734]));}function _0x53a75e(){return _0x44b63b&&_0x3fdfb6?new window['Promise']((_0x439d00,_0x1bea1e)=>{_0x44b63b['then'](_0x439d00,_0x1bea1e),_0x3fdfb6['then'](_0x481c5f=>{'Valid'!=_0x481c5f&&_0x439d00(_0x481c5f);},_0x1bea1e);}):_0x44b63b||_0x3fdfb6||'Valid';}}function _0x22e3f2(_0x41a541,_0x2e44e9){return new window['Promise'](_0x3b528c=>{if(_0x3bd45f())return _0x3b528c('Valid');_0x4580b3(),_0x5045f9['decorate']('_sendUsageRequest');let _0x29665b=!0x1;const _0x237b75=_0x185ea0();function _0x3a343b(_0x21036a){return!!_0x21036a&&('object'==typeof _0x21036a||'function'==typeof _0x21036a)&&'function'==typeof _0x21036a['then']&&'function'==typeof _0x21036a['catch'];}function _0x17bfd0(_0x20cf4c){_0x4e7c06(_0x20cf4c)['then'](_0x32c8b4=>_0x32c8b4&&'ok'==_0x32c8b4['status']?_0x5dea99(_0x4d630d(_0x237b75+_0x2e44e9))!=_0x32c8b4['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x39de35=>(_0x5eed40(),_0x39de35),()=>{const _0x4388f8=_0x18073f();return null==_0x4388f8?(_0x5eed40(),'Valid'):_0x2cac14-_0x4388f8>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3b528c)['catch'](()=>{_0x3b528c('UsageLimit');});const _0x3cbb60=0x36ee80;function _0x5eed40(){const _0x3530f2='llct-'+_0x5dea99(_0x4d630d(_0x41a541)),_0x3707b5=_0x1bd57f(_0x5dea99(window['Math']['ceil'](_0x2cac14/_0x3cbb60)));window['localStorage']['setItem'](_0x3530f2,_0x3707b5);}function _0x18073f(){const _0x12f464='llct-'+_0x5dea99(_0x4d630d(_0x41a541)),_0x482d00=window['localStorage']['getItem'](_0x12f464);return _0x482d00?window['parseInt'](_0x1bd57f(_0x482d00),0x10)*_0x3cbb60:null;}function _0x4e7c06(_0x5ba112){return new window['Promise']((_0x295168,_0x191a62)=>{_0x5ba112['then'](_0x295168,_0x191a62),window['setTimeout'](_0x191a62,0x1d4c0);});}}_0x5045f9['on']('_sendUsageRequest',(_0x3fb637,_0x29b8bb)=>{if(_0x29b8bb[0x0]!=_0x41a541)return _0x3b528c('UsageLimit');_0x29b8bb[0x1]={..._0x29b8bb[0x1],'requestId':_0x237b75};},{'priority':'high'}),_0x5045f9['on']('_sendUsageRequest',_0x184d72=>{_0x3a343b(_0x184d72['return'])&&(_0x29665b=!0x0,_0x17bfd0(_0x184d72['return']));},{'priority':'low'}),_0xc47546['then'](()=>{_0x29665b||_0x3b528c('UsageLimit');});});function _0x3bd45f(){return'auto'==_0x5045f9['editing']['view']['_overlayModeHint'];}function _0x4580b3(){_0x5045f9['editing']['view']['_overlayModeHint']='auto';}}function _0x4d4c62(_0x2d8fb0){const _0x382511=[new window['Promise'](_0x11a024=>setTimeout(_0x11a024,0x93ecc)),_0xc47546['then'](()=>new window['Promise'](_0x57147e=>{let _0x52a095=0x0;_0x5045f9['model']['on']('applyOperation',(_0x5da602,_0x55fdeb)=>{_0x55fdeb[0x0]['isDocumentOperation']&&_0x52a095++,0x5e8==_0x52a095&&(_0x57147e(),_0x5da602['off']());});}))];return window['Promise']['race'](_0x382511)['then'](()=>_0x2d8fb0);}async function _0x4865b3(){await _0xc47546,_0x5045f9['model']['change']=_0x5dfef6,_0x5045f9['model']['enqueueChange']=_0x5dfef6,_0x5045f9['enableReadOnlyMode']('model');}function _0x3b5c62(){return window['glob']&&window['glob']['triliumVersion'];}function _0x11c9b5(){return _0x520049('WebSocketGateway')&&'connected'==_0xcd2ae3('WebSocketGateway')['state'];}function _0x336f58(){return _0x520049('RevisionViewerIntegration');}function _0x37d112(){return _0x520049('TrackChangesDataGetter');}function _0x1a352b(_0x58dc0e){const _0x5ab112=_0x3e990a();_0x5045f9[_0x5ab112]='commentsLicenseKey'+_0x58dc0e,'Valid'!=_0x58dc0e&&_0x4865b3();}function _0x3e990a(){const _0x5ad2b8=window['String'](window['performance']['now']())['replace']('.','');let _0x55cc5e='m';for(let _0x368d42=0x0;_0x368d42<_0x5ad2b8['length'];_0x368d42+=0x2){let _0x3028a2=window['parseInt'](_0x5ad2b8['substring'](_0x368d42,_0x368d42+0x2));_0x3028a2>=0x3e&&(_0x3028a2-=0x3e),_0x55cc5e+=_0x32ba48[_0x3028a2];}return _0x55cc5e;}function _0xf82203(){const _0x533d0f=_0x5481fb['split']('.');if(0x3!=_0x533d0f['length'])return null;return _0x5c0b67(_0x533d0f[0x1]);function _0x5c0b67(_0x5d963d){const _0x288779=_0x23fd63(_0x5d963d);return _0x288779&&_0x175aa1()?_0x288779:null;function _0x175aa1(){const _0x47cad1=_0x288779['jti'],_0xfa3de4=window['parseInt'](_0x47cad1['substring'](_0x47cad1['length']-0x8),0x10),_0x103901={..._0x288779,'jti':_0x47cad1['substring'](0x0,_0x47cad1['length']-0x8)};return delete _0x103901['vc'],_0x4d630d(_0x103901)==_0xfa3de4;}}}async function _0x25e317(){let _0x1f0c07=!0x0;try{const [_0x37295b,_0x1bbd8f,_0x34ad1f]=_0x5481fb['split']('.');return _0x317ecf(_0x37295b),await _0x2d6771(_0x37295b,_0x1bbd8f,_0x34ad1f),_0x1f0c07;}catch{return!0x1;}function _0x317ecf(_0xa27e2d){const _0x143295=_0x23fd63(_0xa27e2d);_0x143295&&'ES256'==_0x143295['alg']||(_0x1f0c07=!0x1);}async function _0x2d6771(_0x13a80a,_0x4deb4c,_0x126983){const _0x25f956=window['Uint8Array']['from'](_0x3396f5(_0x126983),_0x1e28d5=>_0x1e28d5['charCodeAt'](0x0)),_0x433798=new window['TextEncoder']()['encode'](_0x13a80a+'.'+_0x4deb4c),_0x522948=window['crypto']['subtle'];if(!_0x522948)return;const _0x4cef92=await _0x522948['importKey']('jwk',_0x2e4434,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x522948['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4cef92,_0x25f956,_0x433798)||(_0x1f0c07=!0x1);}}function _0x23fd63(_0x8fc24e){return _0x8fc24e['startsWith']('ey')?JSON['parse'](_0x3396f5(_0x8fc24e)):null;}function _0x3396f5(_0x533508){return window['atob'](_0x533508['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4d630d(_0x3b2201){let _0xb45a7c=0x1505;function _0x3b89f5(_0x92371f){for(let _0x32c8d6=0x0;_0x32c8d6<_0x92371f['length'];_0x32c8d6++){const _0x4281a7=_0x92371f['charCodeAt'](_0x32c8d6);_0xb45a7c=(_0xb45a7c<<0x5)+_0xb45a7c+_0x4281a7,_0xb45a7c&=_0xb45a7c;}}function _0x202f5b(_0x41a781){Array['isArray'](_0x41a781)?_0x41a781['forEach'](_0x202f5b):_0x41a781&&'object'==typeof _0x41a781?Object['entries'](_0x41a781)['sort']()['forEach'](([_0x245cad,_0x1ae70a])=>{_0x3b89f5(_0x245cad),_0x202f5b(_0x1ae70a);}):_0x3b89f5(window['String'](_0x41a781));}return _0x202f5b(_0x3b2201),_0xb45a7c>>>0x0;}function _0x5dea99(_0xa57399){return _0xa57399['toString'](0x10)['padStart'](0x8,'0');}function _0x1bd57f(_0x3bf5b9){return _0x3bf5b9['split']('')['reverse']()['join']('');}function _0x520049(_0x5862e6){return _0x5045f9['plugins']['has'](_0x5862e6);}function _0xcd2ae3(_0x2b14b9){return _0x5045f9['plugins']['get'](_0x2b14b9);}function _0x5dfef6(){}_0x1a352b(await _0x2ae980());}_0x29cc88(_0x318ffb['editor']);}(this);}destroy(){const _0xb85092=this['editor']['plugins']['get'](oi),_0x36099d=this['editor']['config']['get']('collaboration.channelId');for(const _0x3cff94 of _0xb85092['getCommentThreads']({'channelId':_0x36099d}))_0xb85092['_detachCommentThread'](_0x3cff94['id']),_0xb85092['_threads']['delete'](_0x3cff94['id']);super['destroy']();}['hasMarkerForId'](_0x27cc0d){return this['getAllMarkersForId'](_0x27cc0d)['length']>0x0;}getAllMarkersForId(_0x2d9642){const _0x2f9af7=[];for(const _0x4cf065 of this['editor']['model']['markers'])_0x4cf065['name']['startsWith']('comment:'+_0x2d9642)&&_0x2f9af7['push'](_0x4cf065);return _0x2f9af7;}['scrollToThreadMarker'](_0x5241d0){setTimeout(()=>{const _0x22390a=this['_getTargetForId'](_0x5241d0);_0x22390a&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x5241d0&&_0x38c3bf({'target':_0x22390a[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0xd71a6b){this['editor']['model']['change'](()=>{for(const _0x59850e of this['getAllMarkersForId'](_0xd71a6b))this['editor']['editing']['reconvertMarker'](_0x59850e);});}_attachArchivedThread(_0x178275){const _0x1cc1c=this['editor']['plugins']['get'](oi),_0x39d012=this['editor']['plugins']['get'](di),_0x4bdcd2=_0x1cc1c['getCommentThread'](_0x178275);if(!_0x4bdcd2['isAttached']){const _0x533334=_0x4bdcd2['attachTo'](()=>this['_getTargetForId'](_0x4bdcd2['id']));_0x39d012['registerAnnotation'](_0x533334),_0x4bdcd2['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x1e9ad3=this['editor'],_0x5c3eb6=_0x1e9ad3['plugins']['get'](_0x23b29b);_0x1e9ad3['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x371e26,_0x193eef)=>{const {id:_0x3d3d62}=fi(_0x371e26['markerName']),_0x5835b4=_0x1e9ad3['plugins']['get'](oi)['getCommentThread'](_0x3d3d62),_0x2eddd9=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x3d3d62;let _0x1089b1;if(_0x5835b4&&_0x5835b4['isResolved']&&!_0x2eddd9&&_0x371e26['item'])return _0x193eef['consumable']['consume'](_0x371e26['item'],'addMarker:'+_0x371e26['markerName']),_0x193eef['consumable']['consume'](_0x371e26['item'],'removeMarker:'+_0x371e26['markerName']),null;const _0x226daa=['ck-comment-marker'];return _0x2eddd9&&_0x226daa['push']('ck-comment-marker--active'),_0x1089b1=_0x5835b4?.['length']?_0x5835b4['comments']['first']['author']['id']:_0x5c3eb6['me']['id'],{'classes':_0x226daa,'attributes':{'data-comment':_0x3d3d62,'data-author-id':_0x1089b1}};}}),_0x1e9ad3['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x568439,{options:_0x1f537c})=>{if(_0x1f537c['showCommentHighlights'])return null;const _0xee676c=_0x1e9ad3['plugins']['get'](oi),_0x4eae72=_0x1e9ad3['model']['markers']['get'](_0x568439),{id:_0x4c332e,part:_0x3745c2}=fi(_0x568439);return _0x4eae72&&!_0x4eae72['affectsData']||_0x1f537c['ignoreResolvedComments']&&_0xee676c['getCommentThread'](_0x4c332e)?.['isResolved']?null:{'group':'comment','name':_0x3745c2?_0x4c332e+':'+_0x3745c2:_0x4c332e};}}),_0x1e9ad3['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x7da22b,{writer:_0x586452})=>_0x586452['createElement']('$marker',{'data-name':'comment:'+_0x7da22b['getAttribute']('id')})}),_0x1e9ad3['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x49ddfe=this['editor'],_0x18d3a=_0x49ddfe['plugins']['get'](oi),_0x6ee393=new Set(),_0x47d703=new Set();_0x49ddfe['model']['document']['registerPostFixer'](_0xfa26c4=>{let _0x3e3496=!0x1;for(const {name:_0x2345c6,data:_0x53cf97}of _0x49ddfe['model']['document']['differ']['getChangedMarkers']()){const {group:_0xa2eb01,id:_0x1bd5d8}=fi(_0x2345c6);let _0x595d11=_0x53cf97['newRange'];if('comment'!==_0xa2eb01||!_0x595d11)continue;const _0x21f27c='$graveyard'===_0x595d11['root']['rootName'];_0x21f27c||(_0x595d11=_i(_0x595d11,_0x49ddfe['model']),!_0x595d11||_0x595d11['isCollapsed']||!_0x53cf97['newRange']||_0x595d11['isEqual'](_0x53cf97['newRange']))?_0x49ddfe['model']['hasContent'](_0x595d11)&&!_0x21f27c?this['isThreadsLoadingPaused']?_0x6ee393['add'](_0x2345c6):this['_handleThreadMarker'](_0x2345c6,_0x1bd5d8):(_0x47d703['add'](_0x2345c6),_0x6ee393['delete'](_0x2345c6),_0xfa26c4['removeMarker'](_0x2345c6),_0x3e3496=!0x0):(_0xfa26c4['updateMarker'](_0x2345c6,{'range':_0x595d11}),_0x3e3496=!0x0);}return _0x3e3496;}),this['on']('change:isThreadsLoadingPaused',(_0x3c3a75,_0x286d5f,_0x5b182e)=>{if(!_0x5b182e&&_0x6ee393['size'])for(const _0xcee4b3 of _0x6ee393){const {id:_0x4fc8bb}=fi(_0xcee4b3);_0x6ee393['delete'](_0xcee4b3),_0x49ddfe['model']['markers']['get'](_0xcee4b3)&&this['_handleThreadMarker'](_0xcee4b3,_0x4fc8bb);}}),this['listenTo'](_0x49ddfe['model']['document'],'change',()=>{for(const {name:_0x4cff8a,data:{newRange:_0x44f9aa}}of _0x49ddfe['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2eb2c0,id:_0x1a8e9b}=fi(_0x4cff8a);if('comment'!==_0x2eb2c0)continue;const _0x43b9b2=_0x18d3a['getCommentThread'](_0x1a8e9b),_0x4fd7e3=this['hasMarkerForId'](_0x1a8e9b);_0x43b9b2&&(!_0x43b9b2['_hasTargetInContent']&&_0x44f9aa&&_0x49ddfe['editing']['view']['once']('render',()=>{const _0x5daef6=_0x49ddfe['plugins']['get'](ti),_0x58bcd5=_0x18d3a['_threadToController']['get'](_0x43b9b2)['view'];_0x5daef6['getByInnerView'](_0x58bcd5)['refreshVisibility']();},{'priority':'low'}),_0x43b9b2['_hasTargetInContent']=_0x4fd7e3||!!_0x44f9aa),_0x44f9aa||(_0x47d703['add'](_0x4cff8a),_0x6ee393['delete'](_0x4cff8a));}for(const _0x130c78 of _0x47d703){const {id:_0x483494}=fi(_0x130c78),_0x50d4db=_0x18d3a['getCommentThread'](_0x483494);if(_0x6ee393['delete'](_0x130c78),!_0x50d4db)continue;const _0x3274f3=this['hasMarkerForId'](_0x483494);_0x3274f3||_0x50d4db['isSubmitted']?_0x3274f3||_0x50d4db['unlinkedAt']||_0x50d4db['setUnlinkedAt'](new Date()):_0x50d4db['remove']();}_0x47d703['clear']();});}_handleInitialThreads(_0x1d1d7b){_0x1d1d7b['forEach'](_0x59869e=>{_0x59869e['unlinkedAt']&&this['_attachArchivedThread'](_0x59869e['id']);});}_getTargetForId(_0x2c12f2){const _0x494e7e=this['editor'],_0x3af908=this['getAllMarkersForId'](_0x2c12f2);return _0x71726c(_0x494e7e['editing'],_0x3af908);}_getTextContext(_0x4352bf){const _0xfe86dd=this['getAllMarkersForId'](_0x4352bf);let _0x4c0d55='',_0x3309dd=!0x1;for(const _0x3af153 of _0xfe86dd){const _0x19fc57=_0x3af153['getRange']();for(const _0x227a9d of Array['from'](_0x19fc57['getItems']()))_0x227a9d['is']('$textProxy')?(_0x4c0d55&&_0x3309dd&&(_0x4c0d55+='\x20',_0x3309dd=!0x1),_0x4c0d55+=_0x227a9d['data']):_0x3309dd=!0x0;_0x3309dd=!0x0;}return _0x4c0d55['substring'](0x0,0x96);}_attachMarkerToThread(_0x561a7c,_0x453aa3){const _0x53ee4e=this['editor'],_0x31bea8=_0x53ee4e['plugins']['get'](oi);let _0x3935af=_0x31bea8['getCommentThread'](_0x453aa3);const _0x5c4480=_0x53ee4e['config']['get']('collaboration.channelId'),_0x2a0f84=_0x53ee4e['plugins']['get'](di);return _0x3935af&&(_0x3935af['unlinkedAt']&&_0x3935af['setUnlinkedAt'](null),_0x3935af['isAttached'])||(this['getAllMarkersForId'](_0x453aa3)[0x0]['managedUsingOperations']?_0x31bea8['fetchCommentThread']({'channelId':_0x5c4480,'threadId':_0x453aa3})['then'](_0x540ae2=>{if('destroyed'!==_0x53ee4e['state']){if(_0x3935af=_0x540ae2,_0x3935af&&!_0x3935af['isAttached']){const _0x39f589=_0x3935af['attachTo'](()=>this['_getTargetForId'](_0x453aa3));_0x2a0f84['registerAnnotation'](_0x39f589),_0x3935af['isResolved']&&this['_reconvertMarkers'](_0x453aa3);}else{if(!_0x3935af){const _0x645635=this['getAllMarkersForId'](_0x453aa3);_0x53ee4e['model']['change'](_0x53dafd=>{for(const _0x44f648 of _0x645635)_0x53dafd['removeMarker'](_0x44f648);});}}}}):_0x53ee4e['editing']['view']['once']('render',()=>{if(_0x31bea8['getCommentThread'](_0x453aa3))return;const _0x2e633c=_0x53ee4e['plugins']['get'](ti);_0x3935af=_0x31bea8['openNewCommentThread']({'channelId':_0x5c4480,'threadId':_0x453aa3,'target':()=>this['_getTargetForId'](_0x453aa3),'context':{'type':'text','value':this['_getTextContext'](_0x453aa3)}});const _0x7e5e25=_0x31bea8['_threadToController']['get'](_0x3935af)['view'],_0x5ee211=_0x2e633c['getByInnerView'](_0x7e5e25);_0x5ee211&&_0x2a0f84['registerAnnotation'](_0x5ee211);},{'priority':'low'})),_0x3935af;}['_handleThreadMarker'](_0x15c149,_0x48b201){const _0x7cf440=this['_attachMarkerToThread'](_0x15c149,_0x48b201);_0x7cf440&&!_0x7cf440['context']&&_0x7cf440['setContext']({'type':'text','value':this['_getTextContext'](_0x48b201)});}_initAriaMarkerChangeAnnouncements(){const _0x522f2e=this['editor'];_0x1b50a0(_0x522f2e['model'],({left:_0x23b951,entered:_0x378521})=>{for(const _0x345699 of _0x23b951)if(Ai(_0x345699)){_0x522f2e['ui']['ariaLiveAnnouncer']['announce'](Et(_0x522f2e['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5c1290 of _0x378521)if(Ai(_0x5c1290)){_0x522f2e['ui']['ariaLiveAnnouncer']['announce'](Et(_0x522f2e['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x10baf1(_0x14d518)));break;}});}};function gi(_0x4bc4a4,_0x31533b){return _0x31533b?_0x4bc4a4+':'+_0x31533b:_0x4bc4a4;}function _i(_0x11f325,_0x5e519a){const _0x4601e9=_0x5e519a['schema'],_0x95ef8c=_0x5e519a['createRange'](_0x11f325['start']);for(const _0x1da677 of _0x11f325['getWalker']()){const {type:_0x15942c,item:_0x53074f,nextPosition:_0x3e945c}=_0x1da677;if('text'===_0x15942c||_0x4601e9['isObject'](_0x53074f)){const _0x2ce602=_0x5e519a['createPositionBefore'](_0x53074f);_0x95ef8c['isCollapsed']&&(_0x95ef8c['start']=_0x2ce602),_0x95ef8c['end']=_0x3e945c;}}return _0x95ef8c;}function Ai(_0x4fd141){return'comment'===fi(_0x4fd141['name'])['group'];}var vi=class extends _0x12b188{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x97ed01=this['editor'],_0x2d37b8=_0x97ed01['plugins']['get'](oi),_0x478806=_0x97ed01['plugins']['get'](wi),_0x788aa8=_0x97ed01['plugins']['get'](ti),_0x16d217=_0x97ed01['plugins']['get'](di);_0x97ed01['ui']['componentFactory']['add']('comment',()=>{const _0x3c00cd=this['_createUIButton'](_0x422b1d);return _0x3c00cd['tooltip']=!0x0,_0x3c00cd;}),_0x97ed01['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x16d217['addSourceCollector'](()=>{const _0x140972=[];for(const [_0x19435c,_0x3df7b1]of _0x2d37b8['_threadToController']){const _0x41d9c8=_0x478806['getAllMarkersForId'](_0x19435c['id']),_0x7fa154=_0x41d9c8['map'](_0x223115=>_0x223115['getRange']());_0x41d9c8['length']>0x0&&_0x140972['push']([_0x3df7b1['view'],_0x7fa154]);}return _0x140972;}),this['listenTo'](_0x788aa8,'change:activeAnnotations',(_0x2f5f1b,_0x5b3294,_0x3bb572)=>{const _0x290ff3=Array['from'](_0x3bb572)['map'](_0x17042d=>_0x17042d['innerView'])['find'](_0x3093b6=>_0x2d37b8['_viewToController']['has'](_0x3093b6));if(!_0x290ff3)return void(_0x478806['activeMarker']=null);const _0x44279f=_0x2d37b8['_viewToController']['get'](_0x290ff3)['model']['id'],_0xf8d4ca='comment:'+_0x44279f;_0x44279f&&_0x478806['hasMarkerForId'](_0x44279f)?_0x478806['activeMarker']=_0xf8d4ca:_0x478806['activeMarker']&&(_0x478806['activeMarker']=null);}),this['listenTo'](_0x2d37b8,'removeCommentThread',(_0x11395b,{threadId:_0x546fae,isFromAdapter:_0x1ca09d})=>{!_0x1ca09d&&_0x97ed01['ui']['focusTracker']['isFocused']&&_0x478806['hasMarkerForId'](_0x546fae)&&_0x97ed01['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2d37b8,'addComment',(_0x3a77e8,{threadId:_0x17d6a1,isFromAdapter:_0x2adc22})=>{!_0x2adc22&&_0x478806['hasMarkerForId'](_0x17d6a1)&&_0x2d37b8['hasCommentThread'](_0x17d6a1)&&0x1===_0x2d37b8['getCommentThread'](_0x17d6a1)['length']&&(_0x97ed01['editing']['view']['focus'](),_0x3a77e8['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x423141=[this['editor']];for(const _0x51987c of _0x423141){let _0x4d31f0;for(const _0x532973 in _0x51987c){const _0x478528=_0x532973,_0x4e28f9=_0x51987c[_0x478528];if('commentsLicenseKeyValid'==_0x4e28f9||'commentsLicenseKeyInvalid'==_0x4e28f9||'commentsLicenseKeyExpired'==_0x4e28f9||'commentsLicenseKeyDomainLimit'==_0x4e28f9||'commentsLicenseKeyNotAllowed'==_0x4e28f9||'commentsLicenseKeyEvaluationLimit'==_0x4e28f9||'commentsLicenseKeyUsageLimit'==_0x4e28f9){delete _0x51987c[_0x478528],_0x4d31f0=_0x4e28f9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4d31f0&&_0x51987c['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4d31f0&&_0x51987c['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4d31f0&&_0x51987c['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4d31f0&&_0x51987c['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4d31f0&&_0x51987c['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x4d31f0&&_0x51987c['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x213ade){const _0x48a0ef=this['editor'],_0x5e7cb3=new _0x213ade(_0x48a0ef['locale']),_0x36a460=_0x48a0ef['commands']['get']('addCommentThread');return _0x5e7cb3['set']({'label':Et(_0x48a0ef['locale'],'Comment'),'icon':_0x1aed3d}),_0x5e7cb3['bind']('isEnabled')['to'](_0x36a460,'isEnabled',_0x36a460,'hasContent',(_0x4aedbc,_0xdc12ba)=>_0x4aedbc&&_0xdc12ba),this['listenTo'](_0x5e7cb3,'execute',()=>{_0x36a460['execute']();}),_0x5e7cb3;}},yi=class extends _0x12b188{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x3ee928){super(_0x3ee928),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x144828,_0x14c81e,_0x7a3e08)=>{_0x7a3e08?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x134410,_0x39b8f1]of this['editor']['commands'])_0x39b8f1['affectsData']&&'addCommentThread'!==_0x134410&&_0x39b8f1['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 _0x190c33=this['editor']['editing']['view']['document'];this['listenTo'](_0x190c33,'cut',_0x112df9=>_0x112df9['stop'](),{'priority':'highest'}),this['listenTo'](_0x190c33,'clipboardInput',_0xae6934=>_0xae6934['stop'](),{'priority':'highest'}),this['listenTo'](_0x190c33,'delete',_0x29284f=>_0x29284f['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x43d769,_0x2eb63d]of this['editor']['commands'])_0x2eb63d['affectsData']&&'addCommentThread'!==_0x43d769&&_0x2eb63d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}},Ti=class extends _0xe32c07{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d0a76){super(_0x4d0a76),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x41ebb4=this['context']['plugins']['get'](ti);this['listenTo'](_0x41ebb4,'_activateAnnotation',(_0x2759d9,_0x18d93d)=>{for(const _0x205667 of this['activeUIs']){const _0x3b8f61=this['_uis']['get'](_0x205667);(0x0,this['uisData']['get'](_0x205667)['filter'])(_0x18d93d)&&_0x3b8f61['setActiveAnnotation'](_0x18d93d);}}),this['listenTo'](_0x41ebb4,'_deactivateAllAnnotations',()=>{for(const _0x97420f of this['activeUIs'])this['_uis']['get'](_0x97420f)['setActiveAnnotation'](null);}),this['listenTo'](_0x41ebb4['_visibleAnnotations'],'add',(_0x4bd147,_0x364eaa)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x364eaa);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x362407){return this['activeUIs']['has'](_0x362407);}activate(_0x3ee74d,_0x219bec=this['defaultFilter']){const _0x4343d0=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x3ee74d))throw new _0x3fd207('annotationsuis-missing-ui',this,{'uiName':_0x3ee74d});this['isActive'](_0x3ee74d)&&this['deactivate'](_0x3ee74d),this['activeUIs']['add'](_0x3ee74d);const _0x12e9e2=new Jt();Qt({'source':_0x4343d0['_visibleAnnotations'],'target':_0x12e9e2,'filter':_0x219bec}),this['uisData']['set'](_0x3ee74d,{'collection':_0x12e9e2,'filter':_0x219bec});const _0x7dac82=this['_uis']['get'](_0x3ee74d);_0x7dac82['attach'](_0x12e9e2),this['listenTo'](_0x7dac82,'change:activeAnnotation',(_0x142760,_0x410503,_0x45d1b0,_0x1d39ba)=>{_0x1d39ba&&_0x4343d0['_removeActiveAnnotation'](_0x1d39ba),_0x45d1b0&&_0x4343d0['_addActiveAnnotation'](_0x45d1b0);});}deactivate(_0x204947){if(this['activeUIs']['delete'](_0x204947),!this['_uis']['has'](_0x204947))throw new _0x3fd207('annotationsuis-missing-ui',this,{'uiName':_0x204947});const _0x30905e=this['_uis']['get'](_0x204947);_0x30905e['detach'](),this['stopListening'](_0x30905e),this['uisData']['get'](_0x204947)['collection']['destroy'](),this['uisData']['delete'](_0x204947);}switchTo(_0x47253e){if(!this['_uis']['has'](_0x47253e))throw new _0x3fd207('annotationsuis-missing-ui',this,{'uiName':_0x47253e});const _0xd599d3=this['context']['plugins']['get'](ti),_0x3f137d=Array['from'](_0xd599d3['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x47253e);const _0x1763f4=this['_uis']['get'](_0x47253e);_0x1763f4['setActiveAnnotation'](_0x3f137d),_0x1763f4['_setSelectedAnnotations']&&_0x3f137d&&_0x1763f4['_setSelectedAnnotations']([_0x3f137d]);}deactivateAll(){for(const _0x1bf476 of this['activeUIs'])this['deactivate'](_0x1bf476);}register(_0x596344,_0x166e58){if(this['_uis']['has'](_0x596344))throw new _0x3fd207('annotationsuis-register-already-registered');if('function'!=typeof _0x166e58['attach']||'function'!=typeof _0x166e58['detach']||'function'!=typeof _0x166e58['setActiveAnnotation'])throw new _0x3fd207('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x596344,_0x166e58);}refilterAnnotations(){const _0x4cc564=this['context']['plugins']['get'](ti)['collection'],_0x2688ce=new Map(),_0x5c4be0=Array['from'](this['activeUIs']);for(const _0x26a21e of this['activeUIs']){const _0xf230ea=this['uisData']['get'](_0x26a21e)['collection'];for(const _0x3bffba of _0xf230ea)_0x2688ce['set'](_0x3bffba,_0x26a21e);}for(const _0x491928 of _0x4cc564){const _0x4d7322=_0x2688ce['get'](_0x491928);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x491928);const _0x41f5e9=_0x5c4be0['find'](_0x4b99a2=>this['uisData']['get'](_0x4b99a2)['filter'](_0x491928));_0x4d7322!==_0x41f5e9&&(_0x4d7322&&this['uisData']['get'](_0x4d7322)['collection']['remove'](_0x491928),_0x41f5e9&&this['uisData']['get'](_0x41f5e9)['collection']['add'](_0x491928));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x3cab90){const _0xee5f8a=[];for(const _0x40e466 of this['activeUIs']){(0x0,this['uisData']['get'](_0x40e466)['filter'])(_0x3cab90)&&_0xee5f8a['push'](_0x40e466);}if(_0xee5f8a['length']>0x1)throw new _0x3fd207('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xee5f8a,'annotationType':_0x3cab90['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x26abaa('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x39f3f6){super(_0x39f3f6);const _0x1278a8=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 _0x4804cc(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1278a8['to']('class')],'style':{'minHeight':_0x1278a8['to']('minHeight',_0x2e2070=>'number'==typeof _0x2e2070?Ci(_0x2e2070+0xa):null)},'dir':_0x39f3f6['uiLanguageDirection'],'role':'application','aria-label':Et(_0x39f3f6,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x39f3f6,'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',_0x591fe9=>{this['_updateItemPositionInFocusables'](_0x591fe9['source']);}),this['list']['forEach'](_0x31ff7b=>{this['focusTracker']['add'](_0x31ff7b['element']),this['_updateItemPositionInFocusables'](_0x31ff7b);}),this['list']['on']('change',(_0x52e7b6,_0x217e59)=>{for(const _0x3f6c1f of _0x217e59['removed'])this['focusTracker']['remove'](_0x3f6c1f['element']),this['focusables']['remove'](_0x3f6c1f);for(const _0x47d3ec of _0x217e59['added'])this['focusTracker']['add'](_0x47d3ec['element']),this['_updateItemPositionInFocusables'](_0x47d3ec);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x2d540a){const _0x289dc7=this['focusables']['getIndex'](_0x2d540a);let _0x4896ab,_0x44a3de;for(const _0x12e0d2 of this['focusables'])if(_0x2d540a['top']<_0x12e0d2['top']){_0x4896ab=_0x12e0d2;break;}if(_0x44a3de=_0x4896ab?this['focusables']['getIndex'](_0x4896ab):this['focusables']['length'],-0x1!==_0x289dc7){if(_0x289dc7===_0x44a3de-0x1)return;this['focusables']['remove'](_0x2d540a),_0x44a3de=_0x4896ab?this['focusables']['getIndex'](_0x4896ab):this['focusables']['length'];}this['focusables']['add'](_0x2d540a,_0x44a3de);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x26abaa('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x454be6){super(_0x454be6),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x52c464,_0x5932fa)=>_0x52c464+_0x5932fa),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xafca0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xafca0['to']('isAnimationDisabled',_0x3aa3ce=>_0x3aa3ce?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xafca0['to']('top',_0xb3beb7=>bi(_0xb3beb7))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x1af654=this['element']['clientHeight'];_0x1af654&&(this['height']=_0x1af654);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0xe32c07{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x848b0a){super(_0x848b0a),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 _0x5aea61=this['context']['config']['get']('sidebar.container');_0x5aea61&&this['setContainer'](_0x5aea61);}setContainer(_0x441ca0){if(!Oi(_0x441ca0))throw new _0x3fd207('sidebar-setcontainer-invalid-element');this['container']=_0x441ca0;}_attachToContainer({viewClass:_0x52ed99='',spaceBetweenItems:_0x142c81=0x19}={}){if(!Oi(this['container']))throw new _0x3fd207('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x52ed99,this['_spaceBetweenItems']=_0x142c81;}['rearrange']({removedAnnotation:_0x1b5a7b,previousAnnotation:_0x3c5b10,nextAnnotation:_0x43441c}){const _0x486baf=this['getSidebarItemView'](_0x1b5a7b);this['view']['list']['remove'](_0x486baf),this['_destroySidebarItemView'](_0x1b5a7b),_0x3c5b10&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3c5b10)),_0x43441c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x43441c)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x43de77,activatedAnnotation:_0x23f1d8,disableAnimationOnActivatedAnnotation:_0x573cc2}){if(this['_activeAnnotation']=_0x23f1d8,_0x43de77){_0x43de77['isActive']=!0x1;const _0x3e0443=this['getSidebarItemView'](_0x43de77);_0x3e0443&&_0x573cc2&&(_0x3e0443['isAnimationDisabled']=!0x1);}if(_0x23f1d8){const _0x3c8a49=this['getSidebarItemView'](_0x23f1d8);_0x3c8a49&&(_0x23f1d8['isActive']=!0x0,_0x573cc2&&(_0x3c8a49['isAnimationDisabled']=!0x0,_0x3c8a49['top']+=0x1),this['_alignToTargetRect'](_0x3c8a49));}}_detachFromContainer(_0x3d061e){if(this['view']['element']['remove'](),_0x3d061e){for(const _0x2be3b3 of _0x3d061e)this['_destroySidebarItemView'](_0x2be3b3);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x20fa99,_0x5d2b30){_0x5d2b30||(_0x5d2b30=_0x20fa99['view']);const _0x1b40b7=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1b40b7,_0x20fa99),this['_annotationToSidebarItemView']['set'](_0x20fa99,_0x1b40b7),_0x1b40b7['content']['add'](_0x5d2b30),this['listenTo'](_0x20fa99['view'],'change:targetRect',(_0x32bb0a,_0x93d532,_0x3ec6ea)=>{const _0x2d135f=this['_getTargetTop'](_0x20fa99,_0x3ec6ea);_0x1b40b7['_targetTop']!=_0x2d135f&&(_0x1b40b7['_targetTop']=_0x2d135f,this['_setItemTop'](_0x1b40b7,_0x2d135f));}),this['listenTo'](_0x1b40b7,'change:top',()=>{this['_recalculate'](_0x1b40b7,'top');}),this['listenTo'](_0x1b40b7,'change:bottom',()=>{this['_recalculate'](_0x1b40b7,'bottom');}),this['_alignToTargetRect'](_0x1b40b7);const _0x4697fb=this['_getItemBefore'](_0x1b40b7);return _0x4697fb&&this['_alignAfterItem'](_0x4697fb,_0x1b40b7)||this['_alignToTargetRect'](_0x1b40b7),this['_updateLastItem'](),this['view']['list']['add'](_0x1b40b7),_0x1b40b7;}['_alignForTopChange'](_0x250a48){if(!_0x250a48['content']['length'])return;const _0x474370=this['_getItemBefore'](_0x250a48);if(!_0x474370)return;const _0x29b9c9=this['_sidebarItemViewToAnnotation']['get'](_0x474370),_0x286b81=this['_activeAnnotation'];_0x286b81&&_0x286b81===_0x29b9c9?this['_alignAfterItem'](_0x474370,_0x250a48):this['_alignBeforeItem'](_0x250a48,_0x474370);}_alignForBottomChange(_0x1df3fe){if(!_0x1df3fe['content']['length'])return;const _0x14a761=this['_getItemAfter'](_0x1df3fe);if(!_0x14a761)return;const _0x1d0c70=this['_sidebarItemViewToAnnotation']['get'](_0x14a761),_0x3bec4c=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x254afa=this['_activeAnnotation'];_0x254afa&&_0x254afa===_0x1d0c70&&_0x3bec4c?(this['_alignBeforeItem'](_0x14a761,_0x1df3fe),this['_alignAfterItem'](_0x1df3fe,_0x14a761)):_0x254afa&&_0x254afa===_0x1d0c70?this['_alignBeforeItem'](_0x14a761,_0x1df3fe):this['_alignAfterItem'](_0x1df3fe,_0x14a761);}_recalculate(_0x38ea49,_0x538b3c){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x28cfb9,changedProp:_0x48c3e4}of this['_recalculateBuffer'])'top'===_0x48c3e4?this['_alignForTopChange'](_0x28cfb9):this['_alignForBottomChange'](_0x28cfb9);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x38ea49,'changedProp':_0x538b3c});}getSidebarItemView(_0x183431){return this['_annotationToSidebarItemView']['get'](_0x183431);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x539cff){const _0x4986ef=this['getSidebarItemView'](_0x539cff);this['stopListening'](_0x4986ef),this['stopListening'](_0x539cff['view']),_0x4986ef['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x539cff),this['_sidebarItemViewToAnnotation']['delete'](_0x4986ef);}_createSidebarView(){const _0xe15f54=new Ii(this['context']['locale']);return _0xe15f54['render'](),this['on']('change:_lastItem',(_0x1b252f,_0x4b1a35,_0x42f67a,_0x1974cd)=>{_0x1974cd&&_0xe15f54['unbind']('minHeight'),_0x42f67a?_0xe15f54['bind']('minHeight')['to'](_0x42f67a,'bottom'):_0xe15f54['minHeight']=null;}),_0xe15f54;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x37a288){const _0x2996f0=this['_sidebarItemViewToAnnotation']['get'](_0x37a288),_0x18fae9=_0x2996f0&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2996f0)-0x1);return _0x18fae9&&this['getSidebarItemView'](_0x18fae9)||null;}_getItemAfter(_0x36f51b){const _0x36e2c3=this['_sidebarItemViewToAnnotation']['get'](_0x36f51b),_0x18775d=_0x36e2c3&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x36e2c3)+0x1);return _0x18775d&&this['getSidebarItemView'](_0x18775d)||null;}_alignBeforeItem(_0x22792a,_0xa402e1){_0x22792a['updateHeight']();const _0x1fd0fe=Ni(_0xa402e1['bottom']+this['_spaceBetweenItems'],_0x22792a['top']);return!!_0x1fd0fe&&(this['_setItemTop'](_0xa402e1,_0xa402e1['top']-_0x1fd0fe),!0x0);}_alignAfterItem(_0x49e45e,_0x446628){_0x49e45e['updateHeight']();const _0x4f8a5f=Ni(_0x49e45e['bottom']+this['_spaceBetweenItems'],_0x446628['top']);return!!_0x4f8a5f&&(this['_setItemTop'](_0x446628,_0x446628['top']+_0x4f8a5f,!0x1),!0x0);}_alignToTargetRect(_0x118280){const _0xaa9966=this['_sidebarItemViewToAnnotation']['get'](_0x118280);if(!_0xaa9966||!_0xaa9966['target']||!_0xaa9966['targetRect'])return;const _0x12fff9=this['_getTargetTop'](_0xaa9966,_0xaa9966['targetRect']);this['_setItemTop'](_0x118280,_0x12fff9);}_getTargetTop(_0x5d2c99,_0x284841){if(null===_0x284841)return 0x0;if(_0x5d2c99['target']instanceof _0x1f4f60)return _0x284841['top'];{const _0x43690d=new _0x1f4f60(this['view']['element'])['top'];return _0x284841['top']-_0x43690d;}}_setItemTop(_0x3e06fc,_0x2900a3,_0x1dac37=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1dac37&&(_0x2900a3=Math['max'](_0x2900a3,this['_getMaxAvailableTop'](_0x3e06fc))),_0x3e06fc['top']=_0x2900a3;}_getMaxAvailableTop(_0x325789){let _0x3939d8=this['_getItemBefore'](_0x325789),_0x826bf1=0x0;for(;_0x3939d8;)_0x3939d8['updateHeight'](),_0x826bf1+=this['_spaceBetweenItems']+_0x3939d8['height'],_0x3939d8=this['_getItemBefore'](_0x3939d8);return _0x826bf1;}};function Ni(_0x520ebb,_0x19ae46){return Math['max'](_0x520ebb-_0x19ae46,0x0);}function Oi(_0x3291b8){return null!==_0x3291b8&&'object'==typeof _0x3291b8&&0x1===_0x3291b8['nodeType'];}var Mi=class extends _0xe32c07{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56001a){super(_0x56001a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5d687e(),this['_refreshPositioningDebounced']=_0x98290e(()=>{_0x56001a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x196bfe=this['context']['plugins']['get'](Ti),_0x4b844e=this['context']['plugins']['get'](ki);_0x196bfe['register']('wideSidebar',this),_0x4b844e['container']&&_0x196bfe['switchTo']('wideSidebar');}setActiveAnnotation(_0x5c0938){if(_0x5c0938===this['activeAnnotation'])return;const _0x228bd6=this['context']['plugins']['get'](ki);_0x228bd6['_activeAnnotation']=_0x5c0938;const _0xfd25bb=this['activeAnnotation'];_0x228bd6['refresh']({'blurredAnnotation':_0xfd25bb,'activatedAnnotation':_0x5c0938}),this['activeAnnotation']=_0x5c0938;}attach(_0x168ef4){this['annotations']=_0x168ef4;const _0x1a9c35=this['context']['plugins']['get'](ki);if(_0x1a9c35['_annotations']=_0x168ef4,this['isAttached'])throw new _0x3fd207('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1a9c35,'set:container',()=>{this['detach'](),this['listenTo'](_0x1a9c35,'change:container',_0x2a3fa0=>{_0x2a3fa0['off'](),this['attach'](_0x168ef4);});}),_0x1a9c35['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x26b899=_0x461326=>{_0x461326['updateTargetRect'](),_0x1a9c35['addAnnotation'](_0x461326);};for(const _0x26b095 of _0x168ef4)_0x26b899(_0x26b095);this['listenTo'](_0x168ef4,'add',(_0x4aaf99,_0x1e6470)=>{_0x26b899(_0x1e6470);}),this['listenTo'](_0x168ef4,'remove',(_0x3ab46b,_0x5248e3,_0x5ae7d6)=>{_0x1a9c35['rearrange']({'removedAnnotation':_0x5248e3,'previousAnnotation':_0x168ef4['get'](_0x5ae7d6-0x1),'nextAnnotation':_0x168ef4['get'](_0x5ae7d6+0x1)}),_0x5248e3===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x168ef4,'focus',(_0x2ad117,_0x53b5e9)=>{this['setActiveAnnotation'](_0x53b5e9);}),this['listenTo'](_0x168ef4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x49e330=this['context']instanceof _0x4d8ccf?this['context']['editors']:new _0x5d687e([this['context']]);for(const _0x593704 of _0x49e330)this['_integrateWithEditorAnnotations'](_0x593704);this['listenTo'](_0x49e330,'add',(_0x176d62,_0x1af1e0)=>{this['listenTo'](_0x1af1e0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1af1e0);});}),this['listenTo'](_0x49e330,'remove',(_0x33c659,_0x4ac1da)=>{_0x4ac1da['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4ac1da['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x3fd207('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2a68c7=this['context']['plugins']['get'](ki);_0x2a68c7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2a68c7),this['stopListening'](this['annotations']),this['context']instanceof _0x4d8ccf&&this['stopListening'](this['context']['editors']);for(const _0x1548f7 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1548f7);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x437480){if(!_0x437480['plugins']['has']('EditorAnnotations'))return;const _0x2e4fb2=_0x437480['plugins']['get']('EditorAnnotations'),_0x1f7b1b=()=>{const _0xae5da6=_0x2e4fb2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0xae5da6[0x0]||null);};this['listenTo'](_0x2e4fb2,'refresh',_0x1f7b1b),this['listenTo'](_0x2e4fb2,'blur',(_0x98427c,{isAnnotationTracked:_0x46a2f1})=>{this['activeAnnotation']&&_0x46a2f1(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2e4fb2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1d0c60=>{_0x2e4fb2['hasDomSelection']()&&(_0x1f7b1b(),_0x1d0c60['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2e4fb2);}_destroyEditorAnnotationsIntegration(_0x524b1f){this['stopListening'](_0x524b1f),this['_editorAnnotations']['remove'](_0x524b1f);}},Ri=class extends _0x422b1d{counterView;constructor(_0x18c667){super(_0x18c667);const _0x14a056=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x33a3a4,_0x571c31)=>_0x33a3a4?'...':_0x571c31['toString']()),this['set']('annotationType',''),this['icon']=_0x1aed3d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x14a056['to']('annotationType',_0x45f582=>'ck-annotation-counter__badge--'+_0x45f582),_0x14a056['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x14a056['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0xe32c07{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x45680c){super(_0x45680c),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x30f8a8())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5d687e(),this['_refreshPositioningDebounced']=_0x98290e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x456151(this['context']['locale']),this['balloonPanelView']=new _0x4f61cf(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x480aaa){this['annotations']=_0x480aaa;const _0x5ea8a9=this['context']['plugins']['get'](ki),_0xea2127=this['balloonPanelView'];if(_0x5ea8a9['_annotations']=_0x480aaa,this['isAttached'])throw new _0x3fd207('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5ea8a9,'set:container',()=>{this['detach'](),this['listenTo'](_0x5ea8a9,'change:container',_0x2ebab1=>{_0x2ebab1['off'](),this['attach'](_0x480aaa);});}),_0x5ea8a9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3bed31=_0x48037e=>{const _0x322434=new Ri(this['context']['locale']);_0x5ea8a9['addAnnotation'](_0x48037e,_0x322434),this['_annotationToNarrowView']['set'](_0x48037e,_0x322434),_0x322434['bind']('isDirty','annotationType','number')['to'](_0x48037e['view'],'isDirty','type','length'),_0x322434['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xea2127['content']['first']!==_0x48037e['view']?(this['_showBalloon'](_0x48037e),_0x48037e['view']['element']['focus'](),this['setActiveAnnotation'](_0x48037e)):this['setActiveAnnotation'](null);});};for(const _0x1e688f of _0x480aaa)_0x3bed31(_0x1e688f);this['listenTo'](_0x480aaa,'add',(_0x348449,_0x4aaed9)=>{_0x3bed31(_0x4aaed9);}),this['listenTo'](_0x480aaa,'remove',(_0x58f081,_0x31904b,_0x53faaf)=>{this['_annotationToNarrowView']['get'](_0x31904b)['destroy'](),this['_annotationToNarrowView']['delete'](_0x31904b),_0x5ea8a9['rearrange']({'removedAnnotation':_0x31904b,'previousAnnotation':_0x480aaa['get'](_0x53faaf-0x1),'nextAnnotation':_0x480aaa['get'](_0x53faaf+0x1)}),_0x31904b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x480aaa,'focus',(_0x37ceb9,_0x417395)=>{this['setActiveAnnotation'](_0x417395);}),this['listenTo'](_0x480aaa,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2027bb,_0x5cce6b)=>{_0x5cce6b['keyCode']===_0x5f035e['esc']&&_0xea2127['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xea2127['content']['first']),this['_hideBalloon'](),_0x5cce6b['stopPropagation'](),_0x5cce6b['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1d7144,_0x3848d4)=>{const _0x4bfb72=_0x3848d4['target'];_0xea2127['isVisible']&&_0xea2127['element']['contains'](_0x4bfb72)||_0x5ea8a9['view']['element']['contains'](_0x4bfb72)||_0x1d7144['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x23746d=>_0x23746d['contains'](_0x4bfb72))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xabf8bf=this['context']instanceof _0x4d8ccf?this['context']['editors']:new _0x5d687e([this['context']]);for(const _0x36ebe1 of _0xabf8bf)this['_integrateWithEditorAnnotations'](_0x36ebe1);this['listenTo'](_0xabf8bf,'add',(_0x189e8a,_0x2f42c8)=>{this['listenTo'](_0x2f42c8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2f42c8);});}),this['listenTo'](_0xabf8bf,'remove',(_0x54f8ce,_0x4a0e60)=>{_0x4a0e60['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4a0e60['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x36b2e1){if(_0x36b2e1===this['activeAnnotation'])return;const _0x363a57=this['context']['plugins']['get'](ki);_0x363a57['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x36b2e1,'disableAnimationOnActivatedAnnotation':!0x0}),_0x36b2e1&&_0x363a57['getSidebarItemView'](_0x36b2e1)?this['_showBalloon'](_0x36b2e1):this['_hideBalloon'](),this['activeAnnotation']=_0x36b2e1;}detach(){if(!this['isAttached'])throw new _0x3fd207('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3fa490=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5aa4ea=>_0x5aa4ea['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3fa490['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4d8ccf&&this['stopListening'](this['context']['editors']);for(const _0x589a76 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x589a76);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(_0x550ab2){if(!_0x550ab2['plugins']['has']('EditorAnnotations'))return;const _0x1f694a=_0x550ab2['plugins']['get']('EditorAnnotations'),_0x1597ba=this['context']['plugins']['get'](ki),_0xcdbb6f=this['annotations'],_0x73e863=this['balloonPanelView'],_0x4b64db=()=>{const _0x485f46=_0x1f694a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x485f46),this['setActiveAnnotation'](_0x485f46[0x0]||null);};this['listenTo'](_0x1f694a,'refresh',_0x4b64db),this['listenTo'](_0x1f694a,'blur',(_0x36f9c0,{isAnnotationTracked:_0x473745})=>{this['activeAnnotation']&&_0x473745(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1f694a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xcdbb6f,'blur',_0x4e6f55=>{_0x1f694a['hasDomSelection']()&&_0x4e6f55['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xeac3d,_0x2f0353)=>{const _0x656b7a=_0x2f0353['target'];_0x73e863['isVisible']&&_0x73e863['element']['contains'](_0x656b7a)||_0x1597ba['view']['element']['contains'](_0x656b7a)||this['activeAnnotation']&&_0x1f694a['hasDomSelection']()&&(_0x4b64db(),_0xeac3d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1f694a);}_destroyEditorAnnotationsIntegration(_0x199611){_0x199611&&(this['stopListening'](_0x199611),this['_editorAnnotations']['remove'](_0x199611));}_setSelectedAnnotations(_0x30fb77){for(const _0x523365 of this['_selectedAnnotations'])_0x30fb77['includes'](_0x523365)||this['_manuallyClosedAnnotationViews']['delete'](_0x523365['view']);this['_selectedAnnotations']=_0x30fb77;}_refreshPositioning(){const _0x52dc98=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x52dc98['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x45746f){if(this['_manuallyClosedAnnotationViews']['has'](_0x45746f['view']))return;const _0x11b304=this['balloonPanelView']['content']['first'];_0x11b304!==_0x45746f['view']?(_0x11b304&&this['_detachListeners'](_0x11b304),this['_attachListeners'](_0x45746f['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x45746f['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x15d92c=this['balloonPanelView']['content']['first'],_0x4bf81d=_0x15d92c&&this['annotations']['getByView'](_0x15d92c);if(!_0x4bf81d||!this['_annotationToNarrowView']['has'](_0x4bf81d))return;const _0x2e70c1=this['_annotationToNarrowView']['get'](_0x4bf81d)['element'],_0x2f18b7=(function(){const _0x2fdda0=_0x4f61cf['defaultPositions'];return[_0x2fdda0['southArrowNorthEast'],_0x2fdda0['northArrowSouthEast'],_0x2fdda0['southArrowNorth'],_0x2fdda0['northArrowSouth'],_0x2fdda0['southArrowNorthWest'],_0x2fdda0['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2e70c1,'positions':_0x2f18b7});}['_hideBalloon'](){const _0x83fc6c=this['balloonPanelView'],_0x22ad0f=_0x83fc6c['content']['first'];_0x22ad0f&&(this['_detachListeners'](_0x22ad0f),_0x83fc6c['unpin'](),_0x83fc6c['content']['clear']());}_attachListeners(_0x2575a7){this['listenTo'](_0x2575a7,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2575a7,'Esc',(_0x27b717,_0x39be9f)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2575a7),this['_hideBalloon'](),_0x39be9f();});}_detachListeners(_0x2ef4b3){this['stopListening'](_0x2ef4b3);}},xi=class extends _0x12b188{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0xbf878f,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x549051){super(_0x549051),_0x549051['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x549051['plugins']['get'](_0xbf878f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x98290e(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x4363b7=this['editor']['plugins']['get'](Ti);_0x4363b7['context']===this['editor']&&(_0x4363b7['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x2aa1c3,_0x185dae)=>{const _0x269a90=this['_balloon'];if(this['isAttached']&&_0x269a90['visibleView']){const _0x7dacd8=this['annotations']['getByView'](_0x269a90['visibleView']);_0x7dacd8&&this['_closeAnnotation'](_0x7dacd8),_0x185dae();}}));}afterInit(){const _0x1e9b2e=this['editor']['plugins']['get'](Ti);_0x1e9b2e['context']===this['editor']&&(_0x1e9b2e['hasActive']()||_0x1e9b2e['switchTo']('inline'));}setActiveAnnotation(_0x3fa98a){_0x3fa98a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3fa98a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3fa98a)&&this['_addAnnotationToBalloon'](_0x3fa98a,!0x0),_0x3fa98a['isActive']=!0x0),_0x3fa98a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3fa98a);}attach(_0x38689d){this['annotations']=_0x38689d;const _0x7356aa=this['editor']['plugins']['get'](Ti),_0xe1b156=this['_balloon'];if(this['isAttached'])throw new _0x3fd207('inlineannotations-attach-already-attached',this);if(_0x7356aa['context']!==this['editor'])throw new _0x3fd207('inlineannotations-not-allowed-with-context',this);const _0x39d723=this['editor']['plugins']['get'](di);this['listenTo'](_0x39d723,'refresh',()=>{const _0x219432=_0x39d723['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x90cdc1,_0x267023;!this['_forceRefresh']&&(_0x90cdc1=_0x219432,_0x267023=this['_selectedAnnotations'],_0x90cdc1['length']===_0x267023['length']&&_0x90cdc1['every'](_0x2d9363=>_0x267023['includes'](_0x2d9363)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x219432),this['setActiveAnnotation'](_0x219432[0x0]||null));}),this['listenTo'](_0x39d723,'blur',(_0x28c19e,{isAnnotationTracked:_0x31ae8f})=>{this['activeAnnotation']&&_0x31ae8f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x39d723,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x59eb4b,_0x3c5353,_0x500824)=>{_0x500824||this['setActiveAnnotation'](null);}),this['listenTo'](_0x38689d,'remove',(_0xb0c9d9,_0x4805c6)=>{this['_removeAnnotationFromBalloon'](_0x4805c6),_0x4805c6===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe1b156,'change:visibleView',(_0x120d05,_0x4f584b,_0x300056,_0x21984a)=>{_0x21984a&&this['stopListening'](_0x21984a);const _0x252842=_0x38689d['getByView'](_0x300056);_0x300056&&_0x252842&&(this['listenTo'](_0x300056,'change:height',()=>{_0xe1b156['updatePosition']();}),this['listenTo'](_0x300056,'Esc',()=>{this['_closeAnnotation'](_0x252842),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x252842&&this['setActiveAnnotation'](_0x252842));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xe1b156['visibleView']&&_0x38689d['getByView'](_0xe1b156['visibleView'])&&_0xe1b156['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 _0x3fd207('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xc856e4 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xc856e4);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x5486e3){for(const _0x3841d9 of this['_selectedAnnotations'])_0x5486e3['includes'](_0x3841d9)||this['_manuallyClosed']['delete'](_0x3841d9);for(const _0x266093 of this['annotations'])_0x5486e3['includes'](_0x266093)||this['_removeAnnotationFromBalloon'](_0x266093);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1771ad of _0x5486e3)this['_addAnnotationToBalloon'](_0x1771ad);}this['_selectedAnnotations']=_0x5486e3;}_addAnnotationToBalloon(_0xba3da6,_0x37c6d0=!0x1){this['_manuallyClosed']['has'](_0xba3da6)||(this['_addedAnnotations']['has'](_0xba3da6)||this['_balloon']['hasView'](_0xba3da6['view'])||(this['_addedAnnotations']['add'](_0xba3da6),this['_balloon']['add']({'stackId':_0xba3da6['view']['id'],'view':_0xba3da6['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xba3da6)}})),_0x37c6d0&&this['_balloon']['showStack'](_0xba3da6['view']['id']));}_getBalloonTargetForAnnotation(_0x52443e){const _0x8c004d=_0x52443e['target'],_0x28def3=this['editor']['editing']['view'],_0x32dd7f=_0x28def3['document']['selection']['getFirstRange'](),_0x42fc0d=_0x28def3['domConverter']['viewRangeToDom'](_0x32dd7f);if(_0x42fc0d['collapse'](!0x0),_0x8c004d){if(_0x8c004d instanceof _0x1f4f60)return _0x8c004d;let _0x3c630c=[];for(const _0x5a9d53 of _0x8c004d)_0x3c630c['push'](..._0x1f4f60['getDomElementRects'](_0x5a9d53));_0x3c630c=function(_0x1e2321){const _0x21f32a=[];let _0x1c3d0a=_0x1e2321[0x0];for(let _0x30d7d0=0x1;_0x30d7d0<_0x1e2321['length'];_0x30d7d0++)if(Pi(_0x1c3d0a,_0x1e2321[_0x30d7d0])){const _0xc17e12=_0x1e2321[_0x30d7d0]['width'];_0x1c3d0a['width']+=_0xc17e12,_0x1c3d0a['right']+=_0xc17e12;}else _0x21f32a['push'](_0x1c3d0a),_0x1c3d0a=_0x1e2321[_0x30d7d0];return _0x21f32a['push'](_0x1c3d0a),_0x21f32a;}(_0x3c630c);const _0x32067a=_0x42fc0d['getBoundingClientRect']();return _0x3c630c['find'](_0x3396e9=>_0x3396e9['top']<=_0x32067a['top']&&_0x3396e9['bottom']>=_0x32067a['bottom']&&_0x3396e9['left']<=_0x32067a['left']&&_0x3396e9['right']>=_0x32067a['right'])||_0x3c630c[0x0];}return _0x52443e['targetRect']||_0x42fc0d;}_removeAnnotationFromBalloon(_0x412843){this['_addedAnnotations']['has'](_0x412843)&&this['_balloon']['hasView'](_0x412843['view'])&&(this['_addedAnnotations']['delete'](_0x412843),this['_balloon']['remove'](_0x412843['view']));}_closeAnnotation(_0x4f3f0d){this['_manuallyClosed']['add'](_0x4f3f0d),this['_removeAnnotationFromBalloon'](_0x4f3f0d);}};function Pi(_0x187853,_0x4716f4){return _0x187853['top']===_0x4716f4['top']&&_0x187853['bottom']===_0x4716f4['bottom']&&_0x187853['right']===_0x4716f4['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x34e5e7,_0x1439eb){super(_0x34e5e7),this['set']('isEmpty',!_0x1439eb['length']),this['focusTracker']=new _0x4804cc(),this['_annotationViews']=_0x1439eb,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x1439eb,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1439eb,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1439eb,'remove',(_0xc12a24,_0x287171)=>{_0x287171['isActive']&&this['focus'](),_0x1439eb['length']||(this['isEmpty']=!0x0);});const _0x3144b5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x34e5e7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1439eb},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x3144b5['if']('isEmpty','ck-hidden',_0x1f7000=>!_0x1f7000)]},'children':[{'text':Et(_0x34e5e7,'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 _0xdaaaed of this['_annotationViews'])this['focusTracker']['add'](_0xdaaaed['element']);this['_annotationViews']['on']('change',(_0x49b36a,{added:_0x4af26b,removed:_0x552481})=>{for(const _0x307aea of _0x4af26b)this['focusTracker']['add'](_0x307aea['element']);for(const _0x5313ae of _0x552481)this['focusTracker']['remove'](_0x5313ae['element']);});}},Di=class extends _0xe32c07{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x1255cc){super(_0x1255cc),this['archivedThreads']=new _0x5d687e();}init(){const _0x2a48d2=this['context'],_0x3f9bc4=_0x2a48d2['plugins']['get'](oi),_0x3f66af=_0x2a48d2['plugins']['get'](ti);this['listenTo'](_0x3f9bc4,'addCommentThread',(_0x17e7e9,{threadId:_0x180d67})=>{const _0x26f360=_0x3f9bc4['getCommentThread'](_0x180d67);_0x26f360['archivedAt']&&this['archivedThreads']['add'](_0x26f360,this['_calculatePosition'](_0x26f360['archivedAt'])),this['listenTo'](_0x26f360,'change:archivedAt',(_0x268901,_0x317375,_0x3a9249)=>{_0x3a9249?this['archivedThreads']['has'](_0x26f360)||this['archivedThreads']['add'](_0x26f360,this['_calculatePosition'](_0x26f360['archivedAt'])):this['archivedThreads']['has'](_0x26f360)&&this['archivedThreads']['remove'](_0x26f360);});}),this['listenTo'](_0x3f9bc4,'removeCommentThread',(_0x471f09,{threadId:_0x24cb46})=>{const _0x943026=_0x3f9bc4['getCommentThread'](_0x24cb46);this['stopListening'](_0x943026),this['archivedThreads']['has'](_0x943026)&&this['archivedThreads']['remove'](_0x943026);},{'priority':'highest'}),this['listenTo'](_0x3f66af['collection'],'focus',(_0x36e88a,_0x5aac7a)=>{_0x5aac7a['isVisible']||(_0x5aac7a['isActive']=!0x0,_0x3f66af['activate'](_0x5aac7a));});}_calculatePosition(_0x53b549){const _0x1e4365=[...this['archivedThreads']]['findIndex'](_0x38f4d2=>_0x38f4d2['archivedAt']<_0x53b549);return _0x1e4365>-0x1?_0x1e4365:this['archivedThreads']['length'];}},Vi=class extends _0x12b188{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x3da253];}constructor(_0x1d8f5f){super(_0x1d8f5f),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x25d2f8=this['editor'],_0x8eb4c8=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x25d2f8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x422b1d,!0x0)),_0x25d2f8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x318e90=this['_createCommentsArchiveButton'](rt);return _0x318e90['set']({'role':'menuitemcheckbox'}),_0x318e90;});const _0x333640=_0x25d2f8['plugins']['get'](Di),_0x291174=_0x25d2f8['plugins']['get']('Annotations'),_0x17ca9b=_0x25d2f8['plugins']['get']('CommentsRepository');_0x333640['archivedThreads']['forEach'](_0x582a48=>{this['_handleNewThread'](_0x582a48);}),this['listenTo'](_0x333640['archivedThreads'],'add',(_0x36063c,_0x5af929)=>{this['_handleNewThread'](_0x5af929);}),this['listenTo'](_0x291174['collection'],'add',(_0x56121c,_0x2e70b1)=>{const _0x87e4f9=this['_pendingThreads']['find'](_0x42d216=>{const _0x13897e=_0x17ca9b['_threadToController']['get'](_0x42d216);return _0x13897e&&_0x2e70b1['innerView']===_0x13897e['view'];});if(_0x87e4f9){const _0x353c5a=this['_calculatePosition'](_0x87e4f9['archivedAt']);this['_addAnnotationToArchive'](_0x2e70b1,_0x353c5a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x87e4f9),0x1);}}),this['listenTo'](_0x333640['archivedThreads'],'remove',(_0x3d52ce,_0x66f670)=>{const _0x21f541=_0x25d2f8['config']['get']('collaboration.channelId');if(!_0x21f541||_0x66f670['channelId']===_0x21f541){if(this['_pendingThreads']['includes'](_0x66f670))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x66f670),0x1);else{const _0x4c428c=_0x17ca9b['_threadToController']['get'](_0x66f670),_0x3e22ee=_0x291174['getByInnerView'](_0x4c428c['view']);this['annotationViews']['remove'](_0x3e22ee['view']),this['stopListening'](_0x3e22ee),this['stopListening'](_0x3e22ee['focusableElements']);}}}),this['listenTo'](_0x291174['collection'],'add',(_0x285717,_0x1ef0fb)=>{this['listenTo'](_0x1ef0fb,'escape',_0x8eb4c8);}),this['listenTo'](_0x291174['collection'],'remove',(_0x26385a,_0xe073ad)=>{this['stopListening'](_0xe073ad,'escape',_0x8eb4c8);});}_addAnnotationToArchive(_0x550b0b,_0x4d106c){this['listenTo'](_0x550b0b,'set:isVisible',_0xa9d7eb=>{_0xa9d7eb['return']=!0x1,_0xa9d7eb['stop']();}),this['annotationViews']['add'](_0x550b0b['view'],_0x4d106c);}['_handleNewThread'](_0x55865e){const _0x67d8c9=this['editor']['plugins']['get']('CommentsRepository'),_0x297a8a=this['editor']['plugins']['get']('Annotations'),_0x565461=this['editor']['config']['get']('collaboration.channelId');if(!_0x565461||_0x55865e['channelId']===_0x565461){const _0x16b43a=_0x67d8c9['_threadToController']['get'](_0x55865e);if(!_0x16b43a)return void this['_pendingThreads']['push'](_0x55865e);const _0x3dd1d6=this['_calculatePosition'](_0x55865e['archivedAt']),_0x487738=_0x297a8a['getByInnerView'](_0x16b43a['view']);_0x487738['isVisible']&&_0x297a8a['_visibleAnnotations']['remove'](_0x487738),this['_addAnnotationToArchive'](_0x487738,_0x3dd1d6);}}_calculatePosition(_0x1b908d){const _0x106105=this['editor']['config']['get']('collaboration.channelId'),_0x3b03a0=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x26ec1c=>_0x26ec1c['channelId']===_0x106105)['findIndex'](_0x334baf=>_0x334baf['archivedAt']<_0x1b908d);return _0x3b03a0<0x0||_0x3b03a0>this['annotationViews']['length']?this['annotationViews']['length']:_0x3b03a0-0x1;}_toggleDialog(){const _0x30bcd9=this['editor'],_0xde210c=_0x30bcd9['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x30bcd9['locale'],this['annotationViews'])),'commentsArchive'===_0xde210c['id']?_0xde210c['hide']():_0xde210c['show']({'id':'commentsArchive','title':Et(_0x30bcd9['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2a22ba,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x56ba8b['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x2f69d5,_0x456ee3=!0x1){const _0x27d2a1=this['editor']['locale'],_0x5b2108=this['editor']['plugins']['get']('Dialog'),_0xad32d3=new _0x2f69d5(_0x27d2a1);return _0xad32d3['bind']('isEnabled')['to'](this,'isEnabled'),_0xad32d3['bind']('isOn')['to'](_0x5b2108,'id',_0x181cba=>'commentsArchive'===_0x181cba),_0xad32d3['set']({'label':Et(_0x27d2a1,'COMMENTS_ARCHIVE'),'icon':_0x2a22ba,'isToggleable':!0x0}),_0x456ee3&&(_0xad32d3['tooltip']=!0x0),this['listenTo'](_0xad32d3,'execute',()=>this['_toggleDialog']()),_0xad32d3;}_hideDialogOnAnnotationEscape=_0x9560af=>{const _0x459867=_0x9560af['source'];if(!this['annotationViews']['has'](_0x459867['view']))return;const _0xc09d99=this['editor']['plugins']['get']('Dialog');_0xc09d99['isOpen']&&'commentsArchive'===_0xc09d99['id']&&(_0xc09d99['hide'](),_0x9560af['stop']());};},Bi=class extends _0x12b188{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
23
+ import{Command as _0x194713,Context as _0x1c78f6,ContextPlugin as _0x5f4e9d,Editor as _0x140f80,PendingActions as _0x3c7197,Plugin as _0xa7d3b5}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x54f114,Collection as _0x3f2ff3,DomEmitterMixin as _0x2d3457,FocusTracker as _0x5f1934,KeystrokeHandler as _0x5696e7,ObservableMixin as _0x557063,Rect as _0xf183b0,diff as _0x48ef09,first as _0xb4ee13,getEnvKeystrokeText as _0x419492,keyCodes as _0x380231,priorities as _0x4d8996,scrollViewportToShowTarget as _0x4fae9b,toUnit as _0xc2c888,uid as _0x2b10ec}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x62e58b,ConfirmMixin as _0x48f8af,FOCUS_ANNOTATION_KEYSTROKE as _0x5a1a4b,LateFocusButtonView as _0xfc78f2,LateFocusDropdownButtonView as _0x441bb8,UserView as _0x3dfbb6,Users as _0x61109,getAllMarkersDomElementsSorted as _0x181d59,getDateTimeFormatter as _0x289d4c,hashObject as _0xe15998,setupThreadKeyboardNavigation as _0x4c9da3,surroundingMarkersDetector as _0x257a4f,trimHtml as _0x554f26}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x32e3b9,debounce as _0x321ed9,isEqual as _0x4a78fc,set as _0x148435,throttle as _0x578953,unset as _0x314129}from'es-toolkit/compat';import{IconAddComment as _0x73134a,IconCheck as _0x4831cc,IconCommentsArchive as _0x10e590,IconPencil as _0x274050,IconRemoveComment as _0x540b3a,IconThreeVerticalDots as _0x31ec97,IconUndo as _0x32381b}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x224b6c,BodyCollection as _0x1e397e,ButtonView as _0x2493c9,ContextualBalloon as _0x495e50,Dialog as _0x42472a,DialogViewPosition as _0x5d6d8a,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
+ _0x557063();var bt=class extends It{['model'];['view'];constructor(_0x2251bb,_0x4368b0){super(),this['model']=_0x2251bb,this['model']['_isAttached']=!0x0,this['view']=_0x4368b0,this['listenTo'](_0x4368b0,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4368b0,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4368b0,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4368b0,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4368b0,'addComment',(_0x4edf05,_0x3251c3)=>this['addComment'](_0x3251c3)),this['listenTo'](_0x4368b0,'updateComment',(_0x2aecc8,_0x301ac4,_0x3af892)=>this['updateComment'](_0x301ac4,_0x3af892)),this['listenTo'](_0x4368b0,'removeComment',(_0x59a1cb,_0x5343ad)=>this['removeComment'](_0x5343ad));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x760661){this['model']['addComment']({'content':_0x760661,'authorId':this['view']['_localUser']['id']});}updateComment(_0x15297f,_0x3214f9){this['model']['getComment'](_0x15297f)['update']({'content':_0x3214f9});}removeComment(_0x1a0a61){this['model']['getComment'](_0x1a0a61)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0xec88e5,_0x32f91b,_0x37f0e4){const t=_0xec88e5['t'];switch(_0x32f91b){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'},_0x37f0e4);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x37f0e4);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'},_0x37f0e4);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'},_0x37f0e4);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x37f0e4);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'},_0x37f0e4);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'},_0x37f0e4);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'},_0x37f0e4);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}var kt=class extends it{['main'];editable;constructor(_0x8e9ca8,_0x3bdb36){super(_0x8e9ca8);const _0x187464=_0x2b10ec();this['main']=this['createCollection'](),this['editable']=new st(_0x8e9ca8,_0x3bdb36,void 0x0,{'label':()=>Et(_0x8e9ca8,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x8e9ca8['uiLanguageDirection'],'lang':_0x8e9ca8['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x187464},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}},Nt=class extends tt{['view'];constructor(_0x3a38f5){super(_0x3a38f5),this['view']=new kt(_0x3a38f5['locale'],_0x3a38f5['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x40438d=this['editor']['editing']['view'],_0x391ac5=this['view']['editable'];_0x391ac5['name']=_0x40438d['document']['getRoot']()['rootName'],this['view']['render']();const _0x4eb1e4=_0x391ac5['element'];this['setEditableElement'](_0x391ac5['name'],_0x4eb1e4),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x40438d['attachDomRoot'](_0x4eb1e4),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x557063(_0x140f80);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x1b63e3={}){(_0x1b63e3=Object['assign']({},_0x1b63e3))['plugins']||(_0x1b63e3['plugins']=CommentEditor['defaultPlugins']),super(_0x1b63e3),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0x24c0f6=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x24c0f6))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4a0324=>{const _0x12b052=this['model']['document']['getRoot'](),_0xee7a98=_0x12b052&&_0x12b052['getChild'](_0x12b052['childCount']-0x1);_0x4a0324['setSelection'](_0xee7a98,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x566a95=this['editing']['view'],_0x3074b0=_0x566a95['document']['getRoot'](),_0x3dad3f=_0x3074b0['getChild'](0x0);_0x3074b0['childCount']>0x1||!_0x3dad3f||'p'!=_0x3dad3f['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x566a95,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3dad3f['placeholder']=this['placeholder']),ut({'view':_0x566a95,'element':_0x3dad3f,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3dad3f);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x1cc3e4,_0x126b19={}){super(_0x1cc3e4),this['editor']=null,this['_editorConfig']=_0x126b19,this['set']('value',_0x126b19['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x1cc3e4,'Reply...')),this['set']('submitLabel',Et(_0x1cc3e4,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x5696e7(),this['focusTracker']=new _0x5f1934(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xccb706=>!_0xccb706['defaultPrevented']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x73e7f0,_0x13421e)=>{this['cancelButtonView']['fire']('execute'),_0x13421e();}),this['keystrokes']['set']('Ctrl+Enter',(_0x1023f2,_0x3e5391)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3e5391());}),this['on']('submit',(_0x58fe08,_0x4ed712)=>{_0x4ed712['length']>0xfde8?(alert(Et(_0x1cc3e4,'TOO_LONG_COMMENT_ALERT',[_0x4ed712['length'],0xfde8])),_0x58fe08['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3c21db=this['editor'];this['element']['insertBefore'](_0x3c21db['ui']['element'],this['element']['firstChild']),_0x3c21db['model']['document']['on']('change',()=>this['value']=_0x3c21db['getData']()),_0x3c21db['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3c21db['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3032c9){-0x1===_0x3032c9?(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:_0x5f0bd6}=this,_0x13a48b=new _0x2493c9(_0x5f0bd6);return _0x13a48b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x13a48b['withText']=!0x0,_0x13a48b['bind']('label')['to'](this,'submitLabel'),_0x13a48b['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x13a48b['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x151b0f,_0x5d6c4e)=>!_0x5d6c4e&&!!_0x151b0f['trim']()),_0x13a48b;}_createCancelButton(){const {locale:_0x499edf}=this,_0xfdb9a9=new _0x2493c9(_0x499edf);return _0xfdb9a9['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xfdb9a9['label']=Et(_0x499edf,'Cancel'),_0xfdb9a9['withText']=!0x0,_0xfdb9a9['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xfdb9a9;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3a67e9=>{this['focusTracker']['add'](_0x3a67e9['element']);}),this['focusables']['on']('change',(_0x49ea68,_0x2d2be2)=>{for(const _0x5b2cee of Array['from'](_0x2d2be2['added'])['reverse']())this['focusTracker']['add'](_0x5b2cee['element']);});}},xt=class extends ht{constructor(_0x432799,_0xaca4c8,_0x3c031f){super(_0x432799),this['commentInputView']=new St(_0x432799,_0x3c031f),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0xbe43b6,_0x3db732)=>_0xbe43b6||!!_0x3db732),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 _0x3dfbb6(_0x432799,_0xaca4c8),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'](_0x31db53){this['commentInputView']['focus'](_0x31db53);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x683763,_0x2fdc2c)=>{const {submitButtonView:_0x40b339,cancelButtonView:_0x2d2110,editor:_0x1316f2}=this['commentInputView'];[_0x40b339['element'],_0x2d2110['element'],_0x1316f2?_0x1316f2['editing']['view']['getDomRoot']():null]['filter'](_0x16b606=>_0x16b606)['some'](_0x1593c0=>_0x1593c0['contains'](_0x2fdc2c['target']))||(this['focus'](),_0x2fdc2c['preventDefault']());});}},Pt=class extends ht{constructor(_0x3d4321){super(_0x3d4321);const _0x4e0f73=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4e0f73['to']('count',_0x590482=>Et(_0x3d4321,'NUMBER_OF_COMMENTS',_0x590482))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x24159c,_0xe38af0,_0x58c569){super(_0x24159c);const _0x2fe642=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xe38af0['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xe38af0,this['_config']=_0x58c569,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5f1934(),this['keystrokes']=new _0x5696e7(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4f2aa5=>this['commentViews']['map'](_0x49b12f=>_0x49b12f['element'])['includes'](_0x4f2aa5['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x24159c),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x141b5a=>_0x141b5a-this['_config']['maxCommentsWhenCollapsed']);for(const _0x31ea57 of _0xe38af0['comments'])this['_handleNewCommentModel'](_0x31ea57);this['_handleInfoComment'](),this['listenTo'](_0xe38af0['comments'],'add',(_0x5cf99c,_0x2e9560)=>{const _0x5ca7c2=this['_calculatePosition'](_0x2e9560);this['length']++,this['_handleNewCommentModel'](_0x2e9560,_0x5ca7c2),this['refreshVisibleViews']();}),this['listenTo'](_0xe38af0['comments'],'remove',(_0x1ab60c,_0x16ba93)=>{this['length']--,this['_handleRemoveCommentModel'](_0x16ba93),this['refreshVisibleViews']();}),this['listenTo'](_0xe38af0,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xe38af0,'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',_0x2fe642['if']('length','ck-hidden',_0x13abe6=>!_0x13abe6)],'aria-label':Et(_0x24159c,'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'](_0x510219){-0x1===_0x510219?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x19240f of this['commentViews'])_0x19240f['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x253d06,_0x1dd366){const _0x52c094=new this['_config']['CommentView'](this['locale'],_0x253d06,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x52c094['viewUid']=_0x253d06['id'],_0x52c094['delegate']('removeComment')['to'](this),_0x52c094['delegate']('updateComment')['to'](this),_0x52c094['delegate']('resolveCommentThread')['to'](this),_0x52c094['delegate']('editorReady')['to'](this),_0x52c094['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x52c094,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x52c094,_0x1dd366);}_calculatePosition(_0xce5aa8){const _0x1b615d=this['_model']['_findOptimalIndex'](_0xce5aa8);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xce5aa8['authoredAt']?_0x1b615d-0x1:_0x1b615d:_0x1b615d-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x9ff513={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x9ff513,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x9ff513));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x26dfed){const _0x32416e=this['commentViews']['remove'](_0x26dfed['id']);this['stopListening'](_0x32416e),_0x32416e['isEditMode']&&this['_updateHasDirtyComment'](),_0x32416e['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5858f4=>_0x5858f4['isEditMode']);}['_rearrangeCollapse'](){const _0x5c5ec6=function(_0x288104){const _0x14e923=new _0x3f2ff3();for(const _0x5b8b5a of _0x288104)_0x14e923['add'](_0x5b8b5a);return _0x14e923;}(this['commentViews']),_0x35e34e=this['_collapsedCommentsView']['count'];for(let _0x5e9052=0x1;_0x5e9052<=_0x35e34e;_0x5e9052++)_0x5c5ec6['remove'](0x1);for(const _0xbd0ff of _0x5c5ec6)_0xbd0ff['collapse']();_0x35e34e>0x0&&_0x5c5ec6['add'](this['_collapsedCommentsView'],0x1),Dt(_0x48ef09(Array['from'](this['visibleViews']),Array['from'](_0x5c5ec6)),this['visibleViews'],_0x5c5ec6);}['_rearrangeExpand'](){Dt(_0x48ef09(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x281e99 of this['visibleViews'])_0x281e99['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x2fd93b=>{this['focusTracker']['add'](_0x2fd93b['element']),this['keystrokes']['listenTo'](_0x2fd93b['element']);}),this['commentViews']['on']('change',(_0x544b0f,_0x30f4fa)=>{for(const _0x580647 of _0x30f4fa['removed'])this['focusTracker']['remove'](_0x580647['element']),this['keystrokes']['stopListening'](_0x580647['element']);for(const _0x35f63d of Array['from'](_0x30f4fa['added'])['reverse']())this['focusTracker']['add'](_0x35f63d['element']),this['keystrokes']['listenTo'](_0x35f63d['element']);});}};function Dt(_0x4a3e27,_0x5aee5f,_0x5e3f15){let _0x12a12c=0x0;for(const _0x3c82c4 of _0x4a3e27)switch(_0x3c82c4){case'insert':_0x5aee5f['add'](_0x5e3f15['get'](_0x12a12c),_0x12a12c),_0x12a12c++;break;case'delete':_0x5aee5f['remove'](_0x12a12c);break;case'equal':_0x12a12c++;}}var Vt=class extends ht{constructor(_0x545e90){super(_0x545e90);const _0x7274dc=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x7274dc['to']('contextValue',_0x539551=>Et(_0x545e90,'THREAD_CONTEXT_LABEL',_0x539551)),'tabindex':-0x1},'children':[{'text':_0x7274dc['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x12f620,_0x707161){super(_0x12f620);const _0x10a1f0=this['bindTemplate'];this['_model']=_0x707161,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5f1934(),this['keystrokes']=new _0x5696e7(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5e362a=>!!_0x5e362a),this['bind']('contextValue')['to'](this['_model'],'context',_0x44bc69=>_0x44bc69&&_0x44bc69['value']?this['_trimContextValue'](_0x44bc69['value']):Et(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x10a1f0['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 _0x3a3b3d=new _0x2493c9(this['locale']);return _0x3a3b3d['label']=Et(this['locale'],'Reopen'),_0x3a3b3d['tooltip']=Et(this['locale'],'Reopen'),_0x3a3b3d['icon']=_0x32381b,_0x3a3b3d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x405a00=>!_0x405a00),_0x3a3b3d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x10eacf,_0x2d5723)=>_0x10eacf&&_0x2d5723),_0x3a3b3d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3a3b3d;}_trimContextValue(_0x402fbe){if(_0x402fbe['length']<0x96)return _0x402fbe;const _0xbe6b08=_0x402fbe['lastIndexOf']('\x20',0x93);return _0x402fbe['substring'](0x0,_0xbe6b08>-0x1?_0xbe6b08:0x93)+'...';}_attachContextActions(){const _0x50490d=this['element']['querySelector']('.ck-context'),_0x339ee0=_0x50490d['querySelector']('.ck-context__value');this['listenTo'](_0x50490d,'mouseenter',()=>{_0x339ee0['offsetWidth']<_0x339ee0['scrollWidth']&&_0x50490d['classList']['add']('overlay');}),this['listenTo'](_0x50490d,'mouseleave',()=>{_0x50490d['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x34d317 of this['focusables'])this['focusTracker']['add'](_0x34d317['element']),this['keystrokes']['listenTo'](_0x34d317['element']);}_createContextView(){const _0x59a40d=new Vt(this['locale']);return _0x59a40d['bind']('contextValue')['to'](this),_0x59a40d;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x2f6068,_0x2428f4,_0x158c1b,_0x3d6612){super(_0x2f6068),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2428f4,this['_localUser']=_0x158c1b,this['_config']=_0x3d6612,this['commentThreadHeaderView']=new Bt(_0x2f6068,_0x2428f4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x62e58b(_0x2f6068,Et(_0x2f6068,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x2f6068,_0x2428f4,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3d6612)),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',(_0x2947ac,_0x3a11f0)=>_0x2947ac||!!_0x3a11f0),this['bind']('isUnlinked')['to'](_0x2428f4,'unlinkedAt',_0x287838=>!!_0x287838);let _0x48587c=null;const _0x333d45=()=>{const _0x3d2381=this['_model']['comments']['first']||null;_0x3d2381!==_0x48587c&&(_0x48587c&&this['stopListening'](_0x48587c,'change:content'),_0x48587c=_0x3d2381,_0x3d2381&&this['listenTo'](_0x3d2381,'change:content',_0x333d45));const _0x35b31b=_0x3d2381?_0x3d2381['author']['name']:this['_localUser']['name'],_0x437291=_0x3d2381?new DOMParser()['parseFromString'](_0x554f26(_0x3d2381['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x12f331=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x35b31b]);this['set']('ariaLabel',_0x437291?_0x12f331+'\x20'+_0x437291:_0x12f331);};this['listenTo'](this['_model']['comments'],'change',_0x333d45),_0x333d45(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5f1934(),this['keystrokes']=new _0x5696e7(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4ba4dd=>_0x4ba4dd['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x4c9da3(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x17fb92=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x176e14=_0x17fb92['commentInputView'];return _0x17fb92['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x176e14,'value',(_0x2b4916,_0x445451,_0x29abbe,_0x30d863,_0x18034a)=>!!_0x18034a||!!_0x30d863&&_0x29abbe&&!_0x445451||_0x2b4916&&_0x29abbe&&!_0x445451),_0x176e14['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3738d0,_0x179862,_0x5192e6)=>{let _0x137c9e;return _0x137c9e=_0x5192e6&&_0x179862?'Reply\x20to\x20reopen\x20discussion...':_0x3738d0?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x137c9e);}),_0x176e14['bind']('submitLabel')['to'](this,'length',_0x1bddd7=>Et(this['locale'],_0x1bddd7?'Reply':'Comment')),_0x176e14['on']('submit',(_0x1ad91c,_0x328f4e)=>{this['fire']('addComment',_0x328f4e),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x176e14['on']('cancel',()=>{this['focus']();}),_0x176e14['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x176e14['on']('cancel',_0x3b2061=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3b2061['stop']());}),this['on']('change:isActive',(_0x404eb3,_0x315795,_0x497415)=>{_0x497415||this['length']||_0x176e14['value']||this['fire']('removeCommentThread');}),_0x17fb92;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x48f8af(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x37ad9b,_0xbecd08,_0x173dd3,_0x56d550){super(_0x37ad9b,_0xbecd08,_0x173dd3,_0x56d550),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x37ad9b,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x40d1a0,_0x5c8996,_0x1c963b)=>{_0x1c963b||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x17dbe9,_0x12b665,_0x7da8e5)=>{_0x7da8e5&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x4b81e9=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4b81e9['if']('isActive','ck-thread--active'),_0x4b81e9['if']('isUnlinked','ck-thread--unlinked'),_0x4b81e9['to']('actionIndicator',_0x422669=>_0x422669?'ck-thread--'+_0x422669:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4b81e9['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 _0x205a76 of this['commentsListView']['commentViews'])_0x205a76['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x17a985}=this,_0x1e10be=this['commentsListView']['commentViews']['get'](0x0);_0x1e10be===this['_boundFirstCommentView']||_0x1e10be['isSystemComment']||(this['_boundFirstCommentView']=_0x1e10be,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1e10be,'actionIndicator',_0x47ff00=>'remove'===_0x47ff00?'remove':null),_0x1e10be['placeholder']=Et(_0x17a985,'Write\x20a\x20comment...'),_0x1e10be['removeButton']['on']('execute',_0x33eff5=>{_0x33eff5['stop'](),this['showConfirm'](Et(_0x17a985,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1e10be['focus']();}),_0x1e10be['actionBar']['add'](this['resolveButton'],0x0),_0x1e10be['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x18f0d2=new _0xfc78f2(this['locale']);return _0x18f0d2['label']=Et(this['locale'],'Resolve'),_0x18f0d2['tooltip']=Et(this['locale'],'Resolve'),_0x18f0d2['icon']=_0x4831cc,_0x18f0d2['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x18f0d2['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a3a8d=>!_0x2a3a8d),_0x18f0d2['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x119e9b,_0x37dd09)=>_0x119e9b&&!_0x37dd09),_0x18f0d2['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x18f0d2;}_updateArchivedThreadHeader(){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}},Wt=class extends ht{constructor(_0x487156){super(_0x487156),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x56c298,_0x9c1e72,_0xf5db2b)=>{this['element']['innerHTML']=_0xf5db2b;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x55ba61,_0x33ce37,_0x4f67a9){super(_0x55ba61),this['_model']=_0x33ce37,this['_config']=_0x4f67a9,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x33ce37,'content',_0x33ce37,'authoredAt',(_0x97a90,_0x3ca2a7)=>Et(_0x55ba61,'COMMENT_ARIA_LABEL',[_0x33ce37['author']['name'],_0x4f67a9['formatDateTime'](_0x3ca2a7),new DOMParser()['parseFromString'](_0x97a90,'text/html')['body']['textContent'],_0x33ce37['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x62e58b(_0x55ba61,Et(_0x55ba61,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x5f1934(),this['keystrokes']=new _0x5696e7(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x9aa103=>_0x9aa103['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async destroy(){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}switchToEditMode(){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}switchToDisplayMode(){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}getExternalCommentNote(){return'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x5330e9=new Wt(this['locale']);return _0x5330e9['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x5ef0b2,_0x51ecd8)=>_0x51ecd8?_0x554f26(_0x5ef0b2,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x5ef0b2),_0x5330e9;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x3de0aa=new St(this['locale'],this['_config']['editorConfig']);return _0x3de0aa['value']=this['_model']['content'],_0x3de0aa['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3de0aa['submitLabel']=Et(this['locale'],'Save'),_0x3de0aa['on']('submit',(_0x1108a7,_0x5ea5a4)=>{this['fire']('updateComment',this['_model']['id'],_0x5ea5a4),this['switchToDisplayMode'](),this['focus']();}),_0x3de0aa['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x3de0aa['once']('editorReady',()=>{_0x3de0aa['focus']();}),_0x3de0aa['createEditor'](),_0x3de0aa['delegate']('editorReady')['to'](this),_0x3de0aa['delegate']('editorDestroyed')['to'](this),_0x3de0aa;}_setupKeyboardNavigation(){const _0x53961c=this['element'];this['keystrokes']['listenTo'](_0x53961c);for(const _0x196ebc of this['focusables'])this['focusTracker']['add'](_0x196ebc['element']),this['keystrokes']['listenTo'](_0x196ebc['element']);this['focusables']['on']('change',(_0x194176,_0xd99ea)=>{for(const _0x4f6aca of _0xd99ea['removed'])this['focusTracker']['remove'](_0x4f6aca['element']),this['keystrokes']['stopListening'](_0x4f6aca['element']);for(const _0xff216b of _0xd99ea['added'])this['focusTracker']['add'](_0xff216b['element']),this['keystrokes']['listenTo'](_0xff216b['element']);}),this['keystrokes']['set']('enter',(_0x5161d9,_0x5b574e)=>{_0x53961c===_0x5161d9['target']&&(this['focusCycler']['focusFirst'](),_0x5b574e());}),this['keystrokes']['set']('esc',(_0x132143,_0x15ffb2)=>{_0x53961c!==_0x132143['target']&&(this['focus'](),_0x15ffb2());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x48f8af(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x241e69,_0x4bcfd9,_0x35a11b){super(_0x241e69,_0x4bcfd9,_0x35a11b),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x241e69,'Reply...')),this['bind']('authoredAt')['to'](_0x4bcfd9),this['bind']('resolvedAt')['to'](_0x4bcfd9),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 _0x3dfbb6(_0x241e69,_0x4bcfd9['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4bcfd9,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x59fd7b=this['bindTemplate'],_0xd17ca6=[{'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':_0x59fd7b['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x59fd7b['to']('authoredAt',_0x31f9ae=>this['_config']['formatDateTime'](_0x31f9ae))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x59fd7b['if']('isEditMode','ck-comment__actions--hidden'),_0x59fd7b['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']&&_0xd17ca6['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x59fd7b['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x59fd7b['if']('isEditMode','ck-comment--edit'),_0x59fd7b['if']('isSystemComment','ck-comment--info'),_0x59fd7b['to']('actionIndicator',_0x2c4cde=>_0x2c4cde?'ck-comment--'+_0x2c4cde:'')],'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':_0xd17ca6}]}]};}_createEditButton(){const _0xd45398=new _0x2493c9(this['locale']);return _0xd45398['label']=Et(this['locale'],'Edit'),_0xd45398['icon']=_0x274050,_0xd45398['withText']=!0x0,_0xd45398['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xd45398['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5c80d5=>!_0x5c80d5),_0xd45398['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xd45398['on']('execute',()=>this['switchToEditMode']()),_0xd45398;}_createRemoveButton(){const _0x4b9aad=new _0x2493c9(this['locale']);return _0x4b9aad['label']=Et(this['locale'],'Remove'),_0x4b9aad['icon']=_0x540b3a,_0x4b9aad['withText']=!0x0,_0x4b9aad['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4b9aad['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2fd20a=>!_0x2fd20a),_0x4b9aad['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4b9aad['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4b9aad;}_createDropdown(){const _0x347f03=ct(this['locale'],_0x441bb8),_0x1edeba=_0x347f03['panelView']['children'],_0x21ec26=new ot(this['locale']),_0x12e8e7=_0x347f03['bindTemplate'];dt(_0x347f03,()=>this['items']['find'](_0x18dca6=>_0x18dca6['isVisible'])),_0x347f03['extendTemplate']({'attributes':{'class':[_0x12e8e7['if']('isVisible','ck-hidden',_0x218e47=>!_0x218e47)]}});const _0x2ee8a2=(_0x590557,_0x3f373f=-0x1)=>{const _0x4a8f5d=new nt(this['locale']);_0x4a8f5d['children']['add'](_0x590557);const _0x59c1d6=_0x3f373f>-0x1?_0x3f373f:_0x21ec26['items']['length'];_0x21ec26['items']['add'](_0x4a8f5d,_0x59c1d6);const _0x199276=Array['from'](this['items']);_0x347f03['unbind']('isEnabled','isVisible'),_0x347f03['bind']('isEnabled')['toMany'](_0x199276,'isEnabled',(..._0x29ec61)=>_0x29ec61['some'](_0x4d4d5a=>_0x4d4d5a)),_0x347f03['bind']('isVisible')['toMany'](_0x199276,'isVisible',(..._0x3904bc)=>_0x3904bc['some'](_0x59ff39=>_0x59ff39));};_0x347f03['panelPosition']='sw',_0x347f03['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x31ec97});for(const _0x1f171f of this['items'])_0x2ee8a2(_0x1f171f);return _0x1edeba['add'](_0x21ec26),_0x347f03['listenTo'](this['items'],'add',(_0x4a5011,_0x2a26b1,_0x3fcf78)=>{_0x2ee8a2(_0x2a26b1,_0x3fcf78);}),_0x347f03['listenTo'](this['items'],'remove',(_0x3ad298,_0xb781ae,_0x211716)=>{_0x21ec26['items']['remove'](_0x211716);}),_0x347f03;}_attachActions(_0x5166ff,_0x3d3be9){const _0xae1053=_0x5166ff&&_0x5166ff['element'];_0xae1053&&(this['listenTo'](_0xae1053,'mouseenter',()=>this['actionIndicator']=_0x3d3be9),this['listenTo'](_0xae1053,'focus',()=>this['actionIndicator']=_0x3d3be9),this['listenTo'](_0xae1053,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0xae1053,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x1083e5=super['_createCommentInputView']();return _0x1083e5['bind']('placeholder')['to'](this),_0x1083e5;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x4e3535){const _0x2184ef=_0x578953(_0x4e3535,0x1e),_0x25668c=new MutationObserver(_0x253e06=>{for(const _0x18afa3 of _0x253e06)('attributes'==_0x18afa3['type']&&'class'==_0x18afa3['attributeName']||'childList'==_0x18afa3['type']||'characterData'==_0x18afa3['type'])&&_0x2184ef();});return{'attach'(_0x28d28d){_0x25668c['observe'](_0x28d28d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x25668c['disconnect'](),_0x2184ef['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x4f75b3,_0x1e9de7){super(_0x4f75b3),this['id']=_0x2b10ec(),this['focusTracker']=new _0x5f1934(),this['keystrokes']=new _0x5696e7(),this['keystrokes']['set']('Esc',(_0x3c9ceb,_0x5b9901)=>this['fire']('Esc',_0x5b9901)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x1e9de7),this['mainView']=_0x1e9de7;const _0x1031b7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1031b7['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 _0x2cbfff=this['element']['clientHeight'];_0x2cbfff&&(this['height']=_0x2cbfff);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x557063();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x226aac,target:_0x2a1132,type:_0x9e033e,isVisible:_0xcd2961=!0x0}){super(),this['view']=_0x226aac,this['view']['element']||this['view']['render'](),this['_type']=_0x9e033e,this['_target']=_0x2a1132,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3f2ff3([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xde535,_0x2214ca)=>{this['view']['focusTracker']['add'](_0x2214ca);}),this['focusableElements']['on']('remove',(_0x1158ad,_0x477aec)=>{this['view']['focusTracker']['remove'](_0x477aec);}),this['set']('isVisible',_0xcd2961);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x1c84f8=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x1c84f8),_0x1c84f8;}get targetRect(){const _0x1238dc=this['target'];if(null===_0x1238dc)return null;if(_0x1238dc instanceof _0xf183b0)return _0x1238dc;const _0x44dbb9=_0x1238dc['filter'](_0x3dfff2=>function(_0x8eff3e){return!!_0x8eff3e['offsetParent']||!!_0x8eff3e['getClientRects']()['item'](0x0);}(_0x3dfff2));return 0x0===_0x44dbb9['length']?null:_0xf183b0['getDomElementRects'](_0x44dbb9[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x126b7b){this['view']['isActive']=_0x126b7b,this['view']['mainView']['isActive']=_0x126b7b;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x3775f1){if(!(null===_0x3775f1||_0x3775f1 instanceof _0xf183b0||Array['isArray'](_0x3775f1)&&_0x3775f1['every'](_0x163e05=>zt(_0x163e05))))throw new _0x54f114('annotation-invalid-target',null,{'target':_0x3775f1});}_getNormalizedTarget(){const _0x243555='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x243555)?[_0x243555]:_0x243555;}};function zt(_0xb2da80){return null!==_0xb2da80&&'object'==typeof _0xb2da80&&'nodeType'in _0xb2da80&&0x1===_0xb2da80['nodeType'];}var Jt=class extends _0x3f2ff3{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x130215=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5f1934(),this['_focusTracker']['on']('change:isFocused',(_0x238a85,_0x4670c2,_0x2add49)=>{_0x2add49||this['fire']('blur');});for(const _0x428785 of _0x130215)this['add'](_0x428785);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x429b71){if(this['has'](_0x429b71))throw new _0x54f114('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x429b71['innerView'],_0x429b71),this['_viewToAnnotation']['set'](_0x429b71['view'],_0x429b71);for(const _0x10fa32 of _0x429b71['focusableElements'])this['_focusTracker']['add'](_0x10fa32);if(this['listenTo'](_0x429b71['focusableElements'],'add',(_0x2c1199,_0x4041ee)=>{this['_focusTracker']['add'](_0x4041ee);}),this['listenTo'](_0x429b71['focusableElements'],'remove',(_0x66b06f,_0x411116)=>{this['_focusTracker']['remove'](_0x411116);}),this['listenTo'](_0x429b71['view']['focusTracker'],'change:isFocused',(_0x279909,_0xf71c5b,_0x11993b)=>{_0x11993b&&this['fire']('focus',_0x429b71);}),_0x429b71['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x7ae62c of this)_0x7ae62c['updateTargetRect']();}const _0x4f536e=this['_getOrderInContent'](_0x429b71['view']['targetRect']);return super['add'](_0x429b71,_0x4f536e);}['remove'](_0x1423fe){if(!this['has'](_0x1423fe))throw new _0x54f114('annotationcollection-not-existing-item',null);this['stopListening'](_0x1423fe['view']['focusTracker']),this['stopListening'](_0x1423fe['focusableElements']);for(const _0x484bd3 of _0x1423fe['focusableElements'])this['_focusTracker']['remove'](_0x484bd3);return this['_viewToAnnotation']['delete'](_0x1423fe['view']),this['_innerViewToAnnotation']['delete'](_0x1423fe['innerView']),super['remove'](_0x1423fe);}getByInnerView(_0x4fbf68){return this['_innerViewToAnnotation']['get'](_0x4fbf68);}getByView(_0x3677ee){return this['_viewToAnnotation']['get'](_0x3677ee);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x294cb5 of this)_0x294cb5['updateTargetRect']();this['_sort']();}_sort(){const _0x25f4a4=Array['from'](this)['sort']((_0x344433,_0x71544c)=>Zt(_0x344433['view']['targetRect'],_0x71544c['view']['targetRect']));for(let _0x22ef3c=_0x25f4a4['length']-0x1;_0x22ef3c>0x0;_0x22ef3c--){const _0x4ac68a=_0x25f4a4[_0x22ef3c];_0x22ef3c!==this['getIndex'](_0x4ac68a)&&(this['remove'](_0x4ac68a),this['add'](_0x4ac68a));}}_getOrderInContent(_0x5e2335){let _0xb85f17=0x0;if(!_0x5e2335)return this['length'];for(const _0x149639 of this){const _0x4531e6=_0x149639['view']['targetRect'];if(_0x4531e6){if(Zt(_0x5e2335,_0x4531e6)<0x0)return _0xb85f17;_0xb85f17++;}}return _0xb85f17;}_areCachedRectsStale(){const _0x41e960=this['get'](0x0);if(!_0x41e960)return!0x1;const _0x4a81ba=_0x41e960['view']['targetRect'],_0x1b575e=_0x41e960['targetRect'];return!(!_0x4a81ba||!_0x1b575e)&&(_0x4a81ba['top']!==_0x1b575e['top']||_0x4a81ba['left']!==_0x1b575e['left']);}};function Qt({source:_0x19e5b2,target:_0x552024,filter:_0x489689}){for(const _0x218678 of _0x19e5b2)_0x489689(_0x218678)&&_0x552024['add'](_0x218678);_0x552024['listenTo'](_0x19e5b2,'add',(_0x4021e0,_0x3057bf)=>{_0x489689(_0x3057bf)&&_0x552024['add'](_0x3057bf);}),_0x552024['listenTo'](_0x19e5b2,'remove',(_0x32dc77,_0x5f00e7)=>{_0x552024['has'](_0x5f00e7)&&_0x552024['remove'](_0x5f00e7);});}function Zt(_0x1b20e9,_0x17602a){if(null===_0x1b20e9&&null===_0x17602a)return 0x0;if(null===_0x1b20e9)return-0x1;if(null===_0x17602a)return 0x1;const _0x3b4932=_0x1b20e9['top']-_0x17602a['top'];return 0x0==_0x3b4932?_0x1b20e9['left']-_0x17602a['left']:_0x3b4932;}var ti=class extends _0x5f4e9d{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xa082e5){if(super(_0xa082e5),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xa082e5 instanceof _0x140f80){const _0x59708f=_0xa082e5['locale'];_0xa082e5['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x59708f,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x59708f,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x59708f,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x59708f,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x59708f,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x59708f,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x59708f,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x392948){this['collection']['add'](_0x392948);}['remove'](_0x49e931){this['collection']['remove'](_0x49e931),_0x49e931['destroy']();}refreshVisibility(){for(const _0x105f55 of this['collection'])_0x105f55['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x56271){return this['collection']['getByInnerView'](_0x56271);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x32be0e of this['collection'])_0x32be0e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x323fc1){this['fire']('_activateAnnotation',_0x323fc1);}createAnnotation(_0x533163){return new $t(_0x533163);}createAnnotationView(_0x48ff5a,_0x426bae){return new qt(_0x48ff5a,_0x426bae);}_addActiveAnnotation(_0x249dc3){const _0xc38d9e=new Set(this['activeAnnotations']);_0xc38d9e['add'](_0x249dc3),this['activeAnnotations']=_0xc38d9e;}_removeActiveAnnotation(_0x14a1c5){const _0x2c0518=new Set(this['activeAnnotations']);_0x2c0518['delete'](_0x14a1c5),this['activeAnnotations']=_0x2c0518;}_bindAnnotationsToVisibleAnnotations(){const _0x3fd9c9=this['collection'],_0x51647d=this['_visibleAnnotations'];function _0x19ed0a(_0x56dbff){const _0x4b0df4=_0x56dbff['source'];_0x4b0df4['isVisible']&&!_0x51647d['has'](_0x4b0df4)?_0x51647d['add'](_0x4b0df4):!_0x4b0df4['isVisible']&&_0x51647d['has'](_0x4b0df4)&&_0x51647d['remove'](_0x4b0df4),_0x4b0df4['view']['focusTracker']['remove'](_0x4b0df4['view']['element']),_0x4b0df4['view']['focusTracker']['add'](_0x4b0df4['view']['element']);}this['listenTo'](_0x3fd9c9,'add',(_0x1168ec,_0x32b2e5)=>{_0x32b2e5['isVisible']&&_0x51647d['add'](_0x32b2e5),this['listenTo'](_0x32b2e5,'change:isVisible',_0x19ed0a);}),this['listenTo'](_0x3fd9c9,'remove',(_0x18bf0f,_0x22fa63)=>{_0x51647d['has'](_0x22fa63)&&_0x51647d['remove'](_0x22fa63),this['stopListening'](_0x22fa63,'change:isVisible',_0x19ed0a);});}_setupEnterAnnotationKeystroke(){const _0x432735=_0x101e0e=>{_0x101e0e['on']('ready',()=>{_0x101e0e['keystrokes']['set'](_0x5a1a4b,(_0x3cedd0,_0x21fadd)=>{const _0x2fde8d=_0xb4ee13(this['activeAnnotations']['values']());_0x2fde8d&&(_0x2fde8d['view']['focus'](),_0x21fadd());});});};this['context']instanceof _0x140f80?_0x432735(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5ac635,_0x445145)=>{_0x432735(_0x445145);});}_setupEscapeAnnotationHandling(){const _0x1f786e=_0x247ab0=>{const _0x2c6efd=_0x247ab0['source'],_0x19cc31=[];let _0xa82e96;if(Array['isArray'](_0x2c6efd['target'])){_0xa82e96=_0x2c6efd['target'][0x0],this['context']instanceof _0x140f80?_0x19cc31['push'](this['context']):this['context']['editors']&&_0x19cc31['push'](...this['context']['editors']);for(const _0x2d6bbc of _0x19cc31)for(const _0x439168 of _0x2d6bbc['editing']['view']['domRoots']['values']())if(_0x439168['contains'](_0xa82e96))return void _0x2d6bbc['editing']['view']['focus']();_0xa82e96['focus']();}};this['listenTo'](this['collection'],'add',(_0x5442ab,_0x4ae531)=>{this['listenTo'](_0x4ae531,'escape',_0x1f786e,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3f9f5f,_0x106316)=>{this['stopListening'](_0x106316,'escape',_0x1f786e);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x557063(),ni=/* #__PURE__ -- @preserve */
31
+ _0x557063();var oi=class extends _0x5f4e9d{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x3c7197,_0x61109];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x211159){super(_0x211159),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x38f391=this['context']['config'];_0x38f391['define']('comments.maxCommentsWhenCollapsed',0x2),_0x38f391['define']('comments.maxThreadTotalWeight',0x1f4),_0x38f391['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x38f391['define']('comments.CommentThreadView',Ut),_0x38f391['define']('comments.CommentView',Yt),_0x38f391['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x313c2a=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x36b4e2,_0x226bab)=>this['_addCommentThread'](_0x226bab)),this['on']('submitCommentThread',(_0x292d4f,_0x34085c)=>this['_submitCommentThread'](_0x34085c)),this['on']('resolveCommentThread',(_0x76d4af,_0x1405ba)=>this['_resolveCommentThread'](_0x1405ba)),this['on']('resolveCommentThread',(_0x469530,_0x48838c)=>this['_updateActiveAnnotation'](_0x48838c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x9394ad,_0x3d2807)=>this['_reopenCommentThread'](_0x3d2807)),this['on']('reopenCommentThread',(_0x3e38c6,_0x1bcc8b)=>this['_updateActiveAnnotation'](_0x1bcc8b),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4b2032,_0x5842f2)=>this['_removeCommentThread'](_0x5842f2)),this['on']('updateCommentThread',(_0xbd4149,_0xfcfda8)=>this['_updateCommentThread'](_0xfcfda8)),this['on']('updateCommentThread',(_0x434ca1,_0x33364d)=>this['_updateActiveAnnotation'](_0x33364d),{'priority':'lowest'}),this['on']('addComment',(_0x3decba,_0x14cfbe)=>this['_addComment'](_0x14cfbe)),this['on']('updateComment',(_0x1e0978,_0x5d26ee)=>this['_updateComment'](_0x5d26ee)),this['on']('removeComment',(_0x454e31,_0x26e342)=>this['_removeComment'](_0x26e342)),this['on']('addComment',(_0x41e8b7,{threadId:_0x1f36a2,isFromAdapter:_0x3a5883})=>{if(_0x3a5883)return;const _0x3c3bea=this['getCommentThread'](_0x1f36a2),_0xc3b4b1=_0x3c3bea&&this['_threadToController']['get'](_0x3c3bea);_0xc3b4b1&&_0xc3b4b1['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x313c2a,'change:activeAnnotations',(_0x15e2dc,_0x38670c,_0x5359fe)=>{const _0x128888=Array['from'](_0x5359fe)['map'](_0x2ecca2=>this['_viewToController']['get'](_0x2ecca2['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x128888?_0x128888['model']:null;});}set adapter(_0x4ffd99){if(this['_adapter'])throw new _0x54f114('commentsrepository-adapter-already-set');this['_adapter']=_0x4ffd99;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x1f989e=ii,threadId:_0x10b197=_0x2b10ec(),comments:_0x5ca637=[],unlinkedAt:_0x3ac23f=null,resolvedAt:_0x19be88=null,resolvedBy:_0x5abeab=null,target:_0x3b98a0=null,context:_0x650448=null,attributes:_0x10bcd0={},isResolvable:_0x5d35e2=!0x0,isSubmitted:_0x4d58b3=!0x1,isFromAdapter:_0x59c6bb=!0x1}={}){return this['fire'](ai('addCommentThread',_0x1f989e),{'channelId':_0x1f989e,'threadId':_0x10b197,'comments':_0x5ca637,'unlinkedAt':_0x3ac23f,'resolvedAt':_0x19be88,'resolvedBy':_0x5abeab,'target':_0x3b98a0,'context':_0x650448,'attributes':_0x10bcd0,'isFromAdapter':_0x59c6bb,'isResolvable':_0x5d35e2,'isSubmitted':_0x4d58b3}),this['getCommentThread'](_0x10b197);}openNewCommentThread({channelId:_0xdf9548=ii,threadId:_0x64cf42=_0x2b10ec(),target:_0x367a2d,context:_0x33c876=null,isResolvable:_0x64078e=!0x0}){if(this['_readOnlyChannels']['has'](_0xdf9548)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x367a2d)throw new _0x54f114('commentsrepository-missing-target');const _0x1ac5dd=this['addCommentThread']({'channelId':_0xdf9548,'threadId':_0x64cf42,'target':_0x367a2d,'context':_0x33c876,'isResolvable':_0x64078e});if(!_0x1ac5dd)return null;const _0x1223b1=this['_threadToController']['get'](_0x1ac5dd),_0x1b2695=_0x1223b1['view']['commentThreadInputView']['commentInputView'],_0x2b7a82=this['context']['plugins']['get'](ti),_0xcb2d80=_0x2b7a82['getByInnerView'](_0x1223b1['view']);return _0x2b7a82['activate'](_0xcb2d80),_0x1b2695['once']('editorReady',()=>_0x1b2695['focus']()),_0x1ac5dd;}hasCommentThread(_0x156047){if('string'!=typeof _0x156047)throw new _0x54f114('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x156047);}updateCommentThread({channelId:_0x3c94a5=ii,threadId:_0x35eb35,context:_0x42415e,unlinkedAt:_0x1d69d1,attributes:_0x38915d,isFromAdapter:_0x225786=!0x1}){return this['fire'](ai('updateCommentThread',_0x3c94a5),{'channelId':_0x3c94a5,'threadId':_0x35eb35,'context':_0x42415e,'unlinkedAt':_0x1d69d1,'attributes':_0x38915d,'isFromAdapter':_0x225786}),this['getCommentThread'](_0x35eb35);}getCommentThread(_0x191386){if('string'!=typeof _0x191386)throw new _0x54f114('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x191386);}fetchCommentThread({channelId:_0x83877a,threadId:_0x12ba6f}={}){const _0xd20645=this['getCommentThread'](_0x12ba6f);if(_0xd20645)return Promise['resolve'](_0xd20645);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x54f114('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x83877a,'threadId':_0x12ba6f})['then'](_0x849571=>this['hasCommentThread'](_0x12ba6f)?this['getCommentThread'](_0x12ba6f):_0x849571?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x83877a},_0x849571)):void 0x0)['catch'](_0x468173=>{throw console['error'](_0x468173),new _0x54f114('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0xd5a285,skipNotAttached:_0xb3463=!0x1,skipEmpty:_0x109ec8=!0x1,toJSON:_0x20323c=!0x1}={}){const _0xa572dd=[];for(const _0xdbac07 of this['_threads']['values']())_0xd5a285&&_0xdbac07['channelId']!==_0xd5a285||_0xb3463&&!_0xdbac07['isAttached']||_0x109ec8&&0x0===_0xdbac07['length']||_0xa572dd['push'](_0xdbac07);return _0x20323c?_0xa572dd['map'](_0x4a57dc=>_0x4a57dc['toJSON']()):_0xa572dd;}getAnnotationForCommentThread(_0x92408d){const _0x3af9d3=this['_threadToController']['get'](_0x92408d);return _0x3af9d3&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x3af9d3['view'])||null;}getCommentThreadForAnnotation(_0xb1db3c){const _0x121ceb=this['_viewToController']['get'](_0xb1db3c['innerView']);return _0x121ceb?_0x121ceb['model']:null;}setActiveCommentThread(_0x20e7fc){const _0x426d9c=this['context']['plugins']['get'](ti);if(!_0x20e7fc)return void(this['activeCommentThread']&&_0x426d9c['deactivateAll']());const _0x3904ad=this['getCommentThread'](_0x20e7fc);if(!_0x3904ad)throw new _0x54f114('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x20e7fc});if(!this['_threadToController']['has'](_0x3904ad))throw new _0x54f114('commentsrepository-active-not-attached',null,{'threadId':_0x20e7fc});const _0x1877fb=_0x426d9c['getByInnerView'](this['_threadToController']['get'](_0x3904ad)['view']);_0x426d9c['activate'](_0x1877fb);}switchReadOnly(_0x6469d1,_0x465554){_0x6469d1?this['_readOnlyChannels']['add'](_0x465554):this['_readOnlyChannels']['delete'](_0x465554),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x50da59){return this['_readOnlyChannels']['has'](_0x50da59)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x2dc58c,_0x674b70){return new bt(_0x2dc58c,_0x674b70);}setPermissions(_0xbcf59d,_0x2fedd2=ii){this['_permissions']['set'](_0x2fedd2,_0xbcf59d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x67d79c=ii){return this['_permissions']['has'](_0x67d79c)?this['_permissions']['get'](_0x67d79c):ei;}_addCommentThread({channelId:_0x59cbdc,threadId:_0x29a4c6,comments:_0x3a0ea5,unlinkedAt:_0x32b8aa,resolvedAt:_0x5dae9c,resolvedBy:_0xdec037,target:_0x4acb5f,context:_0x4d9883,attributes:_0x4a84fb,isFromAdapter:_0x1d4ca9,isResolvable:_0x8e2f8c,isSubmitted:_0x3441a1}){if('string'!=typeof _0x29a4c6)throw new _0x54f114('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x29a4c6});if(this['hasCommentThread'](_0x29a4c6))throw new _0x54f114('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x29a4c6});const _0x9a1f0f=new ri(this,{'channelId':_0x59cbdc,'id':_0x29a4c6,'context':_0x4d9883,'attributes':_0x4a84fb,'unlinkedAt':_0x32b8aa,'resolvedAt':_0x5dae9c,'resolvedBy':_0xdec037?this['context']['plugins']['get'](_0x61109)['getUser'](_0xdec037):null,'isResolvable':_0x8e2f8c,'isSubmitted':_0x3441a1||_0x1d4ca9});this['_threads']['set'](_0x29a4c6,_0x9a1f0f);for(const _0x5ce8aa of _0x3a0ea5)_0x9a1f0f['_add'](this['_createNewComment']({'threadId':_0x29a4c6,..._0x5ce8aa}));return _0x4acb5f&&_0x9a1f0f['attachTo'](_0x4acb5f),_0x1d4ca9||!_0x9a1f0f['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x59cbdc,'threadId':_0x29a4c6});}_submitCommentThread({channelId:_0xf69b3f,threadId:_0x12a35c}){if(!this['hasCommentThread'](_0x12a35c))throw new _0x54f114('commentsrepository-missing-comment-thread',this);const _0x442e5d=this['getCommentThread'](_0x12a35c);if(_0x442e5d['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x395ac1,comments:_0x43bb36,resolvedAt:_0x536cf9,resolvedBy:_0x4e46b6,context:_0x1dd6a5,attributes:_0x4f6774}=_0x442e5d,_0x52afb9=this['context']['plugins']['get']('PendingActions'),_0x2c9c5c=_0x52afb9['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0xf69b3f,'threadId':_0x395ac1,'comments':_0x43bb36['map'](_0x26d174=>_0x26d174['toJSON']()),'resolvedAt':_0x536cf9,'resolvedBy':_0x4e46b6?_0x4e46b6['id']:_0x4e46b6,'context':_0x1dd6a5,'attributes':_0x4f6774})['then'](({comments:_0x5e70d8})=>{_0x52afb9['remove'](_0x2c9c5c);for(const _0x2d7726 of _0x5e70d8)this['_updateComment']({'channelId':_0xf69b3f,'threadId':_0x12a35c,'commentId':_0x2d7726['commentId'],'createdAt':_0x2d7726['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3f22ef=>{throw console['error'](_0x3f22ef),new _0x54f114('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x2925ba,target:_0x51ceb8}){const _0x5d7d51=this['getCommentThread'](_0x2925ba);if(!_0x5d7d51)throw new _0x54f114('commentsrepository-attach-missing-comment-thread',this);const _0x4157f7=this['context']['plugins']['get']('PendingActions'),_0x3908f9=this['context']['plugins']['get'](ti),_0x35e652=this['_createCommentThreadView'](_0x5d7d51),_0x2036e1=new bt(_0x5d7d51,_0x35e652);let _0x119b7b=null;_0x35e652['on']('change:isDirty',(_0xf94e44,_0x5cef24,_0x1a8b0e)=>{_0x1a8b0e?_0x119b7b=_0x4157f7['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x119b7b&&(_0x4157f7['remove'](_0x119b7b),_0x119b7b=null);}),this['_threadToController']['set'](_0x5d7d51,_0x2036e1),this['_viewToController']['set'](_0x35e652,_0x2036e1);const _0x1a88d6=new qt(this['context']['locale'],_0x35e652);_0x1a88d6['bind']('length')['to'](_0x35e652),_0x1a88d6['bind']('isDirty')['to'](_0x35e652,'isDirty',_0x35e652,'length',(_0x41cd4b,_0x297e45)=>_0x41cd4b||!_0x297e45),_0x1a88d6['bind']('isActive')['to'](_0x35e652),_0x1a88d6['type']='comment';const _0x47a7e2=new $t({'view':_0x1a88d6,'target':_0x51ceb8,'type':'comment','isVisible':!_0x5d7d51['archivedAt']&&!!('function'==typeof _0x51ceb8?_0x51ceb8():_0x51ceb8)});return _0x35e652['on']('escape',()=>{_0x47a7e2['fire']('escape');}),this['_bindAnnotationToEditors'](_0x35e652,_0x47a7e2),_0x3908f9['add'](_0x47a7e2),_0x47a7e2;}_bindAnnotationToEditors(_0x2f1d38,_0x47da02){this['listenTo'](_0x2f1d38,'editorReady',(_0x3937a6,_0xf5de2b)=>{const _0x383f71=_0xf5de2b['ui']['view']['body']['bodyCollectionContainer'];_0x47da02['focusableElements']['add'](_0x383f71),this['context']instanceof _0x140f80&&this['context']['ui']['focusTracker']['add'](_0x383f71);},{'priority':'highest'}),this['listenTo'](_0x2f1d38,'editorDestroyed',(_0x3f3386,_0x47145b)=>{const _0x219948=_0x47145b['ui']['view']['body']['bodyCollectionContainer'];_0x47da02['focusableElements']['has'](_0x219948)&&_0x47da02['focusableElements']['remove'](_0x219948),this['context']instanceof _0x140f80&&this['context']['ui']['focusTracker']['remove'](_0x219948);});}_unbindEditors(_0x169e2e){this['stopListening'](_0x169e2e,'editorReady'),this['stopListening'](_0x169e2e,'editorDestroyed');}_createCommentThreadView(_0x30f2a7){const _0x231862=this['context']['plugins']['get'](_0x61109),{config:_0xbdb3b6,locale:_0x40517f}=this['context'],_0x410629=_0x289d4c(_0xbdb3b6['get']('locale'),_0x40517f);return new(0x0,(_0xbdb3b6['get']('comments'))['CommentThreadView'])(_0x40517f,_0x30f2a7,_0x231862['me'],{'editorConfig':{..._0xbdb3b6['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xbdb3b6['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xbdb3b6['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xbdb3b6['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xbdb3b6['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x410629,'CommentView':_0xbdb3b6['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x585023,channelId:_0x1900f9,resolvedAt:_0x593e80,resolvedBy:_0x1b62b5,isFromAdapter:_0xded527}){if(!this['hasCommentThread'](_0x585023))throw new _0x54f114('commentsrepository-missing-comment-thread',null,{'threadId':_0x585023});const _0x2a4804=this['getCommentThread'](_0x585023);if(_0x2a4804['isResolved'])throw new _0x54f114('commentsrepository-resolved-comment-thread',null,{'threadId':_0x585023});const _0x1bdaac=this['context']['plugins']['get'](_0x61109);if(_0x2a4804['resolvedBy']=_0x1bdaac['getUser'](_0x1b62b5),_0x2a4804['resolvedAt']=_0x593e80,_0xded527||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3f9b44=this['context']['plugins']['get']('PendingActions'),_0x39dc94=_0x3f9b44['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1900f9,'threadId':_0x585023})['then'](({resolvedAt:_0x5548ed,resolvedBy:_0x390992})=>{_0x3f9b44['remove'](_0x39dc94),_0x2a4804['resolvedBy']['id']!==_0x390992&&(_0x2a4804['resolvedBy']=_0x1bdaac['getUser'](_0x390992)),_0x2a4804['resolvedAt']=_0x5548ed;})['catch'](_0x1b98e5=>{throw console['error'](_0x1b98e5),new _0x54f114('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x2fa1ea,channelId:_0x18ff8f,isFromAdapter:_0x4abc7b}){if(!this['hasCommentThread'](_0x2fa1ea))throw new _0x54f114('commentsrepository-missing-comment-thread',null,{'threadId':_0x2fa1ea});const _0x248629=this['getCommentThread'](_0x2fa1ea);if(!_0x248629['isResolved'])throw new _0x54f114('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2fa1ea});if(_0x248629['resolvedBy']=null,_0x248629['resolvedAt']=null,_0x4abc7b||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x67a263=this['context']['plugins']['get']('PendingActions'),_0x2b75b5=_0x67a263['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x18ff8f,'threadId':_0x2fa1ea})['then'](()=>_0x67a263['remove'](_0x2b75b5))['catch'](_0x395ec7=>{throw console['error'](_0x395ec7),new _0x54f114('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x56ddc7,isFromAdapter:_0x303c83}){const _0x54641c=this['getCommentThread'](_0x56ddc7);if(!_0x54641c)throw new _0x54f114('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x56ddc7),this['_threads']['delete'](_0x56ddc7),!_0x54641c['isSubmitted']||_0x303c83||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x35bd37=this['context']['plugins']['get']('PendingActions'),{channelId:_0x37e3a0}=_0x54641c,_0x4e4543=_0x35bd37['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x37e3a0,'threadId':_0x56ddc7})['then'](()=>_0x35bd37['remove'](_0x4e4543))['catch'](_0x1a7e9e=>{throw console['error'](_0x1a7e9e),new _0x54f114('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x1d7313,unlinkedAt:_0x20f8e2,context:_0xcc25b6,attributes:_0x3f003d,isFromAdapter:_0x33bd64}){if('string'!=typeof _0x1d7313)throw new _0x54f114('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1d7313});if(!this['hasCommentThread'](_0x1d7313))throw new _0x54f114('commentsrepository-missing-comment-thread',null,{'threadId':_0x1d7313});const _0x19a3cb=this['getCommentThread'](_0x1d7313);let _0x16a068=!0x1;if(void 0x0!==_0xcc25b6&&_0x19a3cb['context']!==_0xcc25b6&&(_0x19a3cb['context']=_0xcc25b6,_0x16a068=!0x0),void 0x0!==_0x20f8e2&&_0x19a3cb['unlinkedAt']!==_0x20f8e2&&(_0x19a3cb['unlinkedAt']=_0x20f8e2,_0x16a068=!0x0),_0x3f003d&&!_0x4a78fc(_0x3f003d,_0x19a3cb['attributes'])&&(_0x19a3cb['attributes']=_0x3f003d,_0x16a068=!0x0),!_0x16a068)return Promise['resolve']();if(!_0x19a3cb['isSubmitted']||_0x33bd64||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x233dc5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4d0e0a}=_0x19a3cb,_0x25e177=_0x233dc5['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4d0e0a,'threadId':_0x1d7313,'context':_0xcc25b6,'unlinkedAt':_0x20f8e2,'attributes':_0x3f003d})['then'](()=>_0x233dc5['remove'](_0x25e177))['catch'](_0xae1496=>{throw console['error'](_0xae1496),new _0x54f114('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x1ec6f9){const _0x1a4032=this['context']['plugins']['get'](ti),_0x2efbca=this['getCommentThread'](_0x1ec6f9);if(_0x2efbca['_isAttached']=!0x1,this['_threadToController']['has'](_0x2efbca)){const _0x349d57=this['_threadToController']['get'](_0x2efbca),_0x52eb45=_0x349d57['view'],_0xa9714a=_0x1a4032['getByInnerView'](_0x52eb45);this['_threadToController']['delete'](_0x2efbca),this['_viewToController']['delete'](_0x52eb45),_0xa9714a&&_0x1a4032['remove'](_0xa9714a),_0x349d57['destroy'](),_0x52eb45['destroy']()['then'](()=>{this['_unbindEditors'](_0x52eb45);});}}_updateActiveAnnotation({threadId:_0x1525db,resolvedAt:_0x27f8ff,unlinkedAt:_0x13522e}){const _0x422509=!!_0x27f8ff,_0x5c40fb=this['context']['plugins']['get'](ti),_0x553ec8=this['getCommentThread'](_0x1525db);if(this['_threadToController']['has'](_0x553ec8)){const _0x352ae8=this['_threadToController']['get'](_0x553ec8)['view'],_0x59c418=_0x5c40fb['getByInnerView'](_0x352ae8);_0x59c418&&(_0x422509&&_0x5c40fb['_removeActiveAnnotation'](_0x59c418),_0x13522e?_0x59c418['isVisible']=!0x1:_0x59c418['refreshVisibility']());}}_getExternalAuthor(_0x43a0c9){const _0xf00b75=this['context']['plugins']['get'](_0x61109),_0xc3419b=_0xe15998('external:'+_0x43a0c9),_0x1fff1e=_0xf00b75['getUser'](_0xc3419b);return _0x1fff1e||_0xf00b75['addUser']({'id':_0xc3419b,'name':_0x43a0c9});}_createNewComment({threadId:_0xd4e07c,commentId:_0x2c9b49=_0x2b10ec(),content:_0x20bd08,authorId:_0x516340,createdAt:_0x18d125,attributes:_0x10f01b}){if('string'!=typeof _0x2c9b49)throw new _0x54f114('commentsrepository-invalid-commentid');if('string'!=typeof _0x516340)throw new _0x54f114('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x20bd08||!_0x20bd08['trim']())throw new _0x54f114('commentsrepository-invalid-comment-content');const _0x5ac3da=this['context']['plugins']['get'](_0x61109)['getUser'](_0x516340);if(!_0x5ac3da)throw new _0x54f114('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x516340});let _0x31e2af=null,_0x4fd33b=_0x18d125;return _0x10f01b?.['@external']&&(_0x31e2af=this['_getExternalAuthor'](_0x10f01b['@external']['authorName']),_0x4fd33b=new Date(_0x10f01b['@external']['createdAt'])),new hi(this,{'threadId':_0xd4e07c,'id':_0x2c9b49,'author':_0x31e2af||_0x5ac3da,'creator':_0x5ac3da,'content':_0x20bd08,'createdAt':_0x18d125,'authoredAt':_0x4fd33b,'attributes':_0x10f01b});}_addComment(_0x5e7be8){let {threadId:_0x1e3d9b,content:_0x5740ac,attributes:_0x4de427,isFromAdapter:_0x34778c}=_0x5e7be8;const _0x55dc77=this['getCommentThread'](_0x5e7be8['threadId']);if(!_0x55dc77)throw new _0x54f114('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x40e611=this['_createNewComment'](_0x5e7be8),{id:_0x5d4ab5}=_0x40e611;if(_0x55dc77['_add'](_0x40e611),_0x34778c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x55dc77['isSubmitted'])return Promise['resolve']();const _0x17d8c5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ad49c}=_0x55dc77,_0x581ff7=_0x17d8c5['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4de427||(_0x4de427={}),this['adapter']['addComment']({'channelId':_0x1ad49c,'threadId':_0x1e3d9b,'commentId':_0x5d4ab5,'content':_0x5740ac,'attributes':_0x4de427})['then'](_0x5a9de3=>{_0x17d8c5['remove'](_0x581ff7),_0x5a9de3&&this['_updateComment']({'channelId':_0x1ad49c,'threadId':_0x1e3d9b,'commentId':_0x5d4ab5,'createdAt':_0x5a9de3['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xf7ab80=>{throw console['error'](_0xf7ab80),new _0x54f114('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x322321,commentId:_0x2aa78d,content:_0x4fbef4,createdAt:_0x2574cd,attributes:_0x17e2d1,isFromAdapter:_0x23925a}){if(void 0x0!==_0x4fbef4&&('string'!=typeof _0x4fbef4||!_0x4fbef4['trim']()['length']))throw new _0x54f114('commentsrepository-update-comment-invalid-content');const _0x5b5a16=this['getCommentThread'](_0x322321),_0x56ff0d=_0x5b5a16['getComment'](_0x2aa78d);if(!_0x56ff0d)throw new _0x54f114('commentsrepository-update-missing-comment',this);let _0x4c86be=!0x1;if(_0x4fbef4&&_0x4fbef4!==_0x56ff0d['content']&&(_0x56ff0d['isEditable']||_0x23925a)&&(_0x56ff0d['content']=_0x4fbef4,_0x4c86be=!0x0),_0x2574cd&&_0x2574cd!==_0x56ff0d['createdAt']&&(_0x56ff0d['createdAt']=_0x2574cd,_0x56ff0d['isExternal']||(_0x56ff0d['authoredAt']=_0x2574cd),_0x4c86be=!0x0),_0x17e2d1&&!_0x4a78fc(_0x17e2d1,_0x56ff0d['attributes'])&&(_0x56ff0d['attributes']=_0x17e2d1,_0x4c86be=!0x0),!_0x4c86be)return Promise['resolve']();if(_0x5b5a16['fire']('commentUpdated'),_0x23925a||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x3a2368=this['context']['plugins']['get']('PendingActions'),{channelId:_0xad239f}=this['getCommentThread'](_0x56ff0d['threadId']),_0x4a3339=_0x3a2368['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xad239f,'threadId':_0x322321,'commentId':_0x2aa78d,'content':_0x4fbef4,'attributes':_0x17e2d1})['then'](()=>_0x3a2368['remove'](_0x4a3339))['catch'](_0x22d78c=>{throw console['error'](_0x22d78c),new _0x54f114('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x585e36,commentId:_0x6cb889,isFromAdapter:_0x547e13}){const _0xdc428d=this['getCommentThread'](_0x585e36),_0x2a22a7=_0xdc428d['getComment'](_0x6cb889);if(!_0x2a22a7)throw new _0x54f114('commentsrepository-remove-missing-comment',this);if(_0xdc428d['_remove'](_0x2a22a7),_0x547e13||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x38ef92=this['context']['plugins']['get']('PendingActions'),{channelId:_0x172a0c}=_0xdc428d,_0x221e32=_0x38ef92['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x172a0c,'threadId':_0x585e36,'commentId':_0x6cb889})['then'](()=>_0x38ef92['remove'](_0x221e32))['catch'](_0x1e3bc4=>{throw console['error'](_0x1e3bc4),new _0x54f114('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0xa793a0,_0x307c3b){super();const _0x49ffb3=_0x307c3b['isResolvable'];this['channelId']=_0x307c3b['channelId'],this['id']=_0x307c3b['id'],this['comments']=new _0x3f2ff3(),this['_repository']=_0xa793a0,this['_isAttached']=!0x1,this['_isSubmitted']=_0x307c3b['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0xa793a0,'_permissions',_0xa793a0,'_readOnlyChannels',()=>_0xa793a0['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0xa793a0,'_permissions',()=>_0xa793a0['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0xa793a0,'_permissions',()=>{const _0xe0f446=_0xa793a0['getPermissions'](this['channelId']);return _0xe0f446['write']||_0xe0f446['admin'];}),this['bind']('isResolvable')['to'](_0xa793a0,'_permissions',()=>_0x49ffb3&&_0xa793a0['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x307c3b['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2c5d5b,_0x2b9f4e)=>_0x2c5d5b?_0x2b9f4e?_0x2c5d5b<_0x2b9f4e?_0x2c5d5b:_0x2b9f4e:_0x2c5d5b:_0x2b9f4e),this['set']('unlinkedAt',_0x307c3b['unlinkedAt']||null),this['set']('resolvedAt',_0x307c3b['resolvedAt']||null),this['set']('resolvedBy',_0x307c3b['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x150b51=>!!_0x150b51),this['set']('attributes',_0x307c3b['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x4632b1,_0x5470e4)=>_0x4632b1+_0x5470e4['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x49c4c6,id:_0x5b3455}=this;this['_repository']['fire'](ai('submitCommentThread',_0x49c4c6),{'channelId':_0x49c4c6,'threadId':_0x5b3455});}setUnlinkedAt(_0x5512ce){this['_update']({'unlinkedAt':_0x5512ce});}['resolve']({resolvedAt:_0x24383d=new Date(),resolvedBy:_0x24a361='',isFromAdapter:_0x4fe5f6=!0x1}={}){const _0x2705f5=this['_repository']['context']['plugins']['get'](_0x61109)['me'],{channelId:_0x185791,id:_0x16825a}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x185791),{'channelId':_0x185791,'threadId':_0x16825a,'resolvedAt':_0x24383d,'resolvedBy':_0x24a361||_0x2705f5['id'],'isFromAdapter':_0x4fe5f6});}['reopen']({isFromAdapter:_0x591a77=!0x1}={}){const {channelId:_0x10d3bb,id:_0x267e42}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x10d3bb),{'channelId':_0x10d3bb,'threadId':_0x267e42,'isFromAdapter':_0x591a77});}setContext(_0x1400a7){this['context']||this['_update']({'context':_0x1400a7});}setAttribute(_0x3079c4,_0x21c643){const _0x14435c=_0x32e3b9(this['attributes']);_0x148435(_0x14435c,_0x3079c4,_0x21c643),this['_update']({'attributes':_0x14435c});}removeAttribute(_0x1dfec4){const _0x19e1d9=_0x32e3b9(this['attributes']);_0x314129(_0x19e1d9,_0x1dfec4),this['_update']({'attributes':_0x19e1d9});}['remove']({isFromAdapter:_0x128b4e=!0x1}={}){const {channelId:_0xf6d9a3,id:_0x46a2a5}=this;this['_repository']['fire'](ai('removeCommentThread',_0xf6d9a3),{'channelId':_0xf6d9a3,'threadId':_0x46a2a5,'isFromAdapter':_0x128b4e});}attachTo(_0x1a083c){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x1a083c});}addComment(_0x587213){const {channelId:_0x5ad0be,id:_0x80affc}=this;this['_repository']['fire'](ai('addComment',_0x5ad0be,_0x80affc),Object['assign']({'channelId':_0x5ad0be,'threadId':_0x80affc},_0x587213));}getComment(_0xe1840d){if('string'!=typeof _0xe1840d)throw new _0x54f114('commentsrepository-get-comment-invalid-id',null,{'commentId':_0xe1840d});return this['comments']['get'](_0xe1840d);}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'](_0x351cea=>_0x351cea['toJSON']()),'attributes':this['attributes']};}['_add'](_0x45cd5a){return this['listenTo'](_0x45cd5a,'change:authoredAt',()=>{const _0x3ba4f3=this['_findOptimalIndex'](_0x45cd5a),_0x143aca=this['comments'];_0x3ba4f3-0x1!=_0x143aca['getIndex'](_0x45cd5a)&&_0x3ba4f3+0x1!=_0x143aca['getIndex'](_0x45cd5a)&&(this['_remove'](_0x45cd5a),this['_add'](_0x45cd5a));}),this['comments']['add'](_0x45cd5a,this['_findOptimalIndex'](_0x45cd5a));}_update(_0x216ce1){const {channelId:_0x1162c3,id:_0x16adfe}=this;this['_repository']['fire'](ai('updateCommentThread',_0x1162c3),{..._0x216ce1,'channelId':_0x1162c3,'threadId':_0x16adfe});}['_remove'](_0x509df5){return this['stopListening'](_0x509df5),_0x509df5['destroy'](),this['comments']['remove'](_0x509df5);}_findOptimalIndex(_0x39c730){const _0x29b155=this['comments']['find'](_0xaa0120=>new Date(_0xaa0120['authoredAt'])['getTime']()>new Date(_0x39c730['authoredAt'])['getTime']());return _0x29b155?this['comments']['getIndex'](_0x29b155):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x45703a,_0x2cb44e){super();const _0x4647b6=_0x45703a['context']['plugins']['get'](_0x61109)['me'],_0x328d88=_0x45703a['getCommentThread'](_0x2cb44e['threadId']),_0x2b0796=0x0===_0x328d88['comments']['length'],_0x90608a=_0x4647b6===_0x2cb44e['author'];this['id']=_0x2cb44e['id'],this['threadId']=_0x2cb44e['threadId'],this['author']=_0x2cb44e['author'],this['creator']=_0x2cb44e['creator'],this['set']('content',_0x2cb44e['content']),this['createdAt']=_0x2cb44e['createdAt']||new Date(),this['set']('authoredAt',_0x2cb44e['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x328d88,'resolvedAt'),this['set']('attributes',_0x2cb44e['attributes']||{}),this['bind']('isEditable')['to'](_0x45703a,'_permissions',()=>{const _0x1c6248=_0x45703a['getPermissions'](_0x328d88['channelId'])['write'],_0x400bab=_0x45703a['getPermissions'](_0x328d88['channelId'])['modifyAll'];return _0x90608a&&_0x1c6248||!_0x90608a&&_0x400bab;}),this['bind']('isRemovable')['to'](_0x328d88,'isRemovable',_0x45703a,'_permissions',_0x3265f3=>{const _0x59a682=_0x45703a['getPermissions'](_0x328d88['channelId'])['write'],_0x427654=_0x45703a['getPermissions'](_0x328d88['channelId'])['modifyAll'];return _0x90608a&&_0x59a682||_0x3265f3&&_0x2b0796||!_0x90608a&&_0x427654&&!_0x2b0796;}),this['bind']('isReadOnly')['to'](_0x328d88,'isReadOnly'),this['_repository']=_0x45703a;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x1d9088){const _0x4c6f1c=document['createElement']('div');return _0x4c6f1c['innerHTML']=_0x1d9088,_0x4c6f1c['textContent']['length'];}(this['content']),0xc8);}update(_0x61b307){const {threadId:_0xaff92d,id:_0xe4cdf1}=this;if(!this['_repository']['hasCommentThread'](_0xaff92d))throw new _0x54f114('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x84e912}=this['_repository']['getCommentThread'](_0xaff92d);this['_repository']['fire'](ai('updateComment',_0x84e912,_0xaff92d),{'channelId':_0x84e912,'threadId':_0xaff92d,'commentId':_0xe4cdf1,..._0x61b307});}setAttribute(_0x4e07d7,_0x2ebc11){const _0xf426b2=_0x32e3b9(this['attributes']);_0x148435(_0xf426b2,_0x4e07d7,_0x2ebc11),this['update']({'attributes':_0xf426b2});}removeAttribute(_0x4fe388){const _0x9ccac5=_0x32e3b9(this['attributes']);_0x314129(_0x9ccac5,_0x4fe388),this['update']({'attributes':_0x9ccac5});}['remove'](_0x3541b7={}){if(!_0x3541b7['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x195708,id:_0x2124bb}=this;if(!this['_repository']['hasCommentThread'](_0x195708))throw new _0x54f114('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x33729e}=this['_repository']['getCommentThread'](_0x195708);this['_repository']['fire'](ai('removeComment',_0x33729e,_0x195708),{'channelId':_0x33729e,'threadId':_0x195708,'commentId':_0x2124bb,..._0x3541b7});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x51dfae,..._0x587b6e){for(const _0x4d1cd5 of _0x587b6e)void 0x0!==_0x4d1cd5&&(_0x51dfae+=':'+String(_0x4d1cd5));return _0x51dfae;}var ci=class extends _0x194713{constructor(_0x410837){super(_0x410837),this['set']('hasContent',!0x1);}['refresh'](){const _0x324850=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x474f6e of _0x324850['getRanges']())if(this['_hasContent'](_0x474f6e))return void(this['hasContent']=!0x0);}execute({threadId:_0x424b86=_0x2b10ec(),ranges:_0x19965f,comment:_0x6c8c0e}={}){const _0x115f2e=this['editor']['model'],_0x668850=_0x19965f??Array['from'](_0x115f2e['document']['selection']['getRanges']()),_0x31b3d6=[];for(const _0x954f18 of _0x668850)this['_hasContent'](_0x954f18)&&_0x31b3d6['push'](this['_trimToContent'](_0x954f18));if(!_0x31b3d6['length'])throw new _0x54f114('addcommentthreadcommand-incorrect-ranges',null);_0x6c8c0e&&this['_createCommentThread'](_0x424b86,_0x6c8c0e),this['_createMarkersFromRanges'](_0x424b86,_0x31b3d6,!!_0x6c8c0e);}_createMarkersFromRanges(_0x6f146d,_0x478904,_0x1fc490){this['editor']['model']['change'](_0x1003ef=>{for(const _0xac011b of _0x478904){const _0x319553='comment:'+_0x6f146d+':'+_0x2b10ec()['substr'](0x1,0x5);_0x1003ef['addMarker'](_0x319553,{'range':_0xac011b,'usingOperation':_0x1fc490,'affectsData':_0x1fc490});}});}_createCommentThread(_0x5dd518,_0x4eed04){const _0x2a2323=this['editor']['plugins']['get']('CommentsRepository'),_0x447d76=this['editor']['config']['get']('collaboration.channelId'),_0x457a07=this['editor']['plugins']['get']('Users')['me'];if(!_0x457a07)throw new _0x54f114('addcommentthreadcommand-user-not-found',null);_0x2a2323['addCommentThread']({'threadId':_0x5dd518,'channelId':_0x447d76,'comments':[{'authorId':_0x457a07['id'],'content':_0x4eed04,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x536616){for(const _0x2750c9 of _0x536616['getItems']())if(this['_itemIsContent'](_0x2750c9))return!0x0;return!0x1;}_itemIsContent(_0x1510b8){return _0x1510b8['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1510b8)&&!_0x1510b8['is']('element','tableCell');}_trimToContent(_0x2665bf){const _0x5c7330=_0x5c566f=>!this['_itemIsContent'](_0x5c566f['item']),_0x274eb5=_0x2665bf['start']['getLastMatchingPosition'](_0x5c7330),_0x367c0d=_0x2665bf['end']['getLastMatchingPosition'](_0x5c7330,{'direction':'backward'});return this['editor']['model']['createRange'](_0x274eb5,_0x367c0d);}},di=class extends _0xa7d3b5{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x312361){super(_0x312361),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x263481=this['editor'],_0x18b921=_0x263481['model']['document']['selection'],_0x219b2d=_0x321ed9(()=>this['refreshSelectedViews'](),0xa);_0x18b921['on']('change:range',(_0x20c5e8,_0x588858)=>{_0x588858['directChange']&&(_0x219b2d['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x263481['editing']['view']['document'],'change:isFocused',(_0x1bc8d7,_0x436340,_0x16b0f2)=>{_0x16b0f2&&_0x219b2d();}),this['listenTo'](_0x263481['ui']['focusTracker'],'change:isFocused',(_0x4f2e12,_0x3280d7,_0x2771df)=>{_0x2771df||this['fire']('blur',{'isAnnotationTracked':_0x585a2f=>this['_editorAnnotationsData']['has'](_0x585a2f['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x134469){if(this['_editorAnnotations']['has'](_0x134469['view']))return;this['_editorAnnotations']['add'](_0x134469['view']),this['editor']['ui']['focusTracker']['add'](_0x134469['view']['element']);const _0x16dc3a=this['editor']['plugins']['get'](ti);this['listenTo'](_0x16dc3a['collection'],'remove',(_0x13d5b2,_0x2a8069)=>{this['editor']['ui']['focusTracker']['remove'](_0x2a8069['view']['element']),this['_editorAnnotations']['delete'](_0x2a8069['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x2b5b5f){if('function'!=typeof _0x2b5b5f)throw new _0x54f114('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2b5b5f);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x595c5d,annotations:_0x829395}){const _0xbca066=[],_0xa84e17=this['editor']['model']['document']['selection'],_0x3c2e4f=Array['from'](_0xa84e17['getRanges']());for(const [_0x3311ef,_0x4cf05a]of this['_editorAnnotationsData']){const _0x56d75d=_0x5d612e(_0x4cf05a),_0x21bba8=_0x829395['getByInnerView'](_0x3311ef);_0x56d75d&&_0x21bba8&&_0xbca066['push']({'annotation':_0x21bba8,'range':_0x56d75d});}function _0x5d612e(_0x44ce52){for(const _0x397aa0 of _0x44ce52)for(const _0x208e23 of _0x3c2e4f)if(_0x397aa0['containsRange'](_0x208e23,!_0xa84e17['isCollapsed']))return _0x397aa0;return null;}const _0x26b95a=new Map(Array['from'](_0x829395,(_0x21cb7d,_0x2845b1)=>[_0x21cb7d,_0x2845b1]));return _0xbca066['sort']((_0x447940,_0x3c81aa)=>{const _0x570181=_0x447940['range'],_0x293c1d=_0x3c81aa['range'];if(!_0x570181['isEqual'](_0x293c1d)){if(_0x570181['containsRange'](_0x293c1d,!0x0))return 0x1;if(_0x293c1d['containsRange'](_0x570181,!0x0))return-0x1;}return _0x447940['annotation']==_0x595c5d?-0x1:_0x3c81aa['annotation']==_0x595c5d?0x1:(_0x26b95a['get'](_0x447940['annotation'])??0x0)-(_0x26b95a['get'](_0x3c81aa['annotation'])??0x0);})['map'](_0xe14d9c=>_0xe14d9c['annotation']);}get _editorAnnotationsData(){const _0x14ecf6=new Map();for(const _0x3bec50 of Array['from'](this['_dataCollectors']))for(const [_0x231356,_0x2c7510]of _0x3bec50())_0x14ecf6['set'](_0x231356,_0x2c7510);return _0x14ecf6;}},li=class extends _0xa7d3b5{afterInit(){const _0x483e31=this['editor'];_0x483e31['plugins']['has']('RestrictedEditingModeEditing')&&_0x483e31['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0xa7d3b5{constructor(_0x2770d2){super(_0x2770d2),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x3cd1c9=this['editor'],_0x4b8f1a=_0x3cd1c9['commands']['get']('importWord'),_0x5201e5=_0x3cd1c9['plugins']['get'](_0x61109);_0x4b8f1a&&(_0x4b8f1a['on']('execute',(_0x1b09b7,[,_0x14e7b5])=>{_0x14e7b5['collaboration_features']={'comments':!0x0,'user_id':_0x5201e5['me']['id']};},{'priority':_0x4d8996['high']+0xa}),this['listenTo'](_0x4b8f1a,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x4817fc,_0x35c35c){const {comment_threads:_0x3743a7}=_0x35c35c;_0x3743a7&&_0x3743a7['forEach'](({thread_id:_0x41f5e3,comments:_0x472098,is_resolved:_0x4190ad})=>{const _0x3b1be4=new Date(),_0x3e1ce4=_0x472098['map'](({author:_0x12ea18,content:_0x50028f,created_at:_0x3d5971})=>({'content':_0x50028f,'authorId':this['editor']['plugins']['get'](_0x61109)['me']['id'],'createdAt':_0x3b1be4,'attributes':{'@external':{'authorName':_0x12ea18,'createdAt':_0x3d5971?new Date(_0x3d5971):new Date(),'source':'importWord'}}})),_0x32c0c1=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x32c0c1,'threadId':_0x41f5e3,'comments':_0x3e1ce4,'resolvedAt':_0x4190ad?_0x3b1be4:null});});}},ui=class extends _0xa7d3b5{constructor(_0x44941f){super(_0x44941f),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0xbc8685=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0xbc8685,'contentInsertion',(_0x20a449,_0xfc3f2d)=>this['_removeMarkersWithoutThreads'](_0xfc3f2d['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x1a8a4c){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1a8a4c;const _0x3b2bb1=this['editor']['plugins']['get']('CommentsRepository');for(const _0x11b7dd of _0x1a8a4c['keys']()){const [_0x6ea754,_0x1b4fd1]=_0x11b7dd['split'](':');'comment'!=_0x6ea754||_0x3b2bb1['hasCommentThread'](_0x1b4fd1)||_0x1a8a4c['delete'](_0x11b7dd);}return _0x1a8a4c;}_registerMarkerInClipboardPipeline(){const _0x3d69c5=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xcd04f3=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xcd04f3&&_0x3d69c5['_registerMarkerToCopy']('comment',_0xcd04f3);}_mapCommentsCopyConfigToRegisterConfiguration(_0x3c255f){switch(_0x3c255f){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x35c797){const _0x2e1879=_0x35c797['split'](':');return{'group':_0x2e1879[0x0],'id':_0x2e1879[0x1],'part':_0x2e1879[0x2]};}var pi=class extends _0xa7d3b5{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x513040,_0x1fb623)=>{if(!_0x1fb623['options']['showCommentHighlights'])return null;if(_0x1fb623['options']['ignoreResolvedComments']){const {id:_0x2a8f6d}=fi(_0x513040['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2a8f6d)?.['isResolved']&&_0x513040['item'])return _0x1fb623['consumable']['consume'](_0x513040['item'],'addMarker:'+_0x513040['markerName']),_0x1fb623['consumable']['consume'](_0x513040['item'],'removeMarker:'+_0x513040['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x12bc48=>{_0x12bc48['on']('addMarker:comment',(_0x39ddd5,_0x40a196,_0x565308)=>{if(!_0x565308['options']['showCommentHighlights'])return;const _0x353578=_0x40a196['item'];if(!_0x353578)return;const _0x4601c5=_0x565308['mapper']['toViewElement'](_0x353578);this['editor']['model']['schema']['isObject'](_0x353578)&&_0x4601c5&&!_0x4601c5['getCustomProperty']('widget')&&_0x4601c5['is']('containerElement')&&Ct(_0x4601c5,_0x565308['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x34e30b,{writer:_0x26cb76,options:_0x12660f})=>{if(!_0x12660f['showCommentHighlights'])return null;const _0x190a21=_0x26cb76['createContainerElement']('div'),_0x2bc06f=_0x26cb76['createEmptyElement']('hr');return _0x26cb76['addClass']('ck-horizontal-line',_0x190a21),_0x26cb76['insert'](_0x26cb76['createPositionAt'](_0x190a21,0x0),_0x2bc06f),_0x190a21;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0xc95f61,{writer:_0x3f0d83,options:_0x5aa48e})=>{if(!_0x5aa48e['showCommentHighlights'])return null;const _0x15de00=_0x3f0d83['createContainerElement']('span'),_0x30cd7d=_0x3f0d83['createEmptyElement']('img');return _0x3f0d83['addClass']('image-inline',_0x15de00),_0x3f0d83['insert'](_0x3f0d83['createPositionAt'](_0x15de00,0x0),_0x30cd7d),_0x15de00;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x10af71,{writer:_0x59b20d,options:_0x2751f7})=>{if(_0x2751f7['showCommentHighlights'])return _0x59b20d['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2b521f,_0x55ddd8,_0x36a9fd)=>{_0x36a9fd['options']['showCommentHighlights']&&_0x2b521f['stop']();},{'priority':'high'});}},wi=class extends _0xa7d3b5{static get requires(){return[oi,di,_0x61109,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x533fb5){super(_0x533fb5),this['set']('isThreadsLoadingPaused',!0x0),_0x533fb5['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x47434d,_0x1d8b7e,_0x5cdb14,_0x4a9954)=>{const _0x454ac1=_0x533fb5['plugins']['get'](oi),_0x2524a7=_0x5cdb14?fi(_0x5cdb14)['id']:null;_0x533fb5['model']['change'](()=>{if(_0x2524a7){const _0x3f4bdc=this['getAllMarkersForId'](_0x2524a7);for(const _0x3ccadf of _0x3f4bdc)_0x533fb5['editing']['reconvertMarker'](_0x3ccadf);}if(_0x4a9954){const {id:_0x4dfcb0}=fi(_0x4a9954),_0x3f9aa0=_0x454ac1['getCommentThread'](_0x4dfcb0);if(_0x3f9aa0&&_0x3f9aa0['unlinkedAt'])return;if(_0x3f9aa0&&!_0x3f9aa0['isAttached'])return;const _0x9396e8=this['getAllMarkersForId'](_0x4dfcb0);for(const _0x5b21f0 of _0x9396e8)_0x533fb5['editing']['reconvertMarker'](_0x5b21f0);}}),_0x2524a7&&this['scrollToThreadMarker'](_0x2524a7);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x3d271f=this['editor'],_0xfbac30=_0x3d271f['plugins']['get'](oi),_0x3702db=_0x3d271f['config']['get']('collaboration.channelId'),_0x22097b=_0xfbac30['getCommentThreads']()['filter'](_0x7c55f1=>_0x7c55f1['channelId']!==_0x3702db);_0x3d271f['commands']['add']('addCommentThread',new ci(_0x3d271f)),this['listenTo'](_0x3d271f,'change:isReadOnly',(_0x32d101,_0xb85dff,_0x373d61)=>{_0xfbac30['switchReadOnly'](_0x373d61,_0x3d271f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xfbac30,gi('addCommentThread',_0x3702db),(_0x51a824,{threadId:_0x32860d})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x32860d)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x32860d);}),this['listenTo'](_0xfbac30,gi('removeCommentThread',_0x3702db),(_0xc4cbf7,{threadId:_0x3b14d0})=>{_0x3d271f['model']['enqueueChange']({'isUndoable':!0x1},_0x15ab72=>{const _0x16b95a=this['getAllMarkersForId'](_0x3b14d0);for(const _0x5f186c of _0x16b95a)_0x15ab72['removeMarker'](_0x5f186c);});}),this['listenTo'](_0xfbac30,gi('resolveCommentThread',_0x3702db),(_0x95637a,{threadId:_0x3930ef})=>{this['_reconvertMarkers'](_0x3930ef);const _0x162c4a=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x162c4a['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x3930ef)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xfbac30,gi('reopenCommentThread',_0x3702db),(_0x5a27b4,{threadId:_0x280dc5})=>{this['_reconvertMarkers'](_0x280dc5);},{'priority':'low'}),this['listenTo'](_0xfbac30,gi('addComment',_0x3702db),(_0x78ccb9,{threadId:_0x5e2a50,isFromAdapter:_0x13e864})=>{const _0x23d374=this['getAllMarkersForId'](_0x5e2a50);!_0x13e864&&0x0!=_0x23d374['length']&&_0xfbac30['hasCommentThread'](_0x5e2a50)&&0x1===_0xfbac30['getCommentThread'](_0x5e2a50)['length']&&_0x3d271f['model']['enqueueChange']({'isUndoable':!0x1},_0x2bccf0=>{for(const _0x8a8a6e of _0x23d374)_0x2bccf0['updateMarker'](_0x8a8a6e,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x22097b);}afterInit(){!async function(_0x3dcb62){const _0x414498='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x1a5d25=0x79458,_0x8fac08={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x13e4ca(_0x1e74dc){const _0x492df4=new window['Promise'](_0x1ef4ab=>{_0x1e74dc['once']('ready',_0x1ef4ab);}),_0x27f17d=window['Date']['now'](),_0x231769=_0x1e74dc['config']['get']('licenseKey');async function _0x3e5673(){let _0x193642,_0x382bfd=null,_0x24108a=null;try{return'GPL'==_0x231769?'NotAllowed':(_0x193642=_0x29c14f(),_0x193642?(_0x193642['usageEndpoint']&&(_0x24108a=_0x5ec352(_0x193642['usageEndpoint'],_0x193642['jti'])),await _0x3cda05()?_0x5c648d()?_0x992b64()?'Expired':_0x25796b()?('evaluation'==_0x193642['licenseType']&&(_0x382bfd=_0x2b99db('EvaluationLimit')),await _0x5d0677()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x992b64(){const _0x5d35f3=['evaluation','trial']['includes'](_0x193642['licenseType'])?_0x27f17d/0x3e8:0xe10*_0x1a5d25;return _0x193642['exp']<_0x5d35f3;}function _0x5c648d(){const _0x25606b=_0x193642['features'];if(!_0x25606b)return!0x1;if(_0x25606b['includes']('*'))return!0x0;if(_0x25606b['includes']('CMT'))return!0x0;if(_0x25606b['includes']('TRILIUM')&&_0x983198())return!0x0;if(_0x25606b['includes']('RCMT')){if(_0x10ef86())return!0x0;if(_0x6a29eb()||_0x54d63c())return!0x0;}return!0x1;}function _0x25796b(){const _0x268883=_0x193642['licensedHosts'];if(!_0x268883||0x0==_0x268883['length'])return!0x0;const {hostname:_0x6cb0c8}=new URL(window['location']['href']);if(_0x268883['includes'](_0x6cb0c8))return!0x0;const _0x58a62a=_0x6cb0c8['split']('.');return _0x268883['filter'](_0x2e6d55=>_0x2e6d55['includes']('*'))['map'](_0x4b52b4=>_0x4b52b4['split']('.'))['filter'](_0x100461=>_0x100461['length']<=_0x58a62a['length'])['map'](_0x1d53b8=>Array(_0x58a62a['length']-_0x1d53b8['length'])['fill']('*'===_0x1d53b8[0x0]?'*':'')['concat'](_0x1d53b8))['some'](_0x21df66=>_0x58a62a['every']((_0x4d2cd7,_0x3619e7)=>_0x21df66[_0x3619e7]===_0x4d2cd7||'*'===_0x21df66[_0x3619e7]));}function _0x5d0677(){return _0x382bfd&&_0x24108a?new window['Promise']((_0x4f5092,_0x408635)=>{_0x382bfd['then'](_0x4f5092,_0x408635),_0x24108a['then'](_0x171e6f=>{'Valid'!=_0x171e6f&&_0x4f5092(_0x171e6f);},_0x408635);}):_0x382bfd||_0x24108a||'Valid';}}function _0x5ec352(_0x10afba,_0x419130){return new window['Promise'](_0x35f888=>{if(_0x3ce939())return _0x35f888('Valid');_0x4614b9(),_0x1e74dc['decorate']('_sendUsageRequest');let _0x2e78fd=!0x1;const _0x10f3ad=_0x2b10ec();function _0x515e5b(_0x4f7fb7){return!!_0x4f7fb7&&('object'==typeof _0x4f7fb7||'function'==typeof _0x4f7fb7)&&'function'==typeof _0x4f7fb7['then']&&'function'==typeof _0x4f7fb7['catch'];}function _0x249419(_0xb32ce3){_0x29cdda(_0xb32ce3)['then'](_0x224113=>_0x224113&&'ok'==_0x224113['status']?_0x59865e(_0x50297d(_0x10f3ad+_0x419130))!=_0x224113['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0xd59b75=>(_0x8601c1(),_0xd59b75),()=>{const _0x186bf8=_0x44f385();return null==_0x186bf8?(_0x8601c1(),'Valid'):_0x27f17d-_0x186bf8>0x240c8400?'UsageLimit':'Valid';})['then'](_0x35f888)['catch'](()=>{_0x35f888('UsageLimit');});const _0x431950=0x36ee80;function _0x8601c1(){const _0x4bdfc7='llct-'+_0x59865e(_0x50297d(_0x10afba)),_0x3c36f4=_0x7b48c9(_0x59865e(window['Math']['ceil'](_0x27f17d/_0x431950)));window['localStorage']['setItem'](_0x4bdfc7,_0x3c36f4);}function _0x44f385(){const _0x2025a8='llct-'+_0x59865e(_0x50297d(_0x10afba)),_0x26fb05=window['localStorage']['getItem'](_0x2025a8);return _0x26fb05?window['parseInt'](_0x7b48c9(_0x26fb05),0x10)*_0x431950:null;}function _0x29cdda(_0x5e6baa){return new window['Promise']((_0x36ee06,_0x115b4e)=>{_0x5e6baa['then'](_0x36ee06,_0x115b4e),window['setTimeout'](_0x115b4e,0x1d4c0);});}}_0x1e74dc['on']('_sendUsageRequest',(_0x572cf9,_0x57e233)=>{if(_0x57e233[0x0]!=_0x10afba)return _0x35f888('UsageLimit');_0x57e233[0x1]={..._0x57e233[0x1],'requestId':_0x10f3ad};},{'priority':'high'}),_0x1e74dc['on']('_sendUsageRequest',_0x23487f=>{_0x515e5b(_0x23487f['return'])&&(_0x2e78fd=!0x0,_0x249419(_0x23487f['return']));},{'priority':'low'}),_0x492df4['then'](()=>{_0x2e78fd||_0x35f888('UsageLimit');});});function _0x3ce939(){return'auto'==_0x1e74dc['editing']['view']['_overlayModeHint'];}function _0x4614b9(){_0x1e74dc['editing']['view']['_overlayModeHint']='auto';}}function _0x2b99db(_0x3a7c81){const _0x33128d=[new window['Promise'](_0x268d88=>setTimeout(_0x268d88,0x93ecc)),_0x492df4['then'](()=>new window['Promise'](_0x155beb=>{let _0x3fa24b=0x0;_0x1e74dc['model']['on']('applyOperation',(_0x45b83c,_0x51932a)=>{_0x51932a[0x0]['isDocumentOperation']&&_0x3fa24b++,0x5e8==_0x3fa24b&&(_0x155beb(),_0x45b83c['off']());});}))];return window['Promise']['race'](_0x33128d)['then'](()=>_0x3a7c81);}async function _0x2c190a(){await _0x492df4,_0x1e74dc['model']['change']=_0x48e640,_0x1e74dc['model']['enqueueChange']=_0x48e640,_0x1e74dc['enableReadOnlyMode']('model');}function _0x983198(){return window['glob']&&window['glob']['triliumVersion'];}function _0x10ef86(){return _0x4506d6('WebSocketGateway')&&'connected'==_0x5a47ea('WebSocketGateway')['state'];}function _0x6a29eb(){return _0x4506d6('RevisionViewerIntegration');}function _0x54d63c(){return _0x4506d6('TrackChangesDataGetter');}function _0x5e86db(_0x5695bf){const _0x4615e1=_0x4617a7();_0x1e74dc[_0x4615e1]='commentsLicenseKey'+_0x5695bf,'Valid'!=_0x5695bf&&_0x2c190a();}function _0x4617a7(){const _0x517276=window['String'](window['performance']['now']())['replace']('.','');let _0x3d49ca='m';for(let _0x5925e7=0x0;_0x5925e7<_0x517276['length'];_0x5925e7+=0x2){let _0x2569eb=window['parseInt'](_0x517276['substring'](_0x5925e7,_0x5925e7+0x2));_0x2569eb>=0x3e&&(_0x2569eb-=0x3e),_0x3d49ca+=_0x414498[_0x2569eb];}return _0x3d49ca;}function _0x29c14f(){const _0x3f7034=_0x231769['split']('.');if(0x3!=_0x3f7034['length'])return null;return _0x57e4b4(_0x3f7034[0x1]);function _0x57e4b4(_0x1b98a2){const _0x38a09b=_0x39a5a6(_0x1b98a2);return _0x38a09b&&_0x155425()?_0x38a09b:null;function _0x155425(){const _0x3505df=_0x38a09b['jti'],_0xb6df59=window['parseInt'](_0x3505df['substring'](_0x3505df['length']-0x8),0x10),_0x355e08={..._0x38a09b,'jti':_0x3505df['substring'](0x0,_0x3505df['length']-0x8)};return delete _0x355e08['vc'],_0x50297d(_0x355e08)==_0xb6df59;}}}async function _0x3cda05(){let _0x38ec35=!0x0;try{const [_0x16c9ca,_0x4a9aab,_0x53483b]=_0x231769['split']('.');return _0x5a3f7f(_0x16c9ca),await _0x5c2891(_0x16c9ca,_0x4a9aab,_0x53483b),_0x38ec35;}catch{return!0x1;}function _0x5a3f7f(_0x560ec7){const _0x1b3d5f=_0x39a5a6(_0x560ec7);_0x1b3d5f&&'ES256'==_0x1b3d5f['alg']||(_0x38ec35=!0x1);}async function _0x5c2891(_0x4ce507,_0x511c8f,_0x3f2a78){const _0x2c98a9=window['Uint8Array']['from'](_0x516907(_0x3f2a78),_0x1f96e8=>_0x1f96e8['charCodeAt'](0x0)),_0x36a6c3=new window['TextEncoder']()['encode'](_0x4ce507+'.'+_0x511c8f),_0x1c8916=window['crypto']['subtle'];if(!_0x1c8916)return;const _0x1993f7=await _0x1c8916['importKey']('jwk',_0x8fac08,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1c8916['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x1993f7,_0x2c98a9,_0x36a6c3)||(_0x38ec35=!0x1);}}function _0x39a5a6(_0x21b09b){return _0x21b09b['startsWith']('ey')?JSON['parse'](_0x516907(_0x21b09b)):null;}function _0x516907(_0x2e10a6){return window['atob'](_0x2e10a6['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x50297d(_0x529e80){let _0x5c83d1=0x1505;function _0x1b8238(_0x23fd21){for(let _0x1892ef=0x0;_0x1892ef<_0x23fd21['length'];_0x1892ef++){const _0x5a62f3=_0x23fd21['charCodeAt'](_0x1892ef);_0x5c83d1=(_0x5c83d1<<0x5)+_0x5c83d1+_0x5a62f3,_0x5c83d1&=_0x5c83d1;}}function _0x1e41fd(_0x2f4b93){Array['isArray'](_0x2f4b93)?_0x2f4b93['forEach'](_0x1e41fd):_0x2f4b93&&'object'==typeof _0x2f4b93?Object['entries'](_0x2f4b93)['sort']()['forEach'](([_0xbc341a,_0x1dec9b])=>{_0x1b8238(_0xbc341a),_0x1e41fd(_0x1dec9b);}):_0x1b8238(window['String'](_0x2f4b93));}return _0x1e41fd(_0x529e80),_0x5c83d1>>>0x0;}function _0x59865e(_0x2add90){return _0x2add90['toString'](0x10)['padStart'](0x8,'0');}function _0x7b48c9(_0x3afcaf){return _0x3afcaf['split']('')['reverse']()['join']('');}function _0x4506d6(_0x40d297){return _0x1e74dc['plugins']['has'](_0x40d297);}function _0x5a47ea(_0xbf68a4){return _0x1e74dc['plugins']['get'](_0xbf68a4);}function _0x48e640(){}_0x5e86db(await _0x3e5673());}_0x13e4ca(_0x3dcb62['editor']);}(this);}destroy(){const _0x37c5e5=this['editor']['plugins']['get'](oi),_0x4fbd84=this['editor']['config']['get']('collaboration.channelId');for(const _0x1d845a of _0x37c5e5['getCommentThreads']({'channelId':_0x4fbd84}))_0x37c5e5['_detachCommentThread'](_0x1d845a['id']),_0x37c5e5['_threads']['delete'](_0x1d845a['id']);super['destroy']();}['hasMarkerForId'](_0x548983){return this['getAllMarkersForId'](_0x548983)['length']>0x0;}getAllMarkersForId(_0x15af33){const _0x4b28e7=[];for(const _0x1f00bd of this['editor']['model']['markers'])_0x1f00bd['name']['startsWith']('comment:'+_0x15af33)&&_0x4b28e7['push'](_0x1f00bd);return _0x4b28e7;}['scrollToThreadMarker'](_0x89f7dd){setTimeout(()=>{const _0x2a7710=this['_getTargetForId'](_0x89f7dd);_0x2a7710&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x89f7dd&&_0x4fae9b({'target':_0x2a7710[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x46fc1f){this['editor']['model']['change'](()=>{for(const _0x4c4438 of this['getAllMarkersForId'](_0x46fc1f))this['editor']['editing']['reconvertMarker'](_0x4c4438);});}_attachArchivedThread(_0x29b161){const _0x1e7905=this['editor']['plugins']['get'](oi),_0x47efdc=this['editor']['plugins']['get'](di),_0x52fa19=_0x1e7905['getCommentThread'](_0x29b161);if(!_0x52fa19['isAttached']){const _0x1771db=_0x52fa19['attachTo'](()=>this['_getTargetForId'](_0x52fa19['id']));_0x47efdc['registerAnnotation'](_0x1771db),_0x52fa19['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x5d9a48=this['editor'],_0x73f9e8=_0x5d9a48['plugins']['get'](_0x61109);_0x5d9a48['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x193e73,_0x2e4d02)=>{const {id:_0xf8c3f0}=fi(_0x193e73['markerName']),_0x1db57c=_0x5d9a48['plugins']['get'](oi)['getCommentThread'](_0xf8c3f0),_0x10124d=this['activeMarker']&&fi(this['activeMarker'])['id']===_0xf8c3f0;let _0x5022c6;if(_0x1db57c&&_0x1db57c['isResolved']&&!_0x10124d&&_0x193e73['item'])return _0x2e4d02['consumable']['consume'](_0x193e73['item'],'addMarker:'+_0x193e73['markerName']),_0x2e4d02['consumable']['consume'](_0x193e73['item'],'removeMarker:'+_0x193e73['markerName']),null;const _0x271696=['ck-comment-marker'];return _0x10124d&&_0x271696['push']('ck-comment-marker--active'),_0x5022c6=_0x1db57c?.['length']?_0x1db57c['comments']['first']['author']['id']:_0x73f9e8['me']['id'],{'classes':_0x271696,'attributes':{'data-comment':_0xf8c3f0,'data-author-id':_0x5022c6}};}}),_0x5d9a48['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x349c3f,{options:_0x1030f5})=>{if(_0x1030f5['showCommentHighlights'])return null;const _0x5eae21=_0x5d9a48['plugins']['get'](oi),_0x33905f=_0x5d9a48['model']['markers']['get'](_0x349c3f),{id:_0x3b0bb0,part:_0x2d1b5f}=fi(_0x349c3f);return _0x33905f&&!_0x33905f['affectsData']||_0x1030f5['ignoreResolvedComments']&&_0x5eae21['getCommentThread'](_0x3b0bb0)?.['isResolved']?null:{'group':'comment','name':_0x2d1b5f?_0x3b0bb0+':'+_0x2d1b5f:_0x3b0bb0};}}),_0x5d9a48['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x15eed5,{writer:_0x40fcd7})=>_0x40fcd7['createElement']('$marker',{'data-name':'comment:'+_0x15eed5['getAttribute']('id')})}),_0x5d9a48['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x15b903=this['editor'],_0x29c6c4=_0x15b903['plugins']['get'](oi),_0x2135ae=new Set(),_0x5192a8=new Set();_0x15b903['model']['document']['registerPostFixer'](_0x3cbf51=>{let _0x5550b3=!0x1;for(const {name:_0x5c996c,data:_0xd4b845}of _0x15b903['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1e39c9,id:_0x327cbc}=fi(_0x5c996c);let _0x35504d=_0xd4b845['newRange'];if('comment'!==_0x1e39c9||!_0x35504d)continue;const _0x43d551='$graveyard'===_0x35504d['root']['rootName'];_0x43d551||(_0x35504d=_i(_0x35504d,_0x15b903['model']),!_0x35504d||_0x35504d['isCollapsed']||!_0xd4b845['newRange']||_0x35504d['isEqual'](_0xd4b845['newRange']))?_0x15b903['model']['hasContent'](_0x35504d)&&!_0x43d551?this['isThreadsLoadingPaused']?_0x2135ae['add'](_0x5c996c):this['_handleThreadMarker'](_0x5c996c,_0x327cbc):(_0x5192a8['add'](_0x5c996c),_0x2135ae['delete'](_0x5c996c),_0x3cbf51['removeMarker'](_0x5c996c),_0x5550b3=!0x0):(_0x3cbf51['updateMarker'](_0x5c996c,{'range':_0x35504d}),_0x5550b3=!0x0);}return _0x5550b3;}),this['on']('change:isThreadsLoadingPaused',(_0x58f06e,_0xe8c2d7,_0x3d1bad)=>{if(!_0x3d1bad&&_0x2135ae['size'])for(const _0x5db19d of _0x2135ae){const {id:_0x57eba8}=fi(_0x5db19d);_0x2135ae['delete'](_0x5db19d),_0x15b903['model']['markers']['get'](_0x5db19d)&&this['_handleThreadMarker'](_0x5db19d,_0x57eba8);}}),this['listenTo'](_0x15b903['model']['document'],'change',()=>{for(const {name:_0x48ad64,data:{newRange:_0x28f491}}of _0x15b903['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4b7402,id:_0x17a6e1}=fi(_0x48ad64);if('comment'!==_0x4b7402)continue;const _0x4cad6a=_0x29c6c4['getCommentThread'](_0x17a6e1),_0x7e47b3=this['hasMarkerForId'](_0x17a6e1);_0x4cad6a&&(!_0x4cad6a['_hasTargetInContent']&&_0x28f491&&_0x15b903['editing']['view']['once']('render',()=>{const _0x177800=_0x15b903['plugins']['get'](ti),_0x9c746c=_0x29c6c4['_threadToController']['get'](_0x4cad6a)['view'];_0x177800['getByInnerView'](_0x9c746c)['refreshVisibility']();},{'priority':'low'}),_0x4cad6a['_hasTargetInContent']=_0x7e47b3||!!_0x28f491),_0x28f491||(_0x5192a8['add'](_0x48ad64),_0x2135ae['delete'](_0x48ad64));}for(const _0x37941a of _0x5192a8){const {id:_0x48b509}=fi(_0x37941a),_0x495f6a=_0x29c6c4['getCommentThread'](_0x48b509);if(_0x2135ae['delete'](_0x37941a),!_0x495f6a)continue;const _0x4f57b7=this['hasMarkerForId'](_0x48b509);_0x4f57b7||_0x495f6a['isSubmitted']?_0x4f57b7||_0x495f6a['unlinkedAt']||_0x495f6a['setUnlinkedAt'](new Date()):_0x495f6a['remove']();}_0x5192a8['clear']();});}_handleInitialThreads(_0x3064ce){_0x3064ce['forEach'](_0x254ce3=>{_0x254ce3['unlinkedAt']&&this['_attachArchivedThread'](_0x254ce3['id']);});}_getTargetForId(_0x158ba7){const _0x5876d4=this['editor'],_0x1a04f3=this['getAllMarkersForId'](_0x158ba7);return _0x181d59(_0x5876d4['editing'],_0x1a04f3);}_getTextContext(_0x5c9450){const _0x194908=this['getAllMarkersForId'](_0x5c9450);let _0x3db84c='',_0x5bcbf3=!0x1;for(const _0x3026d2 of _0x194908){const _0x5d4d02=_0x3026d2['getRange']();for(const _0x2a218a of Array['from'](_0x5d4d02['getItems']()))_0x2a218a['is']('$textProxy')?(_0x3db84c&&_0x5bcbf3&&(_0x3db84c+='\x20',_0x5bcbf3=!0x1),_0x3db84c+=_0x2a218a['data']):_0x5bcbf3=!0x0;_0x5bcbf3=!0x0;}return _0x3db84c['substring'](0x0,0x96);}_attachMarkerToThread(_0x14ce37,_0x120fde){const _0x49d9a4=this['editor'],_0x4c206d=_0x49d9a4['plugins']['get'](oi);let _0x195860=_0x4c206d['getCommentThread'](_0x120fde);const _0x188649=_0x49d9a4['config']['get']('collaboration.channelId'),_0x47ace9=_0x49d9a4['plugins']['get'](di);return _0x195860&&(_0x195860['unlinkedAt']&&_0x195860['setUnlinkedAt'](null),_0x195860['isAttached'])||(this['getAllMarkersForId'](_0x120fde)[0x0]['managedUsingOperations']?_0x4c206d['fetchCommentThread']({'channelId':_0x188649,'threadId':_0x120fde})['then'](_0x30f9e4=>{if('destroyed'!==_0x49d9a4['state']){if(_0x195860=_0x30f9e4,_0x195860&&!_0x195860['isAttached']){const _0x58fcdc=_0x195860['attachTo'](()=>this['_getTargetForId'](_0x120fde));_0x47ace9['registerAnnotation'](_0x58fcdc),_0x195860['isResolved']&&this['_reconvertMarkers'](_0x120fde);}else{if(!_0x195860){const _0x1a870d=this['getAllMarkersForId'](_0x120fde);_0x49d9a4['model']['change'](_0x33fa23=>{for(const _0x55a050 of _0x1a870d)_0x33fa23['removeMarker'](_0x55a050);});}}}}):_0x49d9a4['editing']['view']['once']('render',()=>{if(_0x4c206d['getCommentThread'](_0x120fde))return;const _0x3d6a02=_0x49d9a4['plugins']['get'](ti);_0x195860=_0x4c206d['openNewCommentThread']({'channelId':_0x188649,'threadId':_0x120fde,'target':()=>this['_getTargetForId'](_0x120fde),'context':{'type':'text','value':this['_getTextContext'](_0x120fde)}});const _0x28c301=_0x4c206d['_threadToController']['get'](_0x195860)['view'],_0x9550ce=_0x3d6a02['getByInnerView'](_0x28c301);_0x9550ce&&_0x47ace9['registerAnnotation'](_0x9550ce);},{'priority':'low'})),_0x195860;}['_handleThreadMarker'](_0x82d077,_0x42330b){const _0xe5d104=this['_attachMarkerToThread'](_0x82d077,_0x42330b);_0xe5d104&&!_0xe5d104['context']&&_0xe5d104['setContext']({'type':'text','value':this['_getTextContext'](_0x42330b)});}_initAriaMarkerChangeAnnouncements(){const _0x1a84f6=this['editor'];_0x257a4f(_0x1a84f6['model'],({left:_0x468cc7,entered:_0x3e7d7d})=>{for(const _0x149736 of _0x468cc7)if(Ai(_0x149736)){_0x1a84f6['ui']['ariaLiveAnnouncer']['announce'](Et(_0x1a84f6['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xf3c88c of _0x3e7d7d)if(Ai(_0xf3c88c)){_0x1a84f6['ui']['ariaLiveAnnouncer']['announce'](Et(_0x1a84f6['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x419492(_0x5a1a4b)));break;}});}};function gi(_0x34881d,_0x5d8d42){return _0x5d8d42?_0x34881d+':'+_0x5d8d42:_0x34881d;}function _i(_0x4e144e,_0x365cbb){const _0x4fb2e3=_0x365cbb['schema'],_0x847fe6=_0x365cbb['createRange'](_0x4e144e['start']);for(const _0x5a9aa5 of _0x4e144e['getWalker']()){const {type:_0x46e310,item:_0x4113b9,nextPosition:_0x2d769f}=_0x5a9aa5;if('text'===_0x46e310||_0x4fb2e3['isObject'](_0x4113b9)){const _0x3d58c9=_0x365cbb['createPositionBefore'](_0x4113b9);_0x847fe6['isCollapsed']&&(_0x847fe6['start']=_0x3d58c9),_0x847fe6['end']=_0x2d769f;}}return _0x847fe6;}function Ai(_0x78aff2){return'comment'===fi(_0x78aff2['name'])['group'];}var vi=class extends _0xa7d3b5{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x361c4a=this['editor'],_0x2e1441=_0x361c4a['plugins']['get'](oi),_0x56c2c3=_0x361c4a['plugins']['get'](wi),_0x304129=_0x361c4a['plugins']['get'](ti),_0x4f7806=_0x361c4a['plugins']['get'](di);_0x361c4a['ui']['componentFactory']['add']('comment',()=>{const _0x3ab00c=this['_createUIButton'](_0x2493c9);return _0x3ab00c['tooltip']=!0x0,_0x3ab00c;}),_0x361c4a['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x4f7806['addSourceCollector'](()=>{const _0x580e4b=[];for(const [_0xf7aba3,_0xc4f405]of _0x2e1441['_threadToController']){const _0x37e8c5=_0x56c2c3['getAllMarkersForId'](_0xf7aba3['id']),_0x518527=_0x37e8c5['map'](_0x52365a=>_0x52365a['getRange']());_0x37e8c5['length']>0x0&&_0x580e4b['push']([_0xc4f405['view'],_0x518527]);}return _0x580e4b;}),this['listenTo'](_0x304129,'change:activeAnnotations',(_0x1e44d3,_0x33b1d7,_0x138ad0)=>{const _0x23481a=Array['from'](_0x138ad0)['map'](_0x591397=>_0x591397['innerView'])['find'](_0x17cb9b=>_0x2e1441['_viewToController']['has'](_0x17cb9b));if(!_0x23481a)return void(_0x56c2c3['activeMarker']=null);const _0x597b80=_0x2e1441['_viewToController']['get'](_0x23481a)['model']['id'],_0x49eec6='comment:'+_0x597b80;_0x597b80&&_0x56c2c3['hasMarkerForId'](_0x597b80)?_0x56c2c3['activeMarker']=_0x49eec6:_0x56c2c3['activeMarker']&&(_0x56c2c3['activeMarker']=null);}),this['listenTo'](_0x2e1441,'removeCommentThread',(_0x1a4dba,{threadId:_0x5e6c72,isFromAdapter:_0x3f003c})=>{!_0x3f003c&&_0x361c4a['ui']['focusTracker']['isFocused']&&_0x56c2c3['hasMarkerForId'](_0x5e6c72)&&_0x361c4a['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2e1441,'addComment',(_0x50bd35,{threadId:_0x264b77,isFromAdapter:_0x5866c4})=>{!_0x5866c4&&_0x56c2c3['hasMarkerForId'](_0x264b77)&&_0x2e1441['hasCommentThread'](_0x264b77)&&0x1===_0x2e1441['getCommentThread'](_0x264b77)['length']&&(_0x361c4a['editing']['view']['focus'](),_0x50bd35['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x4b5b2e=[this['editor']];for(const _0x5cae86 of _0x4b5b2e){let _0x124b5f;for(const _0x3477e4 in _0x5cae86){const _0x3aa8ec=_0x3477e4,_0x227494=_0x5cae86[_0x3aa8ec];if('commentsLicenseKeyValid'==_0x227494||'commentsLicenseKeyInvalid'==_0x227494||'commentsLicenseKeyExpired'==_0x227494||'commentsLicenseKeyDomainLimit'==_0x227494||'commentsLicenseKeyNotAllowed'==_0x227494||'commentsLicenseKeyEvaluationLimit'==_0x227494||'commentsLicenseKeyUsageLimit'==_0x227494){delete _0x5cae86[_0x3aa8ec],_0x124b5f=_0x227494,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x124b5f&&_0x5cae86['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x124b5f&&_0x5cae86['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x124b5f&&_0x5cae86['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x124b5f&&_0x5cae86['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x124b5f&&_0x5cae86['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x124b5f&&_0x5cae86['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x2897ff){const _0x371472=this['editor'],_0x164364=new _0x2897ff(_0x371472['locale']),_0x3ab6a3=_0x371472['commands']['get']('addCommentThread');return _0x164364['set']({'label':Et(_0x371472['locale'],'Comment'),'icon':_0x73134a}),_0x164364['bind']('isEnabled')['to'](_0x3ab6a3,'isEnabled',_0x3ab6a3,'hasContent',(_0x43e048,_0x473fbc)=>_0x43e048&&_0x473fbc),this['listenTo'](_0x164364,'execute',()=>{_0x3ab6a3['execute']();}),_0x164364;}},yi=class extends _0xa7d3b5{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x2a7fb4){super(_0x2a7fb4),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2ae332,_0x2b6c74,_0xfdc4ea)=>{_0xfdc4ea?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x59fc80,_0x59e300]of this['editor']['commands'])_0x59e300['affectsData']&&'addCommentThread'!==_0x59fc80&&_0x59e300['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 _0x4436a2=this['editor']['editing']['view']['document'];this['listenTo'](_0x4436a2,'cut',_0x27be65=>_0x27be65['stop'](),{'priority':'highest'}),this['listenTo'](_0x4436a2,'clipboardInput',_0x26a22c=>_0x26a22c['stop'](),{'priority':'highest'}),this['listenTo'](_0x4436a2,'delete',_0x238940=>_0x238940['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x48fe98,_0x340b99]of this['editor']['commands'])_0x340b99['affectsData']&&'addCommentThread'!==_0x48fe98&&_0x340b99['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}},Ti=class extends _0x5f4e9d{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x226cdb){super(_0x226cdb),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x32fb35=this['context']['plugins']['get'](ti);this['listenTo'](_0x32fb35,'_activateAnnotation',(_0x5b4daa,_0x5049e3)=>{for(const _0x193327 of this['activeUIs']){const _0x4a3659=this['_uis']['get'](_0x193327);(0x0,this['uisData']['get'](_0x193327)['filter'])(_0x5049e3)&&_0x4a3659['setActiveAnnotation'](_0x5049e3);}}),this['listenTo'](_0x32fb35,'_deactivateAllAnnotations',()=>{for(const _0x4021d6 of this['activeUIs'])this['_uis']['get'](_0x4021d6)['setActiveAnnotation'](null);}),this['listenTo'](_0x32fb35['_visibleAnnotations'],'add',(_0x3eeb31,_0x5a0794)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5a0794);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x385610){return this['activeUIs']['has'](_0x385610);}activate(_0x64b22c,_0x3d69a9=this['defaultFilter']){const _0x24b450=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x64b22c))throw new _0x54f114('annotationsuis-missing-ui',this,{'uiName':_0x64b22c});this['isActive'](_0x64b22c)&&this['deactivate'](_0x64b22c),this['activeUIs']['add'](_0x64b22c);const _0x2957c7=new Jt();Qt({'source':_0x24b450['_visibleAnnotations'],'target':_0x2957c7,'filter':_0x3d69a9}),this['uisData']['set'](_0x64b22c,{'collection':_0x2957c7,'filter':_0x3d69a9});const _0x422b61=this['_uis']['get'](_0x64b22c);_0x422b61['attach'](_0x2957c7),this['listenTo'](_0x422b61,'change:activeAnnotation',(_0xdcc7a9,_0x3700a2,_0x2eef54,_0x472992)=>{_0x472992&&_0x24b450['_removeActiveAnnotation'](_0x472992),_0x2eef54&&_0x24b450['_addActiveAnnotation'](_0x2eef54);});}deactivate(_0x2e3f4d){if(this['activeUIs']['delete'](_0x2e3f4d),!this['_uis']['has'](_0x2e3f4d))throw new _0x54f114('annotationsuis-missing-ui',this,{'uiName':_0x2e3f4d});const _0x2955e6=this['_uis']['get'](_0x2e3f4d);_0x2955e6['detach'](),this['stopListening'](_0x2955e6),this['uisData']['get'](_0x2e3f4d)['collection']['destroy'](),this['uisData']['delete'](_0x2e3f4d);}switchTo(_0x35dc7a){if(!this['_uis']['has'](_0x35dc7a))throw new _0x54f114('annotationsuis-missing-ui',this,{'uiName':_0x35dc7a});const _0x331ec9=this['context']['plugins']['get'](ti),_0x32a50b=Array['from'](_0x331ec9['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x35dc7a);const _0x24cd4e=this['_uis']['get'](_0x35dc7a);_0x24cd4e['setActiveAnnotation'](_0x32a50b),_0x24cd4e['_setSelectedAnnotations']&&_0x32a50b&&_0x24cd4e['_setSelectedAnnotations']([_0x32a50b]);}deactivateAll(){for(const _0x1a8d02 of this['activeUIs'])this['deactivate'](_0x1a8d02);}register(_0x2e04e0,_0x26a126){if(this['_uis']['has'](_0x2e04e0))throw new _0x54f114('annotationsuis-register-already-registered');if('function'!=typeof _0x26a126['attach']||'function'!=typeof _0x26a126['detach']||'function'!=typeof _0x26a126['setActiveAnnotation'])throw new _0x54f114('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2e04e0,_0x26a126);}refilterAnnotations(){const _0x59b135=this['context']['plugins']['get'](ti)['collection'],_0x79e47c=new Map(),_0x52df1e=Array['from'](this['activeUIs']);for(const _0x5547bc of this['activeUIs']){const _0x456407=this['uisData']['get'](_0x5547bc)['collection'];for(const _0x6a3e4 of _0x456407)_0x79e47c['set'](_0x6a3e4,_0x5547bc);}for(const _0x38c9b8 of _0x59b135){const _0x415dc5=_0x79e47c['get'](_0x38c9b8);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x38c9b8);const _0x290388=_0x52df1e['find'](_0x18556d=>this['uisData']['get'](_0x18556d)['filter'](_0x38c9b8));_0x415dc5!==_0x290388&&(_0x415dc5&&this['uisData']['get'](_0x415dc5)['collection']['remove'](_0x38c9b8),_0x290388&&this['uisData']['get'](_0x290388)['collection']['add'](_0x38c9b8));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x325936){const _0x150e33=[];for(const _0x240ac3 of this['activeUIs']){(0x0,this['uisData']['get'](_0x240ac3)['filter'])(_0x325936)&&_0x150e33['push'](_0x240ac3);}if(_0x150e33['length']>0x1)throw new _0x54f114('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x150e33,'annotationType':_0x325936['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0xc2c888('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0xcaf85a){super(_0xcaf85a);const _0x2854a8=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 _0x5f1934(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2854a8['to']('class')],'style':{'minHeight':_0x2854a8['to']('minHeight',_0x517916=>'number'==typeof _0x517916?Ci(_0x517916+0xa):null)},'dir':_0xcaf85a['uiLanguageDirection'],'role':'application','aria-label':Et(_0xcaf85a,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0xcaf85a,'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',_0x280d9c=>{this['_updateItemPositionInFocusables'](_0x280d9c['source']);}),this['list']['forEach'](_0xc143b6=>{this['focusTracker']['add'](_0xc143b6['element']),this['_updateItemPositionInFocusables'](_0xc143b6);}),this['list']['on']('change',(_0x1a42c7,_0x3cd1d4)=>{for(const _0xa6ce7f of _0x3cd1d4['removed'])this['focusTracker']['remove'](_0xa6ce7f['element']),this['focusables']['remove'](_0xa6ce7f);for(const _0x3a8157 of _0x3cd1d4['added'])this['focusTracker']['add'](_0x3a8157['element']),this['_updateItemPositionInFocusables'](_0x3a8157);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x5b3b95){const _0x17f887=this['focusables']['getIndex'](_0x5b3b95);let _0x24e66a,_0x6afa54;for(const _0x4cf59d of this['focusables'])if(_0x5b3b95['top']<_0x4cf59d['top']){_0x24e66a=_0x4cf59d;break;}if(_0x6afa54=_0x24e66a?this['focusables']['getIndex'](_0x24e66a):this['focusables']['length'],-0x1!==_0x17f887){if(_0x17f887===_0x6afa54-0x1)return;this['focusables']['remove'](_0x5b3b95),_0x6afa54=_0x24e66a?this['focusables']['getIndex'](_0x24e66a):this['focusables']['length'];}this['focusables']['add'](_0x5b3b95,_0x6afa54);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0xc2c888('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x51e000){super(_0x51e000),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4b6664,_0x2e8a78)=>_0x4b6664+_0x2e8a78),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1bc03d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1bc03d['to']('isAnimationDisabled',_0xabdcfb=>_0xabdcfb?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1bc03d['to']('top',_0x553ae6=>bi(_0x553ae6))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x16dd14=this['element']['clientHeight'];_0x16dd14&&(this['height']=_0x16dd14);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x5f4e9d{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xc5965d){super(_0xc5965d),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 _0x16a50a=this['context']['config']['get']('sidebar.container');_0x16a50a&&this['setContainer'](_0x16a50a);}setContainer(_0x48e9f0){if(!Oi(_0x48e9f0))throw new _0x54f114('sidebar-setcontainer-invalid-element');this['container']=_0x48e9f0;}_attachToContainer({viewClass:_0x7c3f71='',spaceBetweenItems:_0xa81fd9=0x19}={}){if(!Oi(this['container']))throw new _0x54f114('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x7c3f71,this['_spaceBetweenItems']=_0xa81fd9;}['rearrange']({removedAnnotation:_0x391948,previousAnnotation:_0x49306c,nextAnnotation:_0x2776f9}){const _0x1199bb=this['getSidebarItemView'](_0x391948);this['view']['list']['remove'](_0x1199bb),this['_destroySidebarItemView'](_0x391948),_0x49306c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x49306c)),_0x2776f9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2776f9)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x126d33,activatedAnnotation:_0x832524,disableAnimationOnActivatedAnnotation:_0x301fbd}){if(this['_activeAnnotation']=_0x832524,_0x126d33){_0x126d33['isActive']=!0x1;const _0x13428c=this['getSidebarItemView'](_0x126d33);_0x13428c&&_0x301fbd&&(_0x13428c['isAnimationDisabled']=!0x1);}if(_0x832524){const _0x226eab=this['getSidebarItemView'](_0x832524);_0x226eab&&(_0x832524['isActive']=!0x0,_0x301fbd&&(_0x226eab['isAnimationDisabled']=!0x0,_0x226eab['top']+=0x1),this['_alignToTargetRect'](_0x226eab));}}_detachFromContainer(_0x8f10fb){if(this['view']['element']['remove'](),_0x8f10fb){for(const _0x209e00 of _0x8f10fb)this['_destroySidebarItemView'](_0x209e00);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0xb64132,_0xf2eec5){_0xf2eec5||(_0xf2eec5=_0xb64132['view']);const _0x209875=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x209875,_0xb64132),this['_annotationToSidebarItemView']['set'](_0xb64132,_0x209875),_0x209875['content']['add'](_0xf2eec5),this['listenTo'](_0xb64132['view'],'change:targetRect',(_0x577da3,_0x2dd99f,_0x1f549d)=>{const _0x4bdf07=this['_getTargetTop'](_0xb64132,_0x1f549d);_0x209875['_targetTop']!=_0x4bdf07&&(_0x209875['_targetTop']=_0x4bdf07,this['_setItemTop'](_0x209875,_0x4bdf07));}),this['listenTo'](_0x209875,'change:top',()=>{this['_recalculate'](_0x209875,'top');}),this['listenTo'](_0x209875,'change:bottom',()=>{this['_recalculate'](_0x209875,'bottom');}),this['_alignToTargetRect'](_0x209875);const _0x422d3b=this['_getItemBefore'](_0x209875);return _0x422d3b&&this['_alignAfterItem'](_0x422d3b,_0x209875)||this['_alignToTargetRect'](_0x209875),this['_updateLastItem'](),this['view']['list']['add'](_0x209875),_0x209875;}['_alignForTopChange'](_0x543742){if(!_0x543742['content']['length'])return;const _0x170ee9=this['_getItemBefore'](_0x543742);if(!_0x170ee9)return;const _0x30f0c7=this['_sidebarItemViewToAnnotation']['get'](_0x170ee9),_0x31b19d=this['_activeAnnotation'];_0x31b19d&&_0x31b19d===_0x30f0c7?this['_alignAfterItem'](_0x170ee9,_0x543742):this['_alignBeforeItem'](_0x543742,_0x170ee9);}_alignForBottomChange(_0x54ed75){if(!_0x54ed75['content']['length'])return;const _0x4f1d83=this['_getItemAfter'](_0x54ed75);if(!_0x4f1d83)return;const _0x3470f2=this['_sidebarItemViewToAnnotation']['get'](_0x4f1d83),_0x7934e1=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x48a818=this['_activeAnnotation'];_0x48a818&&_0x48a818===_0x3470f2&&_0x7934e1?(this['_alignBeforeItem'](_0x4f1d83,_0x54ed75),this['_alignAfterItem'](_0x54ed75,_0x4f1d83)):_0x48a818&&_0x48a818===_0x3470f2?this['_alignBeforeItem'](_0x4f1d83,_0x54ed75):this['_alignAfterItem'](_0x54ed75,_0x4f1d83);}_recalculate(_0x449079,_0x22bc0d){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3b7512,changedProp:_0x527151}of this['_recalculateBuffer'])'top'===_0x527151?this['_alignForTopChange'](_0x3b7512):this['_alignForBottomChange'](_0x3b7512);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x449079,'changedProp':_0x22bc0d});}getSidebarItemView(_0x1b3bb1){return this['_annotationToSidebarItemView']['get'](_0x1b3bb1);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x581af6){const _0x24007c=this['getSidebarItemView'](_0x581af6);this['stopListening'](_0x24007c),this['stopListening'](_0x581af6['view']),_0x24007c['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x581af6),this['_sidebarItemViewToAnnotation']['delete'](_0x24007c);}_createSidebarView(){const _0x5f2440=new Ii(this['context']['locale']);return _0x5f2440['render'](),this['on']('change:_lastItem',(_0x5d9447,_0x57b32a,_0x69d94b,_0x391d47)=>{_0x391d47&&_0x5f2440['unbind']('minHeight'),_0x69d94b?_0x5f2440['bind']('minHeight')['to'](_0x69d94b,'bottom'):_0x5f2440['minHeight']=null;}),_0x5f2440;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x15dff8){const _0x2870e4=this['_sidebarItemViewToAnnotation']['get'](_0x15dff8),_0x126624=_0x2870e4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2870e4)-0x1);return _0x126624&&this['getSidebarItemView'](_0x126624)||null;}_getItemAfter(_0x455958){const _0x5d23c1=this['_sidebarItemViewToAnnotation']['get'](_0x455958),_0x3b1c0b=_0x5d23c1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5d23c1)+0x1);return _0x3b1c0b&&this['getSidebarItemView'](_0x3b1c0b)||null;}_alignBeforeItem(_0x1b310c,_0x306044){_0x1b310c['updateHeight']();const _0xf5d5be=Ni(_0x306044['bottom']+this['_spaceBetweenItems'],_0x1b310c['top']);return!!_0xf5d5be&&(this['_setItemTop'](_0x306044,_0x306044['top']-_0xf5d5be),!0x0);}_alignAfterItem(_0x412952,_0x482be0){_0x412952['updateHeight']();const _0x3aa14c=Ni(_0x412952['bottom']+this['_spaceBetweenItems'],_0x482be0['top']);return!!_0x3aa14c&&(this['_setItemTop'](_0x482be0,_0x482be0['top']+_0x3aa14c,!0x1),!0x0);}_alignToTargetRect(_0x57ac91){const _0x1394d1=this['_sidebarItemViewToAnnotation']['get'](_0x57ac91);if(!_0x1394d1||!_0x1394d1['target']||!_0x1394d1['targetRect'])return;const _0x15cd62=this['_getTargetTop'](_0x1394d1,_0x1394d1['targetRect']);this['_setItemTop'](_0x57ac91,_0x15cd62);}_getTargetTop(_0x2083cc,_0x150f53){if(null===_0x150f53)return 0x0;if(_0x2083cc['target']instanceof _0xf183b0)return _0x150f53['top'];{const _0x4dcf66=new _0xf183b0(this['view']['element'])['top'];return _0x150f53['top']-_0x4dcf66;}}_setItemTop(_0x2c654b,_0x406ada,_0x4b05df=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x4b05df&&(_0x406ada=Math['max'](_0x406ada,this['_getMaxAvailableTop'](_0x2c654b))),_0x2c654b['top']=_0x406ada;}_getMaxAvailableTop(_0x31378b){let _0x184fbd=this['_getItemBefore'](_0x31378b),_0x72238c=0x0;for(;_0x184fbd;)_0x184fbd['updateHeight'](),_0x72238c+=this['_spaceBetweenItems']+_0x184fbd['height'],_0x184fbd=this['_getItemBefore'](_0x184fbd);return _0x72238c;}};function Ni(_0x55f16a,_0x4c514e){return Math['max'](_0x55f16a-_0x4c514e,0x0);}function Oi(_0x1194fe){return null!==_0x1194fe&&'object'==typeof _0x1194fe&&0x1===_0x1194fe['nodeType'];}var Mi=class extends _0x5f4e9d{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56c071){super(_0x56c071),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3f2ff3(),this['_refreshPositioningDebounced']=_0x321ed9(()=>{_0x56c071['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x3fa222=this['context']['plugins']['get'](Ti),_0x198ba8=this['context']['plugins']['get'](ki);_0x3fa222['register']('wideSidebar',this),_0x198ba8['container']&&_0x3fa222['switchTo']('wideSidebar');}setActiveAnnotation(_0x120679){if(_0x120679===this['activeAnnotation'])return;const _0x3276d0=this['context']['plugins']['get'](ki);_0x3276d0['_activeAnnotation']=_0x120679;const _0x105e46=this['activeAnnotation'];_0x3276d0['refresh']({'blurredAnnotation':_0x105e46,'activatedAnnotation':_0x120679}),this['activeAnnotation']=_0x120679;}attach(_0xb98875){this['annotations']=_0xb98875;const _0x59f6dd=this['context']['plugins']['get'](ki);if(_0x59f6dd['_annotations']=_0xb98875,this['isAttached'])throw new _0x54f114('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x59f6dd,'set:container',()=>{this['detach'](),this['listenTo'](_0x59f6dd,'change:container',_0x97ecdd=>{_0x97ecdd['off'](),this['attach'](_0xb98875);});}),_0x59f6dd['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x51cbb3=_0x44baa9=>{_0x44baa9['updateTargetRect'](),_0x59f6dd['addAnnotation'](_0x44baa9);};for(const _0x470e20 of _0xb98875)_0x51cbb3(_0x470e20);this['listenTo'](_0xb98875,'add',(_0x2c30ac,_0x224c72)=>{_0x51cbb3(_0x224c72);}),this['listenTo'](_0xb98875,'remove',(_0x4bd00e,_0x5f4b13,_0x14cab0)=>{_0x59f6dd['rearrange']({'removedAnnotation':_0x5f4b13,'previousAnnotation':_0xb98875['get'](_0x14cab0-0x1),'nextAnnotation':_0xb98875['get'](_0x14cab0+0x1)}),_0x5f4b13===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xb98875,'focus',(_0x55ddfc,_0x150610)=>{this['setActiveAnnotation'](_0x150610);}),this['listenTo'](_0xb98875,'blur',()=>{this['setActiveAnnotation'](null);});const _0xb0853c=this['context']instanceof _0x1c78f6?this['context']['editors']:new _0x3f2ff3([this['context']]);for(const _0x437c33 of _0xb0853c)this['_integrateWithEditorAnnotations'](_0x437c33);this['listenTo'](_0xb0853c,'add',(_0x155042,_0x3a916f)=>{this['listenTo'](_0x3a916f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3a916f);});}),this['listenTo'](_0xb0853c,'remove',(_0x59f7e7,_0x4b8952)=>{_0x4b8952['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4b8952['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x54f114('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x320cea=this['context']['plugins']['get'](ki);_0x320cea['_detachFromContainer'](this['annotations']),this['stopListening'](_0x320cea),this['stopListening'](this['annotations']),this['context']instanceof _0x1c78f6&&this['stopListening'](this['context']['editors']);for(const _0x1e5a99 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1e5a99);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x570954){if(!_0x570954['plugins']['has']('EditorAnnotations'))return;const _0x2c6e0d=_0x570954['plugins']['get']('EditorAnnotations'),_0x2589ba=()=>{const _0x394d30=_0x2c6e0d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x394d30[0x0]||null);};this['listenTo'](_0x2c6e0d,'refresh',_0x2589ba),this['listenTo'](_0x2c6e0d,'blur',(_0x348b66,{isAnnotationTracked:_0x3bfb4f})=>{this['activeAnnotation']&&_0x3bfb4f(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2c6e0d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x52d034=>{_0x2c6e0d['hasDomSelection']()&&(_0x2589ba(),_0x52d034['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2c6e0d);}_destroyEditorAnnotationsIntegration(_0x2bed51){this['stopListening'](_0x2bed51),this['_editorAnnotations']['remove'](_0x2bed51);}},Ri=class extends _0x2493c9{counterView;constructor(_0x462441){super(_0x462441);const _0x14b790=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x39d4fd,_0x2d58c2)=>_0x39d4fd?'...':_0x2d58c2['toString']()),this['set']('annotationType',''),this['icon']=_0x73134a,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x14b790['to']('annotationType',_0x3aa661=>'ck-annotation-counter__badge--'+_0x3aa661),_0x14b790['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x14b790['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x5f4e9d{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x46eeb0){super(_0x46eeb0),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x2d3457())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3f2ff3(),this['_refreshPositioningDebounced']=_0x321ed9(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x1e397e(this['context']['locale']),this['balloonPanelView']=new _0x224b6c(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x307b50){this['annotations']=_0x307b50;const _0x5ea369=this['context']['plugins']['get'](ki),_0x5b8f0d=this['balloonPanelView'];if(_0x5ea369['_annotations']=_0x307b50,this['isAttached'])throw new _0x54f114('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5ea369,'set:container',()=>{this['detach'](),this['listenTo'](_0x5ea369,'change:container',_0x355825=>{_0x355825['off'](),this['attach'](_0x307b50);});}),_0x5ea369['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x58dbba=_0x16a529=>{const _0xee2354=new Ri(this['context']['locale']);_0x5ea369['addAnnotation'](_0x16a529,_0xee2354),this['_annotationToNarrowView']['set'](_0x16a529,_0xee2354),_0xee2354['bind']('isDirty','annotationType','number')['to'](_0x16a529['view'],'isDirty','type','length'),_0xee2354['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5b8f0d['content']['first']!==_0x16a529['view']?(this['_showBalloon'](_0x16a529),_0x16a529['view']['element']['focus'](),this['setActiveAnnotation'](_0x16a529)):this['setActiveAnnotation'](null);});};for(const _0x4c1634 of _0x307b50)_0x58dbba(_0x4c1634);this['listenTo'](_0x307b50,'add',(_0x45cfba,_0x1f8372)=>{_0x58dbba(_0x1f8372);}),this['listenTo'](_0x307b50,'remove',(_0x42acfc,_0x14cce0,_0x3645db)=>{this['_annotationToNarrowView']['get'](_0x14cce0)['destroy'](),this['_annotationToNarrowView']['delete'](_0x14cce0),_0x5ea369['rearrange']({'removedAnnotation':_0x14cce0,'previousAnnotation':_0x307b50['get'](_0x3645db-0x1),'nextAnnotation':_0x307b50['get'](_0x3645db+0x1)}),_0x14cce0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x307b50,'focus',(_0x27837f,_0x375b0c)=>{this['setActiveAnnotation'](_0x375b0c);}),this['listenTo'](_0x307b50,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2895c7,_0x301325)=>{_0x301325['keyCode']===_0x380231['esc']&&_0x5b8f0d['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5b8f0d['content']['first']),this['_hideBalloon'](),_0x301325['stopPropagation'](),_0x301325['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x138d1f,_0x216221)=>{const _0x2dd353=_0x216221['target'];_0x5b8f0d['isVisible']&&_0x5b8f0d['element']['contains'](_0x2dd353)||_0x5ea369['view']['element']['contains'](_0x2dd353)||_0x138d1f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x23959b=>_0x23959b['contains'](_0x2dd353))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x16fb64=this['context']instanceof _0x1c78f6?this['context']['editors']:new _0x3f2ff3([this['context']]);for(const _0x39ebbb of _0x16fb64)this['_integrateWithEditorAnnotations'](_0x39ebbb);this['listenTo'](_0x16fb64,'add',(_0x17bc52,_0x379a83)=>{this['listenTo'](_0x379a83,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x379a83);});}),this['listenTo'](_0x16fb64,'remove',(_0x195315,_0xd28c9f)=>{_0xd28c9f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xd28c9f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x56110a){if(_0x56110a===this['activeAnnotation'])return;const _0x536436=this['context']['plugins']['get'](ki);_0x536436['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x56110a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x56110a&&_0x536436['getSidebarItemView'](_0x56110a)?this['_showBalloon'](_0x56110a):this['_hideBalloon'](),this['activeAnnotation']=_0x56110a;}detach(){if(!this['isAttached'])throw new _0x54f114('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x184ac1=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4d21cd=>_0x4d21cd['destroy']()),this['_annotationToNarrowView']['clear'](),_0x184ac1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1c78f6&&this['stopListening'](this['context']['editors']);for(const _0x4caa78 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4caa78);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(_0x273f21){if(!_0x273f21['plugins']['has']('EditorAnnotations'))return;const _0x3666b2=_0x273f21['plugins']['get']('EditorAnnotations'),_0x5ee34c=this['context']['plugins']['get'](ki),_0x1562be=this['annotations'],_0x1edee1=this['balloonPanelView'],_0x43ec2c=()=>{const _0x36c5be=_0x3666b2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x36c5be),this['setActiveAnnotation'](_0x36c5be[0x0]||null);};this['listenTo'](_0x3666b2,'refresh',_0x43ec2c),this['listenTo'](_0x3666b2,'blur',(_0x4580a,{isAnnotationTracked:_0x2d38b4})=>{this['activeAnnotation']&&_0x2d38b4(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3666b2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1562be,'blur',_0x329f9f=>{_0x3666b2['hasDomSelection']()&&_0x329f9f['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x389433,_0x2899da)=>{const _0x52b3e1=_0x2899da['target'];_0x1edee1['isVisible']&&_0x1edee1['element']['contains'](_0x52b3e1)||_0x5ee34c['view']['element']['contains'](_0x52b3e1)||this['activeAnnotation']&&_0x3666b2['hasDomSelection']()&&(_0x43ec2c(),_0x389433['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3666b2);}_destroyEditorAnnotationsIntegration(_0x1d5612){_0x1d5612&&(this['stopListening'](_0x1d5612),this['_editorAnnotations']['remove'](_0x1d5612));}_setSelectedAnnotations(_0x10dfb3){for(const _0x55181f of this['_selectedAnnotations'])_0x10dfb3['includes'](_0x55181f)||this['_manuallyClosedAnnotationViews']['delete'](_0x55181f['view']);this['_selectedAnnotations']=_0x10dfb3;}_refreshPositioning(){const _0x3e352c=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3e352c['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2a5519){if(this['_manuallyClosedAnnotationViews']['has'](_0x2a5519['view']))return;const _0xab4d17=this['balloonPanelView']['content']['first'];_0xab4d17!==_0x2a5519['view']?(_0xab4d17&&this['_detachListeners'](_0xab4d17),this['_attachListeners'](_0x2a5519['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2a5519['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x85d0af=this['balloonPanelView']['content']['first'],_0x17616d=_0x85d0af&&this['annotations']['getByView'](_0x85d0af);if(!_0x17616d||!this['_annotationToNarrowView']['has'](_0x17616d))return;const _0x1a6536=this['_annotationToNarrowView']['get'](_0x17616d)['element'],_0x583fd3=(function(){const _0x397e58=_0x224b6c['defaultPositions'];return[_0x397e58['southArrowNorthEast'],_0x397e58['northArrowSouthEast'],_0x397e58['southArrowNorth'],_0x397e58['northArrowSouth'],_0x397e58['southArrowNorthWest'],_0x397e58['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1a6536,'positions':_0x583fd3});}['_hideBalloon'](){const _0x332a20=this['balloonPanelView'],_0x4934be=_0x332a20['content']['first'];_0x4934be&&(this['_detachListeners'](_0x4934be),_0x332a20['unpin'](),_0x332a20['content']['clear']());}_attachListeners(_0x34f4f2){this['listenTo'](_0x34f4f2,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x34f4f2,'Esc',(_0x468a5a,_0x77ee95)=>{this['_manuallyClosedAnnotationViews']['add'](_0x34f4f2),this['_hideBalloon'](),_0x77ee95();});}_detachListeners(_0x4aaa29){this['stopListening'](_0x4aaa29);}},xi=class extends _0xa7d3b5{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x495e50,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x184318){super(_0x184318),_0x184318['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x184318['plugins']['get'](_0x495e50),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x321ed9(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x5bd534=this['editor']['plugins']['get'](Ti);_0x5bd534['context']===this['editor']&&(_0x5bd534['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x17a615,_0x5e9f80)=>{const _0x4f62a5=this['_balloon'];if(this['isAttached']&&_0x4f62a5['visibleView']){const _0x3a5df3=this['annotations']['getByView'](_0x4f62a5['visibleView']);_0x3a5df3&&this['_closeAnnotation'](_0x3a5df3),_0x5e9f80();}}));}afterInit(){const _0x4eb6de=this['editor']['plugins']['get'](Ti);_0x4eb6de['context']===this['editor']&&(_0x4eb6de['hasActive']()||_0x4eb6de['switchTo']('inline'));}setActiveAnnotation(_0x2290c0){_0x2290c0!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2290c0&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2290c0)&&this['_addAnnotationToBalloon'](_0x2290c0,!0x0),_0x2290c0['isActive']=!0x0),_0x2290c0||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2290c0);}attach(_0x59b4c5){this['annotations']=_0x59b4c5;const _0x37f35e=this['editor']['plugins']['get'](Ti),_0xa5b2ab=this['_balloon'];if(this['isAttached'])throw new _0x54f114('inlineannotations-attach-already-attached',this);if(_0x37f35e['context']!==this['editor'])throw new _0x54f114('inlineannotations-not-allowed-with-context',this);const _0xc6e198=this['editor']['plugins']['get'](di);this['listenTo'](_0xc6e198,'refresh',()=>{const _0x320afd=_0xc6e198['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4b3821,_0x51a6ff;!this['_forceRefresh']&&(_0x4b3821=_0x320afd,_0x51a6ff=this['_selectedAnnotations'],_0x4b3821['length']===_0x51a6ff['length']&&_0x4b3821['every'](_0x59b59f=>_0x51a6ff['includes'](_0x59b59f)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x320afd),this['setActiveAnnotation'](_0x320afd[0x0]||null));}),this['listenTo'](_0xc6e198,'blur',(_0x5800bd,{isAnnotationTracked:_0x5655df})=>{this['activeAnnotation']&&_0x5655df(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xc6e198,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4c1c9c,_0x55aeae,_0x3fd060)=>{_0x3fd060||this['setActiveAnnotation'](null);}),this['listenTo'](_0x59b4c5,'remove',(_0x12f0ac,_0xd1e052)=>{this['_removeAnnotationFromBalloon'](_0xd1e052),_0xd1e052===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xa5b2ab,'change:visibleView',(_0xf27402,_0x3c1609,_0x1c6515,_0x399cc8)=>{_0x399cc8&&this['stopListening'](_0x399cc8);const _0xb1cfb=_0x59b4c5['getByView'](_0x1c6515);_0x1c6515&&_0xb1cfb&&(this['listenTo'](_0x1c6515,'change:height',()=>{_0xa5b2ab['updatePosition']();}),this['listenTo'](_0x1c6515,'Esc',()=>{this['_closeAnnotation'](_0xb1cfb),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xb1cfb&&this['setActiveAnnotation'](_0xb1cfb));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xa5b2ab['visibleView']&&_0x59b4c5['getByView'](_0xa5b2ab['visibleView'])&&_0xa5b2ab['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 _0x54f114('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x53b20e of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x53b20e);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x4382db){for(const _0x1802a6 of this['_selectedAnnotations'])_0x4382db['includes'](_0x1802a6)||this['_manuallyClosed']['delete'](_0x1802a6);for(const _0x217ed8 of this['annotations'])_0x4382db['includes'](_0x217ed8)||this['_removeAnnotationFromBalloon'](_0x217ed8);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x23e54d of _0x4382db)this['_addAnnotationToBalloon'](_0x23e54d);}this['_selectedAnnotations']=_0x4382db;}_addAnnotationToBalloon(_0x52003b,_0x4f01b9=!0x1){this['_manuallyClosed']['has'](_0x52003b)||(this['_addedAnnotations']['has'](_0x52003b)||this['_balloon']['hasView'](_0x52003b['view'])||(this['_addedAnnotations']['add'](_0x52003b),this['_balloon']['add']({'stackId':_0x52003b['view']['id'],'view':_0x52003b['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x52003b)}})),_0x4f01b9&&this['_balloon']['showStack'](_0x52003b['view']['id']));}_getBalloonTargetForAnnotation(_0xe5a61e){const _0x147b76=_0xe5a61e['target'],_0x49b9dd=this['editor']['editing']['view'],_0x828d8a=_0x49b9dd['document']['selection']['getFirstRange'](),_0x40027c=_0x49b9dd['domConverter']['viewRangeToDom'](_0x828d8a);if(_0x40027c['collapse'](!0x0),_0x147b76){if(_0x147b76 instanceof _0xf183b0)return _0x147b76;let _0x437ddb=[];for(const _0x28f006 of _0x147b76)_0x437ddb['push'](..._0xf183b0['getDomElementRects'](_0x28f006));_0x437ddb=function(_0x2c4257){const _0x1b4a77=[];let _0x10cbaf=_0x2c4257[0x0];for(let _0x383c1b=0x1;_0x383c1b<_0x2c4257['length'];_0x383c1b++)if(Pi(_0x10cbaf,_0x2c4257[_0x383c1b])){const _0x9e3161=_0x2c4257[_0x383c1b]['width'];_0x10cbaf['width']+=_0x9e3161,_0x10cbaf['right']+=_0x9e3161;}else _0x1b4a77['push'](_0x10cbaf),_0x10cbaf=_0x2c4257[_0x383c1b];return _0x1b4a77['push'](_0x10cbaf),_0x1b4a77;}(_0x437ddb);const _0x212010=_0x40027c['getBoundingClientRect']();return _0x437ddb['find'](_0xbd069b=>_0xbd069b['top']<=_0x212010['top']&&_0xbd069b['bottom']>=_0x212010['bottom']&&_0xbd069b['left']<=_0x212010['left']&&_0xbd069b['right']>=_0x212010['right'])||_0x437ddb[0x0];}return _0xe5a61e['targetRect']||_0x40027c;}_removeAnnotationFromBalloon(_0x374dfe){this['_addedAnnotations']['has'](_0x374dfe)&&this['_balloon']['hasView'](_0x374dfe['view'])&&(this['_addedAnnotations']['delete'](_0x374dfe),this['_balloon']['remove'](_0x374dfe['view']));}_closeAnnotation(_0xb46d73){this['_manuallyClosed']['add'](_0xb46d73),this['_removeAnnotationFromBalloon'](_0xb46d73);}};function Pi(_0x5e1daa,_0xb045a){return _0x5e1daa['top']===_0xb045a['top']&&_0x5e1daa['bottom']===_0xb045a['bottom']&&_0x5e1daa['right']===_0xb045a['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x42f43f,_0x251d8b){super(_0x42f43f),this['set']('isEmpty',!_0x251d8b['length']),this['focusTracker']=new _0x5f1934(),this['_annotationViews']=_0x251d8b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x251d8b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x251d8b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x251d8b,'remove',(_0x2d5225,_0x241ff3)=>{_0x241ff3['isActive']&&this['focus'](),_0x251d8b['length']||(this['isEmpty']=!0x0);});const _0x879d1a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x42f43f,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x251d8b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x879d1a['if']('isEmpty','ck-hidden',_0x272e38=>!_0x272e38)]},'children':[{'text':Et(_0x42f43f,'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 _0x5283a4 of this['_annotationViews'])this['focusTracker']['add'](_0x5283a4['element']);this['_annotationViews']['on']('change',(_0x2e3d40,{added:_0x58bb71,removed:_0x2a79a4})=>{for(const _0x21f152 of _0x58bb71)this['focusTracker']['add'](_0x21f152['element']);for(const _0x395685 of _0x2a79a4)this['focusTracker']['remove'](_0x395685['element']);});}},Di=class extends _0x5f4e9d{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0xbba919){super(_0xbba919),this['archivedThreads']=new _0x3f2ff3();}init(){const _0x191cce=this['context'],_0x241f9f=_0x191cce['plugins']['get'](oi),_0x3f540b=_0x191cce['plugins']['get'](ti);this['listenTo'](_0x241f9f,'addCommentThread',(_0x2787f0,{threadId:_0x55582e})=>{const _0x261f3c=_0x241f9f['getCommentThread'](_0x55582e);_0x261f3c['archivedAt']&&this['archivedThreads']['add'](_0x261f3c,this['_calculatePosition'](_0x261f3c['archivedAt'])),this['listenTo'](_0x261f3c,'change:archivedAt',(_0x1f1c5e,_0x58effa,_0x263e35)=>{_0x263e35?this['archivedThreads']['has'](_0x261f3c)||this['archivedThreads']['add'](_0x261f3c,this['_calculatePosition'](_0x261f3c['archivedAt'])):this['archivedThreads']['has'](_0x261f3c)&&this['archivedThreads']['remove'](_0x261f3c);});}),this['listenTo'](_0x241f9f,'removeCommentThread',(_0x3d4ad3,{threadId:_0x1ed03b})=>{const _0x5e94e8=_0x241f9f['getCommentThread'](_0x1ed03b);this['stopListening'](_0x5e94e8),this['archivedThreads']['has'](_0x5e94e8)&&this['archivedThreads']['remove'](_0x5e94e8);},{'priority':'highest'}),this['listenTo'](_0x3f540b['collection'],'focus',(_0x3034b5,_0x19c497)=>{_0x19c497['isVisible']||(_0x19c497['isActive']=!0x0,_0x3f540b['activate'](_0x19c497));});}_calculatePosition(_0x3ed269){const _0x19eb0a=[...this['archivedThreads']]['findIndex'](_0x8d9b9=>_0x8d9b9['archivedAt']<_0x3ed269);return _0x19eb0a>-0x1?_0x19eb0a:this['archivedThreads']['length'];}},Vi=class extends _0xa7d3b5{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x42472a];}constructor(_0x522ad3){super(_0x522ad3),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x1e6435=this['editor'],_0x4b10ae=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1e6435['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2493c9,!0x0)),_0x1e6435['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xe57de3=this['_createCommentsArchiveButton'](rt);return _0xe57de3['set']({'role':'menuitemcheckbox'}),_0xe57de3;});const _0x13b3d3=_0x1e6435['plugins']['get'](Di),_0x44c1da=_0x1e6435['plugins']['get']('Annotations'),_0x377c9d=_0x1e6435['plugins']['get']('CommentsRepository');_0x13b3d3['archivedThreads']['forEach'](_0x17e9e5=>{this['_handleNewThread'](_0x17e9e5);}),this['listenTo'](_0x13b3d3['archivedThreads'],'add',(_0x38f62d,_0x332c49)=>{this['_handleNewThread'](_0x332c49);}),this['listenTo'](_0x44c1da['collection'],'add',(_0x2443b1,_0x1c7bd9)=>{const _0x57688e=this['_pendingThreads']['find'](_0x4ec53a=>{const _0x13add5=_0x377c9d['_threadToController']['get'](_0x4ec53a);return _0x13add5&&_0x1c7bd9['innerView']===_0x13add5['view'];});if(_0x57688e){const _0x503d14=this['_calculatePosition'](_0x57688e['archivedAt']);this['_addAnnotationToArchive'](_0x1c7bd9,_0x503d14),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x57688e),0x1);}}),this['listenTo'](_0x13b3d3['archivedThreads'],'remove',(_0x117bee,_0x57c28e)=>{const _0x331bef=_0x1e6435['config']['get']('collaboration.channelId');if(!_0x331bef||_0x57c28e['channelId']===_0x331bef){if(this['_pendingThreads']['includes'](_0x57c28e))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x57c28e),0x1);else{const _0x4ebc9c=_0x377c9d['_threadToController']['get'](_0x57c28e),_0xf19471=_0x44c1da['getByInnerView'](_0x4ebc9c['view']);this['annotationViews']['remove'](_0xf19471['view']),this['stopListening'](_0xf19471),this['stopListening'](_0xf19471['focusableElements']);}}}),this['listenTo'](_0x44c1da['collection'],'add',(_0x5a3f67,_0x5243b1)=>{this['listenTo'](_0x5243b1,'escape',_0x4b10ae);}),this['listenTo'](_0x44c1da['collection'],'remove',(_0x199be9,_0x1fc3a4)=>{this['stopListening'](_0x1fc3a4,'escape',_0x4b10ae);});}_addAnnotationToArchive(_0x1b93b6,_0x1c34a2){this['listenTo'](_0x1b93b6,'set:isVisible',_0x1ea188=>{_0x1ea188['return']=!0x1,_0x1ea188['stop']();}),this['annotationViews']['add'](_0x1b93b6['view'],_0x1c34a2);}['_handleNewThread'](_0x527f6d){const _0x427050=this['editor']['plugins']['get']('CommentsRepository'),_0x5620f0=this['editor']['plugins']['get']('Annotations'),_0x57eb4f=this['editor']['config']['get']('collaboration.channelId');if(!_0x57eb4f||_0x527f6d['channelId']===_0x57eb4f){const _0x52c194=_0x427050['_threadToController']['get'](_0x527f6d);if(!_0x52c194)return void this['_pendingThreads']['push'](_0x527f6d);const _0x3fec3a=this['_calculatePosition'](_0x527f6d['archivedAt']),_0x1a3761=_0x5620f0['getByInnerView'](_0x52c194['view']);_0x1a3761['isVisible']&&_0x5620f0['_visibleAnnotations']['remove'](_0x1a3761),this['_addAnnotationToArchive'](_0x1a3761,_0x3fec3a);}}_calculatePosition(_0x20350f){const _0x37a016=this['editor']['config']['get']('collaboration.channelId'),_0x497fd7=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x567df0=>_0x567df0['channelId']===_0x37a016)['findIndex'](_0x30529d=>_0x30529d['archivedAt']<_0x20350f);return _0x497fd7<0x0||_0x497fd7>this['annotationViews']['length']?this['annotationViews']['length']:_0x497fd7-0x1;}_toggleDialog(){const _0x3eb059=this['editor'],_0x1e65e5=_0x3eb059['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x3eb059['locale'],this['annotationViews'])),'commentsArchive'===_0x1e65e5['id']?_0x1e65e5['hide']():_0x1e65e5['show']({'id':'commentsArchive','title':Et(_0x3eb059['locale'],'COMMENTS_ARCHIVE'),'icon':_0x10e590,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5d6d8a['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x230e4d,_0x50ed25=!0x1){const _0x3d8b45=this['editor']['locale'],_0x555078=this['editor']['plugins']['get']('Dialog'),_0x1a5d4b=new _0x230e4d(_0x3d8b45);return _0x1a5d4b['bind']('isEnabled')['to'](this,'isEnabled'),_0x1a5d4b['bind']('isOn')['to'](_0x555078,'id',_0x576075=>'commentsArchive'===_0x576075),_0x1a5d4b['set']({'label':Et(_0x3d8b45,'COMMENTS_ARCHIVE'),'icon':_0x10e590,'isToggleable':!0x0}),_0x50ed25&&(_0x1a5d4b['tooltip']=!0x0),this['listenTo'](_0x1a5d4b,'execute',()=>this['_toggleDialog']()),_0x1a5d4b;}_hideDialogOnAnnotationEscape=_0x337ed3=>{const _0x1097cf=_0x337ed3['source'];if(!this['annotationViews']['has'](_0x1097cf['view']))return;const _0x5a4647=this['editor']['plugins']['get']('Dialog');_0x5a4647['isOpen']&&'commentsArchive'===_0x5a4647['id']&&(_0x5a4647['hide'](),_0x337ed3['stop']());};},Bi=class extends _0xa7d3b5{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};