@ckeditor/ckeditor5-comments 48.5.2 → 48.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 _0x404c64,Context as _0x3654e9,ContextPlugin as _0x1b3fad,Editor as _0x1cecc3,PendingActions as _0x251d38,Plugin as _0x2231bd}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x546dad,Collection as _0x42a45f,DomEmitterMixin as _0x43eb56,FocusTracker as _0x2d4278,KeystrokeHandler as _0x3b18d7,ObservableMixin as _0x55d35b,Rect as _0x3b4d13,diff as _0x279221,first as _0x387552,getEnvKeystrokeText as _0xcfd8cd,keyCodes as _0xa8ac5f,priorities as _0x1026a6,scrollViewportToShowTarget as _0x13b67e,toUnit as _0x36fad3,uid as _0x166325}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x3de02c,ConfirmMixin as _0x53c1c3,FOCUS_ANNOTATION_KEYSTROKE as _0x33670a,LateFocusButtonView as _0x764e20,LateFocusDropdownButtonView as _0x575060,UserView as _0x3ff703,Users as _0x4ffb9d,getAllMarkersDomElementsSorted as _0xdc7995,getDateTimeFormatter as _0x23af40,hashObject as _0x11175c,setupThreadKeyboardNavigation as _0x5423f9,surroundingMarkersDetector as _0xd84e29,trimHtml as _0x30c2cf}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x14e7b5,debounce as _0x54f3ec,isEqual as _0xebc9b3,set as _0x46d23a,throttle as _0x10dbed,unset as _0x11fad3}from'es-toolkit/compat';import{IconAddComment as _0x1fc2c2,IconCheck as _0x4c4e65,IconCommentsArchive as _0x18d0b4,IconPencil as _0x41a0b8,IconRemoveComment as _0x2f474f,IconThreeVerticalDots as _0xdd7ec8,IconUndo as _0xc24c1}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x8d9521,BodyCollection as _0x71b4d6,ButtonView as _0x393932,ContextualBalloon as _0x3ed974,Dialog as _0x2981c2,DialogViewPosition as _0x141cf9,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
- _0x55d35b();var bt=class extends It{['model'];['view'];constructor(_0x47077a,_0x6dd68c){super(),this['model']=_0x47077a,this['model']['_isAttached']=!0x0,this['view']=_0x6dd68c,this['listenTo'](_0x6dd68c,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x6dd68c,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x6dd68c,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x6dd68c,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x6dd68c,'addComment',(_0x982601,_0x44e700)=>this['addComment'](_0x44e700)),this['listenTo'](_0x6dd68c,'updateComment',(_0x55f3a3,_0x789312,_0x1c48cc)=>this['updateComment'](_0x789312,_0x1c48cc)),this['listenTo'](_0x6dd68c,'removeComment',(_0x4da3d2,_0x42e0db)=>this['removeComment'](_0x42e0db));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x21ec7b){this['model']['addComment']({'content':_0x21ec7b,'authorId':this['view']['_localUser']['id']});}updateComment(_0x2277d2,_0x268bfe){this['model']['getComment'](_0x2277d2)['update']({'content':_0x268bfe});}removeComment(_0x46a9da){this['model']['getComment'](_0x46a9da)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x57e100,_0x2fa50a,_0x123136){const t=_0x57e100['t'];switch(_0x2fa50a){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'},_0x123136);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'},_0x123136);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'},_0x123136);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'},_0x123136);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x123136);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'},_0x123136);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'},_0x123136);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'},_0x123136);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(_0x3b30e1,_0x50bf2d){super(_0x3b30e1);const _0x4c6baa=_0x166325();this['main']=this['createCollection'](),this['editable']=new st(_0x3b30e1,_0x50bf2d,void 0x0,{'label':()=>Et(_0x3b30e1,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3b30e1['uiLanguageDirection'],'lang':_0x3b30e1['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x4c6baa},'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(_0x57ff86){super(_0x57ff86),this['view']=new kt(_0x57ff86['locale'],_0x57ff86['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x2c2a77=this['editor']['editing']['view'],_0x51b933=this['view']['editable'];_0x51b933['name']=_0x2c2a77['document']['getRoot']()['rootName'],this['view']['render']();const _0x18803d=_0x51b933['element'];this['setEditableElement'](_0x51b933['name'],_0x18803d),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2c2a77['attachDomRoot'](_0x18803d),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x55d35b(_0x1cecc3);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x4ece3d={}){(_0x4ece3d=Object['assign']({},_0x4ece3d))['plugins']||(_0x4ece3d['plugins']=CommentEditor['defaultPlugins']),super(_0x4ece3d),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 _0x240673=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x240673))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1c7ae8=>{const _0x53961f=this['model']['document']['getRoot'](),_0x3a4257=_0x53961f&&_0x53961f['getChild'](_0x53961f['childCount']-0x1);_0x1c7ae8['setSelection'](_0x3a4257,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x2d52f1=this['editing']['view'],_0x222351=_0x2d52f1['document']['getRoot'](),_0x36bf17=_0x222351['getChild'](0x0);_0x222351['childCount']>0x1||!_0x36bf17||'p'!=_0x36bf17['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x2d52f1,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x36bf17['placeholder']=this['placeholder']),ut({'view':_0x2d52f1,'element':_0x36bf17,'keepOnFocus':!0x0}),this['placeholderElement']=_0x36bf17);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x1ea33e,_0x4f67fb={}){super(_0x1ea33e),this['editor']=null,this['_editorConfig']=_0x4f67fb,this['set']('value',_0x4f67fb['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x1ea33e,'Reply...')),this['set']('submitLabel',Et(_0x1ea33e,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x3b18d7(),this['focusTracker']=new _0x2d4278(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x17e52d=>!_0x17e52d['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',(_0x48cf4d,_0x5bd6af)=>{this['cancelButtonView']['fire']('execute'),_0x5bd6af();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3a3f3d,_0x44c6fb)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x44c6fb());}),this['on']('submit',(_0x534b74,_0x505c33)=>{_0x505c33['length']>0xfde8?(alert(Et(_0x1ea33e,'TOO_LONG_COMMENT_ALERT',[_0x505c33['length'],0xfde8])),_0x534b74['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 _0x17fdb1=this['editor'];this['element']['insertBefore'](_0x17fdb1['ui']['element'],this['element']['firstChild']),_0x17fdb1['model']['document']['on']('change',()=>this['value']=_0x17fdb1['getData']()),_0x17fdb1['bind']('placeholder')['to'](this),this['focusables']['add'](_0x17fdb1['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x347247){-0x1===_0x347247?(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:_0x37a58b}=this,_0x5edb83=new _0x393932(_0x37a58b);return _0x5edb83['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5edb83['withText']=!0x0,_0x5edb83['bind']('label')['to'](this,'submitLabel'),_0x5edb83['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5edb83['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x49c70a,_0x5960a9)=>!_0x5960a9&&!!_0x49c70a['trim']()),_0x5edb83;}_createCancelButton(){const {locale:_0x31c4e0}=this,_0x518cc4=new _0x393932(_0x31c4e0);return _0x518cc4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x518cc4['label']=Et(_0x31c4e0,'Cancel'),_0x518cc4['withText']=!0x0,_0x518cc4['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x518cc4;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x551aa3=>{this['focusTracker']['add'](_0x551aa3['element']);}),this['focusables']['on']('change',(_0x2474c7,_0x4e8875)=>{for(const _0xc59dfc of Array['from'](_0x4e8875['added'])['reverse']())this['focusTracker']['add'](_0xc59dfc['element']);});}},xt=class extends ht{constructor(_0x4d5767,_0x466129,_0x3ae4d7){super(_0x4d5767),this['commentInputView']=new St(_0x4d5767,_0x3ae4d7),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4ed728,_0x206da0)=>_0x4ed728||!!_0x206da0),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 _0x3ff703(_0x4d5767,_0x466129),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'](_0x28db1d){this['commentInputView']['focus'](_0x28db1d);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x3ba168,_0x1786b6)=>{const {submitButtonView:_0x15ef85,cancelButtonView:_0x5dfe74,editor:_0x3e26f9}=this['commentInputView'];[_0x15ef85['element'],_0x5dfe74['element'],_0x3e26f9?_0x3e26f9['editing']['view']['getDomRoot']():null]['filter'](_0x4b2c2f=>_0x4b2c2f)['some'](_0x218731=>_0x218731['contains'](_0x1786b6['target']))||(this['focus'](),_0x1786b6['preventDefault']());});}},Pt=class extends ht{constructor(_0xb4df6b){super(_0xb4df6b);const _0x5622aa=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5622aa['to']('count',_0x518aba=>Et(_0xb4df6b,'NUMBER_OF_COMMENTS',_0x518aba))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x2aff67,_0x50b5e3,_0x5f5266){super(_0x2aff67);const _0x1ac854=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x50b5e3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x50b5e3,this['_config']=_0x5f5266,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2d4278(),this['keystrokes']=new _0x3b18d7(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2b95c7=>this['commentViews']['map'](_0x92c5fa=>_0x92c5fa['element'])['includes'](_0x2b95c7['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x2aff67),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3b4c46=>_0x3b4c46-this['_config']['maxCommentsWhenCollapsed']);for(const _0x22d319 of _0x50b5e3['comments'])this['_handleNewCommentModel'](_0x22d319);this['_handleInfoComment'](),this['listenTo'](_0x50b5e3['comments'],'add',(_0x3e1bf0,_0x45c744)=>{const _0x205a2b=this['_calculatePosition'](_0x45c744);this['length']++,this['_handleNewCommentModel'](_0x45c744,_0x205a2b),this['refreshVisibleViews']();}),this['listenTo'](_0x50b5e3['comments'],'remove',(_0x21e350,_0x55d091)=>{this['length']--,this['_handleRemoveCommentModel'](_0x55d091),this['refreshVisibleViews']();}),this['listenTo'](_0x50b5e3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x50b5e3,'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',_0x1ac854['if']('length','ck-hidden',_0xcd4633=>!_0xcd4633)],'aria-label':Et(_0x2aff67,'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'](_0x5b512b){-0x1===_0x5b512b?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x59e058 of this['commentViews'])_0x59e058['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x579776,_0x379f42){const _0xd6df66=new this['_config']['CommentView'](this['locale'],_0x579776,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xd6df66['viewUid']=_0x579776['id'],_0xd6df66['delegate']('removeComment')['to'](this),_0xd6df66['delegate']('updateComment')['to'](this),_0xd6df66['delegate']('resolveCommentThread')['to'](this),_0xd6df66['delegate']('editorReady')['to'](this),_0xd6df66['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xd6df66,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xd6df66,_0x379f42);}_calculatePosition(_0x39f399){const _0x5ad061=this['_model']['_findOptimalIndex'](_0x39f399);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x39f399['authoredAt']?_0x5ad061-0x1:_0x5ad061:_0x5ad061-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x101238={'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'],_0x101238,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x101238));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x5e99ad){const _0x28618b=this['commentViews']['remove'](_0x5e99ad['id']);this['stopListening'](_0x28618b),_0x28618b['isEditMode']&&this['_updateHasDirtyComment'](),_0x28618b['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x287bf7=>_0x287bf7['isEditMode']);}['_rearrangeCollapse'](){const _0x811c31=function(_0x5d54d4){const _0x4aeefb=new _0x42a45f();for(const _0xf0c4bb of _0x5d54d4)_0x4aeefb['add'](_0xf0c4bb);return _0x4aeefb;}(this['commentViews']),_0x4a8ada=this['_collapsedCommentsView']['count'];for(let _0x42dfa4=0x1;_0x42dfa4<=_0x4a8ada;_0x42dfa4++)_0x811c31['remove'](0x1);for(const _0x558364 of _0x811c31)_0x558364['collapse']();_0x4a8ada>0x0&&_0x811c31['add'](this['_collapsedCommentsView'],0x1),Dt(_0x279221(Array['from'](this['visibleViews']),Array['from'](_0x811c31)),this['visibleViews'],_0x811c31);}['_rearrangeExpand'](){Dt(_0x279221(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x11ba92 of this['visibleViews'])_0x11ba92['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0xc7361f=>{this['focusTracker']['add'](_0xc7361f['element']),this['keystrokes']['listenTo'](_0xc7361f['element']);}),this['commentViews']['on']('change',(_0x534dd1,_0x238568)=>{for(const _0xf2334f of _0x238568['removed'])this['focusTracker']['remove'](_0xf2334f['element']),this['keystrokes']['stopListening'](_0xf2334f['element']);for(const _0x28865a of Array['from'](_0x238568['added'])['reverse']())this['focusTracker']['add'](_0x28865a['element']),this['keystrokes']['listenTo'](_0x28865a['element']);});}};function Dt(_0x1bbb9b,_0x40aa7e,_0x2e1559){let _0xebd88c=0x0;for(const _0xc3031a of _0x1bbb9b)switch(_0xc3031a){case'insert':_0x40aa7e['add'](_0x2e1559['get'](_0xebd88c),_0xebd88c),_0xebd88c++;break;case'delete':_0x40aa7e['remove'](_0xebd88c);break;case'equal':_0xebd88c++;}}var Vt=class extends ht{constructor(_0x46e186){super(_0x46e186);const _0x3f4f5a=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3f4f5a['to']('contextValue',_0x1da476=>Et(_0x46e186,'THREAD_CONTEXT_LABEL',_0x1da476)),'tabindex':-0x1},'children':[{'text':_0x3f4f5a['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x4c7584,_0x5d7341){super(_0x4c7584);const _0x1de9d0=this['bindTemplate'];this['_model']=_0x5d7341,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2d4278(),this['keystrokes']=new _0x3b18d7(),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',_0x10bc37=>!!_0x10bc37),this['bind']('contextValue')['to'](this['_model'],'context',_0x37fd6c=>_0x37fd6c&&_0x37fd6c['value']?this['_trimContextValue'](_0x37fd6c['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',_0x1de9d0['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 _0x2eac43=new _0x393932(this['locale']);return _0x2eac43['label']=Et(this['locale'],'Reopen'),_0x2eac43['tooltip']=Et(this['locale'],'Reopen'),_0x2eac43['icon']=_0xc24c1,_0x2eac43['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2420c5=>!_0x2420c5),_0x2eac43['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4def9e,_0x40c0dc)=>_0x4def9e&&_0x40c0dc),_0x2eac43['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2eac43;}_trimContextValue(_0x1fa86f){if(_0x1fa86f['length']<0x96)return _0x1fa86f;const _0x2775ff=_0x1fa86f['lastIndexOf']('\x20',0x93);return _0x1fa86f['substring'](0x0,_0x2775ff>-0x1?_0x2775ff:0x93)+'...';}_attachContextActions(){const _0x31211b=this['element']['querySelector']('.ck-context'),_0x294685=_0x31211b['querySelector']('.ck-context__value');this['listenTo'](_0x31211b,'mouseenter',()=>{_0x294685['offsetWidth']<_0x294685['scrollWidth']&&_0x31211b['classList']['add']('overlay');}),this['listenTo'](_0x31211b,'mouseleave',()=>{_0x31211b['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x188488 of this['focusables'])this['focusTracker']['add'](_0x188488['element']),this['keystrokes']['listenTo'](_0x188488['element']);}_createContextView(){const _0x466cd9=new Vt(this['locale']);return _0x466cd9['bind']('contextValue')['to'](this),_0x466cd9;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x17d353,_0x552c24,_0x345b2f,_0x44dec5){super(_0x17d353),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x552c24,this['_localUser']=_0x345b2f,this['_config']=_0x44dec5,this['commentThreadHeaderView']=new Bt(_0x17d353,_0x552c24),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3de02c(_0x17d353,Et(_0x17d353,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x17d353,_0x552c24,Object['assign']({'CommentView':this['_config']['CommentView']},_0x44dec5)),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',(_0x39cb0c,_0x4266ad)=>_0x39cb0c||!!_0x4266ad),this['bind']('isUnlinked')['to'](_0x552c24,'unlinkedAt',_0x44946e=>!!_0x44946e);let _0xd2f2b4=null;const _0x2a0961=()=>{const _0x23eb49=this['_model']['comments']['first']||null;_0x23eb49!==_0xd2f2b4&&(_0xd2f2b4&&this['stopListening'](_0xd2f2b4,'change:content'),_0xd2f2b4=_0x23eb49,_0x23eb49&&this['listenTo'](_0x23eb49,'change:content',_0x2a0961));const _0x513b80=_0x23eb49?_0x23eb49['author']['name']:this['_localUser']['name'],_0xfe9ccb=_0x23eb49?new DOMParser()['parseFromString'](_0x30c2cf(_0x23eb49['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x8e737=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x513b80]);this['set']('ariaLabel',_0xfe9ccb?_0x8e737+'\x20'+_0xfe9ccb:_0x8e737);};this['listenTo'](this['_model']['comments'],'change',_0x2a0961),_0x2a0961(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2d4278(),this['keystrokes']=new _0x3b18d7(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xea9950=>_0xea9950['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x5423f9(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0xb9ea0b=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x35d16c=_0xb9ea0b['commentInputView'];return _0xb9ea0b['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x35d16c,'value',(_0x40e3e9,_0x397fde,_0x1375cb,_0x39f6e6,_0x50ee2f)=>!!_0x50ee2f||!!_0x39f6e6&&_0x1375cb&&!_0x397fde||_0x40e3e9&&_0x1375cb&&!_0x397fde),_0x35d16c['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xe807dd,_0x5c8e64,_0x529531)=>{let _0x47f6bf;return _0x47f6bf=_0x529531&&_0x5c8e64?'Reply\x20to\x20reopen\x20discussion...':_0xe807dd?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x47f6bf);}),_0x35d16c['bind']('submitLabel')['to'](this,'length',_0x1c4875=>Et(this['locale'],_0x1c4875?'Reply':'Comment')),_0x35d16c['on']('submit',(_0x471468,_0x25d9c1)=>{this['fire']('addComment',_0x25d9c1),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x35d16c['on']('cancel',()=>{this['focus']();}),_0x35d16c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x35d16c['on']('cancel',_0x19232d=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x19232d['stop']());}),this['on']('change:isActive',(_0x371778,_0x59b393,_0x4724cf)=>{_0x4724cf||this['length']||_0x35d16c['value']||this['fire']('removeCommentThread');}),_0xb9ea0b;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x53c1c3(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x25bcf6,_0x11ff2e,_0x10e9bd,_0x2d85fb){super(_0x25bcf6,_0x11ff2e,_0x10e9bd,_0x2d85fb),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x25bcf6,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x7e073d,_0x15c3c1,_0x2a2a88)=>{_0x2a2a88||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5ee425,_0x1c56f6,_0x36a4dd)=>{_0x36a4dd&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x5850b7=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5850b7['if']('isActive','ck-thread--active'),_0x5850b7['if']('isUnlinked','ck-thread--unlinked'),_0x5850b7['to']('actionIndicator',_0x5529be=>_0x5529be?'ck-thread--'+_0x5529be:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5850b7['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 _0x25d271 of this['commentsListView']['commentViews'])_0x25d271['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x416e41}=this,_0x3088d3=this['commentsListView']['commentViews']['get'](0x0);_0x3088d3===this['_boundFirstCommentView']||_0x3088d3['isSystemComment']||(this['_boundFirstCommentView']=_0x3088d3,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3088d3,'actionIndicator',_0x5e2b9c=>'remove'===_0x5e2b9c?'remove':null),_0x3088d3['placeholder']=Et(_0x416e41,'Write\x20a\x20comment...'),_0x3088d3['removeButton']['on']('execute',_0x54dde8=>{_0x54dde8['stop'](),this['showConfirm'](Et(_0x416e41,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3088d3['focus']();}),_0x3088d3['actionBar']['add'](this['resolveButton'],0x0),_0x3088d3['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x17fd14=new _0x764e20(this['locale']);return _0x17fd14['label']=Et(this['locale'],'Resolve'),_0x17fd14['tooltip']=Et(this['locale'],'Resolve'),_0x17fd14['icon']=_0x4c4e65,_0x17fd14['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x17fd14['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3abacc=>!_0x3abacc),_0x17fd14['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3edda4,_0x54e778)=>_0x3edda4&&!_0x54e778),_0x17fd14['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x17fd14;}_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(_0x189cd2){super(_0x189cd2),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x41b77b,_0x258d39,_0x400830)=>{this['element']['innerHTML']=_0x400830;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x2c4a8b,_0x3ec5a5,_0x32b57c){super(_0x2c4a8b),this['_model']=_0x3ec5a5,this['_config']=_0x32b57c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x3ec5a5,'content',_0x3ec5a5,'authoredAt',(_0x56bc48,_0x379ae1)=>Et(_0x2c4a8b,'COMMENT_ARIA_LABEL',[_0x3ec5a5['author']['name'],_0x32b57c['formatDateTime'](_0x379ae1),new DOMParser()['parseFromString'](_0x56bc48,'text/html')['body']['textContent'],_0x3ec5a5['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x3de02c(_0x2c4a8b,Et(_0x2c4a8b,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x2d4278(),this['keystrokes']=new _0x3b18d7(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x53891c=>_0x53891c['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 _0x35baf4=new Wt(this['locale']);return _0x35baf4['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x3ee68f,_0x4efc74)=>_0x4efc74?_0x30c2cf(_0x3ee68f,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x3ee68f),_0x35baf4;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x41efc3=new St(this['locale'],this['_config']['editorConfig']);return _0x41efc3['value']=this['_model']['content'],_0x41efc3['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x41efc3['submitLabel']=Et(this['locale'],'Save'),_0x41efc3['on']('submit',(_0x24c5f6,_0x2c810a)=>{this['fire']('updateComment',this['_model']['id'],_0x2c810a),this['switchToDisplayMode'](),this['focus']();}),_0x41efc3['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x41efc3['once']('editorReady',()=>{_0x41efc3['focus']();}),_0x41efc3['createEditor'](),_0x41efc3['delegate']('editorReady')['to'](this),_0x41efc3['delegate']('editorDestroyed')['to'](this),_0x41efc3;}_setupKeyboardNavigation(){const _0x1a7190=this['element'];this['keystrokes']['listenTo'](_0x1a7190);for(const _0x2d78c6 of this['focusables'])this['focusTracker']['add'](_0x2d78c6['element']),this['keystrokes']['listenTo'](_0x2d78c6['element']);this['focusables']['on']('change',(_0x1572dc,_0x2afc6b)=>{for(const _0x533b0a of _0x2afc6b['removed'])this['focusTracker']['remove'](_0x533b0a['element']),this['keystrokes']['stopListening'](_0x533b0a['element']);for(const _0x334860 of _0x2afc6b['added'])this['focusTracker']['add'](_0x334860['element']),this['keystrokes']['listenTo'](_0x334860['element']);}),this['keystrokes']['set']('enter',(_0x300444,_0xcddf0d)=>{_0x1a7190===_0x300444['target']&&(this['focusCycler']['focusFirst'](),_0xcddf0d());}),this['keystrokes']['set']('esc',(_0x994bac,_0x5453c4)=>{_0x1a7190!==_0x994bac['target']&&(this['focus'](),_0x5453c4());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x53c1c3(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x17d7a4,_0x48c946,_0x3c133e){super(_0x17d7a4,_0x48c946,_0x3c133e),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x17d7a4,'Reply...')),this['bind']('authoredAt')['to'](_0x48c946),this['bind']('resolvedAt')['to'](_0x48c946),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 _0x3ff703(_0x17d7a4,_0x48c946['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x48c946,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x4880af=this['bindTemplate'],_0x167f17=[{'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':_0x4880af['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x4880af['to']('authoredAt',_0x4b88b2=>this['_config']['formatDateTime'](_0x4b88b2))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x4880af['if']('isEditMode','ck-comment__actions--hidden'),_0x4880af['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']&&_0x167f17['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x4880af['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x4880af['if']('isEditMode','ck-comment--edit'),_0x4880af['if']('isSystemComment','ck-comment--info'),_0x4880af['to']('actionIndicator',_0x48db2f=>_0x48db2f?'ck-comment--'+_0x48db2f:'')],'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':_0x167f17}]}]};}_createEditButton(){const _0x474b17=new _0x393932(this['locale']);return _0x474b17['label']=Et(this['locale'],'Edit'),_0x474b17['icon']=_0x41a0b8,_0x474b17['withText']=!0x0,_0x474b17['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x474b17['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x223031=>!_0x223031),_0x474b17['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x474b17['on']('execute',()=>this['switchToEditMode']()),_0x474b17;}_createRemoveButton(){const _0x32e0f7=new _0x393932(this['locale']);return _0x32e0f7['label']=Et(this['locale'],'Remove'),_0x32e0f7['icon']=_0x2f474f,_0x32e0f7['withText']=!0x0,_0x32e0f7['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x32e0f7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4bd5b7=>!_0x4bd5b7),_0x32e0f7['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x32e0f7['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x32e0f7;}_createDropdown(){const _0x58f981=ct(this['locale'],_0x575060),_0x463d71=_0x58f981['panelView']['children'],_0x4aa8e6=new ot(this['locale']),_0x293010=_0x58f981['bindTemplate'];dt(_0x58f981,()=>this['items']['find'](_0x2b646b=>_0x2b646b['isVisible'])),_0x58f981['extendTemplate']({'attributes':{'class':[_0x293010['if']('isVisible','ck-hidden',_0x564328=>!_0x564328)]}});const _0x321f23=(_0x1c5dcc,_0x5ed64c=-0x1)=>{const _0x1bbe61=new nt(this['locale']);_0x1bbe61['children']['add'](_0x1c5dcc);const _0x6a4033=_0x5ed64c>-0x1?_0x5ed64c:_0x4aa8e6['items']['length'];_0x4aa8e6['items']['add'](_0x1bbe61,_0x6a4033);const _0x505a78=Array['from'](this['items']);_0x58f981['unbind']('isEnabled','isVisible'),_0x58f981['bind']('isEnabled')['toMany'](_0x505a78,'isEnabled',(..._0x265c35)=>_0x265c35['some'](_0x41f6c5=>_0x41f6c5)),_0x58f981['bind']('isVisible')['toMany'](_0x505a78,'isVisible',(..._0x41d8a0)=>_0x41d8a0['some'](_0x2ecc5b=>_0x2ecc5b));};_0x58f981['panelPosition']='sw',_0x58f981['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0xdd7ec8});for(const _0x2292dd of this['items'])_0x321f23(_0x2292dd);return _0x463d71['add'](_0x4aa8e6),_0x58f981['listenTo'](this['items'],'add',(_0x41aa24,_0x1a6c99,_0x52554b)=>{_0x321f23(_0x1a6c99,_0x52554b);}),_0x58f981['listenTo'](this['items'],'remove',(_0x356cdd,_0x53a4c0,_0x138528)=>{_0x4aa8e6['items']['remove'](_0x138528);}),_0x58f981;}_attachActions(_0x4aa0ec,_0x170809){const _0x5f33b3=_0x4aa0ec&&_0x4aa0ec['element'];_0x5f33b3&&(this['listenTo'](_0x5f33b3,'mouseenter',()=>this['actionIndicator']=_0x170809),this['listenTo'](_0x5f33b3,'focus',()=>this['actionIndicator']=_0x170809),this['listenTo'](_0x5f33b3,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5f33b3,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x4b17ab=super['_createCommentInputView']();return _0x4b17ab['bind']('placeholder')['to'](this),_0x4b17ab;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x5644a5){const _0x40ff67=_0x10dbed(_0x5644a5,0x1e),_0x51bdfa=new MutationObserver(_0x248a70=>{for(const _0x177c58 of _0x248a70)('attributes'==_0x177c58['type']&&'class'==_0x177c58['attributeName']||'childList'==_0x177c58['type']||'characterData'==_0x177c58['type'])&&_0x40ff67();});return{'attach'(_0x2fb71d){_0x51bdfa['observe'](_0x2fb71d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x51bdfa['disconnect'](),_0x40ff67['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x2da43c,_0x58dab3){super(_0x2da43c),this['id']=_0x166325(),this['focusTracker']=new _0x2d4278(),this['keystrokes']=new _0x3b18d7(),this['keystrokes']['set']('Esc',(_0x1e1060,_0x3aa0c4)=>this['fire']('Esc',_0x3aa0c4)),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'](_0x58dab3),this['mainView']=_0x58dab3;const _0x96b7a4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x96b7a4['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 _0x3f7db2=this['element']['clientHeight'];_0x3f7db2&&(this['height']=_0x3f7db2);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x55d35b();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x1644a9,target:_0x24141e,type:_0x4f2bef,isVisible:_0x4814dc=!0x0}){super(),this['view']=_0x1644a9,this['view']['element']||this['view']['render'](),this['_type']=_0x4f2bef,this['_target']=_0x24141e,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x42a45f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3cf106,_0x1fdd3d)=>{this['view']['focusTracker']['add'](_0x1fdd3d);}),this['focusableElements']['on']('remove',(_0x58384,_0x4a3614)=>{this['view']['focusTracker']['remove'](_0x4a3614);}),this['set']('isVisible',_0x4814dc);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0xe4408a=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0xe4408a),_0xe4408a;}get targetRect(){const _0xf3f24=this['target'];if(null===_0xf3f24)return null;if(_0xf3f24 instanceof _0x3b4d13)return _0xf3f24;const _0x5c3805=_0xf3f24['filter'](_0x29e9fa=>function(_0xd8aa9a){return!!_0xd8aa9a['offsetParent']||!!_0xd8aa9a['getClientRects']()['item'](0x0);}(_0x29e9fa));return 0x0===_0x5c3805['length']?null:_0x3b4d13['getDomElementRects'](_0x5c3805[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x3858cd){this['view']['isActive']=_0x3858cd,this['view']['mainView']['isActive']=_0x3858cd;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x149496){if(!(null===_0x149496||_0x149496 instanceof _0x3b4d13||Array['isArray'](_0x149496)&&_0x149496['every'](_0x2afd0e=>zt(_0x2afd0e))))throw new _0x546dad('annotation-invalid-target',null,{'target':_0x149496});}_getNormalizedTarget(){const _0x5c96c2='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x5c96c2)?[_0x5c96c2]:_0x5c96c2;}};function zt(_0x31d7a8){return null!==_0x31d7a8&&'object'==typeof _0x31d7a8&&'nodeType'in _0x31d7a8&&0x1===_0x31d7a8['nodeType'];}var Jt=class extends _0x42a45f{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x2f2619=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2d4278(),this['_focusTracker']['on']('change:isFocused',(_0x3d5571,_0x5e0bb6,_0x16d3ea)=>{_0x16d3ea||this['fire']('blur');});for(const _0x1aeaa6 of _0x2f2619)this['add'](_0x1aeaa6);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1ee224){if(this['has'](_0x1ee224))throw new _0x546dad('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1ee224['innerView'],_0x1ee224),this['_viewToAnnotation']['set'](_0x1ee224['view'],_0x1ee224);for(const _0x5e6517 of _0x1ee224['focusableElements'])this['_focusTracker']['add'](_0x5e6517);if(this['listenTo'](_0x1ee224['focusableElements'],'add',(_0x10d010,_0x321270)=>{this['_focusTracker']['add'](_0x321270);}),this['listenTo'](_0x1ee224['focusableElements'],'remove',(_0x5ea9b2,_0x304454)=>{this['_focusTracker']['remove'](_0x304454);}),this['listenTo'](_0x1ee224['view']['focusTracker'],'change:isFocused',(_0x4c3b64,_0x16017b,_0x464935)=>{_0x464935&&this['fire']('focus',_0x1ee224);}),_0x1ee224['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x1ed1ce of this)_0x1ed1ce['updateTargetRect']();}const _0x1229e4=this['_getOrderInContent'](_0x1ee224['view']['targetRect']);return super['add'](_0x1ee224,_0x1229e4);}['remove'](_0x17c4a3){if(!this['has'](_0x17c4a3))throw new _0x546dad('annotationcollection-not-existing-item',null);this['stopListening'](_0x17c4a3['view']['focusTracker']),this['stopListening'](_0x17c4a3['focusableElements']);for(const _0x1cc63c of _0x17c4a3['focusableElements'])this['_focusTracker']['remove'](_0x1cc63c);return this['_viewToAnnotation']['delete'](_0x17c4a3['view']),this['_innerViewToAnnotation']['delete'](_0x17c4a3['innerView']),super['remove'](_0x17c4a3);}getByInnerView(_0x4efb1e){return this['_innerViewToAnnotation']['get'](_0x4efb1e);}getByView(_0x1a3a0d){return this['_viewToAnnotation']['get'](_0x1a3a0d);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x3bef96 of this)_0x3bef96['updateTargetRect']();this['_sort']();}_sort(){const _0x4efa73=Array['from'](this)['sort']((_0x394b2b,_0x244034)=>Zt(_0x394b2b['view']['targetRect'],_0x244034['view']['targetRect']));for(let _0x5af5d0=_0x4efa73['length']-0x1;_0x5af5d0>0x0;_0x5af5d0--){const _0x3061ed=_0x4efa73[_0x5af5d0];_0x5af5d0!==this['getIndex'](_0x3061ed)&&(this['remove'](_0x3061ed),this['add'](_0x3061ed));}}_getOrderInContent(_0x1360c4){let _0x2cf3dd=0x0;if(!_0x1360c4)return this['length'];for(const _0x243a82 of this){const _0x2d79ee=_0x243a82['view']['targetRect'];if(_0x2d79ee){if(Zt(_0x1360c4,_0x2d79ee)<0x0)return _0x2cf3dd;_0x2cf3dd++;}}return _0x2cf3dd;}_areCachedRectsStale(){const _0x1f5892=this['get'](0x0);if(!_0x1f5892)return!0x1;const _0x2b7808=_0x1f5892['view']['targetRect'],_0xaa68f8=_0x1f5892['targetRect'];return!(!_0x2b7808||!_0xaa68f8)&&(_0x2b7808['top']!==_0xaa68f8['top']||_0x2b7808['left']!==_0xaa68f8['left']);}};function Qt({source:_0x5bb99c,target:_0x46345b,filter:_0x2d4813}){for(const _0x36e023 of _0x5bb99c)_0x2d4813(_0x36e023)&&_0x46345b['add'](_0x36e023);_0x46345b['listenTo'](_0x5bb99c,'add',(_0x1fe1db,_0x2f8373)=>{_0x2d4813(_0x2f8373)&&_0x46345b['add'](_0x2f8373);}),_0x46345b['listenTo'](_0x5bb99c,'remove',(_0x1155e3,_0x3e2ed1)=>{_0x46345b['has'](_0x3e2ed1)&&_0x46345b['remove'](_0x3e2ed1);});}function Zt(_0x475223,_0x989d83){if(null===_0x475223&&null===_0x989d83)return 0x0;if(null===_0x475223)return-0x1;if(null===_0x989d83)return 0x1;const _0x4d4d5b=_0x475223['top']-_0x989d83['top'];return 0x0==_0x4d4d5b?_0x475223['left']-_0x989d83['left']:_0x4d4d5b;}var ti=class extends _0x1b3fad{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x311efc){if(super(_0x311efc),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x311efc instanceof _0x1cecc3){const _0x40877a=_0x311efc['locale'];_0x311efc['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x40877a,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x40877a,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x40877a,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x40877a,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x40877a,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x40877a,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x40877a,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5017f0){this['collection']['add'](_0x5017f0);}['remove'](_0x29ad90){this['collection']['remove'](_0x29ad90),_0x29ad90['destroy']();}refreshVisibility(){for(const _0x511f87 of this['collection'])_0x511f87['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x416177){return this['collection']['getByInnerView'](_0x416177);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x516a3e of this['collection'])_0x516a3e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x5952b7){this['fire']('_activateAnnotation',_0x5952b7);}createAnnotation(_0x574bd9){return new $t(_0x574bd9);}createAnnotationView(_0x5a91e0,_0x59e1a1){return new qt(_0x5a91e0,_0x59e1a1);}_addActiveAnnotation(_0x41fdd7){const _0x553005=new Set(this['activeAnnotations']);_0x553005['add'](_0x41fdd7),this['activeAnnotations']=_0x553005;}_removeActiveAnnotation(_0x5019ee){const _0x36117b=new Set(this['activeAnnotations']);_0x36117b['delete'](_0x5019ee),this['activeAnnotations']=_0x36117b;}_bindAnnotationsToVisibleAnnotations(){const _0x2e2bf2=this['collection'],_0x268ac2=this['_visibleAnnotations'];function _0xda7d7f(_0x395648){const _0x51fddb=_0x395648['source'];_0x51fddb['isVisible']&&!_0x268ac2['has'](_0x51fddb)?_0x268ac2['add'](_0x51fddb):!_0x51fddb['isVisible']&&_0x268ac2['has'](_0x51fddb)&&_0x268ac2['remove'](_0x51fddb),_0x51fddb['view']['focusTracker']['remove'](_0x51fddb['view']['element']),_0x51fddb['view']['focusTracker']['add'](_0x51fddb['view']['element']);}this['listenTo'](_0x2e2bf2,'add',(_0x182383,_0x3dcd3a)=>{_0x3dcd3a['isVisible']&&_0x268ac2['add'](_0x3dcd3a),this['listenTo'](_0x3dcd3a,'change:isVisible',_0xda7d7f);}),this['listenTo'](_0x2e2bf2,'remove',(_0x649f5e,_0x5c9b2c)=>{_0x268ac2['has'](_0x5c9b2c)&&_0x268ac2['remove'](_0x5c9b2c),this['stopListening'](_0x5c9b2c,'change:isVisible',_0xda7d7f);});}_setupEnterAnnotationKeystroke(){const _0x315645=_0x2d3fba=>{_0x2d3fba['on']('ready',()=>{_0x2d3fba['keystrokes']['set'](_0x33670a,(_0x29b3d0,_0x5a6a11)=>{const _0x246f44=_0x387552(this['activeAnnotations']['values']());_0x246f44&&(_0x246f44['view']['focus'](),_0x5a6a11());});});};this['context']instanceof _0x1cecc3?_0x315645(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5b60c1,_0x1a3384)=>{_0x315645(_0x1a3384);});}_setupEscapeAnnotationHandling(){const _0x1777f1=_0x566da9=>{const _0x3e03ab=_0x566da9['source'],_0x491de2=[];let _0x457e95;if(Array['isArray'](_0x3e03ab['target'])){_0x457e95=_0x3e03ab['target'][0x0],this['context']instanceof _0x1cecc3?_0x491de2['push'](this['context']):this['context']['editors']&&_0x491de2['push'](...this['context']['editors']);for(const _0x382689 of _0x491de2)for(const _0x2ca107 of _0x382689['editing']['view']['domRoots']['values']())if(_0x2ca107['contains'](_0x457e95))return void _0x382689['editing']['view']['focus']();_0x457e95['focus']();}};this['listenTo'](this['collection'],'add',(_0x2866bd,_0x158c49)=>{this['listenTo'](_0x158c49,'escape',_0x1777f1,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x359741,_0x964205)=>{this['stopListening'](_0x964205,'escape',_0x1777f1);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x55d35b(),ni=/* #__PURE__ -- @preserve */
31
- _0x55d35b();var oi=class extends _0x1b3fad{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x251d38,_0x4ffb9d];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x572ddb){super(_0x572ddb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2408b5=this['context']['config'];_0x2408b5['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2408b5['define']('comments.maxThreadTotalWeight',0x1f4),_0x2408b5['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2408b5['define']('comments.CommentThreadView',Ut),_0x2408b5['define']('comments.CommentView',Yt),_0x2408b5['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0xec515c=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x430d14,_0x400c64)=>this['_addCommentThread'](_0x400c64)),this['on']('submitCommentThread',(_0x44d789,_0x1d9bfd)=>this['_submitCommentThread'](_0x1d9bfd)),this['on']('resolveCommentThread',(_0x5d66f3,_0x5999cd)=>this['_resolveCommentThread'](_0x5999cd)),this['on']('resolveCommentThread',(_0x2bee4a,_0x285051)=>this['_updateActiveAnnotation'](_0x285051),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5bbd5d,_0x45914c)=>this['_reopenCommentThread'](_0x45914c)),this['on']('reopenCommentThread',(_0x34888f,_0x420761)=>this['_updateActiveAnnotation'](_0x420761),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x7a8ea0,_0x2f03e4)=>this['_removeCommentThread'](_0x2f03e4)),this['on']('updateCommentThread',(_0x51db0e,_0x503f30)=>this['_updateCommentThread'](_0x503f30)),this['on']('updateCommentThread',(_0x33dbe8,_0x421785)=>this['_updateActiveAnnotation'](_0x421785),{'priority':'lowest'}),this['on']('addComment',(_0x56dd0c,_0x58d743)=>this['_addComment'](_0x58d743)),this['on']('updateComment',(_0x21b779,_0x5bbb18)=>this['_updateComment'](_0x5bbb18)),this['on']('removeComment',(_0x306e8a,_0xf831a4)=>this['_removeComment'](_0xf831a4)),this['on']('addComment',(_0x546aad,{threadId:_0x3c6cc5,isFromAdapter:_0x5c9008})=>{if(_0x5c9008)return;const _0x37ee48=this['getCommentThread'](_0x3c6cc5),_0x365200=_0x37ee48&&this['_threadToController']['get'](_0x37ee48);_0x365200&&_0x365200['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xec515c,'change:activeAnnotations',(_0x45d3e7,_0x1a5b95,_0x4aee3e)=>{const _0xc7bdd8=Array['from'](_0x4aee3e)['map'](_0x24cdc2=>this['_viewToController']['get'](_0x24cdc2['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xc7bdd8?_0xc7bdd8['model']:null;});}set adapter(_0x4e7f6a){if(this['_adapter'])throw new _0x546dad('commentsrepository-adapter-already-set');this['_adapter']=_0x4e7f6a;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x4f4b0b=ii,threadId:_0x391f78=_0x166325(),comments:_0x176fe6=[],unlinkedAt:_0x50598d=null,resolvedAt:_0x55ff9e=null,resolvedBy:_0x19cbf3=null,target:_0x58dbef=null,context:_0x50b718=null,attributes:_0x499a3c={},isResolvable:_0x1d9ada=!0x0,isSubmitted:_0x224f3b=!0x1,isFromAdapter:_0x58f0be=!0x1}={}){return this['fire'](ai('addCommentThread',_0x4f4b0b),{'channelId':_0x4f4b0b,'threadId':_0x391f78,'comments':_0x176fe6,'unlinkedAt':_0x50598d,'resolvedAt':_0x55ff9e,'resolvedBy':_0x19cbf3,'target':_0x58dbef,'context':_0x50b718,'attributes':_0x499a3c,'isFromAdapter':_0x58f0be,'isResolvable':_0x1d9ada,'isSubmitted':_0x224f3b}),this['getCommentThread'](_0x391f78);}openNewCommentThread({channelId:_0x2c7758=ii,threadId:_0x20c22a=_0x166325(),target:_0x19bdcd,context:_0x4f790f=null,isResolvable:_0x536300=!0x0}){if(this['_readOnlyChannels']['has'](_0x2c7758)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x19bdcd)throw new _0x546dad('commentsrepository-missing-target');const _0xa44bf=this['addCommentThread']({'channelId':_0x2c7758,'threadId':_0x20c22a,'target':_0x19bdcd,'context':_0x4f790f,'isResolvable':_0x536300});if(!_0xa44bf)return null;const _0x54de00=this['_threadToController']['get'](_0xa44bf),_0x2f7b4c=_0x54de00['view']['commentThreadInputView']['commentInputView'],_0x1d2f81=this['context']['plugins']['get'](ti),_0x1fa3dc=_0x1d2f81['getByInnerView'](_0x54de00['view']);return _0x1d2f81['activate'](_0x1fa3dc),_0x2f7b4c['once']('editorReady',()=>_0x2f7b4c['focus']()),_0xa44bf;}hasCommentThread(_0x59b83d){if('string'!=typeof _0x59b83d)throw new _0x546dad('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x59b83d);}updateCommentThread({channelId:_0x2f86bc=ii,threadId:_0x3aa23d,context:_0xf71ab9,unlinkedAt:_0x2b204e,attributes:_0x1f84bb,isFromAdapter:_0x145ca4=!0x1}){return this['fire'](ai('updateCommentThread',_0x2f86bc),{'channelId':_0x2f86bc,'threadId':_0x3aa23d,'context':_0xf71ab9,'unlinkedAt':_0x2b204e,'attributes':_0x1f84bb,'isFromAdapter':_0x145ca4}),this['getCommentThread'](_0x3aa23d);}getCommentThread(_0x10e2ea){if('string'!=typeof _0x10e2ea)throw new _0x546dad('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x10e2ea);}fetchCommentThread({channelId:_0x57e1de,threadId:_0x1ce30}={}){const _0x45b9a5=this['getCommentThread'](_0x1ce30);if(_0x45b9a5)return Promise['resolve'](_0x45b9a5);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x546dad('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x57e1de,'threadId':_0x1ce30})['then'](_0x49887c=>this['hasCommentThread'](_0x1ce30)?this['getCommentThread'](_0x1ce30):_0x49887c?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x57e1de},_0x49887c)):void 0x0)['catch'](_0x489e5f=>{throw console['error'](_0x489e5f),new _0x546dad('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x30e06d,skipNotAttached:_0x242339=!0x1,skipEmpty:_0x245cd4=!0x1,toJSON:_0x235a7f=!0x1}={}){const _0x64f84d=[];for(const _0x241d86 of this['_threads']['values']())_0x30e06d&&_0x241d86['channelId']!==_0x30e06d||_0x242339&&!_0x241d86['isAttached']||_0x245cd4&&0x0===_0x241d86['length']||_0x64f84d['push'](_0x241d86);return _0x235a7f?_0x64f84d['map'](_0x239969=>_0x239969['toJSON']()):_0x64f84d;}getAnnotationForCommentThread(_0x56d631){const _0x3162c2=this['_threadToController']['get'](_0x56d631);return _0x3162c2&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x3162c2['view'])||null;}getCommentThreadForAnnotation(_0x1beb4e){const _0x270210=this['_viewToController']['get'](_0x1beb4e['innerView']);return _0x270210?_0x270210['model']:null;}setActiveCommentThread(_0x10bd2f){const _0x119460=this['context']['plugins']['get'](ti);if(!_0x10bd2f)return void(this['activeCommentThread']&&_0x119460['deactivateAll']());const _0xdc4386=this['getCommentThread'](_0x10bd2f);if(!_0xdc4386)throw new _0x546dad('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x10bd2f});if(!this['_threadToController']['has'](_0xdc4386))throw new _0x546dad('commentsrepository-active-not-attached',null,{'threadId':_0x10bd2f});const _0x2372f7=_0x119460['getByInnerView'](this['_threadToController']['get'](_0xdc4386)['view']);_0x119460['activate'](_0x2372f7);}switchReadOnly(_0x289870,_0x1175f3){_0x289870?this['_readOnlyChannels']['add'](_0x1175f3):this['_readOnlyChannels']['delete'](_0x1175f3),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5d9ba9){return this['_readOnlyChannels']['has'](_0x5d9ba9)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x490492,_0xd9b2a){return new bt(_0x490492,_0xd9b2a);}setPermissions(_0x1eedcb,_0x478c34=ii){this['_permissions']['set'](_0x478c34,_0x1eedcb),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x4223c2=ii){return this['_permissions']['has'](_0x4223c2)?this['_permissions']['get'](_0x4223c2):ei;}_addCommentThread({channelId:_0x34ef94,threadId:_0x11616e,comments:_0x3bf026,unlinkedAt:_0x2a80e8,resolvedAt:_0x4f22a5,resolvedBy:_0x29402a,target:_0x1d827f,context:_0x3e2adf,attributes:_0x1d5308,isFromAdapter:_0x4c2b35,isResolvable:_0x5e53b2,isSubmitted:_0x349e00}){if('string'!=typeof _0x11616e)throw new _0x546dad('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x11616e});if(this['hasCommentThread'](_0x11616e))throw new _0x546dad('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x11616e});const _0x1574a7=new ri(this,{'channelId':_0x34ef94,'id':_0x11616e,'context':_0x3e2adf,'attributes':_0x1d5308,'unlinkedAt':_0x2a80e8,'resolvedAt':_0x4f22a5,'resolvedBy':_0x29402a?this['context']['plugins']['get'](_0x4ffb9d)['getUser'](_0x29402a):null,'isResolvable':_0x5e53b2,'isSubmitted':_0x349e00||_0x4c2b35});this['_threads']['set'](_0x11616e,_0x1574a7);for(const _0x30a90b of _0x3bf026)_0x1574a7['_add'](this['_createNewComment']({'threadId':_0x11616e,..._0x30a90b}));return _0x1d827f&&_0x1574a7['attachTo'](_0x1d827f),_0x4c2b35||!_0x1574a7['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x34ef94,'threadId':_0x11616e});}_submitCommentThread({channelId:_0x4029e8,threadId:_0x25fd69}){if(!this['hasCommentThread'](_0x25fd69))throw new _0x546dad('commentsrepository-missing-comment-thread',this);const _0x5b90f5=this['getCommentThread'](_0x25fd69);if(_0x5b90f5['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2278e1,comments:_0x47e700,resolvedAt:_0x4dd065,resolvedBy:_0x3a77e0,context:_0x358828,attributes:_0x16d2d9}=_0x5b90f5,_0x31812d=this['context']['plugins']['get']('PendingActions'),_0x383ce2=_0x31812d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4029e8,'threadId':_0x2278e1,'comments':_0x47e700['map'](_0xa7d90=>_0xa7d90['toJSON']()),'resolvedAt':_0x4dd065,'resolvedBy':_0x3a77e0?_0x3a77e0['id']:_0x3a77e0,'context':_0x358828,'attributes':_0x16d2d9})['then'](({comments:_0x397906})=>{_0x31812d['remove'](_0x383ce2);for(const _0x274bb6 of _0x397906)this['_updateComment']({'channelId':_0x4029e8,'threadId':_0x25fd69,'commentId':_0x274bb6['commentId'],'createdAt':_0x274bb6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x376d18=>{throw console['error'](_0x376d18),new _0x546dad('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x23fec1,target:_0x1464a1}){const _0x270cc0=this['getCommentThread'](_0x23fec1);if(!_0x270cc0)throw new _0x546dad('commentsrepository-attach-missing-comment-thread',this);const _0x509d61=this['context']['plugins']['get']('PendingActions'),_0x1c3750=this['context']['plugins']['get'](ti),_0x56f93e=this['_createCommentThreadView'](_0x270cc0),_0x767d65=new bt(_0x270cc0,_0x56f93e);let _0x895bce=null;_0x56f93e['on']('change:isDirty',(_0x3689ea,_0x3a6bfd,_0x4f3e56)=>{_0x4f3e56?_0x895bce=_0x509d61['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x895bce&&(_0x509d61['remove'](_0x895bce),_0x895bce=null);}),this['_threadToController']['set'](_0x270cc0,_0x767d65),this['_viewToController']['set'](_0x56f93e,_0x767d65);const _0x372517=new qt(this['context']['locale'],_0x56f93e);_0x372517['bind']('length')['to'](_0x56f93e),_0x372517['bind']('isDirty')['to'](_0x56f93e,'isDirty',_0x56f93e,'length',(_0x5c0e65,_0x2d683f)=>_0x5c0e65||!_0x2d683f),_0x372517['bind']('isActive')['to'](_0x56f93e),_0x372517['type']='comment';const _0x19c6ae=new $t({'view':_0x372517,'target':_0x1464a1,'type':'comment','isVisible':!_0x270cc0['archivedAt']&&!!('function'==typeof _0x1464a1?_0x1464a1():_0x1464a1)});return _0x56f93e['on']('escape',()=>{_0x19c6ae['fire']('escape');}),this['_bindAnnotationToEditors'](_0x56f93e,_0x19c6ae),_0x1c3750['add'](_0x19c6ae),_0x19c6ae;}_bindAnnotationToEditors(_0x25b92b,_0x15b7f6){this['listenTo'](_0x25b92b,'editorReady',(_0xe32fa0,_0x2b7d40)=>{const _0x41aa1b=_0x2b7d40['ui']['view']['body']['bodyCollectionContainer'];_0x15b7f6['focusableElements']['add'](_0x41aa1b),this['context']instanceof _0x1cecc3&&this['context']['ui']['focusTracker']['add'](_0x41aa1b);},{'priority':'highest'}),this['listenTo'](_0x25b92b,'editorDestroyed',(_0x146acf,_0x420c86)=>{const _0x214d07=_0x420c86['ui']['view']['body']['bodyCollectionContainer'];_0x15b7f6['focusableElements']['has'](_0x214d07)&&_0x15b7f6['focusableElements']['remove'](_0x214d07),this['context']instanceof _0x1cecc3&&this['context']['ui']['focusTracker']['remove'](_0x214d07);});}_unbindEditors(_0x2905c9){this['stopListening'](_0x2905c9,'editorReady'),this['stopListening'](_0x2905c9,'editorDestroyed');}_createCommentThreadView(_0x25170f){const _0x467046=this['context']['plugins']['get'](_0x4ffb9d),{config:_0x435465,locale:_0x142990}=this['context'],_0x2a4a27=_0x23af40(_0x435465['get']('locale'),_0x142990);return new(0x0,(_0x435465['get']('comments'))['CommentThreadView'])(_0x142990,_0x25170f,_0x467046['me'],{'editorConfig':{..._0x435465['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x435465['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x435465['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x435465['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x435465['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2a4a27,'CommentView':_0x435465['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0xdb6140,channelId:_0x4c9c70,resolvedAt:_0x55b1cc,resolvedBy:_0x4ff409,isFromAdapter:_0x1e23aa}){if(!this['hasCommentThread'](_0xdb6140))throw new _0x546dad('commentsrepository-missing-comment-thread',null,{'threadId':_0xdb6140});const _0x456b32=this['getCommentThread'](_0xdb6140);if(_0x456b32['isResolved'])throw new _0x546dad('commentsrepository-resolved-comment-thread',null,{'threadId':_0xdb6140});const _0x492391=this['context']['plugins']['get'](_0x4ffb9d);if(_0x456b32['resolvedBy']=_0x492391['getUser'](_0x4ff409),_0x456b32['resolvedAt']=_0x55b1cc,_0x1e23aa||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5a1fc2=this['context']['plugins']['get']('PendingActions'),_0x4e9ce=_0x5a1fc2['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4c9c70,'threadId':_0xdb6140})['then'](({resolvedAt:_0x1461a7,resolvedBy:_0x2ea84e})=>{_0x5a1fc2['remove'](_0x4e9ce),_0x456b32['resolvedBy']['id']!==_0x2ea84e&&(_0x456b32['resolvedBy']=_0x492391['getUser'](_0x2ea84e)),_0x456b32['resolvedAt']=_0x1461a7;})['catch'](_0x37cfa1=>{throw console['error'](_0x37cfa1),new _0x546dad('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x6b7676,channelId:_0xa982ec,isFromAdapter:_0x52b928}){if(!this['hasCommentThread'](_0x6b7676))throw new _0x546dad('commentsrepository-missing-comment-thread',null,{'threadId':_0x6b7676});const _0x1fb7d5=this['getCommentThread'](_0x6b7676);if(!_0x1fb7d5['isResolved'])throw new _0x546dad('commentsrepository-reopen-comment-thread',null,{'threadId':_0x6b7676});if(_0x1fb7d5['resolvedBy']=null,_0x1fb7d5['resolvedAt']=null,_0x52b928||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3b38ce=this['context']['plugins']['get']('PendingActions'),_0x2a9376=_0x3b38ce['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xa982ec,'threadId':_0x6b7676})['then'](()=>_0x3b38ce['remove'](_0x2a9376))['catch'](_0xdd9aa6=>{throw console['error'](_0xdd9aa6),new _0x546dad('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x4fc933,isFromAdapter:_0x2a4712}){const _0xd09aa=this['getCommentThread'](_0x4fc933);if(!_0xd09aa)throw new _0x546dad('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4fc933),this['_threads']['delete'](_0x4fc933),!_0xd09aa['isSubmitted']||_0x2a4712||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xf622f6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x21651f}=_0xd09aa,_0x473b72=_0xf622f6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x21651f,'threadId':_0x4fc933})['then'](()=>_0xf622f6['remove'](_0x473b72))['catch'](_0x121446=>{throw console['error'](_0x121446),new _0x546dad('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x4108db,unlinkedAt:_0x4ef89b,context:_0x3794e3,attributes:_0x37f9f6,isFromAdapter:_0x5d12e0}){if('string'!=typeof _0x4108db)throw new _0x546dad('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4108db});if(!this['hasCommentThread'](_0x4108db))throw new _0x546dad('commentsrepository-missing-comment-thread',null,{'threadId':_0x4108db});const _0x852a5f=this['getCommentThread'](_0x4108db);let _0x380ff0=!0x1;if(void 0x0!==_0x3794e3&&_0x852a5f['context']!==_0x3794e3&&(_0x852a5f['context']=_0x3794e3,_0x380ff0=!0x0),void 0x0!==_0x4ef89b&&_0x852a5f['unlinkedAt']!==_0x4ef89b&&(_0x852a5f['unlinkedAt']=_0x4ef89b,_0x380ff0=!0x0),_0x37f9f6&&!_0xebc9b3(_0x37f9f6,_0x852a5f['attributes'])&&(_0x852a5f['attributes']=_0x37f9f6,_0x380ff0=!0x0),!_0x380ff0)return Promise['resolve']();if(!_0x852a5f['isSubmitted']||_0x5d12e0||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x357c98=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1c1b5d}=_0x852a5f,_0x539ef8=_0x357c98['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1c1b5d,'threadId':_0x4108db,'context':_0x3794e3,'unlinkedAt':_0x4ef89b,'attributes':_0x37f9f6})['then'](()=>_0x357c98['remove'](_0x539ef8))['catch'](_0x2d451a=>{throw console['error'](_0x2d451a),new _0x546dad('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x313edb){const _0x7859b8=this['context']['plugins']['get'](ti),_0x38312d=this['getCommentThread'](_0x313edb);if(_0x38312d['_isAttached']=!0x1,this['_threadToController']['has'](_0x38312d)){const _0xeced38=this['_threadToController']['get'](_0x38312d),_0x2e1753=_0xeced38['view'],_0x11ff1e=_0x7859b8['getByInnerView'](_0x2e1753);this['_threadToController']['delete'](_0x38312d),this['_viewToController']['delete'](_0x2e1753),_0x11ff1e&&_0x7859b8['remove'](_0x11ff1e),_0xeced38['destroy'](),_0x2e1753['destroy']()['then'](()=>{this['_unbindEditors'](_0x2e1753);});}}_updateActiveAnnotation({threadId:_0x347e02,resolvedAt:_0x361fac,unlinkedAt:_0xeb2a00}){const _0x491592=!!_0x361fac,_0x2595e2=this['context']['plugins']['get'](ti),_0x235108=this['getCommentThread'](_0x347e02);if(this['_threadToController']['has'](_0x235108)){const _0x4894b4=this['_threadToController']['get'](_0x235108)['view'],_0x2ba744=_0x2595e2['getByInnerView'](_0x4894b4);_0x2ba744&&(_0x491592&&_0x2595e2['_removeActiveAnnotation'](_0x2ba744),_0xeb2a00?_0x2ba744['isVisible']=!0x1:_0x2ba744['refreshVisibility']());}}_getExternalAuthor(_0x5226f2){const _0x587cde=this['context']['plugins']['get'](_0x4ffb9d),_0xddd013=_0x11175c('external:'+_0x5226f2),_0x2677c1=_0x587cde['getUser'](_0xddd013);return _0x2677c1||_0x587cde['addUser']({'id':_0xddd013,'name':_0x5226f2});}_createNewComment({threadId:_0x322328,commentId:_0x2d244e=_0x166325(),content:_0x3c99c9,authorId:_0x4c9f52,createdAt:_0x2b0a5c,attributes:_0x5a07dd}){if('string'!=typeof _0x2d244e)throw new _0x546dad('commentsrepository-invalid-commentid');if('string'!=typeof _0x4c9f52)throw new _0x546dad('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3c99c9||!_0x3c99c9['trim']())throw new _0x546dad('commentsrepository-invalid-comment-content');const _0x3c593d=this['context']['plugins']['get'](_0x4ffb9d)['getUser'](_0x4c9f52);if(!_0x3c593d)throw new _0x546dad('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4c9f52});let _0x36c64e=null,_0x4b4632=_0x2b0a5c;return _0x5a07dd?.['@external']&&(_0x36c64e=this['_getExternalAuthor'](_0x5a07dd['@external']['authorName']),_0x4b4632=new Date(_0x5a07dd['@external']['createdAt'])),new hi(this,{'threadId':_0x322328,'id':_0x2d244e,'author':_0x36c64e||_0x3c593d,'creator':_0x3c593d,'content':_0x3c99c9,'createdAt':_0x2b0a5c,'authoredAt':_0x4b4632,'attributes':_0x5a07dd});}_addComment(_0x276114){let {threadId:_0x391a57,content:_0x534254,attributes:_0x3632bf,isFromAdapter:_0x3936c5}=_0x276114;const _0x157cc5=this['getCommentThread'](_0x276114['threadId']);if(!_0x157cc5)throw new _0x546dad('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5cf329=this['_createNewComment'](_0x276114),{id:_0x30f031}=_0x5cf329;if(_0x157cc5['_add'](_0x5cf329),_0x3936c5||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x157cc5['isSubmitted'])return Promise['resolve']();const _0xf017b7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2d27b7}=_0x157cc5,_0x49d1a9=_0xf017b7['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3632bf||(_0x3632bf={}),this['adapter']['addComment']({'channelId':_0x2d27b7,'threadId':_0x391a57,'commentId':_0x30f031,'content':_0x534254,'attributes':_0x3632bf})['then'](_0xa6594f=>{_0xf017b7['remove'](_0x49d1a9),_0xa6594f&&this['_updateComment']({'channelId':_0x2d27b7,'threadId':_0x391a57,'commentId':_0x30f031,'createdAt':_0xa6594f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x33f6d5=>{throw console['error'](_0x33f6d5),new _0x546dad('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x13267a,commentId:_0x2b5f68,content:_0x2bcb0b,createdAt:_0x1c5b37,attributes:_0x2ef35e,isFromAdapter:_0x566313}){if(void 0x0!==_0x2bcb0b&&('string'!=typeof _0x2bcb0b||!_0x2bcb0b['trim']()['length']))throw new _0x546dad('commentsrepository-update-comment-invalid-content');const _0xe9e2c3=this['getCommentThread'](_0x13267a),_0x23f161=_0xe9e2c3['getComment'](_0x2b5f68);if(!_0x23f161)throw new _0x546dad('commentsrepository-update-missing-comment',this);let _0x45c6d0=!0x1;if(_0x2bcb0b&&_0x2bcb0b!==_0x23f161['content']&&(_0x23f161['isEditable']||_0x566313)&&(_0x23f161['content']=_0x2bcb0b,_0x45c6d0=!0x0),_0x1c5b37&&_0x1c5b37!==_0x23f161['createdAt']&&(_0x23f161['createdAt']=_0x1c5b37,_0x23f161['isExternal']||(_0x23f161['authoredAt']=_0x1c5b37),_0x45c6d0=!0x0),_0x2ef35e&&!_0xebc9b3(_0x2ef35e,_0x23f161['attributes'])&&(_0x23f161['attributes']=_0x2ef35e,_0x45c6d0=!0x0),!_0x45c6d0)return Promise['resolve']();if(_0xe9e2c3['fire']('commentUpdated'),_0x566313||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4eeb6b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x19fb0c}=this['getCommentThread'](_0x23f161['threadId']),_0x5c4500=_0x4eeb6b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x19fb0c,'threadId':_0x13267a,'commentId':_0x2b5f68,'content':_0x2bcb0b,'attributes':_0x2ef35e})['then'](()=>_0x4eeb6b['remove'](_0x5c4500))['catch'](_0x5c4d4e=>{throw console['error'](_0x5c4d4e),new _0x546dad('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x5c8873,commentId:_0x37f8c9,isFromAdapter:_0x486795}){const _0x2f31ef=this['getCommentThread'](_0x5c8873),_0x3f09a4=_0x2f31ef['getComment'](_0x37f8c9);if(!_0x3f09a4)throw new _0x546dad('commentsrepository-remove-missing-comment',this);if(_0x2f31ef['_remove'](_0x3f09a4),_0x486795||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x641464=this['context']['plugins']['get']('PendingActions'),{channelId:_0x52806e}=_0x2f31ef,_0x4bd3ce=_0x641464['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x52806e,'threadId':_0x5c8873,'commentId':_0x37f8c9})['then'](()=>_0x641464['remove'](_0x4bd3ce))['catch'](_0x3fa4c0=>{throw console['error'](_0x3fa4c0),new _0x546dad('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x23f6ee,_0x18fb3a){super();const _0x16b287=_0x18fb3a['isResolvable'];this['channelId']=_0x18fb3a['channelId'],this['id']=_0x18fb3a['id'],this['comments']=new _0x42a45f(),this['_repository']=_0x23f6ee,this['_isAttached']=!0x1,this['_isSubmitted']=_0x18fb3a['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x23f6ee,'_permissions',_0x23f6ee,'_readOnlyChannels',()=>_0x23f6ee['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x23f6ee,'_permissions',()=>_0x23f6ee['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x23f6ee,'_permissions',()=>{const _0x231b0c=_0x23f6ee['getPermissions'](this['channelId']);return _0x231b0c['write']||_0x231b0c['admin'];}),this['bind']('isResolvable')['to'](_0x23f6ee,'_permissions',()=>_0x16b287&&_0x23f6ee['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x18fb3a['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1f2d9a,_0x5461ac)=>_0x1f2d9a?_0x5461ac?_0x1f2d9a<_0x5461ac?_0x1f2d9a:_0x5461ac:_0x1f2d9a:_0x5461ac),this['set']('unlinkedAt',_0x18fb3a['unlinkedAt']||null),this['set']('resolvedAt',_0x18fb3a['resolvedAt']||null),this['set']('resolvedBy',_0x18fb3a['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x251884=>!!_0x251884),this['set']('attributes',_0x18fb3a['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x2083b6,_0x5907d9)=>_0x2083b6+_0x5907d9['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x38e499,id:_0x3b6746}=this;this['_repository']['fire'](ai('submitCommentThread',_0x38e499),{'channelId':_0x38e499,'threadId':_0x3b6746});}setUnlinkedAt(_0x1eb6b8){this['_update']({'unlinkedAt':_0x1eb6b8});}['resolve']({resolvedAt:_0x23fca8=new Date(),resolvedBy:_0xbbc976='',isFromAdapter:_0x30859f=!0x1}={}){const _0x2f0737=this['_repository']['context']['plugins']['get'](_0x4ffb9d)['me'],{channelId:_0x158776,id:_0x1a35ac}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x158776),{'channelId':_0x158776,'threadId':_0x1a35ac,'resolvedAt':_0x23fca8,'resolvedBy':_0xbbc976||_0x2f0737['id'],'isFromAdapter':_0x30859f});}['reopen']({isFromAdapter:_0x49df48=!0x1}={}){const {channelId:_0x57ab6b,id:_0x58b899}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x57ab6b),{'channelId':_0x57ab6b,'threadId':_0x58b899,'isFromAdapter':_0x49df48});}setContext(_0x45382f){this['context']||this['_update']({'context':_0x45382f});}setAttribute(_0x173a09,_0x3c6379){const _0x2e6ff9=_0x14e7b5(this['attributes']);_0x46d23a(_0x2e6ff9,_0x173a09,_0x3c6379),this['_update']({'attributes':_0x2e6ff9});}removeAttribute(_0x168ac5){const _0x286420=_0x14e7b5(this['attributes']);_0x11fad3(_0x286420,_0x168ac5),this['_update']({'attributes':_0x286420});}['remove']({isFromAdapter:_0x4cdefe=!0x1}={}){const {channelId:_0x1bf955,id:_0x2b6a93}=this;this['_repository']['fire'](ai('removeCommentThread',_0x1bf955),{'channelId':_0x1bf955,'threadId':_0x2b6a93,'isFromAdapter':_0x4cdefe});}attachTo(_0x40c7b5){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x40c7b5});}addComment(_0x37f31f){const {channelId:_0xebc230,id:_0x3e9e5b}=this;this['_repository']['fire'](ai('addComment',_0xebc230,_0x3e9e5b),Object['assign']({'channelId':_0xebc230,'threadId':_0x3e9e5b},_0x37f31f));}getComment(_0x1c3d0e){if('string'!=typeof _0x1c3d0e)throw new _0x546dad('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x1c3d0e});return this['comments']['get'](_0x1c3d0e);}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'](_0x575403=>_0x575403['toJSON']()),'attributes':this['attributes']};}['_add'](_0x1aa5a4){return this['listenTo'](_0x1aa5a4,'change:authoredAt',()=>{const _0x2b7bb2=this['_findOptimalIndex'](_0x1aa5a4),_0x2c09fb=this['comments'];_0x2b7bb2-0x1!=_0x2c09fb['getIndex'](_0x1aa5a4)&&_0x2b7bb2+0x1!=_0x2c09fb['getIndex'](_0x1aa5a4)&&(this['_remove'](_0x1aa5a4),this['_add'](_0x1aa5a4));}),this['comments']['add'](_0x1aa5a4,this['_findOptimalIndex'](_0x1aa5a4));}_update(_0x2bdd5b){const {channelId:_0x48294b,id:_0x20e8af}=this;this['_repository']['fire'](ai('updateCommentThread',_0x48294b),{..._0x2bdd5b,'channelId':_0x48294b,'threadId':_0x20e8af});}['_remove'](_0x210c0a){return this['stopListening'](_0x210c0a),_0x210c0a['destroy'](),this['comments']['remove'](_0x210c0a);}_findOptimalIndex(_0x3c4f71){const _0x249762=this['comments']['find'](_0x186c93=>new Date(_0x186c93['authoredAt'])['getTime']()>new Date(_0x3c4f71['authoredAt'])['getTime']());return _0x249762?this['comments']['getIndex'](_0x249762):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x4345fa,_0x3cf206){super();const _0x5a5c29=_0x4345fa['context']['plugins']['get'](_0x4ffb9d)['me'],_0x294ede=_0x4345fa['getCommentThread'](_0x3cf206['threadId']),_0x3feb04=0x0===_0x294ede['comments']['length'],_0x4c2735=_0x5a5c29===_0x3cf206['author'];this['id']=_0x3cf206['id'],this['threadId']=_0x3cf206['threadId'],this['author']=_0x3cf206['author'],this['creator']=_0x3cf206['creator'],this['set']('content',_0x3cf206['content']),this['createdAt']=_0x3cf206['createdAt']||new Date(),this['set']('authoredAt',_0x3cf206['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x294ede,'resolvedAt'),this['set']('attributes',_0x3cf206['attributes']||{}),this['bind']('isEditable')['to'](_0x4345fa,'_permissions',()=>{const _0x1e30bd=_0x4345fa['getPermissions'](_0x294ede['channelId'])['write'],_0x2d2376=_0x4345fa['getPermissions'](_0x294ede['channelId'])['modifyAll'];return _0x4c2735&&_0x1e30bd||!_0x4c2735&&_0x2d2376;}),this['bind']('isRemovable')['to'](_0x294ede,'isRemovable',_0x4345fa,'_permissions',_0x179252=>{const _0x56fecc=_0x4345fa['getPermissions'](_0x294ede['channelId'])['write'],_0x5b2b82=_0x4345fa['getPermissions'](_0x294ede['channelId'])['modifyAll'];return _0x4c2735&&_0x56fecc||_0x179252&&_0x3feb04||!_0x4c2735&&_0x5b2b82&&!_0x3feb04;}),this['bind']('isReadOnly')['to'](_0x294ede,'isReadOnly'),this['_repository']=_0x4345fa;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x389e2f){const _0x57321f=document['createElement']('div');return _0x57321f['innerHTML']=_0x389e2f,_0x57321f['textContent']['length'];}(this['content']),0xc8);}update(_0x1aae1d){const {threadId:_0x425961,id:_0x3fe64c}=this;if(!this['_repository']['hasCommentThread'](_0x425961))throw new _0x546dad('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x387031}=this['_repository']['getCommentThread'](_0x425961);this['_repository']['fire'](ai('updateComment',_0x387031,_0x425961),{'channelId':_0x387031,'threadId':_0x425961,'commentId':_0x3fe64c,..._0x1aae1d});}setAttribute(_0x28c87a,_0x25887d){const _0x46ee5d=_0x14e7b5(this['attributes']);_0x46d23a(_0x46ee5d,_0x28c87a,_0x25887d),this['update']({'attributes':_0x46ee5d});}removeAttribute(_0x1b0765){const _0x18b3d2=_0x14e7b5(this['attributes']);_0x11fad3(_0x18b3d2,_0x1b0765),this['update']({'attributes':_0x18b3d2});}['remove'](_0x5a8322={}){if(!_0x5a8322['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4b33ac,id:_0x36fca4}=this;if(!this['_repository']['hasCommentThread'](_0x4b33ac))throw new _0x546dad('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x32586d}=this['_repository']['getCommentThread'](_0x4b33ac);this['_repository']['fire'](ai('removeComment',_0x32586d,_0x4b33ac),{'channelId':_0x32586d,'threadId':_0x4b33ac,'commentId':_0x36fca4,..._0x5a8322});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x2100a3,..._0x55e333){for(const _0x2df5b5 of _0x55e333)void 0x0!==_0x2df5b5&&(_0x2100a3+=':'+String(_0x2df5b5));return _0x2100a3;}var ci=class extends _0x404c64{constructor(_0x19c41d){super(_0x19c41d),this['set']('hasContent',!0x1);}['refresh'](){const _0x312c54=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2e2230 of _0x312c54['getRanges']())if(this['_hasContent'](_0x2e2230))return void(this['hasContent']=!0x0);}execute({threadId:_0x4853fb=_0x166325(),ranges:_0x36e987,comment:_0x17ccd6}={}){const _0x4ed692=this['editor']['model'],_0x57f269=_0x36e987??Array['from'](_0x4ed692['document']['selection']['getRanges']()),_0xa1b5b9=[];for(const _0xf201ae of _0x57f269)this['_hasContent'](_0xf201ae)&&_0xa1b5b9['push'](this['_trimToContent'](_0xf201ae));if(!_0xa1b5b9['length'])throw new _0x546dad('addcommentthreadcommand-incorrect-ranges',null);_0x17ccd6&&this['_createCommentThread'](_0x4853fb,_0x17ccd6),this['_createMarkersFromRanges'](_0x4853fb,_0xa1b5b9,!!_0x17ccd6);}_createMarkersFromRanges(_0x27351c,_0x4648ee,_0x291ea0){this['editor']['model']['change'](_0x3989f2=>{for(const _0x6fdfd0 of _0x4648ee){const _0x18f8e8='comment:'+_0x27351c+':'+_0x166325()['substr'](0x1,0x5);_0x3989f2['addMarker'](_0x18f8e8,{'range':_0x6fdfd0,'usingOperation':_0x291ea0,'affectsData':_0x291ea0});}});}_createCommentThread(_0x224824,_0x2b38a9){const _0x597307=this['editor']['plugins']['get']('CommentsRepository'),_0x2612a1=this['editor']['config']['get']('collaboration.channelId'),_0x5d0c1b=this['editor']['plugins']['get']('Users')['me'];if(!_0x5d0c1b)throw new _0x546dad('addcommentthreadcommand-user-not-found',null);_0x597307['addCommentThread']({'threadId':_0x224824,'channelId':_0x2612a1,'comments':[{'authorId':_0x5d0c1b['id'],'content':_0x2b38a9,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x25eb8c){for(const _0x2a7059 of _0x25eb8c['getItems']())if(this['_itemIsContent'](_0x2a7059))return!0x0;return!0x1;}_itemIsContent(_0x4a2bea){return _0x4a2bea['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x4a2bea)&&!_0x4a2bea['is']('element','tableCell');}_trimToContent(_0x105b6a){const _0x56b42d=_0x2d8b70=>!this['_itemIsContent'](_0x2d8b70['item']),_0x3a81f3=_0x105b6a['start']['getLastMatchingPosition'](_0x56b42d),_0x8c6314=_0x105b6a['end']['getLastMatchingPosition'](_0x56b42d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3a81f3,_0x8c6314);}},di=class extends _0x2231bd{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3abc5d){super(_0x3abc5d),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x31a3a3=this['editor'],_0x9aaacb=_0x31a3a3['model']['document']['selection'],_0x9aa70=_0x54f3ec(()=>this['refreshSelectedViews'](),0xa);_0x9aaacb['on']('change:range',(_0xe7c4ae,_0x597ef2)=>{_0x597ef2['directChange']&&(_0x9aa70['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x31a3a3['editing']['view']['document'],'change:isFocused',(_0x1a9da2,_0x5a60c2,_0x2a4049)=>{_0x2a4049&&_0x9aa70();}),this['listenTo'](_0x31a3a3['ui']['focusTracker'],'change:isFocused',(_0x47b2ac,_0x5d6748,_0x188ba8)=>{_0x188ba8||this['fire']('blur',{'isAnnotationTracked':_0x39496f=>this['_editorAnnotationsData']['has'](_0x39496f['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x2a447d){if(this['_editorAnnotations']['has'](_0x2a447d['view']))return;this['_editorAnnotations']['add'](_0x2a447d['view']),this['editor']['ui']['focusTracker']['add'](_0x2a447d['view']['element']);const _0x1f75b9=this['editor']['plugins']['get'](ti);this['listenTo'](_0x1f75b9['collection'],'remove',(_0xcbf883,_0xb957a9)=>{this['editor']['ui']['focusTracker']['remove'](_0xb957a9['view']['element']),this['_editorAnnotations']['delete'](_0xb957a9['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x345b48){if('function'!=typeof _0x345b48)throw new _0x546dad('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x345b48);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x30be20,annotations:_0x3aa46d}){const _0x3d58ce=[],_0x2db5c7=this['editor']['model']['document']['selection'],_0x2afcb1=Array['from'](_0x2db5c7['getRanges']());for(const [_0x469273,_0x370dfa]of this['_editorAnnotationsData']){const _0xc87eb9=_0x36804b(_0x370dfa),_0x3f51af=_0x3aa46d['getByInnerView'](_0x469273);_0xc87eb9&&_0x3f51af&&_0x3d58ce['push']({'annotation':_0x3f51af,'range':_0xc87eb9});}function _0x36804b(_0x4b0fc6){for(const _0x48c78e of _0x4b0fc6)for(const _0x583600 of _0x2afcb1)if(_0x48c78e['containsRange'](_0x583600,!_0x2db5c7['isCollapsed']))return _0x48c78e;return null;}const _0x436a2d=new Map(Array['from'](_0x3aa46d,(_0x1e9ac2,_0x3a4c02)=>[_0x1e9ac2,_0x3a4c02]));return _0x3d58ce['sort']((_0x2214dd,_0x3a86d2)=>{const _0x43df5d=_0x2214dd['range'],_0x4fdf50=_0x3a86d2['range'];if(!_0x43df5d['isEqual'](_0x4fdf50)){if(_0x43df5d['containsRange'](_0x4fdf50,!0x0))return 0x1;if(_0x4fdf50['containsRange'](_0x43df5d,!0x0))return-0x1;}return _0x2214dd['annotation']==_0x30be20?-0x1:_0x3a86d2['annotation']==_0x30be20?0x1:(_0x436a2d['get'](_0x2214dd['annotation'])??0x0)-(_0x436a2d['get'](_0x3a86d2['annotation'])??0x0);})['map'](_0x148eef=>_0x148eef['annotation']);}get _editorAnnotationsData(){const _0x1754d4=new Map();for(const _0x2a7650 of Array['from'](this['_dataCollectors']))for(const [_0x50a1cd,_0x452082]of _0x2a7650())_0x1754d4['set'](_0x50a1cd,_0x452082);return _0x1754d4;}},li=class extends _0x2231bd{afterInit(){const _0x224684=this['editor'];_0x224684['plugins']['has']('RestrictedEditingModeEditing')&&_0x224684['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x2231bd{constructor(_0x4b98b3){super(_0x4b98b3),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x448d01=this['editor'],_0x14b787=_0x448d01['commands']['get']('importWord'),_0x45b1c0=_0x448d01['plugins']['get'](_0x4ffb9d);_0x14b787&&(_0x14b787['on']('execute',(_0xfbd690,[,_0x3cc2ff])=>{_0x3cc2ff['collaboration_features']={'comments':!0x0,'user_id':_0x45b1c0['me']['id']};},{'priority':_0x1026a6['high']+0xa}),this['listenTo'](_0x14b787,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x45a861,_0x29670d){const {comment_threads:_0x448914}=_0x29670d;_0x448914&&_0x448914['forEach'](({thread_id:_0x5bc404,comments:_0x4c855a,is_resolved:_0x262c96})=>{const _0x2ec4d7=new Date(),_0x1cd86f=_0x4c855a['map'](({author:_0x500d17,content:_0x491804,created_at:_0x2a1064})=>({'content':_0x491804,'authorId':this['editor']['plugins']['get'](_0x4ffb9d)['me']['id'],'createdAt':_0x2ec4d7,'attributes':{'@external':{'authorName':_0x500d17,'createdAt':_0x2a1064?new Date(_0x2a1064):new Date(),'source':'importWord'}}})),_0x1ebdca=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x1ebdca,'threadId':_0x5bc404,'comments':_0x1cd86f,'resolvedAt':_0x262c96?_0x2ec4d7:null});});}},ui=class extends _0x2231bd{constructor(_0x4d5d74){super(_0x4d5d74),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x5d076b=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5d076b,'contentInsertion',(_0x5065a5,_0x1e6777)=>this['_removeMarkersWithoutThreads'](_0x1e6777['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x457ea4){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x457ea4;const _0x3bc598=this['editor']['plugins']['get']('CommentsRepository');for(const _0x520611 of _0x457ea4['keys']()){const [_0x3adfcc,_0x20f9cb]=_0x520611['split'](':');'comment'!=_0x3adfcc||_0x3bc598['hasCommentThread'](_0x20f9cb)||_0x457ea4['delete'](_0x520611);}return _0x457ea4;}_registerMarkerInClipboardPipeline(){const _0x589fa9=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x46919e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x46919e&&_0x589fa9['_registerMarkerToCopy']('comment',_0x46919e);}_mapCommentsCopyConfigToRegisterConfiguration(_0x61b807){switch(_0x61b807){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x51ade0){const _0x27b31e=_0x51ade0['split'](':');return{'group':_0x27b31e[0x0],'id':_0x27b31e[0x1],'part':_0x27b31e[0x2]};}var pi=class extends _0x2231bd{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x173af6,_0x329119)=>{if(!_0x329119['options']['showCommentHighlights'])return null;if(_0x329119['options']['ignoreResolvedComments']){const {id:_0xc4c227}=fi(_0x173af6['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0xc4c227)?.['isResolved']&&_0x173af6['item'])return _0x329119['consumable']['consume'](_0x173af6['item'],'addMarker:'+_0x173af6['markerName']),_0x329119['consumable']['consume'](_0x173af6['item'],'removeMarker:'+_0x173af6['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x59ed74=>{_0x59ed74['on']('addMarker:comment',(_0x29c7f1,_0x17c9fd,_0x5d2b2c)=>{if(!_0x5d2b2c['options']['showCommentHighlights'])return;const _0x49fd83=_0x17c9fd['item'];if(!_0x49fd83)return;const _0x5737c4=_0x5d2b2c['mapper']['toViewElement'](_0x49fd83);this['editor']['model']['schema']['isObject'](_0x49fd83)&&_0x5737c4&&!_0x5737c4['getCustomProperty']('widget')&&_0x5737c4['is']('containerElement')&&Ct(_0x5737c4,_0x5d2b2c['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x588b3d,{writer:_0x130823,options:_0x5c555f})=>{if(!_0x5c555f['showCommentHighlights'])return null;const _0x24fdb4=_0x130823['createContainerElement']('div'),_0x47ccdd=_0x130823['createEmptyElement']('hr');return _0x130823['addClass']('ck-horizontal-line',_0x24fdb4),_0x130823['insert'](_0x130823['createPositionAt'](_0x24fdb4,0x0),_0x47ccdd),_0x24fdb4;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x587985,{writer:_0xec0c3f,options:_0x34d014})=>{if(!_0x34d014['showCommentHighlights'])return null;const _0x52d868=_0xec0c3f['createContainerElement']('span'),_0xcc6512=_0xec0c3f['createEmptyElement']('img');return _0xec0c3f['addClass']('image-inline',_0x52d868),_0xec0c3f['insert'](_0xec0c3f['createPositionAt'](_0x52d868,0x0),_0xcc6512),_0x52d868;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1dfde9,{writer:_0xdefa90,options:_0x3aa363})=>{if(_0x3aa363['showCommentHighlights'])return _0xdefa90['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x457724,_0x1a036b,_0x4daeb9)=>{_0x4daeb9['options']['showCommentHighlights']&&_0x457724['stop']();},{'priority':'high'});}},wi=class extends _0x2231bd{static get requires(){return[oi,di,_0x4ffb9d,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x279829){super(_0x279829),this['set']('isThreadsLoadingPaused',!0x0),_0x279829['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x57fe29,_0x4e4d30,_0x2bce34,_0x3d888d)=>{const _0x39d1e1=_0x279829['plugins']['get'](oi),_0x3d03a1=_0x2bce34?fi(_0x2bce34)['id']:null;_0x279829['model']['change'](()=>{if(_0x3d03a1){const _0x49db85=this['getAllMarkersForId'](_0x3d03a1);for(const _0x3d0891 of _0x49db85)_0x279829['editing']['reconvertMarker'](_0x3d0891);}if(_0x3d888d){const {id:_0x909a47}=fi(_0x3d888d),_0x14b4bc=_0x39d1e1['getCommentThread'](_0x909a47);if(_0x14b4bc&&_0x14b4bc['unlinkedAt'])return;if(_0x14b4bc&&!_0x14b4bc['isAttached'])return;const _0x4b790c=this['getAllMarkersForId'](_0x909a47);for(const _0x4fda5d of _0x4b790c)_0x279829['editing']['reconvertMarker'](_0x4fda5d);}}),_0x3d03a1&&this['scrollToThreadMarker'](_0x3d03a1);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x12b2a4=this['editor'],_0x179ee0=_0x12b2a4['plugins']['get'](oi),_0x597c24=_0x12b2a4['config']['get']('collaboration.channelId'),_0x47bff3=_0x179ee0['getCommentThreads']()['filter'](_0x32c839=>_0x32c839['channelId']!==_0x597c24);_0x12b2a4['commands']['add']('addCommentThread',new ci(_0x12b2a4)),this['listenTo'](_0x12b2a4,'change:isReadOnly',(_0x5450f4,_0x5b9b3f,_0x3739aa)=>{_0x179ee0['switchReadOnly'](_0x3739aa,_0x12b2a4['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x179ee0,gi('addCommentThread',_0x597c24),(_0x2e2c66,{threadId:_0x42c447})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x42c447)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x42c447);}),this['listenTo'](_0x179ee0,gi('removeCommentThread',_0x597c24),(_0x2bca09,{threadId:_0x5840e5})=>{_0x12b2a4['model']['enqueueChange']({'isUndoable':!0x1},_0x5af559=>{const _0x20883e=this['getAllMarkersForId'](_0x5840e5);for(const _0x21faca of _0x20883e)_0x5af559['removeMarker'](_0x21faca);});}),this['listenTo'](_0x179ee0,gi('resolveCommentThread',_0x597c24),(_0x49527f,{threadId:_0x4ba864})=>{this['_reconvertMarkers'](_0x4ba864);const _0x268679=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x268679['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x4ba864)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x179ee0,gi('reopenCommentThread',_0x597c24),(_0x297433,{threadId:_0x1cab60})=>{this['_reconvertMarkers'](_0x1cab60);},{'priority':'low'}),this['listenTo'](_0x179ee0,gi('addComment',_0x597c24),(_0xc611fb,{threadId:_0x139631,isFromAdapter:_0x54a9c6})=>{const _0x43b330=this['getAllMarkersForId'](_0x139631);!_0x54a9c6&&0x0!=_0x43b330['length']&&_0x179ee0['hasCommentThread'](_0x139631)&&0x1===_0x179ee0['getCommentThread'](_0x139631)['length']&&_0x12b2a4['model']['enqueueChange']({'isUndoable':!0x1},_0x576795=>{for(const _0x5087af of _0x43b330)_0x576795['updateMarker'](_0x5087af,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x47bff3);}afterInit(){!async function(_0x54bc29){const _0x33270b='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x1b95ba=0x79650,_0x3018a2={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2d2544(_0x5ab8e5){const _0x5e3d7a=new window['Promise'](_0x39c944=>{_0x5ab8e5['once']('ready',_0x39c944);}),_0x91cad1=window['Date']['now'](),_0x4408d2=_0x5ab8e5['config']['get']('licenseKey');async function _0x5afd95(){let _0x1badcd,_0x4877ba=null,_0x42c9d1=null;try{return'GPL'==_0x4408d2?'NotAllowed':(_0x1badcd=_0x58cd8d(),_0x1badcd?(_0x1badcd['usageEndpoint']&&(_0x42c9d1=_0x1a348d(_0x1badcd['usageEndpoint'],_0x1badcd['jti'])),await _0x123405()?_0x100328()?_0x56cb3a()?'Expired':_0x22b7fd()?('evaluation'==_0x1badcd['licenseType']&&(_0x4877ba=_0xca2b56('EvaluationLimit')),await _0x35c5db()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x56cb3a(){const _0x1a4afe=['evaluation','trial']['includes'](_0x1badcd['licenseType'])?_0x91cad1/0x3e8:0xe10*_0x1b95ba;return _0x1badcd['exp']<_0x1a4afe;}function _0x100328(){const _0x104a8b=_0x1badcd['features'];if(!_0x104a8b)return!0x1;if(_0x104a8b['includes']('*'))return!0x0;if(_0x104a8b['includes']('CMT'))return!0x0;if(_0x104a8b['includes']('TRILIUM')&&_0x110116())return!0x0;if(_0x104a8b['includes']('RCMT')){if(_0xa30e4())return!0x0;if(_0x3518c4()||_0x1e22d6())return!0x0;}return!0x1;}function _0x22b7fd(){const _0x2a3b70=_0x1badcd['licensedHosts'];if(!_0x2a3b70||0x0==_0x2a3b70['length'])return!0x0;const {hostname:_0x3d187c}=new URL(window['location']['href']);if(_0x2a3b70['includes'](_0x3d187c))return!0x0;const _0x2a8296=_0x3d187c['split']('.');return _0x2a3b70['filter'](_0xabf014=>_0xabf014['includes']('*'))['map'](_0x24dad3=>_0x24dad3['split']('.'))['filter'](_0x4dba24=>_0x4dba24['length']<=_0x2a8296['length'])['map'](_0x5a631c=>Array(_0x2a8296['length']-_0x5a631c['length'])['fill']('*'===_0x5a631c[0x0]?'*':'')['concat'](_0x5a631c))['some'](_0x63b779=>_0x2a8296['every']((_0x123130,_0x4d5c59)=>_0x63b779[_0x4d5c59]===_0x123130||'*'===_0x63b779[_0x4d5c59]));}function _0x35c5db(){return _0x4877ba&&_0x42c9d1?new window['Promise']((_0x106875,_0x29e905)=>{_0x4877ba['then'](_0x106875,_0x29e905),_0x42c9d1['then'](_0x419b4a=>{'Valid'!=_0x419b4a&&_0x106875(_0x419b4a);},_0x29e905);}):_0x4877ba||_0x42c9d1||'Valid';}}function _0x1a348d(_0x37dbc0,_0xa278f7){return new window['Promise'](_0x3ff424=>{if(_0x3381e0())return _0x3ff424('Valid');_0x416391(),_0x5ab8e5['decorate']('_sendUsageRequest');let _0x5a70cf=!0x1;const _0x498dc=_0x166325();function _0x5a3e26(_0x983935){return!!_0x983935&&('object'==typeof _0x983935||'function'==typeof _0x983935)&&'function'==typeof _0x983935['then']&&'function'==typeof _0x983935['catch'];}function _0x595553(_0xd4b149){_0x5c8ffe(_0xd4b149)['then'](_0x29c90e=>_0x29c90e&&'ok'==_0x29c90e['status']?_0x4c98d9(_0x4e91ca(_0x498dc+_0xa278f7))!=_0x29c90e['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1fb57a=>(_0x11fde6(),_0x1fb57a),()=>{const _0x4e0910=_0x405f25();return null==_0x4e0910?(_0x11fde6(),'Valid'):_0x91cad1-_0x4e0910>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3ff424)['catch'](()=>{_0x3ff424('UsageLimit');});const _0x23e2fd=0x36ee80;function _0x11fde6(){const _0x77256='llct-'+_0x4c98d9(_0x4e91ca(_0x37dbc0)),_0x179b16=_0x2ed539(_0x4c98d9(window['Math']['ceil'](_0x91cad1/_0x23e2fd)));window['localStorage']['setItem'](_0x77256,_0x179b16);}function _0x405f25(){const _0x32df68='llct-'+_0x4c98d9(_0x4e91ca(_0x37dbc0)),_0x50c4fa=window['localStorage']['getItem'](_0x32df68);return _0x50c4fa?window['parseInt'](_0x2ed539(_0x50c4fa),0x10)*_0x23e2fd:null;}function _0x5c8ffe(_0x4a23aa){return new window['Promise']((_0x3a1863,_0xe4c598)=>{_0x4a23aa['then'](_0x3a1863,_0xe4c598),window['setTimeout'](_0xe4c598,0x1d4c0);});}}_0x5ab8e5['on']('_sendUsageRequest',(_0x18da60,_0x1dc418)=>{if(_0x1dc418[0x0]!=_0x37dbc0)return _0x3ff424('UsageLimit');_0x1dc418[0x1]={..._0x1dc418[0x1],'requestId':_0x498dc};},{'priority':'high'}),_0x5ab8e5['on']('_sendUsageRequest',_0x28f74a=>{_0x5a3e26(_0x28f74a['return'])&&(_0x5a70cf=!0x0,_0x595553(_0x28f74a['return']));},{'priority':'low'}),_0x5e3d7a['then'](()=>{_0x5a70cf||_0x3ff424('UsageLimit');});});function _0x3381e0(){return'auto'==_0x5ab8e5['editing']['view']['_overlayModeHint'];}function _0x416391(){_0x5ab8e5['editing']['view']['_overlayModeHint']='auto';}}function _0xca2b56(_0x3d5375){const _0x1057c4=[new window['Promise'](_0x39ba52=>setTimeout(_0x39ba52,0x93ecc)),_0x5e3d7a['then'](()=>new window['Promise'](_0xf52685=>{let _0x3da187=0x0;_0x5ab8e5['model']['on']('applyOperation',(_0x4f96a9,_0x4fd6f0)=>{_0x4fd6f0[0x0]['isDocumentOperation']&&_0x3da187++,0x5e8==_0x3da187&&(_0xf52685(),_0x4f96a9['off']());});}))];return window['Promise']['race'](_0x1057c4)['then'](()=>_0x3d5375);}async function _0x24409c(){await _0x5e3d7a,_0x5ab8e5['model']['change']=_0x428932,_0x5ab8e5['model']['enqueueChange']=_0x428932,_0x5ab8e5['enableReadOnlyMode']('model');}function _0x110116(){return window['glob']&&window['glob']['triliumVersion'];}function _0xa30e4(){return _0x27c8e4('WebSocketGateway')&&'connected'==_0x442123('WebSocketGateway')['state'];}function _0x3518c4(){return _0x27c8e4('RevisionViewerIntegration');}function _0x1e22d6(){return _0x27c8e4('TrackChangesDataGetter');}function _0x30f4bb(_0x50ef34){const _0x4ae3f0=_0x3da702();_0x5ab8e5[_0x4ae3f0]='commentsLicenseKey'+_0x50ef34,'Valid'!=_0x50ef34&&_0x24409c();}function _0x3da702(){const _0x504dd9=window['String'](window['performance']['now']())['replace']('.','');let _0x23b5d7='m';for(let _0x4269fa=0x0;_0x4269fa<_0x504dd9['length'];_0x4269fa+=0x2){let _0x5d0702=window['parseInt'](_0x504dd9['substring'](_0x4269fa,_0x4269fa+0x2));_0x5d0702>=0x3e&&(_0x5d0702-=0x3e),_0x23b5d7+=_0x33270b[_0x5d0702];}return _0x23b5d7;}function _0x58cd8d(){const _0x23b821=_0x4408d2['split']('.');if(0x3!=_0x23b821['length'])return null;return _0x5988ea(_0x23b821[0x1]);function _0x5988ea(_0x3686f3){const _0xff32a1=_0x425f5f(_0x3686f3);return _0xff32a1&&_0x27298b()?_0xff32a1:null;function _0x27298b(){const _0x285111=_0xff32a1['jti'],_0x5d828f=window['parseInt'](_0x285111['substring'](_0x285111['length']-0x8),0x10),_0x2a2649={..._0xff32a1,'jti':_0x285111['substring'](0x0,_0x285111['length']-0x8)};return delete _0x2a2649['vc'],_0x4e91ca(_0x2a2649)==_0x5d828f;}}}async function _0x123405(){let _0x4569b5=!0x0;try{const [_0x1d2922,_0x3740b3,_0x20f660]=_0x4408d2['split']('.');return _0x430344(_0x1d2922),await _0x25988f(_0x1d2922,_0x3740b3,_0x20f660),_0x4569b5;}catch{return!0x1;}function _0x430344(_0x40bf5a){const _0x3898cd=_0x425f5f(_0x40bf5a);_0x3898cd&&'ES256'==_0x3898cd['alg']||(_0x4569b5=!0x1);}async function _0x25988f(_0x10cac9,_0x21f03e,_0x588590){const _0x311628=window['Uint8Array']['from'](_0x1071ae(_0x588590),_0x35a782=>_0x35a782['charCodeAt'](0x0)),_0x49fe34=new window['TextEncoder']()['encode'](_0x10cac9+'.'+_0x21f03e),_0x191562=window['crypto']['subtle'];if(!_0x191562)return;const _0x58dbce=await _0x191562['importKey']('jwk',_0x3018a2,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x191562['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x58dbce,_0x311628,_0x49fe34)||(_0x4569b5=!0x1);}}function _0x425f5f(_0x3cd244){return _0x3cd244['startsWith']('ey')?JSON['parse'](_0x1071ae(_0x3cd244)):null;}function _0x1071ae(_0x3bbf2c){return window['atob'](_0x3bbf2c['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4e91ca(_0x77860b){let _0x3f1705=0x1505;function _0x391e32(_0x198147){for(let _0x1255ac=0x0;_0x1255ac<_0x198147['length'];_0x1255ac++){const _0x46cccb=_0x198147['charCodeAt'](_0x1255ac);_0x3f1705=(_0x3f1705<<0x5)+_0x3f1705+_0x46cccb,_0x3f1705&=_0x3f1705;}}function _0x8e9604(_0x53b21d){Array['isArray'](_0x53b21d)?_0x53b21d['forEach'](_0x8e9604):_0x53b21d&&'object'==typeof _0x53b21d?Object['entries'](_0x53b21d)['sort']()['forEach'](([_0x3aa343,_0x2d3dc6])=>{_0x391e32(_0x3aa343),_0x8e9604(_0x2d3dc6);}):_0x391e32(window['String'](_0x53b21d));}return _0x8e9604(_0x77860b),_0x3f1705>>>0x0;}function _0x4c98d9(_0x3a7b78){return _0x3a7b78['toString'](0x10)['padStart'](0x8,'0');}function _0x2ed539(_0x4a30cb){return _0x4a30cb['split']('')['reverse']()['join']('');}function _0x27c8e4(_0x4bae62){return _0x5ab8e5['plugins']['has'](_0x4bae62);}function _0x442123(_0x20e508){return _0x5ab8e5['plugins']['get'](_0x20e508);}function _0x428932(){}_0x30f4bb(await _0x5afd95());}_0x2d2544(_0x54bc29['editor']);}(this);}destroy(){const _0xdaa2e3=this['editor']['plugins']['get'](oi),_0x154962=this['editor']['config']['get']('collaboration.channelId');for(const _0x41b8c8 of _0xdaa2e3['getCommentThreads']({'channelId':_0x154962}))_0xdaa2e3['_detachCommentThread'](_0x41b8c8['id']),_0xdaa2e3['_threads']['delete'](_0x41b8c8['id']);super['destroy']();}['hasMarkerForId'](_0x13b8fd){return this['getAllMarkersForId'](_0x13b8fd)['length']>0x0;}getAllMarkersForId(_0x46e920){const _0x18a3e8=[];for(const _0x18eba6 of this['editor']['model']['markers'])_0x18eba6['name']['startsWith']('comment:'+_0x46e920)&&_0x18a3e8['push'](_0x18eba6);return _0x18a3e8;}['scrollToThreadMarker'](_0x40f2ee){setTimeout(()=>{const _0x56f916=this['_getTargetForId'](_0x40f2ee);_0x56f916&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x40f2ee&&_0x13b67e({'target':_0x56f916[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x2b9df3){this['editor']['model']['change'](()=>{for(const _0x3a82c0 of this['getAllMarkersForId'](_0x2b9df3))this['editor']['editing']['reconvertMarker'](_0x3a82c0);});}_attachArchivedThread(_0x296a17){const _0x325471=this['editor']['plugins']['get'](oi),_0x1a14e1=this['editor']['plugins']['get'](di),_0x5f3b2c=_0x325471['getCommentThread'](_0x296a17);if(!_0x5f3b2c['isAttached']){const _0xa3c9cc=_0x5f3b2c['attachTo'](()=>this['_getTargetForId'](_0x5f3b2c['id']));_0x1a14e1['registerAnnotation'](_0xa3c9cc),_0x5f3b2c['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x2b7594=this['editor'],_0x2d1220=_0x2b7594['plugins']['get'](_0x4ffb9d);_0x2b7594['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x478c3d,_0x23c817)=>{const {id:_0x44aaad}=fi(_0x478c3d['markerName']),_0x441b53=_0x2b7594['plugins']['get'](oi)['getCommentThread'](_0x44aaad),_0x543ac3=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x44aaad;let _0xdd49e1;if(_0x441b53&&_0x441b53['isResolved']&&!_0x543ac3&&_0x478c3d['item'])return _0x23c817['consumable']['consume'](_0x478c3d['item'],'addMarker:'+_0x478c3d['markerName']),_0x23c817['consumable']['consume'](_0x478c3d['item'],'removeMarker:'+_0x478c3d['markerName']),null;const _0x22620c=['ck-comment-marker'];return _0x543ac3&&_0x22620c['push']('ck-comment-marker--active'),_0xdd49e1=_0x441b53?.['length']?_0x441b53['comments']['first']['author']['id']:_0x2d1220['me']['id'],{'classes':_0x22620c,'attributes':{'data-comment':_0x44aaad,'data-author-id':_0xdd49e1}};}}),_0x2b7594['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x56779e,{options:_0x247869})=>{if(_0x247869['showCommentHighlights'])return null;const _0x22168e=_0x2b7594['plugins']['get'](oi),_0x1f56c4=_0x2b7594['model']['markers']['get'](_0x56779e),{id:_0x767a7a,part:_0x2714c8}=fi(_0x56779e);return _0x1f56c4&&!_0x1f56c4['affectsData']||_0x247869['ignoreResolvedComments']&&_0x22168e['getCommentThread'](_0x767a7a)?.['isResolved']?null:{'group':'comment','name':_0x2714c8?_0x767a7a+':'+_0x2714c8:_0x767a7a};}}),_0x2b7594['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xb4df88,{writer:_0x537e41})=>_0x537e41['createElement']('$marker',{'data-name':'comment:'+_0xb4df88['getAttribute']('id')})}),_0x2b7594['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x300170=this['editor'],_0x197106=_0x300170['plugins']['get'](oi),_0x972c4d=new Set(),_0x4280bd=new Set();_0x300170['model']['document']['registerPostFixer'](_0x44ef56=>{let _0x2373c9=!0x1;for(const {name:_0xa60d53,data:_0x294e3d}of _0x300170['model']['document']['differ']['getChangedMarkers']()){const {group:_0x289335,id:_0x14ce80}=fi(_0xa60d53);let _0x11fe3e=_0x294e3d['newRange'];if('comment'!==_0x289335||!_0x11fe3e)continue;const _0x1b44d6='$graveyard'===_0x11fe3e['root']['rootName'];_0x1b44d6||(_0x11fe3e=_i(_0x11fe3e,_0x300170['model']),!_0x11fe3e||_0x11fe3e['isCollapsed']||!_0x294e3d['newRange']||_0x11fe3e['isEqual'](_0x294e3d['newRange']))?_0x300170['model']['hasContent'](_0x11fe3e)&&!_0x1b44d6?this['isThreadsLoadingPaused']?_0x972c4d['add'](_0xa60d53):this['_handleThreadMarker'](_0xa60d53,_0x14ce80):(_0x4280bd['add'](_0xa60d53),_0x972c4d['delete'](_0xa60d53),_0x44ef56['removeMarker'](_0xa60d53),_0x2373c9=!0x0):(_0x44ef56['updateMarker'](_0xa60d53,{'range':_0x11fe3e}),_0x2373c9=!0x0);}return _0x2373c9;}),this['on']('change:isThreadsLoadingPaused',(_0x589aca,_0x379bee,_0x532ab1)=>{if(!_0x532ab1&&_0x972c4d['size'])for(const _0x164234 of _0x972c4d){const {id:_0xc09da}=fi(_0x164234);_0x972c4d['delete'](_0x164234),_0x300170['model']['markers']['get'](_0x164234)&&this['_handleThreadMarker'](_0x164234,_0xc09da);}}),this['listenTo'](_0x300170['model']['document'],'change',()=>{for(const {name:_0x52f48c,data:{newRange:_0x49b8d2}}of _0x300170['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4b4003,id:_0x2ba584}=fi(_0x52f48c);if('comment'!==_0x4b4003)continue;const _0x36c8d2=_0x197106['getCommentThread'](_0x2ba584),_0x404238=this['hasMarkerForId'](_0x2ba584);_0x36c8d2&&(!_0x36c8d2['_hasTargetInContent']&&_0x49b8d2&&_0x300170['editing']['view']['once']('render',()=>{const _0x1d3f00=_0x300170['plugins']['get'](ti),_0x49f7e2=_0x197106['_threadToController']['get'](_0x36c8d2)['view'];_0x1d3f00['getByInnerView'](_0x49f7e2)['refreshVisibility']();},{'priority':'low'}),_0x36c8d2['_hasTargetInContent']=_0x404238||!!_0x49b8d2),_0x49b8d2||(_0x4280bd['add'](_0x52f48c),_0x972c4d['delete'](_0x52f48c));}for(const _0x177216 of _0x4280bd){const {id:_0x584a45}=fi(_0x177216),_0x416a0c=_0x197106['getCommentThread'](_0x584a45);if(_0x972c4d['delete'](_0x177216),!_0x416a0c)continue;const _0x12fae6=this['hasMarkerForId'](_0x584a45);_0x12fae6||_0x416a0c['isSubmitted']?_0x12fae6||_0x416a0c['unlinkedAt']||_0x416a0c['setUnlinkedAt'](new Date()):_0x416a0c['remove']();}_0x4280bd['clear']();});}_handleInitialThreads(_0x3f0a3e){_0x3f0a3e['forEach'](_0x481403=>{_0x481403['unlinkedAt']&&this['_attachArchivedThread'](_0x481403['id']);});}_getTargetForId(_0x2a30d2){const _0x391900=this['editor'],_0x5447b3=this['getAllMarkersForId'](_0x2a30d2);return _0xdc7995(_0x391900['editing'],_0x5447b3);}_getTextContext(_0x2d2851){const _0x21789a=this['getAllMarkersForId'](_0x2d2851);let _0xf2ed2d='',_0x328ed3=!0x1;for(const _0x59bfcf of _0x21789a){const _0x2bb037=_0x59bfcf['getRange']();for(const _0x1d05b9 of Array['from'](_0x2bb037['getItems']()))_0x1d05b9['is']('$textProxy')?(_0xf2ed2d&&_0x328ed3&&(_0xf2ed2d+='\x20',_0x328ed3=!0x1),_0xf2ed2d+=_0x1d05b9['data']):_0x328ed3=!0x0;_0x328ed3=!0x0;}return _0xf2ed2d['substring'](0x0,0x96);}_attachMarkerToThread(_0x38dfbc,_0x3c4ada){const _0x1c1aa9=this['editor'],_0x133c6c=_0x1c1aa9['plugins']['get'](oi);let _0x1a2a28=_0x133c6c['getCommentThread'](_0x3c4ada);const _0xd71fc=_0x1c1aa9['config']['get']('collaboration.channelId'),_0x1baaf0=_0x1c1aa9['plugins']['get'](di);return _0x1a2a28&&(_0x1a2a28['unlinkedAt']&&_0x1a2a28['setUnlinkedAt'](null),_0x1a2a28['isAttached'])||(this['getAllMarkersForId'](_0x3c4ada)[0x0]['managedUsingOperations']?_0x133c6c['fetchCommentThread']({'channelId':_0xd71fc,'threadId':_0x3c4ada})['then'](_0x54cd3b=>{if('destroyed'!==_0x1c1aa9['state']){if(_0x1a2a28=_0x54cd3b,_0x1a2a28&&!_0x1a2a28['isAttached']){const _0x412d0b=_0x1a2a28['attachTo'](()=>this['_getTargetForId'](_0x3c4ada));_0x1baaf0['registerAnnotation'](_0x412d0b),_0x1a2a28['isResolved']&&this['_reconvertMarkers'](_0x3c4ada);}else{if(!_0x1a2a28){const _0x33735a=this['getAllMarkersForId'](_0x3c4ada);_0x1c1aa9['model']['change'](_0x39cb26=>{for(const _0x4a4bf6 of _0x33735a)_0x39cb26['removeMarker'](_0x4a4bf6);});}}}}):_0x1c1aa9['editing']['view']['once']('render',()=>{if(_0x133c6c['getCommentThread'](_0x3c4ada))return;const _0x39d507=_0x1c1aa9['plugins']['get'](ti);_0x1a2a28=_0x133c6c['openNewCommentThread']({'channelId':_0xd71fc,'threadId':_0x3c4ada,'target':()=>this['_getTargetForId'](_0x3c4ada),'context':{'type':'text','value':this['_getTextContext'](_0x3c4ada)}});const _0x4cef7f=_0x133c6c['_threadToController']['get'](_0x1a2a28)['view'],_0x317c10=_0x39d507['getByInnerView'](_0x4cef7f);_0x317c10&&_0x1baaf0['registerAnnotation'](_0x317c10);},{'priority':'low'})),_0x1a2a28;}['_handleThreadMarker'](_0x1db671,_0x32cf76){const _0x406abb=this['_attachMarkerToThread'](_0x1db671,_0x32cf76);_0x406abb&&!_0x406abb['context']&&_0x406abb['setContext']({'type':'text','value':this['_getTextContext'](_0x32cf76)});}_initAriaMarkerChangeAnnouncements(){const _0x244a19=this['editor'];_0xd84e29(_0x244a19['model'],({left:_0x4880c8,entered:_0x158b66})=>{for(const _0x55624b of _0x4880c8)if(Ai(_0x55624b)){_0x244a19['ui']['ariaLiveAnnouncer']['announce'](Et(_0x244a19['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x386eb3 of _0x158b66)if(Ai(_0x386eb3)){_0x244a19['ui']['ariaLiveAnnouncer']['announce'](Et(_0x244a19['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0xcfd8cd(_0x33670a)));break;}});}};function gi(_0x82989b,_0x7bd3af){return _0x7bd3af?_0x82989b+':'+_0x7bd3af:_0x82989b;}function _i(_0x10c91c,_0x44fec9){const _0x261640=_0x44fec9['schema'],_0x995184=_0x44fec9['createRange'](_0x10c91c['start']);for(const _0x221af5 of _0x10c91c['getWalker']()){const {type:_0x4a3cd5,item:_0x533718,nextPosition:_0x1743ef}=_0x221af5;if('text'===_0x4a3cd5||_0x261640['isObject'](_0x533718)){const _0x2bdcdc=_0x44fec9['createPositionBefore'](_0x533718);_0x995184['isCollapsed']&&(_0x995184['start']=_0x2bdcdc),_0x995184['end']=_0x1743ef;}}return _0x995184;}function Ai(_0x485e66){return'comment'===fi(_0x485e66['name'])['group'];}var vi=class extends _0x2231bd{['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 _0x5abd28=this['editor'],_0x8897f3=_0x5abd28['plugins']['get'](oi),_0x157abe=_0x5abd28['plugins']['get'](wi),_0x30bd9f=_0x5abd28['plugins']['get'](ti),_0x3d6433=_0x5abd28['plugins']['get'](di);_0x5abd28['ui']['componentFactory']['add']('comment',()=>{const _0x34b46e=this['_createUIButton'](_0x393932);return _0x34b46e['tooltip']=!0x0,_0x34b46e;}),_0x5abd28['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x3d6433['addSourceCollector'](()=>{const _0x208a19=[];for(const [_0xdf00ab,_0x184a49]of _0x8897f3['_threadToController']){const _0x23538b=_0x157abe['getAllMarkersForId'](_0xdf00ab['id']),_0x3173af=_0x23538b['map'](_0x192e7a=>_0x192e7a['getRange']());_0x23538b['length']>0x0&&_0x208a19['push']([_0x184a49['view'],_0x3173af]);}return _0x208a19;}),this['listenTo'](_0x30bd9f,'change:activeAnnotations',(_0x1a9f72,_0x21097a,_0x21530a)=>{const _0x1ca6fc=Array['from'](_0x21530a)['map'](_0x58865e=>_0x58865e['innerView'])['find'](_0x298c67=>_0x8897f3['_viewToController']['has'](_0x298c67));if(!_0x1ca6fc)return void(_0x157abe['activeMarker']=null);const _0x3862ba=_0x8897f3['_viewToController']['get'](_0x1ca6fc)['model']['id'],_0x56134c='comment:'+_0x3862ba;_0x3862ba&&_0x157abe['hasMarkerForId'](_0x3862ba)?_0x157abe['activeMarker']=_0x56134c:_0x157abe['activeMarker']&&(_0x157abe['activeMarker']=null);}),this['listenTo'](_0x8897f3,'removeCommentThread',(_0x435120,{threadId:_0x4d857c,isFromAdapter:_0x807b94})=>{!_0x807b94&&_0x5abd28['ui']['focusTracker']['isFocused']&&_0x157abe['hasMarkerForId'](_0x4d857c)&&_0x5abd28['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x8897f3,'addComment',(_0x5a60dc,{threadId:_0x24745c,isFromAdapter:_0x568cfc})=>{!_0x568cfc&&_0x157abe['hasMarkerForId'](_0x24745c)&&_0x8897f3['hasCommentThread'](_0x24745c)&&0x1===_0x8897f3['getCommentThread'](_0x24745c)['length']&&(_0x5abd28['editing']['view']['focus'](),_0x5a60dc['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0xfcbbaa=[this['editor']];for(const _0xd6e3f2 of _0xfcbbaa){let _0x240b2d;for(const _0x1ff178 in _0xd6e3f2){const _0x31dd3f=_0x1ff178,_0x56f67b=_0xd6e3f2[_0x31dd3f];if('commentsLicenseKeyValid'==_0x56f67b||'commentsLicenseKeyInvalid'==_0x56f67b||'commentsLicenseKeyExpired'==_0x56f67b||'commentsLicenseKeyDomainLimit'==_0x56f67b||'commentsLicenseKeyNotAllowed'==_0x56f67b||'commentsLicenseKeyEvaluationLimit'==_0x56f67b||'commentsLicenseKeyUsageLimit'==_0x56f67b){delete _0xd6e3f2[_0x31dd3f],_0x240b2d=_0x56f67b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x240b2d&&_0xd6e3f2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x240b2d&&_0xd6e3f2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x240b2d&&_0xd6e3f2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x240b2d&&_0xd6e3f2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x240b2d&&_0xd6e3f2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x240b2d&&_0xd6e3f2['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x348989){const _0x55a63c=this['editor'],_0x355278=new _0x348989(_0x55a63c['locale']),_0x36c967=_0x55a63c['commands']['get']('addCommentThread');return _0x355278['set']({'label':Et(_0x55a63c['locale'],'Comment'),'icon':_0x1fc2c2}),_0x355278['bind']('isEnabled')['to'](_0x36c967,'isEnabled',_0x36c967,'hasContent',(_0x55ed16,_0x55abf8)=>_0x55ed16&&_0x55abf8),this['listenTo'](_0x355278,'execute',()=>{_0x36c967['execute']();}),_0x355278;}},yi=class extends _0x2231bd{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0xb78041){super(_0xb78041),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5f59d4,_0x40fc02,_0x119eba)=>{_0x119eba?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x47b189,_0x3aa0b6]of this['editor']['commands'])_0x3aa0b6['affectsData']&&'addCommentThread'!==_0x47b189&&_0x3aa0b6['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 _0x2dbafb=this['editor']['editing']['view']['document'];this['listenTo'](_0x2dbafb,'cut',_0x51ed03=>_0x51ed03['stop'](),{'priority':'highest'}),this['listenTo'](_0x2dbafb,'clipboardInput',_0x4de32d=>_0x4de32d['stop'](),{'priority':'highest'}),this['listenTo'](_0x2dbafb,'delete',_0x57c672=>_0x57c672['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0xdc0c7d,_0x3f50dc]of this['editor']['commands'])_0x3f50dc['affectsData']&&'addCommentThread'!==_0xdc0c7d&&_0x3f50dc['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 _0x1b3fad{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xc6c65b){super(_0xc6c65b),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x16ea71=this['context']['plugins']['get'](ti);this['listenTo'](_0x16ea71,'_activateAnnotation',(_0x4543bf,_0x20b543)=>{for(const _0x346f17 of this['activeUIs']){const _0x8c669b=this['_uis']['get'](_0x346f17);(0x0,this['uisData']['get'](_0x346f17)['filter'])(_0x20b543)&&_0x8c669b['setActiveAnnotation'](_0x20b543);}}),this['listenTo'](_0x16ea71,'_deactivateAllAnnotations',()=>{for(const _0xd3519b of this['activeUIs'])this['_uis']['get'](_0xd3519b)['setActiveAnnotation'](null);}),this['listenTo'](_0x16ea71['_visibleAnnotations'],'add',(_0x5efc15,_0x5c7ce0)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5c7ce0);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x1463e4){return this['activeUIs']['has'](_0x1463e4);}activate(_0x20896e,_0x36769e=this['defaultFilter']){const _0x1db8b2=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x20896e))throw new _0x546dad('annotationsuis-missing-ui',this,{'uiName':_0x20896e});this['isActive'](_0x20896e)&&this['deactivate'](_0x20896e),this['activeUIs']['add'](_0x20896e);const _0x212d56=new Jt();Qt({'source':_0x1db8b2['_visibleAnnotations'],'target':_0x212d56,'filter':_0x36769e}),this['uisData']['set'](_0x20896e,{'collection':_0x212d56,'filter':_0x36769e});const _0x2159cd=this['_uis']['get'](_0x20896e);_0x2159cd['attach'](_0x212d56),this['listenTo'](_0x2159cd,'change:activeAnnotation',(_0x17e46c,_0x36d8f3,_0x599b9d,_0x3f0dd6)=>{_0x3f0dd6&&_0x1db8b2['_removeActiveAnnotation'](_0x3f0dd6),_0x599b9d&&_0x1db8b2['_addActiveAnnotation'](_0x599b9d);});}deactivate(_0x4b48de){if(this['activeUIs']['delete'](_0x4b48de),!this['_uis']['has'](_0x4b48de))throw new _0x546dad('annotationsuis-missing-ui',this,{'uiName':_0x4b48de});const _0x1ec328=this['_uis']['get'](_0x4b48de);_0x1ec328['detach'](),this['stopListening'](_0x1ec328),this['uisData']['get'](_0x4b48de)['collection']['destroy'](),this['uisData']['delete'](_0x4b48de);}switchTo(_0x147178){if(!this['_uis']['has'](_0x147178))throw new _0x546dad('annotationsuis-missing-ui',this,{'uiName':_0x147178});const _0x43fff4=this['context']['plugins']['get'](ti),_0x43feec=Array['from'](_0x43fff4['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x147178);const _0x1ab1cb=this['_uis']['get'](_0x147178);_0x1ab1cb['setActiveAnnotation'](_0x43feec),_0x1ab1cb['_setSelectedAnnotations']&&_0x43feec&&_0x1ab1cb['_setSelectedAnnotations']([_0x43feec]);}deactivateAll(){for(const _0x4438b3 of this['activeUIs'])this['deactivate'](_0x4438b3);}register(_0x5f3817,_0x9cea8){if(this['_uis']['has'](_0x5f3817))throw new _0x546dad('annotationsuis-register-already-registered');if('function'!=typeof _0x9cea8['attach']||'function'!=typeof _0x9cea8['detach']||'function'!=typeof _0x9cea8['setActiveAnnotation'])throw new _0x546dad('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5f3817,_0x9cea8);}refilterAnnotations(){const _0x491fee=this['context']['plugins']['get'](ti)['collection'],_0x130e07=new Map(),_0x130e24=Array['from'](this['activeUIs']);for(const _0x378f2c of this['activeUIs']){const _0x2e71ff=this['uisData']['get'](_0x378f2c)['collection'];for(const _0x483707 of _0x2e71ff)_0x130e07['set'](_0x483707,_0x378f2c);}for(const _0x3b0b57 of _0x491fee){const _0xca7600=_0x130e07['get'](_0x3b0b57);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3b0b57);const _0x41652c=_0x130e24['find'](_0x1a883e=>this['uisData']['get'](_0x1a883e)['filter'](_0x3b0b57));_0xca7600!==_0x41652c&&(_0xca7600&&this['uisData']['get'](_0xca7600)['collection']['remove'](_0x3b0b57),_0x41652c&&this['uisData']['get'](_0x41652c)['collection']['add'](_0x3b0b57));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x545dc5){const _0x4bcaf9=[];for(const _0x352baf of this['activeUIs']){(0x0,this['uisData']['get'](_0x352baf)['filter'])(_0x545dc5)&&_0x4bcaf9['push'](_0x352baf);}if(_0x4bcaf9['length']>0x1)throw new _0x546dad('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4bcaf9,'annotationType':_0x545dc5['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x36fad3('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x30c6d7){super(_0x30c6d7);const _0x13d819=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 _0x2d4278(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x13d819['to']('class')],'style':{'minHeight':_0x13d819['to']('minHeight',_0x48e154=>'number'==typeof _0x48e154?Ci(_0x48e154+0xa):null)},'dir':_0x30c6d7['uiLanguageDirection'],'role':'application','aria-label':Et(_0x30c6d7,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x30c6d7,'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',_0x5cfbd1=>{this['_updateItemPositionInFocusables'](_0x5cfbd1['source']);}),this['list']['forEach'](_0x613424=>{this['focusTracker']['add'](_0x613424['element']),this['_updateItemPositionInFocusables'](_0x613424);}),this['list']['on']('change',(_0x2c2bb5,_0x484c5f)=>{for(const _0x3a6622 of _0x484c5f['removed'])this['focusTracker']['remove'](_0x3a6622['element']),this['focusables']['remove'](_0x3a6622);for(const _0x52e996 of _0x484c5f['added'])this['focusTracker']['add'](_0x52e996['element']),this['_updateItemPositionInFocusables'](_0x52e996);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x1a9afc){const _0xe4e7ae=this['focusables']['getIndex'](_0x1a9afc);let _0x454289,_0x3f9a6b;for(const _0x5ec92a of this['focusables'])if(_0x1a9afc['top']<_0x5ec92a['top']){_0x454289=_0x5ec92a;break;}if(_0x3f9a6b=_0x454289?this['focusables']['getIndex'](_0x454289):this['focusables']['length'],-0x1!==_0xe4e7ae){if(_0xe4e7ae===_0x3f9a6b-0x1)return;this['focusables']['remove'](_0x1a9afc),_0x3f9a6b=_0x454289?this['focusables']['getIndex'](_0x454289):this['focusables']['length'];}this['focusables']['add'](_0x1a9afc,_0x3f9a6b);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x36fad3('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x31b770){super(_0x31b770),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2c78b7,_0x2d26e9)=>_0x2c78b7+_0x2d26e9),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1e9fcb=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1e9fcb['to']('isAnimationDisabled',_0x17503b=>_0x17503b?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1e9fcb['to']('top',_0x5c5368=>bi(_0x5c5368))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x31d9cf=this['element']['clientHeight'];_0x31d9cf&&(this['height']=_0x31d9cf);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x1b3fad{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x14497a){super(_0x14497a),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 _0x3f0fc7=this['context']['config']['get']('sidebar.container');_0x3f0fc7&&this['setContainer'](_0x3f0fc7);}setContainer(_0xede576){if(!Oi(_0xede576))throw new _0x546dad('sidebar-setcontainer-invalid-element');this['container']=_0xede576;}_attachToContainer({viewClass:_0x5a7219='',spaceBetweenItems:_0x2586d0=0x19}={}){if(!Oi(this['container']))throw new _0x546dad('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5a7219,this['_spaceBetweenItems']=_0x2586d0;}['rearrange']({removedAnnotation:_0x304cc4,previousAnnotation:_0x252c4f,nextAnnotation:_0x5b52df}){const _0x1a7219=this['getSidebarItemView'](_0x304cc4);this['view']['list']['remove'](_0x1a7219),this['_destroySidebarItemView'](_0x304cc4),_0x252c4f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x252c4f)),_0x5b52df&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5b52df)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1ff98c,activatedAnnotation:_0x5712dc,disableAnimationOnActivatedAnnotation:_0x458eb2}){if(this['_activeAnnotation']=_0x5712dc,_0x1ff98c){_0x1ff98c['isActive']=!0x1;const _0xefb20b=this['getSidebarItemView'](_0x1ff98c);_0xefb20b&&_0x458eb2&&(_0xefb20b['isAnimationDisabled']=!0x1);}if(_0x5712dc){const _0x52f10d=this['getSidebarItemView'](_0x5712dc);_0x52f10d&&(_0x5712dc['isActive']=!0x0,_0x458eb2&&(_0x52f10d['isAnimationDisabled']=!0x0,_0x52f10d['top']+=0x1),this['_alignToTargetRect'](_0x52f10d));}}_detachFromContainer(_0x534a0c){if(this['view']['element']['remove'](),_0x534a0c){for(const _0x33318b of _0x534a0c)this['_destroySidebarItemView'](_0x33318b);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x294194,_0x5b3c8a){_0x5b3c8a||(_0x5b3c8a=_0x294194['view']);const _0x4b1cb5=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4b1cb5,_0x294194),this['_annotationToSidebarItemView']['set'](_0x294194,_0x4b1cb5),_0x4b1cb5['content']['add'](_0x5b3c8a),this['listenTo'](_0x294194['view'],'change:targetRect',(_0x272f71,_0x21e70d,_0x5204b1)=>{const _0x5cffff=this['_getTargetTop'](_0x294194,_0x5204b1);_0x4b1cb5['_targetTop']!=_0x5cffff&&(_0x4b1cb5['_targetTop']=_0x5cffff,this['_setItemTop'](_0x4b1cb5,_0x5cffff));}),this['listenTo'](_0x4b1cb5,'change:top',()=>{this['_recalculate'](_0x4b1cb5,'top');}),this['listenTo'](_0x4b1cb5,'change:bottom',()=>{this['_recalculate'](_0x4b1cb5,'bottom');}),this['_alignToTargetRect'](_0x4b1cb5);const _0x157d2b=this['_getItemBefore'](_0x4b1cb5);return _0x157d2b&&this['_alignAfterItem'](_0x157d2b,_0x4b1cb5)||this['_alignToTargetRect'](_0x4b1cb5),this['_updateLastItem'](),this['view']['list']['add'](_0x4b1cb5),_0x4b1cb5;}['_alignForTopChange'](_0x199dbd){if(!_0x199dbd['content']['length'])return;const _0x21e723=this['_getItemBefore'](_0x199dbd);if(!_0x21e723)return;const _0x4331cb=this['_sidebarItemViewToAnnotation']['get'](_0x21e723),_0x57ada2=this['_activeAnnotation'];_0x57ada2&&_0x57ada2===_0x4331cb?this['_alignAfterItem'](_0x21e723,_0x199dbd):this['_alignBeforeItem'](_0x199dbd,_0x21e723);}_alignForBottomChange(_0x223bc1){if(!_0x223bc1['content']['length'])return;const _0x4f03d2=this['_getItemAfter'](_0x223bc1);if(!_0x4f03d2)return;const _0x5e55be=this['_sidebarItemViewToAnnotation']['get'](_0x4f03d2),_0x3aad50=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2711ea=this['_activeAnnotation'];_0x2711ea&&_0x2711ea===_0x5e55be&&_0x3aad50?(this['_alignBeforeItem'](_0x4f03d2,_0x223bc1),this['_alignAfterItem'](_0x223bc1,_0x4f03d2)):_0x2711ea&&_0x2711ea===_0x5e55be?this['_alignBeforeItem'](_0x4f03d2,_0x223bc1):this['_alignAfterItem'](_0x223bc1,_0x4f03d2);}_recalculate(_0x5a1caf,_0x11cd87){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x22c349,changedProp:_0xbf8f55}of this['_recalculateBuffer'])'top'===_0xbf8f55?this['_alignForTopChange'](_0x22c349):this['_alignForBottomChange'](_0x22c349);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5a1caf,'changedProp':_0x11cd87});}getSidebarItemView(_0x3389df){return this['_annotationToSidebarItemView']['get'](_0x3389df);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x14da6f){const _0x4b4b58=this['getSidebarItemView'](_0x14da6f);this['stopListening'](_0x4b4b58),this['stopListening'](_0x14da6f['view']),_0x4b4b58['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x14da6f),this['_sidebarItemViewToAnnotation']['delete'](_0x4b4b58);}_createSidebarView(){const _0x8449c8=new Ii(this['context']['locale']);return _0x8449c8['render'](),this['on']('change:_lastItem',(_0x4fd003,_0x3bf078,_0x5d2fec,_0x2e7121)=>{_0x2e7121&&_0x8449c8['unbind']('minHeight'),_0x5d2fec?_0x8449c8['bind']('minHeight')['to'](_0x5d2fec,'bottom'):_0x8449c8['minHeight']=null;}),_0x8449c8;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x28d3a8){const _0x35f14a=this['_sidebarItemViewToAnnotation']['get'](_0x28d3a8),_0x1bb176=_0x35f14a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x35f14a)-0x1);return _0x1bb176&&this['getSidebarItemView'](_0x1bb176)||null;}_getItemAfter(_0x5ec41b){const _0x4eec86=this['_sidebarItemViewToAnnotation']['get'](_0x5ec41b),_0xba3fb5=_0x4eec86&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4eec86)+0x1);return _0xba3fb5&&this['getSidebarItemView'](_0xba3fb5)||null;}_alignBeforeItem(_0x45f1fa,_0x420c30){_0x45f1fa['updateHeight']();const _0xea62bb=Ni(_0x420c30['bottom']+this['_spaceBetweenItems'],_0x45f1fa['top']);return!!_0xea62bb&&(this['_setItemTop'](_0x420c30,_0x420c30['top']-_0xea62bb),!0x0);}_alignAfterItem(_0x913209,_0x566b2e){_0x913209['updateHeight']();const _0x1cf7ea=Ni(_0x913209['bottom']+this['_spaceBetweenItems'],_0x566b2e['top']);return!!_0x1cf7ea&&(this['_setItemTop'](_0x566b2e,_0x566b2e['top']+_0x1cf7ea,!0x1),!0x0);}_alignToTargetRect(_0x216152){const _0x145c02=this['_sidebarItemViewToAnnotation']['get'](_0x216152);if(!_0x145c02||!_0x145c02['target']||!_0x145c02['targetRect'])return;const _0x283499=this['_getTargetTop'](_0x145c02,_0x145c02['targetRect']);this['_setItemTop'](_0x216152,_0x283499);}_getTargetTop(_0x8a204a,_0x410d75){if(null===_0x410d75)return 0x0;if(_0x8a204a['target']instanceof _0x3b4d13)return _0x410d75['top'];{const _0x37fe69=new _0x3b4d13(this['view']['element'])['top'];return _0x410d75['top']-_0x37fe69;}}_setItemTop(_0x3537c2,_0x2ac078,_0x64de60=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x64de60&&(_0x2ac078=Math['max'](_0x2ac078,this['_getMaxAvailableTop'](_0x3537c2))),_0x3537c2['top']=_0x2ac078;}_getMaxAvailableTop(_0x236bd3){let _0x3c5b70=this['_getItemBefore'](_0x236bd3),_0x45a42f=0x0;for(;_0x3c5b70;)_0x3c5b70['updateHeight'](),_0x45a42f+=this['_spaceBetweenItems']+_0x3c5b70['height'],_0x3c5b70=this['_getItemBefore'](_0x3c5b70);return _0x45a42f;}};function Ni(_0x36ffc9,_0x4780d1){return Math['max'](_0x36ffc9-_0x4780d1,0x0);}function Oi(_0x4a4780){return null!==_0x4a4780&&'object'==typeof _0x4a4780&&0x1===_0x4a4780['nodeType'];}var Mi=class extends _0x1b3fad{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(_0x41a0f2){super(_0x41a0f2),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x42a45f(),this['_refreshPositioningDebounced']=_0x54f3ec(()=>{_0x41a0f2['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x1ffd4d=this['context']['plugins']['get'](Ti),_0x38b6c3=this['context']['plugins']['get'](ki);_0x1ffd4d['register']('wideSidebar',this),_0x38b6c3['container']&&_0x1ffd4d['switchTo']('wideSidebar');}setActiveAnnotation(_0x341ef2){if(_0x341ef2===this['activeAnnotation'])return;const _0xe8c2b0=this['context']['plugins']['get'](ki);_0xe8c2b0['_activeAnnotation']=_0x341ef2;const _0x8f55c1=this['activeAnnotation'];_0xe8c2b0['refresh']({'blurredAnnotation':_0x8f55c1,'activatedAnnotation':_0x341ef2}),this['activeAnnotation']=_0x341ef2;}attach(_0x25d36a){this['annotations']=_0x25d36a;const _0x193275=this['context']['plugins']['get'](ki);if(_0x193275['_annotations']=_0x25d36a,this['isAttached'])throw new _0x546dad('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x193275,'set:container',()=>{this['detach'](),this['listenTo'](_0x193275,'change:container',_0x535d17=>{_0x535d17['off'](),this['attach'](_0x25d36a);});}),_0x193275['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0xbb9143=_0x4d5de0=>{_0x4d5de0['updateTargetRect'](),_0x193275['addAnnotation'](_0x4d5de0);};for(const _0x47716f of _0x25d36a)_0xbb9143(_0x47716f);this['listenTo'](_0x25d36a,'add',(_0x53464b,_0x2923b2)=>{_0xbb9143(_0x2923b2);}),this['listenTo'](_0x25d36a,'remove',(_0x3eb7c2,_0xc1eb3c,_0x28792e)=>{_0x193275['rearrange']({'removedAnnotation':_0xc1eb3c,'previousAnnotation':_0x25d36a['get'](_0x28792e-0x1),'nextAnnotation':_0x25d36a['get'](_0x28792e+0x1)}),_0xc1eb3c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x25d36a,'focus',(_0x513bc8,_0x40edaa)=>{this['setActiveAnnotation'](_0x40edaa);}),this['listenTo'](_0x25d36a,'blur',()=>{this['setActiveAnnotation'](null);});const _0x53fa2f=this['context']instanceof _0x3654e9?this['context']['editors']:new _0x42a45f([this['context']]);for(const _0x3d3488 of _0x53fa2f)this['_integrateWithEditorAnnotations'](_0x3d3488);this['listenTo'](_0x53fa2f,'add',(_0x56e2ae,_0x269d9b)=>{this['listenTo'](_0x269d9b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x269d9b);});}),this['listenTo'](_0x53fa2f,'remove',(_0x1432b3,_0x38e635)=>{_0x38e635['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x38e635['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x546dad('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x381a11=this['context']['plugins']['get'](ki);_0x381a11['_detachFromContainer'](this['annotations']),this['stopListening'](_0x381a11),this['stopListening'](this['annotations']),this['context']instanceof _0x3654e9&&this['stopListening'](this['context']['editors']);for(const _0x4ae8a7 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4ae8a7);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x2b69d9){if(!_0x2b69d9['plugins']['has']('EditorAnnotations'))return;const _0xa5d951=_0x2b69d9['plugins']['get']('EditorAnnotations'),_0x29df89=()=>{const _0x4fa9c3=_0xa5d951['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4fa9c3[0x0]||null);};this['listenTo'](_0xa5d951,'refresh',_0x29df89),this['listenTo'](_0xa5d951,'blur',(_0x5e4a89,{isAnnotationTracked:_0x929a94})=>{this['activeAnnotation']&&_0x929a94(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xa5d951,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x16c9fe=>{_0xa5d951['hasDomSelection']()&&(_0x29df89(),_0x16c9fe['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xa5d951);}_destroyEditorAnnotationsIntegration(_0x5dc641){this['stopListening'](_0x5dc641),this['_editorAnnotations']['remove'](_0x5dc641);}},Ri=class extends _0x393932{counterView;constructor(_0x2fbac8){super(_0x2fbac8);const _0x3e56e9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3b15d1,_0x79bd0f)=>_0x3b15d1?'...':_0x79bd0f['toString']()),this['set']('annotationType',''),this['icon']=_0x1fc2c2,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3e56e9['to']('annotationType',_0x285cf5=>'ck-annotation-counter__badge--'+_0x285cf5),_0x3e56e9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3e56e9['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x1b3fad{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(_0xdc87f){super(_0xdc87f),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x43eb56())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x42a45f(),this['_refreshPositioningDebounced']=_0x54f3ec(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x71b4d6(this['context']['locale']),this['balloonPanelView']=new _0x8d9521(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0xd21f14){this['annotations']=_0xd21f14;const _0x163da7=this['context']['plugins']['get'](ki),_0x104a60=this['balloonPanelView'];if(_0x163da7['_annotations']=_0xd21f14,this['isAttached'])throw new _0x546dad('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x163da7,'set:container',()=>{this['detach'](),this['listenTo'](_0x163da7,'change:container',_0x4c9242=>{_0x4c9242['off'](),this['attach'](_0xd21f14);});}),_0x163da7['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x39f0fa=_0x4277c7=>{const _0x4d73b8=new Ri(this['context']['locale']);_0x163da7['addAnnotation'](_0x4277c7,_0x4d73b8),this['_annotationToNarrowView']['set'](_0x4277c7,_0x4d73b8),_0x4d73b8['bind']('isDirty','annotationType','number')['to'](_0x4277c7['view'],'isDirty','type','length'),_0x4d73b8['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x104a60['content']['first']!==_0x4277c7['view']?(this['_showBalloon'](_0x4277c7),_0x4277c7['view']['element']['focus'](),this['setActiveAnnotation'](_0x4277c7)):this['setActiveAnnotation'](null);});};for(const _0x32f2a5 of _0xd21f14)_0x39f0fa(_0x32f2a5);this['listenTo'](_0xd21f14,'add',(_0x201363,_0x330075)=>{_0x39f0fa(_0x330075);}),this['listenTo'](_0xd21f14,'remove',(_0x5bacee,_0x47200f,_0x9d7edc)=>{this['_annotationToNarrowView']['get'](_0x47200f)['destroy'](),this['_annotationToNarrowView']['delete'](_0x47200f),_0x163da7['rearrange']({'removedAnnotation':_0x47200f,'previousAnnotation':_0xd21f14['get'](_0x9d7edc-0x1),'nextAnnotation':_0xd21f14['get'](_0x9d7edc+0x1)}),_0x47200f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xd21f14,'focus',(_0x1688e6,_0x75fa04)=>{this['setActiveAnnotation'](_0x75fa04);}),this['listenTo'](_0xd21f14,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x62d715,_0x1ddffa)=>{_0x1ddffa['keyCode']===_0xa8ac5f['esc']&&_0x104a60['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x104a60['content']['first']),this['_hideBalloon'](),_0x1ddffa['stopPropagation'](),_0x1ddffa['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5bf302,_0x5c71bf)=>{const _0x13c7c0=_0x5c71bf['target'];_0x104a60['isVisible']&&_0x104a60['element']['contains'](_0x13c7c0)||_0x163da7['view']['element']['contains'](_0x13c7c0)||_0x5bf302['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x2dd4d7=>_0x2dd4d7['contains'](_0x13c7c0))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5f1061=this['context']instanceof _0x3654e9?this['context']['editors']:new _0x42a45f([this['context']]);for(const _0x3d97b of _0x5f1061)this['_integrateWithEditorAnnotations'](_0x3d97b);this['listenTo'](_0x5f1061,'add',(_0x21c508,_0x2980e8)=>{this['listenTo'](_0x2980e8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2980e8);});}),this['listenTo'](_0x5f1061,'remove',(_0x348955,_0x466e58)=>{_0x466e58['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x466e58['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x5b3ab6){if(_0x5b3ab6===this['activeAnnotation'])return;const _0xce8f0=this['context']['plugins']['get'](ki);_0xce8f0['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5b3ab6,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5b3ab6&&_0xce8f0['getSidebarItemView'](_0x5b3ab6)?this['_showBalloon'](_0x5b3ab6):this['_hideBalloon'](),this['activeAnnotation']=_0x5b3ab6;}detach(){if(!this['isAttached'])throw new _0x546dad('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x32ad4b=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x394cfc=>_0x394cfc['destroy']()),this['_annotationToNarrowView']['clear'](),_0x32ad4b['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3654e9&&this['stopListening'](this['context']['editors']);for(const _0x36e33d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x36e33d);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(_0x41bed9){if(!_0x41bed9['plugins']['has']('EditorAnnotations'))return;const _0x245eed=_0x41bed9['plugins']['get']('EditorAnnotations'),_0x4a5be5=this['context']['plugins']['get'](ki),_0x12477c=this['annotations'],_0x320a3e=this['balloonPanelView'],_0x4a6c44=()=>{const _0x52012f=_0x245eed['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x52012f),this['setActiveAnnotation'](_0x52012f[0x0]||null);};this['listenTo'](_0x245eed,'refresh',_0x4a6c44),this['listenTo'](_0x245eed,'blur',(_0x1ad3d2,{isAnnotationTracked:_0x2fc1e})=>{this['activeAnnotation']&&_0x2fc1e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x245eed,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x12477c,'blur',_0x137f62=>{_0x245eed['hasDomSelection']()&&_0x137f62['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x16aee4,_0x55400a)=>{const _0x3f9d5b=_0x55400a['target'];_0x320a3e['isVisible']&&_0x320a3e['element']['contains'](_0x3f9d5b)||_0x4a5be5['view']['element']['contains'](_0x3f9d5b)||this['activeAnnotation']&&_0x245eed['hasDomSelection']()&&(_0x4a6c44(),_0x16aee4['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x245eed);}_destroyEditorAnnotationsIntegration(_0x84644a){_0x84644a&&(this['stopListening'](_0x84644a),this['_editorAnnotations']['remove'](_0x84644a));}_setSelectedAnnotations(_0x4f8002){for(const _0x10c95a of this['_selectedAnnotations'])_0x4f8002['includes'](_0x10c95a)||this['_manuallyClosedAnnotationViews']['delete'](_0x10c95a['view']);this['_selectedAnnotations']=_0x4f8002;}_refreshPositioning(){const _0x291d10=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x291d10['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4807c0){if(this['_manuallyClosedAnnotationViews']['has'](_0x4807c0['view']))return;const _0x267a52=this['balloonPanelView']['content']['first'];_0x267a52!==_0x4807c0['view']?(_0x267a52&&this['_detachListeners'](_0x267a52),this['_attachListeners'](_0x4807c0['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4807c0['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x1feb5=this['balloonPanelView']['content']['first'],_0x45bb11=_0x1feb5&&this['annotations']['getByView'](_0x1feb5);if(!_0x45bb11||!this['_annotationToNarrowView']['has'](_0x45bb11))return;const _0x278fe4=this['_annotationToNarrowView']['get'](_0x45bb11)['element'],_0x3d8c2b=(function(){const _0x58133c=_0x8d9521['defaultPositions'];return[_0x58133c['southArrowNorthEast'],_0x58133c['northArrowSouthEast'],_0x58133c['southArrowNorth'],_0x58133c['northArrowSouth'],_0x58133c['southArrowNorthWest'],_0x58133c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x278fe4,'positions':_0x3d8c2b});}['_hideBalloon'](){const _0x364ee9=this['balloonPanelView'],_0x4fc824=_0x364ee9['content']['first'];_0x4fc824&&(this['_detachListeners'](_0x4fc824),_0x364ee9['unpin'](),_0x364ee9['content']['clear']());}_attachListeners(_0x2307b2){this['listenTo'](_0x2307b2,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2307b2,'Esc',(_0x4bed05,_0x104048)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2307b2),this['_hideBalloon'](),_0x104048();});}_detachListeners(_0x49808b){this['stopListening'](_0x49808b);}},xi=class extends _0x2231bd{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x3ed974,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2db289){super(_0x2db289),_0x2db289['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2db289['plugins']['get'](_0x3ed974),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x54f3ec(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x5bc807=this['editor']['plugins']['get'](Ti);_0x5bc807['context']===this['editor']&&(_0x5bc807['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4a363d,_0x25fa8a)=>{const _0x20a807=this['_balloon'];if(this['isAttached']&&_0x20a807['visibleView']){const _0x4b7a56=this['annotations']['getByView'](_0x20a807['visibleView']);_0x4b7a56&&this['_closeAnnotation'](_0x4b7a56),_0x25fa8a();}}));}afterInit(){const _0x5158b6=this['editor']['plugins']['get'](Ti);_0x5158b6['context']===this['editor']&&(_0x5158b6['hasActive']()||_0x5158b6['switchTo']('inline'));}setActiveAnnotation(_0x2ee224){_0x2ee224!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2ee224&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2ee224)&&this['_addAnnotationToBalloon'](_0x2ee224,!0x0),_0x2ee224['isActive']=!0x0),_0x2ee224||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2ee224);}attach(_0x2e95de){this['annotations']=_0x2e95de;const _0x3cacae=this['editor']['plugins']['get'](Ti),_0x528020=this['_balloon'];if(this['isAttached'])throw new _0x546dad('inlineannotations-attach-already-attached',this);if(_0x3cacae['context']!==this['editor'])throw new _0x546dad('inlineannotations-not-allowed-with-context',this);const _0x49b595=this['editor']['plugins']['get'](di);this['listenTo'](_0x49b595,'refresh',()=>{const _0x2714f9=_0x49b595['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x9f91ed,_0x16ca92;!this['_forceRefresh']&&(_0x9f91ed=_0x2714f9,_0x16ca92=this['_selectedAnnotations'],_0x9f91ed['length']===_0x16ca92['length']&&_0x9f91ed['every'](_0x5a9443=>_0x16ca92['includes'](_0x5a9443)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2714f9),this['setActiveAnnotation'](_0x2714f9[0x0]||null));}),this['listenTo'](_0x49b595,'blur',(_0x36dc6a,{isAnnotationTracked:_0x23a6a4})=>{this['activeAnnotation']&&_0x23a6a4(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x49b595,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x42f255,_0x11b177,_0x14bace)=>{_0x14bace||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2e95de,'remove',(_0xf481cc,_0x39d51a)=>{this['_removeAnnotationFromBalloon'](_0x39d51a),_0x39d51a===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x528020,'change:visibleView',(_0x5fd563,_0x39a62e,_0x464c3a,_0x4c6ac5)=>{_0x4c6ac5&&this['stopListening'](_0x4c6ac5);const _0x434306=_0x2e95de['getByView'](_0x464c3a);_0x464c3a&&_0x434306&&(this['listenTo'](_0x464c3a,'change:height',()=>{_0x528020['updatePosition']();}),this['listenTo'](_0x464c3a,'Esc',()=>{this['_closeAnnotation'](_0x434306),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x434306&&this['setActiveAnnotation'](_0x434306));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x528020['visibleView']&&_0x2e95de['getByView'](_0x528020['visibleView'])&&_0x528020['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 _0x546dad('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x13595c of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x13595c);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x549f8d){for(const _0x12d92d of this['_selectedAnnotations'])_0x549f8d['includes'](_0x12d92d)||this['_manuallyClosed']['delete'](_0x12d92d);for(const _0x23b29d of this['annotations'])_0x549f8d['includes'](_0x23b29d)||this['_removeAnnotationFromBalloon'](_0x23b29d);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x29d7f7 of _0x549f8d)this['_addAnnotationToBalloon'](_0x29d7f7);}this['_selectedAnnotations']=_0x549f8d;}_addAnnotationToBalloon(_0x472558,_0x2867a9=!0x1){this['_manuallyClosed']['has'](_0x472558)||(this['_addedAnnotations']['has'](_0x472558)||this['_balloon']['hasView'](_0x472558['view'])||(this['_addedAnnotations']['add'](_0x472558),this['_balloon']['add']({'stackId':_0x472558['view']['id'],'view':_0x472558['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x472558)}})),_0x2867a9&&this['_balloon']['showStack'](_0x472558['view']['id']));}_getBalloonTargetForAnnotation(_0x681e7d){const _0x44856e=_0x681e7d['target'],_0x5b02f2=this['editor']['editing']['view'],_0x12012a=_0x5b02f2['document']['selection']['getFirstRange'](),_0x3811f6=_0x5b02f2['domConverter']['viewRangeToDom'](_0x12012a);if(_0x3811f6['collapse'](!0x0),_0x44856e){if(_0x44856e instanceof _0x3b4d13)return _0x44856e;let _0x3a690f=[];for(const _0x48b8c2 of _0x44856e)_0x3a690f['push'](..._0x3b4d13['getDomElementRects'](_0x48b8c2));_0x3a690f=function(_0x135b02){const _0x16bf2a=[];let _0x5cd0d9=_0x135b02[0x0];for(let _0xfba693=0x1;_0xfba693<_0x135b02['length'];_0xfba693++)if(Pi(_0x5cd0d9,_0x135b02[_0xfba693])){const _0x566c74=_0x135b02[_0xfba693]['width'];_0x5cd0d9['width']+=_0x566c74,_0x5cd0d9['right']+=_0x566c74;}else _0x16bf2a['push'](_0x5cd0d9),_0x5cd0d9=_0x135b02[_0xfba693];return _0x16bf2a['push'](_0x5cd0d9),_0x16bf2a;}(_0x3a690f);const _0x5a9dce=_0x3811f6['getBoundingClientRect']();return _0x3a690f['find'](_0x20e821=>_0x20e821['top']<=_0x5a9dce['top']&&_0x20e821['bottom']>=_0x5a9dce['bottom']&&_0x20e821['left']<=_0x5a9dce['left']&&_0x20e821['right']>=_0x5a9dce['right'])||_0x3a690f[0x0];}return _0x681e7d['targetRect']||_0x3811f6;}_removeAnnotationFromBalloon(_0x34d926){this['_addedAnnotations']['has'](_0x34d926)&&this['_balloon']['hasView'](_0x34d926['view'])&&(this['_addedAnnotations']['delete'](_0x34d926),this['_balloon']['remove'](_0x34d926['view']));}_closeAnnotation(_0x4fa98e){this['_manuallyClosed']['add'](_0x4fa98e),this['_removeAnnotationFromBalloon'](_0x4fa98e);}};function Pi(_0x51ec3f,_0x2b59fe){return _0x51ec3f['top']===_0x2b59fe['top']&&_0x51ec3f['bottom']===_0x2b59fe['bottom']&&_0x51ec3f['right']===_0x2b59fe['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x1018f5,_0x1c2e33){super(_0x1018f5),this['set']('isEmpty',!_0x1c2e33['length']),this['focusTracker']=new _0x2d4278(),this['_annotationViews']=_0x1c2e33,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x1c2e33,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1c2e33,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1c2e33,'remove',(_0x425be1,_0x18ca73)=>{_0x18ca73['isActive']&&this['focus'](),_0x1c2e33['length']||(this['isEmpty']=!0x0);});const _0x2e123e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x1018f5,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1c2e33},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2e123e['if']('isEmpty','ck-hidden',_0x3c277c=>!_0x3c277c)]},'children':[{'text':Et(_0x1018f5,'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 _0x2abede of this['_annotationViews'])this['focusTracker']['add'](_0x2abede['element']);this['_annotationViews']['on']('change',(_0x668186,{added:_0x255f63,removed:_0x3629da})=>{for(const _0x25aa14 of _0x255f63)this['focusTracker']['add'](_0x25aa14['element']);for(const _0x68aebb of _0x3629da)this['focusTracker']['remove'](_0x68aebb['element']);});}},Di=class extends _0x1b3fad{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x480950){super(_0x480950),this['archivedThreads']=new _0x42a45f();}init(){const _0x1cfa30=this['context'],_0x2602b7=_0x1cfa30['plugins']['get'](oi),_0x30742c=_0x1cfa30['plugins']['get'](ti);this['listenTo'](_0x2602b7,'addCommentThread',(_0x1e59e3,{threadId:_0x21d1ec})=>{const _0x590211=_0x2602b7['getCommentThread'](_0x21d1ec);_0x590211['archivedAt']&&this['archivedThreads']['add'](_0x590211,this['_calculatePosition'](_0x590211['archivedAt'])),this['listenTo'](_0x590211,'change:archivedAt',(_0x3e5545,_0x43a977,_0x566411)=>{_0x566411?this['archivedThreads']['has'](_0x590211)||this['archivedThreads']['add'](_0x590211,this['_calculatePosition'](_0x590211['archivedAt'])):this['archivedThreads']['has'](_0x590211)&&this['archivedThreads']['remove'](_0x590211);});}),this['listenTo'](_0x2602b7,'removeCommentThread',(_0x47ba2e,{threadId:_0x5e870f})=>{const _0x5926a9=_0x2602b7['getCommentThread'](_0x5e870f);this['stopListening'](_0x5926a9),this['archivedThreads']['has'](_0x5926a9)&&this['archivedThreads']['remove'](_0x5926a9);},{'priority':'highest'}),this['listenTo'](_0x30742c['collection'],'focus',(_0x5b045f,_0x62511c)=>{_0x62511c['isVisible']||(_0x62511c['isActive']=!0x0,_0x30742c['activate'](_0x62511c));});}_calculatePosition(_0x2be593){const _0x4b1d2f=[...this['archivedThreads']]['findIndex'](_0x128176=>_0x128176['archivedAt']<_0x2be593);return _0x4b1d2f>-0x1?_0x4b1d2f:this['archivedThreads']['length'];}},Vi=class extends _0x2231bd{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x2981c2];}constructor(_0x5eae54){super(_0x5eae54),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x3b76c8=this['editor'],_0x5d3dd5=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3b76c8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x393932,!0x0)),_0x3b76c8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xbf50de=this['_createCommentsArchiveButton'](rt);return _0xbf50de['set']({'role':'menuitemcheckbox'}),_0xbf50de;});const _0x4758b8=_0x3b76c8['plugins']['get'](Di),_0x2261a1=_0x3b76c8['plugins']['get']('Annotations'),_0x5b4fbe=_0x3b76c8['plugins']['get']('CommentsRepository');_0x4758b8['archivedThreads']['forEach'](_0x2d0f7e=>{this['_handleNewThread'](_0x2d0f7e);}),this['listenTo'](_0x4758b8['archivedThreads'],'add',(_0x4f3b05,_0x1437d3)=>{this['_handleNewThread'](_0x1437d3);}),this['listenTo'](_0x2261a1['collection'],'add',(_0x4dbc72,_0x284999)=>{const _0x433d8c=this['_pendingThreads']['find'](_0x1c7776=>{const _0x4a028d=_0x5b4fbe['_threadToController']['get'](_0x1c7776);return _0x4a028d&&_0x284999['innerView']===_0x4a028d['view'];});if(_0x433d8c){const _0x3fbac7=this['_calculatePosition'](_0x433d8c['archivedAt']);this['_addAnnotationToArchive'](_0x284999,_0x3fbac7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x433d8c),0x1);}}),this['listenTo'](_0x4758b8['archivedThreads'],'remove',(_0x1b75c9,_0x2ea2ba)=>{const _0x120431=_0x3b76c8['config']['get']('collaboration.channelId');if(!_0x120431||_0x2ea2ba['channelId']===_0x120431){if(this['_pendingThreads']['includes'](_0x2ea2ba))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2ea2ba),0x1);else{const _0x35a0d3=_0x5b4fbe['_threadToController']['get'](_0x2ea2ba),_0x417cd3=_0x2261a1['getByInnerView'](_0x35a0d3['view']);this['annotationViews']['remove'](_0x417cd3['view']),this['stopListening'](_0x417cd3),this['stopListening'](_0x417cd3['focusableElements']);}}}),this['listenTo'](_0x2261a1['collection'],'add',(_0x3fa165,_0xa54210)=>{this['listenTo'](_0xa54210,'escape',_0x5d3dd5);}),this['listenTo'](_0x2261a1['collection'],'remove',(_0x1721e9,_0x4d7d90)=>{this['stopListening'](_0x4d7d90,'escape',_0x5d3dd5);});}_addAnnotationToArchive(_0x233028,_0x308b18){this['listenTo'](_0x233028,'set:isVisible',_0x471caa=>{_0x471caa['return']=!0x1,_0x471caa['stop']();}),this['annotationViews']['add'](_0x233028['view'],_0x308b18);}['_handleNewThread'](_0x83724){const _0x13ae08=this['editor']['plugins']['get']('CommentsRepository'),_0x165a09=this['editor']['plugins']['get']('Annotations'),_0x55eff6=this['editor']['config']['get']('collaboration.channelId');if(!_0x55eff6||_0x83724['channelId']===_0x55eff6){const _0x34a194=_0x13ae08['_threadToController']['get'](_0x83724);if(!_0x34a194)return void this['_pendingThreads']['push'](_0x83724);const _0x35e6fd=this['_calculatePosition'](_0x83724['archivedAt']),_0x576309=_0x165a09['getByInnerView'](_0x34a194['view']);_0x576309['isVisible']&&_0x165a09['_visibleAnnotations']['remove'](_0x576309),this['_addAnnotationToArchive'](_0x576309,_0x35e6fd);}}_calculatePosition(_0x7ca35b){const _0x1feb20=this['editor']['config']['get']('collaboration.channelId'),_0x43c0f3=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x56f247=>_0x56f247['channelId']===_0x1feb20)['findIndex'](_0x38772f=>_0x38772f['archivedAt']<_0x7ca35b);return _0x43c0f3<0x0||_0x43c0f3>this['annotationViews']['length']?this['annotationViews']['length']:_0x43c0f3-0x1;}_toggleDialog(){const _0x4107ea=this['editor'],_0x6deef8=_0x4107ea['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x4107ea['locale'],this['annotationViews'])),'commentsArchive'===_0x6deef8['id']?_0x6deef8['hide']():_0x6deef8['show']({'id':'commentsArchive','title':Et(_0x4107ea['locale'],'COMMENTS_ARCHIVE'),'icon':_0x18d0b4,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x141cf9['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x22960a,_0x184123=!0x1){const _0x19ca17=this['editor']['locale'],_0x54889b=this['editor']['plugins']['get']('Dialog'),_0x508d68=new _0x22960a(_0x19ca17);return _0x508d68['bind']('isEnabled')['to'](this,'isEnabled'),_0x508d68['bind']('isOn')['to'](_0x54889b,'id',_0x37bdba=>'commentsArchive'===_0x37bdba),_0x508d68['set']({'label':Et(_0x19ca17,'COMMENTS_ARCHIVE'),'icon':_0x18d0b4,'isToggleable':!0x0}),_0x184123&&(_0x508d68['tooltip']=!0x0),this['listenTo'](_0x508d68,'execute',()=>this['_toggleDialog']()),_0x508d68;}_hideDialogOnAnnotationEscape=_0xf21076=>{const _0x239368=_0xf21076['source'];if(!this['annotationViews']['has'](_0x239368['view']))return;const _0x392922=this['editor']['plugins']['get']('Dialog');_0x392922['isOpen']&&'commentsArchive'===_0x392922['id']&&(_0x392922['hide'](),_0xf21076['stop']());};},Bi=class extends _0x2231bd{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 _0x519f30,Context as _0x33c2fe,ContextPlugin as _0x4d5bc5,Editor as _0x590c45,PendingActions as _0x2b1497,Plugin as _0x21dd8e}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x148717,Collection as _0x2e431b,DomEmitterMixin as _0x37c7f0,FocusTracker as _0x2676e3,KeystrokeHandler as _0x587e5b,ObservableMixin as _0xe1674,Rect as _0x31427d,diff as _0x36b10e,first as _0x485a56,getEnvKeystrokeText as _0x5d1020,keyCodes as _0x29597a,priorities as _0x157d8,scrollViewportToShowTarget as _0x2a46da,toUnit as _0x1e6dbe,uid as _0x42d9ac}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x46658e,ConfirmMixin as _0x572b88,FOCUS_ANNOTATION_KEYSTROKE as _0x5eee32,LateFocusButtonView as _0x497673,LateFocusDropdownButtonView as _0xfe6283,UserView as _0x42c9cf,Users as _0x113f8b,getAllMarkersDomElementsSorted as _0x453301,getDateTimeFormatter as _0x9621f0,hashObject as _0x457e9f,setupThreadKeyboardNavigation as _0x2d4008,surroundingMarkersDetector as _0x5003b4,trimHtml as _0x3cf105}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x47f312,debounce as _0x3b47aa,isEqual as _0x2c9c82,set as _0xf15146,throttle as _0x3312da,unset as _0x30b384}from'es-toolkit/compat';import{IconAddComment as _0x3c4fba,IconCheck as _0x4b66b6,IconCommentsArchive as _0x1e97a5,IconPencil as _0x3ca589,IconRemoveComment as _0x455752,IconThreeVerticalDots as _0x36cea9,IconUndo as _0x4ce34a}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0xbad81b,BodyCollection as _0x2a095d,ButtonView as _0x4c08d5,ContextualBalloon as _0x15ba93,Dialog as _0xbb359a,DialogViewPosition as _0x162c63,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
+ _0xe1674();var bt=class extends It{['model'];['view'];constructor(_0x389252,_0x18a66b){super(),this['model']=_0x389252,this['model']['_isAttached']=!0x0,this['view']=_0x18a66b,this['listenTo'](_0x18a66b,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x18a66b,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x18a66b,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x18a66b,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x18a66b,'addComment',(_0x553d43,_0x45efa2)=>this['addComment'](_0x45efa2)),this['listenTo'](_0x18a66b,'updateComment',(_0x46c5f4,_0x5db62b,_0x549b4f)=>this['updateComment'](_0x5db62b,_0x549b4f)),this['listenTo'](_0x18a66b,'removeComment',(_0x3df95e,_0x5d3ffe)=>this['removeComment'](_0x5d3ffe));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x2029f5){this['model']['addComment']({'content':_0x2029f5,'authorId':this['view']['_localUser']['id']});}updateComment(_0x33c467,_0x12f154){this['model']['getComment'](_0x33c467)['update']({'content':_0x12f154});}removeComment(_0x2db82f){this['model']['getComment'](_0x2db82f)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x3d3699,_0x39f893,_0x166745){const t=_0x3d3699['t'];switch(_0x39f893){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'},_0x166745);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'},_0x166745);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'},_0x166745);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'},_0x166745);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x166745);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'},_0x166745);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'},_0x166745);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'},_0x166745);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(_0x575455,_0x2a7d6e){super(_0x575455);const _0x189f0d=_0x42d9ac();this['main']=this['createCollection'](),this['editable']=new st(_0x575455,_0x2a7d6e,void 0x0,{'label':()=>Et(_0x575455,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x575455['uiLanguageDirection'],'lang':_0x575455['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x189f0d},'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(_0x5f2bfb){super(_0x5f2bfb),this['view']=new kt(_0x5f2bfb['locale'],_0x5f2bfb['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x530962=this['editor']['editing']['view'],_0x232fbd=this['view']['editable'];_0x232fbd['name']=_0x530962['document']['getRoot']()['rootName'],this['view']['render']();const _0x2f16fc=_0x232fbd['element'];this['setEditableElement'](_0x232fbd['name'],_0x2f16fc),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x530962['attachDomRoot'](_0x2f16fc),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0xe1674(_0x590c45);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x8ff4bf={}){(_0x8ff4bf=Object['assign']({},_0x8ff4bf))['plugins']||(_0x8ff4bf['plugins']=CommentEditor['defaultPlugins']),super(_0x8ff4bf),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 _0x13ab61=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x13ab61))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xdfad40=>{const _0x49f8cd=this['model']['document']['getRoot'](),_0x18bb49=_0x49f8cd&&_0x49f8cd['getChild'](_0x49f8cd['childCount']-0x1);_0xdfad40['setSelection'](_0x18bb49,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x2f84bb=this['editing']['view'],_0x177d14=_0x2f84bb['document']['getRoot'](),_0x4005e8=_0x177d14['getChild'](0x0);_0x177d14['childCount']>0x1||!_0x4005e8||'p'!=_0x4005e8['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x2f84bb,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4005e8['placeholder']=this['placeholder']),ut({'view':_0x2f84bb,'element':_0x4005e8,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4005e8);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x402c6c,_0x47a779={}){super(_0x402c6c),this['editor']=null,this['_editorConfig']=_0x47a779,this['set']('value',_0x47a779['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x402c6c,'Reply...')),this['set']('submitLabel',Et(_0x402c6c,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x587e5b(),this['focusTracker']=new _0x2676e3(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3229f3=>!_0x3229f3['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',(_0x83522f,_0x431298)=>{this['cancelButtonView']['fire']('execute'),_0x431298();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5231d8,_0x306790)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x306790());}),this['on']('submit',(_0x31f70e,_0x104d5b)=>{_0x104d5b['length']>0xfde8?(alert(Et(_0x402c6c,'TOO_LONG_COMMENT_ALERT',[_0x104d5b['length'],0xfde8])),_0x31f70e['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 _0x4e3785=this['editor'];this['element']['insertBefore'](_0x4e3785['ui']['element'],this['element']['firstChild']),_0x4e3785['model']['document']['on']('change',()=>this['value']=_0x4e3785['getData']()),_0x4e3785['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4e3785['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4024d5){-0x1===_0x4024d5?(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:_0x16427f}=this,_0xc252a8=new _0x4c08d5(_0x16427f);return _0xc252a8['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xc252a8['withText']=!0x0,_0xc252a8['bind']('label')['to'](this,'submitLabel'),_0xc252a8['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xc252a8['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4fa617,_0x36e0f1)=>!_0x36e0f1&&!!_0x4fa617['trim']()),_0xc252a8;}_createCancelButton(){const {locale:_0x574d0c}=this,_0x78890b=new _0x4c08d5(_0x574d0c);return _0x78890b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x78890b['label']=Et(_0x574d0c,'Cancel'),_0x78890b['withText']=!0x0,_0x78890b['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x78890b;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x7d425f=>{this['focusTracker']['add'](_0x7d425f['element']);}),this['focusables']['on']('change',(_0x51bed6,_0x201d57)=>{for(const _0xaf016d of Array['from'](_0x201d57['added'])['reverse']())this['focusTracker']['add'](_0xaf016d['element']);});}},xt=class extends ht{constructor(_0x518081,_0x3d45e9,_0x527ae2){super(_0x518081),this['commentInputView']=new St(_0x518081,_0x527ae2),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x534910,_0x374ee0)=>_0x534910||!!_0x374ee0),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 _0x42c9cf(_0x518081,_0x3d45e9),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'](_0x3de90b){this['commentInputView']['focus'](_0x3de90b);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x1e836d,_0x12c11f)=>{const {submitButtonView:_0xb2247,cancelButtonView:_0x45937b,editor:_0x37c947}=this['commentInputView'];[_0xb2247['element'],_0x45937b['element'],_0x37c947?_0x37c947['editing']['view']['getDomRoot']():null]['filter'](_0x48094e=>_0x48094e)['some'](_0x4f8fb2=>_0x4f8fb2['contains'](_0x12c11f['target']))||(this['focus'](),_0x12c11f['preventDefault']());});}},Pt=class extends ht{constructor(_0x2ad91a){super(_0x2ad91a);const _0x5f456c=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5f456c['to']('count',_0x52a2ed=>Et(_0x2ad91a,'NUMBER_OF_COMMENTS',_0x52a2ed))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x1e7c08,_0x5a496c,_0x7f8162){super(_0x1e7c08);const _0x3b4dd3=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5a496c['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5a496c,this['_config']=_0x7f8162,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2676e3(),this['keystrokes']=new _0x587e5b(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd5fded=>this['commentViews']['map'](_0x413f73=>_0x413f73['element'])['includes'](_0xd5fded['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x1e7c08),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x590c15=>_0x590c15-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4a4dca of _0x5a496c['comments'])this['_handleNewCommentModel'](_0x4a4dca);this['_handleInfoComment'](),this['listenTo'](_0x5a496c['comments'],'add',(_0x499b1,_0x472f82)=>{const _0x515163=this['_calculatePosition'](_0x472f82);this['length']++,this['_handleNewCommentModel'](_0x472f82,_0x515163),this['refreshVisibleViews']();}),this['listenTo'](_0x5a496c['comments'],'remove',(_0x27be6b,_0x235e56)=>{this['length']--,this['_handleRemoveCommentModel'](_0x235e56),this['refreshVisibleViews']();}),this['listenTo'](_0x5a496c,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5a496c,'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',_0x3b4dd3['if']('length','ck-hidden',_0x2dde1c=>!_0x2dde1c)],'aria-label':Et(_0x1e7c08,'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'](_0x4bc644){-0x1===_0x4bc644?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x46a48c of this['commentViews'])_0x46a48c['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x24978c,_0x3accf3){const _0x12a272=new this['_config']['CommentView'](this['locale'],_0x24978c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x12a272['viewUid']=_0x24978c['id'],_0x12a272['delegate']('removeComment')['to'](this),_0x12a272['delegate']('updateComment')['to'](this),_0x12a272['delegate']('resolveCommentThread')['to'](this),_0x12a272['delegate']('editorReady')['to'](this),_0x12a272['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x12a272,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x12a272,_0x3accf3);}_calculatePosition(_0x268963){const _0x25d61f=this['_model']['_findOptimalIndex'](_0x268963);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x268963['authoredAt']?_0x25d61f-0x1:_0x25d61f:_0x25d61f-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x52ca97={'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'],_0x52ca97,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x52ca97));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x31bd4c){const _0x6853ba=this['commentViews']['remove'](_0x31bd4c['id']);this['stopListening'](_0x6853ba),_0x6853ba['isEditMode']&&this['_updateHasDirtyComment'](),_0x6853ba['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x240629=>_0x240629['isEditMode']);}['_rearrangeCollapse'](){const _0x2f49db=function(_0x553da8){const _0x10fcda=new _0x2e431b();for(const _0x3b9d34 of _0x553da8)_0x10fcda['add'](_0x3b9d34);return _0x10fcda;}(this['commentViews']),_0x395fe2=this['_collapsedCommentsView']['count'];for(let _0x19ec11=0x1;_0x19ec11<=_0x395fe2;_0x19ec11++)_0x2f49db['remove'](0x1);for(const _0x56385d of _0x2f49db)_0x56385d['collapse']();_0x395fe2>0x0&&_0x2f49db['add'](this['_collapsedCommentsView'],0x1),Dt(_0x36b10e(Array['from'](this['visibleViews']),Array['from'](_0x2f49db)),this['visibleViews'],_0x2f49db);}['_rearrangeExpand'](){Dt(_0x36b10e(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xc4a2b8 of this['visibleViews'])_0xc4a2b8['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x1038a4=>{this['focusTracker']['add'](_0x1038a4['element']),this['keystrokes']['listenTo'](_0x1038a4['element']);}),this['commentViews']['on']('change',(_0x5a0f2b,_0x2ddaa6)=>{for(const _0x26efcb of _0x2ddaa6['removed'])this['focusTracker']['remove'](_0x26efcb['element']),this['keystrokes']['stopListening'](_0x26efcb['element']);for(const _0x30752b of Array['from'](_0x2ddaa6['added'])['reverse']())this['focusTracker']['add'](_0x30752b['element']),this['keystrokes']['listenTo'](_0x30752b['element']);});}};function Dt(_0x165ab0,_0x17507b,_0x9d205b){let _0x4c5286=0x0;for(const _0xfbc7ee of _0x165ab0)switch(_0xfbc7ee){case'insert':_0x17507b['add'](_0x9d205b['get'](_0x4c5286),_0x4c5286),_0x4c5286++;break;case'delete':_0x17507b['remove'](_0x4c5286);break;case'equal':_0x4c5286++;}}var Vt=class extends ht{constructor(_0xb1140){super(_0xb1140);const _0x23bedf=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x23bedf['to']('contextValue',_0x5676c6=>Et(_0xb1140,'THREAD_CONTEXT_LABEL',_0x5676c6)),'tabindex':-0x1},'children':[{'text':_0x23bedf['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x3ad72d,_0x308f86){super(_0x3ad72d);const _0x3d0ba4=this['bindTemplate'];this['_model']=_0x308f86,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2676e3(),this['keystrokes']=new _0x587e5b(),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',_0x5ba77c=>!!_0x5ba77c),this['bind']('contextValue')['to'](this['_model'],'context',_0x3e0f19=>_0x3e0f19&&_0x3e0f19['value']?this['_trimContextValue'](_0x3e0f19['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',_0x3d0ba4['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 _0x5f1f5f=new _0x4c08d5(this['locale']);return _0x5f1f5f['label']=Et(this['locale'],'Reopen'),_0x5f1f5f['tooltip']=Et(this['locale'],'Reopen'),_0x5f1f5f['icon']=_0x4ce34a,_0x5f1f5f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1f0d3d=>!_0x1f0d3d),_0x5f1f5f['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x112703,_0xdd6e28)=>_0x112703&&_0xdd6e28),_0x5f1f5f['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5f1f5f;}_trimContextValue(_0x421d0b){if(_0x421d0b['length']<0x96)return _0x421d0b;const _0x45bb73=_0x421d0b['lastIndexOf']('\x20',0x93);return _0x421d0b['substring'](0x0,_0x45bb73>-0x1?_0x45bb73:0x93)+'...';}_attachContextActions(){const _0x3ab4bd=this['element']['querySelector']('.ck-context'),_0x28287a=_0x3ab4bd['querySelector']('.ck-context__value');this['listenTo'](_0x3ab4bd,'mouseenter',()=>{_0x28287a['offsetWidth']<_0x28287a['scrollWidth']&&_0x3ab4bd['classList']['add']('overlay');}),this['listenTo'](_0x3ab4bd,'mouseleave',()=>{_0x3ab4bd['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x6de13e of this['focusables'])this['focusTracker']['add'](_0x6de13e['element']),this['keystrokes']['listenTo'](_0x6de13e['element']);}_createContextView(){const _0x2c8cbd=new Vt(this['locale']);return _0x2c8cbd['bind']('contextValue')['to'](this),_0x2c8cbd;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x39881c,_0xb51644,_0x5bb028,_0x252888){super(_0x39881c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xb51644,this['_localUser']=_0x5bb028,this['_config']=_0x252888,this['commentThreadHeaderView']=new Bt(_0x39881c,_0xb51644),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x46658e(_0x39881c,Et(_0x39881c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x39881c,_0xb51644,Object['assign']({'CommentView':this['_config']['CommentView']},_0x252888)),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',(_0x520f97,_0x370057)=>_0x520f97||!!_0x370057),this['bind']('isUnlinked')['to'](_0xb51644,'unlinkedAt',_0x445876=>!!_0x445876);let _0x20c263=null;const _0x5e9923=()=>{const _0x265c6d=this['_model']['comments']['first']||null;_0x265c6d!==_0x20c263&&(_0x20c263&&this['stopListening'](_0x20c263,'change:content'),_0x20c263=_0x265c6d,_0x265c6d&&this['listenTo'](_0x265c6d,'change:content',_0x5e9923));const _0x31f928=_0x265c6d?_0x265c6d['author']['name']:this['_localUser']['name'],_0x4690a1=_0x265c6d?new DOMParser()['parseFromString'](_0x3cf105(_0x265c6d['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x229d6a=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x31f928]);this['set']('ariaLabel',_0x4690a1?_0x229d6a+'\x20'+_0x4690a1:_0x229d6a);};this['listenTo'](this['_model']['comments'],'change',_0x5e9923),_0x5e9923(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2676e3(),this['keystrokes']=new _0x587e5b(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x45fd54=>_0x45fd54['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2d4008(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x3fd57a=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x187930=_0x3fd57a['commentInputView'];return _0x3fd57a['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x187930,'value',(_0x3770e3,_0x2d9693,_0x61a927,_0x5bce99,_0x56a4c6)=>!!_0x56a4c6||!!_0x5bce99&&_0x61a927&&!_0x2d9693||_0x3770e3&&_0x61a927&&!_0x2d9693),_0x187930['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x523f85,_0xaabf14,_0x31105b)=>{let _0x4c32c0;return _0x4c32c0=_0x31105b&&_0xaabf14?'Reply\x20to\x20reopen\x20discussion...':_0x523f85?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x4c32c0);}),_0x187930['bind']('submitLabel')['to'](this,'length',_0x187dc2=>Et(this['locale'],_0x187dc2?'Reply':'Comment')),_0x187930['on']('submit',(_0x28bc49,_0x578d25)=>{this['fire']('addComment',_0x578d25),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x187930['on']('cancel',()=>{this['focus']();}),_0x187930['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x187930['on']('cancel',_0xa44f1e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xa44f1e['stop']());}),this['on']('change:isActive',(_0x4f5fdc,_0x4b88f3,_0x268ab1)=>{_0x268ab1||this['length']||_0x187930['value']||this['fire']('removeCommentThread');}),_0x3fd57a;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x572b88(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x2b9880,_0x4bc109,_0x200798,_0x311c24){super(_0x2b9880,_0x4bc109,_0x200798,_0x311c24),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2b9880,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x38053c,_0x2cc1e0,_0x4e707c)=>{_0x4e707c||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x36e926,_0x2d3234,_0x19be44)=>{_0x19be44&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x5b8004=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5b8004['if']('isActive','ck-thread--active'),_0x5b8004['if']('isUnlinked','ck-thread--unlinked'),_0x5b8004['to']('actionIndicator',_0x1fd344=>_0x1fd344?'ck-thread--'+_0x1fd344:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5b8004['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 _0x7f5e8d of this['commentsListView']['commentViews'])_0x7f5e8d['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x218622}=this,_0x3041cb=this['commentsListView']['commentViews']['get'](0x0);_0x3041cb===this['_boundFirstCommentView']||_0x3041cb['isSystemComment']||(this['_boundFirstCommentView']=_0x3041cb,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3041cb,'actionIndicator',_0x4056a7=>'remove'===_0x4056a7?'remove':null),_0x3041cb['placeholder']=Et(_0x218622,'Write\x20a\x20comment...'),_0x3041cb['removeButton']['on']('execute',_0x4a97c4=>{_0x4a97c4['stop'](),this['showConfirm'](Et(_0x218622,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3041cb['focus']();}),_0x3041cb['actionBar']['add'](this['resolveButton'],0x0),_0x3041cb['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x29bd79=new _0x497673(this['locale']);return _0x29bd79['label']=Et(this['locale'],'Resolve'),_0x29bd79['tooltip']=Et(this['locale'],'Resolve'),_0x29bd79['icon']=_0x4b66b6,_0x29bd79['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x29bd79['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3d81dd=>!_0x3d81dd),_0x29bd79['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x445b81,_0x225e8b)=>_0x445b81&&!_0x225e8b),_0x29bd79['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x29bd79;}_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(_0x157cfc){super(_0x157cfc),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1ec1b8,_0x28da06,_0x4164f0)=>{this['element']['innerHTML']=_0x4164f0;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x4ad508,_0x4e8899,_0x2f6b1e){super(_0x4ad508),this['_model']=_0x4e8899,this['_config']=_0x2f6b1e,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4e8899,'content',_0x4e8899,'authoredAt',(_0x16b045,_0x2f5616)=>Et(_0x4ad508,'COMMENT_ARIA_LABEL',[_0x4e8899['author']['name'],_0x2f6b1e['formatDateTime'](_0x2f5616),new DOMParser()['parseFromString'](_0x16b045,'text/html')['body']['textContent'],_0x4e8899['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x46658e(_0x4ad508,Et(_0x4ad508,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x2676e3(),this['keystrokes']=new _0x587e5b(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x26d4cd=>_0x26d4cd['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 _0x1667b8=new Wt(this['locale']);return _0x1667b8['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xb1be78,_0xbda2aa)=>_0xbda2aa?_0x3cf105(_0xb1be78,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xb1be78),_0x1667b8;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2e989a=new St(this['locale'],this['_config']['editorConfig']);return _0x2e989a['value']=this['_model']['content'],_0x2e989a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2e989a['submitLabel']=Et(this['locale'],'Save'),_0x2e989a['on']('submit',(_0x4322bd,_0x28ae48)=>{this['fire']('updateComment',this['_model']['id'],_0x28ae48),this['switchToDisplayMode'](),this['focus']();}),_0x2e989a['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2e989a['once']('editorReady',()=>{_0x2e989a['focus']();}),_0x2e989a['createEditor'](),_0x2e989a['delegate']('editorReady')['to'](this),_0x2e989a['delegate']('editorDestroyed')['to'](this),_0x2e989a;}_setupKeyboardNavigation(){const _0x33d18f=this['element'];this['keystrokes']['listenTo'](_0x33d18f);for(const _0x4c7982 of this['focusables'])this['focusTracker']['add'](_0x4c7982['element']),this['keystrokes']['listenTo'](_0x4c7982['element']);this['focusables']['on']('change',(_0x2561e0,_0x58ee28)=>{for(const _0x16518f of _0x58ee28['removed'])this['focusTracker']['remove'](_0x16518f['element']),this['keystrokes']['stopListening'](_0x16518f['element']);for(const _0x259010 of _0x58ee28['added'])this['focusTracker']['add'](_0x259010['element']),this['keystrokes']['listenTo'](_0x259010['element']);}),this['keystrokes']['set']('enter',(_0x9211bc,_0x153afa)=>{_0x33d18f===_0x9211bc['target']&&(this['focusCycler']['focusFirst'](),_0x153afa());}),this['keystrokes']['set']('esc',(_0x57f772,_0x3bf860)=>{_0x33d18f!==_0x57f772['target']&&(this['focus'](),_0x3bf860());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x572b88(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0xae7c9d,_0x1ef1d1,_0xd63665){super(_0xae7c9d,_0x1ef1d1,_0xd63665),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0xae7c9d,'Reply...')),this['bind']('authoredAt')['to'](_0x1ef1d1),this['bind']('resolvedAt')['to'](_0x1ef1d1),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 _0x42c9cf(_0xae7c9d,_0x1ef1d1['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x1ef1d1,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x17bdb2=this['bindTemplate'],_0x4a836f=[{'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':_0x17bdb2['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x17bdb2['to']('authoredAt',_0x1dec42=>this['_config']['formatDateTime'](_0x1dec42))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x17bdb2['if']('isEditMode','ck-comment__actions--hidden'),_0x17bdb2['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']&&_0x4a836f['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x17bdb2['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x17bdb2['if']('isEditMode','ck-comment--edit'),_0x17bdb2['if']('isSystemComment','ck-comment--info'),_0x17bdb2['to']('actionIndicator',_0x2774e5=>_0x2774e5?'ck-comment--'+_0x2774e5:'')],'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':_0x4a836f}]}]};}_createEditButton(){const _0x1fb67a=new _0x4c08d5(this['locale']);return _0x1fb67a['label']=Et(this['locale'],'Edit'),_0x1fb67a['icon']=_0x3ca589,_0x1fb67a['withText']=!0x0,_0x1fb67a['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1fb67a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4799ee=>!_0x4799ee),_0x1fb67a['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1fb67a['on']('execute',()=>this['switchToEditMode']()),_0x1fb67a;}_createRemoveButton(){const _0x4e1e26=new _0x4c08d5(this['locale']);return _0x4e1e26['label']=Et(this['locale'],'Remove'),_0x4e1e26['icon']=_0x455752,_0x4e1e26['withText']=!0x0,_0x4e1e26['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4e1e26['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4f74c4=>!_0x4f74c4),_0x4e1e26['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4e1e26['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4e1e26;}_createDropdown(){const _0x552751=ct(this['locale'],_0xfe6283),_0x2f9055=_0x552751['panelView']['children'],_0x35f1ab=new ot(this['locale']),_0xdc48be=_0x552751['bindTemplate'];dt(_0x552751,()=>this['items']['find'](_0x42739c=>_0x42739c['isVisible'])),_0x552751['extendTemplate']({'attributes':{'class':[_0xdc48be['if']('isVisible','ck-hidden',_0x1584f3=>!_0x1584f3)]}});const _0x339358=(_0x25d11b,_0x418808=-0x1)=>{const _0x2da97e=new nt(this['locale']);_0x2da97e['children']['add'](_0x25d11b);const _0x2ebdcc=_0x418808>-0x1?_0x418808:_0x35f1ab['items']['length'];_0x35f1ab['items']['add'](_0x2da97e,_0x2ebdcc);const _0x542129=Array['from'](this['items']);_0x552751['unbind']('isEnabled','isVisible'),_0x552751['bind']('isEnabled')['toMany'](_0x542129,'isEnabled',(..._0x4e81c9)=>_0x4e81c9['some'](_0x9a0940=>_0x9a0940)),_0x552751['bind']('isVisible')['toMany'](_0x542129,'isVisible',(..._0x3f8441)=>_0x3f8441['some'](_0x5a513f=>_0x5a513f));};_0x552751['panelPosition']='sw',_0x552751['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x36cea9});for(const _0x8b47d4 of this['items'])_0x339358(_0x8b47d4);return _0x2f9055['add'](_0x35f1ab),_0x552751['listenTo'](this['items'],'add',(_0x4c65fc,_0x180734,_0x1fcf64)=>{_0x339358(_0x180734,_0x1fcf64);}),_0x552751['listenTo'](this['items'],'remove',(_0x4845d4,_0x286847,_0x46d4d6)=>{_0x35f1ab['items']['remove'](_0x46d4d6);}),_0x552751;}_attachActions(_0x6d8fa6,_0x4acd55){const _0x416815=_0x6d8fa6&&_0x6d8fa6['element'];_0x416815&&(this['listenTo'](_0x416815,'mouseenter',()=>this['actionIndicator']=_0x4acd55),this['listenTo'](_0x416815,'focus',()=>this['actionIndicator']=_0x4acd55),this['listenTo'](_0x416815,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x416815,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x596751=super['_createCommentInputView']();return _0x596751['bind']('placeholder')['to'](this),_0x596751;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x72834){const _0x867c9=_0x3312da(_0x72834,0x1e),_0x530f04=new MutationObserver(_0x5540b6=>{for(const _0x4e3fe4 of _0x5540b6)('attributes'==_0x4e3fe4['type']&&'class'==_0x4e3fe4['attributeName']||'childList'==_0x4e3fe4['type']||'characterData'==_0x4e3fe4['type'])&&_0x867c9();});return{'attach'(_0x3f5884){_0x530f04['observe'](_0x3f5884,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x530f04['disconnect'](),_0x867c9['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x3d45e1,_0x4aff64){super(_0x3d45e1),this['id']=_0x42d9ac(),this['focusTracker']=new _0x2676e3(),this['keystrokes']=new _0x587e5b(),this['keystrokes']['set']('Esc',(_0x20972b,_0x217d2d)=>this['fire']('Esc',_0x217d2d)),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'](_0x4aff64),this['mainView']=_0x4aff64;const _0xf2bbe3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xf2bbe3['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 _0x485803=this['element']['clientHeight'];_0x485803&&(this['height']=_0x485803);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0xe1674();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x3dcbde,target:_0x56e1ec,type:_0x671bed,isVisible:_0x3034ff=!0x0}){super(),this['view']=_0x3dcbde,this['view']['element']||this['view']['render'](),this['_type']=_0x671bed,this['_target']=_0x56e1ec,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2e431b([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x23ab61,_0xb812e5)=>{this['view']['focusTracker']['add'](_0xb812e5);}),this['focusableElements']['on']('remove',(_0x55138b,_0x1583a8)=>{this['view']['focusTracker']['remove'](_0x1583a8);}),this['set']('isVisible',_0x3034ff);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x2eda6a=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x2eda6a),_0x2eda6a;}get targetRect(){const _0x3d1ebc=this['target'];if(null===_0x3d1ebc)return null;if(_0x3d1ebc instanceof _0x31427d)return _0x3d1ebc;const _0x3f2331=_0x3d1ebc['filter'](_0x44e0ca=>function(_0x1ea610){return!!_0x1ea610['offsetParent']||!!_0x1ea610['getClientRects']()['item'](0x0);}(_0x44e0ca));return 0x0===_0x3f2331['length']?null:_0x31427d['getDomElementRects'](_0x3f2331[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x30f4f5){this['view']['isActive']=_0x30f4f5,this['view']['mainView']['isActive']=_0x30f4f5;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x3a11e1){if(!(null===_0x3a11e1||_0x3a11e1 instanceof _0x31427d||Array['isArray'](_0x3a11e1)&&_0x3a11e1['every'](_0x463031=>zt(_0x463031))))throw new _0x148717('annotation-invalid-target',null,{'target':_0x3a11e1});}_getNormalizedTarget(){const _0x4ab2fc='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x4ab2fc)?[_0x4ab2fc]:_0x4ab2fc;}};function zt(_0xb97b06){return null!==_0xb97b06&&'object'==typeof _0xb97b06&&'nodeType'in _0xb97b06&&0x1===_0xb97b06['nodeType'];}var Jt=class extends _0x2e431b{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x33352d=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2676e3(),this['_focusTracker']['on']('change:isFocused',(_0x313f41,_0x1fc32b,_0x3ce3df)=>{_0x3ce3df||this['fire']('blur');});for(const _0x59d5f6 of _0x33352d)this['add'](_0x59d5f6);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1aeffc){if(this['has'](_0x1aeffc))throw new _0x148717('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1aeffc['innerView'],_0x1aeffc),this['_viewToAnnotation']['set'](_0x1aeffc['view'],_0x1aeffc);for(const _0x3fc34a of _0x1aeffc['focusableElements'])this['_focusTracker']['add'](_0x3fc34a);if(this['listenTo'](_0x1aeffc['focusableElements'],'add',(_0x362d44,_0x10b100)=>{this['_focusTracker']['add'](_0x10b100);}),this['listenTo'](_0x1aeffc['focusableElements'],'remove',(_0x1e3cbd,_0x3d2263)=>{this['_focusTracker']['remove'](_0x3d2263);}),this['listenTo'](_0x1aeffc['view']['focusTracker'],'change:isFocused',(_0x511a9b,_0x2de5a4,_0x481845)=>{_0x481845&&this['fire']('focus',_0x1aeffc);}),_0x1aeffc['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x406b56 of this)_0x406b56['updateTargetRect']();}const _0x5045f2=this['_getOrderInContent'](_0x1aeffc['view']['targetRect']);return super['add'](_0x1aeffc,_0x5045f2);}['remove'](_0x10de7e){if(!this['has'](_0x10de7e))throw new _0x148717('annotationcollection-not-existing-item',null);this['stopListening'](_0x10de7e['view']['focusTracker']),this['stopListening'](_0x10de7e['focusableElements']);for(const _0x149ab5 of _0x10de7e['focusableElements'])this['_focusTracker']['remove'](_0x149ab5);return this['_viewToAnnotation']['delete'](_0x10de7e['view']),this['_innerViewToAnnotation']['delete'](_0x10de7e['innerView']),super['remove'](_0x10de7e);}getByInnerView(_0x4f20c8){return this['_innerViewToAnnotation']['get'](_0x4f20c8);}getByView(_0x25599b){return this['_viewToAnnotation']['get'](_0x25599b);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x3a8b08 of this)_0x3a8b08['updateTargetRect']();this['_sort']();}_sort(){const _0xc716f6=Array['from'](this)['sort']((_0x2e6a47,_0x438e1c)=>Zt(_0x2e6a47['view']['targetRect'],_0x438e1c['view']['targetRect']));for(let _0xe6d72=_0xc716f6['length']-0x1;_0xe6d72>0x0;_0xe6d72--){const _0x3dae66=_0xc716f6[_0xe6d72];_0xe6d72!==this['getIndex'](_0x3dae66)&&(this['remove'](_0x3dae66),this['add'](_0x3dae66));}}_getOrderInContent(_0x38ed29){let _0x21eb02=0x0;if(!_0x38ed29)return this['length'];for(const _0x225fb9 of this){const _0x19202b=_0x225fb9['view']['targetRect'];if(_0x19202b){if(Zt(_0x38ed29,_0x19202b)<0x0)return _0x21eb02;_0x21eb02++;}}return _0x21eb02;}_areCachedRectsStale(){const _0x37b6e8=this['get'](0x0);if(!_0x37b6e8)return!0x1;const _0x555577=_0x37b6e8['view']['targetRect'],_0x4de33f=_0x37b6e8['targetRect'];return!(!_0x555577||!_0x4de33f)&&(_0x555577['top']!==_0x4de33f['top']||_0x555577['left']!==_0x4de33f['left']);}};function Qt({source:_0x3b829e,target:_0x5cb29b,filter:_0x5444ab}){for(const _0x529d5e of _0x3b829e)_0x5444ab(_0x529d5e)&&_0x5cb29b['add'](_0x529d5e);_0x5cb29b['listenTo'](_0x3b829e,'add',(_0x170f01,_0x473100)=>{_0x5444ab(_0x473100)&&_0x5cb29b['add'](_0x473100);}),_0x5cb29b['listenTo'](_0x3b829e,'remove',(_0x32d104,_0x5b353c)=>{_0x5cb29b['has'](_0x5b353c)&&_0x5cb29b['remove'](_0x5b353c);});}function Zt(_0x1ac30f,_0x390724){if(null===_0x1ac30f&&null===_0x390724)return 0x0;if(null===_0x1ac30f)return-0x1;if(null===_0x390724)return 0x1;const _0x5c7151=_0x1ac30f['top']-_0x390724['top'];return 0x0==_0x5c7151?_0x1ac30f['left']-_0x390724['left']:_0x5c7151;}var ti=class extends _0x4d5bc5{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b6e34){if(super(_0x5b6e34),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x5b6e34 instanceof _0x590c45){const _0x582d59=_0x5b6e34['locale'];_0x5b6e34['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x582d59,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x582d59,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x582d59,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x582d59,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x582d59,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x582d59,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x582d59,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x44dd01){this['collection']['add'](_0x44dd01);}['remove'](_0x3b8c69){this['collection']['remove'](_0x3b8c69),_0x3b8c69['destroy']();}refreshVisibility(){for(const _0x2848e2 of this['collection'])_0x2848e2['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x45485b){return this['collection']['getByInnerView'](_0x45485b);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x147ee4 of this['collection'])_0x147ee4['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x197a9c){this['fire']('_activateAnnotation',_0x197a9c);}createAnnotation(_0x52755c){return new $t(_0x52755c);}createAnnotationView(_0x35cabc,_0x341149){return new qt(_0x35cabc,_0x341149);}_addActiveAnnotation(_0x319624){const _0x4c2d3b=new Set(this['activeAnnotations']);_0x4c2d3b['add'](_0x319624),this['activeAnnotations']=_0x4c2d3b;}_removeActiveAnnotation(_0x5d06b7){const _0x160c4e=new Set(this['activeAnnotations']);_0x160c4e['delete'](_0x5d06b7),this['activeAnnotations']=_0x160c4e;}_bindAnnotationsToVisibleAnnotations(){const _0x170293=this['collection'],_0x1f77f6=this['_visibleAnnotations'];function _0x56d04(_0x2e54d1){const _0x2b3c31=_0x2e54d1['source'];_0x2b3c31['isVisible']&&!_0x1f77f6['has'](_0x2b3c31)?_0x1f77f6['add'](_0x2b3c31):!_0x2b3c31['isVisible']&&_0x1f77f6['has'](_0x2b3c31)&&_0x1f77f6['remove'](_0x2b3c31),_0x2b3c31['view']['focusTracker']['remove'](_0x2b3c31['view']['element']),_0x2b3c31['view']['focusTracker']['add'](_0x2b3c31['view']['element']);}this['listenTo'](_0x170293,'add',(_0x2b99f2,_0x1e12d3)=>{_0x1e12d3['isVisible']&&_0x1f77f6['add'](_0x1e12d3),this['listenTo'](_0x1e12d3,'change:isVisible',_0x56d04);}),this['listenTo'](_0x170293,'remove',(_0x22c010,_0x14cace)=>{_0x1f77f6['has'](_0x14cace)&&_0x1f77f6['remove'](_0x14cace),this['stopListening'](_0x14cace,'change:isVisible',_0x56d04);});}_setupEnterAnnotationKeystroke(){const _0x39ca0e=_0x1fb8df=>{_0x1fb8df['on']('ready',()=>{_0x1fb8df['keystrokes']['set'](_0x5eee32,(_0x4320cd,_0x88cb8b)=>{const _0x1b1aed=_0x485a56(this['activeAnnotations']['values']());_0x1b1aed&&(_0x1b1aed['view']['focus'](),_0x88cb8b());});});};this['context']instanceof _0x590c45?_0x39ca0e(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x13616e,_0x16f89a)=>{_0x39ca0e(_0x16f89a);});}_setupEscapeAnnotationHandling(){const _0x2f99f7=_0x2aa29f=>{const _0x19958a=_0x2aa29f['source'],_0x13ae02=[];let _0x475d58;if(Array['isArray'](_0x19958a['target'])){_0x475d58=_0x19958a['target'][0x0],this['context']instanceof _0x590c45?_0x13ae02['push'](this['context']):this['context']['editors']&&_0x13ae02['push'](...this['context']['editors']);for(const _0x13604e of _0x13ae02)for(const _0x1414bf of _0x13604e['editing']['view']['domRoots']['values']())if(_0x1414bf['contains'](_0x475d58))return void _0x13604e['editing']['view']['focus']();_0x475d58['focus']();}};this['listenTo'](this['collection'],'add',(_0x577a13,_0x372b9d)=>{this['listenTo'](_0x372b9d,'escape',_0x2f99f7,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1a78e0,_0x91e0b8)=>{this['stopListening'](_0x91e0b8,'escape',_0x2f99f7);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0xe1674(),ni=/* #__PURE__ -- @preserve */
31
+ _0xe1674();var oi=class extends _0x4d5bc5{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x2b1497,_0x113f8b];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a860f){super(_0x1a860f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3be5df=this['context']['config'];_0x3be5df['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3be5df['define']('comments.maxThreadTotalWeight',0x1f4),_0x3be5df['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3be5df['define']('comments.CommentThreadView',Ut),_0x3be5df['define']('comments.CommentView',Yt),_0x3be5df['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x4df79b=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5589fd,_0x183463)=>this['_addCommentThread'](_0x183463)),this['on']('submitCommentThread',(_0x639be5,_0xaa823d)=>this['_submitCommentThread'](_0xaa823d)),this['on']('resolveCommentThread',(_0x350040,_0x1f51eb)=>this['_resolveCommentThread'](_0x1f51eb)),this['on']('resolveCommentThread',(_0x3adf2d,_0x105502)=>this['_updateActiveAnnotation'](_0x105502),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x39fe31,_0x32491f)=>this['_reopenCommentThread'](_0x32491f)),this['on']('reopenCommentThread',(_0x3a3048,_0x85a0d)=>this['_updateActiveAnnotation'](_0x85a0d),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3b648f,_0x5ae16f)=>this['_removeCommentThread'](_0x5ae16f)),this['on']('updateCommentThread',(_0x1025f2,_0x5403c4)=>this['_updateCommentThread'](_0x5403c4)),this['on']('updateCommentThread',(_0x3b8d60,_0x11f6bb)=>this['_updateActiveAnnotation'](_0x11f6bb),{'priority':'lowest'}),this['on']('addComment',(_0x2bdd51,_0x3e9c9b)=>this['_addComment'](_0x3e9c9b)),this['on']('updateComment',(_0x3657aa,_0x17cb4f)=>this['_updateComment'](_0x17cb4f)),this['on']('removeComment',(_0x3906c5,_0x43e89c)=>this['_removeComment'](_0x43e89c)),this['on']('addComment',(_0x3512ff,{threadId:_0x3ba2d8,isFromAdapter:_0x2bdbec})=>{if(_0x2bdbec)return;const _0x2b72c7=this['getCommentThread'](_0x3ba2d8),_0x1070fb=_0x2b72c7&&this['_threadToController']['get'](_0x2b72c7);_0x1070fb&&_0x1070fb['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4df79b,'change:activeAnnotations',(_0x37b582,_0x1d0dd9,_0x415e9c)=>{const _0x247a2f=Array['from'](_0x415e9c)['map'](_0x20ee7f=>this['_viewToController']['get'](_0x20ee7f['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x247a2f?_0x247a2f['model']:null;});}set adapter(_0x2f12d9){if(this['_adapter'])throw new _0x148717('commentsrepository-adapter-already-set');this['_adapter']=_0x2f12d9;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x42adce=ii,threadId:_0x2da780=_0x42d9ac(),comments:_0x149dc0=[],unlinkedAt:_0x15aaf7=null,resolvedAt:_0x4e1288=null,resolvedBy:_0x4e96ff=null,target:_0x18e44a=null,context:_0x134583=null,attributes:_0x525e4d={},isResolvable:_0x40fa53=!0x0,isSubmitted:_0x545679=!0x1,isFromAdapter:_0x594ec7=!0x1}={}){return this['fire'](ai('addCommentThread',_0x42adce),{'channelId':_0x42adce,'threadId':_0x2da780,'comments':_0x149dc0,'unlinkedAt':_0x15aaf7,'resolvedAt':_0x4e1288,'resolvedBy':_0x4e96ff,'target':_0x18e44a,'context':_0x134583,'attributes':_0x525e4d,'isFromAdapter':_0x594ec7,'isResolvable':_0x40fa53,'isSubmitted':_0x545679}),this['getCommentThread'](_0x2da780);}openNewCommentThread({channelId:_0x267ebe=ii,threadId:_0x3e94ae=_0x42d9ac(),target:_0x42a14d,context:_0x5df90a=null,isResolvable:_0x32ca07=!0x0}){if(this['_readOnlyChannels']['has'](_0x267ebe)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x42a14d)throw new _0x148717('commentsrepository-missing-target');const _0x498e3c=this['addCommentThread']({'channelId':_0x267ebe,'threadId':_0x3e94ae,'target':_0x42a14d,'context':_0x5df90a,'isResolvable':_0x32ca07});if(!_0x498e3c)return null;const _0x4c1e7b=this['_threadToController']['get'](_0x498e3c),_0x3516c6=_0x4c1e7b['view']['commentThreadInputView']['commentInputView'],_0x5e2a08=this['context']['plugins']['get'](ti),_0x209614=_0x5e2a08['getByInnerView'](_0x4c1e7b['view']);return _0x5e2a08['activate'](_0x209614),_0x3516c6['once']('editorReady',()=>_0x3516c6['focus']()),_0x498e3c;}hasCommentThread(_0x45a886){if('string'!=typeof _0x45a886)throw new _0x148717('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x45a886);}updateCommentThread({channelId:_0x52ccf1=ii,threadId:_0x35d7e7,context:_0xfc1e70,unlinkedAt:_0xf7ad92,attributes:_0x1963e5,isFromAdapter:_0x344e83=!0x1}){return this['fire'](ai('updateCommentThread',_0x52ccf1),{'channelId':_0x52ccf1,'threadId':_0x35d7e7,'context':_0xfc1e70,'unlinkedAt':_0xf7ad92,'attributes':_0x1963e5,'isFromAdapter':_0x344e83}),this['getCommentThread'](_0x35d7e7);}getCommentThread(_0x10115d){if('string'!=typeof _0x10115d)throw new _0x148717('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x10115d);}fetchCommentThread({channelId:_0x58d06e,threadId:_0x4cd764}={}){const _0x18a06e=this['getCommentThread'](_0x4cd764);if(_0x18a06e)return Promise['resolve'](_0x18a06e);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x148717('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x58d06e,'threadId':_0x4cd764})['then'](_0x5e55e9=>this['hasCommentThread'](_0x4cd764)?this['getCommentThread'](_0x4cd764):_0x5e55e9?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x58d06e},_0x5e55e9)):void 0x0)['catch'](_0x4930ab=>{throw console['error'](_0x4930ab),new _0x148717('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x21ad9b,skipNotAttached:_0x15de21=!0x1,skipEmpty:_0x41cd3b=!0x1,toJSON:_0x57365d=!0x1}={}){const _0x1d2c27=[];for(const _0x5d2fdf of this['_threads']['values']())_0x21ad9b&&_0x5d2fdf['channelId']!==_0x21ad9b||_0x15de21&&!_0x5d2fdf['isAttached']||_0x41cd3b&&0x0===_0x5d2fdf['length']||_0x1d2c27['push'](_0x5d2fdf);return _0x57365d?_0x1d2c27['map'](_0x23638b=>_0x23638b['toJSON']()):_0x1d2c27;}getAnnotationForCommentThread(_0x3458f0){const _0x42ad3f=this['_threadToController']['get'](_0x3458f0);return _0x42ad3f&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x42ad3f['view'])||null;}getCommentThreadForAnnotation(_0x4b62a9){const _0x26727d=this['_viewToController']['get'](_0x4b62a9['innerView']);return _0x26727d?_0x26727d['model']:null;}setActiveCommentThread(_0x43afc8){const _0x490632=this['context']['plugins']['get'](ti);if(!_0x43afc8)return void(this['activeCommentThread']&&_0x490632['deactivateAll']());const _0x2733f4=this['getCommentThread'](_0x43afc8);if(!_0x2733f4)throw new _0x148717('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x43afc8});if(!this['_threadToController']['has'](_0x2733f4))throw new _0x148717('commentsrepository-active-not-attached',null,{'threadId':_0x43afc8});const _0x4bc34a=_0x490632['getByInnerView'](this['_threadToController']['get'](_0x2733f4)['view']);_0x490632['activate'](_0x4bc34a);}switchReadOnly(_0x157a9f,_0xbaf6d7){_0x157a9f?this['_readOnlyChannels']['add'](_0xbaf6d7):this['_readOnlyChannels']['delete'](_0xbaf6d7),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x330d66){return this['_readOnlyChannels']['has'](_0x330d66)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x4d725d,_0x2b42d3){return new bt(_0x4d725d,_0x2b42d3);}setPermissions(_0x578de9,_0x170677=ii){this['_permissions']['set'](_0x170677,_0x578de9),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x1d3390=ii){return this['_permissions']['has'](_0x1d3390)?this['_permissions']['get'](_0x1d3390):ei;}_addCommentThread({channelId:_0x19340b,threadId:_0x2aedb0,comments:_0x2599b9,unlinkedAt:_0x4e8be7,resolvedAt:_0x2af254,resolvedBy:_0x2b4b95,target:_0x49a370,context:_0x2e81d9,attributes:_0xee00df,isFromAdapter:_0x1d3e77,isResolvable:_0x94ebbc,isSubmitted:_0x3805ea}){if('string'!=typeof _0x2aedb0)throw new _0x148717('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2aedb0});if(this['hasCommentThread'](_0x2aedb0))throw new _0x148717('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2aedb0});const _0x2e8902=new ri(this,{'channelId':_0x19340b,'id':_0x2aedb0,'context':_0x2e81d9,'attributes':_0xee00df,'unlinkedAt':_0x4e8be7,'resolvedAt':_0x2af254,'resolvedBy':_0x2b4b95?this['context']['plugins']['get'](_0x113f8b)['getUser'](_0x2b4b95):null,'isResolvable':_0x94ebbc,'isSubmitted':_0x3805ea||_0x1d3e77});this['_threads']['set'](_0x2aedb0,_0x2e8902);for(const _0x4cb62a of _0x2599b9)_0x2e8902['_add'](this['_createNewComment']({'threadId':_0x2aedb0,..._0x4cb62a}));return _0x49a370&&_0x2e8902['attachTo'](_0x49a370),_0x1d3e77||!_0x2e8902['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x19340b,'threadId':_0x2aedb0});}_submitCommentThread({channelId:_0x291e24,threadId:_0x5d1d72}){if(!this['hasCommentThread'](_0x5d1d72))throw new _0x148717('commentsrepository-missing-comment-thread',this);const _0x10bdf4=this['getCommentThread'](_0x5d1d72);if(_0x10bdf4['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2fa086,comments:_0x4528d4,resolvedAt:_0x2aaf6c,resolvedBy:_0x317ec0,context:_0xd02bd3,attributes:_0x5bb156}=_0x10bdf4,_0x1a3cd1=this['context']['plugins']['get']('PendingActions'),_0xc484db=_0x1a3cd1['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x291e24,'threadId':_0x2fa086,'comments':_0x4528d4['map'](_0x3dc962=>_0x3dc962['toJSON']()),'resolvedAt':_0x2aaf6c,'resolvedBy':_0x317ec0?_0x317ec0['id']:_0x317ec0,'context':_0xd02bd3,'attributes':_0x5bb156})['then'](({comments:_0x571bf4})=>{_0x1a3cd1['remove'](_0xc484db);for(const _0x23ae5a of _0x571bf4)this['_updateComment']({'channelId':_0x291e24,'threadId':_0x5d1d72,'commentId':_0x23ae5a['commentId'],'createdAt':_0x23ae5a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x34e304=>{throw console['error'](_0x34e304),new _0x148717('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x35abc6,target:_0x17ce4f}){const _0x58bbde=this['getCommentThread'](_0x35abc6);if(!_0x58bbde)throw new _0x148717('commentsrepository-attach-missing-comment-thread',this);const _0x3ba841=this['context']['plugins']['get']('PendingActions'),_0x49130c=this['context']['plugins']['get'](ti),_0x36887f=this['_createCommentThreadView'](_0x58bbde),_0x3c76a6=new bt(_0x58bbde,_0x36887f);let _0x3c27e2=null;_0x36887f['on']('change:isDirty',(_0x1e2414,_0x48db42,_0x198f3d)=>{_0x198f3d?_0x3c27e2=_0x3ba841['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3c27e2&&(_0x3ba841['remove'](_0x3c27e2),_0x3c27e2=null);}),this['_threadToController']['set'](_0x58bbde,_0x3c76a6),this['_viewToController']['set'](_0x36887f,_0x3c76a6);const _0x5e0933=new qt(this['context']['locale'],_0x36887f);_0x5e0933['bind']('length')['to'](_0x36887f),_0x5e0933['bind']('isDirty')['to'](_0x36887f,'isDirty',_0x36887f,'length',(_0x5440ea,_0x182835)=>_0x5440ea||!_0x182835),_0x5e0933['bind']('isActive')['to'](_0x36887f),_0x5e0933['type']='comment';const _0x5cf575=new $t({'view':_0x5e0933,'target':_0x17ce4f,'type':'comment','isVisible':!_0x58bbde['archivedAt']&&!!('function'==typeof _0x17ce4f?_0x17ce4f():_0x17ce4f)});return _0x36887f['on']('escape',()=>{_0x5cf575['fire']('escape');}),this['_bindAnnotationToEditors'](_0x36887f,_0x5cf575),_0x49130c['add'](_0x5cf575),_0x5cf575;}_bindAnnotationToEditors(_0x3f93bd,_0x57bfa2){this['listenTo'](_0x3f93bd,'editorReady',(_0x2d3391,_0x3a0dc4)=>{const _0x5901c7=_0x3a0dc4['ui']['view']['body']['bodyCollectionContainer'];_0x57bfa2['focusableElements']['add'](_0x5901c7),this['context']instanceof _0x590c45&&this['context']['ui']['focusTracker']['add'](_0x5901c7);},{'priority':'highest'}),this['listenTo'](_0x3f93bd,'editorDestroyed',(_0x2c7856,_0x167edd)=>{const _0x4e0e20=_0x167edd['ui']['view']['body']['bodyCollectionContainer'];_0x57bfa2['focusableElements']['has'](_0x4e0e20)&&_0x57bfa2['focusableElements']['remove'](_0x4e0e20),this['context']instanceof _0x590c45&&this['context']['ui']['focusTracker']['remove'](_0x4e0e20);});}_unbindEditors(_0x273d55){this['stopListening'](_0x273d55,'editorReady'),this['stopListening'](_0x273d55,'editorDestroyed');}_createCommentThreadView(_0x5e94ec){const _0x1c3011=this['context']['plugins']['get'](_0x113f8b),{config:_0x105162,locale:_0x282958}=this['context'],_0x5abcd5=_0x9621f0(_0x105162['get']('locale'),_0x282958);return new(0x0,(_0x105162['get']('comments'))['CommentThreadView'])(_0x282958,_0x5e94ec,_0x1c3011['me'],{'editorConfig':{..._0x105162['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x105162['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x105162['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x105162['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x105162['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5abcd5,'CommentView':_0x105162['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x4a858b,channelId:_0x12d9be,resolvedAt:_0xb5795e,resolvedBy:_0x1f58d0,isFromAdapter:_0x1cfdf5}){if(!this['hasCommentThread'](_0x4a858b))throw new _0x148717('commentsrepository-missing-comment-thread',null,{'threadId':_0x4a858b});const _0x277744=this['getCommentThread'](_0x4a858b);if(_0x277744['isResolved'])throw new _0x148717('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4a858b});const _0x733a6e=this['context']['plugins']['get'](_0x113f8b);if(_0x277744['resolvedBy']=_0x733a6e['getUser'](_0x1f58d0),_0x277744['resolvedAt']=_0xb5795e,_0x1cfdf5||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x38eefe=this['context']['plugins']['get']('PendingActions'),_0x23bfac=_0x38eefe['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x12d9be,'threadId':_0x4a858b})['then'](({resolvedAt:_0x48a6cf,resolvedBy:_0x2a04fb})=>{_0x38eefe['remove'](_0x23bfac),_0x277744['resolvedBy']['id']!==_0x2a04fb&&(_0x277744['resolvedBy']=_0x733a6e['getUser'](_0x2a04fb)),_0x277744['resolvedAt']=_0x48a6cf;})['catch'](_0x4afc94=>{throw console['error'](_0x4afc94),new _0x148717('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0xe5504d,channelId:_0xc5ab03,isFromAdapter:_0x1a1157}){if(!this['hasCommentThread'](_0xe5504d))throw new _0x148717('commentsrepository-missing-comment-thread',null,{'threadId':_0xe5504d});const _0x71f50c=this['getCommentThread'](_0xe5504d);if(!_0x71f50c['isResolved'])throw new _0x148717('commentsrepository-reopen-comment-thread',null,{'threadId':_0xe5504d});if(_0x71f50c['resolvedBy']=null,_0x71f50c['resolvedAt']=null,_0x1a1157||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2c0931=this['context']['plugins']['get']('PendingActions'),_0x47df19=_0x2c0931['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xc5ab03,'threadId':_0xe5504d})['then'](()=>_0x2c0931['remove'](_0x47df19))['catch'](_0x459114=>{throw console['error'](_0x459114),new _0x148717('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x413953,isFromAdapter:_0xfacac8}){const _0x3ac3aa=this['getCommentThread'](_0x413953);if(!_0x3ac3aa)throw new _0x148717('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x413953),this['_threads']['delete'](_0x413953),!_0x3ac3aa['isSubmitted']||_0xfacac8||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x415310=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3fc3bf}=_0x3ac3aa,_0x4a6033=_0x415310['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3fc3bf,'threadId':_0x413953})['then'](()=>_0x415310['remove'](_0x4a6033))['catch'](_0x3ebd9c=>{throw console['error'](_0x3ebd9c),new _0x148717('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x50d760,unlinkedAt:_0x404f68,context:_0x1a63f9,attributes:_0x186815,isFromAdapter:_0x3861c2}){if('string'!=typeof _0x50d760)throw new _0x148717('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x50d760});if(!this['hasCommentThread'](_0x50d760))throw new _0x148717('commentsrepository-missing-comment-thread',null,{'threadId':_0x50d760});const _0x21fdbe=this['getCommentThread'](_0x50d760);let _0x349d18=!0x1;if(void 0x0!==_0x1a63f9&&_0x21fdbe['context']!==_0x1a63f9&&(_0x21fdbe['context']=_0x1a63f9,_0x349d18=!0x0),void 0x0!==_0x404f68&&_0x21fdbe['unlinkedAt']!==_0x404f68&&(_0x21fdbe['unlinkedAt']=_0x404f68,_0x349d18=!0x0),_0x186815&&!_0x2c9c82(_0x186815,_0x21fdbe['attributes'])&&(_0x21fdbe['attributes']=_0x186815,_0x349d18=!0x0),!_0x349d18)return Promise['resolve']();if(!_0x21fdbe['isSubmitted']||_0x3861c2||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3a9b10=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4b0e60}=_0x21fdbe,_0x4c8a64=_0x3a9b10['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4b0e60,'threadId':_0x50d760,'context':_0x1a63f9,'unlinkedAt':_0x404f68,'attributes':_0x186815})['then'](()=>_0x3a9b10['remove'](_0x4c8a64))['catch'](_0x2c5eb7=>{throw console['error'](_0x2c5eb7),new _0x148717('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x9df2bf){const _0x26579e=this['context']['plugins']['get'](ti),_0x3f8235=this['getCommentThread'](_0x9df2bf);if(_0x3f8235['_isAttached']=!0x1,this['_threadToController']['has'](_0x3f8235)){const _0x43578b=this['_threadToController']['get'](_0x3f8235),_0x1c8e96=_0x43578b['view'],_0x4160ea=_0x26579e['getByInnerView'](_0x1c8e96);this['_threadToController']['delete'](_0x3f8235),this['_viewToController']['delete'](_0x1c8e96),_0x4160ea&&_0x26579e['remove'](_0x4160ea),_0x43578b['destroy'](),_0x1c8e96['destroy']()['then'](()=>{this['_unbindEditors'](_0x1c8e96);});}}_updateActiveAnnotation({threadId:_0x10743e,resolvedAt:_0x92abde,unlinkedAt:_0x56235b}){const _0x1fa01d=!!_0x92abde,_0x154c87=this['context']['plugins']['get'](ti),_0x4ccdef=this['getCommentThread'](_0x10743e);if(this['_threadToController']['has'](_0x4ccdef)){const _0x2d19ba=this['_threadToController']['get'](_0x4ccdef)['view'],_0xc2d28=_0x154c87['getByInnerView'](_0x2d19ba);_0xc2d28&&(_0x1fa01d&&_0x154c87['_removeActiveAnnotation'](_0xc2d28),_0x56235b?_0xc2d28['isVisible']=!0x1:_0xc2d28['refreshVisibility']());}}_getExternalAuthor(_0x11bf9d){const _0x40053f=this['context']['plugins']['get'](_0x113f8b),_0x224ece=_0x457e9f('external:'+_0x11bf9d),_0x13edbd=_0x40053f['getUser'](_0x224ece);return _0x13edbd||_0x40053f['addUser']({'id':_0x224ece,'name':_0x11bf9d});}_createNewComment({threadId:_0x2eed25,commentId:_0x2e03de=_0x42d9ac(),content:_0x43e2a3,authorId:_0x182c20,createdAt:_0x4812fa,attributes:_0x4bbd46}){if('string'!=typeof _0x2e03de)throw new _0x148717('commentsrepository-invalid-commentid');if('string'!=typeof _0x182c20)throw new _0x148717('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x43e2a3||!_0x43e2a3['trim']())throw new _0x148717('commentsrepository-invalid-comment-content');const _0x27e420=this['context']['plugins']['get'](_0x113f8b)['getUser'](_0x182c20);if(!_0x27e420)throw new _0x148717('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x182c20});let _0x317487=null,_0x3b34a7=_0x4812fa;return _0x4bbd46?.['@external']&&(_0x317487=this['_getExternalAuthor'](_0x4bbd46['@external']['authorName']),_0x3b34a7=new Date(_0x4bbd46['@external']['createdAt'])),new hi(this,{'threadId':_0x2eed25,'id':_0x2e03de,'author':_0x317487||_0x27e420,'creator':_0x27e420,'content':_0x43e2a3,'createdAt':_0x4812fa,'authoredAt':_0x3b34a7,'attributes':_0x4bbd46});}_addComment(_0x44ab41){let {threadId:_0x49cc6f,content:_0x503769,attributes:_0x2af12b,isFromAdapter:_0x51b8da}=_0x44ab41;const _0x723478=this['getCommentThread'](_0x44ab41['threadId']);if(!_0x723478)throw new _0x148717('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x10ab4f=this['_createNewComment'](_0x44ab41),{id:_0x159afa}=_0x10ab4f;if(_0x723478['_add'](_0x10ab4f),_0x51b8da||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x723478['isSubmitted'])return Promise['resolve']();const _0x333cb8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3052e1}=_0x723478,_0x300316=_0x333cb8['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2af12b||(_0x2af12b={}),this['adapter']['addComment']({'channelId':_0x3052e1,'threadId':_0x49cc6f,'commentId':_0x159afa,'content':_0x503769,'attributes':_0x2af12b})['then'](_0x4b9a98=>{_0x333cb8['remove'](_0x300316),_0x4b9a98&&this['_updateComment']({'channelId':_0x3052e1,'threadId':_0x49cc6f,'commentId':_0x159afa,'createdAt':_0x4b9a98['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5673a5=>{throw console['error'](_0x5673a5),new _0x148717('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x262849,commentId:_0x193072,content:_0x2102a6,createdAt:_0x1edcb5,attributes:_0x39e4d6,isFromAdapter:_0x5d6116}){if(void 0x0!==_0x2102a6&&('string'!=typeof _0x2102a6||!_0x2102a6['trim']()['length']))throw new _0x148717('commentsrepository-update-comment-invalid-content');const _0x4ea569=this['getCommentThread'](_0x262849),_0x5a1a32=_0x4ea569['getComment'](_0x193072);if(!_0x5a1a32)throw new _0x148717('commentsrepository-update-missing-comment',this);let _0x2de30c=!0x1;if(_0x2102a6&&_0x2102a6!==_0x5a1a32['content']&&(_0x5a1a32['isEditable']||_0x5d6116)&&(_0x5a1a32['content']=_0x2102a6,_0x2de30c=!0x0),_0x1edcb5&&_0x1edcb5!==_0x5a1a32['createdAt']&&(_0x5a1a32['createdAt']=_0x1edcb5,_0x5a1a32['isExternal']||(_0x5a1a32['authoredAt']=_0x1edcb5),_0x2de30c=!0x0),_0x39e4d6&&!_0x2c9c82(_0x39e4d6,_0x5a1a32['attributes'])&&(_0x5a1a32['attributes']=_0x39e4d6,_0x2de30c=!0x0),!_0x2de30c)return Promise['resolve']();if(_0x4ea569['fire']('commentUpdated'),_0x5d6116||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4ddd09=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1bee92}=this['getCommentThread'](_0x5a1a32['threadId']),_0x418dc9=_0x4ddd09['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1bee92,'threadId':_0x262849,'commentId':_0x193072,'content':_0x2102a6,'attributes':_0x39e4d6})['then'](()=>_0x4ddd09['remove'](_0x418dc9))['catch'](_0x3956ee=>{throw console['error'](_0x3956ee),new _0x148717('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x393b75,commentId:_0x515540,isFromAdapter:_0x262c2c}){const _0x4a3b4c=this['getCommentThread'](_0x393b75),_0x198bbc=_0x4a3b4c['getComment'](_0x515540);if(!_0x198bbc)throw new _0x148717('commentsrepository-remove-missing-comment',this);if(_0x4a3b4c['_remove'](_0x198bbc),_0x262c2c||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5ade0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ad92d}=_0x4a3b4c,_0x1a15ff=_0x5ade0['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1ad92d,'threadId':_0x393b75,'commentId':_0x515540})['then'](()=>_0x5ade0['remove'](_0x1a15ff))['catch'](_0x122f95=>{throw console['error'](_0x122f95),new _0x148717('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x69554c,_0x223caa){super();const _0x5885f1=_0x223caa['isResolvable'];this['channelId']=_0x223caa['channelId'],this['id']=_0x223caa['id'],this['comments']=new _0x2e431b(),this['_repository']=_0x69554c,this['_isAttached']=!0x1,this['_isSubmitted']=_0x223caa['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x69554c,'_permissions',_0x69554c,'_readOnlyChannels',()=>_0x69554c['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x69554c,'_permissions',()=>_0x69554c['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x69554c,'_permissions',()=>{const _0x3c54e7=_0x69554c['getPermissions'](this['channelId']);return _0x3c54e7['write']||_0x3c54e7['admin'];}),this['bind']('isResolvable')['to'](_0x69554c,'_permissions',()=>_0x5885f1&&_0x69554c['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x223caa['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x555140,_0x40567d)=>_0x555140?_0x40567d?_0x555140<_0x40567d?_0x555140:_0x40567d:_0x555140:_0x40567d),this['set']('unlinkedAt',_0x223caa['unlinkedAt']||null),this['set']('resolvedAt',_0x223caa['resolvedAt']||null),this['set']('resolvedBy',_0x223caa['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xcb2fd=>!!_0xcb2fd),this['set']('attributes',_0x223caa['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x1ee788,_0x423d98)=>_0x1ee788+_0x423d98['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x1c6c4a,id:_0x441bc0}=this;this['_repository']['fire'](ai('submitCommentThread',_0x1c6c4a),{'channelId':_0x1c6c4a,'threadId':_0x441bc0});}setUnlinkedAt(_0x52ac65){this['_update']({'unlinkedAt':_0x52ac65});}['resolve']({resolvedAt:_0x51096d=new Date(),resolvedBy:_0x499005='',isFromAdapter:_0x45d68f=!0x1}={}){const _0x2285dd=this['_repository']['context']['plugins']['get'](_0x113f8b)['me'],{channelId:_0x3c2257,id:_0x4372c5}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x3c2257),{'channelId':_0x3c2257,'threadId':_0x4372c5,'resolvedAt':_0x51096d,'resolvedBy':_0x499005||_0x2285dd['id'],'isFromAdapter':_0x45d68f});}['reopen']({isFromAdapter:_0x105ca0=!0x1}={}){const {channelId:_0x369d1a,id:_0x536fda}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x369d1a),{'channelId':_0x369d1a,'threadId':_0x536fda,'isFromAdapter':_0x105ca0});}setContext(_0x51b460){this['context']||this['_update']({'context':_0x51b460});}setAttribute(_0x1014e6,_0x4b89a3){const _0x100206=_0x47f312(this['attributes']);_0xf15146(_0x100206,_0x1014e6,_0x4b89a3),this['_update']({'attributes':_0x100206});}removeAttribute(_0x1e65e3){const _0x1d941a=_0x47f312(this['attributes']);_0x30b384(_0x1d941a,_0x1e65e3),this['_update']({'attributes':_0x1d941a});}['remove']({isFromAdapter:_0x342e0c=!0x1}={}){const {channelId:_0x104241,id:_0x5af388}=this;this['_repository']['fire'](ai('removeCommentThread',_0x104241),{'channelId':_0x104241,'threadId':_0x5af388,'isFromAdapter':_0x342e0c});}attachTo(_0x475dd6){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x475dd6});}addComment(_0xc11e52){const {channelId:_0x32c0f5,id:_0x26a267}=this;this['_repository']['fire'](ai('addComment',_0x32c0f5,_0x26a267),Object['assign']({'channelId':_0x32c0f5,'threadId':_0x26a267},_0xc11e52));}getComment(_0x52f2fb){if('string'!=typeof _0x52f2fb)throw new _0x148717('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x52f2fb});return this['comments']['get'](_0x52f2fb);}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'](_0x49964d=>_0x49964d['toJSON']()),'attributes':this['attributes']};}['_add'](_0x28c21b){return this['listenTo'](_0x28c21b,'change:authoredAt',()=>{const _0x4a96e9=this['_findOptimalIndex'](_0x28c21b),_0x38038f=this['comments'];_0x4a96e9-0x1!=_0x38038f['getIndex'](_0x28c21b)&&_0x4a96e9+0x1!=_0x38038f['getIndex'](_0x28c21b)&&(this['_remove'](_0x28c21b),this['_add'](_0x28c21b));}),this['comments']['add'](_0x28c21b,this['_findOptimalIndex'](_0x28c21b));}_update(_0x3fc7e9){const {channelId:_0x3d7a62,id:_0x4e2f60}=this;this['_repository']['fire'](ai('updateCommentThread',_0x3d7a62),{..._0x3fc7e9,'channelId':_0x3d7a62,'threadId':_0x4e2f60});}['_remove'](_0x335e75){return this['stopListening'](_0x335e75),_0x335e75['destroy'](),this['comments']['remove'](_0x335e75);}_findOptimalIndex(_0xee3236){const _0xa747b0=this['comments']['find'](_0x4acadf=>new Date(_0x4acadf['authoredAt'])['getTime']()>new Date(_0xee3236['authoredAt'])['getTime']());return _0xa747b0?this['comments']['getIndex'](_0xa747b0):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x41db18,_0x5af05a){super();const _0x2902be=_0x41db18['context']['plugins']['get'](_0x113f8b)['me'],_0xda74ee=_0x41db18['getCommentThread'](_0x5af05a['threadId']),_0x5ba92c=0x0===_0xda74ee['comments']['length'],_0x400a0e=_0x2902be===_0x5af05a['author'];this['id']=_0x5af05a['id'],this['threadId']=_0x5af05a['threadId'],this['author']=_0x5af05a['author'],this['creator']=_0x5af05a['creator'],this['set']('content',_0x5af05a['content']),this['createdAt']=_0x5af05a['createdAt']||new Date(),this['set']('authoredAt',_0x5af05a['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xda74ee,'resolvedAt'),this['set']('attributes',_0x5af05a['attributes']||{}),this['bind']('isEditable')['to'](_0x41db18,'_permissions',()=>{const _0x32d13c=_0x41db18['getPermissions'](_0xda74ee['channelId'])['write'],_0x4c7472=_0x41db18['getPermissions'](_0xda74ee['channelId'])['modifyAll'];return _0x400a0e&&_0x32d13c||!_0x400a0e&&_0x4c7472;}),this['bind']('isRemovable')['to'](_0xda74ee,'isRemovable',_0x41db18,'_permissions',_0x4d3a41=>{const _0x3809f1=_0x41db18['getPermissions'](_0xda74ee['channelId'])['write'],_0xcacd9a=_0x41db18['getPermissions'](_0xda74ee['channelId'])['modifyAll'];return _0x400a0e&&_0x3809f1||_0x4d3a41&&_0x5ba92c||!_0x400a0e&&_0xcacd9a&&!_0x5ba92c;}),this['bind']('isReadOnly')['to'](_0xda74ee,'isReadOnly'),this['_repository']=_0x41db18;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x5695f7){const _0x5c8858=document['createElement']('div');return _0x5c8858['innerHTML']=_0x5695f7,_0x5c8858['textContent']['length'];}(this['content']),0xc8);}update(_0x3cf019){const {threadId:_0x52285c,id:_0x125adc}=this;if(!this['_repository']['hasCommentThread'](_0x52285c))throw new _0x148717('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x276ced}=this['_repository']['getCommentThread'](_0x52285c);this['_repository']['fire'](ai('updateComment',_0x276ced,_0x52285c),{'channelId':_0x276ced,'threadId':_0x52285c,'commentId':_0x125adc,..._0x3cf019});}setAttribute(_0x5b3c50,_0x1465d5){const _0x1f819b=_0x47f312(this['attributes']);_0xf15146(_0x1f819b,_0x5b3c50,_0x1465d5),this['update']({'attributes':_0x1f819b});}removeAttribute(_0x1e3bb2){const _0x5ba8d8=_0x47f312(this['attributes']);_0x30b384(_0x5ba8d8,_0x1e3bb2),this['update']({'attributes':_0x5ba8d8});}['remove'](_0x1b1183={}){if(!_0x1b1183['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4562e6,id:_0x253c87}=this;if(!this['_repository']['hasCommentThread'](_0x4562e6))throw new _0x148717('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4ec95f}=this['_repository']['getCommentThread'](_0x4562e6);this['_repository']['fire'](ai('removeComment',_0x4ec95f,_0x4562e6),{'channelId':_0x4ec95f,'threadId':_0x4562e6,'commentId':_0x253c87,..._0x1b1183});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x16bb2a,..._0x24968c){for(const _0x4fe8e of _0x24968c)void 0x0!==_0x4fe8e&&(_0x16bb2a+=':'+String(_0x4fe8e));return _0x16bb2a;}var ci=class extends _0x519f30{constructor(_0x180fbe){super(_0x180fbe),this['set']('hasContent',!0x1);}['refresh'](){const _0x111caf=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2e4331 of _0x111caf['getRanges']())if(this['_hasContent'](_0x2e4331))return void(this['hasContent']=!0x0);}execute({threadId:_0xda12d7=_0x42d9ac(),ranges:_0x2e5896,comment:_0x3c859d}={}){const _0x1d93cb=this['editor']['model'],_0x17db62=_0x2e5896??Array['from'](_0x1d93cb['document']['selection']['getRanges']()),_0x44fbfa=[];for(const _0x3321b2 of _0x17db62)this['_hasContent'](_0x3321b2)&&_0x44fbfa['push'](this['_trimToContent'](_0x3321b2));if(!_0x44fbfa['length'])throw new _0x148717('addcommentthreadcommand-incorrect-ranges',null);_0x3c859d&&this['_createCommentThread'](_0xda12d7,_0x3c859d),this['_createMarkersFromRanges'](_0xda12d7,_0x44fbfa,!!_0x3c859d);}_createMarkersFromRanges(_0x3b84cc,_0xae3502,_0x56d75f){this['editor']['model']['change'](_0x559bc3=>{for(const _0x4d08f4 of _0xae3502){const _0x5c54e2='comment:'+_0x3b84cc+':'+_0x42d9ac()['substr'](0x1,0x5);_0x559bc3['addMarker'](_0x5c54e2,{'range':_0x4d08f4,'usingOperation':_0x56d75f,'affectsData':_0x56d75f});}});}_createCommentThread(_0x19d760,_0x345e1b){const _0x30c3e2=this['editor']['plugins']['get']('CommentsRepository'),_0x408b3a=this['editor']['config']['get']('collaboration.channelId'),_0x26a913=this['editor']['plugins']['get']('Users')['me'];if(!_0x26a913)throw new _0x148717('addcommentthreadcommand-user-not-found',null);_0x30c3e2['addCommentThread']({'threadId':_0x19d760,'channelId':_0x408b3a,'comments':[{'authorId':_0x26a913['id'],'content':_0x345e1b,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x2db797){for(const _0x1b1b38 of _0x2db797['getItems']())if(this['_itemIsContent'](_0x1b1b38))return!0x0;return!0x1;}_itemIsContent(_0x160eea){return _0x160eea['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x160eea)&&!_0x160eea['is']('element','tableCell');}_trimToContent(_0x4f2d72){const _0x3db6c2=_0xea5eb=>!this['_itemIsContent'](_0xea5eb['item']),_0x470152=_0x4f2d72['start']['getLastMatchingPosition'](_0x3db6c2),_0x5a84bb=_0x4f2d72['end']['getLastMatchingPosition'](_0x3db6c2,{'direction':'backward'});return this['editor']['model']['createRange'](_0x470152,_0x5a84bb);}},di=class extends _0x21dd8e{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x26d53f){super(_0x26d53f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x2ce5fb=this['editor'],_0x462068=_0x2ce5fb['model']['document']['selection'],_0x226298=_0x3b47aa(()=>this['refreshSelectedViews'](),0xa);_0x462068['on']('change:range',(_0x36e3fb,_0xaf68ad)=>{_0xaf68ad['directChange']&&(_0x226298['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2ce5fb['editing']['view']['document'],'change:isFocused',(_0x183f89,_0x1d47e8,_0x49e020)=>{_0x49e020&&_0x226298();}),this['listenTo'](_0x2ce5fb['ui']['focusTracker'],'change:isFocused',(_0x3fbda9,_0x3cce3b,_0x546917)=>{_0x546917||this['fire']('blur',{'isAnnotationTracked':_0x193f89=>this['_editorAnnotationsData']['has'](_0x193f89['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x49139a){if(this['_editorAnnotations']['has'](_0x49139a['view']))return;this['_editorAnnotations']['add'](_0x49139a['view']),this['editor']['ui']['focusTracker']['add'](_0x49139a['view']['element']);const _0x1d774f=this['editor']['plugins']['get'](ti);this['listenTo'](_0x1d774f['collection'],'remove',(_0x44586f,_0x58ca19)=>{this['editor']['ui']['focusTracker']['remove'](_0x58ca19['view']['element']),this['_editorAnnotations']['delete'](_0x58ca19['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x46d69a){if('function'!=typeof _0x46d69a)throw new _0x148717('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x46d69a);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x462a09,annotations:_0x186f41}){const _0x2b34bf=[],_0x319394=this['editor']['model']['document']['selection'],_0x1dd26f=Array['from'](_0x319394['getRanges']());for(const [_0x375e6a,_0x48ffc9]of this['_editorAnnotationsData']){const _0x236a11=_0x534e6a(_0x48ffc9),_0x2907c9=_0x186f41['getByInnerView'](_0x375e6a);_0x236a11&&_0x2907c9&&_0x2b34bf['push']({'annotation':_0x2907c9,'range':_0x236a11});}function _0x534e6a(_0x35509b){for(const _0x15d017 of _0x35509b)for(const _0x3068bc of _0x1dd26f)if(_0x15d017['containsRange'](_0x3068bc,!_0x319394['isCollapsed']))return _0x15d017;return null;}const _0x4201b1=new Map(Array['from'](_0x186f41,(_0x9e58dc,_0x9fd87e)=>[_0x9e58dc,_0x9fd87e]));return _0x2b34bf['sort']((_0x5da397,_0x511a26)=>{const _0x44ddea=_0x5da397['range'],_0x3d7468=_0x511a26['range'];if(!_0x44ddea['isEqual'](_0x3d7468)){if(_0x44ddea['containsRange'](_0x3d7468,!0x0))return 0x1;if(_0x3d7468['containsRange'](_0x44ddea,!0x0))return-0x1;}return _0x5da397['annotation']==_0x462a09?-0x1:_0x511a26['annotation']==_0x462a09?0x1:(_0x4201b1['get'](_0x5da397['annotation'])??0x0)-(_0x4201b1['get'](_0x511a26['annotation'])??0x0);})['map'](_0xfaff33=>_0xfaff33['annotation']);}get _editorAnnotationsData(){const _0x1eb5f4=new Map();for(const _0x57d744 of Array['from'](this['_dataCollectors']))for(const [_0x1d5595,_0x2cbafe]of _0x57d744())_0x1eb5f4['set'](_0x1d5595,_0x2cbafe);return _0x1eb5f4;}},li=class extends _0x21dd8e{afterInit(){const _0x452f0=this['editor'];_0x452f0['plugins']['has']('RestrictedEditingModeEditing')&&_0x452f0['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x21dd8e{constructor(_0x59c9e4){super(_0x59c9e4),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x13fa91=this['editor'],_0x193374=_0x13fa91['commands']['get']('importWord'),_0x18275b=_0x13fa91['plugins']['get'](_0x113f8b);_0x193374&&(_0x193374['on']('execute',(_0x197fc0,[,_0x30e3d3])=>{_0x30e3d3['collaboration_features']={'comments':!0x0,'user_id':_0x18275b['me']['id']};},{'priority':_0x157d8['high']+0xa}),this['listenTo'](_0x193374,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x4664ca,_0x30711b){const {comment_threads:_0x29524e}=_0x30711b;_0x29524e&&_0x29524e['forEach'](({thread_id:_0x592073,comments:_0x1c7b33,is_resolved:_0x59f8cc})=>{const _0x367038=new Date(),_0x34c688=_0x1c7b33['map'](({author:_0x40f3f1,content:_0x15c6c1,created_at:_0x1d8817})=>({'content':_0x15c6c1,'authorId':this['editor']['plugins']['get'](_0x113f8b)['me']['id'],'createdAt':_0x367038,'attributes':{'@external':{'authorName':_0x40f3f1,'createdAt':_0x1d8817?new Date(_0x1d8817):new Date(),'source':'importWord'}}})),_0x1d8474=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x1d8474,'threadId':_0x592073,'comments':_0x34c688,'resolvedAt':_0x59f8cc?_0x367038:null});});}},ui=class extends _0x21dd8e{constructor(_0x244033){super(_0x244033),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x53972f=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x53972f,'contentInsertion',(_0x27e632,_0x3b3fa4)=>this['_removeMarkersWithoutThreads'](_0x3b3fa4['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x3da307){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3da307;const _0x2d42ed=this['editor']['plugins']['get']('CommentsRepository');for(const _0x3ec9ac of _0x3da307['keys']()){const [_0x59364c,_0x14fad8]=_0x3ec9ac['split'](':');'comment'!=_0x59364c||_0x2d42ed['hasCommentThread'](_0x14fad8)||_0x3da307['delete'](_0x3ec9ac);}return _0x3da307;}_registerMarkerInClipboardPipeline(){const _0x3124cc=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1634ed=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1634ed&&_0x3124cc['_registerMarkerToCopy']('comment',_0x1634ed);}_mapCommentsCopyConfigToRegisterConfiguration(_0x1b97b2){switch(_0x1b97b2){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x20d192){const _0x330802=_0x20d192['split'](':');return{'group':_0x330802[0x0],'id':_0x330802[0x1],'part':_0x330802[0x2]};}var pi=class extends _0x21dd8e{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5997f6,_0x27cd35)=>{if(!_0x27cd35['options']['showCommentHighlights'])return null;if(_0x27cd35['options']['ignoreResolvedComments']){const {id:_0x66ff00}=fi(_0x5997f6['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x66ff00)?.['isResolved']&&_0x5997f6['item'])return _0x27cd35['consumable']['consume'](_0x5997f6['item'],'addMarker:'+_0x5997f6['markerName']),_0x27cd35['consumable']['consume'](_0x5997f6['item'],'removeMarker:'+_0x5997f6['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x180bf8=>{_0x180bf8['on']('addMarker:comment',(_0x1c5915,_0x5c9da5,_0x4f52fc)=>{if(!_0x4f52fc['options']['showCommentHighlights'])return;const _0x5cc0e1=_0x5c9da5['item'];if(!_0x5cc0e1)return;const _0x3a488c=_0x4f52fc['mapper']['toViewElement'](_0x5cc0e1);this['editor']['model']['schema']['isObject'](_0x5cc0e1)&&_0x3a488c&&!_0x3a488c['getCustomProperty']('widget')&&_0x3a488c['is']('containerElement')&&Ct(_0x3a488c,_0x4f52fc['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5b4426,{writer:_0x263938,options:_0x4b6514})=>{if(!_0x4b6514['showCommentHighlights'])return null;const _0x4e7181=_0x263938['createContainerElement']('div'),_0x8b433d=_0x263938['createEmptyElement']('hr');return _0x263938['addClass']('ck-horizontal-line',_0x4e7181),_0x263938['insert'](_0x263938['createPositionAt'](_0x4e7181,0x0),_0x8b433d),_0x4e7181;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x283253,{writer:_0x2e91bf,options:_0x10e4e7})=>{if(!_0x10e4e7['showCommentHighlights'])return null;const _0x54848b=_0x2e91bf['createContainerElement']('span'),_0x1210bc=_0x2e91bf['createEmptyElement']('img');return _0x2e91bf['addClass']('image-inline',_0x54848b),_0x2e91bf['insert'](_0x2e91bf['createPositionAt'](_0x54848b,0x0),_0x1210bc),_0x54848b;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x33d7a9,{writer:_0x4b7de1,options:_0x3cb753})=>{if(_0x3cb753['showCommentHighlights'])return _0x4b7de1['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xa7c2ad,_0x1ab02f,_0xb91cce)=>{_0xb91cce['options']['showCommentHighlights']&&_0xa7c2ad['stop']();},{'priority':'high'});}},wi=class extends _0x21dd8e{static get requires(){return[oi,di,_0x113f8b,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x36ed7f){super(_0x36ed7f),this['set']('isThreadsLoadingPaused',!0x0),_0x36ed7f['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3ea26c,_0x1bcaba,_0x2948c5,_0x4298db)=>{const _0x5ccbb0=_0x36ed7f['plugins']['get'](oi),_0x47cffe=_0x2948c5?fi(_0x2948c5)['id']:null;_0x36ed7f['model']['change'](()=>{if(_0x47cffe){const _0x4fa167=this['getAllMarkersForId'](_0x47cffe);for(const _0x293780 of _0x4fa167)_0x36ed7f['editing']['reconvertMarker'](_0x293780);}if(_0x4298db){const {id:_0x5e635e}=fi(_0x4298db),_0x25ecdb=_0x5ccbb0['getCommentThread'](_0x5e635e);if(_0x25ecdb&&_0x25ecdb['unlinkedAt'])return;if(_0x25ecdb&&!_0x25ecdb['isAttached'])return;const _0x17ddf8=this['getAllMarkersForId'](_0x5e635e);for(const _0x2fc27c of _0x17ddf8)_0x36ed7f['editing']['reconvertMarker'](_0x2fc27c);}}),_0x47cffe&&this['scrollToThreadMarker'](_0x47cffe);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x1f9cba=this['editor'],_0xb3101c=_0x1f9cba['plugins']['get'](oi),_0x1e59cc=_0x1f9cba['config']['get']('collaboration.channelId'),_0x45f5b0=_0xb3101c['getCommentThreads']()['filter'](_0xd40405=>_0xd40405['channelId']!==_0x1e59cc);_0x1f9cba['commands']['add']('addCommentThread',new ci(_0x1f9cba)),this['listenTo'](_0x1f9cba,'change:isReadOnly',(_0x3991b6,_0x1c8ece,_0x5d7a3b)=>{_0xb3101c['switchReadOnly'](_0x5d7a3b,_0x1f9cba['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xb3101c,gi('addCommentThread',_0x1e59cc),(_0x5c3768,{threadId:_0x28adb3})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x28adb3)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x28adb3);}),this['listenTo'](_0xb3101c,gi('removeCommentThread',_0x1e59cc),(_0x174f8c,{threadId:_0x136a9a})=>{_0x1f9cba['model']['enqueueChange']({'isUndoable':!0x1},_0x2ad71e=>{const _0x41394c=this['getAllMarkersForId'](_0x136a9a);for(const _0x6c9a87 of _0x41394c)_0x2ad71e['removeMarker'](_0x6c9a87);});}),this['listenTo'](_0xb3101c,gi('resolveCommentThread',_0x1e59cc),(_0x2c55d0,{threadId:_0x1dd01e})=>{this['_reconvertMarkers'](_0x1dd01e);const _0x11ad25=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x11ad25['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1dd01e)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xb3101c,gi('reopenCommentThread',_0x1e59cc),(_0x393e31,{threadId:_0x3b1766})=>{this['_reconvertMarkers'](_0x3b1766);},{'priority':'low'}),this['listenTo'](_0xb3101c,gi('addComment',_0x1e59cc),(_0xbc6909,{threadId:_0x18631a,isFromAdapter:_0x54acba})=>{const _0x571375=this['getAllMarkersForId'](_0x18631a);!_0x54acba&&0x0!=_0x571375['length']&&_0xb3101c['hasCommentThread'](_0x18631a)&&0x1===_0xb3101c['getCommentThread'](_0x18631a)['length']&&_0x1f9cba['model']['enqueueChange']({'isUndoable':!0x1},_0x21ebf5=>{for(const _0x59b126 of _0x571375)_0x21ebf5['updateMarker'](_0x59b126,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x45f5b0);}afterInit(){!async function(_0x46df13){const _0x600455='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x245eec=0x79998,_0x13c9ee={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x311c0a(_0x597292){const _0x179d73=new window['Promise'](_0x1d73b7=>{_0x597292['once']('ready',_0x1d73b7);}),_0x165eb4=window['Date']['now'](),_0x33c162=_0x597292['config']['get']('licenseKey');async function _0x5c2892(){let _0x41eca6,_0x17d06a=null,_0x1e39d2=null;try{return'GPL'==_0x33c162?'NotAllowed':(_0x41eca6=_0x3d0f21(),_0x41eca6?(_0x41eca6['usageEndpoint']&&(_0x1e39d2=_0x5ccc0a(_0x41eca6['usageEndpoint'],_0x41eca6['jti'])),await _0xd2c0fc()?_0x32e7c5()?_0x18a5e4()?'Expired':_0x35b32d()?('evaluation'==_0x41eca6['licenseType']&&(_0x17d06a=_0x297e39('EvaluationLimit')),await _0xba2d27()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x18a5e4(){const _0x170997=['evaluation','trial']['includes'](_0x41eca6['licenseType'])?_0x165eb4/0x3e8:0xe10*_0x245eec;return _0x41eca6['exp']<_0x170997;}function _0x32e7c5(){const _0x5053a7=_0x41eca6['features'];if(!_0x5053a7)return!0x1;if(_0x5053a7['includes']('*'))return!0x0;if(_0x5053a7['includes']('CMT'))return!0x0;if(_0x5053a7['includes']('TRILIUM')&&_0x5994bb())return!0x0;if(_0x5053a7['includes']('RCMT')){if(_0x1b6842())return!0x0;if(_0x32d5e8()||_0x3a694b())return!0x0;}return!0x1;}function _0x35b32d(){const _0xb6feb=_0x41eca6['licensedHosts'];if(!_0xb6feb||0x0==_0xb6feb['length'])return!0x0;const {hostname:_0x510af5}=new URL(window['location']['href']);if(_0xb6feb['includes'](_0x510af5))return!0x0;const _0x2d19d1=_0x510af5['split']('.');return _0xb6feb['filter'](_0x43f5f3=>_0x43f5f3['includes']('*'))['map'](_0x387a34=>_0x387a34['split']('.'))['filter'](_0x555f8b=>_0x555f8b['length']<=_0x2d19d1['length'])['map'](_0x48781b=>Array(_0x2d19d1['length']-_0x48781b['length'])['fill']('*'===_0x48781b[0x0]?'*':'')['concat'](_0x48781b))['some'](_0x261c00=>_0x2d19d1['every']((_0x1f4a80,_0x4cfb9c)=>_0x261c00[_0x4cfb9c]===_0x1f4a80||'*'===_0x261c00[_0x4cfb9c]));}function _0xba2d27(){return _0x17d06a&&_0x1e39d2?new window['Promise']((_0x5a6b4c,_0x8a9df2)=>{_0x17d06a['then'](_0x5a6b4c,_0x8a9df2),_0x1e39d2['then'](_0x39d9d7=>{'Valid'!=_0x39d9d7&&_0x5a6b4c(_0x39d9d7);},_0x8a9df2);}):_0x17d06a||_0x1e39d2||'Valid';}}function _0x5ccc0a(_0x3a0b7c,_0x34f207){return new window['Promise'](_0x4f9106=>{if(_0x40f25b())return _0x4f9106('Valid');_0x5b0d78(),_0x597292['decorate']('_sendUsageRequest');let _0x340c37=!0x1;const _0xd57424=_0x42d9ac();function _0x158c88(_0x5b266a){return!!_0x5b266a&&('object'==typeof _0x5b266a||'function'==typeof _0x5b266a)&&'function'==typeof _0x5b266a['then']&&'function'==typeof _0x5b266a['catch'];}function _0x4d26f3(_0x52e691){_0x54aa93(_0x52e691)['then'](_0x3bdc4f=>_0x3bdc4f&&'ok'==_0x3bdc4f['status']?_0x3e8654(_0x4dd490(_0xd57424+_0x34f207))!=_0x3bdc4f['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x29f6f3=>(_0x1d25ba(),_0x29f6f3),()=>{const _0x3dc5e2=_0x3ed1f5();return null==_0x3dc5e2?(_0x1d25ba(),'Valid'):_0x165eb4-_0x3dc5e2>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4f9106)['catch'](()=>{_0x4f9106('UsageLimit');});const _0x14a84c=0x36ee80;function _0x1d25ba(){const _0x4db489='llct-'+_0x3e8654(_0x4dd490(_0x3a0b7c)),_0x66c6c9=_0x19d64b(_0x3e8654(window['Math']['ceil'](_0x165eb4/_0x14a84c)));window['localStorage']['setItem'](_0x4db489,_0x66c6c9);}function _0x3ed1f5(){const _0x4ad5ae='llct-'+_0x3e8654(_0x4dd490(_0x3a0b7c)),_0x1c594d=window['localStorage']['getItem'](_0x4ad5ae);return _0x1c594d?window['parseInt'](_0x19d64b(_0x1c594d),0x10)*_0x14a84c:null;}function _0x54aa93(_0x1dbc41){return new window['Promise']((_0x581e2b,_0x415b42)=>{_0x1dbc41['then'](_0x581e2b,_0x415b42),window['setTimeout'](_0x415b42,0x1d4c0);});}}_0x597292['on']('_sendUsageRequest',(_0x17f815,_0x13384a)=>{if(_0x13384a[0x0]!=_0x3a0b7c)return _0x4f9106('UsageLimit');_0x13384a[0x1]={..._0x13384a[0x1],'requestId':_0xd57424};},{'priority':'high'}),_0x597292['on']('_sendUsageRequest',_0x34f640=>{_0x158c88(_0x34f640['return'])&&(_0x340c37=!0x0,_0x4d26f3(_0x34f640['return']));},{'priority':'low'}),_0x179d73['then'](()=>{_0x340c37||_0x4f9106('UsageLimit');});});function _0x40f25b(){return'auto'==_0x597292['editing']['view']['_overlayModeHint'];}function _0x5b0d78(){_0x597292['editing']['view']['_overlayModeHint']='auto';}}function _0x297e39(_0x3268bf){const _0x1b6741=[new window['Promise'](_0x5153c1=>setTimeout(_0x5153c1,0x93ecc)),_0x179d73['then'](()=>new window['Promise'](_0x4f3ecf=>{let _0x423e43=0x0;_0x597292['model']['on']('applyOperation',(_0xd862ab,_0x1ee8d2)=>{_0x1ee8d2[0x0]['isDocumentOperation']&&_0x423e43++,0x5e8==_0x423e43&&(_0x4f3ecf(),_0xd862ab['off']());});}))];return window['Promise']['race'](_0x1b6741)['then'](()=>_0x3268bf);}async function _0xba7ba8(){await _0x179d73,_0x597292['model']['change']=_0x4f8ee4,_0x597292['model']['enqueueChange']=_0x4f8ee4,_0x597292['enableReadOnlyMode']('model');}function _0x5994bb(){return window['glob']&&window['glob']['triliumVersion'];}function _0x1b6842(){return _0x3d7611('WebSocketGateway')&&'connected'==_0x1b5dfc('WebSocketGateway')['state'];}function _0x32d5e8(){return _0x3d7611('RevisionViewerIntegration');}function _0x3a694b(){return _0x3d7611('TrackChangesDataGetter');}function _0x46886c(_0x39747e){const _0x1378d8=_0x23fb9e();_0x597292[_0x1378d8]='commentsLicenseKey'+_0x39747e,'Valid'!=_0x39747e&&_0xba7ba8();}function _0x23fb9e(){const _0x4eaede=window['String'](window['performance']['now']())['replace']('.','');let _0x296e03='m';for(let _0x2b3a96=0x0;_0x2b3a96<_0x4eaede['length'];_0x2b3a96+=0x2){let _0x420c88=window['parseInt'](_0x4eaede['substring'](_0x2b3a96,_0x2b3a96+0x2));_0x420c88>=0x3e&&(_0x420c88-=0x3e),_0x296e03+=_0x600455[_0x420c88];}return _0x296e03;}function _0x3d0f21(){const _0x53dbdb=_0x33c162['split']('.');if(0x3!=_0x53dbdb['length'])return null;return _0x194862(_0x53dbdb[0x1]);function _0x194862(_0x1684bb){const _0x1f640b=_0x4597d1(_0x1684bb);return _0x1f640b&&_0x4c5e85()?_0x1f640b:null;function _0x4c5e85(){const _0x216950=_0x1f640b['jti'],_0x524e3c=window['parseInt'](_0x216950['substring'](_0x216950['length']-0x8),0x10),_0x20dc55={..._0x1f640b,'jti':_0x216950['substring'](0x0,_0x216950['length']-0x8)};return delete _0x20dc55['vc'],_0x4dd490(_0x20dc55)==_0x524e3c;}}}async function _0xd2c0fc(){let _0x3dba95=!0x0;try{const [_0x27f226,_0x5801aa,_0x42d845]=_0x33c162['split']('.');return _0x3e4c21(_0x27f226),await _0x513054(_0x27f226,_0x5801aa,_0x42d845),_0x3dba95;}catch{return!0x1;}function _0x3e4c21(_0x132907){const _0x2d6ad4=_0x4597d1(_0x132907);_0x2d6ad4&&'ES256'==_0x2d6ad4['alg']||(_0x3dba95=!0x1);}async function _0x513054(_0x114fe0,_0x145c5b,_0x3a9f66){const _0x328b6b=window['Uint8Array']['from'](_0x3dcf41(_0x3a9f66),_0xceea31=>_0xceea31['charCodeAt'](0x0)),_0x286b17=new window['TextEncoder']()['encode'](_0x114fe0+'.'+_0x145c5b),_0x2ede48=window['crypto']['subtle'];if(!_0x2ede48)return;const _0x8da7dc=await _0x2ede48['importKey']('jwk',_0x13c9ee,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2ede48['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x8da7dc,_0x328b6b,_0x286b17)||(_0x3dba95=!0x1);}}function _0x4597d1(_0xa56ff6){return _0xa56ff6['startsWith']('ey')?JSON['parse'](_0x3dcf41(_0xa56ff6)):null;}function _0x3dcf41(_0x53e401){return window['atob'](_0x53e401['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4dd490(_0x298daf){let _0x381d6f=0x1505;function _0x4b0f3(_0x37e786){for(let _0x15ee79=0x0;_0x15ee79<_0x37e786['length'];_0x15ee79++){const _0x2037c4=_0x37e786['charCodeAt'](_0x15ee79);_0x381d6f=(_0x381d6f<<0x5)+_0x381d6f+_0x2037c4,_0x381d6f&=_0x381d6f;}}function _0x3a072f(_0x68170e){Array['isArray'](_0x68170e)?_0x68170e['forEach'](_0x3a072f):_0x68170e&&'object'==typeof _0x68170e?Object['entries'](_0x68170e)['sort']()['forEach'](([_0x3cad39,_0x187484])=>{_0x4b0f3(_0x3cad39),_0x3a072f(_0x187484);}):_0x4b0f3(window['String'](_0x68170e));}return _0x3a072f(_0x298daf),_0x381d6f>>>0x0;}function _0x3e8654(_0x3de032){return _0x3de032['toString'](0x10)['padStart'](0x8,'0');}function _0x19d64b(_0x14c34a){return _0x14c34a['split']('')['reverse']()['join']('');}function _0x3d7611(_0x151d92){return _0x597292['plugins']['has'](_0x151d92);}function _0x1b5dfc(_0x397e3e){return _0x597292['plugins']['get'](_0x397e3e);}function _0x4f8ee4(){}_0x46886c(await _0x5c2892());}_0x311c0a(_0x46df13['editor']);}(this);}destroy(){const _0x34606c=this['editor']['plugins']['get'](oi),_0x27eb29=this['editor']['config']['get']('collaboration.channelId');for(const _0x3356a4 of _0x34606c['getCommentThreads']({'channelId':_0x27eb29}))_0x34606c['_detachCommentThread'](_0x3356a4['id']),_0x34606c['_threads']['delete'](_0x3356a4['id']);super['destroy']();}['hasMarkerForId'](_0x2bd417){return this['getAllMarkersForId'](_0x2bd417)['length']>0x0;}getAllMarkersForId(_0x4a7cf4){const _0x1fd232=[];for(const _0x419a9c of this['editor']['model']['markers'])_0x419a9c['name']['startsWith']('comment:'+_0x4a7cf4)&&_0x1fd232['push'](_0x419a9c);return _0x1fd232;}['scrollToThreadMarker'](_0x4a7934){setTimeout(()=>{const _0x39be1a=this['_getTargetForId'](_0x4a7934);_0x39be1a&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4a7934&&_0x2a46da({'target':_0x39be1a[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0xc643f0){this['editor']['model']['change'](()=>{for(const _0x1f51c8 of this['getAllMarkersForId'](_0xc643f0))this['editor']['editing']['reconvertMarker'](_0x1f51c8);});}_attachArchivedThread(_0x31b9f4){const _0x3339c0=this['editor']['plugins']['get'](oi),_0x38bd42=this['editor']['plugins']['get'](di),_0xeb1560=_0x3339c0['getCommentThread'](_0x31b9f4);if(!_0xeb1560['isAttached']){const _0x24bd13=_0xeb1560['attachTo'](()=>this['_getTargetForId'](_0xeb1560['id']));_0x38bd42['registerAnnotation'](_0x24bd13),_0xeb1560['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x55c18d=this['editor'],_0x2b1ff2=_0x55c18d['plugins']['get'](_0x113f8b);_0x55c18d['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x54d678,_0x1af95d)=>{const {id:_0x4910dc}=fi(_0x54d678['markerName']),_0x1db21b=_0x55c18d['plugins']['get'](oi)['getCommentThread'](_0x4910dc),_0x5dfad4=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4910dc;let _0x419f9d;if(_0x1db21b&&_0x1db21b['isResolved']&&!_0x5dfad4&&_0x54d678['item'])return _0x1af95d['consumable']['consume'](_0x54d678['item'],'addMarker:'+_0x54d678['markerName']),_0x1af95d['consumable']['consume'](_0x54d678['item'],'removeMarker:'+_0x54d678['markerName']),null;const _0x2228b6=['ck-comment-marker'];return _0x5dfad4&&_0x2228b6['push']('ck-comment-marker--active'),_0x419f9d=_0x1db21b?.['length']?_0x1db21b['comments']['first']['author']['id']:_0x2b1ff2['me']['id'],{'classes':_0x2228b6,'attributes':{'data-comment':_0x4910dc,'data-author-id':_0x419f9d}};}}),_0x55c18d['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3d2dbd,{options:_0x1ed9f0})=>{if(_0x1ed9f0['showCommentHighlights'])return null;const _0x185b61=_0x55c18d['plugins']['get'](oi),_0x1085db=_0x55c18d['model']['markers']['get'](_0x3d2dbd),{id:_0x210333,part:_0x28f96d}=fi(_0x3d2dbd);return _0x1085db&&!_0x1085db['affectsData']||_0x1ed9f0['ignoreResolvedComments']&&_0x185b61['getCommentThread'](_0x210333)?.['isResolved']?null:{'group':'comment','name':_0x28f96d?_0x210333+':'+_0x28f96d:_0x210333};}}),_0x55c18d['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x431016,{writer:_0x3ba5b8})=>_0x3ba5b8['createElement']('$marker',{'data-name':'comment:'+_0x431016['getAttribute']('id')})}),_0x55c18d['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x59ffd8=this['editor'],_0x544027=_0x59ffd8['plugins']['get'](oi),_0x8200da=new Set(),_0x1971c3=new Set();_0x59ffd8['model']['document']['registerPostFixer'](_0x2d8ca5=>{let _0x1fa86d=!0x1;for(const {name:_0x580ee5,data:_0x1e48f6}of _0x59ffd8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x182ea8,id:_0x3250e3}=fi(_0x580ee5);let _0xb02123=_0x1e48f6['newRange'];if('comment'!==_0x182ea8||!_0xb02123)continue;const _0x122967='$graveyard'===_0xb02123['root']['rootName'];_0x122967||(_0xb02123=_i(_0xb02123,_0x59ffd8['model']),!_0xb02123||_0xb02123['isCollapsed']||!_0x1e48f6['newRange']||_0xb02123['isEqual'](_0x1e48f6['newRange']))?_0x59ffd8['model']['hasContent'](_0xb02123)&&!_0x122967?this['isThreadsLoadingPaused']?_0x8200da['add'](_0x580ee5):this['_handleThreadMarker'](_0x580ee5,_0x3250e3):(_0x1971c3['add'](_0x580ee5),_0x8200da['delete'](_0x580ee5),_0x2d8ca5['removeMarker'](_0x580ee5),_0x1fa86d=!0x0):(_0x2d8ca5['updateMarker'](_0x580ee5,{'range':_0xb02123}),_0x1fa86d=!0x0);}return _0x1fa86d;}),this['on']('change:isThreadsLoadingPaused',(_0x2d016e,_0x1d74d8,_0x59d3a1)=>{if(!_0x59d3a1&&_0x8200da['size'])for(const _0x4c5875 of _0x8200da){const {id:_0x4fced4}=fi(_0x4c5875);_0x8200da['delete'](_0x4c5875),_0x59ffd8['model']['markers']['get'](_0x4c5875)&&this['_handleThreadMarker'](_0x4c5875,_0x4fced4);}}),this['listenTo'](_0x59ffd8['model']['document'],'change',()=>{for(const {name:_0x2b7345,data:{newRange:_0xff17a3}}of _0x59ffd8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x131432,id:_0x5e5e6c}=fi(_0x2b7345);if('comment'!==_0x131432)continue;const _0x1a1622=_0x544027['getCommentThread'](_0x5e5e6c),_0x1ea6ac=this['hasMarkerForId'](_0x5e5e6c);_0x1a1622&&(!_0x1a1622['_hasTargetInContent']&&_0xff17a3&&_0x59ffd8['editing']['view']['once']('render',()=>{const _0x50fb56=_0x59ffd8['plugins']['get'](ti),_0x5d86ad=_0x544027['_threadToController']['get'](_0x1a1622)['view'];_0x50fb56['getByInnerView'](_0x5d86ad)['refreshVisibility']();},{'priority':'low'}),_0x1a1622['_hasTargetInContent']=_0x1ea6ac||!!_0xff17a3),_0xff17a3||(_0x1971c3['add'](_0x2b7345),_0x8200da['delete'](_0x2b7345));}for(const _0x15a20b of _0x1971c3){const {id:_0x36ad2c}=fi(_0x15a20b),_0x2ff396=_0x544027['getCommentThread'](_0x36ad2c);if(_0x8200da['delete'](_0x15a20b),!_0x2ff396)continue;const _0x34d670=this['hasMarkerForId'](_0x36ad2c);_0x34d670||_0x2ff396['isSubmitted']?_0x34d670||_0x2ff396['unlinkedAt']||_0x2ff396['setUnlinkedAt'](new Date()):_0x2ff396['remove']();}_0x1971c3['clear']();});}_handleInitialThreads(_0x7c6f89){_0x7c6f89['forEach'](_0x3a1197=>{_0x3a1197['unlinkedAt']&&this['_attachArchivedThread'](_0x3a1197['id']);});}_getTargetForId(_0x33d4f4){const _0x4a956a=this['editor'],_0x258d6d=this['getAllMarkersForId'](_0x33d4f4);return _0x453301(_0x4a956a['editing'],_0x258d6d);}_getTextContext(_0xb77652){const _0x4dd512=this['getAllMarkersForId'](_0xb77652);let _0x8a1ae3='',_0x969056=!0x1;for(const _0x57943c of _0x4dd512){const _0x3b877a=_0x57943c['getRange']();for(const _0x3aaef1 of Array['from'](_0x3b877a['getItems']()))_0x3aaef1['is']('$textProxy')?(_0x8a1ae3&&_0x969056&&(_0x8a1ae3+='\x20',_0x969056=!0x1),_0x8a1ae3+=_0x3aaef1['data']):_0x969056=!0x0;_0x969056=!0x0;}return _0x8a1ae3['substring'](0x0,0x96);}_attachMarkerToThread(_0x149880,_0x348f99){const _0x590471=this['editor'],_0x1a9ce9=_0x590471['plugins']['get'](oi);let _0x2cf71d=_0x1a9ce9['getCommentThread'](_0x348f99);const _0x7dcd41=_0x590471['config']['get']('collaboration.channelId'),_0x485e2e=_0x590471['plugins']['get'](di);return _0x2cf71d&&(_0x2cf71d['unlinkedAt']&&_0x2cf71d['setUnlinkedAt'](null),_0x2cf71d['isAttached'])||(this['getAllMarkersForId'](_0x348f99)[0x0]['managedUsingOperations']?_0x1a9ce9['fetchCommentThread']({'channelId':_0x7dcd41,'threadId':_0x348f99})['then'](_0x2c4da0=>{if('destroyed'!==_0x590471['state']){if(_0x2cf71d=_0x2c4da0,_0x2cf71d&&!_0x2cf71d['isAttached']){const _0x166934=_0x2cf71d['attachTo'](()=>this['_getTargetForId'](_0x348f99));_0x485e2e['registerAnnotation'](_0x166934),_0x2cf71d['isResolved']&&this['_reconvertMarkers'](_0x348f99);}else{if(!_0x2cf71d){const _0x165b6c=this['getAllMarkersForId'](_0x348f99);_0x590471['model']['change'](_0x4782e3=>{for(const _0x58aa6a of _0x165b6c)_0x4782e3['removeMarker'](_0x58aa6a);});}}}}):_0x590471['editing']['view']['once']('render',()=>{if(_0x1a9ce9['getCommentThread'](_0x348f99))return;const _0x3bcb5d=_0x590471['plugins']['get'](ti);_0x2cf71d=_0x1a9ce9['openNewCommentThread']({'channelId':_0x7dcd41,'threadId':_0x348f99,'target':()=>this['_getTargetForId'](_0x348f99),'context':{'type':'text','value':this['_getTextContext'](_0x348f99)}});const _0xef582b=_0x1a9ce9['_threadToController']['get'](_0x2cf71d)['view'],_0xd24361=_0x3bcb5d['getByInnerView'](_0xef582b);_0xd24361&&_0x485e2e['registerAnnotation'](_0xd24361);},{'priority':'low'})),_0x2cf71d;}['_handleThreadMarker'](_0x378963,_0x12296a){const _0x1e42d7=this['_attachMarkerToThread'](_0x378963,_0x12296a);_0x1e42d7&&!_0x1e42d7['context']&&_0x1e42d7['setContext']({'type':'text','value':this['_getTextContext'](_0x12296a)});}_initAriaMarkerChangeAnnouncements(){const _0x4d9eaa=this['editor'];_0x5003b4(_0x4d9eaa['model'],({left:_0x1f3946,entered:_0x57f60b})=>{for(const _0x37d16a of _0x1f3946)if(Ai(_0x37d16a)){_0x4d9eaa['ui']['ariaLiveAnnouncer']['announce'](Et(_0x4d9eaa['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2ba63f of _0x57f60b)if(Ai(_0x2ba63f)){_0x4d9eaa['ui']['ariaLiveAnnouncer']['announce'](Et(_0x4d9eaa['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x5d1020(_0x5eee32)));break;}});}};function gi(_0xe2d30b,_0x195d8e){return _0x195d8e?_0xe2d30b+':'+_0x195d8e:_0xe2d30b;}function _i(_0x25a1ed,_0x408ae1){const _0x2ba7c0=_0x408ae1['schema'],_0x4d0afb=_0x408ae1['createRange'](_0x25a1ed['start']);for(const _0x43ca52 of _0x25a1ed['getWalker']()){const {type:_0x21e10b,item:_0x5a2844,nextPosition:_0x43532c}=_0x43ca52;if('text'===_0x21e10b||_0x2ba7c0['isObject'](_0x5a2844)){const _0x2a380f=_0x408ae1['createPositionBefore'](_0x5a2844);_0x4d0afb['isCollapsed']&&(_0x4d0afb['start']=_0x2a380f),_0x4d0afb['end']=_0x43532c;}}return _0x4d0afb;}function Ai(_0xb918ab){return'comment'===fi(_0xb918ab['name'])['group'];}var vi=class extends _0x21dd8e{['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 _0x2f24e3=this['editor'],_0x1b72a7=_0x2f24e3['plugins']['get'](oi),_0x140f0e=_0x2f24e3['plugins']['get'](wi),_0x3796a0=_0x2f24e3['plugins']['get'](ti),_0x4d4b06=_0x2f24e3['plugins']['get'](di);_0x2f24e3['ui']['componentFactory']['add']('comment',()=>{const _0x45ce8b=this['_createUIButton'](_0x4c08d5);return _0x45ce8b['tooltip']=!0x0,_0x45ce8b;}),_0x2f24e3['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x4d4b06['addSourceCollector'](()=>{const _0x4c0ecb=[];for(const [_0x4290a8,_0x5e02b2]of _0x1b72a7['_threadToController']){const _0x5eb766=_0x140f0e['getAllMarkersForId'](_0x4290a8['id']),_0x5b77fe=_0x5eb766['map'](_0x147ad4=>_0x147ad4['getRange']());_0x5eb766['length']>0x0&&_0x4c0ecb['push']([_0x5e02b2['view'],_0x5b77fe]);}return _0x4c0ecb;}),this['listenTo'](_0x3796a0,'change:activeAnnotations',(_0x2bdc97,_0x180a3d,_0x5dd123)=>{const _0x3ea8e8=Array['from'](_0x5dd123)['map'](_0x38550c=>_0x38550c['innerView'])['find'](_0x4067c9=>_0x1b72a7['_viewToController']['has'](_0x4067c9));if(!_0x3ea8e8)return void(_0x140f0e['activeMarker']=null);const _0x3c71ee=_0x1b72a7['_viewToController']['get'](_0x3ea8e8)['model']['id'],_0x28a19a='comment:'+_0x3c71ee;_0x3c71ee&&_0x140f0e['hasMarkerForId'](_0x3c71ee)?_0x140f0e['activeMarker']=_0x28a19a:_0x140f0e['activeMarker']&&(_0x140f0e['activeMarker']=null);}),this['listenTo'](_0x1b72a7,'removeCommentThread',(_0x2af921,{threadId:_0x15eaf2,isFromAdapter:_0x42da21})=>{!_0x42da21&&_0x2f24e3['ui']['focusTracker']['isFocused']&&_0x140f0e['hasMarkerForId'](_0x15eaf2)&&_0x2f24e3['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x1b72a7,'addComment',(_0x250283,{threadId:_0x545d49,isFromAdapter:_0x6ae28d})=>{!_0x6ae28d&&_0x140f0e['hasMarkerForId'](_0x545d49)&&_0x1b72a7['hasCommentThread'](_0x545d49)&&0x1===_0x1b72a7['getCommentThread'](_0x545d49)['length']&&(_0x2f24e3['editing']['view']['focus'](),_0x250283['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x7760a=[this['editor']];for(const _0x31fe44 of _0x7760a){let _0xf2b1aa;for(const _0xc23910 in _0x31fe44){const _0x572727=_0xc23910,_0x1639bc=_0x31fe44[_0x572727];if('commentsLicenseKeyValid'==_0x1639bc||'commentsLicenseKeyInvalid'==_0x1639bc||'commentsLicenseKeyExpired'==_0x1639bc||'commentsLicenseKeyDomainLimit'==_0x1639bc||'commentsLicenseKeyNotAllowed'==_0x1639bc||'commentsLicenseKeyEvaluationLimit'==_0x1639bc||'commentsLicenseKeyUsageLimit'==_0x1639bc){delete _0x31fe44[_0x572727],_0xf2b1aa=_0x1639bc,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xf2b1aa&&_0x31fe44['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xf2b1aa&&_0x31fe44['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xf2b1aa&&_0x31fe44['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xf2b1aa&&_0x31fe44['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xf2b1aa&&_0x31fe44['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0xf2b1aa&&_0x31fe44['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x382c90){const _0x24a677=this['editor'],_0x11f377=new _0x382c90(_0x24a677['locale']),_0x78a2dc=_0x24a677['commands']['get']('addCommentThread');return _0x11f377['set']({'label':Et(_0x24a677['locale'],'Comment'),'icon':_0x3c4fba}),_0x11f377['bind']('isEnabled')['to'](_0x78a2dc,'isEnabled',_0x78a2dc,'hasContent',(_0x5a35f5,_0x185dad)=>_0x5a35f5&&_0x185dad),this['listenTo'](_0x11f377,'execute',()=>{_0x78a2dc['execute']();}),_0x11f377;}},yi=class extends _0x21dd8e{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x44483f){super(_0x44483f),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x24b0c9,_0x658f4e,_0x50ae4e)=>{_0x50ae4e?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0xb89a3c,_0x301876]of this['editor']['commands'])_0x301876['affectsData']&&'addCommentThread'!==_0xb89a3c&&_0x301876['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 _0x481ec2=this['editor']['editing']['view']['document'];this['listenTo'](_0x481ec2,'cut',_0x182565=>_0x182565['stop'](),{'priority':'highest'}),this['listenTo'](_0x481ec2,'clipboardInput',_0x52c82=>_0x52c82['stop'](),{'priority':'highest'}),this['listenTo'](_0x481ec2,'delete',_0x3caa56=>_0x3caa56['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0xca7d6c,_0x362d45]of this['editor']['commands'])_0x362d45['affectsData']&&'addCommentThread'!==_0xca7d6c&&_0x362d45['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 _0x4d5bc5{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x231a12){super(_0x231a12),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x41dc91=this['context']['plugins']['get'](ti);this['listenTo'](_0x41dc91,'_activateAnnotation',(_0x3a37f9,_0x31c24c)=>{for(const _0x7b762 of this['activeUIs']){const _0x365813=this['_uis']['get'](_0x7b762);(0x0,this['uisData']['get'](_0x7b762)['filter'])(_0x31c24c)&&_0x365813['setActiveAnnotation'](_0x31c24c);}}),this['listenTo'](_0x41dc91,'_deactivateAllAnnotations',()=>{for(const _0x2d91a0 of this['activeUIs'])this['_uis']['get'](_0x2d91a0)['setActiveAnnotation'](null);}),this['listenTo'](_0x41dc91['_visibleAnnotations'],'add',(_0x335218,_0x24bd21)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x24bd21);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x4f106a){return this['activeUIs']['has'](_0x4f106a);}activate(_0x701c7b,_0x598b73=this['defaultFilter']){const _0x44ecf4=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x701c7b))throw new _0x148717('annotationsuis-missing-ui',this,{'uiName':_0x701c7b});this['isActive'](_0x701c7b)&&this['deactivate'](_0x701c7b),this['activeUIs']['add'](_0x701c7b);const _0x45b197=new Jt();Qt({'source':_0x44ecf4['_visibleAnnotations'],'target':_0x45b197,'filter':_0x598b73}),this['uisData']['set'](_0x701c7b,{'collection':_0x45b197,'filter':_0x598b73});const _0x6fc418=this['_uis']['get'](_0x701c7b);_0x6fc418['attach'](_0x45b197),this['listenTo'](_0x6fc418,'change:activeAnnotation',(_0x445cca,_0xe1d058,_0x43fb1e,_0x3cafa5)=>{_0x3cafa5&&_0x44ecf4['_removeActiveAnnotation'](_0x3cafa5),_0x43fb1e&&_0x44ecf4['_addActiveAnnotation'](_0x43fb1e);});}deactivate(_0x52be0b){if(this['activeUIs']['delete'](_0x52be0b),!this['_uis']['has'](_0x52be0b))throw new _0x148717('annotationsuis-missing-ui',this,{'uiName':_0x52be0b});const _0x5a0549=this['_uis']['get'](_0x52be0b);_0x5a0549['detach'](),this['stopListening'](_0x5a0549),this['uisData']['get'](_0x52be0b)['collection']['destroy'](),this['uisData']['delete'](_0x52be0b);}switchTo(_0x1e250f){if(!this['_uis']['has'](_0x1e250f))throw new _0x148717('annotationsuis-missing-ui',this,{'uiName':_0x1e250f});const _0x2c4759=this['context']['plugins']['get'](ti),_0xcd7b11=Array['from'](_0x2c4759['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1e250f);const _0x1de59c=this['_uis']['get'](_0x1e250f);_0x1de59c['setActiveAnnotation'](_0xcd7b11),_0x1de59c['_setSelectedAnnotations']&&_0xcd7b11&&_0x1de59c['_setSelectedAnnotations']([_0xcd7b11]);}deactivateAll(){for(const _0x38f65c of this['activeUIs'])this['deactivate'](_0x38f65c);}register(_0x444705,_0x47cf01){if(this['_uis']['has'](_0x444705))throw new _0x148717('annotationsuis-register-already-registered');if('function'!=typeof _0x47cf01['attach']||'function'!=typeof _0x47cf01['detach']||'function'!=typeof _0x47cf01['setActiveAnnotation'])throw new _0x148717('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x444705,_0x47cf01);}refilterAnnotations(){const _0x7f96d4=this['context']['plugins']['get'](ti)['collection'],_0x5c0b24=new Map(),_0x203df4=Array['from'](this['activeUIs']);for(const _0x1c03cf of this['activeUIs']){const _0x48f48c=this['uisData']['get'](_0x1c03cf)['collection'];for(const _0x57af6c of _0x48f48c)_0x5c0b24['set'](_0x57af6c,_0x1c03cf);}for(const _0x2494d8 of _0x7f96d4){const _0x441c95=_0x5c0b24['get'](_0x2494d8);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2494d8);const _0x2e6e3f=_0x203df4['find'](_0x144e12=>this['uisData']['get'](_0x144e12)['filter'](_0x2494d8));_0x441c95!==_0x2e6e3f&&(_0x441c95&&this['uisData']['get'](_0x441c95)['collection']['remove'](_0x2494d8),_0x2e6e3f&&this['uisData']['get'](_0x2e6e3f)['collection']['add'](_0x2494d8));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x3948ac){const _0x1464a6=[];for(const _0x1529bb of this['activeUIs']){(0x0,this['uisData']['get'](_0x1529bb)['filter'])(_0x3948ac)&&_0x1464a6['push'](_0x1529bb);}if(_0x1464a6['length']>0x1)throw new _0x148717('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1464a6,'annotationType':_0x3948ac['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x1e6dbe('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x43e9ff){super(_0x43e9ff);const _0x444ce6=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 _0x2676e3(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x444ce6['to']('class')],'style':{'minHeight':_0x444ce6['to']('minHeight',_0x2a14a8=>'number'==typeof _0x2a14a8?Ci(_0x2a14a8+0xa):null)},'dir':_0x43e9ff['uiLanguageDirection'],'role':'application','aria-label':Et(_0x43e9ff,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x43e9ff,'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',_0x5cf034=>{this['_updateItemPositionInFocusables'](_0x5cf034['source']);}),this['list']['forEach'](_0x54bc6d=>{this['focusTracker']['add'](_0x54bc6d['element']),this['_updateItemPositionInFocusables'](_0x54bc6d);}),this['list']['on']('change',(_0x693105,_0x2db513)=>{for(const _0x2c7bb4 of _0x2db513['removed'])this['focusTracker']['remove'](_0x2c7bb4['element']),this['focusables']['remove'](_0x2c7bb4);for(const _0x47a24e of _0x2db513['added'])this['focusTracker']['add'](_0x47a24e['element']),this['_updateItemPositionInFocusables'](_0x47a24e);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x26da9c){const _0x5807f2=this['focusables']['getIndex'](_0x26da9c);let _0x1f50a3,_0x1d2e2f;for(const _0x139734 of this['focusables'])if(_0x26da9c['top']<_0x139734['top']){_0x1f50a3=_0x139734;break;}if(_0x1d2e2f=_0x1f50a3?this['focusables']['getIndex'](_0x1f50a3):this['focusables']['length'],-0x1!==_0x5807f2){if(_0x5807f2===_0x1d2e2f-0x1)return;this['focusables']['remove'](_0x26da9c),_0x1d2e2f=_0x1f50a3?this['focusables']['getIndex'](_0x1f50a3):this['focusables']['length'];}this['focusables']['add'](_0x26da9c,_0x1d2e2f);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x1e6dbe('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x4c1bf3){super(_0x4c1bf3),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x250427,_0x5e41ca)=>_0x250427+_0x5e41ca),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x25470c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x25470c['to']('isAnimationDisabled',_0x551e6c=>_0x551e6c?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x25470c['to']('top',_0x4df35d=>bi(_0x4df35d))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x5db779=this['element']['clientHeight'];_0x5db779&&(this['height']=_0x5db779);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x4d5bc5{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51b51c){super(_0x51b51c),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 _0x3cc468=this['context']['config']['get']('sidebar.container');_0x3cc468&&this['setContainer'](_0x3cc468);}setContainer(_0x62aa6e){if(!Oi(_0x62aa6e))throw new _0x148717('sidebar-setcontainer-invalid-element');this['container']=_0x62aa6e;}_attachToContainer({viewClass:_0x2928e3='',spaceBetweenItems:_0x1c5ba7=0x19}={}){if(!Oi(this['container']))throw new _0x148717('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2928e3,this['_spaceBetweenItems']=_0x1c5ba7;}['rearrange']({removedAnnotation:_0x2bbef8,previousAnnotation:_0x1952b7,nextAnnotation:_0x125321}){const _0x2f0925=this['getSidebarItemView'](_0x2bbef8);this['view']['list']['remove'](_0x2f0925),this['_destroySidebarItemView'](_0x2bbef8),_0x1952b7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1952b7)),_0x125321&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x125321)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x17ab18,activatedAnnotation:_0x4e98c0,disableAnimationOnActivatedAnnotation:_0x17e0ba}){if(this['_activeAnnotation']=_0x4e98c0,_0x17ab18){_0x17ab18['isActive']=!0x1;const _0x1eec77=this['getSidebarItemView'](_0x17ab18);_0x1eec77&&_0x17e0ba&&(_0x1eec77['isAnimationDisabled']=!0x1);}if(_0x4e98c0){const _0x598b1b=this['getSidebarItemView'](_0x4e98c0);_0x598b1b&&(_0x4e98c0['isActive']=!0x0,_0x17e0ba&&(_0x598b1b['isAnimationDisabled']=!0x0,_0x598b1b['top']+=0x1),this['_alignToTargetRect'](_0x598b1b));}}_detachFromContainer(_0x222fdb){if(this['view']['element']['remove'](),_0x222fdb){for(const _0x4395db of _0x222fdb)this['_destroySidebarItemView'](_0x4395db);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x973058,_0x271014){_0x271014||(_0x271014=_0x973058['view']);const _0x3997dd=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3997dd,_0x973058),this['_annotationToSidebarItemView']['set'](_0x973058,_0x3997dd),_0x3997dd['content']['add'](_0x271014),this['listenTo'](_0x973058['view'],'change:targetRect',(_0x2f9f40,_0x504a17,_0x32411c)=>{const _0x3c03f2=this['_getTargetTop'](_0x973058,_0x32411c);_0x3997dd['_targetTop']!=_0x3c03f2&&(_0x3997dd['_targetTop']=_0x3c03f2,this['_setItemTop'](_0x3997dd,_0x3c03f2));}),this['listenTo'](_0x3997dd,'change:top',()=>{this['_recalculate'](_0x3997dd,'top');}),this['listenTo'](_0x3997dd,'change:bottom',()=>{this['_recalculate'](_0x3997dd,'bottom');}),this['_alignToTargetRect'](_0x3997dd);const _0x2ddc8a=this['_getItemBefore'](_0x3997dd);return _0x2ddc8a&&this['_alignAfterItem'](_0x2ddc8a,_0x3997dd)||this['_alignToTargetRect'](_0x3997dd),this['_updateLastItem'](),this['view']['list']['add'](_0x3997dd),_0x3997dd;}['_alignForTopChange'](_0x319470){if(!_0x319470['content']['length'])return;const _0x31cf73=this['_getItemBefore'](_0x319470);if(!_0x31cf73)return;const _0x11f951=this['_sidebarItemViewToAnnotation']['get'](_0x31cf73),_0xa00ad8=this['_activeAnnotation'];_0xa00ad8&&_0xa00ad8===_0x11f951?this['_alignAfterItem'](_0x31cf73,_0x319470):this['_alignBeforeItem'](_0x319470,_0x31cf73);}_alignForBottomChange(_0x472220){if(!_0x472220['content']['length'])return;const _0x11e78e=this['_getItemAfter'](_0x472220);if(!_0x11e78e)return;const _0x20ed45=this['_sidebarItemViewToAnnotation']['get'](_0x11e78e),_0x346c13=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x281d77=this['_activeAnnotation'];_0x281d77&&_0x281d77===_0x20ed45&&_0x346c13?(this['_alignBeforeItem'](_0x11e78e,_0x472220),this['_alignAfterItem'](_0x472220,_0x11e78e)):_0x281d77&&_0x281d77===_0x20ed45?this['_alignBeforeItem'](_0x11e78e,_0x472220):this['_alignAfterItem'](_0x472220,_0x11e78e);}_recalculate(_0x5aec41,_0x44dcfc){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x33bc45,changedProp:_0x1cb91c}of this['_recalculateBuffer'])'top'===_0x1cb91c?this['_alignForTopChange'](_0x33bc45):this['_alignForBottomChange'](_0x33bc45);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5aec41,'changedProp':_0x44dcfc});}getSidebarItemView(_0x3db126){return this['_annotationToSidebarItemView']['get'](_0x3db126);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0xb2569c){const _0x41540c=this['getSidebarItemView'](_0xb2569c);this['stopListening'](_0x41540c),this['stopListening'](_0xb2569c['view']),_0x41540c['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xb2569c),this['_sidebarItemViewToAnnotation']['delete'](_0x41540c);}_createSidebarView(){const _0x3d3a47=new Ii(this['context']['locale']);return _0x3d3a47['render'](),this['on']('change:_lastItem',(_0x51379b,_0x334c8f,_0x3e2036,_0x314076)=>{_0x314076&&_0x3d3a47['unbind']('minHeight'),_0x3e2036?_0x3d3a47['bind']('minHeight')['to'](_0x3e2036,'bottom'):_0x3d3a47['minHeight']=null;}),_0x3d3a47;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x134495){const _0x5431d8=this['_sidebarItemViewToAnnotation']['get'](_0x134495),_0xe350da=_0x5431d8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5431d8)-0x1);return _0xe350da&&this['getSidebarItemView'](_0xe350da)||null;}_getItemAfter(_0x405603){const _0x36ae05=this['_sidebarItemViewToAnnotation']['get'](_0x405603),_0x1408f5=_0x36ae05&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x36ae05)+0x1);return _0x1408f5&&this['getSidebarItemView'](_0x1408f5)||null;}_alignBeforeItem(_0x9de108,_0x3c87a6){_0x9de108['updateHeight']();const _0x1c55a2=Ni(_0x3c87a6['bottom']+this['_spaceBetweenItems'],_0x9de108['top']);return!!_0x1c55a2&&(this['_setItemTop'](_0x3c87a6,_0x3c87a6['top']-_0x1c55a2),!0x0);}_alignAfterItem(_0x2ba230,_0x5e92b9){_0x2ba230['updateHeight']();const _0x45f3e0=Ni(_0x2ba230['bottom']+this['_spaceBetweenItems'],_0x5e92b9['top']);return!!_0x45f3e0&&(this['_setItemTop'](_0x5e92b9,_0x5e92b9['top']+_0x45f3e0,!0x1),!0x0);}_alignToTargetRect(_0x2efd74){const _0x1c0f94=this['_sidebarItemViewToAnnotation']['get'](_0x2efd74);if(!_0x1c0f94||!_0x1c0f94['target']||!_0x1c0f94['targetRect'])return;const _0x2895b5=this['_getTargetTop'](_0x1c0f94,_0x1c0f94['targetRect']);this['_setItemTop'](_0x2efd74,_0x2895b5);}_getTargetTop(_0x187cda,_0x540072){if(null===_0x540072)return 0x0;if(_0x187cda['target']instanceof _0x31427d)return _0x540072['top'];{const _0x37ac7c=new _0x31427d(this['view']['element'])['top'];return _0x540072['top']-_0x37ac7c;}}_setItemTop(_0x37771b,_0x3371a1,_0x21d666=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x21d666&&(_0x3371a1=Math['max'](_0x3371a1,this['_getMaxAvailableTop'](_0x37771b))),_0x37771b['top']=_0x3371a1;}_getMaxAvailableTop(_0x4c5d5a){let _0x1aa20d=this['_getItemBefore'](_0x4c5d5a),_0x5e4cc5=0x0;for(;_0x1aa20d;)_0x1aa20d['updateHeight'](),_0x5e4cc5+=this['_spaceBetweenItems']+_0x1aa20d['height'],_0x1aa20d=this['_getItemBefore'](_0x1aa20d);return _0x5e4cc5;}};function Ni(_0x2b7d04,_0x2b852f){return Math['max'](_0x2b7d04-_0x2b852f,0x0);}function Oi(_0x725812){return null!==_0x725812&&'object'==typeof _0x725812&&0x1===_0x725812['nodeType'];}var Mi=class extends _0x4d5bc5{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(_0x2b7ef9){super(_0x2b7ef9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2e431b(),this['_refreshPositioningDebounced']=_0x3b47aa(()=>{_0x2b7ef9['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x5f1844=this['context']['plugins']['get'](Ti),_0x4796dd=this['context']['plugins']['get'](ki);_0x5f1844['register']('wideSidebar',this),_0x4796dd['container']&&_0x5f1844['switchTo']('wideSidebar');}setActiveAnnotation(_0x313325){if(_0x313325===this['activeAnnotation'])return;const _0xe37b7c=this['context']['plugins']['get'](ki);_0xe37b7c['_activeAnnotation']=_0x313325;const _0x558f94=this['activeAnnotation'];_0xe37b7c['refresh']({'blurredAnnotation':_0x558f94,'activatedAnnotation':_0x313325}),this['activeAnnotation']=_0x313325;}attach(_0x52de77){this['annotations']=_0x52de77;const _0xcb934f=this['context']['plugins']['get'](ki);if(_0xcb934f['_annotations']=_0x52de77,this['isAttached'])throw new _0x148717('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xcb934f,'set:container',()=>{this['detach'](),this['listenTo'](_0xcb934f,'change:container',_0x4f7efc=>{_0x4f7efc['off'](),this['attach'](_0x52de77);});}),_0xcb934f['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x54af8f=_0x21123f=>{_0x21123f['updateTargetRect'](),_0xcb934f['addAnnotation'](_0x21123f);};for(const _0xcbf81a of _0x52de77)_0x54af8f(_0xcbf81a);this['listenTo'](_0x52de77,'add',(_0x30ca66,_0x168dab)=>{_0x54af8f(_0x168dab);}),this['listenTo'](_0x52de77,'remove',(_0x2628b1,_0x477032,_0xbe3a69)=>{_0xcb934f['rearrange']({'removedAnnotation':_0x477032,'previousAnnotation':_0x52de77['get'](_0xbe3a69-0x1),'nextAnnotation':_0x52de77['get'](_0xbe3a69+0x1)}),_0x477032===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x52de77,'focus',(_0x61a1c5,_0x569f76)=>{this['setActiveAnnotation'](_0x569f76);}),this['listenTo'](_0x52de77,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5167cc=this['context']instanceof _0x33c2fe?this['context']['editors']:new _0x2e431b([this['context']]);for(const _0x53c927 of _0x5167cc)this['_integrateWithEditorAnnotations'](_0x53c927);this['listenTo'](_0x5167cc,'add',(_0x52459b,_0x3a20af)=>{this['listenTo'](_0x3a20af,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3a20af);});}),this['listenTo'](_0x5167cc,'remove',(_0x271f69,_0x1ebfba)=>{_0x1ebfba['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1ebfba['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x148717('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x360764=this['context']['plugins']['get'](ki);_0x360764['_detachFromContainer'](this['annotations']),this['stopListening'](_0x360764),this['stopListening'](this['annotations']),this['context']instanceof _0x33c2fe&&this['stopListening'](this['context']['editors']);for(const _0x397c8c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x397c8c);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x47c266){if(!_0x47c266['plugins']['has']('EditorAnnotations'))return;const _0x3ca7b9=_0x47c266['plugins']['get']('EditorAnnotations'),_0x2e4309=()=>{const _0x3b897b=_0x3ca7b9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3b897b[0x0]||null);};this['listenTo'](_0x3ca7b9,'refresh',_0x2e4309),this['listenTo'](_0x3ca7b9,'blur',(_0x302eb3,{isAnnotationTracked:_0x45c6fb})=>{this['activeAnnotation']&&_0x45c6fb(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3ca7b9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x328ba2=>{_0x3ca7b9['hasDomSelection']()&&(_0x2e4309(),_0x328ba2['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3ca7b9);}_destroyEditorAnnotationsIntegration(_0x5a3b68){this['stopListening'](_0x5a3b68),this['_editorAnnotations']['remove'](_0x5a3b68);}},Ri=class extends _0x4c08d5{counterView;constructor(_0x33b752){super(_0x33b752);const _0x2be560=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5001b6,_0xbba57)=>_0x5001b6?'...':_0xbba57['toString']()),this['set']('annotationType',''),this['icon']=_0x3c4fba,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2be560['to']('annotationType',_0x365ab1=>'ck-annotation-counter__badge--'+_0x365ab1),_0x2be560['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2be560['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x4d5bc5{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(_0x18d519){super(_0x18d519),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x37c7f0())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2e431b(),this['_refreshPositioningDebounced']=_0x3b47aa(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2a095d(this['context']['locale']),this['balloonPanelView']=new _0xbad81b(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x4c40a6){this['annotations']=_0x4c40a6;const _0x5797fb=this['context']['plugins']['get'](ki),_0x1966d4=this['balloonPanelView'];if(_0x5797fb['_annotations']=_0x4c40a6,this['isAttached'])throw new _0x148717('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5797fb,'set:container',()=>{this['detach'](),this['listenTo'](_0x5797fb,'change:container',_0x5075be=>{_0x5075be['off'](),this['attach'](_0x4c40a6);});}),_0x5797fb['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x422fde=_0x14da1e=>{const _0x124f3e=new Ri(this['context']['locale']);_0x5797fb['addAnnotation'](_0x14da1e,_0x124f3e),this['_annotationToNarrowView']['set'](_0x14da1e,_0x124f3e),_0x124f3e['bind']('isDirty','annotationType','number')['to'](_0x14da1e['view'],'isDirty','type','length'),_0x124f3e['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1966d4['content']['first']!==_0x14da1e['view']?(this['_showBalloon'](_0x14da1e),_0x14da1e['view']['element']['focus'](),this['setActiveAnnotation'](_0x14da1e)):this['setActiveAnnotation'](null);});};for(const _0x516442 of _0x4c40a6)_0x422fde(_0x516442);this['listenTo'](_0x4c40a6,'add',(_0x27b87b,_0x42bf00)=>{_0x422fde(_0x42bf00);}),this['listenTo'](_0x4c40a6,'remove',(_0x38780f,_0x1cc50d,_0x1a613f)=>{this['_annotationToNarrowView']['get'](_0x1cc50d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1cc50d),_0x5797fb['rearrange']({'removedAnnotation':_0x1cc50d,'previousAnnotation':_0x4c40a6['get'](_0x1a613f-0x1),'nextAnnotation':_0x4c40a6['get'](_0x1a613f+0x1)}),_0x1cc50d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4c40a6,'focus',(_0x312639,_0x56a15b)=>{this['setActiveAnnotation'](_0x56a15b);}),this['listenTo'](_0x4c40a6,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x6bb0ca,_0x38a9f5)=>{_0x38a9f5['keyCode']===_0x29597a['esc']&&_0x1966d4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1966d4['content']['first']),this['_hideBalloon'](),_0x38a9f5['stopPropagation'](),_0x38a9f5['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x22b4ed,_0x2c3c1d)=>{const _0x5d0c43=_0x2c3c1d['target'];_0x1966d4['isVisible']&&_0x1966d4['element']['contains'](_0x5d0c43)||_0x5797fb['view']['element']['contains'](_0x5d0c43)||_0x22b4ed['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4d021e=>_0x4d021e['contains'](_0x5d0c43))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3c6ed4=this['context']instanceof _0x33c2fe?this['context']['editors']:new _0x2e431b([this['context']]);for(const _0xeac338 of _0x3c6ed4)this['_integrateWithEditorAnnotations'](_0xeac338);this['listenTo'](_0x3c6ed4,'add',(_0x1c4e56,_0x39a974)=>{this['listenTo'](_0x39a974,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x39a974);});}),this['listenTo'](_0x3c6ed4,'remove',(_0x1f1afe,_0xd893ec)=>{_0xd893ec['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xd893ec['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x529978){if(_0x529978===this['activeAnnotation'])return;const _0x6b4ce5=this['context']['plugins']['get'](ki);_0x6b4ce5['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x529978,'disableAnimationOnActivatedAnnotation':!0x0}),_0x529978&&_0x6b4ce5['getSidebarItemView'](_0x529978)?this['_showBalloon'](_0x529978):this['_hideBalloon'](),this['activeAnnotation']=_0x529978;}detach(){if(!this['isAttached'])throw new _0x148717('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1b9df0=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x12aec8=>_0x12aec8['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1b9df0['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x33c2fe&&this['stopListening'](this['context']['editors']);for(const _0x72ed70 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x72ed70);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(_0x52a401){if(!_0x52a401['plugins']['has']('EditorAnnotations'))return;const _0xc23705=_0x52a401['plugins']['get']('EditorAnnotations'),_0x4dfda7=this['context']['plugins']['get'](ki),_0x23a6bc=this['annotations'],_0x7ef15=this['balloonPanelView'],_0xb8887=()=>{const _0xbf0156=_0xc23705['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xbf0156),this['setActiveAnnotation'](_0xbf0156[0x0]||null);};this['listenTo'](_0xc23705,'refresh',_0xb8887),this['listenTo'](_0xc23705,'blur',(_0x2e15f7,{isAnnotationTracked:_0x27ffbc})=>{this['activeAnnotation']&&_0x27ffbc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xc23705,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x23a6bc,'blur',_0x208ac7=>{_0xc23705['hasDomSelection']()&&_0x208ac7['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xd97067,_0x34f2e1)=>{const _0xbecd2=_0x34f2e1['target'];_0x7ef15['isVisible']&&_0x7ef15['element']['contains'](_0xbecd2)||_0x4dfda7['view']['element']['contains'](_0xbecd2)||this['activeAnnotation']&&_0xc23705['hasDomSelection']()&&(_0xb8887(),_0xd97067['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0xc23705);}_destroyEditorAnnotationsIntegration(_0x216f84){_0x216f84&&(this['stopListening'](_0x216f84),this['_editorAnnotations']['remove'](_0x216f84));}_setSelectedAnnotations(_0x57cb5f){for(const _0x452e3f of this['_selectedAnnotations'])_0x57cb5f['includes'](_0x452e3f)||this['_manuallyClosedAnnotationViews']['delete'](_0x452e3f['view']);this['_selectedAnnotations']=_0x57cb5f;}_refreshPositioning(){const _0x19fadf=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x19fadf['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x128522){if(this['_manuallyClosedAnnotationViews']['has'](_0x128522['view']))return;const _0x4bab49=this['balloonPanelView']['content']['first'];_0x4bab49!==_0x128522['view']?(_0x4bab49&&this['_detachListeners'](_0x4bab49),this['_attachListeners'](_0x128522['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x128522['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x367ba8=this['balloonPanelView']['content']['first'],_0x105ac1=_0x367ba8&&this['annotations']['getByView'](_0x367ba8);if(!_0x105ac1||!this['_annotationToNarrowView']['has'](_0x105ac1))return;const _0x3c20f3=this['_annotationToNarrowView']['get'](_0x105ac1)['element'],_0x32d2f1=(function(){const _0x4fd9da=_0xbad81b['defaultPositions'];return[_0x4fd9da['southArrowNorthEast'],_0x4fd9da['northArrowSouthEast'],_0x4fd9da['southArrowNorth'],_0x4fd9da['northArrowSouth'],_0x4fd9da['southArrowNorthWest'],_0x4fd9da['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3c20f3,'positions':_0x32d2f1});}['_hideBalloon'](){const _0x921fd8=this['balloonPanelView'],_0x369972=_0x921fd8['content']['first'];_0x369972&&(this['_detachListeners'](_0x369972),_0x921fd8['unpin'](),_0x921fd8['content']['clear']());}_attachListeners(_0x4d9a69){this['listenTo'](_0x4d9a69,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4d9a69,'Esc',(_0x45720f,_0x48970d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4d9a69),this['_hideBalloon'](),_0x48970d();});}_detachListeners(_0x551feb){this['stopListening'](_0x551feb);}},xi=class extends _0x21dd8e{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x15ba93,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19e64b){super(_0x19e64b),_0x19e64b['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x19e64b['plugins']['get'](_0x15ba93),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x3b47aa(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x52b9c7=this['editor']['plugins']['get'](Ti);_0x52b9c7['context']===this['editor']&&(_0x52b9c7['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x414345,_0x1dee15)=>{const _0x12e173=this['_balloon'];if(this['isAttached']&&_0x12e173['visibleView']){const _0x4958fb=this['annotations']['getByView'](_0x12e173['visibleView']);_0x4958fb&&this['_closeAnnotation'](_0x4958fb),_0x1dee15();}}));}afterInit(){const _0x53b399=this['editor']['plugins']['get'](Ti);_0x53b399['context']===this['editor']&&(_0x53b399['hasActive']()||_0x53b399['switchTo']('inline'));}setActiveAnnotation(_0x4e6299){_0x4e6299!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4e6299&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4e6299)&&this['_addAnnotationToBalloon'](_0x4e6299,!0x0),_0x4e6299['isActive']=!0x0),_0x4e6299||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4e6299);}attach(_0x5d0bde){this['annotations']=_0x5d0bde;const _0x51a982=this['editor']['plugins']['get'](Ti),_0x3fbbc9=this['_balloon'];if(this['isAttached'])throw new _0x148717('inlineannotations-attach-already-attached',this);if(_0x51a982['context']!==this['editor'])throw new _0x148717('inlineannotations-not-allowed-with-context',this);const _0x555b36=this['editor']['plugins']['get'](di);this['listenTo'](_0x555b36,'refresh',()=>{const _0x432ca7=_0x555b36['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3387c2,_0xade2f;!this['_forceRefresh']&&(_0x3387c2=_0x432ca7,_0xade2f=this['_selectedAnnotations'],_0x3387c2['length']===_0xade2f['length']&&_0x3387c2['every'](_0x389ab3=>_0xade2f['includes'](_0x389ab3)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x432ca7),this['setActiveAnnotation'](_0x432ca7[0x0]||null));}),this['listenTo'](_0x555b36,'blur',(_0x201114,{isAnnotationTracked:_0x2241dd})=>{this['activeAnnotation']&&_0x2241dd(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x555b36,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1cb91b,_0x286039,_0x202aba)=>{_0x202aba||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5d0bde,'remove',(_0x2099b7,_0x4a63f8)=>{this['_removeAnnotationFromBalloon'](_0x4a63f8),_0x4a63f8===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3fbbc9,'change:visibleView',(_0x358453,_0x50fa1c,_0x40ff78,_0x60be50)=>{_0x60be50&&this['stopListening'](_0x60be50);const _0x2ebd7d=_0x5d0bde['getByView'](_0x40ff78);_0x40ff78&&_0x2ebd7d&&(this['listenTo'](_0x40ff78,'change:height',()=>{_0x3fbbc9['updatePosition']();}),this['listenTo'](_0x40ff78,'Esc',()=>{this['_closeAnnotation'](_0x2ebd7d),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2ebd7d&&this['setActiveAnnotation'](_0x2ebd7d));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3fbbc9['visibleView']&&_0x5d0bde['getByView'](_0x3fbbc9['visibleView'])&&_0x3fbbc9['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 _0x148717('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x26cbfd of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x26cbfd);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x496e69){for(const _0x96610d of this['_selectedAnnotations'])_0x496e69['includes'](_0x96610d)||this['_manuallyClosed']['delete'](_0x96610d);for(const _0x301302 of this['annotations'])_0x496e69['includes'](_0x301302)||this['_removeAnnotationFromBalloon'](_0x301302);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3f68e8 of _0x496e69)this['_addAnnotationToBalloon'](_0x3f68e8);}this['_selectedAnnotations']=_0x496e69;}_addAnnotationToBalloon(_0x2bd2d8,_0xe24d23=!0x1){this['_manuallyClosed']['has'](_0x2bd2d8)||(this['_addedAnnotations']['has'](_0x2bd2d8)||this['_balloon']['hasView'](_0x2bd2d8['view'])||(this['_addedAnnotations']['add'](_0x2bd2d8),this['_balloon']['add']({'stackId':_0x2bd2d8['view']['id'],'view':_0x2bd2d8['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2bd2d8)}})),_0xe24d23&&this['_balloon']['showStack'](_0x2bd2d8['view']['id']));}_getBalloonTargetForAnnotation(_0x23c913){const _0x57d625=_0x23c913['target'],_0x3e322a=this['editor']['editing']['view'],_0x445097=_0x3e322a['document']['selection']['getFirstRange'](),_0x1d67b6=_0x3e322a['domConverter']['viewRangeToDom'](_0x445097);if(_0x1d67b6['collapse'](!0x0),_0x57d625){if(_0x57d625 instanceof _0x31427d)return _0x57d625;let _0x2101cb=[];for(const _0x5754b6 of _0x57d625)_0x2101cb['push'](..._0x31427d['getDomElementRects'](_0x5754b6));_0x2101cb=function(_0x4ab7aa){const _0x175c14=[];let _0x34459d=_0x4ab7aa[0x0];for(let _0x48c486=0x1;_0x48c486<_0x4ab7aa['length'];_0x48c486++)if(Pi(_0x34459d,_0x4ab7aa[_0x48c486])){const _0x5e5e2a=_0x4ab7aa[_0x48c486]['width'];_0x34459d['width']+=_0x5e5e2a,_0x34459d['right']+=_0x5e5e2a;}else _0x175c14['push'](_0x34459d),_0x34459d=_0x4ab7aa[_0x48c486];return _0x175c14['push'](_0x34459d),_0x175c14;}(_0x2101cb);const _0xf7dac4=_0x1d67b6['getBoundingClientRect']();return _0x2101cb['find'](_0x5d6ef0=>_0x5d6ef0['top']<=_0xf7dac4['top']&&_0x5d6ef0['bottom']>=_0xf7dac4['bottom']&&_0x5d6ef0['left']<=_0xf7dac4['left']&&_0x5d6ef0['right']>=_0xf7dac4['right'])||_0x2101cb[0x0];}return _0x23c913['targetRect']||_0x1d67b6;}_removeAnnotationFromBalloon(_0x9fa7f5){this['_addedAnnotations']['has'](_0x9fa7f5)&&this['_balloon']['hasView'](_0x9fa7f5['view'])&&(this['_addedAnnotations']['delete'](_0x9fa7f5),this['_balloon']['remove'](_0x9fa7f5['view']));}_closeAnnotation(_0x7a2c8){this['_manuallyClosed']['add'](_0x7a2c8),this['_removeAnnotationFromBalloon'](_0x7a2c8);}};function Pi(_0x2e5c5a,_0x3be97d){return _0x2e5c5a['top']===_0x3be97d['top']&&_0x2e5c5a['bottom']===_0x3be97d['bottom']&&_0x2e5c5a['right']===_0x3be97d['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x5c0229,_0xd5cd7a){super(_0x5c0229),this['set']('isEmpty',!_0xd5cd7a['length']),this['focusTracker']=new _0x2676e3(),this['_annotationViews']=_0xd5cd7a,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0xd5cd7a,'focusTracker':this['focusTracker']}),this['listenTo'](_0xd5cd7a,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xd5cd7a,'remove',(_0x4a4415,_0x19d293)=>{_0x19d293['isActive']&&this['focus'](),_0xd5cd7a['length']||(this['isEmpty']=!0x0);});const _0x59b158=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x5c0229,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xd5cd7a},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x59b158['if']('isEmpty','ck-hidden',_0x577408=>!_0x577408)]},'children':[{'text':Et(_0x5c0229,'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 _0x4eac20 of this['_annotationViews'])this['focusTracker']['add'](_0x4eac20['element']);this['_annotationViews']['on']('change',(_0xe1e832,{added:_0x1072c8,removed:_0x41c02e})=>{for(const _0x928017 of _0x1072c8)this['focusTracker']['add'](_0x928017['element']);for(const _0x32f18d of _0x41c02e)this['focusTracker']['remove'](_0x32f18d['element']);});}},Di=class extends _0x4d5bc5{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0xee2fc1){super(_0xee2fc1),this['archivedThreads']=new _0x2e431b();}init(){const _0x2139d2=this['context'],_0x16a87f=_0x2139d2['plugins']['get'](oi),_0x11a89a=_0x2139d2['plugins']['get'](ti);this['listenTo'](_0x16a87f,'addCommentThread',(_0x296eef,{threadId:_0x4f9324})=>{const _0x353d81=_0x16a87f['getCommentThread'](_0x4f9324);_0x353d81['archivedAt']&&this['archivedThreads']['add'](_0x353d81,this['_calculatePosition'](_0x353d81['archivedAt'])),this['listenTo'](_0x353d81,'change:archivedAt',(_0x4bd2a7,_0x14f020,_0x883ab3)=>{_0x883ab3?this['archivedThreads']['has'](_0x353d81)||this['archivedThreads']['add'](_0x353d81,this['_calculatePosition'](_0x353d81['archivedAt'])):this['archivedThreads']['has'](_0x353d81)&&this['archivedThreads']['remove'](_0x353d81);});}),this['listenTo'](_0x16a87f,'removeCommentThread',(_0x55405a,{threadId:_0x1188aa})=>{const _0x3314bf=_0x16a87f['getCommentThread'](_0x1188aa);this['stopListening'](_0x3314bf),this['archivedThreads']['has'](_0x3314bf)&&this['archivedThreads']['remove'](_0x3314bf);},{'priority':'highest'}),this['listenTo'](_0x11a89a['collection'],'focus',(_0x424140,_0x12c78b)=>{_0x12c78b['isVisible']||(_0x12c78b['isActive']=!0x0,_0x11a89a['activate'](_0x12c78b));});}_calculatePosition(_0x286a91){const _0x4ef443=[...this['archivedThreads']]['findIndex'](_0x2f38ef=>_0x2f38ef['archivedAt']<_0x286a91);return _0x4ef443>-0x1?_0x4ef443:this['archivedThreads']['length'];}},Vi=class extends _0x21dd8e{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0xbb359a];}constructor(_0x36a531){super(_0x36a531),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x1660c9=this['editor'],_0x21e742=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1660c9['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4c08d5,!0x0)),_0x1660c9['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2fb210=this['_createCommentsArchiveButton'](rt);return _0x2fb210['set']({'role':'menuitemcheckbox'}),_0x2fb210;});const _0xbcf4b2=_0x1660c9['plugins']['get'](Di),_0x4b4d3d=_0x1660c9['plugins']['get']('Annotations'),_0x5014c4=_0x1660c9['plugins']['get']('CommentsRepository');_0xbcf4b2['archivedThreads']['forEach'](_0x5a404a=>{this['_handleNewThread'](_0x5a404a);}),this['listenTo'](_0xbcf4b2['archivedThreads'],'add',(_0x20e825,_0x1d97d2)=>{this['_handleNewThread'](_0x1d97d2);}),this['listenTo'](_0x4b4d3d['collection'],'add',(_0x300fc5,_0x38456a)=>{const _0xc646c3=this['_pendingThreads']['find'](_0x55e744=>{const _0x3a2c14=_0x5014c4['_threadToController']['get'](_0x55e744);return _0x3a2c14&&_0x38456a['innerView']===_0x3a2c14['view'];});if(_0xc646c3){const _0x5b1e66=this['_calculatePosition'](_0xc646c3['archivedAt']);this['_addAnnotationToArchive'](_0x38456a,_0x5b1e66),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xc646c3),0x1);}}),this['listenTo'](_0xbcf4b2['archivedThreads'],'remove',(_0xa8c419,_0x3f30a8)=>{const _0x32832b=_0x1660c9['config']['get']('collaboration.channelId');if(!_0x32832b||_0x3f30a8['channelId']===_0x32832b){if(this['_pendingThreads']['includes'](_0x3f30a8))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3f30a8),0x1);else{const _0x56a8a0=_0x5014c4['_threadToController']['get'](_0x3f30a8),_0x3b2dee=_0x4b4d3d['getByInnerView'](_0x56a8a0['view']);this['annotationViews']['remove'](_0x3b2dee['view']),this['stopListening'](_0x3b2dee),this['stopListening'](_0x3b2dee['focusableElements']);}}}),this['listenTo'](_0x4b4d3d['collection'],'add',(_0x5a9d23,_0x17bc5b)=>{this['listenTo'](_0x17bc5b,'escape',_0x21e742);}),this['listenTo'](_0x4b4d3d['collection'],'remove',(_0x522a19,_0x1d910f)=>{this['stopListening'](_0x1d910f,'escape',_0x21e742);});}_addAnnotationToArchive(_0x29e594,_0x4a3c21){this['listenTo'](_0x29e594,'set:isVisible',_0x1779f1=>{_0x1779f1['return']=!0x1,_0x1779f1['stop']();}),this['annotationViews']['add'](_0x29e594['view'],_0x4a3c21);}['_handleNewThread'](_0x3c75ee){const _0x1ab9fa=this['editor']['plugins']['get']('CommentsRepository'),_0x251490=this['editor']['plugins']['get']('Annotations'),_0x2105c5=this['editor']['config']['get']('collaboration.channelId');if(!_0x2105c5||_0x3c75ee['channelId']===_0x2105c5){const _0x397c80=_0x1ab9fa['_threadToController']['get'](_0x3c75ee);if(!_0x397c80)return void this['_pendingThreads']['push'](_0x3c75ee);const _0x4fba41=this['_calculatePosition'](_0x3c75ee['archivedAt']),_0x52e681=_0x251490['getByInnerView'](_0x397c80['view']);_0x52e681['isVisible']&&_0x251490['_visibleAnnotations']['remove'](_0x52e681),this['_addAnnotationToArchive'](_0x52e681,_0x4fba41);}}_calculatePosition(_0x1dd753){const _0x459c29=this['editor']['config']['get']('collaboration.channelId'),_0x3e334b=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x252429=>_0x252429['channelId']===_0x459c29)['findIndex'](_0x5b3833=>_0x5b3833['archivedAt']<_0x1dd753);return _0x3e334b<0x0||_0x3e334b>this['annotationViews']['length']?this['annotationViews']['length']:_0x3e334b-0x1;}_toggleDialog(){const _0x41b396=this['editor'],_0x5b5720=_0x41b396['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x41b396['locale'],this['annotationViews'])),'commentsArchive'===_0x5b5720['id']?_0x5b5720['hide']():_0x5b5720['show']({'id':'commentsArchive','title':Et(_0x41b396['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1e97a5,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x162c63['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x5aff8d,_0x2424a7=!0x1){const _0x3d1777=this['editor']['locale'],_0x1ed75e=this['editor']['plugins']['get']('Dialog'),_0x3dfae0=new _0x5aff8d(_0x3d1777);return _0x3dfae0['bind']('isEnabled')['to'](this,'isEnabled'),_0x3dfae0['bind']('isOn')['to'](_0x1ed75e,'id',_0x13473f=>'commentsArchive'===_0x13473f),_0x3dfae0['set']({'label':Et(_0x3d1777,'COMMENTS_ARCHIVE'),'icon':_0x1e97a5,'isToggleable':!0x0}),_0x2424a7&&(_0x3dfae0['tooltip']=!0x0),this['listenTo'](_0x3dfae0,'execute',()=>this['_toggleDialog']()),_0x3dfae0;}_hideDialogOnAnnotationEscape=_0xc2521b=>{const _0x3672f7=_0xc2521b['source'];if(!this['annotationViews']['has'](_0x3672f7['view']))return;const _0x5bc976=this['editor']['plugins']['get']('Dialog');_0x5bc976['isOpen']&&'commentsArchive'===_0x5bc976['id']&&(_0x5bc976['hide'](),_0xc2521b['stop']());};},Bi=class extends _0x21dd8e{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};