@ckeditor/ckeditor5-comments 47.6.0-alpha.2 → 47.6.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 _0x22aa3e,ContextPlugin as _0x5bb154,PendingActions as lt,Command as _0x37788d,Plugin as _0x4d61fb,Context as _0x11113e}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0xe27a3f,uid as _0x5920b0,KeystrokeHandler as jt,FocusTracker as _0x151ecd,diff as _0x1c7c0c,Collection as _0x4b4c8c,Rect as _0x318b84,CKEditorError as _0x2df15f,first as _0x50c98e,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x48ff8e,keyCodes as _0x4f6592}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x49f966,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1a271c,trimHtml as ts,LateFocusDropdownButtonView as _0x4b288f,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x1e512c}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x1734fd}from'es-toolkit/compat';import{IconUndo as _0x217818,IconCheck as _0x4346b3,IconPencil as _0x4bdc0a,IconRemoveComment as _0x405af1,IconThreeVerticalDots as _0x3be590,IconAddComment as _0x5ba027,IconCommentsArchive as _0x51a018}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x4e2b55,ButtonView as _0xabb329,ViewCollection as _0xb0c59c,createDropdown as _0x3e1b91,ListView as _0x2106f2,focusChildOnDropdownOpen as _0x47d6ad,ListItemView as _0x5c7563,MenuBarMenuListItemButtonView as _0x2c6989,BodyCollection as _0x50ea24,BalloonPanelView as _0x2d08b9,ContextualBalloon as _0x5b4ed0,Dialog as _0x5a4ac0,DialogViewPosition as _0x39f908}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x431698}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 _0x267ea4}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x41480f}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0xe27a3f(){['model'];['view'];constructor(_0x3db603,_0x10a033){super(),this['model']=_0x3db603,this['model']['_isAttached']=!0x0,this['view']=_0x10a033,this['listenTo'](_0x10a033,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x10a033,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x10a033,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x10a033,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x10a033,'addComment',(_0x1f0118,_0x116a64)=>this['addComment'](_0x116a64)),this['listenTo'](_0x10a033,'updateComment',(_0x3956dc,_0x4d148e,_0x2cff1)=>this['updateComment'](_0x4d148e,_0x2cff1)),this['listenTo'](_0x10a033,'removeComment',(_0x7518ac,_0xb7db3)=>this['removeComment'](_0xb7db3));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x331e5d){this['model']['addComment']({'content':_0x331e5d,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x18bb53,_0x417fd1){this['model']['getComment'](_0x18bb53)['update']({'content':_0x417fd1});}['removeComment'](_0x3438c3){this['model']['getComment'](_0x3438c3)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x3c4fbb,_0x5199f9,_0x466729){const t=_0x3c4fbb['t'];switch(_0x5199f9){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'},_0x466729);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'},_0x466729);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'},_0x466729);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'},_0x466729);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x466729);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'},_0x466729);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'},_0x466729);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'},_0x466729);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(_0x3224a9,_0x10c1e7){super(_0x3224a9);const _0x3d8f98=_0x5920b0();this['main']=this['createCollection'](),this['editable']=new Vt(_0x3224a9,_0x10c1e7,void 0x0,{'label':()=>N(_0x3224a9,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3224a9['uiLanguageDirection'],'lang':_0x3224a9['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x3d8f98},'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(_0x55ad78){super(_0x55ad78),this['view']=new Rt(_0x55ad78['locale'],_0x55ad78['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2ac8c2=this['editor']['editing']['view'],_0xa7ffe5=this['view']['editable'],_0x5dda8c=_0x2ac8c2['document']['getRoot']();_0xa7ffe5['name']=_0x5dda8c['rootName'],this['view']['render']();const _0x27b0c0=_0xa7ffe5['element'];this['setEditableElement'](_0xa7ffe5['name'],_0x27b0c0),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2ac8c2['attachDomRoot'](_0x27b0c0),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
- _0xe27a3f(_0x22aa3e){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x4d883d={}){function _0x4dbb8f(_0x5df770){return _0x5df770['map'](_0x45c7d6=>String['fromCharCode'](_0x45c7d6))['join']('');}(_0x4d883d=Object['assign']({},_0x4d883d))['plugins']||(_0x4d883d['plugins']=hs['defaultPlugins']),super(_0x4d883d),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[_0x4dbb8f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4dbb8f([0x76,0x69,0x65,0x77])][_0x4dbb8f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4dbb8f([0x61,0x75,0x74,0x6f]),this[_0x4dbb8f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4dbb8f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4dbb8f([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4dbb8f([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4dbb8f([0x6f,0x6b])});}['create'](){const _0xbc472d=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xbc472d))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x51c3a1=>{const _0xd97cf0=this['model']['document']['getRoot'](),_0x2d11cc=_0xd97cf0&&_0xd97cf0['getChild'](_0xd97cf0['childCount']-0x1);_0x51c3a1['setSelection'](_0x2d11cc,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1b5959=this['editing']['view'],_0x37c700=_0x1b5959['document']['getRoot'](),_0x5715bf=_0x37c700['getChild'](0x0);_0x37c700['childCount']>0x1||!_0x5715bf||'p'!=_0x5715bf['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x1b5959,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5715bf['placeholder']=this['placeholder']),Ft({'view':_0x1b5959,'element':_0x5715bf,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5715bf);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3d5767,_0x3c036a={}){super(_0x3d5767),this['editor']=null,this['_editorConfig']=_0x3c036a,this['set']('value',_0x3c036a['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3d5767,'Reply...')),this['set']('submitLabel',N(_0x3d5767,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x151ecd(),this['focusCycler']=new _0x4e2b55({'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',(_0x23b80f,_0x1b1d91)=>{this['cancelButtonView']['fire']('execute'),_0x1b1d91();}),this['keystrokes']['set']('Ctrl+Enter',(_0x1faa51,_0x314649)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x314649());}),this['on']('submit',(_0x15b6e3,_0x4a0272)=>{_0x4a0272['length']>0xfde8?(alert(N(_0x3d5767,'TOO_LONG_COMMENT_ALERT',[_0x4a0272['length'],0xfde8])),_0x15b6e3['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 _0x76e994=this['editor'];this['element']['insertBefore'](_0x76e994['ui']['element'],this['element']['firstChild']),_0x76e994['model']['document']['on']('change',()=>this['value']=_0x76e994['getData']()),_0x76e994['bind']('placeholder')['to'](this),this['focusables']['add'](_0x76e994['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5bfd7c){-0x1===_0x5bfd7c?(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:_0x39a547}=this,_0x1c9c15=new _0xabb329(_0x39a547);return _0x1c9c15['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1c9c15['withText']=!0x0,_0x1c9c15['bind']('label')['to'](this,'submitLabel'),_0x1c9c15['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1c9c15['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x38bb3f,_0x3d8884)=>!_0x3d8884&&!!_0x38bb3f['trim']()),_0x1c9c15;}['_createCancelButton'](){const {locale:_0x1f14b4}=this,_0x40a54f=new _0xabb329(_0x1f14b4);return _0x40a54f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x40a54f['label']=N(_0x1f14b4,'Cancel'),_0x40a54f['withText']=!0x0,_0x40a54f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x40a54f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x592e22=>{this['focusTracker']['add'](_0x592e22['element']);}),this['focusables']['on']('change',(_0x2ccbb7,_0xe7696)=>{for(const _0x297e82 of Array['from'](_0xe7696['added'])['reverse']())this['focusTracker']['add'](_0x297e82['element']);});}}class ie extends kt{constructor(_0x4bb21f,_0x1c870d,_0x39bb80){super(_0x4bb21f),this['commentInputView']=new es(_0x4bb21f,_0x39bb80),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x127d81,_0x19513e)=>_0x127d81||!!_0x19513e),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 _0x49f966(_0x4bb21f,_0x1c870d),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'](_0x3df23e){this['commentInputView']['focus'](_0x3df23e);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5277d5,_0x55c8e)=>{const {submitButtonView:_0x4d1cfa,cancelButtonView:_0x792c54,editor:_0x22b0b3}=this['commentInputView'];[_0x4d1cfa['element'],_0x792c54['element'],_0x22b0b3?_0x22b0b3['editing']['view']['getDomRoot']():null]['filter'](_0x4d281d=>_0x4d281d)['some'](_0x115ee3=>_0x115ee3['contains'](_0x55c8e['target']))||(this['focus'](),_0x55c8e['preventDefault']());});}}class rs extends kt{constructor(_0x3fb945){super(_0x3fb945);const _0x19f7e9=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x19f7e9['to']('count',_0x556cce=>N(_0x3fb945,'NUMBER_OF_COMMENTS',_0x556cce))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1bc7f7,_0x7b3095,_0x14fae4){super(_0x1bc7f7);const _0x58e195=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x7b3095['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x7b3095,this['_config']=_0x14fae4,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x151ecd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4e2b55({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3b1690=>this['commentViews']['map'](_0x5e088e=>_0x5e088e['element'])['includes'](_0x3b1690['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x1bc7f7),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2c7c03=>_0x2c7c03-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5f007d of _0x7b3095['comments'])this['_handleNewCommentModel'](_0x5f007d);this['_handleInfoComment'](),this['listenTo'](_0x7b3095['comments'],'add',(_0x53801b,_0x513bab)=>{const _0x2c6fa4=this['_calculatePosition'](_0x513bab);this['length']++,this['_handleNewCommentModel'](_0x513bab,_0x2c6fa4),this['refreshVisibleViews']();}),this['listenTo'](_0x7b3095['comments'],'remove',(_0x2ce1a8,_0x301fe4)=>{this['length']--,this['_handleRemoveCommentModel'](_0x301fe4),this['refreshVisibleViews']();}),this['listenTo'](_0x7b3095,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x7b3095,'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',_0x58e195['if']('length','ck-hidden',_0x2781fd=>!_0x2781fd)],'aria-label':N(_0x1bc7f7,'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'](_0x11304a){-0x1===_0x11304a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x509bf7 of this['commentViews'])_0x509bf7['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x552702,_0x1eab9c){const _0x292d45=new this['_config']['CommentView'](this['locale'],_0x552702,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x292d45['viewUid']=_0x552702['id'],_0x292d45['delegate']('removeComment')['to'](this),_0x292d45['delegate']('updateComment')['to'](this),_0x292d45['delegate']('resolveCommentThread')['to'](this),_0x292d45['delegate']('editorReady')['to'](this),_0x292d45['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x292d45,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x292d45,_0x1eab9c);}['_calculatePosition'](_0x7f6f76){const _0x3060cf=this['_model']['_findOptimalIndex'](_0x7f6f76);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x7f6f76['authoredAt']?_0x3060cf-0x1:_0x3060cf:_0x3060cf-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3e52ec={'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'],_0x3e52ec,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3e52ec));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1f739c){const _0x59ce1a=this['commentViews']['remove'](_0x1f739c['id']);this['stopListening'](_0x59ce1a),_0x59ce1a['isEditMode']&&this['_updateHasDirtyComment'](),_0x59ce1a['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x28ea06=>_0x28ea06['isEditMode']);}['_rearrangeCollapse'](){const _0x1343ed=function(_0x23acbc){const _0x4a7077=new _0x4b4c8c();for(const _0x237aea of _0x23acbc)_0x4a7077['add'](_0x237aea);return _0x4a7077;}(this['commentViews']),_0x20589c=this['_collapsedCommentsView']['count'];for(let _0x4c05ad=0x1;_0x4c05ad<=_0x20589c;_0x4c05ad++)_0x1343ed['remove'](0x1);for(const _0x15c651 of _0x1343ed)_0x15c651['collapse']();_0x20589c>0x0&&_0x1343ed['add'](this['_collapsedCommentsView'],0x1),ns(_0x1c7c0c(Array['from'](this['visibleViews']),Array['from'](_0x1343ed)),this['visibleViews'],_0x1343ed);}['_rearrangeExpand'](){ns(_0x1c7c0c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x514795 of this['visibleViews'])_0x514795['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x119dcd=>{this['focusTracker']['add'](_0x119dcd['element']),this['keystrokes']['listenTo'](_0x119dcd['element']);}),this['commentViews']['on']('change',(_0x33c0bc,_0x4e6532)=>{for(const _0x419a16 of _0x4e6532['removed'])this['focusTracker']['remove'](_0x419a16['element']),this['keystrokes']['stopListening'](_0x419a16['element']);for(const _0x2500d7 of Array['from'](_0x4e6532['added'])['reverse']())this['focusTracker']['add'](_0x2500d7['element']),this['keystrokes']['listenTo'](_0x2500d7['element']);});}}function ns(_0x23b6fe,_0x59aff2,_0x13723f){let _0x4a5861=0x0;for(const _0x377e69 of _0x23b6fe)switch(_0x377e69){case'insert':_0x59aff2['add'](_0x13723f['get'](_0x4a5861),_0x4a5861),_0x4a5861++;break;case'delete':_0x59aff2['remove'](_0x4a5861);break;case'equal':_0x4a5861++;}}class oe extends kt{constructor(_0x3c5499){super(_0x3c5499);const _0x4aca33=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4aca33['to']('contextValue',_0x171bba=>N(_0x3c5499,'THREAD_CONTEXT_LABEL',_0x171bba)),'tabindex':-0x1},'children':[{'text':_0x4aca33['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2ca89b,_0x54c094){super(_0x2ca89b);const _0x53e4b4=this['bindTemplate'];this['_model']=_0x54c094,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x151ecd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4e2b55({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5c7c99=>!!_0x5c7c99),this['bind']('contextValue')['to'](this['_model'],'context',_0x158479=>_0x158479&&_0x158479['value']?this['_trimContextValue'](_0x158479['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',_0x53e4b4['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 _0x5e2ad5=new _0xabb329(this['locale']);return _0x5e2ad5['label']=N(this['locale'],'Reopen'),_0x5e2ad5['tooltip']=N(this['locale'],'Reopen'),_0x5e2ad5['icon']=_0x217818,_0x5e2ad5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x92b75f=>!_0x92b75f),_0x5e2ad5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2d750e,_0x410b8c)=>_0x2d750e&&_0x410b8c),_0x5e2ad5['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5e2ad5;}['_trimContextValue'](_0x3d6005){if(_0x3d6005['length']<0x96)return _0x3d6005;const _0x48ee79=_0x3d6005['lastIndexOf']('\x20',0x93);return _0x3d6005['substring'](0x0,_0x48ee79>-0x1?_0x48ee79:0x93)+'...';}['_attachContextActions'](){const _0x5cd65f=this['element']['querySelector']('.ck-context'),_0x4a2987=_0x5cd65f['querySelector']('.ck-context__value');this['listenTo'](_0x5cd65f,'mouseenter',()=>{_0x4a2987['offsetWidth']<_0x4a2987['scrollWidth']&&_0x5cd65f['classList']['add']('overlay');}),this['listenTo'](_0x5cd65f,'mouseleave',()=>{_0x5cd65f['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xd2ce47 of this['focusables'])this['focusTracker']['add'](_0xd2ce47['element']),this['keystrokes']['listenTo'](_0xd2ce47['element']);}['_createContextView'](){const _0x2ddfee=new oe(this['locale']);return _0x2ddfee['bind']('contextValue')['to'](this),_0x2ddfee;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5c2b28,_0x1c49d9,_0x5bc04b,_0x258c4e){super(_0x5c2b28),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1c49d9,this['_localUser']=_0x5bc04b,this['_config']=_0x258c4e,this['commentThreadHeaderView']=new Xt(_0x5c2b28,_0x1c49d9),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5c2b28,N(_0x5c2b28,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5c2b28,_0x1c49d9,Object['assign']({'CommentView':this['_config']['CommentView']},_0x258c4e)),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',(_0x55947d,_0x5baa17)=>_0x55947d||!!_0x5baa17),this['bind']('isUnlinked')['to'](_0x1c49d9,'unlinkedAt',_0x398cd0=>!!_0x398cd0),this['bind']('ariaLabel')['to'](this,'length',_0x2141fa=>{const _0x2cf1e6=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2141fa,_0x2cf1e6]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x151ecd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4e2b55({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x9a236=>_0x9a236['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 _0x1781f1=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2ef0c7=_0x1781f1['commentInputView'];return _0x1781f1['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2ef0c7,'value',(_0x3608c1,_0x224fb5,_0x944a6a,_0xe44725,_0x55fe72)=>!!_0x55fe72||!!_0xe44725&&_0x944a6a&&!_0x224fb5||_0x3608c1&&_0x944a6a&&!_0x224fb5),_0x2ef0c7['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4908cc,_0x300287,_0xfc9199)=>{let _0x4fb520;return _0x4fb520=_0xfc9199&&_0x300287?'Reply\x20to\x20reopen\x20discussion...':_0x4908cc?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x4fb520);}),_0x2ef0c7['bind']('submitLabel')['to'](this,'length',_0x4890d2=>N(this['locale'],_0x4890d2?'Reply':'Comment')),_0x2ef0c7['on']('submit',(_0x1a57b2,_0x179890)=>{this['fire']('addComment',_0x179890),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2ef0c7['on']('cancel',()=>{this['focus']();}),_0x2ef0c7['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2ef0c7['on']('cancel',_0x392a24=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x392a24['stop']());}),this['on']('change:isActive',(_0x27f1e7,_0x497c06,_0x590b6f)=>{_0x590b6f||this['length']||_0x2ef0c7['value']||this['fire']('removeCommentThread');}),_0x1781f1;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x402f09,_0x5c510d,_0x327ea6,_0x4d7afd){super(_0x402f09,_0x5c510d,_0x327ea6,_0x4d7afd),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x402f09,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0xc67d57,_0x8b21b,_0x290e0d)=>{_0x290e0d||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x8b128,_0x123d1c,_0x5e4b53)=>{_0x5e4b53&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x29081a=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x29081a['if']('isActive','ck-thread--active'),_0x29081a['if']('isUnlinked','ck-thread--unlinked'),_0x29081a['to']('actionIndicator',_0x3a9416=>_0x3a9416?'ck-thread--'+_0x3a9416:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x29081a['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 _0xb7cc8a of this['commentsListView']['commentViews'])_0xb7cc8a['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x4bbf1b}=this,_0x3fbafa=this['commentsListView']['commentViews']['get'](0x0);_0x3fbafa===this['_boundFirstCommentView']||_0x3fbafa['isSystemComment']||(this['_boundFirstCommentView']=_0x3fbafa,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3fbafa,'actionIndicator',_0x2167a0=>'remove'===_0x2167a0?'remove':null),_0x3fbafa['placeholder']=N(_0x4bbf1b,'Write\x20a\x20comment...'),_0x3fbafa['removeButton']['on']('execute',_0x5e6e6a=>{_0x5e6e6a['stop'](),this['showConfirm'](N(_0x4bbf1b,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3fbafa['focus']();}),_0x3fbafa['actionBar']['add'](this['resolveButton'],0x0),_0x3fbafa['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x31842e=new _0x1a271c(this['locale']);return _0x31842e['label']=N(this['locale'],'Resolve'),_0x31842e['tooltip']=N(this['locale'],'Resolve'),_0x31842e['icon']=_0x4346b3,_0x31842e['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x31842e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3ef18b=>!_0x3ef18b),_0x31842e['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x371f2f,_0x51ffb1)=>_0x371f2f&&!_0x51ffb1),_0x31842e['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x31842e;}['_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(_0xbf44f4){super(_0xbf44f4),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x3a64e7,_0x443824,_0x52a734)=>{this['element']['innerHTML']=_0x52a734;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x3b63af,_0x1c0a2f,_0x5e41c6){super(_0x3b63af),this['_model']=_0x1c0a2f,this['_config']=_0x5e41c6,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1c0a2f,'content',_0x1c0a2f,'authoredAt',(_0x564e61,_0x16d991)=>N(_0x3b63af,'COMMENT_ARIA_LABEL',[_0x1c0a2f['author']['name'],_0x5e41c6['formatDateTime'](_0x16d991),new DOMParser()['parseFromString'](_0x564e61,'text/html')['body']['textContent'],_0x1c0a2f['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x3b63af,N(_0x3b63af,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xb0c59c(),this['focusTracker']=new _0x151ecd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4e2b55({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x211f62=>_0x211f62['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 _0x315fa4=new is(this['locale']);return _0x315fa4['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x6959dd,_0x50b85f)=>_0x50b85f?ts(_0x6959dd,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x6959dd),_0x315fa4;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5b4665=new es(this['locale'],this['_config']['editorConfig']);return _0x5b4665['value']=this['_model']['content'],_0x5b4665['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5b4665['submitLabel']=N(this['locale'],'Save'),_0x5b4665['on']('submit',(_0x11336e,_0x54ce88)=>{this['fire']('updateComment',this['_model']['id'],_0x54ce88),this['switchToDisplayMode'](),this['focus']();}),_0x5b4665['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5b4665['once']('editorReady',()=>{_0x5b4665['focus']();}),_0x5b4665['createEditor'](),_0x5b4665['delegate']('editorReady')['to'](this),_0x5b4665['delegate']('editorDestroyed')['to'](this),_0x5b4665;}['_setupKeyboardNavigation'](){const _0x39e51c=this['element'];this['keystrokes']['listenTo'](_0x39e51c);for(const _0x4058ed of this['focusables'])this['focusTracker']['add'](_0x4058ed['element']),this['keystrokes']['listenTo'](_0x4058ed['element']);this['focusables']['on']('change',(_0x416d92,_0x220375)=>{for(const _0x3381d4 of _0x220375['removed'])this['focusTracker']['remove'](_0x3381d4['element']),this['keystrokes']['stopListening'](_0x3381d4['element']);for(const _0x2f7675 of _0x220375['added'])this['focusTracker']['add'](_0x2f7675['element']),this['keystrokes']['listenTo'](_0x2f7675['element']);}),this['keystrokes']['set']('enter',(_0xbd617b,_0x18cc3a)=>{_0x39e51c===_0xbd617b['target']&&(this['focusCycler']['focusFirst'](),_0x18cc3a());}),this['keystrokes']['set']('esc',(_0x4a5a02,_0x54cbed)=>{_0x39e51c!==_0x4a5a02['target']&&(this['focus'](),_0x54cbed());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0x138fc8,_0x4752f2,_0x1b8c57){super(_0x138fc8,_0x4752f2,_0x1b8c57),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x138fc8,'Reply...')),this['bind']('authoredAt')['to'](_0x4752f2),this['bind']('resolvedAt')['to'](_0x4752f2),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 _0x49f966(_0x138fc8,_0x4752f2['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4752f2,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x32bb5b=this['bindTemplate'],_0x467399=[{'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':_0x32bb5b['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x32bb5b['to']('authoredAt',_0x3cfac7=>this['_config']['formatDateTime'](_0x3cfac7))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x32bb5b['if']('isEditMode','ck-comment__actions--hidden'),_0x32bb5b['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']&&_0x467399['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x32bb5b['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x32bb5b['if']('isEditMode','ck-comment--edit'),_0x32bb5b['if']('isSystemComment','ck-comment--info'),_0x32bb5b['to']('actionIndicator',_0xb0fa80=>_0xb0fa80?'ck-comment--'+_0xb0fa80:'')],'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':_0x467399}]}]};}['_createEditButton'](){const _0x38c2a5=new _0xabb329(this['locale']);return _0x38c2a5['label']=N(this['locale'],'Edit'),_0x38c2a5['icon']=_0x4bdc0a,_0x38c2a5['withText']=!0x0,_0x38c2a5['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x38c2a5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x12b2a4=>!_0x12b2a4),_0x38c2a5['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x38c2a5['on']('execute',()=>this['switchToEditMode']()),_0x38c2a5;}['_createRemoveButton'](){const _0x3ec930=new _0xabb329(this['locale']);return _0x3ec930['label']=N(this['locale'],'Remove'),_0x3ec930['icon']=_0x405af1,_0x3ec930['withText']=!0x0,_0x3ec930['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x3ec930['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x19da96=>!_0x19da96),_0x3ec930['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x3ec930['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x3ec930;}['_createDropdown'](){const _0x45ec7c=_0x3e1b91(this['locale'],_0x4b288f),_0x4045ce=_0x45ec7c['panelView']['children'],_0x962551=new _0x2106f2(this['locale']),_0x2356f0=_0x45ec7c['bindTemplate'];_0x47d6ad(_0x45ec7c,()=>this['items']['find'](_0x27f587=>_0x27f587['isVisible'])),_0x45ec7c['extendTemplate']({'attributes':{'class':[_0x2356f0['if']('isVisible','ck-hidden',_0x22c120=>!_0x22c120)]}});const _0x793fca=(_0x140d02,_0xde5296=-0x1)=>{const _0xd077eb=new _0x5c7563(this['locale']);_0xd077eb['children']['add'](_0x140d02);const _0x2df641=_0xde5296>-0x1?_0xde5296:_0x962551['items']['length'];_0x962551['items']['add'](_0xd077eb,_0x2df641);const _0x5038b0=Array['from'](this['items']);_0x45ec7c['unbind']('isEnabled','isVisible'),_0x45ec7c['bind']('isEnabled')['toMany'](_0x5038b0,'isEnabled',(..._0x375352)=>_0x375352['some'](_0x9d5424=>_0x9d5424)),_0x45ec7c['bind']('isVisible')['toMany'](_0x5038b0,'isVisible',(..._0x575f64)=>_0x575f64['some'](_0x28d610=>_0x28d610));};_0x45ec7c['panelPosition']='sw',_0x45ec7c['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x3be590});for(const _0x579b88 of this['items'])_0x793fca(_0x579b88);return _0x4045ce['add'](_0x962551),_0x45ec7c['listenTo'](this['items'],'add',(_0x2bef68,_0x59a071,_0x3901d8)=>{_0x793fca(_0x59a071,_0x3901d8);}),_0x45ec7c['listenTo'](this['items'],'remove',(_0x1c78ef,_0x2b36dc,_0x10d587)=>{_0x962551['items']['remove'](_0x10d587);}),_0x45ec7c;}['_attachActions'](_0x503a6e,_0x2ac73c){const _0x321e0d=_0x503a6e&&_0x503a6e['element'];_0x321e0d&&(this['listenTo'](_0x321e0d,'mouseenter',()=>this['actionIndicator']=_0x2ac73c),this['listenTo'](_0x321e0d,'focus',()=>this['actionIndicator']=_0x2ac73c),this['listenTo'](_0x321e0d,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x321e0d,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x226595=super['_createCommentInputView']();return _0x226595['bind']('placeholder')['to'](this),_0x226595;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x81785f){const _0x4da824=Dt(_0x81785f,0x1e),_0x158c77=new MutationObserver(_0x105107=>{for(const _0x3d38e6 of _0x105107)('attributes'==_0x3d38e6['type']&&'class'==_0x3d38e6['attributeName']||'childList'==_0x3d38e6['type']||'characterData'==_0x3d38e6['type'])&&_0x4da824();});return{'attach'(_0x591e29){_0x158c77['observe'](_0x591e29,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x158c77['disconnect'](),_0x4da824['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x538ce5,_0x1270e6){super(_0x538ce5),this['id']=_0x5920b0(),this['focusTracker']=new _0x151ecd(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x3f8b70,_0x45aecf)=>this['fire']('Esc',_0x45aecf)),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'](_0x1270e6),this['mainView']=_0x1270e6;const _0x4abe0c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4abe0c['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 _0x11ed6d=this['element']['clientHeight'];_0x11ed6d&&(this['height']=_0x11ed6d);}}class T extends/* #__PURE__ -- @preserve */
29
- _0xe27a3f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x26b67b,target:_0x460eb8,type:_0x4cc6c7,isVisible:_0x30e3ed=!0x0}){super(),this['view']=_0x26b67b,this['view']['element']||this['view']['render'](),this['_type']=_0x4cc6c7,this['_target']=_0x460eb8,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4b4c8c([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x7b4f61,_0x12eedc)=>{this['view']['focusTracker']['add'](_0x12eedc);}),this['focusableElements']['on']('remove',(_0x1bb03f,_0x1b23b4)=>{this['view']['focusTracker']['remove'](_0x1b23b4);}),this['set']('isVisible',_0x30e3ed);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xba943c=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0xba943c),_0xba943c;}get['targetRect'](){const _0x454496=this['target'];if(null===_0x454496)return null;if(_0x454496 instanceof _0x318b84)return _0x454496;const _0x7acc9c=_0x454496['filter'](_0x312916=>function(_0x2938b2){const _0x74aea7=_0x2938b2['offsetParent'];if(_0x74aea7)return!0x0;const _0x235acf=_0x2938b2['getClientRects']()['item'](0x0);return!!_0x235acf;}(_0x312916));return 0x0===_0x7acc9c['length']?null:new _0x318b84(_0x7acc9c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x28d0e6){this['view']['isActive']=_0x28d0e6,this['view']['mainView']['isActive']=_0x28d0e6;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3a59b4){if(!(null===_0x3a59b4||_0x3a59b4 instanceof _0x318b84||Array['isArray'](_0x3a59b4)&&_0x3a59b4['every'](_0x414c23=>fi(_0x414c23))))throw new _0x2df15f('annotation-invalid-target',null,{'target':_0x3a59b4});}['_getNormalizedTarget'](){const _0x2750a8='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x2750a8)?[_0x2750a8]:_0x2750a8;}}function fi(_0x15a17d){return null!==_0x15a17d&&'object'==typeof _0x15a17d&&'nodeType'in _0x15a17d&&0x1===_0x15a17d['nodeType'];}class S extends _0x4b4c8c{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0xfebb62=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x151ecd(),this['_focusTracker']['on']('change:isFocused',(_0x1c81da,_0x58b73f,_0x2848c6)=>{_0x2848c6||this['fire']('blur');});for(const _0xc60e7c of _0xfebb62)this['add'](_0xc60e7c);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xa85e5){if(this['has'](_0xa85e5))throw new _0x2df15f('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xa85e5['innerView'],_0xa85e5),this['_viewToAnnotation']['set'](_0xa85e5['view'],_0xa85e5);for(const _0x407f62 of _0xa85e5['focusableElements'])this['_focusTracker']['add'](_0x407f62);this['listenTo'](_0xa85e5['focusableElements'],'add',(_0x49e4ca,_0x20e8f9)=>{this['_focusTracker']['add'](_0x20e8f9);}),this['listenTo'](_0xa85e5['focusableElements'],'remove',(_0x1d35d9,_0x25f4f5)=>{this['_focusTracker']['remove'](_0x25f4f5);}),this['listenTo'](_0xa85e5['view']['focusTracker'],'change:isFocused',(_0x5c0801,_0x4c03cd,_0x3880fa)=>{_0x3880fa&&this['fire']('focus',_0xa85e5);}),_0xa85e5['updateTargetRect']();const _0x1f2809=this['_getOrderInContent'](_0xa85e5['view']['targetRect']);return super['add'](_0xa85e5,_0x1f2809);}['remove'](_0x19c8ce){if(!this['has'](_0x19c8ce))throw new _0x2df15f('annotationcollection-not-existing-item',null);this['stopListening'](_0x19c8ce['view']['focusTracker']),this['stopListening'](_0x19c8ce['focusableElements']);for(const _0x37af5c of _0x19c8ce['focusableElements'])this['_focusTracker']['remove'](_0x37af5c);return this['_viewToAnnotation']['delete'](_0x19c8ce['view']),this['_innerViewToAnnotation']['delete'](_0x19c8ce['innerView']),super['remove'](_0x19c8ce);}['getByInnerView'](_0x2aebc3){return this['_innerViewToAnnotation']['get'](_0x2aebc3);}['getByView'](_0x4fee82){return this['_viewToAnnotation']['get'](_0x4fee82);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x16a479 of this)_0x16a479['updateTargetRect']();this['_sort']();}['_sort'](){const _0x58f86f=Array['from'](this)['sort']((_0x5073b2,_0x245541)=>w(_0x5073b2['view']['targetRect'],_0x245541['view']['targetRect']));for(let _0x181e08=_0x58f86f['length']-0x1;_0x181e08>0x0;_0x181e08--){const _0x3fa58e=_0x58f86f[_0x181e08];_0x181e08!==this['getIndex'](_0x3fa58e)&&(this['remove'](_0x3fa58e),this['add'](_0x3fa58e));}}['_getOrderInContent'](_0xa8b908){let _0x548625=0x0;if(!_0xa8b908)return this['length'];for(const _0x320e1e of this){const _0x24ed06=_0x320e1e['view']['targetRect'];if(_0x24ed06){if(w(_0xa8b908,_0x24ed06)<0x0)return _0x548625;_0x548625++;}}return _0x548625;}}function v({source:_0x555ea0,target:_0xf68413,filter:_0xb4b881}){for(const _0x247b5c of _0x555ea0)_0xb4b881(_0x247b5c)&&_0xf68413['add'](_0x247b5c);_0xf68413['listenTo'](_0x555ea0,'add',(_0x5dd3e3,_0x5ca0b9)=>{_0xb4b881(_0x5ca0b9)&&_0xf68413['add'](_0x5ca0b9);}),_0xf68413['listenTo'](_0x555ea0,'remove',(_0xc4517d,_0x3f86a1)=>{_0xf68413['has'](_0x3f86a1)&&_0xf68413['remove'](_0x3f86a1);});}function w(_0x129196,_0x249cd7){if(null===_0x129196&&null===_0x249cd7)return 0x0;if(null===_0x129196)return-0x1;if(null===_0x249cd7)return 0x1;const _0xd5a2bf=_0x129196['top']-_0x249cd7['top'];return 0x0==_0xd5a2bf?_0x129196['left']-_0x249cd7['left']:_0xd5a2bf;}class y extends _0x5bb154{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x6f76af){if(super(_0x6f76af),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x6f76af instanceof _0x22aa3e){const _0x2379bb=_0x6f76af['locale'];_0x6f76af['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x2379bb,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x2379bb,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x2379bb,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x2379bb,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x2379bb,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x2379bb,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x2379bb,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x580d94){this['collection']['add'](_0x580d94);}['remove'](_0x373508){this['collection']['remove'](_0x373508),_0x373508['destroy']();}['refreshVisibility'](){for(const _0xf2fd96 of this['collection'])_0xf2fd96['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x23ac14){return this['collection']['getByInnerView'](_0x23ac14);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x44f99d of this['collection'])_0x44f99d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x53e2dc){this['fire']('_activateAnnotation',_0x53e2dc);}['createAnnotation'](_0xe86e6a){return new T(_0xe86e6a);}['createAnnotationView'](_0x82a06a,_0x5cc663){return new E(_0x82a06a,_0x5cc663);}['_addActiveAnnotation'](_0x143434){const _0x585462=new Set(this['activeAnnotations']);_0x585462['add'](_0x143434),this['activeAnnotations']=_0x585462;}['_removeActiveAnnotation'](_0x1120dd){const _0x57ba7c=new Set(this['activeAnnotations']);_0x57ba7c['delete'](_0x1120dd),this['activeAnnotations']=_0x57ba7c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x476a61=this['collection'],_0x4ef81b=this['_visibleAnnotations'];function _0x181bc1(_0x401436){const _0x21d664=_0x401436['source'];_0x21d664['isVisible']&&!_0x4ef81b['has'](_0x21d664)?_0x4ef81b['add'](_0x21d664):!_0x21d664['isVisible']&&_0x4ef81b['has'](_0x21d664)&&_0x4ef81b['remove'](_0x21d664),_0x21d664['view']['focusTracker']['remove'](_0x21d664['view']['element']),_0x21d664['view']['focusTracker']['add'](_0x21d664['view']['element']);}this['listenTo'](_0x476a61,'add',(_0x312b4c,_0x26fffa)=>{_0x26fffa['isVisible']&&_0x4ef81b['add'](_0x26fffa),this['listenTo'](_0x26fffa,'change:isVisible',_0x181bc1);}),this['listenTo'](_0x476a61,'remove',(_0x442122,_0x58c74c)=>{_0x4ef81b['has'](_0x58c74c)&&_0x4ef81b['remove'](_0x58c74c),this['stopListening'](_0x58c74c,'change:isVisible',_0x181bc1);});}['_setupEnterAnnotationKeystroke'](){const _0x532e88=_0x4fcca1=>{_0x4fcca1['on']('ready',()=>{_0x4fcca1['keystrokes']['set'](_0x267ea4,(_0x4173ad,_0x550289)=>{const _0x19c4fe=_0x50c98e(this['activeAnnotations']['values']());_0x19c4fe&&(_0x19c4fe['view']['focus'](),_0x550289());});});};this['context']instanceof _0x22aa3e?_0x532e88(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3c2c9f,_0x1644d5)=>{_0x532e88(_0x1644d5);});}['_setupEscapeAnnotationHandling'](){const _0x4532fa=_0x8c42eb=>{const _0x2f6ce3=_0x8c42eb['source'],_0x38b3cb=[];let _0x2e6448;if(Array['isArray'](_0x2f6ce3['target'])){_0x2e6448=_0x2f6ce3['target'][0x0],this['context']instanceof _0x22aa3e?_0x38b3cb['push'](this['context']):this['context']['editors']&&_0x38b3cb['push'](...this['context']['editors']);for(const _0x636bcc of _0x38b3cb)for(const _0xe7f613 of _0x636bcc['editing']['view']['domRoots']['values']())if(_0xe7f613['contains'](_0x2e6448))return void _0x636bcc['editing']['view']['focus']();_0x2e6448['focus']();}};this['listenTo'](this['collection'],'add',(_0x57e9bd,_0x3dd502)=>{this['listenTo'](_0x3dd502,'escape',_0x4532fa,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1c638a,_0x5aa895)=>{this['stopListening'](_0x5aa895,'escape',_0x4532fa);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x5bb154{['_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(_0x13f149){super(_0x13f149),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2b27f7=this['context']['config'];_0x2b27f7['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2b27f7['define']('comments.maxThreadTotalWeight',0x1f4),_0x2b27f7['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2b27f7['define']('comments.CommentThreadView',gt),_0x2b27f7['define']('comments.CommentView',Tt),_0x2b27f7['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x130e7b=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x52e3db,_0x249a38)=>this['_addCommentThread'](_0x249a38)),this['on']('submitCommentThread',(_0x133ef2,_0x24dc01)=>this['_submitCommentThread'](_0x24dc01)),this['on']('resolveCommentThread',(_0x431e87,_0x175391)=>this['_resolveCommentThread'](_0x175391)),this['on']('resolveCommentThread',(_0xd3e8af,_0x2a99d7)=>this['_updateActiveAnnotation'](_0x2a99d7),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1d8ee1,_0x37d7af)=>this['_reopenCommentThread'](_0x37d7af)),this['on']('reopenCommentThread',(_0x3cce1e,_0xcb71b8)=>this['_updateActiveAnnotation'](_0xcb71b8),{'priority':'lowest'}),this['on']('removeCommentThread',(_0xfe1377,_0x408511)=>this['_removeCommentThread'](_0x408511)),this['on']('updateCommentThread',(_0x37c7ab,_0x277941)=>this['_updateCommentThread'](_0x277941)),this['on']('updateCommentThread',(_0xcd6fa9,_0x27ee66)=>this['_updateActiveAnnotation'](_0x27ee66),{'priority':'lowest'}),this['on']('addComment',(_0xb1b8af,_0xe6934a)=>this['_addComment'](_0xe6934a)),this['on']('updateComment',(_0x5aefc1,_0x1b5e9f)=>this['_updateComment'](_0x1b5e9f)),this['on']('removeComment',(_0x1e94e1,_0x465619)=>this['_removeComment'](_0x465619)),this['on']('addComment',(_0xdfb69c,{threadId:_0x157872,isFromAdapter:_0x4cdb1a})=>{if(_0x4cdb1a)return;const _0x188f6d=this['getCommentThread'](_0x157872),_0x1fed1a=_0x188f6d&&this['_threadToController']['get'](_0x188f6d);_0x1fed1a&&_0x1fed1a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x130e7b,'change:activeAnnotations',(_0x592735,_0x342a5c,_0x120c3a)=>{const _0x3985e1=Array['from'](_0x120c3a)['map'](_0x65bf99=>this['_viewToController']['get'](_0x65bf99['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3985e1?_0x3985e1['model']:null;});}set['adapter'](_0x1f975f){if(this['_adapter'])throw new _0x2df15f('commentsrepository-adapter-already-set');this['_adapter']=_0x1f975f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x32ab6d=_t,threadId:_0x19d1a1=_0x5920b0(),comments:_0x301f65=[],unlinkedAt:_0x44a827=null,resolvedAt:_0x313cf1=null,resolvedBy:_0x6efaee=null,target:_0x2b9837=null,context:_0x3858f4=null,attributes:_0x53f661={},isResolvable:_0x595ed2=!0x0,isSubmitted:_0x42b024=!0x1,isFromAdapter:_0x5f1424=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x32ab6d),{'channelId':_0x32ab6d,'threadId':_0x19d1a1,'comments':_0x301f65,'unlinkedAt':_0x44a827,'resolvedAt':_0x313cf1,'resolvedBy':_0x6efaee,'target':_0x2b9837,'context':_0x3858f4,'attributes':_0x53f661,'isFromAdapter':_0x5f1424,'isResolvable':_0x595ed2,'isSubmitted':_0x42b024}),this['getCommentThread'](_0x19d1a1);}['openNewCommentThread']({channelId:_0x4c48f8=_t,threadId:_0x590d31=_0x5920b0(),target:_0x3da530,context:_0x1685bb=null,isResolvable:_0x7594f4=!0x0}){if(this['_readOnlyChannels']['has'](_0x4c48f8)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3da530)throw new _0x2df15f('commentsrepository-missing-target');const _0x278c5a=this['addCommentThread']({'channelId':_0x4c48f8,'threadId':_0x590d31,'target':_0x3da530,'context':_0x1685bb,'isResolvable':_0x7594f4});if(!_0x278c5a)return null;const _0x18d57e=this['_threadToController']['get'](_0x278c5a),_0x1ea239=_0x18d57e['view']['commentThreadInputView']['commentInputView'],_0x4861a1=this['context']['plugins']['get'](y),_0x454219=_0x4861a1['getByInnerView'](_0x18d57e['view']);return _0x4861a1['activate'](_0x454219),_0x1ea239['once']('editorReady',()=>_0x1ea239['focus']()),_0x278c5a;}['hasCommentThread'](_0x131fdb){if('string'!=typeof _0x131fdb)throw new _0x2df15f('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x131fdb);}['updateCommentThread']({channelId:_0x7b6361=_t,threadId:_0x4937e4,context:_0x3c15ab,unlinkedAt:_0x595598,attributes:_0x533a27,isFromAdapter:_0x13889d=!0x1}){return this['fire'](Nt('updateCommentThread',_0x7b6361),{'channelId':_0x7b6361,'threadId':_0x4937e4,'context':_0x3c15ab,'unlinkedAt':_0x595598,'attributes':_0x533a27,'isFromAdapter':_0x13889d}),this['getCommentThread'](_0x4937e4);}['getCommentThread'](_0x63a30e){if('string'!=typeof _0x63a30e)throw new _0x2df15f('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x63a30e);}['fetchCommentThread']({channelId:_0x9ca4d4,threadId:_0x1fff73}={}){const _0x40f524=this['getCommentThread'](_0x1fff73);if(_0x40f524)return Promise['resolve'](_0x40f524);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2df15f('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x9ca4d4,'threadId':_0x1fff73})['then'](_0x517297=>this['hasCommentThread'](_0x1fff73)?this['getCommentThread'](_0x1fff73):_0x517297?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x9ca4d4},_0x517297)):void 0x0)['catch'](_0x40e05a=>{throw console['error'](_0x40e05a),new _0x2df15f('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x550eb8,skipNotAttached:_0x335ea5=!0x1,skipEmpty:_0xa06054=!0x1,toJSON:_0x25719e=!0x1}={}){const _0x48c66a=[];for(const _0x8c3451 of this['_threads']['values']())_0x550eb8&&_0x8c3451['channelId']!==_0x550eb8||_0x335ea5&&!_0x8c3451['isAttached']||_0xa06054&&0x0===_0x8c3451['length']||_0x48c66a['push'](_0x8c3451);return _0x25719e?_0x48c66a['map'](_0x1137c8=>_0x1137c8['toJSON']()):_0x48c66a;}['getAnnotationForCommentThread'](_0x4e66af){const _0x18a520=this['_threadToController']['get'](_0x4e66af);if(!_0x18a520)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x18a520['view'])||null;}['getCommentThreadForAnnotation'](_0x66755f){const _0x88f9ba=this['_viewToController']['get'](_0x66755f['innerView']);return _0x88f9ba?_0x88f9ba['model']:null;}['setActiveCommentThread'](_0x172e87){const _0x3b8036=this['context']['plugins']['get'](y);if(!_0x172e87)return void(this['activeCommentThread']&&_0x3b8036['deactivateAll']());const _0x2a6c96=this['getCommentThread'](_0x172e87);if(!_0x2a6c96)throw new _0x2df15f('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x172e87});if(!this['_threadToController']['has'](_0x2a6c96))throw new _0x2df15f('commentsrepository-active-not-attached',null,{'threadId':_0x172e87});const _0x284123=_0x3b8036['getByInnerView'](this['_threadToController']['get'](_0x2a6c96)['view']);_0x3b8036['activate'](_0x284123);}['switchReadOnly'](_0x154436,_0x4477ee){_0x154436?this['_readOnlyChannels']['add'](_0x4477ee):this['_readOnlyChannels']['delete'](_0x4477ee),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x45651a){return this['_readOnlyChannels']['has'](_0x45651a)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x26218b,_0x7ace55){return new vt(_0x26218b,_0x7ace55);}['setPermissions'](_0x376e86,_0x28fe88=_t){this['_permissions']['set'](_0x28fe88,_0x376e86),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x16c45d=_t){return this['_permissions']['has'](_0x16c45d)?this['_permissions']['get'](_0x16c45d):bt;}['_addCommentThread']({channelId:_0x394cf3,threadId:_0x4397c6,comments:_0xd179f,unlinkedAt:_0x1d2934,resolvedAt:_0x5b6002,resolvedBy:_0x279fcb,target:_0x1f2234,context:_0x1fa7e2,attributes:_0x37b5d2,isFromAdapter:_0x3dec3f,isResolvable:_0x544722,isSubmitted:_0x339e9d}){if('string'!=typeof _0x4397c6)throw new _0x2df15f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4397c6});if(this['hasCommentThread'](_0x4397c6))throw new _0x2df15f('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4397c6});const _0x3e23c1=new pi(this,{'channelId':_0x394cf3,'id':_0x4397c6,'context':_0x1fa7e2,'attributes':_0x37b5d2,'unlinkedAt':_0x1d2934,'resolvedAt':_0x5b6002,'resolvedBy':_0x279fcb?this['context']['plugins']['get'](it)['getUser'](_0x279fcb):null,'isResolvable':_0x544722,'isSubmitted':_0x339e9d||_0x3dec3f});this['_threads']['set'](_0x4397c6,_0x3e23c1);for(const _0x170101 of _0xd179f)_0x3e23c1['_add'](this['_createNewComment']({'threadId':_0x4397c6,..._0x170101}));return _0x1f2234&&_0x3e23c1['attachTo'](_0x1f2234),_0x3dec3f||!_0x3e23c1['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x394cf3,'threadId':_0x4397c6});}['_submitCommentThread']({channelId:_0x4fce16,threadId:_0x4ac638}){if(!this['hasCommentThread'](_0x4ac638))throw new _0x2df15f('commentsrepository-missing-comment-thread',this);const _0x243942=this['getCommentThread'](_0x4ac638);if(_0x243942['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x38aa7d,comments:_0x1d20f3,resolvedAt:_0x35d2a6,resolvedBy:_0x4a2368,context:_0x50e101,attributes:_0x29a34d}=_0x243942,_0x41db11=this['context']['plugins']['get']('PendingActions'),_0xb7bcf5=_0x41db11['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4fce16,'threadId':_0x38aa7d,'comments':_0x1d20f3['map'](_0x22706e=>_0x22706e['toJSON']()),'resolvedAt':_0x35d2a6,'resolvedBy':_0x4a2368?_0x4a2368['id']:_0x4a2368,'context':_0x50e101,'attributes':_0x29a34d})['then'](({comments:_0x57d43d})=>{_0x41db11['remove'](_0xb7bcf5);for(const _0x5cd89e of _0x57d43d)this['_updateComment']({'channelId':_0x4fce16,'threadId':_0x4ac638,'commentId':_0x5cd89e['commentId'],'createdAt':_0x5cd89e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x16bac3=>{throw console['error'](_0x16bac3),new _0x2df15f('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x24be91,target:_0x428829}){const _0x6662ab=this['getCommentThread'](_0x24be91);if(!_0x6662ab)throw new _0x2df15f('commentsrepository-attach-missing-comment-thread',this);const _0x312769=this['context']['plugins']['get']('PendingActions'),_0x51899a=this['context']['plugins']['get'](y),_0x57380f=this['_createCommentThreadView'](_0x6662ab),_0x231bd9=new vt(_0x6662ab,_0x57380f);let _0x3cb260=null;_0x57380f['on']('change:isDirty',(_0x5e5c5b,_0x14bf27,_0x1ae431)=>{_0x1ae431?_0x3cb260=_0x312769['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3cb260&&(_0x312769['remove'](_0x3cb260),_0x3cb260=null);}),this['_threadToController']['set'](_0x6662ab,_0x231bd9),this['_viewToController']['set'](_0x57380f,_0x231bd9);const _0x541269=new E(this['context']['locale'],_0x57380f);_0x541269['bind']('length')['to'](_0x57380f),_0x541269['bind']('isDirty')['to'](_0x57380f,'isDirty',_0x57380f,'length',(_0x5e7d9f,_0x20837d)=>_0x5e7d9f||!_0x20837d),_0x541269['bind']('isActive')['to'](_0x57380f),_0x541269['type']='comment';const _0x589bd4=new T({'view':_0x541269,'target':_0x428829,'type':'comment','isVisible':!_0x6662ab['archivedAt']&&!!('function'==typeof _0x428829?_0x428829():_0x428829)});return _0x57380f['on']('escape',()=>{_0x589bd4['fire']('escape');}),this['_bindAnnotationToEditors'](_0x57380f,_0x589bd4),_0x51899a['add'](_0x589bd4),_0x589bd4;}['_bindAnnotationToEditors'](_0x20f399,_0x3a7e01){this['listenTo'](_0x20f399,'editorReady',(_0x1caa4d,_0x5acf2f)=>{const _0x44fa98=_0x5acf2f['ui']['view']['body']['bodyCollectionContainer'];_0x3a7e01['focusableElements']['add'](_0x44fa98),this['context']instanceof _0x22aa3e&&this['context']['ui']['focusTracker']['add'](_0x44fa98);},{'priority':'highest'}),this['listenTo'](_0x20f399,'editorDestroyed',(_0x52c749,_0x103aa7)=>{const _0x18c720=_0x103aa7['ui']['view']['body']['bodyCollectionContainer'];_0x3a7e01['focusableElements']['has'](_0x18c720)&&_0x3a7e01['focusableElements']['remove'](_0x18c720),this['context']instanceof _0x22aa3e&&this['context']['ui']['focusTracker']['remove'](_0x18c720);});}['_unbindEditors'](_0x4a9e2c){this['stopListening'](_0x4a9e2c,'editorReady'),this['stopListening'](_0x4a9e2c,'editorDestroyed');}['_createCommentThreadView'](_0x3cf501){const _0xbb23a2=this['context']['plugins']['get'](it),{config:_0x3c4b55,locale:_0x38453b}=this['context'],_0x18f366=pt(_0x3c4b55['get']('locale'),_0x38453b);return new(0x0,(_0x3c4b55['get']('comments'))['CommentThreadView'])(_0x38453b,_0x3cf501,_0xbb23a2['me'],{'editorConfig':{..._0x3c4b55['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3c4b55['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3c4b55['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3c4b55['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3c4b55['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x18f366,'CommentView':_0x3c4b55['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3abdc1,channelId:_0x80b4a6,resolvedAt:_0x26bfdc,resolvedBy:_0x591605,isFromAdapter:_0x2b0a30}){if(!this['hasCommentThread'](_0x3abdc1))throw new _0x2df15f('commentsrepository-missing-comment-thread',null,{'threadId':_0x3abdc1});const _0x3a4e36=this['getCommentThread'](_0x3abdc1);if(_0x3a4e36['isResolved'])throw new _0x2df15f('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3abdc1});const _0x3f5572=this['context']['plugins']['get'](it);if(_0x3a4e36['resolvedBy']=_0x3f5572['getUser'](_0x591605),_0x3a4e36['resolvedAt']=_0x26bfdc,_0x2b0a30||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2a77cd=this['context']['plugins']['get']('PendingActions'),_0x413ecd=_0x2a77cd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x80b4a6,'threadId':_0x3abdc1})['then'](({resolvedAt:_0x549888,resolvedBy:_0x255aa5})=>{_0x2a77cd['remove'](_0x413ecd),_0x3a4e36['resolvedBy']['id']!==_0x255aa5&&(_0x3a4e36['resolvedBy']=_0x3f5572['getUser'](_0x255aa5)),_0x3a4e36['resolvedAt']=_0x549888;})['catch'](_0x56eb5a=>{throw console['error'](_0x56eb5a),new _0x2df15f('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x283e6e,channelId:_0x2c8854,isFromAdapter:_0x5759ec}){if(!this['hasCommentThread'](_0x283e6e))throw new _0x2df15f('commentsrepository-missing-comment-thread',null,{'threadId':_0x283e6e});const _0x412bff=this['getCommentThread'](_0x283e6e);if(!_0x412bff['isResolved'])throw new _0x2df15f('commentsrepository-reopen-comment-thread',null,{'threadId':_0x283e6e});if(_0x412bff['resolvedBy']=null,_0x412bff['resolvedAt']=null,_0x5759ec||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5891a6=this['context']['plugins']['get']('PendingActions'),_0x2d8a3c=_0x5891a6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2c8854,'threadId':_0x283e6e})['then'](()=>_0x5891a6['remove'](_0x2d8a3c))['catch'](_0xa79048=>{throw console['error'](_0xa79048),new _0x2df15f('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3cc3c1,isFromAdapter:_0x13fc0d}){const _0x4c60f1=this['getCommentThread'](_0x3cc3c1);if(!_0x4c60f1)throw new _0x2df15f('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3cc3c1),this['_threads']['delete'](_0x3cc3c1),!_0x4c60f1['isSubmitted']||_0x13fc0d||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xc220d9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1d33a9}=_0x4c60f1,_0x162edc=_0xc220d9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1d33a9,'threadId':_0x3cc3c1})['then'](()=>_0xc220d9['remove'](_0x162edc))['catch'](_0x4f3706=>{throw console['error'](_0x4f3706),new _0x2df15f('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x150978,unlinkedAt:_0x143215,context:_0x5d207c,attributes:_0x32e54c,isFromAdapter:_0x54f410}){if('string'!=typeof _0x150978)throw new _0x2df15f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x150978});if(!this['hasCommentThread'](_0x150978))throw new _0x2df15f('commentsrepository-missing-comment-thread',null,{'threadId':_0x150978});const _0xcff476=this['getCommentThread'](_0x150978);let _0x6d1d76=!0x1;if(void 0x0!==_0x5d207c&&_0xcff476['context']!==_0x5d207c&&(_0xcff476['context']=_0x5d207c,_0x6d1d76=!0x0),void 0x0!==_0x143215&&_0xcff476['unlinkedAt']!==_0x143215&&(_0xcff476['unlinkedAt']=_0x143215,_0x6d1d76=!0x0),_0x32e54c&&!At(_0x32e54c,_0xcff476['attributes'])&&(_0xcff476['attributes']=_0x32e54c,_0x6d1d76=!0x0),!_0x6d1d76)return Promise['resolve']();if(!_0xcff476['isSubmitted']||_0x54f410||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x21cacd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4780d3}=_0xcff476,_0x14bb66=_0x21cacd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4780d3,'threadId':_0x150978,'context':_0x5d207c,'unlinkedAt':_0x143215,'attributes':_0x32e54c})['then'](()=>_0x21cacd['remove'](_0x14bb66))['catch'](_0x77d44d=>{throw console['error'](_0x77d44d),new _0x2df15f('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1a6efd){const _0x4f558d=this['context']['plugins']['get'](y),_0x131cea=this['getCommentThread'](_0x1a6efd);if(_0x131cea['_isAttached']=!0x1,this['_threadToController']['has'](_0x131cea)){const _0x4ee60d=this['_threadToController']['get'](_0x131cea),_0x345d54=_0x4ee60d['view'],_0xf75ac4=_0x4f558d['getByInnerView'](_0x345d54);this['_threadToController']['delete'](_0x131cea),this['_viewToController']['delete'](_0x345d54),_0xf75ac4&&_0x4f558d['remove'](_0xf75ac4),_0x4ee60d['destroy'](),_0x345d54['destroy']()['then'](()=>{this['_unbindEditors'](_0x345d54);});}}['_updateActiveAnnotation']({threadId:_0x4473d2,resolvedAt:_0x2f37f9,unlinkedAt:_0x49ae0c}){const _0x4fe93f=!!_0x2f37f9,_0x2d15b9=this['context']['plugins']['get'](y),_0x307aba=this['getCommentThread'](_0x4473d2);if(this['_threadToController']['has'](_0x307aba)){const _0x212841=this['_threadToController']['get'](_0x307aba)['view'],_0x5bd487=_0x2d15b9['getByInnerView'](_0x212841);_0x5bd487&&(_0x4fe93f&&_0x2d15b9['_removeActiveAnnotation'](_0x5bd487),_0x49ae0c?_0x5bd487['isVisible']=!0x1:_0x5bd487['refreshVisibility']());}}['_getExternalAuthor'](_0x3ad67a){const _0xca5e=this['context']['plugins']['get'](it),_0x33f879=It('external:'+_0x3ad67a),_0x404677=_0xca5e['getUser'](_0x33f879);return _0x404677||_0xca5e['addUser']({'id':_0x33f879,'name':_0x3ad67a});}['_createNewComment']({threadId:_0x37a1ef,commentId:_0x519e2c=_0x5920b0(),content:_0x286253,authorId:_0x5adaad,createdAt:_0xae071,attributes:_0x1e2f3d}){if('string'!=typeof _0x519e2c)throw new _0x2df15f('commentsrepository-invalid-commentid');if('string'!=typeof _0x5adaad)throw new _0x2df15f('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x286253||!_0x286253['trim']())throw new _0x2df15f('commentsrepository-invalid-comment-content');const _0x3f8840=this['context']['plugins']['get'](it)['getUser'](_0x5adaad);if(!_0x3f8840)throw new _0x2df15f('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5adaad});let _0x36de94=null,_0x35a0be=_0xae071;return _0x1e2f3d?.['@external']&&(_0x36de94=this['_getExternalAuthor'](_0x1e2f3d['@external']['authorName']),_0x35a0be=new Date(_0x1e2f3d['@external']['createdAt'])),new wi(this,{'threadId':_0x37a1ef,'id':_0x519e2c,'author':_0x36de94||_0x3f8840,'creator':_0x3f8840,'content':_0x286253,'createdAt':_0xae071,'authoredAt':_0x35a0be,'attributes':_0x1e2f3d});}['_addComment'](_0x12f568){let {threadId:_0x139f92,content:_0x377db2,attributes:_0x3b5b55,isFromAdapter:_0xc11ccd}=_0x12f568;const _0x2a3941=this['getCommentThread'](_0x12f568['threadId']);if(!_0x2a3941)throw new _0x2df15f('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3490dd=this['_createNewComment'](_0x12f568),{id:_0xe43b7e}=_0x3490dd;if(_0x2a3941['_add'](_0x3490dd),_0xc11ccd||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2a3941['isSubmitted'])return Promise['resolve']();const _0x392d28=this['context']['plugins']['get']('PendingActions'),{channelId:_0x120c50}=_0x2a3941,_0x1fde28=_0x392d28['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3b5b55||(_0x3b5b55={}),this['adapter']['addComment']({'channelId':_0x120c50,'threadId':_0x139f92,'commentId':_0xe43b7e,'content':_0x377db2,'attributes':_0x3b5b55})['then'](_0x5f3127=>{_0x392d28['remove'](_0x1fde28),_0x5f3127&&this['_updateComment']({'channelId':_0x120c50,'threadId':_0x139f92,'commentId':_0xe43b7e,'createdAt':_0x5f3127['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x277486=>{throw console['error'](_0x277486),new _0x2df15f('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x12e7fe,commentId:_0x529e9e,content:_0x185b1f,createdAt:_0x47bc3f,attributes:_0x23cb8f,isFromAdapter:_0x16674e}){if(void 0x0!==_0x185b1f&&('string'!=typeof _0x185b1f||!_0x185b1f['trim']()['length']))throw new _0x2df15f('commentsrepository-update-comment-invalid-content');const _0x4ae256=this['getCommentThread'](_0x12e7fe),_0x49234b=_0x4ae256['getComment'](_0x529e9e);if(!_0x49234b)throw new _0x2df15f('commentsrepository-update-missing-comment',this);let _0x1ac1dc=!0x1;if(_0x185b1f&&_0x185b1f!==_0x49234b['content']&&(_0x49234b['isEditable']||_0x16674e)&&(_0x49234b['content']=_0x185b1f,_0x1ac1dc=!0x0),_0x47bc3f&&_0x47bc3f!==_0x49234b['createdAt']&&(_0x49234b['createdAt']=_0x47bc3f,_0x49234b['attributes']&&_0x49234b['attributes']['@external']||(_0x49234b['authoredAt']=_0x47bc3f),_0x1ac1dc=!0x0),_0x23cb8f&&!At(_0x23cb8f,_0x49234b['attributes'])&&(_0x49234b['attributes']=_0x23cb8f,_0x1ac1dc=!0x0),!_0x1ac1dc)return Promise['resolve']();if(_0x4ae256['fire']('commentUpdated'),_0x16674e||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xf1009a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x50839d}=this['getCommentThread'](_0x49234b['threadId']),_0x51a7b5=_0xf1009a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x50839d,'threadId':_0x12e7fe,'commentId':_0x529e9e,'content':_0x185b1f,'attributes':_0x23cb8f})['then'](()=>_0xf1009a['remove'](_0x51a7b5))['catch'](_0x582d0d=>{throw console['error'](_0x582d0d),new _0x2df15f('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1726bd,commentId:_0x1cdae4,isFromAdapter:_0x248255}){const _0x37707b=this['getCommentThread'](_0x1726bd),_0x5f229d=_0x37707b['getComment'](_0x1cdae4);if(!_0x5f229d)throw new _0x2df15f('commentsrepository-remove-missing-comment',this);if(_0x37707b['_remove'](_0x5f229d),_0x248255||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x337ac4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x35b7cf}=_0x37707b,_0x1fd5af=_0x337ac4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x35b7cf,'threadId':_0x1726bd,'commentId':_0x1cdae4})['then'](()=>_0x337ac4['remove'](_0x1fd5af))['catch'](_0x2e5aed=>{throw console['error'](_0x2e5aed),new _0x2df15f('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0xe27a3f(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x46e8f2,_0x1c5d3d){super();const _0x51e12d=_0x1c5d3d['isResolvable'];this['channelId']=_0x1c5d3d['channelId'],this['id']=_0x1c5d3d['id'],this['comments']=new _0x4b4c8c(),this['_repository']=_0x46e8f2,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1c5d3d['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x46e8f2,'_permissions',_0x46e8f2,'_readOnlyChannels',()=>_0x46e8f2['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x46e8f2,'_permissions',()=>_0x46e8f2['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x46e8f2,'_permissions',()=>{const _0x5a0fd2=_0x46e8f2['getPermissions'](this['channelId']);return _0x5a0fd2['write']||_0x5a0fd2['admin'];}),this['bind']('isResolvable')['to'](_0x46e8f2,'_permissions',()=>_0x51e12d&&_0x46e8f2['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1c5d3d['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x436cfe,_0x4c0850)=>_0x436cfe?_0x4c0850?_0x436cfe<_0x4c0850?_0x436cfe:_0x4c0850:_0x436cfe:_0x4c0850),this['set']('unlinkedAt',_0x1c5d3d['unlinkedAt']||null),this['set']('resolvedAt',_0x1c5d3d['resolvedAt']||null),this['set']('resolvedBy',_0x1c5d3d['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5495f4=>!!_0x5495f4),this['set']('attributes',_0x1c5d3d['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x4e3460,_0x76da91)=>_0x4e3460+_0x76da91['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x48119a,id:_0x377f71}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x48119a),{'channelId':_0x48119a,'threadId':_0x377f71});}['setUnlinkedAt'](_0x1d1133){this['_update']({'unlinkedAt':_0x1d1133});}['resolve']({resolvedAt:_0x2884c1=new Date(),resolvedBy:_0x4c00e8='',isFromAdapter:_0x340eec=!0x1}={}){const _0x5b23de=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x2fb716,id:_0x46470e}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x2fb716),{'channelId':_0x2fb716,'threadId':_0x46470e,'resolvedAt':_0x2884c1,'resolvedBy':_0x4c00e8||_0x5b23de['id'],'isFromAdapter':_0x340eec});}['reopen']({isFromAdapter:_0x2ae928=!0x1}={}){const {channelId:_0x4399c1,id:_0x184839}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x4399c1),{'channelId':_0x4399c1,'threadId':_0x184839,'isFromAdapter':_0x2ae928});}['setContext'](_0x209391){this['context']||this['_update']({'context':_0x209391});}['setAttribute'](_0x45145d,_0x2c497f){const _0x5c26ea=wt(this['attributes']);yt(_0x5c26ea,_0x45145d,_0x2c497f),this['_update']({'attributes':_0x5c26ea});}['removeAttribute'](_0x24e0b5){const _0x261815=wt(this['attributes']);Ct(_0x261815,_0x24e0b5),this['_update']({'attributes':_0x261815});}['remove']({isFromAdapter:_0x59846f=!0x1}={}){const {channelId:_0x4b1c1b,id:_0x118608}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x4b1c1b),{'channelId':_0x4b1c1b,'threadId':_0x118608,'isFromAdapter':_0x59846f});}['attachTo'](_0x2751c2){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2751c2});}['addComment'](_0x2fb6ad){const {channelId:_0x5918ab,id:_0x4060fc}=this;this['_repository']['fire'](Nt('addComment',_0x5918ab,_0x4060fc),Object['assign']({'channelId':_0x5918ab,'threadId':_0x4060fc},_0x2fb6ad));}['getComment'](_0x1dda2a){if('string'!=typeof _0x1dda2a)throw new _0x2df15f('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x1dda2a});return this['comments']['get'](_0x1dda2a);}['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'](_0x218a35=>_0x218a35['toJSON']()),'attributes':this['attributes']};}['_add'](_0x1e3cb0){return this['listenTo'](_0x1e3cb0,'change:authoredAt',()=>{const _0x5c0022=this['_findOptimalIndex'](_0x1e3cb0),_0x37d58e=this['comments'];_0x5c0022-0x1!=_0x37d58e['getIndex'](_0x1e3cb0)&&_0x5c0022+0x1!=_0x37d58e['getIndex'](_0x1e3cb0)&&(this['_remove'](_0x1e3cb0),this['_add'](_0x1e3cb0));}),this['comments']['add'](_0x1e3cb0,this['_findOptimalIndex'](_0x1e3cb0));}['_update'](_0x22bd4b){const {channelId:_0x2aff61,id:_0x213817}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x2aff61),{..._0x22bd4b,'channelId':_0x2aff61,'threadId':_0x213817});}['_remove'](_0xfb3630){return this['stopListening'](_0xfb3630),_0xfb3630['destroy'](),this['comments']['remove'](_0xfb3630);}['_findOptimalIndex'](_0x13ebf6){const _0x5415f1=this['comments']['find'](_0x40dc1a=>new Date(_0x40dc1a['authoredAt'])['getTime']()>new Date(_0x13ebf6['authoredAt'])['getTime']());return _0x5415f1?this['comments']['getIndex'](_0x5415f1):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0xe27a3f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x59d0e6,_0x864f1b){super();const _0xdbe9b5=_0x59d0e6['context']['plugins']['get'](it)['me'],_0xb2bde0=_0x59d0e6['getCommentThread'](_0x864f1b['threadId']),_0x24c545=0x0===_0xb2bde0['comments']['length'],_0x14de43=_0xdbe9b5===_0x864f1b['author'];this['id']=_0x864f1b['id'],this['threadId']=_0x864f1b['threadId'],this['author']=_0x864f1b['author'],this['creator']=_0x864f1b['creator'],this['isExternal']=Boolean(_0x864f1b['attributes']&&_0x864f1b['attributes']['@external']),this['set']('content',_0x864f1b['content']),this['createdAt']=_0x864f1b['createdAt']||new Date(),this['set']('authoredAt',_0x864f1b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xb2bde0,'resolvedAt'),this['set']('attributes',_0x864f1b['attributes']||{}),this['bind']('isEditable')['to'](_0x59d0e6,'_permissions',()=>{const _0x2c4a36=_0x59d0e6['getPermissions'](_0xb2bde0['channelId'])['write'],_0x50fd3b=_0x59d0e6['getPermissions'](_0xb2bde0['channelId'])['modifyAll'];return _0x14de43&&_0x2c4a36||!_0x14de43&&_0x50fd3b;}),this['bind']('isRemovable')['to'](_0xb2bde0,'isRemovable',_0x59d0e6,'_permissions',_0x4a7329=>{const _0x284e2a=_0x59d0e6['getPermissions'](_0xb2bde0['channelId'])['write'],_0x1a02cf=_0x59d0e6['getPermissions'](_0xb2bde0['channelId'])['modifyAll'];return _0x14de43&&_0x284e2a||_0x4a7329&&_0x24c545||!_0x14de43&&_0x1a02cf&&!_0x24c545;}),this['bind']('isReadOnly')['to'](_0xb2bde0,'isReadOnly'),this['_repository']=_0x59d0e6;}get['weight'](){return Math['max'](function(_0x35ccf3){const _0x47fa3f=document['createElement']('div');return _0x47fa3f['innerHTML']=_0x35ccf3,_0x47fa3f['textContent']['length'];}(this['content']),0xc8);}['update'](_0x4fba85){const {threadId:_0x409361,id:_0x10fa98}=this;if(!this['_repository']['hasCommentThread'](_0x409361))throw new _0x2df15f('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5ad8cd}=this['_repository']['getCommentThread'](_0x409361);this['_repository']['fire'](Nt('updateComment',_0x5ad8cd,_0x409361),{'channelId':_0x5ad8cd,'threadId':_0x409361,'commentId':_0x10fa98,..._0x4fba85});}['setAttribute'](_0x540cc2,_0x40a68c){const _0x49f65d=wt(this['attributes']);yt(_0x49f65d,_0x540cc2,_0x40a68c),this['update']({'attributes':_0x49f65d});}['removeAttribute'](_0x5e56e3){const _0x2daa4f=wt(this['attributes']);Ct(_0x2daa4f,_0x5e56e3),this['update']({'attributes':_0x2daa4f});}['remove'](_0x2cc34b={}){if(!_0x2cc34b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x40a219,id:_0x2d506d}=this;if(!this['_repository']['hasCommentThread'](_0x40a219))throw new _0x2df15f('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x117d8c}=this['_repository']['getCommentThread'](_0x40a219);this['_repository']['fire'](Nt('removeComment',_0x117d8c,_0x40a219),{'channelId':_0x117d8c,'threadId':_0x40a219,'commentId':_0x2d506d,..._0x2cc34b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x1b1f4b,..._0x4d3e7b){for(const _0x1c8af9 of _0x4d3e7b)void 0x0!==_0x1c8af9&&(_0x1b1f4b+=':'+String(_0x1c8af9));return _0x1b1f4b;}class ot extends _0x37788d{constructor(_0x12b8b0){super(_0x12b8b0),this['set']('hasContent',!0x1);}['refresh'](){const _0x3750cc=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x16c337 of _0x3750cc['getRanges']())if(this['_hasContent'](_0x16c337))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x16d98d=_0x5920b0(),ranges:_0x4debed,comment:_0x3be905}={}){const _0x195390=this['editor']['model'],_0x2c60ae=_0x4debed??Array['from'](_0x195390['document']['selection']['getRanges']()),_0x17d32c=[];for(const _0x59b239 of _0x2c60ae)this['_hasContent'](_0x59b239)&&_0x17d32c['push'](this['_trimToContent'](_0x59b239));if(!_0x17d32c['length'])throw new _0x2df15f('addcommentthreadcommand-incorrect-ranges',null);_0x3be905&&this['_createCommentThread'](_0x16d98d,_0x3be905),this['_createMarkersFromRanges'](_0x16d98d,_0x17d32c,!!_0x3be905);}['_createMarkersFromRanges'](_0x3c3f7e,_0x4de4e4,_0x5ca9b7){this['editor']['model']['change'](_0x1afc48=>{for(const _0x2f3c4d of _0x4de4e4){const _0x2a5e99=_0x5920b0()['substr'](0x1,0x5),_0x27d0fd='comment:'+_0x3c3f7e+':'+_0x2a5e99;_0x1afc48['addMarker'](_0x27d0fd,{'range':_0x2f3c4d,'usingOperation':_0x5ca9b7,'affectsData':_0x5ca9b7});}});}['_createCommentThread'](_0x5b4e4e,_0x502cdb){const _0x119b91=this['editor']['plugins']['get']('CommentsRepository'),_0x57896f=this['editor']['config']['get']('collaboration.channelId'),_0x2ee1d2=this['editor']['plugins']['get']('Users')['me'];if(!_0x2ee1d2)throw new _0x2df15f('addcommentthreadcommand-user-not-found',null);_0x119b91['addCommentThread']({'threadId':_0x5b4e4e,'channelId':_0x57896f,'comments':[{'authorId':_0x2ee1d2['id'],'content':_0x502cdb,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x555fb2){for(const _0x38d36a of _0x555fb2['getItems']())if(this['_itemIsContent'](_0x38d36a))return!0x0;return!0x1;}['_itemIsContent'](_0x36a318){return _0x36a318['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x36a318)&&!_0x36a318['is']('element','tableCell');}['_trimToContent'](_0x51ee1b){const _0x3e7223=_0x24a617=>!this['_itemIsContent'](_0x24a617['item']),_0x4a972e=_0x51ee1b['start']['getLastMatchingPosition'](_0x3e7223),_0x350cd5=_0x51ee1b['end']['getLastMatchingPosition'](_0x3e7223,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4a972e,_0x350cd5);}}class b extends _0x4d61fb{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a0256){super(_0x2a0256),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x340094=this['editor'],_0x1e5448=_0x340094['model']['document']['selection'],_0x21fd3f=_0x1734fd(()=>this['refreshSelectedViews'](),0xa);_0x1e5448['on']('change:range',(_0x16a38a,_0x1bce87)=>{_0x1bce87['directChange']&&(_0x21fd3f['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x340094['editing']['view']['document'],'change:isFocused',(_0x2e9974,_0x495c8c,_0x564b1b)=>{_0x564b1b&&_0x21fd3f();}),this['listenTo'](_0x340094['ui']['focusTracker'],'change:isFocused',(_0x1e3d7e,_0x554676,_0x49e840)=>{_0x49e840||this['fire']('blur',{'isAnnotationTracked':_0x31c774=>this['_editorAnnotationsData']['has'](_0x31c774['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x42be7b){if(this['_editorAnnotations']['has'](_0x42be7b['view']))return;this['_editorAnnotations']['add'](_0x42be7b['view']),this['editor']['ui']['focusTracker']['add'](_0x42be7b['view']['element']);const _0x37bf46=this['editor']['plugins']['get'](y);this['listenTo'](_0x37bf46['collection'],'remove',(_0x4f58ab,_0x570929)=>{this['editor']['ui']['focusTracker']['remove'](_0x570929['view']['element']),this['_editorAnnotations']['delete'](_0x570929['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x26463a){if('function'!=typeof _0x26463a)throw new _0x2df15f('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x26463a);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xecb3f8,annotations:_0x435f64}){const _0x266af6=[],_0x2d69cf=this['editor']['model']['document']['selection'],_0x582cba=Array['from'](_0x2d69cf['getRanges']());for(const [_0x5bdd34,_0x287ce6]of this['_editorAnnotationsData']){const _0x59ef49=_0x4c02ab(_0x287ce6),_0x280640=_0x435f64['getByInnerView'](_0x5bdd34);_0x59ef49&&_0x280640&&_0x266af6['push']({'annotation':_0x280640,'range':_0x59ef49});}function _0x4c02ab(_0x238b31){for(const _0x2eda62 of _0x238b31)for(const _0x5d354e of _0x582cba)if(_0x2eda62['containsRange'](_0x5d354e,!_0x2d69cf['isCollapsed']))return _0x2eda62;return null;}return _0x266af6['sort']((_0xff8f68,_0x17213a)=>{const _0xbb9d97=_0xff8f68['range'],_0x4982dc=_0x17213a['range'];if(!_0xbb9d97['isEqual'](_0x4982dc)){if(_0xbb9d97['containsRange'](_0x4982dc,!0x0))return 0x1;if(_0x4982dc['containsRange'](_0xbb9d97,!0x0))return-0x1;}return _0xff8f68['annotation']==_0xecb3f8?-0x1:_0x17213a['annotation']==_0xecb3f8?0x1:0x0;})['map'](_0xe9a7c5=>_0xe9a7c5['annotation']);}get['_editorAnnotationsData'](){const _0x3e5e2c=new Map();for(const _0x3b6955 of Array['from'](this['_dataCollectors']))for(const [_0x2d919c,_0x45013f]of _0x3b6955())_0x3e5e2c['set'](_0x2d919c,_0x45013f);return _0x3e5e2c;}}class st extends _0x4d61fb{['afterInit'](){const _0x1cc209=this['editor'];if(!_0x1cc209['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1cc209['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4d61fb{constructor(_0x2e15a0){super(_0x2e15a0),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1fb6aa=this['editor'],_0x4df519=_0x1fb6aa['commands']['get']('importWord'),_0x11b4e6=_0x1fb6aa['plugins']['get'](it);_0x4df519&&(_0x4df519['on']('execute',(_0x59fbfb,[,_0x3d4c2a])=>{_0x3d4c2a['collaboration_features']={'comments':!0x0,'user_id':_0x11b4e6['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x4df519,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1a599e,_0xfc5b14){const {comment_threads:_0x24e95e}=_0xfc5b14;_0x24e95e&&_0x24e95e['forEach'](({thread_id:_0x1773d9,comments:_0x52b627,is_resolved:_0x5d14a5})=>{const _0x54d516=new Date(),_0x2e0d5c=_0x52b627['map'](({author:_0xf96e83,content:_0x20baa1,created_at:_0x2805c0})=>({'content':_0x20baa1,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x54d516,'attributes':{'@external':{'authorName':_0xf96e83,'createdAt':_0x2805c0?new Date(_0x2805c0):new Date(),'source':'importWord'}}})),_0x109744=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x109744,'threadId':_0x1773d9,'comments':_0x2e0d5c,'resolvedAt':_0x5d14a5?_0x54d516:null});});}}class at extends _0x4d61fb{constructor(_0x5c1336){super(_0x5c1336),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x50e1b6=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x50e1b6,'contentInsertion',(_0x24ed5c,_0x5dc598)=>this['_removeMarkersWithoutThreads'](_0x5dc598['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xb4aed1){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xb4aed1;const _0x3ec1c3=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4c956c of _0xb4aed1['keys']()){const [_0x4f40e4,_0x333c3b]=_0x4c956c['split'](':');'comment'!=_0x4f40e4||_0x3ec1c3['hasCommentThread'](_0x333c3b)||_0xb4aed1['delete'](_0x4c956c);}return _0xb4aed1;}['_registerMarkerInClipboardPipeline'](){const _0x3c2b38=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1db10b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1db10b&&_0x3c2b38['_registerMarkerToCopy']('comment',_0x1db10b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1aa5f5){switch(_0x1aa5f5){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x2aad06){const _0x52203a=_0x2aad06['split'](':');return{'group':_0x52203a[0x0],'id':_0x52203a[0x1],'part':_0x52203a[0x2]};}class ut extends _0x4d61fb{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4cb465,_0x5b15a9)=>{if(!_0x5b15a9['options']['showCommentHighlights'])return null;if(_0x5b15a9['options']['ignoreResolvedComments']){const {id:_0x54f8b7}=ft(_0x4cb465['markerName']),_0x272308=this['editor']['plugins']['get'](o);if(_0x272308['getCommentThread'](_0x54f8b7)?.['isResolved']&&_0x4cb465['item'])return _0x5b15a9['consumable']['consume'](_0x4cb465['item'],'addMarker:'+_0x4cb465['markerName']),_0x5b15a9['consumable']['consume'](_0x4cb465['item'],'removeMarker:'+_0x4cb465['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x481583=>{_0x481583['on']('addMarker:comment',(_0x31abd8,_0x2b4c64,_0x34b767)=>{if(!_0x34b767['options']['showCommentHighlights'])return;const _0x5c2b7a=_0x2b4c64['item'];if(!_0x5c2b7a)return;const _0x10c545=_0x34b767['mapper']['toViewElement'](_0x5c2b7a);this['editor']['model']['schema']['isObject'](_0x5c2b7a)&&_0x10c545&&!_0x10c545['getCustomProperty']('widget')&&_0x10c545['is']('containerElement')&&_0x41480f(_0x10c545,_0x34b767['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x446bd2,{writer:_0x1b2b8f,options:_0xe0114b})=>{if(!_0xe0114b['showCommentHighlights'])return null;const _0x2b6cce=_0x1b2b8f['createContainerElement']('div'),_0x51427f=_0x1b2b8f['createEmptyElement']('hr');return _0x1b2b8f['addClass']('ck-horizontal-line',_0x2b6cce),_0x1b2b8f['insert'](_0x1b2b8f['createPositionAt'](_0x2b6cce,0x0),_0x51427f),_0x2b6cce;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x82236e,{writer:_0x4c1981,options:_0x253a5f})=>{if(!_0x253a5f['showCommentHighlights'])return null;const _0x25928d=_0x4c1981['createContainerElement']('span'),_0x4d9202=_0x4c1981['createEmptyElement']('img');return _0x4c1981['addClass']('image-inline',_0x25928d),_0x4c1981['insert'](_0x4c1981['createPositionAt'](_0x25928d,0x0),_0x4d9202),_0x25928d;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x35b570,{writer:_0x34d30c,options:_0x40df58})=>{if(_0x40df58['showCommentHighlights'])return _0x34d30c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x12e75b,_0x52b18c,_0x4f63ad)=>{_0x4f63ad['options']['showCommentHighlights']&&_0x12e75b['stop']();},{'priority':'high'});}}class r extends _0x4d61fb{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(_0x3aa0d5){super(_0x3aa0d5),this['set']('isThreadsLoadingPaused',!0x0),_0x3aa0d5['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4a2f83,_0x396fb4,_0x432911,_0x393b5d)=>{const _0x563f59=_0x3aa0d5['plugins']['get'](o),_0x51ffa8=_0x432911?ft(_0x432911)['id']:null;_0x3aa0d5['model']['change'](()=>{if(_0x51ffa8){const _0x3d0666=this['getAllMarkersForId'](_0x51ffa8);for(const _0x25ea74 of _0x3d0666)_0x3aa0d5['editing']['reconvertMarker'](_0x25ea74);}if(_0x393b5d){const {id:_0xb94bfb}=ft(_0x393b5d),_0x59ed45=_0x563f59['getCommentThread'](_0xb94bfb);if(_0x59ed45&&_0x59ed45['unlinkedAt'])return;if(_0x59ed45&&!_0x59ed45['isAttached'])return;const _0x452b65=this['getAllMarkersForId'](_0xb94bfb);for(const _0x34f079 of _0x452b65)_0x3aa0d5['editing']['reconvertMarker'](_0x34f079);}}),_0x51ffa8&&this['scrollToThreadMarker'](_0x51ffa8);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2fc561=this['editor'],_0x23e131=_0x2fc561['plugins']['get'](o),_0x25646e=_0x2fc561['config']['get']('collaboration.channelId'),_0x3377bc=_0x23e131['getCommentThreads']()['filter'](_0xeedc5c=>_0xeedc5c['channelId']!==_0x25646e);_0x2fc561['commands']['add']('addCommentThread',new ot(_0x2fc561)),this['listenTo'](_0x2fc561,'change:isReadOnly',(_0x1f2091,_0x4da005,_0x107340)=>{_0x23e131['switchReadOnly'](_0x107340,_0x2fc561['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x23e131,dt('addCommentThread',_0x25646e),(_0x435f1b,{threadId:_0x28b0f4})=>{const _0x14291f=this['editor']['plugins']['get'](o)['getCommentThread'](_0x28b0f4);_0x14291f?.['unlinkedAt']&&this['_attachArchivedThread'](_0x28b0f4);}),this['listenTo'](_0x23e131,dt('removeCommentThread',_0x25646e),(_0x4ffb3d,{threadId:_0x4dd8bc})=>{_0x2fc561['model']['enqueueChange']({'isUndoable':!0x1},_0x4176b5=>{const _0x13d8c6=this['getAllMarkersForId'](_0x4dd8bc);for(const _0x24257b of _0x13d8c6)_0x4176b5['removeMarker'](_0x24257b);});}),this['listenTo'](_0x23e131,dt('resolveCommentThread',_0x25646e),(_0x8b2d87,{threadId:_0x55542e})=>{(this['_reconvertMarkers'](_0x55542e),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x55542e)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x23e131,dt('reopenCommentThread',_0x25646e),(_0x3199c3,{threadId:_0x426712})=>{this['_reconvertMarkers'](_0x426712);},{'priority':'low'}),this['listenTo'](_0x23e131,dt('addComment',_0x25646e),(_0x27675e,{threadId:_0x1916ca,isFromAdapter:_0x251ff6})=>{const _0x4c1153=this['getAllMarkersForId'](_0x1916ca);if(_0x251ff6||0x0==_0x4c1153['length']||!_0x23e131['hasCommentThread'](_0x1916ca))return;0x1===_0x23e131['getCommentThread'](_0x1916ca)['length']&&_0x2fc561['model']['enqueueChange']({'isUndoable':!0x1},_0x50dd5e=>{for(const _0x82afed of _0x4c1153)_0x50dd5e['updateMarker'](_0x82afed,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3377bc);}['afterInit'](){!async function(_0x3d1595){const _0x393f1f=_0x32e498([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]),_0x22ce07=0x73460ab3,_0x33d639=0x7341885b^_0x22ce07,_0x1d4ad6=window[_0x32e498([0x44,0x61,0x74,0x65])][_0x32e498([0x6e,0x6f,0x77])](),_0x15c4ac=_0x3d1595[_0x32e498([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3319c1=new window[(_0x32e498([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d4168=>{_0x15c4ac[_0x32e498([0x6f,0x6e,0x63,0x65])](_0x32e498([0x72,0x65,0x61,0x64,0x79]),_0x3d4168);}),_0x4b6054={[_0x32e498([0x6b,0x74,0x79])]:_0x32e498([0x45,0x43]),[_0x32e498([0x75,0x73,0x65])]:_0x32e498([0x73,0x69,0x67]),[_0x32e498([0x63,0x72,0x76])]:_0x32e498([0x50,0x2d,0x32,0x35,0x36]),[_0x32e498([0x78])]:_0x32e498([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]),[_0x32e498([0x79])]:_0x32e498([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]),[_0x32e498([0x61,0x6c,0x67])]:_0x32e498([0x45,0x53,0x32,0x35,0x36])},_0x41a0df=_0x15c4ac[_0x32e498([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x32e498([0x67,0x65,0x74])](_0x32e498([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x460945(){let _0x118226,_0x26019a=null,_0xe56701=null;try{if(_0x41a0df==_0x32e498([0x47,0x50,0x4c]))return _0x32e498([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x118226=_0x47c625(),!_0x118226)return _0x32e498([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x118226[_0x32e498([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xe56701=_0x11d11a(_0x118226[_0x32e498([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x118226[_0x32e498([0x6a,0x74,0x69])])),await _0x1e7f71()?_0x17cfc3()?_0x194a04()?_0x32e498([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5c3d71()?(_0x118226[_0x32e498([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x32e498([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x26019a=_0x1a2fc4(_0x32e498([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3b5deb()):_0x32e498([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x32e498([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x32e498([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x32e498([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x194a04(){const _0x370671=[_0x32e498([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x32e498([0x74,0x72,0x69,0x61,0x6c])][_0x32e498([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x118226[_0x32e498([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1d4ad6/0x3e8:0xe10*_0x33d639;return _0x118226[_0x32e498([0x65,0x78,0x70])]<_0x370671;}function _0x17cfc3(){const _0x505ef8=_0x118226[_0x32e498([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x505ef8)return!0x1;if(_0x505ef8[_0x32e498([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32e498([0x2a])))return!0x0;if(_0x505ef8[_0x32e498([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32e498([0x43,0x4d,0x54])))return!0x0;if(_0x505ef8[_0x32e498([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32e498([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4168fc())return!0x0;if(_0x505ef8[_0x32e498([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32e498([0x52,0x43,0x4d,0x54]))){if(_0x7ca29e())return!0x0;if(_0x410086()||_0x3636fe())return!0x0;}return!0x1;}function _0x5c3d71(){const _0x4182fc=_0x118226[_0x32e498([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4182fc||0x0==_0x4182fc[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x368941}=new URL(window[_0x32e498([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4182fc[_0x32e498([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x368941))return!0x0;const _0x59e927=_0x368941[_0x32e498([0x73,0x70,0x6c,0x69,0x74])](_0x32e498([0x2e]));return _0x4182fc[_0x32e498([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x403c39=>_0x403c39[_0x32e498([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32e498([0x2a])))[_0x32e498([0x6d,0x61,0x70])](_0x21a42b=>_0x21a42b[_0x32e498([0x73,0x70,0x6c,0x69,0x74])](_0x32e498([0x2e])))[_0x32e498([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3da9cd=>_0x3da9cd[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x59e927[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x32e498([0x6d,0x61,0x70])](_0x2ad410=>Array(_0x59e927[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2ad410[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x32e498([0x66,0x69,0x6c,0x6c])](_0x2ad410[0x0]===_0x32e498([0x2a])?_0x32e498([0x2a]):'')[_0x32e498([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2ad410))[_0x32e498([0x73,0x6f,0x6d,0x65])](_0x502cc7=>_0x59e927[_0x32e498([0x65,0x76,0x65,0x72,0x79])]((_0x5a3eb6,_0x5601ec)=>_0x502cc7[_0x5601ec]===_0x5a3eb6||_0x502cc7[_0x5601ec]===_0x32e498([0x2a])));}function _0x3b5deb(){return _0x26019a&&_0xe56701?new window[(_0x32e498([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc6e27e,_0x1f120a)=>{_0x26019a[_0x32e498([0x74,0x68,0x65,0x6e])](_0xc6e27e,_0x1f120a),_0xe56701[_0x32e498([0x74,0x68,0x65,0x6e])](_0x2a878=>{_0x2a878!=_0x32e498([0x56,0x61,0x6c,0x69,0x64])&&_0xc6e27e(_0x2a878);},_0x1f120a);}):_0x26019a||_0xe56701||_0x32e498([0x56,0x61,0x6c,0x69,0x64]);}}function _0x11d11a(_0x22c7b2,_0x185cba){return new window[(_0x32e498([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x199f4c=>{if(_0x256b02())return _0x199f4c(_0x32e498([0x56,0x61,0x6c,0x69,0x64]));_0x23e424(),_0x15c4ac[_0x32e498([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x32e498([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1e8a38=!0x1;const _0x545b0e=_0x5920b0();function _0x36348a(_0x153b3f){return!!_0x153b3f&&(typeof _0x153b3f===_0x32e498([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x153b3f===_0x32e498([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x153b3f[_0x32e498([0x74,0x68,0x65,0x6e])]===_0x32e498([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x153b3f[_0x32e498([0x63,0x61,0x74,0x63,0x68])]===_0x32e498([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x546f88(_0x3b4d88){_0x4d61f4(_0x3b4d88)[_0x32e498([0x74,0x68,0x65,0x6e])](_0x116d36=>{if(!_0x116d36||_0x116d36[_0x32e498([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x32e498([0x6f,0x6b]))return _0x32e498([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xed6297(_0x1e336f(_0x545b0e+_0x185cba))!=_0x116d36[_0x32e498([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x32e498([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x32e498([0x56,0x61,0x6c,0x69,0x64]);})[_0x32e498([0x74,0x68,0x65,0x6e])](_0x48f75e=>(_0x14db32(),_0x48f75e),()=>{const _0x52b44d=_0x52eda9();return null==_0x52b44d?(_0x14db32(),_0x32e498([0x56,0x61,0x6c,0x69,0x64])):_0x32e498(_0x1d4ad6-_0x52b44d>(0x574a8eb3^_0x22ce07)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x32e498([0x74,0x68,0x65,0x6e])](_0x199f4c)[_0x32e498([0x63,0x61,0x74,0x63,0x68])](()=>{_0x199f4c(_0x32e498([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x396264=0x7370e433^_0x22ce07;function _0x14db32(){const _0xf27744=_0x32e498([0x6c,0x6c,0x63,0x74,0x2d])+_0xed6297(_0x1e336f(_0x22c7b2)),_0x831503=_0x1edc4d(_0xed6297(window[_0x32e498([0x4d,0x61,0x74,0x68])][_0x32e498([0x63,0x65,0x69,0x6c])](_0x1d4ad6/_0x396264)));window[_0x32e498([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x32e498([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xf27744,_0x831503);}function _0x52eda9(){const _0x2b5f5a=_0x32e498([0x6c,0x6c,0x63,0x74,0x2d])+_0xed6297(_0x1e336f(_0x22c7b2)),_0x1b6373=window[_0x32e498([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x32e498([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b5f5a);return _0x1b6373?window[_0x32e498([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1edc4d(_0x1b6373),0x10)*_0x396264:null;}function _0x4d61f4(_0x2d7109){return new window[(_0x32e498([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d0b5b,_0x141bc5)=>{_0x2d7109[_0x32e498([0x74,0x68,0x65,0x6e])](_0x3d0b5b,_0x141bc5),window[_0x32e498([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x141bc5,0x7347de73^_0x22ce07);});}}_0x15c4ac[_0x32e498([0x6f,0x6e])](_0x32e498([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1da579,_0x11ff92)=>{if(_0x11ff92[0x0]!=_0x22c7b2)return _0x199f4c(_0x32e498([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x11ff92[0x1]={..._0x11ff92[0x1],[_0x32e498([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x545b0e};},{[_0x32e498([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x32e498([0x68,0x69,0x67,0x68])}),_0x15c4ac[_0x32e498([0x6f,0x6e])](_0x32e498([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5187b8=>{_0x36348a(_0x5187b8[_0x32e498([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1e8a38=!0x0,_0x546f88(_0x5187b8[_0x32e498([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x32e498([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x32e498([0x6c,0x6f,0x77])}),_0x3319c1[_0x32e498([0x74,0x68,0x65,0x6e])](()=>{_0x1e8a38||_0x199f4c(_0x32e498([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x256b02(){return _0x15c4ac[_0x32e498([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x32e498([0x76,0x69,0x65,0x77])][_0x32e498([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x32e498([0x61,0x75,0x74,0x6f]);}function _0x23e424(){_0x15c4ac[_0x32e498([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x32e498([0x76,0x69,0x65,0x77])][_0x32e498([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x32e498([0x61,0x75,0x74,0x6f]);}}function _0x1a2fc4(_0x4d60a1){const _0x8ee48a=[new window[(_0x32e498([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21436f=>setTimeout(_0x21436f,0x734f347f^_0x22ce07)),_0x3319c1[_0x32e498([0x74,0x68,0x65,0x6e])](()=>new window[(_0x32e498([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x48722d=>{let _0x860bf4=0x0;_0x15c4ac[_0x32e498([0x6d,0x6f,0x64,0x65,0x6c])][_0x32e498([0x6f,0x6e])](_0x32e498([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x47b57e,_0x131aae)=>{_0x131aae[0x0][_0x32e498([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x860bf4++,_0x860bf4==(0x73460f5b^_0x22ce07)&&(_0x48722d(),_0x47b57e[_0x32e498([0x6f,0x66,0x66])]());});}))];return window[_0x32e498([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x32e498([0x72,0x61,0x63,0x65])](_0x8ee48a)[_0x32e498([0x74,0x68,0x65,0x6e])](()=>_0x4d60a1);}async function _0x3ae39c(){await _0x3319c1,_0x15c4ac[_0x32e498([0x6d,0x6f,0x64,0x65,0x6c])][_0x32e498([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x38da27,_0x15c4ac[_0x32e498([0x6d,0x6f,0x64,0x65,0x6c])][_0x32e498([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x38da27,_0x15c4ac[_0x32e498([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x32e498([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4168fc(){return window[_0x32e498([0x67,0x6c,0x6f,0x62])]&&window[_0x32e498([0x67,0x6c,0x6f,0x62])][_0x32e498([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x7ca29e(){return _0x2a40ba(_0x32e498([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4ca9d4(_0x32e498([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x32e498([0x73,0x74,0x61,0x74,0x65])]==_0x32e498([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x410086(){return _0x2a40ba(_0x32e498([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 _0x3636fe(){return _0x2a40ba(_0x32e498([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1d3d61(_0x1d1160){const _0x56704d=_0x153882();_0x15c4ac[_0x56704d]=_0x32e498([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1d1160,_0x1d1160!=_0x32e498([0x56,0x61,0x6c,0x69,0x64])&&_0x3ae39c();}function _0x153882(){const _0x223f0f=window[_0x32e498([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x32e498([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x32e498([0x6e,0x6f,0x77])]())[_0x32e498([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x32e498([0x2e]),'');let _0x21eb96=_0x32e498([0x4b]);for(let _0x1da72d=0x0;_0x1da72d<_0x223f0f[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1da72d+=0x2){let _0x2ea6d7=window[_0x32e498([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x223f0f[_0x32e498([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1da72d,_0x1da72d+0x2));_0x2ea6d7>=_0x393f1f[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2ea6d7-=_0x393f1f[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x21eb96+=_0x393f1f[_0x2ea6d7];}return _0x21eb96;}function _0x47c625(){const _0x5bb8c0=_0x41a0df[_0x32e498([0x73,0x70,0x6c,0x69,0x74])](_0x32e498([0x2e]));if(0x3!=_0x5bb8c0[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x59bdc8(_0x5bb8c0[0x1]);function _0x59bdc8(_0x33c276){const _0x560d5b=_0x3ad6dc(_0x33c276);return _0x560d5b&&_0x5c3663()?_0x560d5b:null;function _0x5c3663(){const _0x188b15=_0x560d5b[_0x32e498([0x6a,0x74,0x69])],_0x3f4696=window[_0x32e498([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x188b15[_0x32e498([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x188b15[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4dcd78={..._0x560d5b,[_0x32e498([0x6a,0x74,0x69])]:_0x188b15[_0x32e498([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x188b15[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4dcd78[_0x32e498([0x76,0x63])],_0x1e336f(_0x4dcd78)==_0x3f4696;}}}async function _0x1e7f71(){let _0xbf7937=!0x0;try{const _0x3ba577=_0x41a0df[_0x32e498([0x73,0x70,0x6c,0x69,0x74])](_0x32e498([0x2e])),[_0x176816,_0x2e004c,_0xf8fa54]=_0x3ba577;return _0x23a6e2(_0x176816),await _0x46b22c(_0x176816,_0x2e004c,_0xf8fa54),_0xbf7937;}catch{return!0x1;}function _0x23a6e2(_0x2ed7f5){const _0x37cbca=_0x3ad6dc(_0x2ed7f5);_0x37cbca&&_0x37cbca[_0x32e498([0x61,0x6c,0x67])]==_0x32e498([0x45,0x53,0x32,0x35,0x36])||(_0xbf7937=!0x1);}async function _0x46b22c(_0x3cda69,_0x5bf131,_0x27dc30){const _0x392792=window[_0x32e498([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x32e498([0x66,0x72,0x6f,0x6d])](_0x393802(_0x27dc30),_0x79649c=>_0x79649c[_0x32e498([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x391870=new window[(_0x32e498([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x32e498([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3cda69+_0x32e498([0x2e])+_0x5bf131),_0x5ac2b8=window[_0x32e498([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x32e498([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5ac2b8)return;const _0x5f1154=await _0x5ac2b8[_0x32e498([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x32e498([0x6a,0x77,0x6b]),_0x4b6054,{[_0x32e498([0x6e,0x61,0x6d,0x65])]:_0x32e498([0x45,0x43,0x44,0x53,0x41]),[_0x32e498([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x32e498([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x32e498([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5ac2b8[_0x32e498([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x32e498([0x6e,0x61,0x6d,0x65])]:_0x32e498([0x45,0x43,0x44,0x53,0x41]),[_0x32e498([0x68,0x61,0x73,0x68])]:{[_0x32e498([0x6e,0x61,0x6d,0x65])]:_0x32e498([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5f1154,_0x392792,_0x391870)||(_0xbf7937=!0x1);}}function _0x3ad6dc(_0x2f5386){return _0x2f5386[_0x32e498([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x32e498([0x65,0x79]))?JSON[_0x32e498([0x70,0x61,0x72,0x73,0x65])](_0x393802(_0x2f5386)):null;}function _0x393802(_0x52fe95){return window[_0x32e498([0x61,0x74,0x6f,0x62])](_0x52fe95[_0x32e498([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x32e498([0x2b]))[_0x32e498([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x32e498([0x2f])));}function _0x1e336f(_0x2917ae){let _0x26f5b5=0x1505;function _0x39a57b(_0x53c4d8){for(let _0x1c533a=0x0;_0x1c533a<_0x53c4d8[_0x32e498([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c533a++){const _0x29ebba=_0x53c4d8[_0x32e498([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1c533a);_0x26f5b5=(_0x26f5b5<<0x5)+_0x26f5b5+_0x29ebba,_0x26f5b5&=_0x26f5b5;}}function _0x4b4c52(_0x315164){Array[_0x32e498([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x315164)?_0x315164[_0x32e498([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4b4c52):_0x315164&&typeof _0x315164==_0x32e498([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x32e498([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x315164)[_0x32e498([0x73,0x6f,0x72,0x74])]()[_0x32e498([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xd8023c,_0x50574b])=>{_0x39a57b(_0xd8023c),_0x4b4c52(_0x50574b);}):_0x39a57b(window[_0x32e498([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x315164));}return _0x4b4c52(_0x2917ae),_0x26f5b5>>>0x0;}function _0xed6297(_0x529cff){return _0x529cff[_0x32e498([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x32e498([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x32e498([0x30]));}function _0x1edc4d(_0x26819c){return _0x26819c[_0x32e498([0x73,0x70,0x6c,0x69,0x74])]('')[_0x32e498([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x32e498([0x6a,0x6f,0x69,0x6e])]('');}function _0x2a40ba(_0x3a02df){return _0x15c4ac[_0x32e498([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x32e498([0x68,0x61,0x73])](_0x3a02df);}function _0x4ca9d4(_0x324fdc){return _0x15c4ac[_0x32e498([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x32e498([0x67,0x65,0x74])](_0x324fdc);}function _0x38da27(){}function _0x32e498(_0xaf6c08){return _0xaf6c08['map'](_0x113b8b=>String['fromCharCode'](_0x113b8b))['join']('');}_0x1d3d61(await _0x460945());}(this);}['destroy'](){const _0x4e394c=this['editor']['plugins']['get'](o),_0x26978d=this['editor']['config']['get']('collaboration.channelId');for(const _0x4dd0b9 of _0x4e394c['getCommentThreads']({'channelId':_0x26978d}))_0x4e394c['_detachCommentThread'](_0x4dd0b9['id']),_0x4e394c['_threads']['delete'](_0x4dd0b9['id']);super['destroy']();}['hasMarkerForId'](_0x1aba2c){return this['getAllMarkersForId'](_0x1aba2c)['length']>0x0;}['getAllMarkersForId'](_0xcfcde8){const _0x79d1b=[];for(const _0x182ea3 of this['editor']['model']['markers'])_0x182ea3['name']['startsWith']('comment:'+_0xcfcde8)&&_0x79d1b['push'](_0x182ea3);return _0x79d1b;}['scrollToThreadMarker'](_0x5e6bcd){setTimeout(()=>{const _0x3d013b=this['_getTargetForId'](_0x5e6bcd);if(!_0x3d013b)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5e6bcd&&nt({'target':_0x3d013b[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2340f9){this['editor']['model']['change'](()=>{for(const _0x980109 of this['getAllMarkersForId'](_0x2340f9))this['editor']['editing']['reconvertMarker'](_0x980109);});}['_attachArchivedThread'](_0x3137b3){const _0x587863=this['editor']['plugins']['get'](o),_0x597bfb=this['editor']['plugins']['get'](b),_0x3827a7=_0x587863['getCommentThread'](_0x3137b3);if(!_0x3827a7['isAttached']){const _0x17ee85=_0x3827a7['attachTo'](()=>this['_getTargetForId'](_0x3827a7['id']));_0x597bfb['registerAnnotation'](_0x17ee85),_0x3827a7['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x431aeb=this['editor'],_0x39d4ae=_0x431aeb['plugins']['get'](it);_0x431aeb['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1378a9,_0x51600b)=>{const {id:_0x5c3ded}=ft(_0x1378a9['markerName']),_0x4a1fdf=_0x431aeb['plugins']['get'](o)['getCommentThread'](_0x5c3ded),_0x49fb10=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5c3ded;let _0x53146b;if(_0x4a1fdf&&_0x4a1fdf['isResolved']&&!_0x49fb10&&_0x1378a9['item'])return _0x51600b['consumable']['consume'](_0x1378a9['item'],'addMarker:'+_0x1378a9['markerName']),_0x51600b['consumable']['consume'](_0x1378a9['item'],'removeMarker:'+_0x1378a9['markerName']),null;const _0x50b394=['ck-comment-marker'];return _0x49fb10&&_0x50b394['push']('ck-comment-marker--active'),_0x53146b=_0x4a1fdf?.['length']?_0x4a1fdf['comments']['first']['author']['id']:_0x39d4ae['me']['id'],{'classes':_0x50b394,'attributes':{'data-comment':_0x5c3ded,'data-author-id':_0x53146b}};}}),_0x431aeb['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xd5c8e6,{options:_0x500ad3})=>{if(_0x500ad3['showCommentHighlights'])return null;const _0x2c28f4=_0x431aeb['plugins']['get'](o),_0x164a71=_0x431aeb['model']['markers']['get'](_0xd5c8e6),{id:_0x18fca7,part:_0x366b9f}=ft(_0xd5c8e6);return _0x164a71&&!_0x164a71['affectsData']||_0x500ad3['ignoreResolvedComments']&&_0x2c28f4['getCommentThread'](_0x18fca7)?.['isResolved']?null:{'group':'comment','name':_0x366b9f?_0x18fca7+':'+_0x366b9f:_0x18fca7};}}),_0x431aeb['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3aac4a,{writer:_0x24c3b0})=>_0x24c3b0['createElement']('$marker',{'data-name':'comment:'+_0x3aac4a['getAttribute']('id')})}),_0x431aeb['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x31c27f=this['editor'],_0x4a3dd5=_0x31c27f['plugins']['get'](o),_0x1e3676=new Set(),_0x4b9886=new Set();_0x31c27f['model']['document']['registerPostFixer'](_0x5de05b=>{let _0x12aa8c=!0x1;for(const {name:_0x166d0e,data:_0x412621}of _0x31c27f['model']['document']['differ']['getChangedMarkers']()){const {group:_0x541252,id:_0x3a0092}=ft(_0x166d0e);let _0x258fec=_0x412621['newRange'];if('comment'!==_0x541252||!_0x258fec)continue;const _0x42ad38='$graveyard'===_0x258fec['root']['rootName'];_0x42ad38||(_0x258fec=ht(_0x258fec,_0x31c27f['model']),!_0x258fec||_0x258fec['isCollapsed']||!_0x412621['newRange']||_0x258fec['isEqual'](_0x412621['newRange']))?_0x31c27f['model']['hasContent'](_0x258fec)&&!_0x42ad38?this['isThreadsLoadingPaused']?_0x1e3676['add'](_0x166d0e):this['_handleThreadMarker'](_0x166d0e,_0x3a0092):(_0x4b9886['add'](_0x166d0e),_0x1e3676['delete'](_0x166d0e),_0x5de05b['removeMarker'](_0x166d0e),_0x12aa8c=!0x0):(_0x5de05b['updateMarker'](_0x166d0e,{'range':_0x258fec}),_0x12aa8c=!0x0);}return _0x12aa8c;}),this['on']('change:isThreadsLoadingPaused',(_0x370e5d,_0x535988,_0x5cf19a)=>{if(!_0x5cf19a&&_0x1e3676['size'])for(const _0x1b26df of _0x1e3676){const {id:_0x1679a6}=ft(_0x1b26df);_0x1e3676['delete'](_0x1b26df),_0x31c27f['model']['markers']['get'](_0x1b26df)&&this['_handleThreadMarker'](_0x1b26df,_0x1679a6);}}),this['listenTo'](_0x31c27f['model']['document'],'change',()=>{for(const {name:_0x5c496d,data:{newRange:_0x4523d5}}of _0x31c27f['model']['document']['differ']['getChangedMarkers']()){const {group:_0xee5e6c,id:_0x5083f2}=ft(_0x5c496d);if('comment'!==_0xee5e6c)continue;const _0x53d57a=_0x4a3dd5['getCommentThread'](_0x5083f2),_0x1ffba4=this['hasMarkerForId'](_0x5083f2);_0x53d57a&&(!_0x53d57a['_hasTargetInContent']&&_0x4523d5&&_0x31c27f['editing']['view']['once']('render',()=>{const _0x2fc77e=_0x31c27f['plugins']['get'](y),_0x2c61ea=_0x4a3dd5['_threadToController']['get'](_0x53d57a)['view'];_0x2fc77e['getByInnerView'](_0x2c61ea)['refreshVisibility']();},{'priority':'low'}),_0x53d57a['_hasTargetInContent']=_0x1ffba4||!!_0x4523d5),_0x4523d5||(_0x4b9886['add'](_0x5c496d),_0x1e3676['delete'](_0x5c496d));}for(const _0x50b7bf of _0x4b9886){const {id:_0x28cf95}=ft(_0x50b7bf),_0x5c0280=_0x4a3dd5['getCommentThread'](_0x28cf95);if(_0x1e3676['delete'](_0x50b7bf),!_0x5c0280)continue;const _0x5ba219=this['hasMarkerForId'](_0x28cf95);_0x5ba219||_0x5c0280['isSubmitted']?_0x5ba219||_0x5c0280['unlinkedAt']||_0x5c0280['setUnlinkedAt'](new Date()):_0x5c0280['remove']();}_0x4b9886['clear']();});}['_handleInitialThreads'](_0x52ac6e){_0x52ac6e['forEach'](_0x3a41c6=>{_0x3a41c6['unlinkedAt']&&this['_attachArchivedThread'](_0x3a41c6['id']);});}['_getTargetForId'](_0x3249a5){const _0x3fef80=this['editor'],_0x353ef9=this['getAllMarkersForId'](_0x3249a5);return et(_0x3fef80['editing'],_0x353ef9);}['_getTextContext'](_0x50c5d6){const _0x389101=this['getAllMarkersForId'](_0x50c5d6);let _0x404eaf='',_0x357b11=!0x1;for(const _0x400f85 of _0x389101){const _0x1f923a=_0x400f85['getRange']();for(const _0x4cea0e of Array['from'](_0x1f923a['getItems']()))_0x4cea0e['is']('$textProxy')?(_0x404eaf&&_0x357b11&&(_0x404eaf+='\x20',_0x357b11=!0x1),_0x404eaf+=_0x4cea0e['data']):_0x357b11=!0x0;_0x357b11=!0x0;}return _0x404eaf['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4293a0,_0x5df8f8){const _0x1b3096=this['editor'],_0xb642b=_0x1b3096['plugins']['get'](o);let _0x5491de=_0xb642b['getCommentThread'](_0x5df8f8);const _0x5c6a95=_0x1b3096['config']['get']('collaboration.channelId'),_0x4fea54=_0x1b3096['plugins']['get'](b);if(_0x5491de&&(_0x5491de['unlinkedAt']&&_0x5491de['setUnlinkedAt'](null),_0x5491de['isAttached']))return _0x5491de;return!this['getAllMarkersForId'](_0x5df8f8)[0x0]['managedUsingOperations']?_0x1b3096['editing']['view']['once']('render',()=>{if(_0xb642b['getCommentThread'](_0x5df8f8))return;const _0x4538e4=_0x1b3096['plugins']['get'](y);_0x5491de=_0xb642b['openNewCommentThread']({'channelId':_0x5c6a95,'threadId':_0x5df8f8,'target':()=>this['_getTargetForId'](_0x5df8f8),'context':{'type':'text','value':this['_getTextContext'](_0x5df8f8)}});const _0x53405a=_0xb642b['_threadToController']['get'](_0x5491de)['view'],_0x1984a9=_0x4538e4['getByInnerView'](_0x53405a);_0x1984a9&&_0x4fea54['registerAnnotation'](_0x1984a9);},{'priority':'low'}):_0xb642b['fetchCommentThread']({'channelId':_0x5c6a95,'threadId':_0x5df8f8})['then'](_0x538966=>{if('destroyed'!==_0x1b3096['state']){if(_0x5491de=_0x538966,_0x5491de&&!_0x5491de['isAttached']){const _0x48dd7a=_0x5491de['attachTo'](()=>this['_getTargetForId'](_0x5df8f8));_0x4fea54['registerAnnotation'](_0x48dd7a),_0x5491de['isResolved']&&this['_reconvertMarkers'](_0x5df8f8);}else{if(!_0x5491de){const _0x13e9a3=this['getAllMarkersForId'](_0x5df8f8);_0x1b3096['model']['change'](_0x3bc170=>{for(const _0x400a6c of _0x13e9a3)_0x3bc170['removeMarker'](_0x400a6c);});}}}}),_0x5491de;}['_handleThreadMarker'](_0xf14eba,_0x47ec3b){const _0x276c2b=this['_attachMarkerToThread'](_0xf14eba,_0x47ec3b);_0x276c2b&&!_0x276c2b['context']&&_0x276c2b['setContext']({'type':'text','value':this['_getTextContext'](_0x47ec3b)});}['_initAriaMarkerChangeAnnouncements'](){const _0x551ab5=this['editor'];rt(_0x551ab5['model'],({left:_0x3cb797,entered:_0x18c2fa})=>{for(const _0x291ed8 of _0x3cb797)if(mt(_0x291ed8)){_0x551ab5['ui']['ariaLiveAnnouncer']['announce'](N(_0x551ab5['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x33643e of _0x18c2fa)if(mt(_0x33643e)){_0x551ab5['ui']['ariaLiveAnnouncer']['announce'](N(_0x551ab5['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x1e512c)));break;}});}}function dt(_0x877f27,_0x17543c){return _0x17543c?_0x877f27+':'+_0x17543c:_0x877f27;}function ht(_0x18dd03,_0x5cf85){const _0x54c95e=_0x5cf85['schema'],_0x1a7fd1=_0x5cf85['createRange'](_0x18dd03['start']);for(const _0x2ef309 of _0x18dd03['getWalker']()){const {type:_0x226bb4,item:_0xe916ea,nextPosition:_0xb23657}=_0x2ef309;if('text'===_0x226bb4||_0x54c95e['isObject'](_0xe916ea)){const _0x43bc77=_0x5cf85['createPositionBefore'](_0xe916ea);_0x1a7fd1['isCollapsed']&&(_0x1a7fd1['start']=_0x43bc77),_0x1a7fd1['end']=_0xb23657;}}return _0x1a7fd1;}function mt(_0x4a1e88){return'comment'===ft(_0x4a1e88['name'])['group'];}class s extends _0x4d61fb{['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 _0x40c87d=this['editor'],_0x331d25=_0x40c87d['plugins']['get'](o),_0x80ab47=_0x40c87d['plugins']['get'](r),_0x410b16=_0x40c87d['plugins']['get'](y),_0x57ab83=_0x40c87d['plugins']['get'](b);_0x40c87d['ui']['componentFactory']['add']('comment',()=>{const _0x2adf22=this['_createUIButton'](_0xabb329);return _0x2adf22['tooltip']=!0x0,_0x2adf22;}),_0x40c87d['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2c6989)),_0x57ab83['addSourceCollector'](()=>{const _0x23d4cc=[];for(const [_0x375b46,_0x59cf99]of _0x331d25['_threadToController']){const _0x34a47a=_0x80ab47['getAllMarkersForId'](_0x375b46['id']),_0x2bdbb0=_0x34a47a['map'](_0x32a33c=>_0x32a33c['getRange']());_0x34a47a['length']>0x0&&_0x23d4cc['push']([_0x59cf99['view'],_0x2bdbb0]);}return _0x23d4cc;}),this['listenTo'](_0x410b16,'change:activeAnnotations',(_0x4a72c0,_0x573623,_0x4cc669)=>{const _0xcfb649=Array['from'](_0x4cc669)['map'](_0x47a316=>_0x47a316['innerView'])['find'](_0x5aa880=>_0x331d25['_viewToController']['has'](_0x5aa880));if(!_0xcfb649)return void(_0x80ab47['activeMarker']=null);const _0x33f143=_0x331d25['_viewToController']['get'](_0xcfb649)['model']['id'],_0x13aa92='comment:'+_0x33f143;_0x33f143&&_0x80ab47['hasMarkerForId'](_0x33f143)?_0x80ab47['activeMarker']=_0x13aa92:_0x80ab47['activeMarker']&&(_0x80ab47['activeMarker']=null);}),this['listenTo'](_0x331d25,'removeCommentThread',(_0x3e338f,{threadId:_0x44d07a,isFromAdapter:_0xbe1e86})=>{!_0xbe1e86&&_0x40c87d['ui']['focusTracker']['isFocused']&&_0x80ab47['hasMarkerForId'](_0x44d07a)&&_0x40c87d['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x331d25,'addComment',(_0x16d8b5,{threadId:_0x55fdfe,isFromAdapter:_0x832998})=>{if(_0x832998||!_0x80ab47['hasMarkerForId'](_0x55fdfe)||!_0x331d25['hasCommentThread'](_0x55fdfe))return;0x1===_0x331d25['getCommentThread'](_0x55fdfe)['length']&&(_0x40c87d['editing']['view']['focus'](),_0x16d8b5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x32477b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x51cc45;for(const _0x428a14 in _0x32477b){const _0x336bfc=_0x428a14,_0x2d622a=_0x32477b[_0x336bfc];if('commentsLicenseKeyValid'==_0x2d622a||'commentsLicenseKeyInvalid'==_0x2d622a||'commentsLicenseKeyExpired'==_0x2d622a||'commentsLicenseKeyDomainLimit'==_0x2d622a||'commentsLicenseKeyNotAllowed'==_0x2d622a||'commentsLicenseKeyEvaluationLimit'==_0x2d622a||'commentsLicenseKeyUsageLimit'==_0x2d622a){delete _0x32477b[_0x336bfc],_0x51cc45=_0x2d622a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x51cc45&&_0x32477b['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x51cc45&&_0x32477b['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x51cc45&&_0x32477b['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x51cc45&&_0x32477b['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x51cc45&&_0x32477b['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x51cc45&&_0x32477b['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4b2367){const _0x10a534=this['editor'],_0x21684d=new _0x4b2367(_0x10a534['locale']),_0x2e52e7=_0x10a534['commands']['get']('addCommentThread');return _0x21684d['set']({'label':N(_0x10a534['locale'],'Comment'),'icon':_0x5ba027}),_0x21684d['bind']('isEnabled')['to'](_0x2e52e7,'isEnabled',_0x2e52e7,'hasContent',(_0x24076e,_0x191433)=>_0x24076e&&_0x191433),this['listenTo'](_0x21684d,'execute',()=>{_0x2e52e7['execute']();}),_0x21684d;}}class i extends _0x4d61fb{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x554c49){super(_0x554c49),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5d0d1b,_0x32f783,_0x1d55d5)=>{_0x1d55d5?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x543369,_0x470294]of this['editor']['commands'])_0x470294['affectsData']&&'addCommentThread'!==_0x543369&&_0x470294['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 _0x26a441=this['editor']['editing']['view']['document'];this['listenTo'](_0x26a441,'cut',_0x3030ed=>_0x3030ed['stop'](),{'priority':'highest'}),this['listenTo'](_0x26a441,'clipboardInput',_0xec13d8=>_0xec13d8['stop'](),{'priority':'highest'}),this['listenTo'](_0x26a441,'delete',_0x19635f=>_0x19635f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1f6964,_0x2a7002]of this['editor']['commands'])_0x2a7002['affectsData']&&'addCommentThread'!==_0x1f6964&&_0x2a7002['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 _0x5bb154{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x470bb4){super(_0x470bb4),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4c016e=this['context']['plugins']['get'](y);this['listenTo'](_0x4c016e,'_activateAnnotation',(_0x303e3,_0x4bd40b)=>{for(const _0x225854 of this['activeUIs']){const _0x2748ff=this['_uis']['get'](_0x225854);(0x0,this['uisData']['get'](_0x225854)['filter'])(_0x4bd40b)&&_0x2748ff['setActiveAnnotation'](_0x4bd40b);}}),this['listenTo'](_0x4c016e,'_deactivateAllAnnotations',()=>{for(const _0x420f53 of this['activeUIs']){this['_uis']['get'](_0x420f53)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4c016e['_visibleAnnotations'],'add',(_0x2025c1,_0x4ee4df)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4ee4df);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4a6769){return this['activeUIs']['has'](_0x4a6769);}['activate'](_0x56eaa2,_0x22d662=this['defaultFilter']){const _0x2f93b4=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x56eaa2))throw new _0x2df15f('annotationsuis-missing-ui',this,{'uiName':_0x56eaa2});this['isActive'](_0x56eaa2)&&this['deactivate'](_0x56eaa2),this['activeUIs']['add'](_0x56eaa2);const _0x403899=new S();v({'source':_0x2f93b4['_visibleAnnotations'],'target':_0x403899,'filter':_0x22d662}),this['uisData']['set'](_0x56eaa2,{'collection':_0x403899,'filter':_0x22d662});const _0x1c043b=this['_uis']['get'](_0x56eaa2);_0x1c043b['attach'](_0x403899),this['listenTo'](_0x1c043b,'change:activeAnnotation',(_0x49d418,_0x2d5333,_0x1b6a63,_0x59cf24)=>{_0x59cf24&&_0x2f93b4['_removeActiveAnnotation'](_0x59cf24),_0x1b6a63&&_0x2f93b4['_addActiveAnnotation'](_0x1b6a63);});}['deactivate'](_0x43e3cb){if(this['activeUIs']['delete'](_0x43e3cb),!this['_uis']['has'](_0x43e3cb))throw new _0x2df15f('annotationsuis-missing-ui',this,{'uiName':_0x43e3cb});const _0x4ebe62=this['_uis']['get'](_0x43e3cb);_0x4ebe62['detach'](),this['stopListening'](_0x4ebe62),this['uisData']['get'](_0x43e3cb)['collection']['destroy'](),this['uisData']['delete'](_0x43e3cb);}['switchTo'](_0x49c7d6){if(!this['_uis']['has'](_0x49c7d6))throw new _0x2df15f('annotationsuis-missing-ui',this,{'uiName':_0x49c7d6});const _0x119c81=this['context']['plugins']['get'](y),_0x20f5d3=Array['from'](_0x119c81['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x49c7d6);const _0x18cdac=this['_uis']['get'](_0x49c7d6);_0x18cdac['setActiveAnnotation'](_0x20f5d3),_0x18cdac['_setSelectedAnnotations']&&_0x20f5d3&&_0x18cdac['_setSelectedAnnotations']([_0x20f5d3]);}['deactivateAll'](){for(const _0x306ab0 of this['activeUIs'])this['deactivate'](_0x306ab0);}['register'](_0x3a0fa6,_0x817f1b){if(this['_uis']['has'](_0x3a0fa6))throw new _0x2df15f('annotationsuis-register-already-registered');if('function'!=typeof _0x817f1b['attach']||'function'!=typeof _0x817f1b['detach']||'function'!=typeof _0x817f1b['setActiveAnnotation'])throw new _0x2df15f('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3a0fa6,_0x817f1b);}['refilterAnnotations'](){const _0x403411=this['context']['plugins']['get'](y)['collection'],_0x41d5fc=new Map(),_0x24bc3b=Array['from'](this['activeUIs']);for(const _0x5a8e33 of this['activeUIs']){const _0x33e678=this['uisData']['get'](_0x5a8e33)['collection'];for(const _0x4b22bc of _0x33e678)_0x41d5fc['set'](_0x4b22bc,_0x5a8e33);}for(const _0x1c3d9c of _0x403411){const _0x39fab0=_0x41d5fc['get'](_0x1c3d9c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1c3d9c);const _0x345533=_0x24bc3b['find'](_0x472470=>this['uisData']['get'](_0x472470)['filter'](_0x1c3d9c));_0x39fab0!==_0x345533&&(_0x39fab0&&this['uisData']['get'](_0x39fab0)['collection']['remove'](_0x1c3d9c),_0x345533&&this['uisData']['get'](_0x345533)['collection']['add'](_0x1c3d9c));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1cf2d0){const _0x54f0d7=[];for(const _0x480854 of this['activeUIs']){(0x0,this['uisData']['get'](_0x480854)['filter'])(_0x1cf2d0)&&_0x54f0d7['push'](_0x480854);}if(_0x54f0d7['length']>0x1)throw new _0x2df15f('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x54f0d7,'annotationType':_0x1cf2d0['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4b9d76){super(_0x4b9d76);const _0x1359b1=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 _0x151ecd(),this['focusCycler']=new _0x4e2b55({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1359b1['to']('class')],'style':{'minHeight':_0x1359b1['to']('minHeight',_0x4e8939=>'number'==typeof _0x4e8939?_i(_0x4e8939+0xa):null)},'dir':_0x4b9d76['uiLanguageDirection'],'role':'application','aria-label':N(_0x4b9d76,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x4b9d76,'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',_0x3a5d85=>{this['_updateItemPositionInFocusables'](_0x3a5d85['source']);}),this['list']['forEach'](_0x234e78=>{this['focusTracker']['add'](_0x234e78['element']),this['_updateItemPositionInFocusables'](_0x234e78);}),this['list']['on']('change',(_0x3ab6c3,_0x14ed14)=>{for(const _0xc01edf of _0x14ed14['removed'])this['focusTracker']['remove'](_0xc01edf['element']),this['focusables']['remove'](_0xc01edf);for(const _0x5e209b of _0x14ed14['added'])this['focusTracker']['add'](_0x5e209b['element']),this['_updateItemPositionInFocusables'](_0x5e209b);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5bab05){const _0x933a6=this['focusables']['getIndex'](_0x5bab05);let _0x4fce77,_0x4bbf05;for(const _0x4ea49b of this['focusables'])if(_0x5bab05['top']<_0x4ea49b['top']){_0x4fce77=_0x4ea49b;break;}if(_0x4bbf05=_0x4fce77?this['focusables']['getIndex'](_0x4fce77):this['focusables']['length'],-0x1!==_0x933a6){if(_0x933a6===_0x4bbf05-0x1)return;this['focusables']['remove'](_0x5bab05),_0x4bbf05=_0x4fce77?this['focusables']['getIndex'](_0x4fce77):this['focusables']['length'];}this['focusables']['add'](_0x5bab05,_0x4bbf05);}}const Ot=/* #__PURE__ -- @preserve */
33
- Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x21ebba){super(_0x21ebba),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x8cf437,_0x3fcf0c)=>_0x8cf437+_0x3fcf0c),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1a3f13=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1a3f13['to']('isAnimationDisabled',_0x898470=>_0x898470?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1a3f13['to']('top',_0x11f8a0=>Ot(_0x11f8a0))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1f4735=this['element']['clientHeight'];_0x1f4735&&(this['height']=_0x1f4735);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x5bb154{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x423d6d){super(_0x423d6d),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 _0x2256ae=this['context']['config']['get']('sidebar.container');_0x2256ae&&this['setContainer'](_0x2256ae);}['setContainer'](_0x1fe1b8){if(!g(_0x1fe1b8))throw new _0x2df15f('sidebar-setcontainer-invalid-element');this['container']=_0x1fe1b8;}['_attachToContainer']({viewClass:_0x2417d8='',spaceBetweenItems:_0x79c28d=0x19}={}){if(!g(this['container']))throw new _0x2df15f('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2417d8,this['_spaceBetweenItems']=_0x79c28d;}['rearrange']({removedAnnotation:_0x1b18bd,previousAnnotation:_0xbdae43,nextAnnotation:_0x473b61}){const _0x87b6ba=this['getSidebarItemView'](_0x1b18bd);this['view']['list']['remove'](_0x87b6ba),this['_destroySidebarItemView'](_0x1b18bd),_0xbdae43&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xbdae43)),_0x473b61&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x473b61)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x46f0aa,activatedAnnotation:_0x5218ed,disableAnimationOnActivatedAnnotation:_0x17c7f9}){if(this['_activeAnnotation']=_0x5218ed,_0x46f0aa){_0x46f0aa['isActive']=!0x1;const _0x4ca270=this['getSidebarItemView'](_0x46f0aa);_0x4ca270&&_0x17c7f9&&(_0x4ca270['isAnimationDisabled']=!0x1);}if(_0x5218ed){const _0x7c2cce=this['getSidebarItemView'](_0x5218ed);_0x7c2cce&&(_0x5218ed['isActive']=!0x0,_0x17c7f9&&(_0x7c2cce['isAnimationDisabled']=!0x0,_0x7c2cce['top']+=0x1),this['_alignToTargetRect'](_0x7c2cce));}}['_detachFromContainer'](_0x517108){if(this['view']['element']['remove'](),_0x517108){for(const _0x5dca5f of _0x517108)this['_destroySidebarItemView'](_0x5dca5f);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x37e9f1,_0x513b18){_0x513b18||(_0x513b18=_0x37e9f1['view']);const _0x237dbc=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x237dbc,_0x37e9f1),this['_annotationToSidebarItemView']['set'](_0x37e9f1,_0x237dbc),_0x237dbc['content']['add'](_0x513b18),this['listenTo'](_0x37e9f1['view'],'change:targetRect',(_0x1c225d,_0x1acedb,_0x573c58)=>{const _0x409b70=this['_getTargetTop'](_0x37e9f1,_0x573c58);_0x237dbc['_targetTop']!=_0x409b70&&(_0x237dbc['_targetTop']=_0x409b70,this['_setItemTop'](_0x237dbc,_0x409b70));}),this['listenTo'](_0x237dbc,'change:top',()=>{this['_recalculate'](_0x237dbc,'top');}),this['listenTo'](_0x237dbc,'change:bottom',()=>{this['_recalculate'](_0x237dbc,'bottom');}),this['_alignToTargetRect'](_0x237dbc);const _0xfc881f=this['_getItemBefore'](_0x237dbc);if(_0xfc881f)this['_alignAfterItem'](_0xfc881f,_0x237dbc)||this['_alignToTargetRect'](_0x237dbc);else this['_alignToTargetRect'](_0x237dbc);return this['_updateLastItem'](),this['view']['list']['add'](_0x237dbc),_0x237dbc;}['_alignForTopChange'](_0xe79afb){if(!_0xe79afb['content']['length'])return;const _0x49f699=this['_getItemBefore'](_0xe79afb);if(!_0x49f699)return;const _0x1c76c8=this['_sidebarItemViewToAnnotation']['get'](_0x49f699),_0x163029=this['_activeAnnotation'];_0x163029&&_0x163029===_0x1c76c8?this['_alignAfterItem'](_0x49f699,_0xe79afb):this['_alignBeforeItem'](_0xe79afb,_0x49f699);}['_alignForBottomChange'](_0x9709bd){if(!_0x9709bd['content']['length'])return;const _0xbdae17=this['_getItemAfter'](_0x9709bd);if(!_0xbdae17)return;const _0x211c1f=this['_sidebarItemViewToAnnotation']['get'](_0xbdae17),_0x278401=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5c2ab0=this['_activeAnnotation'];_0x5c2ab0&&_0x5c2ab0===_0x211c1f&&_0x278401?(this['_alignBeforeItem'](_0xbdae17,_0x9709bd),this['_alignAfterItem'](_0x9709bd,_0xbdae17)):_0x5c2ab0&&_0x5c2ab0===_0x211c1f?this['_alignBeforeItem'](_0xbdae17,_0x9709bd):this['_alignAfterItem'](_0x9709bd,_0xbdae17);}['_recalculate'](_0x564c43,_0x4db482){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x269eb2,changedProp:_0x5917a2}of this['_recalculateBuffer'])'top'===_0x5917a2?this['_alignForTopChange'](_0x269eb2):this['_alignForBottomChange'](_0x269eb2);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x564c43,'changedProp':_0x4db482});}['getSidebarItemView'](_0x6ee98){return this['_annotationToSidebarItemView']['get'](_0x6ee98);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1eb128){const _0x18514f=this['getSidebarItemView'](_0x1eb128);this['stopListening'](_0x18514f),this['stopListening'](_0x1eb128['view']),_0x18514f['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1eb128),this['_sidebarItemViewToAnnotation']['delete'](_0x18514f);}['_createSidebarView'](){const _0x18e515=new H(this['context']['locale']);return _0x18e515['render'](),this['on']('change:_lastItem',(_0x4640d7,_0x3f2d9d,_0x4ac078,_0x58dd6d)=>{_0x58dd6d&&_0x18e515['unbind']('minHeight'),_0x4ac078?_0x18e515['bind']('minHeight')['to'](_0x4ac078,'bottom'):_0x18e515['minHeight']=null;}),_0x18e515;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5841f7){const _0x47b0b7=this['_sidebarItemViewToAnnotation']['get'](_0x5841f7),_0x57225a=_0x47b0b7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x47b0b7)-0x1);return _0x57225a&&this['getSidebarItemView'](_0x57225a)||null;}['_getItemAfter'](_0x2ca67e){const _0xf7ceca=this['_sidebarItemViewToAnnotation']['get'](_0x2ca67e),_0x127cb2=_0xf7ceca&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xf7ceca)+0x1);return _0x127cb2&&this['getSidebarItemView'](_0x127cb2)||null;}['_alignBeforeItem'](_0x4df77f,_0x4c0f04){_0x4df77f['updateHeight']();const _0x523799=G(_0x4c0f04['bottom']+this['_spaceBetweenItems'],_0x4df77f['top']);return!!_0x523799&&(this['_setItemTop'](_0x4c0f04,_0x4c0f04['top']-_0x523799),!0x0);}['_alignAfterItem'](_0x4a3f9e,_0x669798){_0x4a3f9e['updateHeight']();const _0x5abca5=G(_0x4a3f9e['bottom']+this['_spaceBetweenItems'],_0x669798['top']);return!!_0x5abca5&&(this['_setItemTop'](_0x669798,_0x669798['top']+_0x5abca5,!0x1),!0x0);}['_alignToTargetRect'](_0x4f161a){const _0x841e44=this['_sidebarItemViewToAnnotation']['get'](_0x4f161a);if(!_0x841e44||!_0x841e44['target']||!_0x841e44['targetRect'])return;const _0x255456=this['_getTargetTop'](_0x841e44,_0x841e44['targetRect']);this['_setItemTop'](_0x4f161a,_0x255456);}['_getTargetTop'](_0x2b6059,_0x10538b){if(null===_0x10538b)return 0x0;if(_0x2b6059['target']instanceof _0x318b84)return _0x10538b['top'];{const _0xca6342=new _0x318b84(this['view']['element'])['top'];return _0x10538b['top']-_0xca6342;}}['_setItemTop'](_0x1774ee,_0x5a3bb3,_0x322778=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x322778&&(_0x5a3bb3=Math['max'](_0x5a3bb3,this['_getMaxAvailableTop'](_0x1774ee))),_0x1774ee['top']=_0x5a3bb3;}['_getMaxAvailableTop'](_0x1035c8){let _0x33b887=this['_getItemBefore'](_0x1035c8),_0x39cfff=0x0;for(;_0x33b887;)_0x33b887['updateHeight'](),_0x39cfff+=this['_spaceBetweenItems']+_0x33b887['height'],_0x33b887=this['_getItemBefore'](_0x33b887);return _0x39cfff;}}function G(_0x363c3d,_0x327b86){return Math['max'](_0x363c3d-_0x327b86,0x0);}function g(_0x3da6a2){return null!==_0x3da6a2&&'object'==typeof _0x3da6a2&&0x1===_0x3da6a2['nodeType'];}class e extends _0x5bb154{['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(_0x436fc4){super(_0x436fc4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4b4c8c(),this['_refreshPositioningDebounced']=_0x1734fd(()=>{_0x436fc4['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5b58b5=this['context']['plugins']['get'](j),_0x1ad47c=this['context']['plugins']['get'](z);_0x5b58b5['register']('wideSidebar',this),_0x1ad47c['container']&&_0x5b58b5['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5dae4e){if(_0x5dae4e===this['activeAnnotation'])return;const _0x33738c=this['context']['plugins']['get'](z);_0x33738c['_activeAnnotation']=_0x5dae4e;const _0xf6285b=this['activeAnnotation'];_0x33738c['refresh']({'blurredAnnotation':_0xf6285b,'activatedAnnotation':_0x5dae4e}),this['activeAnnotation']=_0x5dae4e;}['attach'](_0x5c08a1){this['annotations']=_0x5c08a1;const _0x342986=this['context']['plugins']['get'](z);if(_0x342986['_annotations']=_0x5c08a1,this['isAttached'])throw new _0x2df15f('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x342986,'set:container',()=>{this['detach'](),this['listenTo'](_0x342986,'change:container',_0xed138e=>{_0xed138e['off'](),this['attach'](_0x5c08a1);});}),_0x342986['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3e51f3=_0x45f409=>{_0x45f409['updateTargetRect'](),_0x342986['addAnnotation'](_0x45f409);};for(const _0x25c1c5 of _0x5c08a1)_0x3e51f3(_0x25c1c5);this['listenTo'](_0x5c08a1,'add',(_0xf78c51,_0x16fa1c)=>{_0x3e51f3(_0x16fa1c);}),this['listenTo'](_0x5c08a1,'remove',(_0x375e87,_0x90255d,_0x529a26)=>{_0x342986['rearrange']({'removedAnnotation':_0x90255d,'previousAnnotation':_0x5c08a1['get'](_0x529a26-0x1),'nextAnnotation':_0x5c08a1['get'](_0x529a26+0x1)}),_0x90255d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5c08a1,'focus',(_0x5d61b9,_0x51f5cc)=>{this['setActiveAnnotation'](_0x51f5cc);}),this['listenTo'](_0x5c08a1,'blur',()=>{this['setActiveAnnotation'](null);});const _0x56c6b0=this['context']instanceof _0x11113e?this['context']['editors']:new _0x4b4c8c([this['context']]);for(const _0x31a6f5 of _0x56c6b0)this['_integrateWithEditorAnnotations'](_0x31a6f5);this['listenTo'](_0x56c6b0,'add',(_0x44b628,_0x16ce8a)=>{this['listenTo'](_0x16ce8a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x16ce8a);});}),this['listenTo'](_0x56c6b0,'remove',(_0x38b4a3,_0x8d3ddd)=>{_0x8d3ddd['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x8d3ddd['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2df15f('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3c06a0=this['context']['plugins']['get'](z);_0x3c06a0['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3c06a0),this['stopListening'](this['annotations']),this['context']instanceof _0x11113e&&this['stopListening'](this['context']['editors']);for(const _0x3986a6 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3986a6);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1111eb){if(!_0x1111eb['plugins']['has']('EditorAnnotations'))return;const _0x5c609b=_0x1111eb['plugins']['get']('EditorAnnotations'),_0x537a92=()=>{const _0x3f5bb6=_0x5c609b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3f5bb6[0x0]||null);};this['listenTo'](_0x5c609b,'refresh',_0x537a92),this['listenTo'](_0x5c609b,'blur',(_0x2a5f30,{isAnnotationTracked:_0x1af4ee})=>{this['activeAnnotation']&&_0x1af4ee(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5c609b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x22a31a=>{_0x5c609b['hasDomSelection']()&&(_0x537a92(),_0x22a31a['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5c609b);}['_destroyEditorAnnotationsIntegration'](_0x75eb8f){this['stopListening'](_0x75eb8f),this['_editorAnnotations']['remove'](_0x75eb8f);}}class C extends _0xabb329{['counterView'];constructor(_0x3337b2){super(_0x3337b2);const _0x19e514=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x19d2a8,_0x5e1e45)=>_0x19d2a8?'...':_0x5e1e45['toString']()),this['set']('annotationType',''),this['icon']=_0x5ba027,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x19e514['to']('annotationType',_0xffe133=>'ck-annotation-counter__badge--'+_0xffe133),_0x19e514['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x19e514['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x5bb154{['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(_0x52d7f3){super(_0x52d7f3),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x48ff8e())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4b4c8c(),this['_refreshPositioningDebounced']=_0x1734fd(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x50ea24(this['context']['locale']),this['balloonPanelView']=new _0x2d08b9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x119f9c){this['annotations']=_0x119f9c;const _0x3f37fa=this['context']['plugins']['get'](z),_0x3f4083=this['balloonPanelView'];if(_0x3f37fa['_annotations']=_0x119f9c,this['isAttached'])throw new _0x2df15f('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3f37fa,'set:container',()=>{this['detach'](),this['listenTo'](_0x3f37fa,'change:container',_0x5958a6=>{_0x5958a6['off'](),this['attach'](_0x119f9c);});}),_0x3f37fa['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x347e95=_0xce6170=>{const _0x377a52=new C(this['context']['locale']);_0x3f37fa['addAnnotation'](_0xce6170,_0x377a52),this['_annotationToNarrowView']['set'](_0xce6170,_0x377a52),_0x377a52['bind']('isDirty','annotationType','number')['to'](_0xce6170['view'],'isDirty','type','length'),_0x377a52['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3f4083['content']['first']!==_0xce6170['view']?(this['_showBalloon'](_0xce6170),_0xce6170['view']['element']['focus'](),this['setActiveAnnotation'](_0xce6170)):this['setActiveAnnotation'](null);});};for(const _0x1b0919 of _0x119f9c)_0x347e95(_0x1b0919);this['listenTo'](_0x119f9c,'add',(_0x4ab755,_0x3c1947)=>{_0x347e95(_0x3c1947);}),this['listenTo'](_0x119f9c,'remove',(_0x2eae26,_0x212d81,_0x446725)=>{this['_annotationToNarrowView']['get'](_0x212d81)['destroy'](),this['_annotationToNarrowView']['delete'](_0x212d81),_0x3f37fa['rearrange']({'removedAnnotation':_0x212d81,'previousAnnotation':_0x119f9c['get'](_0x446725-0x1),'nextAnnotation':_0x119f9c['get'](_0x446725+0x1)}),_0x212d81===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x119f9c,'focus',(_0xcae7f2,_0x14e17d)=>{this['setActiveAnnotation'](_0x14e17d);}),this['listenTo'](_0x119f9c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x5074ba,_0x4efb26)=>{_0x4efb26['keyCode']===_0x4f6592['esc']&&_0x3f4083['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3f4083['content']['first']),this['_hideBalloon'](),_0x4efb26['stopPropagation'](),_0x4efb26['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1b6928,_0x23fe5a)=>{const _0x31ff4f=_0x23fe5a['target'];_0x3f4083['isVisible']&&_0x3f4083['element']['contains'](_0x31ff4f)||_0x3f37fa['view']['element']['contains'](_0x31ff4f)||_0x1b6928['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xee1998=>_0xee1998['contains'](_0x31ff4f))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3beb52=this['context']instanceof _0x11113e?this['context']['editors']:new _0x4b4c8c([this['context']]);for(const _0x17421a of _0x3beb52)this['_integrateWithEditorAnnotations'](_0x17421a);this['listenTo'](_0x3beb52,'add',(_0x1c931e,_0x118b25)=>{this['listenTo'](_0x118b25,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x118b25);});}),this['listenTo'](_0x3beb52,'remove',(_0x166d55,_0x384a10)=>{_0x384a10['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x384a10['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x39dbf8){if(_0x39dbf8===this['activeAnnotation'])return;const _0x39bdf2=this['context']['plugins']['get'](z);if(_0x39bdf2['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x39dbf8,'disableAnimationOnActivatedAnnotation':!0x0}),_0x39dbf8)_0x39bdf2['getSidebarItemView'](_0x39dbf8)?this['_showBalloon'](_0x39dbf8):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x39dbf8;}['detach'](){if(!this['isAttached'])throw new _0x2df15f('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x41beb9=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2519e0=>_0x2519e0['destroy']()),this['_annotationToNarrowView']['clear'](),_0x41beb9['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x11113e&&this['stopListening'](this['context']['editors']);for(const _0x2b824f of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2b824f);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'](_0x3e0d58){if(!_0x3e0d58['plugins']['has']('EditorAnnotations'))return;const _0x4e8e64=_0x3e0d58['plugins']['get']('EditorAnnotations'),_0x384c46=this['context']['plugins']['get'](z),_0x1cf934=this['annotations'],_0x2158c7=this['balloonPanelView'],_0x1404d4=()=>{const _0x1dd9e4=_0x4e8e64['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1dd9e4),this['setActiveAnnotation'](_0x1dd9e4[0x0]||null);};this['listenTo'](_0x4e8e64,'refresh',_0x1404d4),this['listenTo'](_0x4e8e64,'blur',(_0x2c644d,{isAnnotationTracked:_0x1b01be})=>{this['activeAnnotation']&&_0x1b01be(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4e8e64,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1cf934,'blur',_0x41a937=>{_0x4e8e64['hasDomSelection']()&&_0x41a937['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x55d789,_0x1b99ce)=>{const _0x246aaf=_0x1b99ce['target'];_0x2158c7['isVisible']&&_0x2158c7['element']['contains'](_0x246aaf)||_0x384c46['view']['element']['contains'](_0x246aaf)||this['activeAnnotation']&&_0x4e8e64['hasDomSelection']()&&(_0x1404d4(),_0x55d789['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4e8e64);}['_destroyEditorAnnotationsIntegration'](_0x339c15){_0x339c15&&(this['stopListening'](_0x339c15),this['_editorAnnotations']['remove'](_0x339c15));}['_setSelectedAnnotations'](_0x3b4d90){for(const _0x4f2e8b of this['_selectedAnnotations'])_0x3b4d90['includes'](_0x4f2e8b)||this['_manuallyClosedAnnotationViews']['delete'](_0x4f2e8b['view']);this['_selectedAnnotations']=_0x3b4d90;}['_refreshPositioning'](){const _0xbcd1e7=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xbcd1e7['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xbaef06){if(this['_manuallyClosedAnnotationViews']['has'](_0xbaef06['view']))return;const _0x1239c0=this['balloonPanelView']['content']['first'];_0x1239c0!==_0xbaef06['view']?(_0x1239c0&&this['_detachListeners'](_0x1239c0),this['_attachListeners'](_0xbaef06['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xbaef06['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4a2a7b=this['balloonPanelView']['content']['first'],_0x3d5903=_0x4a2a7b&&this['annotations']['getByView'](_0x4a2a7b);if(!_0x3d5903||!this['_annotationToNarrowView']['has'](_0x3d5903))return;const _0x476361=this['_annotationToNarrowView']['get'](_0x3d5903)['element'],_0x5acd06=(function(){const _0x325a37=_0x2d08b9['defaultPositions'];return[_0x325a37['southArrowNorthEast'],_0x325a37['northArrowSouthEast'],_0x325a37['southArrowNorth'],_0x325a37['northArrowSouth'],_0x325a37['southArrowNorthWest'],_0x325a37['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x476361,'positions':_0x5acd06});}['_hideBalloon'](){const _0x206f9e=this['balloonPanelView'],_0x4203da=_0x206f9e['content']['first'];_0x4203da&&(this['_detachListeners'](_0x4203da),_0x206f9e['unpin'](),_0x206f9e['content']['clear']());}['_attachListeners'](_0x16d192){this['listenTo'](_0x16d192,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x16d192,'Esc',(_0x2f9669,_0x3b7885)=>{this['_manuallyClosedAnnotationViews']['add'](_0x16d192),this['_hideBalloon'](),_0x3b7885();});}['_detachListeners'](_0x182428){this['stopListening'](_0x182428);}}class c extends _0x4d61fb{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x5b4ed0,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f410f){super(_0x5f410f),_0x5f410f['editing']['view']['addObserver'](_0x431698),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5f410f['plugins']['get'](_0x5b4ed0),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x1734fd(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x25f47c=this['editor']['plugins']['get'](j);_0x25f47c['context']===this['editor']&&(_0x25f47c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x24c5e1,_0x11a693)=>{const _0x59942d=this['_balloon'];if(this['isAttached']&&_0x59942d['visibleView']){const _0x1ca5ff=this['annotations']['getByView'](_0x59942d['visibleView']);_0x1ca5ff&&this['_closeAnnotation'](_0x1ca5ff),_0x11a693();}}));}['afterInit'](){const _0x313d41=this['editor']['plugins']['get'](j);_0x313d41['context']===this['editor']&&(_0x313d41['hasActive']()||_0x313d41['switchTo']('inline'));}['setActiveAnnotation'](_0x373bc2){_0x373bc2!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x373bc2&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x373bc2)&&this['_addAnnotationToBalloon'](_0x373bc2,!0x0),_0x373bc2['isActive']=!0x0),_0x373bc2||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x373bc2);}['attach'](_0xe563b6){this['annotations']=_0xe563b6;const _0x2354ec=this['editor']['plugins']['get'](j),_0x4e303d=this['_balloon'];if(this['isAttached'])throw new _0x2df15f('inlineannotations-attach-already-attached',this);if(_0x2354ec['context']!==this['editor'])throw new _0x2df15f('inlineannotations-not-allowed-with-context',this);const _0x2d3ac1=this['editor']['plugins']['get'](b);this['listenTo'](_0x2d3ac1,'refresh',()=>{const _0x4655c1=_0x2d3ac1['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x36d88e,_0x351010;!this['_forceRefresh']&&(_0x36d88e=_0x4655c1,_0x351010=this['_selectedAnnotations'],_0x36d88e['length']===_0x351010['length']&&_0x36d88e['every'](_0x357ecc=>_0x351010['includes'](_0x357ecc)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4655c1),this['setActiveAnnotation'](_0x4655c1[0x0]||null));}),this['listenTo'](_0x2d3ac1,'blur',(_0x1f80a7,{isAnnotationTracked:_0x448247})=>{this['activeAnnotation']&&_0x448247(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2d3ac1,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x43af9d,_0x6dcebb,_0x739eef)=>{_0x739eef||this['setActiveAnnotation'](null);}),this['listenTo'](_0xe563b6,'remove',(_0x31aef8,_0x42550f)=>{this['_removeAnnotationFromBalloon'](_0x42550f),_0x42550f===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4e303d,'change:visibleView',(_0x38f2b4,_0x509eb9,_0x186db1,_0x156472)=>{_0x156472&&this['stopListening'](_0x156472);const _0x29f3c8=_0xe563b6['getByView'](_0x186db1);_0x186db1&&_0x29f3c8&&(this['listenTo'](_0x186db1,'change:height',()=>{_0x4e303d['updatePosition']();}),this['listenTo'](_0x186db1,'Esc',()=>{this['_closeAnnotation'](_0x29f3c8),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x29f3c8&&this['setActiveAnnotation'](_0x29f3c8));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4e303d['visibleView']&&(_0xe563b6['getByView'](_0x4e303d['visibleView'])&&_0x4e303d['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 _0x2df15f('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3101a7 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3101a7);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3ca644){for(const _0x2832c9 of this['_selectedAnnotations'])_0x3ca644['includes'](_0x2832c9)||this['_manuallyClosed']['delete'](_0x2832c9);for(const _0x2c1438 of this['annotations'])_0x3ca644['includes'](_0x2c1438)||this['_removeAnnotationFromBalloon'](_0x2c1438);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5054aa of _0x3ca644)this['_addAnnotationToBalloon'](_0x5054aa);}this['_selectedAnnotations']=_0x3ca644;}['_addAnnotationToBalloon'](_0x571913,_0x5743cf=!0x1){this['_manuallyClosed']['has'](_0x571913)||(this['_addedAnnotations']['has'](_0x571913)||this['_balloon']['hasView'](_0x571913['view'])||(this['_addedAnnotations']['add'](_0x571913),this['_balloon']['add']({'stackId':_0x571913['view']['id'],'view':_0x571913['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x571913)}})),_0x5743cf&&this['_balloon']['showStack'](_0x571913['view']['id']));}['_getBalloonTargetForAnnotation'](_0x403d29){const _0x45d3e2=_0x403d29['target'],_0x3cd34f=this['editor']['editing']['view'],_0x346ddc=_0x3cd34f['document']['selection']['getFirstRange'](),_0x18d4d7=_0x3cd34f['domConverter']['viewRangeToDom'](_0x346ddc);if(_0x18d4d7['collapse'](!0x0),_0x45d3e2){if(_0x45d3e2 instanceof _0x318b84)return _0x45d3e2;let _0x3416e9=[];for(const _0x10e8b6 of _0x45d3e2)_0x3416e9['push'](...F(_0x10e8b6['getClientRects']()));_0x3416e9=function(_0x2fff0e){const _0xa28886=[];let _0x13e994=_0x2fff0e[0x0];for(let _0x559315=0x1;_0x559315<_0x2fff0e['length'];_0x559315++)P(_0x13e994,_0x2fff0e[_0x559315])?_0x13e994['width']+=_0x2fff0e[_0x559315]['width']:(_0xa28886['push'](_0x13e994),_0x13e994=_0x2fff0e[_0x559315]);return _0xa28886['push'](_0x13e994),_0xa28886;}(_0x3416e9);const _0x66f3e5=_0x18d4d7['getBoundingClientRect']();return _0x3416e9['find'](_0x5f7fd1=>_0x5f7fd1['top']<=_0x66f3e5['top']&&_0x5f7fd1['bottom']>=_0x66f3e5['bottom']&&_0x5f7fd1['left']<=_0x66f3e5['left']&&_0x5f7fd1['right']>=_0x66f3e5['right'])||_0x3416e9[0x0];}return _0x403d29['targetRect']||_0x18d4d7;}['_removeAnnotationFromBalloon'](_0xc7ea3f){this['_addedAnnotations']['has'](_0xc7ea3f)&&this['_balloon']['hasView'](_0xc7ea3f['view'])&&(this['_addedAnnotations']['delete'](_0xc7ea3f),this['_balloon']['remove'](_0xc7ea3f['view']));}['_closeAnnotation'](_0x387e59){this['_manuallyClosed']['add'](_0x387e59),this['_removeAnnotationFromBalloon'](_0x387e59);}}function F(_0x427b1a){return Array['from'](_0x427b1a)['map'](DOMRect['fromRect']);}function P(_0x20ad94,_0x1c8039){return _0x20ad94['top']===_0x1c8039['top']&&_0x20ad94['bottom']===_0x1c8039['bottom']&&_0x20ad94['right']===_0x1c8039['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x2bbf54,_0x541135){super(_0x2bbf54),this['set']('isEmpty',!_0x541135['length']),this['focusTracker']=new _0x151ecd(),this['_annotationViews']=_0x541135,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4e2b55({'focusables':_0x541135,'focusTracker':this['focusTracker']}),this['listenTo'](_0x541135,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x541135,'remove',(_0xb1e87b,_0x1d6ae7)=>{_0x1d6ae7['isActive']&&this['focus'](),_0x541135['length']||(this['isEmpty']=!0x0);});const _0x447fcd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x2bbf54,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x541135},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x447fcd['if']('isEmpty','ck-hidden',_0x2dbe98=>!_0x2dbe98)]},'children':[{'text':N(_0x2bbf54,'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 _0xadf225 of this['_annotationViews'])this['focusTracker']['add'](_0xadf225['element']);this['_annotationViews']['on']('change',(_0x5dd584,{added:_0x307754,removed:_0x4895e4})=>{for(const _0x4759fa of _0x307754)this['focusTracker']['add'](_0x4759fa['element']);for(const _0x43fe6c of _0x4895e4)this['focusTracker']['remove'](_0x43fe6c['element']);});}}class p extends _0x5bb154{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x51edbe){super(_0x51edbe),this['archivedThreads']=new _0x4b4c8c();}['init'](){const _0x39781b=this['context'],_0x27c05a=_0x39781b['plugins']['get'](o),_0x10d937=_0x39781b['plugins']['get'](y);this['listenTo'](_0x27c05a,'addCommentThread',(_0x12e33b,{threadId:_0x58d77f})=>{const _0x2460f0=_0x27c05a['getCommentThread'](_0x58d77f);_0x2460f0['archivedAt']&&this['archivedThreads']['add'](_0x2460f0,this['_calculatePosition'](_0x2460f0['archivedAt'])),this['listenTo'](_0x2460f0,'change:archivedAt',(_0x1b7cfd,_0x5a78a9,_0x406e89)=>{_0x406e89?this['archivedThreads']['has'](_0x2460f0)||this['archivedThreads']['add'](_0x2460f0,this['_calculatePosition'](_0x2460f0['archivedAt'])):this['archivedThreads']['has'](_0x2460f0)&&this['archivedThreads']['remove'](_0x2460f0);});}),this['listenTo'](_0x27c05a,'removeCommentThread',(_0x2dfea8,{threadId:_0x1dcce6})=>{const _0x2c169e=_0x27c05a['getCommentThread'](_0x1dcce6);this['stopListening'](_0x2c169e),this['archivedThreads']['has'](_0x2c169e)&&this['archivedThreads']['remove'](_0x2c169e);},{'priority':'highest'}),this['listenTo'](_0x10d937['collection'],'focus',(_0x1048bb,_0x593a58)=>{_0x593a58['isVisible']||(_0x593a58['isActive']=!0x0,_0x10d937['activate'](_0x593a58));});}['_calculatePosition'](_0x504e68){const _0x3477ba=[...this['archivedThreads']]['findIndex'](_0x1b9afb=>_0x1b9afb['archivedAt']<_0x504e68);return _0x3477ba>-0x1?_0x3477ba:this['archivedThreads']['length'];}}class a extends _0x4d61fb{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x5a4ac0];}constructor(_0x38929f){super(_0x38929f),this['annotationViews']=new _0xb0c59c(),this['_pendingThreads']=[];}['init'](){const _0x44a101=this['editor'],_0x5da090=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x44a101['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xabb329,!0x0)),_0x44a101['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4a7ebe=this['_createCommentsArchiveButton'](_0x2c6989);return _0x4a7ebe['set']({'role':'menuitemcheckbox'}),_0x4a7ebe;});const _0x217ac9=_0x44a101['plugins']['get'](p),_0x1d7506=_0x44a101['plugins']['get']('Annotations'),_0x1dcb9d=_0x44a101['plugins']['get']('CommentsRepository');_0x217ac9['archivedThreads']['forEach'](_0x524e9e=>{this['_handleNewThread'](_0x524e9e);}),this['listenTo'](_0x217ac9['archivedThreads'],'add',(_0x27ba4b,_0x2b6379)=>{this['_handleNewThread'](_0x2b6379);}),this['listenTo'](_0x1d7506['collection'],'add',(_0x439aae,_0x434ef6)=>{const _0x10c218=this['_pendingThreads']['find'](_0x465b9f=>{const _0x4e44b1=_0x1dcb9d['_threadToController']['get'](_0x465b9f);return _0x4e44b1&&_0x434ef6['innerView']===_0x4e44b1['view'];});if(_0x10c218){const _0x76c4ef=this['_calculatePosition'](_0x10c218['archivedAt']);this['_addAnnotationToArchive'](_0x434ef6,_0x76c4ef),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x10c218),0x1);}}),this['listenTo'](_0x217ac9['archivedThreads'],'remove',(_0x1e7cd2,_0x9515c0)=>{const _0x390211=_0x44a101['config']['get']('collaboration.channelId');if(!_0x390211||_0x9515c0['channelId']===_0x390211){if(this['_pendingThreads']['includes'](_0x9515c0))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x9515c0),0x1);else{const _0x199bb1=_0x1dcb9d['_threadToController']['get'](_0x9515c0),_0xe57589=_0x1d7506['getByInnerView'](_0x199bb1['view']);this['annotationViews']['remove'](_0xe57589['view']),this['stopListening'](_0xe57589),this['stopListening'](_0xe57589['focusableElements']);}}}),this['listenTo'](_0x1d7506['collection'],'add',(_0x34b1c9,_0x39ecb5)=>{this['listenTo'](_0x39ecb5,'escape',_0x5da090);}),this['listenTo'](_0x1d7506['collection'],'remove',(_0x191af8,_0x2480de)=>{this['stopListening'](_0x2480de,'escape',_0x5da090);});}['_addAnnotationToArchive'](_0x235499,_0x539a26){this['listenTo'](_0x235499,'set:isVisible',_0x398628=>{_0x398628['return']=!0x1,_0x398628['stop']();}),this['annotationViews']['add'](_0x235499['view'],_0x539a26);}['_handleNewThread'](_0x59e03e){const _0xc17de2=this['editor']['plugins']['get']('CommentsRepository'),_0x268238=this['editor']['plugins']['get']('Annotations'),_0x1003aa=this['editor']['config']['get']('collaboration.channelId');if(!_0x1003aa||_0x59e03e['channelId']===_0x1003aa){const _0x5c78cb=_0xc17de2['_threadToController']['get'](_0x59e03e);if(!_0x5c78cb)return void this['_pendingThreads']['push'](_0x59e03e);const _0x1b4793=this['_calculatePosition'](_0x59e03e['archivedAt']),_0x5dd0ff=_0x268238['getByInnerView'](_0x5c78cb['view']);_0x5dd0ff['isVisible']&&_0x268238['_visibleAnnotations']['remove'](_0x5dd0ff),this['_addAnnotationToArchive'](_0x5dd0ff,_0x1b4793);}}['_calculatePosition'](_0x366435){const _0x1db1de=this['editor']['config']['get']('collaboration.channelId'),_0x3ff432=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x28ca76=>_0x28ca76['channelId']===_0x1db1de)['findIndex'](_0x4fa5e6=>_0x4fa5e6['archivedAt']<_0x366435);return _0x3ff432<0x0||_0x3ff432>this['annotationViews']['length']?this['annotationViews']['length']:_0x3ff432-0x1;}['_toggleDialog'](){const _0x562c64=this['editor'],_0x5873c0=_0x562c64['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x562c64['locale'],this['annotationViews'])),'commentsArchive'===_0x5873c0['id']?_0x5873c0['hide']():_0x5873c0['show']({'id':'commentsArchive','title':N(_0x562c64['locale'],'COMMENTS_ARCHIVE'),'icon':_0x51a018,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x39f908['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x1d6ebf,_0x4f675a=!0x1){const _0x4ba589=this['editor']['locale'],_0x3f9b8b=this['editor']['plugins']['get']('Dialog'),_0xabaad8=new _0x1d6ebf(_0x4ba589);return _0xabaad8['bind']('isEnabled')['to'](this,'isEnabled'),_0xabaad8['bind']('isOn')['to'](_0x3f9b8b,'id',_0x286825=>'commentsArchive'===_0x286825),_0xabaad8['set']({'label':N(_0x4ba589,'COMMENTS_ARCHIVE'),'icon':_0x51a018,'isToggleable':!0x0}),_0x4f675a&&(_0xabaad8['tooltip']=!0x0),this['listenTo'](_0xabaad8,'execute',()=>this['_toggleDialog']()),_0xabaad8;}['_hideDialogOnAnnotationEscape']=_0x332d59=>{const _0x3db753=_0x332d59['source'];if(!this['annotationViews']['has'](_0x3db753['view']))return;const _0x4c2389=this['editor']['plugins']['get']('Dialog');_0x4c2389['isOpen']&&'commentsArchive'===_0x4c2389['id']&&(_0x4c2389['hide'](),_0x332d59['stop']());};}class gi extends _0x4d61fb{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 _0x2a778b,ContextPlugin as _0x298773,PendingActions as lt,Command as _0x10c84a,Plugin as _0x5bb67e,Context as _0x4e0713}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x11db0,uid as _0x11d7cc,KeystrokeHandler as jt,FocusTracker as _0xff5d19,diff as _0x52a854,Collection as _0x3d5ab7,Rect as _0xc27574,CKEditorError as _0x48ecf8,first as _0x29db23,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x3581a0,keyCodes as _0x23fa1c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x8ee33c,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x20ed18,trimHtml as ts,LateFocusDropdownButtonView as _0x2aecc4,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x247b77}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x3aa37b}from'es-toolkit/compat';import{IconUndo as _0x5b874c,IconCheck as _0x809cdf,IconPencil as _0x1cb0c8,IconRemoveComment as _0x1b069a,IconThreeVerticalDots as _0x44d5bd,IconAddComment as _0x49da61,IconCommentsArchive as _0x35b5d8}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x445736,ButtonView as _0x508f07,ViewCollection as _0x146541,createDropdown as _0x3aaae0,ListView as _0x4150b3,focusChildOnDropdownOpen as _0x3da013,ListItemView as _0x3d3d19,MenuBarMenuListItemButtonView as _0x431b16,BodyCollection as _0xf82a65,BalloonPanelView as _0x132bef,ContextualBalloon as _0x32c491,Dialog as _0x1d7f05,DialogViewPosition as _0x427eb1}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x39f157}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 _0x2bbc1d}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x1f4366}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0x11db0(){['model'];['view'];constructor(_0x1e20f4,_0x4b9ab9){super(),this['model']=_0x1e20f4,this['model']['_isAttached']=!0x0,this['view']=_0x4b9ab9,this['listenTo'](_0x4b9ab9,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4b9ab9,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4b9ab9,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4b9ab9,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4b9ab9,'addComment',(_0x34db0c,_0x18fe9a)=>this['addComment'](_0x18fe9a)),this['listenTo'](_0x4b9ab9,'updateComment',(_0x490fd0,_0xdf2a5d,_0x3145ee)=>this['updateComment'](_0xdf2a5d,_0x3145ee)),this['listenTo'](_0x4b9ab9,'removeComment',(_0x47b8c2,_0x5518cb)=>this['removeComment'](_0x5518cb));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x20c19a){this['model']['addComment']({'content':_0x20c19a,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2aec34,_0x172eca){this['model']['getComment'](_0x2aec34)['update']({'content':_0x172eca});}['removeComment'](_0x15a09f){this['model']['getComment'](_0x15a09f)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x3bb818,_0xd8389b,_0x459438){const t=_0x3bb818['t'];switch(_0xd8389b){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'},_0x459438);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'},_0x459438);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'},_0x459438);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'},_0x459438);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x459438);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'},_0x459438);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'},_0x459438);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'},_0x459438);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(_0xf78ece,_0x4f16b1){super(_0xf78ece);const _0x15f353=_0x11d7cc();this['main']=this['createCollection'](),this['editable']=new Vt(_0xf78ece,_0x4f16b1,void 0x0,{'label':()=>N(_0xf78ece,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xf78ece['uiLanguageDirection'],'lang':_0xf78ece['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x15f353},'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(_0x4260db){super(_0x4260db),this['view']=new Rt(_0x4260db['locale'],_0x4260db['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x47a489=this['editor']['editing']['view'],_0x57943e=this['view']['editable'],_0x470ecb=_0x47a489['document']['getRoot']();_0x57943e['name']=_0x470ecb['rootName'],this['view']['render']();const _0x22fa37=_0x57943e['element'];this['setEditableElement'](_0x57943e['name'],_0x22fa37),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x47a489['attachDomRoot'](_0x22fa37),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
+ _0x11db0(_0x2a778b){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x1dbb2c={}){function _0x50c21a(_0x14dc5e){return _0x14dc5e['map'](_0xe25e05=>String['fromCharCode'](_0xe25e05))['join']('');}(_0x1dbb2c=Object['assign']({},_0x1dbb2c))['plugins']||(_0x1dbb2c['plugins']=hs['defaultPlugins']),super(_0x1dbb2c),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[_0x50c21a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x50c21a([0x76,0x69,0x65,0x77])][_0x50c21a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x50c21a([0x61,0x75,0x74,0x6f]),this[_0x50c21a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x50c21a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x50c21a([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x50c21a([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x50c21a([0x6f,0x6b])});}['create'](){const _0x21ae46=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x21ae46))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x50e3b2=>{const _0xb08c89=this['model']['document']['getRoot'](),_0x455462=_0xb08c89&&_0xb08c89['getChild'](_0xb08c89['childCount']-0x1);_0x50e3b2['setSelection'](_0x455462,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x43a7e5=this['editing']['view'],_0xf77461=_0x43a7e5['document']['getRoot'](),_0x14df7a=_0xf77461['getChild'](0x0);_0xf77461['childCount']>0x1||!_0x14df7a||'p'!=_0x14df7a['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x43a7e5,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x14df7a['placeholder']=this['placeholder']),Ft({'view':_0x43a7e5,'element':_0x14df7a,'keepOnFocus':!0x0}),this['placeholderElement']=_0x14df7a);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x431ad9,_0x377a10={}){super(_0x431ad9),this['editor']=null,this['_editorConfig']=_0x377a10,this['set']('value',_0x377a10['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x431ad9,'Reply...')),this['set']('submitLabel',N(_0x431ad9,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xff5d19(),this['focusCycler']=new _0x445736({'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',(_0x58e042,_0x2dee6b)=>{this['cancelButtonView']['fire']('execute'),_0x2dee6b();}),this['keystrokes']['set']('Ctrl+Enter',(_0x221f4e,_0xedd72e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xedd72e());}),this['on']('submit',(_0x1e5870,_0x4c9333)=>{_0x4c9333['length']>0xfde8?(alert(N(_0x431ad9,'TOO_LONG_COMMENT_ALERT',[_0x4c9333['length'],0xfde8])),_0x1e5870['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 _0x28c561=this['editor'];this['element']['insertBefore'](_0x28c561['ui']['element'],this['element']['firstChild']),_0x28c561['model']['document']['on']('change',()=>this['value']=_0x28c561['getData']()),_0x28c561['bind']('placeholder')['to'](this),this['focusables']['add'](_0x28c561['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x833e9f){-0x1===_0x833e9f?(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:_0x11247b}=this,_0x31dd60=new _0x508f07(_0x11247b);return _0x31dd60['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x31dd60['withText']=!0x0,_0x31dd60['bind']('label')['to'](this,'submitLabel'),_0x31dd60['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x31dd60['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x582e7e,_0x587959)=>!_0x587959&&!!_0x582e7e['trim']()),_0x31dd60;}['_createCancelButton'](){const {locale:_0x4fe86e}=this,_0x1839ec=new _0x508f07(_0x4fe86e);return _0x1839ec['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1839ec['label']=N(_0x4fe86e,'Cancel'),_0x1839ec['withText']=!0x0,_0x1839ec['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1839ec;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3395c8=>{this['focusTracker']['add'](_0x3395c8['element']);}),this['focusables']['on']('change',(_0x15a2bc,_0x203f1f)=>{for(const _0x3f5ea7 of Array['from'](_0x203f1f['added'])['reverse']())this['focusTracker']['add'](_0x3f5ea7['element']);});}}class ie extends kt{constructor(_0x5f0677,_0x287847,_0x35b839){super(_0x5f0677),this['commentInputView']=new es(_0x5f0677,_0x35b839),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1ad478,_0x4a75ca)=>_0x1ad478||!!_0x4a75ca),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 _0x8ee33c(_0x5f0677,_0x287847),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'](_0x3209a1){this['commentInputView']['focus'](_0x3209a1);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2df14e,_0x4badf1)=>{const {submitButtonView:_0xd6aee,cancelButtonView:_0x1f4a95,editor:_0x24f306}=this['commentInputView'];[_0xd6aee['element'],_0x1f4a95['element'],_0x24f306?_0x24f306['editing']['view']['getDomRoot']():null]['filter'](_0x547c6a=>_0x547c6a)['some'](_0x29fada=>_0x29fada['contains'](_0x4badf1['target']))||(this['focus'](),_0x4badf1['preventDefault']());});}}class rs extends kt{constructor(_0xd5ceed){super(_0xd5ceed);const _0x504a44=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x504a44['to']('count',_0xf830fa=>N(_0xd5ceed,'NUMBER_OF_COMMENTS',_0xf830fa))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x118a53,_0x1e324d,_0x10b1ef){super(_0x118a53);const _0x369b85=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1e324d['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1e324d,this['_config']=_0x10b1ef,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xff5d19(),this['keystrokes']=new jt(),this['focusCycler']=new _0x445736({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4d315c=>this['commentViews']['map'](_0x214528=>_0x214528['element'])['includes'](_0x4d315c['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x118a53),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x220305=>_0x220305-this['_config']['maxCommentsWhenCollapsed']);for(const _0x577e19 of _0x1e324d['comments'])this['_handleNewCommentModel'](_0x577e19);this['_handleInfoComment'](),this['listenTo'](_0x1e324d['comments'],'add',(_0x5a2ba5,_0x35c1ef)=>{const _0x1ffa45=this['_calculatePosition'](_0x35c1ef);this['length']++,this['_handleNewCommentModel'](_0x35c1ef,_0x1ffa45),this['refreshVisibleViews']();}),this['listenTo'](_0x1e324d['comments'],'remove',(_0x34075a,_0x2187b8)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2187b8),this['refreshVisibleViews']();}),this['listenTo'](_0x1e324d,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1e324d,'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',_0x369b85['if']('length','ck-hidden',_0x454f85=>!_0x454f85)],'aria-label':N(_0x118a53,'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'](_0x546c2d){-0x1===_0x546c2d?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3b91ee of this['commentViews'])_0x3b91ee['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x31ca08,_0x2e681c){const _0x1e00ac=new this['_config']['CommentView'](this['locale'],_0x31ca08,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1e00ac['viewUid']=_0x31ca08['id'],_0x1e00ac['delegate']('removeComment')['to'](this),_0x1e00ac['delegate']('updateComment')['to'](this),_0x1e00ac['delegate']('resolveCommentThread')['to'](this),_0x1e00ac['delegate']('editorReady')['to'](this),_0x1e00ac['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1e00ac,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1e00ac,_0x2e681c);}['_calculatePosition'](_0x2eb5d6){const _0x5e9b96=this['_model']['_findOptimalIndex'](_0x2eb5d6);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2eb5d6['authoredAt']?_0x5e9b96-0x1:_0x5e9b96:_0x5e9b96-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x18fa1d={'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'],_0x18fa1d,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x18fa1d));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x192362){const _0x144836=this['commentViews']['remove'](_0x192362['id']);this['stopListening'](_0x144836),_0x144836['isEditMode']&&this['_updateHasDirtyComment'](),_0x144836['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1775e6=>_0x1775e6['isEditMode']);}['_rearrangeCollapse'](){const _0x5c15bf=function(_0x13e034){const _0x20214c=new _0x3d5ab7();for(const _0x297282 of _0x13e034)_0x20214c['add'](_0x297282);return _0x20214c;}(this['commentViews']),_0x4138f2=this['_collapsedCommentsView']['count'];for(let _0x4292d7=0x1;_0x4292d7<=_0x4138f2;_0x4292d7++)_0x5c15bf['remove'](0x1);for(const _0x28182e of _0x5c15bf)_0x28182e['collapse']();_0x4138f2>0x0&&_0x5c15bf['add'](this['_collapsedCommentsView'],0x1),ns(_0x52a854(Array['from'](this['visibleViews']),Array['from'](_0x5c15bf)),this['visibleViews'],_0x5c15bf);}['_rearrangeExpand'](){ns(_0x52a854(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x58c098 of this['visibleViews'])_0x58c098['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0xb46af7=>{this['focusTracker']['add'](_0xb46af7['element']),this['keystrokes']['listenTo'](_0xb46af7['element']);}),this['commentViews']['on']('change',(_0x1daa2d,_0x1b64ec)=>{for(const _0x4008d6 of _0x1b64ec['removed'])this['focusTracker']['remove'](_0x4008d6['element']),this['keystrokes']['stopListening'](_0x4008d6['element']);for(const _0x4779ac of Array['from'](_0x1b64ec['added'])['reverse']())this['focusTracker']['add'](_0x4779ac['element']),this['keystrokes']['listenTo'](_0x4779ac['element']);});}}function ns(_0x284831,_0x53d0ab,_0x1cbabf){let _0x4c7447=0x0;for(const _0x29d14d of _0x284831)switch(_0x29d14d){case'insert':_0x53d0ab['add'](_0x1cbabf['get'](_0x4c7447),_0x4c7447),_0x4c7447++;break;case'delete':_0x53d0ab['remove'](_0x4c7447);break;case'equal':_0x4c7447++;}}class oe extends kt{constructor(_0x423302){super(_0x423302);const _0x4d8b6a=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4d8b6a['to']('contextValue',_0x1a519f=>N(_0x423302,'THREAD_CONTEXT_LABEL',_0x1a519f)),'tabindex':-0x1},'children':[{'text':_0x4d8b6a['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4aaf54,_0x143815){super(_0x4aaf54);const _0x496f86=this['bindTemplate'];this['_model']=_0x143815,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xff5d19(),this['keystrokes']=new jt(),this['focusCycler']=new _0x445736({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4c308d=>!!_0x4c308d),this['bind']('contextValue')['to'](this['_model'],'context',_0x3e2379=>_0x3e2379&&_0x3e2379['value']?this['_trimContextValue'](_0x3e2379['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',_0x496f86['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 _0x472217=new _0x508f07(this['locale']);return _0x472217['label']=N(this['locale'],'Reopen'),_0x472217['tooltip']=N(this['locale'],'Reopen'),_0x472217['icon']=_0x5b874c,_0x472217['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x28429a=>!_0x28429a),_0x472217['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xccdc92,_0x263e46)=>_0xccdc92&&_0x263e46),_0x472217['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x472217;}['_trimContextValue'](_0xd15882){if(_0xd15882['length']<0x96)return _0xd15882;const _0x14f9a8=_0xd15882['lastIndexOf']('\x20',0x93);return _0xd15882['substring'](0x0,_0x14f9a8>-0x1?_0x14f9a8:0x93)+'...';}['_attachContextActions'](){const _0x206df6=this['element']['querySelector']('.ck-context'),_0xf41de7=_0x206df6['querySelector']('.ck-context__value');this['listenTo'](_0x206df6,'mouseenter',()=>{_0xf41de7['offsetWidth']<_0xf41de7['scrollWidth']&&_0x206df6['classList']['add']('overlay');}),this['listenTo'](_0x206df6,'mouseleave',()=>{_0x206df6['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x556324 of this['focusables'])this['focusTracker']['add'](_0x556324['element']),this['keystrokes']['listenTo'](_0x556324['element']);}['_createContextView'](){const _0x4b87c1=new oe(this['locale']);return _0x4b87c1['bind']('contextValue')['to'](this),_0x4b87c1;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1e455f,_0x2fe36c,_0x158330,_0x53a13f){super(_0x1e455f),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2fe36c,this['_localUser']=_0x158330,this['_config']=_0x53a13f,this['commentThreadHeaderView']=new Xt(_0x1e455f,_0x2fe36c),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1e455f,N(_0x1e455f,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1e455f,_0x2fe36c,Object['assign']({'CommentView':this['_config']['CommentView']},_0x53a13f)),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',(_0x29cd91,_0x455ea3)=>_0x29cd91||!!_0x455ea3),this['bind']('isUnlinked')['to'](_0x2fe36c,'unlinkedAt',_0xaa727b=>!!_0xaa727b),this['bind']('ariaLabel')['to'](this,'length',_0x4cbb28=>{const _0x4a47ac=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x4cbb28,_0x4a47ac]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xff5d19(),this['keystrokes']=new jt(),this['focusCycler']=new _0x445736({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x215db0=>_0x215db0['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 _0x2a77a4=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x30956e=_0x2a77a4['commentInputView'];return _0x2a77a4['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x30956e,'value',(_0x52ecbc,_0x161309,_0x26fa4b,_0x3fb00b,_0x523e0a)=>!!_0x523e0a||!!_0x3fb00b&&_0x26fa4b&&!_0x161309||_0x52ecbc&&_0x26fa4b&&!_0x161309),_0x30956e['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5abc75,_0x5809ba,_0x5b0f4f)=>{let _0x103953;return _0x103953=_0x5b0f4f&&_0x5809ba?'Reply\x20to\x20reopen\x20discussion...':_0x5abc75?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x103953);}),_0x30956e['bind']('submitLabel')['to'](this,'length',_0x1d374a=>N(this['locale'],_0x1d374a?'Reply':'Comment')),_0x30956e['on']('submit',(_0x34a333,_0x26d58d)=>{this['fire']('addComment',_0x26d58d),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x30956e['on']('cancel',()=>{this['focus']();}),_0x30956e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x30956e['on']('cancel',_0x4624ae=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4624ae['stop']());}),this['on']('change:isActive',(_0x5aaeef,_0x527736,_0xcb1bff)=>{_0xcb1bff||this['length']||_0x30956e['value']||this['fire']('removeCommentThread');}),_0x2a77a4;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4747cf,_0x4a8d3b,_0x2f4568,_0x2c8e31){super(_0x4747cf,_0x4a8d3b,_0x2f4568,_0x2c8e31),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4747cf,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0xd499e4,_0x353f0f,_0x12f755)=>{_0x12f755||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xdd7ace,_0x5df019,_0x274cf0)=>{_0x274cf0&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x1b7477=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1b7477['if']('isActive','ck-thread--active'),_0x1b7477['if']('isUnlinked','ck-thread--unlinked'),_0x1b7477['to']('actionIndicator',_0x99b533=>_0x99b533?'ck-thread--'+_0x99b533:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1b7477['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 _0x586694 of this['commentsListView']['commentViews'])_0x586694['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x36d841}=this,_0x49d6e8=this['commentsListView']['commentViews']['get'](0x0);_0x49d6e8===this['_boundFirstCommentView']||_0x49d6e8['isSystemComment']||(this['_boundFirstCommentView']=_0x49d6e8,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x49d6e8,'actionIndicator',_0x4a57cb=>'remove'===_0x4a57cb?'remove':null),_0x49d6e8['placeholder']=N(_0x36d841,'Write\x20a\x20comment...'),_0x49d6e8['removeButton']['on']('execute',_0x491c18=>{_0x491c18['stop'](),this['showConfirm'](N(_0x36d841,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x49d6e8['focus']();}),_0x49d6e8['actionBar']['add'](this['resolveButton'],0x0),_0x49d6e8['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5f42e5=new _0x20ed18(this['locale']);return _0x5f42e5['label']=N(this['locale'],'Resolve'),_0x5f42e5['tooltip']=N(this['locale'],'Resolve'),_0x5f42e5['icon']=_0x809cdf,_0x5f42e5['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5f42e5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x56a865=>!_0x56a865),_0x5f42e5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4e639a,_0x56cb5f)=>_0x4e639a&&!_0x56cb5f),_0x5f42e5['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5f42e5;}['_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(_0x516380){super(_0x516380),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0xff88c6,_0x5d69b1,_0x18a79a)=>{this['element']['innerHTML']=_0x18a79a;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x54b01d,_0x1951f9,_0x2ef273){super(_0x54b01d),this['_model']=_0x1951f9,this['_config']=_0x2ef273,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1951f9,'content',_0x1951f9,'authoredAt',(_0x1d97c3,_0x4431c6)=>N(_0x54b01d,'COMMENT_ARIA_LABEL',[_0x1951f9['author']['name'],_0x2ef273['formatDateTime'](_0x4431c6),new DOMParser()['parseFromString'](_0x1d97c3,'text/html')['body']['textContent'],_0x1951f9['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x54b01d,N(_0x54b01d,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x146541(),this['focusTracker']=new _0xff5d19(),this['keystrokes']=new jt(),this['focusCycler']=new _0x445736({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1c38e9=>_0x1c38e9['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 _0x4b4a06=new is(this['locale']);return _0x4b4a06['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4a58e1,_0x202811)=>_0x202811?ts(_0x4a58e1,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4a58e1),_0x4b4a06;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x3bf18c=new es(this['locale'],this['_config']['editorConfig']);return _0x3bf18c['value']=this['_model']['content'],_0x3bf18c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3bf18c['submitLabel']=N(this['locale'],'Save'),_0x3bf18c['on']('submit',(_0x10012e,_0x5c2fb2)=>{this['fire']('updateComment',this['_model']['id'],_0x5c2fb2),this['switchToDisplayMode'](),this['focus']();}),_0x3bf18c['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x3bf18c['once']('editorReady',()=>{_0x3bf18c['focus']();}),_0x3bf18c['createEditor'](),_0x3bf18c['delegate']('editorReady')['to'](this),_0x3bf18c['delegate']('editorDestroyed')['to'](this),_0x3bf18c;}['_setupKeyboardNavigation'](){const _0x4728c6=this['element'];this['keystrokes']['listenTo'](_0x4728c6);for(const _0x2c92aa of this['focusables'])this['focusTracker']['add'](_0x2c92aa['element']),this['keystrokes']['listenTo'](_0x2c92aa['element']);this['focusables']['on']('change',(_0x435db3,_0xd9d79b)=>{for(const _0x5460c7 of _0xd9d79b['removed'])this['focusTracker']['remove'](_0x5460c7['element']),this['keystrokes']['stopListening'](_0x5460c7['element']);for(const _0xe6563b of _0xd9d79b['added'])this['focusTracker']['add'](_0xe6563b['element']),this['keystrokes']['listenTo'](_0xe6563b['element']);}),this['keystrokes']['set']('enter',(_0x40ab9e,_0x127b9f)=>{_0x4728c6===_0x40ab9e['target']&&(this['focusCycler']['focusFirst'](),_0x127b9f());}),this['keystrokes']['set']('esc',(_0x4440c5,_0x270655)=>{_0x4728c6!==_0x4440c5['target']&&(this['focus'](),_0x270655());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(di){['actionBar'];['userView'];constructor(_0x194b0e,_0x3d3fd4,_0x2adeaf){super(_0x194b0e,_0x3d3fd4,_0x2adeaf),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x194b0e,'Reply...')),this['bind']('authoredAt')['to'](_0x3d3fd4),this['bind']('resolvedAt')['to'](_0x3d3fd4),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 _0x8ee33c(_0x194b0e,_0x3d3fd4['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3d3fd4,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x52a0b4=this['bindTemplate'],_0x38486f=[{'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':_0x52a0b4['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x52a0b4['to']('authoredAt',_0x17bfb0=>this['_config']['formatDateTime'](_0x17bfb0))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x52a0b4['if']('isEditMode','ck-comment__actions--hidden'),_0x52a0b4['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']&&_0x38486f['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x52a0b4['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x52a0b4['if']('isEditMode','ck-comment--edit'),_0x52a0b4['if']('isSystemComment','ck-comment--info'),_0x52a0b4['to']('actionIndicator',_0x56b437=>_0x56b437?'ck-comment--'+_0x56b437:'')],'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':_0x38486f}]}]};}['_createEditButton'](){const _0x410583=new _0x508f07(this['locale']);return _0x410583['label']=N(this['locale'],'Edit'),_0x410583['icon']=_0x1cb0c8,_0x410583['withText']=!0x0,_0x410583['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x410583['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4c49af=>!_0x4c49af),_0x410583['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x410583['on']('execute',()=>this['switchToEditMode']()),_0x410583;}['_createRemoveButton'](){const _0x1bb5bc=new _0x508f07(this['locale']);return _0x1bb5bc['label']=N(this['locale'],'Remove'),_0x1bb5bc['icon']=_0x1b069a,_0x1bb5bc['withText']=!0x0,_0x1bb5bc['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1bb5bc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3d1a0b=>!_0x3d1a0b),_0x1bb5bc['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1bb5bc['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1bb5bc;}['_createDropdown'](){const _0x558396=_0x3aaae0(this['locale'],_0x2aecc4),_0x3a8606=_0x558396['panelView']['children'],_0x5ea5da=new _0x4150b3(this['locale']),_0x1c4136=_0x558396['bindTemplate'];_0x3da013(_0x558396,()=>this['items']['find'](_0x237d86=>_0x237d86['isVisible'])),_0x558396['extendTemplate']({'attributes':{'class':[_0x1c4136['if']('isVisible','ck-hidden',_0x5c91ca=>!_0x5c91ca)]}});const _0x86efa6=(_0x156a3e,_0x319863=-0x1)=>{const _0xefdfe5=new _0x3d3d19(this['locale']);_0xefdfe5['children']['add'](_0x156a3e);const _0x3248e0=_0x319863>-0x1?_0x319863:_0x5ea5da['items']['length'];_0x5ea5da['items']['add'](_0xefdfe5,_0x3248e0);const _0x1b9a92=Array['from'](this['items']);_0x558396['unbind']('isEnabled','isVisible'),_0x558396['bind']('isEnabled')['toMany'](_0x1b9a92,'isEnabled',(..._0x143c5)=>_0x143c5['some'](_0x138da8=>_0x138da8)),_0x558396['bind']('isVisible')['toMany'](_0x1b9a92,'isVisible',(..._0x2ce372)=>_0x2ce372['some'](_0xa191f8=>_0xa191f8));};_0x558396['panelPosition']='sw',_0x558396['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x44d5bd});for(const _0x15f96d of this['items'])_0x86efa6(_0x15f96d);return _0x3a8606['add'](_0x5ea5da),_0x558396['listenTo'](this['items'],'add',(_0x4527df,_0x57f436,_0x476064)=>{_0x86efa6(_0x57f436,_0x476064);}),_0x558396['listenTo'](this['items'],'remove',(_0x5399db,_0x6324fc,_0x1ee2e3)=>{_0x5ea5da['items']['remove'](_0x1ee2e3);}),_0x558396;}['_attachActions'](_0x1e8323,_0x42a55d){const _0xf8cc05=_0x1e8323&&_0x1e8323['element'];_0xf8cc05&&(this['listenTo'](_0xf8cc05,'mouseenter',()=>this['actionIndicator']=_0x42a55d),this['listenTo'](_0xf8cc05,'focus',()=>this['actionIndicator']=_0x42a55d),this['listenTo'](_0xf8cc05,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0xf8cc05,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3ac128=super['_createCommentInputView']();return _0x3ac128['bind']('placeholder')['to'](this),_0x3ac128;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x4e12e1){const _0x9f47b=Dt(_0x4e12e1,0x1e),_0x38ca4e=new MutationObserver(_0x2a768e=>{for(const _0x431960 of _0x2a768e)('attributes'==_0x431960['type']&&'class'==_0x431960['attributeName']||'childList'==_0x431960['type']||'characterData'==_0x431960['type'])&&_0x9f47b();});return{'attach'(_0x5ac450){_0x38ca4e['observe'](_0x5ac450,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x38ca4e['disconnect'](),_0x9f47b['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x6154e0,_0x3e34a6){super(_0x6154e0),this['id']=_0x11d7cc(),this['focusTracker']=new _0xff5d19(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x484d86,_0x44f78c)=>this['fire']('Esc',_0x44f78c)),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'](_0x3e34a6),this['mainView']=_0x3e34a6;const _0x24a407=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x24a407['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 _0x3d7d83=this['element']['clientHeight'];_0x3d7d83&&(this['height']=_0x3d7d83);}}class T extends/* #__PURE__ -- @preserve */
29
+ _0x11db0(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x65f9e3,target:_0x1b56df,type:_0x44bec0,isVisible:_0xd92e03=!0x0}){super(),this['view']=_0x65f9e3,this['view']['element']||this['view']['render'](),this['_type']=_0x44bec0,this['_target']=_0x1b56df,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3d5ab7([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x29f4f8,_0x14919c)=>{this['view']['focusTracker']['add'](_0x14919c);}),this['focusableElements']['on']('remove',(_0x2a01fb,_0x477960)=>{this['view']['focusTracker']['remove'](_0x477960);}),this['set']('isVisible',_0xd92e03);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1c0f04=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x1c0f04),_0x1c0f04;}get['targetRect'](){const _0x3a3034=this['target'];if(null===_0x3a3034)return null;if(_0x3a3034 instanceof _0xc27574)return _0x3a3034;const _0x20f80f=_0x3a3034['filter'](_0x5a70dd=>function(_0x50527e){const _0x8707ea=_0x50527e['offsetParent'];if(_0x8707ea)return!0x0;const _0x76e377=_0x50527e['getClientRects']()['item'](0x0);return!!_0x76e377;}(_0x5a70dd));return 0x0===_0x20f80f['length']?null:new _0xc27574(_0x20f80f[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0xcc5636){this['view']['isActive']=_0xcc5636,this['view']['mainView']['isActive']=_0xcc5636;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4d6ada){if(!(null===_0x4d6ada||_0x4d6ada instanceof _0xc27574||Array['isArray'](_0x4d6ada)&&_0x4d6ada['every'](_0x41be8c=>fi(_0x41be8c))))throw new _0x48ecf8('annotation-invalid-target',null,{'target':_0x4d6ada});}['_getNormalizedTarget'](){const _0x4fe5c1='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x4fe5c1)?[_0x4fe5c1]:_0x4fe5c1;}}function fi(_0x5aa73e){return null!==_0x5aa73e&&'object'==typeof _0x5aa73e&&'nodeType'in _0x5aa73e&&0x1===_0x5aa73e['nodeType'];}class S extends _0x3d5ab7{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x228e55=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xff5d19(),this['_focusTracker']['on']('change:isFocused',(_0x3f25b1,_0x34f775,_0x1a653d)=>{_0x1a653d||this['fire']('blur');});for(const _0x1868fa of _0x228e55)this['add'](_0x1868fa);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x125ef4){if(this['has'](_0x125ef4))throw new _0x48ecf8('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x125ef4['innerView'],_0x125ef4),this['_viewToAnnotation']['set'](_0x125ef4['view'],_0x125ef4);for(const _0x4ef267 of _0x125ef4['focusableElements'])this['_focusTracker']['add'](_0x4ef267);this['listenTo'](_0x125ef4['focusableElements'],'add',(_0x3e9836,_0x4f1266)=>{this['_focusTracker']['add'](_0x4f1266);}),this['listenTo'](_0x125ef4['focusableElements'],'remove',(_0x953b34,_0x5d99d0)=>{this['_focusTracker']['remove'](_0x5d99d0);}),this['listenTo'](_0x125ef4['view']['focusTracker'],'change:isFocused',(_0x2ecd62,_0x42af9d,_0x5b95aa)=>{_0x5b95aa&&this['fire']('focus',_0x125ef4);}),_0x125ef4['updateTargetRect']();const _0x4c810d=this['_getOrderInContent'](_0x125ef4['view']['targetRect']);return super['add'](_0x125ef4,_0x4c810d);}['remove'](_0x3a16d0){if(!this['has'](_0x3a16d0))throw new _0x48ecf8('annotationcollection-not-existing-item',null);this['stopListening'](_0x3a16d0['view']['focusTracker']),this['stopListening'](_0x3a16d0['focusableElements']);for(const _0x4f2753 of _0x3a16d0['focusableElements'])this['_focusTracker']['remove'](_0x4f2753);return this['_viewToAnnotation']['delete'](_0x3a16d0['view']),this['_innerViewToAnnotation']['delete'](_0x3a16d0['innerView']),super['remove'](_0x3a16d0);}['getByInnerView'](_0x275b36){return this['_innerViewToAnnotation']['get'](_0x275b36);}['getByView'](_0x2b70d7){return this['_viewToAnnotation']['get'](_0x2b70d7);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2da161 of this)_0x2da161['updateTargetRect']();this['_sort']();}['_sort'](){const _0x43f659=Array['from'](this)['sort']((_0x459444,_0x3ab345)=>w(_0x459444['view']['targetRect'],_0x3ab345['view']['targetRect']));for(let _0x2b08ed=_0x43f659['length']-0x1;_0x2b08ed>0x0;_0x2b08ed--){const _0x178e45=_0x43f659[_0x2b08ed];_0x2b08ed!==this['getIndex'](_0x178e45)&&(this['remove'](_0x178e45),this['add'](_0x178e45));}}['_getOrderInContent'](_0x3ad603){let _0x389b9e=0x0;if(!_0x3ad603)return this['length'];for(const _0x157b68 of this){const _0x289de2=_0x157b68['view']['targetRect'];if(_0x289de2){if(w(_0x3ad603,_0x289de2)<0x0)return _0x389b9e;_0x389b9e++;}}return _0x389b9e;}}function v({source:_0x5d6125,target:_0x50f739,filter:_0x26c1ac}){for(const _0x56631c of _0x5d6125)_0x26c1ac(_0x56631c)&&_0x50f739['add'](_0x56631c);_0x50f739['listenTo'](_0x5d6125,'add',(_0x55d2e9,_0xbf0a97)=>{_0x26c1ac(_0xbf0a97)&&_0x50f739['add'](_0xbf0a97);}),_0x50f739['listenTo'](_0x5d6125,'remove',(_0xa73424,_0x405cac)=>{_0x50f739['has'](_0x405cac)&&_0x50f739['remove'](_0x405cac);});}function w(_0x1b6ff1,_0x35a783){if(null===_0x1b6ff1&&null===_0x35a783)return 0x0;if(null===_0x1b6ff1)return-0x1;if(null===_0x35a783)return 0x1;const _0x34477a=_0x1b6ff1['top']-_0x35a783['top'];return 0x0==_0x34477a?_0x1b6ff1['left']-_0x35a783['left']:_0x34477a;}class y extends _0x298773{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x26196d){if(super(_0x26196d),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x26196d instanceof _0x2a778b){const _0x20aecf=_0x26196d['locale'];_0x26196d['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x20aecf,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x20aecf,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x20aecf,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x20aecf,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x20aecf,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x20aecf,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x20aecf,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x39ada0){this['collection']['add'](_0x39ada0);}['remove'](_0x333af3){this['collection']['remove'](_0x333af3),_0x333af3['destroy']();}['refreshVisibility'](){for(const _0x343022 of this['collection'])_0x343022['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x117511){return this['collection']['getByInnerView'](_0x117511);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x60c61 of this['collection'])_0x60c61['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x47921b){this['fire']('_activateAnnotation',_0x47921b);}['createAnnotation'](_0x3611bd){return new T(_0x3611bd);}['createAnnotationView'](_0x2b8153,_0x4389bd){return new E(_0x2b8153,_0x4389bd);}['_addActiveAnnotation'](_0x2e2276){const _0x57c5f1=new Set(this['activeAnnotations']);_0x57c5f1['add'](_0x2e2276),this['activeAnnotations']=_0x57c5f1;}['_removeActiveAnnotation'](_0xfafaef){const _0x2db81c=new Set(this['activeAnnotations']);_0x2db81c['delete'](_0xfafaef),this['activeAnnotations']=_0x2db81c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x305f11=this['collection'],_0x54c908=this['_visibleAnnotations'];function _0x7fe7e4(_0x4ddb48){const _0xd4e7=_0x4ddb48['source'];_0xd4e7['isVisible']&&!_0x54c908['has'](_0xd4e7)?_0x54c908['add'](_0xd4e7):!_0xd4e7['isVisible']&&_0x54c908['has'](_0xd4e7)&&_0x54c908['remove'](_0xd4e7),_0xd4e7['view']['focusTracker']['remove'](_0xd4e7['view']['element']),_0xd4e7['view']['focusTracker']['add'](_0xd4e7['view']['element']);}this['listenTo'](_0x305f11,'add',(_0x404aed,_0x367958)=>{_0x367958['isVisible']&&_0x54c908['add'](_0x367958),this['listenTo'](_0x367958,'change:isVisible',_0x7fe7e4);}),this['listenTo'](_0x305f11,'remove',(_0x828907,_0x2c26f1)=>{_0x54c908['has'](_0x2c26f1)&&_0x54c908['remove'](_0x2c26f1),this['stopListening'](_0x2c26f1,'change:isVisible',_0x7fe7e4);});}['_setupEnterAnnotationKeystroke'](){const _0x92e3fc=_0x1acd7f=>{_0x1acd7f['on']('ready',()=>{_0x1acd7f['keystrokes']['set'](_0x2bbc1d,(_0x5bc18d,_0x32c0ae)=>{const _0xf6595d=_0x29db23(this['activeAnnotations']['values']());_0xf6595d&&(_0xf6595d['view']['focus'](),_0x32c0ae());});});};this['context']instanceof _0x2a778b?_0x92e3fc(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4c8351,_0x59df3d)=>{_0x92e3fc(_0x59df3d);});}['_setupEscapeAnnotationHandling'](){const _0x5bbdb1=_0x30d86b=>{const _0x2b6960=_0x30d86b['source'],_0x551b64=[];let _0x11a279;if(Array['isArray'](_0x2b6960['target'])){_0x11a279=_0x2b6960['target'][0x0],this['context']instanceof _0x2a778b?_0x551b64['push'](this['context']):this['context']['editors']&&_0x551b64['push'](...this['context']['editors']);for(const _0x1d6754 of _0x551b64)for(const _0x4aa2bc of _0x1d6754['editing']['view']['domRoots']['values']())if(_0x4aa2bc['contains'](_0x11a279))return void _0x1d6754['editing']['view']['focus']();_0x11a279['focus']();}};this['listenTo'](this['collection'],'add',(_0x17f12a,_0x2ced6b)=>{this['listenTo'](_0x2ced6b,'escape',_0x5bbdb1,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x284256,_0x1f22d8)=>{this['stopListening'](_0x1f22d8,'escape',_0x5bbdb1);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x298773{['_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(_0x385631){super(_0x385631),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x47fa0b=this['context']['config'];_0x47fa0b['define']('comments.maxCommentsWhenCollapsed',0x2),_0x47fa0b['define']('comments.maxThreadTotalWeight',0x1f4),_0x47fa0b['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x47fa0b['define']('comments.CommentThreadView',gt),_0x47fa0b['define']('comments.CommentView',Tt),_0x47fa0b['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x526290=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x14ee99,_0x11a68f)=>this['_addCommentThread'](_0x11a68f)),this['on']('submitCommentThread',(_0x1790fd,_0x43a5e5)=>this['_submitCommentThread'](_0x43a5e5)),this['on']('resolveCommentThread',(_0x3457ac,_0x3968ea)=>this['_resolveCommentThread'](_0x3968ea)),this['on']('resolveCommentThread',(_0x2e84d0,_0x3ea94e)=>this['_updateActiveAnnotation'](_0x3ea94e),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x4797ad,_0x2e0984)=>this['_reopenCommentThread'](_0x2e0984)),this['on']('reopenCommentThread',(_0x4e560c,_0x541bdb)=>this['_updateActiveAnnotation'](_0x541bdb),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x263093,_0xc278ff)=>this['_removeCommentThread'](_0xc278ff)),this['on']('updateCommentThread',(_0x4caeea,_0x4f7bff)=>this['_updateCommentThread'](_0x4f7bff)),this['on']('updateCommentThread',(_0x4a95d6,_0x1d738d)=>this['_updateActiveAnnotation'](_0x1d738d),{'priority':'lowest'}),this['on']('addComment',(_0x5a76bb,_0x4de1cc)=>this['_addComment'](_0x4de1cc)),this['on']('updateComment',(_0xd1810d,_0x4f9c9e)=>this['_updateComment'](_0x4f9c9e)),this['on']('removeComment',(_0x1fc47c,_0x590fc5)=>this['_removeComment'](_0x590fc5)),this['on']('addComment',(_0x28f25b,{threadId:_0x1d3e12,isFromAdapter:_0x1e4b2f})=>{if(_0x1e4b2f)return;const _0x5b175f=this['getCommentThread'](_0x1d3e12),_0x46400f=_0x5b175f&&this['_threadToController']['get'](_0x5b175f);_0x46400f&&_0x46400f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x526290,'change:activeAnnotations',(_0x39ebb7,_0xdbae51,_0x4020ae)=>{const _0x4527e2=Array['from'](_0x4020ae)['map'](_0x1e5c32=>this['_viewToController']['get'](_0x1e5c32['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4527e2?_0x4527e2['model']:null;});}set['adapter'](_0x3c929d){if(this['_adapter'])throw new _0x48ecf8('commentsrepository-adapter-already-set');this['_adapter']=_0x3c929d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3f84bd=_t,threadId:_0x20792d=_0x11d7cc(),comments:_0x234166=[],unlinkedAt:_0x13b3d4=null,resolvedAt:_0x498b83=null,resolvedBy:_0x1d0d6d=null,target:_0x104256=null,context:_0x6fbda6=null,attributes:_0x37a08f={},isResolvable:_0x1a1ec6=!0x0,isSubmitted:_0xb92566=!0x1,isFromAdapter:_0x3b08b8=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x3f84bd),{'channelId':_0x3f84bd,'threadId':_0x20792d,'comments':_0x234166,'unlinkedAt':_0x13b3d4,'resolvedAt':_0x498b83,'resolvedBy':_0x1d0d6d,'target':_0x104256,'context':_0x6fbda6,'attributes':_0x37a08f,'isFromAdapter':_0x3b08b8,'isResolvable':_0x1a1ec6,'isSubmitted':_0xb92566}),this['getCommentThread'](_0x20792d);}['openNewCommentThread']({channelId:_0x1e8792=_t,threadId:_0x115097=_0x11d7cc(),target:_0x52a4a7,context:_0x2ee418=null,isResolvable:_0x469d30=!0x0}){if(this['_readOnlyChannels']['has'](_0x1e8792)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x52a4a7)throw new _0x48ecf8('commentsrepository-missing-target');const _0x10220f=this['addCommentThread']({'channelId':_0x1e8792,'threadId':_0x115097,'target':_0x52a4a7,'context':_0x2ee418,'isResolvable':_0x469d30});if(!_0x10220f)return null;const _0xed1e46=this['_threadToController']['get'](_0x10220f),_0x387837=_0xed1e46['view']['commentThreadInputView']['commentInputView'],_0x187891=this['context']['plugins']['get'](y),_0x3acc8e=_0x187891['getByInnerView'](_0xed1e46['view']);return _0x187891['activate'](_0x3acc8e),_0x387837['once']('editorReady',()=>_0x387837['focus']()),_0x10220f;}['hasCommentThread'](_0xc31345){if('string'!=typeof _0xc31345)throw new _0x48ecf8('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xc31345);}['updateCommentThread']({channelId:_0x2fbf8a=_t,threadId:_0x401c6c,context:_0x4f68a4,unlinkedAt:_0x37f81c,attributes:_0x4db030,isFromAdapter:_0x2185f2=!0x1}){return this['fire'](Nt('updateCommentThread',_0x2fbf8a),{'channelId':_0x2fbf8a,'threadId':_0x401c6c,'context':_0x4f68a4,'unlinkedAt':_0x37f81c,'attributes':_0x4db030,'isFromAdapter':_0x2185f2}),this['getCommentThread'](_0x401c6c);}['getCommentThread'](_0x50110b){if('string'!=typeof _0x50110b)throw new _0x48ecf8('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x50110b);}['fetchCommentThread']({channelId:_0x2a5a86,threadId:_0x3e5597}={}){const _0x3f91c7=this['getCommentThread'](_0x3e5597);if(_0x3f91c7)return Promise['resolve'](_0x3f91c7);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x48ecf8('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2a5a86,'threadId':_0x3e5597})['then'](_0x24bc40=>this['hasCommentThread'](_0x3e5597)?this['getCommentThread'](_0x3e5597):_0x24bc40?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2a5a86},_0x24bc40)):void 0x0)['catch'](_0x7bb248=>{throw console['error'](_0x7bb248),new _0x48ecf8('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5b3a37,skipNotAttached:_0x54342e=!0x1,skipEmpty:_0x4c01e1=!0x1,toJSON:_0x424fca=!0x1}={}){const _0xea6959=[];for(const _0x153cf1 of this['_threads']['values']())_0x5b3a37&&_0x153cf1['channelId']!==_0x5b3a37||_0x54342e&&!_0x153cf1['isAttached']||_0x4c01e1&&0x0===_0x153cf1['length']||_0xea6959['push'](_0x153cf1);return _0x424fca?_0xea6959['map'](_0x1b1dd9=>_0x1b1dd9['toJSON']()):_0xea6959;}['getAnnotationForCommentThread'](_0x5ba305){const _0x4c9dbf=this['_threadToController']['get'](_0x5ba305);if(!_0x4c9dbf)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x4c9dbf['view'])||null;}['getCommentThreadForAnnotation'](_0x32d49e){const _0x1eb018=this['_viewToController']['get'](_0x32d49e['innerView']);return _0x1eb018?_0x1eb018['model']:null;}['setActiveCommentThread'](_0x39b457){const _0x3eff00=this['context']['plugins']['get'](y);if(!_0x39b457)return void(this['activeCommentThread']&&_0x3eff00['deactivateAll']());const _0x8e0416=this['getCommentThread'](_0x39b457);if(!_0x8e0416)throw new _0x48ecf8('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x39b457});if(!this['_threadToController']['has'](_0x8e0416))throw new _0x48ecf8('commentsrepository-active-not-attached',null,{'threadId':_0x39b457});const _0x117390=_0x3eff00['getByInnerView'](this['_threadToController']['get'](_0x8e0416)['view']);_0x3eff00['activate'](_0x117390);}['switchReadOnly'](_0x3652f1,_0x4ee5ed){_0x3652f1?this['_readOnlyChannels']['add'](_0x4ee5ed):this['_readOnlyChannels']['delete'](_0x4ee5ed),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x58c852){return this['_readOnlyChannels']['has'](_0x58c852)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5d8870,_0x5384a3){return new vt(_0x5d8870,_0x5384a3);}['setPermissions'](_0x8395a6,_0x3f33db=_t){this['_permissions']['set'](_0x3f33db,_0x8395a6),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4626b6=_t){return this['_permissions']['has'](_0x4626b6)?this['_permissions']['get'](_0x4626b6):bt;}['_addCommentThread']({channelId:_0x4cbb4f,threadId:_0x4e2375,comments:_0x52cd16,unlinkedAt:_0x518794,resolvedAt:_0x445e92,resolvedBy:_0x10b604,target:_0x304182,context:_0x36ef2c,attributes:_0xfd8219,isFromAdapter:_0x28ed25,isResolvable:_0x179ab3,isSubmitted:_0x1352d7}){if('string'!=typeof _0x4e2375)throw new _0x48ecf8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4e2375});if(this['hasCommentThread'](_0x4e2375))throw new _0x48ecf8('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4e2375});const _0x5dc987=new pi(this,{'channelId':_0x4cbb4f,'id':_0x4e2375,'context':_0x36ef2c,'attributes':_0xfd8219,'unlinkedAt':_0x518794,'resolvedAt':_0x445e92,'resolvedBy':_0x10b604?this['context']['plugins']['get'](it)['getUser'](_0x10b604):null,'isResolvable':_0x179ab3,'isSubmitted':_0x1352d7||_0x28ed25});this['_threads']['set'](_0x4e2375,_0x5dc987);for(const _0x2f6bf0 of _0x52cd16)_0x5dc987['_add'](this['_createNewComment']({'threadId':_0x4e2375,..._0x2f6bf0}));return _0x304182&&_0x5dc987['attachTo'](_0x304182),_0x28ed25||!_0x5dc987['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4cbb4f,'threadId':_0x4e2375});}['_submitCommentThread']({channelId:_0x12e3e4,threadId:_0x4e336c}){if(!this['hasCommentThread'](_0x4e336c))throw new _0x48ecf8('commentsrepository-missing-comment-thread',this);const _0x42452d=this['getCommentThread'](_0x4e336c);if(_0x42452d['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x56685b,comments:_0x5673a0,resolvedAt:_0x47fbc2,resolvedBy:_0x221680,context:_0x544846,attributes:_0x442069}=_0x42452d,_0x59721a=this['context']['plugins']['get']('PendingActions'),_0x4a6d5d=_0x59721a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x12e3e4,'threadId':_0x56685b,'comments':_0x5673a0['map'](_0x36f300=>_0x36f300['toJSON']()),'resolvedAt':_0x47fbc2,'resolvedBy':_0x221680?_0x221680['id']:_0x221680,'context':_0x544846,'attributes':_0x442069})['then'](({comments:_0x1ec3e2})=>{_0x59721a['remove'](_0x4a6d5d);for(const _0x4dd8f8 of _0x1ec3e2)this['_updateComment']({'channelId':_0x12e3e4,'threadId':_0x4e336c,'commentId':_0x4dd8f8['commentId'],'createdAt':_0x4dd8f8['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x262143=>{throw console['error'](_0x262143),new _0x48ecf8('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4f7ce7,target:_0x56b177}){const _0x2c26af=this['getCommentThread'](_0x4f7ce7);if(!_0x2c26af)throw new _0x48ecf8('commentsrepository-attach-missing-comment-thread',this);const _0x42b839=this['context']['plugins']['get']('PendingActions'),_0x1b7cd6=this['context']['plugins']['get'](y),_0x3dea3c=this['_createCommentThreadView'](_0x2c26af),_0x949503=new vt(_0x2c26af,_0x3dea3c);let _0x5b3807=null;_0x3dea3c['on']('change:isDirty',(_0x1a80db,_0xb9188a,_0x119017)=>{_0x119017?_0x5b3807=_0x42b839['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5b3807&&(_0x42b839['remove'](_0x5b3807),_0x5b3807=null);}),this['_threadToController']['set'](_0x2c26af,_0x949503),this['_viewToController']['set'](_0x3dea3c,_0x949503);const _0x1502f7=new E(this['context']['locale'],_0x3dea3c);_0x1502f7['bind']('length')['to'](_0x3dea3c),_0x1502f7['bind']('isDirty')['to'](_0x3dea3c,'isDirty',_0x3dea3c,'length',(_0x35e26c,_0x4cab94)=>_0x35e26c||!_0x4cab94),_0x1502f7['bind']('isActive')['to'](_0x3dea3c),_0x1502f7['type']='comment';const _0x1e6a16=new T({'view':_0x1502f7,'target':_0x56b177,'type':'comment','isVisible':!_0x2c26af['archivedAt']&&!!('function'==typeof _0x56b177?_0x56b177():_0x56b177)});return _0x3dea3c['on']('escape',()=>{_0x1e6a16['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3dea3c,_0x1e6a16),_0x1b7cd6['add'](_0x1e6a16),_0x1e6a16;}['_bindAnnotationToEditors'](_0x2051ac,_0x2251e8){this['listenTo'](_0x2051ac,'editorReady',(_0x3745d2,_0x5b6191)=>{const _0x1ba7b5=_0x5b6191['ui']['view']['body']['bodyCollectionContainer'];_0x2251e8['focusableElements']['add'](_0x1ba7b5),this['context']instanceof _0x2a778b&&this['context']['ui']['focusTracker']['add'](_0x1ba7b5);},{'priority':'highest'}),this['listenTo'](_0x2051ac,'editorDestroyed',(_0x281b05,_0x82f95a)=>{const _0x3a51b5=_0x82f95a['ui']['view']['body']['bodyCollectionContainer'];_0x2251e8['focusableElements']['has'](_0x3a51b5)&&_0x2251e8['focusableElements']['remove'](_0x3a51b5),this['context']instanceof _0x2a778b&&this['context']['ui']['focusTracker']['remove'](_0x3a51b5);});}['_unbindEditors'](_0x16e593){this['stopListening'](_0x16e593,'editorReady'),this['stopListening'](_0x16e593,'editorDestroyed');}['_createCommentThreadView'](_0xe939aa){const _0xb7b784=this['context']['plugins']['get'](it),{config:_0x330a65,locale:_0x68536f}=this['context'],_0x52525e=pt(_0x330a65['get']('locale'),_0x68536f);return new(0x0,(_0x330a65['get']('comments'))['CommentThreadView'])(_0x68536f,_0xe939aa,_0xb7b784['me'],{'editorConfig':{..._0x330a65['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x330a65['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x330a65['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x330a65['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x330a65['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x52525e,'CommentView':_0x330a65['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3e03be,channelId:_0x29e1ad,resolvedAt:_0x1f2108,resolvedBy:_0x417bf5,isFromAdapter:_0x3b6950}){if(!this['hasCommentThread'](_0x3e03be))throw new _0x48ecf8('commentsrepository-missing-comment-thread',null,{'threadId':_0x3e03be});const _0x3c61ea=this['getCommentThread'](_0x3e03be);if(_0x3c61ea['isResolved'])throw new _0x48ecf8('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3e03be});const _0x5c2050=this['context']['plugins']['get'](it);if(_0x3c61ea['resolvedBy']=_0x5c2050['getUser'](_0x417bf5),_0x3c61ea['resolvedAt']=_0x1f2108,_0x3b6950||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x590e4c=this['context']['plugins']['get']('PendingActions'),_0x16e56e=_0x590e4c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x29e1ad,'threadId':_0x3e03be})['then'](({resolvedAt:_0x492b6c,resolvedBy:_0x2dbb7d})=>{_0x590e4c['remove'](_0x16e56e),_0x3c61ea['resolvedBy']['id']!==_0x2dbb7d&&(_0x3c61ea['resolvedBy']=_0x5c2050['getUser'](_0x2dbb7d)),_0x3c61ea['resolvedAt']=_0x492b6c;})['catch'](_0x38be98=>{throw console['error'](_0x38be98),new _0x48ecf8('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4dbcf6,channelId:_0x5d2320,isFromAdapter:_0xb009fe}){if(!this['hasCommentThread'](_0x4dbcf6))throw new _0x48ecf8('commentsrepository-missing-comment-thread',null,{'threadId':_0x4dbcf6});const _0x47b6a6=this['getCommentThread'](_0x4dbcf6);if(!_0x47b6a6['isResolved'])throw new _0x48ecf8('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4dbcf6});if(_0x47b6a6['resolvedBy']=null,_0x47b6a6['resolvedAt']=null,_0xb009fe||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x46bda7=this['context']['plugins']['get']('PendingActions'),_0x35d826=_0x46bda7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5d2320,'threadId':_0x4dbcf6})['then'](()=>_0x46bda7['remove'](_0x35d826))['catch'](_0x41e92f=>{throw console['error'](_0x41e92f),new _0x48ecf8('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x53eac4,isFromAdapter:_0x1c4a3c}){const _0x28c146=this['getCommentThread'](_0x53eac4);if(!_0x28c146)throw new _0x48ecf8('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x53eac4),this['_threads']['delete'](_0x53eac4),!_0x28c146['isSubmitted']||_0x1c4a3c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x310c61=this['context']['plugins']['get']('PendingActions'),{channelId:_0x65c894}=_0x28c146,_0x209f42=_0x310c61['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x65c894,'threadId':_0x53eac4})['then'](()=>_0x310c61['remove'](_0x209f42))['catch'](_0x39ba57=>{throw console['error'](_0x39ba57),new _0x48ecf8('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x38f6cc,unlinkedAt:_0x32ed7d,context:_0x5524b6,attributes:_0x94d575,isFromAdapter:_0x6315b}){if('string'!=typeof _0x38f6cc)throw new _0x48ecf8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x38f6cc});if(!this['hasCommentThread'](_0x38f6cc))throw new _0x48ecf8('commentsrepository-missing-comment-thread',null,{'threadId':_0x38f6cc});const _0x2fba55=this['getCommentThread'](_0x38f6cc);let _0x525da0=!0x1;if(void 0x0!==_0x5524b6&&_0x2fba55['context']!==_0x5524b6&&(_0x2fba55['context']=_0x5524b6,_0x525da0=!0x0),void 0x0!==_0x32ed7d&&_0x2fba55['unlinkedAt']!==_0x32ed7d&&(_0x2fba55['unlinkedAt']=_0x32ed7d,_0x525da0=!0x0),_0x94d575&&!At(_0x94d575,_0x2fba55['attributes'])&&(_0x2fba55['attributes']=_0x94d575,_0x525da0=!0x0),!_0x525da0)return Promise['resolve']();if(!_0x2fba55['isSubmitted']||_0x6315b||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x44fd3e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x443fe8}=_0x2fba55,_0x430426=_0x44fd3e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x443fe8,'threadId':_0x38f6cc,'context':_0x5524b6,'unlinkedAt':_0x32ed7d,'attributes':_0x94d575})['then'](()=>_0x44fd3e['remove'](_0x430426))['catch'](_0x5b1c36=>{throw console['error'](_0x5b1c36),new _0x48ecf8('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xb40762){const _0x43019b=this['context']['plugins']['get'](y),_0x4e9c01=this['getCommentThread'](_0xb40762);if(_0x4e9c01['_isAttached']=!0x1,this['_threadToController']['has'](_0x4e9c01)){const _0x209da6=this['_threadToController']['get'](_0x4e9c01),_0xc11c52=_0x209da6['view'],_0x227de8=_0x43019b['getByInnerView'](_0xc11c52);this['_threadToController']['delete'](_0x4e9c01),this['_viewToController']['delete'](_0xc11c52),_0x227de8&&_0x43019b['remove'](_0x227de8),_0x209da6['destroy'](),_0xc11c52['destroy']()['then'](()=>{this['_unbindEditors'](_0xc11c52);});}}['_updateActiveAnnotation']({threadId:_0x267028,resolvedAt:_0x5507c7,unlinkedAt:_0x14e6c8}){const _0x4a2708=!!_0x5507c7,_0x33149f=this['context']['plugins']['get'](y),_0x4fa235=this['getCommentThread'](_0x267028);if(this['_threadToController']['has'](_0x4fa235)){const _0x5a14b4=this['_threadToController']['get'](_0x4fa235)['view'],_0x30474a=_0x33149f['getByInnerView'](_0x5a14b4);_0x30474a&&(_0x4a2708&&_0x33149f['_removeActiveAnnotation'](_0x30474a),_0x14e6c8?_0x30474a['isVisible']=!0x1:_0x30474a['refreshVisibility']());}}['_getExternalAuthor'](_0x3ba271){const _0xc67ff=this['context']['plugins']['get'](it),_0x2e9b1c=It('external:'+_0x3ba271),_0x12a3c9=_0xc67ff['getUser'](_0x2e9b1c);return _0x12a3c9||_0xc67ff['addUser']({'id':_0x2e9b1c,'name':_0x3ba271});}['_createNewComment']({threadId:_0xac09ba,commentId:_0x2914da=_0x11d7cc(),content:_0x3db60e,authorId:_0x68c513,createdAt:_0x220e15,attributes:_0x2c0ac7}){if('string'!=typeof _0x2914da)throw new _0x48ecf8('commentsrepository-invalid-commentid');if('string'!=typeof _0x68c513)throw new _0x48ecf8('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3db60e||!_0x3db60e['trim']())throw new _0x48ecf8('commentsrepository-invalid-comment-content');const _0xeb5470=this['context']['plugins']['get'](it)['getUser'](_0x68c513);if(!_0xeb5470)throw new _0x48ecf8('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x68c513});let _0x42b676=null,_0x203dec=_0x220e15;return _0x2c0ac7?.['@external']&&(_0x42b676=this['_getExternalAuthor'](_0x2c0ac7['@external']['authorName']),_0x203dec=new Date(_0x2c0ac7['@external']['createdAt'])),new wi(this,{'threadId':_0xac09ba,'id':_0x2914da,'author':_0x42b676||_0xeb5470,'creator':_0xeb5470,'content':_0x3db60e,'createdAt':_0x220e15,'authoredAt':_0x203dec,'attributes':_0x2c0ac7});}['_addComment'](_0x59a434){let {threadId:_0x327fb7,content:_0xf3257b,attributes:_0x97ab4a,isFromAdapter:_0x54c654}=_0x59a434;const _0x422db4=this['getCommentThread'](_0x59a434['threadId']);if(!_0x422db4)throw new _0x48ecf8('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x20a587=this['_createNewComment'](_0x59a434),{id:_0x313121}=_0x20a587;if(_0x422db4['_add'](_0x20a587),_0x54c654||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x422db4['isSubmitted'])return Promise['resolve']();const _0x470f2f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1803dd}=_0x422db4,_0x47c39a=_0x470f2f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x97ab4a||(_0x97ab4a={}),this['adapter']['addComment']({'channelId':_0x1803dd,'threadId':_0x327fb7,'commentId':_0x313121,'content':_0xf3257b,'attributes':_0x97ab4a})['then'](_0x218114=>{_0x470f2f['remove'](_0x47c39a),_0x218114&&this['_updateComment']({'channelId':_0x1803dd,'threadId':_0x327fb7,'commentId':_0x313121,'createdAt':_0x218114['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5b8349=>{throw console['error'](_0x5b8349),new _0x48ecf8('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4eed74,commentId:_0x483bda,content:_0x1b407b,createdAt:_0x2d8894,attributes:_0x3e12e8,isFromAdapter:_0x5c3666}){if(void 0x0!==_0x1b407b&&('string'!=typeof _0x1b407b||!_0x1b407b['trim']()['length']))throw new _0x48ecf8('commentsrepository-update-comment-invalid-content');const _0x3cef65=this['getCommentThread'](_0x4eed74),_0x22f0c0=_0x3cef65['getComment'](_0x483bda);if(!_0x22f0c0)throw new _0x48ecf8('commentsrepository-update-missing-comment',this);let _0x3b52f1=!0x1;if(_0x1b407b&&_0x1b407b!==_0x22f0c0['content']&&(_0x22f0c0['isEditable']||_0x5c3666)&&(_0x22f0c0['content']=_0x1b407b,_0x3b52f1=!0x0),_0x2d8894&&_0x2d8894!==_0x22f0c0['createdAt']&&(_0x22f0c0['createdAt']=_0x2d8894,_0x22f0c0['attributes']&&_0x22f0c0['attributes']['@external']||(_0x22f0c0['authoredAt']=_0x2d8894),_0x3b52f1=!0x0),_0x3e12e8&&!At(_0x3e12e8,_0x22f0c0['attributes'])&&(_0x22f0c0['attributes']=_0x3e12e8,_0x3b52f1=!0x0),!_0x3b52f1)return Promise['resolve']();if(_0x3cef65['fire']('commentUpdated'),_0x5c3666||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xce63aa=this['context']['plugins']['get']('PendingActions'),{channelId:_0x25fac1}=this['getCommentThread'](_0x22f0c0['threadId']),_0x25ba5e=_0xce63aa['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x25fac1,'threadId':_0x4eed74,'commentId':_0x483bda,'content':_0x1b407b,'attributes':_0x3e12e8})['then'](()=>_0xce63aa['remove'](_0x25ba5e))['catch'](_0x593854=>{throw console['error'](_0x593854),new _0x48ecf8('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3d45a7,commentId:_0x2bb9ed,isFromAdapter:_0x4fb49e}){const _0x3bd8e9=this['getCommentThread'](_0x3d45a7),_0x44ccf6=_0x3bd8e9['getComment'](_0x2bb9ed);if(!_0x44ccf6)throw new _0x48ecf8('commentsrepository-remove-missing-comment',this);if(_0x3bd8e9['_remove'](_0x44ccf6),_0x4fb49e||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xa17fd7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x43c16a}=_0x3bd8e9,_0x1d5f2e=_0xa17fd7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x43c16a,'threadId':_0x3d45a7,'commentId':_0x2bb9ed})['then'](()=>_0xa17fd7['remove'](_0x1d5f2e))['catch'](_0x506a98=>{throw console['error'](_0x506a98),new _0x48ecf8('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
+ _0x11db0(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3fbd96,_0x21d9ff){super();const _0x471246=_0x21d9ff['isResolvable'];this['channelId']=_0x21d9ff['channelId'],this['id']=_0x21d9ff['id'],this['comments']=new _0x3d5ab7(),this['_repository']=_0x3fbd96,this['_isAttached']=!0x1,this['_isSubmitted']=_0x21d9ff['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3fbd96,'_permissions',_0x3fbd96,'_readOnlyChannels',()=>_0x3fbd96['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3fbd96,'_permissions',()=>_0x3fbd96['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3fbd96,'_permissions',()=>{const _0xa6f320=_0x3fbd96['getPermissions'](this['channelId']);return _0xa6f320['write']||_0xa6f320['admin'];}),this['bind']('isResolvable')['to'](_0x3fbd96,'_permissions',()=>_0x471246&&_0x3fbd96['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x21d9ff['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x223bea,_0x383c7a)=>_0x223bea?_0x383c7a?_0x223bea<_0x383c7a?_0x223bea:_0x383c7a:_0x223bea:_0x383c7a),this['set']('unlinkedAt',_0x21d9ff['unlinkedAt']||null),this['set']('resolvedAt',_0x21d9ff['resolvedAt']||null),this['set']('resolvedBy',_0x21d9ff['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4c10ab=>!!_0x4c10ab),this['set']('attributes',_0x21d9ff['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x1c966d,_0x1ec92f)=>_0x1c966d+_0x1ec92f['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x597c75,id:_0x2ee63e}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x597c75),{'channelId':_0x597c75,'threadId':_0x2ee63e});}['setUnlinkedAt'](_0x139022){this['_update']({'unlinkedAt':_0x139022});}['resolve']({resolvedAt:_0x22c5d3=new Date(),resolvedBy:_0x15d6bd='',isFromAdapter:_0x43d638=!0x1}={}){const _0x52ba43=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x49d7ad,id:_0x26ca33}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x49d7ad),{'channelId':_0x49d7ad,'threadId':_0x26ca33,'resolvedAt':_0x22c5d3,'resolvedBy':_0x15d6bd||_0x52ba43['id'],'isFromAdapter':_0x43d638});}['reopen']({isFromAdapter:_0x13feb3=!0x1}={}){const {channelId:_0x44a731,id:_0x2bee8c}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x44a731),{'channelId':_0x44a731,'threadId':_0x2bee8c,'isFromAdapter':_0x13feb3});}['setContext'](_0xc9aefa){this['context']||this['_update']({'context':_0xc9aefa});}['setAttribute'](_0x1ae76b,_0x244ff4){const _0x532453=wt(this['attributes']);yt(_0x532453,_0x1ae76b,_0x244ff4),this['_update']({'attributes':_0x532453});}['removeAttribute'](_0x2ab3de){const _0xd6c507=wt(this['attributes']);Ct(_0xd6c507,_0x2ab3de),this['_update']({'attributes':_0xd6c507});}['remove']({isFromAdapter:_0x10d998=!0x1}={}){const {channelId:_0x748712,id:_0x47989e}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x748712),{'channelId':_0x748712,'threadId':_0x47989e,'isFromAdapter':_0x10d998});}['attachTo'](_0x1c52c6){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x1c52c6});}['addComment'](_0xdb5dbd){const {channelId:_0x96695c,id:_0x3766a6}=this;this['_repository']['fire'](Nt('addComment',_0x96695c,_0x3766a6),Object['assign']({'channelId':_0x96695c,'threadId':_0x3766a6},_0xdb5dbd));}['getComment'](_0x180fd0){if('string'!=typeof _0x180fd0)throw new _0x48ecf8('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x180fd0});return this['comments']['get'](_0x180fd0);}['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'](_0x26ef5b=>_0x26ef5b['toJSON']()),'attributes':this['attributes']};}['_add'](_0x463f65){return this['listenTo'](_0x463f65,'change:authoredAt',()=>{const _0x5c1220=this['_findOptimalIndex'](_0x463f65),_0x250569=this['comments'];_0x5c1220-0x1!=_0x250569['getIndex'](_0x463f65)&&_0x5c1220+0x1!=_0x250569['getIndex'](_0x463f65)&&(this['_remove'](_0x463f65),this['_add'](_0x463f65));}),this['comments']['add'](_0x463f65,this['_findOptimalIndex'](_0x463f65));}['_update'](_0x320973){const {channelId:_0x191194,id:_0x421563}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x191194),{..._0x320973,'channelId':_0x191194,'threadId':_0x421563});}['_remove'](_0x2cdc01){return this['stopListening'](_0x2cdc01),_0x2cdc01['destroy'](),this['comments']['remove'](_0x2cdc01);}['_findOptimalIndex'](_0x12ac5d){const _0x28f1d5=this['comments']['find'](_0x453d0f=>new Date(_0x453d0f['authoredAt'])['getTime']()>new Date(_0x12ac5d['authoredAt'])['getTime']());return _0x28f1d5?this['comments']['getIndex'](_0x28f1d5):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
+ _0x11db0(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5429d1,_0xdc2db1){super();const _0xaf052f=_0x5429d1['context']['plugins']['get'](it)['me'],_0x6365c8=_0x5429d1['getCommentThread'](_0xdc2db1['threadId']),_0x181c1b=0x0===_0x6365c8['comments']['length'],_0x3fc7a6=_0xaf052f===_0xdc2db1['author'];this['id']=_0xdc2db1['id'],this['threadId']=_0xdc2db1['threadId'],this['author']=_0xdc2db1['author'],this['creator']=_0xdc2db1['creator'],this['isExternal']=Boolean(_0xdc2db1['attributes']&&_0xdc2db1['attributes']['@external']),this['set']('content',_0xdc2db1['content']),this['createdAt']=_0xdc2db1['createdAt']||new Date(),this['set']('authoredAt',_0xdc2db1['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x6365c8,'resolvedAt'),this['set']('attributes',_0xdc2db1['attributes']||{}),this['bind']('isEditable')['to'](_0x5429d1,'_permissions',()=>{const _0x91771f=_0x5429d1['getPermissions'](_0x6365c8['channelId'])['write'],_0x20ef02=_0x5429d1['getPermissions'](_0x6365c8['channelId'])['modifyAll'];return _0x3fc7a6&&_0x91771f||!_0x3fc7a6&&_0x20ef02;}),this['bind']('isRemovable')['to'](_0x6365c8,'isRemovable',_0x5429d1,'_permissions',_0x217a2e=>{const _0x400cde=_0x5429d1['getPermissions'](_0x6365c8['channelId'])['write'],_0x3b746b=_0x5429d1['getPermissions'](_0x6365c8['channelId'])['modifyAll'];return _0x3fc7a6&&_0x400cde||_0x217a2e&&_0x181c1b||!_0x3fc7a6&&_0x3b746b&&!_0x181c1b;}),this['bind']('isReadOnly')['to'](_0x6365c8,'isReadOnly'),this['_repository']=_0x5429d1;}get['weight'](){return Math['max'](function(_0x4ead92){const _0x1ae7dd=document['createElement']('div');return _0x1ae7dd['innerHTML']=_0x4ead92,_0x1ae7dd['textContent']['length'];}(this['content']),0xc8);}['update'](_0x50a7c6){const {threadId:_0x2730ea,id:_0x2b259e}=this;if(!this['_repository']['hasCommentThread'](_0x2730ea))throw new _0x48ecf8('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x50ee39}=this['_repository']['getCommentThread'](_0x2730ea);this['_repository']['fire'](Nt('updateComment',_0x50ee39,_0x2730ea),{'channelId':_0x50ee39,'threadId':_0x2730ea,'commentId':_0x2b259e,..._0x50a7c6});}['setAttribute'](_0x455f4b,_0x24fdb3){const _0x508c37=wt(this['attributes']);yt(_0x508c37,_0x455f4b,_0x24fdb3),this['update']({'attributes':_0x508c37});}['removeAttribute'](_0x4f3dd2){const _0x49ec51=wt(this['attributes']);Ct(_0x49ec51,_0x4f3dd2),this['update']({'attributes':_0x49ec51});}['remove'](_0x2e5ef6={}){if(!_0x2e5ef6['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x370e39,id:_0x15090a}=this;if(!this['_repository']['hasCommentThread'](_0x370e39))throw new _0x48ecf8('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5dd50b}=this['_repository']['getCommentThread'](_0x370e39);this['_repository']['fire'](Nt('removeComment',_0x5dd50b,_0x370e39),{'channelId':_0x5dd50b,'threadId':_0x370e39,'commentId':_0x15090a,..._0x2e5ef6});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3499f2,..._0x322654){for(const _0x1bb5ae of _0x322654)void 0x0!==_0x1bb5ae&&(_0x3499f2+=':'+String(_0x1bb5ae));return _0x3499f2;}class ot extends _0x10c84a{constructor(_0x378c60){super(_0x378c60),this['set']('hasContent',!0x1);}['refresh'](){const _0x5bbd68=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5c3c5a of _0x5bbd68['getRanges']())if(this['_hasContent'](_0x5c3c5a))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x30a2b5=_0x11d7cc(),ranges:_0x20bc16,comment:_0xa5fb72}={}){const _0x1139ea=this['editor']['model'],_0x3515a4=_0x20bc16??Array['from'](_0x1139ea['document']['selection']['getRanges']()),_0x253b95=[];for(const _0x36991d of _0x3515a4)this['_hasContent'](_0x36991d)&&_0x253b95['push'](this['_trimToContent'](_0x36991d));if(!_0x253b95['length'])throw new _0x48ecf8('addcommentthreadcommand-incorrect-ranges',null);_0xa5fb72&&this['_createCommentThread'](_0x30a2b5,_0xa5fb72),this['_createMarkersFromRanges'](_0x30a2b5,_0x253b95,!!_0xa5fb72);}['_createMarkersFromRanges'](_0x419fe1,_0x42253d,_0x414c77){this['editor']['model']['change'](_0x14ee2e=>{for(const _0x2aeae7 of _0x42253d){const _0x1d5612=_0x11d7cc()['substr'](0x1,0x5),_0x41e485='comment:'+_0x419fe1+':'+_0x1d5612;_0x14ee2e['addMarker'](_0x41e485,{'range':_0x2aeae7,'usingOperation':_0x414c77,'affectsData':_0x414c77});}});}['_createCommentThread'](_0x28261d,_0x20a7fa){const _0x11e8ee=this['editor']['plugins']['get']('CommentsRepository'),_0x3cfede=this['editor']['config']['get']('collaboration.channelId'),_0x4158ee=this['editor']['plugins']['get']('Users')['me'];if(!_0x4158ee)throw new _0x48ecf8('addcommentthreadcommand-user-not-found',null);_0x11e8ee['addCommentThread']({'threadId':_0x28261d,'channelId':_0x3cfede,'comments':[{'authorId':_0x4158ee['id'],'content':_0x20a7fa,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4699e5){for(const _0x1b86f5 of _0x4699e5['getItems']())if(this['_itemIsContent'](_0x1b86f5))return!0x0;return!0x1;}['_itemIsContent'](_0x2a30f0){return _0x2a30f0['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x2a30f0)&&!_0x2a30f0['is']('element','tableCell');}['_trimToContent'](_0x5a74a3){const _0x80eb4b=_0x2f365a=>!this['_itemIsContent'](_0x2f365a['item']),_0x2264dd=_0x5a74a3['start']['getLastMatchingPosition'](_0x80eb4b),_0x212378=_0x5a74a3['end']['getLastMatchingPosition'](_0x80eb4b,{'direction':'backward'});return this['editor']['model']['createRange'](_0x2264dd,_0x212378);}}class b extends _0x5bb67e{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f0931){super(_0x5f0931),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xc00ac5=this['editor'],_0xfe30a=_0xc00ac5['model']['document']['selection'],_0x2d09bd=_0x3aa37b(()=>this['refreshSelectedViews'](),0xa);_0xfe30a['on']('change:range',(_0x283248,_0x5894f4)=>{_0x5894f4['directChange']&&(_0x2d09bd['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xc00ac5['editing']['view']['document'],'change:isFocused',(_0x1913ec,_0x2817e3,_0x5ae69e)=>{_0x5ae69e&&_0x2d09bd();}),this['listenTo'](_0xc00ac5['ui']['focusTracker'],'change:isFocused',(_0x1b23bd,_0x2961eb,_0x185555)=>{_0x185555||this['fire']('blur',{'isAnnotationTracked':_0x2fc216=>this['_editorAnnotationsData']['has'](_0x2fc216['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x10867e){if(this['_editorAnnotations']['has'](_0x10867e['view']))return;this['_editorAnnotations']['add'](_0x10867e['view']),this['editor']['ui']['focusTracker']['add'](_0x10867e['view']['element']);const _0xf2be4=this['editor']['plugins']['get'](y);this['listenTo'](_0xf2be4['collection'],'remove',(_0x513bea,_0x4db52b)=>{this['editor']['ui']['focusTracker']['remove'](_0x4db52b['view']['element']),this['_editorAnnotations']['delete'](_0x4db52b['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2b209b){if('function'!=typeof _0x2b209b)throw new _0x48ecf8('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2b209b);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x59f9ec,annotations:_0x4c2f87}){const _0x1188eb=[],_0x4fbef6=this['editor']['model']['document']['selection'],_0x5e4e2e=Array['from'](_0x4fbef6['getRanges']());for(const [_0x24dc98,_0xdabb75]of this['_editorAnnotationsData']){const _0x4304e2=_0x12f5c3(_0xdabb75),_0x549870=_0x4c2f87['getByInnerView'](_0x24dc98);_0x4304e2&&_0x549870&&_0x1188eb['push']({'annotation':_0x549870,'range':_0x4304e2});}function _0x12f5c3(_0x4d26e2){for(const _0x10423c of _0x4d26e2)for(const _0x579b1b of _0x5e4e2e)if(_0x10423c['containsRange'](_0x579b1b,!_0x4fbef6['isCollapsed']))return _0x10423c;return null;}return _0x1188eb['sort']((_0x554eda,_0xd61a19)=>{const _0x417279=_0x554eda['range'],_0x560606=_0xd61a19['range'];if(!_0x417279['isEqual'](_0x560606)){if(_0x417279['containsRange'](_0x560606,!0x0))return 0x1;if(_0x560606['containsRange'](_0x417279,!0x0))return-0x1;}return _0x554eda['annotation']==_0x59f9ec?-0x1:_0xd61a19['annotation']==_0x59f9ec?0x1:0x0;})['map'](_0x4c9004=>_0x4c9004['annotation']);}get['_editorAnnotationsData'](){const _0xf7bbb0=new Map();for(const _0x99b98c of Array['from'](this['_dataCollectors']))for(const [_0x15d8fb,_0x4334ef]of _0x99b98c())_0xf7bbb0['set'](_0x15d8fb,_0x4334ef);return _0xf7bbb0;}}class st extends _0x5bb67e{['afterInit'](){const _0x95b6a1=this['editor'];if(!_0x95b6a1['plugins']['has']('RestrictedEditingModeEditing'))return;_0x95b6a1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x5bb67e{constructor(_0x5e31f5){super(_0x5e31f5),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1743ee=this['editor'],_0x85a9c0=_0x1743ee['commands']['get']('importWord'),_0xcb5906=_0x1743ee['plugins']['get'](it);_0x85a9c0&&(_0x85a9c0['on']('execute',(_0x461aca,[,_0x566ef5])=>{_0x566ef5['collaboration_features']={'comments':!0x0,'user_id':_0xcb5906['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x85a9c0,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x38f437,_0x1bb92d){const {comment_threads:_0x2cf9c7}=_0x1bb92d;_0x2cf9c7&&_0x2cf9c7['forEach'](({thread_id:_0x333a2a,comments:_0xda7393,is_resolved:_0xc74e3c})=>{const _0x218d31=new Date(),_0x23bdc1=_0xda7393['map'](({author:_0x458588,content:_0x1ecefa,created_at:_0x21df4a})=>({'content':_0x1ecefa,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x218d31,'attributes':{'@external':{'authorName':_0x458588,'createdAt':_0x21df4a?new Date(_0x21df4a):new Date(),'source':'importWord'}}})),_0x5bae46=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x5bae46,'threadId':_0x333a2a,'comments':_0x23bdc1,'resolvedAt':_0xc74e3c?_0x218d31:null});});}}class at extends _0x5bb67e{constructor(_0x16b7fb){super(_0x16b7fb),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x1e590c=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1e590c,'contentInsertion',(_0xb79f48,_0x42ecac)=>this['_removeMarkersWithoutThreads'](_0x42ecac['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x5f34a5){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5f34a5;const _0x4c1821=this['editor']['plugins']['get']('CommentsRepository');for(const _0xd92f4a of _0x5f34a5['keys']()){const [_0x133f45,_0x401905]=_0xd92f4a['split'](':');'comment'!=_0x133f45||_0x4c1821['hasCommentThread'](_0x401905)||_0x5f34a5['delete'](_0xd92f4a);}return _0x5f34a5;}['_registerMarkerInClipboardPipeline'](){const _0x48651a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1cf8fa=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1cf8fa&&_0x48651a['_registerMarkerToCopy']('comment',_0x1cf8fa);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xb3b68){switch(_0xb3b68){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x30422f){const _0x2551e2=_0x30422f['split'](':');return{'group':_0x2551e2[0x0],'id':_0x2551e2[0x1],'part':_0x2551e2[0x2]};}class ut extends _0x5bb67e{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x44bebb,_0x47cc91)=>{if(!_0x47cc91['options']['showCommentHighlights'])return null;if(_0x47cc91['options']['ignoreResolvedComments']){const {id:_0x265893}=ft(_0x44bebb['markerName']),_0x5023e9=this['editor']['plugins']['get'](o);if(_0x5023e9['getCommentThread'](_0x265893)?.['isResolved']&&_0x44bebb['item'])return _0x47cc91['consumable']['consume'](_0x44bebb['item'],'addMarker:'+_0x44bebb['markerName']),_0x47cc91['consumable']['consume'](_0x44bebb['item'],'removeMarker:'+_0x44bebb['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2e3aad=>{_0x2e3aad['on']('addMarker:comment',(_0x25e7d2,_0x238a0b,_0x1932bd)=>{if(!_0x1932bd['options']['showCommentHighlights'])return;const _0x407fcc=_0x238a0b['item'];if(!_0x407fcc)return;const _0x2b39e3=_0x1932bd['mapper']['toViewElement'](_0x407fcc);this['editor']['model']['schema']['isObject'](_0x407fcc)&&_0x2b39e3&&!_0x2b39e3['getCustomProperty']('widget')&&_0x2b39e3['is']('containerElement')&&_0x1f4366(_0x2b39e3,_0x1932bd['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5193e4,{writer:_0x1b7d49,options:_0x442218})=>{if(!_0x442218['showCommentHighlights'])return null;const _0x4dd673=_0x1b7d49['createContainerElement']('div'),_0x63837f=_0x1b7d49['createEmptyElement']('hr');return _0x1b7d49['addClass']('ck-horizontal-line',_0x4dd673),_0x1b7d49['insert'](_0x1b7d49['createPositionAt'](_0x4dd673,0x0),_0x63837f),_0x4dd673;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x25590e,{writer:_0x48f0d4,options:_0x1d9644})=>{if(!_0x1d9644['showCommentHighlights'])return null;const _0x21ac74=_0x48f0d4['createContainerElement']('span'),_0x1cc5b1=_0x48f0d4['createEmptyElement']('img');return _0x48f0d4['addClass']('image-inline',_0x21ac74),_0x48f0d4['insert'](_0x48f0d4['createPositionAt'](_0x21ac74,0x0),_0x1cc5b1),_0x21ac74;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x446f88,{writer:_0x58b744,options:_0x5c211c})=>{if(_0x5c211c['showCommentHighlights'])return _0x58b744['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4c9753,_0x1d5742,_0x2d1a23)=>{_0x2d1a23['options']['showCommentHighlights']&&_0x4c9753['stop']();},{'priority':'high'});}}class r extends _0x5bb67e{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(_0x5758c3){super(_0x5758c3),this['set']('isThreadsLoadingPaused',!0x0),_0x5758c3['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x243464,_0x214972,_0x182d28,_0x8257c9)=>{const _0x9ed280=_0x5758c3['plugins']['get'](o),_0x2c4b81=_0x182d28?ft(_0x182d28)['id']:null;_0x5758c3['model']['change'](()=>{if(_0x2c4b81){const _0x4af9a8=this['getAllMarkersForId'](_0x2c4b81);for(const _0x87343a of _0x4af9a8)_0x5758c3['editing']['reconvertMarker'](_0x87343a);}if(_0x8257c9){const {id:_0x56fc73}=ft(_0x8257c9),_0x204109=_0x9ed280['getCommentThread'](_0x56fc73);if(_0x204109&&_0x204109['unlinkedAt'])return;if(_0x204109&&!_0x204109['isAttached'])return;const _0x5b1fd2=this['getAllMarkersForId'](_0x56fc73);for(const _0x69e683 of _0x5b1fd2)_0x5758c3['editing']['reconvertMarker'](_0x69e683);}}),_0x2c4b81&&this['scrollToThreadMarker'](_0x2c4b81);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3a507b=this['editor'],_0x5275c9=_0x3a507b['plugins']['get'](o),_0x1dde53=_0x3a507b['config']['get']('collaboration.channelId'),_0x20de2a=_0x5275c9['getCommentThreads']()['filter'](_0x2bc5ec=>_0x2bc5ec['channelId']!==_0x1dde53);_0x3a507b['commands']['add']('addCommentThread',new ot(_0x3a507b)),this['listenTo'](_0x3a507b,'change:isReadOnly',(_0x2aa795,_0x2717fb,_0x1661f7)=>{_0x5275c9['switchReadOnly'](_0x1661f7,_0x3a507b['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5275c9,dt('addCommentThread',_0x1dde53),(_0xe5148a,{threadId:_0xf48919})=>{const _0x16b8c8=this['editor']['plugins']['get'](o)['getCommentThread'](_0xf48919);_0x16b8c8?.['unlinkedAt']&&this['_attachArchivedThread'](_0xf48919);}),this['listenTo'](_0x5275c9,dt('removeCommentThread',_0x1dde53),(_0x57c08e,{threadId:_0x39a986})=>{_0x3a507b['model']['enqueueChange']({'isUndoable':!0x1},_0x1c0ad2=>{const _0x12977c=this['getAllMarkersForId'](_0x39a986);for(const _0x3f4447 of _0x12977c)_0x1c0ad2['removeMarker'](_0x3f4447);});}),this['listenTo'](_0x5275c9,dt('resolveCommentThread',_0x1dde53),(_0x1b4f56,{threadId:_0x283742})=>{(this['_reconvertMarkers'](_0x283742),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x283742)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5275c9,dt('reopenCommentThread',_0x1dde53),(_0x4a53aa,{threadId:_0x3845e1})=>{this['_reconvertMarkers'](_0x3845e1);},{'priority':'low'}),this['listenTo'](_0x5275c9,dt('addComment',_0x1dde53),(_0x4c0a64,{threadId:_0x5e24e6,isFromAdapter:_0x5b8ce4})=>{const _0x26991a=this['getAllMarkersForId'](_0x5e24e6);if(_0x5b8ce4||0x0==_0x26991a['length']||!_0x5275c9['hasCommentThread'](_0x5e24e6))return;0x1===_0x5275c9['getCommentThread'](_0x5e24e6)['length']&&_0x3a507b['model']['enqueueChange']({'isUndoable':!0x1},_0x4d1947=>{for(const _0x5736ff of _0x26991a)_0x4d1947['updateMarker'](_0x5736ff,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x20de2a);}['afterInit'](){!async function(_0x41e38d){const _0x548eb3=_0x24d559([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]),_0x12ec9a=0x73460ab3,_0x48b08=0x734189ab^_0x12ec9a,_0x4b604f=window[_0x24d559([0x44,0x61,0x74,0x65])][_0x24d559([0x6e,0x6f,0x77])](),_0x41dcca=_0x41e38d[_0x24d559([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x38dd18=new window[(_0x24d559([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc97447=>{_0x41dcca[_0x24d559([0x6f,0x6e,0x63,0x65])](_0x24d559([0x72,0x65,0x61,0x64,0x79]),_0xc97447);}),_0x36bae7={[_0x24d559([0x6b,0x74,0x79])]:_0x24d559([0x45,0x43]),[_0x24d559([0x75,0x73,0x65])]:_0x24d559([0x73,0x69,0x67]),[_0x24d559([0x63,0x72,0x76])]:_0x24d559([0x50,0x2d,0x32,0x35,0x36]),[_0x24d559([0x78])]:_0x24d559([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]),[_0x24d559([0x79])]:_0x24d559([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]),[_0x24d559([0x61,0x6c,0x67])]:_0x24d559([0x45,0x53,0x32,0x35,0x36])},_0x57dc27=_0x41dcca[_0x24d559([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x24d559([0x67,0x65,0x74])](_0x24d559([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2083a9(){let _0x20f5f5,_0x25c2f7=null,_0x1cf393=null;try{if(_0x57dc27==_0x24d559([0x47,0x50,0x4c]))return _0x24d559([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x20f5f5=_0x53d67e(),!_0x20f5f5)return _0x24d559([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x20f5f5[_0x24d559([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1cf393=_0x535782(_0x20f5f5[_0x24d559([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x20f5f5[_0x24d559([0x6a,0x74,0x69])])),await _0x21e1a1()?_0x5dfb33()?_0x2100f7()?_0x24d559([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x6e3f8b()?(_0x20f5f5[_0x24d559([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x24d559([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x25c2f7=_0x4a771e(_0x24d559([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x180bda()):_0x24d559([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x24d559([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x24d559([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x24d559([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2100f7(){const _0x47311e=[_0x24d559([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x24d559([0x74,0x72,0x69,0x61,0x6c])][_0x24d559([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x20f5f5[_0x24d559([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4b604f/0x3e8:0xe10*_0x48b08;return _0x20f5f5[_0x24d559([0x65,0x78,0x70])]<_0x47311e;}function _0x5dfb33(){const _0x39a6bf=_0x20f5f5[_0x24d559([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x39a6bf)return!0x1;if(_0x39a6bf[_0x24d559([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24d559([0x2a])))return!0x0;if(_0x39a6bf[_0x24d559([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24d559([0x43,0x4d,0x54])))return!0x0;if(_0x39a6bf[_0x24d559([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24d559([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x48b4ab())return!0x0;if(_0x39a6bf[_0x24d559([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24d559([0x52,0x43,0x4d,0x54]))){if(_0x2a5816())return!0x0;if(_0x5efd38()||_0x4de8c5())return!0x0;}return!0x1;}function _0x6e3f8b(){const _0xe9ee7a=_0x20f5f5[_0x24d559([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xe9ee7a||0x0==_0xe9ee7a[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5f0930}=new URL(window[_0x24d559([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xe9ee7a[_0x24d559([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f0930))return!0x0;const _0x5a3c4d=_0x5f0930[_0x24d559([0x73,0x70,0x6c,0x69,0x74])](_0x24d559([0x2e]));return _0xe9ee7a[_0x24d559([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x36d249=>_0x36d249[_0x24d559([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24d559([0x2a])))[_0x24d559([0x6d,0x61,0x70])](_0x40e7db=>_0x40e7db[_0x24d559([0x73,0x70,0x6c,0x69,0x74])](_0x24d559([0x2e])))[_0x24d559([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1b54e8=>_0x1b54e8[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5a3c4d[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24d559([0x6d,0x61,0x70])](_0x25a7d4=>Array(_0x5a3c4d[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x25a7d4[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24d559([0x66,0x69,0x6c,0x6c])](_0x25a7d4[0x0]===_0x24d559([0x2a])?_0x24d559([0x2a]):'')[_0x24d559([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x25a7d4))[_0x24d559([0x73,0x6f,0x6d,0x65])](_0x472ad3=>_0x5a3c4d[_0x24d559([0x65,0x76,0x65,0x72,0x79])]((_0x286afb,_0x482c54)=>_0x472ad3[_0x482c54]===_0x286afb||_0x472ad3[_0x482c54]===_0x24d559([0x2a])));}function _0x180bda(){return _0x25c2f7&&_0x1cf393?new window[(_0x24d559([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x544d09,_0x5aa670)=>{_0x25c2f7[_0x24d559([0x74,0x68,0x65,0x6e])](_0x544d09,_0x5aa670),_0x1cf393[_0x24d559([0x74,0x68,0x65,0x6e])](_0x5c3681=>{_0x5c3681!=_0x24d559([0x56,0x61,0x6c,0x69,0x64])&&_0x544d09(_0x5c3681);},_0x5aa670);}):_0x25c2f7||_0x1cf393||_0x24d559([0x56,0x61,0x6c,0x69,0x64]);}}function _0x535782(_0x9818c1,_0x7ef193){return new window[(_0x24d559([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5450c5=>{if(_0x592348())return _0x5450c5(_0x24d559([0x56,0x61,0x6c,0x69,0x64]));_0x149070(),_0x41dcca[_0x24d559([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x24d559([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xcde3ae=!0x1;const _0x534f20=_0x11d7cc();function _0x1b56c0(_0x2b240e){return!!_0x2b240e&&(typeof _0x2b240e===_0x24d559([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2b240e===_0x24d559([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2b240e[_0x24d559([0x74,0x68,0x65,0x6e])]===_0x24d559([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2b240e[_0x24d559([0x63,0x61,0x74,0x63,0x68])]===_0x24d559([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4f2e6d(_0x45205d){_0xca8dab(_0x45205d)[_0x24d559([0x74,0x68,0x65,0x6e])](_0x333327=>{if(!_0x333327||_0x333327[_0x24d559([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x24d559([0x6f,0x6b]))return _0x24d559([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5988dd(_0x593e29(_0x534f20+_0x7ef193))!=_0x333327[_0x24d559([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x24d559([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x24d559([0x56,0x61,0x6c,0x69,0x64]);})[_0x24d559([0x74,0x68,0x65,0x6e])](_0x4ac526=>(_0x351e0e(),_0x4ac526),()=>{const _0x30b248=_0x2e937e();return null==_0x30b248?(_0x351e0e(),_0x24d559([0x56,0x61,0x6c,0x69,0x64])):_0x24d559(_0x4b604f-_0x30b248>(0x574a8eb3^_0x12ec9a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x24d559([0x74,0x68,0x65,0x6e])](_0x5450c5)[_0x24d559([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5450c5(_0x24d559([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2962bb=0x7370e433^_0x12ec9a;function _0x351e0e(){const _0x391c0f=_0x24d559([0x6c,0x6c,0x63,0x74,0x2d])+_0x5988dd(_0x593e29(_0x9818c1)),_0x506c2e=_0x4c5ecc(_0x5988dd(window[_0x24d559([0x4d,0x61,0x74,0x68])][_0x24d559([0x63,0x65,0x69,0x6c])](_0x4b604f/_0x2962bb)));window[_0x24d559([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24d559([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x391c0f,_0x506c2e);}function _0x2e937e(){const _0x5d26a5=_0x24d559([0x6c,0x6c,0x63,0x74,0x2d])+_0x5988dd(_0x593e29(_0x9818c1)),_0x4f76c9=window[_0x24d559([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24d559([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5d26a5);return _0x4f76c9?window[_0x24d559([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4c5ecc(_0x4f76c9),0x10)*_0x2962bb:null;}function _0xca8dab(_0x1551e4){return new window[(_0x24d559([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14e1e9,_0x337c64)=>{_0x1551e4[_0x24d559([0x74,0x68,0x65,0x6e])](_0x14e1e9,_0x337c64),window[_0x24d559([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x337c64,0x7347de73^_0x12ec9a);});}}_0x41dcca[_0x24d559([0x6f,0x6e])](_0x24d559([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x32af87,_0x364105)=>{if(_0x364105[0x0]!=_0x9818c1)return _0x5450c5(_0x24d559([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x364105[0x1]={..._0x364105[0x1],[_0x24d559([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x534f20};},{[_0x24d559([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24d559([0x68,0x69,0x67,0x68])}),_0x41dcca[_0x24d559([0x6f,0x6e])](_0x24d559([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5d00fc=>{_0x1b56c0(_0x5d00fc[_0x24d559([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xcde3ae=!0x0,_0x4f2e6d(_0x5d00fc[_0x24d559([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x24d559([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24d559([0x6c,0x6f,0x77])}),_0x38dd18[_0x24d559([0x74,0x68,0x65,0x6e])](()=>{_0xcde3ae||_0x5450c5(_0x24d559([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x592348(){return _0x41dcca[_0x24d559([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24d559([0x76,0x69,0x65,0x77])][_0x24d559([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x24d559([0x61,0x75,0x74,0x6f]);}function _0x149070(){_0x41dcca[_0x24d559([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24d559([0x76,0x69,0x65,0x77])][_0x24d559([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x24d559([0x61,0x75,0x74,0x6f]);}}function _0x4a771e(_0x53b905){const _0x272b1d=[new window[(_0x24d559([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x447847=>setTimeout(_0x447847,0x734f347f^_0x12ec9a)),_0x38dd18[_0x24d559([0x74,0x68,0x65,0x6e])](()=>new window[(_0x24d559([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x267523=>{let _0x1f7049=0x0;_0x41dcca[_0x24d559([0x6d,0x6f,0x64,0x65,0x6c])][_0x24d559([0x6f,0x6e])](_0x24d559([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3160d1,_0x3e3998)=>{_0x3e3998[0x0][_0x24d559([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1f7049++,_0x1f7049==(0x73460f5b^_0x12ec9a)&&(_0x267523(),_0x3160d1[_0x24d559([0x6f,0x66,0x66])]());});}))];return window[_0x24d559([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x24d559([0x72,0x61,0x63,0x65])](_0x272b1d)[_0x24d559([0x74,0x68,0x65,0x6e])](()=>_0x53b905);}async function _0x59da60(){await _0x38dd18,_0x41dcca[_0x24d559([0x6d,0x6f,0x64,0x65,0x6c])][_0x24d559([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x34658c,_0x41dcca[_0x24d559([0x6d,0x6f,0x64,0x65,0x6c])][_0x24d559([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x34658c,_0x41dcca[_0x24d559([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x24d559([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x48b4ab(){return window[_0x24d559([0x67,0x6c,0x6f,0x62])]&&window[_0x24d559([0x67,0x6c,0x6f,0x62])][_0x24d559([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x2a5816(){return _0xe4220b(_0x24d559([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3a353c(_0x24d559([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x24d559([0x73,0x74,0x61,0x74,0x65])]==_0x24d559([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5efd38(){return _0xe4220b(_0x24d559([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 _0x4de8c5(){return _0xe4220b(_0x24d559([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2ec8ed(_0xdbc6a6){const _0x4e4a54=_0x4172aa();_0x41dcca[_0x4e4a54]=_0x24d559([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xdbc6a6,_0xdbc6a6!=_0x24d559([0x56,0x61,0x6c,0x69,0x64])&&_0x59da60();}function _0x4172aa(){const _0x4a3977=window[_0x24d559([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x24d559([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x24d559([0x6e,0x6f,0x77])]())[_0x24d559([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x24d559([0x2e]),'');let _0x307a15=_0x24d559([0x4b]);for(let _0x49c0aa=0x0;_0x49c0aa<_0x4a3977[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x49c0aa+=0x2){let _0x586a08=window[_0x24d559([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4a3977[_0x24d559([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x49c0aa,_0x49c0aa+0x2));_0x586a08>=_0x548eb3[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x586a08-=_0x548eb3[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x307a15+=_0x548eb3[_0x586a08];}return _0x307a15;}function _0x53d67e(){const _0x2e05a7=_0x57dc27[_0x24d559([0x73,0x70,0x6c,0x69,0x74])](_0x24d559([0x2e]));if(0x3!=_0x2e05a7[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4baade(_0x2e05a7[0x1]);function _0x4baade(_0x42f398){const _0x2a583d=_0x39b824(_0x42f398);return _0x2a583d&&_0x406378()?_0x2a583d:null;function _0x406378(){const _0x4bb2ac=_0x2a583d[_0x24d559([0x6a,0x74,0x69])],_0x53ea68=window[_0x24d559([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4bb2ac[_0x24d559([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4bb2ac[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x324d31={..._0x2a583d,[_0x24d559([0x6a,0x74,0x69])]:_0x4bb2ac[_0x24d559([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4bb2ac[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x324d31[_0x24d559([0x76,0x63])],_0x593e29(_0x324d31)==_0x53ea68;}}}async function _0x21e1a1(){let _0x257acf=!0x0;try{const _0x198599=_0x57dc27[_0x24d559([0x73,0x70,0x6c,0x69,0x74])](_0x24d559([0x2e])),[_0x57f06c,_0x5531c0,_0x4fd85d]=_0x198599;return _0x21b21a(_0x57f06c),await _0x2c00e6(_0x57f06c,_0x5531c0,_0x4fd85d),_0x257acf;}catch{return!0x1;}function _0x21b21a(_0x4fbb98){const _0x14a672=_0x39b824(_0x4fbb98);_0x14a672&&_0x14a672[_0x24d559([0x61,0x6c,0x67])]==_0x24d559([0x45,0x53,0x32,0x35,0x36])||(_0x257acf=!0x1);}async function _0x2c00e6(_0x52a210,_0x312d7e,_0x8f05a9){const _0x324202=window[_0x24d559([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x24d559([0x66,0x72,0x6f,0x6d])](_0x19dc14(_0x8f05a9),_0xaeef06=>_0xaeef06[_0x24d559([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x582729=new window[(_0x24d559([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x24d559([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x52a210+_0x24d559([0x2e])+_0x312d7e),_0x3c233d=window[_0x24d559([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x24d559([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3c233d)return;const _0x5b74e9=await _0x3c233d[_0x24d559([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x24d559([0x6a,0x77,0x6b]),_0x36bae7,{[_0x24d559([0x6e,0x61,0x6d,0x65])]:_0x24d559([0x45,0x43,0x44,0x53,0x41]),[_0x24d559([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x24d559([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x24d559([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3c233d[_0x24d559([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x24d559([0x6e,0x61,0x6d,0x65])]:_0x24d559([0x45,0x43,0x44,0x53,0x41]),[_0x24d559([0x68,0x61,0x73,0x68])]:{[_0x24d559([0x6e,0x61,0x6d,0x65])]:_0x24d559([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5b74e9,_0x324202,_0x582729)||(_0x257acf=!0x1);}}function _0x39b824(_0x559b0a){return _0x559b0a[_0x24d559([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x24d559([0x65,0x79]))?JSON[_0x24d559([0x70,0x61,0x72,0x73,0x65])](_0x19dc14(_0x559b0a)):null;}function _0x19dc14(_0x390ffc){return window[_0x24d559([0x61,0x74,0x6f,0x62])](_0x390ffc[_0x24d559([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x24d559([0x2b]))[_0x24d559([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x24d559([0x2f])));}function _0x593e29(_0x185d2f){let _0x4e413f=0x1505;function _0x18267f(_0x55e96c){for(let _0xeb8940=0x0;_0xeb8940<_0x55e96c[_0x24d559([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xeb8940++){const _0x5e500a=_0x55e96c[_0x24d559([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xeb8940);_0x4e413f=(_0x4e413f<<0x5)+_0x4e413f+_0x5e500a,_0x4e413f&=_0x4e413f;}}function _0x1a342d(_0x504428){Array[_0x24d559([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x504428)?_0x504428[_0x24d559([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1a342d):_0x504428&&typeof _0x504428==_0x24d559([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x24d559([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x504428)[_0x24d559([0x73,0x6f,0x72,0x74])]()[_0x24d559([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x224764,_0x28cff3])=>{_0x18267f(_0x224764),_0x1a342d(_0x28cff3);}):_0x18267f(window[_0x24d559([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x504428));}return _0x1a342d(_0x185d2f),_0x4e413f>>>0x0;}function _0x5988dd(_0x465544){return _0x465544[_0x24d559([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x24d559([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x24d559([0x30]));}function _0x4c5ecc(_0x32edd9){return _0x32edd9[_0x24d559([0x73,0x70,0x6c,0x69,0x74])]('')[_0x24d559([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x24d559([0x6a,0x6f,0x69,0x6e])]('');}function _0xe4220b(_0xdd9fec){return _0x41dcca[_0x24d559([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x24d559([0x68,0x61,0x73])](_0xdd9fec);}function _0x3a353c(_0x457045){return _0x41dcca[_0x24d559([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x24d559([0x67,0x65,0x74])](_0x457045);}function _0x34658c(){}function _0x24d559(_0x2cef6a){return _0x2cef6a['map'](_0x3ade1f=>String['fromCharCode'](_0x3ade1f))['join']('');}_0x2ec8ed(await _0x2083a9());}(this);}['destroy'](){const _0x4f1f95=this['editor']['plugins']['get'](o),_0x1f70b4=this['editor']['config']['get']('collaboration.channelId');for(const _0x2434d2 of _0x4f1f95['getCommentThreads']({'channelId':_0x1f70b4}))_0x4f1f95['_detachCommentThread'](_0x2434d2['id']),_0x4f1f95['_threads']['delete'](_0x2434d2['id']);super['destroy']();}['hasMarkerForId'](_0x503a64){return this['getAllMarkersForId'](_0x503a64)['length']>0x0;}['getAllMarkersForId'](_0x468270){const _0x510bbd=[];for(const _0x4155ac of this['editor']['model']['markers'])_0x4155ac['name']['startsWith']('comment:'+_0x468270)&&_0x510bbd['push'](_0x4155ac);return _0x510bbd;}['scrollToThreadMarker'](_0x12878f){setTimeout(()=>{const _0x4f1651=this['_getTargetForId'](_0x12878f);if(!_0x4f1651)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x12878f&&nt({'target':_0x4f1651[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x596f10){this['editor']['model']['change'](()=>{for(const _0x450fcd of this['getAllMarkersForId'](_0x596f10))this['editor']['editing']['reconvertMarker'](_0x450fcd);});}['_attachArchivedThread'](_0x4242f0){const _0x4321dc=this['editor']['plugins']['get'](o),_0x519a87=this['editor']['plugins']['get'](b),_0x55f028=_0x4321dc['getCommentThread'](_0x4242f0);if(!_0x55f028['isAttached']){const _0x27c14d=_0x55f028['attachTo'](()=>this['_getTargetForId'](_0x55f028['id']));_0x519a87['registerAnnotation'](_0x27c14d),_0x55f028['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x56b39d=this['editor'],_0x816b57=_0x56b39d['plugins']['get'](it);_0x56b39d['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xd41f54,_0x46c4ea)=>{const {id:_0x39bb6f}=ft(_0xd41f54['markerName']),_0x178e90=_0x56b39d['plugins']['get'](o)['getCommentThread'](_0x39bb6f),_0x1297f2=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x39bb6f;let _0x487e93;if(_0x178e90&&_0x178e90['isResolved']&&!_0x1297f2&&_0xd41f54['item'])return _0x46c4ea['consumable']['consume'](_0xd41f54['item'],'addMarker:'+_0xd41f54['markerName']),_0x46c4ea['consumable']['consume'](_0xd41f54['item'],'removeMarker:'+_0xd41f54['markerName']),null;const _0x4496eb=['ck-comment-marker'];return _0x1297f2&&_0x4496eb['push']('ck-comment-marker--active'),_0x487e93=_0x178e90?.['length']?_0x178e90['comments']['first']['author']['id']:_0x816b57['me']['id'],{'classes':_0x4496eb,'attributes':{'data-comment':_0x39bb6f,'data-author-id':_0x487e93}};}}),_0x56b39d['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x895e18,{options:_0x1b3dfb})=>{if(_0x1b3dfb['showCommentHighlights'])return null;const _0xa4c9c7=_0x56b39d['plugins']['get'](o),_0x579159=_0x56b39d['model']['markers']['get'](_0x895e18),{id:_0x4ce763,part:_0x1967a1}=ft(_0x895e18);return _0x579159&&!_0x579159['affectsData']||_0x1b3dfb['ignoreResolvedComments']&&_0xa4c9c7['getCommentThread'](_0x4ce763)?.['isResolved']?null:{'group':'comment','name':_0x1967a1?_0x4ce763+':'+_0x1967a1:_0x4ce763};}}),_0x56b39d['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5e0b5e,{writer:_0x3b1d2c})=>_0x3b1d2c['createElement']('$marker',{'data-name':'comment:'+_0x5e0b5e['getAttribute']('id')})}),_0x56b39d['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x606a34=this['editor'],_0x51ae8d=_0x606a34['plugins']['get'](o),_0x499cbf=new Set(),_0x3da523=new Set();_0x606a34['model']['document']['registerPostFixer'](_0x3fd9a5=>{let _0x498f14=!0x1;for(const {name:_0x420701,data:_0x242f39}of _0x606a34['model']['document']['differ']['getChangedMarkers']()){const {group:_0x59c3ac,id:_0x153dac}=ft(_0x420701);let _0x1e0d5b=_0x242f39['newRange'];if('comment'!==_0x59c3ac||!_0x1e0d5b)continue;const _0x19b5ba='$graveyard'===_0x1e0d5b['root']['rootName'];_0x19b5ba||(_0x1e0d5b=ht(_0x1e0d5b,_0x606a34['model']),!_0x1e0d5b||_0x1e0d5b['isCollapsed']||!_0x242f39['newRange']||_0x1e0d5b['isEqual'](_0x242f39['newRange']))?_0x606a34['model']['hasContent'](_0x1e0d5b)&&!_0x19b5ba?this['isThreadsLoadingPaused']?_0x499cbf['add'](_0x420701):this['_handleThreadMarker'](_0x420701,_0x153dac):(_0x3da523['add'](_0x420701),_0x499cbf['delete'](_0x420701),_0x3fd9a5['removeMarker'](_0x420701),_0x498f14=!0x0):(_0x3fd9a5['updateMarker'](_0x420701,{'range':_0x1e0d5b}),_0x498f14=!0x0);}return _0x498f14;}),this['on']('change:isThreadsLoadingPaused',(_0x5bd56c,_0x3e035b,_0x427388)=>{if(!_0x427388&&_0x499cbf['size'])for(const _0x261eef of _0x499cbf){const {id:_0x3cd92b}=ft(_0x261eef);_0x499cbf['delete'](_0x261eef),_0x606a34['model']['markers']['get'](_0x261eef)&&this['_handleThreadMarker'](_0x261eef,_0x3cd92b);}}),this['listenTo'](_0x606a34['model']['document'],'change',()=>{for(const {name:_0x234268,data:{newRange:_0x377a6b}}of _0x606a34['model']['document']['differ']['getChangedMarkers']()){const {group:_0x309609,id:_0x33d384}=ft(_0x234268);if('comment'!==_0x309609)continue;const _0xab5d4c=_0x51ae8d['getCommentThread'](_0x33d384),_0x50b4b2=this['hasMarkerForId'](_0x33d384);_0xab5d4c&&(!_0xab5d4c['_hasTargetInContent']&&_0x377a6b&&_0x606a34['editing']['view']['once']('render',()=>{const _0x29141c=_0x606a34['plugins']['get'](y),_0x5304a6=_0x51ae8d['_threadToController']['get'](_0xab5d4c)['view'];_0x29141c['getByInnerView'](_0x5304a6)['refreshVisibility']();},{'priority':'low'}),_0xab5d4c['_hasTargetInContent']=_0x50b4b2||!!_0x377a6b),_0x377a6b||(_0x3da523['add'](_0x234268),_0x499cbf['delete'](_0x234268));}for(const _0x4cad4d of _0x3da523){const {id:_0x4b95ef}=ft(_0x4cad4d),_0x49be52=_0x51ae8d['getCommentThread'](_0x4b95ef);if(_0x499cbf['delete'](_0x4cad4d),!_0x49be52)continue;const _0x447cc3=this['hasMarkerForId'](_0x4b95ef);_0x447cc3||_0x49be52['isSubmitted']?_0x447cc3||_0x49be52['unlinkedAt']||_0x49be52['setUnlinkedAt'](new Date()):_0x49be52['remove']();}_0x3da523['clear']();});}['_handleInitialThreads'](_0x1648ec){_0x1648ec['forEach'](_0x4073c8=>{_0x4073c8['unlinkedAt']&&this['_attachArchivedThread'](_0x4073c8['id']);});}['_getTargetForId'](_0x9d62cd){const _0x557ddc=this['editor'],_0x4b2463=this['getAllMarkersForId'](_0x9d62cd);return et(_0x557ddc['editing'],_0x4b2463);}['_getTextContext'](_0x447b5d){const _0x2879fb=this['getAllMarkersForId'](_0x447b5d);let _0x403937='',_0x30109e=!0x1;for(const _0x1eb35a of _0x2879fb){const _0x1e86f2=_0x1eb35a['getRange']();for(const _0x1be931 of Array['from'](_0x1e86f2['getItems']()))_0x1be931['is']('$textProxy')?(_0x403937&&_0x30109e&&(_0x403937+='\x20',_0x30109e=!0x1),_0x403937+=_0x1be931['data']):_0x30109e=!0x0;_0x30109e=!0x0;}return _0x403937['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1ce3cf,_0x4b5fb8){const _0x138781=this['editor'],_0x4ca2e8=_0x138781['plugins']['get'](o);let _0x4b1c4b=_0x4ca2e8['getCommentThread'](_0x4b5fb8);const _0x4b7b62=_0x138781['config']['get']('collaboration.channelId'),_0x3fe554=_0x138781['plugins']['get'](b);if(_0x4b1c4b&&(_0x4b1c4b['unlinkedAt']&&_0x4b1c4b['setUnlinkedAt'](null),_0x4b1c4b['isAttached']))return _0x4b1c4b;return!this['getAllMarkersForId'](_0x4b5fb8)[0x0]['managedUsingOperations']?_0x138781['editing']['view']['once']('render',()=>{if(_0x4ca2e8['getCommentThread'](_0x4b5fb8))return;const _0x1d039c=_0x138781['plugins']['get'](y);_0x4b1c4b=_0x4ca2e8['openNewCommentThread']({'channelId':_0x4b7b62,'threadId':_0x4b5fb8,'target':()=>this['_getTargetForId'](_0x4b5fb8),'context':{'type':'text','value':this['_getTextContext'](_0x4b5fb8)}});const _0x75a03a=_0x4ca2e8['_threadToController']['get'](_0x4b1c4b)['view'],_0x5550ff=_0x1d039c['getByInnerView'](_0x75a03a);_0x5550ff&&_0x3fe554['registerAnnotation'](_0x5550ff);},{'priority':'low'}):_0x4ca2e8['fetchCommentThread']({'channelId':_0x4b7b62,'threadId':_0x4b5fb8})['then'](_0x73a2d2=>{if('destroyed'!==_0x138781['state']){if(_0x4b1c4b=_0x73a2d2,_0x4b1c4b&&!_0x4b1c4b['isAttached']){const _0x372f75=_0x4b1c4b['attachTo'](()=>this['_getTargetForId'](_0x4b5fb8));_0x3fe554['registerAnnotation'](_0x372f75),_0x4b1c4b['isResolved']&&this['_reconvertMarkers'](_0x4b5fb8);}else{if(!_0x4b1c4b){const _0xc305cb=this['getAllMarkersForId'](_0x4b5fb8);_0x138781['model']['change'](_0x3d053f=>{for(const _0x4860c8 of _0xc305cb)_0x3d053f['removeMarker'](_0x4860c8);});}}}}),_0x4b1c4b;}['_handleThreadMarker'](_0x4c5b42,_0x21311e){const _0x558399=this['_attachMarkerToThread'](_0x4c5b42,_0x21311e);_0x558399&&!_0x558399['context']&&_0x558399['setContext']({'type':'text','value':this['_getTextContext'](_0x21311e)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1a4106=this['editor'];rt(_0x1a4106['model'],({left:_0x3b0528,entered:_0xd345a2})=>{for(const _0x456473 of _0x3b0528)if(mt(_0x456473)){_0x1a4106['ui']['ariaLiveAnnouncer']['announce'](N(_0x1a4106['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5a5236 of _0xd345a2)if(mt(_0x5a5236)){_0x1a4106['ui']['ariaLiveAnnouncer']['announce'](N(_0x1a4106['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x247b77)));break;}});}}function dt(_0xa09bc1,_0x721431){return _0x721431?_0xa09bc1+':'+_0x721431:_0xa09bc1;}function ht(_0x2a8d06,_0x44e684){const _0x2b7125=_0x44e684['schema'],_0x5b5c59=_0x44e684['createRange'](_0x2a8d06['start']);for(const _0x1a819b of _0x2a8d06['getWalker']()){const {type:_0x46af79,item:_0x3ffae6,nextPosition:_0x1cdac4}=_0x1a819b;if('text'===_0x46af79||_0x2b7125['isObject'](_0x3ffae6)){const _0x1468f4=_0x44e684['createPositionBefore'](_0x3ffae6);_0x5b5c59['isCollapsed']&&(_0x5b5c59['start']=_0x1468f4),_0x5b5c59['end']=_0x1cdac4;}}return _0x5b5c59;}function mt(_0x582531){return'comment'===ft(_0x582531['name'])['group'];}class s extends _0x5bb67e{['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 _0x4ce357=this['editor'],_0x2dc84f=_0x4ce357['plugins']['get'](o),_0x1f89de=_0x4ce357['plugins']['get'](r),_0x3c2a1d=_0x4ce357['plugins']['get'](y),_0x2b48bb=_0x4ce357['plugins']['get'](b);_0x4ce357['ui']['componentFactory']['add']('comment',()=>{const _0x520985=this['_createUIButton'](_0x508f07);return _0x520985['tooltip']=!0x0,_0x520985;}),_0x4ce357['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x431b16)),_0x2b48bb['addSourceCollector'](()=>{const _0x253458=[];for(const [_0x5081ff,_0x163aa9]of _0x2dc84f['_threadToController']){const _0x34d4c5=_0x1f89de['getAllMarkersForId'](_0x5081ff['id']),_0x526fad=_0x34d4c5['map'](_0x57f4a1=>_0x57f4a1['getRange']());_0x34d4c5['length']>0x0&&_0x253458['push']([_0x163aa9['view'],_0x526fad]);}return _0x253458;}),this['listenTo'](_0x3c2a1d,'change:activeAnnotations',(_0x503daa,_0x214b87,_0x20e7b1)=>{const _0x3927fb=Array['from'](_0x20e7b1)['map'](_0x4af629=>_0x4af629['innerView'])['find'](_0xf36fb9=>_0x2dc84f['_viewToController']['has'](_0xf36fb9));if(!_0x3927fb)return void(_0x1f89de['activeMarker']=null);const _0x513717=_0x2dc84f['_viewToController']['get'](_0x3927fb)['model']['id'],_0x9be08e='comment:'+_0x513717;_0x513717&&_0x1f89de['hasMarkerForId'](_0x513717)?_0x1f89de['activeMarker']=_0x9be08e:_0x1f89de['activeMarker']&&(_0x1f89de['activeMarker']=null);}),this['listenTo'](_0x2dc84f,'removeCommentThread',(_0x33f14a,{threadId:_0x517189,isFromAdapter:_0x514040})=>{!_0x514040&&_0x4ce357['ui']['focusTracker']['isFocused']&&_0x1f89de['hasMarkerForId'](_0x517189)&&_0x4ce357['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2dc84f,'addComment',(_0x547fa5,{threadId:_0x56a995,isFromAdapter:_0x549eaf})=>{if(_0x549eaf||!_0x1f89de['hasMarkerForId'](_0x56a995)||!_0x2dc84f['hasCommentThread'](_0x56a995))return;0x1===_0x2dc84f['getCommentThread'](_0x56a995)['length']&&(_0x4ce357['editing']['view']['focus'](),_0x547fa5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x171e58=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x54e1df;for(const _0x3006cb in _0x171e58){const _0x44fa5a=_0x3006cb,_0x3d8411=_0x171e58[_0x44fa5a];if('commentsLicenseKeyValid'==_0x3d8411||'commentsLicenseKeyInvalid'==_0x3d8411||'commentsLicenseKeyExpired'==_0x3d8411||'commentsLicenseKeyDomainLimit'==_0x3d8411||'commentsLicenseKeyNotAllowed'==_0x3d8411||'commentsLicenseKeyEvaluationLimit'==_0x3d8411||'commentsLicenseKeyUsageLimit'==_0x3d8411){delete _0x171e58[_0x44fa5a],_0x54e1df=_0x3d8411,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x54e1df&&_0x171e58['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x54e1df&&_0x171e58['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x54e1df&&_0x171e58['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x54e1df&&_0x171e58['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x54e1df&&_0x171e58['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x54e1df&&_0x171e58['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x66567a){const _0x4fd0da=this['editor'],_0x481558=new _0x66567a(_0x4fd0da['locale']),_0x493fba=_0x4fd0da['commands']['get']('addCommentThread');return _0x481558['set']({'label':N(_0x4fd0da['locale'],'Comment'),'icon':_0x49da61}),_0x481558['bind']('isEnabled')['to'](_0x493fba,'isEnabled',_0x493fba,'hasContent',(_0xca3b7e,_0x212d65)=>_0xca3b7e&&_0x212d65),this['listenTo'](_0x481558,'execute',()=>{_0x493fba['execute']();}),_0x481558;}}class i extends _0x5bb67e{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x18a45a){super(_0x18a45a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x51bea3,_0x2c0265,_0x2ebe42)=>{_0x2ebe42?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x294290,_0x5c10e5]of this['editor']['commands'])_0x5c10e5['affectsData']&&'addCommentThread'!==_0x294290&&_0x5c10e5['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 _0xb5eba1=this['editor']['editing']['view']['document'];this['listenTo'](_0xb5eba1,'cut',_0x389cf8=>_0x389cf8['stop'](),{'priority':'highest'}),this['listenTo'](_0xb5eba1,'clipboardInput',_0x3c32e0=>_0x3c32e0['stop'](),{'priority':'highest'}),this['listenTo'](_0xb5eba1,'delete',_0x2d3af4=>_0x2d3af4['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3c8f03,_0x2fe7bc]of this['editor']['commands'])_0x2fe7bc['affectsData']&&'addCommentThread'!==_0x3c8f03&&_0x2fe7bc['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 _0x298773{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x262930){super(_0x262930),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x22f49b=this['context']['plugins']['get'](y);this['listenTo'](_0x22f49b,'_activateAnnotation',(_0x281388,_0x3bc23b)=>{for(const _0x560b6d of this['activeUIs']){const _0x4f1698=this['_uis']['get'](_0x560b6d);(0x0,this['uisData']['get'](_0x560b6d)['filter'])(_0x3bc23b)&&_0x4f1698['setActiveAnnotation'](_0x3bc23b);}}),this['listenTo'](_0x22f49b,'_deactivateAllAnnotations',()=>{for(const _0x5df2bd of this['activeUIs']){this['_uis']['get'](_0x5df2bd)['setActiveAnnotation'](null);}}),this['listenTo'](_0x22f49b['_visibleAnnotations'],'add',(_0x1b646e,_0xa407f0)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xa407f0);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x51991c){return this['activeUIs']['has'](_0x51991c);}['activate'](_0x195756,_0x51799e=this['defaultFilter']){const _0xcf25f2=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x195756))throw new _0x48ecf8('annotationsuis-missing-ui',this,{'uiName':_0x195756});this['isActive'](_0x195756)&&this['deactivate'](_0x195756),this['activeUIs']['add'](_0x195756);const _0x208589=new S();v({'source':_0xcf25f2['_visibleAnnotations'],'target':_0x208589,'filter':_0x51799e}),this['uisData']['set'](_0x195756,{'collection':_0x208589,'filter':_0x51799e});const _0x4aa618=this['_uis']['get'](_0x195756);_0x4aa618['attach'](_0x208589),this['listenTo'](_0x4aa618,'change:activeAnnotation',(_0x56eedb,_0x3d6fdf,_0x4d064e,_0x169ca8)=>{_0x169ca8&&_0xcf25f2['_removeActiveAnnotation'](_0x169ca8),_0x4d064e&&_0xcf25f2['_addActiveAnnotation'](_0x4d064e);});}['deactivate'](_0x18c1f9){if(this['activeUIs']['delete'](_0x18c1f9),!this['_uis']['has'](_0x18c1f9))throw new _0x48ecf8('annotationsuis-missing-ui',this,{'uiName':_0x18c1f9});const _0x59297f=this['_uis']['get'](_0x18c1f9);_0x59297f['detach'](),this['stopListening'](_0x59297f),this['uisData']['get'](_0x18c1f9)['collection']['destroy'](),this['uisData']['delete'](_0x18c1f9);}['switchTo'](_0x9babe){if(!this['_uis']['has'](_0x9babe))throw new _0x48ecf8('annotationsuis-missing-ui',this,{'uiName':_0x9babe});const _0x48371f=this['context']['plugins']['get'](y),_0xb5af0e=Array['from'](_0x48371f['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x9babe);const _0x3b5cc0=this['_uis']['get'](_0x9babe);_0x3b5cc0['setActiveAnnotation'](_0xb5af0e),_0x3b5cc0['_setSelectedAnnotations']&&_0xb5af0e&&_0x3b5cc0['_setSelectedAnnotations']([_0xb5af0e]);}['deactivateAll'](){for(const _0x154cd6 of this['activeUIs'])this['deactivate'](_0x154cd6);}['register'](_0x351ddd,_0x72c8ca){if(this['_uis']['has'](_0x351ddd))throw new _0x48ecf8('annotationsuis-register-already-registered');if('function'!=typeof _0x72c8ca['attach']||'function'!=typeof _0x72c8ca['detach']||'function'!=typeof _0x72c8ca['setActiveAnnotation'])throw new _0x48ecf8('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x351ddd,_0x72c8ca);}['refilterAnnotations'](){const _0x3402b2=this['context']['plugins']['get'](y)['collection'],_0x38bb7b=new Map(),_0x3cf5e4=Array['from'](this['activeUIs']);for(const _0x255bf3 of this['activeUIs']){const _0x308637=this['uisData']['get'](_0x255bf3)['collection'];for(const _0xc1ccca of _0x308637)_0x38bb7b['set'](_0xc1ccca,_0x255bf3);}for(const _0x1671a4 of _0x3402b2){const _0x30172e=_0x38bb7b['get'](_0x1671a4);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1671a4);const _0xf829d=_0x3cf5e4['find'](_0x20befa=>this['uisData']['get'](_0x20befa)['filter'](_0x1671a4));_0x30172e!==_0xf829d&&(_0x30172e&&this['uisData']['get'](_0x30172e)['collection']['remove'](_0x1671a4),_0xf829d&&this['uisData']['get'](_0xf829d)['collection']['add'](_0x1671a4));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x278a1c){const _0x2cf56b=[];for(const _0x1a424a of this['activeUIs']){(0x0,this['uisData']['get'](_0x1a424a)['filter'])(_0x278a1c)&&_0x2cf56b['push'](_0x1a424a);}if(_0x2cf56b['length']>0x1)throw new _0x48ecf8('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2cf56b,'annotationType':_0x278a1c['type']});}}const _i=/* #__PURE__ -- @preserve */
32
+ Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x32a370){super(_0x32a370);const _0x53f432=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 _0xff5d19(),this['focusCycler']=new _0x445736({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x53f432['to']('class')],'style':{'minHeight':_0x53f432['to']('minHeight',_0x3f79c7=>'number'==typeof _0x3f79c7?_i(_0x3f79c7+0xa):null)},'dir':_0x32a370['uiLanguageDirection'],'role':'application','aria-label':N(_0x32a370,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x32a370,'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',_0x125355=>{this['_updateItemPositionInFocusables'](_0x125355['source']);}),this['list']['forEach'](_0x364ad1=>{this['focusTracker']['add'](_0x364ad1['element']),this['_updateItemPositionInFocusables'](_0x364ad1);}),this['list']['on']('change',(_0x586e95,_0x2deaff)=>{for(const _0x317559 of _0x2deaff['removed'])this['focusTracker']['remove'](_0x317559['element']),this['focusables']['remove'](_0x317559);for(const _0x39f8d1 of _0x2deaff['added'])this['focusTracker']['add'](_0x39f8d1['element']),this['_updateItemPositionInFocusables'](_0x39f8d1);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x258ce7){const _0x463325=this['focusables']['getIndex'](_0x258ce7);let _0x5b6dcd,_0x4ee8be;for(const _0x476e35 of this['focusables'])if(_0x258ce7['top']<_0x476e35['top']){_0x5b6dcd=_0x476e35;break;}if(_0x4ee8be=_0x5b6dcd?this['focusables']['getIndex'](_0x5b6dcd):this['focusables']['length'],-0x1!==_0x463325){if(_0x463325===_0x4ee8be-0x1)return;this['focusables']['remove'](_0x258ce7),_0x4ee8be=_0x5b6dcd?this['focusables']['getIndex'](_0x5b6dcd):this['focusables']['length'];}this['focusables']['add'](_0x258ce7,_0x4ee8be);}}const Ot=/* #__PURE__ -- @preserve */
33
+ Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5be8de){super(_0x5be8de),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x38d11d,_0x496ece)=>_0x38d11d+_0x496ece),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x6b6f5b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x6b6f5b['to']('isAnimationDisabled',_0x1dd42a=>_0x1dd42a?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x6b6f5b['to']('top',_0x8e4d40=>Ot(_0x8e4d40))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x91fb8=this['element']['clientHeight'];_0x91fb8&&(this['height']=_0x91fb8);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x298773{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x426254){super(_0x426254),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 _0x282169=this['context']['config']['get']('sidebar.container');_0x282169&&this['setContainer'](_0x282169);}['setContainer'](_0x2b2221){if(!g(_0x2b2221))throw new _0x48ecf8('sidebar-setcontainer-invalid-element');this['container']=_0x2b2221;}['_attachToContainer']({viewClass:_0x209117='',spaceBetweenItems:_0x3a4553=0x19}={}){if(!g(this['container']))throw new _0x48ecf8('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x209117,this['_spaceBetweenItems']=_0x3a4553;}['rearrange']({removedAnnotation:_0x2f0f8a,previousAnnotation:_0x125ca5,nextAnnotation:_0x82f44f}){const _0x5836b2=this['getSidebarItemView'](_0x2f0f8a);this['view']['list']['remove'](_0x5836b2),this['_destroySidebarItemView'](_0x2f0f8a),_0x125ca5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x125ca5)),_0x82f44f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x82f44f)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x266d1d,activatedAnnotation:_0xfe9eb7,disableAnimationOnActivatedAnnotation:_0x2f0b84}){if(this['_activeAnnotation']=_0xfe9eb7,_0x266d1d){_0x266d1d['isActive']=!0x1;const _0x65ea2e=this['getSidebarItemView'](_0x266d1d);_0x65ea2e&&_0x2f0b84&&(_0x65ea2e['isAnimationDisabled']=!0x1);}if(_0xfe9eb7){const _0x18d32e=this['getSidebarItemView'](_0xfe9eb7);_0x18d32e&&(_0xfe9eb7['isActive']=!0x0,_0x2f0b84&&(_0x18d32e['isAnimationDisabled']=!0x0,_0x18d32e['top']+=0x1),this['_alignToTargetRect'](_0x18d32e));}}['_detachFromContainer'](_0x522a79){if(this['view']['element']['remove'](),_0x522a79){for(const _0x459702 of _0x522a79)this['_destroySidebarItemView'](_0x459702);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5604eb,_0x23e71e){_0x23e71e||(_0x23e71e=_0x5604eb['view']);const _0x56d1a9=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x56d1a9,_0x5604eb),this['_annotationToSidebarItemView']['set'](_0x5604eb,_0x56d1a9),_0x56d1a9['content']['add'](_0x23e71e),this['listenTo'](_0x5604eb['view'],'change:targetRect',(_0x7d8c81,_0x43b894,_0x2edde1)=>{const _0x219177=this['_getTargetTop'](_0x5604eb,_0x2edde1);_0x56d1a9['_targetTop']!=_0x219177&&(_0x56d1a9['_targetTop']=_0x219177,this['_setItemTop'](_0x56d1a9,_0x219177));}),this['listenTo'](_0x56d1a9,'change:top',()=>{this['_recalculate'](_0x56d1a9,'top');}),this['listenTo'](_0x56d1a9,'change:bottom',()=>{this['_recalculate'](_0x56d1a9,'bottom');}),this['_alignToTargetRect'](_0x56d1a9);const _0x48f54a=this['_getItemBefore'](_0x56d1a9);if(_0x48f54a)this['_alignAfterItem'](_0x48f54a,_0x56d1a9)||this['_alignToTargetRect'](_0x56d1a9);else this['_alignToTargetRect'](_0x56d1a9);return this['_updateLastItem'](),this['view']['list']['add'](_0x56d1a9),_0x56d1a9;}['_alignForTopChange'](_0x3b6d50){if(!_0x3b6d50['content']['length'])return;const _0x2ba0fa=this['_getItemBefore'](_0x3b6d50);if(!_0x2ba0fa)return;const _0x54c205=this['_sidebarItemViewToAnnotation']['get'](_0x2ba0fa),_0x5404d6=this['_activeAnnotation'];_0x5404d6&&_0x5404d6===_0x54c205?this['_alignAfterItem'](_0x2ba0fa,_0x3b6d50):this['_alignBeforeItem'](_0x3b6d50,_0x2ba0fa);}['_alignForBottomChange'](_0xf8857d){if(!_0xf8857d['content']['length'])return;const _0x4bffdb=this['_getItemAfter'](_0xf8857d);if(!_0x4bffdb)return;const _0x1fd7a8=this['_sidebarItemViewToAnnotation']['get'](_0x4bffdb),_0x4997cb=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x49d17a=this['_activeAnnotation'];_0x49d17a&&_0x49d17a===_0x1fd7a8&&_0x4997cb?(this['_alignBeforeItem'](_0x4bffdb,_0xf8857d),this['_alignAfterItem'](_0xf8857d,_0x4bffdb)):_0x49d17a&&_0x49d17a===_0x1fd7a8?this['_alignBeforeItem'](_0x4bffdb,_0xf8857d):this['_alignAfterItem'](_0xf8857d,_0x4bffdb);}['_recalculate'](_0x26cf7f,_0x5da17e){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x47be22,changedProp:_0x5d9356}of this['_recalculateBuffer'])'top'===_0x5d9356?this['_alignForTopChange'](_0x47be22):this['_alignForBottomChange'](_0x47be22);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x26cf7f,'changedProp':_0x5da17e});}['getSidebarItemView'](_0x3d0919){return this['_annotationToSidebarItemView']['get'](_0x3d0919);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4ac312){const _0x27aa62=this['getSidebarItemView'](_0x4ac312);this['stopListening'](_0x27aa62),this['stopListening'](_0x4ac312['view']),_0x27aa62['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4ac312),this['_sidebarItemViewToAnnotation']['delete'](_0x27aa62);}['_createSidebarView'](){const _0x3c3f64=new H(this['context']['locale']);return _0x3c3f64['render'](),this['on']('change:_lastItem',(_0xefeeb8,_0x490ad9,_0x523d95,_0x432569)=>{_0x432569&&_0x3c3f64['unbind']('minHeight'),_0x523d95?_0x3c3f64['bind']('minHeight')['to'](_0x523d95,'bottom'):_0x3c3f64['minHeight']=null;}),_0x3c3f64;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3d8807){const _0x296931=this['_sidebarItemViewToAnnotation']['get'](_0x3d8807),_0x22ed9f=_0x296931&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x296931)-0x1);return _0x22ed9f&&this['getSidebarItemView'](_0x22ed9f)||null;}['_getItemAfter'](_0x4427b3){const _0x43dea8=this['_sidebarItemViewToAnnotation']['get'](_0x4427b3),_0x17003a=_0x43dea8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43dea8)+0x1);return _0x17003a&&this['getSidebarItemView'](_0x17003a)||null;}['_alignBeforeItem'](_0x3cb2a9,_0x2b83a7){_0x3cb2a9['updateHeight']();const _0x4801a7=G(_0x2b83a7['bottom']+this['_spaceBetweenItems'],_0x3cb2a9['top']);return!!_0x4801a7&&(this['_setItemTop'](_0x2b83a7,_0x2b83a7['top']-_0x4801a7),!0x0);}['_alignAfterItem'](_0x11447a,_0x1f87dd){_0x11447a['updateHeight']();const _0x3a9b2a=G(_0x11447a['bottom']+this['_spaceBetweenItems'],_0x1f87dd['top']);return!!_0x3a9b2a&&(this['_setItemTop'](_0x1f87dd,_0x1f87dd['top']+_0x3a9b2a,!0x1),!0x0);}['_alignToTargetRect'](_0x253ccc){const _0x5cdddb=this['_sidebarItemViewToAnnotation']['get'](_0x253ccc);if(!_0x5cdddb||!_0x5cdddb['target']||!_0x5cdddb['targetRect'])return;const _0x22d666=this['_getTargetTop'](_0x5cdddb,_0x5cdddb['targetRect']);this['_setItemTop'](_0x253ccc,_0x22d666);}['_getTargetTop'](_0x369b9f,_0x41552d){if(null===_0x41552d)return 0x0;if(_0x369b9f['target']instanceof _0xc27574)return _0x41552d['top'];{const _0x1a685d=new _0xc27574(this['view']['element'])['top'];return _0x41552d['top']-_0x1a685d;}}['_setItemTop'](_0x134d42,_0x3af254,_0x416bf7=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x416bf7&&(_0x3af254=Math['max'](_0x3af254,this['_getMaxAvailableTop'](_0x134d42))),_0x134d42['top']=_0x3af254;}['_getMaxAvailableTop'](_0x35de5e){let _0x26bc80=this['_getItemBefore'](_0x35de5e),_0x4f2c62=0x0;for(;_0x26bc80;)_0x26bc80['updateHeight'](),_0x4f2c62+=this['_spaceBetweenItems']+_0x26bc80['height'],_0x26bc80=this['_getItemBefore'](_0x26bc80);return _0x4f2c62;}}function G(_0x430745,_0x24ea46){return Math['max'](_0x430745-_0x24ea46,0x0);}function g(_0x206084){return null!==_0x206084&&'object'==typeof _0x206084&&0x1===_0x206084['nodeType'];}class e extends _0x298773{['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(_0x181dc0){super(_0x181dc0),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3d5ab7(),this['_refreshPositioningDebounced']=_0x3aa37b(()=>{_0x181dc0['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2e13dc=this['context']['plugins']['get'](j),_0x3b1b53=this['context']['plugins']['get'](z);_0x2e13dc['register']('wideSidebar',this),_0x3b1b53['container']&&_0x2e13dc['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x240bd7){if(_0x240bd7===this['activeAnnotation'])return;const _0xf9f900=this['context']['plugins']['get'](z);_0xf9f900['_activeAnnotation']=_0x240bd7;const _0x196847=this['activeAnnotation'];_0xf9f900['refresh']({'blurredAnnotation':_0x196847,'activatedAnnotation':_0x240bd7}),this['activeAnnotation']=_0x240bd7;}['attach'](_0x5128ed){this['annotations']=_0x5128ed;const _0x2fd065=this['context']['plugins']['get'](z);if(_0x2fd065['_annotations']=_0x5128ed,this['isAttached'])throw new _0x48ecf8('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2fd065,'set:container',()=>{this['detach'](),this['listenTo'](_0x2fd065,'change:container',_0x5d15ed=>{_0x5d15ed['off'](),this['attach'](_0x5128ed);});}),_0x2fd065['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2a2351=_0xa60b4=>{_0xa60b4['updateTargetRect'](),_0x2fd065['addAnnotation'](_0xa60b4);};for(const _0x25b091 of _0x5128ed)_0x2a2351(_0x25b091);this['listenTo'](_0x5128ed,'add',(_0x615963,_0x22b619)=>{_0x2a2351(_0x22b619);}),this['listenTo'](_0x5128ed,'remove',(_0x1cd84e,_0xa8551,_0x2d3986)=>{_0x2fd065['rearrange']({'removedAnnotation':_0xa8551,'previousAnnotation':_0x5128ed['get'](_0x2d3986-0x1),'nextAnnotation':_0x5128ed['get'](_0x2d3986+0x1)}),_0xa8551===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5128ed,'focus',(_0x37a685,_0x5c6e9e)=>{this['setActiveAnnotation'](_0x5c6e9e);}),this['listenTo'](_0x5128ed,'blur',()=>{this['setActiveAnnotation'](null);});const _0x339ad0=this['context']instanceof _0x4e0713?this['context']['editors']:new _0x3d5ab7([this['context']]);for(const _0x508db0 of _0x339ad0)this['_integrateWithEditorAnnotations'](_0x508db0);this['listenTo'](_0x339ad0,'add',(_0x5e4911,_0x465e4e)=>{this['listenTo'](_0x465e4e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x465e4e);});}),this['listenTo'](_0x339ad0,'remove',(_0xc1081e,_0x16ace5)=>{_0x16ace5['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x16ace5['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x48ecf8('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4f3111=this['context']['plugins']['get'](z);_0x4f3111['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4f3111),this['stopListening'](this['annotations']),this['context']instanceof _0x4e0713&&this['stopListening'](this['context']['editors']);for(const _0x4cb718 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4cb718);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x315b9e){if(!_0x315b9e['plugins']['has']('EditorAnnotations'))return;const _0x4ac3e3=_0x315b9e['plugins']['get']('EditorAnnotations'),_0x3b6077=()=>{const _0x3fc3ab=_0x4ac3e3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3fc3ab[0x0]||null);};this['listenTo'](_0x4ac3e3,'refresh',_0x3b6077),this['listenTo'](_0x4ac3e3,'blur',(_0x183825,{isAnnotationTracked:_0x3f3f1e})=>{this['activeAnnotation']&&_0x3f3f1e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4ac3e3,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3c54e8=>{_0x4ac3e3['hasDomSelection']()&&(_0x3b6077(),_0x3c54e8['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4ac3e3);}['_destroyEditorAnnotationsIntegration'](_0x394382){this['stopListening'](_0x394382),this['_editorAnnotations']['remove'](_0x394382);}}class C extends _0x508f07{['counterView'];constructor(_0x56e982){super(_0x56e982);const _0x5d72e3=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5724d2,_0x30278f)=>_0x5724d2?'...':_0x30278f['toString']()),this['set']('annotationType',''),this['icon']=_0x49da61,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5d72e3['to']('annotationType',_0x1ca283=>'ck-annotation-counter__badge--'+_0x1ca283),_0x5d72e3['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5d72e3['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x298773{['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(_0x12cecc){super(_0x12cecc),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3581a0())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3d5ab7(),this['_refreshPositioningDebounced']=_0x3aa37b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0xf82a65(this['context']['locale']),this['balloonPanelView']=new _0x132bef(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x135379){this['annotations']=_0x135379;const _0x35b691=this['context']['plugins']['get'](z),_0x5d6390=this['balloonPanelView'];if(_0x35b691['_annotations']=_0x135379,this['isAttached'])throw new _0x48ecf8('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x35b691,'set:container',()=>{this['detach'](),this['listenTo'](_0x35b691,'change:container',_0x423cb4=>{_0x423cb4['off'](),this['attach'](_0x135379);});}),_0x35b691['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x34775d=_0x373b18=>{const _0x333371=new C(this['context']['locale']);_0x35b691['addAnnotation'](_0x373b18,_0x333371),this['_annotationToNarrowView']['set'](_0x373b18,_0x333371),_0x333371['bind']('isDirty','annotationType','number')['to'](_0x373b18['view'],'isDirty','type','length'),_0x333371['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5d6390['content']['first']!==_0x373b18['view']?(this['_showBalloon'](_0x373b18),_0x373b18['view']['element']['focus'](),this['setActiveAnnotation'](_0x373b18)):this['setActiveAnnotation'](null);});};for(const _0x14a3da of _0x135379)_0x34775d(_0x14a3da);this['listenTo'](_0x135379,'add',(_0x269eb0,_0xbea69e)=>{_0x34775d(_0xbea69e);}),this['listenTo'](_0x135379,'remove',(_0x2e35f8,_0x5c5be5,_0x41e38a)=>{this['_annotationToNarrowView']['get'](_0x5c5be5)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5c5be5),_0x35b691['rearrange']({'removedAnnotation':_0x5c5be5,'previousAnnotation':_0x135379['get'](_0x41e38a-0x1),'nextAnnotation':_0x135379['get'](_0x41e38a+0x1)}),_0x5c5be5===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x135379,'focus',(_0x34b54a,_0x23cdb0)=>{this['setActiveAnnotation'](_0x23cdb0);}),this['listenTo'](_0x135379,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x16127a,_0xf40d8b)=>{_0xf40d8b['keyCode']===_0x23fa1c['esc']&&_0x5d6390['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5d6390['content']['first']),this['_hideBalloon'](),_0xf40d8b['stopPropagation'](),_0xf40d8b['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x17a021,_0xad6de7)=>{const _0x2dbd0c=_0xad6de7['target'];_0x5d6390['isVisible']&&_0x5d6390['element']['contains'](_0x2dbd0c)||_0x35b691['view']['element']['contains'](_0x2dbd0c)||_0x17a021['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x18a749=>_0x18a749['contains'](_0x2dbd0c))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x449a81=this['context']instanceof _0x4e0713?this['context']['editors']:new _0x3d5ab7([this['context']]);for(const _0x5a6949 of _0x449a81)this['_integrateWithEditorAnnotations'](_0x5a6949);this['listenTo'](_0x449a81,'add',(_0x1babf2,_0x11c6d8)=>{this['listenTo'](_0x11c6d8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x11c6d8);});}),this['listenTo'](_0x449a81,'remove',(_0xb38962,_0x33bfaa)=>{_0x33bfaa['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x33bfaa['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5c370c){if(_0x5c370c===this['activeAnnotation'])return;const _0x1ed2a7=this['context']['plugins']['get'](z);if(_0x1ed2a7['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5c370c,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5c370c)_0x1ed2a7['getSidebarItemView'](_0x5c370c)?this['_showBalloon'](_0x5c370c):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5c370c;}['detach'](){if(!this['isAttached'])throw new _0x48ecf8('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x424fe0=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3cac80=>_0x3cac80['destroy']()),this['_annotationToNarrowView']['clear'](),_0x424fe0['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4e0713&&this['stopListening'](this['context']['editors']);for(const _0x2d3451 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2d3451);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'](_0x35208c){if(!_0x35208c['plugins']['has']('EditorAnnotations'))return;const _0x2288e6=_0x35208c['plugins']['get']('EditorAnnotations'),_0x32ab5f=this['context']['plugins']['get'](z),_0x5070fc=this['annotations'],_0x350780=this['balloonPanelView'],_0x14a6b4=()=>{const _0x35054c=_0x2288e6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x35054c),this['setActiveAnnotation'](_0x35054c[0x0]||null);};this['listenTo'](_0x2288e6,'refresh',_0x14a6b4),this['listenTo'](_0x2288e6,'blur',(_0x1b6248,{isAnnotationTracked:_0x5a5856})=>{this['activeAnnotation']&&_0x5a5856(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2288e6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x5070fc,'blur',_0x2b1047=>{_0x2288e6['hasDomSelection']()&&_0x2b1047['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5acc2f,_0x365977)=>{const _0x354b48=_0x365977['target'];_0x350780['isVisible']&&_0x350780['element']['contains'](_0x354b48)||_0x32ab5f['view']['element']['contains'](_0x354b48)||this['activeAnnotation']&&_0x2288e6['hasDomSelection']()&&(_0x14a6b4(),_0x5acc2f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2288e6);}['_destroyEditorAnnotationsIntegration'](_0x1b2cb3){_0x1b2cb3&&(this['stopListening'](_0x1b2cb3),this['_editorAnnotations']['remove'](_0x1b2cb3));}['_setSelectedAnnotations'](_0x212be4){for(const _0x499573 of this['_selectedAnnotations'])_0x212be4['includes'](_0x499573)||this['_manuallyClosedAnnotationViews']['delete'](_0x499573['view']);this['_selectedAnnotations']=_0x212be4;}['_refreshPositioning'](){const _0x3a36c9=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3a36c9['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4ec69d){if(this['_manuallyClosedAnnotationViews']['has'](_0x4ec69d['view']))return;const _0x51708e=this['balloonPanelView']['content']['first'];_0x51708e!==_0x4ec69d['view']?(_0x51708e&&this['_detachListeners'](_0x51708e),this['_attachListeners'](_0x4ec69d['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4ec69d['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2b8cd8=this['balloonPanelView']['content']['first'],_0x35536c=_0x2b8cd8&&this['annotations']['getByView'](_0x2b8cd8);if(!_0x35536c||!this['_annotationToNarrowView']['has'](_0x35536c))return;const _0x3a55cf=this['_annotationToNarrowView']['get'](_0x35536c)['element'],_0x44e130=(function(){const _0x461d85=_0x132bef['defaultPositions'];return[_0x461d85['southArrowNorthEast'],_0x461d85['northArrowSouthEast'],_0x461d85['southArrowNorth'],_0x461d85['northArrowSouth'],_0x461d85['southArrowNorthWest'],_0x461d85['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3a55cf,'positions':_0x44e130});}['_hideBalloon'](){const _0x1133a9=this['balloonPanelView'],_0x3841ec=_0x1133a9['content']['first'];_0x3841ec&&(this['_detachListeners'](_0x3841ec),_0x1133a9['unpin'](),_0x1133a9['content']['clear']());}['_attachListeners'](_0x4391b8){this['listenTo'](_0x4391b8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4391b8,'Esc',(_0x145355,_0x7de931)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4391b8),this['_hideBalloon'](),_0x7de931();});}['_detachListeners'](_0x5d4288){this['stopListening'](_0x5d4288);}}class c extends _0x5bb67e{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x32c491,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x58970b){super(_0x58970b),_0x58970b['editing']['view']['addObserver'](_0x39f157),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x58970b['plugins']['get'](_0x32c491),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x3aa37b(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x32838e=this['editor']['plugins']['get'](j);_0x32838e['context']===this['editor']&&(_0x32838e['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x512d2c,_0x317089)=>{const _0x54d07a=this['_balloon'];if(this['isAttached']&&_0x54d07a['visibleView']){const _0x1d2907=this['annotations']['getByView'](_0x54d07a['visibleView']);_0x1d2907&&this['_closeAnnotation'](_0x1d2907),_0x317089();}}));}['afterInit'](){const _0x5a4ae1=this['editor']['plugins']['get'](j);_0x5a4ae1['context']===this['editor']&&(_0x5a4ae1['hasActive']()||_0x5a4ae1['switchTo']('inline'));}['setActiveAnnotation'](_0x34c0a7){_0x34c0a7!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x34c0a7&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x34c0a7)&&this['_addAnnotationToBalloon'](_0x34c0a7,!0x0),_0x34c0a7['isActive']=!0x0),_0x34c0a7||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x34c0a7);}['attach'](_0x23e638){this['annotations']=_0x23e638;const _0x2ff679=this['editor']['plugins']['get'](j),_0x25ae46=this['_balloon'];if(this['isAttached'])throw new _0x48ecf8('inlineannotations-attach-already-attached',this);if(_0x2ff679['context']!==this['editor'])throw new _0x48ecf8('inlineannotations-not-allowed-with-context',this);const _0x3056db=this['editor']['plugins']['get'](b);this['listenTo'](_0x3056db,'refresh',()=>{const _0x7947b7=_0x3056db['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x37e138,_0x596818;!this['_forceRefresh']&&(_0x37e138=_0x7947b7,_0x596818=this['_selectedAnnotations'],_0x37e138['length']===_0x596818['length']&&_0x37e138['every'](_0x4f2918=>_0x596818['includes'](_0x4f2918)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x7947b7),this['setActiveAnnotation'](_0x7947b7[0x0]||null));}),this['listenTo'](_0x3056db,'blur',(_0x58e1ac,{isAnnotationTracked:_0x5cede9})=>{this['activeAnnotation']&&_0x5cede9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3056db,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1d55f4,_0x242d66,_0x4d783b)=>{_0x4d783b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x23e638,'remove',(_0x25cb51,_0x5bdad9)=>{this['_removeAnnotationFromBalloon'](_0x5bdad9),_0x5bdad9===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x25ae46,'change:visibleView',(_0x36a50e,_0x117df4,_0x2e21ce,_0x8bbeda)=>{_0x8bbeda&&this['stopListening'](_0x8bbeda);const _0x4bea8=_0x23e638['getByView'](_0x2e21ce);_0x2e21ce&&_0x4bea8&&(this['listenTo'](_0x2e21ce,'change:height',()=>{_0x25ae46['updatePosition']();}),this['listenTo'](_0x2e21ce,'Esc',()=>{this['_closeAnnotation'](_0x4bea8),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4bea8&&this['setActiveAnnotation'](_0x4bea8));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x25ae46['visibleView']&&(_0x23e638['getByView'](_0x25ae46['visibleView'])&&_0x25ae46['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 _0x48ecf8('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4a999c of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4a999c);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x39021f){for(const _0x215b39 of this['_selectedAnnotations'])_0x39021f['includes'](_0x215b39)||this['_manuallyClosed']['delete'](_0x215b39);for(const _0x35ac16 of this['annotations'])_0x39021f['includes'](_0x35ac16)||this['_removeAnnotationFromBalloon'](_0x35ac16);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1f0907 of _0x39021f)this['_addAnnotationToBalloon'](_0x1f0907);}this['_selectedAnnotations']=_0x39021f;}['_addAnnotationToBalloon'](_0x5ec084,_0x30a973=!0x1){this['_manuallyClosed']['has'](_0x5ec084)||(this['_addedAnnotations']['has'](_0x5ec084)||this['_balloon']['hasView'](_0x5ec084['view'])||(this['_addedAnnotations']['add'](_0x5ec084),this['_balloon']['add']({'stackId':_0x5ec084['view']['id'],'view':_0x5ec084['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5ec084)}})),_0x30a973&&this['_balloon']['showStack'](_0x5ec084['view']['id']));}['_getBalloonTargetForAnnotation'](_0x24ee9e){const _0x259d5d=_0x24ee9e['target'],_0x5c06da=this['editor']['editing']['view'],_0x6f2b2c=_0x5c06da['document']['selection']['getFirstRange'](),_0x3ae20a=_0x5c06da['domConverter']['viewRangeToDom'](_0x6f2b2c);if(_0x3ae20a['collapse'](!0x0),_0x259d5d){if(_0x259d5d instanceof _0xc27574)return _0x259d5d;let _0x599bbe=[];for(const _0x3db8c7 of _0x259d5d)_0x599bbe['push'](...F(_0x3db8c7['getClientRects']()));_0x599bbe=function(_0xab5dd0){const _0x3af991=[];let _0x348fad=_0xab5dd0[0x0];for(let _0xc0a367=0x1;_0xc0a367<_0xab5dd0['length'];_0xc0a367++)P(_0x348fad,_0xab5dd0[_0xc0a367])?_0x348fad['width']+=_0xab5dd0[_0xc0a367]['width']:(_0x3af991['push'](_0x348fad),_0x348fad=_0xab5dd0[_0xc0a367]);return _0x3af991['push'](_0x348fad),_0x3af991;}(_0x599bbe);const _0x8c32ed=_0x3ae20a['getBoundingClientRect']();return _0x599bbe['find'](_0x178bab=>_0x178bab['top']<=_0x8c32ed['top']&&_0x178bab['bottom']>=_0x8c32ed['bottom']&&_0x178bab['left']<=_0x8c32ed['left']&&_0x178bab['right']>=_0x8c32ed['right'])||_0x599bbe[0x0];}return _0x24ee9e['targetRect']||_0x3ae20a;}['_removeAnnotationFromBalloon'](_0x5daf9d){this['_addedAnnotations']['has'](_0x5daf9d)&&this['_balloon']['hasView'](_0x5daf9d['view'])&&(this['_addedAnnotations']['delete'](_0x5daf9d),this['_balloon']['remove'](_0x5daf9d['view']));}['_closeAnnotation'](_0x48ab3d){this['_manuallyClosed']['add'](_0x48ab3d),this['_removeAnnotationFromBalloon'](_0x48ab3d);}}function F(_0x6a6e5b){return Array['from'](_0x6a6e5b)['map'](DOMRect['fromRect']);}function P(_0x4895fe,_0x24b0b3){return _0x4895fe['top']===_0x24b0b3['top']&&_0x4895fe['bottom']===_0x24b0b3['bottom']&&_0x4895fe['right']===_0x24b0b3['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x144cb5,_0x4c9131){super(_0x144cb5),this['set']('isEmpty',!_0x4c9131['length']),this['focusTracker']=new _0xff5d19(),this['_annotationViews']=_0x4c9131,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x445736({'focusables':_0x4c9131,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4c9131,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4c9131,'remove',(_0x2fc65d,_0x2f9752)=>{_0x2f9752['isActive']&&this['focus'](),_0x4c9131['length']||(this['isEmpty']=!0x0);});const _0x404fb5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x144cb5,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4c9131},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x404fb5['if']('isEmpty','ck-hidden',_0x318636=>!_0x318636)]},'children':[{'text':N(_0x144cb5,'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 _0x2c8ce2 of this['_annotationViews'])this['focusTracker']['add'](_0x2c8ce2['element']);this['_annotationViews']['on']('change',(_0x30998e,{added:_0x5f4659,removed:_0x3b1f09})=>{for(const _0x163fc4 of _0x5f4659)this['focusTracker']['add'](_0x163fc4['element']);for(const _0x5dcaf2 of _0x3b1f09)this['focusTracker']['remove'](_0x5dcaf2['element']);});}}class p extends _0x298773{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x48ab45){super(_0x48ab45),this['archivedThreads']=new _0x3d5ab7();}['init'](){const _0x3385b6=this['context'],_0x585ba0=_0x3385b6['plugins']['get'](o),_0x2f1c17=_0x3385b6['plugins']['get'](y);this['listenTo'](_0x585ba0,'addCommentThread',(_0x421c7b,{threadId:_0x24a1a})=>{const _0x221e18=_0x585ba0['getCommentThread'](_0x24a1a);_0x221e18['archivedAt']&&this['archivedThreads']['add'](_0x221e18,this['_calculatePosition'](_0x221e18['archivedAt'])),this['listenTo'](_0x221e18,'change:archivedAt',(_0x128f3c,_0x1de4aa,_0x56cc7d)=>{_0x56cc7d?this['archivedThreads']['has'](_0x221e18)||this['archivedThreads']['add'](_0x221e18,this['_calculatePosition'](_0x221e18['archivedAt'])):this['archivedThreads']['has'](_0x221e18)&&this['archivedThreads']['remove'](_0x221e18);});}),this['listenTo'](_0x585ba0,'removeCommentThread',(_0x110f35,{threadId:_0x1d3391})=>{const _0x3d9f44=_0x585ba0['getCommentThread'](_0x1d3391);this['stopListening'](_0x3d9f44),this['archivedThreads']['has'](_0x3d9f44)&&this['archivedThreads']['remove'](_0x3d9f44);},{'priority':'highest'}),this['listenTo'](_0x2f1c17['collection'],'focus',(_0x5efbf7,_0x1a7d70)=>{_0x1a7d70['isVisible']||(_0x1a7d70['isActive']=!0x0,_0x2f1c17['activate'](_0x1a7d70));});}['_calculatePosition'](_0x1fd093){const _0x1fa203=[...this['archivedThreads']]['findIndex'](_0x329ebe=>_0x329ebe['archivedAt']<_0x1fd093);return _0x1fa203>-0x1?_0x1fa203:this['archivedThreads']['length'];}}class a extends _0x5bb67e{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1d7f05];}constructor(_0x5b2093){super(_0x5b2093),this['annotationViews']=new _0x146541(),this['_pendingThreads']=[];}['init'](){const _0x38a481=this['editor'],_0x24daa8=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x38a481['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x508f07,!0x0)),_0x38a481['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3dce27=this['_createCommentsArchiveButton'](_0x431b16);return _0x3dce27['set']({'role':'menuitemcheckbox'}),_0x3dce27;});const _0x2cde4c=_0x38a481['plugins']['get'](p),_0x217440=_0x38a481['plugins']['get']('Annotations'),_0x1c9b32=_0x38a481['plugins']['get']('CommentsRepository');_0x2cde4c['archivedThreads']['forEach'](_0x656ed7=>{this['_handleNewThread'](_0x656ed7);}),this['listenTo'](_0x2cde4c['archivedThreads'],'add',(_0x1d0ffe,_0x179ba8)=>{this['_handleNewThread'](_0x179ba8);}),this['listenTo'](_0x217440['collection'],'add',(_0x665648,_0x539abf)=>{const _0x5484d7=this['_pendingThreads']['find'](_0x13a217=>{const _0xe52c96=_0x1c9b32['_threadToController']['get'](_0x13a217);return _0xe52c96&&_0x539abf['innerView']===_0xe52c96['view'];});if(_0x5484d7){const _0x18aa99=this['_calculatePosition'](_0x5484d7['archivedAt']);this['_addAnnotationToArchive'](_0x539abf,_0x18aa99),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5484d7),0x1);}}),this['listenTo'](_0x2cde4c['archivedThreads'],'remove',(_0x521c54,_0xe0ca02)=>{const _0x1c3251=_0x38a481['config']['get']('collaboration.channelId');if(!_0x1c3251||_0xe0ca02['channelId']===_0x1c3251){if(this['_pendingThreads']['includes'](_0xe0ca02))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xe0ca02),0x1);else{const _0x22557b=_0x1c9b32['_threadToController']['get'](_0xe0ca02),_0x4c3032=_0x217440['getByInnerView'](_0x22557b['view']);this['annotationViews']['remove'](_0x4c3032['view']),this['stopListening'](_0x4c3032),this['stopListening'](_0x4c3032['focusableElements']);}}}),this['listenTo'](_0x217440['collection'],'add',(_0x1179ff,_0x46368e)=>{this['listenTo'](_0x46368e,'escape',_0x24daa8);}),this['listenTo'](_0x217440['collection'],'remove',(_0x32cf9a,_0x5b2dad)=>{this['stopListening'](_0x5b2dad,'escape',_0x24daa8);});}['_addAnnotationToArchive'](_0x354573,_0x545e98){this['listenTo'](_0x354573,'set:isVisible',_0x36e2e3=>{_0x36e2e3['return']=!0x1,_0x36e2e3['stop']();}),this['annotationViews']['add'](_0x354573['view'],_0x545e98);}['_handleNewThread'](_0x532d78){const _0x5f0f1d=this['editor']['plugins']['get']('CommentsRepository'),_0xd92ec7=this['editor']['plugins']['get']('Annotations'),_0x34cc34=this['editor']['config']['get']('collaboration.channelId');if(!_0x34cc34||_0x532d78['channelId']===_0x34cc34){const _0x3a3fed=_0x5f0f1d['_threadToController']['get'](_0x532d78);if(!_0x3a3fed)return void this['_pendingThreads']['push'](_0x532d78);const _0x1e483a=this['_calculatePosition'](_0x532d78['archivedAt']),_0x48fa1b=_0xd92ec7['getByInnerView'](_0x3a3fed['view']);_0x48fa1b['isVisible']&&_0xd92ec7['_visibleAnnotations']['remove'](_0x48fa1b),this['_addAnnotationToArchive'](_0x48fa1b,_0x1e483a);}}['_calculatePosition'](_0x251456){const _0x347642=this['editor']['config']['get']('collaboration.channelId'),_0x419688=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2a6ec4=>_0x2a6ec4['channelId']===_0x347642)['findIndex'](_0x3c2d29=>_0x3c2d29['archivedAt']<_0x251456);return _0x419688<0x0||_0x419688>this['annotationViews']['length']?this['annotationViews']['length']:_0x419688-0x1;}['_toggleDialog'](){const _0x5850a7=this['editor'],_0x2b1f4b=_0x5850a7['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x5850a7['locale'],this['annotationViews'])),'commentsArchive'===_0x2b1f4b['id']?_0x2b1f4b['hide']():_0x2b1f4b['show']({'id':'commentsArchive','title':N(_0x5850a7['locale'],'COMMENTS_ARCHIVE'),'icon':_0x35b5d8,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x427eb1['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x224f98,_0x19014f=!0x1){const _0x316e3e=this['editor']['locale'],_0x51240c=this['editor']['plugins']['get']('Dialog'),_0x343e72=new _0x224f98(_0x316e3e);return _0x343e72['bind']('isEnabled')['to'](this,'isEnabled'),_0x343e72['bind']('isOn')['to'](_0x51240c,'id',_0x4a4859=>'commentsArchive'===_0x4a4859),_0x343e72['set']({'label':N(_0x316e3e,'COMMENTS_ARCHIVE'),'icon':_0x35b5d8,'isToggleable':!0x0}),_0x19014f&&(_0x343e72['tooltip']=!0x0),this['listenTo'](_0x343e72,'execute',()=>this['_toggleDialog']()),_0x343e72;}['_hideDialogOnAnnotationEscape']=_0x51f6b8=>{const _0x170ec7=_0x51f6b8['source'];if(!this['annotationViews']['has'](_0x170ec7['view']))return;const _0x273edb=this['editor']['plugins']['get']('Dialog');_0x273edb['isOpen']&&'commentsArchive'===_0x273edb['id']&&(_0x273edb['hide'](),_0x51f6b8['stop']());};}class gi extends _0x5bb67e{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};