@ckeditor/ckeditor5-comments 48.3.0-alpha.3 → 48.3.0-alpha.4

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 (148) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.js +1 -1
  3. package/dist/translations/af.umd.js +1 -1
  4. package/dist/translations/ar.js +1 -1
  5. package/dist/translations/ar.umd.js +1 -1
  6. package/dist/translations/ast.js +1 -1
  7. package/dist/translations/ast.umd.js +1 -1
  8. package/dist/translations/az.js +1 -1
  9. package/dist/translations/az.umd.js +1 -1
  10. package/dist/translations/be.js +1 -1
  11. package/dist/translations/be.umd.js +1 -1
  12. package/dist/translations/bg.js +1 -1
  13. package/dist/translations/bg.umd.js +1 -1
  14. package/dist/translations/bn.js +1 -1
  15. package/dist/translations/bn.umd.js +1 -1
  16. package/dist/translations/bs.js +1 -1
  17. package/dist/translations/bs.umd.js +1 -1
  18. package/dist/translations/ca.js +1 -1
  19. package/dist/translations/ca.umd.js +1 -1
  20. package/dist/translations/cs.js +1 -1
  21. package/dist/translations/cs.umd.js +1 -1
  22. package/dist/translations/da.js +1 -1
  23. package/dist/translations/da.umd.js +1 -1
  24. package/dist/translations/de-ch.js +1 -1
  25. package/dist/translations/de-ch.umd.js +1 -1
  26. package/dist/translations/de.js +1 -1
  27. package/dist/translations/de.umd.js +1 -1
  28. package/dist/translations/el.js +1 -1
  29. package/dist/translations/el.umd.js +1 -1
  30. package/dist/translations/en-au.js +1 -1
  31. package/dist/translations/en-au.umd.js +1 -1
  32. package/dist/translations/en-gb.js +1 -1
  33. package/dist/translations/en-gb.umd.js +1 -1
  34. package/dist/translations/en.js +1 -1
  35. package/dist/translations/en.umd.js +1 -1
  36. package/dist/translations/eo.js +1 -1
  37. package/dist/translations/eo.umd.js +1 -1
  38. package/dist/translations/es-co.js +1 -1
  39. package/dist/translations/es-co.umd.js +1 -1
  40. package/dist/translations/es.js +1 -1
  41. package/dist/translations/es.umd.js +1 -1
  42. package/dist/translations/et.js +1 -1
  43. package/dist/translations/et.umd.js +1 -1
  44. package/dist/translations/eu.js +1 -1
  45. package/dist/translations/eu.umd.js +1 -1
  46. package/dist/translations/fa.js +1 -1
  47. package/dist/translations/fa.umd.js +1 -1
  48. package/dist/translations/fi.js +1 -1
  49. package/dist/translations/fi.umd.js +1 -1
  50. package/dist/translations/fr.js +1 -1
  51. package/dist/translations/fr.umd.js +1 -1
  52. package/dist/translations/gl.js +1 -1
  53. package/dist/translations/gl.umd.js +1 -1
  54. package/dist/translations/gu.js +1 -1
  55. package/dist/translations/gu.umd.js +1 -1
  56. package/dist/translations/he.js +1 -1
  57. package/dist/translations/he.umd.js +1 -1
  58. package/dist/translations/hi.js +1 -1
  59. package/dist/translations/hi.umd.js +1 -1
  60. package/dist/translations/hr.js +1 -1
  61. package/dist/translations/hr.umd.js +1 -1
  62. package/dist/translations/hu.js +1 -1
  63. package/dist/translations/hu.umd.js +1 -1
  64. package/dist/translations/hy.js +1 -1
  65. package/dist/translations/hy.umd.js +1 -1
  66. package/dist/translations/id.js +1 -1
  67. package/dist/translations/id.umd.js +1 -1
  68. package/dist/translations/it.js +1 -1
  69. package/dist/translations/it.umd.js +1 -1
  70. package/dist/translations/ja.js +1 -1
  71. package/dist/translations/ja.umd.js +1 -1
  72. package/dist/translations/jv.js +1 -1
  73. package/dist/translations/jv.umd.js +1 -1
  74. package/dist/translations/kk.js +1 -1
  75. package/dist/translations/kk.umd.js +1 -1
  76. package/dist/translations/km.js +1 -1
  77. package/dist/translations/km.umd.js +1 -1
  78. package/dist/translations/kn.js +1 -1
  79. package/dist/translations/kn.umd.js +1 -1
  80. package/dist/translations/ko.js +1 -1
  81. package/dist/translations/ko.umd.js +1 -1
  82. package/dist/translations/ku.js +1 -1
  83. package/dist/translations/ku.umd.js +1 -1
  84. package/dist/translations/lt.js +1 -1
  85. package/dist/translations/lt.umd.js +1 -1
  86. package/dist/translations/lv.js +1 -1
  87. package/dist/translations/lv.umd.js +1 -1
  88. package/dist/translations/ms.js +1 -1
  89. package/dist/translations/ms.umd.js +1 -1
  90. package/dist/translations/nb.js +1 -1
  91. package/dist/translations/nb.umd.js +1 -1
  92. package/dist/translations/ne.js +1 -1
  93. package/dist/translations/ne.umd.js +1 -1
  94. package/dist/translations/nl.js +1 -1
  95. package/dist/translations/nl.umd.js +1 -1
  96. package/dist/translations/no.js +1 -1
  97. package/dist/translations/no.umd.js +1 -1
  98. package/dist/translations/oc.js +1 -1
  99. package/dist/translations/oc.umd.js +1 -1
  100. package/dist/translations/pl.js +1 -1
  101. package/dist/translations/pl.umd.js +1 -1
  102. package/dist/translations/pt-br.js +1 -1
  103. package/dist/translations/pt-br.umd.js +1 -1
  104. package/dist/translations/pt.js +1 -1
  105. package/dist/translations/pt.umd.js +1 -1
  106. package/dist/translations/ro.js +1 -1
  107. package/dist/translations/ro.umd.js +1 -1
  108. package/dist/translations/ru.js +1 -1
  109. package/dist/translations/ru.umd.js +1 -1
  110. package/dist/translations/si.js +1 -1
  111. package/dist/translations/si.umd.js +1 -1
  112. package/dist/translations/sk.js +1 -1
  113. package/dist/translations/sk.umd.js +1 -1
  114. package/dist/translations/sl.js +1 -1
  115. package/dist/translations/sl.umd.js +1 -1
  116. package/dist/translations/sq.js +1 -1
  117. package/dist/translations/sq.umd.js +1 -1
  118. package/dist/translations/sr-latn.js +1 -1
  119. package/dist/translations/sr-latn.umd.js +1 -1
  120. package/dist/translations/sr.js +1 -1
  121. package/dist/translations/sr.umd.js +1 -1
  122. package/dist/translations/sv.js +1 -1
  123. package/dist/translations/sv.umd.js +1 -1
  124. package/dist/translations/th.js +1 -1
  125. package/dist/translations/th.umd.js +1 -1
  126. package/dist/translations/ti.js +1 -1
  127. package/dist/translations/ti.umd.js +1 -1
  128. package/dist/translations/tk.js +1 -1
  129. package/dist/translations/tk.umd.js +1 -1
  130. package/dist/translations/tr.js +1 -1
  131. package/dist/translations/tr.umd.js +1 -1
  132. package/dist/translations/tt.js +1 -1
  133. package/dist/translations/tt.umd.js +1 -1
  134. package/dist/translations/ug.js +1 -1
  135. package/dist/translations/ug.umd.js +1 -1
  136. package/dist/translations/uk.js +1 -1
  137. package/dist/translations/uk.umd.js +1 -1
  138. package/dist/translations/ur.js +1 -1
  139. package/dist/translations/ur.umd.js +1 -1
  140. package/dist/translations/uz.js +1 -1
  141. package/dist/translations/uz.umd.js +1 -1
  142. package/dist/translations/vi.js +1 -1
  143. package/dist/translations/vi.umd.js +1 -1
  144. package/dist/translations/zh-cn.js +1 -1
  145. package/dist/translations/zh-cn.umd.js +1 -1
  146. package/dist/translations/zh.js +1 -1
  147. package/dist/translations/zh.umd.js +1 -1
  148. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x1a4d33,Context as _0x3bc768,ContextPlugin as _0x24b6c6,Editor as _0x1f13cd,PendingActions as _0x54f64e,Plugin as _0x2171e9}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x1b7c73,Collection as _0x103a51,DomEmitterMixin as _0x2bf8d0,FocusTracker as _0x2f6500,KeystrokeHandler as _0x1496b8,ObservableMixin as _0x97dcd3,Rect as _0x35cbc4,diff as _0x4f350a,first as _0x24ab47,getEnvKeystrokeText as _0x182934,keyCodes as _0x3e99b9,priorities as _0x2acd29,scrollViewportToShowTarget as _0x2367ee,toUnit as _0x18a8ac,uid as _0x1bad21}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x2cca8a,ConfirmMixin as _0x4d6178,FOCUS_ANNOTATION_KEYSTROKE as _0x2ccfd6,LateFocusButtonView as _0x310c7d,LateFocusDropdownButtonView as _0x37cde4,UserView as _0x45a86d,Users as _0x595e9b,getAllMarkersDomElementsSorted as _0xd07cce,getDateTimeFormatter as _0xd2b818,hashObject as _0x153f42,setupThreadKeyboardNavigation as _0xc9f5c5,surroundingMarkersDetector as _0x4976ed,trimHtml as _0x330733}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x3fb366,debounce as _0x13e923,isEqual as _0x437e74,set as _0x53a91c,throttle as _0x31189c,unset as _0x33d00c}from'es-toolkit/compat';import{IconAddComment as _0x4de6b8,IconCheck as _0x4f46d5,IconCommentsArchive as _0x552f1f,IconPencil as _0x3df59c,IconRemoveComment as _0x4142f6,IconThreeVerticalDots as _0x3ff94f,IconUndo as _0x58aaac}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0xfd36e5,BodyCollection as _0x3ec916,ButtonView as _0x250387,ContextualBalloon as _0x476b40,Dialog as _0x51dbfa,DialogViewPosition as _0x1577ea,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
- _0x97dcd3();var bt=class extends It{['model'];['view'];constructor(_0x1f21f9,_0x552880){super(),this['model']=_0x1f21f9,this['model']['_isAttached']=!0x0,this['view']=_0x552880,this['listenTo'](_0x552880,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x552880,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x552880,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x552880,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x552880,'addComment',(_0x16b967,_0x1ddd3b)=>this['addComment'](_0x1ddd3b)),this['listenTo'](_0x552880,'updateComment',(_0x16f1ca,_0x46a31c,_0x3ed420)=>this['updateComment'](_0x46a31c,_0x3ed420)),this['listenTo'](_0x552880,'removeComment',(_0xea39c6,_0x3eaef2)=>this['removeComment'](_0x3eaef2));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x139305){this['model']['addComment']({'content':_0x139305,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3b04fc,_0x30a5af){this['model']['getComment'](_0x3b04fc)['update']({'content':_0x30a5af});}['removeComment'](_0x20680c){this['model']['getComment'](_0x20680c)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x5b7b3c,_0x280b03,_0xbc9406){const t=_0x5b7b3c['t'];switch(_0x280b03){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'},_0xbc9406);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'},_0xbc9406);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'},_0xbc9406);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'},_0xbc9406);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0xbc9406);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'},_0xbc9406);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'},_0xbc9406);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'},_0xbc9406);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(_0x4b3305,_0x45e280){super(_0x4b3305);const _0x5c5b3c=_0x1bad21();this['main']=this['createCollection'](),this['editable']=new st(_0x4b3305,_0x45e280,void 0x0,{'label':()=>Et(_0x4b3305,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4b3305['uiLanguageDirection'],'lang':_0x4b3305['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5c5b3c},'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(_0x34092f){super(_0x34092f),this['view']=new kt(_0x34092f['locale'],_0x34092f['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x5d79d1=this['editor']['editing']['view'],_0x5d012e=this['view']['editable'];_0x5d012e['name']=_0x5d79d1['document']['getRoot']()['rootName'],this['view']['render']();const _0x4ded35=_0x5d012e['element'];this['setEditableElement'](_0x5d012e['name'],_0x4ded35),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5d79d1['attachDomRoot'](_0x4ded35),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x97dcd3(_0x1f13cd);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x2d5f95={}){(_0x2d5f95=Object['assign']({},_0x2d5f95))['plugins']||(_0x2d5f95['plugins']=CommentEditor['defaultPlugins']),super(_0x2d5f95),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 _0x32d1d8=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x32d1d8))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x499a82=>{const _0x35770b=this['model']['document']['getRoot'](),_0x3bf08f=_0x35770b&&_0x35770b['getChild'](_0x35770b['childCount']-0x1);_0x499a82['setSelection'](_0x3bf08f,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x439f15=this['editing']['view'],_0x5f5894=_0x439f15['document']['getRoot'](),_0x116cdc=_0x5f5894['getChild'](0x0);_0x5f5894['childCount']>0x1||!_0x116cdc||'p'!=_0x116cdc['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x439f15,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x116cdc['placeholder']=this['placeholder']),ut({'view':_0x439f15,'element':_0x116cdc,'keepOnFocus':!0x0}),this['placeholderElement']=_0x116cdc);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x441ed0,_0x4d8386={}){super(_0x441ed0),this['editor']=null,this['_editorConfig']=_0x4d8386,this['set']('value',_0x4d8386['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x441ed0,'Reply...')),this['set']('submitLabel',Et(_0x441ed0,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x1496b8(),this['focusTracker']=new _0x2f6500(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x270a5f=>!_0x270a5f['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',(_0x624f87,_0x5bc5a7)=>{this['cancelButtonView']['fire']('execute'),_0x5bc5a7();}),this['keystrokes']['set']('Ctrl+Enter',(_0x218265,_0x252c04)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x252c04());}),this['on']('submit',(_0x456de8,_0x1efb8c)=>{_0x1efb8c['length']>0xfde8?(alert(Et(_0x441ed0,'TOO_LONG_COMMENT_ALERT',[_0x1efb8c['length'],0xfde8])),_0x456de8['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 _0x463eaf=this['editor'];this['element']['insertBefore'](_0x463eaf['ui']['element'],this['element']['firstChild']),_0x463eaf['model']['document']['on']('change',()=>this['value']=_0x463eaf['getData']()),_0x463eaf['bind']('placeholder')['to'](this),this['focusables']['add'](_0x463eaf['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xdeda8){-0x1===_0xdeda8?(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:_0x345083}=this,_0x4af6bf=new _0x250387(_0x345083);return _0x4af6bf['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4af6bf['withText']=!0x0,_0x4af6bf['bind']('label')['to'](this,'submitLabel'),_0x4af6bf['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4af6bf['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xb77e88,_0x47ebf6)=>!_0x47ebf6&&!!_0xb77e88['trim']()),_0x4af6bf;}['_createCancelButton'](){const {locale:_0x3af971}=this,_0x338a3b=new _0x250387(_0x3af971);return _0x338a3b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x338a3b['label']=Et(_0x3af971,'Cancel'),_0x338a3b['withText']=!0x0,_0x338a3b['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x338a3b;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x47726b=>{this['focusTracker']['add'](_0x47726b['element']);}),this['focusables']['on']('change',(_0x50910a,_0x370984)=>{for(const _0x4e66d7 of Array['from'](_0x370984['added'])['reverse']())this['focusTracker']['add'](_0x4e66d7['element']);});}},xt=class extends ht{constructor(_0x1870db,_0x36ea14,_0xd09988){super(_0x1870db),this['commentInputView']=new St(_0x1870db,_0xd09988),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5ea29d,_0x11eadf)=>_0x5ea29d||!!_0x11eadf),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 _0x45a86d(_0x1870db,_0x36ea14),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'](_0x408da8){this['commentInputView']['focus'](_0x408da8);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2c54f7,_0x3208a9)=>{const {submitButtonView:_0x41f565,cancelButtonView:_0x44cea8,editor:_0x3beb65}=this['commentInputView'];[_0x41f565['element'],_0x44cea8['element'],_0x3beb65?_0x3beb65['editing']['view']['getDomRoot']():null]['filter'](_0x541a6a=>_0x541a6a)['some'](_0x28461b=>_0x28461b['contains'](_0x3208a9['target']))||(this['focus'](),_0x3208a9['preventDefault']());});}},Pt=class extends ht{constructor(_0x4cd2dd){super(_0x4cd2dd);const _0x1af5b0=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1af5b0['to']('count',_0x339c56=>Et(_0x4cd2dd,'NUMBER_OF_COMMENTS',_0x339c56))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x12f83f,_0x1b5a09,_0x42a464){super(_0x12f83f);const _0xe79f3a=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1b5a09['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1b5a09,this['_config']=_0x42a464,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2f6500(),this['keystrokes']=new _0x1496b8(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4a6c85=>this['commentViews']['map'](_0x230733=>_0x230733['element'])['includes'](_0x4a6c85['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x12f83f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5a8ea9=>_0x5a8ea9-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1d336a of _0x1b5a09['comments'])this['_handleNewCommentModel'](_0x1d336a);this['_handleInfoComment'](),this['listenTo'](_0x1b5a09['comments'],'add',(_0x22a61d,_0xcb63e2)=>{const _0x210dde=this['_calculatePosition'](_0xcb63e2);this['length']++,this['_handleNewCommentModel'](_0xcb63e2,_0x210dde),this['refreshVisibleViews']();}),this['listenTo'](_0x1b5a09['comments'],'remove',(_0x12b983,_0x2dc108)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2dc108),this['refreshVisibleViews']();}),this['listenTo'](_0x1b5a09,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1b5a09,'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',_0xe79f3a['if']('length','ck-hidden',_0x940f16=>!_0x940f16)],'aria-label':Et(_0x12f83f,'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'](_0x2f9952){-0x1===_0x2f9952?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2e17fe of this['commentViews'])_0x2e17fe['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1c966f,_0x18b0c8){const _0x50aba0=new this['_config']['CommentView'](this['locale'],_0x1c966f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x50aba0['viewUid']=_0x1c966f['id'],_0x50aba0['delegate']('removeComment')['to'](this),_0x50aba0['delegate']('updateComment')['to'](this),_0x50aba0['delegate']('resolveCommentThread')['to'](this),_0x50aba0['delegate']('editorReady')['to'](this),_0x50aba0['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x50aba0,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x50aba0,_0x18b0c8);}['_calculatePosition'](_0x2d8cf1){const _0x303ceb=this['_model']['_findOptimalIndex'](_0x2d8cf1);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2d8cf1['authoredAt']?_0x303ceb-0x1:_0x303ceb:_0x303ceb-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xebfbab={'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'],_0xebfbab,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xebfbab));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x583805){const _0x2612bc=this['commentViews']['remove'](_0x583805['id']);this['stopListening'](_0x2612bc),_0x2612bc['isEditMode']&&this['_updateHasDirtyComment'](),_0x2612bc['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x561382=>_0x561382['isEditMode']);}['_rearrangeCollapse'](){const _0x448d68=function(_0x56eac0){const _0x31eb18=new _0x103a51();for(const _0x28aa68 of _0x56eac0)_0x31eb18['add'](_0x28aa68);return _0x31eb18;}(this['commentViews']),_0x3c1d0c=this['_collapsedCommentsView']['count'];for(let _0x368cf8=0x1;_0x368cf8<=_0x3c1d0c;_0x368cf8++)_0x448d68['remove'](0x1);for(const _0x2410ec of _0x448d68)_0x2410ec['collapse']();_0x3c1d0c>0x0&&_0x448d68['add'](this['_collapsedCommentsView'],0x1),Dt(_0x4f350a(Array['from'](this['visibleViews']),Array['from'](_0x448d68)),this['visibleViews'],_0x448d68);}['_rearrangeExpand'](){Dt(_0x4f350a(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xd3f984 of this['visibleViews'])_0xd3f984['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x19070b=>{this['focusTracker']['add'](_0x19070b['element']),this['keystrokes']['listenTo'](_0x19070b['element']);}),this['commentViews']['on']('change',(_0x2d1349,_0x4dbc43)=>{for(const _0x568a50 of _0x4dbc43['removed'])this['focusTracker']['remove'](_0x568a50['element']),this['keystrokes']['stopListening'](_0x568a50['element']);for(const _0x5b96ce of Array['from'](_0x4dbc43['added'])['reverse']())this['focusTracker']['add'](_0x5b96ce['element']),this['keystrokes']['listenTo'](_0x5b96ce['element']);});}};function Dt(_0x16688e,_0x496220,_0x5a9c58){let _0x4484cf=0x0;for(const _0x3001cc of _0x16688e)switch(_0x3001cc){case'insert':_0x496220['add'](_0x5a9c58['get'](_0x4484cf),_0x4484cf),_0x4484cf++;break;case'delete':_0x496220['remove'](_0x4484cf);break;case'equal':_0x4484cf++;}}var Vt=class extends ht{constructor(_0x2872ef){super(_0x2872ef);const _0x70fb10=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x70fb10['to']('contextValue',_0x332ad3=>Et(_0x2872ef,'THREAD_CONTEXT_LABEL',_0x332ad3)),'tabindex':-0x1},'children':[{'text':_0x70fb10['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3a1a2d,_0xa47e1e){super(_0x3a1a2d);const _0x2a2658=this['bindTemplate'];this['_model']=_0xa47e1e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2f6500(),this['keystrokes']=new _0x1496b8(),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',_0x403622=>!!_0x403622),this['bind']('contextValue')['to'](this['_model'],'context',_0x193aa2=>_0x193aa2&&_0x193aa2['value']?this['_trimContextValue'](_0x193aa2['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',_0x2a2658['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 _0x7ec3fc=new _0x250387(this['locale']);return _0x7ec3fc['label']=Et(this['locale'],'Reopen'),_0x7ec3fc['tooltip']=Et(this['locale'],'Reopen'),_0x7ec3fc['icon']=_0x58aaac,_0x7ec3fc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x56459a=>!_0x56459a),_0x7ec3fc['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4195b2,_0x37961d)=>_0x4195b2&&_0x37961d),_0x7ec3fc['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x7ec3fc;}['_trimContextValue'](_0x3a55ed){if(_0x3a55ed['length']<0x96)return _0x3a55ed;const _0xeb1f01=_0x3a55ed['lastIndexOf']('\x20',0x93);return _0x3a55ed['substring'](0x0,_0xeb1f01>-0x1?_0xeb1f01:0x93)+'...';}['_attachContextActions'](){const _0x2cbc3d=this['element']['querySelector']('.ck-context'),_0x2c2164=_0x2cbc3d['querySelector']('.ck-context__value');this['listenTo'](_0x2cbc3d,'mouseenter',()=>{_0x2c2164['offsetWidth']<_0x2c2164['scrollWidth']&&_0x2cbc3d['classList']['add']('overlay');}),this['listenTo'](_0x2cbc3d,'mouseleave',()=>{_0x2cbc3d['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2476cc of this['focusables'])this['focusTracker']['add'](_0x2476cc['element']),this['keystrokes']['listenTo'](_0x2476cc['element']);}['_createContextView'](){const _0x240368=new Vt(this['locale']);return _0x240368['bind']('contextValue')['to'](this),_0x240368;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x612c22,_0xa9f6a8,_0x8adc27,_0x441f5d){super(_0x612c22),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xa9f6a8,this['_localUser']=_0x8adc27,this['_config']=_0x441f5d,this['commentThreadHeaderView']=new Bt(_0x612c22,_0xa9f6a8),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x2cca8a(_0x612c22,Et(_0x612c22,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x612c22,_0xa9f6a8,Object['assign']({'CommentView':this['_config']['CommentView']},_0x441f5d)),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',(_0x1e5060,_0x27b7fd)=>_0x1e5060||!!_0x27b7fd),this['bind']('isUnlinked')['to'](_0xa9f6a8,'unlinkedAt',_0x38e35a=>!!_0x38e35a);let _0x35fa9d=null;const _0x35b566=()=>{const _0x3a087b=this['_model']['comments']['first']||null;_0x3a087b!==_0x35fa9d&&(_0x35fa9d&&this['stopListening'](_0x35fa9d,'change:content'),_0x35fa9d=_0x3a087b,_0x3a087b&&this['listenTo'](_0x3a087b,'change:content',_0x35b566));const _0x323134=_0x3a087b?_0x3a087b['author']['name']:this['_localUser']['name'],_0x10a100=_0x3a087b?new DOMParser()['parseFromString'](_0x330733(_0x3a087b['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x145e7e=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x323134]);this['set']('ariaLabel',_0x10a100?_0x145e7e+'\x20'+_0x10a100:_0x145e7e);};this['listenTo'](this['_model']['comments'],'change',_0x35b566),_0x35b566(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2f6500(),this['keystrokes']=new _0x1496b8(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x221236=>_0x221236['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0xc9f5c5(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x162b3d=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5a8db6=_0x162b3d['commentInputView'];return _0x162b3d['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5a8db6,'value',(_0x1fc1a8,_0x5d3474,_0x13d937,_0x51526c,_0x1df4dd)=>!!_0x1df4dd||!!_0x51526c&&_0x13d937&&!_0x5d3474||_0x1fc1a8&&_0x13d937&&!_0x5d3474),_0x5a8db6['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x57a61e,_0x403565,_0x389356)=>{let _0x575749;return _0x575749=_0x389356&&_0x403565?'Reply\x20to\x20reopen\x20discussion...':_0x57a61e?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x575749);}),_0x5a8db6['bind']('submitLabel')['to'](this,'length',_0x4f7d64=>Et(this['locale'],_0x4f7d64?'Reply':'Comment')),_0x5a8db6['on']('submit',(_0x2d52b4,_0x306169)=>{this['fire']('addComment',_0x306169),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5a8db6['on']('cancel',()=>{this['focus']();}),_0x5a8db6['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5a8db6['on']('cancel',_0x28574d=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x28574d['stop']());}),this['on']('change:isActive',(_0x2559ae,_0xe6c317,_0x218f08)=>{_0x218f08||this['length']||_0x5a8db6['value']||this['fire']('removeCommentThread');}),_0x162b3d;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x4d6178(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1da00a,_0x336ea3,_0x6a7d4e,_0x1c12bc){super(_0x1da00a,_0x336ea3,_0x6a7d4e,_0x1c12bc),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1da00a,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x1e98c5,_0x50a308,_0xb2a8da)=>{_0xb2a8da||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x281ae2,_0x1b4b99,_0x16e49c)=>{_0x16e49c&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3cddc1=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3cddc1['if']('isActive','ck-thread--active'),_0x3cddc1['if']('isUnlinked','ck-thread--unlinked'),_0x3cddc1['to']('actionIndicator',_0x1d53de=>_0x1d53de?'ck-thread--'+_0x1d53de:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3cddc1['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 _0x353942 of this['commentsListView']['commentViews'])_0x353942['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1e7599}=this,_0x47c5b8=this['commentsListView']['commentViews']['get'](0x0);_0x47c5b8===this['_boundFirstCommentView']||_0x47c5b8['isSystemComment']||(this['_boundFirstCommentView']=_0x47c5b8,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x47c5b8,'actionIndicator',_0x4a75e8=>'remove'===_0x4a75e8?'remove':null),_0x47c5b8['placeholder']=Et(_0x1e7599,'Write\x20a\x20comment...'),_0x47c5b8['removeButton']['on']('execute',_0x70c1e8=>{_0x70c1e8['stop'](),this['showConfirm'](Et(_0x1e7599,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x47c5b8['focus']();}),_0x47c5b8['actionBar']['add'](this['resolveButton'],0x0),_0x47c5b8['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x576814=new _0x310c7d(this['locale']);return _0x576814['label']=Et(this['locale'],'Resolve'),_0x576814['tooltip']=Et(this['locale'],'Resolve'),_0x576814['icon']=_0x4f46d5,_0x576814['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x576814['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xa09c43=>!_0xa09c43),_0x576814['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x400532,_0x153ebe)=>_0x400532&&!_0x153ebe),_0x576814['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x576814;}['_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(_0x5c620f){super(_0x5c620f),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x782d0b,_0x3bc146,_0x470570)=>{this['element']['innerHTML']=_0x470570;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x229543,_0x30c6be,_0x3bcddc){super(_0x229543),this['_model']=_0x30c6be,this['_config']=_0x3bcddc,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x30c6be,'content',_0x30c6be,'authoredAt',(_0x36235f,_0x5663b5)=>Et(_0x229543,'COMMENT_ARIA_LABEL',[_0x30c6be['author']['name'],_0x3bcddc['formatDateTime'](_0x5663b5),new DOMParser()['parseFromString'](_0x36235f,'text/html')['body']['textContent'],_0x30c6be['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x2cca8a(_0x229543,Et(_0x229543,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x2f6500(),this['keystrokes']=new _0x1496b8(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x6d5c99=>_0x6d5c99['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 _0x2f4b17=new Wt(this['locale']);return _0x2f4b17['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x57cdec,_0x1946aa)=>_0x1946aa?_0x330733(_0x57cdec,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x57cdec),_0x2f4b17;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4b8b91=new St(this['locale'],this['_config']['editorConfig']);return _0x4b8b91['value']=this['_model']['content'],_0x4b8b91['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4b8b91['submitLabel']=Et(this['locale'],'Save'),_0x4b8b91['on']('submit',(_0x7b62c5,_0x556d59)=>{this['fire']('updateComment',this['_model']['id'],_0x556d59),this['switchToDisplayMode'](),this['focus']();}),_0x4b8b91['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4b8b91['once']('editorReady',()=>{_0x4b8b91['focus']();}),_0x4b8b91['createEditor'](),_0x4b8b91['delegate']('editorReady')['to'](this),_0x4b8b91['delegate']('editorDestroyed')['to'](this),_0x4b8b91;}['_setupKeyboardNavigation'](){const _0x574322=this['element'];this['keystrokes']['listenTo'](_0x574322);for(const _0x5527d1 of this['focusables'])this['focusTracker']['add'](_0x5527d1['element']),this['keystrokes']['listenTo'](_0x5527d1['element']);this['focusables']['on']('change',(_0x3b6c77,_0x368f61)=>{for(const _0x11e550 of _0x368f61['removed'])this['focusTracker']['remove'](_0x11e550['element']),this['keystrokes']['stopListening'](_0x11e550['element']);for(const _0xe05afe of _0x368f61['added'])this['focusTracker']['add'](_0xe05afe['element']),this['keystrokes']['listenTo'](_0xe05afe['element']);}),this['keystrokes']['set']('enter',(_0x17f7fa,_0x26f881)=>{_0x574322===_0x17f7fa['target']&&(this['focusCycler']['focusFirst'](),_0x26f881());}),this['keystrokes']['set']('esc',(_0x5207da,_0xeb803e)=>{_0x574322!==_0x5207da['target']&&(this['focus'](),_0xeb803e());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x4d6178(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0xf05cf0,_0x35d29e,_0x3070ad){super(_0xf05cf0,_0x35d29e,_0x3070ad),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0xf05cf0,'Reply...')),this['bind']('authoredAt')['to'](_0x35d29e),this['bind']('resolvedAt')['to'](_0x35d29e),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 _0x45a86d(_0xf05cf0,_0x35d29e['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x35d29e,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x31d471=this['bindTemplate'],_0x5087de=[{'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':_0x31d471['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x31d471['to']('authoredAt',_0x43e2b2=>this['_config']['formatDateTime'](_0x43e2b2))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x31d471['if']('isEditMode','ck-comment__actions--hidden'),_0x31d471['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']&&_0x5087de['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x31d471['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x31d471['if']('isEditMode','ck-comment--edit'),_0x31d471['if']('isSystemComment','ck-comment--info'),_0x31d471['to']('actionIndicator',_0x107f7e=>_0x107f7e?'ck-comment--'+_0x107f7e:'')],'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':_0x5087de}]}]};}['_createEditButton'](){const _0x149b52=new _0x250387(this['locale']);return _0x149b52['label']=Et(this['locale'],'Edit'),_0x149b52['icon']=_0x3df59c,_0x149b52['withText']=!0x0,_0x149b52['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x149b52['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4d6dba=>!_0x4d6dba),_0x149b52['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x149b52['on']('execute',()=>this['switchToEditMode']()),_0x149b52;}['_createRemoveButton'](){const _0x5ab439=new _0x250387(this['locale']);return _0x5ab439['label']=Et(this['locale'],'Remove'),_0x5ab439['icon']=_0x4142f6,_0x5ab439['withText']=!0x0,_0x5ab439['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5ab439['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xa518ab=>!_0xa518ab),_0x5ab439['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5ab439['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5ab439;}['_createDropdown'](){const _0x423652=ct(this['locale'],_0x37cde4),_0x210232=_0x423652['panelView']['children'],_0x55a15c=new ot(this['locale']),_0x2b9230=_0x423652['bindTemplate'];dt(_0x423652,()=>this['items']['find'](_0x51e630=>_0x51e630['isVisible'])),_0x423652['extendTemplate']({'attributes':{'class':[_0x2b9230['if']('isVisible','ck-hidden',_0x2625ef=>!_0x2625ef)]}});const _0x39c969=(_0x22aef9,_0xffe32=-0x1)=>{const _0x4e7980=new nt(this['locale']);_0x4e7980['children']['add'](_0x22aef9);const _0x1875b6=_0xffe32>-0x1?_0xffe32:_0x55a15c['items']['length'];_0x55a15c['items']['add'](_0x4e7980,_0x1875b6);const _0x2797c8=Array['from'](this['items']);_0x423652['unbind']('isEnabled','isVisible'),_0x423652['bind']('isEnabled')['toMany'](_0x2797c8,'isEnabled',(..._0xadfcbb)=>_0xadfcbb['some'](_0x4cb745=>_0x4cb745)),_0x423652['bind']('isVisible')['toMany'](_0x2797c8,'isVisible',(..._0x422f4c)=>_0x422f4c['some'](_0x4b4555=>_0x4b4555));};_0x423652['panelPosition']='sw',_0x423652['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x3ff94f});for(const _0x1c2db1 of this['items'])_0x39c969(_0x1c2db1);return _0x210232['add'](_0x55a15c),_0x423652['listenTo'](this['items'],'add',(_0xbbb427,_0x12effd,_0x116025)=>{_0x39c969(_0x12effd,_0x116025);}),_0x423652['listenTo'](this['items'],'remove',(_0xd1abca,_0x5e1491,_0x2d6037)=>{_0x55a15c['items']['remove'](_0x2d6037);}),_0x423652;}['_attachActions'](_0x8e4f62,_0x43a0e7){const _0x51e6e9=_0x8e4f62&&_0x8e4f62['element'];_0x51e6e9&&(this['listenTo'](_0x51e6e9,'mouseenter',()=>this['actionIndicator']=_0x43a0e7),this['listenTo'](_0x51e6e9,'focus',()=>this['actionIndicator']=_0x43a0e7),this['listenTo'](_0x51e6e9,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x51e6e9,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0xfdebef=super['_createCommentInputView']();return _0xfdebef['bind']('placeholder')['to'](this),_0xfdebef;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x4df81e){const _0x4be76d=_0x31189c(_0x4df81e,0x1e),_0x7c4439=new MutationObserver(_0x4cda25=>{for(const _0x488744 of _0x4cda25)('attributes'==_0x488744['type']&&'class'==_0x488744['attributeName']||'childList'==_0x488744['type']||'characterData'==_0x488744['type'])&&_0x4be76d();});return{'attach'(_0x526207){_0x7c4439['observe'](_0x526207,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x7c4439['disconnect'](),_0x4be76d['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x36fc22,_0x52bc5b){super(_0x36fc22),this['id']=_0x1bad21(),this['focusTracker']=new _0x2f6500(),this['keystrokes']=new _0x1496b8(),this['keystrokes']['set']('Esc',(_0x4d485b,_0x491561)=>this['fire']('Esc',_0x491561)),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'](_0x52bc5b),this['mainView']=_0x52bc5b;const _0x4cba5f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4cba5f['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 _0x56bd7e=this['element']['clientHeight'];_0x56bd7e&&(this['height']=_0x56bd7e);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x97dcd3();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3ec031,target:_0x402c85,type:_0x55ee82,isVisible:_0x811f76=!0x0}){super(),this['view']=_0x3ec031,this['view']['element']||this['view']['render'](),this['_type']=_0x55ee82,this['_target']=_0x402c85,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x103a51([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3b8d50,_0x3a87d2)=>{this['view']['focusTracker']['add'](_0x3a87d2);}),this['focusableElements']['on']('remove',(_0xaf333,_0x57b127)=>{this['view']['focusTracker']['remove'](_0x57b127);}),this['set']('isVisible',_0x811f76);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x356384=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x356384),_0x356384;}get['targetRect'](){const _0x1fa134=this['target'];if(null===_0x1fa134)return null;if(_0x1fa134 instanceof _0x35cbc4)return _0x1fa134;const _0x29bf8c=_0x1fa134['filter'](_0x2e93c1=>function(_0x41e14e){return!!_0x41e14e['offsetParent']||!!_0x41e14e['getClientRects']()['item'](0x0);}(_0x2e93c1));return 0x0===_0x29bf8c['length']?null:_0x35cbc4['getDomElementRects'](_0x29bf8c[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3ef064){this['view']['isActive']=_0x3ef064,this['view']['mainView']['isActive']=_0x3ef064;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x134ba2){if(!(null===_0x134ba2||_0x134ba2 instanceof _0x35cbc4||Array['isArray'](_0x134ba2)&&_0x134ba2['every'](_0x162b12=>zt(_0x162b12))))throw new _0x1b7c73('annotation-invalid-target',null,{'target':_0x134ba2});}['_getNormalizedTarget'](){const _0x3d4bc8='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x3d4bc8)?[_0x3d4bc8]:_0x3d4bc8;}};function zt(_0x1453ea){return null!==_0x1453ea&&'object'==typeof _0x1453ea&&'nodeType'in _0x1453ea&&0x1===_0x1453ea['nodeType'];}var Jt=class extends _0x103a51{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x36a133=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2f6500(),this['_focusTracker']['on']('change:isFocused',(_0x2ee5ba,_0x1c9b7c,_0x3806f9)=>{_0x3806f9||this['fire']('blur');});for(const _0x385575 of _0x36a133)this['add'](_0x385575);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xdefb36){if(this['has'](_0xdefb36))throw new _0x1b7c73('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xdefb36['innerView'],_0xdefb36),this['_viewToAnnotation']['set'](_0xdefb36['view'],_0xdefb36);for(const _0x4dbdcb of _0xdefb36['focusableElements'])this['_focusTracker']['add'](_0x4dbdcb);if(this['listenTo'](_0xdefb36['focusableElements'],'add',(_0x61a8b,_0x978304)=>{this['_focusTracker']['add'](_0x978304);}),this['listenTo'](_0xdefb36['focusableElements'],'remove',(_0x2f8ff7,_0xac468b)=>{this['_focusTracker']['remove'](_0xac468b);}),this['listenTo'](_0xdefb36['view']['focusTracker'],'change:isFocused',(_0x42704b,_0x4340b3,_0x2306bd)=>{_0x2306bd&&this['fire']('focus',_0xdefb36);}),_0xdefb36['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x1d8741 of this)_0x1d8741['updateTargetRect']();}const _0x1eaa45=this['_getOrderInContent'](_0xdefb36['view']['targetRect']);return super['add'](_0xdefb36,_0x1eaa45);}['remove'](_0x5dee5d){if(!this['has'](_0x5dee5d))throw new _0x1b7c73('annotationcollection-not-existing-item',null);this['stopListening'](_0x5dee5d['view']['focusTracker']),this['stopListening'](_0x5dee5d['focusableElements']);for(const _0x39c399 of _0x5dee5d['focusableElements'])this['_focusTracker']['remove'](_0x39c399);return this['_viewToAnnotation']['delete'](_0x5dee5d['view']),this['_innerViewToAnnotation']['delete'](_0x5dee5d['innerView']),super['remove'](_0x5dee5d);}['getByInnerView'](_0xb50bd3){return this['_innerViewToAnnotation']['get'](_0xb50bd3);}['getByView'](_0x464d93){return this['_viewToAnnotation']['get'](_0x464d93);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3ff6c5 of this)_0x3ff6c5['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2b17a2=Array['from'](this)['sort']((_0x47219f,_0x48878d)=>Zt(_0x47219f['view']['targetRect'],_0x48878d['view']['targetRect']));for(let _0x20c659=_0x2b17a2['length']-0x1;_0x20c659>0x0;_0x20c659--){const _0x1ae8b6=_0x2b17a2[_0x20c659];_0x20c659!==this['getIndex'](_0x1ae8b6)&&(this['remove'](_0x1ae8b6),this['add'](_0x1ae8b6));}}['_getOrderInContent'](_0x2bc327){let _0x533356=0x0;if(!_0x2bc327)return this['length'];for(const _0x75d6bd of this){const _0x2eadc0=_0x75d6bd['view']['targetRect'];if(_0x2eadc0){if(Zt(_0x2bc327,_0x2eadc0)<0x0)return _0x533356;_0x533356++;}}return _0x533356;}['_areCachedRectsStale'](){const _0x1e31c7=this['get'](0x0);if(!_0x1e31c7)return!0x1;const _0x476937=_0x1e31c7['view']['targetRect'],_0x8b1449=_0x1e31c7['targetRect'];return!(!_0x476937||!_0x8b1449)&&(_0x476937['top']!==_0x8b1449['top']||_0x476937['left']!==_0x8b1449['left']);}};function Qt({source:_0x3b6399,target:_0x4b4387,filter:_0x17051b}){for(const _0x29087a of _0x3b6399)_0x17051b(_0x29087a)&&_0x4b4387['add'](_0x29087a);_0x4b4387['listenTo'](_0x3b6399,'add',(_0x29417b,_0x30fbc5)=>{_0x17051b(_0x30fbc5)&&_0x4b4387['add'](_0x30fbc5);}),_0x4b4387['listenTo'](_0x3b6399,'remove',(_0x43fb7f,_0x3a150d)=>{_0x4b4387['has'](_0x3a150d)&&_0x4b4387['remove'](_0x3a150d);});}function Zt(_0x26d1f8,_0x532f24){if(null===_0x26d1f8&&null===_0x532f24)return 0x0;if(null===_0x26d1f8)return-0x1;if(null===_0x532f24)return 0x1;const _0x3212d7=_0x26d1f8['top']-_0x532f24['top'];return 0x0==_0x3212d7?_0x26d1f8['left']-_0x532f24['left']:_0x3212d7;}var ti=class extends _0x24b6c6{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a7194){if(super(_0x3a7194),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3a7194 instanceof _0x1f13cd){const _0xe5640e=_0x3a7194['locale'];_0x3a7194['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0xe5640e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0xe5640e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0xe5640e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0xe5640e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0xe5640e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0xe5640e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0xe5640e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4d033f){this['collection']['add'](_0x4d033f);}['remove'](_0x378edb){this['collection']['remove'](_0x378edb),_0x378edb['destroy']();}['refreshVisibility'](){for(const _0x160772 of this['collection'])_0x160772['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x4600f5){return this['collection']['getByInnerView'](_0x4600f5);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x31c31e of this['collection'])_0x31c31e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3b9b02){this['fire']('_activateAnnotation',_0x3b9b02);}['createAnnotation'](_0x124738){return new $t(_0x124738);}['createAnnotationView'](_0x31cb05,_0x3e595f){return new qt(_0x31cb05,_0x3e595f);}['_addActiveAnnotation'](_0x5ee01f){const _0xbf1945=new Set(this['activeAnnotations']);_0xbf1945['add'](_0x5ee01f),this['activeAnnotations']=_0xbf1945;}['_removeActiveAnnotation'](_0x24ba62){const _0x516757=new Set(this['activeAnnotations']);_0x516757['delete'](_0x24ba62),this['activeAnnotations']=_0x516757;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1fc85e=this['collection'],_0x3e2e23=this['_visibleAnnotations'];function _0xe3bafc(_0x1adcf0){const _0x27b908=_0x1adcf0['source'];_0x27b908['isVisible']&&!_0x3e2e23['has'](_0x27b908)?_0x3e2e23['add'](_0x27b908):!_0x27b908['isVisible']&&_0x3e2e23['has'](_0x27b908)&&_0x3e2e23['remove'](_0x27b908),_0x27b908['view']['focusTracker']['remove'](_0x27b908['view']['element']),_0x27b908['view']['focusTracker']['add'](_0x27b908['view']['element']);}this['listenTo'](_0x1fc85e,'add',(_0x249953,_0x3a5954)=>{_0x3a5954['isVisible']&&_0x3e2e23['add'](_0x3a5954),this['listenTo'](_0x3a5954,'change:isVisible',_0xe3bafc);}),this['listenTo'](_0x1fc85e,'remove',(_0xd29305,_0x40637c)=>{_0x3e2e23['has'](_0x40637c)&&_0x3e2e23['remove'](_0x40637c),this['stopListening'](_0x40637c,'change:isVisible',_0xe3bafc);});}['_setupEnterAnnotationKeystroke'](){const _0x57d64c=_0x2822f9=>{_0x2822f9['on']('ready',()=>{_0x2822f9['keystrokes']['set'](_0x2ccfd6,(_0x1620a9,_0x4afe59)=>{const _0x280d83=_0x24ab47(this['activeAnnotations']['values']());_0x280d83&&(_0x280d83['view']['focus'](),_0x4afe59());});});};this['context']instanceof _0x1f13cd?_0x57d64c(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xc6877a,_0x5b3571)=>{_0x57d64c(_0x5b3571);});}['_setupEscapeAnnotationHandling'](){const _0x461841=_0x16b2de=>{const _0x2b2dca=_0x16b2de['source'],_0x229d4a=[];let _0x328921;if(Array['isArray'](_0x2b2dca['target'])){_0x328921=_0x2b2dca['target'][0x0],this['context']instanceof _0x1f13cd?_0x229d4a['push'](this['context']):this['context']['editors']&&_0x229d4a['push'](...this['context']['editors']);for(const _0xefd5f0 of _0x229d4a)for(const _0x199ff8 of _0xefd5f0['editing']['view']['domRoots']['values']())if(_0x199ff8['contains'](_0x328921))return void _0xefd5f0['editing']['view']['focus']();_0x328921['focus']();}};this['listenTo'](this['collection'],'add',(_0x109314,_0x57073a)=>{this['listenTo'](_0x57073a,'escape',_0x461841,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x42fb25,_0x218306)=>{this['stopListening'](_0x218306,'escape',_0x461841);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x97dcd3(),ni=/* #__PURE__ -- @preserve */
31
- _0x97dcd3();var oi=class extends _0x24b6c6{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x54f64e,_0x595e9b];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x501ee1){super(_0x501ee1),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x350f1e=this['context']['config'];_0x350f1e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x350f1e['define']('comments.maxThreadTotalWeight',0x1f4),_0x350f1e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x350f1e['define']('comments.CommentThreadView',Ut),_0x350f1e['define']('comments.CommentView',Yt),_0x350f1e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1b7750=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x252ea9,_0x5cc2a2)=>this['_addCommentThread'](_0x5cc2a2)),this['on']('submitCommentThread',(_0x23e7fd,_0x430aa9)=>this['_submitCommentThread'](_0x430aa9)),this['on']('resolveCommentThread',(_0x316bb6,_0x5503b9)=>this['_resolveCommentThread'](_0x5503b9)),this['on']('resolveCommentThread',(_0x39e18f,_0x320d93)=>this['_updateActiveAnnotation'](_0x320d93),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x6abcfc,_0x40628c)=>this['_reopenCommentThread'](_0x40628c)),this['on']('reopenCommentThread',(_0xfd2f6,_0x3c265b)=>this['_updateActiveAnnotation'](_0x3c265b),{'priority':'lowest'}),this['on']('removeCommentThread',(_0xba5e89,_0x44465f)=>this['_removeCommentThread'](_0x44465f)),this['on']('updateCommentThread',(_0x27fc50,_0x3940be)=>this['_updateCommentThread'](_0x3940be)),this['on']('updateCommentThread',(_0x3ce994,_0x1c8102)=>this['_updateActiveAnnotation'](_0x1c8102),{'priority':'lowest'}),this['on']('addComment',(_0x4e85a7,_0x203df5)=>this['_addComment'](_0x203df5)),this['on']('updateComment',(_0x5af8ab,_0x397a97)=>this['_updateComment'](_0x397a97)),this['on']('removeComment',(_0x3f1c74,_0x32a6c5)=>this['_removeComment'](_0x32a6c5)),this['on']('addComment',(_0x3c9949,{threadId:_0x56c01e,isFromAdapter:_0x3b87ca})=>{if(_0x3b87ca)return;const _0x264b46=this['getCommentThread'](_0x56c01e),_0x12eeac=_0x264b46&&this['_threadToController']['get'](_0x264b46);_0x12eeac&&_0x12eeac['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1b7750,'change:activeAnnotations',(_0x1dbec4,_0x2770bd,_0x335f48)=>{const _0x5eac38=Array['from'](_0x335f48)['map'](_0x52f0a8=>this['_viewToController']['get'](_0x52f0a8['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5eac38?_0x5eac38['model']:null;});}set['adapter'](_0x514629){if(this['_adapter'])throw new _0x1b7c73('commentsrepository-adapter-already-set');this['_adapter']=_0x514629;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x59ee71=ii,threadId:_0x20ab79=_0x1bad21(),comments:_0x2640a7=[],unlinkedAt:_0x3e4c24=null,resolvedAt:_0x1a7525=null,resolvedBy:_0x3cbabc=null,target:_0x1c2f68=null,context:_0x1de8a5=null,attributes:_0x52cafc={},isResolvable:_0x23e2a1=!0x0,isSubmitted:_0x179b6f=!0x1,isFromAdapter:_0x45a1ae=!0x1}={}){return this['fire'](ai('addCommentThread',_0x59ee71),{'channelId':_0x59ee71,'threadId':_0x20ab79,'comments':_0x2640a7,'unlinkedAt':_0x3e4c24,'resolvedAt':_0x1a7525,'resolvedBy':_0x3cbabc,'target':_0x1c2f68,'context':_0x1de8a5,'attributes':_0x52cafc,'isFromAdapter':_0x45a1ae,'isResolvable':_0x23e2a1,'isSubmitted':_0x179b6f}),this['getCommentThread'](_0x20ab79);}['openNewCommentThread']({channelId:_0xe6a9=ii,threadId:_0x5f18b5=_0x1bad21(),target:_0x1468f1,context:_0x41a6fd=null,isResolvable:_0xd86a3a=!0x0}){if(this['_readOnlyChannels']['has'](_0xe6a9)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1468f1)throw new _0x1b7c73('commentsrepository-missing-target');const _0x5b726b=this['addCommentThread']({'channelId':_0xe6a9,'threadId':_0x5f18b5,'target':_0x1468f1,'context':_0x41a6fd,'isResolvable':_0xd86a3a});if(!_0x5b726b)return null;const _0x584dc7=this['_threadToController']['get'](_0x5b726b),_0x391328=_0x584dc7['view']['commentThreadInputView']['commentInputView'],_0xab3e3e=this['context']['plugins']['get'](ti),_0x3def45=_0xab3e3e['getByInnerView'](_0x584dc7['view']);return _0xab3e3e['activate'](_0x3def45),_0x391328['once']('editorReady',()=>_0x391328['focus']()),_0x5b726b;}['hasCommentThread'](_0x44d4d5){if('string'!=typeof _0x44d4d5)throw new _0x1b7c73('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x44d4d5);}['updateCommentThread']({channelId:_0x1f7d2f=ii,threadId:_0x5137fc,context:_0x2c3c38,unlinkedAt:_0x3d077c,attributes:_0x7fc66b,isFromAdapter:_0x1b5eb8=!0x1}){return this['fire'](ai('updateCommentThread',_0x1f7d2f),{'channelId':_0x1f7d2f,'threadId':_0x5137fc,'context':_0x2c3c38,'unlinkedAt':_0x3d077c,'attributes':_0x7fc66b,'isFromAdapter':_0x1b5eb8}),this['getCommentThread'](_0x5137fc);}['getCommentThread'](_0x520e8a){if('string'!=typeof _0x520e8a)throw new _0x1b7c73('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x520e8a);}['fetchCommentThread']({channelId:_0x5f3f91,threadId:_0x3bf73e}={}){const _0x5f180d=this['getCommentThread'](_0x3bf73e);if(_0x5f180d)return Promise['resolve'](_0x5f180d);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x1b7c73('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5f3f91,'threadId':_0x3bf73e})['then'](_0x49a6c5=>this['hasCommentThread'](_0x3bf73e)?this['getCommentThread'](_0x3bf73e):_0x49a6c5?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5f3f91},_0x49a6c5)):void 0x0)['catch'](_0x45c856=>{throw console['error'](_0x45c856),new _0x1b7c73('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x10fe3b,skipNotAttached:_0x10f3ab=!0x1,skipEmpty:_0x3a18e5=!0x1,toJSON:_0x3739a7=!0x1}={}){const _0x24c339=[];for(const _0x52574d of this['_threads']['values']())_0x10fe3b&&_0x52574d['channelId']!==_0x10fe3b||_0x10f3ab&&!_0x52574d['isAttached']||_0x3a18e5&&0x0===_0x52574d['length']||_0x24c339['push'](_0x52574d);return _0x3739a7?_0x24c339['map'](_0xb99885=>_0xb99885['toJSON']()):_0x24c339;}['getAnnotationForCommentThread'](_0x428582){const _0x367773=this['_threadToController']['get'](_0x428582);return _0x367773&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x367773['view'])||null;}['getCommentThreadForAnnotation'](_0x222893){const _0xa854a7=this['_viewToController']['get'](_0x222893['innerView']);return _0xa854a7?_0xa854a7['model']:null;}['setActiveCommentThread'](_0x2e15d9){const _0x4e5e07=this['context']['plugins']['get'](ti);if(!_0x2e15d9)return void(this['activeCommentThread']&&_0x4e5e07['deactivateAll']());const _0x15828a=this['getCommentThread'](_0x2e15d9);if(!_0x15828a)throw new _0x1b7c73('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2e15d9});if(!this['_threadToController']['has'](_0x15828a))throw new _0x1b7c73('commentsrepository-active-not-attached',null,{'threadId':_0x2e15d9});const _0x38caa6=_0x4e5e07['getByInnerView'](this['_threadToController']['get'](_0x15828a)['view']);_0x4e5e07['activate'](_0x38caa6);}['switchReadOnly'](_0x3d87d8,_0x18bb5f){_0x3d87d8?this['_readOnlyChannels']['add'](_0x18bb5f):this['_readOnlyChannels']['delete'](_0x18bb5f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1f6dac){return this['_readOnlyChannels']['has'](_0x1f6dac)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4c280c,_0x28a601){return new bt(_0x4c280c,_0x28a601);}['setPermissions'](_0x343649,_0x504ae6=ii){this['_permissions']['set'](_0x504ae6,_0x343649),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4ca08e=ii){return this['_permissions']['has'](_0x4ca08e)?this['_permissions']['get'](_0x4ca08e):ei;}['_addCommentThread']({channelId:_0x15cad5,threadId:_0xe3fe40,comments:_0x45d566,unlinkedAt:_0x1fe250,resolvedAt:_0x6c4151,resolvedBy:_0x6a13af,target:_0x508e28,context:_0x2194e2,attributes:_0x340810,isFromAdapter:_0x2c4b38,isResolvable:_0x41089b,isSubmitted:_0x5f5aab}){if('string'!=typeof _0xe3fe40)throw new _0x1b7c73('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xe3fe40});if(this['hasCommentThread'](_0xe3fe40))throw new _0x1b7c73('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xe3fe40});const _0x1a0530=new ri(this,{'channelId':_0x15cad5,'id':_0xe3fe40,'context':_0x2194e2,'attributes':_0x340810,'unlinkedAt':_0x1fe250,'resolvedAt':_0x6c4151,'resolvedBy':_0x6a13af?this['context']['plugins']['get'](_0x595e9b)['getUser'](_0x6a13af):null,'isResolvable':_0x41089b,'isSubmitted':_0x5f5aab||_0x2c4b38});this['_threads']['set'](_0xe3fe40,_0x1a0530);for(const _0x19a95d of _0x45d566)_0x1a0530['_add'](this['_createNewComment']({'threadId':_0xe3fe40,..._0x19a95d}));return _0x508e28&&_0x1a0530['attachTo'](_0x508e28),_0x2c4b38||!_0x1a0530['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x15cad5,'threadId':_0xe3fe40});}['_submitCommentThread']({channelId:_0x49875a,threadId:_0x3a0d30}){if(!this['hasCommentThread'](_0x3a0d30))throw new _0x1b7c73('commentsrepository-missing-comment-thread',this);const _0xa84699=this['getCommentThread'](_0x3a0d30);if(_0xa84699['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x153a08,comments:_0x3e3cdb,resolvedAt:_0x589f6f,resolvedBy:_0x3405f7,context:_0x3eecdd,attributes:_0x2fc7bf}=_0xa84699,_0x524a58=this['context']['plugins']['get']('PendingActions'),_0x48d0fb=_0x524a58['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x49875a,'threadId':_0x153a08,'comments':_0x3e3cdb['map'](_0xa875e7=>_0xa875e7['toJSON']()),'resolvedAt':_0x589f6f,'resolvedBy':_0x3405f7?_0x3405f7['id']:_0x3405f7,'context':_0x3eecdd,'attributes':_0x2fc7bf})['then'](({comments:_0x23b57c})=>{_0x524a58['remove'](_0x48d0fb);for(const _0x236515 of _0x23b57c)this['_updateComment']({'channelId':_0x49875a,'threadId':_0x3a0d30,'commentId':_0x236515['commentId'],'createdAt':_0x236515['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4388af=>{throw console['error'](_0x4388af),new _0x1b7c73('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x48c561,target:_0x5222ad}){const _0x8b6c05=this['getCommentThread'](_0x48c561);if(!_0x8b6c05)throw new _0x1b7c73('commentsrepository-attach-missing-comment-thread',this);const _0x4de979=this['context']['plugins']['get']('PendingActions'),_0x11e1bd=this['context']['plugins']['get'](ti),_0x290c15=this['_createCommentThreadView'](_0x8b6c05),_0x3984f4=new bt(_0x8b6c05,_0x290c15);let _0x4e5213=null;_0x290c15['on']('change:isDirty',(_0x4676b8,_0x5aae7f,_0x4a3051)=>{_0x4a3051?_0x4e5213=_0x4de979['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4e5213&&(_0x4de979['remove'](_0x4e5213),_0x4e5213=null);}),this['_threadToController']['set'](_0x8b6c05,_0x3984f4),this['_viewToController']['set'](_0x290c15,_0x3984f4);const _0xefaf84=new qt(this['context']['locale'],_0x290c15);_0xefaf84['bind']('length')['to'](_0x290c15),_0xefaf84['bind']('isDirty')['to'](_0x290c15,'isDirty',_0x290c15,'length',(_0x1de3df,_0x5592aa)=>_0x1de3df||!_0x5592aa),_0xefaf84['bind']('isActive')['to'](_0x290c15),_0xefaf84['type']='comment';const _0x2fd926=new $t({'view':_0xefaf84,'target':_0x5222ad,'type':'comment','isVisible':!_0x8b6c05['archivedAt']&&!!('function'==typeof _0x5222ad?_0x5222ad():_0x5222ad)});return _0x290c15['on']('escape',()=>{_0x2fd926['fire']('escape');}),this['_bindAnnotationToEditors'](_0x290c15,_0x2fd926),_0x11e1bd['add'](_0x2fd926),_0x2fd926;}['_bindAnnotationToEditors'](_0x31e09b,_0xe8e405){this['listenTo'](_0x31e09b,'editorReady',(_0x273a38,_0x4334a0)=>{const _0x520d5f=_0x4334a0['ui']['view']['body']['bodyCollectionContainer'];_0xe8e405['focusableElements']['add'](_0x520d5f),this['context']instanceof _0x1f13cd&&this['context']['ui']['focusTracker']['add'](_0x520d5f);},{'priority':'highest'}),this['listenTo'](_0x31e09b,'editorDestroyed',(_0x49d1b3,_0x4a63b9)=>{const _0x54f6b0=_0x4a63b9['ui']['view']['body']['bodyCollectionContainer'];_0xe8e405['focusableElements']['has'](_0x54f6b0)&&_0xe8e405['focusableElements']['remove'](_0x54f6b0),this['context']instanceof _0x1f13cd&&this['context']['ui']['focusTracker']['remove'](_0x54f6b0);});}['_unbindEditors'](_0x1fde2a){this['stopListening'](_0x1fde2a,'editorReady'),this['stopListening'](_0x1fde2a,'editorDestroyed');}['_createCommentThreadView'](_0x1aa03a){const _0xbb9b57=this['context']['plugins']['get'](_0x595e9b),{config:_0x4a7327,locale:_0x10ba75}=this['context'],_0x73acba=_0xd2b818(_0x4a7327['get']('locale'),_0x10ba75);return new(0x0,(_0x4a7327['get']('comments'))['CommentThreadView'])(_0x10ba75,_0x1aa03a,_0xbb9b57['me'],{'editorConfig':{..._0x4a7327['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4a7327['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4a7327['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4a7327['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4a7327['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x73acba,'CommentView':_0x4a7327['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x40a056,channelId:_0x3efe24,resolvedAt:_0x54beb9,resolvedBy:_0x555246,isFromAdapter:_0xe4bd6f}){if(!this['hasCommentThread'](_0x40a056))throw new _0x1b7c73('commentsrepository-missing-comment-thread',null,{'threadId':_0x40a056});const _0x47c8f7=this['getCommentThread'](_0x40a056);if(_0x47c8f7['isResolved'])throw new _0x1b7c73('commentsrepository-resolved-comment-thread',null,{'threadId':_0x40a056});const _0x226e2b=this['context']['plugins']['get'](_0x595e9b);if(_0x47c8f7['resolvedBy']=_0x226e2b['getUser'](_0x555246),_0x47c8f7['resolvedAt']=_0x54beb9,_0xe4bd6f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4bdacd=this['context']['plugins']['get']('PendingActions'),_0x544feb=_0x4bdacd['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3efe24,'threadId':_0x40a056})['then'](({resolvedAt:_0x1a6906,resolvedBy:_0x491b8f})=>{_0x4bdacd['remove'](_0x544feb),_0x47c8f7['resolvedBy']['id']!==_0x491b8f&&(_0x47c8f7['resolvedBy']=_0x226e2b['getUser'](_0x491b8f)),_0x47c8f7['resolvedAt']=_0x1a6906;})['catch'](_0xc316d9=>{throw console['error'](_0xc316d9),new _0x1b7c73('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x47d042,channelId:_0x186bba,isFromAdapter:_0x525abb}){if(!this['hasCommentThread'](_0x47d042))throw new _0x1b7c73('commentsrepository-missing-comment-thread',null,{'threadId':_0x47d042});const _0x517d1b=this['getCommentThread'](_0x47d042);if(!_0x517d1b['isResolved'])throw new _0x1b7c73('commentsrepository-reopen-comment-thread',null,{'threadId':_0x47d042});if(_0x517d1b['resolvedBy']=null,_0x517d1b['resolvedAt']=null,_0x525abb||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x58ae1a=this['context']['plugins']['get']('PendingActions'),_0x5d0951=_0x58ae1a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x186bba,'threadId':_0x47d042})['then'](()=>_0x58ae1a['remove'](_0x5d0951))['catch'](_0x1a787b=>{throw console['error'](_0x1a787b),new _0x1b7c73('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x342b21,isFromAdapter:_0x5c0444}){const _0x5cd839=this['getCommentThread'](_0x342b21);if(!_0x5cd839)throw new _0x1b7c73('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x342b21),this['_threads']['delete'](_0x342b21),!_0x5cd839['isSubmitted']||_0x5c0444||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x6a9da6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x39714c}=_0x5cd839,_0x2fa27a=_0x6a9da6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x39714c,'threadId':_0x342b21})['then'](()=>_0x6a9da6['remove'](_0x2fa27a))['catch'](_0x7184ea=>{throw console['error'](_0x7184ea),new _0x1b7c73('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4188bc,unlinkedAt:_0x3795cc,context:_0x33e9b3,attributes:_0xd18fd2,isFromAdapter:_0x15d3f3}){if('string'!=typeof _0x4188bc)throw new _0x1b7c73('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4188bc});if(!this['hasCommentThread'](_0x4188bc))throw new _0x1b7c73('commentsrepository-missing-comment-thread',null,{'threadId':_0x4188bc});const _0xa75808=this['getCommentThread'](_0x4188bc);let _0x5eeef1=!0x1;if(void 0x0!==_0x33e9b3&&_0xa75808['context']!==_0x33e9b3&&(_0xa75808['context']=_0x33e9b3,_0x5eeef1=!0x0),void 0x0!==_0x3795cc&&_0xa75808['unlinkedAt']!==_0x3795cc&&(_0xa75808['unlinkedAt']=_0x3795cc,_0x5eeef1=!0x0),_0xd18fd2&&!_0x437e74(_0xd18fd2,_0xa75808['attributes'])&&(_0xa75808['attributes']=_0xd18fd2,_0x5eeef1=!0x0),!_0x5eeef1)return Promise['resolve']();if(!_0xa75808['isSubmitted']||_0x15d3f3||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4fbf1e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x51caa5}=_0xa75808,_0x5e815c=_0x4fbf1e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x51caa5,'threadId':_0x4188bc,'context':_0x33e9b3,'unlinkedAt':_0x3795cc,'attributes':_0xd18fd2})['then'](()=>_0x4fbf1e['remove'](_0x5e815c))['catch'](_0x2516c2=>{throw console['error'](_0x2516c2),new _0x1b7c73('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x451032){const _0x249a3b=this['context']['plugins']['get'](ti),_0x3167f0=this['getCommentThread'](_0x451032);if(_0x3167f0['_isAttached']=!0x1,this['_threadToController']['has'](_0x3167f0)){const _0x2fff3d=this['_threadToController']['get'](_0x3167f0),_0x33197d=_0x2fff3d['view'],_0x34da74=_0x249a3b['getByInnerView'](_0x33197d);this['_threadToController']['delete'](_0x3167f0),this['_viewToController']['delete'](_0x33197d),_0x34da74&&_0x249a3b['remove'](_0x34da74),_0x2fff3d['destroy'](),_0x33197d['destroy']()['then'](()=>{this['_unbindEditors'](_0x33197d);});}}['_updateActiveAnnotation']({threadId:_0x3ddb38,resolvedAt:_0x8068ad,unlinkedAt:_0x1a77f6}){const _0x5f2209=!!_0x8068ad,_0x3262f7=this['context']['plugins']['get'](ti),_0x4a1d3b=this['getCommentThread'](_0x3ddb38);if(this['_threadToController']['has'](_0x4a1d3b)){const _0x13b009=this['_threadToController']['get'](_0x4a1d3b)['view'],_0x56f2f8=_0x3262f7['getByInnerView'](_0x13b009);_0x56f2f8&&(_0x5f2209&&_0x3262f7['_removeActiveAnnotation'](_0x56f2f8),_0x1a77f6?_0x56f2f8['isVisible']=!0x1:_0x56f2f8['refreshVisibility']());}}['_getExternalAuthor'](_0x5979b){const _0x26b619=this['context']['plugins']['get'](_0x595e9b),_0x19cb19=_0x153f42('external:'+_0x5979b),_0x295117=_0x26b619['getUser'](_0x19cb19);return _0x295117||_0x26b619['addUser']({'id':_0x19cb19,'name':_0x5979b});}['_createNewComment']({threadId:_0x4c4b8b,commentId:_0x1552a4=_0x1bad21(),content:_0x2a2d0d,authorId:_0x3a15e2,createdAt:_0x1ee613,attributes:_0x278ea0}){if('string'!=typeof _0x1552a4)throw new _0x1b7c73('commentsrepository-invalid-commentid');if('string'!=typeof _0x3a15e2)throw new _0x1b7c73('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2a2d0d||!_0x2a2d0d['trim']())throw new _0x1b7c73('commentsrepository-invalid-comment-content');const _0x5b05e5=this['context']['plugins']['get'](_0x595e9b)['getUser'](_0x3a15e2);if(!_0x5b05e5)throw new _0x1b7c73('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3a15e2});let _0x4e6129=null,_0x2fc1a7=_0x1ee613;return _0x278ea0?.['@external']&&(_0x4e6129=this['_getExternalAuthor'](_0x278ea0['@external']['authorName']),_0x2fc1a7=new Date(_0x278ea0['@external']['createdAt'])),new hi(this,{'threadId':_0x4c4b8b,'id':_0x1552a4,'author':_0x4e6129||_0x5b05e5,'creator':_0x5b05e5,'content':_0x2a2d0d,'createdAt':_0x1ee613,'authoredAt':_0x2fc1a7,'attributes':_0x278ea0});}['_addComment'](_0x53be49){let {threadId:_0x48f315,content:_0xcbeb4b,attributes:_0x3bf777,isFromAdapter:_0x1b8046}=_0x53be49;const _0x43cd93=this['getCommentThread'](_0x53be49['threadId']);if(!_0x43cd93)throw new _0x1b7c73('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4832c5=this['_createNewComment'](_0x53be49),{id:_0x2ced98}=_0x4832c5;if(_0x43cd93['_add'](_0x4832c5),_0x1b8046||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x43cd93['isSubmitted'])return Promise['resolve']();const _0x274155=this['context']['plugins']['get']('PendingActions'),{channelId:_0x433a19}=_0x43cd93,_0xc1b3b4=_0x274155['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3bf777||(_0x3bf777={}),this['adapter']['addComment']({'channelId':_0x433a19,'threadId':_0x48f315,'commentId':_0x2ced98,'content':_0xcbeb4b,'attributes':_0x3bf777})['then'](_0x50210f=>{_0x274155['remove'](_0xc1b3b4),_0x50210f&&this['_updateComment']({'channelId':_0x433a19,'threadId':_0x48f315,'commentId':_0x2ced98,'createdAt':_0x50210f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x96791a=>{throw console['error'](_0x96791a),new _0x1b7c73('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x22350c,commentId:_0x39ebc8,content:_0x12637d,createdAt:_0x52c855,attributes:_0x4f3c52,isFromAdapter:_0xb60a0c}){if(void 0x0!==_0x12637d&&('string'!=typeof _0x12637d||!_0x12637d['trim']()['length']))throw new _0x1b7c73('commentsrepository-update-comment-invalid-content');const _0x5adf1d=this['getCommentThread'](_0x22350c),_0x5a05fa=_0x5adf1d['getComment'](_0x39ebc8);if(!_0x5a05fa)throw new _0x1b7c73('commentsrepository-update-missing-comment',this);let _0x593a19=!0x1;if(_0x12637d&&_0x12637d!==_0x5a05fa['content']&&(_0x5a05fa['isEditable']||_0xb60a0c)&&(_0x5a05fa['content']=_0x12637d,_0x593a19=!0x0),_0x52c855&&_0x52c855!==_0x5a05fa['createdAt']&&(_0x5a05fa['createdAt']=_0x52c855,_0x5a05fa['isExternal']||(_0x5a05fa['authoredAt']=_0x52c855),_0x593a19=!0x0),_0x4f3c52&&!_0x437e74(_0x4f3c52,_0x5a05fa['attributes'])&&(_0x5a05fa['attributes']=_0x4f3c52,_0x593a19=!0x0),!_0x593a19)return Promise['resolve']();if(_0x5adf1d['fire']('commentUpdated'),_0xb60a0c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x234f1a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4ed380}=this['getCommentThread'](_0x5a05fa['threadId']),_0x3d008f=_0x234f1a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4ed380,'threadId':_0x22350c,'commentId':_0x39ebc8,'content':_0x12637d,'attributes':_0x4f3c52})['then'](()=>_0x234f1a['remove'](_0x3d008f))['catch'](_0x5a5b87=>{throw console['error'](_0x5a5b87),new _0x1b7c73('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x2682ed,commentId:_0xe0b133,isFromAdapter:_0x3f52a7}){const _0x88732a=this['getCommentThread'](_0x2682ed),_0x4a0efe=_0x88732a['getComment'](_0xe0b133);if(!_0x4a0efe)throw new _0x1b7c73('commentsrepository-remove-missing-comment',this);if(_0x88732a['_remove'](_0x4a0efe),_0x3f52a7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1ee777=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1c35e7}=_0x88732a,_0x4d8862=_0x1ee777['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1c35e7,'threadId':_0x2682ed,'commentId':_0xe0b133})['then'](()=>_0x1ee777['remove'](_0x4d8862))['catch'](_0x342149=>{throw console['error'](_0x342149),new _0x1b7c73('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x32237a,_0x590cff){super();const _0x54585d=_0x590cff['isResolvable'];this['channelId']=_0x590cff['channelId'],this['id']=_0x590cff['id'],this['comments']=new _0x103a51(),this['_repository']=_0x32237a,this['_isAttached']=!0x1,this['_isSubmitted']=_0x590cff['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x32237a,'_permissions',_0x32237a,'_readOnlyChannels',()=>_0x32237a['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x32237a,'_permissions',()=>_0x32237a['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x32237a,'_permissions',()=>{const _0x4ab627=_0x32237a['getPermissions'](this['channelId']);return _0x4ab627['write']||_0x4ab627['admin'];}),this['bind']('isResolvable')['to'](_0x32237a,'_permissions',()=>_0x54585d&&_0x32237a['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x590cff['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0xf95a8d,_0x1899f2)=>_0xf95a8d?_0x1899f2?_0xf95a8d<_0x1899f2?_0xf95a8d:_0x1899f2:_0xf95a8d:_0x1899f2),this['set']('unlinkedAt',_0x590cff['unlinkedAt']||null),this['set']('resolvedAt',_0x590cff['resolvedAt']||null),this['set']('resolvedBy',_0x590cff['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x93fc18=>!!_0x93fc18),this['set']('attributes',_0x590cff['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2f5e61,_0x42cf43)=>_0x2f5e61+_0x42cf43['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xbb5e24,id:_0x2d6eca}=this;this['_repository']['fire'](ai('submitCommentThread',_0xbb5e24),{'channelId':_0xbb5e24,'threadId':_0x2d6eca});}['setUnlinkedAt'](_0x1d9ae6){this['_update']({'unlinkedAt':_0x1d9ae6});}['resolve']({resolvedAt:_0x235776=new Date(),resolvedBy:_0x1563d6='',isFromAdapter:_0x3d00cf=!0x1}={}){const _0x46c5a7=this['_repository']['context']['plugins']['get'](_0x595e9b)['me'],{channelId:_0x1b9cca,id:_0x17f7b3}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x1b9cca),{'channelId':_0x1b9cca,'threadId':_0x17f7b3,'resolvedAt':_0x235776,'resolvedBy':_0x1563d6||_0x46c5a7['id'],'isFromAdapter':_0x3d00cf});}['reopen']({isFromAdapter:_0x4bf97b=!0x1}={}){const {channelId:_0x4900d4,id:_0x4f700f}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x4900d4),{'channelId':_0x4900d4,'threadId':_0x4f700f,'isFromAdapter':_0x4bf97b});}['setContext'](_0x595c6a){this['context']||this['_update']({'context':_0x595c6a});}['setAttribute'](_0x12711b,_0x3a816d){const _0x4be93f=_0x3fb366(this['attributes']);_0x53a91c(_0x4be93f,_0x12711b,_0x3a816d),this['_update']({'attributes':_0x4be93f});}['removeAttribute'](_0x509ab9){const _0x119712=_0x3fb366(this['attributes']);_0x33d00c(_0x119712,_0x509ab9),this['_update']({'attributes':_0x119712});}['remove']({isFromAdapter:_0x5cea76=!0x1}={}){const {channelId:_0x4bc083,id:_0x3efa2d}=this;this['_repository']['fire'](ai('removeCommentThread',_0x4bc083),{'channelId':_0x4bc083,'threadId':_0x3efa2d,'isFromAdapter':_0x5cea76});}['attachTo'](_0x558d2e){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x558d2e});}['addComment'](_0xe2fa6c){const {channelId:_0x3d23e4,id:_0x301a58}=this;this['_repository']['fire'](ai('addComment',_0x3d23e4,_0x301a58),Object['assign']({'channelId':_0x3d23e4,'threadId':_0x301a58},_0xe2fa6c));}['getComment'](_0x27d739){if('string'!=typeof _0x27d739)throw new _0x1b7c73('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x27d739});return this['comments']['get'](_0x27d739);}['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'](_0x411601=>_0x411601['toJSON']()),'attributes':this['attributes']};}['_add'](_0x142f60){return this['listenTo'](_0x142f60,'change:authoredAt',()=>{const _0x4aa45d=this['_findOptimalIndex'](_0x142f60),_0x3cf753=this['comments'];_0x4aa45d-0x1!=_0x3cf753['getIndex'](_0x142f60)&&_0x4aa45d+0x1!=_0x3cf753['getIndex'](_0x142f60)&&(this['_remove'](_0x142f60),this['_add'](_0x142f60));}),this['comments']['add'](_0x142f60,this['_findOptimalIndex'](_0x142f60));}['_update'](_0x86518a){const {channelId:_0x1b5cb0,id:_0x345678}=this;this['_repository']['fire'](ai('updateCommentThread',_0x1b5cb0),{..._0x86518a,'channelId':_0x1b5cb0,'threadId':_0x345678});}['_remove'](_0x229618){return this['stopListening'](_0x229618),_0x229618['destroy'](),this['comments']['remove'](_0x229618);}['_findOptimalIndex'](_0x59a70b){const _0x46a644=this['comments']['find'](_0x36aa93=>new Date(_0x36aa93['authoredAt'])['getTime']()>new Date(_0x59a70b['authoredAt'])['getTime']());return _0x46a644?this['comments']['getIndex'](_0x46a644):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x28e6fe,_0x112d60){super();const _0x5d7ea5=_0x28e6fe['context']['plugins']['get'](_0x595e9b)['me'],_0x155f10=_0x28e6fe['getCommentThread'](_0x112d60['threadId']),_0x2f0f9e=0x0===_0x155f10['comments']['length'],_0x1590af=_0x5d7ea5===_0x112d60['author'];this['id']=_0x112d60['id'],this['threadId']=_0x112d60['threadId'],this['author']=_0x112d60['author'],this['creator']=_0x112d60['creator'],this['set']('content',_0x112d60['content']),this['createdAt']=_0x112d60['createdAt']||new Date(),this['set']('authoredAt',_0x112d60['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x155f10,'resolvedAt'),this['set']('attributes',_0x112d60['attributes']||{}),this['bind']('isEditable')['to'](_0x28e6fe,'_permissions',()=>{const _0x3cc900=_0x28e6fe['getPermissions'](_0x155f10['channelId'])['write'],_0x841fcf=_0x28e6fe['getPermissions'](_0x155f10['channelId'])['modifyAll'];return _0x1590af&&_0x3cc900||!_0x1590af&&_0x841fcf;}),this['bind']('isRemovable')['to'](_0x155f10,'isRemovable',_0x28e6fe,'_permissions',_0x5baa0a=>{const _0x53dfa9=_0x28e6fe['getPermissions'](_0x155f10['channelId'])['write'],_0x6c044=_0x28e6fe['getPermissions'](_0x155f10['channelId'])['modifyAll'];return _0x1590af&&_0x53dfa9||_0x5baa0a&&_0x2f0f9e||!_0x1590af&&_0x6c044&&!_0x2f0f9e;}),this['bind']('isReadOnly')['to'](_0x155f10,'isReadOnly'),this['_repository']=_0x28e6fe;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x3a2497){const _0x4fa5ca=document['createElement']('div');return _0x4fa5ca['innerHTML']=_0x3a2497,_0x4fa5ca['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3fedff){const {threadId:_0xad118,id:_0xe853dc}=this;if(!this['_repository']['hasCommentThread'](_0xad118))throw new _0x1b7c73('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x493249}=this['_repository']['getCommentThread'](_0xad118);this['_repository']['fire'](ai('updateComment',_0x493249,_0xad118),{'channelId':_0x493249,'threadId':_0xad118,'commentId':_0xe853dc,..._0x3fedff});}['setAttribute'](_0x2f1284,_0x4a09e9){const _0x2988fa=_0x3fb366(this['attributes']);_0x53a91c(_0x2988fa,_0x2f1284,_0x4a09e9),this['update']({'attributes':_0x2988fa});}['removeAttribute'](_0xff4803){const _0x100222=_0x3fb366(this['attributes']);_0x33d00c(_0x100222,_0xff4803),this['update']({'attributes':_0x100222});}['remove'](_0x274c07={}){if(!_0x274c07['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3a69f2,id:_0xad3765}=this;if(!this['_repository']['hasCommentThread'](_0x3a69f2))throw new _0x1b7c73('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x23013f}=this['_repository']['getCommentThread'](_0x3a69f2);this['_repository']['fire'](ai('removeComment',_0x23013f,_0x3a69f2),{'channelId':_0x23013f,'threadId':_0x3a69f2,'commentId':_0xad3765,..._0x274c07});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x51536a,..._0x15c1a9){for(const _0xba301 of _0x15c1a9)void 0x0!==_0xba301&&(_0x51536a+=':'+String(_0xba301));return _0x51536a;}var ci=class extends _0x1a4d33{constructor(_0x4f2a2e){super(_0x4f2a2e),this['set']('hasContent',!0x1);}['refresh'](){const _0x26a9b3=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x33830b of _0x26a9b3['getRanges']())if(this['_hasContent'](_0x33830b))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x590936=_0x1bad21(),ranges:_0x59000b,comment:_0x266124}={}){const _0x5a3cb4=this['editor']['model'],_0x40d6a1=_0x59000b??Array['from'](_0x5a3cb4['document']['selection']['getRanges']()),_0x4f6ed8=[];for(const _0x49cceb of _0x40d6a1)this['_hasContent'](_0x49cceb)&&_0x4f6ed8['push'](this['_trimToContent'](_0x49cceb));if(!_0x4f6ed8['length'])throw new _0x1b7c73('addcommentthreadcommand-incorrect-ranges',null);_0x266124&&this['_createCommentThread'](_0x590936,_0x266124),this['_createMarkersFromRanges'](_0x590936,_0x4f6ed8,!!_0x266124);}['_createMarkersFromRanges'](_0x3f028a,_0x2cfd7c,_0x3b59a9){this['editor']['model']['change'](_0x3211f4=>{for(const _0x18390b of _0x2cfd7c){const _0x19ce4c='comment:'+_0x3f028a+':'+_0x1bad21()['substr'](0x1,0x5);_0x3211f4['addMarker'](_0x19ce4c,{'range':_0x18390b,'usingOperation':_0x3b59a9,'affectsData':_0x3b59a9});}});}['_createCommentThread'](_0x946a72,_0xe0b107){const _0x5288b2=this['editor']['plugins']['get']('CommentsRepository'),_0x263218=this['editor']['config']['get']('collaboration.channelId'),_0x1ea6b6=this['editor']['plugins']['get']('Users')['me'];if(!_0x1ea6b6)throw new _0x1b7c73('addcommentthreadcommand-user-not-found',null);_0x5288b2['addCommentThread']({'threadId':_0x946a72,'channelId':_0x263218,'comments':[{'authorId':_0x1ea6b6['id'],'content':_0xe0b107,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x55f39b){for(const _0x30e01f of _0x55f39b['getItems']())if(this['_itemIsContent'](_0x30e01f))return!0x0;return!0x1;}['_itemIsContent'](_0x344b0c){return _0x344b0c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x344b0c)&&!_0x344b0c['is']('element','tableCell');}['_trimToContent'](_0x2d12d8){const _0x310cdf=_0x27c7c5=>!this['_itemIsContent'](_0x27c7c5['item']),_0x3b3e82=_0x2d12d8['start']['getLastMatchingPosition'](_0x310cdf),_0x1bcdaa=_0x2d12d8['end']['getLastMatchingPosition'](_0x310cdf,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3b3e82,_0x1bcdaa);}},di=class extends _0x2171e9{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x262648){super(_0x262648),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x300159=this['editor'],_0x18ee04=_0x300159['model']['document']['selection'],_0x244f3a=_0x13e923(()=>this['refreshSelectedViews'](),0xa);_0x18ee04['on']('change:range',(_0x3b9511,_0x949950)=>{_0x949950['directChange']&&(_0x244f3a['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x300159['editing']['view']['document'],'change:isFocused',(_0x1206ff,_0x101275,_0x2f7c33)=>{_0x2f7c33&&_0x244f3a();}),this['listenTo'](_0x300159['ui']['focusTracker'],'change:isFocused',(_0x25e4ca,_0xe19413,_0x5ba002)=>{_0x5ba002||this['fire']('blur',{'isAnnotationTracked':_0x5b88c0=>this['_editorAnnotationsData']['has'](_0x5b88c0['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x462822){if(this['_editorAnnotations']['has'](_0x462822['view']))return;this['_editorAnnotations']['add'](_0x462822['view']),this['editor']['ui']['focusTracker']['add'](_0x462822['view']['element']);const _0x300afc=this['editor']['plugins']['get'](ti);this['listenTo'](_0x300afc['collection'],'remove',(_0x237fbe,_0x19d886)=>{this['editor']['ui']['focusTracker']['remove'](_0x19d886['view']['element']),this['_editorAnnotations']['delete'](_0x19d886['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x32ec6f){if('function'!=typeof _0x32ec6f)throw new _0x1b7c73('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x32ec6f);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2a7e6c,annotations:_0x1b9fd1}){const _0x2def51=[],_0x2cc842=this['editor']['model']['document']['selection'],_0x2ff27c=Array['from'](_0x2cc842['getRanges']());for(const [_0x2936a7,_0x3f5097]of this['_editorAnnotationsData']){const _0x1e5055=_0x177971(_0x3f5097),_0x45681f=_0x1b9fd1['getByInnerView'](_0x2936a7);_0x1e5055&&_0x45681f&&_0x2def51['push']({'annotation':_0x45681f,'range':_0x1e5055});}function _0x177971(_0xb1e3ad){for(const _0x43d487 of _0xb1e3ad)for(const _0x520dfa of _0x2ff27c)if(_0x43d487['containsRange'](_0x520dfa,!_0x2cc842['isCollapsed']))return _0x43d487;return null;}return _0x2def51['sort']((_0x2003ba,_0x5d3dc1)=>{const _0x5637b0=_0x2003ba['range'],_0x2ba425=_0x5d3dc1['range'];if(!_0x5637b0['isEqual'](_0x2ba425)){if(_0x5637b0['containsRange'](_0x2ba425,!0x0))return 0x1;if(_0x2ba425['containsRange'](_0x5637b0,!0x0))return-0x1;}return _0x2003ba['annotation']==_0x2a7e6c?-0x1:_0x5d3dc1['annotation']==_0x2a7e6c?0x1:0x0;})['map'](_0x420537=>_0x420537['annotation']);}get['_editorAnnotationsData'](){const _0x2ba4b7=new Map();for(const _0x3b883f of Array['from'](this['_dataCollectors']))for(const [_0x2c23e5,_0x1afc63]of _0x3b883f())_0x2ba4b7['set'](_0x2c23e5,_0x1afc63);return _0x2ba4b7;}},li=class extends _0x2171e9{['afterInit'](){const _0x524a95=this['editor'];_0x524a95['plugins']['has']('RestrictedEditingModeEditing')&&_0x524a95['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x2171e9{constructor(_0x14df13){super(_0x14df13),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1df9c7=this['editor'],_0x56e148=_0x1df9c7['commands']['get']('importWord'),_0x362dd3=_0x1df9c7['plugins']['get'](_0x595e9b);_0x56e148&&(_0x56e148['on']('execute',(_0x3561f4,[,_0x460037])=>{_0x460037['collaboration_features']={'comments':!0x0,'user_id':_0x362dd3['me']['id']};},{'priority':_0x2acd29['high']+0xa}),this['listenTo'](_0x56e148,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x206dca,_0x54527a){const {comment_threads:_0x1313e0}=_0x54527a;_0x1313e0&&_0x1313e0['forEach'](({thread_id:_0x585e33,comments:_0x2b8389,is_resolved:_0x389ac1})=>{const _0x4b3a9e=new Date(),_0x17ad6f=_0x2b8389['map'](({author:_0x5ab18c,content:_0x1ef98e,created_at:_0x407878})=>({'content':_0x1ef98e,'authorId':this['editor']['plugins']['get'](_0x595e9b)['me']['id'],'createdAt':_0x4b3a9e,'attributes':{'@external':{'authorName':_0x5ab18c,'createdAt':_0x407878?new Date(_0x407878):new Date(),'source':'importWord'}}})),_0x3fc981=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x3fc981,'threadId':_0x585e33,'comments':_0x17ad6f,'resolvedAt':_0x389ac1?_0x4b3a9e:null});});}},ui=class extends _0x2171e9{constructor(_0x44f51d){super(_0x44f51d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x3bd910=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x3bd910,'contentInsertion',(_0x1bc488,_0x31d63f)=>this['_removeMarkersWithoutThreads'](_0x31d63f['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xc2adf5){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xc2adf5;const _0x192557=this['editor']['plugins']['get']('CommentsRepository');for(const _0x558961 of _0xc2adf5['keys']()){const [_0x379b14,_0x21eeee]=_0x558961['split'](':');'comment'!=_0x379b14||_0x192557['hasCommentThread'](_0x21eeee)||_0xc2adf5['delete'](_0x558961);}return _0xc2adf5;}['_registerMarkerInClipboardPipeline'](){const _0x60d258=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x19da75=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x19da75&&_0x60d258['_registerMarkerToCopy']('comment',_0x19da75);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x14c35a){switch(_0x14c35a){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x3d72aa){const _0x521f4c=_0x3d72aa['split'](':');return{'group':_0x521f4c[0x0],'id':_0x521f4c[0x1],'part':_0x521f4c[0x2]};}var pi=class extends _0x2171e9{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4c1a62,_0x391689)=>{if(!_0x391689['options']['showCommentHighlights'])return null;if(_0x391689['options']['ignoreResolvedComments']){const {id:_0x41005f}=fi(_0x4c1a62['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x41005f)?.['isResolved']&&_0x4c1a62['item'])return _0x391689['consumable']['consume'](_0x4c1a62['item'],'addMarker:'+_0x4c1a62['markerName']),_0x391689['consumable']['consume'](_0x4c1a62['item'],'removeMarker:'+_0x4c1a62['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3865c5=>{_0x3865c5['on']('addMarker:comment',(_0x5b8276,_0x578011,_0x20f9c6)=>{if(!_0x20f9c6['options']['showCommentHighlights'])return;const _0xf58354=_0x578011['item'];if(!_0xf58354)return;const _0x314a1e=_0x20f9c6['mapper']['toViewElement'](_0xf58354);this['editor']['model']['schema']['isObject'](_0xf58354)&&_0x314a1e&&!_0x314a1e['getCustomProperty']('widget')&&_0x314a1e['is']('containerElement')&&Ct(_0x314a1e,_0x20f9c6['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xedec2b,{writer:_0xeeb4cd,options:_0x2b4c17})=>{if(!_0x2b4c17['showCommentHighlights'])return null;const _0x52d15e=_0xeeb4cd['createContainerElement']('div'),_0x141043=_0xeeb4cd['createEmptyElement']('hr');return _0xeeb4cd['addClass']('ck-horizontal-line',_0x52d15e),_0xeeb4cd['insert'](_0xeeb4cd['createPositionAt'](_0x52d15e,0x0),_0x141043),_0x52d15e;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x386098,{writer:_0x3373b7,options:_0x122259})=>{if(!_0x122259['showCommentHighlights'])return null;const _0x2b1efa=_0x3373b7['createContainerElement']('span'),_0x205db2=_0x3373b7['createEmptyElement']('img');return _0x3373b7['addClass']('image-inline',_0x2b1efa),_0x3373b7['insert'](_0x3373b7['createPositionAt'](_0x2b1efa,0x0),_0x205db2),_0x2b1efa;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2c800d,{writer:_0x33b185,options:_0x4cb792})=>{if(_0x4cb792['showCommentHighlights'])return _0x33b185['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x43c7b3,_0x4d1f70,_0xbe9aa1)=>{_0xbe9aa1['options']['showCommentHighlights']&&_0x43c7b3['stop']();},{'priority':'high'});}},wi=class extends _0x2171e9{static get['requires'](){return[oi,di,_0x595e9b,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x18c480){super(_0x18c480),this['set']('isThreadsLoadingPaused',!0x0),_0x18c480['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5e5879,_0x1341a7,_0x5c6df3,_0xbf055c)=>{const _0x2c5dcc=_0x18c480['plugins']['get'](oi),_0x5d0956=_0x5c6df3?fi(_0x5c6df3)['id']:null;_0x18c480['model']['change'](()=>{if(_0x5d0956){const _0x163ce0=this['getAllMarkersForId'](_0x5d0956);for(const _0x15c29f of _0x163ce0)_0x18c480['editing']['reconvertMarker'](_0x15c29f);}if(_0xbf055c){const {id:_0x1b5aa9}=fi(_0xbf055c),_0x52409d=_0x2c5dcc['getCommentThread'](_0x1b5aa9);if(_0x52409d&&_0x52409d['unlinkedAt'])return;if(_0x52409d&&!_0x52409d['isAttached'])return;const _0x394edd=this['getAllMarkersForId'](_0x1b5aa9);for(const _0x11b15a of _0x394edd)_0x18c480['editing']['reconvertMarker'](_0x11b15a);}}),_0x5d0956&&this['scrollToThreadMarker'](_0x5d0956);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x13f34b=this['editor'],_0x75eb6=_0x13f34b['plugins']['get'](oi),_0x3a381a=_0x13f34b['config']['get']('collaboration.channelId'),_0x95debb=_0x75eb6['getCommentThreads']()['filter'](_0x512c29=>_0x512c29['channelId']!==_0x3a381a);_0x13f34b['commands']['add']('addCommentThread',new ci(_0x13f34b)),this['listenTo'](_0x13f34b,'change:isReadOnly',(_0x232f28,_0x1bd4d6,_0x33b17a)=>{_0x75eb6['switchReadOnly'](_0x33b17a,_0x13f34b['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x75eb6,gi('addCommentThread',_0x3a381a),(_0x4d1147,{threadId:_0xdf91b1})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0xdf91b1)?.['unlinkedAt']&&this['_attachArchivedThread'](_0xdf91b1);}),this['listenTo'](_0x75eb6,gi('removeCommentThread',_0x3a381a),(_0x5b525e,{threadId:_0x4e7e73})=>{_0x13f34b['model']['enqueueChange']({'isUndoable':!0x1},_0x30bbe4=>{const _0x28ae98=this['getAllMarkersForId'](_0x4e7e73);for(const _0x349e5e of _0x28ae98)_0x30bbe4['removeMarker'](_0x349e5e);});}),this['listenTo'](_0x75eb6,gi('resolveCommentThread',_0x3a381a),(_0x39fa35,{threadId:_0xa62e1d})=>{this['_reconvertMarkers'](_0xa62e1d);const _0x1f3519=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x1f3519['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0xa62e1d)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x75eb6,gi('reopenCommentThread',_0x3a381a),(_0x5c8592,{threadId:_0x1c0c67})=>{this['_reconvertMarkers'](_0x1c0c67);},{'priority':'low'}),this['listenTo'](_0x75eb6,gi('addComment',_0x3a381a),(_0x46d6b6,{threadId:_0x3ccb4b,isFromAdapter:_0x59a62d})=>{const _0x5a43b3=this['getAllMarkersForId'](_0x3ccb4b);!_0x59a62d&&0x0!=_0x5a43b3['length']&&_0x75eb6['hasCommentThread'](_0x3ccb4b)&&0x1===_0x75eb6['getCommentThread'](_0x3ccb4b)['length']&&_0x13f34b['model']['enqueueChange']({'isUndoable':!0x1},_0x51fc81=>{for(const _0x56bd2e of _0x5a43b3)_0x51fc81['updateMarker'](_0x56bd2e,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x95debb);}['afterInit'](){!async function(_0x5e94b0){const _0x4a8aa9='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x3513c7=0x78e10,_0x4785ba=window['Date']['now'](),_0x44036c=_0x5e94b0['editor'],_0x3bcac2=new window['Promise'](_0x489cef=>{_0x44036c['once']('ready',_0x489cef);}),_0x20e0f5={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x247c49=_0x44036c['config']['get']('licenseKey');async function _0x5d0d32(){let _0x4317cd,_0x866d9d=null,_0x2dd834=null;try{return'GPL'==_0x247c49?'NotAllowed':(_0x4317cd=_0x531ee6(),_0x4317cd?(_0x4317cd['usageEndpoint']&&(_0x2dd834=_0x3e47c3(_0x4317cd['usageEndpoint'],_0x4317cd['jti'])),await _0x1bc7e2()?_0x168c16()?_0x24b71a()?'Expired':_0x2beebc()?('evaluation'==_0x4317cd['licenseType']&&(_0x866d9d=_0x3cab87('EvaluationLimit')),await _0x47b8b4()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x24b71a(){const _0x177673=['evaluation','trial']['includes'](_0x4317cd['licenseType'])?_0x4785ba/0x3e8:0xe10*_0x3513c7;return _0x4317cd['exp']<_0x177673;}function _0x168c16(){const _0x1679e2=_0x4317cd['features'];if(!_0x1679e2)return!0x1;if(_0x1679e2['includes']('*'))return!0x0;if(_0x1679e2['includes']('CMT'))return!0x0;if(_0x1679e2['includes']('TRILIUM')&&_0x2dbeb4())return!0x0;if(_0x1679e2['includes']('RCMT')){if(_0x2c3feb())return!0x0;if(_0x2e4cdc()||_0x1d3669())return!0x0;}return!0x1;}function _0x2beebc(){const _0xcab888=_0x4317cd['licensedHosts'];if(!_0xcab888||0x0==_0xcab888['length'])return!0x0;const {hostname:_0x400ac6}=new URL(window['location']['href']);if(_0xcab888['includes'](_0x400ac6))return!0x0;const _0x4ea3a4=_0x400ac6['split']('.');return _0xcab888['filter'](_0x39c1dd=>_0x39c1dd['includes']('*'))['map'](_0x2d84ab=>_0x2d84ab['split']('.'))['filter'](_0x56ba62=>_0x56ba62['length']<=_0x4ea3a4['length'])['map'](_0x3e8749=>Array(_0x4ea3a4['length']-_0x3e8749['length'])['fill']('*'===_0x3e8749[0x0]?'*':'')['concat'](_0x3e8749))['some'](_0x280096=>_0x4ea3a4['every']((_0x9d906a,_0x2d989e)=>_0x280096[_0x2d989e]===_0x9d906a||'*'===_0x280096[_0x2d989e]));}function _0x47b8b4(){return _0x866d9d&&_0x2dd834?new window['Promise']((_0x55c539,_0x2998e9)=>{_0x866d9d['then'](_0x55c539,_0x2998e9),_0x2dd834['then'](_0xd0ae62=>{'Valid'!=_0xd0ae62&&_0x55c539(_0xd0ae62);},_0x2998e9);}):_0x866d9d||_0x2dd834||'Valid';}}function _0x3e47c3(_0x1c829d,_0x506d93){return new window['Promise'](_0x1b1e96=>{if(_0x4b2e9f())return _0x1b1e96('Valid');_0x4e157e(),_0x44036c['decorate']('_sendUsageRequest');let _0x4fbb37=!0x1;const _0x5f3d98=_0x1bad21();function _0x4315a6(_0xfc086d){return!!_0xfc086d&&('object'==typeof _0xfc086d||'function'==typeof _0xfc086d)&&'function'==typeof _0xfc086d['then']&&'function'==typeof _0xfc086d['catch'];}function _0x16508c(_0x3bd002){_0x3ed10f(_0x3bd002)['then'](_0x4766fd=>_0x4766fd&&'ok'==_0x4766fd['status']?_0x605258(_0x4ec316(_0x5f3d98+_0x506d93))!=_0x4766fd['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0xc64815=>(_0x10ff4e(),_0xc64815),()=>{const _0x1b1ce0=_0x3a7049();return null==_0x1b1ce0?(_0x10ff4e(),'Valid'):_0x4785ba-_0x1b1ce0>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1b1e96)['catch'](()=>{_0x1b1e96('UsageLimit');});const _0x40a409=0x36ee80;function _0x10ff4e(){const _0x3763f9='llct-'+_0x605258(_0x4ec316(_0x1c829d)),_0x2c069b=_0xe496bd(_0x605258(window['Math']['ceil'](_0x4785ba/_0x40a409)));window['localStorage']['setItem'](_0x3763f9,_0x2c069b);}function _0x3a7049(){const _0x61ba32='llct-'+_0x605258(_0x4ec316(_0x1c829d)),_0x3700a9=window['localStorage']['getItem'](_0x61ba32);return _0x3700a9?window['parseInt'](_0xe496bd(_0x3700a9),0x10)*_0x40a409:null;}function _0x3ed10f(_0x7e50d2){return new window['Promise']((_0x21f33e,_0x3740f3)=>{_0x7e50d2['then'](_0x21f33e,_0x3740f3),window['setTimeout'](_0x3740f3,0x1d4c0);});}}_0x44036c['on']('_sendUsageRequest',(_0x534c92,_0x48ee6b)=>{if(_0x48ee6b[0x0]!=_0x1c829d)return _0x1b1e96('UsageLimit');_0x48ee6b[0x1]={..._0x48ee6b[0x1],'requestId':_0x5f3d98};},{'priority':'high'}),_0x44036c['on']('_sendUsageRequest',_0x4de1dc=>{_0x4315a6(_0x4de1dc['return'])&&(_0x4fbb37=!0x0,_0x16508c(_0x4de1dc['return']));},{'priority':'low'}),_0x3bcac2['then'](()=>{_0x4fbb37||_0x1b1e96('UsageLimit');});});function _0x4b2e9f(){return'auto'==_0x44036c['editing']['view']['_overlayModeHint'];}function _0x4e157e(){_0x44036c['editing']['view']['_overlayModeHint']='auto';}}function _0x3cab87(_0x4c9b14){const _0xa17942=[new window['Promise'](_0x16d46f=>setTimeout(_0x16d46f,0x93ecc)),_0x3bcac2['then'](()=>new window['Promise'](_0x2efcd5=>{let _0x4687a3=0x0;_0x44036c['model']['on']('applyOperation',(_0xc9f700,_0x22f3cd)=>{_0x22f3cd[0x0]['isDocumentOperation']&&_0x4687a3++,0x5e8==_0x4687a3&&(_0x2efcd5(),_0xc9f700['off']());});}))];return window['Promise']['race'](_0xa17942)['then'](()=>_0x4c9b14);}async function _0x4305f6(){await _0x3bcac2,_0x44036c['model']['change']=_0x1a2725,_0x44036c['model']['enqueueChange']=_0x1a2725,_0x44036c['enableReadOnlyMode']('model');}function _0x2dbeb4(){return window['glob']&&window['glob']['triliumVersion'];}function _0x2c3feb(){return _0x5bb852('WebSocketGateway')&&'connected'==_0x1d0b91('WebSocketGateway')['state'];}function _0x2e4cdc(){return _0x5bb852('RevisionViewerIntegration');}function _0x1d3669(){return _0x5bb852('TrackChangesDataGetter');}function _0x535405(_0x4f13c8){const _0x489608=_0x1608e1();_0x44036c[_0x489608]='commentsLicenseKey'+_0x4f13c8,'Valid'!=_0x4f13c8&&_0x4305f6();}function _0x1608e1(){const _0x2418fb=window['String'](window['performance']['now']())['replace']('.','');let _0x5e0a59='K';for(let _0x2b99ce=0x0;_0x2b99ce<_0x2418fb['length'];_0x2b99ce+=0x2){let _0x5bead2=window['parseInt'](_0x2418fb['substring'](_0x2b99ce,_0x2b99ce+0x2));_0x5bead2>=0x3e&&(_0x5bead2-=0x3e),_0x5e0a59+=_0x4a8aa9[_0x5bead2];}return _0x5e0a59;}function _0x531ee6(){const _0x59a63f=_0x247c49['split']('.');if(0x3!=_0x59a63f['length'])return null;return _0x1f1fea(_0x59a63f[0x1]);function _0x1f1fea(_0x5ca1e5){const _0x2574b8=_0x363d04(_0x5ca1e5);return _0x2574b8&&_0x183806()?_0x2574b8:null;function _0x183806(){const _0xec8201=_0x2574b8['jti'],_0x4e5529=window['parseInt'](_0xec8201['substring'](_0xec8201['length']-0x8),0x10),_0x2a16c8={..._0x2574b8,'jti':_0xec8201['substring'](0x0,_0xec8201['length']-0x8)};return delete _0x2a16c8['vc'],_0x4ec316(_0x2a16c8)==_0x4e5529;}}}async function _0x1bc7e2(){let _0x346653=!0x0;try{const [_0x5f2eec,_0x587607,_0x34d90]=_0x247c49['split']('.');return _0x1c0bc7(_0x5f2eec),await _0x207809(_0x5f2eec,_0x587607,_0x34d90),_0x346653;}catch{return!0x1;}function _0x1c0bc7(_0x27e532){const _0x3120fb=_0x363d04(_0x27e532);_0x3120fb&&'ES256'==_0x3120fb['alg']||(_0x346653=!0x1);}async function _0x207809(_0x1e73aa,_0x3c91ba,_0x14c157){const _0x14789f=window['Uint8Array']['from'](_0x23d4d4(_0x14c157),_0x136a06=>_0x136a06['charCodeAt'](0x0)),_0x3fad73=new window['TextEncoder']()['encode'](_0x1e73aa+'.'+_0x3c91ba),_0x582e8b=window['crypto']['subtle'];if(!_0x582e8b)return;const _0x324ae7=await _0x582e8b['importKey']('jwk',_0x20e0f5,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x582e8b['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x324ae7,_0x14789f,_0x3fad73)||(_0x346653=!0x1);}}function _0x363d04(_0x3da316){return _0x3da316['startsWith']('ey')?JSON['parse'](_0x23d4d4(_0x3da316)):null;}function _0x23d4d4(_0x46a348){return window['atob'](_0x46a348['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4ec316(_0x5ed850){let _0x55270c=0x1505;function _0x337040(_0x5af956){for(let _0x4cbd87=0x0;_0x4cbd87<_0x5af956['length'];_0x4cbd87++){const _0x3ada52=_0x5af956['charCodeAt'](_0x4cbd87);_0x55270c=(_0x55270c<<0x5)+_0x55270c+_0x3ada52,_0x55270c&=_0x55270c;}}function _0x8b28cd(_0x2da907){Array['isArray'](_0x2da907)?_0x2da907['forEach'](_0x8b28cd):_0x2da907&&'object'==typeof _0x2da907?Object['entries'](_0x2da907)['sort']()['forEach'](([_0x47c43f,_0x1aa7ad])=>{_0x337040(_0x47c43f),_0x8b28cd(_0x1aa7ad);}):_0x337040(window['String'](_0x2da907));}return _0x8b28cd(_0x5ed850),_0x55270c>>>0x0;}function _0x605258(_0x3b3373){return _0x3b3373['toString'](0x10)['padStart'](0x8,'0');}function _0xe496bd(_0x52ab61){return _0x52ab61['split']('')['reverse']()['join']('');}function _0x5bb852(_0x118655){return _0x44036c['plugins']['has'](_0x118655);}function _0x1d0b91(_0x24ffc8){return _0x44036c['plugins']['get'](_0x24ffc8);}function _0x1a2725(){}_0x535405(await _0x5d0d32());}(this);}['destroy'](){const _0x58a086=this['editor']['plugins']['get'](oi),_0xc99dec=this['editor']['config']['get']('collaboration.channelId');for(const _0x2b9c3a of _0x58a086['getCommentThreads']({'channelId':_0xc99dec}))_0x58a086['_detachCommentThread'](_0x2b9c3a['id']),_0x58a086['_threads']['delete'](_0x2b9c3a['id']);super['destroy']();}['hasMarkerForId'](_0x3b3313){return this['getAllMarkersForId'](_0x3b3313)['length']>0x0;}['getAllMarkersForId'](_0x553066){const _0x19baf6=[];for(const _0x171f30 of this['editor']['model']['markers'])_0x171f30['name']['startsWith']('comment:'+_0x553066)&&_0x19baf6['push'](_0x171f30);return _0x19baf6;}['scrollToThreadMarker'](_0x5725db){setTimeout(()=>{const _0x58f3b6=this['_getTargetForId'](_0x5725db);_0x58f3b6&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x5725db&&_0x2367ee({'target':_0x58f3b6[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xfebe1){this['editor']['model']['change'](()=>{for(const _0x404f68 of this['getAllMarkersForId'](_0xfebe1))this['editor']['editing']['reconvertMarker'](_0x404f68);});}['_attachArchivedThread'](_0x2913f9){const _0xb27691=this['editor']['plugins']['get'](oi),_0x5b5745=this['editor']['plugins']['get'](di),_0x30037a=_0xb27691['getCommentThread'](_0x2913f9);if(!_0x30037a['isAttached']){const _0x53d203=_0x30037a['attachTo'](()=>this['_getTargetForId'](_0x30037a['id']));_0x5b5745['registerAnnotation'](_0x53d203),_0x30037a['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x10162f=this['editor'],_0x12cb64=_0x10162f['plugins']['get'](_0x595e9b);_0x10162f['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2bf2fb,_0xb89cee)=>{const {id:_0x221ece}=fi(_0x2bf2fb['markerName']),_0x5c47fc=_0x10162f['plugins']['get'](oi)['getCommentThread'](_0x221ece),_0x47bc8a=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x221ece;let _0x133e21;if(_0x5c47fc&&_0x5c47fc['isResolved']&&!_0x47bc8a&&_0x2bf2fb['item'])return _0xb89cee['consumable']['consume'](_0x2bf2fb['item'],'addMarker:'+_0x2bf2fb['markerName']),_0xb89cee['consumable']['consume'](_0x2bf2fb['item'],'removeMarker:'+_0x2bf2fb['markerName']),null;const _0x145731=['ck-comment-marker'];return _0x47bc8a&&_0x145731['push']('ck-comment-marker--active'),_0x133e21=_0x5c47fc?.['length']?_0x5c47fc['comments']['first']['author']['id']:_0x12cb64['me']['id'],{'classes':_0x145731,'attributes':{'data-comment':_0x221ece,'data-author-id':_0x133e21}};}}),_0x10162f['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x549038,{options:_0xb297d8})=>{if(_0xb297d8['showCommentHighlights'])return null;const _0x5dbc9d=_0x10162f['plugins']['get'](oi),_0x44be59=_0x10162f['model']['markers']['get'](_0x549038),{id:_0x5ca197,part:_0x566668}=fi(_0x549038);return _0x44be59&&!_0x44be59['affectsData']||_0xb297d8['ignoreResolvedComments']&&_0x5dbc9d['getCommentThread'](_0x5ca197)?.['isResolved']?null:{'group':'comment','name':_0x566668?_0x5ca197+':'+_0x566668:_0x5ca197};}}),_0x10162f['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2e9db1,{writer:_0x355552})=>_0x355552['createElement']('$marker',{'data-name':'comment:'+_0x2e9db1['getAttribute']('id')})}),_0x10162f['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1c0ab4=this['editor'],_0x28c7b3=_0x1c0ab4['plugins']['get'](oi),_0x3abf3b=new Set(),_0x44bf6e=new Set();_0x1c0ab4['model']['document']['registerPostFixer'](_0x5e76c=>{let _0x3e5586=!0x1;for(const {name:_0x2bb0d7,data:_0x3de2f3}of _0x1c0ab4['model']['document']['differ']['getChangedMarkers']()){const {group:_0x28281e,id:_0x366d0b}=fi(_0x2bb0d7);let _0x4bd743=_0x3de2f3['newRange'];if('comment'!==_0x28281e||!_0x4bd743)continue;const _0x196d11='$graveyard'===_0x4bd743['root']['rootName'];_0x196d11||(_0x4bd743=_i(_0x4bd743,_0x1c0ab4['model']),!_0x4bd743||_0x4bd743['isCollapsed']||!_0x3de2f3['newRange']||_0x4bd743['isEqual'](_0x3de2f3['newRange']))?_0x1c0ab4['model']['hasContent'](_0x4bd743)&&!_0x196d11?this['isThreadsLoadingPaused']?_0x3abf3b['add'](_0x2bb0d7):this['_handleThreadMarker'](_0x2bb0d7,_0x366d0b):(_0x44bf6e['add'](_0x2bb0d7),_0x3abf3b['delete'](_0x2bb0d7),_0x5e76c['removeMarker'](_0x2bb0d7),_0x3e5586=!0x0):(_0x5e76c['updateMarker'](_0x2bb0d7,{'range':_0x4bd743}),_0x3e5586=!0x0);}return _0x3e5586;}),this['on']('change:isThreadsLoadingPaused',(_0x287391,_0x12f15e,_0x46adbf)=>{if(!_0x46adbf&&_0x3abf3b['size'])for(const _0x5e9fe2 of _0x3abf3b){const {id:_0x1cb56e}=fi(_0x5e9fe2);_0x3abf3b['delete'](_0x5e9fe2),_0x1c0ab4['model']['markers']['get'](_0x5e9fe2)&&this['_handleThreadMarker'](_0x5e9fe2,_0x1cb56e);}}),this['listenTo'](_0x1c0ab4['model']['document'],'change',()=>{for(const {name:_0xfcc5b7,data:{newRange:_0x2c60e0}}of _0x1c0ab4['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4aa2df,id:_0x46058d}=fi(_0xfcc5b7);if('comment'!==_0x4aa2df)continue;const _0x43f4b8=_0x28c7b3['getCommentThread'](_0x46058d),_0xeb9fbf=this['hasMarkerForId'](_0x46058d);_0x43f4b8&&(!_0x43f4b8['_hasTargetInContent']&&_0x2c60e0&&_0x1c0ab4['editing']['view']['once']('render',()=>{const _0x10366e=_0x1c0ab4['plugins']['get'](ti),_0x3775ef=_0x28c7b3['_threadToController']['get'](_0x43f4b8)['view'];_0x10366e['getByInnerView'](_0x3775ef)['refreshVisibility']();},{'priority':'low'}),_0x43f4b8['_hasTargetInContent']=_0xeb9fbf||!!_0x2c60e0),_0x2c60e0||(_0x44bf6e['add'](_0xfcc5b7),_0x3abf3b['delete'](_0xfcc5b7));}for(const _0x343acb of _0x44bf6e){const {id:_0x3e10e8}=fi(_0x343acb),_0x28ce42=_0x28c7b3['getCommentThread'](_0x3e10e8);if(_0x3abf3b['delete'](_0x343acb),!_0x28ce42)continue;const _0x1b983e=this['hasMarkerForId'](_0x3e10e8);_0x1b983e||_0x28ce42['isSubmitted']?_0x1b983e||_0x28ce42['unlinkedAt']||_0x28ce42['setUnlinkedAt'](new Date()):_0x28ce42['remove']();}_0x44bf6e['clear']();});}['_handleInitialThreads'](_0x558fa1){_0x558fa1['forEach'](_0x1b06aa=>{_0x1b06aa['unlinkedAt']&&this['_attachArchivedThread'](_0x1b06aa['id']);});}['_getTargetForId'](_0x13f7cf){const _0x3699f9=this['editor'],_0x4cc28f=this['getAllMarkersForId'](_0x13f7cf);return _0xd07cce(_0x3699f9['editing'],_0x4cc28f);}['_getTextContext'](_0x10a318){const _0x12944f=this['getAllMarkersForId'](_0x10a318);let _0x3580e5='',_0x17396a=!0x1;for(const _0x354803 of _0x12944f){const _0x3c8949=_0x354803['getRange']();for(const _0x552aa9 of Array['from'](_0x3c8949['getItems']()))_0x552aa9['is']('$textProxy')?(_0x3580e5&&_0x17396a&&(_0x3580e5+='\x20',_0x17396a=!0x1),_0x3580e5+=_0x552aa9['data']):_0x17396a=!0x0;_0x17396a=!0x0;}return _0x3580e5['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x285ce7,_0x5076a8){const _0x11b708=this['editor'],_0x50b245=_0x11b708['plugins']['get'](oi);let _0x246d09=_0x50b245['getCommentThread'](_0x5076a8);const _0x806857=_0x11b708['config']['get']('collaboration.channelId'),_0x445348=_0x11b708['plugins']['get'](di);return _0x246d09&&(_0x246d09['unlinkedAt']&&_0x246d09['setUnlinkedAt'](null),_0x246d09['isAttached'])||(this['getAllMarkersForId'](_0x5076a8)[0x0]['managedUsingOperations']?_0x50b245['fetchCommentThread']({'channelId':_0x806857,'threadId':_0x5076a8})['then'](_0x2564e1=>{if('destroyed'!==_0x11b708['state']){if(_0x246d09=_0x2564e1,_0x246d09&&!_0x246d09['isAttached']){const _0x3c3782=_0x246d09['attachTo'](()=>this['_getTargetForId'](_0x5076a8));_0x445348['registerAnnotation'](_0x3c3782),_0x246d09['isResolved']&&this['_reconvertMarkers'](_0x5076a8);}else{if(!_0x246d09){const _0x239b8f=this['getAllMarkersForId'](_0x5076a8);_0x11b708['model']['change'](_0x42e130=>{for(const _0xc92d92 of _0x239b8f)_0x42e130['removeMarker'](_0xc92d92);});}}}}):_0x11b708['editing']['view']['once']('render',()=>{if(_0x50b245['getCommentThread'](_0x5076a8))return;const _0x4fc0e8=_0x11b708['plugins']['get'](ti);_0x246d09=_0x50b245['openNewCommentThread']({'channelId':_0x806857,'threadId':_0x5076a8,'target':()=>this['_getTargetForId'](_0x5076a8),'context':{'type':'text','value':this['_getTextContext'](_0x5076a8)}});const _0x31077e=_0x50b245['_threadToController']['get'](_0x246d09)['view'],_0x5b5376=_0x4fc0e8['getByInnerView'](_0x31077e);_0x5b5376&&_0x445348['registerAnnotation'](_0x5b5376);},{'priority':'low'})),_0x246d09;}['_handleThreadMarker'](_0x2e7626,_0x524ce8){const _0x7c8f24=this['_attachMarkerToThread'](_0x2e7626,_0x524ce8);_0x7c8f24&&!_0x7c8f24['context']&&_0x7c8f24['setContext']({'type':'text','value':this['_getTextContext'](_0x524ce8)});}['_initAriaMarkerChangeAnnouncements'](){const _0x310fb9=this['editor'];_0x4976ed(_0x310fb9['model'],({left:_0x204b41,entered:_0x4f591f})=>{for(const _0x1e3725 of _0x204b41)if(Ai(_0x1e3725)){_0x310fb9['ui']['ariaLiveAnnouncer']['announce'](Et(_0x310fb9['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x480059 of _0x4f591f)if(Ai(_0x480059)){_0x310fb9['ui']['ariaLiveAnnouncer']['announce'](Et(_0x310fb9['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x182934(_0x2ccfd6)));break;}});}};function gi(_0x294854,_0x37ce0f){return _0x37ce0f?_0x294854+':'+_0x37ce0f:_0x294854;}function _i(_0x3b2e10,_0x51a092){const _0x2db3b5=_0x51a092['schema'],_0x392f1b=_0x51a092['createRange'](_0x3b2e10['start']);for(const _0x59fbeb of _0x3b2e10['getWalker']()){const {type:_0x2c1a9a,item:_0xc8fbbe,nextPosition:_0x1f23d3}=_0x59fbeb;if('text'===_0x2c1a9a||_0x2db3b5['isObject'](_0xc8fbbe)){const _0x2a02a2=_0x51a092['createPositionBefore'](_0xc8fbbe);_0x392f1b['isCollapsed']&&(_0x392f1b['start']=_0x2a02a2),_0x392f1b['end']=_0x1f23d3;}}return _0x392f1b;}function Ai(_0x1ad1d7){return'comment'===fi(_0x1ad1d7['name'])['group'];}var vi=class extends _0x2171e9{['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 _0x423dbd=this['editor'],_0x7018e4=_0x423dbd['plugins']['get'](oi),_0x5567ef=_0x423dbd['plugins']['get'](wi),_0x2b763e=_0x423dbd['plugins']['get'](ti),_0x101b5b=_0x423dbd['plugins']['get'](di);_0x423dbd['ui']['componentFactory']['add']('comment',()=>{const _0xbe51d4=this['_createUIButton'](_0x250387);return _0xbe51d4['tooltip']=!0x0,_0xbe51d4;}),_0x423dbd['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x101b5b['addSourceCollector'](()=>{const _0x1b2c0a=[];for(const [_0x118b99,_0x489589]of _0x7018e4['_threadToController']){const _0x1d8e67=_0x5567ef['getAllMarkersForId'](_0x118b99['id']),_0x1a027e=_0x1d8e67['map'](_0xb30581=>_0xb30581['getRange']());_0x1d8e67['length']>0x0&&_0x1b2c0a['push']([_0x489589['view'],_0x1a027e]);}return _0x1b2c0a;}),this['listenTo'](_0x2b763e,'change:activeAnnotations',(_0x7a7d26,_0x286418,_0x5159b7)=>{const _0x3f2475=Array['from'](_0x5159b7)['map'](_0x574522=>_0x574522['innerView'])['find'](_0x3bef7e=>_0x7018e4['_viewToController']['has'](_0x3bef7e));if(!_0x3f2475)return void(_0x5567ef['activeMarker']=null);const _0x1c3471=_0x7018e4['_viewToController']['get'](_0x3f2475)['model']['id'],_0x386c7d='comment:'+_0x1c3471;_0x1c3471&&_0x5567ef['hasMarkerForId'](_0x1c3471)?_0x5567ef['activeMarker']=_0x386c7d:_0x5567ef['activeMarker']&&(_0x5567ef['activeMarker']=null);}),this['listenTo'](_0x7018e4,'removeCommentThread',(_0x407e08,{threadId:_0x5c6cdd,isFromAdapter:_0x589e7c})=>{!_0x589e7c&&_0x423dbd['ui']['focusTracker']['isFocused']&&_0x5567ef['hasMarkerForId'](_0x5c6cdd)&&_0x423dbd['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x7018e4,'addComment',(_0x2102e5,{threadId:_0x48483d,isFromAdapter:_0x553238})=>{!_0x553238&&_0x5567ef['hasMarkerForId'](_0x48483d)&&_0x7018e4['hasCommentThread'](_0x48483d)&&0x1===_0x7018e4['getCommentThread'](_0x48483d)['length']&&(_0x423dbd['editing']['view']['focus'](),_0x2102e5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x40c791=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1a91a1;for(const _0x312474 in _0x40c791){const _0x4330c9=_0x312474,_0x4180dd=_0x40c791[_0x4330c9];if('commentsLicenseKeyValid'==_0x4180dd||'commentsLicenseKeyInvalid'==_0x4180dd||'commentsLicenseKeyExpired'==_0x4180dd||'commentsLicenseKeyDomainLimit'==_0x4180dd||'commentsLicenseKeyNotAllowed'==_0x4180dd||'commentsLicenseKeyEvaluationLimit'==_0x4180dd||'commentsLicenseKeyUsageLimit'==_0x4180dd){delete _0x40c791[_0x4330c9],_0x1a91a1=_0x4180dd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1a91a1&&_0x40c791['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1a91a1&&_0x40c791['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1a91a1&&_0x40c791['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1a91a1&&_0x40c791['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1a91a1&&_0x40c791['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1a91a1&&_0x40c791['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x72b450){const _0x2a4bfe=this['editor'],_0x40cd32=new _0x72b450(_0x2a4bfe['locale']),_0x313595=_0x2a4bfe['commands']['get']('addCommentThread');return _0x40cd32['set']({'label':Et(_0x2a4bfe['locale'],'Comment'),'icon':_0x4de6b8}),_0x40cd32['bind']('isEnabled')['to'](_0x313595,'isEnabled',_0x313595,'hasContent',(_0x53a77a,_0x3b8777)=>_0x53a77a&&_0x3b8777),this['listenTo'](_0x40cd32,'execute',()=>{_0x313595['execute']();}),_0x40cd32;}},yi=class extends _0x2171e9{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x3450e3){super(_0x3450e3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x29ddca,_0x4b238c,_0x2c8379)=>{_0x2c8379?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xa8371c,_0x1a6e63]of this['editor']['commands'])_0x1a6e63['affectsData']&&'addCommentThread'!==_0xa8371c&&_0x1a6e63['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 _0x333f9e=this['editor']['editing']['view']['document'];this['listenTo'](_0x333f9e,'cut',_0x208af0=>_0x208af0['stop'](),{'priority':'highest'}),this['listenTo'](_0x333f9e,'clipboardInput',_0x4a5350=>_0x4a5350['stop'](),{'priority':'highest'}),this['listenTo'](_0x333f9e,'delete',_0x2498f4=>_0x2498f4['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3603c9,_0x262b8d]of this['editor']['commands'])_0x262b8d['affectsData']&&'addCommentThread'!==_0x3603c9&&_0x262b8d['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 _0x24b6c6{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a5a5c){super(_0x2a5a5c),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x19c16c=this['context']['plugins']['get'](ti);this['listenTo'](_0x19c16c,'_activateAnnotation',(_0x209953,_0x37884e)=>{for(const _0x35adaa of this['activeUIs']){const _0x261ba4=this['_uis']['get'](_0x35adaa);(0x0,this['uisData']['get'](_0x35adaa)['filter'])(_0x37884e)&&_0x261ba4['setActiveAnnotation'](_0x37884e);}}),this['listenTo'](_0x19c16c,'_deactivateAllAnnotations',()=>{for(const _0x48e602 of this['activeUIs'])this['_uis']['get'](_0x48e602)['setActiveAnnotation'](null);}),this['listenTo'](_0x19c16c['_visibleAnnotations'],'add',(_0x98665c,_0x5dad2a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5dad2a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2f4aff){return this['activeUIs']['has'](_0x2f4aff);}['activate'](_0x277e57,_0x47290a=this['defaultFilter']){const _0x199b5c=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x277e57))throw new _0x1b7c73('annotationsuis-missing-ui',this,{'uiName':_0x277e57});this['isActive'](_0x277e57)&&this['deactivate'](_0x277e57),this['activeUIs']['add'](_0x277e57);const _0x8c3f3a=new Jt();Qt({'source':_0x199b5c['_visibleAnnotations'],'target':_0x8c3f3a,'filter':_0x47290a}),this['uisData']['set'](_0x277e57,{'collection':_0x8c3f3a,'filter':_0x47290a});const _0x3dcad5=this['_uis']['get'](_0x277e57);_0x3dcad5['attach'](_0x8c3f3a),this['listenTo'](_0x3dcad5,'change:activeAnnotation',(_0x40d9e5,_0x4d945a,_0x15d5ef,_0x228e94)=>{_0x228e94&&_0x199b5c['_removeActiveAnnotation'](_0x228e94),_0x15d5ef&&_0x199b5c['_addActiveAnnotation'](_0x15d5ef);});}['deactivate'](_0x4deff3){if(this['activeUIs']['delete'](_0x4deff3),!this['_uis']['has'](_0x4deff3))throw new _0x1b7c73('annotationsuis-missing-ui',this,{'uiName':_0x4deff3});const _0x410df9=this['_uis']['get'](_0x4deff3);_0x410df9['detach'](),this['stopListening'](_0x410df9),this['uisData']['get'](_0x4deff3)['collection']['destroy'](),this['uisData']['delete'](_0x4deff3);}['switchTo'](_0x4534bb){if(!this['_uis']['has'](_0x4534bb))throw new _0x1b7c73('annotationsuis-missing-ui',this,{'uiName':_0x4534bb});const _0x5fee09=this['context']['plugins']['get'](ti),_0x2c5506=Array['from'](_0x5fee09['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4534bb);const _0x3d3c8f=this['_uis']['get'](_0x4534bb);_0x3d3c8f['setActiveAnnotation'](_0x2c5506),_0x3d3c8f['_setSelectedAnnotations']&&_0x2c5506&&_0x3d3c8f['_setSelectedAnnotations']([_0x2c5506]);}['deactivateAll'](){for(const _0x117acc of this['activeUIs'])this['deactivate'](_0x117acc);}['register'](_0x5d636c,_0xd09009){if(this['_uis']['has'](_0x5d636c))throw new _0x1b7c73('annotationsuis-register-already-registered');if('function'!=typeof _0xd09009['attach']||'function'!=typeof _0xd09009['detach']||'function'!=typeof _0xd09009['setActiveAnnotation'])throw new _0x1b7c73('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5d636c,_0xd09009);}['refilterAnnotations'](){const _0x1f1067=this['context']['plugins']['get'](ti)['collection'],_0x18878e=new Map(),_0x139cb6=Array['from'](this['activeUIs']);for(const _0x49dfd2 of this['activeUIs']){const _0x3dae7d=this['uisData']['get'](_0x49dfd2)['collection'];for(const _0x1318bc of _0x3dae7d)_0x18878e['set'](_0x1318bc,_0x49dfd2);}for(const _0x29f0db of _0x1f1067){const _0x2eac85=_0x18878e['get'](_0x29f0db);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x29f0db);const _0x1d16a2=_0x139cb6['find'](_0xeff20c=>this['uisData']['get'](_0xeff20c)['filter'](_0x29f0db));_0x2eac85!==_0x1d16a2&&(_0x2eac85&&this['uisData']['get'](_0x2eac85)['collection']['remove'](_0x29f0db),_0x1d16a2&&this['uisData']['get'](_0x1d16a2)['collection']['add'](_0x29f0db));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x443daf){const _0x20a663=[];for(const _0x3163c6 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3163c6)['filter'])(_0x443daf)&&_0x20a663['push'](_0x3163c6);}if(_0x20a663['length']>0x1)throw new _0x1b7c73('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x20a663,'annotationType':_0x443daf['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x18a8ac('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x44c675){super(_0x44c675);const _0x39132c=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 _0x2f6500(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x39132c['to']('class')],'style':{'minHeight':_0x39132c['to']('minHeight',_0x8e510a=>'number'==typeof _0x8e510a?Ci(_0x8e510a+0xa):null)},'dir':_0x44c675['uiLanguageDirection'],'role':'application','aria-label':Et(_0x44c675,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x44c675,'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',_0x127d9b=>{this['_updateItemPositionInFocusables'](_0x127d9b['source']);}),this['list']['forEach'](_0x32bfaf=>{this['focusTracker']['add'](_0x32bfaf['element']),this['_updateItemPositionInFocusables'](_0x32bfaf);}),this['list']['on']('change',(_0x424b91,_0xcee837)=>{for(const _0x44fb6a of _0xcee837['removed'])this['focusTracker']['remove'](_0x44fb6a['element']),this['focusables']['remove'](_0x44fb6a);for(const _0x4cf3e0 of _0xcee837['added'])this['focusTracker']['add'](_0x4cf3e0['element']),this['_updateItemPositionInFocusables'](_0x4cf3e0);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x50d52c){const _0x181e18=this['focusables']['getIndex'](_0x50d52c);let _0x46ea47,_0x39e183;for(const _0x200337 of this['focusables'])if(_0x50d52c['top']<_0x200337['top']){_0x46ea47=_0x200337;break;}if(_0x39e183=_0x46ea47?this['focusables']['getIndex'](_0x46ea47):this['focusables']['length'],-0x1!==_0x181e18){if(_0x181e18===_0x39e183-0x1)return;this['focusables']['remove'](_0x50d52c),_0x39e183=_0x46ea47?this['focusables']['getIndex'](_0x46ea47):this['focusables']['length'];}this['focusables']['add'](_0x50d52c,_0x39e183);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x18a8ac('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4a0989){super(_0x4a0989),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x55a66a,_0x148ca5)=>_0x55a66a+_0x148ca5),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xf002ec=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xf002ec['to']('isAnimationDisabled',_0x3f5dce=>_0x3f5dce?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xf002ec['to']('top',_0x1519cf=>bi(_0x1519cf))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x552e7d=this['element']['clientHeight'];_0x552e7d&&(this['height']=_0x552e7d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x24b6c6{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x309e48){super(_0x309e48),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 _0x4cc0f6=this['context']['config']['get']('sidebar.container');_0x4cc0f6&&this['setContainer'](_0x4cc0f6);}['setContainer'](_0x543da2){if(!Oi(_0x543da2))throw new _0x1b7c73('sidebar-setcontainer-invalid-element');this['container']=_0x543da2;}['_attachToContainer']({viewClass:_0x550794='',spaceBetweenItems:_0x42678d=0x19}={}){if(!Oi(this['container']))throw new _0x1b7c73('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x550794,this['_spaceBetweenItems']=_0x42678d;}['rearrange']({removedAnnotation:_0x5d907,previousAnnotation:_0x4e18ca,nextAnnotation:_0x42cdf6}){const _0x1de769=this['getSidebarItemView'](_0x5d907);this['view']['list']['remove'](_0x1de769),this['_destroySidebarItemView'](_0x5d907),_0x4e18ca&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4e18ca)),_0x42cdf6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x42cdf6)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9f6d48,activatedAnnotation:_0x1c3d69,disableAnimationOnActivatedAnnotation:_0x2b3e44}){if(this['_activeAnnotation']=_0x1c3d69,_0x9f6d48){_0x9f6d48['isActive']=!0x1;const _0x3195bf=this['getSidebarItemView'](_0x9f6d48);_0x3195bf&&_0x2b3e44&&(_0x3195bf['isAnimationDisabled']=!0x1);}if(_0x1c3d69){const _0x4cd13e=this['getSidebarItemView'](_0x1c3d69);_0x4cd13e&&(_0x1c3d69['isActive']=!0x0,_0x2b3e44&&(_0x4cd13e['isAnimationDisabled']=!0x0,_0x4cd13e['top']+=0x1),this['_alignToTargetRect'](_0x4cd13e));}}['_detachFromContainer'](_0x38ab63){if(this['view']['element']['remove'](),_0x38ab63){for(const _0x4ed7e4 of _0x38ab63)this['_destroySidebarItemView'](_0x4ed7e4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x48e001,_0xae589){_0xae589||(_0xae589=_0x48e001['view']);const _0x5343df=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5343df,_0x48e001),this['_annotationToSidebarItemView']['set'](_0x48e001,_0x5343df),_0x5343df['content']['add'](_0xae589),this['listenTo'](_0x48e001['view'],'change:targetRect',(_0x2535fe,_0x18cb66,_0x4f220c)=>{const _0x2a3a3c=this['_getTargetTop'](_0x48e001,_0x4f220c);_0x5343df['_targetTop']!=_0x2a3a3c&&(_0x5343df['_targetTop']=_0x2a3a3c,this['_setItemTop'](_0x5343df,_0x2a3a3c));}),this['listenTo'](_0x5343df,'change:top',()=>{this['_recalculate'](_0x5343df,'top');}),this['listenTo'](_0x5343df,'change:bottom',()=>{this['_recalculate'](_0x5343df,'bottom');}),this['_alignToTargetRect'](_0x5343df);const _0x17db75=this['_getItemBefore'](_0x5343df);return _0x17db75&&this['_alignAfterItem'](_0x17db75,_0x5343df)||this['_alignToTargetRect'](_0x5343df),this['_updateLastItem'](),this['view']['list']['add'](_0x5343df),_0x5343df;}['_alignForTopChange'](_0xbc732d){if(!_0xbc732d['content']['length'])return;const _0x12d576=this['_getItemBefore'](_0xbc732d);if(!_0x12d576)return;const _0x57fb7d=this['_sidebarItemViewToAnnotation']['get'](_0x12d576),_0x3de3b7=this['_activeAnnotation'];_0x3de3b7&&_0x3de3b7===_0x57fb7d?this['_alignAfterItem'](_0x12d576,_0xbc732d):this['_alignBeforeItem'](_0xbc732d,_0x12d576);}['_alignForBottomChange'](_0x25ad70){if(!_0x25ad70['content']['length'])return;const _0xeb2220=this['_getItemAfter'](_0x25ad70);if(!_0xeb2220)return;const _0xc89bac=this['_sidebarItemViewToAnnotation']['get'](_0xeb2220),_0x292542=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x9ccf1d=this['_activeAnnotation'];_0x9ccf1d&&_0x9ccf1d===_0xc89bac&&_0x292542?(this['_alignBeforeItem'](_0xeb2220,_0x25ad70),this['_alignAfterItem'](_0x25ad70,_0xeb2220)):_0x9ccf1d&&_0x9ccf1d===_0xc89bac?this['_alignBeforeItem'](_0xeb2220,_0x25ad70):this['_alignAfterItem'](_0x25ad70,_0xeb2220);}['_recalculate'](_0x56063c,_0x3eed44){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3ba152,changedProp:_0x2b1e86}of this['_recalculateBuffer'])'top'===_0x2b1e86?this['_alignForTopChange'](_0x3ba152):this['_alignForBottomChange'](_0x3ba152);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x56063c,'changedProp':_0x3eed44});}['getSidebarItemView'](_0xb56531){return this['_annotationToSidebarItemView']['get'](_0xb56531);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x463aa9){const _0xf952f9=this['getSidebarItemView'](_0x463aa9);this['stopListening'](_0xf952f9),this['stopListening'](_0x463aa9['view']),_0xf952f9['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x463aa9),this['_sidebarItemViewToAnnotation']['delete'](_0xf952f9);}['_createSidebarView'](){const _0x350d88=new Ii(this['context']['locale']);return _0x350d88['render'](),this['on']('change:_lastItem',(_0x327c12,_0x341b1c,_0x410cf6,_0x170994)=>{_0x170994&&_0x350d88['unbind']('minHeight'),_0x410cf6?_0x350d88['bind']('minHeight')['to'](_0x410cf6,'bottom'):_0x350d88['minHeight']=null;}),_0x350d88;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1d6cff){const _0x4b6663=this['_sidebarItemViewToAnnotation']['get'](_0x1d6cff),_0x2f2f3f=_0x4b6663&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4b6663)-0x1);return _0x2f2f3f&&this['getSidebarItemView'](_0x2f2f3f)||null;}['_getItemAfter'](_0x1ae075){const _0x1083b4=this['_sidebarItemViewToAnnotation']['get'](_0x1ae075),_0x2a8b26=_0x1083b4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1083b4)+0x1);return _0x2a8b26&&this['getSidebarItemView'](_0x2a8b26)||null;}['_alignBeforeItem'](_0x1dca8f,_0x3b1640){_0x1dca8f['updateHeight']();const _0x5eca15=Ni(_0x3b1640['bottom']+this['_spaceBetweenItems'],_0x1dca8f['top']);return!!_0x5eca15&&(this['_setItemTop'](_0x3b1640,_0x3b1640['top']-_0x5eca15),!0x0);}['_alignAfterItem'](_0x150195,_0x145387){_0x150195['updateHeight']();const _0x4da12f=Ni(_0x150195['bottom']+this['_spaceBetweenItems'],_0x145387['top']);return!!_0x4da12f&&(this['_setItemTop'](_0x145387,_0x145387['top']+_0x4da12f,!0x1),!0x0);}['_alignToTargetRect'](_0x32338b){const _0x406731=this['_sidebarItemViewToAnnotation']['get'](_0x32338b);if(!_0x406731||!_0x406731['target']||!_0x406731['targetRect'])return;const _0x27e171=this['_getTargetTop'](_0x406731,_0x406731['targetRect']);this['_setItemTop'](_0x32338b,_0x27e171);}['_getTargetTop'](_0x246759,_0x3db6ec){if(null===_0x3db6ec)return 0x0;if(_0x246759['target']instanceof _0x35cbc4)return _0x3db6ec['top'];{const _0x532928=new _0x35cbc4(this['view']['element'])['top'];return _0x3db6ec['top']-_0x532928;}}['_setItemTop'](_0x348d46,_0x46a775,_0x23fd2b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x23fd2b&&(_0x46a775=Math['max'](_0x46a775,this['_getMaxAvailableTop'](_0x348d46))),_0x348d46['top']=_0x46a775;}['_getMaxAvailableTop'](_0x32300a){let _0xc4143b=this['_getItemBefore'](_0x32300a),_0x5f4c6c=0x0;for(;_0xc4143b;)_0xc4143b['updateHeight'](),_0x5f4c6c+=this['_spaceBetweenItems']+_0xc4143b['height'],_0xc4143b=this['_getItemBefore'](_0xc4143b);return _0x5f4c6c;}};function Ni(_0x5b6652,_0x53d09e){return Math['max'](_0x5b6652-_0x53d09e,0x0);}function Oi(_0x26d239){return null!==_0x26d239&&'object'==typeof _0x26d239&&0x1===_0x26d239['nodeType'];}var Mi=class extends _0x24b6c6{['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(_0x1f2884){super(_0x1f2884),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x103a51(),this['_refreshPositioningDebounced']=_0x13e923(()=>{_0x1f2884['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x8c6ca7=this['context']['plugins']['get'](Ti),_0x4c15c2=this['context']['plugins']['get'](ki);_0x8c6ca7['register']('wideSidebar',this),_0x4c15c2['container']&&_0x8c6ca7['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x252535){if(_0x252535===this['activeAnnotation'])return;const _0x3f632f=this['context']['plugins']['get'](ki);_0x3f632f['_activeAnnotation']=_0x252535;const _0x429e94=this['activeAnnotation'];_0x3f632f['refresh']({'blurredAnnotation':_0x429e94,'activatedAnnotation':_0x252535}),this['activeAnnotation']=_0x252535;}['attach'](_0x24f3d2){this['annotations']=_0x24f3d2;const _0x166588=this['context']['plugins']['get'](ki);if(_0x166588['_annotations']=_0x24f3d2,this['isAttached'])throw new _0x1b7c73('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x166588,'set:container',()=>{this['detach'](),this['listenTo'](_0x166588,'change:container',_0x189111=>{_0x189111['off'](),this['attach'](_0x24f3d2);});}),_0x166588['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x26ff80=_0x49c13d=>{_0x49c13d['updateTargetRect'](),_0x166588['addAnnotation'](_0x49c13d);};for(const _0x49c89c of _0x24f3d2)_0x26ff80(_0x49c89c);this['listenTo'](_0x24f3d2,'add',(_0x3e26e7,_0x5dfd6a)=>{_0x26ff80(_0x5dfd6a);}),this['listenTo'](_0x24f3d2,'remove',(_0x37ad85,_0x26cacd,_0x597e09)=>{_0x166588['rearrange']({'removedAnnotation':_0x26cacd,'previousAnnotation':_0x24f3d2['get'](_0x597e09-0x1),'nextAnnotation':_0x24f3d2['get'](_0x597e09+0x1)}),_0x26cacd===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x24f3d2,'focus',(_0x1f9f9f,_0x256870)=>{this['setActiveAnnotation'](_0x256870);}),this['listenTo'](_0x24f3d2,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1a738c=this['context']instanceof _0x3bc768?this['context']['editors']:new _0x103a51([this['context']]);for(const _0x33d0ec of _0x1a738c)this['_integrateWithEditorAnnotations'](_0x33d0ec);this['listenTo'](_0x1a738c,'add',(_0x36183d,_0x211c3c)=>{this['listenTo'](_0x211c3c,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x211c3c);});}),this['listenTo'](_0x1a738c,'remove',(_0x4c735d,_0x3419c8)=>{_0x3419c8['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3419c8['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x1b7c73('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5b0a14=this['context']['plugins']['get'](ki);_0x5b0a14['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5b0a14),this['stopListening'](this['annotations']),this['context']instanceof _0x3bc768&&this['stopListening'](this['context']['editors']);for(const _0xbf5998 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xbf5998);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x43c9c6){if(!_0x43c9c6['plugins']['has']('EditorAnnotations'))return;const _0x2d412e=_0x43c9c6['plugins']['get']('EditorAnnotations'),_0x229f0a=()=>{const _0x348694=_0x2d412e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x348694[0x0]||null);};this['listenTo'](_0x2d412e,'refresh',_0x229f0a),this['listenTo'](_0x2d412e,'blur',(_0x5adcee,{isAnnotationTracked:_0xcd2879})=>{this['activeAnnotation']&&_0xcd2879(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2d412e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x313bad=>{_0x2d412e['hasDomSelection']()&&(_0x229f0a(),_0x313bad['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2d412e);}['_destroyEditorAnnotationsIntegration'](_0x2b8186){this['stopListening'](_0x2b8186),this['_editorAnnotations']['remove'](_0x2b8186);}},Ri=class extends _0x250387{['counterView'];constructor(_0x57f9bf){super(_0x57f9bf);const _0x1a5caf=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x487519,_0x44bd43)=>_0x487519?'...':_0x44bd43['toString']()),this['set']('annotationType',''),this['icon']=_0x4de6b8,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1a5caf['to']('annotationType',_0x25df6e=>'ck-annotation-counter__badge--'+_0x25df6e),_0x1a5caf['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1a5caf['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x24b6c6{['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(_0x2add72){super(_0x2add72),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x2bf8d0())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x103a51(),this['_refreshPositioningDebounced']=_0x13e923(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3ec916(this['context']['locale']),this['balloonPanelView']=new _0xfd36e5(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x17219c){this['annotations']=_0x17219c;const _0x302edc=this['context']['plugins']['get'](ki),_0x17e3df=this['balloonPanelView'];if(_0x302edc['_annotations']=_0x17219c,this['isAttached'])throw new _0x1b7c73('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x302edc,'set:container',()=>{this['detach'](),this['listenTo'](_0x302edc,'change:container',_0x58cbcd=>{_0x58cbcd['off'](),this['attach'](_0x17219c);});}),_0x302edc['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x13eabf=_0x927206=>{const _0x1586f1=new Ri(this['context']['locale']);_0x302edc['addAnnotation'](_0x927206,_0x1586f1),this['_annotationToNarrowView']['set'](_0x927206,_0x1586f1),_0x1586f1['bind']('isDirty','annotationType','number')['to'](_0x927206['view'],'isDirty','type','length'),_0x1586f1['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x17e3df['content']['first']!==_0x927206['view']?(this['_showBalloon'](_0x927206),_0x927206['view']['element']['focus'](),this['setActiveAnnotation'](_0x927206)):this['setActiveAnnotation'](null);});};for(const _0x3c2f4b of _0x17219c)_0x13eabf(_0x3c2f4b);this['listenTo'](_0x17219c,'add',(_0x3ce817,_0x3b1efc)=>{_0x13eabf(_0x3b1efc);}),this['listenTo'](_0x17219c,'remove',(_0x5b4650,_0x17c48d,_0x35186c)=>{this['_annotationToNarrowView']['get'](_0x17c48d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x17c48d),_0x302edc['rearrange']({'removedAnnotation':_0x17c48d,'previousAnnotation':_0x17219c['get'](_0x35186c-0x1),'nextAnnotation':_0x17219c['get'](_0x35186c+0x1)}),_0x17c48d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x17219c,'focus',(_0x4249f7,_0x27a823)=>{this['setActiveAnnotation'](_0x27a823);}),this['listenTo'](_0x17219c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3acae8,_0x25f4f4)=>{_0x25f4f4['keyCode']===_0x3e99b9['esc']&&_0x17e3df['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x17e3df['content']['first']),this['_hideBalloon'](),_0x25f4f4['stopPropagation'](),_0x25f4f4['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x568ed6,_0x53d125)=>{const _0x258a90=_0x53d125['target'];_0x17e3df['isVisible']&&_0x17e3df['element']['contains'](_0x258a90)||_0x302edc['view']['element']['contains'](_0x258a90)||_0x568ed6['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3a05ed=>_0x3a05ed['contains'](_0x258a90))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xad9054=this['context']instanceof _0x3bc768?this['context']['editors']:new _0x103a51([this['context']]);for(const _0x3b1354 of _0xad9054)this['_integrateWithEditorAnnotations'](_0x3b1354);this['listenTo'](_0xad9054,'add',(_0x45a65d,_0x52a0d3)=>{this['listenTo'](_0x52a0d3,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x52a0d3);});}),this['listenTo'](_0xad9054,'remove',(_0x6764e1,_0x1f883a)=>{_0x1f883a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1f883a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x1048dd){if(_0x1048dd===this['activeAnnotation'])return;const _0x4fc492=this['context']['plugins']['get'](ki);_0x4fc492['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1048dd,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1048dd&&_0x4fc492['getSidebarItemView'](_0x1048dd)?this['_showBalloon'](_0x1048dd):this['_hideBalloon'](),this['activeAnnotation']=_0x1048dd;}['detach'](){if(!this['isAttached'])throw new _0x1b7c73('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x286b9f=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xc7330f=>_0xc7330f['destroy']()),this['_annotationToNarrowView']['clear'](),_0x286b9f['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3bc768&&this['stopListening'](this['context']['editors']);for(const _0x4e1a3b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4e1a3b);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'](_0x4d5ca2){if(!_0x4d5ca2['plugins']['has']('EditorAnnotations'))return;const _0x5c14a2=_0x4d5ca2['plugins']['get']('EditorAnnotations'),_0x307a56=this['context']['plugins']['get'](ki),_0x2d4819=this['annotations'],_0x10f1bc=this['balloonPanelView'],_0x17c27c=()=>{const _0x36ca76=_0x5c14a2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x36ca76),this['setActiveAnnotation'](_0x36ca76[0x0]||null);};this['listenTo'](_0x5c14a2,'refresh',_0x17c27c),this['listenTo'](_0x5c14a2,'blur',(_0x251de7,{isAnnotationTracked:_0x448dfb})=>{this['activeAnnotation']&&_0x448dfb(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5c14a2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2d4819,'blur',_0x447dd3=>{_0x5c14a2['hasDomSelection']()&&_0x447dd3['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x31d554,_0x2cfd18)=>{const _0x3f36d3=_0x2cfd18['target'];_0x10f1bc['isVisible']&&_0x10f1bc['element']['contains'](_0x3f36d3)||_0x307a56['view']['element']['contains'](_0x3f36d3)||this['activeAnnotation']&&_0x5c14a2['hasDomSelection']()&&(_0x17c27c(),_0x31d554['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5c14a2);}['_destroyEditorAnnotationsIntegration'](_0x22bf0a){_0x22bf0a&&(this['stopListening'](_0x22bf0a),this['_editorAnnotations']['remove'](_0x22bf0a));}['_setSelectedAnnotations'](_0x17c1fa){for(const _0x4ca9e0 of this['_selectedAnnotations'])_0x17c1fa['includes'](_0x4ca9e0)||this['_manuallyClosedAnnotationViews']['delete'](_0x4ca9e0['view']);this['_selectedAnnotations']=_0x17c1fa;}['_refreshPositioning'](){const _0x122679=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x122679['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1f5d2b){if(this['_manuallyClosedAnnotationViews']['has'](_0x1f5d2b['view']))return;const _0x292f0e=this['balloonPanelView']['content']['first'];_0x292f0e!==_0x1f5d2b['view']?(_0x292f0e&&this['_detachListeners'](_0x292f0e),this['_attachListeners'](_0x1f5d2b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1f5d2b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3de888=this['balloonPanelView']['content']['first'],_0x4d30a8=_0x3de888&&this['annotations']['getByView'](_0x3de888);if(!_0x4d30a8||!this['_annotationToNarrowView']['has'](_0x4d30a8))return;const _0x23f318=this['_annotationToNarrowView']['get'](_0x4d30a8)['element'],_0x1c5a47=(function(){const _0x5393c1=_0xfd36e5['defaultPositions'];return[_0x5393c1['southArrowNorthEast'],_0x5393c1['northArrowSouthEast'],_0x5393c1['southArrowNorth'],_0x5393c1['northArrowSouth'],_0x5393c1['southArrowNorthWest'],_0x5393c1['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x23f318,'positions':_0x1c5a47});}['_hideBalloon'](){const _0x4cfc21=this['balloonPanelView'],_0x505926=_0x4cfc21['content']['first'];_0x505926&&(this['_detachListeners'](_0x505926),_0x4cfc21['unpin'](),_0x4cfc21['content']['clear']());}['_attachListeners'](_0x4da319){this['listenTo'](_0x4da319,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4da319,'Esc',(_0x680d0c,_0xf9d5f)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4da319),this['_hideBalloon'](),_0xf9d5f();});}['_detachListeners'](_0x408783){this['stopListening'](_0x408783);}},xi=class extends _0x2171e9{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x476b40,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4b476e){super(_0x4b476e),_0x4b476e['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4b476e['plugins']['get'](_0x476b40),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x13e923(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x4371e4=this['editor']['plugins']['get'](Ti);_0x4371e4['context']===this['editor']&&(_0x4371e4['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x18e477,_0x2270af)=>{const _0x3cc4f2=this['_balloon'];if(this['isAttached']&&_0x3cc4f2['visibleView']){const _0x48151a=this['annotations']['getByView'](_0x3cc4f2['visibleView']);_0x48151a&&this['_closeAnnotation'](_0x48151a),_0x2270af();}}));}['afterInit'](){const _0xd0eeb2=this['editor']['plugins']['get'](Ti);_0xd0eeb2['context']===this['editor']&&(_0xd0eeb2['hasActive']()||_0xd0eeb2['switchTo']('inline'));}['setActiveAnnotation'](_0x173dd3){_0x173dd3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x173dd3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x173dd3)&&this['_addAnnotationToBalloon'](_0x173dd3,!0x0),_0x173dd3['isActive']=!0x0),_0x173dd3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x173dd3);}['attach'](_0xb49068){this['annotations']=_0xb49068;const _0x474151=this['editor']['plugins']['get'](Ti),_0x35ff51=this['_balloon'];if(this['isAttached'])throw new _0x1b7c73('inlineannotations-attach-already-attached',this);if(_0x474151['context']!==this['editor'])throw new _0x1b7c73('inlineannotations-not-allowed-with-context',this);const _0x35c609=this['editor']['plugins']['get'](di);this['listenTo'](_0x35c609,'refresh',()=>{const _0x504729=_0x35c609['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x313672,_0x33d02f;!this['_forceRefresh']&&(_0x313672=_0x504729,_0x33d02f=this['_selectedAnnotations'],_0x313672['length']===_0x33d02f['length']&&_0x313672['every'](_0x4ed70a=>_0x33d02f['includes'](_0x4ed70a)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x504729),this['setActiveAnnotation'](_0x504729[0x0]||null));}),this['listenTo'](_0x35c609,'blur',(_0x113319,{isAnnotationTracked:_0x41603f})=>{this['activeAnnotation']&&_0x41603f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x35c609,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x13e7dd,_0x2ab9f3,_0x3c4db7)=>{_0x3c4db7||this['setActiveAnnotation'](null);}),this['listenTo'](_0xb49068,'remove',(_0x33fe46,_0x1258a8)=>{this['_removeAnnotationFromBalloon'](_0x1258a8),_0x1258a8===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x35ff51,'change:visibleView',(_0x133523,_0x4b8257,_0xe72b9b,_0x797099)=>{_0x797099&&this['stopListening'](_0x797099);const _0x59d99a=_0xb49068['getByView'](_0xe72b9b);_0xe72b9b&&_0x59d99a&&(this['listenTo'](_0xe72b9b,'change:height',()=>{_0x35ff51['updatePosition']();}),this['listenTo'](_0xe72b9b,'Esc',()=>{this['_closeAnnotation'](_0x59d99a),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x59d99a&&this['setActiveAnnotation'](_0x59d99a));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x35ff51['visibleView']&&_0xb49068['getByView'](_0x35ff51['visibleView'])&&_0x35ff51['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 _0x1b7c73('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x39923a of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x39923a);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3fd615){for(const _0x1b5855 of this['_selectedAnnotations'])_0x3fd615['includes'](_0x1b5855)||this['_manuallyClosed']['delete'](_0x1b5855);for(const _0x149357 of this['annotations'])_0x3fd615['includes'](_0x149357)||this['_removeAnnotationFromBalloon'](_0x149357);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2bb103 of _0x3fd615)this['_addAnnotationToBalloon'](_0x2bb103);}this['_selectedAnnotations']=_0x3fd615;}['_addAnnotationToBalloon'](_0x5ed626,_0xd34fd3=!0x1){this['_manuallyClosed']['has'](_0x5ed626)||(this['_addedAnnotations']['has'](_0x5ed626)||this['_balloon']['hasView'](_0x5ed626['view'])||(this['_addedAnnotations']['add'](_0x5ed626),this['_balloon']['add']({'stackId':_0x5ed626['view']['id'],'view':_0x5ed626['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5ed626)}})),_0xd34fd3&&this['_balloon']['showStack'](_0x5ed626['view']['id']));}['_getBalloonTargetForAnnotation'](_0x20a1b7){const _0xf4d2c4=_0x20a1b7['target'],_0x31c336=this['editor']['editing']['view'],_0x59df8a=_0x31c336['document']['selection']['getFirstRange'](),_0xd138a4=_0x31c336['domConverter']['viewRangeToDom'](_0x59df8a);if(_0xd138a4['collapse'](!0x0),_0xf4d2c4){if(_0xf4d2c4 instanceof _0x35cbc4)return _0xf4d2c4;let _0x1ea879=[];for(const _0x13e016 of _0xf4d2c4)_0x1ea879['push'](..._0x35cbc4['getDomElementRects'](_0x13e016));_0x1ea879=function(_0x34aa7a){const _0xd4ff3e=[];let _0x3d33af=_0x34aa7a[0x0];for(let _0xa99efd=0x1;_0xa99efd<_0x34aa7a['length'];_0xa99efd++)if(Pi(_0x3d33af,_0x34aa7a[_0xa99efd])){const _0x259da8=_0x34aa7a[_0xa99efd]['width'];_0x3d33af['width']+=_0x259da8,_0x3d33af['right']+=_0x259da8;}else _0xd4ff3e['push'](_0x3d33af),_0x3d33af=_0x34aa7a[_0xa99efd];return _0xd4ff3e['push'](_0x3d33af),_0xd4ff3e;}(_0x1ea879);const _0x1d9030=_0xd138a4['getBoundingClientRect']();return _0x1ea879['find'](_0x17a48c=>_0x17a48c['top']<=_0x1d9030['top']&&_0x17a48c['bottom']>=_0x1d9030['bottom']&&_0x17a48c['left']<=_0x1d9030['left']&&_0x17a48c['right']>=_0x1d9030['right'])||_0x1ea879[0x0];}return _0x20a1b7['targetRect']||_0xd138a4;}['_removeAnnotationFromBalloon'](_0x53b665){this['_addedAnnotations']['has'](_0x53b665)&&this['_balloon']['hasView'](_0x53b665['view'])&&(this['_addedAnnotations']['delete'](_0x53b665),this['_balloon']['remove'](_0x53b665['view']));}['_closeAnnotation'](_0x567844){this['_manuallyClosed']['add'](_0x567844),this['_removeAnnotationFromBalloon'](_0x567844);}};function Pi(_0x52c08a,_0x4eb273){return _0x52c08a['top']===_0x4eb273['top']&&_0x52c08a['bottom']===_0x4eb273['bottom']&&_0x52c08a['right']===_0x4eb273['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x309482,_0xc1df76){super(_0x309482),this['set']('isEmpty',!_0xc1df76['length']),this['focusTracker']=new _0x2f6500(),this['_annotationViews']=_0xc1df76,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0xc1df76,'focusTracker':this['focusTracker']}),this['listenTo'](_0xc1df76,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xc1df76,'remove',(_0x45e0a3,_0x554dbf)=>{_0x554dbf['isActive']&&this['focus'](),_0xc1df76['length']||(this['isEmpty']=!0x0);});const _0x1cbc38=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x309482,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xc1df76},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1cbc38['if']('isEmpty','ck-hidden',_0x4d40f7=>!_0x4d40f7)]},'children':[{'text':Et(_0x309482,'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 _0x1585fc of this['_annotationViews'])this['focusTracker']['add'](_0x1585fc['element']);this['_annotationViews']['on']('change',(_0xbf6895,{added:_0x2e1342,removed:_0x22af7e})=>{for(const _0x46baa9 of _0x2e1342)this['focusTracker']['add'](_0x46baa9['element']);for(const _0x301e03 of _0x22af7e)this['focusTracker']['remove'](_0x301e03['element']);});}},Di=class extends _0x24b6c6{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x55bcb5){super(_0x55bcb5),this['archivedThreads']=new _0x103a51();}['init'](){const _0x12af93=this['context'],_0x1f68d0=_0x12af93['plugins']['get'](oi),_0x4159c9=_0x12af93['plugins']['get'](ti);this['listenTo'](_0x1f68d0,'addCommentThread',(_0x5981eb,{threadId:_0xc97cbd})=>{const _0x4d1923=_0x1f68d0['getCommentThread'](_0xc97cbd);_0x4d1923['archivedAt']&&this['archivedThreads']['add'](_0x4d1923,this['_calculatePosition'](_0x4d1923['archivedAt'])),this['listenTo'](_0x4d1923,'change:archivedAt',(_0xe24b32,_0x2ad714,_0xe23345)=>{_0xe23345?this['archivedThreads']['has'](_0x4d1923)||this['archivedThreads']['add'](_0x4d1923,this['_calculatePosition'](_0x4d1923['archivedAt'])):this['archivedThreads']['has'](_0x4d1923)&&this['archivedThreads']['remove'](_0x4d1923);});}),this['listenTo'](_0x1f68d0,'removeCommentThread',(_0x39028a,{threadId:_0x5ab13b})=>{const _0x2873a2=_0x1f68d0['getCommentThread'](_0x5ab13b);this['stopListening'](_0x2873a2),this['archivedThreads']['has'](_0x2873a2)&&this['archivedThreads']['remove'](_0x2873a2);},{'priority':'highest'}),this['listenTo'](_0x4159c9['collection'],'focus',(_0x141898,_0x29ba87)=>{_0x29ba87['isVisible']||(_0x29ba87['isActive']=!0x0,_0x4159c9['activate'](_0x29ba87));});}['_calculatePosition'](_0xd48449){const _0x458d94=[...this['archivedThreads']]['findIndex'](_0x68e393=>_0x68e393['archivedAt']<_0xd48449);return _0x458d94>-0x1?_0x458d94:this['archivedThreads']['length'];}},Vi=class extends _0x2171e9{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x51dbfa];}constructor(_0x396cdd){super(_0x396cdd),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x15465d=this['editor'],_0xfee589=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x15465d['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x250387,!0x0)),_0x15465d['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5eb6d1=this['_createCommentsArchiveButton'](rt);return _0x5eb6d1['set']({'role':'menuitemcheckbox'}),_0x5eb6d1;});const _0x19665e=_0x15465d['plugins']['get'](Di),_0x2fa4a9=_0x15465d['plugins']['get']('Annotations'),_0x45c972=_0x15465d['plugins']['get']('CommentsRepository');_0x19665e['archivedThreads']['forEach'](_0x5ef967=>{this['_handleNewThread'](_0x5ef967);}),this['listenTo'](_0x19665e['archivedThreads'],'add',(_0x3994df,_0x1534c8)=>{this['_handleNewThread'](_0x1534c8);}),this['listenTo'](_0x2fa4a9['collection'],'add',(_0x178e7f,_0x364650)=>{const _0x3692ee=this['_pendingThreads']['find'](_0x22128d=>{const _0x2559c1=_0x45c972['_threadToController']['get'](_0x22128d);return _0x2559c1&&_0x364650['innerView']===_0x2559c1['view'];});if(_0x3692ee){const _0x4306ef=this['_calculatePosition'](_0x3692ee['archivedAt']);this['_addAnnotationToArchive'](_0x364650,_0x4306ef),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3692ee),0x1);}}),this['listenTo'](_0x19665e['archivedThreads'],'remove',(_0x222427,_0x5ba640)=>{const _0x4b6944=_0x15465d['config']['get']('collaboration.channelId');if(!_0x4b6944||_0x5ba640['channelId']===_0x4b6944){if(this['_pendingThreads']['includes'](_0x5ba640))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5ba640),0x1);else{const _0x178a94=_0x45c972['_threadToController']['get'](_0x5ba640),_0x2e542a=_0x2fa4a9['getByInnerView'](_0x178a94['view']);this['annotationViews']['remove'](_0x2e542a['view']),this['stopListening'](_0x2e542a),this['stopListening'](_0x2e542a['focusableElements']);}}}),this['listenTo'](_0x2fa4a9['collection'],'add',(_0x333ec6,_0x5e44db)=>{this['listenTo'](_0x5e44db,'escape',_0xfee589);}),this['listenTo'](_0x2fa4a9['collection'],'remove',(_0x39a00a,_0x1d4468)=>{this['stopListening'](_0x1d4468,'escape',_0xfee589);});}['_addAnnotationToArchive'](_0x32ce26,_0x13af72){this['listenTo'](_0x32ce26,'set:isVisible',_0x59b915=>{_0x59b915['return']=!0x1,_0x59b915['stop']();}),this['annotationViews']['add'](_0x32ce26['view'],_0x13af72);}['_handleNewThread'](_0x580275){const _0x4b18e3=this['editor']['plugins']['get']('CommentsRepository'),_0x55cb24=this['editor']['plugins']['get']('Annotations'),_0xd9c1b0=this['editor']['config']['get']('collaboration.channelId');if(!_0xd9c1b0||_0x580275['channelId']===_0xd9c1b0){const _0x103f3c=_0x4b18e3['_threadToController']['get'](_0x580275);if(!_0x103f3c)return void this['_pendingThreads']['push'](_0x580275);const _0x5d843e=this['_calculatePosition'](_0x580275['archivedAt']),_0x3d48d6=_0x55cb24['getByInnerView'](_0x103f3c['view']);_0x3d48d6['isVisible']&&_0x55cb24['_visibleAnnotations']['remove'](_0x3d48d6),this['_addAnnotationToArchive'](_0x3d48d6,_0x5d843e);}}['_calculatePosition'](_0x11ce92){const _0x17e3c2=this['editor']['config']['get']('collaboration.channelId'),_0x28c0ac=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0xe529f4=>_0xe529f4['channelId']===_0x17e3c2)['findIndex'](_0x3e34d5=>_0x3e34d5['archivedAt']<_0x11ce92);return _0x28c0ac<0x0||_0x28c0ac>this['annotationViews']['length']?this['annotationViews']['length']:_0x28c0ac-0x1;}['_toggleDialog'](){const _0x175e7c=this['editor'],_0x4445f6=_0x175e7c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x175e7c['locale'],this['annotationViews'])),'commentsArchive'===_0x4445f6['id']?_0x4445f6['hide']():_0x4445f6['show']({'id':'commentsArchive','title':Et(_0x175e7c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x552f1f,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1577ea['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x446591,_0x3f61eb=!0x1){const _0x5a267f=this['editor']['locale'],_0x445b69=this['editor']['plugins']['get']('Dialog'),_0x4a1d30=new _0x446591(_0x5a267f);return _0x4a1d30['bind']('isEnabled')['to'](this,'isEnabled'),_0x4a1d30['bind']('isOn')['to'](_0x445b69,'id',_0x59ad09=>'commentsArchive'===_0x59ad09),_0x4a1d30['set']({'label':Et(_0x5a267f,'COMMENTS_ARCHIVE'),'icon':_0x552f1f,'isToggleable':!0x0}),_0x3f61eb&&(_0x4a1d30['tooltip']=!0x0),this['listenTo'](_0x4a1d30,'execute',()=>this['_toggleDialog']()),_0x4a1d30;}['_hideDialogOnAnnotationEscape']=_0x58f927=>{const _0x524eed=_0x58f927['source'];if(!this['annotationViews']['has'](_0x524eed['view']))return;const _0x34dcaf=this['editor']['plugins']['get']('Dialog');_0x34dcaf['isOpen']&&'commentsArchive'===_0x34dcaf['id']&&(_0x34dcaf['hide'](),_0x58f927['stop']());};},Bi=class extends _0x2171e9{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 _0x334e7f,Context as _0x5bb643,ContextPlugin as _0x16337c,Editor as _0xf78eee,PendingActions as _0x3da9fa,Plugin as _0x536687}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x193b01,Collection as _0x38bfe3,DomEmitterMixin as _0x48fa42,FocusTracker as _0x491e21,KeystrokeHandler as _0x26eedf,ObservableMixin as _0x42e1ea,Rect as _0x210b11,diff as _0x46cf08,first as _0xd2ce2c,getEnvKeystrokeText as _0x3861e1,keyCodes as _0xa881fb,priorities as _0x2084bf,scrollViewportToShowTarget as _0x479573,toUnit as _0x24ef69,uid as _0x4df4d5}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x78ec66,ConfirmMixin as _0x33078f,FOCUS_ANNOTATION_KEYSTROKE as _0x2fae6d,LateFocusButtonView as _0x5f14f7,LateFocusDropdownButtonView as _0x3776be,UserView as _0x283ac9,Users as _0x515d18,getAllMarkersDomElementsSorted as _0x2d2fca,getDateTimeFormatter as _0x2c9b04,hashObject as _0x17df23,setupThreadKeyboardNavigation as _0x545031,surroundingMarkersDetector as _0x4af0a9,trimHtml as _0x4a57c4}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x5cdeb2,debounce as _0x8a3c09,isEqual as _0x2bd8c2,set as _0x450020,throttle as _0x854732,unset as _0x15707c}from'es-toolkit/compat';import{IconAddComment as _0x37b57a,IconCheck as _0x4fc022,IconCommentsArchive as _0x388b13,IconPencil as _0x12e0b3,IconRemoveComment as _0x1ea64a,IconThreeVerticalDots as _0x18d682,IconUndo as _0x580d8a}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x357288,BodyCollection as _0x5b3e57,ButtonView as _0x360533,ContextualBalloon as _0x545d95,Dialog as _0x2e911b,DialogViewPosition as _0x1e8e9e,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
+ _0x42e1ea();var bt=class extends It{['model'];['view'];constructor(_0x108fa6,_0xf993a6){super(),this['model']=_0x108fa6,this['model']['_isAttached']=!0x0,this['view']=_0xf993a6,this['listenTo'](_0xf993a6,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0xf993a6,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0xf993a6,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0xf993a6,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0xf993a6,'addComment',(_0x510273,_0x472b31)=>this['addComment'](_0x472b31)),this['listenTo'](_0xf993a6,'updateComment',(_0x3eca7f,_0x29f368,_0x24c273)=>this['updateComment'](_0x29f368,_0x24c273)),this['listenTo'](_0xf993a6,'removeComment',(_0x1df239,_0x966cc9)=>this['removeComment'](_0x966cc9));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x10c78d){this['model']['addComment']({'content':_0x10c78d,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x48ca98,_0x22f68d){this['model']['getComment'](_0x48ca98)['update']({'content':_0x22f68d});}['removeComment'](_0x53948f){this['model']['getComment'](_0x53948f)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x317865,_0x3b6a9f,_0x36807b){const t=_0x317865['t'];switch(_0x3b6a9f){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'},_0x36807b);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'},_0x36807b);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'},_0x36807b);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'},_0x36807b);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x36807b);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'},_0x36807b);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'},_0x36807b);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'},_0x36807b);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(_0xdfcdf9,_0x4a1cd9){super(_0xdfcdf9);const _0x5b2b1e=_0x4df4d5();this['main']=this['createCollection'](),this['editable']=new st(_0xdfcdf9,_0x4a1cd9,void 0x0,{'label':()=>Et(_0xdfcdf9,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xdfcdf9['uiLanguageDirection'],'lang':_0xdfcdf9['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5b2b1e},'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(_0x11de06){super(_0x11de06),this['view']=new kt(_0x11de06['locale'],_0x11de06['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x32985e=this['editor']['editing']['view'],_0x4b22b4=this['view']['editable'];_0x4b22b4['name']=_0x32985e['document']['getRoot']()['rootName'],this['view']['render']();const _0x54778b=_0x4b22b4['element'];this['setEditableElement'](_0x4b22b4['name'],_0x54778b),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x32985e['attachDomRoot'](_0x54778b),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x42e1ea(_0xf78eee);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x50ff85={}){(_0x50ff85=Object['assign']({},_0x50ff85))['plugins']||(_0x50ff85['plugins']=CommentEditor['defaultPlugins']),super(_0x50ff85),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 _0x579a39=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x579a39))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4fa2ad=>{const _0x18e9a6=this['model']['document']['getRoot'](),_0xab225c=_0x18e9a6&&_0x18e9a6['getChild'](_0x18e9a6['childCount']-0x1);_0x4fa2ad['setSelection'](_0xab225c,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x47f4de=this['editing']['view'],_0x1ccec4=_0x47f4de['document']['getRoot'](),_0x1a3872=_0x1ccec4['getChild'](0x0);_0x1ccec4['childCount']>0x1||!_0x1a3872||'p'!=_0x1a3872['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x47f4de,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1a3872['placeholder']=this['placeholder']),ut({'view':_0x47f4de,'element':_0x1a3872,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1a3872);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x147271,_0x3aede7={}){super(_0x147271),this['editor']=null,this['_editorConfig']=_0x3aede7,this['set']('value',_0x3aede7['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x147271,'Reply...')),this['set']('submitLabel',Et(_0x147271,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x26eedf(),this['focusTracker']=new _0x491e21(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1f73c7=>!_0x1f73c7['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',(_0x4ebfdf,_0xae90a2)=>{this['cancelButtonView']['fire']('execute'),_0xae90a2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x142d07,_0x48b7f6)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x48b7f6());}),this['on']('submit',(_0x1f6c1d,_0x239510)=>{_0x239510['length']>0xfde8?(alert(Et(_0x147271,'TOO_LONG_COMMENT_ALERT',[_0x239510['length'],0xfde8])),_0x1f6c1d['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 _0x56485a=this['editor'];this['element']['insertBefore'](_0x56485a['ui']['element'],this['element']['firstChild']),_0x56485a['model']['document']['on']('change',()=>this['value']=_0x56485a['getData']()),_0x56485a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x56485a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4c55a7){-0x1===_0x4c55a7?(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:_0x2b8f3e}=this,_0x3c6c7f=new _0x360533(_0x2b8f3e);return _0x3c6c7f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3c6c7f['withText']=!0x0,_0x3c6c7f['bind']('label')['to'](this,'submitLabel'),_0x3c6c7f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3c6c7f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x116505,_0x4af26a)=>!_0x4af26a&&!!_0x116505['trim']()),_0x3c6c7f;}['_createCancelButton'](){const {locale:_0x222135}=this,_0x3d303d=new _0x360533(_0x222135);return _0x3d303d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3d303d['label']=Et(_0x222135,'Cancel'),_0x3d303d['withText']=!0x0,_0x3d303d['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3d303d;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2ac513=>{this['focusTracker']['add'](_0x2ac513['element']);}),this['focusables']['on']('change',(_0x477b69,_0x121185)=>{for(const _0x22db66 of Array['from'](_0x121185['added'])['reverse']())this['focusTracker']['add'](_0x22db66['element']);});}},xt=class extends ht{constructor(_0x5dd35d,_0x405d98,_0x4a7638){super(_0x5dd35d),this['commentInputView']=new St(_0x5dd35d,_0x4a7638),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x77027d,_0x329a65)=>_0x77027d||!!_0x329a65),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 _0x283ac9(_0x5dd35d,_0x405d98),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'](_0x2d11a5){this['commentInputView']['focus'](_0x2d11a5);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x506522,_0x389a85)=>{const {submitButtonView:_0x153346,cancelButtonView:_0xb3a198,editor:_0x5f4cef}=this['commentInputView'];[_0x153346['element'],_0xb3a198['element'],_0x5f4cef?_0x5f4cef['editing']['view']['getDomRoot']():null]['filter'](_0xc43c29=>_0xc43c29)['some'](_0x53c94c=>_0x53c94c['contains'](_0x389a85['target']))||(this['focus'](),_0x389a85['preventDefault']());});}},Pt=class extends ht{constructor(_0x4797bc){super(_0x4797bc);const _0x48780d=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x48780d['to']('count',_0x394d58=>Et(_0x4797bc,'NUMBER_OF_COMMENTS',_0x394d58))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2a8abf,_0x3aecae,_0x5d078e){super(_0x2a8abf);const _0x4daf88=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x3aecae['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x3aecae,this['_config']=_0x5d078e,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x491e21(),this['keystrokes']=new _0x26eedf(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd0fa0=>this['commentViews']['map'](_0x156b09=>_0x156b09['element'])['includes'](_0xd0fa0['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x2a8abf),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x465188=>_0x465188-this['_config']['maxCommentsWhenCollapsed']);for(const _0x200410 of _0x3aecae['comments'])this['_handleNewCommentModel'](_0x200410);this['_handleInfoComment'](),this['listenTo'](_0x3aecae['comments'],'add',(_0x496de8,_0x59d2ea)=>{const _0x464cb9=this['_calculatePosition'](_0x59d2ea);this['length']++,this['_handleNewCommentModel'](_0x59d2ea,_0x464cb9),this['refreshVisibleViews']();}),this['listenTo'](_0x3aecae['comments'],'remove',(_0xdf1cd7,_0x24990c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x24990c),this['refreshVisibleViews']();}),this['listenTo'](_0x3aecae,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x3aecae,'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',_0x4daf88['if']('length','ck-hidden',_0x5146f3=>!_0x5146f3)],'aria-label':Et(_0x2a8abf,'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'](_0x465aa0){-0x1===_0x465aa0?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x37b2ff of this['commentViews'])_0x37b2ff['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3b3f0d,_0x51f83d){const _0x4639b5=new this['_config']['CommentView'](this['locale'],_0x3b3f0d,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4639b5['viewUid']=_0x3b3f0d['id'],_0x4639b5['delegate']('removeComment')['to'](this),_0x4639b5['delegate']('updateComment')['to'](this),_0x4639b5['delegate']('resolveCommentThread')['to'](this),_0x4639b5['delegate']('editorReady')['to'](this),_0x4639b5['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4639b5,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4639b5,_0x51f83d);}['_calculatePosition'](_0x5e8b63){const _0xb9b08d=this['_model']['_findOptimalIndex'](_0x5e8b63);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5e8b63['authoredAt']?_0xb9b08d-0x1:_0xb9b08d:_0xb9b08d-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x55a928={'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'],_0x55a928,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x55a928));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5779ae){const _0x14deb1=this['commentViews']['remove'](_0x5779ae['id']);this['stopListening'](_0x14deb1),_0x14deb1['isEditMode']&&this['_updateHasDirtyComment'](),_0x14deb1['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x259399=>_0x259399['isEditMode']);}['_rearrangeCollapse'](){const _0x18a8d8=function(_0xcd079a){const _0x36dea3=new _0x38bfe3();for(const _0x5a5e04 of _0xcd079a)_0x36dea3['add'](_0x5a5e04);return _0x36dea3;}(this['commentViews']),_0x1275f1=this['_collapsedCommentsView']['count'];for(let _0x522eb4=0x1;_0x522eb4<=_0x1275f1;_0x522eb4++)_0x18a8d8['remove'](0x1);for(const _0x38321c of _0x18a8d8)_0x38321c['collapse']();_0x1275f1>0x0&&_0x18a8d8['add'](this['_collapsedCommentsView'],0x1),Dt(_0x46cf08(Array['from'](this['visibleViews']),Array['from'](_0x18a8d8)),this['visibleViews'],_0x18a8d8);}['_rearrangeExpand'](){Dt(_0x46cf08(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xfedd01 of this['visibleViews'])_0xfedd01['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x25e176=>{this['focusTracker']['add'](_0x25e176['element']),this['keystrokes']['listenTo'](_0x25e176['element']);}),this['commentViews']['on']('change',(_0x2681d9,_0x303f13)=>{for(const _0x44e94f of _0x303f13['removed'])this['focusTracker']['remove'](_0x44e94f['element']),this['keystrokes']['stopListening'](_0x44e94f['element']);for(const _0x3c7707 of Array['from'](_0x303f13['added'])['reverse']())this['focusTracker']['add'](_0x3c7707['element']),this['keystrokes']['listenTo'](_0x3c7707['element']);});}};function Dt(_0x1b779d,_0x1efdbc,_0x37a476){let _0x5c4eb2=0x0;for(const _0x5cecce of _0x1b779d)switch(_0x5cecce){case'insert':_0x1efdbc['add'](_0x37a476['get'](_0x5c4eb2),_0x5c4eb2),_0x5c4eb2++;break;case'delete':_0x1efdbc['remove'](_0x5c4eb2);break;case'equal':_0x5c4eb2++;}}var Vt=class extends ht{constructor(_0x5253d1){super(_0x5253d1);const _0x281f3f=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x281f3f['to']('contextValue',_0x3717c9=>Et(_0x5253d1,'THREAD_CONTEXT_LABEL',_0x3717c9)),'tabindex':-0x1},'children':[{'text':_0x281f3f['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2bb387,_0x156cf2){super(_0x2bb387);const _0x4f83dc=this['bindTemplate'];this['_model']=_0x156cf2,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x491e21(),this['keystrokes']=new _0x26eedf(),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',_0x6f8952=>!!_0x6f8952),this['bind']('contextValue')['to'](this['_model'],'context',_0x4fdee7=>_0x4fdee7&&_0x4fdee7['value']?this['_trimContextValue'](_0x4fdee7['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',_0x4f83dc['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 _0x5d925a=new _0x360533(this['locale']);return _0x5d925a['label']=Et(this['locale'],'Reopen'),_0x5d925a['tooltip']=Et(this['locale'],'Reopen'),_0x5d925a['icon']=_0x580d8a,_0x5d925a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4fd534=>!_0x4fd534),_0x5d925a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x164811,_0x51f7d2)=>_0x164811&&_0x51f7d2),_0x5d925a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5d925a;}['_trimContextValue'](_0x5f2cc1){if(_0x5f2cc1['length']<0x96)return _0x5f2cc1;const _0x164246=_0x5f2cc1['lastIndexOf']('\x20',0x93);return _0x5f2cc1['substring'](0x0,_0x164246>-0x1?_0x164246:0x93)+'...';}['_attachContextActions'](){const _0x52fe59=this['element']['querySelector']('.ck-context'),_0x5eafac=_0x52fe59['querySelector']('.ck-context__value');this['listenTo'](_0x52fe59,'mouseenter',()=>{_0x5eafac['offsetWidth']<_0x5eafac['scrollWidth']&&_0x52fe59['classList']['add']('overlay');}),this['listenTo'](_0x52fe59,'mouseleave',()=>{_0x52fe59['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x950d31 of this['focusables'])this['focusTracker']['add'](_0x950d31['element']),this['keystrokes']['listenTo'](_0x950d31['element']);}['_createContextView'](){const _0x5544b6=new Vt(this['locale']);return _0x5544b6['bind']('contextValue')['to'](this),_0x5544b6;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x18984d,_0x282de0,_0x510485,_0x98693c){super(_0x18984d),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x282de0,this['_localUser']=_0x510485,this['_config']=_0x98693c,this['commentThreadHeaderView']=new Bt(_0x18984d,_0x282de0),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x78ec66(_0x18984d,Et(_0x18984d,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x18984d,_0x282de0,Object['assign']({'CommentView':this['_config']['CommentView']},_0x98693c)),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',(_0x56f76c,_0x420ba9)=>_0x56f76c||!!_0x420ba9),this['bind']('isUnlinked')['to'](_0x282de0,'unlinkedAt',_0x29539f=>!!_0x29539f);let _0x2b930e=null;const _0x5c2e6c=()=>{const _0x2fcd34=this['_model']['comments']['first']||null;_0x2fcd34!==_0x2b930e&&(_0x2b930e&&this['stopListening'](_0x2b930e,'change:content'),_0x2b930e=_0x2fcd34,_0x2fcd34&&this['listenTo'](_0x2fcd34,'change:content',_0x5c2e6c));const _0x11e89a=_0x2fcd34?_0x2fcd34['author']['name']:this['_localUser']['name'],_0x170657=_0x2fcd34?new DOMParser()['parseFromString'](_0x4a57c4(_0x2fcd34['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x31808d=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x11e89a]);this['set']('ariaLabel',_0x170657?_0x31808d+'\x20'+_0x170657:_0x31808d);};this['listenTo'](this['_model']['comments'],'change',_0x5c2e6c),_0x5c2e6c(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x491e21(),this['keystrokes']=new _0x26eedf(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x442f15=>_0x442f15['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x545031(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x4a0d2b=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x372437=_0x4a0d2b['commentInputView'];return _0x4a0d2b['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x372437,'value',(_0x4cc4ea,_0x2ca044,_0x16f004,_0x4175b7,_0x2995a8)=>!!_0x2995a8||!!_0x4175b7&&_0x16f004&&!_0x2ca044||_0x4cc4ea&&_0x16f004&&!_0x2ca044),_0x372437['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x158cf8,_0x30cb7f,_0x506e7d)=>{let _0x20b449;return _0x20b449=_0x506e7d&&_0x30cb7f?'Reply\x20to\x20reopen\x20discussion...':_0x158cf8?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x20b449);}),_0x372437['bind']('submitLabel')['to'](this,'length',_0x4af90b=>Et(this['locale'],_0x4af90b?'Reply':'Comment')),_0x372437['on']('submit',(_0xe528a,_0x56d971)=>{this['fire']('addComment',_0x56d971),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x372437['on']('cancel',()=>{this['focus']();}),_0x372437['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x372437['on']('cancel',_0x320c5f=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x320c5f['stop']());}),this['on']('change:isActive',(_0x4de869,_0x48cb0f,_0x32d8de)=>{_0x32d8de||this['length']||_0x372437['value']||this['fire']('removeCommentThread');}),_0x4a0d2b;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x33078f(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1ebf46,_0x23e3e2,_0x445f4c,_0x712ee2){super(_0x1ebf46,_0x23e3e2,_0x445f4c,_0x712ee2),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1ebf46,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x472309,_0x3f7db0,_0x18f241)=>{_0x18f241||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x2832c2,_0x382cb5,_0x4845ac)=>{_0x4845ac&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5893fa=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5893fa['if']('isActive','ck-thread--active'),_0x5893fa['if']('isUnlinked','ck-thread--unlinked'),_0x5893fa['to']('actionIndicator',_0xa160fb=>_0xa160fb?'ck-thread--'+_0xa160fb:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5893fa['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 _0x540f2b of this['commentsListView']['commentViews'])_0x540f2b['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3c9d02}=this,_0x5999b2=this['commentsListView']['commentViews']['get'](0x0);_0x5999b2===this['_boundFirstCommentView']||_0x5999b2['isSystemComment']||(this['_boundFirstCommentView']=_0x5999b2,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x5999b2,'actionIndicator',_0x48dbbe=>'remove'===_0x48dbbe?'remove':null),_0x5999b2['placeholder']=Et(_0x3c9d02,'Write\x20a\x20comment...'),_0x5999b2['removeButton']['on']('execute',_0x2d6134=>{_0x2d6134['stop'](),this['showConfirm'](Et(_0x3c9d02,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x5999b2['focus']();}),_0x5999b2['actionBar']['add'](this['resolveButton'],0x0),_0x5999b2['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x6a79e7=new _0x5f14f7(this['locale']);return _0x6a79e7['label']=Et(this['locale'],'Resolve'),_0x6a79e7['tooltip']=Et(this['locale'],'Resolve'),_0x6a79e7['icon']=_0x4fc022,_0x6a79e7['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x6a79e7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x394bf=>!_0x394bf),_0x6a79e7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x791ec4,_0x33ae40)=>_0x791ec4&&!_0x33ae40),_0x6a79e7['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x6a79e7;}['_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(_0x298e94){super(_0x298e94),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x84b953,_0x28be42,_0x3c20f1)=>{this['element']['innerHTML']=_0x3c20f1;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0xffbcc7,_0x4da4b9,_0x227d22){super(_0xffbcc7),this['_model']=_0x4da4b9,this['_config']=_0x227d22,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4da4b9,'content',_0x4da4b9,'authoredAt',(_0x1b4c9b,_0x53ef93)=>Et(_0xffbcc7,'COMMENT_ARIA_LABEL',[_0x4da4b9['author']['name'],_0x227d22['formatDateTime'](_0x53ef93),new DOMParser()['parseFromString'](_0x1b4c9b,'text/html')['body']['textContent'],_0x4da4b9['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x78ec66(_0xffbcc7,Et(_0xffbcc7,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x491e21(),this['keystrokes']=new _0x26eedf(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3b8d60=>_0x3b8d60['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 _0x29386c=new Wt(this['locale']);return _0x29386c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x5211c9,_0xa16248)=>_0xa16248?_0x4a57c4(_0x5211c9,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x5211c9),_0x29386c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x29338e=new St(this['locale'],this['_config']['editorConfig']);return _0x29338e['value']=this['_model']['content'],_0x29338e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x29338e['submitLabel']=Et(this['locale'],'Save'),_0x29338e['on']('submit',(_0x396592,_0x4886cd)=>{this['fire']('updateComment',this['_model']['id'],_0x4886cd),this['switchToDisplayMode'](),this['focus']();}),_0x29338e['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x29338e['once']('editorReady',()=>{_0x29338e['focus']();}),_0x29338e['createEditor'](),_0x29338e['delegate']('editorReady')['to'](this),_0x29338e['delegate']('editorDestroyed')['to'](this),_0x29338e;}['_setupKeyboardNavigation'](){const _0x4319e5=this['element'];this['keystrokes']['listenTo'](_0x4319e5);for(const _0x4b27d6 of this['focusables'])this['focusTracker']['add'](_0x4b27d6['element']),this['keystrokes']['listenTo'](_0x4b27d6['element']);this['focusables']['on']('change',(_0x161d5d,_0x4cc4d2)=>{for(const _0xc854c1 of _0x4cc4d2['removed'])this['focusTracker']['remove'](_0xc854c1['element']),this['keystrokes']['stopListening'](_0xc854c1['element']);for(const _0xb5a797 of _0x4cc4d2['added'])this['focusTracker']['add'](_0xb5a797['element']),this['keystrokes']['listenTo'](_0xb5a797['element']);}),this['keystrokes']['set']('enter',(_0x5e9833,_0x571e9e)=>{_0x4319e5===_0x5e9833['target']&&(this['focusCycler']['focusFirst'](),_0x571e9e());}),this['keystrokes']['set']('esc',(_0x507de3,_0x5ca0eb)=>{_0x4319e5!==_0x507de3['target']&&(this['focus'](),_0x5ca0eb());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x33078f(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x4a46cb,_0x259755,_0x441778){super(_0x4a46cb,_0x259755,_0x441778),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x4a46cb,'Reply...')),this['bind']('authoredAt')['to'](_0x259755),this['bind']('resolvedAt')['to'](_0x259755),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 _0x283ac9(_0x4a46cb,_0x259755['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x259755,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0xac6347=this['bindTemplate'],_0x30c4ec=[{'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':_0xac6347['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xac6347['to']('authoredAt',_0x5448d1=>this['_config']['formatDateTime'](_0x5448d1))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0xac6347['if']('isEditMode','ck-comment__actions--hidden'),_0xac6347['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']&&_0x30c4ec['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0xac6347['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0xac6347['if']('isEditMode','ck-comment--edit'),_0xac6347['if']('isSystemComment','ck-comment--info'),_0xac6347['to']('actionIndicator',_0x2d9f0e=>_0x2d9f0e?'ck-comment--'+_0x2d9f0e:'')],'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':_0x30c4ec}]}]};}['_createEditButton'](){const _0x3e71ac=new _0x360533(this['locale']);return _0x3e71ac['label']=Et(this['locale'],'Edit'),_0x3e71ac['icon']=_0x12e0b3,_0x3e71ac['withText']=!0x0,_0x3e71ac['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x3e71ac['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2676c7=>!_0x2676c7),_0x3e71ac['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x3e71ac['on']('execute',()=>this['switchToEditMode']()),_0x3e71ac;}['_createRemoveButton'](){const _0xa50a18=new _0x360533(this['locale']);return _0xa50a18['label']=Et(this['locale'],'Remove'),_0xa50a18['icon']=_0x1ea64a,_0xa50a18['withText']=!0x0,_0xa50a18['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xa50a18['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3104ac=>!_0x3104ac),_0xa50a18['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xa50a18['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xa50a18;}['_createDropdown'](){const _0x5136c7=ct(this['locale'],_0x3776be),_0x3f1648=_0x5136c7['panelView']['children'],_0x2c9d88=new ot(this['locale']),_0x5681ff=_0x5136c7['bindTemplate'];dt(_0x5136c7,()=>this['items']['find'](_0x176f3b=>_0x176f3b['isVisible'])),_0x5136c7['extendTemplate']({'attributes':{'class':[_0x5681ff['if']('isVisible','ck-hidden',_0x51bd7d=>!_0x51bd7d)]}});const _0x476d5a=(_0x5e8001,_0x1d7751=-0x1)=>{const _0x5eaee6=new nt(this['locale']);_0x5eaee6['children']['add'](_0x5e8001);const _0x414c13=_0x1d7751>-0x1?_0x1d7751:_0x2c9d88['items']['length'];_0x2c9d88['items']['add'](_0x5eaee6,_0x414c13);const _0x3c8a76=Array['from'](this['items']);_0x5136c7['unbind']('isEnabled','isVisible'),_0x5136c7['bind']('isEnabled')['toMany'](_0x3c8a76,'isEnabled',(..._0x3c0255)=>_0x3c0255['some'](_0x28e8c9=>_0x28e8c9)),_0x5136c7['bind']('isVisible')['toMany'](_0x3c8a76,'isVisible',(..._0x52895f)=>_0x52895f['some'](_0x452fd3=>_0x452fd3));};_0x5136c7['panelPosition']='sw',_0x5136c7['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x18d682});for(const _0x2fd7d2 of this['items'])_0x476d5a(_0x2fd7d2);return _0x3f1648['add'](_0x2c9d88),_0x5136c7['listenTo'](this['items'],'add',(_0x257f81,_0x2ae4e4,_0x2b40f0)=>{_0x476d5a(_0x2ae4e4,_0x2b40f0);}),_0x5136c7['listenTo'](this['items'],'remove',(_0x180b72,_0x2f5a51,_0x4b602c)=>{_0x2c9d88['items']['remove'](_0x4b602c);}),_0x5136c7;}['_attachActions'](_0xd2971d,_0x4f49f9){const _0x3ddd2d=_0xd2971d&&_0xd2971d['element'];_0x3ddd2d&&(this['listenTo'](_0x3ddd2d,'mouseenter',()=>this['actionIndicator']=_0x4f49f9),this['listenTo'](_0x3ddd2d,'focus',()=>this['actionIndicator']=_0x4f49f9),this['listenTo'](_0x3ddd2d,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3ddd2d,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x5ce4ca=super['_createCommentInputView']();return _0x5ce4ca['bind']('placeholder')['to'](this),_0x5ce4ca;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x59c056){const _0x39cfbb=_0x854732(_0x59c056,0x1e),_0x4cdc60=new MutationObserver(_0x1e0eac=>{for(const _0x4e669d of _0x1e0eac)('attributes'==_0x4e669d['type']&&'class'==_0x4e669d['attributeName']||'childList'==_0x4e669d['type']||'characterData'==_0x4e669d['type'])&&_0x39cfbb();});return{'attach'(_0x3f0afc){_0x4cdc60['observe'](_0x3f0afc,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4cdc60['disconnect'](),_0x39cfbb['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4b0cf3,_0x48a5ec){super(_0x4b0cf3),this['id']=_0x4df4d5(),this['focusTracker']=new _0x491e21(),this['keystrokes']=new _0x26eedf(),this['keystrokes']['set']('Esc',(_0x497271,_0xf668db)=>this['fire']('Esc',_0xf668db)),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'](_0x48a5ec),this['mainView']=_0x48a5ec;const _0x58e1f2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x58e1f2['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 _0x4781d7=this['element']['clientHeight'];_0x4781d7&&(this['height']=_0x4781d7);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x42e1ea();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xf0a999,target:_0x14b659,type:_0x5cd67b,isVisible:_0x5eae7e=!0x0}){super(),this['view']=_0xf0a999,this['view']['element']||this['view']['render'](),this['_type']=_0x5cd67b,this['_target']=_0x14b659,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x38bfe3([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5c2dc8,_0x2def22)=>{this['view']['focusTracker']['add'](_0x2def22);}),this['focusableElements']['on']('remove',(_0x4aece0,_0xf8ff53)=>{this['view']['focusTracker']['remove'](_0xf8ff53);}),this['set']('isVisible',_0x5eae7e);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x24d472=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x24d472),_0x24d472;}get['targetRect'](){const _0x43258c=this['target'];if(null===_0x43258c)return null;if(_0x43258c instanceof _0x210b11)return _0x43258c;const _0x2332fa=_0x43258c['filter'](_0x552001=>function(_0x22f6d5){return!!_0x22f6d5['offsetParent']||!!_0x22f6d5['getClientRects']()['item'](0x0);}(_0x552001));return 0x0===_0x2332fa['length']?null:_0x210b11['getDomElementRects'](_0x2332fa[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x19082d){this['view']['isActive']=_0x19082d,this['view']['mainView']['isActive']=_0x19082d;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3040d8){if(!(null===_0x3040d8||_0x3040d8 instanceof _0x210b11||Array['isArray'](_0x3040d8)&&_0x3040d8['every'](_0x26e243=>zt(_0x26e243))))throw new _0x193b01('annotation-invalid-target',null,{'target':_0x3040d8});}['_getNormalizedTarget'](){const _0x55ddeb='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x55ddeb)?[_0x55ddeb]:_0x55ddeb;}};function zt(_0x4a4e18){return null!==_0x4a4e18&&'object'==typeof _0x4a4e18&&'nodeType'in _0x4a4e18&&0x1===_0x4a4e18['nodeType'];}var Jt=class extends _0x38bfe3{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x29ba13=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x491e21(),this['_focusTracker']['on']('change:isFocused',(_0x178482,_0x2ebb42,_0x41b492)=>{_0x41b492||this['fire']('blur');});for(const _0x50a734 of _0x29ba13)this['add'](_0x50a734);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x295e87){if(this['has'](_0x295e87))throw new _0x193b01('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x295e87['innerView'],_0x295e87),this['_viewToAnnotation']['set'](_0x295e87['view'],_0x295e87);for(const _0x5a70ae of _0x295e87['focusableElements'])this['_focusTracker']['add'](_0x5a70ae);if(this['listenTo'](_0x295e87['focusableElements'],'add',(_0x1b0fa4,_0x545bf2)=>{this['_focusTracker']['add'](_0x545bf2);}),this['listenTo'](_0x295e87['focusableElements'],'remove',(_0x52892a,_0x2a232c)=>{this['_focusTracker']['remove'](_0x2a232c);}),this['listenTo'](_0x295e87['view']['focusTracker'],'change:isFocused',(_0x1e8cfe,_0x2ace35,_0x49de75)=>{_0x49de75&&this['fire']('focus',_0x295e87);}),_0x295e87['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x17a3f7 of this)_0x17a3f7['updateTargetRect']();}const _0x5efbe3=this['_getOrderInContent'](_0x295e87['view']['targetRect']);return super['add'](_0x295e87,_0x5efbe3);}['remove'](_0x3a681b){if(!this['has'](_0x3a681b))throw new _0x193b01('annotationcollection-not-existing-item',null);this['stopListening'](_0x3a681b['view']['focusTracker']),this['stopListening'](_0x3a681b['focusableElements']);for(const _0x5a039b of _0x3a681b['focusableElements'])this['_focusTracker']['remove'](_0x5a039b);return this['_viewToAnnotation']['delete'](_0x3a681b['view']),this['_innerViewToAnnotation']['delete'](_0x3a681b['innerView']),super['remove'](_0x3a681b);}['getByInnerView'](_0x4f24b8){return this['_innerViewToAnnotation']['get'](_0x4f24b8);}['getByView'](_0x4017f1){return this['_viewToAnnotation']['get'](_0x4017f1);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x4ed7dc of this)_0x4ed7dc['updateTargetRect']();this['_sort']();}['_sort'](){const _0x577c55=Array['from'](this)['sort']((_0x22aff6,_0x2f91da)=>Zt(_0x22aff6['view']['targetRect'],_0x2f91da['view']['targetRect']));for(let _0x42a45c=_0x577c55['length']-0x1;_0x42a45c>0x0;_0x42a45c--){const _0x83252b=_0x577c55[_0x42a45c];_0x42a45c!==this['getIndex'](_0x83252b)&&(this['remove'](_0x83252b),this['add'](_0x83252b));}}['_getOrderInContent'](_0x493dba){let _0x23e27a=0x0;if(!_0x493dba)return this['length'];for(const _0x1847d4 of this){const _0x41f896=_0x1847d4['view']['targetRect'];if(_0x41f896){if(Zt(_0x493dba,_0x41f896)<0x0)return _0x23e27a;_0x23e27a++;}}return _0x23e27a;}['_areCachedRectsStale'](){const _0x3570e2=this['get'](0x0);if(!_0x3570e2)return!0x1;const _0xda13b6=_0x3570e2['view']['targetRect'],_0x2594b3=_0x3570e2['targetRect'];return!(!_0xda13b6||!_0x2594b3)&&(_0xda13b6['top']!==_0x2594b3['top']||_0xda13b6['left']!==_0x2594b3['left']);}};function Qt({source:_0x17c491,target:_0x3043b9,filter:_0x5a2ea6}){for(const _0x20b0c7 of _0x17c491)_0x5a2ea6(_0x20b0c7)&&_0x3043b9['add'](_0x20b0c7);_0x3043b9['listenTo'](_0x17c491,'add',(_0x211e49,_0x3c673a)=>{_0x5a2ea6(_0x3c673a)&&_0x3043b9['add'](_0x3c673a);}),_0x3043b9['listenTo'](_0x17c491,'remove',(_0x150582,_0x400a83)=>{_0x3043b9['has'](_0x400a83)&&_0x3043b9['remove'](_0x400a83);});}function Zt(_0x4d4d9a,_0x3e8675){if(null===_0x4d4d9a&&null===_0x3e8675)return 0x0;if(null===_0x4d4d9a)return-0x1;if(null===_0x3e8675)return 0x1;const _0x41a267=_0x4d4d9a['top']-_0x3e8675['top'];return 0x0==_0x41a267?_0x4d4d9a['left']-_0x3e8675['left']:_0x41a267;}var ti=class extends _0x16337c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x303f08){if(super(_0x303f08),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x303f08 instanceof _0xf78eee){const _0x4967c1=_0x303f08['locale'];_0x303f08['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x4967c1,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x4967c1,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x4967c1,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x4967c1,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x4967c1,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x4967c1,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x4967c1,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x29718f){this['collection']['add'](_0x29718f);}['remove'](_0x25f68d){this['collection']['remove'](_0x25f68d),_0x25f68d['destroy']();}['refreshVisibility'](){for(const _0x305c27 of this['collection'])_0x305c27['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xc8a278){return this['collection']['getByInnerView'](_0xc8a278);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x6d3120 of this['collection'])_0x6d3120['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x43b681){this['fire']('_activateAnnotation',_0x43b681);}['createAnnotation'](_0x4a4058){return new $t(_0x4a4058);}['createAnnotationView'](_0x295e4a,_0x4ad59a){return new qt(_0x295e4a,_0x4ad59a);}['_addActiveAnnotation'](_0x37f5cb){const _0x534d33=new Set(this['activeAnnotations']);_0x534d33['add'](_0x37f5cb),this['activeAnnotations']=_0x534d33;}['_removeActiveAnnotation'](_0x55a4b9){const _0x4106f0=new Set(this['activeAnnotations']);_0x4106f0['delete'](_0x55a4b9),this['activeAnnotations']=_0x4106f0;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2c445a=this['collection'],_0x2eedcc=this['_visibleAnnotations'];function _0x59a8d7(_0x2a7432){const _0x3d80b4=_0x2a7432['source'];_0x3d80b4['isVisible']&&!_0x2eedcc['has'](_0x3d80b4)?_0x2eedcc['add'](_0x3d80b4):!_0x3d80b4['isVisible']&&_0x2eedcc['has'](_0x3d80b4)&&_0x2eedcc['remove'](_0x3d80b4),_0x3d80b4['view']['focusTracker']['remove'](_0x3d80b4['view']['element']),_0x3d80b4['view']['focusTracker']['add'](_0x3d80b4['view']['element']);}this['listenTo'](_0x2c445a,'add',(_0x5cf245,_0x24f9c0)=>{_0x24f9c0['isVisible']&&_0x2eedcc['add'](_0x24f9c0),this['listenTo'](_0x24f9c0,'change:isVisible',_0x59a8d7);}),this['listenTo'](_0x2c445a,'remove',(_0x10cc9c,_0x474b18)=>{_0x2eedcc['has'](_0x474b18)&&_0x2eedcc['remove'](_0x474b18),this['stopListening'](_0x474b18,'change:isVisible',_0x59a8d7);});}['_setupEnterAnnotationKeystroke'](){const _0x2a30e6=_0x501515=>{_0x501515['on']('ready',()=>{_0x501515['keystrokes']['set'](_0x2fae6d,(_0x5aca00,_0x407648)=>{const _0x566338=_0xd2ce2c(this['activeAnnotations']['values']());_0x566338&&(_0x566338['view']['focus'](),_0x407648());});});};this['context']instanceof _0xf78eee?_0x2a30e6(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x53a17a,_0x28f7e1)=>{_0x2a30e6(_0x28f7e1);});}['_setupEscapeAnnotationHandling'](){const _0x19f8e7=_0x2008cc=>{const _0x545bd5=_0x2008cc['source'],_0x46e022=[];let _0x4c7aea;if(Array['isArray'](_0x545bd5['target'])){_0x4c7aea=_0x545bd5['target'][0x0],this['context']instanceof _0xf78eee?_0x46e022['push'](this['context']):this['context']['editors']&&_0x46e022['push'](...this['context']['editors']);for(const _0x617fed of _0x46e022)for(const _0x15fa69 of _0x617fed['editing']['view']['domRoots']['values']())if(_0x15fa69['contains'](_0x4c7aea))return void _0x617fed['editing']['view']['focus']();_0x4c7aea['focus']();}};this['listenTo'](this['collection'],'add',(_0x1b7145,_0x491e55)=>{this['listenTo'](_0x491e55,'escape',_0x19f8e7,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xa1d9d0,_0x240bdb)=>{this['stopListening'](_0x240bdb,'escape',_0x19f8e7);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x42e1ea(),ni=/* #__PURE__ -- @preserve */
31
+ _0x42e1ea();var oi=class extends _0x16337c{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x3da9fa,_0x515d18];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4cf04e){super(_0x4cf04e),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x18f051=this['context']['config'];_0x18f051['define']('comments.maxCommentsWhenCollapsed',0x2),_0x18f051['define']('comments.maxThreadTotalWeight',0x1f4),_0x18f051['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x18f051['define']('comments.CommentThreadView',Ut),_0x18f051['define']('comments.CommentView',Yt),_0x18f051['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4ac874=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4a6c2c,_0x42d515)=>this['_addCommentThread'](_0x42d515)),this['on']('submitCommentThread',(_0x94c94f,_0x5d770d)=>this['_submitCommentThread'](_0x5d770d)),this['on']('resolveCommentThread',(_0x1b359b,_0x42eb04)=>this['_resolveCommentThread'](_0x42eb04)),this['on']('resolveCommentThread',(_0x50976c,_0x3edc43)=>this['_updateActiveAnnotation'](_0x3edc43),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1c8e22,_0x10a842)=>this['_reopenCommentThread'](_0x10a842)),this['on']('reopenCommentThread',(_0x8675ec,_0x2d4e7e)=>this['_updateActiveAnnotation'](_0x2d4e7e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x50cd2d,_0x49ed02)=>this['_removeCommentThread'](_0x49ed02)),this['on']('updateCommentThread',(_0x36f007,_0x1c19c4)=>this['_updateCommentThread'](_0x1c19c4)),this['on']('updateCommentThread',(_0x5521fc,_0x4e6322)=>this['_updateActiveAnnotation'](_0x4e6322),{'priority':'lowest'}),this['on']('addComment',(_0x5dd94a,_0x11e8db)=>this['_addComment'](_0x11e8db)),this['on']('updateComment',(_0x5d1107,_0x3b1da6)=>this['_updateComment'](_0x3b1da6)),this['on']('removeComment',(_0x325fe9,_0x4b4dac)=>this['_removeComment'](_0x4b4dac)),this['on']('addComment',(_0x30019c,{threadId:_0x87f8dc,isFromAdapter:_0x4f339e})=>{if(_0x4f339e)return;const _0x25b72e=this['getCommentThread'](_0x87f8dc),_0x2e3735=_0x25b72e&&this['_threadToController']['get'](_0x25b72e);_0x2e3735&&_0x2e3735['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4ac874,'change:activeAnnotations',(_0x470da5,_0x1e95f9,_0x435b5e)=>{const _0x5079a3=Array['from'](_0x435b5e)['map'](_0x1d4ed9=>this['_viewToController']['get'](_0x1d4ed9['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5079a3?_0x5079a3['model']:null;});}set['adapter'](_0x3b576c){if(this['_adapter'])throw new _0x193b01('commentsrepository-adapter-already-set');this['_adapter']=_0x3b576c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x861032=ii,threadId:_0x4be39d=_0x4df4d5(),comments:_0x4ac498=[],unlinkedAt:_0x2018b1=null,resolvedAt:_0x177bd9=null,resolvedBy:_0x9ab9b6=null,target:_0x52d6ce=null,context:_0x23fc6e=null,attributes:_0x3dde2b={},isResolvable:_0x23fa65=!0x0,isSubmitted:_0x1fcdc3=!0x1,isFromAdapter:_0xced6d9=!0x1}={}){return this['fire'](ai('addCommentThread',_0x861032),{'channelId':_0x861032,'threadId':_0x4be39d,'comments':_0x4ac498,'unlinkedAt':_0x2018b1,'resolvedAt':_0x177bd9,'resolvedBy':_0x9ab9b6,'target':_0x52d6ce,'context':_0x23fc6e,'attributes':_0x3dde2b,'isFromAdapter':_0xced6d9,'isResolvable':_0x23fa65,'isSubmitted':_0x1fcdc3}),this['getCommentThread'](_0x4be39d);}['openNewCommentThread']({channelId:_0x3b67d3=ii,threadId:_0x35bd0f=_0x4df4d5(),target:_0x116124,context:_0x24054c=null,isResolvable:_0x33b3f8=!0x0}){if(this['_readOnlyChannels']['has'](_0x3b67d3)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x116124)throw new _0x193b01('commentsrepository-missing-target');const _0xe47bd4=this['addCommentThread']({'channelId':_0x3b67d3,'threadId':_0x35bd0f,'target':_0x116124,'context':_0x24054c,'isResolvable':_0x33b3f8});if(!_0xe47bd4)return null;const _0xe9fcf3=this['_threadToController']['get'](_0xe47bd4),_0xa82114=_0xe9fcf3['view']['commentThreadInputView']['commentInputView'],_0x1e5432=this['context']['plugins']['get'](ti),_0xa65926=_0x1e5432['getByInnerView'](_0xe9fcf3['view']);return _0x1e5432['activate'](_0xa65926),_0xa82114['once']('editorReady',()=>_0xa82114['focus']()),_0xe47bd4;}['hasCommentThread'](_0x591413){if('string'!=typeof _0x591413)throw new _0x193b01('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x591413);}['updateCommentThread']({channelId:_0x1a3dfe=ii,threadId:_0x1d7851,context:_0x871149,unlinkedAt:_0x48915f,attributes:_0x49d54d,isFromAdapter:_0x34b12c=!0x1}){return this['fire'](ai('updateCommentThread',_0x1a3dfe),{'channelId':_0x1a3dfe,'threadId':_0x1d7851,'context':_0x871149,'unlinkedAt':_0x48915f,'attributes':_0x49d54d,'isFromAdapter':_0x34b12c}),this['getCommentThread'](_0x1d7851);}['getCommentThread'](_0x496c9b){if('string'!=typeof _0x496c9b)throw new _0x193b01('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x496c9b);}['fetchCommentThread']({channelId:_0x2af33c,threadId:_0x479078}={}){const _0x21a720=this['getCommentThread'](_0x479078);if(_0x21a720)return Promise['resolve'](_0x21a720);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x193b01('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2af33c,'threadId':_0x479078})['then'](_0x58bca1=>this['hasCommentThread'](_0x479078)?this['getCommentThread'](_0x479078):_0x58bca1?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2af33c},_0x58bca1)):void 0x0)['catch'](_0x58ab7a=>{throw console['error'](_0x58ab7a),new _0x193b01('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x36d49,skipNotAttached:_0x3491cf=!0x1,skipEmpty:_0x132f30=!0x1,toJSON:_0x588f4d=!0x1}={}){const _0xc4f850=[];for(const _0x3009e9 of this['_threads']['values']())_0x36d49&&_0x3009e9['channelId']!==_0x36d49||_0x3491cf&&!_0x3009e9['isAttached']||_0x132f30&&0x0===_0x3009e9['length']||_0xc4f850['push'](_0x3009e9);return _0x588f4d?_0xc4f850['map'](_0x1327ad=>_0x1327ad['toJSON']()):_0xc4f850;}['getAnnotationForCommentThread'](_0x4e4a08){const _0x5f291a=this['_threadToController']['get'](_0x4e4a08);return _0x5f291a&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x5f291a['view'])||null;}['getCommentThreadForAnnotation'](_0x2e91da){const _0xdd4553=this['_viewToController']['get'](_0x2e91da['innerView']);return _0xdd4553?_0xdd4553['model']:null;}['setActiveCommentThread'](_0x54595e){const _0x5f422c=this['context']['plugins']['get'](ti);if(!_0x54595e)return void(this['activeCommentThread']&&_0x5f422c['deactivateAll']());const _0x22c1d5=this['getCommentThread'](_0x54595e);if(!_0x22c1d5)throw new _0x193b01('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x54595e});if(!this['_threadToController']['has'](_0x22c1d5))throw new _0x193b01('commentsrepository-active-not-attached',null,{'threadId':_0x54595e});const _0x351331=_0x5f422c['getByInnerView'](this['_threadToController']['get'](_0x22c1d5)['view']);_0x5f422c['activate'](_0x351331);}['switchReadOnly'](_0x1bffe1,_0x148d29){_0x1bffe1?this['_readOnlyChannels']['add'](_0x148d29):this['_readOnlyChannels']['delete'](_0x148d29),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x37afe9){return this['_readOnlyChannels']['has'](_0x37afe9)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xa90048,_0x420f82){return new bt(_0xa90048,_0x420f82);}['setPermissions'](_0x1c59f2,_0x45bfd9=ii){this['_permissions']['set'](_0x45bfd9,_0x1c59f2),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xfb5c3=ii){return this['_permissions']['has'](_0xfb5c3)?this['_permissions']['get'](_0xfb5c3):ei;}['_addCommentThread']({channelId:_0x37739a,threadId:_0x220878,comments:_0x1ddd8a,unlinkedAt:_0x23389e,resolvedAt:_0x2c942d,resolvedBy:_0x423f57,target:_0x363f51,context:_0x35f031,attributes:_0x1e18db,isFromAdapter:_0x12e943,isResolvable:_0x1550f8,isSubmitted:_0x4b0f07}){if('string'!=typeof _0x220878)throw new _0x193b01('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x220878});if(this['hasCommentThread'](_0x220878))throw new _0x193b01('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x220878});const _0x1c50a2=new ri(this,{'channelId':_0x37739a,'id':_0x220878,'context':_0x35f031,'attributes':_0x1e18db,'unlinkedAt':_0x23389e,'resolvedAt':_0x2c942d,'resolvedBy':_0x423f57?this['context']['plugins']['get'](_0x515d18)['getUser'](_0x423f57):null,'isResolvable':_0x1550f8,'isSubmitted':_0x4b0f07||_0x12e943});this['_threads']['set'](_0x220878,_0x1c50a2);for(const _0x56b638 of _0x1ddd8a)_0x1c50a2['_add'](this['_createNewComment']({'threadId':_0x220878,..._0x56b638}));return _0x363f51&&_0x1c50a2['attachTo'](_0x363f51),_0x12e943||!_0x1c50a2['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x37739a,'threadId':_0x220878});}['_submitCommentThread']({channelId:_0x1b03f0,threadId:_0x207874}){if(!this['hasCommentThread'](_0x207874))throw new _0x193b01('commentsrepository-missing-comment-thread',this);const _0x1087d4=this['getCommentThread'](_0x207874);if(_0x1087d4['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x372736,comments:_0x126ee1,resolvedAt:_0x5ef225,resolvedBy:_0x35a950,context:_0x9f95cf,attributes:_0x44b62b}=_0x1087d4,_0x351317=this['context']['plugins']['get']('PendingActions'),_0x312dd1=_0x351317['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1b03f0,'threadId':_0x372736,'comments':_0x126ee1['map'](_0x2d7650=>_0x2d7650['toJSON']()),'resolvedAt':_0x5ef225,'resolvedBy':_0x35a950?_0x35a950['id']:_0x35a950,'context':_0x9f95cf,'attributes':_0x44b62b})['then'](({comments:_0x246aac})=>{_0x351317['remove'](_0x312dd1);for(const _0x21e243 of _0x246aac)this['_updateComment']({'channelId':_0x1b03f0,'threadId':_0x207874,'commentId':_0x21e243['commentId'],'createdAt':_0x21e243['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x47e428=>{throw console['error'](_0x47e428),new _0x193b01('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2988d6,target:_0xb18358}){const _0x5bea8b=this['getCommentThread'](_0x2988d6);if(!_0x5bea8b)throw new _0x193b01('commentsrepository-attach-missing-comment-thread',this);const _0x28fd9c=this['context']['plugins']['get']('PendingActions'),_0x32db3f=this['context']['plugins']['get'](ti),_0x909a4b=this['_createCommentThreadView'](_0x5bea8b),_0x2dcaee=new bt(_0x5bea8b,_0x909a4b);let _0x2e06e4=null;_0x909a4b['on']('change:isDirty',(_0x2b832b,_0xfe6cd3,_0xa07d89)=>{_0xa07d89?_0x2e06e4=_0x28fd9c['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2e06e4&&(_0x28fd9c['remove'](_0x2e06e4),_0x2e06e4=null);}),this['_threadToController']['set'](_0x5bea8b,_0x2dcaee),this['_viewToController']['set'](_0x909a4b,_0x2dcaee);const _0x2fd0aa=new qt(this['context']['locale'],_0x909a4b);_0x2fd0aa['bind']('length')['to'](_0x909a4b),_0x2fd0aa['bind']('isDirty')['to'](_0x909a4b,'isDirty',_0x909a4b,'length',(_0x3705d1,_0x2a194c)=>_0x3705d1||!_0x2a194c),_0x2fd0aa['bind']('isActive')['to'](_0x909a4b),_0x2fd0aa['type']='comment';const _0xa8a97e=new $t({'view':_0x2fd0aa,'target':_0xb18358,'type':'comment','isVisible':!_0x5bea8b['archivedAt']&&!!('function'==typeof _0xb18358?_0xb18358():_0xb18358)});return _0x909a4b['on']('escape',()=>{_0xa8a97e['fire']('escape');}),this['_bindAnnotationToEditors'](_0x909a4b,_0xa8a97e),_0x32db3f['add'](_0xa8a97e),_0xa8a97e;}['_bindAnnotationToEditors'](_0x5d138f,_0x47c9ee){this['listenTo'](_0x5d138f,'editorReady',(_0x2ff9c8,_0x489b1b)=>{const _0x1685e0=_0x489b1b['ui']['view']['body']['bodyCollectionContainer'];_0x47c9ee['focusableElements']['add'](_0x1685e0),this['context']instanceof _0xf78eee&&this['context']['ui']['focusTracker']['add'](_0x1685e0);},{'priority':'highest'}),this['listenTo'](_0x5d138f,'editorDestroyed',(_0x2eacaf,_0x2f10ac)=>{const _0x403158=_0x2f10ac['ui']['view']['body']['bodyCollectionContainer'];_0x47c9ee['focusableElements']['has'](_0x403158)&&_0x47c9ee['focusableElements']['remove'](_0x403158),this['context']instanceof _0xf78eee&&this['context']['ui']['focusTracker']['remove'](_0x403158);});}['_unbindEditors'](_0x3bdce0){this['stopListening'](_0x3bdce0,'editorReady'),this['stopListening'](_0x3bdce0,'editorDestroyed');}['_createCommentThreadView'](_0x1394bc){const _0x2b72bc=this['context']['plugins']['get'](_0x515d18),{config:_0x4705f8,locale:_0x4c3c32}=this['context'],_0x450f54=_0x2c9b04(_0x4705f8['get']('locale'),_0x4c3c32);return new(0x0,(_0x4705f8['get']('comments'))['CommentThreadView'])(_0x4c3c32,_0x1394bc,_0x2b72bc['me'],{'editorConfig':{..._0x4705f8['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4705f8['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4705f8['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4705f8['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4705f8['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x450f54,'CommentView':_0x4705f8['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4df8af,channelId:_0x45b147,resolvedAt:_0x3d4829,resolvedBy:_0x50256f,isFromAdapter:_0x2fda68}){if(!this['hasCommentThread'](_0x4df8af))throw new _0x193b01('commentsrepository-missing-comment-thread',null,{'threadId':_0x4df8af});const _0x17f2e0=this['getCommentThread'](_0x4df8af);if(_0x17f2e0['isResolved'])throw new _0x193b01('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4df8af});const _0xcad027=this['context']['plugins']['get'](_0x515d18);if(_0x17f2e0['resolvedBy']=_0xcad027['getUser'](_0x50256f),_0x17f2e0['resolvedAt']=_0x3d4829,_0x2fda68||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2ec868=this['context']['plugins']['get']('PendingActions'),_0x2a0815=_0x2ec868['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x45b147,'threadId':_0x4df8af})['then'](({resolvedAt:_0x58dc97,resolvedBy:_0x8f0f64})=>{_0x2ec868['remove'](_0x2a0815),_0x17f2e0['resolvedBy']['id']!==_0x8f0f64&&(_0x17f2e0['resolvedBy']=_0xcad027['getUser'](_0x8f0f64)),_0x17f2e0['resolvedAt']=_0x58dc97;})['catch'](_0x16d7f9=>{throw console['error'](_0x16d7f9),new _0x193b01('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0xd44f25,channelId:_0x24bd85,isFromAdapter:_0x31aa67}){if(!this['hasCommentThread'](_0xd44f25))throw new _0x193b01('commentsrepository-missing-comment-thread',null,{'threadId':_0xd44f25});const _0x17ee95=this['getCommentThread'](_0xd44f25);if(!_0x17ee95['isResolved'])throw new _0x193b01('commentsrepository-reopen-comment-thread',null,{'threadId':_0xd44f25});if(_0x17ee95['resolvedBy']=null,_0x17ee95['resolvedAt']=null,_0x31aa67||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1ec515=this['context']['plugins']['get']('PendingActions'),_0x17beeb=_0x1ec515['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x24bd85,'threadId':_0xd44f25})['then'](()=>_0x1ec515['remove'](_0x17beeb))['catch'](_0x8070ba=>{throw console['error'](_0x8070ba),new _0x193b01('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x50b2a6,isFromAdapter:_0x2aa6b3}){const _0x4652fa=this['getCommentThread'](_0x50b2a6);if(!_0x4652fa)throw new _0x193b01('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x50b2a6),this['_threads']['delete'](_0x50b2a6),!_0x4652fa['isSubmitted']||_0x2aa6b3||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x343d84=this['context']['plugins']['get']('PendingActions'),{channelId:_0x571216}=_0x4652fa,_0x89e0ca=_0x343d84['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x571216,'threadId':_0x50b2a6})['then'](()=>_0x343d84['remove'](_0x89e0ca))['catch'](_0x19ed81=>{throw console['error'](_0x19ed81),new _0x193b01('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x55855b,unlinkedAt:_0x516bde,context:_0x3c3baa,attributes:_0x488d94,isFromAdapter:_0x5cea88}){if('string'!=typeof _0x55855b)throw new _0x193b01('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x55855b});if(!this['hasCommentThread'](_0x55855b))throw new _0x193b01('commentsrepository-missing-comment-thread',null,{'threadId':_0x55855b});const _0x3c85ee=this['getCommentThread'](_0x55855b);let _0x27656f=!0x1;if(void 0x0!==_0x3c3baa&&_0x3c85ee['context']!==_0x3c3baa&&(_0x3c85ee['context']=_0x3c3baa,_0x27656f=!0x0),void 0x0!==_0x516bde&&_0x3c85ee['unlinkedAt']!==_0x516bde&&(_0x3c85ee['unlinkedAt']=_0x516bde,_0x27656f=!0x0),_0x488d94&&!_0x2bd8c2(_0x488d94,_0x3c85ee['attributes'])&&(_0x3c85ee['attributes']=_0x488d94,_0x27656f=!0x0),!_0x27656f)return Promise['resolve']();if(!_0x3c85ee['isSubmitted']||_0x5cea88||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3d9e22=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ae66c}=_0x3c85ee,_0xc0f243=_0x3d9e22['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1ae66c,'threadId':_0x55855b,'context':_0x3c3baa,'unlinkedAt':_0x516bde,'attributes':_0x488d94})['then'](()=>_0x3d9e22['remove'](_0xc0f243))['catch'](_0x4758f6=>{throw console['error'](_0x4758f6),new _0x193b01('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2cb74c){const _0x59d025=this['context']['plugins']['get'](ti),_0x20bdd0=this['getCommentThread'](_0x2cb74c);if(_0x20bdd0['_isAttached']=!0x1,this['_threadToController']['has'](_0x20bdd0)){const _0x51b773=this['_threadToController']['get'](_0x20bdd0),_0x1b9254=_0x51b773['view'],_0x3399eb=_0x59d025['getByInnerView'](_0x1b9254);this['_threadToController']['delete'](_0x20bdd0),this['_viewToController']['delete'](_0x1b9254),_0x3399eb&&_0x59d025['remove'](_0x3399eb),_0x51b773['destroy'](),_0x1b9254['destroy']()['then'](()=>{this['_unbindEditors'](_0x1b9254);});}}['_updateActiveAnnotation']({threadId:_0x1131b8,resolvedAt:_0x522220,unlinkedAt:_0x5005a4}){const _0x221cc0=!!_0x522220,_0xb187dc=this['context']['plugins']['get'](ti),_0x1c012a=this['getCommentThread'](_0x1131b8);if(this['_threadToController']['has'](_0x1c012a)){const _0x5a5f91=this['_threadToController']['get'](_0x1c012a)['view'],_0x4f92eb=_0xb187dc['getByInnerView'](_0x5a5f91);_0x4f92eb&&(_0x221cc0&&_0xb187dc['_removeActiveAnnotation'](_0x4f92eb),_0x5005a4?_0x4f92eb['isVisible']=!0x1:_0x4f92eb['refreshVisibility']());}}['_getExternalAuthor'](_0x3d95ed){const _0x88dd66=this['context']['plugins']['get'](_0x515d18),_0x363e31=_0x17df23('external:'+_0x3d95ed),_0x3bdf2a=_0x88dd66['getUser'](_0x363e31);return _0x3bdf2a||_0x88dd66['addUser']({'id':_0x363e31,'name':_0x3d95ed});}['_createNewComment']({threadId:_0x12991f,commentId:_0x251dab=_0x4df4d5(),content:_0x1cbb1f,authorId:_0x1f2791,createdAt:_0x467af2,attributes:_0x4748ca}){if('string'!=typeof _0x251dab)throw new _0x193b01('commentsrepository-invalid-commentid');if('string'!=typeof _0x1f2791)throw new _0x193b01('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1cbb1f||!_0x1cbb1f['trim']())throw new _0x193b01('commentsrepository-invalid-comment-content');const _0x5c7508=this['context']['plugins']['get'](_0x515d18)['getUser'](_0x1f2791);if(!_0x5c7508)throw new _0x193b01('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1f2791});let _0x359b2a=null,_0x80900b=_0x467af2;return _0x4748ca?.['@external']&&(_0x359b2a=this['_getExternalAuthor'](_0x4748ca['@external']['authorName']),_0x80900b=new Date(_0x4748ca['@external']['createdAt'])),new hi(this,{'threadId':_0x12991f,'id':_0x251dab,'author':_0x359b2a||_0x5c7508,'creator':_0x5c7508,'content':_0x1cbb1f,'createdAt':_0x467af2,'authoredAt':_0x80900b,'attributes':_0x4748ca});}['_addComment'](_0x276094){let {threadId:_0x3d472f,content:_0x41ee9d,attributes:_0x7933c2,isFromAdapter:_0x21b63d}=_0x276094;const _0x31ddce=this['getCommentThread'](_0x276094['threadId']);if(!_0x31ddce)throw new _0x193b01('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xe47e1c=this['_createNewComment'](_0x276094),{id:_0xc5d7de}=_0xe47e1c;if(_0x31ddce['_add'](_0xe47e1c),_0x21b63d||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x31ddce['isSubmitted'])return Promise['resolve']();const _0x3f60f6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x34e366}=_0x31ddce,_0x270302=_0x3f60f6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x7933c2||(_0x7933c2={}),this['adapter']['addComment']({'channelId':_0x34e366,'threadId':_0x3d472f,'commentId':_0xc5d7de,'content':_0x41ee9d,'attributes':_0x7933c2})['then'](_0x1a6cd5=>{_0x3f60f6['remove'](_0x270302),_0x1a6cd5&&this['_updateComment']({'channelId':_0x34e366,'threadId':_0x3d472f,'commentId':_0xc5d7de,'createdAt':_0x1a6cd5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x55e6a7=>{throw console['error'](_0x55e6a7),new _0x193b01('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x338db4,commentId:_0x564c8a,content:_0x3ca62a,createdAt:_0x4ca3a7,attributes:_0x4e722b,isFromAdapter:_0xd0d718}){if(void 0x0!==_0x3ca62a&&('string'!=typeof _0x3ca62a||!_0x3ca62a['trim']()['length']))throw new _0x193b01('commentsrepository-update-comment-invalid-content');const _0x42427b=this['getCommentThread'](_0x338db4),_0x29589d=_0x42427b['getComment'](_0x564c8a);if(!_0x29589d)throw new _0x193b01('commentsrepository-update-missing-comment',this);let _0x4d9041=!0x1;if(_0x3ca62a&&_0x3ca62a!==_0x29589d['content']&&(_0x29589d['isEditable']||_0xd0d718)&&(_0x29589d['content']=_0x3ca62a,_0x4d9041=!0x0),_0x4ca3a7&&_0x4ca3a7!==_0x29589d['createdAt']&&(_0x29589d['createdAt']=_0x4ca3a7,_0x29589d['isExternal']||(_0x29589d['authoredAt']=_0x4ca3a7),_0x4d9041=!0x0),_0x4e722b&&!_0x2bd8c2(_0x4e722b,_0x29589d['attributes'])&&(_0x29589d['attributes']=_0x4e722b,_0x4d9041=!0x0),!_0x4d9041)return Promise['resolve']();if(_0x42427b['fire']('commentUpdated'),_0xd0d718||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x39d94a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x22cd1c}=this['getCommentThread'](_0x29589d['threadId']),_0x181425=_0x39d94a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x22cd1c,'threadId':_0x338db4,'commentId':_0x564c8a,'content':_0x3ca62a,'attributes':_0x4e722b})['then'](()=>_0x39d94a['remove'](_0x181425))['catch'](_0x5751d7=>{throw console['error'](_0x5751d7),new _0x193b01('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x57d908,commentId:_0x7087a7,isFromAdapter:_0x49acec}){const _0x2b2df9=this['getCommentThread'](_0x57d908),_0x439efe=_0x2b2df9['getComment'](_0x7087a7);if(!_0x439efe)throw new _0x193b01('commentsrepository-remove-missing-comment',this);if(_0x2b2df9['_remove'](_0x439efe),_0x49acec||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x457c22=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3381ae}=_0x2b2df9,_0x4d595a=_0x457c22['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3381ae,'threadId':_0x57d908,'commentId':_0x7087a7})['then'](()=>_0x457c22['remove'](_0x4d595a))['catch'](_0x16776b=>{throw console['error'](_0x16776b),new _0x193b01('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0xfe6e6e,_0x20c403){super();const _0x268b4c=_0x20c403['isResolvable'];this['channelId']=_0x20c403['channelId'],this['id']=_0x20c403['id'],this['comments']=new _0x38bfe3(),this['_repository']=_0xfe6e6e,this['_isAttached']=!0x1,this['_isSubmitted']=_0x20c403['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0xfe6e6e,'_permissions',_0xfe6e6e,'_readOnlyChannels',()=>_0xfe6e6e['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0xfe6e6e,'_permissions',()=>_0xfe6e6e['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0xfe6e6e,'_permissions',()=>{const _0xf7a76c=_0xfe6e6e['getPermissions'](this['channelId']);return _0xf7a76c['write']||_0xf7a76c['admin'];}),this['bind']('isResolvable')['to'](_0xfe6e6e,'_permissions',()=>_0x268b4c&&_0xfe6e6e['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x20c403['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1dd9d4,_0x575075)=>_0x1dd9d4?_0x575075?_0x1dd9d4<_0x575075?_0x1dd9d4:_0x575075:_0x1dd9d4:_0x575075),this['set']('unlinkedAt',_0x20c403['unlinkedAt']||null),this['set']('resolvedAt',_0x20c403['resolvedAt']||null),this['set']('resolvedBy',_0x20c403['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x22deb4=>!!_0x22deb4),this['set']('attributes',_0x20c403['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x3b00bf,_0x5b89c8)=>_0x3b00bf+_0x5b89c8['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x474a71,id:_0x33cd1e}=this;this['_repository']['fire'](ai('submitCommentThread',_0x474a71),{'channelId':_0x474a71,'threadId':_0x33cd1e});}['setUnlinkedAt'](_0x33d7e8){this['_update']({'unlinkedAt':_0x33d7e8});}['resolve']({resolvedAt:_0x51ed27=new Date(),resolvedBy:_0x261c00='',isFromAdapter:_0x7ef7a7=!0x1}={}){const _0x5513a8=this['_repository']['context']['plugins']['get'](_0x515d18)['me'],{channelId:_0x4722a3,id:_0x322839}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x4722a3),{'channelId':_0x4722a3,'threadId':_0x322839,'resolvedAt':_0x51ed27,'resolvedBy':_0x261c00||_0x5513a8['id'],'isFromAdapter':_0x7ef7a7});}['reopen']({isFromAdapter:_0x20ac77=!0x1}={}){const {channelId:_0x1e229c,id:_0x55ce9f}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x1e229c),{'channelId':_0x1e229c,'threadId':_0x55ce9f,'isFromAdapter':_0x20ac77});}['setContext'](_0x4d7b5f){this['context']||this['_update']({'context':_0x4d7b5f});}['setAttribute'](_0x33e838,_0x3688e5){const _0x9de01c=_0x5cdeb2(this['attributes']);_0x450020(_0x9de01c,_0x33e838,_0x3688e5),this['_update']({'attributes':_0x9de01c});}['removeAttribute'](_0x501a7d){const _0x3bba98=_0x5cdeb2(this['attributes']);_0x15707c(_0x3bba98,_0x501a7d),this['_update']({'attributes':_0x3bba98});}['remove']({isFromAdapter:_0x40f3f8=!0x1}={}){const {channelId:_0x1795ca,id:_0x365cb7}=this;this['_repository']['fire'](ai('removeCommentThread',_0x1795ca),{'channelId':_0x1795ca,'threadId':_0x365cb7,'isFromAdapter':_0x40f3f8});}['attachTo'](_0x4e36b0){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x4e36b0});}['addComment'](_0x6e028b){const {channelId:_0x34a5e9,id:_0x49e78a}=this;this['_repository']['fire'](ai('addComment',_0x34a5e9,_0x49e78a),Object['assign']({'channelId':_0x34a5e9,'threadId':_0x49e78a},_0x6e028b));}['getComment'](_0x292b7f){if('string'!=typeof _0x292b7f)throw new _0x193b01('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x292b7f});return this['comments']['get'](_0x292b7f);}['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'](_0x233813=>_0x233813['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4ab28d){return this['listenTo'](_0x4ab28d,'change:authoredAt',()=>{const _0x22f83c=this['_findOptimalIndex'](_0x4ab28d),_0x479581=this['comments'];_0x22f83c-0x1!=_0x479581['getIndex'](_0x4ab28d)&&_0x22f83c+0x1!=_0x479581['getIndex'](_0x4ab28d)&&(this['_remove'](_0x4ab28d),this['_add'](_0x4ab28d));}),this['comments']['add'](_0x4ab28d,this['_findOptimalIndex'](_0x4ab28d));}['_update'](_0x19ab61){const {channelId:_0x358889,id:_0x520f9c}=this;this['_repository']['fire'](ai('updateCommentThread',_0x358889),{..._0x19ab61,'channelId':_0x358889,'threadId':_0x520f9c});}['_remove'](_0x374145){return this['stopListening'](_0x374145),_0x374145['destroy'](),this['comments']['remove'](_0x374145);}['_findOptimalIndex'](_0x32de86){const _0x4dcf91=this['comments']['find'](_0x26b52f=>new Date(_0x26b52f['authoredAt'])['getTime']()>new Date(_0x32de86['authoredAt'])['getTime']());return _0x4dcf91?this['comments']['getIndex'](_0x4dcf91):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x38cc45,_0x1da0ea){super();const _0x59cd51=_0x38cc45['context']['plugins']['get'](_0x515d18)['me'],_0x2d669c=_0x38cc45['getCommentThread'](_0x1da0ea['threadId']),_0x45a67a=0x0===_0x2d669c['comments']['length'],_0x26824c=_0x59cd51===_0x1da0ea['author'];this['id']=_0x1da0ea['id'],this['threadId']=_0x1da0ea['threadId'],this['author']=_0x1da0ea['author'],this['creator']=_0x1da0ea['creator'],this['set']('content',_0x1da0ea['content']),this['createdAt']=_0x1da0ea['createdAt']||new Date(),this['set']('authoredAt',_0x1da0ea['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2d669c,'resolvedAt'),this['set']('attributes',_0x1da0ea['attributes']||{}),this['bind']('isEditable')['to'](_0x38cc45,'_permissions',()=>{const _0xf7f965=_0x38cc45['getPermissions'](_0x2d669c['channelId'])['write'],_0x4bad32=_0x38cc45['getPermissions'](_0x2d669c['channelId'])['modifyAll'];return _0x26824c&&_0xf7f965||!_0x26824c&&_0x4bad32;}),this['bind']('isRemovable')['to'](_0x2d669c,'isRemovable',_0x38cc45,'_permissions',_0x3f396d=>{const _0x11689b=_0x38cc45['getPermissions'](_0x2d669c['channelId'])['write'],_0x5982aa=_0x38cc45['getPermissions'](_0x2d669c['channelId'])['modifyAll'];return _0x26824c&&_0x11689b||_0x3f396d&&_0x45a67a||!_0x26824c&&_0x5982aa&&!_0x45a67a;}),this['bind']('isReadOnly')['to'](_0x2d669c,'isReadOnly'),this['_repository']=_0x38cc45;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x5c4859){const _0x214c28=document['createElement']('div');return _0x214c28['innerHTML']=_0x5c4859,_0x214c28['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3bb0ed){const {threadId:_0x35d0e5,id:_0x5f0e07}=this;if(!this['_repository']['hasCommentThread'](_0x35d0e5))throw new _0x193b01('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x1aaded}=this['_repository']['getCommentThread'](_0x35d0e5);this['_repository']['fire'](ai('updateComment',_0x1aaded,_0x35d0e5),{'channelId':_0x1aaded,'threadId':_0x35d0e5,'commentId':_0x5f0e07,..._0x3bb0ed});}['setAttribute'](_0x17c964,_0x4db463){const _0x5f51f1=_0x5cdeb2(this['attributes']);_0x450020(_0x5f51f1,_0x17c964,_0x4db463),this['update']({'attributes':_0x5f51f1});}['removeAttribute'](_0x7d1316){const _0x4e8397=_0x5cdeb2(this['attributes']);_0x15707c(_0x4e8397,_0x7d1316),this['update']({'attributes':_0x4e8397});}['remove'](_0x15f35d={}){if(!_0x15f35d['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x36f529,id:_0x2fc327}=this;if(!this['_repository']['hasCommentThread'](_0x36f529))throw new _0x193b01('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5a339b}=this['_repository']['getCommentThread'](_0x36f529);this['_repository']['fire'](ai('removeComment',_0x5a339b,_0x36f529),{'channelId':_0x5a339b,'threadId':_0x36f529,'commentId':_0x2fc327,..._0x15f35d});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x33e6f0,..._0x3684cb){for(const _0xf0fcf7 of _0x3684cb)void 0x0!==_0xf0fcf7&&(_0x33e6f0+=':'+String(_0xf0fcf7));return _0x33e6f0;}var ci=class extends _0x334e7f{constructor(_0x314d8f){super(_0x314d8f),this['set']('hasContent',!0x1);}['refresh'](){const _0x4984ec=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x487f14 of _0x4984ec['getRanges']())if(this['_hasContent'](_0x487f14))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x2a9002=_0x4df4d5(),ranges:_0x5b7c66,comment:_0x121367}={}){const _0x4fa8b1=this['editor']['model'],_0x4f59e9=_0x5b7c66??Array['from'](_0x4fa8b1['document']['selection']['getRanges']()),_0x4fa5d9=[];for(const _0x1a5caf of _0x4f59e9)this['_hasContent'](_0x1a5caf)&&_0x4fa5d9['push'](this['_trimToContent'](_0x1a5caf));if(!_0x4fa5d9['length'])throw new _0x193b01('addcommentthreadcommand-incorrect-ranges',null);_0x121367&&this['_createCommentThread'](_0x2a9002,_0x121367),this['_createMarkersFromRanges'](_0x2a9002,_0x4fa5d9,!!_0x121367);}['_createMarkersFromRanges'](_0x7d2eb7,_0xa3dec8,_0xd38184){this['editor']['model']['change'](_0x9cff92=>{for(const _0x1e123c of _0xa3dec8){const _0x44c10b='comment:'+_0x7d2eb7+':'+_0x4df4d5()['substr'](0x1,0x5);_0x9cff92['addMarker'](_0x44c10b,{'range':_0x1e123c,'usingOperation':_0xd38184,'affectsData':_0xd38184});}});}['_createCommentThread'](_0x336f66,_0x56987f){const _0x3413de=this['editor']['plugins']['get']('CommentsRepository'),_0x22e403=this['editor']['config']['get']('collaboration.channelId'),_0x6cf156=this['editor']['plugins']['get']('Users')['me'];if(!_0x6cf156)throw new _0x193b01('addcommentthreadcommand-user-not-found',null);_0x3413de['addCommentThread']({'threadId':_0x336f66,'channelId':_0x22e403,'comments':[{'authorId':_0x6cf156['id'],'content':_0x56987f,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0xb21e71){for(const _0x33da2f of _0xb21e71['getItems']())if(this['_itemIsContent'](_0x33da2f))return!0x0;return!0x1;}['_itemIsContent'](_0x51f915){return _0x51f915['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x51f915)&&!_0x51f915['is']('element','tableCell');}['_trimToContent'](_0x3e8329){const _0x2faccf=_0x576378=>!this['_itemIsContent'](_0x576378['item']),_0x11d56a=_0x3e8329['start']['getLastMatchingPosition'](_0x2faccf),_0x1b2d86=_0x3e8329['end']['getLastMatchingPosition'](_0x2faccf,{'direction':'backward'});return this['editor']['model']['createRange'](_0x11d56a,_0x1b2d86);}},di=class extends _0x536687{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2697b6){super(_0x2697b6),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x96a350=this['editor'],_0x5d34a7=_0x96a350['model']['document']['selection'],_0x3d0231=_0x8a3c09(()=>this['refreshSelectedViews'](),0xa);_0x5d34a7['on']('change:range',(_0x33e834,_0x336adb)=>{_0x336adb['directChange']&&(_0x3d0231['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x96a350['editing']['view']['document'],'change:isFocused',(_0xcc0495,_0x2cd953,_0x1a006c)=>{_0x1a006c&&_0x3d0231();}),this['listenTo'](_0x96a350['ui']['focusTracker'],'change:isFocused',(_0x215414,_0x123f10,_0x459a93)=>{_0x459a93||this['fire']('blur',{'isAnnotationTracked':_0x674aa6=>this['_editorAnnotationsData']['has'](_0x674aa6['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3111df){if(this['_editorAnnotations']['has'](_0x3111df['view']))return;this['_editorAnnotations']['add'](_0x3111df['view']),this['editor']['ui']['focusTracker']['add'](_0x3111df['view']['element']);const _0x1d4493=this['editor']['plugins']['get'](ti);this['listenTo'](_0x1d4493['collection'],'remove',(_0x4b979d,_0x18b0c0)=>{this['editor']['ui']['focusTracker']['remove'](_0x18b0c0['view']['element']),this['_editorAnnotations']['delete'](_0x18b0c0['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x382288){if('function'!=typeof _0x382288)throw new _0x193b01('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x382288);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x5615ea,annotations:_0x324f2f}){const _0x1e3d73=[],_0x668f59=this['editor']['model']['document']['selection'],_0x3a7d1a=Array['from'](_0x668f59['getRanges']());for(const [_0x20ac6c,_0x3b4760]of this['_editorAnnotationsData']){const _0x1ab5ec=_0x32994a(_0x3b4760),_0x31d441=_0x324f2f['getByInnerView'](_0x20ac6c);_0x1ab5ec&&_0x31d441&&_0x1e3d73['push']({'annotation':_0x31d441,'range':_0x1ab5ec});}function _0x32994a(_0x30133c){for(const _0x5e587c of _0x30133c)for(const _0xa9a5ca of _0x3a7d1a)if(_0x5e587c['containsRange'](_0xa9a5ca,!_0x668f59['isCollapsed']))return _0x5e587c;return null;}return _0x1e3d73['sort']((_0x292849,_0x4c4abe)=>{const _0x3cbc31=_0x292849['range'],_0x52309e=_0x4c4abe['range'];if(!_0x3cbc31['isEqual'](_0x52309e)){if(_0x3cbc31['containsRange'](_0x52309e,!0x0))return 0x1;if(_0x52309e['containsRange'](_0x3cbc31,!0x0))return-0x1;}return _0x292849['annotation']==_0x5615ea?-0x1:_0x4c4abe['annotation']==_0x5615ea?0x1:0x0;})['map'](_0x4b8058=>_0x4b8058['annotation']);}get['_editorAnnotationsData'](){const _0x1453af=new Map();for(const _0x1b4ade of Array['from'](this['_dataCollectors']))for(const [_0x346d88,_0x3d85fc]of _0x1b4ade())_0x1453af['set'](_0x346d88,_0x3d85fc);return _0x1453af;}},li=class extends _0x536687{['afterInit'](){const _0x12f481=this['editor'];_0x12f481['plugins']['has']('RestrictedEditingModeEditing')&&_0x12f481['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x536687{constructor(_0x4560f1){super(_0x4560f1),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x5229bb=this['editor'],_0x293b22=_0x5229bb['commands']['get']('importWord'),_0x577d5a=_0x5229bb['plugins']['get'](_0x515d18);_0x293b22&&(_0x293b22['on']('execute',(_0x1c7029,[,_0x2303b6])=>{_0x2303b6['collaboration_features']={'comments':!0x0,'user_id':_0x577d5a['me']['id']};},{'priority':_0x2084bf['high']+0xa}),this['listenTo'](_0x293b22,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x8a466a,_0x3816f0){const {comment_threads:_0x514559}=_0x3816f0;_0x514559&&_0x514559['forEach'](({thread_id:_0x318080,comments:_0x76ade3,is_resolved:_0x506f9})=>{const _0x1ce093=new Date(),_0xa4e47d=_0x76ade3['map'](({author:_0x51e229,content:_0x208e73,created_at:_0xdeb7b3})=>({'content':_0x208e73,'authorId':this['editor']['plugins']['get'](_0x515d18)['me']['id'],'createdAt':_0x1ce093,'attributes':{'@external':{'authorName':_0x51e229,'createdAt':_0xdeb7b3?new Date(_0xdeb7b3):new Date(),'source':'importWord'}}})),_0x36dbcb=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x36dbcb,'threadId':_0x318080,'comments':_0xa4e47d,'resolvedAt':_0x506f9?_0x1ce093:null});});}},ui=class extends _0x536687{constructor(_0x2eb1e6){super(_0x2eb1e6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x5a6eef=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5a6eef,'contentInsertion',(_0x20be6b,_0x3ac6c2)=>this['_removeMarkersWithoutThreads'](_0x3ac6c2['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x35f0a0){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x35f0a0;const _0x3b4be5=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1c09ea of _0x35f0a0['keys']()){const [_0xd66ea6,_0x423fdc]=_0x1c09ea['split'](':');'comment'!=_0xd66ea6||_0x3b4be5['hasCommentThread'](_0x423fdc)||_0x35f0a0['delete'](_0x1c09ea);}return _0x35f0a0;}['_registerMarkerInClipboardPipeline'](){const _0xb26428=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2c0e47=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2c0e47&&_0xb26428['_registerMarkerToCopy']('comment',_0x2c0e47);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3fe277){switch(_0x3fe277){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0xe16df8){const _0x1e3ca1=_0xe16df8['split'](':');return{'group':_0x1e3ca1[0x0],'id':_0x1e3ca1[0x1],'part':_0x1e3ca1[0x2]};}var pi=class extends _0x536687{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4eca5e,_0x1f5df0)=>{if(!_0x1f5df0['options']['showCommentHighlights'])return null;if(_0x1f5df0['options']['ignoreResolvedComments']){const {id:_0x1c4529}=fi(_0x4eca5e['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1c4529)?.['isResolved']&&_0x4eca5e['item'])return _0x1f5df0['consumable']['consume'](_0x4eca5e['item'],'addMarker:'+_0x4eca5e['markerName']),_0x1f5df0['consumable']['consume'](_0x4eca5e['item'],'removeMarker:'+_0x4eca5e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1aa23a=>{_0x1aa23a['on']('addMarker:comment',(_0x939329,_0x2c2b7a,_0x672975)=>{if(!_0x672975['options']['showCommentHighlights'])return;const _0x5ecdec=_0x2c2b7a['item'];if(!_0x5ecdec)return;const _0xcd9f6=_0x672975['mapper']['toViewElement'](_0x5ecdec);this['editor']['model']['schema']['isObject'](_0x5ecdec)&&_0xcd9f6&&!_0xcd9f6['getCustomProperty']('widget')&&_0xcd9f6['is']('containerElement')&&Ct(_0xcd9f6,_0x672975['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1f7508,{writer:_0x1f1bec,options:_0x450a04})=>{if(!_0x450a04['showCommentHighlights'])return null;const _0xb563ca=_0x1f1bec['createContainerElement']('div'),_0xab2a70=_0x1f1bec['createEmptyElement']('hr');return _0x1f1bec['addClass']('ck-horizontal-line',_0xb563ca),_0x1f1bec['insert'](_0x1f1bec['createPositionAt'](_0xb563ca,0x0),_0xab2a70),_0xb563ca;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x784b10,{writer:_0x3d25ad,options:_0x59d455})=>{if(!_0x59d455['showCommentHighlights'])return null;const _0x6ae0f=_0x3d25ad['createContainerElement']('span'),_0x2fbab9=_0x3d25ad['createEmptyElement']('img');return _0x3d25ad['addClass']('image-inline',_0x6ae0f),_0x3d25ad['insert'](_0x3d25ad['createPositionAt'](_0x6ae0f,0x0),_0x2fbab9),_0x6ae0f;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xf105b2,{writer:_0x5d4bf1,options:_0x3ddf4a})=>{if(_0x3ddf4a['showCommentHighlights'])return _0x5d4bf1['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x45ea99,_0x3a9a35,_0x50287c)=>{_0x50287c['options']['showCommentHighlights']&&_0x45ea99['stop']();},{'priority':'high'});}},wi=class extends _0x536687{static get['requires'](){return[oi,di,_0x515d18,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1cabc7){super(_0x1cabc7),this['set']('isThreadsLoadingPaused',!0x0),_0x1cabc7['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x52da0b,_0x53a16a,_0x2c3bba,_0x5ed102)=>{const _0x21bb7c=_0x1cabc7['plugins']['get'](oi),_0x504686=_0x2c3bba?fi(_0x2c3bba)['id']:null;_0x1cabc7['model']['change'](()=>{if(_0x504686){const _0x2c8f2b=this['getAllMarkersForId'](_0x504686);for(const _0x3b4e0b of _0x2c8f2b)_0x1cabc7['editing']['reconvertMarker'](_0x3b4e0b);}if(_0x5ed102){const {id:_0x275ffa}=fi(_0x5ed102),_0x2bc90f=_0x21bb7c['getCommentThread'](_0x275ffa);if(_0x2bc90f&&_0x2bc90f['unlinkedAt'])return;if(_0x2bc90f&&!_0x2bc90f['isAttached'])return;const _0x8ccb20=this['getAllMarkersForId'](_0x275ffa);for(const _0x50a9b5 of _0x8ccb20)_0x1cabc7['editing']['reconvertMarker'](_0x50a9b5);}}),_0x504686&&this['scrollToThreadMarker'](_0x504686);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x513d55=this['editor'],_0x3a5847=_0x513d55['plugins']['get'](oi),_0x5a9091=_0x513d55['config']['get']('collaboration.channelId'),_0x4d222d=_0x3a5847['getCommentThreads']()['filter'](_0x3ecb03=>_0x3ecb03['channelId']!==_0x5a9091);_0x513d55['commands']['add']('addCommentThread',new ci(_0x513d55)),this['listenTo'](_0x513d55,'change:isReadOnly',(_0x5208ce,_0x567e94,_0x113719)=>{_0x3a5847['switchReadOnly'](_0x113719,_0x513d55['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3a5847,gi('addCommentThread',_0x5a9091),(_0x259a33,{threadId:_0x21a95e})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x21a95e)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x21a95e);}),this['listenTo'](_0x3a5847,gi('removeCommentThread',_0x5a9091),(_0x122385,{threadId:_0x7eb3c8})=>{_0x513d55['model']['enqueueChange']({'isUndoable':!0x1},_0x61e671=>{const _0x2b0770=this['getAllMarkersForId'](_0x7eb3c8);for(const _0x108399 of _0x2b0770)_0x61e671['removeMarker'](_0x108399);});}),this['listenTo'](_0x3a5847,gi('resolveCommentThread',_0x5a9091),(_0x56bed9,{threadId:_0x3402f8})=>{this['_reconvertMarkers'](_0x3402f8);const _0x517541=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x517541['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x3402f8)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3a5847,gi('reopenCommentThread',_0x5a9091),(_0x553da1,{threadId:_0x35fa2b})=>{this['_reconvertMarkers'](_0x35fa2b);},{'priority':'low'}),this['listenTo'](_0x3a5847,gi('addComment',_0x5a9091),(_0x1486a2,{threadId:_0x272479,isFromAdapter:_0x3872c9})=>{const _0x2f07bb=this['getAllMarkersForId'](_0x272479);!_0x3872c9&&0x0!=_0x2f07bb['length']&&_0x3a5847['hasCommentThread'](_0x272479)&&0x1===_0x3a5847['getCommentThread'](_0x272479)['length']&&_0x513d55['model']['enqueueChange']({'isUndoable':!0x1},_0xcfbedb=>{for(const _0x68a2b6 of _0x2f07bb)_0xcfbedb['updateMarker'](_0x68a2b6,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4d222d);}['afterInit'](){!async function(_0x453af9){const _0x5409ac='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x5bf55c=0x78e28,_0x2c9e37=window['Date']['now'](),_0x14c107=_0x453af9['editor'],_0x3e8050=new window['Promise'](_0x42a91d=>{_0x14c107['once']('ready',_0x42a91d);}),_0xa3aedc={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x22fbdc=_0x14c107['config']['get']('licenseKey');async function _0xc7ece8(){let _0x2f3dcb,_0x156f62=null,_0x49c82f=null;try{return'GPL'==_0x22fbdc?'NotAllowed':(_0x2f3dcb=_0x356cc6(),_0x2f3dcb?(_0x2f3dcb['usageEndpoint']&&(_0x49c82f=_0x43632a(_0x2f3dcb['usageEndpoint'],_0x2f3dcb['jti'])),await _0x39bbf()?_0x878757()?_0x23e360()?'Expired':_0x435152()?('evaluation'==_0x2f3dcb['licenseType']&&(_0x156f62=_0x187c1a('EvaluationLimit')),await _0x10b4c2()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x23e360(){const _0x4e2c46=['evaluation','trial']['includes'](_0x2f3dcb['licenseType'])?_0x2c9e37/0x3e8:0xe10*_0x5bf55c;return _0x2f3dcb['exp']<_0x4e2c46;}function _0x878757(){const _0x3c1cd4=_0x2f3dcb['features'];if(!_0x3c1cd4)return!0x1;if(_0x3c1cd4['includes']('*'))return!0x0;if(_0x3c1cd4['includes']('CMT'))return!0x0;if(_0x3c1cd4['includes']('TRILIUM')&&_0x123941())return!0x0;if(_0x3c1cd4['includes']('RCMT')){if(_0x163692())return!0x0;if(_0x35e416()||_0x474577())return!0x0;}return!0x1;}function _0x435152(){const _0x2dc304=_0x2f3dcb['licensedHosts'];if(!_0x2dc304||0x0==_0x2dc304['length'])return!0x0;const {hostname:_0x1c44d1}=new URL(window['location']['href']);if(_0x2dc304['includes'](_0x1c44d1))return!0x0;const _0x4081c6=_0x1c44d1['split']('.');return _0x2dc304['filter'](_0x1ba7ae=>_0x1ba7ae['includes']('*'))['map'](_0x40c87b=>_0x40c87b['split']('.'))['filter'](_0x845e9c=>_0x845e9c['length']<=_0x4081c6['length'])['map'](_0x409949=>Array(_0x4081c6['length']-_0x409949['length'])['fill']('*'===_0x409949[0x0]?'*':'')['concat'](_0x409949))['some'](_0x1052e3=>_0x4081c6['every']((_0x1fa64d,_0x3aa22e)=>_0x1052e3[_0x3aa22e]===_0x1fa64d||'*'===_0x1052e3[_0x3aa22e]));}function _0x10b4c2(){return _0x156f62&&_0x49c82f?new window['Promise']((_0x5b02f2,_0x537a2b)=>{_0x156f62['then'](_0x5b02f2,_0x537a2b),_0x49c82f['then'](_0x39f2f4=>{'Valid'!=_0x39f2f4&&_0x5b02f2(_0x39f2f4);},_0x537a2b);}):_0x156f62||_0x49c82f||'Valid';}}function _0x43632a(_0x5da618,_0x54927a){return new window['Promise'](_0x535101=>{if(_0x722c9d())return _0x535101('Valid');_0x4853b8(),_0x14c107['decorate']('_sendUsageRequest');let _0x4577ef=!0x1;const _0x63926=_0x4df4d5();function _0x56c019(_0x4480b1){return!!_0x4480b1&&('object'==typeof _0x4480b1||'function'==typeof _0x4480b1)&&'function'==typeof _0x4480b1['then']&&'function'==typeof _0x4480b1['catch'];}function _0x398cd5(_0x533a60){_0x1b0bf2(_0x533a60)['then'](_0x2ccb40=>_0x2ccb40&&'ok'==_0x2ccb40['status']?_0x98a9f9(_0x4fc254(_0x63926+_0x54927a))!=_0x2ccb40['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x28fcaa=>(_0x4b7e17(),_0x28fcaa),()=>{const _0x13e647=_0x3363b8();return null==_0x13e647?(_0x4b7e17(),'Valid'):_0x2c9e37-_0x13e647>0x240c8400?'UsageLimit':'Valid';})['then'](_0x535101)['catch'](()=>{_0x535101('UsageLimit');});const _0x6b07cf=0x36ee80;function _0x4b7e17(){const _0x2416bf='llct-'+_0x98a9f9(_0x4fc254(_0x5da618)),_0x1f45d7=_0x37b357(_0x98a9f9(window['Math']['ceil'](_0x2c9e37/_0x6b07cf)));window['localStorage']['setItem'](_0x2416bf,_0x1f45d7);}function _0x3363b8(){const _0x2bb6f5='llct-'+_0x98a9f9(_0x4fc254(_0x5da618)),_0x29c7d2=window['localStorage']['getItem'](_0x2bb6f5);return _0x29c7d2?window['parseInt'](_0x37b357(_0x29c7d2),0x10)*_0x6b07cf:null;}function _0x1b0bf2(_0x38436a){return new window['Promise']((_0xd9cc05,_0x4e32db)=>{_0x38436a['then'](_0xd9cc05,_0x4e32db),window['setTimeout'](_0x4e32db,0x1d4c0);});}}_0x14c107['on']('_sendUsageRequest',(_0xa9d72a,_0x51e567)=>{if(_0x51e567[0x0]!=_0x5da618)return _0x535101('UsageLimit');_0x51e567[0x1]={..._0x51e567[0x1],'requestId':_0x63926};},{'priority':'high'}),_0x14c107['on']('_sendUsageRequest',_0x1fe92d=>{_0x56c019(_0x1fe92d['return'])&&(_0x4577ef=!0x0,_0x398cd5(_0x1fe92d['return']));},{'priority':'low'}),_0x3e8050['then'](()=>{_0x4577ef||_0x535101('UsageLimit');});});function _0x722c9d(){return'auto'==_0x14c107['editing']['view']['_overlayModeHint'];}function _0x4853b8(){_0x14c107['editing']['view']['_overlayModeHint']='auto';}}function _0x187c1a(_0x4890fa){const _0x2c7407=[new window['Promise'](_0x4ca5e3=>setTimeout(_0x4ca5e3,0x93ecc)),_0x3e8050['then'](()=>new window['Promise'](_0xab4529=>{let _0x514f5c=0x0;_0x14c107['model']['on']('applyOperation',(_0x1bcf80,_0x36dd86)=>{_0x36dd86[0x0]['isDocumentOperation']&&_0x514f5c++,0x5e8==_0x514f5c&&(_0xab4529(),_0x1bcf80['off']());});}))];return window['Promise']['race'](_0x2c7407)['then'](()=>_0x4890fa);}async function _0x5b69c1(){await _0x3e8050,_0x14c107['model']['change']=_0x1a0d03,_0x14c107['model']['enqueueChange']=_0x1a0d03,_0x14c107['enableReadOnlyMode']('model');}function _0x123941(){return window['glob']&&window['glob']['triliumVersion'];}function _0x163692(){return _0x2aadf7('WebSocketGateway')&&'connected'==_0x49319e('WebSocketGateway')['state'];}function _0x35e416(){return _0x2aadf7('RevisionViewerIntegration');}function _0x474577(){return _0x2aadf7('TrackChangesDataGetter');}function _0x486ff0(_0x4b4975){const _0x5daf6e=_0x52da88();_0x14c107[_0x5daf6e]='commentsLicenseKey'+_0x4b4975,'Valid'!=_0x4b4975&&_0x5b69c1();}function _0x52da88(){const _0x2b050e=window['String'](window['performance']['now']())['replace']('.','');let _0xdfdf40='K';for(let _0x1aebab=0x0;_0x1aebab<_0x2b050e['length'];_0x1aebab+=0x2){let _0x17f602=window['parseInt'](_0x2b050e['substring'](_0x1aebab,_0x1aebab+0x2));_0x17f602>=0x3e&&(_0x17f602-=0x3e),_0xdfdf40+=_0x5409ac[_0x17f602];}return _0xdfdf40;}function _0x356cc6(){const _0xb826da=_0x22fbdc['split']('.');if(0x3!=_0xb826da['length'])return null;return _0x51b0fe(_0xb826da[0x1]);function _0x51b0fe(_0x3902fc){const _0x3f0596=_0x5568a0(_0x3902fc);return _0x3f0596&&_0x5b0f80()?_0x3f0596:null;function _0x5b0f80(){const _0x1aae83=_0x3f0596['jti'],_0x474acb=window['parseInt'](_0x1aae83['substring'](_0x1aae83['length']-0x8),0x10),_0x3781f3={..._0x3f0596,'jti':_0x1aae83['substring'](0x0,_0x1aae83['length']-0x8)};return delete _0x3781f3['vc'],_0x4fc254(_0x3781f3)==_0x474acb;}}}async function _0x39bbf(){let _0x97346=!0x0;try{const [_0x3ad0d4,_0x2aafde,_0x33e63a]=_0x22fbdc['split']('.');return _0x36b8d5(_0x3ad0d4),await _0x2d6e7b(_0x3ad0d4,_0x2aafde,_0x33e63a),_0x97346;}catch{return!0x1;}function _0x36b8d5(_0x6f3979){const _0x57dda9=_0x5568a0(_0x6f3979);_0x57dda9&&'ES256'==_0x57dda9['alg']||(_0x97346=!0x1);}async function _0x2d6e7b(_0x331e92,_0x551ba0,_0x3345ef){const _0x102476=window['Uint8Array']['from'](_0x42dc16(_0x3345ef),_0x25cd79=>_0x25cd79['charCodeAt'](0x0)),_0x60a8a7=new window['TextEncoder']()['encode'](_0x331e92+'.'+_0x551ba0),_0x3b4a77=window['crypto']['subtle'];if(!_0x3b4a77)return;const _0x30c50b=await _0x3b4a77['importKey']('jwk',_0xa3aedc,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3b4a77['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x30c50b,_0x102476,_0x60a8a7)||(_0x97346=!0x1);}}function _0x5568a0(_0x197f46){return _0x197f46['startsWith']('ey')?JSON['parse'](_0x42dc16(_0x197f46)):null;}function _0x42dc16(_0x4a50cb){return window['atob'](_0x4a50cb['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4fc254(_0x242556){let _0x559a0d=0x1505;function _0x433b7b(_0x281bc2){for(let _0x3dc438=0x0;_0x3dc438<_0x281bc2['length'];_0x3dc438++){const _0x1f8415=_0x281bc2['charCodeAt'](_0x3dc438);_0x559a0d=(_0x559a0d<<0x5)+_0x559a0d+_0x1f8415,_0x559a0d&=_0x559a0d;}}function _0x3b0a99(_0x2d084a){Array['isArray'](_0x2d084a)?_0x2d084a['forEach'](_0x3b0a99):_0x2d084a&&'object'==typeof _0x2d084a?Object['entries'](_0x2d084a)['sort']()['forEach'](([_0x35da0d,_0x2f0b82])=>{_0x433b7b(_0x35da0d),_0x3b0a99(_0x2f0b82);}):_0x433b7b(window['String'](_0x2d084a));}return _0x3b0a99(_0x242556),_0x559a0d>>>0x0;}function _0x98a9f9(_0x310b53){return _0x310b53['toString'](0x10)['padStart'](0x8,'0');}function _0x37b357(_0x3a1d44){return _0x3a1d44['split']('')['reverse']()['join']('');}function _0x2aadf7(_0x14b802){return _0x14c107['plugins']['has'](_0x14b802);}function _0x49319e(_0x205848){return _0x14c107['plugins']['get'](_0x205848);}function _0x1a0d03(){}_0x486ff0(await _0xc7ece8());}(this);}['destroy'](){const _0x2591d0=this['editor']['plugins']['get'](oi),_0x1aee32=this['editor']['config']['get']('collaboration.channelId');for(const _0x34e23d of _0x2591d0['getCommentThreads']({'channelId':_0x1aee32}))_0x2591d0['_detachCommentThread'](_0x34e23d['id']),_0x2591d0['_threads']['delete'](_0x34e23d['id']);super['destroy']();}['hasMarkerForId'](_0x50fca8){return this['getAllMarkersForId'](_0x50fca8)['length']>0x0;}['getAllMarkersForId'](_0x3047d4){const _0x474434=[];for(const _0x4ba11a of this['editor']['model']['markers'])_0x4ba11a['name']['startsWith']('comment:'+_0x3047d4)&&_0x474434['push'](_0x4ba11a);return _0x474434;}['scrollToThreadMarker'](_0x5929f8){setTimeout(()=>{const _0x2ba296=this['_getTargetForId'](_0x5929f8);_0x2ba296&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x5929f8&&_0x479573({'target':_0x2ba296[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3fc8ea){this['editor']['model']['change'](()=>{for(const _0x2c3d50 of this['getAllMarkersForId'](_0x3fc8ea))this['editor']['editing']['reconvertMarker'](_0x2c3d50);});}['_attachArchivedThread'](_0x24a51c){const _0x34413d=this['editor']['plugins']['get'](oi),_0x4fbd56=this['editor']['plugins']['get'](di),_0x5cabc3=_0x34413d['getCommentThread'](_0x24a51c);if(!_0x5cabc3['isAttached']){const _0x349456=_0x5cabc3['attachTo'](()=>this['_getTargetForId'](_0x5cabc3['id']));_0x4fbd56['registerAnnotation'](_0x349456),_0x5cabc3['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4afd30=this['editor'],_0xa63724=_0x4afd30['plugins']['get'](_0x515d18);_0x4afd30['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x17304d,_0x81132e)=>{const {id:_0x3114e9}=fi(_0x17304d['markerName']),_0x56bf68=_0x4afd30['plugins']['get'](oi)['getCommentThread'](_0x3114e9),_0x21b182=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x3114e9;let _0x423743;if(_0x56bf68&&_0x56bf68['isResolved']&&!_0x21b182&&_0x17304d['item'])return _0x81132e['consumable']['consume'](_0x17304d['item'],'addMarker:'+_0x17304d['markerName']),_0x81132e['consumable']['consume'](_0x17304d['item'],'removeMarker:'+_0x17304d['markerName']),null;const _0x26c245=['ck-comment-marker'];return _0x21b182&&_0x26c245['push']('ck-comment-marker--active'),_0x423743=_0x56bf68?.['length']?_0x56bf68['comments']['first']['author']['id']:_0xa63724['me']['id'],{'classes':_0x26c245,'attributes':{'data-comment':_0x3114e9,'data-author-id':_0x423743}};}}),_0x4afd30['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xd285a2,{options:_0xb99bea})=>{if(_0xb99bea['showCommentHighlights'])return null;const _0x6a2396=_0x4afd30['plugins']['get'](oi),_0x27cbad=_0x4afd30['model']['markers']['get'](_0xd285a2),{id:_0x368b51,part:_0x293840}=fi(_0xd285a2);return _0x27cbad&&!_0x27cbad['affectsData']||_0xb99bea['ignoreResolvedComments']&&_0x6a2396['getCommentThread'](_0x368b51)?.['isResolved']?null:{'group':'comment','name':_0x293840?_0x368b51+':'+_0x293840:_0x368b51};}}),_0x4afd30['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x136fc5,{writer:_0x4cc137})=>_0x4cc137['createElement']('$marker',{'data-name':'comment:'+_0x136fc5['getAttribute']('id')})}),_0x4afd30['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1d1bc2=this['editor'],_0x532ee6=_0x1d1bc2['plugins']['get'](oi),_0x47cc80=new Set(),_0x47710b=new Set();_0x1d1bc2['model']['document']['registerPostFixer'](_0x2a31e4=>{let _0xdb0f7e=!0x1;for(const {name:_0x5070eb,data:_0x4c6d5a}of _0x1d1bc2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5c5fc3,id:_0x50db49}=fi(_0x5070eb);let _0x39196e=_0x4c6d5a['newRange'];if('comment'!==_0x5c5fc3||!_0x39196e)continue;const _0x4a9567='$graveyard'===_0x39196e['root']['rootName'];_0x4a9567||(_0x39196e=_i(_0x39196e,_0x1d1bc2['model']),!_0x39196e||_0x39196e['isCollapsed']||!_0x4c6d5a['newRange']||_0x39196e['isEqual'](_0x4c6d5a['newRange']))?_0x1d1bc2['model']['hasContent'](_0x39196e)&&!_0x4a9567?this['isThreadsLoadingPaused']?_0x47cc80['add'](_0x5070eb):this['_handleThreadMarker'](_0x5070eb,_0x50db49):(_0x47710b['add'](_0x5070eb),_0x47cc80['delete'](_0x5070eb),_0x2a31e4['removeMarker'](_0x5070eb),_0xdb0f7e=!0x0):(_0x2a31e4['updateMarker'](_0x5070eb,{'range':_0x39196e}),_0xdb0f7e=!0x0);}return _0xdb0f7e;}),this['on']('change:isThreadsLoadingPaused',(_0x49bfe9,_0x177f9c,_0x1746aa)=>{if(!_0x1746aa&&_0x47cc80['size'])for(const _0x5185d6 of _0x47cc80){const {id:_0x19933a}=fi(_0x5185d6);_0x47cc80['delete'](_0x5185d6),_0x1d1bc2['model']['markers']['get'](_0x5185d6)&&this['_handleThreadMarker'](_0x5185d6,_0x19933a);}}),this['listenTo'](_0x1d1bc2['model']['document'],'change',()=>{for(const {name:_0x49ff10,data:{newRange:_0x2f4e14}}of _0x1d1bc2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x377b73,id:_0x286aa6}=fi(_0x49ff10);if('comment'!==_0x377b73)continue;const _0x5c20dd=_0x532ee6['getCommentThread'](_0x286aa6),_0x12d039=this['hasMarkerForId'](_0x286aa6);_0x5c20dd&&(!_0x5c20dd['_hasTargetInContent']&&_0x2f4e14&&_0x1d1bc2['editing']['view']['once']('render',()=>{const _0x354a6c=_0x1d1bc2['plugins']['get'](ti),_0x14f47f=_0x532ee6['_threadToController']['get'](_0x5c20dd)['view'];_0x354a6c['getByInnerView'](_0x14f47f)['refreshVisibility']();},{'priority':'low'}),_0x5c20dd['_hasTargetInContent']=_0x12d039||!!_0x2f4e14),_0x2f4e14||(_0x47710b['add'](_0x49ff10),_0x47cc80['delete'](_0x49ff10));}for(const _0x15ce0c of _0x47710b){const {id:_0x2d57fa}=fi(_0x15ce0c),_0x5971f9=_0x532ee6['getCommentThread'](_0x2d57fa);if(_0x47cc80['delete'](_0x15ce0c),!_0x5971f9)continue;const _0x55eafa=this['hasMarkerForId'](_0x2d57fa);_0x55eafa||_0x5971f9['isSubmitted']?_0x55eafa||_0x5971f9['unlinkedAt']||_0x5971f9['setUnlinkedAt'](new Date()):_0x5971f9['remove']();}_0x47710b['clear']();});}['_handleInitialThreads'](_0x4d9bb4){_0x4d9bb4['forEach'](_0x521ff6=>{_0x521ff6['unlinkedAt']&&this['_attachArchivedThread'](_0x521ff6['id']);});}['_getTargetForId'](_0x3df67d){const _0x2596c2=this['editor'],_0x3f7ffa=this['getAllMarkersForId'](_0x3df67d);return _0x2d2fca(_0x2596c2['editing'],_0x3f7ffa);}['_getTextContext'](_0x187c58){const _0x313698=this['getAllMarkersForId'](_0x187c58);let _0x1c522e='',_0x2c1a21=!0x1;for(const _0x43e338 of _0x313698){const _0x21caeb=_0x43e338['getRange']();for(const _0x33be4f of Array['from'](_0x21caeb['getItems']()))_0x33be4f['is']('$textProxy')?(_0x1c522e&&_0x2c1a21&&(_0x1c522e+='\x20',_0x2c1a21=!0x1),_0x1c522e+=_0x33be4f['data']):_0x2c1a21=!0x0;_0x2c1a21=!0x0;}return _0x1c522e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x58df0d,_0x33aad3){const _0x1db773=this['editor'],_0x349994=_0x1db773['plugins']['get'](oi);let _0x8f2114=_0x349994['getCommentThread'](_0x33aad3);const _0x2697c3=_0x1db773['config']['get']('collaboration.channelId'),_0x16cfbe=_0x1db773['plugins']['get'](di);return _0x8f2114&&(_0x8f2114['unlinkedAt']&&_0x8f2114['setUnlinkedAt'](null),_0x8f2114['isAttached'])||(this['getAllMarkersForId'](_0x33aad3)[0x0]['managedUsingOperations']?_0x349994['fetchCommentThread']({'channelId':_0x2697c3,'threadId':_0x33aad3})['then'](_0x360396=>{if('destroyed'!==_0x1db773['state']){if(_0x8f2114=_0x360396,_0x8f2114&&!_0x8f2114['isAttached']){const _0x3b8cdc=_0x8f2114['attachTo'](()=>this['_getTargetForId'](_0x33aad3));_0x16cfbe['registerAnnotation'](_0x3b8cdc),_0x8f2114['isResolved']&&this['_reconvertMarkers'](_0x33aad3);}else{if(!_0x8f2114){const _0x426d00=this['getAllMarkersForId'](_0x33aad3);_0x1db773['model']['change'](_0x3258ee=>{for(const _0x10b3a3 of _0x426d00)_0x3258ee['removeMarker'](_0x10b3a3);});}}}}):_0x1db773['editing']['view']['once']('render',()=>{if(_0x349994['getCommentThread'](_0x33aad3))return;const _0x4b4967=_0x1db773['plugins']['get'](ti);_0x8f2114=_0x349994['openNewCommentThread']({'channelId':_0x2697c3,'threadId':_0x33aad3,'target':()=>this['_getTargetForId'](_0x33aad3),'context':{'type':'text','value':this['_getTextContext'](_0x33aad3)}});const _0x29e48c=_0x349994['_threadToController']['get'](_0x8f2114)['view'],_0x1c5a90=_0x4b4967['getByInnerView'](_0x29e48c);_0x1c5a90&&_0x16cfbe['registerAnnotation'](_0x1c5a90);},{'priority':'low'})),_0x8f2114;}['_handleThreadMarker'](_0x1094cd,_0x8bac8e){const _0x3024ab=this['_attachMarkerToThread'](_0x1094cd,_0x8bac8e);_0x3024ab&&!_0x3024ab['context']&&_0x3024ab['setContext']({'type':'text','value':this['_getTextContext'](_0x8bac8e)});}['_initAriaMarkerChangeAnnouncements'](){const _0x210960=this['editor'];_0x4af0a9(_0x210960['model'],({left:_0x43c42d,entered:_0x4a7f7d})=>{for(const _0x1aea73 of _0x43c42d)if(Ai(_0x1aea73)){_0x210960['ui']['ariaLiveAnnouncer']['announce'](Et(_0x210960['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5c4540 of _0x4a7f7d)if(Ai(_0x5c4540)){_0x210960['ui']['ariaLiveAnnouncer']['announce'](Et(_0x210960['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x3861e1(_0x2fae6d)));break;}});}};function gi(_0x324082,_0x2ae012){return _0x2ae012?_0x324082+':'+_0x2ae012:_0x324082;}function _i(_0x43e54f,_0x3f3563){const _0x3348a4=_0x3f3563['schema'],_0x140810=_0x3f3563['createRange'](_0x43e54f['start']);for(const _0x56ba0e of _0x43e54f['getWalker']()){const {type:_0x5e6caf,item:_0xa9bb38,nextPosition:_0x5c0af0}=_0x56ba0e;if('text'===_0x5e6caf||_0x3348a4['isObject'](_0xa9bb38)){const _0x47aed0=_0x3f3563['createPositionBefore'](_0xa9bb38);_0x140810['isCollapsed']&&(_0x140810['start']=_0x47aed0),_0x140810['end']=_0x5c0af0;}}return _0x140810;}function Ai(_0x169303){return'comment'===fi(_0x169303['name'])['group'];}var vi=class extends _0x536687{['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 _0xc447a4=this['editor'],_0x3b4a3f=_0xc447a4['plugins']['get'](oi),_0x25c911=_0xc447a4['plugins']['get'](wi),_0x4373d1=_0xc447a4['plugins']['get'](ti),_0x23dc12=_0xc447a4['plugins']['get'](di);_0xc447a4['ui']['componentFactory']['add']('comment',()=>{const _0x162bb0=this['_createUIButton'](_0x360533);return _0x162bb0['tooltip']=!0x0,_0x162bb0;}),_0xc447a4['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x23dc12['addSourceCollector'](()=>{const _0x481663=[];for(const [_0x365647,_0xb0d631]of _0x3b4a3f['_threadToController']){const _0x44c930=_0x25c911['getAllMarkersForId'](_0x365647['id']),_0x4ddd27=_0x44c930['map'](_0x4e4a44=>_0x4e4a44['getRange']());_0x44c930['length']>0x0&&_0x481663['push']([_0xb0d631['view'],_0x4ddd27]);}return _0x481663;}),this['listenTo'](_0x4373d1,'change:activeAnnotations',(_0x5efa2b,_0x58c498,_0x40224a)=>{const _0x3dfc95=Array['from'](_0x40224a)['map'](_0x56b04e=>_0x56b04e['innerView'])['find'](_0x269b01=>_0x3b4a3f['_viewToController']['has'](_0x269b01));if(!_0x3dfc95)return void(_0x25c911['activeMarker']=null);const _0x295be2=_0x3b4a3f['_viewToController']['get'](_0x3dfc95)['model']['id'],_0x4c760='comment:'+_0x295be2;_0x295be2&&_0x25c911['hasMarkerForId'](_0x295be2)?_0x25c911['activeMarker']=_0x4c760:_0x25c911['activeMarker']&&(_0x25c911['activeMarker']=null);}),this['listenTo'](_0x3b4a3f,'removeCommentThread',(_0x14a65b,{threadId:_0x30597b,isFromAdapter:_0x321769})=>{!_0x321769&&_0xc447a4['ui']['focusTracker']['isFocused']&&_0x25c911['hasMarkerForId'](_0x30597b)&&_0xc447a4['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3b4a3f,'addComment',(_0x58c66c,{threadId:_0x3fbbd8,isFromAdapter:_0x57fc93})=>{!_0x57fc93&&_0x25c911['hasMarkerForId'](_0x3fbbd8)&&_0x3b4a3f['hasCommentThread'](_0x3fbbd8)&&0x1===_0x3b4a3f['getCommentThread'](_0x3fbbd8)['length']&&(_0xc447a4['editing']['view']['focus'](),_0x58c66c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1ade31=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x572e7c;for(const _0x1dc0c9 in _0x1ade31){const _0x1a74ff=_0x1dc0c9,_0x5790dc=_0x1ade31[_0x1a74ff];if('commentsLicenseKeyValid'==_0x5790dc||'commentsLicenseKeyInvalid'==_0x5790dc||'commentsLicenseKeyExpired'==_0x5790dc||'commentsLicenseKeyDomainLimit'==_0x5790dc||'commentsLicenseKeyNotAllowed'==_0x5790dc||'commentsLicenseKeyEvaluationLimit'==_0x5790dc||'commentsLicenseKeyUsageLimit'==_0x5790dc){delete _0x1ade31[_0x1a74ff],_0x572e7c=_0x5790dc,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x572e7c&&_0x1ade31['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x572e7c&&_0x1ade31['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x572e7c&&_0x1ade31['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x572e7c&&_0x1ade31['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x572e7c&&_0x1ade31['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x572e7c&&_0x1ade31['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x153912){const _0x5a7fc1=this['editor'],_0x5d0549=new _0x153912(_0x5a7fc1['locale']),_0xf30321=_0x5a7fc1['commands']['get']('addCommentThread');return _0x5d0549['set']({'label':Et(_0x5a7fc1['locale'],'Comment'),'icon':_0x37b57a}),_0x5d0549['bind']('isEnabled')['to'](_0xf30321,'isEnabled',_0xf30321,'hasContent',(_0x15ed8e,_0x13f974)=>_0x15ed8e&&_0x13f974),this['listenTo'](_0x5d0549,'execute',()=>{_0xf30321['execute']();}),_0x5d0549;}},yi=class extends _0x536687{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x3ff254){super(_0x3ff254),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2206f8,_0x170018,_0x68ab4)=>{_0x68ab4?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x110648,_0x4f214d]of this['editor']['commands'])_0x4f214d['affectsData']&&'addCommentThread'!==_0x110648&&_0x4f214d['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 _0x509d42=this['editor']['editing']['view']['document'];this['listenTo'](_0x509d42,'cut',_0x5c6d3d=>_0x5c6d3d['stop'](),{'priority':'highest'}),this['listenTo'](_0x509d42,'clipboardInput',_0x4f446c=>_0x4f446c['stop'](),{'priority':'highest'}),this['listenTo'](_0x509d42,'delete',_0x32e47d=>_0x32e47d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x204ac6,_0x5c3302]of this['editor']['commands'])_0x5c3302['affectsData']&&'addCommentThread'!==_0x204ac6&&_0x5c3302['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 _0x16337c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43d7f6){super(_0x43d7f6),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x40984a=this['context']['plugins']['get'](ti);this['listenTo'](_0x40984a,'_activateAnnotation',(_0x183420,_0x704cb)=>{for(const _0x4f890b of this['activeUIs']){const _0x1f99de=this['_uis']['get'](_0x4f890b);(0x0,this['uisData']['get'](_0x4f890b)['filter'])(_0x704cb)&&_0x1f99de['setActiveAnnotation'](_0x704cb);}}),this['listenTo'](_0x40984a,'_deactivateAllAnnotations',()=>{for(const _0x31b2ec of this['activeUIs'])this['_uis']['get'](_0x31b2ec)['setActiveAnnotation'](null);}),this['listenTo'](_0x40984a['_visibleAnnotations'],'add',(_0xe71eff,_0x35fc5f)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x35fc5f);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2868fd){return this['activeUIs']['has'](_0x2868fd);}['activate'](_0x4c502a,_0x514bca=this['defaultFilter']){const _0x81c978=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x4c502a))throw new _0x193b01('annotationsuis-missing-ui',this,{'uiName':_0x4c502a});this['isActive'](_0x4c502a)&&this['deactivate'](_0x4c502a),this['activeUIs']['add'](_0x4c502a);const _0x105f29=new Jt();Qt({'source':_0x81c978['_visibleAnnotations'],'target':_0x105f29,'filter':_0x514bca}),this['uisData']['set'](_0x4c502a,{'collection':_0x105f29,'filter':_0x514bca});const _0x51be3b=this['_uis']['get'](_0x4c502a);_0x51be3b['attach'](_0x105f29),this['listenTo'](_0x51be3b,'change:activeAnnotation',(_0x44b97c,_0x48b128,_0x5d8883,_0x498267)=>{_0x498267&&_0x81c978['_removeActiveAnnotation'](_0x498267),_0x5d8883&&_0x81c978['_addActiveAnnotation'](_0x5d8883);});}['deactivate'](_0x56dd04){if(this['activeUIs']['delete'](_0x56dd04),!this['_uis']['has'](_0x56dd04))throw new _0x193b01('annotationsuis-missing-ui',this,{'uiName':_0x56dd04});const _0x23dc9f=this['_uis']['get'](_0x56dd04);_0x23dc9f['detach'](),this['stopListening'](_0x23dc9f),this['uisData']['get'](_0x56dd04)['collection']['destroy'](),this['uisData']['delete'](_0x56dd04);}['switchTo'](_0x4fc73){if(!this['_uis']['has'](_0x4fc73))throw new _0x193b01('annotationsuis-missing-ui',this,{'uiName':_0x4fc73});const _0x1c6363=this['context']['plugins']['get'](ti),_0x560c0a=Array['from'](_0x1c6363['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4fc73);const _0x1599ac=this['_uis']['get'](_0x4fc73);_0x1599ac['setActiveAnnotation'](_0x560c0a),_0x1599ac['_setSelectedAnnotations']&&_0x560c0a&&_0x1599ac['_setSelectedAnnotations']([_0x560c0a]);}['deactivateAll'](){for(const _0x37536a of this['activeUIs'])this['deactivate'](_0x37536a);}['register'](_0x205568,_0x43d48b){if(this['_uis']['has'](_0x205568))throw new _0x193b01('annotationsuis-register-already-registered');if('function'!=typeof _0x43d48b['attach']||'function'!=typeof _0x43d48b['detach']||'function'!=typeof _0x43d48b['setActiveAnnotation'])throw new _0x193b01('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x205568,_0x43d48b);}['refilterAnnotations'](){const _0xccfa15=this['context']['plugins']['get'](ti)['collection'],_0x5c086d=new Map(),_0x185992=Array['from'](this['activeUIs']);for(const _0x29e83b of this['activeUIs']){const _0x56abd5=this['uisData']['get'](_0x29e83b)['collection'];for(const _0x49d309 of _0x56abd5)_0x5c086d['set'](_0x49d309,_0x29e83b);}for(const _0x22fb00 of _0xccfa15){const _0x501136=_0x5c086d['get'](_0x22fb00);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x22fb00);const _0x37f9c0=_0x185992['find'](_0x4f900f=>this['uisData']['get'](_0x4f900f)['filter'](_0x22fb00));_0x501136!==_0x37f9c0&&(_0x501136&&this['uisData']['get'](_0x501136)['collection']['remove'](_0x22fb00),_0x37f9c0&&this['uisData']['get'](_0x37f9c0)['collection']['add'](_0x22fb00));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x17aca5){const _0xfbf157=[];for(const _0x209705 of this['activeUIs']){(0x0,this['uisData']['get'](_0x209705)['filter'])(_0x17aca5)&&_0xfbf157['push'](_0x209705);}if(_0xfbf157['length']>0x1)throw new _0x193b01('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xfbf157,'annotationType':_0x17aca5['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x24ef69('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x57cfbc){super(_0x57cfbc);const _0x454046=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 _0x491e21(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x454046['to']('class')],'style':{'minHeight':_0x454046['to']('minHeight',_0x1260c8=>'number'==typeof _0x1260c8?Ci(_0x1260c8+0xa):null)},'dir':_0x57cfbc['uiLanguageDirection'],'role':'application','aria-label':Et(_0x57cfbc,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x57cfbc,'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',_0x458159=>{this['_updateItemPositionInFocusables'](_0x458159['source']);}),this['list']['forEach'](_0x240310=>{this['focusTracker']['add'](_0x240310['element']),this['_updateItemPositionInFocusables'](_0x240310);}),this['list']['on']('change',(_0x45ec0c,_0x1e1b92)=>{for(const _0x3b4c1e of _0x1e1b92['removed'])this['focusTracker']['remove'](_0x3b4c1e['element']),this['focusables']['remove'](_0x3b4c1e);for(const _0x16910b of _0x1e1b92['added'])this['focusTracker']['add'](_0x16910b['element']),this['_updateItemPositionInFocusables'](_0x16910b);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4b8291){const _0x1525fd=this['focusables']['getIndex'](_0x4b8291);let _0x260451,_0x203bf9;for(const _0xb8f314 of this['focusables'])if(_0x4b8291['top']<_0xb8f314['top']){_0x260451=_0xb8f314;break;}if(_0x203bf9=_0x260451?this['focusables']['getIndex'](_0x260451):this['focusables']['length'],-0x1!==_0x1525fd){if(_0x1525fd===_0x203bf9-0x1)return;this['focusables']['remove'](_0x4b8291),_0x203bf9=_0x260451?this['focusables']['getIndex'](_0x260451):this['focusables']['length'];}this['focusables']['add'](_0x4b8291,_0x203bf9);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x24ef69('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x39f64a){super(_0x39f64a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x20bb57,_0x30480f)=>_0x20bb57+_0x30480f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1eba9c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1eba9c['to']('isAnimationDisabled',_0x2f6130=>_0x2f6130?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1eba9c['to']('top',_0x26ce16=>bi(_0x26ce16))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x156680=this['element']['clientHeight'];_0x156680&&(this['height']=_0x156680);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x16337c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4cb5f0){super(_0x4cb5f0),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 _0x11d72f=this['context']['config']['get']('sidebar.container');_0x11d72f&&this['setContainer'](_0x11d72f);}['setContainer'](_0x153ac7){if(!Oi(_0x153ac7))throw new _0x193b01('sidebar-setcontainer-invalid-element');this['container']=_0x153ac7;}['_attachToContainer']({viewClass:_0x32bea6='',spaceBetweenItems:_0x1f2ec4=0x19}={}){if(!Oi(this['container']))throw new _0x193b01('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x32bea6,this['_spaceBetweenItems']=_0x1f2ec4;}['rearrange']({removedAnnotation:_0x49fa06,previousAnnotation:_0x2056e4,nextAnnotation:_0x32dbee}){const _0x191ca7=this['getSidebarItemView'](_0x49fa06);this['view']['list']['remove'](_0x191ca7),this['_destroySidebarItemView'](_0x49fa06),_0x2056e4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2056e4)),_0x32dbee&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x32dbee)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x341d00,activatedAnnotation:_0x185d83,disableAnimationOnActivatedAnnotation:_0x43bd42}){if(this['_activeAnnotation']=_0x185d83,_0x341d00){_0x341d00['isActive']=!0x1;const _0x37faf3=this['getSidebarItemView'](_0x341d00);_0x37faf3&&_0x43bd42&&(_0x37faf3['isAnimationDisabled']=!0x1);}if(_0x185d83){const _0x39778c=this['getSidebarItemView'](_0x185d83);_0x39778c&&(_0x185d83['isActive']=!0x0,_0x43bd42&&(_0x39778c['isAnimationDisabled']=!0x0,_0x39778c['top']+=0x1),this['_alignToTargetRect'](_0x39778c));}}['_detachFromContainer'](_0x48607d){if(this['view']['element']['remove'](),_0x48607d){for(const _0x390cd6 of _0x48607d)this['_destroySidebarItemView'](_0x390cd6);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x58b8f0,_0x44a85b){_0x44a85b||(_0x44a85b=_0x58b8f0['view']);const _0x128efb=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x128efb,_0x58b8f0),this['_annotationToSidebarItemView']['set'](_0x58b8f0,_0x128efb),_0x128efb['content']['add'](_0x44a85b),this['listenTo'](_0x58b8f0['view'],'change:targetRect',(_0x17bb4d,_0x5a1187,_0x51a64e)=>{const _0xecc5db=this['_getTargetTop'](_0x58b8f0,_0x51a64e);_0x128efb['_targetTop']!=_0xecc5db&&(_0x128efb['_targetTop']=_0xecc5db,this['_setItemTop'](_0x128efb,_0xecc5db));}),this['listenTo'](_0x128efb,'change:top',()=>{this['_recalculate'](_0x128efb,'top');}),this['listenTo'](_0x128efb,'change:bottom',()=>{this['_recalculate'](_0x128efb,'bottom');}),this['_alignToTargetRect'](_0x128efb);const _0x3bf0b8=this['_getItemBefore'](_0x128efb);return _0x3bf0b8&&this['_alignAfterItem'](_0x3bf0b8,_0x128efb)||this['_alignToTargetRect'](_0x128efb),this['_updateLastItem'](),this['view']['list']['add'](_0x128efb),_0x128efb;}['_alignForTopChange'](_0x2d9b6c){if(!_0x2d9b6c['content']['length'])return;const _0x39d46a=this['_getItemBefore'](_0x2d9b6c);if(!_0x39d46a)return;const _0x5a0689=this['_sidebarItemViewToAnnotation']['get'](_0x39d46a),_0x51455a=this['_activeAnnotation'];_0x51455a&&_0x51455a===_0x5a0689?this['_alignAfterItem'](_0x39d46a,_0x2d9b6c):this['_alignBeforeItem'](_0x2d9b6c,_0x39d46a);}['_alignForBottomChange'](_0x2d5da3){if(!_0x2d5da3['content']['length'])return;const _0x47d66a=this['_getItemAfter'](_0x2d5da3);if(!_0x47d66a)return;const _0x57322e=this['_sidebarItemViewToAnnotation']['get'](_0x47d66a),_0x2b327b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5b1dca=this['_activeAnnotation'];_0x5b1dca&&_0x5b1dca===_0x57322e&&_0x2b327b?(this['_alignBeforeItem'](_0x47d66a,_0x2d5da3),this['_alignAfterItem'](_0x2d5da3,_0x47d66a)):_0x5b1dca&&_0x5b1dca===_0x57322e?this['_alignBeforeItem'](_0x47d66a,_0x2d5da3):this['_alignAfterItem'](_0x2d5da3,_0x47d66a);}['_recalculate'](_0x406ea7,_0x6470a6){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x17975a,changedProp:_0x513a83}of this['_recalculateBuffer'])'top'===_0x513a83?this['_alignForTopChange'](_0x17975a):this['_alignForBottomChange'](_0x17975a);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x406ea7,'changedProp':_0x6470a6});}['getSidebarItemView'](_0x3cb390){return this['_annotationToSidebarItemView']['get'](_0x3cb390);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x9bb7ca){const _0x1d88bf=this['getSidebarItemView'](_0x9bb7ca);this['stopListening'](_0x1d88bf),this['stopListening'](_0x9bb7ca['view']),_0x1d88bf['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x9bb7ca),this['_sidebarItemViewToAnnotation']['delete'](_0x1d88bf);}['_createSidebarView'](){const _0x3ef852=new Ii(this['context']['locale']);return _0x3ef852['render'](),this['on']('change:_lastItem',(_0x574ebb,_0x211e3a,_0x3a46fb,_0x502254)=>{_0x502254&&_0x3ef852['unbind']('minHeight'),_0x3a46fb?_0x3ef852['bind']('minHeight')['to'](_0x3a46fb,'bottom'):_0x3ef852['minHeight']=null;}),_0x3ef852;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4f97b4){const _0x250899=this['_sidebarItemViewToAnnotation']['get'](_0x4f97b4),_0x58c2ff=_0x250899&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x250899)-0x1);return _0x58c2ff&&this['getSidebarItemView'](_0x58c2ff)||null;}['_getItemAfter'](_0x3d3c7a){const _0x5a6428=this['_sidebarItemViewToAnnotation']['get'](_0x3d3c7a),_0x52f7eb=_0x5a6428&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5a6428)+0x1);return _0x52f7eb&&this['getSidebarItemView'](_0x52f7eb)||null;}['_alignBeforeItem'](_0x42f0d5,_0x1a9914){_0x42f0d5['updateHeight']();const _0x6d0351=Ni(_0x1a9914['bottom']+this['_spaceBetweenItems'],_0x42f0d5['top']);return!!_0x6d0351&&(this['_setItemTop'](_0x1a9914,_0x1a9914['top']-_0x6d0351),!0x0);}['_alignAfterItem'](_0x3f9ec2,_0x195f9a){_0x3f9ec2['updateHeight']();const _0xba08fe=Ni(_0x3f9ec2['bottom']+this['_spaceBetweenItems'],_0x195f9a['top']);return!!_0xba08fe&&(this['_setItemTop'](_0x195f9a,_0x195f9a['top']+_0xba08fe,!0x1),!0x0);}['_alignToTargetRect'](_0x478b5d){const _0x5e5e65=this['_sidebarItemViewToAnnotation']['get'](_0x478b5d);if(!_0x5e5e65||!_0x5e5e65['target']||!_0x5e5e65['targetRect'])return;const _0x227be7=this['_getTargetTop'](_0x5e5e65,_0x5e5e65['targetRect']);this['_setItemTop'](_0x478b5d,_0x227be7);}['_getTargetTop'](_0x2d1409,_0x4c5626){if(null===_0x4c5626)return 0x0;if(_0x2d1409['target']instanceof _0x210b11)return _0x4c5626['top'];{const _0x29d06b=new _0x210b11(this['view']['element'])['top'];return _0x4c5626['top']-_0x29d06b;}}['_setItemTop'](_0x191d06,_0x56a135,_0x28e501=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x28e501&&(_0x56a135=Math['max'](_0x56a135,this['_getMaxAvailableTop'](_0x191d06))),_0x191d06['top']=_0x56a135;}['_getMaxAvailableTop'](_0x49fc9f){let _0x447bc7=this['_getItemBefore'](_0x49fc9f),_0xe95299=0x0;for(;_0x447bc7;)_0x447bc7['updateHeight'](),_0xe95299+=this['_spaceBetweenItems']+_0x447bc7['height'],_0x447bc7=this['_getItemBefore'](_0x447bc7);return _0xe95299;}};function Ni(_0x4739f2,_0xd80bb9){return Math['max'](_0x4739f2-_0xd80bb9,0x0);}function Oi(_0x19e5cf){return null!==_0x19e5cf&&'object'==typeof _0x19e5cf&&0x1===_0x19e5cf['nodeType'];}var Mi=class extends _0x16337c{['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(_0x44bdc7){super(_0x44bdc7),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x38bfe3(),this['_refreshPositioningDebounced']=_0x8a3c09(()=>{_0x44bdc7['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x18170d=this['context']['plugins']['get'](Ti),_0x5c4272=this['context']['plugins']['get'](ki);_0x18170d['register']('wideSidebar',this),_0x5c4272['container']&&_0x18170d['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3f7a3e){if(_0x3f7a3e===this['activeAnnotation'])return;const _0x1aa9a2=this['context']['plugins']['get'](ki);_0x1aa9a2['_activeAnnotation']=_0x3f7a3e;const _0x5eecec=this['activeAnnotation'];_0x1aa9a2['refresh']({'blurredAnnotation':_0x5eecec,'activatedAnnotation':_0x3f7a3e}),this['activeAnnotation']=_0x3f7a3e;}['attach'](_0x402989){this['annotations']=_0x402989;const _0x117df0=this['context']['plugins']['get'](ki);if(_0x117df0['_annotations']=_0x402989,this['isAttached'])throw new _0x193b01('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x117df0,'set:container',()=>{this['detach'](),this['listenTo'](_0x117df0,'change:container',_0x1db416=>{_0x1db416['off'](),this['attach'](_0x402989);});}),_0x117df0['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x221ed3=_0x274581=>{_0x274581['updateTargetRect'](),_0x117df0['addAnnotation'](_0x274581);};for(const _0x1a9c15 of _0x402989)_0x221ed3(_0x1a9c15);this['listenTo'](_0x402989,'add',(_0x3fd0c0,_0x102ea4)=>{_0x221ed3(_0x102ea4);}),this['listenTo'](_0x402989,'remove',(_0x39216a,_0xd09b1d,_0x3000d8)=>{_0x117df0['rearrange']({'removedAnnotation':_0xd09b1d,'previousAnnotation':_0x402989['get'](_0x3000d8-0x1),'nextAnnotation':_0x402989['get'](_0x3000d8+0x1)}),_0xd09b1d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x402989,'focus',(_0x8de68d,_0x25e96b)=>{this['setActiveAnnotation'](_0x25e96b);}),this['listenTo'](_0x402989,'blur',()=>{this['setActiveAnnotation'](null);});const _0x424be4=this['context']instanceof _0x5bb643?this['context']['editors']:new _0x38bfe3([this['context']]);for(const _0x4f5d12 of _0x424be4)this['_integrateWithEditorAnnotations'](_0x4f5d12);this['listenTo'](_0x424be4,'add',(_0x515f91,_0x375ad9)=>{this['listenTo'](_0x375ad9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x375ad9);});}),this['listenTo'](_0x424be4,'remove',(_0x2d80de,_0x29092f)=>{_0x29092f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x29092f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x193b01('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x287093=this['context']['plugins']['get'](ki);_0x287093['_detachFromContainer'](this['annotations']),this['stopListening'](_0x287093),this['stopListening'](this['annotations']),this['context']instanceof _0x5bb643&&this['stopListening'](this['context']['editors']);for(const _0x29f223 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x29f223);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x161dd3){if(!_0x161dd3['plugins']['has']('EditorAnnotations'))return;const _0x18e081=_0x161dd3['plugins']['get']('EditorAnnotations'),_0x307681=()=>{const _0x4b70bd=_0x18e081['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4b70bd[0x0]||null);};this['listenTo'](_0x18e081,'refresh',_0x307681),this['listenTo'](_0x18e081,'blur',(_0x406a7c,{isAnnotationTracked:_0x3a0914})=>{this['activeAnnotation']&&_0x3a0914(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x18e081,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3dcc75=>{_0x18e081['hasDomSelection']()&&(_0x307681(),_0x3dcc75['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x18e081);}['_destroyEditorAnnotationsIntegration'](_0xcc4d9b){this['stopListening'](_0xcc4d9b),this['_editorAnnotations']['remove'](_0xcc4d9b);}},Ri=class extends _0x360533{['counterView'];constructor(_0x6148ea){super(_0x6148ea);const _0x5b4135=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x11128d,_0xf36d39)=>_0x11128d?'...':_0xf36d39['toString']()),this['set']('annotationType',''),this['icon']=_0x37b57a,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5b4135['to']('annotationType',_0x58dcd8=>'ck-annotation-counter__badge--'+_0x58dcd8),_0x5b4135['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5b4135['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x16337c{['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(_0x164c03){super(_0x164c03),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x48fa42())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x38bfe3(),this['_refreshPositioningDebounced']=_0x8a3c09(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5b3e57(this['context']['locale']),this['balloonPanelView']=new _0x357288(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x321133){this['annotations']=_0x321133;const _0x2baa47=this['context']['plugins']['get'](ki),_0x19fb3b=this['balloonPanelView'];if(_0x2baa47['_annotations']=_0x321133,this['isAttached'])throw new _0x193b01('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2baa47,'set:container',()=>{this['detach'](),this['listenTo'](_0x2baa47,'change:container',_0x10b63b=>{_0x10b63b['off'](),this['attach'](_0x321133);});}),_0x2baa47['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3cc1b2=_0x25fe43=>{const _0x109e15=new Ri(this['context']['locale']);_0x2baa47['addAnnotation'](_0x25fe43,_0x109e15),this['_annotationToNarrowView']['set'](_0x25fe43,_0x109e15),_0x109e15['bind']('isDirty','annotationType','number')['to'](_0x25fe43['view'],'isDirty','type','length'),_0x109e15['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x19fb3b['content']['first']!==_0x25fe43['view']?(this['_showBalloon'](_0x25fe43),_0x25fe43['view']['element']['focus'](),this['setActiveAnnotation'](_0x25fe43)):this['setActiveAnnotation'](null);});};for(const _0x353258 of _0x321133)_0x3cc1b2(_0x353258);this['listenTo'](_0x321133,'add',(_0x1143d5,_0x4fc473)=>{_0x3cc1b2(_0x4fc473);}),this['listenTo'](_0x321133,'remove',(_0x32ef34,_0x4c112a,_0x3a2858)=>{this['_annotationToNarrowView']['get'](_0x4c112a)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4c112a),_0x2baa47['rearrange']({'removedAnnotation':_0x4c112a,'previousAnnotation':_0x321133['get'](_0x3a2858-0x1),'nextAnnotation':_0x321133['get'](_0x3a2858+0x1)}),_0x4c112a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x321133,'focus',(_0x2b41d3,_0x3bdbef)=>{this['setActiveAnnotation'](_0x3bdbef);}),this['listenTo'](_0x321133,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xe47da3,_0x5d9db7)=>{_0x5d9db7['keyCode']===_0xa881fb['esc']&&_0x19fb3b['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x19fb3b['content']['first']),this['_hideBalloon'](),_0x5d9db7['stopPropagation'](),_0x5d9db7['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x4aeded,_0x9e906e)=>{const _0x542bc5=_0x9e906e['target'];_0x19fb3b['isVisible']&&_0x19fb3b['element']['contains'](_0x542bc5)||_0x2baa47['view']['element']['contains'](_0x542bc5)||_0x4aeded['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x286d47=>_0x286d47['contains'](_0x542bc5))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x182f3f=this['context']instanceof _0x5bb643?this['context']['editors']:new _0x38bfe3([this['context']]);for(const _0x178ffa of _0x182f3f)this['_integrateWithEditorAnnotations'](_0x178ffa);this['listenTo'](_0x182f3f,'add',(_0x8e36a7,_0x3652ac)=>{this['listenTo'](_0x3652ac,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3652ac);});}),this['listenTo'](_0x182f3f,'remove',(_0x5b5118,_0x30e66f)=>{_0x30e66f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x30e66f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3e2953){if(_0x3e2953===this['activeAnnotation'])return;const _0x134cc7=this['context']['plugins']['get'](ki);_0x134cc7['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3e2953,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3e2953&&_0x134cc7['getSidebarItemView'](_0x3e2953)?this['_showBalloon'](_0x3e2953):this['_hideBalloon'](),this['activeAnnotation']=_0x3e2953;}['detach'](){if(!this['isAttached'])throw new _0x193b01('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2214b3=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5ed188=>_0x5ed188['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2214b3['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5bb643&&this['stopListening'](this['context']['editors']);for(const _0x1c5e29 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1c5e29);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'](_0x522160){if(!_0x522160['plugins']['has']('EditorAnnotations'))return;const _0x4d5d13=_0x522160['plugins']['get']('EditorAnnotations'),_0xade40=this['context']['plugins']['get'](ki),_0x5d8916=this['annotations'],_0x1bdf1d=this['balloonPanelView'],_0x13fbdf=()=>{const _0x19345f=_0x4d5d13['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x19345f),this['setActiveAnnotation'](_0x19345f[0x0]||null);};this['listenTo'](_0x4d5d13,'refresh',_0x13fbdf),this['listenTo'](_0x4d5d13,'blur',(_0x28bd4c,{isAnnotationTracked:_0x2c0e9a})=>{this['activeAnnotation']&&_0x2c0e9a(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4d5d13,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x5d8916,'blur',_0x5e82ae=>{_0x4d5d13['hasDomSelection']()&&_0x5e82ae['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x244bb6,_0x21b4dc)=>{const _0x3a875c=_0x21b4dc['target'];_0x1bdf1d['isVisible']&&_0x1bdf1d['element']['contains'](_0x3a875c)||_0xade40['view']['element']['contains'](_0x3a875c)||this['activeAnnotation']&&_0x4d5d13['hasDomSelection']()&&(_0x13fbdf(),_0x244bb6['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4d5d13);}['_destroyEditorAnnotationsIntegration'](_0x2a712d){_0x2a712d&&(this['stopListening'](_0x2a712d),this['_editorAnnotations']['remove'](_0x2a712d));}['_setSelectedAnnotations'](_0x1f2355){for(const _0x3dd02b of this['_selectedAnnotations'])_0x1f2355['includes'](_0x3dd02b)||this['_manuallyClosedAnnotationViews']['delete'](_0x3dd02b['view']);this['_selectedAnnotations']=_0x1f2355;}['_refreshPositioning'](){const _0x4735da=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4735da['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x464673){if(this['_manuallyClosedAnnotationViews']['has'](_0x464673['view']))return;const _0x364c5f=this['balloonPanelView']['content']['first'];_0x364c5f!==_0x464673['view']?(_0x364c5f&&this['_detachListeners'](_0x364c5f),this['_attachListeners'](_0x464673['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x464673['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1e3818=this['balloonPanelView']['content']['first'],_0x12b46c=_0x1e3818&&this['annotations']['getByView'](_0x1e3818);if(!_0x12b46c||!this['_annotationToNarrowView']['has'](_0x12b46c))return;const _0x57884f=this['_annotationToNarrowView']['get'](_0x12b46c)['element'],_0xa0934=(function(){const _0x56fe08=_0x357288['defaultPositions'];return[_0x56fe08['southArrowNorthEast'],_0x56fe08['northArrowSouthEast'],_0x56fe08['southArrowNorth'],_0x56fe08['northArrowSouth'],_0x56fe08['southArrowNorthWest'],_0x56fe08['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x57884f,'positions':_0xa0934});}['_hideBalloon'](){const _0x2b7d66=this['balloonPanelView'],_0x1ea611=_0x2b7d66['content']['first'];_0x1ea611&&(this['_detachListeners'](_0x1ea611),_0x2b7d66['unpin'](),_0x2b7d66['content']['clear']());}['_attachListeners'](_0x2488af){this['listenTo'](_0x2488af,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2488af,'Esc',(_0xc9b4c4,_0x367d91)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2488af),this['_hideBalloon'](),_0x367d91();});}['_detachListeners'](_0x526ee5){this['stopListening'](_0x526ee5);}},xi=class extends _0x536687{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x545d95,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2beb2d){super(_0x2beb2d),_0x2beb2d['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2beb2d['plugins']['get'](_0x545d95),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x8a3c09(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x50be05=this['editor']['plugins']['get'](Ti);_0x50be05['context']===this['editor']&&(_0x50be05['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x5dc06a,_0x344fdf)=>{const _0x49c520=this['_balloon'];if(this['isAttached']&&_0x49c520['visibleView']){const _0x3d1ff9=this['annotations']['getByView'](_0x49c520['visibleView']);_0x3d1ff9&&this['_closeAnnotation'](_0x3d1ff9),_0x344fdf();}}));}['afterInit'](){const _0x20e1b3=this['editor']['plugins']['get'](Ti);_0x20e1b3['context']===this['editor']&&(_0x20e1b3['hasActive']()||_0x20e1b3['switchTo']('inline'));}['setActiveAnnotation'](_0x5aa591){_0x5aa591!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5aa591&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5aa591)&&this['_addAnnotationToBalloon'](_0x5aa591,!0x0),_0x5aa591['isActive']=!0x0),_0x5aa591||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5aa591);}['attach'](_0x2f12ec){this['annotations']=_0x2f12ec;const _0x1d3581=this['editor']['plugins']['get'](Ti),_0x16053a=this['_balloon'];if(this['isAttached'])throw new _0x193b01('inlineannotations-attach-already-attached',this);if(_0x1d3581['context']!==this['editor'])throw new _0x193b01('inlineannotations-not-allowed-with-context',this);const _0xcc52d2=this['editor']['plugins']['get'](di);this['listenTo'](_0xcc52d2,'refresh',()=>{const _0x3055e4=_0xcc52d2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4a5be9,_0x38b560;!this['_forceRefresh']&&(_0x4a5be9=_0x3055e4,_0x38b560=this['_selectedAnnotations'],_0x4a5be9['length']===_0x38b560['length']&&_0x4a5be9['every'](_0x1afd91=>_0x38b560['includes'](_0x1afd91)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3055e4),this['setActiveAnnotation'](_0x3055e4[0x0]||null));}),this['listenTo'](_0xcc52d2,'blur',(_0x36c98a,{isAnnotationTracked:_0x2c70de})=>{this['activeAnnotation']&&_0x2c70de(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xcc52d2,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0xd250b6,_0x2cffce,_0x503885)=>{_0x503885||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2f12ec,'remove',(_0xc3194d,_0x15d9a8)=>{this['_removeAnnotationFromBalloon'](_0x15d9a8),_0x15d9a8===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x16053a,'change:visibleView',(_0x428256,_0x566fbf,_0x3a5a55,_0x5b230e)=>{_0x5b230e&&this['stopListening'](_0x5b230e);const _0x4e9f36=_0x2f12ec['getByView'](_0x3a5a55);_0x3a5a55&&_0x4e9f36&&(this['listenTo'](_0x3a5a55,'change:height',()=>{_0x16053a['updatePosition']();}),this['listenTo'](_0x3a5a55,'Esc',()=>{this['_closeAnnotation'](_0x4e9f36),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4e9f36&&this['setActiveAnnotation'](_0x4e9f36));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x16053a['visibleView']&&_0x2f12ec['getByView'](_0x16053a['visibleView'])&&_0x16053a['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 _0x193b01('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1b7fef of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1b7fef);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0xc458e9){for(const _0x59a880 of this['_selectedAnnotations'])_0xc458e9['includes'](_0x59a880)||this['_manuallyClosed']['delete'](_0x59a880);for(const _0x2b3980 of this['annotations'])_0xc458e9['includes'](_0x2b3980)||this['_removeAnnotationFromBalloon'](_0x2b3980);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x408d3a of _0xc458e9)this['_addAnnotationToBalloon'](_0x408d3a);}this['_selectedAnnotations']=_0xc458e9;}['_addAnnotationToBalloon'](_0x14cb28,_0x372a9e=!0x1){this['_manuallyClosed']['has'](_0x14cb28)||(this['_addedAnnotations']['has'](_0x14cb28)||this['_balloon']['hasView'](_0x14cb28['view'])||(this['_addedAnnotations']['add'](_0x14cb28),this['_balloon']['add']({'stackId':_0x14cb28['view']['id'],'view':_0x14cb28['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x14cb28)}})),_0x372a9e&&this['_balloon']['showStack'](_0x14cb28['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4cf459){const _0x187937=_0x4cf459['target'],_0x4e9d09=this['editor']['editing']['view'],_0x238ba7=_0x4e9d09['document']['selection']['getFirstRange'](),_0x2dcaa1=_0x4e9d09['domConverter']['viewRangeToDom'](_0x238ba7);if(_0x2dcaa1['collapse'](!0x0),_0x187937){if(_0x187937 instanceof _0x210b11)return _0x187937;let _0x22697b=[];for(const _0x4c7ba4 of _0x187937)_0x22697b['push'](..._0x210b11['getDomElementRects'](_0x4c7ba4));_0x22697b=function(_0x54fc14){const _0x115514=[];let _0x5f047d=_0x54fc14[0x0];for(let _0x59c9b4=0x1;_0x59c9b4<_0x54fc14['length'];_0x59c9b4++)if(Pi(_0x5f047d,_0x54fc14[_0x59c9b4])){const _0x4f43c8=_0x54fc14[_0x59c9b4]['width'];_0x5f047d['width']+=_0x4f43c8,_0x5f047d['right']+=_0x4f43c8;}else _0x115514['push'](_0x5f047d),_0x5f047d=_0x54fc14[_0x59c9b4];return _0x115514['push'](_0x5f047d),_0x115514;}(_0x22697b);const _0x26d511=_0x2dcaa1['getBoundingClientRect']();return _0x22697b['find'](_0x316864=>_0x316864['top']<=_0x26d511['top']&&_0x316864['bottom']>=_0x26d511['bottom']&&_0x316864['left']<=_0x26d511['left']&&_0x316864['right']>=_0x26d511['right'])||_0x22697b[0x0];}return _0x4cf459['targetRect']||_0x2dcaa1;}['_removeAnnotationFromBalloon'](_0x3f39f7){this['_addedAnnotations']['has'](_0x3f39f7)&&this['_balloon']['hasView'](_0x3f39f7['view'])&&(this['_addedAnnotations']['delete'](_0x3f39f7),this['_balloon']['remove'](_0x3f39f7['view']));}['_closeAnnotation'](_0x56805c){this['_manuallyClosed']['add'](_0x56805c),this['_removeAnnotationFromBalloon'](_0x56805c);}};function Pi(_0x43b4a9,_0x327429){return _0x43b4a9['top']===_0x327429['top']&&_0x43b4a9['bottom']===_0x327429['bottom']&&_0x43b4a9['right']===_0x327429['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x2d18fe,_0x1b4e36){super(_0x2d18fe),this['set']('isEmpty',!_0x1b4e36['length']),this['focusTracker']=new _0x491e21(),this['_annotationViews']=_0x1b4e36,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x1b4e36,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1b4e36,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1b4e36,'remove',(_0x33ba48,_0x5a8dbc)=>{_0x5a8dbc['isActive']&&this['focus'](),_0x1b4e36['length']||(this['isEmpty']=!0x0);});const _0x15ba2c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x2d18fe,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1b4e36},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x15ba2c['if']('isEmpty','ck-hidden',_0x20eee9=>!_0x20eee9)]},'children':[{'text':Et(_0x2d18fe,'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 _0x51faca of this['_annotationViews'])this['focusTracker']['add'](_0x51faca['element']);this['_annotationViews']['on']('change',(_0x14c21b,{added:_0x1b4dbf,removed:_0x4fe828})=>{for(const _0x32b611 of _0x1b4dbf)this['focusTracker']['add'](_0x32b611['element']);for(const _0x3467a3 of _0x4fe828)this['focusTracker']['remove'](_0x3467a3['element']);});}},Di=class extends _0x16337c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x580b44){super(_0x580b44),this['archivedThreads']=new _0x38bfe3();}['init'](){const _0x510cf0=this['context'],_0x61235e=_0x510cf0['plugins']['get'](oi),_0x1cb6c0=_0x510cf0['plugins']['get'](ti);this['listenTo'](_0x61235e,'addCommentThread',(_0x50a908,{threadId:_0x59077c})=>{const _0x30763f=_0x61235e['getCommentThread'](_0x59077c);_0x30763f['archivedAt']&&this['archivedThreads']['add'](_0x30763f,this['_calculatePosition'](_0x30763f['archivedAt'])),this['listenTo'](_0x30763f,'change:archivedAt',(_0x31f704,_0x1f9625,_0xc7b2eb)=>{_0xc7b2eb?this['archivedThreads']['has'](_0x30763f)||this['archivedThreads']['add'](_0x30763f,this['_calculatePosition'](_0x30763f['archivedAt'])):this['archivedThreads']['has'](_0x30763f)&&this['archivedThreads']['remove'](_0x30763f);});}),this['listenTo'](_0x61235e,'removeCommentThread',(_0x26d0f9,{threadId:_0x1bdabb})=>{const _0x1df38e=_0x61235e['getCommentThread'](_0x1bdabb);this['stopListening'](_0x1df38e),this['archivedThreads']['has'](_0x1df38e)&&this['archivedThreads']['remove'](_0x1df38e);},{'priority':'highest'}),this['listenTo'](_0x1cb6c0['collection'],'focus',(_0x3c0e30,_0x546411)=>{_0x546411['isVisible']||(_0x546411['isActive']=!0x0,_0x1cb6c0['activate'](_0x546411));});}['_calculatePosition'](_0x1f3832){const _0x5c6804=[...this['archivedThreads']]['findIndex'](_0x41a516=>_0x41a516['archivedAt']<_0x1f3832);return _0x5c6804>-0x1?_0x5c6804:this['archivedThreads']['length'];}},Vi=class extends _0x536687{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x2e911b];}constructor(_0x2d2aae){super(_0x2d2aae),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x4d2ed4=this['editor'],_0xa88ca9=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4d2ed4['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x360533,!0x0)),_0x4d2ed4['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x10d641=this['_createCommentsArchiveButton'](rt);return _0x10d641['set']({'role':'menuitemcheckbox'}),_0x10d641;});const _0xac1b99=_0x4d2ed4['plugins']['get'](Di),_0x21fcb8=_0x4d2ed4['plugins']['get']('Annotations'),_0xd7ba52=_0x4d2ed4['plugins']['get']('CommentsRepository');_0xac1b99['archivedThreads']['forEach'](_0x2e54a4=>{this['_handleNewThread'](_0x2e54a4);}),this['listenTo'](_0xac1b99['archivedThreads'],'add',(_0x3a6dcf,_0x6c78b5)=>{this['_handleNewThread'](_0x6c78b5);}),this['listenTo'](_0x21fcb8['collection'],'add',(_0x1d6334,_0x1dcd42)=>{const _0x4adbcb=this['_pendingThreads']['find'](_0x2baf91=>{const _0x1eb1fc=_0xd7ba52['_threadToController']['get'](_0x2baf91);return _0x1eb1fc&&_0x1dcd42['innerView']===_0x1eb1fc['view'];});if(_0x4adbcb){const _0x328776=this['_calculatePosition'](_0x4adbcb['archivedAt']);this['_addAnnotationToArchive'](_0x1dcd42,_0x328776),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4adbcb),0x1);}}),this['listenTo'](_0xac1b99['archivedThreads'],'remove',(_0x376fc4,_0x2221ba)=>{const _0x34a7b4=_0x4d2ed4['config']['get']('collaboration.channelId');if(!_0x34a7b4||_0x2221ba['channelId']===_0x34a7b4){if(this['_pendingThreads']['includes'](_0x2221ba))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2221ba),0x1);else{const _0x485c68=_0xd7ba52['_threadToController']['get'](_0x2221ba),_0x2a5ec3=_0x21fcb8['getByInnerView'](_0x485c68['view']);this['annotationViews']['remove'](_0x2a5ec3['view']),this['stopListening'](_0x2a5ec3),this['stopListening'](_0x2a5ec3['focusableElements']);}}}),this['listenTo'](_0x21fcb8['collection'],'add',(_0x45448c,_0x4e6efc)=>{this['listenTo'](_0x4e6efc,'escape',_0xa88ca9);}),this['listenTo'](_0x21fcb8['collection'],'remove',(_0x42e456,_0xad2e03)=>{this['stopListening'](_0xad2e03,'escape',_0xa88ca9);});}['_addAnnotationToArchive'](_0x3dca2b,_0x4d5da7){this['listenTo'](_0x3dca2b,'set:isVisible',_0x344012=>{_0x344012['return']=!0x1,_0x344012['stop']();}),this['annotationViews']['add'](_0x3dca2b['view'],_0x4d5da7);}['_handleNewThread'](_0x31f21f){const _0xc76072=this['editor']['plugins']['get']('CommentsRepository'),_0x534b7f=this['editor']['plugins']['get']('Annotations'),_0x2db8c2=this['editor']['config']['get']('collaboration.channelId');if(!_0x2db8c2||_0x31f21f['channelId']===_0x2db8c2){const _0x326c7f=_0xc76072['_threadToController']['get'](_0x31f21f);if(!_0x326c7f)return void this['_pendingThreads']['push'](_0x31f21f);const _0x5ee1c1=this['_calculatePosition'](_0x31f21f['archivedAt']),_0x51b5cb=_0x534b7f['getByInnerView'](_0x326c7f['view']);_0x51b5cb['isVisible']&&_0x534b7f['_visibleAnnotations']['remove'](_0x51b5cb),this['_addAnnotationToArchive'](_0x51b5cb,_0x5ee1c1);}}['_calculatePosition'](_0x58af8d){const _0x1167e0=this['editor']['config']['get']('collaboration.channelId'),_0x5602d7=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x56c779=>_0x56c779['channelId']===_0x1167e0)['findIndex'](_0x212cbb=>_0x212cbb['archivedAt']<_0x58af8d);return _0x5602d7<0x0||_0x5602d7>this['annotationViews']['length']?this['annotationViews']['length']:_0x5602d7-0x1;}['_toggleDialog'](){const _0x54acfc=this['editor'],_0x23c1e2=_0x54acfc['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x54acfc['locale'],this['annotationViews'])),'commentsArchive'===_0x23c1e2['id']?_0x23c1e2['hide']():_0x23c1e2['show']({'id':'commentsArchive','title':Et(_0x54acfc['locale'],'COMMENTS_ARCHIVE'),'icon':_0x388b13,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1e8e9e['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2e5d11,_0x33973e=!0x1){const _0x1f7029=this['editor']['locale'],_0xd56776=this['editor']['plugins']['get']('Dialog'),_0x5f59ce=new _0x2e5d11(_0x1f7029);return _0x5f59ce['bind']('isEnabled')['to'](this,'isEnabled'),_0x5f59ce['bind']('isOn')['to'](_0xd56776,'id',_0x35d7f1=>'commentsArchive'===_0x35d7f1),_0x5f59ce['set']({'label':Et(_0x1f7029,'COMMENTS_ARCHIVE'),'icon':_0x388b13,'isToggleable':!0x0}),_0x33973e&&(_0x5f59ce['tooltip']=!0x0),this['listenTo'](_0x5f59ce,'execute',()=>this['_toggleDialog']()),_0x5f59ce;}['_hideDialogOnAnnotationEscape']=_0x3209e8=>{const _0x209cde=_0x3209e8['source'];if(!this['annotationViews']['has'](_0x209cde['view']))return;const _0x25b809=this['editor']['plugins']['get']('Dialog');_0x25b809['isOpen']&&'commentsArchive'===_0x25b809['id']&&(_0x25b809['hide'](),_0x3209e8['stop']());};},Bi=class extends _0x536687{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};