@ckeditor/ckeditor5-comments 47.6.0-alpha.1 → 47.6.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/build/comments.js +1 -1
  2. package/dist/index.js +11 -11
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +19 -19
  150. package/src/annotations/annotation.js +2 -2
  151. package/src/annotations/annotationcollection.js +1 -1
  152. package/src/annotations/annotations.js +1 -1
  153. package/src/annotations/annotationsuis.js +1 -1
  154. package/src/annotations/editorannotations.js +1 -1
  155. package/src/annotations/inlineannotations.js +1 -1
  156. package/src/annotations/narrowsidebar.js +1 -1
  157. package/src/annotations/sidebar.js +1 -1
  158. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  159. package/src/annotations/view/annotationview.js +1 -1
  160. package/src/annotations/view/sidebaritemview.js +2 -2
  161. package/src/annotations/view/sidebarview.js +2 -2
  162. package/src/annotations/widesidebar.js +1 -1
  163. package/src/comments/addcommentthreadcommand.js +1 -1
  164. package/src/comments/commentsarchive.js +1 -1
  165. package/src/comments/commentsarchiveui.js +1 -1
  166. package/src/comments/commentsediting.js +1 -1
  167. package/src/comments/commentsrepository.js +3 -3
  168. package/src/comments/commentsui.js +1 -1
  169. package/src/comments/integrations/clipboard.js +1 -1
  170. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  171. package/src/comments/integrations/importword.js +1 -1
  172. package/src/comments/integrations/showcommenthighlights.js +1 -1
  173. package/src/comments/ui/commenteditor/commenteditor.js +2 -2
  174. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  175. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  176. package/src/comments/ui/commentthreadcontroller.js +2 -2
  177. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  178. package/src/comments/ui/view/basecommentview.js +1 -1
  179. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  180. package/src/comments/ui/view/commentcontentview.js +1 -1
  181. package/src/comments/ui/view/commentinputview.js +1 -1
  182. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  183. package/src/comments/ui/view/commentslistview.js +1 -1
  184. package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
  185. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  186. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  187. package/src/comments/ui/view/commentthreadview.js +2 -2
  188. package/src/comments/ui/view/commentview.js +2 -2
  189. package/src/comments.js +1 -1
  190. package/src/commentsonly.js +1 -1
  191. package/src/index.js +1 -1
  192. package/src/utils/common-translations.js +1 -1
  193. package/src/utils/createmutationobserver.js +1 -1
  194. package/src/utils/splitmarkername.js +1 -1
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x3db27d,ContextPlugin as _0x43ff48,PendingActions as lt,Command as _0x3077e4,Plugin as _0x478bf2,Context as _0x4aa052}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x5df269,uid as _0x1ce077,KeystrokeHandler as jt,FocusTracker as _0x67b3fd,diff as _0x2c46da,Collection as _0x842883,Rect as _0x221bff,CKEditorError as _0x552662,first as _0x32a71d,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x122649,keyCodes as _0x25b2ac}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x38294c,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x3a4bb7,trimHtml as ts,LateFocusDropdownButtonView as _0x44e940,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x368341}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x391904}from'es-toolkit/compat';import{IconUndo as _0x5dbd54,IconCheck as _0x3ac145,IconPencil as _0x34e1c9,IconRemoveComment as _0x5eeb8f,IconThreeVerticalDots as _0x13e749,IconAddComment as _0x3ab7aa,IconCommentsArchive as _0x2e02cd}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x19c5c8,ButtonView as _0x503639,ViewCollection as _0x3aecc1,createDropdown as _0x552229,ListView as _0x4289d3,focusChildOnDropdownOpen as _0x238596,ListItemView as _0x489e41,MenuBarMenuListItemButtonView as _0x6f0215,BodyCollection as _0x125bcc,BalloonPanelView as _0x3ec0f5,ContextualBalloon as _0x235f3d,Dialog as _0x104467,DialogViewPosition as _0x493476}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x14edff}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x894944}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2da229}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0x5df269(){['model'];['view'];constructor(_0x371a6d,_0x437bf6){super(),this['model']=_0x371a6d,this['model']['_isAttached']=!0x0,this['view']=_0x437bf6,this['listenTo'](_0x437bf6,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x437bf6,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x437bf6,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x437bf6,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x437bf6,'addComment',(_0x4b7cce,_0x34176c)=>this['addComment'](_0x34176c)),this['listenTo'](_0x437bf6,'updateComment',(_0x4ad6c3,_0x1a8f3a,_0x3cd412)=>this['updateComment'](_0x1a8f3a,_0x3cd412)),this['listenTo'](_0x437bf6,'removeComment',(_0x499a5c,_0x42da92)=>this['removeComment'](_0x42da92));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x68920){this['model']['addComment']({'content':_0x68920,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x5d61cc,_0x1e6962){this['model']['getComment'](_0x5d61cc)['update']({'content':_0x1e6962});}['removeComment'](_0x24bff5){this['model']['getComment'](_0x24bff5)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x5c8cca,_0x28f56f,_0x3dc982){const t=_0x5c8cca['t'];switch(_0x28f56f){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'},_0x3dc982);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x3dc982);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'},_0x3dc982);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'},_0x3dc982);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x3dc982);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'},_0x3dc982);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'},_0x3dc982);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'},_0x3dc982);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x4b2859,_0x4082f3){super(_0x4b2859);const _0x163a91=_0x1ce077();this['main']=this['createCollection'](),this['editable']=new Vt(_0x4b2859,_0x4082f3,void 0x0,{'label':()=>N(_0x4b2859,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4b2859['uiLanguageDirection'],'lang':_0x4b2859['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x163a91},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x2bc50a){super(_0x2bc50a),this['view']=new Rt(_0x2bc50a['locale'],_0x2bc50a['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1a0a8c=this['editor']['editing']['view'],_0x86979d=this['view']['editable'],_0x422b34=_0x1a0a8c['document']['getRoot']();_0x86979d['name']=_0x422b34['rootName'],this['view']['render']();const _0x51722e=_0x86979d['element'];this['setEditableElement'](_0x86979d['name'],_0x51722e),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1a0a8c['attachDomRoot'](_0x51722e),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
- _0x5df269(_0x3db27d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x1dbf21={}){function _0x4eb94f(_0x1472a8){return _0x1472a8['map'](_0x20c6ff=>String['fromCharCode'](_0x20c6ff))['join']('');}(_0x1dbf21=Object['assign']({},_0x1dbf21))['plugins']||(_0x1dbf21['plugins']=hs['defaultPlugins']),super(_0x1dbf21),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4eb94f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4eb94f([0x76,0x69,0x65,0x77])][_0x4eb94f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4eb94f([0x61,0x75,0x74,0x6f]),this[_0x4eb94f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4eb94f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4eb94f([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4eb94f([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4eb94f([0x6f,0x6b])});}['create'](){const _0x55f08f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x55f08f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x301127=>{const _0x3e6343=this['model']['document']['getRoot'](),_0x52a664=_0x3e6343&&_0x3e6343['getChild'](_0x3e6343['childCount']-0x1);_0x301127['setSelection'](_0x52a664,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x50a74a=this['editing']['view'],_0x490cee=_0x50a74a['document']['getRoot'](),_0x1b7de7=_0x490cee['getChild'](0x0);_0x490cee['childCount']>0x1||!_0x1b7de7||'p'!=_0x1b7de7['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x50a74a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1b7de7['placeholder']=this['placeholder']),Ft({'view':_0x50a74a,'element':_0x1b7de7,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1b7de7);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5d71ce,_0x107d8={}){super(_0x5d71ce),this['editor']=null,this['_editorConfig']=_0x107d8,this['set']('value',_0x107d8['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x5d71ce,'Reply...')),this['set']('submitLabel',N(_0x5d71ce,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x67b3fd(),this['focusCycler']=new _0x19c5c8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x291234,_0x5a5532)=>{this['cancelButtonView']['fire']('execute'),_0x5a5532();}),this['keystrokes']['set']('Ctrl+Enter',(_0x206b23,_0x2fe014)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x2fe014());}),this['on']('submit',(_0xce463f,_0x214402)=>{_0x214402['length']>0xfde8?(alert(N(_0x5d71ce,'TOO_LONG_COMMENT_ALERT',[_0x214402['length'],0xfde8])),_0xce463f['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1b6af1=this['editor'];this['element']['insertBefore'](_0x1b6af1['ui']['element'],this['element']['firstChild']),_0x1b6af1['model']['document']['on']('change',()=>this['value']=_0x1b6af1['getData']()),_0x1b6af1['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1b6af1['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5622f5){-0x1===_0x5622f5?(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:_0xd76785}=this,_0x3e5a5a=new _0x503639(_0xd76785);return _0x3e5a5a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3e5a5a['withText']=!0x0,_0x3e5a5a['bind']('label')['to'](this,'submitLabel'),_0x3e5a5a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3e5a5a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xec12bb,_0x56ca30)=>!_0x56ca30&&!!_0xec12bb['trim']()),_0x3e5a5a;}['_createCancelButton'](){const {locale:_0x59e02c}=this,_0x6c70f6=new _0x503639(_0x59e02c);return _0x6c70f6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x6c70f6['label']=N(_0x59e02c,'Cancel'),_0x6c70f6['withText']=!0x0,_0x6c70f6['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x6c70f6;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x454b86=>{this['focusTracker']['add'](_0x454b86['element']);}),this['focusables']['on']('change',(_0x4d1c2b,_0x18f691)=>{for(const _0x1bf06e of Array['from'](_0x18f691['added'])['reverse']())this['focusTracker']['add'](_0x1bf06e['element']);});}}class ie extends kt{constructor(_0x3800c3,_0x185b64,_0xfea823){super(_0x3800c3),this['commentInputView']=new es(_0x3800c3,_0xfea823),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5d06e9,_0x2fdcc7)=>_0x5d06e9||!!_0x2fdcc7),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 _0x38294c(_0x3800c3,_0x185b64),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'](_0x4d39b4){this['commentInputView']['focus'](_0x4d39b4);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x525e61,_0x32df85)=>{const {submitButtonView:_0x304ca1,cancelButtonView:_0x317a68,editor:_0x56dc63}=this['commentInputView'];[_0x304ca1['element'],_0x317a68['element'],_0x56dc63?_0x56dc63['editing']['view']['getDomRoot']():null]['filter'](_0x212717=>_0x212717)['some'](_0x1122eb=>_0x1122eb['contains'](_0x32df85['target']))||(this['focus'](),_0x32df85['preventDefault']());});}}class rs extends kt{constructor(_0x42e2d9){super(_0x42e2d9);const _0x5e30a2=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5e30a2['to']('count',_0x2b278f=>N(_0x42e2d9,'NUMBER_OF_COMMENTS',_0x2b278f))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xa89f3a,_0x1a3ad3,_0x37166d){super(_0xa89f3a);const _0x1ef3d2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1a3ad3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1a3ad3,this['_config']=_0x37166d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x19c5c8({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1d4a47=>this['commentViews']['map'](_0x2e5607=>_0x2e5607['element'])['includes'](_0x1d4a47['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0xa89f3a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4edb1f=>_0x4edb1f-this['_config']['maxCommentsWhenCollapsed']);for(const _0x475e1d of _0x1a3ad3['comments'])this['_handleNewCommentModel'](_0x475e1d);this['_handleInfoComment'](),this['listenTo'](_0x1a3ad3['comments'],'add',(_0x58a39c,_0x568b36)=>{const _0x3c0355=this['_calculatePosition'](_0x568b36);this['length']++,this['_handleNewCommentModel'](_0x568b36,_0x3c0355),this['refreshVisibleViews']();}),this['listenTo'](_0x1a3ad3['comments'],'remove',(_0x1b436b,_0x30fba8)=>{this['length']--,this['_handleRemoveCommentModel'](_0x30fba8),this['refreshVisibleViews']();}),this['listenTo'](_0x1a3ad3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1a3ad3,'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',_0x1ef3d2['if']('length','ck-hidden',_0x358255=>!_0x358255)],'aria-label':N(_0xa89f3a,'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'](_0x1850c8){-0x1===_0x1850c8?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x328e7d of this['commentViews'])_0x328e7d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2d8234,_0x43ee02){const _0x436934=new this['_config']['CommentView'](this['locale'],_0x2d8234,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x436934['viewUid']=_0x2d8234['id'],_0x436934['delegate']('removeComment')['to'](this),_0x436934['delegate']('updateComment')['to'](this),_0x436934['delegate']('resolveCommentThread')['to'](this),_0x436934['delegate']('editorReady')['to'](this),_0x436934['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x436934,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x436934,_0x43ee02);}['_calculatePosition'](_0x1eb1c3){const _0x28c0b4=this['_model']['_findOptimalIndex'](_0x1eb1c3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1eb1c3['authoredAt']?_0x28c0b4-0x1:_0x28c0b4:_0x28c0b4-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xe23921={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0xe23921,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xe23921));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x55327b){const _0x2de31e=this['commentViews']['remove'](_0x55327b['id']);this['stopListening'](_0x2de31e),_0x2de31e['isEditMode']&&this['_updateHasDirtyComment'](),_0x2de31e['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5217b2=>_0x5217b2['isEditMode']);}['_rearrangeCollapse'](){const _0x1fcc51=function(_0x4a4b3f){const _0x57e8db=new _0x842883();for(const _0x1a4db1 of _0x4a4b3f)_0x57e8db['add'](_0x1a4db1);return _0x57e8db;}(this['commentViews']),_0x836d24=this['_collapsedCommentsView']['count'];for(let _0x57f79d=0x1;_0x57f79d<=_0x836d24;_0x57f79d++)_0x1fcc51['remove'](0x1);for(const _0x54ef0a of _0x1fcc51)_0x54ef0a['collapse']();_0x836d24>0x0&&_0x1fcc51['add'](this['_collapsedCommentsView'],0x1),ns(_0x2c46da(Array['from'](this['visibleViews']),Array['from'](_0x1fcc51)),this['visibleViews'],_0x1fcc51);}['_rearrangeExpand'](){ns(_0x2c46da(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1a6213 of this['visibleViews'])_0x1a6213['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2fd65f=>{this['focusTracker']['add'](_0x2fd65f['element']),this['keystrokes']['listenTo'](_0x2fd65f['element']);}),this['commentViews']['on']('change',(_0x3247b2,_0x4a1c90)=>{for(const _0x438a52 of _0x4a1c90['removed'])this['focusTracker']['remove'](_0x438a52['element']),this['keystrokes']['stopListening'](_0x438a52['element']);for(const _0x284881 of Array['from'](_0x4a1c90['added'])['reverse']())this['focusTracker']['add'](_0x284881['element']),this['keystrokes']['listenTo'](_0x284881['element']);});}}function ns(_0x4e9ac0,_0x31f750,_0x3555a6){let _0x442119=0x0;for(const _0x47610d of _0x4e9ac0)switch(_0x47610d){case'insert':_0x31f750['add'](_0x3555a6['get'](_0x442119),_0x442119),_0x442119++;break;case'delete':_0x31f750['remove'](_0x442119);break;case'equal':_0x442119++;}}class oe extends kt{constructor(_0x29266f){super(_0x29266f);const _0x325e5b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x325e5b['to']('contextValue',_0x5bca93=>N(_0x29266f,'THREAD_CONTEXT_LABEL',_0x5bca93)),'tabindex':-0x1},'children':[{'text':_0x325e5b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x115d1d,_0x22e667){super(_0x115d1d);const _0x3a1520=this['bindTemplate'];this['_model']=_0x22e667,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x19c5c8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5e017a=>!!_0x5e017a),this['bind']('contextValue')['to'](this['_model'],'context',_0xb974db=>_0xb974db&&_0xb974db['value']?this['_trimContextValue'](_0xb974db['value']):N(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',_0x3a1520['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 _0x1fe44b=new _0x503639(this['locale']);return _0x1fe44b['label']=N(this['locale'],'Reopen'),_0x1fe44b['tooltip']=N(this['locale'],'Reopen'),_0x1fe44b['icon']=_0x5dbd54,_0x1fe44b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3fdd59=>!_0x3fdd59),_0x1fe44b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3a76a3,_0x1ff37a)=>_0x3a76a3&&_0x1ff37a),_0x1fe44b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1fe44b;}['_trimContextValue'](_0x5601af){if(_0x5601af['length']<0x96)return _0x5601af;const _0x36660c=_0x5601af['lastIndexOf']('\x20',0x93);return _0x5601af['substring'](0x0,_0x36660c>-0x1?_0x36660c:0x93)+'...';}['_attachContextActions'](){const _0x27a0d0=this['element']['querySelector']('.ck-context'),_0x5da9b3=_0x27a0d0['querySelector']('.ck-context__value');this['listenTo'](_0x27a0d0,'mouseenter',()=>{_0x5da9b3['offsetWidth']<_0x5da9b3['scrollWidth']&&_0x27a0d0['classList']['add']('overlay');}),this['listenTo'](_0x27a0d0,'mouseleave',()=>{_0x27a0d0['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2677ab of this['focusables'])this['focusTracker']['add'](_0x2677ab['element']),this['keystrokes']['listenTo'](_0x2677ab['element']);}['_createContextView'](){const _0x251647=new oe(this['locale']);return _0x251647['bind']('contextValue')['to'](this),_0x251647;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3a494f,_0x34f844,_0x1c61c9,_0x3b733e){super(_0x3a494f),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x34f844,this['_localUser']=_0x1c61c9,this['_config']=_0x3b733e,this['commentThreadHeaderView']=new Xt(_0x3a494f,_0x34f844),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3a494f,N(_0x3a494f,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3a494f,_0x34f844,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3b733e)),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',(_0xdd3d8d,_0x1437fc)=>_0xdd3d8d||!!_0x1437fc),this['bind']('isUnlinked')['to'](_0x34f844,'unlinkedAt',_0x6c6bfb=>!!_0x6c6bfb),this['bind']('ariaLabel')['to'](this,'length',_0x6d7c4e=>{const _0x34074c=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x6d7c4e,_0x34074c]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x19c5c8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xe96758=>_0xe96758['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3b25e4=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5df8e8=_0x3b25e4['commentInputView'];return _0x3b25e4['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5df8e8,'value',(_0x33002f,_0x440792,_0x5c6b6d,_0x5cac80,_0x5dcbae)=>!!_0x5dcbae||!!_0x5cac80&&_0x5c6b6d&&!_0x440792||_0x33002f&&_0x5c6b6d&&!_0x440792),_0x5df8e8['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x88f8c8,_0x1def43,_0xb7ea61)=>{let _0x3f5a59;return _0x3f5a59=_0xb7ea61&&_0x1def43?'Reply\x20to\x20reopen\x20discussion...':_0x88f8c8?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3f5a59);}),_0x5df8e8['bind']('submitLabel')['to'](this,'length',_0x51a309=>N(this['locale'],_0x51a309?'Reply':'Comment')),_0x5df8e8['on']('submit',(_0x40722a,_0x7fc92)=>{this['fire']('addComment',_0x7fc92),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5df8e8['on']('cancel',()=>{this['focus']();}),_0x5df8e8['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5df8e8['on']('cancel',_0x3c7f69=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3c7f69['stop']());}),this['on']('change:isActive',(_0x259bb1,_0x21b454,_0x4040da)=>{_0x4040da||this['length']||_0x5df8e8['value']||this['fire']('removeCommentThread');}),_0x3b25e4;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x43fe43,_0x5a0a60,_0xfbd1a2,_0xb5379e){super(_0x43fe43,_0x5a0a60,_0xfbd1a2,_0xb5379e),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x43fe43,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x4fd735,_0x216366,_0x23d86)=>{_0x23d86||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x19c5ca,_0x3c8804,_0x598029)=>{_0x598029&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x51458c=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x51458c['if']('isActive','ck-thread--active'),_0x51458c['if']('isUnlinked','ck-thread--unlinked'),_0x51458c['to']('actionIndicator',_0x3007a2=>_0x3007a2?'ck-thread--'+_0x3007a2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x51458c['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 _0x7e13a0 of this['commentsListView']['commentViews'])_0x7e13a0['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3092ec}=this,_0x4eca34=this['commentsListView']['commentViews']['get'](0x0);_0x4eca34===this['_boundFirstCommentView']||_0x4eca34['isSystemComment']||(this['_boundFirstCommentView']=_0x4eca34,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x4eca34,'actionIndicator',_0x45fa4f=>'remove'===_0x45fa4f?'remove':null),_0x4eca34['placeholder']=N(_0x3092ec,'Write\x20a\x20comment...'),_0x4eca34['removeButton']['on']('execute',_0x178e3e=>{_0x178e3e['stop'](),this['showConfirm'](N(_0x3092ec,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x4eca34['focus']();}),_0x4eca34['actionBar']['add'](this['resolveButton'],0x0),_0x4eca34['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x15a066=new _0x3a4bb7(this['locale']);return _0x15a066['label']=N(this['locale'],'Resolve'),_0x15a066['tooltip']=N(this['locale'],'Resolve'),_0x15a066['icon']=_0x3ac145,_0x15a066['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x15a066['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x24f20c=>!_0x24f20c),_0x15a066['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5bfca3,_0xd6bbe7)=>_0x5bfca3&&!_0xd6bbe7),_0x15a066['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x15a066;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x202186){super(_0x202186),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x4580aa,_0x41e782,_0x5a131f)=>{this['element']['innerHTML']=_0x5a131f;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x4a1bc9,_0x99cc89,_0x4b17c8){super(_0x4a1bc9),this['_model']=_0x99cc89,this['_config']=_0x4b17c8,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x99cc89,'content',_0x99cc89,'authoredAt',(_0x3262d1,_0x3b2f55)=>N(_0x4a1bc9,'COMMENT_ARIA_LABEL',[_0x99cc89['author']['name'],_0x4b17c8['formatDateTime'](_0x3b2f55),new DOMParser()['parseFromString'](_0x3262d1,'text/html')['body']['textContent'],_0x99cc89['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x4a1bc9,N(_0x4a1bc9,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x3aecc1(),this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x19c5c8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x24380e=>_0x24380e['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']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x454490=new is(this['locale']);return _0x454490['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x5746b6,_0x37c58a)=>_0x37c58a?ts(_0x5746b6,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x5746b6),_0x454490;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x22f189=new es(this['locale'],this['_config']['editorConfig']);return _0x22f189['value']=this['_model']['content'],_0x22f189['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x22f189['submitLabel']=N(this['locale'],'Save'),_0x22f189['on']('submit',(_0x3fdbfd,_0x118f04)=>{this['fire']('updateComment',this['_model']['id'],_0x118f04),this['switchToDisplayMode'](),this['focus']();}),_0x22f189['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x22f189['once']('editorReady',()=>{_0x22f189['focus']();}),_0x22f189['createEditor'](),_0x22f189['delegate']('editorReady')['to'](this),_0x22f189['delegate']('editorDestroyed')['to'](this),_0x22f189;}['_setupKeyboardNavigation'](){const _0x5dfc06=this['element'];this['keystrokes']['listenTo'](_0x5dfc06);for(const _0x4cfb1c of this['focusables'])this['focusTracker']['add'](_0x4cfb1c['element']),this['keystrokes']['listenTo'](_0x4cfb1c['element']);this['focusables']['on']('change',(_0xf112ca,_0x2b4c6d)=>{for(const _0x1e6951 of _0x2b4c6d['removed'])this['focusTracker']['remove'](_0x1e6951['element']),this['keystrokes']['stopListening'](_0x1e6951['element']);for(const _0x5756b0 of _0x2b4c6d['added'])this['focusTracker']['add'](_0x5756b0['element']),this['keystrokes']['listenTo'](_0x5756b0['element']);}),this['keystrokes']['set']('enter',(_0x870576,_0x1a7d32)=>{_0x5dfc06===_0x870576['target']&&(this['focusCycler']['focusFirst'](),_0x1a7d32());}),this['keystrokes']['set']('esc',(_0x318da0,_0x5491bc)=>{_0x5dfc06!==_0x318da0['target']&&(this['focus'](),_0x5491bc());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0x2c0648,_0x5cbce3,_0x2331c8){super(_0x2c0648,_0x5cbce3,_0x2331c8),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x2c0648,'Reply...')),this['bind']('authoredAt')['to'](_0x5cbce3),this['bind']('resolvedAt')['to'](_0x5cbce3),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 _0x38294c(_0x2c0648,_0x5cbce3['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5cbce3,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x347834=this['bindTemplate'],_0x9a970c=[{'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':_0x347834['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x347834['to']('authoredAt',_0x3545d4=>this['_config']['formatDateTime'](_0x3545d4))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x347834['if']('isEditMode','ck-comment__actions--hidden'),_0x347834['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']&&_0x9a970c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x347834['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x347834['if']('isEditMode','ck-comment--edit'),_0x347834['if']('isSystemComment','ck-comment--info'),_0x347834['to']('actionIndicator',_0x394ced=>_0x394ced?'ck-comment--'+_0x394ced:'')],'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':_0x9a970c}]}]};}['_createEditButton'](){const _0x59a729=new _0x503639(this['locale']);return _0x59a729['label']=N(this['locale'],'Edit'),_0x59a729['icon']=_0x34e1c9,_0x59a729['withText']=!0x0,_0x59a729['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x59a729['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x423c98=>!_0x423c98),_0x59a729['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x59a729['on']('execute',()=>this['switchToEditMode']()),_0x59a729;}['_createRemoveButton'](){const _0xcbd632=new _0x503639(this['locale']);return _0xcbd632['label']=N(this['locale'],'Remove'),_0xcbd632['icon']=_0x5eeb8f,_0xcbd632['withText']=!0x0,_0xcbd632['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xcbd632['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x22edae=>!_0x22edae),_0xcbd632['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xcbd632['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xcbd632;}['_createDropdown'](){const _0x51381b=_0x552229(this['locale'],_0x44e940),_0x535ac5=_0x51381b['panelView']['children'],_0x2facde=new _0x4289d3(this['locale']),_0x106179=_0x51381b['bindTemplate'];_0x238596(_0x51381b,()=>this['items']['find'](_0x2a8c88=>_0x2a8c88['isVisible'])),_0x51381b['extendTemplate']({'attributes':{'class':[_0x106179['if']('isVisible','ck-hidden',_0xf5766=>!_0xf5766)]}});const _0x5e6875=(_0x301328,_0x51dd19=-0x1)=>{const _0x276532=new _0x489e41(this['locale']);_0x276532['children']['add'](_0x301328);const _0x43f47d=_0x51dd19>-0x1?_0x51dd19:_0x2facde['items']['length'];_0x2facde['items']['add'](_0x276532,_0x43f47d);const _0x324b82=Array['from'](this['items']);_0x51381b['unbind']('isEnabled','isVisible'),_0x51381b['bind']('isEnabled')['toMany'](_0x324b82,'isEnabled',(..._0x4aecc4)=>_0x4aecc4['some'](_0x15f878=>_0x15f878)),_0x51381b['bind']('isVisible')['toMany'](_0x324b82,'isVisible',(..._0x201cbe)=>_0x201cbe['some'](_0x110008=>_0x110008));};_0x51381b['panelPosition']='sw',_0x51381b['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x13e749});for(const _0x2a6475 of this['items'])_0x5e6875(_0x2a6475);return _0x535ac5['add'](_0x2facde),_0x51381b['listenTo'](this['items'],'add',(_0x242639,_0x3223b5,_0x1ffe0a)=>{_0x5e6875(_0x3223b5,_0x1ffe0a);}),_0x51381b['listenTo'](this['items'],'remove',(_0x377262,_0x185c5d,_0x5102cb)=>{_0x2facde['items']['remove'](_0x5102cb);}),_0x51381b;}['_attachActions'](_0x2e0ef9,_0x4e29b7){const _0x1ba3a5=_0x2e0ef9&&_0x2e0ef9['element'];_0x1ba3a5&&(this['listenTo'](_0x1ba3a5,'mouseenter',()=>this['actionIndicator']=_0x4e29b7),this['listenTo'](_0x1ba3a5,'focus',()=>this['actionIndicator']=_0x4e29b7),this['listenTo'](_0x1ba3a5,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x1ba3a5,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x184b62=super['_createCommentInputView']();return _0x184b62['bind']('placeholder')['to'](this),_0x184b62;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x3f81c0){const _0x2f072c=Dt(_0x3f81c0,0x1e),_0x230dee=new MutationObserver(_0xe4a26c=>{for(const _0x59d3e4 of _0xe4a26c)('attributes'==_0x59d3e4['type']&&'class'==_0x59d3e4['attributeName']||'childList'==_0x59d3e4['type']||'characterData'==_0x59d3e4['type'])&&_0x2f072c();});return{'attach'(_0x236d18){_0x230dee['observe'](_0x236d18,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x230dee['disconnect'](),_0x2f072c['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2350dc,_0x2c237a){super(_0x2350dc),this['id']=_0x1ce077(),this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x20f56c,_0x455a59)=>this['fire']('Esc',_0x455a59)),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'](_0x2c237a),this['mainView']=_0x2c237a;const _0xbafb7c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xbafb7c['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 _0x25a8a5=this['element']['clientHeight'];_0x25a8a5&&(this['height']=_0x25a8a5);}}class T extends/* #__PURE__ -- @preserve */
29
- _0x5df269(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2351a5,target:_0x528998,type:_0x4de8fe,isVisible:_0x56a0c1=!0x0}){super(),this['view']=_0x2351a5,this['view']['element']||this['view']['render'](),this['_type']=_0x4de8fe,this['_target']=_0x528998,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x842883([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x318649,_0x591835)=>{this['view']['focusTracker']['add'](_0x591835);}),this['focusableElements']['on']('remove',(_0x180045,_0x3281e7)=>{this['view']['focusTracker']['remove'](_0x3281e7);}),this['set']('isVisible',_0x56a0c1);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3348eb=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x3348eb),_0x3348eb;}get['targetRect'](){const _0x27c902=this['target'];if(null===_0x27c902)return null;if(_0x27c902 instanceof _0x221bff)return _0x27c902;const _0x126ed2=_0x27c902['filter'](_0x485986=>function(_0x5c93a6){const _0x247f4=_0x5c93a6['offsetParent'];if(_0x247f4)return!0x0;const _0xdd38bf=_0x5c93a6['getClientRects']()['item'](0x0);return!!_0xdd38bf;}(_0x485986));return 0x0===_0x126ed2['length']?null:new _0x221bff(_0x126ed2[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1af421){this['view']['isActive']=_0x1af421,this['view']['mainView']['isActive']=_0x1af421;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x316889){if(!(null===_0x316889||_0x316889 instanceof _0x221bff||Array['isArray'](_0x316889)&&_0x316889['every'](_0xb57c1a=>fi(_0xb57c1a))))throw new _0x552662('annotation-invalid-target',null,{'target':_0x316889});}['_getNormalizedTarget'](){const _0x356b5d='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x356b5d)?[_0x356b5d]:_0x356b5d;}}function fi(_0x537c8a){return null!==_0x537c8a&&'object'==typeof _0x537c8a&&'nodeType'in _0x537c8a&&0x1===_0x537c8a['nodeType'];}class S extends _0x842883{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5ebffe=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x67b3fd(),this['_focusTracker']['on']('change:isFocused',(_0x228622,_0x48af20,_0x57c2fa)=>{_0x57c2fa||this['fire']('blur');});for(const _0x2d034e of _0x5ebffe)this['add'](_0x2d034e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x313039){if(this['has'](_0x313039))throw new _0x552662('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x313039['innerView'],_0x313039),this['_viewToAnnotation']['set'](_0x313039['view'],_0x313039);for(const _0x34f474 of _0x313039['focusableElements'])this['_focusTracker']['add'](_0x34f474);this['listenTo'](_0x313039['focusableElements'],'add',(_0x541d0f,_0x4eaa2b)=>{this['_focusTracker']['add'](_0x4eaa2b);}),this['listenTo'](_0x313039['focusableElements'],'remove',(_0x180c7e,_0x209693)=>{this['_focusTracker']['remove'](_0x209693);}),this['listenTo'](_0x313039['view']['focusTracker'],'change:isFocused',(_0x1cca38,_0x50bec6,_0x5e7269)=>{_0x5e7269&&this['fire']('focus',_0x313039);}),_0x313039['updateTargetRect']();const _0x4e2831=this['_getOrderInContent'](_0x313039['view']['targetRect']);return super['add'](_0x313039,_0x4e2831);}['remove'](_0x363418){if(!this['has'](_0x363418))throw new _0x552662('annotationcollection-not-existing-item',null);this['stopListening'](_0x363418['view']['focusTracker']),this['stopListening'](_0x363418['focusableElements']);for(const _0xcc7b88 of _0x363418['focusableElements'])this['_focusTracker']['remove'](_0xcc7b88);return this['_viewToAnnotation']['delete'](_0x363418['view']),this['_innerViewToAnnotation']['delete'](_0x363418['innerView']),super['remove'](_0x363418);}['getByInnerView'](_0x593a14){return this['_innerViewToAnnotation']['get'](_0x593a14);}['getByView'](_0xde776f){return this['_viewToAnnotation']['get'](_0xde776f);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x371884 of this)_0x371884['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3c45b1=Array['from'](this)['sort']((_0x3b00cf,_0x560be0)=>w(_0x3b00cf['view']['targetRect'],_0x560be0['view']['targetRect']));for(let _0x28d85e=_0x3c45b1['length']-0x1;_0x28d85e>0x0;_0x28d85e--){const _0x2dc4df=_0x3c45b1[_0x28d85e];_0x28d85e!==this['getIndex'](_0x2dc4df)&&(this['remove'](_0x2dc4df),this['add'](_0x2dc4df));}}['_getOrderInContent'](_0x28b776){let _0x5687c7=0x0;if(!_0x28b776)return this['length'];for(const _0x353821 of this){const _0x1e4dd5=_0x353821['view']['targetRect'];if(_0x1e4dd5){if(w(_0x28b776,_0x1e4dd5)<0x0)return _0x5687c7;_0x5687c7++;}}return _0x5687c7;}}function v({source:_0x232d48,target:_0x235588,filter:_0x20b293}){for(const _0x54aaa4 of _0x232d48)_0x20b293(_0x54aaa4)&&_0x235588['add'](_0x54aaa4);_0x235588['listenTo'](_0x232d48,'add',(_0x167313,_0x2183e3)=>{_0x20b293(_0x2183e3)&&_0x235588['add'](_0x2183e3);}),_0x235588['listenTo'](_0x232d48,'remove',(_0x5e389d,_0x46bb12)=>{_0x235588['has'](_0x46bb12)&&_0x235588['remove'](_0x46bb12);});}function w(_0x2950f4,_0x5949dd){if(null===_0x2950f4&&null===_0x5949dd)return 0x0;if(null===_0x2950f4)return-0x1;if(null===_0x5949dd)return 0x1;const _0x1016a4=_0x2950f4['top']-_0x5949dd['top'];return 0x0==_0x1016a4?_0x2950f4['left']-_0x5949dd['left']:_0x1016a4;}class y extends _0x43ff48{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xeb075f){if(super(_0xeb075f),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xeb075f instanceof _0x3db27d){const _0xd87e3b=_0xeb075f['locale'];_0xeb075f['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3405b8){this['collection']['add'](_0x3405b8);}['remove'](_0x4fe9a8){this['collection']['remove'](_0x4fe9a8),_0x4fe9a8['destroy']();}['refreshVisibility'](){for(const _0x236af6 of this['collection'])_0x236af6['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2be777){return this['collection']['getByInnerView'](_0x2be777);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1e5ca8 of this['collection'])_0x1e5ca8['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x14fc3f){this['fire']('_activateAnnotation',_0x14fc3f);}['createAnnotation'](_0x572d8c){return new T(_0x572d8c);}['createAnnotationView'](_0x174455,_0x448b75){return new E(_0x174455,_0x448b75);}['_addActiveAnnotation'](_0x7e00fe){const _0x4a9150=new Set(this['activeAnnotations']);_0x4a9150['add'](_0x7e00fe),this['activeAnnotations']=_0x4a9150;}['_removeActiveAnnotation'](_0xcf5a60){const _0x5352d6=new Set(this['activeAnnotations']);_0x5352d6['delete'](_0xcf5a60),this['activeAnnotations']=_0x5352d6;}['_bindAnnotationsToVisibleAnnotations'](){const _0x39d6ad=this['collection'],_0x2c847e=this['_visibleAnnotations'];function _0x11f74b(_0x100a38){const _0x418f42=_0x100a38['source'];_0x418f42['isVisible']&&!_0x2c847e['has'](_0x418f42)?_0x2c847e['add'](_0x418f42):!_0x418f42['isVisible']&&_0x2c847e['has'](_0x418f42)&&_0x2c847e['remove'](_0x418f42),_0x418f42['view']['focusTracker']['remove'](_0x418f42['view']['element']),_0x418f42['view']['focusTracker']['add'](_0x418f42['view']['element']);}this['listenTo'](_0x39d6ad,'add',(_0x43f8b9,_0x51cd53)=>{_0x51cd53['isVisible']&&_0x2c847e['add'](_0x51cd53),this['listenTo'](_0x51cd53,'change:isVisible',_0x11f74b);}),this['listenTo'](_0x39d6ad,'remove',(_0x2f1902,_0x4d8f32)=>{_0x2c847e['has'](_0x4d8f32)&&_0x2c847e['remove'](_0x4d8f32),this['stopListening'](_0x4d8f32,'change:isVisible',_0x11f74b);});}['_setupEnterAnnotationKeystroke'](){const _0x4737e1=_0x315a18=>{_0x315a18['on']('ready',()=>{_0x315a18['keystrokes']['set'](_0x894944,(_0x4863a7,_0x271da0)=>{const _0x12aba7=_0x32a71d(this['activeAnnotations']['values']());_0x12aba7&&(_0x12aba7['view']['focus'](),_0x271da0());});});};this['context']instanceof _0x3db27d?_0x4737e1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x13de0d,_0x3994b9)=>{_0x4737e1(_0x3994b9);});}['_setupEscapeAnnotationHandling'](){const _0x36a60b=_0x32b98b=>{const _0x325a24=_0x32b98b['source'],_0xf3670f=[];let _0x3e5a65;if(Array['isArray'](_0x325a24['target'])){_0x3e5a65=_0x325a24['target'][0x0],this['context']instanceof _0x3db27d?_0xf3670f['push'](this['context']):this['context']['editors']&&_0xf3670f['push'](...this['context']['editors']);for(const _0x3568ce of _0xf3670f)for(const _0x491324 of _0x3568ce['editing']['view']['domRoots']['values']())if(_0x491324['contains'](_0x3e5a65))return void _0x3568ce['editing']['view']['focus']();_0x3e5a65['focus']();}};this['listenTo'](this['collection'],'add',(_0x5bf4f9,_0x105fee)=>{this['listenTo'](_0x105fee,'escape',_0x36a60b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x44ffaf,_0x6a0bd5)=>{this['stopListening'](_0x6a0bd5,'escape',_0x36a60b);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x43ff48{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ee196){super(_0x1ee196),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x23ba06=this['context']['config'];_0x23ba06['define']('comments.maxCommentsWhenCollapsed',0x2),_0x23ba06['define']('comments.maxThreadTotalWeight',0x1f4),_0x23ba06['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x23ba06['define']('comments.CommentThreadView',gt),_0x23ba06['define']('comments.CommentView',Tt),_0x23ba06['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x202813=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2f400b,_0x3e5864)=>this['_addCommentThread'](_0x3e5864)),this['on']('submitCommentThread',(_0x4ebbd2,_0x561f64)=>this['_submitCommentThread'](_0x561f64)),this['on']('resolveCommentThread',(_0xbdda93,_0x307b9f)=>this['_resolveCommentThread'](_0x307b9f)),this['on']('resolveCommentThread',(_0x46be1f,_0x268832)=>this['_updateActiveAnnotation'](_0x268832),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x48b631,_0x59ca82)=>this['_reopenCommentThread'](_0x59ca82)),this['on']('reopenCommentThread',(_0x5739aa,_0x446c98)=>this['_updateActiveAnnotation'](_0x446c98),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x353d16,_0x135657)=>this['_removeCommentThread'](_0x135657)),this['on']('updateCommentThread',(_0x1c023f,_0x3167f6)=>this['_updateCommentThread'](_0x3167f6)),this['on']('updateCommentThread',(_0xa397e3,_0x4dde91)=>this['_updateActiveAnnotation'](_0x4dde91),{'priority':'lowest'}),this['on']('addComment',(_0x1f8c08,_0x90d25a)=>this['_addComment'](_0x90d25a)),this['on']('updateComment',(_0xa7c4e1,_0x313ddc)=>this['_updateComment'](_0x313ddc)),this['on']('removeComment',(_0x4b656d,_0x25e943)=>this['_removeComment'](_0x25e943)),this['on']('addComment',(_0x1b8b02,{threadId:_0x19aa64,isFromAdapter:_0x5cafc})=>{if(_0x5cafc)return;const _0x23bf99=this['getCommentThread'](_0x19aa64),_0x1fb7e7=_0x23bf99&&this['_threadToController']['get'](_0x23bf99);_0x1fb7e7&&_0x1fb7e7['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x202813,'change:activeAnnotations',(_0x2faea1,_0x4c0a3e,_0x20b615)=>{const _0xe699f1=Array['from'](_0x20b615)['map'](_0x24dcf6=>this['_viewToController']['get'](_0x24dcf6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xe699f1?_0xe699f1['model']:null;});}set['adapter'](_0x53686b){if(this['_adapter'])throw new _0x552662('commentsrepository-adapter-already-set');this['_adapter']=_0x53686b;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5b2e7e=_t,threadId:_0xaf6907=_0x1ce077(),comments:_0x2fefd7=[],unlinkedAt:_0x5e9312=null,resolvedAt:_0x299b6b=null,resolvedBy:_0x5e4c8b=null,target:_0x527f01=null,context:_0x3a68c8=null,attributes:_0x43e4e5={},isResolvable:_0x2becb0=!0x0,isSubmitted:_0x142150=!0x1,isFromAdapter:_0x1c340c=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x5b2e7e),{'channelId':_0x5b2e7e,'threadId':_0xaf6907,'comments':_0x2fefd7,'unlinkedAt':_0x5e9312,'resolvedAt':_0x299b6b,'resolvedBy':_0x5e4c8b,'target':_0x527f01,'context':_0x3a68c8,'attributes':_0x43e4e5,'isFromAdapter':_0x1c340c,'isResolvable':_0x2becb0,'isSubmitted':_0x142150}),this['getCommentThread'](_0xaf6907);}['openNewCommentThread']({channelId:_0x5995da=_t,threadId:_0x2db3d8=_0x1ce077(),target:_0xdf9a77,context:_0x3a441e=null,isResolvable:_0x237c2c=!0x0}){if(this['_readOnlyChannels']['has'](_0x5995da)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0xdf9a77)throw new _0x552662('commentsrepository-missing-target');const _0x21008f=this['addCommentThread']({'channelId':_0x5995da,'threadId':_0x2db3d8,'target':_0xdf9a77,'context':_0x3a441e,'isResolvable':_0x237c2c});if(!_0x21008f)return null;const _0x3f69c7=this['_threadToController']['get'](_0x21008f),_0x33134d=_0x3f69c7['view']['commentThreadInputView']['commentInputView'],_0x345ccf=this['context']['plugins']['get'](y),_0x5e5692=_0x345ccf['getByInnerView'](_0x3f69c7['view']);return _0x345ccf['activate'](_0x5e5692),_0x33134d['once']('editorReady',()=>_0x33134d['focus']()),_0x21008f;}['hasCommentThread'](_0x4c3d30){if('string'!=typeof _0x4c3d30)throw new _0x552662('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4c3d30);}['updateCommentThread']({channelId:_0x165189=_t,threadId:_0x5186ae,context:_0x627c50,unlinkedAt:_0x2cc842,attributes:_0x3876ab,isFromAdapter:_0x2a91d2=!0x1}){return this['fire'](Nt('updateCommentThread',_0x165189),{'channelId':_0x165189,'threadId':_0x5186ae,'context':_0x627c50,'unlinkedAt':_0x2cc842,'attributes':_0x3876ab,'isFromAdapter':_0x2a91d2}),this['getCommentThread'](_0x5186ae);}['getCommentThread'](_0x2b8244){if('string'!=typeof _0x2b8244)throw new _0x552662('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2b8244);}['fetchCommentThread']({channelId:_0x8f9ebc,threadId:_0x250f61}={}){const _0x5bd4e7=this['getCommentThread'](_0x250f61);if(_0x5bd4e7)return Promise['resolve'](_0x5bd4e7);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x552662('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x8f9ebc,'threadId':_0x250f61})['then'](_0x4b0334=>this['hasCommentThread'](_0x250f61)?this['getCommentThread'](_0x250f61):_0x4b0334?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x8f9ebc},_0x4b0334)):void 0x0)['catch'](_0x99102e=>{throw console['error'](_0x99102e),new _0x552662('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1e8c64,skipNotAttached:_0x236a74=!0x1,skipEmpty:_0x536d78=!0x1,toJSON:_0xc438b2=!0x1}={}){const _0x2114c0=[];for(const _0x47974b of this['_threads']['values']())_0x1e8c64&&_0x47974b['channelId']!==_0x1e8c64||_0x236a74&&!_0x47974b['isAttached']||_0x536d78&&0x0===_0x47974b['length']||_0x2114c0['push'](_0x47974b);return _0xc438b2?_0x2114c0['map'](_0x1cb853=>_0x1cb853['toJSON']()):_0x2114c0;}['getAnnotationForCommentThread'](_0x22f524){const _0x108d85=this['_threadToController']['get'](_0x22f524);if(!_0x108d85)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x108d85['view'])||null;}['getCommentThreadForAnnotation'](_0x4ed316){const _0x44d007=this['_viewToController']['get'](_0x4ed316['innerView']);return _0x44d007?_0x44d007['model']:null;}['setActiveCommentThread'](_0x1c8046){const _0xc715c9=this['context']['plugins']['get'](y);if(!_0x1c8046)return void(this['activeCommentThread']&&_0xc715c9['deactivateAll']());const _0x5e6350=this['getCommentThread'](_0x1c8046);if(!_0x5e6350)throw new _0x552662('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1c8046});if(!this['_threadToController']['has'](_0x5e6350))throw new _0x552662('commentsrepository-active-not-attached',null,{'threadId':_0x1c8046});const _0x53a72e=_0xc715c9['getByInnerView'](this['_threadToController']['get'](_0x5e6350)['view']);_0xc715c9['activate'](_0x53a72e);}['switchReadOnly'](_0x29fa90,_0x6d7b95){_0x29fa90?this['_readOnlyChannels']['add'](_0x6d7b95):this['_readOnlyChannels']['delete'](_0x6d7b95),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x386d92){return this['_readOnlyChannels']['has'](_0x386d92)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x51a1f6,_0x426ef5){return new vt(_0x51a1f6,_0x426ef5);}['setPermissions'](_0x528a3f,_0x29dbcc=_t){this['_permissions']['set'](_0x29dbcc,_0x528a3f),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x50fcfa=_t){return this['_permissions']['has'](_0x50fcfa)?this['_permissions']['get'](_0x50fcfa):bt;}['_addCommentThread']({channelId:_0x17be1b,threadId:_0x46b6c5,comments:_0x5b5c70,unlinkedAt:_0x3d3db8,resolvedAt:_0x2734bd,resolvedBy:_0x18beac,target:_0x3f88a4,context:_0x549073,attributes:_0x458f80,isFromAdapter:_0x36947f,isResolvable:_0x277cfc,isSubmitted:_0x2a1ca3}){if('string'!=typeof _0x46b6c5)throw new _0x552662('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x46b6c5});if(this['hasCommentThread'](_0x46b6c5))throw new _0x552662('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x46b6c5});const _0x42933e=new pi(this,{'channelId':_0x17be1b,'id':_0x46b6c5,'context':_0x549073,'attributes':_0x458f80,'unlinkedAt':_0x3d3db8,'resolvedAt':_0x2734bd,'resolvedBy':_0x18beac?this['context']['plugins']['get'](it)['getUser'](_0x18beac):null,'isResolvable':_0x277cfc,'isSubmitted':_0x2a1ca3||_0x36947f});this['_threads']['set'](_0x46b6c5,_0x42933e);for(const _0x33b8ee of _0x5b5c70)_0x42933e['_add'](this['_createNewComment']({'threadId':_0x46b6c5,..._0x33b8ee}));return _0x3f88a4&&_0x42933e['attachTo'](_0x3f88a4),_0x36947f||!_0x42933e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x17be1b,'threadId':_0x46b6c5});}['_submitCommentThread']({channelId:_0x12aaff,threadId:_0x4d1534}){if(!this['hasCommentThread'](_0x4d1534))throw new _0x552662('commentsrepository-missing-comment-thread',this);const _0x2db813=this['getCommentThread'](_0x4d1534);if(_0x2db813['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x59446b,comments:_0x39d317,resolvedAt:_0x27b71f,resolvedBy:_0x55e6f6,context:_0x11d414,attributes:_0x3993fc}=_0x2db813,_0x4c1f25=this['context']['plugins']['get']('PendingActions'),_0xc9c5ef=_0x4c1f25['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x12aaff,'threadId':_0x59446b,'comments':_0x39d317['map'](_0xaed718=>_0xaed718['toJSON']()),'resolvedAt':_0x27b71f,'resolvedBy':_0x55e6f6?_0x55e6f6['id']:_0x55e6f6,'context':_0x11d414,'attributes':_0x3993fc})['then'](({comments:_0x318edf})=>{_0x4c1f25['remove'](_0xc9c5ef);for(const _0x37a8e8 of _0x318edf)this['_updateComment']({'channelId':_0x12aaff,'threadId':_0x4d1534,'commentId':_0x37a8e8['commentId'],'createdAt':_0x37a8e8['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x442227=>{throw console['error'](_0x442227),new _0x552662('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x27a42f,target:_0xa7dcd2}){const _0x40267b=this['getCommentThread'](_0x27a42f);if(!_0x40267b)throw new _0x552662('commentsrepository-attach-missing-comment-thread',this);const _0x567082=this['context']['plugins']['get']('PendingActions'),_0x505c48=this['context']['plugins']['get'](y),_0x49f85c=this['_createCommentThreadView'](_0x40267b),_0x552610=new vt(_0x40267b,_0x49f85c);let _0x53f8d0=null;_0x49f85c['on']('change:isDirty',(_0x3d2696,_0x563a67,_0x46fd81)=>{_0x46fd81?_0x53f8d0=_0x567082['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x53f8d0&&(_0x567082['remove'](_0x53f8d0),_0x53f8d0=null);}),this['_threadToController']['set'](_0x40267b,_0x552610),this['_viewToController']['set'](_0x49f85c,_0x552610);const _0x1792b0=new E(this['context']['locale'],_0x49f85c);_0x1792b0['bind']('length')['to'](_0x49f85c),_0x1792b0['bind']('isDirty')['to'](_0x49f85c,'isDirty',_0x49f85c,'length',(_0xd7c40,_0x25c4e8)=>_0xd7c40||!_0x25c4e8),_0x1792b0['bind']('isActive')['to'](_0x49f85c),_0x1792b0['type']='comment';const _0x43897a=new T({'view':_0x1792b0,'target':_0xa7dcd2,'type':'comment','isVisible':!_0x40267b['archivedAt']&&!!('function'==typeof _0xa7dcd2?_0xa7dcd2():_0xa7dcd2)});return _0x49f85c['on']('escape',()=>{_0x43897a['fire']('escape');}),this['_bindAnnotationToEditors'](_0x49f85c,_0x43897a),_0x505c48['add'](_0x43897a),_0x43897a;}['_bindAnnotationToEditors'](_0xb928ea,_0x4c829b){this['listenTo'](_0xb928ea,'editorReady',(_0x20edda,_0x4001f4)=>{const _0x5a619a=_0x4001f4['ui']['view']['body']['bodyCollectionContainer'];_0x4c829b['focusableElements']['add'](_0x5a619a),this['context']instanceof _0x3db27d&&this['context']['ui']['focusTracker']['add'](_0x5a619a);},{'priority':'highest'}),this['listenTo'](_0xb928ea,'editorDestroyed',(_0x174579,_0x4583eb)=>{const _0x2ad4c7=_0x4583eb['ui']['view']['body']['bodyCollectionContainer'];_0x4c829b['focusableElements']['has'](_0x2ad4c7)&&_0x4c829b['focusableElements']['remove'](_0x2ad4c7),this['context']instanceof _0x3db27d&&this['context']['ui']['focusTracker']['remove'](_0x2ad4c7);});}['_unbindEditors'](_0x9aa023){this['stopListening'](_0x9aa023,'editorReady'),this['stopListening'](_0x9aa023,'editorDestroyed');}['_createCommentThreadView'](_0x6330e2){const _0x585ebd=this['context']['plugins']['get'](it),{config:_0x3f3834,locale:_0x1360ac}=this['context'],_0x238b0f=pt(_0x3f3834['get']('locale'),_0x1360ac);return new(0x0,(_0x3f3834['get']('comments'))['CommentThreadView'])(_0x1360ac,_0x6330e2,_0x585ebd['me'],{'editorConfig':{..._0x3f3834['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3f3834['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3f3834['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3f3834['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3f3834['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x238b0f,'CommentView':_0x3f3834['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2a80df,channelId:_0xd8c0b4,resolvedAt:_0x3f0267,resolvedBy:_0x57e6c4,isFromAdapter:_0xbd7f52}){if(!this['hasCommentThread'](_0x2a80df))throw new _0x552662('commentsrepository-missing-comment-thread',null,{'threadId':_0x2a80df});const _0x276f4d=this['getCommentThread'](_0x2a80df);if(_0x276f4d['isResolved'])throw new _0x552662('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2a80df});const _0x2a19a4=this['context']['plugins']['get'](it);if(_0x276f4d['resolvedBy']=_0x2a19a4['getUser'](_0x57e6c4),_0x276f4d['resolvedAt']=_0x3f0267,_0xbd7f52||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3271ef=this['context']['plugins']['get']('PendingActions'),_0x2dc723=_0x3271ef['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xd8c0b4,'threadId':_0x2a80df})['then'](({resolvedAt:_0x421c41,resolvedBy:_0x429bad})=>{_0x3271ef['remove'](_0x2dc723),_0x276f4d['resolvedBy']['id']!==_0x429bad&&(_0x276f4d['resolvedBy']=_0x2a19a4['getUser'](_0x429bad)),_0x276f4d['resolvedAt']=_0x421c41;})['catch'](_0x1f2b99=>{throw console['error'](_0x1f2b99),new _0x552662('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5255d4,channelId:_0x5f3e15,isFromAdapter:_0xf6065}){if(!this['hasCommentThread'](_0x5255d4))throw new _0x552662('commentsrepository-missing-comment-thread',null,{'threadId':_0x5255d4});const _0x152c0e=this['getCommentThread'](_0x5255d4);if(!_0x152c0e['isResolved'])throw new _0x552662('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5255d4});if(_0x152c0e['resolvedBy']=null,_0x152c0e['resolvedAt']=null,_0xf6065||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2a2640=this['context']['plugins']['get']('PendingActions'),_0x5cc6ff=_0x2a2640['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5f3e15,'threadId':_0x5255d4})['then'](()=>_0x2a2640['remove'](_0x5cc6ff))['catch'](_0x599ae6=>{throw console['error'](_0x599ae6),new _0x552662('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x58c5b3,isFromAdapter:_0x272db5}){const _0x50218d=this['getCommentThread'](_0x58c5b3);if(!_0x50218d)throw new _0x552662('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x58c5b3),this['_threads']['delete'](_0x58c5b3),!_0x50218d['isSubmitted']||_0x272db5||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x258c80=this['context']['plugins']['get']('PendingActions'),{channelId:_0x33ad9e}=_0x50218d,_0x42f1d7=_0x258c80['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x33ad9e,'threadId':_0x58c5b3})['then'](()=>_0x258c80['remove'](_0x42f1d7))['catch'](_0x2e58dc=>{throw console['error'](_0x2e58dc),new _0x552662('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5e088c,unlinkedAt:_0x372ffa,context:_0x316548,attributes:_0x32619a,isFromAdapter:_0x3406ef}){if('string'!=typeof _0x5e088c)throw new _0x552662('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5e088c});if(!this['hasCommentThread'](_0x5e088c))throw new _0x552662('commentsrepository-missing-comment-thread',null,{'threadId':_0x5e088c});const _0x3f9d3f=this['getCommentThread'](_0x5e088c);let _0x589377=!0x1;if(void 0x0!==_0x316548&&_0x3f9d3f['context']!==_0x316548&&(_0x3f9d3f['context']=_0x316548,_0x589377=!0x0),void 0x0!==_0x372ffa&&_0x3f9d3f['unlinkedAt']!==_0x372ffa&&(_0x3f9d3f['unlinkedAt']=_0x372ffa,_0x589377=!0x0),_0x32619a&&!At(_0x32619a,_0x3f9d3f['attributes'])&&(_0x3f9d3f['attributes']=_0x32619a,_0x589377=!0x0),!_0x589377)return Promise['resolve']();if(!_0x3f9d3f['isSubmitted']||_0x3406ef||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x858a49=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23f011}=_0x3f9d3f,_0x50d315=_0x858a49['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x23f011,'threadId':_0x5e088c,'context':_0x316548,'unlinkedAt':_0x372ffa,'attributes':_0x32619a})['then'](()=>_0x858a49['remove'](_0x50d315))['catch'](_0x21a495=>{throw console['error'](_0x21a495),new _0x552662('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2bc693){const _0x4b1284=this['context']['plugins']['get'](y),_0x574c58=this['getCommentThread'](_0x2bc693);if(_0x574c58['_isAttached']=!0x1,this['_threadToController']['has'](_0x574c58)){const _0x11b032=this['_threadToController']['get'](_0x574c58),_0x21d068=_0x11b032['view'],_0x504dd1=_0x4b1284['getByInnerView'](_0x21d068);this['_threadToController']['delete'](_0x574c58),this['_viewToController']['delete'](_0x21d068),_0x504dd1&&_0x4b1284['remove'](_0x504dd1),_0x11b032['destroy'](),_0x21d068['destroy']()['then'](()=>{this['_unbindEditors'](_0x21d068);});}}['_updateActiveAnnotation']({threadId:_0x53da21,resolvedAt:_0x263f86,unlinkedAt:_0x1aae3d}){const _0x454f16=!!_0x263f86,_0x5663a1=this['context']['plugins']['get'](y),_0x116062=this['getCommentThread'](_0x53da21);if(this['_threadToController']['has'](_0x116062)){const _0x27da2b=this['_threadToController']['get'](_0x116062)['view'],_0x2895e5=_0x5663a1['getByInnerView'](_0x27da2b);_0x2895e5&&(_0x454f16&&_0x5663a1['_removeActiveAnnotation'](_0x2895e5),_0x1aae3d?_0x2895e5['isVisible']=!0x1:_0x2895e5['refreshVisibility']());}}['_getExternalAuthor'](_0x2b46c9){const _0x53e895=this['context']['plugins']['get'](it),_0x9ece39=It('external:'+_0x2b46c9),_0x3e54ac=_0x53e895['getUser'](_0x9ece39);return _0x3e54ac||_0x53e895['addUser']({'id':_0x9ece39,'name':_0x2b46c9});}['_createNewComment']({threadId:_0x1cff09,commentId:_0x564339=_0x1ce077(),content:_0x55d7e7,authorId:_0x48a533,createdAt:_0x59201a,attributes:_0x186207}){if('string'!=typeof _0x564339)throw new _0x552662('commentsrepository-invalid-commentid');if('string'!=typeof _0x48a533)throw new _0x552662('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x55d7e7||!_0x55d7e7['trim']())throw new _0x552662('commentsrepository-invalid-comment-content');const _0x18c1c8=this['context']['plugins']['get'](it)['getUser'](_0x48a533);if(!_0x18c1c8)throw new _0x552662('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x48a533});let _0x5a654d=null,_0x48c242=_0x59201a;return _0x186207?.['@external']&&(_0x5a654d=this['_getExternalAuthor'](_0x186207['@external']['authorName']),_0x48c242=new Date(_0x186207['@external']['createdAt'])),new wi(this,{'threadId':_0x1cff09,'id':_0x564339,'author':_0x5a654d||_0x18c1c8,'creator':_0x18c1c8,'content':_0x55d7e7,'createdAt':_0x59201a,'authoredAt':_0x48c242,'attributes':_0x186207});}['_addComment'](_0x13aadf){let {threadId:_0x2f9307,content:_0x3c768b,attributes:_0x2ae798,isFromAdapter:_0xc4120c}=_0x13aadf;const _0x30f314=this['getCommentThread'](_0x13aadf['threadId']);if(!_0x30f314)throw new _0x552662('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4904f4=this['_createNewComment'](_0x13aadf),{id:_0x1f0751}=_0x4904f4;if(_0x30f314['_add'](_0x4904f4),_0xc4120c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x30f314['isSubmitted'])return Promise['resolve']();const _0x53e63e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4dea9d}=_0x30f314,_0x2248a5=_0x53e63e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2ae798||(_0x2ae798={}),this['adapter']['addComment']({'channelId':_0x4dea9d,'threadId':_0x2f9307,'commentId':_0x1f0751,'content':_0x3c768b,'attributes':_0x2ae798})['then'](_0x31fbf6=>{_0x53e63e['remove'](_0x2248a5),_0x31fbf6&&this['_updateComment']({'channelId':_0x4dea9d,'threadId':_0x2f9307,'commentId':_0x1f0751,'createdAt':_0x31fbf6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x360ca5=>{throw console['error'](_0x360ca5),new _0x552662('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5e5fd7,commentId:_0x2e4a94,content:_0x3b7fa3,createdAt:_0x41b47c,attributes:_0x294489,isFromAdapter:_0x441d12}){if(void 0x0!==_0x3b7fa3&&('string'!=typeof _0x3b7fa3||!_0x3b7fa3['trim']()['length']))throw new _0x552662('commentsrepository-update-comment-invalid-content');const _0x3d7a9d=this['getCommentThread'](_0x5e5fd7),_0x5d84b1=_0x3d7a9d['getComment'](_0x2e4a94);if(!_0x5d84b1)throw new _0x552662('commentsrepository-update-missing-comment',this);let _0xf9db09=!0x1;if(_0x3b7fa3&&_0x3b7fa3!==_0x5d84b1['content']&&(_0x5d84b1['isEditable']||_0x441d12)&&(_0x5d84b1['content']=_0x3b7fa3,_0xf9db09=!0x0),_0x41b47c&&_0x41b47c!==_0x5d84b1['createdAt']&&(_0x5d84b1['createdAt']=_0x41b47c,_0x5d84b1['attributes']&&_0x5d84b1['attributes']['@external']||(_0x5d84b1['authoredAt']=_0x41b47c),_0xf9db09=!0x0),_0x294489&&!At(_0x294489,_0x5d84b1['attributes'])&&(_0x5d84b1['attributes']=_0x294489,_0xf9db09=!0x0),!_0xf9db09)return Promise['resolve']();if(_0x3d7a9d['fire']('commentUpdated'),_0x441d12||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x125684=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd207f7}=this['getCommentThread'](_0x5d84b1['threadId']),_0x5a9b9f=_0x125684['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xd207f7,'threadId':_0x5e5fd7,'commentId':_0x2e4a94,'content':_0x3b7fa3,'attributes':_0x294489})['then'](()=>_0x125684['remove'](_0x5a9b9f))['catch'](_0x258d8a=>{throw console['error'](_0x258d8a),new _0x552662('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x25d00d,commentId:_0x17ab0a,isFromAdapter:_0x2ee1d2}){const _0x354f84=this['getCommentThread'](_0x25d00d),_0x329f2e=_0x354f84['getComment'](_0x17ab0a);if(!_0x329f2e)throw new _0x552662('commentsrepository-remove-missing-comment',this);if(_0x354f84['_remove'](_0x329f2e),_0x2ee1d2||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x46f081=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2d93c5}=_0x354f84,_0x4b6d50=_0x46f081['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2d93c5,'threadId':_0x25d00d,'commentId':_0x17ab0a})['then'](()=>_0x46f081['remove'](_0x4b6d50))['catch'](_0xa1c11b=>{throw console['error'](_0xa1c11b),new _0x552662('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0x5df269(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x2cc89e,_0x5bc3a7){super();const _0x39a6e8=_0x5bc3a7['isResolvable'];this['channelId']=_0x5bc3a7['channelId'],this['id']=_0x5bc3a7['id'],this['comments']=new _0x842883(),this['_repository']=_0x2cc89e,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5bc3a7['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2cc89e,'_permissions',_0x2cc89e,'_readOnlyChannels',()=>_0x2cc89e['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2cc89e,'_permissions',()=>_0x2cc89e['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2cc89e,'_permissions',()=>{const _0x277be7=_0x2cc89e['getPermissions'](this['channelId']);return _0x277be7['write']||_0x277be7['admin'];}),this['bind']('isResolvable')['to'](_0x2cc89e,'_permissions',()=>_0x39a6e8&&_0x2cc89e['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5bc3a7['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4450b3,_0xbb30bf)=>_0x4450b3?_0xbb30bf?_0x4450b3<_0xbb30bf?_0x4450b3:_0xbb30bf:_0x4450b3:_0xbb30bf),this['set']('unlinkedAt',_0x5bc3a7['unlinkedAt']||null),this['set']('resolvedAt',_0x5bc3a7['resolvedAt']||null),this['set']('resolvedBy',_0x5bc3a7['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x52680e=>!!_0x52680e),this['set']('attributes',_0x5bc3a7['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xd5a43b,_0x520585)=>_0xd5a43b+_0x520585['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x108e14,id:_0x2ee77b}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x108e14),{'channelId':_0x108e14,'threadId':_0x2ee77b});}['setUnlinkedAt'](_0x58b24b){this['_update']({'unlinkedAt':_0x58b24b});}['resolve']({resolvedAt:_0x906c59=new Date(),resolvedBy:_0x4db9be='',isFromAdapter:_0x91ea22=!0x1}={}){const _0x14310d=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x2b080e,id:_0x574b0c}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x2b080e),{'channelId':_0x2b080e,'threadId':_0x574b0c,'resolvedAt':_0x906c59,'resolvedBy':_0x4db9be||_0x14310d['id'],'isFromAdapter':_0x91ea22});}['reopen']({isFromAdapter:_0xb4673d=!0x1}={}){const {channelId:_0x203e2f,id:_0x2e2049}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x203e2f),{'channelId':_0x203e2f,'threadId':_0x2e2049,'isFromAdapter':_0xb4673d});}['setContext'](_0x2ce9fc){this['context']||this['_update']({'context':_0x2ce9fc});}['setAttribute'](_0x5301f7,_0x3c202f){const _0x134c3c=wt(this['attributes']);yt(_0x134c3c,_0x5301f7,_0x3c202f),this['_update']({'attributes':_0x134c3c});}['removeAttribute'](_0x30d326){const _0x2f06d8=wt(this['attributes']);Ct(_0x2f06d8,_0x30d326),this['_update']({'attributes':_0x2f06d8});}['remove']({isFromAdapter:_0x4f53c9=!0x1}={}){const {channelId:_0x47ef41,id:_0x57cdd4}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x47ef41),{'channelId':_0x47ef41,'threadId':_0x57cdd4,'isFromAdapter':_0x4f53c9});}['attachTo'](_0xbc5a97){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xbc5a97});}['addComment'](_0xe3b187){const {channelId:_0x123a52,id:_0x30300f}=this;this['_repository']['fire'](Nt('addComment',_0x123a52,_0x30300f),Object['assign']({'channelId':_0x123a52,'threadId':_0x30300f},_0xe3b187));}['getComment'](_0x153834){if('string'!=typeof _0x153834)throw new _0x552662('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x153834});return this['comments']['get'](_0x153834);}['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'](_0x210301=>_0x210301['toJSON']()),'attributes':this['attributes']};}['_add'](_0x275ffc){return this['listenTo'](_0x275ffc,'change:authoredAt',()=>{const _0x52a008=this['_findOptimalIndex'](_0x275ffc),_0x524a52=this['comments'];_0x52a008-0x1!=_0x524a52['getIndex'](_0x275ffc)&&_0x52a008+0x1!=_0x524a52['getIndex'](_0x275ffc)&&(this['_remove'](_0x275ffc),this['_add'](_0x275ffc));}),this['comments']['add'](_0x275ffc,this['_findOptimalIndex'](_0x275ffc));}['_update'](_0x4fad0e){const {channelId:_0x5a7003,id:_0x28f0bd}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x5a7003),{..._0x4fad0e,'channelId':_0x5a7003,'threadId':_0x28f0bd});}['_remove'](_0x46c585){return this['stopListening'](_0x46c585),_0x46c585['destroy'](),this['comments']['remove'](_0x46c585);}['_findOptimalIndex'](_0x4149a5){const _0x5abf1c=this['comments']['find'](_0x4a9297=>new Date(_0x4a9297['authoredAt'])['getTime']()>new Date(_0x4149a5['authoredAt'])['getTime']());return _0x5abf1c?this['comments']['getIndex'](_0x5abf1c):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0x5df269(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x51a780,_0x4d3881){super();const _0xaa440f=_0x51a780['context']['plugins']['get'](it)['me'],_0x5e9a47=_0x51a780['getCommentThread'](_0x4d3881['threadId']),_0x31edeb=0x0===_0x5e9a47['comments']['length'],_0x152228=_0xaa440f===_0x4d3881['author'];this['id']=_0x4d3881['id'],this['threadId']=_0x4d3881['threadId'],this['author']=_0x4d3881['author'],this['creator']=_0x4d3881['creator'],this['isExternal']=Boolean(_0x4d3881['attributes']&&_0x4d3881['attributes']['@external']),this['set']('content',_0x4d3881['content']),this['createdAt']=_0x4d3881['createdAt']||new Date(),this['set']('authoredAt',_0x4d3881['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5e9a47,'resolvedAt'),this['set']('attributes',_0x4d3881['attributes']||{}),this['bind']('isEditable')['to'](_0x51a780,'_permissions',()=>{const _0x588a78=_0x51a780['getPermissions'](_0x5e9a47['channelId'])['write'],_0x4c0fe9=_0x51a780['getPermissions'](_0x5e9a47['channelId'])['modifyAll'];return _0x152228&&_0x588a78||!_0x152228&&_0x4c0fe9;}),this['bind']('isRemovable')['to'](_0x5e9a47,'isRemovable',_0x51a780,'_permissions',_0x2c85d4=>{const _0x51cc7d=_0x51a780['getPermissions'](_0x5e9a47['channelId'])['write'],_0xddaecd=_0x51a780['getPermissions'](_0x5e9a47['channelId'])['modifyAll'];return _0x152228&&_0x51cc7d||_0x2c85d4&&_0x31edeb||!_0x152228&&_0xddaecd&&!_0x31edeb;}),this['bind']('isReadOnly')['to'](_0x5e9a47,'isReadOnly'),this['_repository']=_0x51a780;}get['weight'](){return Math['max'](function(_0x3e6a91){const _0x510fac=document['createElement']('div');return _0x510fac['innerHTML']=_0x3e6a91,_0x510fac['textContent']['length'];}(this['content']),0xc8);}['update'](_0x37953e){const {threadId:_0x1a54dc,id:_0x1e952e}=this;if(!this['_repository']['hasCommentThread'](_0x1a54dc))throw new _0x552662('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x20ab19}=this['_repository']['getCommentThread'](_0x1a54dc);this['_repository']['fire'](Nt('updateComment',_0x20ab19,_0x1a54dc),{'channelId':_0x20ab19,'threadId':_0x1a54dc,'commentId':_0x1e952e,..._0x37953e});}['setAttribute'](_0x9a453c,_0xad673c){const _0x9cf80e=wt(this['attributes']);yt(_0x9cf80e,_0x9a453c,_0xad673c),this['update']({'attributes':_0x9cf80e});}['removeAttribute'](_0x4fb5ad){const _0x5ae9b3=wt(this['attributes']);Ct(_0x5ae9b3,_0x4fb5ad),this['update']({'attributes':_0x5ae9b3});}['remove'](_0x357a61={}){if(!_0x357a61['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3028fb,id:_0x44cd73}=this;if(!this['_repository']['hasCommentThread'](_0x3028fb))throw new _0x552662('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x22e44f}=this['_repository']['getCommentThread'](_0x3028fb);this['_repository']['fire'](Nt('removeComment',_0x22e44f,_0x3028fb),{'channelId':_0x22e44f,'threadId':_0x3028fb,'commentId':_0x44cd73,..._0x357a61});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3340ec,..._0x2ec4d3){for(const _0x11b1f3 of _0x2ec4d3)void 0x0!==_0x11b1f3&&(_0x3340ec+=':'+String(_0x11b1f3));return _0x3340ec;}class ot extends _0x3077e4{constructor(_0x3fcba5){super(_0x3fcba5),this['set']('hasContent',!0x1);}['refresh'](){const _0x357cd4=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5873cf of _0x357cd4['getRanges']())if(this['_hasContent'](_0x5873cf))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x18aee1=_0x1ce077(),ranges:_0x18ee82,comment:_0x1e5f0f}={}){const _0x40d544=this['editor']['model'],_0x2077e9=_0x18ee82??Array['from'](_0x40d544['document']['selection']['getRanges']()),_0x5c5c40=[];for(const _0x515ff5 of _0x2077e9)this['_hasContent'](_0x515ff5)&&_0x5c5c40['push'](this['_trimToContent'](_0x515ff5));if(!_0x5c5c40['length'])throw new _0x552662('addcommentthreadcommand-incorrect-ranges',null);_0x1e5f0f&&this['_createCommentThread'](_0x18aee1,_0x1e5f0f),this['_createMarkersFromRanges'](_0x18aee1,_0x5c5c40,!!_0x1e5f0f);}['_createMarkersFromRanges'](_0x957a04,_0x40a116,_0x16a96f){this['editor']['model']['change'](_0x5ab125=>{for(const _0x424a91 of _0x40a116){const _0x17623e=_0x1ce077()['substr'](0x1,0x5),_0x103082='comment:'+_0x957a04+':'+_0x17623e;_0x5ab125['addMarker'](_0x103082,{'range':_0x424a91,'usingOperation':_0x16a96f,'affectsData':_0x16a96f});}});}['_createCommentThread'](_0x4e37d8,_0x2b372b){const _0x19e08a=this['editor']['plugins']['get']('CommentsRepository'),_0xec98c3=this['editor']['config']['get']('collaboration.channelId'),_0x266a65=this['editor']['plugins']['get']('Users')['me'];if(!_0x266a65)throw new _0x552662('addcommentthreadcommand-user-not-found',null);_0x19e08a['addCommentThread']({'threadId':_0x4e37d8,'channelId':_0xec98c3,'comments':[{'authorId':_0x266a65['id'],'content':_0x2b372b,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4ce182){for(const _0x44b12d of _0x4ce182['getItems']())if(this['_itemIsContent'](_0x44b12d))return!0x0;return!0x1;}['_itemIsContent'](_0x207517){return _0x207517['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x207517)&&!_0x207517['is']('element','tableCell');}['_trimToContent'](_0x57d5f8){const _0x4cddce=_0x3ac8be=>!this['_itemIsContent'](_0x3ac8be['item']),_0x483080=_0x57d5f8['start']['getLastMatchingPosition'](_0x4cddce),_0x29479c=_0x57d5f8['end']['getLastMatchingPosition'](_0x4cddce,{'direction':'backward'});return this['editor']['model']['createRange'](_0x483080,_0x29479c);}}class b extends _0x478bf2{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c4157){super(_0x2c4157),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x17406a=this['editor'],_0x505ddb=_0x17406a['model']['document']['selection'],_0x297291=_0x391904(()=>this['refreshSelectedViews'](),0xa);_0x505ddb['on']('change:range',(_0x7ea7e8,_0xd3e0e1)=>{_0xd3e0e1['directChange']&&(_0x297291['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x17406a['editing']['view']['document'],'change:isFocused',(_0x5f53ec,_0x3d63d9,_0x5e377d)=>{_0x5e377d&&_0x297291();}),this['listenTo'](_0x17406a['ui']['focusTracker'],'change:isFocused',(_0x4ac68a,_0x481ec5,_0x4f2752)=>{_0x4f2752||this['fire']('blur',{'isAnnotationTracked':_0x57af65=>this['_editorAnnotationsData']['has'](_0x57af65['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x148b6e){if(this['_editorAnnotations']['has'](_0x148b6e['view']))return;this['_editorAnnotations']['add'](_0x148b6e['view']),this['editor']['ui']['focusTracker']['add'](_0x148b6e['view']['element']);const _0x2747d9=this['editor']['plugins']['get'](y);this['listenTo'](_0x2747d9['collection'],'remove',(_0x1147e6,_0x3ba2a6)=>{this['editor']['ui']['focusTracker']['remove'](_0x3ba2a6['view']['element']),this['_editorAnnotations']['delete'](_0x3ba2a6['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1f5706){if('function'!=typeof _0x1f5706)throw new _0x552662('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1f5706);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x464f83,annotations:_0x2e9f0b}){const _0x3e207d=[],_0x390e15=this['editor']['model']['document']['selection'],_0xa9e08=Array['from'](_0x390e15['getRanges']());for(const [_0xe8800a,_0x4e7671]of this['_editorAnnotationsData']){const _0xeafce7=_0x50be3e(_0x4e7671),_0x2fe634=_0x2e9f0b['getByInnerView'](_0xe8800a);_0xeafce7&&_0x2fe634&&_0x3e207d['push']({'annotation':_0x2fe634,'range':_0xeafce7});}function _0x50be3e(_0x4a435f){for(const _0x51687c of _0x4a435f)for(const _0x372c51 of _0xa9e08)if(_0x51687c['containsRange'](_0x372c51,!_0x390e15['isCollapsed']))return _0x51687c;return null;}return _0x3e207d['sort']((_0x4ec48c,_0x3840ba)=>{const _0x3f911e=_0x4ec48c['range'],_0x56e398=_0x3840ba['range'];if(!_0x3f911e['isEqual'](_0x56e398)){if(_0x3f911e['containsRange'](_0x56e398,!0x0))return 0x1;if(_0x56e398['containsRange'](_0x3f911e,!0x0))return-0x1;}return _0x4ec48c['annotation']==_0x464f83?-0x1:_0x3840ba['annotation']==_0x464f83?0x1:0x0;})['map'](_0x50bfc0=>_0x50bfc0['annotation']);}get['_editorAnnotationsData'](){const _0x245061=new Map();for(const _0x4c05cc of Array['from'](this['_dataCollectors']))for(const [_0x516ab3,_0x325cc2]of _0x4c05cc())_0x245061['set'](_0x516ab3,_0x325cc2);return _0x245061;}}class st extends _0x478bf2{['afterInit'](){const _0x2d3ff=this['editor'];if(!_0x2d3ff['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2d3ff['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x478bf2{constructor(_0x48704e){super(_0x48704e),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x18fe6e=this['editor'],_0x2f797e=_0x18fe6e['commands']['get']('importWord'),_0x2ee75c=_0x18fe6e['plugins']['get'](it);_0x2f797e&&(_0x2f797e['on']('execute',(_0xbdde68,[,_0x14d8df])=>{_0x14d8df['collaboration_features']={'comments':!0x0,'user_id':_0x2ee75c['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2f797e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x38078c,_0x31e114){const {comment_threads:_0x5efdc2}=_0x31e114;_0x5efdc2&&_0x5efdc2['forEach'](({thread_id:_0x4ab98d,comments:_0x3d56b6,is_resolved:_0x2ed0a7})=>{const _0x3d6610=new Date(),_0x49ddb8=_0x3d56b6['map'](({author:_0x5b7d3f,content:_0x598fb8,created_at:_0x36ca8d})=>({'content':_0x598fb8,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x3d6610,'attributes':{'@external':{'authorName':_0x5b7d3f,'createdAt':_0x36ca8d?new Date(_0x36ca8d):new Date(),'source':'importWord'}}})),_0x898fa5=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x898fa5,'threadId':_0x4ab98d,'comments':_0x49ddb8,'resolvedAt':_0x2ed0a7?_0x3d6610:null});});}}class at extends _0x478bf2{constructor(_0x509f8a){super(_0x509f8a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x3e4f60=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x3e4f60,'contentInsertion',(_0x2fde46,_0xb3dfe5)=>this['_removeMarkersWithoutThreads'](_0xb3dfe5['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4bc30f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4bc30f;const _0x3d52e7=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1d0b41 of _0x4bc30f['keys']()){const [_0x38f0fb,_0x448642]=_0x1d0b41['split'](':');'comment'!=_0x38f0fb||_0x3d52e7['hasCommentThread'](_0x448642)||_0x4bc30f['delete'](_0x1d0b41);}return _0x4bc30f;}['_registerMarkerInClipboardPipeline'](){const _0x224f47=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x17b352=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x17b352&&_0x224f47['_registerMarkerToCopy']('comment',_0x17b352);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x332daf){switch(_0x332daf){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x2a7537){const _0x5118f4=_0x2a7537['split'](':');return{'group':_0x5118f4[0x0],'id':_0x5118f4[0x1],'part':_0x5118f4[0x2]};}class ut extends _0x478bf2{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xa90f52,_0x288c4e)=>{if(!_0x288c4e['options']['showCommentHighlights'])return null;if(_0x288c4e['options']['ignoreResolvedComments']){const {id:_0x4a9379}=ft(_0xa90f52['markerName']),_0x3fd945=this['editor']['plugins']['get'](o);if(_0x3fd945['getCommentThread'](_0x4a9379)?.['isResolved']&&_0xa90f52['item'])return _0x288c4e['consumable']['consume'](_0xa90f52['item'],'addMarker:'+_0xa90f52['markerName']),_0x288c4e['consumable']['consume'](_0xa90f52['item'],'removeMarker:'+_0xa90f52['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x475cd8=>{_0x475cd8['on']('addMarker:comment',(_0x1a14d9,_0x1ddfe8,_0x5ccd8a)=>{if(!_0x5ccd8a['options']['showCommentHighlights'])return;const _0x5a735a=_0x1ddfe8['item'];if(!_0x5a735a)return;const _0x289c23=_0x5ccd8a['mapper']['toViewElement'](_0x5a735a);this['editor']['model']['schema']['isObject'](_0x5a735a)&&_0x289c23&&!_0x289c23['getCustomProperty']('widget')&&_0x289c23['is']('containerElement')&&_0x2da229(_0x289c23,_0x5ccd8a['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x555fb3,{writer:_0x49bace,options:_0x1f0b9c})=>{if(!_0x1f0b9c['showCommentHighlights'])return null;const _0x175c10=_0x49bace['createContainerElement']('div'),_0xeae1d4=_0x49bace['createEmptyElement']('hr');return _0x49bace['addClass']('ck-horizontal-line',_0x175c10),_0x49bace['insert'](_0x49bace['createPositionAt'](_0x175c10,0x0),_0xeae1d4),_0x175c10;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2ff924,{writer:_0x11e2f0,options:_0x502523})=>{if(!_0x502523['showCommentHighlights'])return null;const _0x203d63=_0x11e2f0['createContainerElement']('span'),_0x1570c0=_0x11e2f0['createEmptyElement']('img');return _0x11e2f0['addClass']('image-inline',_0x203d63),_0x11e2f0['insert'](_0x11e2f0['createPositionAt'](_0x203d63,0x0),_0x1570c0),_0x203d63;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x279d45,{writer:_0x1a7cbd,options:_0x49ebbe})=>{if(_0x49ebbe['showCommentHighlights'])return _0x1a7cbd['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3a74dd,_0x1078f4,_0x1bff27)=>{_0x1bff27['options']['showCommentHighlights']&&_0x3a74dd['stop']();},{'priority':'high'});}}class r extends _0x478bf2{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x12dba9){super(_0x12dba9),this['set']('isThreadsLoadingPaused',!0x0),_0x12dba9['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3e9135,_0x1f89b6,_0x5013a4,_0x295319)=>{const _0x16c9fb=_0x12dba9['plugins']['get'](o),_0x23c8cc=_0x5013a4?ft(_0x5013a4)['id']:null;_0x12dba9['model']['change'](()=>{if(_0x23c8cc){const _0x4322fd=this['getAllMarkersForId'](_0x23c8cc);for(const _0x3ae123 of _0x4322fd)_0x12dba9['editing']['reconvertMarker'](_0x3ae123);}if(_0x295319){const {id:_0x10814f}=ft(_0x295319),_0x449b80=_0x16c9fb['getCommentThread'](_0x10814f);if(_0x449b80&&_0x449b80['unlinkedAt'])return;if(_0x449b80&&!_0x449b80['isAttached'])return;const _0x328b57=this['getAllMarkersForId'](_0x10814f);for(const _0x28bd1a of _0x328b57)_0x12dba9['editing']['reconvertMarker'](_0x28bd1a);}}),_0x23c8cc&&this['scrollToThreadMarker'](_0x23c8cc);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x52e6b1=this['editor'],_0xa4c4a8=_0x52e6b1['plugins']['get'](o),_0x3be37e=_0x52e6b1['config']['get']('collaboration.channelId'),_0x56a946=_0xa4c4a8['getCommentThreads']()['filter'](_0x4559a1=>_0x4559a1['channelId']!==_0x3be37e);_0x52e6b1['commands']['add']('addCommentThread',new ot(_0x52e6b1)),this['listenTo'](_0x52e6b1,'change:isReadOnly',(_0x4f9e78,_0x304d4d,_0x160954)=>{_0xa4c4a8['switchReadOnly'](_0x160954,_0x52e6b1['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xa4c4a8,dt('addCommentThread',_0x3be37e),(_0x4f9154,{threadId:_0x54c681})=>{const _0x28c1c4=this['editor']['plugins']['get'](o)['getCommentThread'](_0x54c681);_0x28c1c4?.['unlinkedAt']&&this['_attachArchivedThread'](_0x54c681);}),this['listenTo'](_0xa4c4a8,dt('removeCommentThread',_0x3be37e),(_0x1ca99d,{threadId:_0x231810})=>{_0x52e6b1['model']['enqueueChange']({'isUndoable':!0x1},_0x589444=>{const _0x3e1237=this['getAllMarkersForId'](_0x231810);for(const _0x33f4b5 of _0x3e1237)_0x589444['removeMarker'](_0x33f4b5);});}),this['listenTo'](_0xa4c4a8,dt('resolveCommentThread',_0x3be37e),(_0x1b58ce,{threadId:_0x43327b})=>{(this['_reconvertMarkers'](_0x43327b),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x43327b)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xa4c4a8,dt('reopenCommentThread',_0x3be37e),(_0x44a80d,{threadId:_0x5a7bfa})=>{this['_reconvertMarkers'](_0x5a7bfa);},{'priority':'low'}),this['listenTo'](_0xa4c4a8,dt('addComment',_0x3be37e),(_0x1c621f,{threadId:_0x33c0d3,isFromAdapter:_0x60d8c})=>{const _0x576772=this['getAllMarkersForId'](_0x33c0d3);if(_0x60d8c||0x0==_0x576772['length']||!_0xa4c4a8['hasCommentThread'](_0x33c0d3))return;0x1===_0xa4c4a8['getCommentThread'](_0x33c0d3)['length']&&_0x52e6b1['model']['enqueueChange']({'isUndoable':!0x1},_0x32e3ec=>{for(const _0x48b5c4 of _0x576772)_0x32e3ec['updateMarker'](_0x48b5c4,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x56a946);}['afterInit'](){!async function(_0x26b03d){const _0x55c8c1=_0x4f3a13([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x138ece=0x73460ab3,_0x198ba6=0x73418863^_0x138ece,_0x102ac9=window[_0x4f3a13([0x44,0x61,0x74,0x65])][_0x4f3a13([0x6e,0x6f,0x77])](),_0x4759f8=_0x26b03d[_0x4f3a13([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3e4f84=new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a9094=>{_0x4759f8[_0x4f3a13([0x6f,0x6e,0x63,0x65])](_0x4f3a13([0x72,0x65,0x61,0x64,0x79]),_0x2a9094);}),_0x3ac5d5={[_0x4f3a13([0x6b,0x74,0x79])]:_0x4f3a13([0x45,0x43]),[_0x4f3a13([0x75,0x73,0x65])]:_0x4f3a13([0x73,0x69,0x67]),[_0x4f3a13([0x63,0x72,0x76])]:_0x4f3a13([0x50,0x2d,0x32,0x35,0x36]),[_0x4f3a13([0x78])]:_0x4f3a13([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x4f3a13([0x79])]:_0x4f3a13([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x4f3a13([0x61,0x6c,0x67])]:_0x4f3a13([0x45,0x53,0x32,0x35,0x36])},_0x5017e0=_0x4759f8[_0x4f3a13([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f3a13([0x67,0x65,0x74])](_0x4f3a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5d18cb(){let _0x27cea7,_0xe470be=null,_0x221af4=null;try{if(_0x5017e0==_0x4f3a13([0x47,0x50,0x4c]))return _0x4f3a13([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x27cea7=_0x3d4e8a(),!_0x27cea7)return _0x4f3a13([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x27cea7[_0x4f3a13([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x221af4=_0x1175a8(_0x27cea7[_0x4f3a13([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x27cea7[_0x4f3a13([0x6a,0x74,0x69])])),await _0x4f4d7c()?_0x4652b8()?_0xe89da2()?_0x4f3a13([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4e6deb()?(_0x27cea7[_0x4f3a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f3a13([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xe470be=_0x107f5c(_0x4f3a13([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x376632()):_0x4f3a13([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f3a13([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f3a13([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4f3a13([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xe89da2(){const _0x1ebbe0=[_0x4f3a13([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f3a13([0x74,0x72,0x69,0x61,0x6c])][_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27cea7[_0x4f3a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x102ac9/0x3e8:0xe10*_0x198ba6;return _0x27cea7[_0x4f3a13([0x65,0x78,0x70])]<_0x1ebbe0;}function _0x4652b8(){const _0x550001=_0x27cea7[_0x4f3a13([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x550001)return!0x1;if(_0x550001[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x2a])))return!0x0;if(_0x550001[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x43,0x4d,0x54])))return!0x0;if(_0x550001[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x1dc2fe())return!0x0;if(_0x550001[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x52,0x43,0x4d,0x54]))){if(_0x21d872())return!0x0;if(_0x581dc7()||_0x349474())return!0x0;}return!0x1;}function _0x4e6deb(){const _0x3d91b6=_0x27cea7[_0x4f3a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3d91b6||0x0==_0x3d91b6[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x140c8e}=new URL(window[_0x4f3a13([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3d91b6[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x140c8e))return!0x0;const _0x56ec3a=_0x140c8e[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])](_0x4f3a13([0x2e]));return _0x3d91b6[_0x4f3a13([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x50ba8a=>_0x50ba8a[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x2a])))[_0x4f3a13([0x6d,0x61,0x70])](_0x5981bf=>_0x5981bf[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])](_0x4f3a13([0x2e])))[_0x4f3a13([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11820b=>_0x11820b[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x56ec3a[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f3a13([0x6d,0x61,0x70])](_0x19b4b3=>Array(_0x56ec3a[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x19b4b3[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f3a13([0x66,0x69,0x6c,0x6c])](_0x19b4b3[0x0]===_0x4f3a13([0x2a])?_0x4f3a13([0x2a]):'')[_0x4f3a13([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x19b4b3))[_0x4f3a13([0x73,0x6f,0x6d,0x65])](_0x2fec75=>_0x56ec3a[_0x4f3a13([0x65,0x76,0x65,0x72,0x79])]((_0x257b0b,_0x562e54)=>_0x2fec75[_0x562e54]===_0x257b0b||_0x2fec75[_0x562e54]===_0x4f3a13([0x2a])));}function _0x376632(){return _0xe470be&&_0x221af4?new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1c3080,_0x3ae0d8)=>{_0xe470be[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0x1c3080,_0x3ae0d8),_0x221af4[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0xda3712=>{_0xda3712!=_0x4f3a13([0x56,0x61,0x6c,0x69,0x64])&&_0x1c3080(_0xda3712);},_0x3ae0d8);}):_0xe470be||_0x221af4||_0x4f3a13([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1175a8(_0x34bbde,_0x47a24b){return new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4472c3=>{if(_0x18ec70())return _0x4472c3(_0x4f3a13([0x56,0x61,0x6c,0x69,0x64]));_0x2809d(),_0x4759f8[_0x4f3a13([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f3a13([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x230bb1=!0x1;const _0x2c94dd=_0x1ce077();function _0x4060ff(_0x517113){return!!_0x517113&&(typeof _0x517113===_0x4f3a13([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x517113===_0x4f3a13([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x517113[_0x4f3a13([0x74,0x68,0x65,0x6e])]===_0x4f3a13([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x517113[_0x4f3a13([0x63,0x61,0x74,0x63,0x68])]===_0x4f3a13([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x482ccc(_0x3107bf){_0x1e0018(_0x3107bf)[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0x2a9d47=>{if(!_0x2a9d47||_0x2a9d47[_0x4f3a13([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f3a13([0x6f,0x6b]))return _0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xb90cd5(_0x54c29c(_0x2c94dd+_0x47a24b))!=_0x2a9d47[_0x4f3a13([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f3a13([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0x369fc9=>(_0x30bbe5(),_0x369fc9),()=>{const _0x3d5b63=_0x30ce11();return null==_0x3d5b63?(_0x30bbe5(),_0x4f3a13([0x56,0x61,0x6c,0x69,0x64])):_0x4f3a13(_0x102ac9-_0x3d5b63>(0x574a8eb3^_0x138ece)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0x4472c3)[_0x4f3a13([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4472c3(_0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2b03e1=0x7370e433^_0x138ece;function _0x30bbe5(){const _0x153d6f=_0x4f3a13([0x6c,0x6c,0x63,0x74,0x2d])+_0xb90cd5(_0x54c29c(_0x34bbde)),_0x31d47a=_0xb7627a(_0xb90cd5(window[_0x4f3a13([0x4d,0x61,0x74,0x68])][_0x4f3a13([0x63,0x65,0x69,0x6c])](_0x102ac9/_0x2b03e1)));window[_0x4f3a13([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f3a13([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x153d6f,_0x31d47a);}function _0x30ce11(){const _0x38a4b1=_0x4f3a13([0x6c,0x6c,0x63,0x74,0x2d])+_0xb90cd5(_0x54c29c(_0x34bbde)),_0x21538a=window[_0x4f3a13([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f3a13([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x38a4b1);return _0x21538a?window[_0x4f3a13([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb7627a(_0x21538a),0x10)*_0x2b03e1:null;}function _0x1e0018(_0x27e94c){return new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xf7c95f,_0x4c4562)=>{_0x27e94c[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0xf7c95f,_0x4c4562),window[_0x4f3a13([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4c4562,0x7347de73^_0x138ece);});}}_0x4759f8[_0x4f3a13([0x6f,0x6e])](_0x4f3a13([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2c946d,_0x247969)=>{if(_0x247969[0x0]!=_0x34bbde)return _0x4472c3(_0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x247969[0x1]={..._0x247969[0x1],[_0x4f3a13([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2c94dd};},{[_0x4f3a13([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f3a13([0x68,0x69,0x67,0x68])}),_0x4759f8[_0x4f3a13([0x6f,0x6e])](_0x4f3a13([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5bed1b=>{_0x4060ff(_0x5bed1b[_0x4f3a13([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x230bb1=!0x0,_0x482ccc(_0x5bed1b[_0x4f3a13([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f3a13([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f3a13([0x6c,0x6f,0x77])}),_0x3e4f84[_0x4f3a13([0x74,0x68,0x65,0x6e])](()=>{_0x230bb1||_0x4472c3(_0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x18ec70(){return _0x4759f8[_0x4f3a13([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f3a13([0x76,0x69,0x65,0x77])][_0x4f3a13([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f3a13([0x61,0x75,0x74,0x6f]);}function _0x2809d(){_0x4759f8[_0x4f3a13([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f3a13([0x76,0x69,0x65,0x77])][_0x4f3a13([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f3a13([0x61,0x75,0x74,0x6f]);}}function _0x107f5c(_0x420260){const _0x25a049=[new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc53993=>setTimeout(_0xc53993,0x734f347f^_0x138ece)),_0x3e4f84[_0x4f3a13([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe419fb=>{let _0x3f0e9b=0x0;_0x4759f8[_0x4f3a13([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f3a13([0x6f,0x6e])](_0x4f3a13([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3559be,_0x2b635e)=>{_0x2b635e[0x0][_0x4f3a13([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3f0e9b++,_0x3f0e9b==(0x73460f5b^_0x138ece)&&(_0xe419fb(),_0x3559be[_0x4f3a13([0x6f,0x66,0x66])]());});}))];return window[_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f3a13([0x72,0x61,0x63,0x65])](_0x25a049)[_0x4f3a13([0x74,0x68,0x65,0x6e])](()=>_0x420260);}async function _0x29743c(){await _0x3e4f84,_0x4759f8[_0x4f3a13([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f3a13([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3dbda7,_0x4759f8[_0x4f3a13([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f3a13([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3dbda7,_0x4759f8[_0x4f3a13([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f3a13([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1dc2fe(){return window[_0x4f3a13([0x67,0x6c,0x6f,0x62])]&&window[_0x4f3a13([0x67,0x6c,0x6f,0x62])][_0x4f3a13([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x21d872(){return _0x20b764(_0x4f3a13([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x53fbc4(_0x4f3a13([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4f3a13([0x73,0x74,0x61,0x74,0x65])]==_0x4f3a13([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x581dc7(){return _0x20b764(_0x4f3a13([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x349474(){return _0x20b764(_0x4f3a13([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1d5ba9(_0xf8ea5c){const _0x2494b1=_0x49b6bb();_0x4759f8[_0x2494b1]=_0x4f3a13([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xf8ea5c,_0xf8ea5c!=_0x4f3a13([0x56,0x61,0x6c,0x69,0x64])&&_0x29743c();}function _0x49b6bb(){const _0x2a8084=window[_0x4f3a13([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f3a13([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f3a13([0x6e,0x6f,0x77])]())[_0x4f3a13([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f3a13([0x2e]),'');let _0x3d59e2=_0x4f3a13([0x4b]);for(let _0x5234fb=0x0;_0x5234fb<_0x2a8084[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5234fb+=0x2){let _0x15ba14=window[_0x4f3a13([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2a8084[_0x4f3a13([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5234fb,_0x5234fb+0x2));_0x15ba14>=_0x55c8c1[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x15ba14-=_0x55c8c1[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3d59e2+=_0x55c8c1[_0x15ba14];}return _0x3d59e2;}function _0x3d4e8a(){const _0x5aa23d=_0x5017e0[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])](_0x4f3a13([0x2e]));if(0x3!=_0x5aa23d[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3e1c1b(_0x5aa23d[0x1]);function _0x3e1c1b(_0x401038){const _0x417d9f=_0x188fb6(_0x401038);return _0x417d9f&&_0x2e552e()?_0x417d9f:null;function _0x2e552e(){const _0x3f7075=_0x417d9f[_0x4f3a13([0x6a,0x74,0x69])],_0x526556=window[_0x4f3a13([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f7075[_0x4f3a13([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3f7075[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1c5669={..._0x417d9f,[_0x4f3a13([0x6a,0x74,0x69])]:_0x3f7075[_0x4f3a13([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3f7075[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1c5669[_0x4f3a13([0x76,0x63])],_0x54c29c(_0x1c5669)==_0x526556;}}}async function _0x4f4d7c(){let _0x1664f4=!0x0;try{const _0x908d4e=_0x5017e0[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])](_0x4f3a13([0x2e])),[_0x398cc8,_0x28b763,_0x4bf607]=_0x908d4e;return _0x596ca0(_0x398cc8),await _0x4374e5(_0x398cc8,_0x28b763,_0x4bf607),_0x1664f4;}catch{return!0x1;}function _0x596ca0(_0xfed627){const _0x315d2b=_0x188fb6(_0xfed627);_0x315d2b&&_0x315d2b[_0x4f3a13([0x61,0x6c,0x67])]==_0x4f3a13([0x45,0x53,0x32,0x35,0x36])||(_0x1664f4=!0x1);}async function _0x4374e5(_0x318151,_0x30e47e,_0x532fa6){const _0x233547=window[_0x4f3a13([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f3a13([0x66,0x72,0x6f,0x6d])](_0x50829b(_0x532fa6),_0x40f890=>_0x40f890[_0x4f3a13([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4143b0=new window[(_0x4f3a13([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f3a13([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x318151+_0x4f3a13([0x2e])+_0x30e47e),_0x33dbfe=window[_0x4f3a13([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f3a13([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x33dbfe)return;const _0x4581bc=await _0x33dbfe[_0x4f3a13([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f3a13([0x6a,0x77,0x6b]),_0x3ac5d5,{[_0x4f3a13([0x6e,0x61,0x6d,0x65])]:_0x4f3a13([0x45,0x43,0x44,0x53,0x41]),[_0x4f3a13([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f3a13([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f3a13([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x33dbfe[_0x4f3a13([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f3a13([0x6e,0x61,0x6d,0x65])]:_0x4f3a13([0x45,0x43,0x44,0x53,0x41]),[_0x4f3a13([0x68,0x61,0x73,0x68])]:{[_0x4f3a13([0x6e,0x61,0x6d,0x65])]:_0x4f3a13([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4581bc,_0x233547,_0x4143b0)||(_0x1664f4=!0x1);}}function _0x188fb6(_0x1733f1){return _0x1733f1[_0x4f3a13([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f3a13([0x65,0x79]))?JSON[_0x4f3a13([0x70,0x61,0x72,0x73,0x65])](_0x50829b(_0x1733f1)):null;}function _0x50829b(_0x2b2aa5){return window[_0x4f3a13([0x61,0x74,0x6f,0x62])](_0x2b2aa5[_0x4f3a13([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f3a13([0x2b]))[_0x4f3a13([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f3a13([0x2f])));}function _0x54c29c(_0x3c0fdb){let _0x56a36b=0x1505;function _0x1bf96c(_0x513028){for(let _0x5bdd7c=0x0;_0x5bdd7c<_0x513028[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5bdd7c++){const _0x5763e5=_0x513028[_0x4f3a13([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5bdd7c);_0x56a36b=(_0x56a36b<<0x5)+_0x56a36b+_0x5763e5,_0x56a36b&=_0x56a36b;}}function _0x13233d(_0x1e0d30){Array[_0x4f3a13([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1e0d30)?_0x1e0d30[_0x4f3a13([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x13233d):_0x1e0d30&&typeof _0x1e0d30==_0x4f3a13([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f3a13([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1e0d30)[_0x4f3a13([0x73,0x6f,0x72,0x74])]()[_0x4f3a13([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x44fcc4,_0x42a4e9])=>{_0x1bf96c(_0x44fcc4),_0x13233d(_0x42a4e9);}):_0x1bf96c(window[_0x4f3a13([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1e0d30));}return _0x13233d(_0x3c0fdb),_0x56a36b>>>0x0;}function _0xb90cd5(_0x484ebf){return _0x484ebf[_0x4f3a13([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f3a13([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f3a13([0x30]));}function _0xb7627a(_0x33d8a5){return _0x33d8a5[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f3a13([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f3a13([0x6a,0x6f,0x69,0x6e])]('');}function _0x20b764(_0x1719b0){return _0x4759f8[_0x4f3a13([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f3a13([0x68,0x61,0x73])](_0x1719b0);}function _0x53fbc4(_0x2950b0){return _0x4759f8[_0x4f3a13([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f3a13([0x67,0x65,0x74])](_0x2950b0);}function _0x3dbda7(){}function _0x4f3a13(_0x5e2176){return _0x5e2176['map'](_0x32000e=>String['fromCharCode'](_0x32000e))['join']('');}_0x1d5ba9(await _0x5d18cb());}(this);}['destroy'](){const _0xd7d18b=this['editor']['plugins']['get'](o),_0x2cd3e9=this['editor']['config']['get']('collaboration.channelId');for(const _0x1c8cbc of _0xd7d18b['getCommentThreads']({'channelId':_0x2cd3e9}))_0xd7d18b['_detachCommentThread'](_0x1c8cbc['id']),_0xd7d18b['_threads']['delete'](_0x1c8cbc['id']);super['destroy']();}['hasMarkerForId'](_0x37ebcd){return this['getAllMarkersForId'](_0x37ebcd)['length']>0x0;}['getAllMarkersForId'](_0x2ec829){const _0x27af99=[];for(const _0x2a5bda of this['editor']['model']['markers'])_0x2a5bda['name']['startsWith']('comment:'+_0x2ec829)&&_0x27af99['push'](_0x2a5bda);return _0x27af99;}['scrollToThreadMarker'](_0x7d2f2f){setTimeout(()=>{const _0x6f5053=this['_getTargetForId'](_0x7d2f2f);if(!_0x6f5053)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x7d2f2f&&nt({'target':_0x6f5053[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x49a450){this['editor']['model']['change'](()=>{for(const _0x249411 of this['getAllMarkersForId'](_0x49a450))this['editor']['editing']['reconvertMarker'](_0x249411);});}['_attachArchivedThread'](_0x3a2ceb){const _0x18d8e0=this['editor']['plugins']['get'](o),_0x3e95dc=this['editor']['plugins']['get'](b),_0x3e5956=_0x18d8e0['getCommentThread'](_0x3a2ceb);if(!_0x3e5956['isAttached']){const _0x537339=_0x3e5956['attachTo'](()=>this['_getTargetForId'](_0x3e5956['id']));_0x3e95dc['registerAnnotation'](_0x537339),_0x3e5956['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4d642e=this['editor'],_0x411d4d=_0x4d642e['plugins']['get'](it);_0x4d642e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xeb6509,_0x5e03ee)=>{const {id:_0x35fb3b}=ft(_0xeb6509['markerName']),_0x2a8eaf=_0x4d642e['plugins']['get'](o)['getCommentThread'](_0x35fb3b),_0x28f3e6=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x35fb3b;let _0x243352;if(_0x2a8eaf&&_0x2a8eaf['isResolved']&&!_0x28f3e6&&_0xeb6509['item'])return _0x5e03ee['consumable']['consume'](_0xeb6509['item'],'addMarker:'+_0xeb6509['markerName']),_0x5e03ee['consumable']['consume'](_0xeb6509['item'],'removeMarker:'+_0xeb6509['markerName']),null;const _0x235f89=['ck-comment-marker'];return _0x28f3e6&&_0x235f89['push']('ck-comment-marker--active'),_0x243352=_0x2a8eaf?.['length']?_0x2a8eaf['comments']['first']['author']['id']:_0x411d4d['me']['id'],{'classes':_0x235f89,'attributes':{'data-comment':_0x35fb3b,'data-author-id':_0x243352}};}}),_0x4d642e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x59b7c4,{options:_0x2a4c86})=>{if(_0x2a4c86['showCommentHighlights'])return null;const _0x12a621=_0x4d642e['plugins']['get'](o),_0xa71ab6=_0x4d642e['model']['markers']['get'](_0x59b7c4),{id:_0xd9178e,part:_0x2998fa}=ft(_0x59b7c4);return _0xa71ab6&&!_0xa71ab6['affectsData']||_0x2a4c86['ignoreResolvedComments']&&_0x12a621['getCommentThread'](_0xd9178e)?.['isResolved']?null:{'group':'comment','name':_0x2998fa?_0xd9178e+':'+_0x2998fa:_0xd9178e};}}),_0x4d642e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x12c594,{writer:_0x144e2e})=>_0x144e2e['createElement']('$marker',{'data-name':'comment:'+_0x12c594['getAttribute']('id')})}),_0x4d642e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3a1589=this['editor'],_0x449029=_0x3a1589['plugins']['get'](o),_0x16d84e=new Set(),_0x556575=new Set();_0x3a1589['model']['document']['registerPostFixer'](_0x1888df=>{let _0x219aac=!0x1;for(const {name:_0x2d31d4,data:_0x5193b4}of _0x3a1589['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4e6054,id:_0x2695e1}=ft(_0x2d31d4);let _0x265298=_0x5193b4['newRange'];if('comment'!==_0x4e6054||!_0x265298)continue;const _0x293694='$graveyard'===_0x265298['root']['rootName'];_0x293694||(_0x265298=ht(_0x265298,_0x3a1589['model']),!_0x265298||_0x265298['isCollapsed']||!_0x5193b4['newRange']||_0x265298['isEqual'](_0x5193b4['newRange']))?_0x3a1589['model']['hasContent'](_0x265298)&&!_0x293694?this['isThreadsLoadingPaused']?_0x16d84e['add'](_0x2d31d4):this['_handleThreadMarker'](_0x2d31d4,_0x2695e1):(_0x556575['add'](_0x2d31d4),_0x16d84e['delete'](_0x2d31d4),_0x1888df['removeMarker'](_0x2d31d4),_0x219aac=!0x0):(_0x1888df['updateMarker'](_0x2d31d4,{'range':_0x265298}),_0x219aac=!0x0);}return _0x219aac;}),this['on']('change:isThreadsLoadingPaused',(_0x4e2c84,_0x1e5c4f,_0x111aaf)=>{if(!_0x111aaf&&_0x16d84e['size'])for(const _0x3028da of _0x16d84e){const {id:_0x1a1428}=ft(_0x3028da);_0x16d84e['delete'](_0x3028da),_0x3a1589['model']['markers']['get'](_0x3028da)&&this['_handleThreadMarker'](_0x3028da,_0x1a1428);}}),this['listenTo'](_0x3a1589['model']['document'],'change',()=>{for(const {name:_0x29000f,data:{newRange:_0x2ca045}}of _0x3a1589['model']['document']['differ']['getChangedMarkers']()){const {group:_0x49050c,id:_0x181a8a}=ft(_0x29000f);if('comment'!==_0x49050c)continue;const _0x158773=_0x449029['getCommentThread'](_0x181a8a),_0x1be735=this['hasMarkerForId'](_0x181a8a);_0x158773&&(!_0x158773['_hasTargetInContent']&&_0x2ca045&&_0x3a1589['editing']['view']['once']('render',()=>{const _0x4d75c2=_0x3a1589['plugins']['get'](y),_0x171bac=_0x449029['_threadToController']['get'](_0x158773)['view'];_0x4d75c2['getByInnerView'](_0x171bac)['refreshVisibility']();},{'priority':'low'}),_0x158773['_hasTargetInContent']=_0x1be735||!!_0x2ca045),_0x2ca045||(_0x556575['add'](_0x29000f),_0x16d84e['delete'](_0x29000f));}for(const _0x149553 of _0x556575){const {id:_0x33a22f}=ft(_0x149553),_0x1f4957=_0x449029['getCommentThread'](_0x33a22f);if(_0x16d84e['delete'](_0x149553),!_0x1f4957)continue;const _0x181794=this['hasMarkerForId'](_0x33a22f);_0x181794||_0x1f4957['isSubmitted']?_0x181794||_0x1f4957['unlinkedAt']||_0x1f4957['setUnlinkedAt'](new Date()):_0x1f4957['remove']();}_0x556575['clear']();});}['_handleInitialThreads'](_0x47ae1f){_0x47ae1f['forEach'](_0x5d137c=>{_0x5d137c['unlinkedAt']&&this['_attachArchivedThread'](_0x5d137c['id']);});}['_getTargetForId'](_0xdf630){const _0x2d2b73=this['editor'],_0x3950a1=this['getAllMarkersForId'](_0xdf630);return et(_0x2d2b73['editing'],_0x3950a1);}['_getTextContext'](_0x2cc5dd){const _0x1e1a68=this['getAllMarkersForId'](_0x2cc5dd);let _0x372d7d='',_0x7fccc9=!0x1;for(const _0x21060d of _0x1e1a68){const _0x18dab3=_0x21060d['getRange']();for(const _0x2d0ace of Array['from'](_0x18dab3['getItems']()))_0x2d0ace['is']('$textProxy')?(_0x372d7d&&_0x7fccc9&&(_0x372d7d+='\x20',_0x7fccc9=!0x1),_0x372d7d+=_0x2d0ace['data']):_0x7fccc9=!0x0;_0x7fccc9=!0x0;}return _0x372d7d['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x195c20,_0x29f88b){const _0x5447bb=this['editor'],_0xf3a8c2=_0x5447bb['plugins']['get'](o);let _0x432113=_0xf3a8c2['getCommentThread'](_0x29f88b);const _0x5e2889=_0x5447bb['config']['get']('collaboration.channelId'),_0x3ccfd5=_0x5447bb['plugins']['get'](b);if(_0x432113&&(_0x432113['unlinkedAt']&&_0x432113['setUnlinkedAt'](null),_0x432113['isAttached']))return _0x432113;return!this['getAllMarkersForId'](_0x29f88b)[0x0]['managedUsingOperations']?_0x5447bb['editing']['view']['once']('render',()=>{if(_0xf3a8c2['getCommentThread'](_0x29f88b))return;const _0x1adf10=_0x5447bb['plugins']['get'](y);_0x432113=_0xf3a8c2['openNewCommentThread']({'channelId':_0x5e2889,'threadId':_0x29f88b,'target':()=>this['_getTargetForId'](_0x29f88b),'context':{'type':'text','value':this['_getTextContext'](_0x29f88b)}});const _0x2a634f=_0xf3a8c2['_threadToController']['get'](_0x432113)['view'],_0x2c2ba6=_0x1adf10['getByInnerView'](_0x2a634f);_0x2c2ba6&&_0x3ccfd5['registerAnnotation'](_0x2c2ba6);},{'priority':'low'}):_0xf3a8c2['fetchCommentThread']({'channelId':_0x5e2889,'threadId':_0x29f88b})['then'](_0x37f054=>{if('destroyed'!==_0x5447bb['state']){if(_0x432113=_0x37f054,_0x432113&&!_0x432113['isAttached']){const _0x39bfef=_0x432113['attachTo'](()=>this['_getTargetForId'](_0x29f88b));_0x3ccfd5['registerAnnotation'](_0x39bfef),_0x432113['isResolved']&&this['_reconvertMarkers'](_0x29f88b);}else{if(!_0x432113){const _0x51bf38=this['getAllMarkersForId'](_0x29f88b);_0x5447bb['model']['change'](_0x4d4af9=>{for(const _0x253592 of _0x51bf38)_0x4d4af9['removeMarker'](_0x253592);});}}}}),_0x432113;}['_handleThreadMarker'](_0x1d4338,_0x2d74cc){const _0x5e7bca=this['_attachMarkerToThread'](_0x1d4338,_0x2d74cc);_0x5e7bca&&!_0x5e7bca['context']&&_0x5e7bca['setContext']({'type':'text','value':this['_getTextContext'](_0x2d74cc)});}['_initAriaMarkerChangeAnnouncements'](){const _0x316c13=this['editor'];rt(_0x316c13['model'],({left:_0x890b1f,entered:_0x6bff26})=>{for(const _0x5dd99d of _0x890b1f)if(mt(_0x5dd99d)){_0x316c13['ui']['ariaLiveAnnouncer']['announce'](N(_0x316c13['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x29df52 of _0x6bff26)if(mt(_0x29df52)){_0x316c13['ui']['ariaLiveAnnouncer']['announce'](N(_0x316c13['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x368341)));break;}});}}function dt(_0x47e308,_0x16e6ef){return _0x16e6ef?_0x47e308+':'+_0x16e6ef:_0x47e308;}function ht(_0x21d340,_0x5baf60){const _0x47f7fc=_0x5baf60['schema'],_0x1545f3=_0x5baf60['createRange'](_0x21d340['start']);for(const _0x543120 of _0x21d340['getWalker']()){const {type:_0x307f71,item:_0x48bf18,nextPosition:_0x551a71}=_0x543120;if('text'===_0x307f71||_0x47f7fc['isObject'](_0x48bf18)){const _0x5915ef=_0x5baf60['createPositionBefore'](_0x48bf18);_0x1545f3['isCollapsed']&&(_0x1545f3['start']=_0x5915ef),_0x1545f3['end']=_0x551a71;}}return _0x1545f3;}function mt(_0x5d2ba1){return'comment'===ft(_0x5d2ba1['name'])['group'];}class s extends _0x478bf2{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x4cee2b=this['editor'],_0x3ece75=_0x4cee2b['plugins']['get'](o),_0x2cccb8=_0x4cee2b['plugins']['get'](r),_0x580b2f=_0x4cee2b['plugins']['get'](y),_0x36a140=_0x4cee2b['plugins']['get'](b);_0x4cee2b['ui']['componentFactory']['add']('comment',()=>{const _0x15df81=this['_createUIButton'](_0x503639);return _0x15df81['tooltip']=!0x0,_0x15df81;}),_0x4cee2b['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x6f0215)),_0x36a140['addSourceCollector'](()=>{const _0xcd5212=[];for(const [_0x65ae1e,_0x451fd4]of _0x3ece75['_threadToController']){const _0x25aaa0=_0x2cccb8['getAllMarkersForId'](_0x65ae1e['id']),_0x31f58b=_0x25aaa0['map'](_0x24ae68=>_0x24ae68['getRange']());_0x25aaa0['length']>0x0&&_0xcd5212['push']([_0x451fd4['view'],_0x31f58b]);}return _0xcd5212;}),this['listenTo'](_0x580b2f,'change:activeAnnotations',(_0xc4ff0d,_0x3b8d29,_0x5c84d5)=>{const _0x108bcf=Array['from'](_0x5c84d5)['map'](_0x4809c9=>_0x4809c9['innerView'])['find'](_0x59edac=>_0x3ece75['_viewToController']['has'](_0x59edac));if(!_0x108bcf)return void(_0x2cccb8['activeMarker']=null);const _0x2f63f8=_0x3ece75['_viewToController']['get'](_0x108bcf)['model']['id'],_0x59bcfa='comment:'+_0x2f63f8;_0x2f63f8&&_0x2cccb8['hasMarkerForId'](_0x2f63f8)?_0x2cccb8['activeMarker']=_0x59bcfa:_0x2cccb8['activeMarker']&&(_0x2cccb8['activeMarker']=null);}),this['listenTo'](_0x3ece75,'removeCommentThread',(_0x11bb9f,{threadId:_0x1a6648,isFromAdapter:_0x125eb9})=>{!_0x125eb9&&_0x4cee2b['ui']['focusTracker']['isFocused']&&_0x2cccb8['hasMarkerForId'](_0x1a6648)&&_0x4cee2b['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3ece75,'addComment',(_0x2ba8bf,{threadId:_0x4f2b3b,isFromAdapter:_0x795b58})=>{if(_0x795b58||!_0x2cccb8['hasMarkerForId'](_0x4f2b3b)||!_0x3ece75['hasCommentThread'](_0x4f2b3b))return;0x1===_0x3ece75['getCommentThread'](_0x4f2b3b)['length']&&(_0x4cee2b['editing']['view']['focus'](),_0x2ba8bf['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x223e8d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27de6a;for(const _0x481897 in _0x223e8d){const _0x5d4245=_0x481897,_0x4eee6e=_0x223e8d[_0x5d4245];if('commentsLicenseKeyValid'==_0x4eee6e||'commentsLicenseKeyInvalid'==_0x4eee6e||'commentsLicenseKeyExpired'==_0x4eee6e||'commentsLicenseKeyDomainLimit'==_0x4eee6e||'commentsLicenseKeyNotAllowed'==_0x4eee6e||'commentsLicenseKeyEvaluationLimit'==_0x4eee6e||'commentsLicenseKeyUsageLimit'==_0x4eee6e){delete _0x223e8d[_0x5d4245],_0x27de6a=_0x4eee6e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27de6a&&_0x223e8d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27de6a&&_0x223e8d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27de6a&&_0x223e8d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27de6a&&_0x223e8d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27de6a&&_0x223e8d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x27de6a&&_0x223e8d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x55c30e){const _0x20b552=this['editor'],_0x182d3f=new _0x55c30e(_0x20b552['locale']),_0x176844=_0x20b552['commands']['get']('addCommentThread');return _0x182d3f['set']({'label':N(_0x20b552['locale'],'Comment'),'icon':_0x3ab7aa}),_0x182d3f['bind']('isEnabled')['to'](_0x176844,'isEnabled',_0x176844,'hasContent',(_0x2b0678,_0x41c55d)=>_0x2b0678&&_0x41c55d),this['listenTo'](_0x182d3f,'execute',()=>{_0x176844['execute']();}),_0x182d3f;}}class i extends _0x478bf2{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x3781ed){super(_0x3781ed),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3e95ac,_0x15f411,_0x4383a1)=>{_0x4383a1?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x3003e8,_0x15cd1c]of this['editor']['commands'])_0x15cd1c['affectsData']&&'addCommentThread'!==_0x3003e8&&_0x15cd1c['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 _0x2a0147=this['editor']['editing']['view']['document'];this['listenTo'](_0x2a0147,'cut',_0x1bace7=>_0x1bace7['stop'](),{'priority':'highest'}),this['listenTo'](_0x2a0147,'clipboardInput',_0x108038=>_0x108038['stop'](),{'priority':'highest'}),this['listenTo'](_0x2a0147,'delete',_0x32da1c=>_0x32da1c['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4eef11,_0x2fccf1]of this['editor']['commands'])_0x2fccf1['affectsData']&&'addCommentThread'!==_0x4eef11&&_0x2fccf1['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x43ff48{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x40492d){super(_0x40492d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x5ddb5f=this['context']['plugins']['get'](y);this['listenTo'](_0x5ddb5f,'_activateAnnotation',(_0x40dd03,_0x69a226)=>{for(const _0x51dc4a of this['activeUIs']){const _0x6bb06=this['_uis']['get'](_0x51dc4a);(0x0,this['uisData']['get'](_0x51dc4a)['filter'])(_0x69a226)&&_0x6bb06['setActiveAnnotation'](_0x69a226);}}),this['listenTo'](_0x5ddb5f,'_deactivateAllAnnotations',()=>{for(const _0x3671b6 of this['activeUIs']){this['_uis']['get'](_0x3671b6)['setActiveAnnotation'](null);}}),this['listenTo'](_0x5ddb5f['_visibleAnnotations'],'add',(_0x19b319,_0x33e44a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x33e44a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x14ee27){return this['activeUIs']['has'](_0x14ee27);}['activate'](_0x2ecc00,_0x10b9ed=this['defaultFilter']){const _0x552104=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2ecc00))throw new _0x552662('annotationsuis-missing-ui',this,{'uiName':_0x2ecc00});this['isActive'](_0x2ecc00)&&this['deactivate'](_0x2ecc00),this['activeUIs']['add'](_0x2ecc00);const _0x21446e=new S();v({'source':_0x552104['_visibleAnnotations'],'target':_0x21446e,'filter':_0x10b9ed}),this['uisData']['set'](_0x2ecc00,{'collection':_0x21446e,'filter':_0x10b9ed});const _0x276af8=this['_uis']['get'](_0x2ecc00);_0x276af8['attach'](_0x21446e),this['listenTo'](_0x276af8,'change:activeAnnotation',(_0x8c199a,_0x56420c,_0x3bf5dc,_0x46065e)=>{_0x46065e&&_0x552104['_removeActiveAnnotation'](_0x46065e),_0x3bf5dc&&_0x552104['_addActiveAnnotation'](_0x3bf5dc);});}['deactivate'](_0x181343){if(this['activeUIs']['delete'](_0x181343),!this['_uis']['has'](_0x181343))throw new _0x552662('annotationsuis-missing-ui',this,{'uiName':_0x181343});const _0x505034=this['_uis']['get'](_0x181343);_0x505034['detach'](),this['stopListening'](_0x505034),this['uisData']['get'](_0x181343)['collection']['destroy'](),this['uisData']['delete'](_0x181343);}['switchTo'](_0x2d01e1){if(!this['_uis']['has'](_0x2d01e1))throw new _0x552662('annotationsuis-missing-ui',this,{'uiName':_0x2d01e1});const _0x7ef749=this['context']['plugins']['get'](y),_0xd57159=Array['from'](_0x7ef749['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2d01e1);const _0x3fcb98=this['_uis']['get'](_0x2d01e1);_0x3fcb98['setActiveAnnotation'](_0xd57159),_0x3fcb98['_setSelectedAnnotations']&&_0xd57159&&_0x3fcb98['_setSelectedAnnotations']([_0xd57159]);}['deactivateAll'](){for(const _0x582047 of this['activeUIs'])this['deactivate'](_0x582047);}['register'](_0x1531c5,_0x5e438e){if(this['_uis']['has'](_0x1531c5))throw new _0x552662('annotationsuis-register-already-registered');if('function'!=typeof _0x5e438e['attach']||'function'!=typeof _0x5e438e['detach']||'function'!=typeof _0x5e438e['setActiveAnnotation'])throw new _0x552662('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1531c5,_0x5e438e);}['refilterAnnotations'](){const _0x274c33=this['context']['plugins']['get'](y)['collection'],_0xa87f3c=new Map(),_0x42e6af=Array['from'](this['activeUIs']);for(const _0x41db8f of this['activeUIs']){const _0x32fa40=this['uisData']['get'](_0x41db8f)['collection'];for(const _0x391587 of _0x32fa40)_0xa87f3c['set'](_0x391587,_0x41db8f);}for(const _0x2c2fa3 of _0x274c33){const _0x1faba8=_0xa87f3c['get'](_0x2c2fa3);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2c2fa3);const _0x4bffa8=_0x42e6af['find'](_0x345e49=>this['uisData']['get'](_0x345e49)['filter'](_0x2c2fa3));_0x1faba8!==_0x4bffa8&&(_0x1faba8&&this['uisData']['get'](_0x1faba8)['collection']['remove'](_0x2c2fa3),_0x4bffa8&&this['uisData']['get'](_0x4bffa8)['collection']['add'](_0x2c2fa3));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x67779c){const _0x3403ae=[];for(const _0x2a2b65 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2a2b65)['filter'])(_0x67779c)&&_0x3403ae['push'](_0x2a2b65);}if(_0x3403ae['length']>0x1)throw new _0x552662('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3403ae,'annotationType':_0x67779c['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0xfda54d){super(_0xfda54d);const _0x21084b=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 _0x67b3fd(),this['focusCycler']=new _0x19c5c8({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x21084b['to']('class')],'style':{'minHeight':_0x21084b['to']('minHeight',_0x25e75d=>'number'==typeof _0x25e75d?_i(_0x25e75d+0xa):null)},'dir':_0xfda54d['uiLanguageDirection'],'role':'application','aria-label':N(_0xfda54d,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0xfda54d,'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',_0x5cad37=>{this['_updateItemPositionInFocusables'](_0x5cad37['source']);}),this['list']['forEach'](_0x24a02a=>{this['focusTracker']['add'](_0x24a02a['element']),this['_updateItemPositionInFocusables'](_0x24a02a);}),this['list']['on']('change',(_0x2b3c11,_0x4dd0ef)=>{for(const _0x5c591b of _0x4dd0ef['removed'])this['focusTracker']['remove'](_0x5c591b['element']),this['focusables']['remove'](_0x5c591b);for(const _0x18e692 of _0x4dd0ef['added'])this['focusTracker']['add'](_0x18e692['element']),this['_updateItemPositionInFocusables'](_0x18e692);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x25e704){const _0x4dc186=this['focusables']['getIndex'](_0x25e704);let _0x2c3e73,_0x183a92;for(const _0x1e6b14 of this['focusables'])if(_0x25e704['top']<_0x1e6b14['top']){_0x2c3e73=_0x1e6b14;break;}if(_0x183a92=_0x2c3e73?this['focusables']['getIndex'](_0x2c3e73):this['focusables']['length'],-0x1!==_0x4dc186){if(_0x4dc186===_0x183a92-0x1)return;this['focusables']['remove'](_0x25e704),_0x183a92=_0x2c3e73?this['focusables']['getIndex'](_0x2c3e73):this['focusables']['length'];}this['focusables']['add'](_0x25e704,_0x183a92);}}const Ot=/* #__PURE__ -- @preserve */
33
- Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1e93e1){super(_0x1e93e1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x18df39,_0x126234)=>_0x18df39+_0x126234),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x215c1c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x215c1c['to']('isAnimationDisabled',_0x47d003=>_0x47d003?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x215c1c['to']('top',_0x5e1af1=>Ot(_0x5e1af1))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x504e73=this['element']['clientHeight'];_0x504e73&&(this['height']=_0x504e73);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x43ff48{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x371e50){super(_0x371e50),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 _0xddb7df=this['context']['config']['get']('sidebar.container');_0xddb7df&&this['setContainer'](_0xddb7df);}['setContainer'](_0x513c54){if(!g(_0x513c54))throw new _0x552662('sidebar-setcontainer-invalid-element');this['container']=_0x513c54;}['_attachToContainer']({viewClass:_0x19fcdd='',spaceBetweenItems:_0x519e41=0x19}={}){if(!g(this['container']))throw new _0x552662('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x19fcdd,this['_spaceBetweenItems']=_0x519e41;}['rearrange']({removedAnnotation:_0x228c99,previousAnnotation:_0x5c8d39,nextAnnotation:_0x30bfe4}){const _0x1692f0=this['getSidebarItemView'](_0x228c99);this['view']['list']['remove'](_0x1692f0),this['_destroySidebarItemView'](_0x228c99),_0x5c8d39&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5c8d39)),_0x30bfe4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x30bfe4)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2597bf,activatedAnnotation:_0xf61ae,disableAnimationOnActivatedAnnotation:_0x3a6206}){if(this['_activeAnnotation']=_0xf61ae,_0x2597bf){_0x2597bf['isActive']=!0x1;const _0x246cb9=this['getSidebarItemView'](_0x2597bf);_0x246cb9&&_0x3a6206&&(_0x246cb9['isAnimationDisabled']=!0x1);}if(_0xf61ae){const _0x181c06=this['getSidebarItemView'](_0xf61ae);_0x181c06&&(_0xf61ae['isActive']=!0x0,_0x3a6206&&(_0x181c06['isAnimationDisabled']=!0x0,_0x181c06['top']+=0x1),this['_alignToTargetRect'](_0x181c06));}}['_detachFromContainer'](_0x487573){if(this['view']['element']['remove'](),_0x487573){for(const _0x2595b8 of _0x487573)this['_destroySidebarItemView'](_0x2595b8);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x45537b,_0x2974d5){_0x2974d5||(_0x2974d5=_0x45537b['view']);const _0xb86964=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xb86964,_0x45537b),this['_annotationToSidebarItemView']['set'](_0x45537b,_0xb86964),_0xb86964['content']['add'](_0x2974d5),this['listenTo'](_0x45537b['view'],'change:targetRect',(_0x23aab7,_0x1257ec,_0x24f78b)=>{const _0x3fe6f3=this['_getTargetTop'](_0x45537b,_0x24f78b);_0xb86964['_targetTop']!=_0x3fe6f3&&(_0xb86964['_targetTop']=_0x3fe6f3,this['_setItemTop'](_0xb86964,_0x3fe6f3));}),this['listenTo'](_0xb86964,'change:top',()=>{this['_recalculate'](_0xb86964,'top');}),this['listenTo'](_0xb86964,'change:bottom',()=>{this['_recalculate'](_0xb86964,'bottom');}),this['_alignToTargetRect'](_0xb86964);const _0x4a151a=this['_getItemBefore'](_0xb86964);if(_0x4a151a)this['_alignAfterItem'](_0x4a151a,_0xb86964)||this['_alignToTargetRect'](_0xb86964);else this['_alignToTargetRect'](_0xb86964);return this['_updateLastItem'](),this['view']['list']['add'](_0xb86964),_0xb86964;}['_alignForTopChange'](_0x29ada4){if(!_0x29ada4['content']['length'])return;const _0x1ccb00=this['_getItemBefore'](_0x29ada4);if(!_0x1ccb00)return;const _0x83eb0b=this['_sidebarItemViewToAnnotation']['get'](_0x1ccb00),_0x526a16=this['_activeAnnotation'];_0x526a16&&_0x526a16===_0x83eb0b?this['_alignAfterItem'](_0x1ccb00,_0x29ada4):this['_alignBeforeItem'](_0x29ada4,_0x1ccb00);}['_alignForBottomChange'](_0x29b83d){if(!_0x29b83d['content']['length'])return;const _0x22eebb=this['_getItemAfter'](_0x29b83d);if(!_0x22eebb)return;const _0x2c16bf=this['_sidebarItemViewToAnnotation']['get'](_0x22eebb),_0x506304=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x14571c=this['_activeAnnotation'];_0x14571c&&_0x14571c===_0x2c16bf&&_0x506304?(this['_alignBeforeItem'](_0x22eebb,_0x29b83d),this['_alignAfterItem'](_0x29b83d,_0x22eebb)):_0x14571c&&_0x14571c===_0x2c16bf?this['_alignBeforeItem'](_0x22eebb,_0x29b83d):this['_alignAfterItem'](_0x29b83d,_0x22eebb);}['_recalculate'](_0x447216,_0x2110a5){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xb2921f,changedProp:_0x4924e3}of this['_recalculateBuffer'])'top'===_0x4924e3?this['_alignForTopChange'](_0xb2921f):this['_alignForBottomChange'](_0xb2921f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x447216,'changedProp':_0x2110a5});}['getSidebarItemView'](_0x150af4){return this['_annotationToSidebarItemView']['get'](_0x150af4);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x22f87f){const _0x1171c0=this['getSidebarItemView'](_0x22f87f);this['stopListening'](_0x1171c0),this['stopListening'](_0x22f87f['view']),_0x1171c0['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x22f87f),this['_sidebarItemViewToAnnotation']['delete'](_0x1171c0);}['_createSidebarView'](){const _0x293724=new H(this['context']['locale']);return _0x293724['render'](),this['on']('change:_lastItem',(_0x50366c,_0x3db9a8,_0x516c15,_0x345a92)=>{_0x345a92&&_0x293724['unbind']('minHeight'),_0x516c15?_0x293724['bind']('minHeight')['to'](_0x516c15,'bottom'):_0x293724['minHeight']=null;}),_0x293724;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x33f94e){const _0x4adacb=this['_sidebarItemViewToAnnotation']['get'](_0x33f94e),_0x317e7a=_0x4adacb&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4adacb)-0x1);return _0x317e7a&&this['getSidebarItemView'](_0x317e7a)||null;}['_getItemAfter'](_0x2cc543){const _0x58e209=this['_sidebarItemViewToAnnotation']['get'](_0x2cc543),_0x5aadcc=_0x58e209&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x58e209)+0x1);return _0x5aadcc&&this['getSidebarItemView'](_0x5aadcc)||null;}['_alignBeforeItem'](_0x4c1754,_0x5cb4d7){_0x4c1754['updateHeight']();const _0x130559=G(_0x5cb4d7['bottom']+this['_spaceBetweenItems'],_0x4c1754['top']);return!!_0x130559&&(this['_setItemTop'](_0x5cb4d7,_0x5cb4d7['top']-_0x130559),!0x0);}['_alignAfterItem'](_0x3ad64d,_0x31143c){_0x3ad64d['updateHeight']();const _0x338f0f=G(_0x3ad64d['bottom']+this['_spaceBetweenItems'],_0x31143c['top']);return!!_0x338f0f&&(this['_setItemTop'](_0x31143c,_0x31143c['top']+_0x338f0f,!0x1),!0x0);}['_alignToTargetRect'](_0x58ac9a){const _0x10e130=this['_sidebarItemViewToAnnotation']['get'](_0x58ac9a);if(!_0x10e130||!_0x10e130['target']||!_0x10e130['targetRect'])return;const _0x300134=this['_getTargetTop'](_0x10e130,_0x10e130['targetRect']);this['_setItemTop'](_0x58ac9a,_0x300134);}['_getTargetTop'](_0x11b9c6,_0x1109f3){if(null===_0x1109f3)return 0x0;if(_0x11b9c6['target']instanceof _0x221bff)return _0x1109f3['top'];{const _0x1251b1=new _0x221bff(this['view']['element'])['top'];return _0x1109f3['top']-_0x1251b1;}}['_setItemTop'](_0x274680,_0x138acb,_0x502230=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x502230&&(_0x138acb=Math['max'](_0x138acb,this['_getMaxAvailableTop'](_0x274680))),_0x274680['top']=_0x138acb;}['_getMaxAvailableTop'](_0x163a6d){let _0xb0226=this['_getItemBefore'](_0x163a6d),_0x318ca7=0x0;for(;_0xb0226;)_0xb0226['updateHeight'](),_0x318ca7+=this['_spaceBetweenItems']+_0xb0226['height'],_0xb0226=this['_getItemBefore'](_0xb0226);return _0x318ca7;}}function G(_0x4aaf14,_0x5315c0){return Math['max'](_0x4aaf14-_0x5315c0,0x0);}function g(_0x84a6e5){return null!==_0x84a6e5&&'object'==typeof _0x84a6e5&&0x1===_0x84a6e5['nodeType'];}class e extends _0x43ff48{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f7eb4){super(_0x2f7eb4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x842883(),this['_refreshPositioningDebounced']=_0x391904(()=>{_0x2f7eb4['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5339d0=this['context']['plugins']['get'](j),_0x21480c=this['context']['plugins']['get'](z);_0x5339d0['register']('wideSidebar',this),_0x21480c['container']&&_0x5339d0['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4887f1){if(_0x4887f1===this['activeAnnotation'])return;const _0x10e5c5=this['context']['plugins']['get'](z);_0x10e5c5['_activeAnnotation']=_0x4887f1;const _0x2da9cc=this['activeAnnotation'];_0x10e5c5['refresh']({'blurredAnnotation':_0x2da9cc,'activatedAnnotation':_0x4887f1}),this['activeAnnotation']=_0x4887f1;}['attach'](_0x58fbdb){this['annotations']=_0x58fbdb;const _0x2357e1=this['context']['plugins']['get'](z);if(_0x2357e1['_annotations']=_0x58fbdb,this['isAttached'])throw new _0x552662('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2357e1,'set:container',()=>{this['detach'](),this['listenTo'](_0x2357e1,'change:container',_0x10df38=>{_0x10df38['off'](),this['attach'](_0x58fbdb);});}),_0x2357e1['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x249047=_0x3d0ca2=>{_0x3d0ca2['updateTargetRect'](),_0x2357e1['addAnnotation'](_0x3d0ca2);};for(const _0x56119d of _0x58fbdb)_0x249047(_0x56119d);this['listenTo'](_0x58fbdb,'add',(_0x368e2c,_0x1c21fc)=>{_0x249047(_0x1c21fc);}),this['listenTo'](_0x58fbdb,'remove',(_0x3c9e2f,_0x560aaf,_0x558015)=>{_0x2357e1['rearrange']({'removedAnnotation':_0x560aaf,'previousAnnotation':_0x58fbdb['get'](_0x558015-0x1),'nextAnnotation':_0x58fbdb['get'](_0x558015+0x1)}),_0x560aaf===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x58fbdb,'focus',(_0x3505a7,_0x3a3d13)=>{this['setActiveAnnotation'](_0x3a3d13);}),this['listenTo'](_0x58fbdb,'blur',()=>{this['setActiveAnnotation'](null);});const _0x24e595=this['context']instanceof _0x4aa052?this['context']['editors']:new _0x842883([this['context']]);for(const _0x56c247 of _0x24e595)this['_integrateWithEditorAnnotations'](_0x56c247);this['listenTo'](_0x24e595,'add',(_0x42be1a,_0x3dc466)=>{this['listenTo'](_0x3dc466,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3dc466);});}),this['listenTo'](_0x24e595,'remove',(_0x5b8e59,_0x416375)=>{_0x416375['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x416375['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x552662('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x17bb91=this['context']['plugins']['get'](z);_0x17bb91['_detachFromContainer'](this['annotations']),this['stopListening'](_0x17bb91),this['stopListening'](this['annotations']),this['context']instanceof _0x4aa052&&this['stopListening'](this['context']['editors']);for(const _0xd3cbf6 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xd3cbf6);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x119099){if(!_0x119099['plugins']['has']('EditorAnnotations'))return;const _0x1c354a=_0x119099['plugins']['get']('EditorAnnotations'),_0xa91ad7=()=>{const _0x439d0b=_0x1c354a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x439d0b[0x0]||null);};this['listenTo'](_0x1c354a,'refresh',_0xa91ad7),this['listenTo'](_0x1c354a,'blur',(_0xa40863,{isAnnotationTracked:_0x1b9746})=>{this['activeAnnotation']&&_0x1b9746(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1c354a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3b1986=>{_0x1c354a['hasDomSelection']()&&(_0xa91ad7(),_0x3b1986['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1c354a);}['_destroyEditorAnnotationsIntegration'](_0x6cf8c8){this['stopListening'](_0x6cf8c8),this['_editorAnnotations']['remove'](_0x6cf8c8);}}class C extends _0x503639{['counterView'];constructor(_0x532d13){super(_0x532d13);const _0x150297=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4f10e5,_0x1168d7)=>_0x4f10e5?'...':_0x1168d7['toString']()),this['set']('annotationType',''),this['icon']=_0x3ab7aa,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x150297['to']('annotationType',_0x416a4e=>'ck-annotation-counter__badge--'+_0x416a4e),_0x150297['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x150297['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x43ff48{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d0cfc){super(_0x4d0cfc),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x122649())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x842883(),this['_refreshPositioningDebounced']=_0x391904(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x125bcc(this['context']['locale']),this['balloonPanelView']=new _0x3ec0f5(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x59125b){this['annotations']=_0x59125b;const _0xea4f60=this['context']['plugins']['get'](z),_0x571cc8=this['balloonPanelView'];if(_0xea4f60['_annotations']=_0x59125b,this['isAttached'])throw new _0x552662('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xea4f60,'set:container',()=>{this['detach'](),this['listenTo'](_0xea4f60,'change:container',_0xdffeca=>{_0xdffeca['off'](),this['attach'](_0x59125b);});}),_0xea4f60['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2acc20=_0xa8f2de=>{const _0x39092e=new C(this['context']['locale']);_0xea4f60['addAnnotation'](_0xa8f2de,_0x39092e),this['_annotationToNarrowView']['set'](_0xa8f2de,_0x39092e),_0x39092e['bind']('isDirty','annotationType','number')['to'](_0xa8f2de['view'],'isDirty','type','length'),_0x39092e['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x571cc8['content']['first']!==_0xa8f2de['view']?(this['_showBalloon'](_0xa8f2de),_0xa8f2de['view']['element']['focus'](),this['setActiveAnnotation'](_0xa8f2de)):this['setActiveAnnotation'](null);});};for(const _0x1acf38 of _0x59125b)_0x2acc20(_0x1acf38);this['listenTo'](_0x59125b,'add',(_0x2ca830,_0x517688)=>{_0x2acc20(_0x517688);}),this['listenTo'](_0x59125b,'remove',(_0x47fecc,_0x331817,_0x489b7b)=>{this['_annotationToNarrowView']['get'](_0x331817)['destroy'](),this['_annotationToNarrowView']['delete'](_0x331817),_0xea4f60['rearrange']({'removedAnnotation':_0x331817,'previousAnnotation':_0x59125b['get'](_0x489b7b-0x1),'nextAnnotation':_0x59125b['get'](_0x489b7b+0x1)}),_0x331817===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x59125b,'focus',(_0x17a08c,_0x51da76)=>{this['setActiveAnnotation'](_0x51da76);}),this['listenTo'](_0x59125b,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x59c7b0,_0x3d04e2)=>{_0x3d04e2['keyCode']===_0x25b2ac['esc']&&_0x571cc8['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x571cc8['content']['first']),this['_hideBalloon'](),_0x3d04e2['stopPropagation'](),_0x3d04e2['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x8140a,_0x3ffd75)=>{const _0xae1a1e=_0x3ffd75['target'];_0x571cc8['isVisible']&&_0x571cc8['element']['contains'](_0xae1a1e)||_0xea4f60['view']['element']['contains'](_0xae1a1e)||_0x8140a['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xc17966=>_0xc17966['contains'](_0xae1a1e))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x594056=this['context']instanceof _0x4aa052?this['context']['editors']:new _0x842883([this['context']]);for(const _0x4256e1 of _0x594056)this['_integrateWithEditorAnnotations'](_0x4256e1);this['listenTo'](_0x594056,'add',(_0x4f36ae,_0x3a28ec)=>{this['listenTo'](_0x3a28ec,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3a28ec);});}),this['listenTo'](_0x594056,'remove',(_0x4ec56,_0x4a6feb)=>{_0x4a6feb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4a6feb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x25e580){if(_0x25e580===this['activeAnnotation'])return;const _0x29a4fc=this['context']['plugins']['get'](z);if(_0x29a4fc['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x25e580,'disableAnimationOnActivatedAnnotation':!0x0}),_0x25e580)_0x29a4fc['getSidebarItemView'](_0x25e580)?this['_showBalloon'](_0x25e580):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x25e580;}['detach'](){if(!this['isAttached'])throw new _0x552662('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x591827=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5f1e74=>_0x5f1e74['destroy']()),this['_annotationToNarrowView']['clear'](),_0x591827['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4aa052&&this['stopListening'](this['context']['editors']);for(const _0x124c9b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x124c9b);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'](_0x2ecd23){if(!_0x2ecd23['plugins']['has']('EditorAnnotations'))return;const _0x5ef940=_0x2ecd23['plugins']['get']('EditorAnnotations'),_0x592089=this['context']['plugins']['get'](z),_0x3fb5ee=this['annotations'],_0x58a469=this['balloonPanelView'],_0x54ca52=()=>{const _0x295874=_0x5ef940['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x295874),this['setActiveAnnotation'](_0x295874[0x0]||null);};this['listenTo'](_0x5ef940,'refresh',_0x54ca52),this['listenTo'](_0x5ef940,'blur',(_0xdcaddd,{isAnnotationTracked:_0x415037})=>{this['activeAnnotation']&&_0x415037(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5ef940,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3fb5ee,'blur',_0x468f2d=>{_0x5ef940['hasDomSelection']()&&_0x468f2d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x212877,_0x50c87b)=>{const _0x23e25c=_0x50c87b['target'];_0x58a469['isVisible']&&_0x58a469['element']['contains'](_0x23e25c)||_0x592089['view']['element']['contains'](_0x23e25c)||this['activeAnnotation']&&_0x5ef940['hasDomSelection']()&&(_0x54ca52(),_0x212877['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5ef940);}['_destroyEditorAnnotationsIntegration'](_0x125f9d){_0x125f9d&&(this['stopListening'](_0x125f9d),this['_editorAnnotations']['remove'](_0x125f9d));}['_setSelectedAnnotations'](_0x1e562f){for(const _0x3f109e of this['_selectedAnnotations'])_0x1e562f['includes'](_0x3f109e)||this['_manuallyClosedAnnotationViews']['delete'](_0x3f109e['view']);this['_selectedAnnotations']=_0x1e562f;}['_refreshPositioning'](){const _0x37d17d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x37d17d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2bcb22){if(this['_manuallyClosedAnnotationViews']['has'](_0x2bcb22['view']))return;const _0x3850da=this['balloonPanelView']['content']['first'];_0x3850da!==_0x2bcb22['view']?(_0x3850da&&this['_detachListeners'](_0x3850da),this['_attachListeners'](_0x2bcb22['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2bcb22['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x53b909=this['balloonPanelView']['content']['first'],_0x6013fe=_0x53b909&&this['annotations']['getByView'](_0x53b909);if(!_0x6013fe||!this['_annotationToNarrowView']['has'](_0x6013fe))return;const _0x2819a2=this['_annotationToNarrowView']['get'](_0x6013fe)['element'],_0x1b5e6e=(function(){const _0xd5b076=_0x3ec0f5['defaultPositions'];return[_0xd5b076['southArrowNorthEast'],_0xd5b076['northArrowSouthEast'],_0xd5b076['southArrowNorth'],_0xd5b076['northArrowSouth'],_0xd5b076['southArrowNorthWest'],_0xd5b076['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2819a2,'positions':_0x1b5e6e});}['_hideBalloon'](){const _0x361fa6=this['balloonPanelView'],_0x1b9420=_0x361fa6['content']['first'];_0x1b9420&&(this['_detachListeners'](_0x1b9420),_0x361fa6['unpin'](),_0x361fa6['content']['clear']());}['_attachListeners'](_0x296e9a){this['listenTo'](_0x296e9a,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x296e9a,'Esc',(_0x3b1ca3,_0x1b76df)=>{this['_manuallyClosedAnnotationViews']['add'](_0x296e9a),this['_hideBalloon'](),_0x1b76df();});}['_detachListeners'](_0x2fa906){this['stopListening'](_0x2fa906);}}class c extends _0x478bf2{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x235f3d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31921a){super(_0x31921a),_0x31921a['editing']['view']['addObserver'](_0x14edff),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x31921a['plugins']['get'](_0x235f3d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x391904(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x424703=this['editor']['plugins']['get'](j);_0x424703['context']===this['editor']&&(_0x424703['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xc229b1,_0x589803)=>{const _0x3a41ea=this['_balloon'];if(this['isAttached']&&_0x3a41ea['visibleView']){const _0x226865=this['annotations']['getByView'](_0x3a41ea['visibleView']);_0x226865&&this['_closeAnnotation'](_0x226865),_0x589803();}}));}['afterInit'](){const _0x1be0a2=this['editor']['plugins']['get'](j);_0x1be0a2['context']===this['editor']&&(_0x1be0a2['hasActive']()||_0x1be0a2['switchTo']('inline'));}['setActiveAnnotation'](_0x53b0e2){_0x53b0e2!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x53b0e2&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x53b0e2)&&this['_addAnnotationToBalloon'](_0x53b0e2,!0x0),_0x53b0e2['isActive']=!0x0),_0x53b0e2||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x53b0e2);}['attach'](_0x2b8b29){this['annotations']=_0x2b8b29;const _0x454788=this['editor']['plugins']['get'](j),_0x22583f=this['_balloon'];if(this['isAttached'])throw new _0x552662('inlineannotations-attach-already-attached',this);if(_0x454788['context']!==this['editor'])throw new _0x552662('inlineannotations-not-allowed-with-context',this);const _0x1322f4=this['editor']['plugins']['get'](b);this['listenTo'](_0x1322f4,'refresh',()=>{const _0x57544a=_0x1322f4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3602fb,_0x46f283;!this['_forceRefresh']&&(_0x3602fb=_0x57544a,_0x46f283=this['_selectedAnnotations'],_0x3602fb['length']===_0x46f283['length']&&_0x3602fb['every'](_0xffc28d=>_0x46f283['includes'](_0xffc28d)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x57544a),this['setActiveAnnotation'](_0x57544a[0x0]||null));}),this['listenTo'](_0x1322f4,'blur',(_0x2339c9,{isAnnotationTracked:_0x1bd371})=>{this['activeAnnotation']&&_0x1bd371(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1322f4,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x11029b,_0x171284,_0x4846ad)=>{_0x4846ad||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2b8b29,'remove',(_0x4dcabf,_0x490033)=>{this['_removeAnnotationFromBalloon'](_0x490033),_0x490033===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x22583f,'change:visibleView',(_0x3e8c70,_0x2efac6,_0x494ac5,_0x538f99)=>{_0x538f99&&this['stopListening'](_0x538f99);const _0x56e811=_0x2b8b29['getByView'](_0x494ac5);_0x494ac5&&_0x56e811&&(this['listenTo'](_0x494ac5,'change:height',()=>{_0x22583f['updatePosition']();}),this['listenTo'](_0x494ac5,'Esc',()=>{this['_closeAnnotation'](_0x56e811),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x56e811&&this['setActiveAnnotation'](_0x56e811));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x22583f['visibleView']&&(_0x2b8b29['getByView'](_0x22583f['visibleView'])&&_0x22583f['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 _0x552662('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xeda3e1 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xeda3e1);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3a205c){for(const _0x1ba4d4 of this['_selectedAnnotations'])_0x3a205c['includes'](_0x1ba4d4)||this['_manuallyClosed']['delete'](_0x1ba4d4);for(const _0x372c8c of this['annotations'])_0x3a205c['includes'](_0x372c8c)||this['_removeAnnotationFromBalloon'](_0x372c8c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1ccf65 of _0x3a205c)this['_addAnnotationToBalloon'](_0x1ccf65);}this['_selectedAnnotations']=_0x3a205c;}['_addAnnotationToBalloon'](_0x319c95,_0xbbb124=!0x1){this['_manuallyClosed']['has'](_0x319c95)||(this['_addedAnnotations']['has'](_0x319c95)||this['_balloon']['hasView'](_0x319c95['view'])||(this['_addedAnnotations']['add'](_0x319c95),this['_balloon']['add']({'stackId':_0x319c95['view']['id'],'view':_0x319c95['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x319c95)}})),_0xbbb124&&this['_balloon']['showStack'](_0x319c95['view']['id']));}['_getBalloonTargetForAnnotation'](_0xce2923){const _0x516e3d=_0xce2923['target'],_0x1dbbaf=this['editor']['editing']['view'],_0x6d753=_0x1dbbaf['document']['selection']['getFirstRange'](),_0x217ed2=_0x1dbbaf['domConverter']['viewRangeToDom'](_0x6d753);if(_0x217ed2['collapse'](!0x0),_0x516e3d){if(_0x516e3d instanceof _0x221bff)return _0x516e3d;let _0x4e769c=[];for(const _0x35f05c of _0x516e3d)_0x4e769c['push'](...F(_0x35f05c['getClientRects']()));_0x4e769c=function(_0x27a1b0){const _0x14a450=[];let _0x1f2ed5=_0x27a1b0[0x0];for(let _0x42ce00=0x1;_0x42ce00<_0x27a1b0['length'];_0x42ce00++)P(_0x1f2ed5,_0x27a1b0[_0x42ce00])?_0x1f2ed5['width']+=_0x27a1b0[_0x42ce00]['width']:(_0x14a450['push'](_0x1f2ed5),_0x1f2ed5=_0x27a1b0[_0x42ce00]);return _0x14a450['push'](_0x1f2ed5),_0x14a450;}(_0x4e769c);const _0x2e693f=_0x217ed2['getBoundingClientRect']();return _0x4e769c['find'](_0x429234=>_0x429234['top']<=_0x2e693f['top']&&_0x429234['bottom']>=_0x2e693f['bottom']&&_0x429234['left']<=_0x2e693f['left']&&_0x429234['right']>=_0x2e693f['right'])||_0x4e769c[0x0];}return _0xce2923['targetRect']||_0x217ed2;}['_removeAnnotationFromBalloon'](_0x5f2c0f){this['_addedAnnotations']['has'](_0x5f2c0f)&&this['_balloon']['hasView'](_0x5f2c0f['view'])&&(this['_addedAnnotations']['delete'](_0x5f2c0f),this['_balloon']['remove'](_0x5f2c0f['view']));}['_closeAnnotation'](_0x4df32d){this['_manuallyClosed']['add'](_0x4df32d),this['_removeAnnotationFromBalloon'](_0x4df32d);}}function F(_0x171a7c){return Array['from'](_0x171a7c)['map'](DOMRect['fromRect']);}function P(_0x39c4fe,_0xc6f783){return _0x39c4fe['top']===_0xc6f783['top']&&_0x39c4fe['bottom']===_0xc6f783['bottom']&&_0x39c4fe['right']===_0xc6f783['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x37ef2e,_0x38c3b8){super(_0x37ef2e),this['set']('isEmpty',!_0x38c3b8['length']),this['focusTracker']=new _0x67b3fd(),this['_annotationViews']=_0x38c3b8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x19c5c8({'focusables':_0x38c3b8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x38c3b8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x38c3b8,'remove',(_0x23ef70,_0x398e17)=>{_0x398e17['isActive']&&this['focus'](),_0x38c3b8['length']||(this['isEmpty']=!0x0);});const _0x2759aa=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x37ef2e,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x38c3b8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2759aa['if']('isEmpty','ck-hidden',_0x33e478=>!_0x33e478)]},'children':[{'text':N(_0x37ef2e,'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 _0xa264d9 of this['_annotationViews'])this['focusTracker']['add'](_0xa264d9['element']);this['_annotationViews']['on']('change',(_0x3f1c0b,{added:_0x2770ce,removed:_0x39f56b})=>{for(const _0x573bb9 of _0x2770ce)this['focusTracker']['add'](_0x573bb9['element']);for(const _0x4219c9 of _0x39f56b)this['focusTracker']['remove'](_0x4219c9['element']);});}}class p extends _0x43ff48{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4e839e){super(_0x4e839e),this['archivedThreads']=new _0x842883();}['init'](){const _0x1af90f=this['context'],_0x453921=_0x1af90f['plugins']['get'](o),_0x209ff1=_0x1af90f['plugins']['get'](y);this['listenTo'](_0x453921,'addCommentThread',(_0x11fb37,{threadId:_0x2b9ce7})=>{const _0x141c59=_0x453921['getCommentThread'](_0x2b9ce7);_0x141c59['archivedAt']&&this['archivedThreads']['add'](_0x141c59,this['_calculatePosition'](_0x141c59['archivedAt'])),this['listenTo'](_0x141c59,'change:archivedAt',(_0x1dc11b,_0x28e716,_0x48f63a)=>{_0x48f63a?this['archivedThreads']['has'](_0x141c59)||this['archivedThreads']['add'](_0x141c59,this['_calculatePosition'](_0x141c59['archivedAt'])):this['archivedThreads']['has'](_0x141c59)&&this['archivedThreads']['remove'](_0x141c59);});}),this['listenTo'](_0x453921,'removeCommentThread',(_0x3f4bc1,{threadId:_0x139839})=>{const _0x3447c8=_0x453921['getCommentThread'](_0x139839);this['stopListening'](_0x3447c8),this['archivedThreads']['has'](_0x3447c8)&&this['archivedThreads']['remove'](_0x3447c8);},{'priority':'highest'}),this['listenTo'](_0x209ff1['collection'],'focus',(_0x57f9bf,_0x231bd0)=>{_0x231bd0['isVisible']||(_0x231bd0['isActive']=!0x0,_0x209ff1['activate'](_0x231bd0));});}['_calculatePosition'](_0x291e89){const _0x403cef=[...this['archivedThreads']]['findIndex'](_0x56b291=>_0x56b291['archivedAt']<_0x291e89);return _0x403cef>-0x1?_0x403cef:this['archivedThreads']['length'];}}class a extends _0x478bf2{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x104467];}constructor(_0x7287b9){super(_0x7287b9),this['annotationViews']=new _0x3aecc1(),this['_pendingThreads']=[];}['init'](){const _0x4cf87f=this['editor'],_0x273733=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4cf87f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x503639,!0x0)),_0x4cf87f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x465a3e=this['_createCommentsArchiveButton'](_0x6f0215);return _0x465a3e['set']({'role':'menuitemcheckbox'}),_0x465a3e;});const _0x199ef6=_0x4cf87f['plugins']['get'](p),_0x5331d3=_0x4cf87f['plugins']['get']('Annotations'),_0x661e0d=_0x4cf87f['plugins']['get']('CommentsRepository');_0x199ef6['archivedThreads']['forEach'](_0x5d2f1d=>{this['_handleNewThread'](_0x5d2f1d);}),this['listenTo'](_0x199ef6['archivedThreads'],'add',(_0x4e6376,_0x39bb89)=>{this['_handleNewThread'](_0x39bb89);}),this['listenTo'](_0x5331d3['collection'],'add',(_0x264aa1,_0x33f966)=>{const _0x201824=this['_pendingThreads']['find'](_0x110c63=>{const _0x3f9383=_0x661e0d['_threadToController']['get'](_0x110c63);return _0x3f9383&&_0x33f966['innerView']===_0x3f9383['view'];});if(_0x201824){const _0x46de72=this['_calculatePosition'](_0x201824['archivedAt']);this['_addAnnotationToArchive'](_0x33f966,_0x46de72),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x201824),0x1);}}),this['listenTo'](_0x199ef6['archivedThreads'],'remove',(_0xbe38f9,_0x11a48c)=>{const _0x54f7b9=_0x4cf87f['config']['get']('collaboration.channelId');if(!_0x54f7b9||_0x11a48c['channelId']===_0x54f7b9){if(this['_pendingThreads']['includes'](_0x11a48c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x11a48c),0x1);else{const _0x48c19e=_0x661e0d['_threadToController']['get'](_0x11a48c),_0x117583=_0x5331d3['getByInnerView'](_0x48c19e['view']);this['annotationViews']['remove'](_0x117583['view']),this['stopListening'](_0x117583),this['stopListening'](_0x117583['focusableElements']);}}}),this['listenTo'](_0x5331d3['collection'],'add',(_0x1b0d17,_0x819808)=>{this['listenTo'](_0x819808,'escape',_0x273733);}),this['listenTo'](_0x5331d3['collection'],'remove',(_0x5505d7,_0x5c3367)=>{this['stopListening'](_0x5c3367,'escape',_0x273733);});}['_addAnnotationToArchive'](_0xa98ec3,_0x275599){this['listenTo'](_0xa98ec3,'set:isVisible',_0x12f437=>{_0x12f437['return']=!0x1,_0x12f437['stop']();}),this['annotationViews']['add'](_0xa98ec3['view'],_0x275599);}['_handleNewThread'](_0x16c645){const _0x4528db=this['editor']['plugins']['get']('CommentsRepository'),_0x11987c=this['editor']['plugins']['get']('Annotations'),_0x26b75f=this['editor']['config']['get']('collaboration.channelId');if(!_0x26b75f||_0x16c645['channelId']===_0x26b75f){const _0x5b8b17=_0x4528db['_threadToController']['get'](_0x16c645);if(!_0x5b8b17)return void this['_pendingThreads']['push'](_0x16c645);const _0xcca8a1=this['_calculatePosition'](_0x16c645['archivedAt']),_0x1d8537=_0x11987c['getByInnerView'](_0x5b8b17['view']);_0x1d8537['isVisible']&&_0x11987c['_visibleAnnotations']['remove'](_0x1d8537),this['_addAnnotationToArchive'](_0x1d8537,_0xcca8a1);}}['_calculatePosition'](_0x15162b){const _0xafcc18=this['editor']['config']['get']('collaboration.channelId'),_0x3ebf11=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x429f92=>_0x429f92['channelId']===_0xafcc18)['findIndex'](_0x19f4ad=>_0x19f4ad['archivedAt']<_0x15162b);return _0x3ebf11<0x0||_0x3ebf11>this['annotationViews']['length']?this['annotationViews']['length']:_0x3ebf11-0x1;}['_toggleDialog'](){const _0x290c66=this['editor'],_0x4c7c76=_0x290c66['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x290c66['locale'],this['annotationViews'])),'commentsArchive'===_0x4c7c76['id']?_0x4c7c76['hide']():_0x4c7c76['show']({'id':'commentsArchive','title':N(_0x290c66['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2e02cd,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x493476['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x12b9b0,_0x1de393=!0x1){const _0x41f6de=this['editor']['locale'],_0x1c0faa=this['editor']['plugins']['get']('Dialog'),_0x29cfc8=new _0x12b9b0(_0x41f6de);return _0x29cfc8['bind']('isEnabled')['to'](this,'isEnabled'),_0x29cfc8['bind']('isOn')['to'](_0x1c0faa,'id',_0xf92c8=>'commentsArchive'===_0xf92c8),_0x29cfc8['set']({'label':N(_0x41f6de,'COMMENTS_ARCHIVE'),'icon':_0x2e02cd,'isToggleable':!0x0}),_0x1de393&&(_0x29cfc8['tooltip']=!0x0),this['listenTo'](_0x29cfc8,'execute',()=>this['_toggleDialog']()),_0x29cfc8;}['_hideDialogOnAnnotationEscape']=_0x188bd9=>{const _0x4a799b=_0x188bd9['source'];if(!this['annotationViews']['has'](_0x4a799b['view']))return;const _0x1ff8f3=this['editor']['plugins']['get']('Dialog');_0x1ff8f3['isOpen']&&'commentsArchive'===_0x1ff8f3['id']&&(_0x1ff8f3['hide'](),_0x188bd9['stop']());};}class gi extends _0x478bf2{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
23
+ import{Editor as _0x4547d4,ContextPlugin as _0x1511aa,PendingActions as lt,Command as _0x4344f0,Plugin as _0x562ab1,Context as _0x1f800c}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x27f26f,uid as _0x288d35,KeystrokeHandler as jt,FocusTracker as _0x3fbfe5,diff as _0x3ac826,Collection as _0x1ce026,Rect as _0x28ea8f,CKEditorError as _0x4c975e,first as _0x666d2d,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x400570,keyCodes as _0x586f43}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x121ef4,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1003c4,trimHtml as ts,LateFocusDropdownButtonView as _0x45d290,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x51ab26}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x192048}from'es-toolkit/compat';import{IconUndo as _0x126a71,IconCheck as _0x270843,IconPencil as _0x14a16d,IconRemoveComment as _0x3b7aa6,IconThreeVerticalDots as _0x3ad126,IconAddComment as _0x38a6cc,IconCommentsArchive as _0x49e813}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x39bd35,ButtonView as _0x2e2946,ViewCollection as _0x24b505,createDropdown as _0x35c333,ListView as _0x3d0ae5,focusChildOnDropdownOpen as _0x3ec29f,ListItemView as _0x44544a,MenuBarMenuListItemButtonView as _0x1b61d8,BodyCollection as _0x41fe53,BalloonPanelView as _0x29a8fe,ContextualBalloon as _0x3dbc3d,Dialog as _0x3ab7ac,DialogViewPosition as _0x388cbc}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x4c6600}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x5199de}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x272216}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0x27f26f(){['model'];['view'];constructor(_0x19951e,_0x43547a){super(),this['model']=_0x19951e,this['model']['_isAttached']=!0x0,this['view']=_0x43547a,this['listenTo'](_0x43547a,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x43547a,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x43547a,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x43547a,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x43547a,'addComment',(_0x1f6403,_0x223f20)=>this['addComment'](_0x223f20)),this['listenTo'](_0x43547a,'updateComment',(_0x1d00c0,_0x5396ad,_0xcbc31e)=>this['updateComment'](_0x5396ad,_0xcbc31e)),this['listenTo'](_0x43547a,'removeComment',(_0xe40ad9,_0x51abfc)=>this['removeComment'](_0x51abfc));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x340d7e){this['model']['addComment']({'content':_0x340d7e,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x548f4f,_0x571679){this['model']['getComment'](_0x548f4f)['update']({'content':_0x571679});}['removeComment'](_0x414391){this['model']['getComment'](_0x414391)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x40bcfd,_0x185dfd,_0x55ce86){const t=_0x40bcfd['t'];switch(_0x185dfd){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'},_0x55ce86);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x55ce86);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'},_0x55ce86);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'},_0x55ce86);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x55ce86);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'},_0x55ce86);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'},_0x55ce86);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'},_0x55ce86);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0xe8344,_0x416a3c){super(_0xe8344);const _0x52cbc4=_0x288d35();this['main']=this['createCollection'](),this['editable']=new Vt(_0xe8344,_0x416a3c,void 0x0,{'label':()=>N(_0xe8344,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xe8344['uiLanguageDirection'],'lang':_0xe8344['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x52cbc4},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x2411fb){super(_0x2411fb),this['view']=new Rt(_0x2411fb['locale'],_0x2411fb['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1a09d4=this['editor']['editing']['view'],_0x4bce50=this['view']['editable'],_0x51967e=_0x1a09d4['document']['getRoot']();_0x4bce50['name']=_0x51967e['rootName'],this['view']['render']();const _0x54299f=_0x4bce50['element'];this['setEditableElement'](_0x4bce50['name'],_0x54299f),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1a09d4['attachDomRoot'](_0x54299f),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
+ _0x27f26f(_0x4547d4){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x234790={}){function _0x24e02d(_0x9f402a){return _0x9f402a['map'](_0x377791=>String['fromCharCode'](_0x377791))['join']('');}(_0x234790=Object['assign']({},_0x234790))['plugins']||(_0x234790['plugins']=hs['defaultPlugins']),super(_0x234790),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x24e02d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24e02d([0x76,0x69,0x65,0x77])][_0x24e02d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x24e02d([0x61,0x75,0x74,0x6f]),this[_0x24e02d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x24e02d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x24e02d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x24e02d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x24e02d([0x6f,0x6b])});}['create'](){const _0x241717=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x241717))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2df2b4=>{const _0x27db09=this['model']['document']['getRoot'](),_0x271579=_0x27db09&&_0x27db09['getChild'](_0x27db09['childCount']-0x1);_0x2df2b4['setSelection'](_0x271579,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x45c022=this['editing']['view'],_0x11c79f=_0x45c022['document']['getRoot'](),_0x59790a=_0x11c79f['getChild'](0x0);_0x11c79f['childCount']>0x1||!_0x59790a||'p'!=_0x59790a['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x45c022,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x59790a['placeholder']=this['placeholder']),Ft({'view':_0x45c022,'element':_0x59790a,'keepOnFocus':!0x0}),this['placeholderElement']=_0x59790a);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2b0906,_0x1a5c92={}){super(_0x2b0906),this['editor']=null,this['_editorConfig']=_0x1a5c92,this['set']('value',_0x1a5c92['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x2b0906,'Reply...')),this['set']('submitLabel',N(_0x2b0906,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x3fbfe5(),this['focusCycler']=new _0x39bd35({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x139e91,_0x441e66)=>{this['cancelButtonView']['fire']('execute'),_0x441e66();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4cf81f,_0x569abb)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x569abb());}),this['on']('submit',(_0x315b38,_0x18931b)=>{_0x18931b['length']>0xfde8?(alert(N(_0x2b0906,'TOO_LONG_COMMENT_ALERT',[_0x18931b['length'],0xfde8])),_0x315b38['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x34df1d=this['editor'];this['element']['insertBefore'](_0x34df1d['ui']['element'],this['element']['firstChild']),_0x34df1d['model']['document']['on']('change',()=>this['value']=_0x34df1d['getData']()),_0x34df1d['bind']('placeholder')['to'](this),this['focusables']['add'](_0x34df1d['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4a9635){-0x1===_0x4a9635?(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:_0x11987e}=this,_0x694e9b=new _0x2e2946(_0x11987e);return _0x694e9b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x694e9b['withText']=!0x0,_0x694e9b['bind']('label')['to'](this,'submitLabel'),_0x694e9b['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x694e9b['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x209dbb,_0x2ad6c9)=>!_0x2ad6c9&&!!_0x209dbb['trim']()),_0x694e9b;}['_createCancelButton'](){const {locale:_0x10f787}=this,_0x5a7207=new _0x2e2946(_0x10f787);return _0x5a7207['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x5a7207['label']=N(_0x10f787,'Cancel'),_0x5a7207['withText']=!0x0,_0x5a7207['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x5a7207;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x7f7cbb=>{this['focusTracker']['add'](_0x7f7cbb['element']);}),this['focusables']['on']('change',(_0xbff8d7,_0x5dad5d)=>{for(const _0x53f4c4 of Array['from'](_0x5dad5d['added'])['reverse']())this['focusTracker']['add'](_0x53f4c4['element']);});}}class ie extends kt{constructor(_0x3379c1,_0x252b01,_0x57ed2e){super(_0x3379c1),this['commentInputView']=new es(_0x3379c1,_0x57ed2e),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x76bd5,_0x346c35)=>_0x76bd5||!!_0x346c35),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 _0x121ef4(_0x3379c1,_0x252b01),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'](_0x3b685e){this['commentInputView']['focus'](_0x3b685e);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x25c936,_0x218581)=>{const {submitButtonView:_0x2ac97a,cancelButtonView:_0x111470,editor:_0x46277d}=this['commentInputView'];[_0x2ac97a['element'],_0x111470['element'],_0x46277d?_0x46277d['editing']['view']['getDomRoot']():null]['filter'](_0x39f4a6=>_0x39f4a6)['some'](_0x510158=>_0x510158['contains'](_0x218581['target']))||(this['focus'](),_0x218581['preventDefault']());});}}class rs extends kt{constructor(_0x3d1017){super(_0x3d1017);const _0x2119b8=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2119b8['to']('count',_0x56fc86=>N(_0x3d1017,'NUMBER_OF_COMMENTS',_0x56fc86))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3526a8,_0x41c9ed,_0xd8b6da){super(_0x3526a8);const _0x2c33f0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x41c9ed['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x41c9ed,this['_config']=_0xd8b6da,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3fbfe5(),this['keystrokes']=new jt(),this['focusCycler']=new _0x39bd35({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x595669=>this['commentViews']['map'](_0x20b6be=>_0x20b6be['element'])['includes'](_0x595669['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x3526a8),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4bae50=>_0x4bae50-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5afa17 of _0x41c9ed['comments'])this['_handleNewCommentModel'](_0x5afa17);this['_handleInfoComment'](),this['listenTo'](_0x41c9ed['comments'],'add',(_0x3c85f9,_0x4a53c0)=>{const _0xf9ceff=this['_calculatePosition'](_0x4a53c0);this['length']++,this['_handleNewCommentModel'](_0x4a53c0,_0xf9ceff),this['refreshVisibleViews']();}),this['listenTo'](_0x41c9ed['comments'],'remove',(_0x1b7ebb,_0x53ca67)=>{this['length']--,this['_handleRemoveCommentModel'](_0x53ca67),this['refreshVisibleViews']();}),this['listenTo'](_0x41c9ed,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x41c9ed,'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',_0x2c33f0['if']('length','ck-hidden',_0x2bd643=>!_0x2bd643)],'aria-label':N(_0x3526a8,'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'](_0x4f540d){-0x1===_0x4f540d?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xc388f9 of this['commentViews'])_0xc388f9['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x536713,_0x5488d5){const _0x2a8808=new this['_config']['CommentView'](this['locale'],_0x536713,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x2a8808['viewUid']=_0x536713['id'],_0x2a8808['delegate']('removeComment')['to'](this),_0x2a8808['delegate']('updateComment')['to'](this),_0x2a8808['delegate']('resolveCommentThread')['to'](this),_0x2a8808['delegate']('editorReady')['to'](this),_0x2a8808['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x2a8808,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x2a8808,_0x5488d5);}['_calculatePosition'](_0x56b08){const _0x9947aa=this['_model']['_findOptimalIndex'](_0x56b08);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x56b08['authoredAt']?_0x9947aa-0x1:_0x9947aa:_0x9947aa-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4e5c70={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x4e5c70,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4e5c70));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x30811a){const _0x4c9c66=this['commentViews']['remove'](_0x30811a['id']);this['stopListening'](_0x4c9c66),_0x4c9c66['isEditMode']&&this['_updateHasDirtyComment'](),_0x4c9c66['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2f0ab8=>_0x2f0ab8['isEditMode']);}['_rearrangeCollapse'](){const _0x513c29=function(_0x566d34){const _0xa69cfe=new _0x1ce026();for(const _0x37007a of _0x566d34)_0xa69cfe['add'](_0x37007a);return _0xa69cfe;}(this['commentViews']),_0x35cd38=this['_collapsedCommentsView']['count'];for(let _0x171e22=0x1;_0x171e22<=_0x35cd38;_0x171e22++)_0x513c29['remove'](0x1);for(const _0x1b1c94 of _0x513c29)_0x1b1c94['collapse']();_0x35cd38>0x0&&_0x513c29['add'](this['_collapsedCommentsView'],0x1),ns(_0x3ac826(Array['from'](this['visibleViews']),Array['from'](_0x513c29)),this['visibleViews'],_0x513c29);}['_rearrangeExpand'](){ns(_0x3ac826(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xb84bd1 of this['visibleViews'])_0xb84bd1['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x19531f=>{this['focusTracker']['add'](_0x19531f['element']),this['keystrokes']['listenTo'](_0x19531f['element']);}),this['commentViews']['on']('change',(_0x32a7bb,_0x2574da)=>{for(const _0x5f2ffa of _0x2574da['removed'])this['focusTracker']['remove'](_0x5f2ffa['element']),this['keystrokes']['stopListening'](_0x5f2ffa['element']);for(const _0x23c841 of Array['from'](_0x2574da['added'])['reverse']())this['focusTracker']['add'](_0x23c841['element']),this['keystrokes']['listenTo'](_0x23c841['element']);});}}function ns(_0x13b9c4,_0x1d3c28,_0x118c35){let _0x47056c=0x0;for(const _0x569491 of _0x13b9c4)switch(_0x569491){case'insert':_0x1d3c28['add'](_0x118c35['get'](_0x47056c),_0x47056c),_0x47056c++;break;case'delete':_0x1d3c28['remove'](_0x47056c);break;case'equal':_0x47056c++;}}class oe extends kt{constructor(_0x92e981){super(_0x92e981);const _0x5f5c5b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5f5c5b['to']('contextValue',_0x4bac1e=>N(_0x92e981,'THREAD_CONTEXT_LABEL',_0x4bac1e)),'tabindex':-0x1},'children':[{'text':_0x5f5c5b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3dc69a,_0xea5d0){super(_0x3dc69a);const _0x24f544=this['bindTemplate'];this['_model']=_0xea5d0,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3fbfe5(),this['keystrokes']=new jt(),this['focusCycler']=new _0x39bd35({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xcc0685=>!!_0xcc0685),this['bind']('contextValue')['to'](this['_model'],'context',_0x3cf269=>_0x3cf269&&_0x3cf269['value']?this['_trimContextValue'](_0x3cf269['value']):N(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',_0x24f544['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 _0x44bf69=new _0x2e2946(this['locale']);return _0x44bf69['label']=N(this['locale'],'Reopen'),_0x44bf69['tooltip']=N(this['locale'],'Reopen'),_0x44bf69['icon']=_0x126a71,_0x44bf69['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xf6d27d=>!_0xf6d27d),_0x44bf69['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x546da6,_0x36da53)=>_0x546da6&&_0x36da53),_0x44bf69['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x44bf69;}['_trimContextValue'](_0x29413a){if(_0x29413a['length']<0x96)return _0x29413a;const _0x38a28d=_0x29413a['lastIndexOf']('\x20',0x93);return _0x29413a['substring'](0x0,_0x38a28d>-0x1?_0x38a28d:0x93)+'...';}['_attachContextActions'](){const _0x1ffe30=this['element']['querySelector']('.ck-context'),_0x49a2fa=_0x1ffe30['querySelector']('.ck-context__value');this['listenTo'](_0x1ffe30,'mouseenter',()=>{_0x49a2fa['offsetWidth']<_0x49a2fa['scrollWidth']&&_0x1ffe30['classList']['add']('overlay');}),this['listenTo'](_0x1ffe30,'mouseleave',()=>{_0x1ffe30['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x28abc4 of this['focusables'])this['focusTracker']['add'](_0x28abc4['element']),this['keystrokes']['listenTo'](_0x28abc4['element']);}['_createContextView'](){const _0x5db501=new oe(this['locale']);return _0x5db501['bind']('contextValue')['to'](this),_0x5db501;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x214c76,_0x550328,_0x11fb49,_0x228a2a){super(_0x214c76),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x550328,this['_localUser']=_0x11fb49,this['_config']=_0x228a2a,this['commentThreadHeaderView']=new Xt(_0x214c76,_0x550328),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x214c76,N(_0x214c76,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x214c76,_0x550328,Object['assign']({'CommentView':this['_config']['CommentView']},_0x228a2a)),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',(_0x1ca844,_0x274076)=>_0x1ca844||!!_0x274076),this['bind']('isUnlinked')['to'](_0x550328,'unlinkedAt',_0x25b77a=>!!_0x25b77a),this['bind']('ariaLabel')['to'](this,'length',_0x19db66=>{const _0x13b9f3=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x19db66,_0x13b9f3]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3fbfe5(),this['keystrokes']=new jt(),this['focusCycler']=new _0x39bd35({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4ca8d3=>_0x4ca8d3['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x494411=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1a2a80=_0x494411['commentInputView'];return _0x494411['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1a2a80,'value',(_0x453647,_0x25595f,_0x5a4043,_0x1e21e1,_0x5c05dd)=>!!_0x5c05dd||!!_0x1e21e1&&_0x5a4043&&!_0x25595f||_0x453647&&_0x5a4043&&!_0x25595f),_0x1a2a80['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xd4eef8,_0x2a3737,_0x1671df)=>{let _0x2a51d8;return _0x2a51d8=_0x1671df&&_0x2a3737?'Reply\x20to\x20reopen\x20discussion...':_0xd4eef8?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x2a51d8);}),_0x1a2a80['bind']('submitLabel')['to'](this,'length',_0x3c05e8=>N(this['locale'],_0x3c05e8?'Reply':'Comment')),_0x1a2a80['on']('submit',(_0x5528cd,_0x3b89fd)=>{this['fire']('addComment',_0x3b89fd),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1a2a80['on']('cancel',()=>{this['focus']();}),_0x1a2a80['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1a2a80['on']('cancel',_0x4515c0=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4515c0['stop']());}),this['on']('change:isActive',(_0x289347,_0x4b2a8e,_0x5c7e76)=>{_0x5c7e76||this['length']||_0x1a2a80['value']||this['fire']('removeCommentThread');}),_0x494411;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x22fece,_0x51e47b,_0x109d4a,_0xea32b6){super(_0x22fece,_0x51e47b,_0x109d4a,_0xea32b6),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x22fece,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x28758e,_0x2fe58e,_0x38db30)=>{_0x38db30||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1c3ecc,_0x62719f,_0x58d9e3)=>{_0x58d9e3&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3a724d=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3a724d['if']('isActive','ck-thread--active'),_0x3a724d['if']('isUnlinked','ck-thread--unlinked'),_0x3a724d['to']('actionIndicator',_0x238f1d=>_0x238f1d?'ck-thread--'+_0x238f1d:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3a724d['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 _0x381a72 of this['commentsListView']['commentViews'])_0x381a72['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x756125}=this,_0x3156a1=this['commentsListView']['commentViews']['get'](0x0);_0x3156a1===this['_boundFirstCommentView']||_0x3156a1['isSystemComment']||(this['_boundFirstCommentView']=_0x3156a1,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3156a1,'actionIndicator',_0x3d24e3=>'remove'===_0x3d24e3?'remove':null),_0x3156a1['placeholder']=N(_0x756125,'Write\x20a\x20comment...'),_0x3156a1['removeButton']['on']('execute',_0x4b0534=>{_0x4b0534['stop'](),this['showConfirm'](N(_0x756125,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3156a1['focus']();}),_0x3156a1['actionBar']['add'](this['resolveButton'],0x0),_0x3156a1['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x1a3d87=new _0x1003c4(this['locale']);return _0x1a3d87['label']=N(this['locale'],'Resolve'),_0x1a3d87['tooltip']=N(this['locale'],'Resolve'),_0x1a3d87['icon']=_0x270843,_0x1a3d87['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x1a3d87['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x59efd6=>!_0x59efd6),_0x1a3d87['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x40c20e,_0x2ffaf9)=>_0x40c20e&&!_0x2ffaf9),_0x1a3d87['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x1a3d87;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x59504a){super(_0x59504a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x3671f,_0x1c2d85,_0x1df810)=>{this['element']['innerHTML']=_0x1df810;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x23ac70,_0xf80b60,_0x390c89){super(_0x23ac70),this['_model']=_0xf80b60,this['_config']=_0x390c89,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0xf80b60,'content',_0xf80b60,'authoredAt',(_0x3a71a1,_0x159e3a)=>N(_0x23ac70,'COMMENT_ARIA_LABEL',[_0xf80b60['author']['name'],_0x390c89['formatDateTime'](_0x159e3a),new DOMParser()['parseFromString'](_0x3a71a1,'text/html')['body']['textContent'],_0xf80b60['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x23ac70,N(_0x23ac70,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x24b505(),this['focusTracker']=new _0x3fbfe5(),this['keystrokes']=new jt(),this['focusCycler']=new _0x39bd35({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1e399a=>_0x1e399a['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']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x405296=new is(this['locale']);return _0x405296['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x30b0e1,_0xe9ac72)=>_0xe9ac72?ts(_0x30b0e1,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x30b0e1),_0x405296;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4ccdcb=new es(this['locale'],this['_config']['editorConfig']);return _0x4ccdcb['value']=this['_model']['content'],_0x4ccdcb['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4ccdcb['submitLabel']=N(this['locale'],'Save'),_0x4ccdcb['on']('submit',(_0x3c80f3,_0x15cebf)=>{this['fire']('updateComment',this['_model']['id'],_0x15cebf),this['switchToDisplayMode'](),this['focus']();}),_0x4ccdcb['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4ccdcb['once']('editorReady',()=>{_0x4ccdcb['focus']();}),_0x4ccdcb['createEditor'](),_0x4ccdcb['delegate']('editorReady')['to'](this),_0x4ccdcb['delegate']('editorDestroyed')['to'](this),_0x4ccdcb;}['_setupKeyboardNavigation'](){const _0x21a6fc=this['element'];this['keystrokes']['listenTo'](_0x21a6fc);for(const _0x55813f of this['focusables'])this['focusTracker']['add'](_0x55813f['element']),this['keystrokes']['listenTo'](_0x55813f['element']);this['focusables']['on']('change',(_0x55f6a7,_0x293d4e)=>{for(const _0x56f679 of _0x293d4e['removed'])this['focusTracker']['remove'](_0x56f679['element']),this['keystrokes']['stopListening'](_0x56f679['element']);for(const _0x36c9d5 of _0x293d4e['added'])this['focusTracker']['add'](_0x36c9d5['element']),this['keystrokes']['listenTo'](_0x36c9d5['element']);}),this['keystrokes']['set']('enter',(_0x1b62fe,_0x2d75eb)=>{_0x21a6fc===_0x1b62fe['target']&&(this['focusCycler']['focusFirst'](),_0x2d75eb());}),this['keystrokes']['set']('esc',(_0x240ba0,_0x115e8d)=>{_0x21a6fc!==_0x240ba0['target']&&(this['focus'](),_0x115e8d());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(di){['actionBar'];['userView'];constructor(_0x1075e0,_0x1f875b,_0x223956){super(_0x1075e0,_0x1f875b,_0x223956),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x1075e0,'Reply...')),this['bind']('authoredAt')['to'](_0x1f875b),this['bind']('resolvedAt')['to'](_0x1f875b),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 _0x121ef4(_0x1075e0,_0x1f875b['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x1f875b,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x129e70=this['bindTemplate'],_0x58e19e=[{'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':_0x129e70['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x129e70['to']('authoredAt',_0x5df607=>this['_config']['formatDateTime'](_0x5df607))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x129e70['if']('isEditMode','ck-comment__actions--hidden'),_0x129e70['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']&&_0x58e19e['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x129e70['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x129e70['if']('isEditMode','ck-comment--edit'),_0x129e70['if']('isSystemComment','ck-comment--info'),_0x129e70['to']('actionIndicator',_0x49a7f9=>_0x49a7f9?'ck-comment--'+_0x49a7f9:'')],'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':_0x58e19e}]}]};}['_createEditButton'](){const _0x5c41e9=new _0x2e2946(this['locale']);return _0x5c41e9['label']=N(this['locale'],'Edit'),_0x5c41e9['icon']=_0x14a16d,_0x5c41e9['withText']=!0x0,_0x5c41e9['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5c41e9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x56b89d=>!_0x56b89d),_0x5c41e9['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5c41e9['on']('execute',()=>this['switchToEditMode']()),_0x5c41e9;}['_createRemoveButton'](){const _0x355824=new _0x2e2946(this['locale']);return _0x355824['label']=N(this['locale'],'Remove'),_0x355824['icon']=_0x3b7aa6,_0x355824['withText']=!0x0,_0x355824['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x355824['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x27d446=>!_0x27d446),_0x355824['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x355824['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x355824;}['_createDropdown'](){const _0xd549a1=_0x35c333(this['locale'],_0x45d290),_0x6d1b80=_0xd549a1['panelView']['children'],_0x58ee06=new _0x3d0ae5(this['locale']),_0x1ead19=_0xd549a1['bindTemplate'];_0x3ec29f(_0xd549a1,()=>this['items']['find'](_0x577dc6=>_0x577dc6['isVisible'])),_0xd549a1['extendTemplate']({'attributes':{'class':[_0x1ead19['if']('isVisible','ck-hidden',_0x2e18d2=>!_0x2e18d2)]}});const _0xabe412=(_0x42bb03,_0x66b45a=-0x1)=>{const _0x48e2f0=new _0x44544a(this['locale']);_0x48e2f0['children']['add'](_0x42bb03);const _0x1b9dc0=_0x66b45a>-0x1?_0x66b45a:_0x58ee06['items']['length'];_0x58ee06['items']['add'](_0x48e2f0,_0x1b9dc0);const _0x231cfc=Array['from'](this['items']);_0xd549a1['unbind']('isEnabled','isVisible'),_0xd549a1['bind']('isEnabled')['toMany'](_0x231cfc,'isEnabled',(..._0x5207b2)=>_0x5207b2['some'](_0x52d94e=>_0x52d94e)),_0xd549a1['bind']('isVisible')['toMany'](_0x231cfc,'isVisible',(..._0x1366dc)=>_0x1366dc['some'](_0x3877f0=>_0x3877f0));};_0xd549a1['panelPosition']='sw',_0xd549a1['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x3ad126});for(const _0x48a06c of this['items'])_0xabe412(_0x48a06c);return _0x6d1b80['add'](_0x58ee06),_0xd549a1['listenTo'](this['items'],'add',(_0x2aeaf3,_0x29f3af,_0x413c33)=>{_0xabe412(_0x29f3af,_0x413c33);}),_0xd549a1['listenTo'](this['items'],'remove',(_0x49bc1f,_0x5d2db4,_0x5c799)=>{_0x58ee06['items']['remove'](_0x5c799);}),_0xd549a1;}['_attachActions'](_0x4abacd,_0x943383){const _0x494ff4=_0x4abacd&&_0x4abacd['element'];_0x494ff4&&(this['listenTo'](_0x494ff4,'mouseenter',()=>this['actionIndicator']=_0x943383),this['listenTo'](_0x494ff4,'focus',()=>this['actionIndicator']=_0x943383),this['listenTo'](_0x494ff4,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x494ff4,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x2237ae=super['_createCommentInputView']();return _0x2237ae['bind']('placeholder')['to'](this),_0x2237ae;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0xf21b7){const _0x2efed7=Dt(_0xf21b7,0x1e),_0x4aad39=new MutationObserver(_0x31d775=>{for(const _0x1f9bc4 of _0x31d775)('attributes'==_0x1f9bc4['type']&&'class'==_0x1f9bc4['attributeName']||'childList'==_0x1f9bc4['type']||'characterData'==_0x1f9bc4['type'])&&_0x2efed7();});return{'attach'(_0x29b05f){_0x4aad39['observe'](_0x29b05f,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4aad39['disconnect'](),_0x2efed7['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5e3675,_0x1d9ee4){super(_0x5e3675),this['id']=_0x288d35(),this['focusTracker']=new _0x3fbfe5(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x476363,_0xd9245a)=>this['fire']('Esc',_0xd9245a)),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'](_0x1d9ee4),this['mainView']=_0x1d9ee4;const _0x13a086=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x13a086['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 _0x4f9805=this['element']['clientHeight'];_0x4f9805&&(this['height']=_0x4f9805);}}class T extends/* #__PURE__ -- @preserve */
29
+ _0x27f26f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x677860,target:_0x3a2a0e,type:_0xe25fe,isVisible:_0x2757c8=!0x0}){super(),this['view']=_0x677860,this['view']['element']||this['view']['render'](),this['_type']=_0xe25fe,this['_target']=_0x3a2a0e,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1ce026([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x56fb49,_0x1a4c2a)=>{this['view']['focusTracker']['add'](_0x1a4c2a);}),this['focusableElements']['on']('remove',(_0x2004cf,_0x1df1ee)=>{this['view']['focusTracker']['remove'](_0x1df1ee);}),this['set']('isVisible',_0x2757c8);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1b4666=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x1b4666),_0x1b4666;}get['targetRect'](){const _0x1b8696=this['target'];if(null===_0x1b8696)return null;if(_0x1b8696 instanceof _0x28ea8f)return _0x1b8696;const _0x204da0=_0x1b8696['filter'](_0x54085d=>function(_0x44e410){const _0x52c000=_0x44e410['offsetParent'];if(_0x52c000)return!0x0;const _0x564518=_0x44e410['getClientRects']()['item'](0x0);return!!_0x564518;}(_0x54085d));return 0x0===_0x204da0['length']?null:new _0x28ea8f(_0x204da0[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5b7e7d){this['view']['isActive']=_0x5b7e7d,this['view']['mainView']['isActive']=_0x5b7e7d;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xedb8c6){if(!(null===_0xedb8c6||_0xedb8c6 instanceof _0x28ea8f||Array['isArray'](_0xedb8c6)&&_0xedb8c6['every'](_0x3e5efa=>fi(_0x3e5efa))))throw new _0x4c975e('annotation-invalid-target',null,{'target':_0xedb8c6});}['_getNormalizedTarget'](){const _0x4b7bc3='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x4b7bc3)?[_0x4b7bc3]:_0x4b7bc3;}}function fi(_0x29dd76){return null!==_0x29dd76&&'object'==typeof _0x29dd76&&'nodeType'in _0x29dd76&&0x1===_0x29dd76['nodeType'];}class S extends _0x1ce026{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5379b5=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3fbfe5(),this['_focusTracker']['on']('change:isFocused',(_0x1cad7b,_0x18651e,_0x54e3e9)=>{_0x54e3e9||this['fire']('blur');});for(const _0x115b44 of _0x5379b5)this['add'](_0x115b44);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2435d5){if(this['has'](_0x2435d5))throw new _0x4c975e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2435d5['innerView'],_0x2435d5),this['_viewToAnnotation']['set'](_0x2435d5['view'],_0x2435d5);for(const _0x60d0bb of _0x2435d5['focusableElements'])this['_focusTracker']['add'](_0x60d0bb);this['listenTo'](_0x2435d5['focusableElements'],'add',(_0x1c1748,_0x5b9f5d)=>{this['_focusTracker']['add'](_0x5b9f5d);}),this['listenTo'](_0x2435d5['focusableElements'],'remove',(_0x3069b4,_0x41f672)=>{this['_focusTracker']['remove'](_0x41f672);}),this['listenTo'](_0x2435d5['view']['focusTracker'],'change:isFocused',(_0x5acb72,_0x1a1cf9,_0x3fd8ea)=>{_0x3fd8ea&&this['fire']('focus',_0x2435d5);}),_0x2435d5['updateTargetRect']();const _0x48d6f6=this['_getOrderInContent'](_0x2435d5['view']['targetRect']);return super['add'](_0x2435d5,_0x48d6f6);}['remove'](_0x482f3d){if(!this['has'](_0x482f3d))throw new _0x4c975e('annotationcollection-not-existing-item',null);this['stopListening'](_0x482f3d['view']['focusTracker']),this['stopListening'](_0x482f3d['focusableElements']);for(const _0x546140 of _0x482f3d['focusableElements'])this['_focusTracker']['remove'](_0x546140);return this['_viewToAnnotation']['delete'](_0x482f3d['view']),this['_innerViewToAnnotation']['delete'](_0x482f3d['innerView']),super['remove'](_0x482f3d);}['getByInnerView'](_0x4edd3e){return this['_innerViewToAnnotation']['get'](_0x4edd3e);}['getByView'](_0x40b845){return this['_viewToAnnotation']['get'](_0x40b845);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0xde902c of this)_0xde902c['updateTargetRect']();this['_sort']();}['_sort'](){const _0xb24503=Array['from'](this)['sort']((_0x2562cb,_0x1097b7)=>w(_0x2562cb['view']['targetRect'],_0x1097b7['view']['targetRect']));for(let _0x1108a8=_0xb24503['length']-0x1;_0x1108a8>0x0;_0x1108a8--){const _0x59a6bd=_0xb24503[_0x1108a8];_0x1108a8!==this['getIndex'](_0x59a6bd)&&(this['remove'](_0x59a6bd),this['add'](_0x59a6bd));}}['_getOrderInContent'](_0x47de9a){let _0x53ad1d=0x0;if(!_0x47de9a)return this['length'];for(const _0x507113 of this){const _0x1fe79c=_0x507113['view']['targetRect'];if(_0x1fe79c){if(w(_0x47de9a,_0x1fe79c)<0x0)return _0x53ad1d;_0x53ad1d++;}}return _0x53ad1d;}}function v({source:_0x15e4c3,target:_0x53b682,filter:_0x22b645}){for(const _0x2e5bb0 of _0x15e4c3)_0x22b645(_0x2e5bb0)&&_0x53b682['add'](_0x2e5bb0);_0x53b682['listenTo'](_0x15e4c3,'add',(_0x393289,_0x2ad5b7)=>{_0x22b645(_0x2ad5b7)&&_0x53b682['add'](_0x2ad5b7);}),_0x53b682['listenTo'](_0x15e4c3,'remove',(_0x59c4e0,_0x431f36)=>{_0x53b682['has'](_0x431f36)&&_0x53b682['remove'](_0x431f36);});}function w(_0x533222,_0x1b062a){if(null===_0x533222&&null===_0x1b062a)return 0x0;if(null===_0x533222)return-0x1;if(null===_0x1b062a)return 0x1;const _0x116101=_0x533222['top']-_0x1b062a['top'];return 0x0==_0x116101?_0x533222['left']-_0x1b062a['left']:_0x116101;}class y extends _0x1511aa{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10d115){if(super(_0x10d115),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x10d115 instanceof _0x4547d4){const _0x625cb8=_0x10d115['locale'];_0x10d115['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x625cb8,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x625cb8,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x625cb8,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x625cb8,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x625cb8,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x625cb8,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x625cb8,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x48cbfc){this['collection']['add'](_0x48cbfc);}['remove'](_0x376f44){this['collection']['remove'](_0x376f44),_0x376f44['destroy']();}['refreshVisibility'](){for(const _0x133d53 of this['collection'])_0x133d53['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x416cc8){return this['collection']['getByInnerView'](_0x416cc8);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x90db5e of this['collection'])_0x90db5e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5d6137){this['fire']('_activateAnnotation',_0x5d6137);}['createAnnotation'](_0x5e1529){return new T(_0x5e1529);}['createAnnotationView'](_0x25839f,_0x5c6c70){return new E(_0x25839f,_0x5c6c70);}['_addActiveAnnotation'](_0x1d82a3){const _0x102c10=new Set(this['activeAnnotations']);_0x102c10['add'](_0x1d82a3),this['activeAnnotations']=_0x102c10;}['_removeActiveAnnotation'](_0x2f5404){const _0x34bea5=new Set(this['activeAnnotations']);_0x34bea5['delete'](_0x2f5404),this['activeAnnotations']=_0x34bea5;}['_bindAnnotationsToVisibleAnnotations'](){const _0x37ddb5=this['collection'],_0x130088=this['_visibleAnnotations'];function _0x5e3d10(_0x13a9dc){const _0x446d0c=_0x13a9dc['source'];_0x446d0c['isVisible']&&!_0x130088['has'](_0x446d0c)?_0x130088['add'](_0x446d0c):!_0x446d0c['isVisible']&&_0x130088['has'](_0x446d0c)&&_0x130088['remove'](_0x446d0c),_0x446d0c['view']['focusTracker']['remove'](_0x446d0c['view']['element']),_0x446d0c['view']['focusTracker']['add'](_0x446d0c['view']['element']);}this['listenTo'](_0x37ddb5,'add',(_0x9067a1,_0x2ddfd6)=>{_0x2ddfd6['isVisible']&&_0x130088['add'](_0x2ddfd6),this['listenTo'](_0x2ddfd6,'change:isVisible',_0x5e3d10);}),this['listenTo'](_0x37ddb5,'remove',(_0x5ce5d5,_0x4a3100)=>{_0x130088['has'](_0x4a3100)&&_0x130088['remove'](_0x4a3100),this['stopListening'](_0x4a3100,'change:isVisible',_0x5e3d10);});}['_setupEnterAnnotationKeystroke'](){const _0x1e0fea=_0x55ccb2=>{_0x55ccb2['on']('ready',()=>{_0x55ccb2['keystrokes']['set'](_0x5199de,(_0x175076,_0x3c0ad6)=>{const _0x22aa14=_0x666d2d(this['activeAnnotations']['values']());_0x22aa14&&(_0x22aa14['view']['focus'](),_0x3c0ad6());});});};this['context']instanceof _0x4547d4?_0x1e0fea(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x41958b,_0x445309)=>{_0x1e0fea(_0x445309);});}['_setupEscapeAnnotationHandling'](){const _0x6657cd=_0x472529=>{const _0x35c0cb=_0x472529['source'],_0x49f403=[];let _0x26c811;if(Array['isArray'](_0x35c0cb['target'])){_0x26c811=_0x35c0cb['target'][0x0],this['context']instanceof _0x4547d4?_0x49f403['push'](this['context']):this['context']['editors']&&_0x49f403['push'](...this['context']['editors']);for(const _0x221f7e of _0x49f403)for(const _0x447fc2 of _0x221f7e['editing']['view']['domRoots']['values']())if(_0x447fc2['contains'](_0x26c811))return void _0x221f7e['editing']['view']['focus']();_0x26c811['focus']();}};this['listenTo'](this['collection'],'add',(_0x1686bc,_0x59b851)=>{this['listenTo'](_0x59b851,'escape',_0x6657cd,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xbad892,_0x30cc0e)=>{this['stopListening'](_0x30cc0e,'escape',_0x6657cd);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1511aa{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2601f7){super(_0x2601f7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x50c20c=this['context']['config'];_0x50c20c['define']('comments.maxCommentsWhenCollapsed',0x2),_0x50c20c['define']('comments.maxThreadTotalWeight',0x1f4),_0x50c20c['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x50c20c['define']('comments.CommentThreadView',gt),_0x50c20c['define']('comments.CommentView',Tt),_0x50c20c['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x392e19=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4158ef,_0x2a20f2)=>this['_addCommentThread'](_0x2a20f2)),this['on']('submitCommentThread',(_0x48d029,_0x55f8ba)=>this['_submitCommentThread'](_0x55f8ba)),this['on']('resolveCommentThread',(_0xa29ad3,_0x4d0e4c)=>this['_resolveCommentThread'](_0x4d0e4c)),this['on']('resolveCommentThread',(_0x186c3e,_0x38c656)=>this['_updateActiveAnnotation'](_0x38c656),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x31ba82,_0x46b072)=>this['_reopenCommentThread'](_0x46b072)),this['on']('reopenCommentThread',(_0x3d7cc9,_0x58b018)=>this['_updateActiveAnnotation'](_0x58b018),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x18f141,_0x16aef2)=>this['_removeCommentThread'](_0x16aef2)),this['on']('updateCommentThread',(_0x819620,_0x227341)=>this['_updateCommentThread'](_0x227341)),this['on']('updateCommentThread',(_0x899e7e,_0x46b92e)=>this['_updateActiveAnnotation'](_0x46b92e),{'priority':'lowest'}),this['on']('addComment',(_0x1d9825,_0x378796)=>this['_addComment'](_0x378796)),this['on']('updateComment',(_0x3f932a,_0x1308f1)=>this['_updateComment'](_0x1308f1)),this['on']('removeComment',(_0x431568,_0x27b955)=>this['_removeComment'](_0x27b955)),this['on']('addComment',(_0x779d83,{threadId:_0xfb6a5c,isFromAdapter:_0x2e3ce2})=>{if(_0x2e3ce2)return;const _0x37a662=this['getCommentThread'](_0xfb6a5c),_0xb781d7=_0x37a662&&this['_threadToController']['get'](_0x37a662);_0xb781d7&&_0xb781d7['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x392e19,'change:activeAnnotations',(_0x2b837e,_0x3e8b17,_0x27e184)=>{const _0xa6515a=Array['from'](_0x27e184)['map'](_0x20fd11=>this['_viewToController']['get'](_0x20fd11['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xa6515a?_0xa6515a['model']:null;});}set['adapter'](_0x35fd8c){if(this['_adapter'])throw new _0x4c975e('commentsrepository-adapter-already-set');this['_adapter']=_0x35fd8c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5241a8=_t,threadId:_0x186ada=_0x288d35(),comments:_0x54593f=[],unlinkedAt:_0x29445d=null,resolvedAt:_0xae983b=null,resolvedBy:_0x44751a=null,target:_0xccf447=null,context:_0x4cc6a5=null,attributes:_0x58ade1={},isResolvable:_0x14c6bd=!0x0,isSubmitted:_0x5f2fa5=!0x1,isFromAdapter:_0x3a8660=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x5241a8),{'channelId':_0x5241a8,'threadId':_0x186ada,'comments':_0x54593f,'unlinkedAt':_0x29445d,'resolvedAt':_0xae983b,'resolvedBy':_0x44751a,'target':_0xccf447,'context':_0x4cc6a5,'attributes':_0x58ade1,'isFromAdapter':_0x3a8660,'isResolvable':_0x14c6bd,'isSubmitted':_0x5f2fa5}),this['getCommentThread'](_0x186ada);}['openNewCommentThread']({channelId:_0xd6d88a=_t,threadId:_0x2f1824=_0x288d35(),target:_0x33a3bd,context:_0x29ca36=null,isResolvable:_0x22bb22=!0x0}){if(this['_readOnlyChannels']['has'](_0xd6d88a)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x33a3bd)throw new _0x4c975e('commentsrepository-missing-target');const _0x193617=this['addCommentThread']({'channelId':_0xd6d88a,'threadId':_0x2f1824,'target':_0x33a3bd,'context':_0x29ca36,'isResolvable':_0x22bb22});if(!_0x193617)return null;const _0x27f4d3=this['_threadToController']['get'](_0x193617),_0x11d37a=_0x27f4d3['view']['commentThreadInputView']['commentInputView'],_0x185ae7=this['context']['plugins']['get'](y),_0x5aba51=_0x185ae7['getByInnerView'](_0x27f4d3['view']);return _0x185ae7['activate'](_0x5aba51),_0x11d37a['once']('editorReady',()=>_0x11d37a['focus']()),_0x193617;}['hasCommentThread'](_0x58e8a1){if('string'!=typeof _0x58e8a1)throw new _0x4c975e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x58e8a1);}['updateCommentThread']({channelId:_0x5b5e43=_t,threadId:_0x42c66c,context:_0xabc278,unlinkedAt:_0x11c407,attributes:_0x28cd55,isFromAdapter:_0x548db7=!0x1}){return this['fire'](Nt('updateCommentThread',_0x5b5e43),{'channelId':_0x5b5e43,'threadId':_0x42c66c,'context':_0xabc278,'unlinkedAt':_0x11c407,'attributes':_0x28cd55,'isFromAdapter':_0x548db7}),this['getCommentThread'](_0x42c66c);}['getCommentThread'](_0x360380){if('string'!=typeof _0x360380)throw new _0x4c975e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x360380);}['fetchCommentThread']({channelId:_0x19ccb6,threadId:_0x3dc7e1}={}){const _0x479cc4=this['getCommentThread'](_0x3dc7e1);if(_0x479cc4)return Promise['resolve'](_0x479cc4);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4c975e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x19ccb6,'threadId':_0x3dc7e1})['then'](_0x3d6a91=>this['hasCommentThread'](_0x3dc7e1)?this['getCommentThread'](_0x3dc7e1):_0x3d6a91?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x19ccb6},_0x3d6a91)):void 0x0)['catch'](_0x25bbb7=>{throw console['error'](_0x25bbb7),new _0x4c975e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5835c5,skipNotAttached:_0x7701f4=!0x1,skipEmpty:_0x16aaa6=!0x1,toJSON:_0x9af8d8=!0x1}={}){const _0xb8745a=[];for(const _0x2bb96e of this['_threads']['values']())_0x5835c5&&_0x2bb96e['channelId']!==_0x5835c5||_0x7701f4&&!_0x2bb96e['isAttached']||_0x16aaa6&&0x0===_0x2bb96e['length']||_0xb8745a['push'](_0x2bb96e);return _0x9af8d8?_0xb8745a['map'](_0x3389ea=>_0x3389ea['toJSON']()):_0xb8745a;}['getAnnotationForCommentThread'](_0x5f1e85){const _0x4fc921=this['_threadToController']['get'](_0x5f1e85);if(!_0x4fc921)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x4fc921['view'])||null;}['getCommentThreadForAnnotation'](_0x49b88a){const _0x3f47db=this['_viewToController']['get'](_0x49b88a['innerView']);return _0x3f47db?_0x3f47db['model']:null;}['setActiveCommentThread'](_0x29dd2b){const _0x210e0b=this['context']['plugins']['get'](y);if(!_0x29dd2b)return void(this['activeCommentThread']&&_0x210e0b['deactivateAll']());const _0x442ac9=this['getCommentThread'](_0x29dd2b);if(!_0x442ac9)throw new _0x4c975e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x29dd2b});if(!this['_threadToController']['has'](_0x442ac9))throw new _0x4c975e('commentsrepository-active-not-attached',null,{'threadId':_0x29dd2b});const _0x3564e2=_0x210e0b['getByInnerView'](this['_threadToController']['get'](_0x442ac9)['view']);_0x210e0b['activate'](_0x3564e2);}['switchReadOnly'](_0x54c057,_0x36b23b){_0x54c057?this['_readOnlyChannels']['add'](_0x36b23b):this['_readOnlyChannels']['delete'](_0x36b23b),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1059ed){return this['_readOnlyChannels']['has'](_0x1059ed)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xa20998,_0x4272c8){return new vt(_0xa20998,_0x4272c8);}['setPermissions'](_0x2690e5,_0x25b46d=_t){this['_permissions']['set'](_0x25b46d,_0x2690e5),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3f9709=_t){return this['_permissions']['has'](_0x3f9709)?this['_permissions']['get'](_0x3f9709):bt;}['_addCommentThread']({channelId:_0x204d74,threadId:_0x46f640,comments:_0x413243,unlinkedAt:_0x281633,resolvedAt:_0x51632a,resolvedBy:_0x2ae319,target:_0x2b9e07,context:_0x126498,attributes:_0x1e05f1,isFromAdapter:_0x429cd3,isResolvable:_0x51a096,isSubmitted:_0x49fc61}){if('string'!=typeof _0x46f640)throw new _0x4c975e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x46f640});if(this['hasCommentThread'](_0x46f640))throw new _0x4c975e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x46f640});const _0x1b5c0a=new pi(this,{'channelId':_0x204d74,'id':_0x46f640,'context':_0x126498,'attributes':_0x1e05f1,'unlinkedAt':_0x281633,'resolvedAt':_0x51632a,'resolvedBy':_0x2ae319?this['context']['plugins']['get'](it)['getUser'](_0x2ae319):null,'isResolvable':_0x51a096,'isSubmitted':_0x49fc61||_0x429cd3});this['_threads']['set'](_0x46f640,_0x1b5c0a);for(const _0x121e8c of _0x413243)_0x1b5c0a['_add'](this['_createNewComment']({'threadId':_0x46f640,..._0x121e8c}));return _0x2b9e07&&_0x1b5c0a['attachTo'](_0x2b9e07),_0x429cd3||!_0x1b5c0a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x204d74,'threadId':_0x46f640});}['_submitCommentThread']({channelId:_0x4ca0c4,threadId:_0x2424b7}){if(!this['hasCommentThread'](_0x2424b7))throw new _0x4c975e('commentsrepository-missing-comment-thread',this);const _0x20987c=this['getCommentThread'](_0x2424b7);if(_0x20987c['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x44a933,comments:_0x469bcf,resolvedAt:_0x2c260e,resolvedBy:_0x1f58c6,context:_0xb2c190,attributes:_0x1ec217}=_0x20987c,_0x503753=this['context']['plugins']['get']('PendingActions'),_0x30fb6e=_0x503753['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4ca0c4,'threadId':_0x44a933,'comments':_0x469bcf['map'](_0x27406b=>_0x27406b['toJSON']()),'resolvedAt':_0x2c260e,'resolvedBy':_0x1f58c6?_0x1f58c6['id']:_0x1f58c6,'context':_0xb2c190,'attributes':_0x1ec217})['then'](({comments:_0x18b8aa})=>{_0x503753['remove'](_0x30fb6e);for(const _0x4f1da8 of _0x18b8aa)this['_updateComment']({'channelId':_0x4ca0c4,'threadId':_0x2424b7,'commentId':_0x4f1da8['commentId'],'createdAt':_0x4f1da8['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5c99a8=>{throw console['error'](_0x5c99a8),new _0x4c975e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2535d8,target:_0x19ce68}){const _0x154a8e=this['getCommentThread'](_0x2535d8);if(!_0x154a8e)throw new _0x4c975e('commentsrepository-attach-missing-comment-thread',this);const _0x2bb86a=this['context']['plugins']['get']('PendingActions'),_0x395989=this['context']['plugins']['get'](y),_0x13e612=this['_createCommentThreadView'](_0x154a8e),_0x349f11=new vt(_0x154a8e,_0x13e612);let _0x55d412=null;_0x13e612['on']('change:isDirty',(_0x5c2e91,_0x1d00ff,_0x1df26c)=>{_0x1df26c?_0x55d412=_0x2bb86a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x55d412&&(_0x2bb86a['remove'](_0x55d412),_0x55d412=null);}),this['_threadToController']['set'](_0x154a8e,_0x349f11),this['_viewToController']['set'](_0x13e612,_0x349f11);const _0x3e0610=new E(this['context']['locale'],_0x13e612);_0x3e0610['bind']('length')['to'](_0x13e612),_0x3e0610['bind']('isDirty')['to'](_0x13e612,'isDirty',_0x13e612,'length',(_0x2d78ac,_0x29352e)=>_0x2d78ac||!_0x29352e),_0x3e0610['bind']('isActive')['to'](_0x13e612),_0x3e0610['type']='comment';const _0x54cee1=new T({'view':_0x3e0610,'target':_0x19ce68,'type':'comment','isVisible':!_0x154a8e['archivedAt']&&!!('function'==typeof _0x19ce68?_0x19ce68():_0x19ce68)});return _0x13e612['on']('escape',()=>{_0x54cee1['fire']('escape');}),this['_bindAnnotationToEditors'](_0x13e612,_0x54cee1),_0x395989['add'](_0x54cee1),_0x54cee1;}['_bindAnnotationToEditors'](_0x16a97b,_0x2c546a){this['listenTo'](_0x16a97b,'editorReady',(_0x138f86,_0x26b3fe)=>{const _0x18cf6b=_0x26b3fe['ui']['view']['body']['bodyCollectionContainer'];_0x2c546a['focusableElements']['add'](_0x18cf6b),this['context']instanceof _0x4547d4&&this['context']['ui']['focusTracker']['add'](_0x18cf6b);},{'priority':'highest'}),this['listenTo'](_0x16a97b,'editorDestroyed',(_0x14bc2d,_0x3f82c6)=>{const _0x3d1026=_0x3f82c6['ui']['view']['body']['bodyCollectionContainer'];_0x2c546a['focusableElements']['has'](_0x3d1026)&&_0x2c546a['focusableElements']['remove'](_0x3d1026),this['context']instanceof _0x4547d4&&this['context']['ui']['focusTracker']['remove'](_0x3d1026);});}['_unbindEditors'](_0x3a9fed){this['stopListening'](_0x3a9fed,'editorReady'),this['stopListening'](_0x3a9fed,'editorDestroyed');}['_createCommentThreadView'](_0x52c5a2){const _0x34ea0d=this['context']['plugins']['get'](it),{config:_0x267965,locale:_0x251ad2}=this['context'],_0x11f5fd=pt(_0x267965['get']('locale'),_0x251ad2);return new(0x0,(_0x267965['get']('comments'))['CommentThreadView'])(_0x251ad2,_0x52c5a2,_0x34ea0d['me'],{'editorConfig':{..._0x267965['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x267965['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x267965['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x267965['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x267965['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x11f5fd,'CommentView':_0x267965['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x12e604,channelId:_0x321e60,resolvedAt:_0x470bb4,resolvedBy:_0x214f54,isFromAdapter:_0x52bbe5}){if(!this['hasCommentThread'](_0x12e604))throw new _0x4c975e('commentsrepository-missing-comment-thread',null,{'threadId':_0x12e604});const _0x354d13=this['getCommentThread'](_0x12e604);if(_0x354d13['isResolved'])throw new _0x4c975e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x12e604});const _0xd8006e=this['context']['plugins']['get'](it);if(_0x354d13['resolvedBy']=_0xd8006e['getUser'](_0x214f54),_0x354d13['resolvedAt']=_0x470bb4,_0x52bbe5||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x492334=this['context']['plugins']['get']('PendingActions'),_0x25da61=_0x492334['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x321e60,'threadId':_0x12e604})['then'](({resolvedAt:_0x3b697e,resolvedBy:_0x5bdeb8})=>{_0x492334['remove'](_0x25da61),_0x354d13['resolvedBy']['id']!==_0x5bdeb8&&(_0x354d13['resolvedBy']=_0xd8006e['getUser'](_0x5bdeb8)),_0x354d13['resolvedAt']=_0x3b697e;})['catch'](_0x3f2d4d=>{throw console['error'](_0x3f2d4d),new _0x4c975e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3b2965,channelId:_0x135277,isFromAdapter:_0x105a3c}){if(!this['hasCommentThread'](_0x3b2965))throw new _0x4c975e('commentsrepository-missing-comment-thread',null,{'threadId':_0x3b2965});const _0x78d428=this['getCommentThread'](_0x3b2965);if(!_0x78d428['isResolved'])throw new _0x4c975e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3b2965});if(_0x78d428['resolvedBy']=null,_0x78d428['resolvedAt']=null,_0x105a3c||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x44044a=this['context']['plugins']['get']('PendingActions'),_0x10baf2=_0x44044a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x135277,'threadId':_0x3b2965})['then'](()=>_0x44044a['remove'](_0x10baf2))['catch'](_0x10f054=>{throw console['error'](_0x10f054),new _0x4c975e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0xc08055,isFromAdapter:_0x1b7758}){const _0x434e8d=this['getCommentThread'](_0xc08055);if(!_0x434e8d)throw new _0x4c975e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0xc08055),this['_threads']['delete'](_0xc08055),!_0x434e8d['isSubmitted']||_0x1b7758||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x161100=this['context']['plugins']['get']('PendingActions'),{channelId:_0x59e5a2}=_0x434e8d,_0x3281c7=_0x161100['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x59e5a2,'threadId':_0xc08055})['then'](()=>_0x161100['remove'](_0x3281c7))['catch'](_0x469c79=>{throw console['error'](_0x469c79),new _0x4c975e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4003b1,unlinkedAt:_0x27c880,context:_0xef979d,attributes:_0xad8923,isFromAdapter:_0x2f033c}){if('string'!=typeof _0x4003b1)throw new _0x4c975e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4003b1});if(!this['hasCommentThread'](_0x4003b1))throw new _0x4c975e('commentsrepository-missing-comment-thread',null,{'threadId':_0x4003b1});const _0x3ea8c3=this['getCommentThread'](_0x4003b1);let _0x56cea9=!0x1;if(void 0x0!==_0xef979d&&_0x3ea8c3['context']!==_0xef979d&&(_0x3ea8c3['context']=_0xef979d,_0x56cea9=!0x0),void 0x0!==_0x27c880&&_0x3ea8c3['unlinkedAt']!==_0x27c880&&(_0x3ea8c3['unlinkedAt']=_0x27c880,_0x56cea9=!0x0),_0xad8923&&!At(_0xad8923,_0x3ea8c3['attributes'])&&(_0x3ea8c3['attributes']=_0xad8923,_0x56cea9=!0x0),!_0x56cea9)return Promise['resolve']();if(!_0x3ea8c3['isSubmitted']||_0x2f033c||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x45e778=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ae8e2}=_0x3ea8c3,_0x13e7de=_0x45e778['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1ae8e2,'threadId':_0x4003b1,'context':_0xef979d,'unlinkedAt':_0x27c880,'attributes':_0xad8923})['then'](()=>_0x45e778['remove'](_0x13e7de))['catch'](_0x47d600=>{throw console['error'](_0x47d600),new _0x4c975e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x43af8c){const _0x3c1a36=this['context']['plugins']['get'](y),_0x34a8a8=this['getCommentThread'](_0x43af8c);if(_0x34a8a8['_isAttached']=!0x1,this['_threadToController']['has'](_0x34a8a8)){const _0x8b3f71=this['_threadToController']['get'](_0x34a8a8),_0x3fd0e6=_0x8b3f71['view'],_0x5c30bd=_0x3c1a36['getByInnerView'](_0x3fd0e6);this['_threadToController']['delete'](_0x34a8a8),this['_viewToController']['delete'](_0x3fd0e6),_0x5c30bd&&_0x3c1a36['remove'](_0x5c30bd),_0x8b3f71['destroy'](),_0x3fd0e6['destroy']()['then'](()=>{this['_unbindEditors'](_0x3fd0e6);});}}['_updateActiveAnnotation']({threadId:_0x4eb9e8,resolvedAt:_0x24b309,unlinkedAt:_0x3f01e9}){const _0x2b5524=!!_0x24b309,_0x2455af=this['context']['plugins']['get'](y),_0x1b45e4=this['getCommentThread'](_0x4eb9e8);if(this['_threadToController']['has'](_0x1b45e4)){const _0x530d36=this['_threadToController']['get'](_0x1b45e4)['view'],_0x4ec6ca=_0x2455af['getByInnerView'](_0x530d36);_0x4ec6ca&&(_0x2b5524&&_0x2455af['_removeActiveAnnotation'](_0x4ec6ca),_0x3f01e9?_0x4ec6ca['isVisible']=!0x1:_0x4ec6ca['refreshVisibility']());}}['_getExternalAuthor'](_0x38a7b8){const _0x2cafef=this['context']['plugins']['get'](it),_0x1eacbe=It('external:'+_0x38a7b8),_0x45c78e=_0x2cafef['getUser'](_0x1eacbe);return _0x45c78e||_0x2cafef['addUser']({'id':_0x1eacbe,'name':_0x38a7b8});}['_createNewComment']({threadId:_0x5790f6,commentId:_0x47274b=_0x288d35(),content:_0x2ad3ff,authorId:_0x493e49,createdAt:_0x68f8e0,attributes:_0x43473f}){if('string'!=typeof _0x47274b)throw new _0x4c975e('commentsrepository-invalid-commentid');if('string'!=typeof _0x493e49)throw new _0x4c975e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2ad3ff||!_0x2ad3ff['trim']())throw new _0x4c975e('commentsrepository-invalid-comment-content');const _0x41124a=this['context']['plugins']['get'](it)['getUser'](_0x493e49);if(!_0x41124a)throw new _0x4c975e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x493e49});let _0x22fb0c=null,_0x20b1e4=_0x68f8e0;return _0x43473f?.['@external']&&(_0x22fb0c=this['_getExternalAuthor'](_0x43473f['@external']['authorName']),_0x20b1e4=new Date(_0x43473f['@external']['createdAt'])),new wi(this,{'threadId':_0x5790f6,'id':_0x47274b,'author':_0x22fb0c||_0x41124a,'creator':_0x41124a,'content':_0x2ad3ff,'createdAt':_0x68f8e0,'authoredAt':_0x20b1e4,'attributes':_0x43473f});}['_addComment'](_0x2b925e){let {threadId:_0x3e6109,content:_0x3ab6df,attributes:_0x3c6119,isFromAdapter:_0x17daec}=_0x2b925e;const _0x12632d=this['getCommentThread'](_0x2b925e['threadId']);if(!_0x12632d)throw new _0x4c975e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x16fc1e=this['_createNewComment'](_0x2b925e),{id:_0x44f0b2}=_0x16fc1e;if(_0x12632d['_add'](_0x16fc1e),_0x17daec||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x12632d['isSubmitted'])return Promise['resolve']();const _0x5c778f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x78395f}=_0x12632d,_0x3f1c1b=_0x5c778f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3c6119||(_0x3c6119={}),this['adapter']['addComment']({'channelId':_0x78395f,'threadId':_0x3e6109,'commentId':_0x44f0b2,'content':_0x3ab6df,'attributes':_0x3c6119})['then'](_0x3da3a7=>{_0x5c778f['remove'](_0x3f1c1b),_0x3da3a7&&this['_updateComment']({'channelId':_0x78395f,'threadId':_0x3e6109,'commentId':_0x44f0b2,'createdAt':_0x3da3a7['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x178acf=>{throw console['error'](_0x178acf),new _0x4c975e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x435e4e,commentId:_0x3d3d2b,content:_0x27c49d,createdAt:_0x25d19f,attributes:_0x2559bf,isFromAdapter:_0x50afc9}){if(void 0x0!==_0x27c49d&&('string'!=typeof _0x27c49d||!_0x27c49d['trim']()['length']))throw new _0x4c975e('commentsrepository-update-comment-invalid-content');const _0x4cfb5f=this['getCommentThread'](_0x435e4e),_0x384fed=_0x4cfb5f['getComment'](_0x3d3d2b);if(!_0x384fed)throw new _0x4c975e('commentsrepository-update-missing-comment',this);let _0x1c809e=!0x1;if(_0x27c49d&&_0x27c49d!==_0x384fed['content']&&(_0x384fed['isEditable']||_0x50afc9)&&(_0x384fed['content']=_0x27c49d,_0x1c809e=!0x0),_0x25d19f&&_0x25d19f!==_0x384fed['createdAt']&&(_0x384fed['createdAt']=_0x25d19f,_0x384fed['attributes']&&_0x384fed['attributes']['@external']||(_0x384fed['authoredAt']=_0x25d19f),_0x1c809e=!0x0),_0x2559bf&&!At(_0x2559bf,_0x384fed['attributes'])&&(_0x384fed['attributes']=_0x2559bf,_0x1c809e=!0x0),!_0x1c809e)return Promise['resolve']();if(_0x4cfb5f['fire']('commentUpdated'),_0x50afc9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x28dce9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x54d4af}=this['getCommentThread'](_0x384fed['threadId']),_0x133851=_0x28dce9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x54d4af,'threadId':_0x435e4e,'commentId':_0x3d3d2b,'content':_0x27c49d,'attributes':_0x2559bf})['then'](()=>_0x28dce9['remove'](_0x133851))['catch'](_0x265c58=>{throw console['error'](_0x265c58),new _0x4c975e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3a91f8,commentId:_0x4af8a2,isFromAdapter:_0x1dc945}){const _0x1187ad=this['getCommentThread'](_0x3a91f8),_0x414152=_0x1187ad['getComment'](_0x4af8a2);if(!_0x414152)throw new _0x4c975e('commentsrepository-remove-missing-comment',this);if(_0x1187ad['_remove'](_0x414152),_0x1dc945||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x101678=this['context']['plugins']['get']('PendingActions'),{channelId:_0x228a95}=_0x1187ad,_0x4f05c4=_0x101678['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x228a95,'threadId':_0x3a91f8,'commentId':_0x4af8a2})['then'](()=>_0x101678['remove'](_0x4f05c4))['catch'](_0x879b87=>{throw console['error'](_0x879b87),new _0x4c975e('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
+ _0x27f26f(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x231920,_0x92a65d){super();const _0x3307b9=_0x92a65d['isResolvable'];this['channelId']=_0x92a65d['channelId'],this['id']=_0x92a65d['id'],this['comments']=new _0x1ce026(),this['_repository']=_0x231920,this['_isAttached']=!0x1,this['_isSubmitted']=_0x92a65d['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x231920,'_permissions',_0x231920,'_readOnlyChannels',()=>_0x231920['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x231920,'_permissions',()=>_0x231920['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x231920,'_permissions',()=>{const _0x313996=_0x231920['getPermissions'](this['channelId']);return _0x313996['write']||_0x313996['admin'];}),this['bind']('isResolvable')['to'](_0x231920,'_permissions',()=>_0x3307b9&&_0x231920['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x92a65d['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0xa7ae71,_0x3e9b85)=>_0xa7ae71?_0x3e9b85?_0xa7ae71<_0x3e9b85?_0xa7ae71:_0x3e9b85:_0xa7ae71:_0x3e9b85),this['set']('unlinkedAt',_0x92a65d['unlinkedAt']||null),this['set']('resolvedAt',_0x92a65d['resolvedAt']||null),this['set']('resolvedBy',_0x92a65d['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x3c9cbd=>!!_0x3c9cbd),this['set']('attributes',_0x92a65d['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x19fb3a,_0x1fac83)=>_0x19fb3a+_0x1fac83['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2bb0d8,id:_0x3c7740}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x2bb0d8),{'channelId':_0x2bb0d8,'threadId':_0x3c7740});}['setUnlinkedAt'](_0x32836d){this['_update']({'unlinkedAt':_0x32836d});}['resolve']({resolvedAt:_0x4b2808=new Date(),resolvedBy:_0x1d6898='',isFromAdapter:_0x1397a1=!0x1}={}){const _0x5700dc=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x270c11,id:_0x1889ec}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x270c11),{'channelId':_0x270c11,'threadId':_0x1889ec,'resolvedAt':_0x4b2808,'resolvedBy':_0x1d6898||_0x5700dc['id'],'isFromAdapter':_0x1397a1});}['reopen']({isFromAdapter:_0x30ba67=!0x1}={}){const {channelId:_0x51eb19,id:_0xf6e122}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x51eb19),{'channelId':_0x51eb19,'threadId':_0xf6e122,'isFromAdapter':_0x30ba67});}['setContext'](_0x30679f){this['context']||this['_update']({'context':_0x30679f});}['setAttribute'](_0x284ee2,_0x2772c8){const _0x589a66=wt(this['attributes']);yt(_0x589a66,_0x284ee2,_0x2772c8),this['_update']({'attributes':_0x589a66});}['removeAttribute'](_0x4a1340){const _0x1186c3=wt(this['attributes']);Ct(_0x1186c3,_0x4a1340),this['_update']({'attributes':_0x1186c3});}['remove']({isFromAdapter:_0x4f265b=!0x1}={}){const {channelId:_0x5645bc,id:_0x599db}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x5645bc),{'channelId':_0x5645bc,'threadId':_0x599db,'isFromAdapter':_0x4f265b});}['attachTo'](_0x201534){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x201534});}['addComment'](_0x39023){const {channelId:_0x9d0aca,id:_0x4f16d1}=this;this['_repository']['fire'](Nt('addComment',_0x9d0aca,_0x4f16d1),Object['assign']({'channelId':_0x9d0aca,'threadId':_0x4f16d1},_0x39023));}['getComment'](_0x1d748b){if('string'!=typeof _0x1d748b)throw new _0x4c975e('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x1d748b});return this['comments']['get'](_0x1d748b);}['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'](_0x1ec5de=>_0x1ec5de['toJSON']()),'attributes':this['attributes']};}['_add'](_0x17221e){return this['listenTo'](_0x17221e,'change:authoredAt',()=>{const _0x5a95b1=this['_findOptimalIndex'](_0x17221e),_0xf88d97=this['comments'];_0x5a95b1-0x1!=_0xf88d97['getIndex'](_0x17221e)&&_0x5a95b1+0x1!=_0xf88d97['getIndex'](_0x17221e)&&(this['_remove'](_0x17221e),this['_add'](_0x17221e));}),this['comments']['add'](_0x17221e,this['_findOptimalIndex'](_0x17221e));}['_update'](_0x358728){const {channelId:_0x3bd664,id:_0x2e22ef}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x3bd664),{..._0x358728,'channelId':_0x3bd664,'threadId':_0x2e22ef});}['_remove'](_0x490932){return this['stopListening'](_0x490932),_0x490932['destroy'](),this['comments']['remove'](_0x490932);}['_findOptimalIndex'](_0x5954ab){const _0x34d4bc=this['comments']['find'](_0x4aa585=>new Date(_0x4aa585['authoredAt'])['getTime']()>new Date(_0x5954ab['authoredAt'])['getTime']());return _0x34d4bc?this['comments']['getIndex'](_0x34d4bc):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
+ _0x27f26f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x56a486,_0x1e78f3){super();const _0x233df2=_0x56a486['context']['plugins']['get'](it)['me'],_0xb374e9=_0x56a486['getCommentThread'](_0x1e78f3['threadId']),_0x15380f=0x0===_0xb374e9['comments']['length'],_0x123dff=_0x233df2===_0x1e78f3['author'];this['id']=_0x1e78f3['id'],this['threadId']=_0x1e78f3['threadId'],this['author']=_0x1e78f3['author'],this['creator']=_0x1e78f3['creator'],this['isExternal']=Boolean(_0x1e78f3['attributes']&&_0x1e78f3['attributes']['@external']),this['set']('content',_0x1e78f3['content']),this['createdAt']=_0x1e78f3['createdAt']||new Date(),this['set']('authoredAt',_0x1e78f3['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xb374e9,'resolvedAt'),this['set']('attributes',_0x1e78f3['attributes']||{}),this['bind']('isEditable')['to'](_0x56a486,'_permissions',()=>{const _0x4d09c1=_0x56a486['getPermissions'](_0xb374e9['channelId'])['write'],_0x198cfb=_0x56a486['getPermissions'](_0xb374e9['channelId'])['modifyAll'];return _0x123dff&&_0x4d09c1||!_0x123dff&&_0x198cfb;}),this['bind']('isRemovable')['to'](_0xb374e9,'isRemovable',_0x56a486,'_permissions',_0x30a1d1=>{const _0x5a2428=_0x56a486['getPermissions'](_0xb374e9['channelId'])['write'],_0x37cdb1=_0x56a486['getPermissions'](_0xb374e9['channelId'])['modifyAll'];return _0x123dff&&_0x5a2428||_0x30a1d1&&_0x15380f||!_0x123dff&&_0x37cdb1&&!_0x15380f;}),this['bind']('isReadOnly')['to'](_0xb374e9,'isReadOnly'),this['_repository']=_0x56a486;}get['weight'](){return Math['max'](function(_0x3c4ee6){const _0x59162c=document['createElement']('div');return _0x59162c['innerHTML']=_0x3c4ee6,_0x59162c['textContent']['length'];}(this['content']),0xc8);}['update'](_0xf1c86d){const {threadId:_0x498326,id:_0x36b36d}=this;if(!this['_repository']['hasCommentThread'](_0x498326))throw new _0x4c975e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x263699}=this['_repository']['getCommentThread'](_0x498326);this['_repository']['fire'](Nt('updateComment',_0x263699,_0x498326),{'channelId':_0x263699,'threadId':_0x498326,'commentId':_0x36b36d,..._0xf1c86d});}['setAttribute'](_0xa31c58,_0x633cff){const _0x1b35f2=wt(this['attributes']);yt(_0x1b35f2,_0xa31c58,_0x633cff),this['update']({'attributes':_0x1b35f2});}['removeAttribute'](_0x4ba8d5){const _0x1f8d0a=wt(this['attributes']);Ct(_0x1f8d0a,_0x4ba8d5),this['update']({'attributes':_0x1f8d0a});}['remove'](_0x5aa9ed={}){if(!_0x5aa9ed['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x31c519,id:_0x5a6fd8}=this;if(!this['_repository']['hasCommentThread'](_0x31c519))throw new _0x4c975e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x215c06}=this['_repository']['getCommentThread'](_0x31c519);this['_repository']['fire'](Nt('removeComment',_0x215c06,_0x31c519),{'channelId':_0x215c06,'threadId':_0x31c519,'commentId':_0x5a6fd8,..._0x5aa9ed});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x47a702,..._0x332716){for(const _0x119197 of _0x332716)void 0x0!==_0x119197&&(_0x47a702+=':'+String(_0x119197));return _0x47a702;}class ot extends _0x4344f0{constructor(_0x465c94){super(_0x465c94),this['set']('hasContent',!0x1);}['refresh'](){const _0x37dbfe=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x432bbb of _0x37dbfe['getRanges']())if(this['_hasContent'](_0x432bbb))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x162e43=_0x288d35(),ranges:_0x25dfcd,comment:_0x356334}={}){const _0x343df1=this['editor']['model'],_0x369231=_0x25dfcd??Array['from'](_0x343df1['document']['selection']['getRanges']()),_0x5f2024=[];for(const _0x2fb58b of _0x369231)this['_hasContent'](_0x2fb58b)&&_0x5f2024['push'](this['_trimToContent'](_0x2fb58b));if(!_0x5f2024['length'])throw new _0x4c975e('addcommentthreadcommand-incorrect-ranges',null);_0x356334&&this['_createCommentThread'](_0x162e43,_0x356334),this['_createMarkersFromRanges'](_0x162e43,_0x5f2024,!!_0x356334);}['_createMarkersFromRanges'](_0x52c0b9,_0xfd7543,_0x3a1bea){this['editor']['model']['change'](_0x45b75c=>{for(const _0x5dbe67 of _0xfd7543){const _0x5ae4d5=_0x288d35()['substr'](0x1,0x5),_0x399e6='comment:'+_0x52c0b9+':'+_0x5ae4d5;_0x45b75c['addMarker'](_0x399e6,{'range':_0x5dbe67,'usingOperation':_0x3a1bea,'affectsData':_0x3a1bea});}});}['_createCommentThread'](_0x435ee6,_0x122fea){const _0x30c53d=this['editor']['plugins']['get']('CommentsRepository'),_0x20a260=this['editor']['config']['get']('collaboration.channelId'),_0x23ce18=this['editor']['plugins']['get']('Users')['me'];if(!_0x23ce18)throw new _0x4c975e('addcommentthreadcommand-user-not-found',null);_0x30c53d['addCommentThread']({'threadId':_0x435ee6,'channelId':_0x20a260,'comments':[{'authorId':_0x23ce18['id'],'content':_0x122fea,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x30a110){for(const _0x3bc443 of _0x30a110['getItems']())if(this['_itemIsContent'](_0x3bc443))return!0x0;return!0x1;}['_itemIsContent'](_0x175c0c){return _0x175c0c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x175c0c)&&!_0x175c0c['is']('element','tableCell');}['_trimToContent'](_0x5c5803){const _0x147b1a=_0x4b08e6=>!this['_itemIsContent'](_0x4b08e6['item']),_0x234572=_0x5c5803['start']['getLastMatchingPosition'](_0x147b1a),_0x2cf156=_0x5c5803['end']['getLastMatchingPosition'](_0x147b1a,{'direction':'backward'});return this['editor']['model']['createRange'](_0x234572,_0x2cf156);}}class b extends _0x562ab1{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2085e9){super(_0x2085e9),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5ab26f=this['editor'],_0x12661a=_0x5ab26f['model']['document']['selection'],_0xe995ac=_0x192048(()=>this['refreshSelectedViews'](),0xa);_0x12661a['on']('change:range',(_0x34657e,_0x1eaccd)=>{_0x1eaccd['directChange']&&(_0xe995ac['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5ab26f['editing']['view']['document'],'change:isFocused',(_0x7d15f7,_0x19da1e,_0x2b2e97)=>{_0x2b2e97&&_0xe995ac();}),this['listenTo'](_0x5ab26f['ui']['focusTracker'],'change:isFocused',(_0x124d95,_0x2fbf3c,_0x50ae48)=>{_0x50ae48||this['fire']('blur',{'isAnnotationTracked':_0x4a5e05=>this['_editorAnnotationsData']['has'](_0x4a5e05['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4fcad2){if(this['_editorAnnotations']['has'](_0x4fcad2['view']))return;this['_editorAnnotations']['add'](_0x4fcad2['view']),this['editor']['ui']['focusTracker']['add'](_0x4fcad2['view']['element']);const _0x228e9f=this['editor']['plugins']['get'](y);this['listenTo'](_0x228e9f['collection'],'remove',(_0x1035fa,_0x414a44)=>{this['editor']['ui']['focusTracker']['remove'](_0x414a44['view']['element']),this['_editorAnnotations']['delete'](_0x414a44['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x463fae){if('function'!=typeof _0x463fae)throw new _0x4c975e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x463fae);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x327627,annotations:_0x276ad3}){const _0x45ca74=[],_0x5292f8=this['editor']['model']['document']['selection'],_0x4d22b1=Array['from'](_0x5292f8['getRanges']());for(const [_0x46996a,_0x5cf46f]of this['_editorAnnotationsData']){const _0xff098f=_0x61c6ea(_0x5cf46f),_0x18507f=_0x276ad3['getByInnerView'](_0x46996a);_0xff098f&&_0x18507f&&_0x45ca74['push']({'annotation':_0x18507f,'range':_0xff098f});}function _0x61c6ea(_0x2a814e){for(const _0x395aad of _0x2a814e)for(const _0x159234 of _0x4d22b1)if(_0x395aad['containsRange'](_0x159234,!_0x5292f8['isCollapsed']))return _0x395aad;return null;}return _0x45ca74['sort']((_0xc150a5,_0x367093)=>{const _0x282258=_0xc150a5['range'],_0x121694=_0x367093['range'];if(!_0x282258['isEqual'](_0x121694)){if(_0x282258['containsRange'](_0x121694,!0x0))return 0x1;if(_0x121694['containsRange'](_0x282258,!0x0))return-0x1;}return _0xc150a5['annotation']==_0x327627?-0x1:_0x367093['annotation']==_0x327627?0x1:0x0;})['map'](_0x5272b3=>_0x5272b3['annotation']);}get['_editorAnnotationsData'](){const _0x539867=new Map();for(const _0x3e3e10 of Array['from'](this['_dataCollectors']))for(const [_0x3e1768,_0x4794bd]of _0x3e3e10())_0x539867['set'](_0x3e1768,_0x4794bd);return _0x539867;}}class st extends _0x562ab1{['afterInit'](){const _0x2d371e=this['editor'];if(!_0x2d371e['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2d371e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x562ab1{constructor(_0x4272ad){super(_0x4272ad),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x56bee8=this['editor'],_0x12d24a=_0x56bee8['commands']['get']('importWord'),_0x39f52a=_0x56bee8['plugins']['get'](it);_0x12d24a&&(_0x12d24a['on']('execute',(_0x182832,[,_0x8ca383])=>{_0x8ca383['collaboration_features']={'comments':!0x0,'user_id':_0x39f52a['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x12d24a,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4186cf,_0x3de3a6){const {comment_threads:_0x47eef9}=_0x3de3a6;_0x47eef9&&_0x47eef9['forEach'](({thread_id:_0x2c7e3e,comments:_0x58d185,is_resolved:_0x35b263})=>{const _0x5713eb=new Date(),_0x43618=_0x58d185['map'](({author:_0x103d9e,content:_0x446da7,created_at:_0x1a023c})=>({'content':_0x446da7,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x5713eb,'attributes':{'@external':{'authorName':_0x103d9e,'createdAt':_0x1a023c?new Date(_0x1a023c):new Date(),'source':'importWord'}}})),_0xd7a479=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xd7a479,'threadId':_0x2c7e3e,'comments':_0x43618,'resolvedAt':_0x35b263?_0x5713eb:null});});}}class at extends _0x562ab1{constructor(_0x5e24c0){super(_0x5e24c0),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x381e3f=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x381e3f,'contentInsertion',(_0x352ebd,_0x50aaeb)=>this['_removeMarkersWithoutThreads'](_0x50aaeb['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2965dc){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2965dc;const _0x37f36b=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5a2fbf of _0x2965dc['keys']()){const [_0x22a4fd,_0x2a167f]=_0x5a2fbf['split'](':');'comment'!=_0x22a4fd||_0x37f36b['hasCommentThread'](_0x2a167f)||_0x2965dc['delete'](_0x5a2fbf);}return _0x2965dc;}['_registerMarkerInClipboardPipeline'](){const _0x390a50=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xc1cedf=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xc1cedf&&_0x390a50['_registerMarkerToCopy']('comment',_0xc1cedf);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x55e461){switch(_0x55e461){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x162195){const _0x5a0f7e=_0x162195['split'](':');return{'group':_0x5a0f7e[0x0],'id':_0x5a0f7e[0x1],'part':_0x5a0f7e[0x2]};}class ut extends _0x562ab1{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4fe259,_0x395e21)=>{if(!_0x395e21['options']['showCommentHighlights'])return null;if(_0x395e21['options']['ignoreResolvedComments']){const {id:_0xcef28}=ft(_0x4fe259['markerName']),_0x373659=this['editor']['plugins']['get'](o);if(_0x373659['getCommentThread'](_0xcef28)?.['isResolved']&&_0x4fe259['item'])return _0x395e21['consumable']['consume'](_0x4fe259['item'],'addMarker:'+_0x4fe259['markerName']),_0x395e21['consumable']['consume'](_0x4fe259['item'],'removeMarker:'+_0x4fe259['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x7d5ee9=>{_0x7d5ee9['on']('addMarker:comment',(_0xbfe4b8,_0x2fb61f,_0x5c6cd2)=>{if(!_0x5c6cd2['options']['showCommentHighlights'])return;const _0x184089=_0x2fb61f['item'];if(!_0x184089)return;const _0x78ddc3=_0x5c6cd2['mapper']['toViewElement'](_0x184089);this['editor']['model']['schema']['isObject'](_0x184089)&&_0x78ddc3&&!_0x78ddc3['getCustomProperty']('widget')&&_0x78ddc3['is']('containerElement')&&_0x272216(_0x78ddc3,_0x5c6cd2['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x282ec4,{writer:_0x5858aa,options:_0x1798ff})=>{if(!_0x1798ff['showCommentHighlights'])return null;const _0x8ce348=_0x5858aa['createContainerElement']('div'),_0x2e337a=_0x5858aa['createEmptyElement']('hr');return _0x5858aa['addClass']('ck-horizontal-line',_0x8ce348),_0x5858aa['insert'](_0x5858aa['createPositionAt'](_0x8ce348,0x0),_0x2e337a),_0x8ce348;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1e4ae7,{writer:_0xc5379b,options:_0xe17c6e})=>{if(!_0xe17c6e['showCommentHighlights'])return null;const _0x4706f0=_0xc5379b['createContainerElement']('span'),_0x193c12=_0xc5379b['createEmptyElement']('img');return _0xc5379b['addClass']('image-inline',_0x4706f0),_0xc5379b['insert'](_0xc5379b['createPositionAt'](_0x4706f0,0x0),_0x193c12),_0x4706f0;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3acae4,{writer:_0x23730c,options:_0x1a34b8})=>{if(_0x1a34b8['showCommentHighlights'])return _0x23730c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x569868,_0x278197,_0x5a4a51)=>{_0x5a4a51['options']['showCommentHighlights']&&_0x569868['stop']();},{'priority':'high'});}}class r extends _0x562ab1{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x402ff9){super(_0x402ff9),this['set']('isThreadsLoadingPaused',!0x0),_0x402ff9['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x179026,_0x39f2d9,_0x4fd378,_0x181f1b)=>{const _0x2a3c8a=_0x402ff9['plugins']['get'](o),_0x4b3c1c=_0x4fd378?ft(_0x4fd378)['id']:null;_0x402ff9['model']['change'](()=>{if(_0x4b3c1c){const _0x3da876=this['getAllMarkersForId'](_0x4b3c1c);for(const _0x2b58d3 of _0x3da876)_0x402ff9['editing']['reconvertMarker'](_0x2b58d3);}if(_0x181f1b){const {id:_0x354cf3}=ft(_0x181f1b),_0x376a6c=_0x2a3c8a['getCommentThread'](_0x354cf3);if(_0x376a6c&&_0x376a6c['unlinkedAt'])return;if(_0x376a6c&&!_0x376a6c['isAttached'])return;const _0x2f6988=this['getAllMarkersForId'](_0x354cf3);for(const _0x5b13f4 of _0x2f6988)_0x402ff9['editing']['reconvertMarker'](_0x5b13f4);}}),_0x4b3c1c&&this['scrollToThreadMarker'](_0x4b3c1c);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x35085c=this['editor'],_0x52ffb2=_0x35085c['plugins']['get'](o),_0x51f0d7=_0x35085c['config']['get']('collaboration.channelId'),_0x55dc87=_0x52ffb2['getCommentThreads']()['filter'](_0x3b1e71=>_0x3b1e71['channelId']!==_0x51f0d7);_0x35085c['commands']['add']('addCommentThread',new ot(_0x35085c)),this['listenTo'](_0x35085c,'change:isReadOnly',(_0x469903,_0x24bad7,_0x231973)=>{_0x52ffb2['switchReadOnly'](_0x231973,_0x35085c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x52ffb2,dt('addCommentThread',_0x51f0d7),(_0x9b9114,{threadId:_0x2fbfb4})=>{const _0x43818f=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2fbfb4);_0x43818f?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2fbfb4);}),this['listenTo'](_0x52ffb2,dt('removeCommentThread',_0x51f0d7),(_0x334dc9,{threadId:_0x3ea945})=>{_0x35085c['model']['enqueueChange']({'isUndoable':!0x1},_0x4ec9e1=>{const _0x49846b=this['getAllMarkersForId'](_0x3ea945);for(const _0x572f2f of _0x49846b)_0x4ec9e1['removeMarker'](_0x572f2f);});}),this['listenTo'](_0x52ffb2,dt('resolveCommentThread',_0x51f0d7),(_0x1692d4,{threadId:_0x2cd970})=>{(this['_reconvertMarkers'](_0x2cd970),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x2cd970)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x52ffb2,dt('reopenCommentThread',_0x51f0d7),(_0x592234,{threadId:_0x2427d1})=>{this['_reconvertMarkers'](_0x2427d1);},{'priority':'low'}),this['listenTo'](_0x52ffb2,dt('addComment',_0x51f0d7),(_0x16d998,{threadId:_0x1924d6,isFromAdapter:_0x55ab1b})=>{const _0x83cbda=this['getAllMarkersForId'](_0x1924d6);if(_0x55ab1b||0x0==_0x83cbda['length']||!_0x52ffb2['hasCommentThread'](_0x1924d6))return;0x1===_0x52ffb2['getCommentThread'](_0x1924d6)['length']&&_0x35085c['model']['enqueueChange']({'isUndoable':!0x1},_0x5660f7=>{for(const _0x58b549 of _0x83cbda)_0x5660f7['updateMarker'](_0x58b549,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x55dc87);}['afterInit'](){!async function(_0x49ddd5){const _0x5d663c=_0x2b388e([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x17af02=0x73460ab3,_0x21b4fd=0x734189b3^_0x17af02,_0xd558ec=window[_0x2b388e([0x44,0x61,0x74,0x65])][_0x2b388e([0x6e,0x6f,0x77])](),_0x577e05=_0x49ddd5[_0x2b388e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x214a83=new window[(_0x2b388e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2996ed=>{_0x577e05[_0x2b388e([0x6f,0x6e,0x63,0x65])](_0x2b388e([0x72,0x65,0x61,0x64,0x79]),_0x2996ed);}),_0x45a86e={[_0x2b388e([0x6b,0x74,0x79])]:_0x2b388e([0x45,0x43]),[_0x2b388e([0x75,0x73,0x65])]:_0x2b388e([0x73,0x69,0x67]),[_0x2b388e([0x63,0x72,0x76])]:_0x2b388e([0x50,0x2d,0x32,0x35,0x36]),[_0x2b388e([0x78])]:_0x2b388e([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x2b388e([0x79])]:_0x2b388e([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x2b388e([0x61,0x6c,0x67])]:_0x2b388e([0x45,0x53,0x32,0x35,0x36])},_0x54ef9e=_0x577e05[_0x2b388e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2b388e([0x67,0x65,0x74])](_0x2b388e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4f4768(){let _0x47f0bd,_0x4bc423=null,_0x121ac2=null;try{if(_0x54ef9e==_0x2b388e([0x47,0x50,0x4c]))return _0x2b388e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x47f0bd=_0x46e20b(),!_0x47f0bd)return _0x2b388e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x47f0bd[_0x2b388e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x121ac2=_0x326510(_0x47f0bd[_0x2b388e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x47f0bd[_0x2b388e([0x6a,0x74,0x69])])),await _0x549ac9()?_0x2013fb()?_0x1ba978()?_0x2b388e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x552fbc()?(_0x47f0bd[_0x2b388e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2b388e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4bc423=_0x422799(_0x2b388e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4ddf10()):_0x2b388e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2b388e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2b388e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2b388e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1ba978(){const _0xa9fc92=[_0x2b388e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2b388e([0x74,0x72,0x69,0x61,0x6c])][_0x2b388e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47f0bd[_0x2b388e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xd558ec/0x3e8:0xe10*_0x21b4fd;return _0x47f0bd[_0x2b388e([0x65,0x78,0x70])]<_0xa9fc92;}function _0x2013fb(){const _0x323f10=_0x47f0bd[_0x2b388e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x323f10)return!0x1;if(_0x323f10[_0x2b388e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b388e([0x2a])))return!0x0;if(_0x323f10[_0x2b388e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b388e([0x43,0x4d,0x54])))return!0x0;if(_0x323f10[_0x2b388e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b388e([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x5e6712())return!0x0;if(_0x323f10[_0x2b388e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b388e([0x52,0x43,0x4d,0x54]))){if(_0x492f02())return!0x0;if(_0x35bd0d()||_0x491627())return!0x0;}return!0x1;}function _0x552fbc(){const _0x4a133d=_0x47f0bd[_0x2b388e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4a133d||0x0==_0x4a133d[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3bd323}=new URL(window[_0x2b388e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4a133d[_0x2b388e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bd323))return!0x0;const _0x463a6c=_0x3bd323[_0x2b388e([0x73,0x70,0x6c,0x69,0x74])](_0x2b388e([0x2e]));return _0x4a133d[_0x2b388e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4c8815=>_0x4c8815[_0x2b388e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b388e([0x2a])))[_0x2b388e([0x6d,0x61,0x70])](_0x5707ec=>_0x5707ec[_0x2b388e([0x73,0x70,0x6c,0x69,0x74])](_0x2b388e([0x2e])))[_0x2b388e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3950b6=>_0x3950b6[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x463a6c[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2b388e([0x6d,0x61,0x70])](_0x54cfd7=>Array(_0x463a6c[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x54cfd7[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2b388e([0x66,0x69,0x6c,0x6c])](_0x54cfd7[0x0]===_0x2b388e([0x2a])?_0x2b388e([0x2a]):'')[_0x2b388e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x54cfd7))[_0x2b388e([0x73,0x6f,0x6d,0x65])](_0x2d3e9b=>_0x463a6c[_0x2b388e([0x65,0x76,0x65,0x72,0x79])]((_0x3ecc14,_0x10beca)=>_0x2d3e9b[_0x10beca]===_0x3ecc14||_0x2d3e9b[_0x10beca]===_0x2b388e([0x2a])));}function _0x4ddf10(){return _0x4bc423&&_0x121ac2?new window[(_0x2b388e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x99ecf0,_0x39487e)=>{_0x4bc423[_0x2b388e([0x74,0x68,0x65,0x6e])](_0x99ecf0,_0x39487e),_0x121ac2[_0x2b388e([0x74,0x68,0x65,0x6e])](_0x25ce65=>{_0x25ce65!=_0x2b388e([0x56,0x61,0x6c,0x69,0x64])&&_0x99ecf0(_0x25ce65);},_0x39487e);}):_0x4bc423||_0x121ac2||_0x2b388e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x326510(_0x17f19b,_0x2661a4){return new window[(_0x2b388e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x48def9=>{if(_0x3bebdd())return _0x48def9(_0x2b388e([0x56,0x61,0x6c,0x69,0x64]));_0x772cff(),_0x577e05[_0x2b388e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2b388e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1b0826=!0x1;const _0xbd3d46=_0x288d35();function _0x895157(_0x56f2d2){return!!_0x56f2d2&&(typeof _0x56f2d2===_0x2b388e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x56f2d2===_0x2b388e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x56f2d2[_0x2b388e([0x74,0x68,0x65,0x6e])]===_0x2b388e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x56f2d2[_0x2b388e([0x63,0x61,0x74,0x63,0x68])]===_0x2b388e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x20aa2b(_0x191178){_0x51257b(_0x191178)[_0x2b388e([0x74,0x68,0x65,0x6e])](_0x6e6726=>{if(!_0x6e6726||_0x6e6726[_0x2b388e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2b388e([0x6f,0x6b]))return _0x2b388e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x24e11b(_0x257cd8(_0xbd3d46+_0x2661a4))!=_0x6e6726[_0x2b388e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2b388e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2b388e([0x56,0x61,0x6c,0x69,0x64]);})[_0x2b388e([0x74,0x68,0x65,0x6e])](_0xd8688=>(_0x1cc16b(),_0xd8688),()=>{const _0x34e5ac=_0x8f1d29();return null==_0x34e5ac?(_0x1cc16b(),_0x2b388e([0x56,0x61,0x6c,0x69,0x64])):_0x2b388e(_0xd558ec-_0x34e5ac>(0x574a8eb3^_0x17af02)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2b388e([0x74,0x68,0x65,0x6e])](_0x48def9)[_0x2b388e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x48def9(_0x2b388e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xd7ca14=0x7370e433^_0x17af02;function _0x1cc16b(){const _0x39383b=_0x2b388e([0x6c,0x6c,0x63,0x74,0x2d])+_0x24e11b(_0x257cd8(_0x17f19b)),_0x66542e=_0x4087bc(_0x24e11b(window[_0x2b388e([0x4d,0x61,0x74,0x68])][_0x2b388e([0x63,0x65,0x69,0x6c])](_0xd558ec/_0xd7ca14)));window[_0x2b388e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2b388e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x39383b,_0x66542e);}function _0x8f1d29(){const _0x4f51b3=_0x2b388e([0x6c,0x6c,0x63,0x74,0x2d])+_0x24e11b(_0x257cd8(_0x17f19b)),_0x2f7a90=window[_0x2b388e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2b388e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f51b3);return _0x2f7a90?window[_0x2b388e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4087bc(_0x2f7a90),0x10)*_0xd7ca14:null;}function _0x51257b(_0x5040bf){return new window[(_0x2b388e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x11c6ec,_0x440116)=>{_0x5040bf[_0x2b388e([0x74,0x68,0x65,0x6e])](_0x11c6ec,_0x440116),window[_0x2b388e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x440116,0x7347de73^_0x17af02);});}}_0x577e05[_0x2b388e([0x6f,0x6e])](_0x2b388e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1e022f,_0x2f7f8e)=>{if(_0x2f7f8e[0x0]!=_0x17f19b)return _0x48def9(_0x2b388e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2f7f8e[0x1]={..._0x2f7f8e[0x1],[_0x2b388e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xbd3d46};},{[_0x2b388e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2b388e([0x68,0x69,0x67,0x68])}),_0x577e05[_0x2b388e([0x6f,0x6e])](_0x2b388e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x195156=>{_0x895157(_0x195156[_0x2b388e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1b0826=!0x0,_0x20aa2b(_0x195156[_0x2b388e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2b388e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2b388e([0x6c,0x6f,0x77])}),_0x214a83[_0x2b388e([0x74,0x68,0x65,0x6e])](()=>{_0x1b0826||_0x48def9(_0x2b388e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3bebdd(){return _0x577e05[_0x2b388e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b388e([0x76,0x69,0x65,0x77])][_0x2b388e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2b388e([0x61,0x75,0x74,0x6f]);}function _0x772cff(){_0x577e05[_0x2b388e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b388e([0x76,0x69,0x65,0x77])][_0x2b388e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2b388e([0x61,0x75,0x74,0x6f]);}}function _0x422799(_0x3ec223){const _0x48112e=[new window[(_0x2b388e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4521d8=>setTimeout(_0x4521d8,0x734f347f^_0x17af02)),_0x214a83[_0x2b388e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2b388e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x99169d=>{let _0x1a6e85=0x0;_0x577e05[_0x2b388e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b388e([0x6f,0x6e])](_0x2b388e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x23ed31,_0x4e6839)=>{_0x4e6839[0x0][_0x2b388e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1a6e85++,_0x1a6e85==(0x73460f5b^_0x17af02)&&(_0x99169d(),_0x23ed31[_0x2b388e([0x6f,0x66,0x66])]());});}))];return window[_0x2b388e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2b388e([0x72,0x61,0x63,0x65])](_0x48112e)[_0x2b388e([0x74,0x68,0x65,0x6e])](()=>_0x3ec223);}async function _0x2e6a16(){await _0x214a83,_0x577e05[_0x2b388e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b388e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x182e1a,_0x577e05[_0x2b388e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b388e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x182e1a,_0x577e05[_0x2b388e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2b388e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5e6712(){return window[_0x2b388e([0x67,0x6c,0x6f,0x62])]&&window[_0x2b388e([0x67,0x6c,0x6f,0x62])][_0x2b388e([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x492f02(){return _0x41738b(_0x2b388e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x199e95(_0x2b388e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2b388e([0x73,0x74,0x61,0x74,0x65])]==_0x2b388e([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x35bd0d(){return _0x41738b(_0x2b388e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x491627(){return _0x41738b(_0x2b388e([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x283096(_0x32a8b8){const _0x5d26f2=_0x154125();_0x577e05[_0x5d26f2]=_0x2b388e([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x32a8b8,_0x32a8b8!=_0x2b388e([0x56,0x61,0x6c,0x69,0x64])&&_0x2e6a16();}function _0x154125(){const _0x2992f6=window[_0x2b388e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2b388e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2b388e([0x6e,0x6f,0x77])]())[_0x2b388e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2b388e([0x2e]),'');let _0x63f3f1=_0x2b388e([0x4b]);for(let _0x45be4a=0x0;_0x45be4a<_0x2992f6[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x45be4a+=0x2){let _0xb51c89=window[_0x2b388e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2992f6[_0x2b388e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x45be4a,_0x45be4a+0x2));_0xb51c89>=_0x5d663c[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xb51c89-=_0x5d663c[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x63f3f1+=_0x5d663c[_0xb51c89];}return _0x63f3f1;}function _0x46e20b(){const _0x145129=_0x54ef9e[_0x2b388e([0x73,0x70,0x6c,0x69,0x74])](_0x2b388e([0x2e]));if(0x3!=_0x145129[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5ce9e1(_0x145129[0x1]);function _0x5ce9e1(_0x5aea49){const _0x5ed0e8=_0x7db382(_0x5aea49);return _0x5ed0e8&&_0x254ce1()?_0x5ed0e8:null;function _0x254ce1(){const _0x3adb76=_0x5ed0e8[_0x2b388e([0x6a,0x74,0x69])],_0x21a87c=window[_0x2b388e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3adb76[_0x2b388e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3adb76[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x534089={..._0x5ed0e8,[_0x2b388e([0x6a,0x74,0x69])]:_0x3adb76[_0x2b388e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3adb76[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x534089[_0x2b388e([0x76,0x63])],_0x257cd8(_0x534089)==_0x21a87c;}}}async function _0x549ac9(){let _0x48a445=!0x0;try{const _0x5d3666=_0x54ef9e[_0x2b388e([0x73,0x70,0x6c,0x69,0x74])](_0x2b388e([0x2e])),[_0x6c35a2,_0x46299d,_0x1915ae]=_0x5d3666;return _0x3c524c(_0x6c35a2),await _0x4d4524(_0x6c35a2,_0x46299d,_0x1915ae),_0x48a445;}catch{return!0x1;}function _0x3c524c(_0x441541){const _0x2dce1a=_0x7db382(_0x441541);_0x2dce1a&&_0x2dce1a[_0x2b388e([0x61,0x6c,0x67])]==_0x2b388e([0x45,0x53,0x32,0x35,0x36])||(_0x48a445=!0x1);}async function _0x4d4524(_0x392e45,_0x3dd7e4,_0x3194e8){const _0x5af355=window[_0x2b388e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2b388e([0x66,0x72,0x6f,0x6d])](_0x44a40b(_0x3194e8),_0x203ff5=>_0x203ff5[_0x2b388e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x58d57d=new window[(_0x2b388e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2b388e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x392e45+_0x2b388e([0x2e])+_0x3dd7e4),_0x36e113=window[_0x2b388e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2b388e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x36e113)return;const _0x416ef4=await _0x36e113[_0x2b388e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2b388e([0x6a,0x77,0x6b]),_0x45a86e,{[_0x2b388e([0x6e,0x61,0x6d,0x65])]:_0x2b388e([0x45,0x43,0x44,0x53,0x41]),[_0x2b388e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2b388e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2b388e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x36e113[_0x2b388e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2b388e([0x6e,0x61,0x6d,0x65])]:_0x2b388e([0x45,0x43,0x44,0x53,0x41]),[_0x2b388e([0x68,0x61,0x73,0x68])]:{[_0x2b388e([0x6e,0x61,0x6d,0x65])]:_0x2b388e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x416ef4,_0x5af355,_0x58d57d)||(_0x48a445=!0x1);}}function _0x7db382(_0x848d23){return _0x848d23[_0x2b388e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2b388e([0x65,0x79]))?JSON[_0x2b388e([0x70,0x61,0x72,0x73,0x65])](_0x44a40b(_0x848d23)):null;}function _0x44a40b(_0x475284){return window[_0x2b388e([0x61,0x74,0x6f,0x62])](_0x475284[_0x2b388e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2b388e([0x2b]))[_0x2b388e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2b388e([0x2f])));}function _0x257cd8(_0x1dac0e){let _0x4b8506=0x1505;function _0x1b4c85(_0x4eb5a7){for(let _0x391033=0x0;_0x391033<_0x4eb5a7[_0x2b388e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x391033++){const _0x1fc4c4=_0x4eb5a7[_0x2b388e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x391033);_0x4b8506=(_0x4b8506<<0x5)+_0x4b8506+_0x1fc4c4,_0x4b8506&=_0x4b8506;}}function _0x384f6d(_0x2931d2){Array[_0x2b388e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2931d2)?_0x2931d2[_0x2b388e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x384f6d):_0x2931d2&&typeof _0x2931d2==_0x2b388e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2b388e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2931d2)[_0x2b388e([0x73,0x6f,0x72,0x74])]()[_0x2b388e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5a4473,_0x1918ad])=>{_0x1b4c85(_0x5a4473),_0x384f6d(_0x1918ad);}):_0x1b4c85(window[_0x2b388e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2931d2));}return _0x384f6d(_0x1dac0e),_0x4b8506>>>0x0;}function _0x24e11b(_0x30b0e2){return _0x30b0e2[_0x2b388e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2b388e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2b388e([0x30]));}function _0x4087bc(_0x1e8844){return _0x1e8844[_0x2b388e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2b388e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2b388e([0x6a,0x6f,0x69,0x6e])]('');}function _0x41738b(_0xc7a45f){return _0x577e05[_0x2b388e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2b388e([0x68,0x61,0x73])](_0xc7a45f);}function _0x199e95(_0x4bfbb6){return _0x577e05[_0x2b388e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2b388e([0x67,0x65,0x74])](_0x4bfbb6);}function _0x182e1a(){}function _0x2b388e(_0xeed76){return _0xeed76['map'](_0x28ae35=>String['fromCharCode'](_0x28ae35))['join']('');}_0x283096(await _0x4f4768());}(this);}['destroy'](){const _0x55d518=this['editor']['plugins']['get'](o),_0x17e3aa=this['editor']['config']['get']('collaboration.channelId');for(const _0x50a0e4 of _0x55d518['getCommentThreads']({'channelId':_0x17e3aa}))_0x55d518['_detachCommentThread'](_0x50a0e4['id']),_0x55d518['_threads']['delete'](_0x50a0e4['id']);super['destroy']();}['hasMarkerForId'](_0x372137){return this['getAllMarkersForId'](_0x372137)['length']>0x0;}['getAllMarkersForId'](_0x382cb3){const _0x4c3e03=[];for(const _0x57cca7 of this['editor']['model']['markers'])_0x57cca7['name']['startsWith']('comment:'+_0x382cb3)&&_0x4c3e03['push'](_0x57cca7);return _0x4c3e03;}['scrollToThreadMarker'](_0x45e4a2){setTimeout(()=>{const _0x180dc7=this['_getTargetForId'](_0x45e4a2);if(!_0x180dc7)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x45e4a2&&nt({'target':_0x180dc7[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x44afff){this['editor']['model']['change'](()=>{for(const _0x316e73 of this['getAllMarkersForId'](_0x44afff))this['editor']['editing']['reconvertMarker'](_0x316e73);});}['_attachArchivedThread'](_0x17104d){const _0x3cc396=this['editor']['plugins']['get'](o),_0x3accc2=this['editor']['plugins']['get'](b),_0x324569=_0x3cc396['getCommentThread'](_0x17104d);if(!_0x324569['isAttached']){const _0x3ba111=_0x324569['attachTo'](()=>this['_getTargetForId'](_0x324569['id']));_0x3accc2['registerAnnotation'](_0x3ba111),_0x324569['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4a9299=this['editor'],_0x59c1b0=_0x4a9299['plugins']['get'](it);_0x4a9299['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4c3636,_0x3646d1)=>{const {id:_0x522e43}=ft(_0x4c3636['markerName']),_0xb5fa9=_0x4a9299['plugins']['get'](o)['getCommentThread'](_0x522e43),_0x1966fd=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x522e43;let _0x6cff7;if(_0xb5fa9&&_0xb5fa9['isResolved']&&!_0x1966fd&&_0x4c3636['item'])return _0x3646d1['consumable']['consume'](_0x4c3636['item'],'addMarker:'+_0x4c3636['markerName']),_0x3646d1['consumable']['consume'](_0x4c3636['item'],'removeMarker:'+_0x4c3636['markerName']),null;const _0x47f882=['ck-comment-marker'];return _0x1966fd&&_0x47f882['push']('ck-comment-marker--active'),_0x6cff7=_0xb5fa9?.['length']?_0xb5fa9['comments']['first']['author']['id']:_0x59c1b0['me']['id'],{'classes':_0x47f882,'attributes':{'data-comment':_0x522e43,'data-author-id':_0x6cff7}};}}),_0x4a9299['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x283f8d,{options:_0x2f5f71})=>{if(_0x2f5f71['showCommentHighlights'])return null;const _0x131839=_0x4a9299['plugins']['get'](o),_0x569c22=_0x4a9299['model']['markers']['get'](_0x283f8d),{id:_0x194ea1,part:_0x2166a3}=ft(_0x283f8d);return _0x569c22&&!_0x569c22['affectsData']||_0x2f5f71['ignoreResolvedComments']&&_0x131839['getCommentThread'](_0x194ea1)?.['isResolved']?null:{'group':'comment','name':_0x2166a3?_0x194ea1+':'+_0x2166a3:_0x194ea1};}}),_0x4a9299['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x50a9f5,{writer:_0x1a6c9b})=>_0x1a6c9b['createElement']('$marker',{'data-name':'comment:'+_0x50a9f5['getAttribute']('id')})}),_0x4a9299['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2576a5=this['editor'],_0x516488=_0x2576a5['plugins']['get'](o),_0x4b13f8=new Set(),_0x1b4de4=new Set();_0x2576a5['model']['document']['registerPostFixer'](_0x445e32=>{let _0x2f2a0c=!0x1;for(const {name:_0x297821,data:_0x44064c}of _0x2576a5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2766f9,id:_0x3fdf7a}=ft(_0x297821);let _0x1fef07=_0x44064c['newRange'];if('comment'!==_0x2766f9||!_0x1fef07)continue;const _0x234e12='$graveyard'===_0x1fef07['root']['rootName'];_0x234e12||(_0x1fef07=ht(_0x1fef07,_0x2576a5['model']),!_0x1fef07||_0x1fef07['isCollapsed']||!_0x44064c['newRange']||_0x1fef07['isEqual'](_0x44064c['newRange']))?_0x2576a5['model']['hasContent'](_0x1fef07)&&!_0x234e12?this['isThreadsLoadingPaused']?_0x4b13f8['add'](_0x297821):this['_handleThreadMarker'](_0x297821,_0x3fdf7a):(_0x1b4de4['add'](_0x297821),_0x4b13f8['delete'](_0x297821),_0x445e32['removeMarker'](_0x297821),_0x2f2a0c=!0x0):(_0x445e32['updateMarker'](_0x297821,{'range':_0x1fef07}),_0x2f2a0c=!0x0);}return _0x2f2a0c;}),this['on']('change:isThreadsLoadingPaused',(_0x12b10b,_0x241929,_0x296aea)=>{if(!_0x296aea&&_0x4b13f8['size'])for(const _0x50baa1 of _0x4b13f8){const {id:_0xf43948}=ft(_0x50baa1);_0x4b13f8['delete'](_0x50baa1),_0x2576a5['model']['markers']['get'](_0x50baa1)&&this['_handleThreadMarker'](_0x50baa1,_0xf43948);}}),this['listenTo'](_0x2576a5['model']['document'],'change',()=>{for(const {name:_0x1f14a4,data:{newRange:_0x30d3c4}}of _0x2576a5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x335ae4,id:_0xb8a33a}=ft(_0x1f14a4);if('comment'!==_0x335ae4)continue;const _0x2403a3=_0x516488['getCommentThread'](_0xb8a33a),_0xb96688=this['hasMarkerForId'](_0xb8a33a);_0x2403a3&&(!_0x2403a3['_hasTargetInContent']&&_0x30d3c4&&_0x2576a5['editing']['view']['once']('render',()=>{const _0x48a220=_0x2576a5['plugins']['get'](y),_0x5943c2=_0x516488['_threadToController']['get'](_0x2403a3)['view'];_0x48a220['getByInnerView'](_0x5943c2)['refreshVisibility']();},{'priority':'low'}),_0x2403a3['_hasTargetInContent']=_0xb96688||!!_0x30d3c4),_0x30d3c4||(_0x1b4de4['add'](_0x1f14a4),_0x4b13f8['delete'](_0x1f14a4));}for(const _0x5051b8 of _0x1b4de4){const {id:_0x11b1c0}=ft(_0x5051b8),_0x3f3fa9=_0x516488['getCommentThread'](_0x11b1c0);if(_0x4b13f8['delete'](_0x5051b8),!_0x3f3fa9)continue;const _0x3b052b=this['hasMarkerForId'](_0x11b1c0);_0x3b052b||_0x3f3fa9['isSubmitted']?_0x3b052b||_0x3f3fa9['unlinkedAt']||_0x3f3fa9['setUnlinkedAt'](new Date()):_0x3f3fa9['remove']();}_0x1b4de4['clear']();});}['_handleInitialThreads'](_0x140a16){_0x140a16['forEach'](_0x2d59cc=>{_0x2d59cc['unlinkedAt']&&this['_attachArchivedThread'](_0x2d59cc['id']);});}['_getTargetForId'](_0x2259f8){const _0x256c6d=this['editor'],_0x44ebea=this['getAllMarkersForId'](_0x2259f8);return et(_0x256c6d['editing'],_0x44ebea);}['_getTextContext'](_0xd76d91){const _0x199fcf=this['getAllMarkersForId'](_0xd76d91);let _0x47bd50='',_0x5162db=!0x1;for(const _0x8eef2c of _0x199fcf){const _0x40beda=_0x8eef2c['getRange']();for(const _0x3ed9c6 of Array['from'](_0x40beda['getItems']()))_0x3ed9c6['is']('$textProxy')?(_0x47bd50&&_0x5162db&&(_0x47bd50+='\x20',_0x5162db=!0x1),_0x47bd50+=_0x3ed9c6['data']):_0x5162db=!0x0;_0x5162db=!0x0;}return _0x47bd50['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x268ca5,_0x5f0e15){const _0x23ab48=this['editor'],_0x3cfbda=_0x23ab48['plugins']['get'](o);let _0x5da49a=_0x3cfbda['getCommentThread'](_0x5f0e15);const _0x42bc35=_0x23ab48['config']['get']('collaboration.channelId'),_0x286751=_0x23ab48['plugins']['get'](b);if(_0x5da49a&&(_0x5da49a['unlinkedAt']&&_0x5da49a['setUnlinkedAt'](null),_0x5da49a['isAttached']))return _0x5da49a;return!this['getAllMarkersForId'](_0x5f0e15)[0x0]['managedUsingOperations']?_0x23ab48['editing']['view']['once']('render',()=>{if(_0x3cfbda['getCommentThread'](_0x5f0e15))return;const _0x2b5be9=_0x23ab48['plugins']['get'](y);_0x5da49a=_0x3cfbda['openNewCommentThread']({'channelId':_0x42bc35,'threadId':_0x5f0e15,'target':()=>this['_getTargetForId'](_0x5f0e15),'context':{'type':'text','value':this['_getTextContext'](_0x5f0e15)}});const _0x55d757=_0x3cfbda['_threadToController']['get'](_0x5da49a)['view'],_0x3b1143=_0x2b5be9['getByInnerView'](_0x55d757);_0x3b1143&&_0x286751['registerAnnotation'](_0x3b1143);},{'priority':'low'}):_0x3cfbda['fetchCommentThread']({'channelId':_0x42bc35,'threadId':_0x5f0e15})['then'](_0x1659a7=>{if('destroyed'!==_0x23ab48['state']){if(_0x5da49a=_0x1659a7,_0x5da49a&&!_0x5da49a['isAttached']){const _0x50bb36=_0x5da49a['attachTo'](()=>this['_getTargetForId'](_0x5f0e15));_0x286751['registerAnnotation'](_0x50bb36),_0x5da49a['isResolved']&&this['_reconvertMarkers'](_0x5f0e15);}else{if(!_0x5da49a){const _0x4a0295=this['getAllMarkersForId'](_0x5f0e15);_0x23ab48['model']['change'](_0x3d280d=>{for(const _0xf4bef3 of _0x4a0295)_0x3d280d['removeMarker'](_0xf4bef3);});}}}}),_0x5da49a;}['_handleThreadMarker'](_0x47a4d4,_0x4078f6){const _0x39bb7a=this['_attachMarkerToThread'](_0x47a4d4,_0x4078f6);_0x39bb7a&&!_0x39bb7a['context']&&_0x39bb7a['setContext']({'type':'text','value':this['_getTextContext'](_0x4078f6)});}['_initAriaMarkerChangeAnnouncements'](){const _0x141730=this['editor'];rt(_0x141730['model'],({left:_0x1afaab,entered:_0x186211})=>{for(const _0x19d964 of _0x1afaab)if(mt(_0x19d964)){_0x141730['ui']['ariaLiveAnnouncer']['announce'](N(_0x141730['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x21ffb3 of _0x186211)if(mt(_0x21ffb3)){_0x141730['ui']['ariaLiveAnnouncer']['announce'](N(_0x141730['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x51ab26)));break;}});}}function dt(_0x2f497b,_0x5bedaa){return _0x5bedaa?_0x2f497b+':'+_0x5bedaa:_0x2f497b;}function ht(_0xafd9b2,_0x12e642){const _0x192901=_0x12e642['schema'],_0x2486f1=_0x12e642['createRange'](_0xafd9b2['start']);for(const _0x5af8c6 of _0xafd9b2['getWalker']()){const {type:_0x4d74a3,item:_0x449dbb,nextPosition:_0xadaf9a}=_0x5af8c6;if('text'===_0x4d74a3||_0x192901['isObject'](_0x449dbb)){const _0x4b7ee3=_0x12e642['createPositionBefore'](_0x449dbb);_0x2486f1['isCollapsed']&&(_0x2486f1['start']=_0x4b7ee3),_0x2486f1['end']=_0xadaf9a;}}return _0x2486f1;}function mt(_0x2dbf6c){return'comment'===ft(_0x2dbf6c['name'])['group'];}class s extends _0x562ab1{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x587d98=this['editor'],_0x4f7973=_0x587d98['plugins']['get'](o),_0x4e05f2=_0x587d98['plugins']['get'](r),_0xf6c77e=_0x587d98['plugins']['get'](y),_0x46a55f=_0x587d98['plugins']['get'](b);_0x587d98['ui']['componentFactory']['add']('comment',()=>{const _0x60e59f=this['_createUIButton'](_0x2e2946);return _0x60e59f['tooltip']=!0x0,_0x60e59f;}),_0x587d98['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1b61d8)),_0x46a55f['addSourceCollector'](()=>{const _0x11ccb7=[];for(const [_0x2c8a12,_0x16101b]of _0x4f7973['_threadToController']){const _0x5779fb=_0x4e05f2['getAllMarkersForId'](_0x2c8a12['id']),_0x4188f7=_0x5779fb['map'](_0x6c844a=>_0x6c844a['getRange']());_0x5779fb['length']>0x0&&_0x11ccb7['push']([_0x16101b['view'],_0x4188f7]);}return _0x11ccb7;}),this['listenTo'](_0xf6c77e,'change:activeAnnotations',(_0x558c9a,_0x437222,_0x5ab12f)=>{const _0xcbd497=Array['from'](_0x5ab12f)['map'](_0x1d214d=>_0x1d214d['innerView'])['find'](_0x222816=>_0x4f7973['_viewToController']['has'](_0x222816));if(!_0xcbd497)return void(_0x4e05f2['activeMarker']=null);const _0x4e4d26=_0x4f7973['_viewToController']['get'](_0xcbd497)['model']['id'],_0x128018='comment:'+_0x4e4d26;_0x4e4d26&&_0x4e05f2['hasMarkerForId'](_0x4e4d26)?_0x4e05f2['activeMarker']=_0x128018:_0x4e05f2['activeMarker']&&(_0x4e05f2['activeMarker']=null);}),this['listenTo'](_0x4f7973,'removeCommentThread',(_0x484a58,{threadId:_0x1dfaad,isFromAdapter:_0x3e0bf4})=>{!_0x3e0bf4&&_0x587d98['ui']['focusTracker']['isFocused']&&_0x4e05f2['hasMarkerForId'](_0x1dfaad)&&_0x587d98['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4f7973,'addComment',(_0x4bfbad,{threadId:_0x4a0171,isFromAdapter:_0x2e8bae})=>{if(_0x2e8bae||!_0x4e05f2['hasMarkerForId'](_0x4a0171)||!_0x4f7973['hasCommentThread'](_0x4a0171))return;0x1===_0x4f7973['getCommentThread'](_0x4a0171)['length']&&(_0x587d98['editing']['view']['focus'](),_0x4bfbad['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x609179=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xf0c63c;for(const _0x2475ce in _0x609179){const _0xa62d09=_0x2475ce,_0x5595b7=_0x609179[_0xa62d09];if('commentsLicenseKeyValid'==_0x5595b7||'commentsLicenseKeyInvalid'==_0x5595b7||'commentsLicenseKeyExpired'==_0x5595b7||'commentsLicenseKeyDomainLimit'==_0x5595b7||'commentsLicenseKeyNotAllowed'==_0x5595b7||'commentsLicenseKeyEvaluationLimit'==_0x5595b7||'commentsLicenseKeyUsageLimit'==_0x5595b7){delete _0x609179[_0xa62d09],_0xf0c63c=_0x5595b7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xf0c63c&&_0x609179['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xf0c63c&&_0x609179['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xf0c63c&&_0x609179['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xf0c63c&&_0x609179['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xf0c63c&&_0x609179['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0xf0c63c&&_0x609179['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xc68cca){const _0x1119fc=this['editor'],_0x29eca2=new _0xc68cca(_0x1119fc['locale']),_0x156d21=_0x1119fc['commands']['get']('addCommentThread');return _0x29eca2['set']({'label':N(_0x1119fc['locale'],'Comment'),'icon':_0x38a6cc}),_0x29eca2['bind']('isEnabled')['to'](_0x156d21,'isEnabled',_0x156d21,'hasContent',(_0x1d3e85,_0x154aee)=>_0x1d3e85&&_0x154aee),this['listenTo'](_0x29eca2,'execute',()=>{_0x156d21['execute']();}),_0x29eca2;}}class i extends _0x562ab1{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x88feeb){super(_0x88feeb),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x190526,_0x55080d,_0x424763)=>{_0x424763?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x51c100,_0x5bd99f]of this['editor']['commands'])_0x5bd99f['affectsData']&&'addCommentThread'!==_0x51c100&&_0x5bd99f['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 _0x42bec0=this['editor']['editing']['view']['document'];this['listenTo'](_0x42bec0,'cut',_0x38bd14=>_0x38bd14['stop'](),{'priority':'highest'}),this['listenTo'](_0x42bec0,'clipboardInput',_0x31b055=>_0x31b055['stop'](),{'priority':'highest'}),this['listenTo'](_0x42bec0,'delete',_0x56c514=>_0x56c514['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x24a77b,_0x296a20]of this['editor']['commands'])_0x296a20['affectsData']&&'addCommentThread'!==_0x24a77b&&_0x296a20['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x1511aa{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x315ae1){super(_0x315ae1),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2a7d11=this['context']['plugins']['get'](y);this['listenTo'](_0x2a7d11,'_activateAnnotation',(_0x3ba24e,_0x3941d2)=>{for(const _0x45b57c of this['activeUIs']){const _0x5093e4=this['_uis']['get'](_0x45b57c);(0x0,this['uisData']['get'](_0x45b57c)['filter'])(_0x3941d2)&&_0x5093e4['setActiveAnnotation'](_0x3941d2);}}),this['listenTo'](_0x2a7d11,'_deactivateAllAnnotations',()=>{for(const _0x2a6ef5 of this['activeUIs']){this['_uis']['get'](_0x2a6ef5)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2a7d11['_visibleAnnotations'],'add',(_0x36d567,_0x457f87)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x457f87);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x340334){return this['activeUIs']['has'](_0x340334);}['activate'](_0x1c27fc,_0x455fde=this['defaultFilter']){const _0x5a574d=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1c27fc))throw new _0x4c975e('annotationsuis-missing-ui',this,{'uiName':_0x1c27fc});this['isActive'](_0x1c27fc)&&this['deactivate'](_0x1c27fc),this['activeUIs']['add'](_0x1c27fc);const _0x334417=new S();v({'source':_0x5a574d['_visibleAnnotations'],'target':_0x334417,'filter':_0x455fde}),this['uisData']['set'](_0x1c27fc,{'collection':_0x334417,'filter':_0x455fde});const _0x4bbbf6=this['_uis']['get'](_0x1c27fc);_0x4bbbf6['attach'](_0x334417),this['listenTo'](_0x4bbbf6,'change:activeAnnotation',(_0x46d417,_0x390cbd,_0x30df11,_0x315c71)=>{_0x315c71&&_0x5a574d['_removeActiveAnnotation'](_0x315c71),_0x30df11&&_0x5a574d['_addActiveAnnotation'](_0x30df11);});}['deactivate'](_0x182d28){if(this['activeUIs']['delete'](_0x182d28),!this['_uis']['has'](_0x182d28))throw new _0x4c975e('annotationsuis-missing-ui',this,{'uiName':_0x182d28});const _0x37618b=this['_uis']['get'](_0x182d28);_0x37618b['detach'](),this['stopListening'](_0x37618b),this['uisData']['get'](_0x182d28)['collection']['destroy'](),this['uisData']['delete'](_0x182d28);}['switchTo'](_0x4c94da){if(!this['_uis']['has'](_0x4c94da))throw new _0x4c975e('annotationsuis-missing-ui',this,{'uiName':_0x4c94da});const _0x3f3058=this['context']['plugins']['get'](y),_0x49d401=Array['from'](_0x3f3058['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4c94da);const _0x3314e1=this['_uis']['get'](_0x4c94da);_0x3314e1['setActiveAnnotation'](_0x49d401),_0x3314e1['_setSelectedAnnotations']&&_0x49d401&&_0x3314e1['_setSelectedAnnotations']([_0x49d401]);}['deactivateAll'](){for(const _0x391b15 of this['activeUIs'])this['deactivate'](_0x391b15);}['register'](_0x4d4c27,_0x873db8){if(this['_uis']['has'](_0x4d4c27))throw new _0x4c975e('annotationsuis-register-already-registered');if('function'!=typeof _0x873db8['attach']||'function'!=typeof _0x873db8['detach']||'function'!=typeof _0x873db8['setActiveAnnotation'])throw new _0x4c975e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4d4c27,_0x873db8);}['refilterAnnotations'](){const _0x56d7d1=this['context']['plugins']['get'](y)['collection'],_0x5a4cd3=new Map(),_0xdfdbaf=Array['from'](this['activeUIs']);for(const _0x465ea7 of this['activeUIs']){const _0x3b66b4=this['uisData']['get'](_0x465ea7)['collection'];for(const _0x14f313 of _0x3b66b4)_0x5a4cd3['set'](_0x14f313,_0x465ea7);}for(const _0x2628f3 of _0x56d7d1){const _0x1540b5=_0x5a4cd3['get'](_0x2628f3);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2628f3);const _0x4d578f=_0xdfdbaf['find'](_0x414e8f=>this['uisData']['get'](_0x414e8f)['filter'](_0x2628f3));_0x1540b5!==_0x4d578f&&(_0x1540b5&&this['uisData']['get'](_0x1540b5)['collection']['remove'](_0x2628f3),_0x4d578f&&this['uisData']['get'](_0x4d578f)['collection']['add'](_0x2628f3));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x372ba9){const _0x52092e=[];for(const _0x5c1691 of this['activeUIs']){(0x0,this['uisData']['get'](_0x5c1691)['filter'])(_0x372ba9)&&_0x52092e['push'](_0x5c1691);}if(_0x52092e['length']>0x1)throw new _0x4c975e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x52092e,'annotationType':_0x372ba9['type']});}}const _i=/* #__PURE__ -- @preserve */
32
+ Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x3b9c5e){super(_0x3b9c5e);const _0x24e4b0=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 _0x3fbfe5(),this['focusCycler']=new _0x39bd35({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x24e4b0['to']('class')],'style':{'minHeight':_0x24e4b0['to']('minHeight',_0x57557b=>'number'==typeof _0x57557b?_i(_0x57557b+0xa):null)},'dir':_0x3b9c5e['uiLanguageDirection'],'role':'application','aria-label':N(_0x3b9c5e,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x3b9c5e,'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',_0x2b5642=>{this['_updateItemPositionInFocusables'](_0x2b5642['source']);}),this['list']['forEach'](_0x16b6c0=>{this['focusTracker']['add'](_0x16b6c0['element']),this['_updateItemPositionInFocusables'](_0x16b6c0);}),this['list']['on']('change',(_0xa1779b,_0x398fed)=>{for(const _0x4c05ac of _0x398fed['removed'])this['focusTracker']['remove'](_0x4c05ac['element']),this['focusables']['remove'](_0x4c05ac);for(const _0x1299a7 of _0x398fed['added'])this['focusTracker']['add'](_0x1299a7['element']),this['_updateItemPositionInFocusables'](_0x1299a7);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5c077c){const _0x2d90c2=this['focusables']['getIndex'](_0x5c077c);let _0x68a9cb,_0x1881ba;for(const _0x4b42cf of this['focusables'])if(_0x5c077c['top']<_0x4b42cf['top']){_0x68a9cb=_0x4b42cf;break;}if(_0x1881ba=_0x68a9cb?this['focusables']['getIndex'](_0x68a9cb):this['focusables']['length'],-0x1!==_0x2d90c2){if(_0x2d90c2===_0x1881ba-0x1)return;this['focusables']['remove'](_0x5c077c),_0x1881ba=_0x68a9cb?this['focusables']['getIndex'](_0x68a9cb):this['focusables']['length'];}this['focusables']['add'](_0x5c077c,_0x1881ba);}}const Ot=/* #__PURE__ -- @preserve */
33
+ Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x248ad0){super(_0x248ad0),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x37cd6d,_0x4c1291)=>_0x37cd6d+_0x4c1291),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x428edc=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x428edc['to']('isAnimationDisabled',_0x1ca54c=>_0x1ca54c?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x428edc['to']('top',_0x1601c6=>Ot(_0x1601c6))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x413ab0=this['element']['clientHeight'];_0x413ab0&&(this['height']=_0x413ab0);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1511aa{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d7590){super(_0x1d7590),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 _0x1b2829=this['context']['config']['get']('sidebar.container');_0x1b2829&&this['setContainer'](_0x1b2829);}['setContainer'](_0x1da5db){if(!g(_0x1da5db))throw new _0x4c975e('sidebar-setcontainer-invalid-element');this['container']=_0x1da5db;}['_attachToContainer']({viewClass:_0x2d1480='',spaceBetweenItems:_0x43d8f7=0x19}={}){if(!g(this['container']))throw new _0x4c975e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2d1480,this['_spaceBetweenItems']=_0x43d8f7;}['rearrange']({removedAnnotation:_0x1d3d67,previousAnnotation:_0x165ab5,nextAnnotation:_0x2486c0}){const _0xfa6ca4=this['getSidebarItemView'](_0x1d3d67);this['view']['list']['remove'](_0xfa6ca4),this['_destroySidebarItemView'](_0x1d3d67),_0x165ab5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x165ab5)),_0x2486c0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2486c0)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x20e7fe,activatedAnnotation:_0x2db1f7,disableAnimationOnActivatedAnnotation:_0x145b1d}){if(this['_activeAnnotation']=_0x2db1f7,_0x20e7fe){_0x20e7fe['isActive']=!0x1;const _0x320dfb=this['getSidebarItemView'](_0x20e7fe);_0x320dfb&&_0x145b1d&&(_0x320dfb['isAnimationDisabled']=!0x1);}if(_0x2db1f7){const _0x426481=this['getSidebarItemView'](_0x2db1f7);_0x426481&&(_0x2db1f7['isActive']=!0x0,_0x145b1d&&(_0x426481['isAnimationDisabled']=!0x0,_0x426481['top']+=0x1),this['_alignToTargetRect'](_0x426481));}}['_detachFromContainer'](_0x529990){if(this['view']['element']['remove'](),_0x529990){for(const _0x340ea4 of _0x529990)this['_destroySidebarItemView'](_0x340ea4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x9ba1da,_0x3122cd){_0x3122cd||(_0x3122cd=_0x9ba1da['view']);const _0x43d272=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x43d272,_0x9ba1da),this['_annotationToSidebarItemView']['set'](_0x9ba1da,_0x43d272),_0x43d272['content']['add'](_0x3122cd),this['listenTo'](_0x9ba1da['view'],'change:targetRect',(_0x19909b,_0x48a3ed,_0x2ca1cc)=>{const _0x54b0f6=this['_getTargetTop'](_0x9ba1da,_0x2ca1cc);_0x43d272['_targetTop']!=_0x54b0f6&&(_0x43d272['_targetTop']=_0x54b0f6,this['_setItemTop'](_0x43d272,_0x54b0f6));}),this['listenTo'](_0x43d272,'change:top',()=>{this['_recalculate'](_0x43d272,'top');}),this['listenTo'](_0x43d272,'change:bottom',()=>{this['_recalculate'](_0x43d272,'bottom');}),this['_alignToTargetRect'](_0x43d272);const _0x4228ec=this['_getItemBefore'](_0x43d272);if(_0x4228ec)this['_alignAfterItem'](_0x4228ec,_0x43d272)||this['_alignToTargetRect'](_0x43d272);else this['_alignToTargetRect'](_0x43d272);return this['_updateLastItem'](),this['view']['list']['add'](_0x43d272),_0x43d272;}['_alignForTopChange'](_0x328aac){if(!_0x328aac['content']['length'])return;const _0x571057=this['_getItemBefore'](_0x328aac);if(!_0x571057)return;const _0x2164c3=this['_sidebarItemViewToAnnotation']['get'](_0x571057),_0x4ff163=this['_activeAnnotation'];_0x4ff163&&_0x4ff163===_0x2164c3?this['_alignAfterItem'](_0x571057,_0x328aac):this['_alignBeforeItem'](_0x328aac,_0x571057);}['_alignForBottomChange'](_0x401f01){if(!_0x401f01['content']['length'])return;const _0x913dcb=this['_getItemAfter'](_0x401f01);if(!_0x913dcb)return;const _0x39cd2b=this['_sidebarItemViewToAnnotation']['get'](_0x913dcb),_0x3d3ce8=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x31560b=this['_activeAnnotation'];_0x31560b&&_0x31560b===_0x39cd2b&&_0x3d3ce8?(this['_alignBeforeItem'](_0x913dcb,_0x401f01),this['_alignAfterItem'](_0x401f01,_0x913dcb)):_0x31560b&&_0x31560b===_0x39cd2b?this['_alignBeforeItem'](_0x913dcb,_0x401f01):this['_alignAfterItem'](_0x401f01,_0x913dcb);}['_recalculate'](_0x4675a7,_0x2b6ba5){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x58e118,changedProp:_0x591189}of this['_recalculateBuffer'])'top'===_0x591189?this['_alignForTopChange'](_0x58e118):this['_alignForBottomChange'](_0x58e118);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4675a7,'changedProp':_0x2b6ba5});}['getSidebarItemView'](_0x2d4ef0){return this['_annotationToSidebarItemView']['get'](_0x2d4ef0);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1e6201){const _0x39af5a=this['getSidebarItemView'](_0x1e6201);this['stopListening'](_0x39af5a),this['stopListening'](_0x1e6201['view']),_0x39af5a['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1e6201),this['_sidebarItemViewToAnnotation']['delete'](_0x39af5a);}['_createSidebarView'](){const _0x258adb=new H(this['context']['locale']);return _0x258adb['render'](),this['on']('change:_lastItem',(_0x962ea0,_0x253d0e,_0x2951df,_0x4513e3)=>{_0x4513e3&&_0x258adb['unbind']('minHeight'),_0x2951df?_0x258adb['bind']('minHeight')['to'](_0x2951df,'bottom'):_0x258adb['minHeight']=null;}),_0x258adb;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x489e7c){const _0x328cf8=this['_sidebarItemViewToAnnotation']['get'](_0x489e7c),_0x37e958=_0x328cf8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x328cf8)-0x1);return _0x37e958&&this['getSidebarItemView'](_0x37e958)||null;}['_getItemAfter'](_0x50da30){const _0x16fa2e=this['_sidebarItemViewToAnnotation']['get'](_0x50da30),_0x401601=_0x16fa2e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x16fa2e)+0x1);return _0x401601&&this['getSidebarItemView'](_0x401601)||null;}['_alignBeforeItem'](_0x4dbe1d,_0x518c94){_0x4dbe1d['updateHeight']();const _0x2beda7=G(_0x518c94['bottom']+this['_spaceBetweenItems'],_0x4dbe1d['top']);return!!_0x2beda7&&(this['_setItemTop'](_0x518c94,_0x518c94['top']-_0x2beda7),!0x0);}['_alignAfterItem'](_0x5483e2,_0x5f2359){_0x5483e2['updateHeight']();const _0x1638dc=G(_0x5483e2['bottom']+this['_spaceBetweenItems'],_0x5f2359['top']);return!!_0x1638dc&&(this['_setItemTop'](_0x5f2359,_0x5f2359['top']+_0x1638dc,!0x1),!0x0);}['_alignToTargetRect'](_0x17c779){const _0x4ed1f8=this['_sidebarItemViewToAnnotation']['get'](_0x17c779);if(!_0x4ed1f8||!_0x4ed1f8['target']||!_0x4ed1f8['targetRect'])return;const _0x4fa507=this['_getTargetTop'](_0x4ed1f8,_0x4ed1f8['targetRect']);this['_setItemTop'](_0x17c779,_0x4fa507);}['_getTargetTop'](_0x25b4ec,_0x47a0e6){if(null===_0x47a0e6)return 0x0;if(_0x25b4ec['target']instanceof _0x28ea8f)return _0x47a0e6['top'];{const _0x5ea8ca=new _0x28ea8f(this['view']['element'])['top'];return _0x47a0e6['top']-_0x5ea8ca;}}['_setItemTop'](_0x344bd9,_0x4e2d68,_0x4fdc10=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x4fdc10&&(_0x4e2d68=Math['max'](_0x4e2d68,this['_getMaxAvailableTop'](_0x344bd9))),_0x344bd9['top']=_0x4e2d68;}['_getMaxAvailableTop'](_0x3a5808){let _0x2d3c00=this['_getItemBefore'](_0x3a5808),_0x457688=0x0;for(;_0x2d3c00;)_0x2d3c00['updateHeight'](),_0x457688+=this['_spaceBetweenItems']+_0x2d3c00['height'],_0x2d3c00=this['_getItemBefore'](_0x2d3c00);return _0x457688;}}function G(_0x31fa56,_0x1978d6){return Math['max'](_0x31fa56-_0x1978d6,0x0);}function g(_0x31500d){return null!==_0x31500d&&'object'==typeof _0x31500d&&0x1===_0x31500d['nodeType'];}class e extends _0x1511aa{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e8341){super(_0x3e8341),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1ce026(),this['_refreshPositioningDebounced']=_0x192048(()=>{_0x3e8341['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1cde03=this['context']['plugins']['get'](j),_0x3e2294=this['context']['plugins']['get'](z);_0x1cde03['register']('wideSidebar',this),_0x3e2294['container']&&_0x1cde03['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x441bcc){if(_0x441bcc===this['activeAnnotation'])return;const _0x248da2=this['context']['plugins']['get'](z);_0x248da2['_activeAnnotation']=_0x441bcc;const _0x4de49a=this['activeAnnotation'];_0x248da2['refresh']({'blurredAnnotation':_0x4de49a,'activatedAnnotation':_0x441bcc}),this['activeAnnotation']=_0x441bcc;}['attach'](_0x27a9a9){this['annotations']=_0x27a9a9;const _0x25c510=this['context']['plugins']['get'](z);if(_0x25c510['_annotations']=_0x27a9a9,this['isAttached'])throw new _0x4c975e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x25c510,'set:container',()=>{this['detach'](),this['listenTo'](_0x25c510,'change:container',_0xbf657c=>{_0xbf657c['off'](),this['attach'](_0x27a9a9);});}),_0x25c510['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x376c72=_0x497955=>{_0x497955['updateTargetRect'](),_0x25c510['addAnnotation'](_0x497955);};for(const _0x240eef of _0x27a9a9)_0x376c72(_0x240eef);this['listenTo'](_0x27a9a9,'add',(_0x259f3,_0x3a7b6f)=>{_0x376c72(_0x3a7b6f);}),this['listenTo'](_0x27a9a9,'remove',(_0x36cdbf,_0x39e9e7,_0x41a88b)=>{_0x25c510['rearrange']({'removedAnnotation':_0x39e9e7,'previousAnnotation':_0x27a9a9['get'](_0x41a88b-0x1),'nextAnnotation':_0x27a9a9['get'](_0x41a88b+0x1)}),_0x39e9e7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x27a9a9,'focus',(_0x4cd661,_0x819451)=>{this['setActiveAnnotation'](_0x819451);}),this['listenTo'](_0x27a9a9,'blur',()=>{this['setActiveAnnotation'](null);});const _0x113848=this['context']instanceof _0x1f800c?this['context']['editors']:new _0x1ce026([this['context']]);for(const _0x4a095a of _0x113848)this['_integrateWithEditorAnnotations'](_0x4a095a);this['listenTo'](_0x113848,'add',(_0x1d5abc,_0x39e881)=>{this['listenTo'](_0x39e881,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x39e881);});}),this['listenTo'](_0x113848,'remove',(_0x7706a9,_0xcdc84d)=>{_0xcdc84d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xcdc84d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4c975e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3a3718=this['context']['plugins']['get'](z);_0x3a3718['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3a3718),this['stopListening'](this['annotations']),this['context']instanceof _0x1f800c&&this['stopListening'](this['context']['editors']);for(const _0x439821 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x439821);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3edca1){if(!_0x3edca1['plugins']['has']('EditorAnnotations'))return;const _0x5598de=_0x3edca1['plugins']['get']('EditorAnnotations'),_0x18d500=()=>{const _0xe64cad=_0x5598de['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0xe64cad[0x0]||null);};this['listenTo'](_0x5598de,'refresh',_0x18d500),this['listenTo'](_0x5598de,'blur',(_0x3b8d75,{isAnnotationTracked:_0x4b9a88})=>{this['activeAnnotation']&&_0x4b9a88(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5598de,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xb47144=>{_0x5598de['hasDomSelection']()&&(_0x18d500(),_0xb47144['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5598de);}['_destroyEditorAnnotationsIntegration'](_0x330b87){this['stopListening'](_0x330b87),this['_editorAnnotations']['remove'](_0x330b87);}}class C extends _0x2e2946{['counterView'];constructor(_0x47ee06){super(_0x47ee06);const _0x1e26e5=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x440485,_0x1d117f)=>_0x440485?'...':_0x1d117f['toString']()),this['set']('annotationType',''),this['icon']=_0x38a6cc,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1e26e5['to']('annotationType',_0x87b52f=>'ck-annotation-counter__badge--'+_0x87b52f),_0x1e26e5['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1e26e5['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1511aa{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5129bd){super(_0x5129bd),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x400570())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1ce026(),this['_refreshPositioningDebounced']=_0x192048(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x41fe53(this['context']['locale']),this['balloonPanelView']=new _0x29a8fe(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5f4779){this['annotations']=_0x5f4779;const _0x79a9b1=this['context']['plugins']['get'](z),_0x4e006a=this['balloonPanelView'];if(_0x79a9b1['_annotations']=_0x5f4779,this['isAttached'])throw new _0x4c975e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x79a9b1,'set:container',()=>{this['detach'](),this['listenTo'](_0x79a9b1,'change:container',_0x3d4019=>{_0x3d4019['off'](),this['attach'](_0x5f4779);});}),_0x79a9b1['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2562ba=_0x5b7537=>{const _0x440e49=new C(this['context']['locale']);_0x79a9b1['addAnnotation'](_0x5b7537,_0x440e49),this['_annotationToNarrowView']['set'](_0x5b7537,_0x440e49),_0x440e49['bind']('isDirty','annotationType','number')['to'](_0x5b7537['view'],'isDirty','type','length'),_0x440e49['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4e006a['content']['first']!==_0x5b7537['view']?(this['_showBalloon'](_0x5b7537),_0x5b7537['view']['element']['focus'](),this['setActiveAnnotation'](_0x5b7537)):this['setActiveAnnotation'](null);});};for(const _0x460ce1 of _0x5f4779)_0x2562ba(_0x460ce1);this['listenTo'](_0x5f4779,'add',(_0x3a2428,_0x50dfcf)=>{_0x2562ba(_0x50dfcf);}),this['listenTo'](_0x5f4779,'remove',(_0x591f96,_0x83887b,_0x3088ba)=>{this['_annotationToNarrowView']['get'](_0x83887b)['destroy'](),this['_annotationToNarrowView']['delete'](_0x83887b),_0x79a9b1['rearrange']({'removedAnnotation':_0x83887b,'previousAnnotation':_0x5f4779['get'](_0x3088ba-0x1),'nextAnnotation':_0x5f4779['get'](_0x3088ba+0x1)}),_0x83887b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5f4779,'focus',(_0x314f31,_0x3a2ae5)=>{this['setActiveAnnotation'](_0x3a2ae5);}),this['listenTo'](_0x5f4779,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xf18420,_0x1da51e)=>{_0x1da51e['keyCode']===_0x586f43['esc']&&_0x4e006a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4e006a['content']['first']),this['_hideBalloon'](),_0x1da51e['stopPropagation'](),_0x1da51e['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x47bc39,_0x6b9093)=>{const _0x484960=_0x6b9093['target'];_0x4e006a['isVisible']&&_0x4e006a['element']['contains'](_0x484960)||_0x79a9b1['view']['element']['contains'](_0x484960)||_0x47bc39['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x499191=>_0x499191['contains'](_0x484960))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x48b1f9=this['context']instanceof _0x1f800c?this['context']['editors']:new _0x1ce026([this['context']]);for(const _0x432e6b of _0x48b1f9)this['_integrateWithEditorAnnotations'](_0x432e6b);this['listenTo'](_0x48b1f9,'add',(_0x14cefa,_0x264f4a)=>{this['listenTo'](_0x264f4a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x264f4a);});}),this['listenTo'](_0x48b1f9,'remove',(_0x42645a,_0x515016)=>{_0x515016['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x515016['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x21a8c7){if(_0x21a8c7===this['activeAnnotation'])return;const _0x15a092=this['context']['plugins']['get'](z);if(_0x15a092['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x21a8c7,'disableAnimationOnActivatedAnnotation':!0x0}),_0x21a8c7)_0x15a092['getSidebarItemView'](_0x21a8c7)?this['_showBalloon'](_0x21a8c7):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x21a8c7;}['detach'](){if(!this['isAttached'])throw new _0x4c975e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3c290f=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x572da1=>_0x572da1['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3c290f['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1f800c&&this['stopListening'](this['context']['editors']);for(const _0x1e6ce9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1e6ce9);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'](_0x4f1440){if(!_0x4f1440['plugins']['has']('EditorAnnotations'))return;const _0x55142d=_0x4f1440['plugins']['get']('EditorAnnotations'),_0x423d25=this['context']['plugins']['get'](z),_0x5198f7=this['annotations'],_0x557846=this['balloonPanelView'],_0x1da922=()=>{const _0x365739=_0x55142d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x365739),this['setActiveAnnotation'](_0x365739[0x0]||null);};this['listenTo'](_0x55142d,'refresh',_0x1da922),this['listenTo'](_0x55142d,'blur',(_0x345aa7,{isAnnotationTracked:_0x3c22fc})=>{this['activeAnnotation']&&_0x3c22fc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x55142d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x5198f7,'blur',_0x96194=>{_0x55142d['hasDomSelection']()&&_0x96194['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1fd27d,_0x5b4c60)=>{const _0x31f732=_0x5b4c60['target'];_0x557846['isVisible']&&_0x557846['element']['contains'](_0x31f732)||_0x423d25['view']['element']['contains'](_0x31f732)||this['activeAnnotation']&&_0x55142d['hasDomSelection']()&&(_0x1da922(),_0x1fd27d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x55142d);}['_destroyEditorAnnotationsIntegration'](_0x160cc5){_0x160cc5&&(this['stopListening'](_0x160cc5),this['_editorAnnotations']['remove'](_0x160cc5));}['_setSelectedAnnotations'](_0x41b094){for(const _0x320ca7 of this['_selectedAnnotations'])_0x41b094['includes'](_0x320ca7)||this['_manuallyClosedAnnotationViews']['delete'](_0x320ca7['view']);this['_selectedAnnotations']=_0x41b094;}['_refreshPositioning'](){const _0xa02096=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xa02096['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4d9b53){if(this['_manuallyClosedAnnotationViews']['has'](_0x4d9b53['view']))return;const _0xccf44e=this['balloonPanelView']['content']['first'];_0xccf44e!==_0x4d9b53['view']?(_0xccf44e&&this['_detachListeners'](_0xccf44e),this['_attachListeners'](_0x4d9b53['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4d9b53['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4eb110=this['balloonPanelView']['content']['first'],_0x2f4ca2=_0x4eb110&&this['annotations']['getByView'](_0x4eb110);if(!_0x2f4ca2||!this['_annotationToNarrowView']['has'](_0x2f4ca2))return;const _0x59a355=this['_annotationToNarrowView']['get'](_0x2f4ca2)['element'],_0x3c4bb3=(function(){const _0x392711=_0x29a8fe['defaultPositions'];return[_0x392711['southArrowNorthEast'],_0x392711['northArrowSouthEast'],_0x392711['southArrowNorth'],_0x392711['northArrowSouth'],_0x392711['southArrowNorthWest'],_0x392711['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x59a355,'positions':_0x3c4bb3});}['_hideBalloon'](){const _0x16c5f0=this['balloonPanelView'],_0x1fd4dc=_0x16c5f0['content']['first'];_0x1fd4dc&&(this['_detachListeners'](_0x1fd4dc),_0x16c5f0['unpin'](),_0x16c5f0['content']['clear']());}['_attachListeners'](_0x252ad7){this['listenTo'](_0x252ad7,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x252ad7,'Esc',(_0x51000c,_0x1b54c6)=>{this['_manuallyClosedAnnotationViews']['add'](_0x252ad7),this['_hideBalloon'](),_0x1b54c6();});}['_detachListeners'](_0x543b17){this['stopListening'](_0x543b17);}}class c extends _0x562ab1{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x3dbc3d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x250c58){super(_0x250c58),_0x250c58['editing']['view']['addObserver'](_0x4c6600),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x250c58['plugins']['get'](_0x3dbc3d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x192048(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x58d500=this['editor']['plugins']['get'](j);_0x58d500['context']===this['editor']&&(_0x58d500['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4601ba,_0x47aa69)=>{const _0x478bd3=this['_balloon'];if(this['isAttached']&&_0x478bd3['visibleView']){const _0x59a112=this['annotations']['getByView'](_0x478bd3['visibleView']);_0x59a112&&this['_closeAnnotation'](_0x59a112),_0x47aa69();}}));}['afterInit'](){const _0x3e0c30=this['editor']['plugins']['get'](j);_0x3e0c30['context']===this['editor']&&(_0x3e0c30['hasActive']()||_0x3e0c30['switchTo']('inline'));}['setActiveAnnotation'](_0x2d789d){_0x2d789d!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2d789d&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2d789d)&&this['_addAnnotationToBalloon'](_0x2d789d,!0x0),_0x2d789d['isActive']=!0x0),_0x2d789d||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2d789d);}['attach'](_0x7e8280){this['annotations']=_0x7e8280;const _0x3fa3f7=this['editor']['plugins']['get'](j),_0x5bf4e6=this['_balloon'];if(this['isAttached'])throw new _0x4c975e('inlineannotations-attach-already-attached',this);if(_0x3fa3f7['context']!==this['editor'])throw new _0x4c975e('inlineannotations-not-allowed-with-context',this);const _0x20ac1c=this['editor']['plugins']['get'](b);this['listenTo'](_0x20ac1c,'refresh',()=>{const _0x72084b=_0x20ac1c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x636a2,_0x1b5fb6;!this['_forceRefresh']&&(_0x636a2=_0x72084b,_0x1b5fb6=this['_selectedAnnotations'],_0x636a2['length']===_0x1b5fb6['length']&&_0x636a2['every'](_0x4440df=>_0x1b5fb6['includes'](_0x4440df)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x72084b),this['setActiveAnnotation'](_0x72084b[0x0]||null));}),this['listenTo'](_0x20ac1c,'blur',(_0x360f84,{isAnnotationTracked:_0x265078})=>{this['activeAnnotation']&&_0x265078(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x20ac1c,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5ae18f,_0x15ea90,_0x18299)=>{_0x18299||this['setActiveAnnotation'](null);}),this['listenTo'](_0x7e8280,'remove',(_0x77bb4e,_0x5b8b78)=>{this['_removeAnnotationFromBalloon'](_0x5b8b78),_0x5b8b78===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5bf4e6,'change:visibleView',(_0x514863,_0x1cf919,_0x296dde,_0x500b17)=>{_0x500b17&&this['stopListening'](_0x500b17);const _0xa7767b=_0x7e8280['getByView'](_0x296dde);_0x296dde&&_0xa7767b&&(this['listenTo'](_0x296dde,'change:height',()=>{_0x5bf4e6['updatePosition']();}),this['listenTo'](_0x296dde,'Esc',()=>{this['_closeAnnotation'](_0xa7767b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xa7767b&&this['setActiveAnnotation'](_0xa7767b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5bf4e6['visibleView']&&(_0x7e8280['getByView'](_0x5bf4e6['visibleView'])&&_0x5bf4e6['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 _0x4c975e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1135f9 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1135f9);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x49963a){for(const _0x57f9dc of this['_selectedAnnotations'])_0x49963a['includes'](_0x57f9dc)||this['_manuallyClosed']['delete'](_0x57f9dc);for(const _0x485509 of this['annotations'])_0x49963a['includes'](_0x485509)||this['_removeAnnotationFromBalloon'](_0x485509);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x214bdc of _0x49963a)this['_addAnnotationToBalloon'](_0x214bdc);}this['_selectedAnnotations']=_0x49963a;}['_addAnnotationToBalloon'](_0xd274d6,_0x8047e9=!0x1){this['_manuallyClosed']['has'](_0xd274d6)||(this['_addedAnnotations']['has'](_0xd274d6)||this['_balloon']['hasView'](_0xd274d6['view'])||(this['_addedAnnotations']['add'](_0xd274d6),this['_balloon']['add']({'stackId':_0xd274d6['view']['id'],'view':_0xd274d6['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xd274d6)}})),_0x8047e9&&this['_balloon']['showStack'](_0xd274d6['view']['id']));}['_getBalloonTargetForAnnotation'](_0x44cc15){const _0x2cbfef=_0x44cc15['target'],_0x2b49dc=this['editor']['editing']['view'],_0x5249fd=_0x2b49dc['document']['selection']['getFirstRange'](),_0x58af3a=_0x2b49dc['domConverter']['viewRangeToDom'](_0x5249fd);if(_0x58af3a['collapse'](!0x0),_0x2cbfef){if(_0x2cbfef instanceof _0x28ea8f)return _0x2cbfef;let _0x56aae5=[];for(const _0xfd4f39 of _0x2cbfef)_0x56aae5['push'](...F(_0xfd4f39['getClientRects']()));_0x56aae5=function(_0x187acb){const _0x1130aa=[];let _0xc2d210=_0x187acb[0x0];for(let _0x44fdca=0x1;_0x44fdca<_0x187acb['length'];_0x44fdca++)P(_0xc2d210,_0x187acb[_0x44fdca])?_0xc2d210['width']+=_0x187acb[_0x44fdca]['width']:(_0x1130aa['push'](_0xc2d210),_0xc2d210=_0x187acb[_0x44fdca]);return _0x1130aa['push'](_0xc2d210),_0x1130aa;}(_0x56aae5);const _0x109a35=_0x58af3a['getBoundingClientRect']();return _0x56aae5['find'](_0x33512c=>_0x33512c['top']<=_0x109a35['top']&&_0x33512c['bottom']>=_0x109a35['bottom']&&_0x33512c['left']<=_0x109a35['left']&&_0x33512c['right']>=_0x109a35['right'])||_0x56aae5[0x0];}return _0x44cc15['targetRect']||_0x58af3a;}['_removeAnnotationFromBalloon'](_0x443f47){this['_addedAnnotations']['has'](_0x443f47)&&this['_balloon']['hasView'](_0x443f47['view'])&&(this['_addedAnnotations']['delete'](_0x443f47),this['_balloon']['remove'](_0x443f47['view']));}['_closeAnnotation'](_0x393872){this['_manuallyClosed']['add'](_0x393872),this['_removeAnnotationFromBalloon'](_0x393872);}}function F(_0x51165f){return Array['from'](_0x51165f)['map'](DOMRect['fromRect']);}function P(_0x364285,_0x46f3ef){return _0x364285['top']===_0x46f3ef['top']&&_0x364285['bottom']===_0x46f3ef['bottom']&&_0x364285['right']===_0x46f3ef['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x160ac4,_0x301609){super(_0x160ac4),this['set']('isEmpty',!_0x301609['length']),this['focusTracker']=new _0x3fbfe5(),this['_annotationViews']=_0x301609,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x39bd35({'focusables':_0x301609,'focusTracker':this['focusTracker']}),this['listenTo'](_0x301609,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x301609,'remove',(_0x2c8aa7,_0x186c7c)=>{_0x186c7c['isActive']&&this['focus'](),_0x301609['length']||(this['isEmpty']=!0x0);});const _0x4ee43c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x160ac4,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x301609},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4ee43c['if']('isEmpty','ck-hidden',_0x3c1cf0=>!_0x3c1cf0)]},'children':[{'text':N(_0x160ac4,'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 _0x348cc0 of this['_annotationViews'])this['focusTracker']['add'](_0x348cc0['element']);this['_annotationViews']['on']('change',(_0x35fc15,{added:_0x381dab,removed:_0x54803b})=>{for(const _0x563c26 of _0x381dab)this['focusTracker']['add'](_0x563c26['element']);for(const _0xca39c0 of _0x54803b)this['focusTracker']['remove'](_0xca39c0['element']);});}}class p extends _0x1511aa{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x459550){super(_0x459550),this['archivedThreads']=new _0x1ce026();}['init'](){const _0x5c7bae=this['context'],_0x2d8996=_0x5c7bae['plugins']['get'](o),_0x56dfa7=_0x5c7bae['plugins']['get'](y);this['listenTo'](_0x2d8996,'addCommentThread',(_0x535df7,{threadId:_0x2c1cfc})=>{const _0x3eb57f=_0x2d8996['getCommentThread'](_0x2c1cfc);_0x3eb57f['archivedAt']&&this['archivedThreads']['add'](_0x3eb57f,this['_calculatePosition'](_0x3eb57f['archivedAt'])),this['listenTo'](_0x3eb57f,'change:archivedAt',(_0x3e4fba,_0x3249eb,_0x1f4a21)=>{_0x1f4a21?this['archivedThreads']['has'](_0x3eb57f)||this['archivedThreads']['add'](_0x3eb57f,this['_calculatePosition'](_0x3eb57f['archivedAt'])):this['archivedThreads']['has'](_0x3eb57f)&&this['archivedThreads']['remove'](_0x3eb57f);});}),this['listenTo'](_0x2d8996,'removeCommentThread',(_0x551dfc,{threadId:_0x2e3efd})=>{const _0x1c5be2=_0x2d8996['getCommentThread'](_0x2e3efd);this['stopListening'](_0x1c5be2),this['archivedThreads']['has'](_0x1c5be2)&&this['archivedThreads']['remove'](_0x1c5be2);},{'priority':'highest'}),this['listenTo'](_0x56dfa7['collection'],'focus',(_0x210c22,_0x2b02c8)=>{_0x2b02c8['isVisible']||(_0x2b02c8['isActive']=!0x0,_0x56dfa7['activate'](_0x2b02c8));});}['_calculatePosition'](_0x51feb7){const _0x3c1898=[...this['archivedThreads']]['findIndex'](_0x6d230d=>_0x6d230d['archivedAt']<_0x51feb7);return _0x3c1898>-0x1?_0x3c1898:this['archivedThreads']['length'];}}class a extends _0x562ab1{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3ab7ac];}constructor(_0x4ad530){super(_0x4ad530),this['annotationViews']=new _0x24b505(),this['_pendingThreads']=[];}['init'](){const _0x29fa78=this['editor'],_0x1b1f35=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x29fa78['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2e2946,!0x0)),_0x29fa78['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1b7b7c=this['_createCommentsArchiveButton'](_0x1b61d8);return _0x1b7b7c['set']({'role':'menuitemcheckbox'}),_0x1b7b7c;});const _0xf35ca0=_0x29fa78['plugins']['get'](p),_0x1a7a9d=_0x29fa78['plugins']['get']('Annotations'),_0x31e35f=_0x29fa78['plugins']['get']('CommentsRepository');_0xf35ca0['archivedThreads']['forEach'](_0xfb4e04=>{this['_handleNewThread'](_0xfb4e04);}),this['listenTo'](_0xf35ca0['archivedThreads'],'add',(_0x26d9e2,_0x5b1b38)=>{this['_handleNewThread'](_0x5b1b38);}),this['listenTo'](_0x1a7a9d['collection'],'add',(_0x3da3c4,_0x4670d5)=>{const _0x1bbd43=this['_pendingThreads']['find'](_0x3c94cd=>{const _0x894b6=_0x31e35f['_threadToController']['get'](_0x3c94cd);return _0x894b6&&_0x4670d5['innerView']===_0x894b6['view'];});if(_0x1bbd43){const _0x1acef1=this['_calculatePosition'](_0x1bbd43['archivedAt']);this['_addAnnotationToArchive'](_0x4670d5,_0x1acef1),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1bbd43),0x1);}}),this['listenTo'](_0xf35ca0['archivedThreads'],'remove',(_0x574771,_0x2112bd)=>{const _0x32a9a=_0x29fa78['config']['get']('collaboration.channelId');if(!_0x32a9a||_0x2112bd['channelId']===_0x32a9a){if(this['_pendingThreads']['includes'](_0x2112bd))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2112bd),0x1);else{const _0x111a11=_0x31e35f['_threadToController']['get'](_0x2112bd),_0xe54c86=_0x1a7a9d['getByInnerView'](_0x111a11['view']);this['annotationViews']['remove'](_0xe54c86['view']),this['stopListening'](_0xe54c86),this['stopListening'](_0xe54c86['focusableElements']);}}}),this['listenTo'](_0x1a7a9d['collection'],'add',(_0x4b3a12,_0x48d44f)=>{this['listenTo'](_0x48d44f,'escape',_0x1b1f35);}),this['listenTo'](_0x1a7a9d['collection'],'remove',(_0x2dcb87,_0x461ccc)=>{this['stopListening'](_0x461ccc,'escape',_0x1b1f35);});}['_addAnnotationToArchive'](_0x2e86e6,_0x301db8){this['listenTo'](_0x2e86e6,'set:isVisible',_0x3465ee=>{_0x3465ee['return']=!0x1,_0x3465ee['stop']();}),this['annotationViews']['add'](_0x2e86e6['view'],_0x301db8);}['_handleNewThread'](_0x3e9bd2){const _0x35bd3a=this['editor']['plugins']['get']('CommentsRepository'),_0x1a4252=this['editor']['plugins']['get']('Annotations'),_0x345a0f=this['editor']['config']['get']('collaboration.channelId');if(!_0x345a0f||_0x3e9bd2['channelId']===_0x345a0f){const _0x198c6e=_0x35bd3a['_threadToController']['get'](_0x3e9bd2);if(!_0x198c6e)return void this['_pendingThreads']['push'](_0x3e9bd2);const _0xae5d05=this['_calculatePosition'](_0x3e9bd2['archivedAt']),_0x4c7c8d=_0x1a4252['getByInnerView'](_0x198c6e['view']);_0x4c7c8d['isVisible']&&_0x1a4252['_visibleAnnotations']['remove'](_0x4c7c8d),this['_addAnnotationToArchive'](_0x4c7c8d,_0xae5d05);}}['_calculatePosition'](_0x508cda){const _0x28bab8=this['editor']['config']['get']('collaboration.channelId'),_0x4b8646=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x520107=>_0x520107['channelId']===_0x28bab8)['findIndex'](_0x3b52be=>_0x3b52be['archivedAt']<_0x508cda);return _0x4b8646<0x0||_0x4b8646>this['annotationViews']['length']?this['annotationViews']['length']:_0x4b8646-0x1;}['_toggleDialog'](){const _0x2fd813=this['editor'],_0xe85600=_0x2fd813['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x2fd813['locale'],this['annotationViews'])),'commentsArchive'===_0xe85600['id']?_0xe85600['hide']():_0xe85600['show']({'id':'commentsArchive','title':N(_0x2fd813['locale'],'COMMENTS_ARCHIVE'),'icon':_0x49e813,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x388cbc['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x11dc38,_0x40fc1a=!0x1){const _0x547546=this['editor']['locale'],_0xed5a91=this['editor']['plugins']['get']('Dialog'),_0x2603f9=new _0x11dc38(_0x547546);return _0x2603f9['bind']('isEnabled')['to'](this,'isEnabled'),_0x2603f9['bind']('isOn')['to'](_0xed5a91,'id',_0x4ef39d=>'commentsArchive'===_0x4ef39d),_0x2603f9['set']({'label':N(_0x547546,'COMMENTS_ARCHIVE'),'icon':_0x49e813,'isToggleable':!0x0}),_0x40fc1a&&(_0x2603f9['tooltip']=!0x0),this['listenTo'](_0x2603f9,'execute',()=>this['_toggleDialog']()),_0x2603f9;}['_hideDialogOnAnnotationEscape']=_0x445a3e=>{const _0x34b7b1=_0x445a3e['source'];if(!this['annotationViews']['has'](_0x34b7b1['view']))return;const _0x29b70c=this['editor']['plugins']['get']('Dialog');_0x29b70c['isOpen']&&'commentsArchive'===_0x29b70c['id']&&(_0x29b70c['hide'](),_0x445a3e['stop']());};}class gi extends _0x562ab1{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};