@ckeditor/ckeditor5-comments 47.7.0-alpha.2 → 47.7.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 _0x1d84e6,ContextPlugin as _0x41aa84,PendingActions as lt,Command as _0x3ba471,Plugin as _0xd49eba,Context as _0x5f566b}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x4e252d,uid as _0x39c0ed,KeystrokeHandler as jt,FocusTracker as _0x14dc48,diff as _0x569ff3,Collection as _0x2d3dca,Rect as _0x4bd5bc,CKEditorError as _0xacf139,first as _0x1c751c,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x4917db,keyCodes as _0x3c3fb1}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x19b855,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x291660,trimHtml as ts,LateFocusDropdownButtonView as _0xdd4b5,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x101819}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x2df535}from'es-toolkit/compat';import{IconUndo as _0x52465b,IconCheck as _0x15f87c,IconPencil as _0x1d7371,IconRemoveComment as _0x30af47,IconThreeVerticalDots as _0x1a4168,IconAddComment as _0x353a08,IconCommentsArchive as _0x28c328}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x35c9d0,ButtonView as _0x331a0a,ViewCollection as _0x32af43,createDropdown as _0x17c2a6,ListView as _0x297fa8,focusChildOnDropdownOpen as _0x3ad376,ListItemView as _0x321962,MenuBarMenuListItemButtonView as _0x1f2a75,BodyCollection as _0x192f59,BalloonPanelView as _0x2d57a3,ContextualBalloon as _0x236885,Dialog as _0x40987b,DialogViewPosition as _0x20cf06}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x50a083}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 _0x535663}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x3cacc7}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0x4e252d(){['model'];['view'];constructor(_0x2a6f2d,_0x258ce9){super(),this['model']=_0x2a6f2d,this['model']['_isAttached']=!0x0,this['view']=_0x258ce9,this['listenTo'](_0x258ce9,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x258ce9,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x258ce9,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x258ce9,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x258ce9,'addComment',(_0x286bfb,_0x19a993)=>this['addComment'](_0x19a993)),this['listenTo'](_0x258ce9,'updateComment',(_0x1d4f72,_0x9718de,_0x199b8a)=>this['updateComment'](_0x9718de,_0x199b8a)),this['listenTo'](_0x258ce9,'removeComment',(_0x45cb1e,_0x1afcee)=>this['removeComment'](_0x1afcee));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x2823cd){this['model']['addComment']({'content':_0x2823cd,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x5ce59c,_0x326985){this['model']['getComment'](_0x5ce59c)['update']({'content':_0x326985});}['removeComment'](_0x433aa0){this['model']['getComment'](_0x433aa0)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x3ffb0f,_0x21b32a,_0x1f8787){const t=_0x3ffb0f['t'];switch(_0x21b32a){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'},_0x1f8787);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'},_0x1f8787);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'},_0x1f8787);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'},_0x1f8787);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1f8787);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'},_0x1f8787);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'},_0x1f8787);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'},_0x1f8787);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(_0x28f126,_0x31ed1d){super(_0x28f126);const _0x560fc1=_0x39c0ed();this['main']=this['createCollection'](),this['editable']=new Vt(_0x28f126,_0x31ed1d,void 0x0,{'label':()=>N(_0x28f126,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x28f126['uiLanguageDirection'],'lang':_0x28f126['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x560fc1},'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(_0x358c48){super(_0x358c48),this['view']=new Rt(_0x358c48['locale'],_0x358c48['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x21af97=this['editor']['editing']['view'],_0x381f21=this['view']['editable'],_0x341a87=_0x21af97['document']['getRoot']();_0x381f21['name']=_0x341a87['rootName'],this['view']['render']();const _0x16863f=_0x381f21['element'];this['setEditableElement'](_0x381f21['name'],_0x16863f),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x21af97['attachDomRoot'](_0x16863f),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
- _0x4e252d(_0x1d84e6){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x372066={}){function _0x3d4a9a(_0x4e0aef){return _0x4e0aef['map'](_0x1db1f1=>String['fromCharCode'](_0x1db1f1))['join']('');}(_0x372066=Object['assign']({},_0x372066))['plugins']||(_0x372066['plugins']=hs['defaultPlugins']),super(_0x372066),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[_0x3d4a9a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d4a9a([0x76,0x69,0x65,0x77])][_0x3d4a9a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3d4a9a([0x61,0x75,0x74,0x6f]),this[_0x3d4a9a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3d4a9a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3d4a9a([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3d4a9a([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3d4a9a([0x6f,0x6b])});}['create'](){const _0x294726=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x294726))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x45d1d1=>{const _0x15000a=this['model']['document']['getRoot'](),_0xef297d=_0x15000a&&_0x15000a['getChild'](_0x15000a['childCount']-0x1);_0x45d1d1['setSelection'](_0xef297d,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x319edd=this['editing']['view'],_0x2b0e86=_0x319edd['document']['getRoot'](),_0x500013=_0x2b0e86['getChild'](0x0);_0x2b0e86['childCount']>0x1||!_0x500013||'p'!=_0x500013['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x319edd,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x500013['placeholder']=this['placeholder']),Ft({'view':_0x319edd,'element':_0x500013,'keepOnFocus':!0x0}),this['placeholderElement']=_0x500013);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1980a0,_0x2f54d1={}){super(_0x1980a0),this['editor']=null,this['_editorConfig']=_0x2f54d1,this['set']('value',_0x2f54d1['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x1980a0,'Reply...')),this['set']('submitLabel',N(_0x1980a0,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x14dc48(),this['focusCycler']=new _0x35c9d0({'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',(_0xaacaff,_0x15db9a)=>{this['cancelButtonView']['fire']('execute'),_0x15db9a();}),this['keystrokes']['set']('Ctrl+Enter',(_0x44ebe3,_0x4680ef)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4680ef());}),this['on']('submit',(_0x14f068,_0x17843d)=>{_0x17843d['length']>0xfde8?(alert(N(_0x1980a0,'TOO_LONG_COMMENT_ALERT',[_0x17843d['length'],0xfde8])),_0x14f068['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 _0x3c321b=this['editor'];this['element']['insertBefore'](_0x3c321b['ui']['element'],this['element']['firstChild']),_0x3c321b['model']['document']['on']('change',()=>this['value']=_0x3c321b['getData']()),_0x3c321b['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3c321b['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1aa1c8){-0x1===_0x1aa1c8?(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:_0x1dfd19}=this,_0x26f306=new _0x331a0a(_0x1dfd19);return _0x26f306['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x26f306['withText']=!0x0,_0x26f306['bind']('label')['to'](this,'submitLabel'),_0x26f306['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x26f306['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5d37bb,_0x509622)=>!_0x509622&&!!_0x5d37bb['trim']()),_0x26f306;}['_createCancelButton'](){const {locale:_0x5316a6}=this,_0xdae055=new _0x331a0a(_0x5316a6);return _0xdae055['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xdae055['label']=N(_0x5316a6,'Cancel'),_0xdae055['withText']=!0x0,_0xdae055['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xdae055;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xbb4d4=>{this['focusTracker']['add'](_0xbb4d4['element']);}),this['focusables']['on']('change',(_0x24a7fe,_0x2516b6)=>{for(const _0x21d27e of Array['from'](_0x2516b6['added'])['reverse']())this['focusTracker']['add'](_0x21d27e['element']);});}}class ie extends kt{constructor(_0xb6d3e4,_0x23ac06,_0x366239){super(_0xb6d3e4),this['commentInputView']=new es(_0xb6d3e4,_0x366239),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x11f969,_0x17e41f)=>_0x11f969||!!_0x17e41f),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 _0x19b855(_0xb6d3e4,_0x23ac06),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'](_0xf9fcad){this['commentInputView']['focus'](_0xf9fcad);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x27ca7a,_0x1d1fa1)=>{const {submitButtonView:_0xb60a76,cancelButtonView:_0x4fd30d,editor:_0x2e730f}=this['commentInputView'];[_0xb60a76['element'],_0x4fd30d['element'],_0x2e730f?_0x2e730f['editing']['view']['getDomRoot']():null]['filter'](_0x43a289=>_0x43a289)['some'](_0x2505af=>_0x2505af['contains'](_0x1d1fa1['target']))||(this['focus'](),_0x1d1fa1['preventDefault']());});}}class rs extends kt{constructor(_0x48c454){super(_0x48c454);const _0x3941ed=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3941ed['to']('count',_0x4696e3=>N(_0x48c454,'NUMBER_OF_COMMENTS',_0x4696e3))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x86a1b8,_0xa72c55,_0x4f1693){super(_0x86a1b8);const _0x348ae5=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xa72c55['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xa72c55,this['_config']=_0x4f1693,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x14dc48(),this['keystrokes']=new jt(),this['focusCycler']=new _0x35c9d0({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5a1c4e=>this['commentViews']['map'](_0x3e122f=>_0x3e122f['element'])['includes'](_0x5a1c4e['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x86a1b8),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xfa23b1=>_0xfa23b1-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4c7de7 of _0xa72c55['comments'])this['_handleNewCommentModel'](_0x4c7de7);this['_handleInfoComment'](),this['listenTo'](_0xa72c55['comments'],'add',(_0x7f7c12,_0x9274a4)=>{const _0x41094e=this['_calculatePosition'](_0x9274a4);this['length']++,this['_handleNewCommentModel'](_0x9274a4,_0x41094e),this['refreshVisibleViews']();}),this['listenTo'](_0xa72c55['comments'],'remove',(_0x4a8c2e,_0x937ca1)=>{this['length']--,this['_handleRemoveCommentModel'](_0x937ca1),this['refreshVisibleViews']();}),this['listenTo'](_0xa72c55,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xa72c55,'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',_0x348ae5['if']('length','ck-hidden',_0x4df01a=>!_0x4df01a)],'aria-label':N(_0x86a1b8,'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'](_0x5334be){-0x1===_0x5334be?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2fa704 of this['commentViews'])_0x2fa704['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x351894,_0x31e3fd){const _0x10e086=new this['_config']['CommentView'](this['locale'],_0x351894,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x10e086['viewUid']=_0x351894['id'],_0x10e086['delegate']('removeComment')['to'](this),_0x10e086['delegate']('updateComment')['to'](this),_0x10e086['delegate']('resolveCommentThread')['to'](this),_0x10e086['delegate']('editorReady')['to'](this),_0x10e086['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x10e086,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x10e086,_0x31e3fd);}['_calculatePosition'](_0x469b8f){const _0x249fec=this['_model']['_findOptimalIndex'](_0x469b8f);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x469b8f['authoredAt']?_0x249fec-0x1:_0x249fec:_0x249fec-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xad1726={'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'],_0xad1726,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xad1726));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x72067d){const _0x43251c=this['commentViews']['remove'](_0x72067d['id']);this['stopListening'](_0x43251c),_0x43251c['isEditMode']&&this['_updateHasDirtyComment'](),_0x43251c['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x452a97=>_0x452a97['isEditMode']);}['_rearrangeCollapse'](){const _0x1e4e99=function(_0x5a67ef){const _0x89ed07=new _0x2d3dca();for(const _0x3528eb of _0x5a67ef)_0x89ed07['add'](_0x3528eb);return _0x89ed07;}(this['commentViews']),_0x8b9512=this['_collapsedCommentsView']['count'];for(let _0x1d978e=0x1;_0x1d978e<=_0x8b9512;_0x1d978e++)_0x1e4e99['remove'](0x1);for(const _0x5a7f11 of _0x1e4e99)_0x5a7f11['collapse']();_0x8b9512>0x0&&_0x1e4e99['add'](this['_collapsedCommentsView'],0x1),ns(_0x569ff3(Array['from'](this['visibleViews']),Array['from'](_0x1e4e99)),this['visibleViews'],_0x1e4e99);}['_rearrangeExpand'](){ns(_0x569ff3(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xdc9d1a of this['visibleViews'])_0xdc9d1a['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x8f7f13=>{this['focusTracker']['add'](_0x8f7f13['element']),this['keystrokes']['listenTo'](_0x8f7f13['element']);}),this['commentViews']['on']('change',(_0x1a661a,_0x4e9584)=>{for(const _0x38de75 of _0x4e9584['removed'])this['focusTracker']['remove'](_0x38de75['element']),this['keystrokes']['stopListening'](_0x38de75['element']);for(const _0x4588e4 of Array['from'](_0x4e9584['added'])['reverse']())this['focusTracker']['add'](_0x4588e4['element']),this['keystrokes']['listenTo'](_0x4588e4['element']);});}}function ns(_0xc295c,_0x4f1254,_0x18ffff){let _0x4ed29c=0x0;for(const _0x2bc019 of _0xc295c)switch(_0x2bc019){case'insert':_0x4f1254['add'](_0x18ffff['get'](_0x4ed29c),_0x4ed29c),_0x4ed29c++;break;case'delete':_0x4f1254['remove'](_0x4ed29c);break;case'equal':_0x4ed29c++;}}class oe extends kt{constructor(_0x2f8f73){super(_0x2f8f73);const _0x489c5b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x489c5b['to']('contextValue',_0x51d506=>N(_0x2f8f73,'THREAD_CONTEXT_LABEL',_0x51d506)),'tabindex':-0x1},'children':[{'text':_0x489c5b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x346203,_0x11ec84){super(_0x346203);const _0x29d35e=this['bindTemplate'];this['_model']=_0x11ec84,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x14dc48(),this['keystrokes']=new jt(),this['focusCycler']=new _0x35c9d0({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x351dda=>!!_0x351dda),this['bind']('contextValue')['to'](this['_model'],'context',_0x5c219c=>_0x5c219c&&_0x5c219c['value']?this['_trimContextValue'](_0x5c219c['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',_0x29d35e['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 _0x2b0b50=new _0x331a0a(this['locale']);return _0x2b0b50['label']=N(this['locale'],'Reopen'),_0x2b0b50['tooltip']=N(this['locale'],'Reopen'),_0x2b0b50['icon']=_0x52465b,_0x2b0b50['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x253f33=>!_0x253f33),_0x2b0b50['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5eabde,_0x4c7a35)=>_0x5eabde&&_0x4c7a35),_0x2b0b50['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2b0b50;}['_trimContextValue'](_0x19865d){if(_0x19865d['length']<0x96)return _0x19865d;const _0x4de7f9=_0x19865d['lastIndexOf']('\x20',0x93);return _0x19865d['substring'](0x0,_0x4de7f9>-0x1?_0x4de7f9:0x93)+'...';}['_attachContextActions'](){const _0x268ef9=this['element']['querySelector']('.ck-context'),_0xabc564=_0x268ef9['querySelector']('.ck-context__value');this['listenTo'](_0x268ef9,'mouseenter',()=>{_0xabc564['offsetWidth']<_0xabc564['scrollWidth']&&_0x268ef9['classList']['add']('overlay');}),this['listenTo'](_0x268ef9,'mouseleave',()=>{_0x268ef9['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3ff010 of this['focusables'])this['focusTracker']['add'](_0x3ff010['element']),this['keystrokes']['listenTo'](_0x3ff010['element']);}['_createContextView'](){const _0x790908=new oe(this['locale']);return _0x790908['bind']('contextValue')['to'](this),_0x790908;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x536a29,_0x45929e,_0x1f12d7,_0x30ffeb){super(_0x536a29),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x45929e,this['_localUser']=_0x1f12d7,this['_config']=_0x30ffeb,this['commentThreadHeaderView']=new Xt(_0x536a29,_0x45929e),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x536a29,N(_0x536a29,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x536a29,_0x45929e,Object['assign']({'CommentView':this['_config']['CommentView']},_0x30ffeb)),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',(_0x3c1e65,_0x2b98a0)=>_0x3c1e65||!!_0x2b98a0),this['bind']('isUnlinked')['to'](_0x45929e,'unlinkedAt',_0x2982bf=>!!_0x2982bf),this['bind']('ariaLabel')['to'](this,'length',_0x52878e=>{const _0x56336e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x52878e,_0x56336e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x14dc48(),this['keystrokes']=new jt(),this['focusCycler']=new _0x35c9d0({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x989250=>_0x989250['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 _0x27af48=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2ef0f9=_0x27af48['commentInputView'];return _0x27af48['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2ef0f9,'value',(_0x5966d0,_0x448cd8,_0x7dfb8f,_0x27e694,_0x24fc31)=>!!_0x24fc31||!!_0x27e694&&_0x7dfb8f&&!_0x448cd8||_0x5966d0&&_0x7dfb8f&&!_0x448cd8),_0x2ef0f9['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x502a0a,_0x318cae,_0x219cd1)=>{let _0x192820;return _0x192820=_0x219cd1&&_0x318cae?'Reply\x20to\x20reopen\x20discussion...':_0x502a0a?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x192820);}),_0x2ef0f9['bind']('submitLabel')['to'](this,'length',_0x26b42c=>N(this['locale'],_0x26b42c?'Reply':'Comment')),_0x2ef0f9['on']('submit',(_0x33fd4d,_0x37358c)=>{this['fire']('addComment',_0x37358c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2ef0f9['on']('cancel',()=>{this['focus']();}),_0x2ef0f9['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2ef0f9['on']('cancel',_0x3922e1=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3922e1['stop']());}),this['on']('change:isActive',(_0x44f715,_0x58f66d,_0xd1181e)=>{_0xd1181e||this['length']||_0x2ef0f9['value']||this['fire']('removeCommentThread');}),_0x27af48;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4f40a2,_0x304be2,_0x23f187,_0x271881){super(_0x4f40a2,_0x304be2,_0x23f187,_0x271881),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4f40a2,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x16003c,_0x3cf143,_0x3555ae)=>{_0x3555ae||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5dc218,_0x2b392b,_0x83e17a)=>{_0x83e17a&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3139d9=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3139d9['if']('isActive','ck-thread--active'),_0x3139d9['if']('isUnlinked','ck-thread--unlinked'),_0x3139d9['to']('actionIndicator',_0x36bfbe=>_0x36bfbe?'ck-thread--'+_0x36bfbe:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3139d9['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 _0x117f4d of this['commentsListView']['commentViews'])_0x117f4d['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x2c8cf8}=this,_0x3a10bc=this['commentsListView']['commentViews']['get'](0x0);_0x3a10bc===this['_boundFirstCommentView']||_0x3a10bc['isSystemComment']||(this['_boundFirstCommentView']=_0x3a10bc,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3a10bc,'actionIndicator',_0x13b253=>'remove'===_0x13b253?'remove':null),_0x3a10bc['placeholder']=N(_0x2c8cf8,'Write\x20a\x20comment...'),_0x3a10bc['removeButton']['on']('execute',_0x4076bb=>{_0x4076bb['stop'](),this['showConfirm'](N(_0x2c8cf8,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3a10bc['focus']();}),_0x3a10bc['actionBar']['add'](this['resolveButton'],0x0),_0x3a10bc['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x42965f=new _0x291660(this['locale']);return _0x42965f['label']=N(this['locale'],'Resolve'),_0x42965f['tooltip']=N(this['locale'],'Resolve'),_0x42965f['icon']=_0x15f87c,_0x42965f['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x42965f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x9db0f6=>!_0x9db0f6),_0x42965f['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x6365ee,_0x38402b)=>_0x6365ee&&!_0x38402b),_0x42965f['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x42965f;}['_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(_0x134bfd){super(_0x134bfd),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5b1103,_0x3dca50,_0x257e19)=>{this['element']['innerHTML']=_0x257e19;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x14b290,_0x162f13,_0x318dcc){super(_0x14b290),this['_model']=_0x162f13,this['_config']=_0x318dcc,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x162f13,'content',_0x162f13,'authoredAt',(_0xc20bb8,_0x17f3ea)=>N(_0x14b290,'COMMENT_ARIA_LABEL',[_0x162f13['author']['name'],_0x318dcc['formatDateTime'](_0x17f3ea),new DOMParser()['parseFromString'](_0xc20bb8,'text/html')['body']['textContent'],_0x162f13['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x14b290,N(_0x14b290,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x32af43(),this['focusTracker']=new _0x14dc48(),this['keystrokes']=new jt(),this['focusCycler']=new _0x35c9d0({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x21727b=>_0x21727b['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 _0x53b682=new is(this['locale']);return _0x53b682['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x6e3ca8,_0x57f146)=>_0x57f146?ts(_0x6e3ca8,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x6e3ca8),_0x53b682;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x3f8767=new es(this['locale'],this['_config']['editorConfig']);return _0x3f8767['value']=this['_model']['content'],_0x3f8767['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3f8767['submitLabel']=N(this['locale'],'Save'),_0x3f8767['on']('submit',(_0x1d22c2,_0x9247da)=>{this['fire']('updateComment',this['_model']['id'],_0x9247da),this['switchToDisplayMode'](),this['focus']();}),_0x3f8767['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x3f8767['once']('editorReady',()=>{_0x3f8767['focus']();}),_0x3f8767['createEditor'](),_0x3f8767['delegate']('editorReady')['to'](this),_0x3f8767['delegate']('editorDestroyed')['to'](this),_0x3f8767;}['_setupKeyboardNavigation'](){const _0x1aab87=this['element'];this['keystrokes']['listenTo'](_0x1aab87);for(const _0x59b61b of this['focusables'])this['focusTracker']['add'](_0x59b61b['element']),this['keystrokes']['listenTo'](_0x59b61b['element']);this['focusables']['on']('change',(_0x118726,_0x4c7e7f)=>{for(const _0x512feb of _0x4c7e7f['removed'])this['focusTracker']['remove'](_0x512feb['element']),this['keystrokes']['stopListening'](_0x512feb['element']);for(const _0xc330e9 of _0x4c7e7f['added'])this['focusTracker']['add'](_0xc330e9['element']),this['keystrokes']['listenTo'](_0xc330e9['element']);}),this['keystrokes']['set']('enter',(_0x4791e8,_0x1e1cdd)=>{_0x1aab87===_0x4791e8['target']&&(this['focusCycler']['focusFirst'](),_0x1e1cdd());}),this['keystrokes']['set']('esc',(_0x1ec99f,_0x350fb9)=>{_0x1aab87!==_0x1ec99f['target']&&(this['focus'](),_0x350fb9());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0x4406f3,_0x162814,_0xc221e3){super(_0x4406f3,_0x162814,_0xc221e3),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x4406f3,'Reply...')),this['bind']('authoredAt')['to'](_0x162814),this['bind']('resolvedAt')['to'](_0x162814),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 _0x19b855(_0x4406f3,_0x162814['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x162814,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x2b0327=this['bindTemplate'],_0x575a67=[{'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':_0x2b0327['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2b0327['to']('authoredAt',_0xd5b7dd=>this['_config']['formatDateTime'](_0xd5b7dd))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2b0327['if']('isEditMode','ck-comment__actions--hidden'),_0x2b0327['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']&&_0x575a67['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x2b0327['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2b0327['if']('isEditMode','ck-comment--edit'),_0x2b0327['if']('isSystemComment','ck-comment--info'),_0x2b0327['to']('actionIndicator',_0x3c5cf4=>_0x3c5cf4?'ck-comment--'+_0x3c5cf4:'')],'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':_0x575a67}]}]};}['_createEditButton'](){const _0x5bf22a=new _0x331a0a(this['locale']);return _0x5bf22a['label']=N(this['locale'],'Edit'),_0x5bf22a['icon']=_0x1d7371,_0x5bf22a['withText']=!0x0,_0x5bf22a['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5bf22a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3c7931=>!_0x3c7931),_0x5bf22a['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5bf22a['on']('execute',()=>this['switchToEditMode']()),_0x5bf22a;}['_createRemoveButton'](){const _0x1c5063=new _0x331a0a(this['locale']);return _0x1c5063['label']=N(this['locale'],'Remove'),_0x1c5063['icon']=_0x30af47,_0x1c5063['withText']=!0x0,_0x1c5063['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1c5063['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x133e6d=>!_0x133e6d),_0x1c5063['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1c5063['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1c5063;}['_createDropdown'](){const _0x26b9d4=_0x17c2a6(this['locale'],_0xdd4b5),_0x4ab2ef=_0x26b9d4['panelView']['children'],_0x1cdf28=new _0x297fa8(this['locale']),_0x2e48b9=_0x26b9d4['bindTemplate'];_0x3ad376(_0x26b9d4,()=>this['items']['find'](_0x115051=>_0x115051['isVisible'])),_0x26b9d4['extendTemplate']({'attributes':{'class':[_0x2e48b9['if']('isVisible','ck-hidden',_0x330ba8=>!_0x330ba8)]}});const _0x13f516=(_0x4ed0a0,_0x31f3e3=-0x1)=>{const _0x2b69e7=new _0x321962(this['locale']);_0x2b69e7['children']['add'](_0x4ed0a0);const _0xb3fe5b=_0x31f3e3>-0x1?_0x31f3e3:_0x1cdf28['items']['length'];_0x1cdf28['items']['add'](_0x2b69e7,_0xb3fe5b);const _0x4b3911=Array['from'](this['items']);_0x26b9d4['unbind']('isEnabled','isVisible'),_0x26b9d4['bind']('isEnabled')['toMany'](_0x4b3911,'isEnabled',(..._0x471413)=>_0x471413['some'](_0x400789=>_0x400789)),_0x26b9d4['bind']('isVisible')['toMany'](_0x4b3911,'isVisible',(..._0xf94b9b)=>_0xf94b9b['some'](_0x40a04b=>_0x40a04b));};_0x26b9d4['panelPosition']='sw',_0x26b9d4['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x1a4168});for(const _0x46bf82 of this['items'])_0x13f516(_0x46bf82);return _0x4ab2ef['add'](_0x1cdf28),_0x26b9d4['listenTo'](this['items'],'add',(_0x3d43af,_0x502249,_0x920e6)=>{_0x13f516(_0x502249,_0x920e6);}),_0x26b9d4['listenTo'](this['items'],'remove',(_0x14c4d5,_0x2c469d,_0x44f904)=>{_0x1cdf28['items']['remove'](_0x44f904);}),_0x26b9d4;}['_attachActions'](_0x5d7bb5,_0x12e95e){const _0x4e5b81=_0x5d7bb5&&_0x5d7bb5['element'];_0x4e5b81&&(this['listenTo'](_0x4e5b81,'mouseenter',()=>this['actionIndicator']=_0x12e95e),this['listenTo'](_0x4e5b81,'focus',()=>this['actionIndicator']=_0x12e95e),this['listenTo'](_0x4e5b81,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4e5b81,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4557c9=super['_createCommentInputView']();return _0x4557c9['bind']('placeholder')['to'](this),_0x4557c9;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x56707f){const _0x3f2c6c=Dt(_0x56707f,0x1e),_0x1ff897=new MutationObserver(_0x1f5693=>{for(const _0x283f30 of _0x1f5693)('attributes'==_0x283f30['type']&&'class'==_0x283f30['attributeName']||'childList'==_0x283f30['type']||'characterData'==_0x283f30['type'])&&_0x3f2c6c();});return{'attach'(_0x3a2e6b){_0x1ff897['observe'](_0x3a2e6b,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x1ff897['disconnect'](),_0x3f2c6c['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x470f1e,_0x3ebf71){super(_0x470f1e),this['id']=_0x39c0ed(),this['focusTracker']=new _0x14dc48(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5e9356,_0x17a763)=>this['fire']('Esc',_0x17a763)),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'](_0x3ebf71),this['mainView']=_0x3ebf71;const _0x26120a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x26120a['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 _0x43d652=this['element']['clientHeight'];_0x43d652&&(this['height']=_0x43d652);}}class T extends/* #__PURE__ -- @preserve */
29
- _0x4e252d(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x17a51c,target:_0x2c8fc8,type:_0x4e2c7e,isVisible:_0x17f3d7=!0x0}){super(),this['view']=_0x17a51c,this['view']['element']||this['view']['render'](),this['_type']=_0x4e2c7e,this['_target']=_0x2c8fc8,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2d3dca([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x26f11b,_0x319b7a)=>{this['view']['focusTracker']['add'](_0x319b7a);}),this['focusableElements']['on']('remove',(_0x96f6ee,_0x35f111)=>{this['view']['focusTracker']['remove'](_0x35f111);}),this['set']('isVisible',_0x17f3d7);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x382450=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x382450),_0x382450;}get['targetRect'](){const _0x41d6f8=this['target'];if(null===_0x41d6f8)return null;if(_0x41d6f8 instanceof _0x4bd5bc)return _0x41d6f8;const _0x35765d=_0x41d6f8['filter'](_0x5e6d58=>function(_0x16ed66){const _0x47f240=_0x16ed66['offsetParent'];if(_0x47f240)return!0x0;const _0x2424b4=_0x16ed66['getClientRects']()['item'](0x0);return!!_0x2424b4;}(_0x5e6d58));return 0x0===_0x35765d['length']?null:new _0x4bd5bc(_0x35765d[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x587821){this['view']['isActive']=_0x587821,this['view']['mainView']['isActive']=_0x587821;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3b558f){if(!(null===_0x3b558f||_0x3b558f instanceof _0x4bd5bc||Array['isArray'](_0x3b558f)&&_0x3b558f['every'](_0x37715a=>fi(_0x37715a))))throw new _0xacf139('annotation-invalid-target',null,{'target':_0x3b558f});}['_getNormalizedTarget'](){const _0x1853b4='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x1853b4)?[_0x1853b4]:_0x1853b4;}}function fi(_0x3cff0a){return null!==_0x3cff0a&&'object'==typeof _0x3cff0a&&'nodeType'in _0x3cff0a&&0x1===_0x3cff0a['nodeType'];}class S extends _0x2d3dca{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x455f02=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x14dc48(),this['_focusTracker']['on']('change:isFocused',(_0x2a7b0e,_0x485d16,_0x525a61)=>{_0x525a61||this['fire']('blur');});for(const _0x35aced of _0x455f02)this['add'](_0x35aced);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x58529d){if(this['has'](_0x58529d))throw new _0xacf139('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x58529d['innerView'],_0x58529d),this['_viewToAnnotation']['set'](_0x58529d['view'],_0x58529d);for(const _0x5bc4fe of _0x58529d['focusableElements'])this['_focusTracker']['add'](_0x5bc4fe);this['listenTo'](_0x58529d['focusableElements'],'add',(_0x3b5845,_0x327d99)=>{this['_focusTracker']['add'](_0x327d99);}),this['listenTo'](_0x58529d['focusableElements'],'remove',(_0x40b9b2,_0x2f6751)=>{this['_focusTracker']['remove'](_0x2f6751);}),this['listenTo'](_0x58529d['view']['focusTracker'],'change:isFocused',(_0x3420f8,_0x69a062,_0x5e73a5)=>{_0x5e73a5&&this['fire']('focus',_0x58529d);}),_0x58529d['updateTargetRect']();const _0x511237=this['_getOrderInContent'](_0x58529d['view']['targetRect']);return super['add'](_0x58529d,_0x511237);}['remove'](_0x2c029c){if(!this['has'](_0x2c029c))throw new _0xacf139('annotationcollection-not-existing-item',null);this['stopListening'](_0x2c029c['view']['focusTracker']),this['stopListening'](_0x2c029c['focusableElements']);for(const _0x53b0db of _0x2c029c['focusableElements'])this['_focusTracker']['remove'](_0x53b0db);return this['_viewToAnnotation']['delete'](_0x2c029c['view']),this['_innerViewToAnnotation']['delete'](_0x2c029c['innerView']),super['remove'](_0x2c029c);}['getByInnerView'](_0x31475a){return this['_innerViewToAnnotation']['get'](_0x31475a);}['getByView'](_0x4d5ead){return this['_viewToAnnotation']['get'](_0x4d5ead);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x6083bc of this)_0x6083bc['updateTargetRect']();this['_sort']();}['_sort'](){const _0x394ab6=Array['from'](this)['sort']((_0x47892f,_0x2118da)=>w(_0x47892f['view']['targetRect'],_0x2118da['view']['targetRect']));for(let _0x1174e1=_0x394ab6['length']-0x1;_0x1174e1>0x0;_0x1174e1--){const _0x457e27=_0x394ab6[_0x1174e1];_0x1174e1!==this['getIndex'](_0x457e27)&&(this['remove'](_0x457e27),this['add'](_0x457e27));}}['_getOrderInContent'](_0x530c41){let _0x23df85=0x0;if(!_0x530c41)return this['length'];for(const _0x5dbcb6 of this){const _0x219253=_0x5dbcb6['view']['targetRect'];if(_0x219253){if(w(_0x530c41,_0x219253)<0x0)return _0x23df85;_0x23df85++;}}return _0x23df85;}}function v({source:_0x2024ef,target:_0x5ac603,filter:_0x515267}){for(const _0x3f7f64 of _0x2024ef)_0x515267(_0x3f7f64)&&_0x5ac603['add'](_0x3f7f64);_0x5ac603['listenTo'](_0x2024ef,'add',(_0x3396a1,_0x1572f8)=>{_0x515267(_0x1572f8)&&_0x5ac603['add'](_0x1572f8);}),_0x5ac603['listenTo'](_0x2024ef,'remove',(_0x57c4be,_0x3b5a72)=>{_0x5ac603['has'](_0x3b5a72)&&_0x5ac603['remove'](_0x3b5a72);});}function w(_0x5e78a2,_0x43e3f3){if(null===_0x5e78a2&&null===_0x43e3f3)return 0x0;if(null===_0x5e78a2)return-0x1;if(null===_0x43e3f3)return 0x1;const _0x15d6a1=_0x5e78a2['top']-_0x43e3f3['top'];return 0x0==_0x15d6a1?_0x5e78a2['left']-_0x43e3f3['left']:_0x15d6a1;}class y extends _0x41aa84{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d3b62){if(super(_0x1d3b62),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1d3b62 instanceof _0x1d84e6){const _0x9aa682=_0x1d3b62['locale'];_0x1d3b62['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x9aa682,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x9aa682,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x9aa682,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x9aa682,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x9aa682,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x9aa682,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x9aa682,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4a331f){this['collection']['add'](_0x4a331f);}['remove'](_0x1bdbac){this['collection']['remove'](_0x1bdbac),_0x1bdbac['destroy']();}['refreshVisibility'](){for(const _0x5d8d7d of this['collection'])_0x5d8d7d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xc9e6ce){return this['collection']['getByInnerView'](_0xc9e6ce);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x92d02e of this['collection'])_0x92d02e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x149090){this['fire']('_activateAnnotation',_0x149090);}['createAnnotation'](_0x2c3f8c){return new T(_0x2c3f8c);}['createAnnotationView'](_0x382ffd,_0x160cf7){return new E(_0x382ffd,_0x160cf7);}['_addActiveAnnotation'](_0xa6cb84){const _0x18777a=new Set(this['activeAnnotations']);_0x18777a['add'](_0xa6cb84),this['activeAnnotations']=_0x18777a;}['_removeActiveAnnotation'](_0x73f455){const _0x5b5075=new Set(this['activeAnnotations']);_0x5b5075['delete'](_0x73f455),this['activeAnnotations']=_0x5b5075;}['_bindAnnotationsToVisibleAnnotations'](){const _0x490c5b=this['collection'],_0xaeba63=this['_visibleAnnotations'];function _0xea9b86(_0x17752c){const _0x43951b=_0x17752c['source'];_0x43951b['isVisible']&&!_0xaeba63['has'](_0x43951b)?_0xaeba63['add'](_0x43951b):!_0x43951b['isVisible']&&_0xaeba63['has'](_0x43951b)&&_0xaeba63['remove'](_0x43951b),_0x43951b['view']['focusTracker']['remove'](_0x43951b['view']['element']),_0x43951b['view']['focusTracker']['add'](_0x43951b['view']['element']);}this['listenTo'](_0x490c5b,'add',(_0x470811,_0x5e227b)=>{_0x5e227b['isVisible']&&_0xaeba63['add'](_0x5e227b),this['listenTo'](_0x5e227b,'change:isVisible',_0xea9b86);}),this['listenTo'](_0x490c5b,'remove',(_0x14348d,_0x24900c)=>{_0xaeba63['has'](_0x24900c)&&_0xaeba63['remove'](_0x24900c),this['stopListening'](_0x24900c,'change:isVisible',_0xea9b86);});}['_setupEnterAnnotationKeystroke'](){const _0x169c6a=_0x37a3a9=>{_0x37a3a9['on']('ready',()=>{_0x37a3a9['keystrokes']['set'](_0x535663,(_0x3bb39f,_0x468c13)=>{const _0x1a8e01=_0x1c751c(this['activeAnnotations']['values']());_0x1a8e01&&(_0x1a8e01['view']['focus'](),_0x468c13());});});};this['context']instanceof _0x1d84e6?_0x169c6a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1ef5db,_0x47fd7f)=>{_0x169c6a(_0x47fd7f);});}['_setupEscapeAnnotationHandling'](){const _0x4b3c6c=_0x4f1f39=>{const _0x21f8a8=_0x4f1f39['source'],_0x4059dd=[];let _0xdd7d00;if(Array['isArray'](_0x21f8a8['target'])){_0xdd7d00=_0x21f8a8['target'][0x0],this['context']instanceof _0x1d84e6?_0x4059dd['push'](this['context']):this['context']['editors']&&_0x4059dd['push'](...this['context']['editors']);for(const _0x269ea6 of _0x4059dd)for(const _0x51f26b of _0x269ea6['editing']['view']['domRoots']['values']())if(_0x51f26b['contains'](_0xdd7d00))return void _0x269ea6['editing']['view']['focus']();_0xdd7d00['focus']();}};this['listenTo'](this['collection'],'add',(_0x4fd8c4,_0x1ff91b)=>{this['listenTo'](_0x1ff91b,'escape',_0x4b3c6c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2cadf9,_0x75d933)=>{this['stopListening'](_0x75d933,'escape',_0x4b3c6c);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x41aa84{['_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(_0x188add){super(_0x188add),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xc346db=this['context']['config'];_0xc346db['define']('comments.maxCommentsWhenCollapsed',0x2),_0xc346db['define']('comments.maxThreadTotalWeight',0x1f4),_0xc346db['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xc346db['define']('comments.CommentThreadView',gt),_0xc346db['define']('comments.CommentView',Tt),_0xc346db['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x35c263=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x586535,_0x371b31)=>this['_addCommentThread'](_0x371b31)),this['on']('submitCommentThread',(_0xc8338f,_0x5d598c)=>this['_submitCommentThread'](_0x5d598c)),this['on']('resolveCommentThread',(_0x3f5ea6,_0x3f9450)=>this['_resolveCommentThread'](_0x3f9450)),this['on']('resolveCommentThread',(_0x52e9c7,_0x479528)=>this['_updateActiveAnnotation'](_0x479528),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x241a38,_0x3aee96)=>this['_reopenCommentThread'](_0x3aee96)),this['on']('reopenCommentThread',(_0x2b88c7,_0x2dbaaf)=>this['_updateActiveAnnotation'](_0x2dbaaf),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2cdcdd,_0x181c9f)=>this['_removeCommentThread'](_0x181c9f)),this['on']('updateCommentThread',(_0x252557,_0x143f21)=>this['_updateCommentThread'](_0x143f21)),this['on']('updateCommentThread',(_0x198f83,_0x3ad960)=>this['_updateActiveAnnotation'](_0x3ad960),{'priority':'lowest'}),this['on']('addComment',(_0xaf6121,_0x53d718)=>this['_addComment'](_0x53d718)),this['on']('updateComment',(_0x582a63,_0x3c4f10)=>this['_updateComment'](_0x3c4f10)),this['on']('removeComment',(_0x2fc808,_0x33c8a6)=>this['_removeComment'](_0x33c8a6)),this['on']('addComment',(_0x274bd5,{threadId:_0x287792,isFromAdapter:_0x46d0c4})=>{if(_0x46d0c4)return;const _0x9661e2=this['getCommentThread'](_0x287792),_0x2c8ce6=_0x9661e2&&this['_threadToController']['get'](_0x9661e2);_0x2c8ce6&&_0x2c8ce6['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x35c263,'change:activeAnnotations',(_0x4d0492,_0x4e4505,_0x57e2a8)=>{const _0x461b9f=Array['from'](_0x57e2a8)['map'](_0x5ecb7d=>this['_viewToController']['get'](_0x5ecb7d['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x461b9f?_0x461b9f['model']:null;});}set['adapter'](_0xa4816a){if(this['_adapter'])throw new _0xacf139('commentsrepository-adapter-already-set');this['_adapter']=_0xa4816a;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xeb941c=_t,threadId:_0x350256=_0x39c0ed(),comments:_0x54874e=[],unlinkedAt:_0x30b568=null,resolvedAt:_0x231dc5=null,resolvedBy:_0x5f2e14=null,target:_0x56747b=null,context:_0x2541be=null,attributes:_0x690cde={},isResolvable:_0x6990a5=!0x0,isSubmitted:_0x46b104=!0x1,isFromAdapter:_0x1a92f5=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xeb941c),{'channelId':_0xeb941c,'threadId':_0x350256,'comments':_0x54874e,'unlinkedAt':_0x30b568,'resolvedAt':_0x231dc5,'resolvedBy':_0x5f2e14,'target':_0x56747b,'context':_0x2541be,'attributes':_0x690cde,'isFromAdapter':_0x1a92f5,'isResolvable':_0x6990a5,'isSubmitted':_0x46b104}),this['getCommentThread'](_0x350256);}['openNewCommentThread']({channelId:_0x2c729b=_t,threadId:_0x410992=_0x39c0ed(),target:_0x346114,context:_0x508e37=null,isResolvable:_0x1c092a=!0x0}){if(this['_readOnlyChannels']['has'](_0x2c729b)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x346114)throw new _0xacf139('commentsrepository-missing-target');const _0x58d6aa=this['addCommentThread']({'channelId':_0x2c729b,'threadId':_0x410992,'target':_0x346114,'context':_0x508e37,'isResolvable':_0x1c092a});if(!_0x58d6aa)return null;const _0x4da676=this['_threadToController']['get'](_0x58d6aa),_0x30561f=_0x4da676['view']['commentThreadInputView']['commentInputView'],_0x473161=this['context']['plugins']['get'](y),_0x10ff80=_0x473161['getByInnerView'](_0x4da676['view']);return _0x473161['activate'](_0x10ff80),_0x30561f['once']('editorReady',()=>_0x30561f['focus']()),_0x58d6aa;}['hasCommentThread'](_0x3f0868){if('string'!=typeof _0x3f0868)throw new _0xacf139('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3f0868);}['updateCommentThread']({channelId:_0x3ff843=_t,threadId:_0x261692,context:_0x445317,unlinkedAt:_0x45b9ca,attributes:_0x213e56,isFromAdapter:_0x495a4b=!0x1}){return this['fire'](Nt('updateCommentThread',_0x3ff843),{'channelId':_0x3ff843,'threadId':_0x261692,'context':_0x445317,'unlinkedAt':_0x45b9ca,'attributes':_0x213e56,'isFromAdapter':_0x495a4b}),this['getCommentThread'](_0x261692);}['getCommentThread'](_0x45ec98){if('string'!=typeof _0x45ec98)throw new _0xacf139('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x45ec98);}['fetchCommentThread']({channelId:_0x4e8242,threadId:_0x446fd4}={}){const _0x501a49=this['getCommentThread'](_0x446fd4);if(_0x501a49)return Promise['resolve'](_0x501a49);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xacf139('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4e8242,'threadId':_0x446fd4})['then'](_0x31a21d=>this['hasCommentThread'](_0x446fd4)?this['getCommentThread'](_0x446fd4):_0x31a21d?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4e8242},_0x31a21d)):void 0x0)['catch'](_0x1996bb=>{throw console['error'](_0x1996bb),new _0xacf139('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1c78cb,skipNotAttached:_0x3289b3=!0x1,skipEmpty:_0x4de747=!0x1,toJSON:_0x577259=!0x1}={}){const _0x3c065d=[];for(const _0x3429a2 of this['_threads']['values']())_0x1c78cb&&_0x3429a2['channelId']!==_0x1c78cb||_0x3289b3&&!_0x3429a2['isAttached']||_0x4de747&&0x0===_0x3429a2['length']||_0x3c065d['push'](_0x3429a2);return _0x577259?_0x3c065d['map'](_0x354538=>_0x354538['toJSON']()):_0x3c065d;}['getAnnotationForCommentThread'](_0x4c09ca){const _0x1569e6=this['_threadToController']['get'](_0x4c09ca);if(!_0x1569e6)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x1569e6['view'])||null;}['getCommentThreadForAnnotation'](_0x2d8835){const _0x460a4c=this['_viewToController']['get'](_0x2d8835['innerView']);return _0x460a4c?_0x460a4c['model']:null;}['setActiveCommentThread'](_0x351e05){const _0x130e5d=this['context']['plugins']['get'](y);if(!_0x351e05)return void(this['activeCommentThread']&&_0x130e5d['deactivateAll']());const _0x23ec37=this['getCommentThread'](_0x351e05);if(!_0x23ec37)throw new _0xacf139('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x351e05});if(!this['_threadToController']['has'](_0x23ec37))throw new _0xacf139('commentsrepository-active-not-attached',null,{'threadId':_0x351e05});const _0x788ac0=_0x130e5d['getByInnerView'](this['_threadToController']['get'](_0x23ec37)['view']);_0x130e5d['activate'](_0x788ac0);}['switchReadOnly'](_0x4909e3,_0xc96228){_0x4909e3?this['_readOnlyChannels']['add'](_0xc96228):this['_readOnlyChannels']['delete'](_0xc96228),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3f6007){return this['_readOnlyChannels']['has'](_0x3f6007)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1dbc18,_0x28bc58){return new vt(_0x1dbc18,_0x28bc58);}['setPermissions'](_0x3f9b78,_0x2dc736=_t){this['_permissions']['set'](_0x2dc736,_0x3f9b78),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3d010=_t){return this['_permissions']['has'](_0x3d010)?this['_permissions']['get'](_0x3d010):bt;}['_addCommentThread']({channelId:_0x2d872b,threadId:_0x9d8d67,comments:_0x501a79,unlinkedAt:_0x24e850,resolvedAt:_0x229b84,resolvedBy:_0x43965e,target:_0x755e2e,context:_0x39edba,attributes:_0x3833cc,isFromAdapter:_0x39e9c3,isResolvable:_0x1d257d,isSubmitted:_0x2db777}){if('string'!=typeof _0x9d8d67)throw new _0xacf139('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x9d8d67});if(this['hasCommentThread'](_0x9d8d67))throw new _0xacf139('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x9d8d67});const _0x5789ca=new pi(this,{'channelId':_0x2d872b,'id':_0x9d8d67,'context':_0x39edba,'attributes':_0x3833cc,'unlinkedAt':_0x24e850,'resolvedAt':_0x229b84,'resolvedBy':_0x43965e?this['context']['plugins']['get'](it)['getUser'](_0x43965e):null,'isResolvable':_0x1d257d,'isSubmitted':_0x2db777||_0x39e9c3});this['_threads']['set'](_0x9d8d67,_0x5789ca);for(const _0x5e14e5 of _0x501a79)_0x5789ca['_add'](this['_createNewComment']({'threadId':_0x9d8d67,..._0x5e14e5}));return _0x755e2e&&_0x5789ca['attachTo'](_0x755e2e),_0x39e9c3||!_0x5789ca['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2d872b,'threadId':_0x9d8d67});}['_submitCommentThread']({channelId:_0x8039d4,threadId:_0x3fc864}){if(!this['hasCommentThread'](_0x3fc864))throw new _0xacf139('commentsrepository-missing-comment-thread',this);const _0x3e5f67=this['getCommentThread'](_0x3fc864);if(_0x3e5f67['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x22022c,comments:_0x143881,resolvedAt:_0x5beed6,resolvedBy:_0x599a6c,context:_0x56a2f4,attributes:_0x327dba}=_0x3e5f67,_0x21510b=this['context']['plugins']['get']('PendingActions'),_0x3c3aff=_0x21510b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x8039d4,'threadId':_0x22022c,'comments':_0x143881['map'](_0x2ba90c=>_0x2ba90c['toJSON']()),'resolvedAt':_0x5beed6,'resolvedBy':_0x599a6c?_0x599a6c['id']:_0x599a6c,'context':_0x56a2f4,'attributes':_0x327dba})['then'](({comments:_0x717568})=>{_0x21510b['remove'](_0x3c3aff);for(const _0x34d9b4 of _0x717568)this['_updateComment']({'channelId':_0x8039d4,'threadId':_0x3fc864,'commentId':_0x34d9b4['commentId'],'createdAt':_0x34d9b4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x429acb=>{throw console['error'](_0x429acb),new _0xacf139('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5723f1,target:_0x30de17}){const _0x8f4964=this['getCommentThread'](_0x5723f1);if(!_0x8f4964)throw new _0xacf139('commentsrepository-attach-missing-comment-thread',this);const _0x3f130d=this['context']['plugins']['get']('PendingActions'),_0x2013a4=this['context']['plugins']['get'](y),_0x25e1c4=this['_createCommentThreadView'](_0x8f4964),_0x49d208=new vt(_0x8f4964,_0x25e1c4);let _0x24dd69=null;_0x25e1c4['on']('change:isDirty',(_0x4968e5,_0x3a8009,_0x1b67b2)=>{_0x1b67b2?_0x24dd69=_0x3f130d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x24dd69&&(_0x3f130d['remove'](_0x24dd69),_0x24dd69=null);}),this['_threadToController']['set'](_0x8f4964,_0x49d208),this['_viewToController']['set'](_0x25e1c4,_0x49d208);const _0x4bef7d=new E(this['context']['locale'],_0x25e1c4);_0x4bef7d['bind']('length')['to'](_0x25e1c4),_0x4bef7d['bind']('isDirty')['to'](_0x25e1c4,'isDirty',_0x25e1c4,'length',(_0x3c617a,_0x3b851e)=>_0x3c617a||!_0x3b851e),_0x4bef7d['bind']('isActive')['to'](_0x25e1c4),_0x4bef7d['type']='comment';const _0x359f2c=new T({'view':_0x4bef7d,'target':_0x30de17,'type':'comment','isVisible':!_0x8f4964['archivedAt']&&!!('function'==typeof _0x30de17?_0x30de17():_0x30de17)});return _0x25e1c4['on']('escape',()=>{_0x359f2c['fire']('escape');}),this['_bindAnnotationToEditors'](_0x25e1c4,_0x359f2c),_0x2013a4['add'](_0x359f2c),_0x359f2c;}['_bindAnnotationToEditors'](_0x90a5e,_0x54e7a3){this['listenTo'](_0x90a5e,'editorReady',(_0x51f304,_0x42cb43)=>{const _0x38d5a8=_0x42cb43['ui']['view']['body']['bodyCollectionContainer'];_0x54e7a3['focusableElements']['add'](_0x38d5a8),this['context']instanceof _0x1d84e6&&this['context']['ui']['focusTracker']['add'](_0x38d5a8);},{'priority':'highest'}),this['listenTo'](_0x90a5e,'editorDestroyed',(_0x40f360,_0x14d2b8)=>{const _0x4175d8=_0x14d2b8['ui']['view']['body']['bodyCollectionContainer'];_0x54e7a3['focusableElements']['has'](_0x4175d8)&&_0x54e7a3['focusableElements']['remove'](_0x4175d8),this['context']instanceof _0x1d84e6&&this['context']['ui']['focusTracker']['remove'](_0x4175d8);});}['_unbindEditors'](_0x4bb7ce){this['stopListening'](_0x4bb7ce,'editorReady'),this['stopListening'](_0x4bb7ce,'editorDestroyed');}['_createCommentThreadView'](_0x60d15c){const _0x5b79ad=this['context']['plugins']['get'](it),{config:_0x11ab57,locale:_0x58afca}=this['context'],_0x4f2daa=pt(_0x11ab57['get']('locale'),_0x58afca);return new(0x0,(_0x11ab57['get']('comments'))['CommentThreadView'])(_0x58afca,_0x60d15c,_0x5b79ad['me'],{'editorConfig':{..._0x11ab57['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x11ab57['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x11ab57['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x11ab57['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x11ab57['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4f2daa,'CommentView':_0x11ab57['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4e4fac,channelId:_0x17a61e,resolvedAt:_0x994486,resolvedBy:_0x3f7c93,isFromAdapter:_0x33a490}){if(!this['hasCommentThread'](_0x4e4fac))throw new _0xacf139('commentsrepository-missing-comment-thread',null,{'threadId':_0x4e4fac});const _0x3e756f=this['getCommentThread'](_0x4e4fac);if(_0x3e756f['isResolved'])throw new _0xacf139('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4e4fac});const _0x5a5b27=this['context']['plugins']['get'](it);if(_0x3e756f['resolvedBy']=_0x5a5b27['getUser'](_0x3f7c93),_0x3e756f['resolvedAt']=_0x994486,_0x33a490||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2d33c9=this['context']['plugins']['get']('PendingActions'),_0x25868a=_0x2d33c9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x17a61e,'threadId':_0x4e4fac})['then'](({resolvedAt:_0x273ff4,resolvedBy:_0x31e864})=>{_0x2d33c9['remove'](_0x25868a),_0x3e756f['resolvedBy']['id']!==_0x31e864&&(_0x3e756f['resolvedBy']=_0x5a5b27['getUser'](_0x31e864)),_0x3e756f['resolvedAt']=_0x273ff4;})['catch'](_0x34b275=>{throw console['error'](_0x34b275),new _0xacf139('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x120a09,channelId:_0x580575,isFromAdapter:_0x3b901a}){if(!this['hasCommentThread'](_0x120a09))throw new _0xacf139('commentsrepository-missing-comment-thread',null,{'threadId':_0x120a09});const _0x29d3dd=this['getCommentThread'](_0x120a09);if(!_0x29d3dd['isResolved'])throw new _0xacf139('commentsrepository-reopen-comment-thread',null,{'threadId':_0x120a09});if(_0x29d3dd['resolvedBy']=null,_0x29d3dd['resolvedAt']=null,_0x3b901a||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x17af7c=this['context']['plugins']['get']('PendingActions'),_0x2b8208=_0x17af7c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x580575,'threadId':_0x120a09})['then'](()=>_0x17af7c['remove'](_0x2b8208))['catch'](_0x45dbae=>{throw console['error'](_0x45dbae),new _0xacf139('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x43d455,isFromAdapter:_0x3a4945}){const _0x5526bc=this['getCommentThread'](_0x43d455);if(!_0x5526bc)throw new _0xacf139('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x43d455),this['_threads']['delete'](_0x43d455),!_0x5526bc['isSubmitted']||_0x3a4945||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x528a4e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x6fd533}=_0x5526bc,_0x2a91a6=_0x528a4e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x6fd533,'threadId':_0x43d455})['then'](()=>_0x528a4e['remove'](_0x2a91a6))['catch'](_0x58cd2e=>{throw console['error'](_0x58cd2e),new _0xacf139('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4522c3,unlinkedAt:_0x4ceca6,context:_0x3025e3,attributes:_0xd0e12a,isFromAdapter:_0x2d38e7}){if('string'!=typeof _0x4522c3)throw new _0xacf139('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4522c3});if(!this['hasCommentThread'](_0x4522c3))throw new _0xacf139('commentsrepository-missing-comment-thread',null,{'threadId':_0x4522c3});const _0x533fca=this['getCommentThread'](_0x4522c3);let _0x38820c=!0x1;if(void 0x0!==_0x3025e3&&_0x533fca['context']!==_0x3025e3&&(_0x533fca['context']=_0x3025e3,_0x38820c=!0x0),void 0x0!==_0x4ceca6&&_0x533fca['unlinkedAt']!==_0x4ceca6&&(_0x533fca['unlinkedAt']=_0x4ceca6,_0x38820c=!0x0),_0xd0e12a&&!At(_0xd0e12a,_0x533fca['attributes'])&&(_0x533fca['attributes']=_0xd0e12a,_0x38820c=!0x0),!_0x38820c)return Promise['resolve']();if(!_0x533fca['isSubmitted']||_0x2d38e7||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xb094b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x160308}=_0x533fca,_0x166814=_0xb094b2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x160308,'threadId':_0x4522c3,'context':_0x3025e3,'unlinkedAt':_0x4ceca6,'attributes':_0xd0e12a})['then'](()=>_0xb094b2['remove'](_0x166814))['catch'](_0x4fd31f=>{throw console['error'](_0x4fd31f),new _0xacf139('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2ed815){const _0x37e268=this['context']['plugins']['get'](y),_0xa776a0=this['getCommentThread'](_0x2ed815);if(_0xa776a0['_isAttached']=!0x1,this['_threadToController']['has'](_0xa776a0)){const _0x569995=this['_threadToController']['get'](_0xa776a0),_0x5982be=_0x569995['view'],_0x112646=_0x37e268['getByInnerView'](_0x5982be);this['_threadToController']['delete'](_0xa776a0),this['_viewToController']['delete'](_0x5982be),_0x112646&&_0x37e268['remove'](_0x112646),_0x569995['destroy'](),_0x5982be['destroy']()['then'](()=>{this['_unbindEditors'](_0x5982be);});}}['_updateActiveAnnotation']({threadId:_0x5176ad,resolvedAt:_0x419938,unlinkedAt:_0xa36495}){const _0x5e9d66=!!_0x419938,_0x228b76=this['context']['plugins']['get'](y),_0x30ccdc=this['getCommentThread'](_0x5176ad);if(this['_threadToController']['has'](_0x30ccdc)){const _0x994fc4=this['_threadToController']['get'](_0x30ccdc)['view'],_0x58ac73=_0x228b76['getByInnerView'](_0x994fc4);_0x58ac73&&(_0x5e9d66&&_0x228b76['_removeActiveAnnotation'](_0x58ac73),_0xa36495?_0x58ac73['isVisible']=!0x1:_0x58ac73['refreshVisibility']());}}['_getExternalAuthor'](_0x3f6797){const _0x16474e=this['context']['plugins']['get'](it),_0x1f7453=It('external:'+_0x3f6797),_0x526393=_0x16474e['getUser'](_0x1f7453);return _0x526393||_0x16474e['addUser']({'id':_0x1f7453,'name':_0x3f6797});}['_createNewComment']({threadId:_0x2fb81b,commentId:_0x4a2b4b=_0x39c0ed(),content:_0x2931d6,authorId:_0x42d1c4,createdAt:_0x3146b7,attributes:_0x194afb}){if('string'!=typeof _0x4a2b4b)throw new _0xacf139('commentsrepository-invalid-commentid');if('string'!=typeof _0x42d1c4)throw new _0xacf139('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2931d6||!_0x2931d6['trim']())throw new _0xacf139('commentsrepository-invalid-comment-content');const _0x37c820=this['context']['plugins']['get'](it)['getUser'](_0x42d1c4);if(!_0x37c820)throw new _0xacf139('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x42d1c4});let _0x3b409c=null,_0x45e58a=_0x3146b7;return _0x194afb?.['@external']&&(_0x3b409c=this['_getExternalAuthor'](_0x194afb['@external']['authorName']),_0x45e58a=new Date(_0x194afb['@external']['createdAt'])),new wi(this,{'threadId':_0x2fb81b,'id':_0x4a2b4b,'author':_0x3b409c||_0x37c820,'creator':_0x37c820,'content':_0x2931d6,'createdAt':_0x3146b7,'authoredAt':_0x45e58a,'attributes':_0x194afb});}['_addComment'](_0x594a14){let {threadId:_0x4f8383,content:_0x221a6c,attributes:_0x5f5c20,isFromAdapter:_0x2ff626}=_0x594a14;const _0x20f4d3=this['getCommentThread'](_0x594a14['threadId']);if(!_0x20f4d3)throw new _0xacf139('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1add7a=this['_createNewComment'](_0x594a14),{id:_0x251c29}=_0x1add7a;if(_0x20f4d3['_add'](_0x1add7a),_0x2ff626||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x20f4d3['isSubmitted'])return Promise['resolve']();const _0x321f19=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2ee7cd}=_0x20f4d3,_0x367e97=_0x321f19['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5f5c20||(_0x5f5c20={}),this['adapter']['addComment']({'channelId':_0x2ee7cd,'threadId':_0x4f8383,'commentId':_0x251c29,'content':_0x221a6c,'attributes':_0x5f5c20})['then'](_0x19d7d6=>{_0x321f19['remove'](_0x367e97),_0x19d7d6&&this['_updateComment']({'channelId':_0x2ee7cd,'threadId':_0x4f8383,'commentId':_0x251c29,'createdAt':_0x19d7d6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3b7842=>{throw console['error'](_0x3b7842),new _0xacf139('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x599611,commentId:_0x4c0ae6,content:_0x1e9594,createdAt:_0x941994,attributes:_0x141882,isFromAdapter:_0x55f704}){if(void 0x0!==_0x1e9594&&('string'!=typeof _0x1e9594||!_0x1e9594['trim']()['length']))throw new _0xacf139('commentsrepository-update-comment-invalid-content');const _0x2a9d28=this['getCommentThread'](_0x599611),_0x584034=_0x2a9d28['getComment'](_0x4c0ae6);if(!_0x584034)throw new _0xacf139('commentsrepository-update-missing-comment',this);let _0x51677f=!0x1;if(_0x1e9594&&_0x1e9594!==_0x584034['content']&&(_0x584034['isEditable']||_0x55f704)&&(_0x584034['content']=_0x1e9594,_0x51677f=!0x0),_0x941994&&_0x941994!==_0x584034['createdAt']&&(_0x584034['createdAt']=_0x941994,_0x584034['attributes']&&_0x584034['attributes']['@external']||(_0x584034['authoredAt']=_0x941994),_0x51677f=!0x0),_0x141882&&!At(_0x141882,_0x584034['attributes'])&&(_0x584034['attributes']=_0x141882,_0x51677f=!0x0),!_0x51677f)return Promise['resolve']();if(_0x2a9d28['fire']('commentUpdated'),_0x55f704||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4c09f7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x226a63}=this['getCommentThread'](_0x584034['threadId']),_0x5aeed8=_0x4c09f7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x226a63,'threadId':_0x599611,'commentId':_0x4c0ae6,'content':_0x1e9594,'attributes':_0x141882})['then'](()=>_0x4c09f7['remove'](_0x5aeed8))['catch'](_0x32ccc7=>{throw console['error'](_0x32ccc7),new _0xacf139('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x20241f,commentId:_0x114b27,isFromAdapter:_0x25ddc3}){const _0x99f155=this['getCommentThread'](_0x20241f),_0x1f7137=_0x99f155['getComment'](_0x114b27);if(!_0x1f7137)throw new _0xacf139('commentsrepository-remove-missing-comment',this);if(_0x99f155['_remove'](_0x1f7137),_0x25ddc3||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xab2920=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7b2c01}=_0x99f155,_0x4eb11b=_0xab2920['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x7b2c01,'threadId':_0x20241f,'commentId':_0x114b27})['then'](()=>_0xab2920['remove'](_0x4eb11b))['catch'](_0x1ceb3b=>{throw console['error'](_0x1ceb3b),new _0xacf139('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0x4e252d(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x2de6d2,_0xd32b8c){super();const _0x2cfc53=_0xd32b8c['isResolvable'];this['channelId']=_0xd32b8c['channelId'],this['id']=_0xd32b8c['id'],this['comments']=new _0x2d3dca(),this['_repository']=_0x2de6d2,this['_isAttached']=!0x1,this['_isSubmitted']=_0xd32b8c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2de6d2,'_permissions',_0x2de6d2,'_readOnlyChannels',()=>_0x2de6d2['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2de6d2,'_permissions',()=>_0x2de6d2['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2de6d2,'_permissions',()=>{const _0x562004=_0x2de6d2['getPermissions'](this['channelId']);return _0x562004['write']||_0x562004['admin'];}),this['bind']('isResolvable')['to'](_0x2de6d2,'_permissions',()=>_0x2cfc53&&_0x2de6d2['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xd32b8c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x3f7443,_0x11788e)=>_0x3f7443?_0x11788e?_0x3f7443<_0x11788e?_0x3f7443:_0x11788e:_0x3f7443:_0x11788e),this['set']('unlinkedAt',_0xd32b8c['unlinkedAt']||null),this['set']('resolvedAt',_0xd32b8c['resolvedAt']||null),this['set']('resolvedBy',_0xd32b8c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1af463=>!!_0x1af463),this['set']('attributes',_0xd32b8c['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2ddff1,_0x8f9afe)=>_0x2ddff1+_0x8f9afe['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x1d858f,id:_0x2693fc}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x1d858f),{'channelId':_0x1d858f,'threadId':_0x2693fc});}['setUnlinkedAt'](_0x497de6){this['_update']({'unlinkedAt':_0x497de6});}['resolve']({resolvedAt:_0x16b2c4=new Date(),resolvedBy:_0xa0afab='',isFromAdapter:_0x5f2603=!0x1}={}){const _0x3d9fb1=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x2417c3,id:_0x2e522d}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x2417c3),{'channelId':_0x2417c3,'threadId':_0x2e522d,'resolvedAt':_0x16b2c4,'resolvedBy':_0xa0afab||_0x3d9fb1['id'],'isFromAdapter':_0x5f2603});}['reopen']({isFromAdapter:_0x1d605f=!0x1}={}){const {channelId:_0x3845d2,id:_0x201b16}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x3845d2),{'channelId':_0x3845d2,'threadId':_0x201b16,'isFromAdapter':_0x1d605f});}['setContext'](_0x196087){this['context']||this['_update']({'context':_0x196087});}['setAttribute'](_0xde9be9,_0xcb1dca){const _0x5a8f9b=wt(this['attributes']);yt(_0x5a8f9b,_0xde9be9,_0xcb1dca),this['_update']({'attributes':_0x5a8f9b});}['removeAttribute'](_0x344922){const _0x5f9dda=wt(this['attributes']);Ct(_0x5f9dda,_0x344922),this['_update']({'attributes':_0x5f9dda});}['remove']({isFromAdapter:_0x3bd8a6=!0x1}={}){const {channelId:_0x5dc7d4,id:_0x301ae6}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x5dc7d4),{'channelId':_0x5dc7d4,'threadId':_0x301ae6,'isFromAdapter':_0x3bd8a6});}['attachTo'](_0x2ecc94){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2ecc94});}['addComment'](_0x3761bf){const {channelId:_0x4192e9,id:_0x588908}=this;this['_repository']['fire'](Nt('addComment',_0x4192e9,_0x588908),Object['assign']({'channelId':_0x4192e9,'threadId':_0x588908},_0x3761bf));}['getComment'](_0x53a5f7){if('string'!=typeof _0x53a5f7)throw new _0xacf139('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x53a5f7});return this['comments']['get'](_0x53a5f7);}['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'](_0x108812=>_0x108812['toJSON']()),'attributes':this['attributes']};}['_add'](_0x408207){return this['listenTo'](_0x408207,'change:authoredAt',()=>{const _0x44b07d=this['_findOptimalIndex'](_0x408207),_0x2124ad=this['comments'];_0x44b07d-0x1!=_0x2124ad['getIndex'](_0x408207)&&_0x44b07d+0x1!=_0x2124ad['getIndex'](_0x408207)&&(this['_remove'](_0x408207),this['_add'](_0x408207));}),this['comments']['add'](_0x408207,this['_findOptimalIndex'](_0x408207));}['_update'](_0x4c4ac5){const {channelId:_0x161444,id:_0x27f3ae}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x161444),{..._0x4c4ac5,'channelId':_0x161444,'threadId':_0x27f3ae});}['_remove'](_0x2299bf){return this['stopListening'](_0x2299bf),_0x2299bf['destroy'](),this['comments']['remove'](_0x2299bf);}['_findOptimalIndex'](_0x81163c){const _0x217f6c=this['comments']['find'](_0x6d5da9=>new Date(_0x6d5da9['authoredAt'])['getTime']()>new Date(_0x81163c['authoredAt'])['getTime']());return _0x217f6c?this['comments']['getIndex'](_0x217f6c):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0x4e252d(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3c2afa,_0x58f22b){super();const _0x2753da=_0x3c2afa['context']['plugins']['get'](it)['me'],_0x2158e3=_0x3c2afa['getCommentThread'](_0x58f22b['threadId']),_0x507902=0x0===_0x2158e3['comments']['length'],_0x6ca58e=_0x2753da===_0x58f22b['author'];this['id']=_0x58f22b['id'],this['threadId']=_0x58f22b['threadId'],this['author']=_0x58f22b['author'],this['creator']=_0x58f22b['creator'],this['isExternal']=Boolean(_0x58f22b['attributes']&&_0x58f22b['attributes']['@external']),this['set']('content',_0x58f22b['content']),this['createdAt']=_0x58f22b['createdAt']||new Date(),this['set']('authoredAt',_0x58f22b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2158e3,'resolvedAt'),this['set']('attributes',_0x58f22b['attributes']||{}),this['bind']('isEditable')['to'](_0x3c2afa,'_permissions',()=>{const _0xdfa47f=_0x3c2afa['getPermissions'](_0x2158e3['channelId'])['write'],_0x40a995=_0x3c2afa['getPermissions'](_0x2158e3['channelId'])['modifyAll'];return _0x6ca58e&&_0xdfa47f||!_0x6ca58e&&_0x40a995;}),this['bind']('isRemovable')['to'](_0x2158e3,'isRemovable',_0x3c2afa,'_permissions',_0x7894e=>{const _0x16f22d=_0x3c2afa['getPermissions'](_0x2158e3['channelId'])['write'],_0x28a35d=_0x3c2afa['getPermissions'](_0x2158e3['channelId'])['modifyAll'];return _0x6ca58e&&_0x16f22d||_0x7894e&&_0x507902||!_0x6ca58e&&_0x28a35d&&!_0x507902;}),this['bind']('isReadOnly')['to'](_0x2158e3,'isReadOnly'),this['_repository']=_0x3c2afa;}get['weight'](){return Math['max'](function(_0x4cd743){const _0x3d7571=document['createElement']('div');return _0x3d7571['innerHTML']=_0x4cd743,_0x3d7571['textContent']['length'];}(this['content']),0xc8);}['update'](_0x181211){const {threadId:_0xe09ad2,id:_0x1b7329}=this;if(!this['_repository']['hasCommentThread'](_0xe09ad2))throw new _0xacf139('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x32caff}=this['_repository']['getCommentThread'](_0xe09ad2);this['_repository']['fire'](Nt('updateComment',_0x32caff,_0xe09ad2),{'channelId':_0x32caff,'threadId':_0xe09ad2,'commentId':_0x1b7329,..._0x181211});}['setAttribute'](_0x5cb5e4,_0x4237cc){const _0x4feb9e=wt(this['attributes']);yt(_0x4feb9e,_0x5cb5e4,_0x4237cc),this['update']({'attributes':_0x4feb9e});}['removeAttribute'](_0x5b1234){const _0x4dedfe=wt(this['attributes']);Ct(_0x4dedfe,_0x5b1234),this['update']({'attributes':_0x4dedfe});}['remove'](_0x4ce0b7={}){if(!_0x4ce0b7['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2b4a9f,id:_0x10e5ac}=this;if(!this['_repository']['hasCommentThread'](_0x2b4a9f))throw new _0xacf139('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x523d5c}=this['_repository']['getCommentThread'](_0x2b4a9f);this['_repository']['fire'](Nt('removeComment',_0x523d5c,_0x2b4a9f),{'channelId':_0x523d5c,'threadId':_0x2b4a9f,'commentId':_0x10e5ac,..._0x4ce0b7});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3d9d90,..._0x5a9c30){for(const _0xfe1806 of _0x5a9c30)void 0x0!==_0xfe1806&&(_0x3d9d90+=':'+String(_0xfe1806));return _0x3d9d90;}class ot extends _0x3ba471{constructor(_0x33abf3){super(_0x33abf3),this['set']('hasContent',!0x1);}['refresh'](){const _0x23db54=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x39e079 of _0x23db54['getRanges']())if(this['_hasContent'](_0x39e079))return void(this['hasContent']=!0x0);}['execute']({threadId:_0xfd0c15=_0x39c0ed(),ranges:_0x78f3d8,comment:_0x53c074}={}){const _0x2e6c6c=this['editor']['model'],_0x321783=_0x78f3d8??Array['from'](_0x2e6c6c['document']['selection']['getRanges']()),_0x3330df=[];for(const _0x17b871 of _0x321783)this['_hasContent'](_0x17b871)&&_0x3330df['push'](this['_trimToContent'](_0x17b871));if(!_0x3330df['length'])throw new _0xacf139('addcommentthreadcommand-incorrect-ranges',null);_0x53c074&&this['_createCommentThread'](_0xfd0c15,_0x53c074),this['_createMarkersFromRanges'](_0xfd0c15,_0x3330df,!!_0x53c074);}['_createMarkersFromRanges'](_0x29990b,_0x4346a5,_0x1239e1){this['editor']['model']['change'](_0x42ced9=>{for(const _0x40c2df of _0x4346a5){const _0x5edc3=_0x39c0ed()['substr'](0x1,0x5),_0x1dc798='comment:'+_0x29990b+':'+_0x5edc3;_0x42ced9['addMarker'](_0x1dc798,{'range':_0x40c2df,'usingOperation':_0x1239e1,'affectsData':_0x1239e1});}});}['_createCommentThread'](_0x25f72a,_0x4111ab){const _0x5ccbfe=this['editor']['plugins']['get']('CommentsRepository'),_0x160afe=this['editor']['config']['get']('collaboration.channelId'),_0x72ab11=this['editor']['plugins']['get']('Users')['me'];if(!_0x72ab11)throw new _0xacf139('addcommentthreadcommand-user-not-found',null);_0x5ccbfe['addCommentThread']({'threadId':_0x25f72a,'channelId':_0x160afe,'comments':[{'authorId':_0x72ab11['id'],'content':_0x4111ab,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3cb31b){for(const _0x284fa1 of _0x3cb31b['getItems']())if(this['_itemIsContent'](_0x284fa1))return!0x0;return!0x1;}['_itemIsContent'](_0x152836){return _0x152836['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x152836)&&!_0x152836['is']('element','tableCell');}['_trimToContent'](_0x3cfb00){const _0x3b5efb=_0x409c18=>!this['_itemIsContent'](_0x409c18['item']),_0xbc4c57=_0x3cfb00['start']['getLastMatchingPosition'](_0x3b5efb),_0xc624bf=_0x3cfb00['end']['getLastMatchingPosition'](_0x3b5efb,{'direction':'backward'});return this['editor']['model']['createRange'](_0xbc4c57,_0xc624bf);}}class b extends _0xd49eba{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x32d180){super(_0x32d180),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x56d7c7=this['editor'],_0x1a613f=_0x56d7c7['model']['document']['selection'],_0x5caa48=_0x2df535(()=>this['refreshSelectedViews'](),0xa);_0x1a613f['on']('change:range',(_0x1410a3,_0x36ead3)=>{_0x36ead3['directChange']&&(_0x5caa48['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x56d7c7['editing']['view']['document'],'change:isFocused',(_0x55f338,_0x9e6562,_0xbf7e6b)=>{_0xbf7e6b&&_0x5caa48();}),this['listenTo'](_0x56d7c7['ui']['focusTracker'],'change:isFocused',(_0x28ed35,_0x42defc,_0x313870)=>{_0x313870||this['fire']('blur',{'isAnnotationTracked':_0x213bff=>this['_editorAnnotationsData']['has'](_0x213bff['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4cb8fa){if(this['_editorAnnotations']['has'](_0x4cb8fa['view']))return;this['_editorAnnotations']['add'](_0x4cb8fa['view']),this['editor']['ui']['focusTracker']['add'](_0x4cb8fa['view']['element']);const _0x4aa1d5=this['editor']['plugins']['get'](y);this['listenTo'](_0x4aa1d5['collection'],'remove',(_0xd4fcf6,_0x52592e)=>{this['editor']['ui']['focusTracker']['remove'](_0x52592e['view']['element']),this['_editorAnnotations']['delete'](_0x52592e['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x18fb07){if('function'!=typeof _0x18fb07)throw new _0xacf139('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x18fb07);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x465288,annotations:_0x378040}){const _0x537914=[],_0x986ed2=this['editor']['model']['document']['selection'],_0x238a6f=Array['from'](_0x986ed2['getRanges']());for(const [_0x467c82,_0x11a66c]of this['_editorAnnotationsData']){const _0x1acb89=_0x9bee17(_0x11a66c),_0x8450a=_0x378040['getByInnerView'](_0x467c82);_0x1acb89&&_0x8450a&&_0x537914['push']({'annotation':_0x8450a,'range':_0x1acb89});}function _0x9bee17(_0x3d23bc){for(const _0x334725 of _0x3d23bc)for(const _0x577729 of _0x238a6f)if(_0x334725['containsRange'](_0x577729,!_0x986ed2['isCollapsed']))return _0x334725;return null;}return _0x537914['sort']((_0x5ad528,_0x46d844)=>{const _0x4650db=_0x5ad528['range'],_0x4943e4=_0x46d844['range'];if(!_0x4650db['isEqual'](_0x4943e4)){if(_0x4650db['containsRange'](_0x4943e4,!0x0))return 0x1;if(_0x4943e4['containsRange'](_0x4650db,!0x0))return-0x1;}return _0x5ad528['annotation']==_0x465288?-0x1:_0x46d844['annotation']==_0x465288?0x1:0x0;})['map'](_0x367246=>_0x367246['annotation']);}get['_editorAnnotationsData'](){const _0x3aad4a=new Map();for(const _0x2cea2e of Array['from'](this['_dataCollectors']))for(const [_0x481ccc,_0x3d696f]of _0x2cea2e())_0x3aad4a['set'](_0x481ccc,_0x3d696f);return _0x3aad4a;}}class st extends _0xd49eba{['afterInit'](){const _0x220480=this['editor'];if(!_0x220480['plugins']['has']('RestrictedEditingModeEditing'))return;_0x220480['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0xd49eba{constructor(_0x2367c4){super(_0x2367c4),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x5b578f=this['editor'],_0x59d1c9=_0x5b578f['commands']['get']('importWord'),_0x5d40d5=_0x5b578f['plugins']['get'](it);_0x59d1c9&&(_0x59d1c9['on']('execute',(_0x33f9ae,[,_0x3f4208])=>{_0x3f4208['collaboration_features']={'comments':!0x0,'user_id':_0x5d40d5['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x59d1c9,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x35a7a1,_0x5b56a2){const {comment_threads:_0xb008e9}=_0x5b56a2;_0xb008e9&&_0xb008e9['forEach'](({thread_id:_0x165d13,comments:_0x4b1af6,is_resolved:_0x314b16})=>{const _0x19cab0=new Date(),_0x5b78e2=_0x4b1af6['map'](({author:_0x5cacf3,content:_0x114344,created_at:_0x2024b1})=>({'content':_0x114344,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x19cab0,'attributes':{'@external':{'authorName':_0x5cacf3,'createdAt':_0x2024b1?new Date(_0x2024b1):new Date(),'source':'importWord'}}})),_0x1d9786=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1d9786,'threadId':_0x165d13,'comments':_0x5b78e2,'resolvedAt':_0x314b16?_0x19cab0:null});});}}class at extends _0xd49eba{constructor(_0x3e830e){super(_0x3e830e),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x35bb6c=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x35bb6c,'contentInsertion',(_0x686481,_0x20a7f5)=>this['_removeMarkersWithoutThreads'](_0x20a7f5['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3f023a){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3f023a;const _0x540872=this['editor']['plugins']['get']('CommentsRepository');for(const _0xd81314 of _0x3f023a['keys']()){const [_0x85f70a,_0x2971cd]=_0xd81314['split'](':');'comment'!=_0x85f70a||_0x540872['hasCommentThread'](_0x2971cd)||_0x3f023a['delete'](_0xd81314);}return _0x3f023a;}['_registerMarkerInClipboardPipeline'](){const _0x46bde8=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2b52b2=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2b52b2&&_0x46bde8['_registerMarkerToCopy']('comment',_0x2b52b2);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x24a15c){switch(_0x24a15c){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x17b7e3){const _0x3c1fea=_0x17b7e3['split'](':');return{'group':_0x3c1fea[0x0],'id':_0x3c1fea[0x1],'part':_0x3c1fea[0x2]};}class ut extends _0xd49eba{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4ab866,_0x5eaac4)=>{if(!_0x5eaac4['options']['showCommentHighlights'])return null;if(_0x5eaac4['options']['ignoreResolvedComments']){const {id:_0x2454ba}=ft(_0x4ab866['markerName']),_0x5cdfd9=this['editor']['plugins']['get'](o);if(_0x5cdfd9['getCommentThread'](_0x2454ba)?.['isResolved']&&_0x4ab866['item'])return _0x5eaac4['consumable']['consume'](_0x4ab866['item'],'addMarker:'+_0x4ab866['markerName']),_0x5eaac4['consumable']['consume'](_0x4ab866['item'],'removeMarker:'+_0x4ab866['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3ce655=>{_0x3ce655['on']('addMarker:comment',(_0x4146d3,_0x5453b2,_0x20e1c8)=>{if(!_0x20e1c8['options']['showCommentHighlights'])return;const _0x195736=_0x5453b2['item'];if(!_0x195736)return;const _0x577fc4=_0x20e1c8['mapper']['toViewElement'](_0x195736);this['editor']['model']['schema']['isObject'](_0x195736)&&_0x577fc4&&!_0x577fc4['getCustomProperty']('widget')&&_0x577fc4['is']('containerElement')&&_0x3cacc7(_0x577fc4,_0x20e1c8['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x51cbcd,{writer:_0x1d2e6a,options:_0x47092a})=>{if(!_0x47092a['showCommentHighlights'])return null;const _0x4036ef=_0x1d2e6a['createContainerElement']('div'),_0x3b8173=_0x1d2e6a['createEmptyElement']('hr');return _0x1d2e6a['addClass']('ck-horizontal-line',_0x4036ef),_0x1d2e6a['insert'](_0x1d2e6a['createPositionAt'](_0x4036ef,0x0),_0x3b8173),_0x4036ef;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x9c4020,{writer:_0x35a608,options:_0x117666})=>{if(!_0x117666['showCommentHighlights'])return null;const _0x396f8b=_0x35a608['createContainerElement']('span'),_0x1ff3a5=_0x35a608['createEmptyElement']('img');return _0x35a608['addClass']('image-inline',_0x396f8b),_0x35a608['insert'](_0x35a608['createPositionAt'](_0x396f8b,0x0),_0x1ff3a5),_0x396f8b;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x45afba,{writer:_0x179629,options:_0x154410})=>{if(_0x154410['showCommentHighlights'])return _0x179629['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x19d120,_0x3cddab,_0x1c6acd)=>{_0x1c6acd['options']['showCommentHighlights']&&_0x19d120['stop']();},{'priority':'high'});}}class r extends _0xd49eba{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(_0x4f5ae3){super(_0x4f5ae3),this['set']('isThreadsLoadingPaused',!0x0),_0x4f5ae3['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x119bc9,_0x5984a1,_0x1cf7c2,_0x437f60)=>{const _0x7df942=_0x4f5ae3['plugins']['get'](o),_0xad1357=_0x1cf7c2?ft(_0x1cf7c2)['id']:null;_0x4f5ae3['model']['change'](()=>{if(_0xad1357){const _0x3f2a96=this['getAllMarkersForId'](_0xad1357);for(const _0x3bdf8e of _0x3f2a96)_0x4f5ae3['editing']['reconvertMarker'](_0x3bdf8e);}if(_0x437f60){const {id:_0x2d283d}=ft(_0x437f60),_0x25dc0a=_0x7df942['getCommentThread'](_0x2d283d);if(_0x25dc0a&&_0x25dc0a['unlinkedAt'])return;if(_0x25dc0a&&!_0x25dc0a['isAttached'])return;const _0x39325c=this['getAllMarkersForId'](_0x2d283d);for(const _0x5e9dc8 of _0x39325c)_0x4f5ae3['editing']['reconvertMarker'](_0x5e9dc8);}}),_0xad1357&&this['scrollToThreadMarker'](_0xad1357);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4ad2cd=this['editor'],_0x21c70d=_0x4ad2cd['plugins']['get'](o),_0x4c51b8=_0x4ad2cd['config']['get']('collaboration.channelId'),_0x48b24d=_0x21c70d['getCommentThreads']()['filter'](_0x5a0ac1=>_0x5a0ac1['channelId']!==_0x4c51b8);_0x4ad2cd['commands']['add']('addCommentThread',new ot(_0x4ad2cd)),this['listenTo'](_0x4ad2cd,'change:isReadOnly',(_0xd759fd,_0x29fc5c,_0x58e875)=>{_0x21c70d['switchReadOnly'](_0x58e875,_0x4ad2cd['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x21c70d,dt('addCommentThread',_0x4c51b8),(_0x2218a6,{threadId:_0x444a66})=>{const _0x5f4ff2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x444a66);_0x5f4ff2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x444a66);}),this['listenTo'](_0x21c70d,dt('removeCommentThread',_0x4c51b8),(_0x233e48,{threadId:_0x4250fd})=>{_0x4ad2cd['model']['enqueueChange']({'isUndoable':!0x1},_0xb67260=>{const _0x5ee98b=this['getAllMarkersForId'](_0x4250fd);for(const _0x1016e5 of _0x5ee98b)_0xb67260['removeMarker'](_0x1016e5);});}),this['listenTo'](_0x21c70d,dt('resolveCommentThread',_0x4c51b8),(_0x6811d9,{threadId:_0x38bb69})=>{(this['_reconvertMarkers'](_0x38bb69),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x38bb69)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x21c70d,dt('reopenCommentThread',_0x4c51b8),(_0x48c628,{threadId:_0x27a9a7})=>{this['_reconvertMarkers'](_0x27a9a7);},{'priority':'low'}),this['listenTo'](_0x21c70d,dt('addComment',_0x4c51b8),(_0xcb0063,{threadId:_0x42b2c8,isFromAdapter:_0x124ec3})=>{const _0xe2776c=this['getAllMarkersForId'](_0x42b2c8);if(_0x124ec3||0x0==_0xe2776c['length']||!_0x21c70d['hasCommentThread'](_0x42b2c8))return;0x1===_0x21c70d['getCommentThread'](_0x42b2c8)['length']&&_0x4ad2cd['model']['enqueueChange']({'isUndoable':!0x1},_0x12e612=>{for(const _0x6dc259 of _0xe2776c)_0x12e612['updateMarker'](_0x6dc259,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x48b24d);}['afterInit'](){!async function(_0x5ad693){const _0x4aaafe=_0x4d964d([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]),_0x2506bf=0x73460ab3,_0x286369=0x73418d93^_0x2506bf,_0x29b3ab=window[_0x4d964d([0x44,0x61,0x74,0x65])][_0x4d964d([0x6e,0x6f,0x77])](),_0x3ead9f=_0x5ad693[_0x4d964d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xe05392=new window[(_0x4d964d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ade03=>{_0x3ead9f[_0x4d964d([0x6f,0x6e,0x63,0x65])](_0x4d964d([0x72,0x65,0x61,0x64,0x79]),_0x1ade03);}),_0x23739e={[_0x4d964d([0x6b,0x74,0x79])]:_0x4d964d([0x45,0x43]),[_0x4d964d([0x75,0x73,0x65])]:_0x4d964d([0x73,0x69,0x67]),[_0x4d964d([0x63,0x72,0x76])]:_0x4d964d([0x50,0x2d,0x32,0x35,0x36]),[_0x4d964d([0x78])]:_0x4d964d([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]),[_0x4d964d([0x79])]:_0x4d964d([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]),[_0x4d964d([0x61,0x6c,0x67])]:_0x4d964d([0x45,0x53,0x32,0x35,0x36])},_0x4546b0=_0x3ead9f[_0x4d964d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4d964d([0x67,0x65,0x74])](_0x4d964d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3bf432(){let _0x2406d2,_0x25cb08=null,_0x4cb541=null;try{if(_0x4546b0==_0x4d964d([0x47,0x50,0x4c]))return _0x4d964d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2406d2=_0x5739d3(),!_0x2406d2)return _0x4d964d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2406d2[_0x4d964d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4cb541=_0x2cb711(_0x2406d2[_0x4d964d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2406d2[_0x4d964d([0x6a,0x74,0x69])])),await _0x1a8a00()?_0x54bb7b()?_0x585ae6()?_0x4d964d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5635b1()?(_0x2406d2[_0x4d964d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4d964d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x25cb08=_0x300aa9(_0x4d964d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x24dee9()):_0x4d964d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4d964d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4d964d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4d964d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x585ae6(){const _0x758aa2=[_0x4d964d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4d964d([0x74,0x72,0x69,0x61,0x6c])][_0x4d964d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2406d2[_0x4d964d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x29b3ab/0x3e8:0xe10*_0x286369;return _0x2406d2[_0x4d964d([0x65,0x78,0x70])]<_0x758aa2;}function _0x54bb7b(){const _0x41d2ec=_0x2406d2[_0x4d964d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x41d2ec)return!0x1;if(_0x41d2ec[_0x4d964d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d964d([0x2a])))return!0x0;if(_0x41d2ec[_0x4d964d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d964d([0x43,0x4d,0x54])))return!0x0;if(_0x41d2ec[_0x4d964d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d964d([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x2a4a4b())return!0x0;if(_0x41d2ec[_0x4d964d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d964d([0x52,0x43,0x4d,0x54]))){if(_0x50c8b0())return!0x0;if(_0x2c09e4()||_0x369bf7())return!0x0;}return!0x1;}function _0x5635b1(){const _0x52b890=_0x2406d2[_0x4d964d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x52b890||0x0==_0x52b890[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3b4290}=new URL(window[_0x4d964d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x52b890[_0x4d964d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b4290))return!0x0;const _0x2adb5d=_0x3b4290[_0x4d964d([0x73,0x70,0x6c,0x69,0x74])](_0x4d964d([0x2e]));return _0x52b890[_0x4d964d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12939c=>_0x12939c[_0x4d964d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d964d([0x2a])))[_0x4d964d([0x6d,0x61,0x70])](_0x237edc=>_0x237edc[_0x4d964d([0x73,0x70,0x6c,0x69,0x74])](_0x4d964d([0x2e])))[_0x4d964d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xaed738=>_0xaed738[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2adb5d[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4d964d([0x6d,0x61,0x70])](_0x3ea188=>Array(_0x2adb5d[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3ea188[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4d964d([0x66,0x69,0x6c,0x6c])](_0x3ea188[0x0]===_0x4d964d([0x2a])?_0x4d964d([0x2a]):'')[_0x4d964d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3ea188))[_0x4d964d([0x73,0x6f,0x6d,0x65])](_0x3e1e53=>_0x2adb5d[_0x4d964d([0x65,0x76,0x65,0x72,0x79])]((_0xcb0ae6,_0xf4cf77)=>_0x3e1e53[_0xf4cf77]===_0xcb0ae6||_0x3e1e53[_0xf4cf77]===_0x4d964d([0x2a])));}function _0x24dee9(){return _0x25cb08&&_0x4cb541?new window[(_0x4d964d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4248bc,_0xf305ef)=>{_0x25cb08[_0x4d964d([0x74,0x68,0x65,0x6e])](_0x4248bc,_0xf305ef),_0x4cb541[_0x4d964d([0x74,0x68,0x65,0x6e])](_0x4f379a=>{_0x4f379a!=_0x4d964d([0x56,0x61,0x6c,0x69,0x64])&&_0x4248bc(_0x4f379a);},_0xf305ef);}):_0x25cb08||_0x4cb541||_0x4d964d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2cb711(_0x1ae913,_0x326e37){return new window[(_0x4d964d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x108173=>{if(_0x1cff47())return _0x108173(_0x4d964d([0x56,0x61,0x6c,0x69,0x64]));_0x20a716(),_0x3ead9f[_0x4d964d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4d964d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1b3bc6=!0x1;const _0x3f1dae=_0x39c0ed();function _0x250947(_0x3aa03e){return!!_0x3aa03e&&(typeof _0x3aa03e===_0x4d964d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3aa03e===_0x4d964d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3aa03e[_0x4d964d([0x74,0x68,0x65,0x6e])]===_0x4d964d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3aa03e[_0x4d964d([0x63,0x61,0x74,0x63,0x68])]===_0x4d964d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3dae90(_0x441b00){_0xdc3bd5(_0x441b00)[_0x4d964d([0x74,0x68,0x65,0x6e])](_0x691971=>{if(!_0x691971||_0x691971[_0x4d964d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4d964d([0x6f,0x6b]))return _0x4d964d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x36da93(_0x874dbd(_0x3f1dae+_0x326e37))!=_0x691971[_0x4d964d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4d964d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4d964d([0x56,0x61,0x6c,0x69,0x64]);})[_0x4d964d([0x74,0x68,0x65,0x6e])](_0x38c789=>(_0x50abe0(),_0x38c789),()=>{const _0x4d23fd=_0x2edff6();return null==_0x4d23fd?(_0x50abe0(),_0x4d964d([0x56,0x61,0x6c,0x69,0x64])):_0x4d964d(_0x29b3ab-_0x4d23fd>(0x574a8eb3^_0x2506bf)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4d964d([0x74,0x68,0x65,0x6e])](_0x108173)[_0x4d964d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x108173(_0x4d964d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2b3322=0x7370e433^_0x2506bf;function _0x50abe0(){const _0xd305f9=_0x4d964d([0x6c,0x6c,0x63,0x74,0x2d])+_0x36da93(_0x874dbd(_0x1ae913)),_0x196bb3=_0x45adcd(_0x36da93(window[_0x4d964d([0x4d,0x61,0x74,0x68])][_0x4d964d([0x63,0x65,0x69,0x6c])](_0x29b3ab/_0x2b3322)));window[_0x4d964d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d964d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd305f9,_0x196bb3);}function _0x2edff6(){const _0x34ff49=_0x4d964d([0x6c,0x6c,0x63,0x74,0x2d])+_0x36da93(_0x874dbd(_0x1ae913)),_0x42f146=window[_0x4d964d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d964d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x34ff49);return _0x42f146?window[_0x4d964d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x45adcd(_0x42f146),0x10)*_0x2b3322:null;}function _0xdc3bd5(_0x41d40a){return new window[(_0x4d964d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x321463,_0x3caf58)=>{_0x41d40a[_0x4d964d([0x74,0x68,0x65,0x6e])](_0x321463,_0x3caf58),window[_0x4d964d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3caf58,0x7347de73^_0x2506bf);});}}_0x3ead9f[_0x4d964d([0x6f,0x6e])](_0x4d964d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5df4f2,_0x26b948)=>{if(_0x26b948[0x0]!=_0x1ae913)return _0x108173(_0x4d964d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x26b948[0x1]={..._0x26b948[0x1],[_0x4d964d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3f1dae};},{[_0x4d964d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d964d([0x68,0x69,0x67,0x68])}),_0x3ead9f[_0x4d964d([0x6f,0x6e])](_0x4d964d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x575ae6=>{_0x250947(_0x575ae6[_0x4d964d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1b3bc6=!0x0,_0x3dae90(_0x575ae6[_0x4d964d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4d964d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d964d([0x6c,0x6f,0x77])}),_0xe05392[_0x4d964d([0x74,0x68,0x65,0x6e])](()=>{_0x1b3bc6||_0x108173(_0x4d964d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1cff47(){return _0x3ead9f[_0x4d964d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d964d([0x76,0x69,0x65,0x77])][_0x4d964d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4d964d([0x61,0x75,0x74,0x6f]);}function _0x20a716(){_0x3ead9f[_0x4d964d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d964d([0x76,0x69,0x65,0x77])][_0x4d964d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4d964d([0x61,0x75,0x74,0x6f]);}}function _0x300aa9(_0x3f41bd){const _0x465d86=[new window[(_0x4d964d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x374982=>setTimeout(_0x374982,0x734f347f^_0x2506bf)),_0xe05392[_0x4d964d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4d964d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ce333=>{let _0x567599=0x0;_0x3ead9f[_0x4d964d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d964d([0x6f,0x6e])](_0x4d964d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1268d3,_0x511d1a)=>{_0x511d1a[0x0][_0x4d964d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x567599++,_0x567599==(0x73460f5b^_0x2506bf)&&(_0x5ce333(),_0x1268d3[_0x4d964d([0x6f,0x66,0x66])]());});}))];return window[_0x4d964d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4d964d([0x72,0x61,0x63,0x65])](_0x465d86)[_0x4d964d([0x74,0x68,0x65,0x6e])](()=>_0x3f41bd);}async function _0x1ee768(){await _0xe05392,_0x3ead9f[_0x4d964d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d964d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3ab1bf,_0x3ead9f[_0x4d964d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d964d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3ab1bf,_0x3ead9f[_0x4d964d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4d964d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2a4a4b(){return window[_0x4d964d([0x67,0x6c,0x6f,0x62])]&&window[_0x4d964d([0x67,0x6c,0x6f,0x62])][_0x4d964d([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x50c8b0(){return _0x59fc11(_0x4d964d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x25e903(_0x4d964d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4d964d([0x73,0x74,0x61,0x74,0x65])]==_0x4d964d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2c09e4(){return _0x59fc11(_0x4d964d([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 _0x369bf7(){return _0x59fc11(_0x4d964d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x132530(_0x4df5ca){const _0x4e8ccb=_0x3cd4a4();_0x3ead9f[_0x4e8ccb]=_0x4d964d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4df5ca,_0x4df5ca!=_0x4d964d([0x56,0x61,0x6c,0x69,0x64])&&_0x1ee768();}function _0x3cd4a4(){const _0x321f18=window[_0x4d964d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4d964d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4d964d([0x6e,0x6f,0x77])]())[_0x4d964d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4d964d([0x2e]),'');let _0x4aa10a=_0x4d964d([0x4b]);for(let _0x22b1ca=0x0;_0x22b1ca<_0x321f18[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x22b1ca+=0x2){let _0x2484ff=window[_0x4d964d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x321f18[_0x4d964d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x22b1ca,_0x22b1ca+0x2));_0x2484ff>=_0x4aaafe[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2484ff-=_0x4aaafe[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4aa10a+=_0x4aaafe[_0x2484ff];}return _0x4aa10a;}function _0x5739d3(){const _0x16228c=_0x4546b0[_0x4d964d([0x73,0x70,0x6c,0x69,0x74])](_0x4d964d([0x2e]));if(0x3!=_0x16228c[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1ac74d(_0x16228c[0x1]);function _0x1ac74d(_0x2aabd2){const _0x9b9924=_0x463f1d(_0x2aabd2);return _0x9b9924&&_0x467862()?_0x9b9924:null;function _0x467862(){const _0x231cce=_0x9b9924[_0x4d964d([0x6a,0x74,0x69])],_0x9cbf56=window[_0x4d964d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x231cce[_0x4d964d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x231cce[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x488e48={..._0x9b9924,[_0x4d964d([0x6a,0x74,0x69])]:_0x231cce[_0x4d964d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x231cce[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x488e48[_0x4d964d([0x76,0x63])],_0x874dbd(_0x488e48)==_0x9cbf56;}}}async function _0x1a8a00(){let _0x361481=!0x0;try{const _0x1675a4=_0x4546b0[_0x4d964d([0x73,0x70,0x6c,0x69,0x74])](_0x4d964d([0x2e])),[_0x18b09d,_0x3a7bf7,_0xf704c7]=_0x1675a4;return _0xda374e(_0x18b09d),await _0x3cf4c7(_0x18b09d,_0x3a7bf7,_0xf704c7),_0x361481;}catch{return!0x1;}function _0xda374e(_0x582436){const _0x3294b2=_0x463f1d(_0x582436);_0x3294b2&&_0x3294b2[_0x4d964d([0x61,0x6c,0x67])]==_0x4d964d([0x45,0x53,0x32,0x35,0x36])||(_0x361481=!0x1);}async function _0x3cf4c7(_0x55aa3d,_0x957903,_0x3a5ace){const _0x822a51=window[_0x4d964d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4d964d([0x66,0x72,0x6f,0x6d])](_0x24930f(_0x3a5ace),_0x272596=>_0x272596[_0x4d964d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x44a3c9=new window[(_0x4d964d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4d964d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x55aa3d+_0x4d964d([0x2e])+_0x957903),_0x455347=window[_0x4d964d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4d964d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x455347)return;const _0x4ff53b=await _0x455347[_0x4d964d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4d964d([0x6a,0x77,0x6b]),_0x23739e,{[_0x4d964d([0x6e,0x61,0x6d,0x65])]:_0x4d964d([0x45,0x43,0x44,0x53,0x41]),[_0x4d964d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4d964d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4d964d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x455347[_0x4d964d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4d964d([0x6e,0x61,0x6d,0x65])]:_0x4d964d([0x45,0x43,0x44,0x53,0x41]),[_0x4d964d([0x68,0x61,0x73,0x68])]:{[_0x4d964d([0x6e,0x61,0x6d,0x65])]:_0x4d964d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4ff53b,_0x822a51,_0x44a3c9)||(_0x361481=!0x1);}}function _0x463f1d(_0x3e844e){return _0x3e844e[_0x4d964d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4d964d([0x65,0x79]))?JSON[_0x4d964d([0x70,0x61,0x72,0x73,0x65])](_0x24930f(_0x3e844e)):null;}function _0x24930f(_0x515bfe){return window[_0x4d964d([0x61,0x74,0x6f,0x62])](_0x515bfe[_0x4d964d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4d964d([0x2b]))[_0x4d964d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4d964d([0x2f])));}function _0x874dbd(_0x5b00ee){let _0x45c10b=0x1505;function _0x11b93e(_0x12874e){for(let _0x4d7fb5=0x0;_0x4d7fb5<_0x12874e[_0x4d964d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d7fb5++){const _0x55670e=_0x12874e[_0x4d964d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d7fb5);_0x45c10b=(_0x45c10b<<0x5)+_0x45c10b+_0x55670e,_0x45c10b&=_0x45c10b;}}function _0x116b48(_0x53c9a9){Array[_0x4d964d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x53c9a9)?_0x53c9a9[_0x4d964d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x116b48):_0x53c9a9&&typeof _0x53c9a9==_0x4d964d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4d964d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x53c9a9)[_0x4d964d([0x73,0x6f,0x72,0x74])]()[_0x4d964d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xd87dab,_0x946c02])=>{_0x11b93e(_0xd87dab),_0x116b48(_0x946c02);}):_0x11b93e(window[_0x4d964d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x53c9a9));}return _0x116b48(_0x5b00ee),_0x45c10b>>>0x0;}function _0x36da93(_0x5b6c0d){return _0x5b6c0d[_0x4d964d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4d964d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4d964d([0x30]));}function _0x45adcd(_0x104f3d){return _0x104f3d[_0x4d964d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4d964d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4d964d([0x6a,0x6f,0x69,0x6e])]('');}function _0x59fc11(_0x4f460d){return _0x3ead9f[_0x4d964d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4d964d([0x68,0x61,0x73])](_0x4f460d);}function _0x25e903(_0x265812){return _0x3ead9f[_0x4d964d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4d964d([0x67,0x65,0x74])](_0x265812);}function _0x3ab1bf(){}function _0x4d964d(_0x74512d){return _0x74512d['map'](_0x412f7a=>String['fromCharCode'](_0x412f7a))['join']('');}_0x132530(await _0x3bf432());}(this);}['destroy'](){const _0x398925=this['editor']['plugins']['get'](o),_0x2010f5=this['editor']['config']['get']('collaboration.channelId');for(const _0x4f2253 of _0x398925['getCommentThreads']({'channelId':_0x2010f5}))_0x398925['_detachCommentThread'](_0x4f2253['id']),_0x398925['_threads']['delete'](_0x4f2253['id']);super['destroy']();}['hasMarkerForId'](_0x245e58){return this['getAllMarkersForId'](_0x245e58)['length']>0x0;}['getAllMarkersForId'](_0x4edeb2){const _0x577169=[];for(const _0x3f381f of this['editor']['model']['markers'])_0x3f381f['name']['startsWith']('comment:'+_0x4edeb2)&&_0x577169['push'](_0x3f381f);return _0x577169;}['scrollToThreadMarker'](_0x369658){setTimeout(()=>{const _0x3ad3a6=this['_getTargetForId'](_0x369658);if(!_0x3ad3a6)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x369658&&nt({'target':_0x3ad3a6[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x57c674){this['editor']['model']['change'](()=>{for(const _0x407445 of this['getAllMarkersForId'](_0x57c674))this['editor']['editing']['reconvertMarker'](_0x407445);});}['_attachArchivedThread'](_0xab6107){const _0x5bc484=this['editor']['plugins']['get'](o),_0x395668=this['editor']['plugins']['get'](b),_0x5208fe=_0x5bc484['getCommentThread'](_0xab6107);if(!_0x5208fe['isAttached']){const _0x1d5f68=_0x5208fe['attachTo'](()=>this['_getTargetForId'](_0x5208fe['id']));_0x395668['registerAnnotation'](_0x1d5f68),_0x5208fe['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x330d2d=this['editor'],_0x5dce0a=_0x330d2d['plugins']['get'](it);_0x330d2d['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x75294e,_0x386d3f)=>{const {id:_0x4c8d41}=ft(_0x75294e['markerName']),_0x509911=_0x330d2d['plugins']['get'](o)['getCommentThread'](_0x4c8d41),_0x7dee28=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4c8d41;let _0x19a755;if(_0x509911&&_0x509911['isResolved']&&!_0x7dee28&&_0x75294e['item'])return _0x386d3f['consumable']['consume'](_0x75294e['item'],'addMarker:'+_0x75294e['markerName']),_0x386d3f['consumable']['consume'](_0x75294e['item'],'removeMarker:'+_0x75294e['markerName']),null;const _0x4c68c4=['ck-comment-marker'];return _0x7dee28&&_0x4c68c4['push']('ck-comment-marker--active'),_0x19a755=_0x509911?.['length']?_0x509911['comments']['first']['author']['id']:_0x5dce0a['me']['id'],{'classes':_0x4c68c4,'attributes':{'data-comment':_0x4c8d41,'data-author-id':_0x19a755}};}}),_0x330d2d['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x30aec5,{options:_0x5d4aa7})=>{if(_0x5d4aa7['showCommentHighlights'])return null;const _0x447ab8=_0x330d2d['plugins']['get'](o),_0x483a92=_0x330d2d['model']['markers']['get'](_0x30aec5),{id:_0x3706b7,part:_0x3a519d}=ft(_0x30aec5);return _0x483a92&&!_0x483a92['affectsData']||_0x5d4aa7['ignoreResolvedComments']&&_0x447ab8['getCommentThread'](_0x3706b7)?.['isResolved']?null:{'group':'comment','name':_0x3a519d?_0x3706b7+':'+_0x3a519d:_0x3706b7};}}),_0x330d2d['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x332a8d,{writer:_0x1c5499})=>_0x1c5499['createElement']('$marker',{'data-name':'comment:'+_0x332a8d['getAttribute']('id')})}),_0x330d2d['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3073b5=this['editor'],_0x2de962=_0x3073b5['plugins']['get'](o),_0x16d51e=new Set(),_0x387be5=new Set();_0x3073b5['model']['document']['registerPostFixer'](_0x2fae59=>{let _0x2370a5=!0x1;for(const {name:_0x238d20,data:_0x42f2ac}of _0x3073b5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1b3327,id:_0x2a08a2}=ft(_0x238d20);let _0x516e69=_0x42f2ac['newRange'];if('comment'!==_0x1b3327||!_0x516e69)continue;const _0x2190de='$graveyard'===_0x516e69['root']['rootName'];_0x2190de||(_0x516e69=ht(_0x516e69,_0x3073b5['model']),!_0x516e69||_0x516e69['isCollapsed']||!_0x42f2ac['newRange']||_0x516e69['isEqual'](_0x42f2ac['newRange']))?_0x3073b5['model']['hasContent'](_0x516e69)&&!_0x2190de?this['isThreadsLoadingPaused']?_0x16d51e['add'](_0x238d20):this['_handleThreadMarker'](_0x238d20,_0x2a08a2):(_0x387be5['add'](_0x238d20),_0x16d51e['delete'](_0x238d20),_0x2fae59['removeMarker'](_0x238d20),_0x2370a5=!0x0):(_0x2fae59['updateMarker'](_0x238d20,{'range':_0x516e69}),_0x2370a5=!0x0);}return _0x2370a5;}),this['on']('change:isThreadsLoadingPaused',(_0x1e29d0,_0x12aa04,_0x1ab5fb)=>{if(!_0x1ab5fb&&_0x16d51e['size'])for(const _0x340ac7 of _0x16d51e){const {id:_0x1b3edd}=ft(_0x340ac7);_0x16d51e['delete'](_0x340ac7),_0x3073b5['model']['markers']['get'](_0x340ac7)&&this['_handleThreadMarker'](_0x340ac7,_0x1b3edd);}}),this['listenTo'](_0x3073b5['model']['document'],'change',()=>{for(const {name:_0x274548,data:{newRange:_0x42a9b5}}of _0x3073b5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1962dd,id:_0x5a51d0}=ft(_0x274548);if('comment'!==_0x1962dd)continue;const _0x59ea74=_0x2de962['getCommentThread'](_0x5a51d0),_0x4e77a0=this['hasMarkerForId'](_0x5a51d0);_0x59ea74&&(!_0x59ea74['_hasTargetInContent']&&_0x42a9b5&&_0x3073b5['editing']['view']['once']('render',()=>{const _0x109f3a=_0x3073b5['plugins']['get'](y),_0x244fea=_0x2de962['_threadToController']['get'](_0x59ea74)['view'];_0x109f3a['getByInnerView'](_0x244fea)['refreshVisibility']();},{'priority':'low'}),_0x59ea74['_hasTargetInContent']=_0x4e77a0||!!_0x42a9b5),_0x42a9b5||(_0x387be5['add'](_0x274548),_0x16d51e['delete'](_0x274548));}for(const _0x35bf73 of _0x387be5){const {id:_0x5c469c}=ft(_0x35bf73),_0x5ab687=_0x2de962['getCommentThread'](_0x5c469c);if(_0x16d51e['delete'](_0x35bf73),!_0x5ab687)continue;const _0x22e4ca=this['hasMarkerForId'](_0x5c469c);_0x22e4ca||_0x5ab687['isSubmitted']?_0x22e4ca||_0x5ab687['unlinkedAt']||_0x5ab687['setUnlinkedAt'](new Date()):_0x5ab687['remove']();}_0x387be5['clear']();});}['_handleInitialThreads'](_0x48a446){_0x48a446['forEach'](_0x4e5f6d=>{_0x4e5f6d['unlinkedAt']&&this['_attachArchivedThread'](_0x4e5f6d['id']);});}['_getTargetForId'](_0x3c4925){const _0x28c274=this['editor'],_0x157195=this['getAllMarkersForId'](_0x3c4925);return et(_0x28c274['editing'],_0x157195);}['_getTextContext'](_0x1ad9a8){const _0x41ce8b=this['getAllMarkersForId'](_0x1ad9a8);let _0x56596d='',_0x1d5e29=!0x1;for(const _0x3c08b6 of _0x41ce8b){const _0x1df68b=_0x3c08b6['getRange']();for(const _0x50c055 of Array['from'](_0x1df68b['getItems']()))_0x50c055['is']('$textProxy')?(_0x56596d&&_0x1d5e29&&(_0x56596d+='\x20',_0x1d5e29=!0x1),_0x56596d+=_0x50c055['data']):_0x1d5e29=!0x0;_0x1d5e29=!0x0;}return _0x56596d['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x317b51,_0x1aeba6){const _0x28450d=this['editor'],_0x29d341=_0x28450d['plugins']['get'](o);let _0x18205c=_0x29d341['getCommentThread'](_0x1aeba6);const _0x2d9f73=_0x28450d['config']['get']('collaboration.channelId'),_0xa14c68=_0x28450d['plugins']['get'](b);if(_0x18205c&&(_0x18205c['unlinkedAt']&&_0x18205c['setUnlinkedAt'](null),_0x18205c['isAttached']))return _0x18205c;return!this['getAllMarkersForId'](_0x1aeba6)[0x0]['managedUsingOperations']?_0x28450d['editing']['view']['once']('render',()=>{if(_0x29d341['getCommentThread'](_0x1aeba6))return;const _0x239635=_0x28450d['plugins']['get'](y);_0x18205c=_0x29d341['openNewCommentThread']({'channelId':_0x2d9f73,'threadId':_0x1aeba6,'target':()=>this['_getTargetForId'](_0x1aeba6),'context':{'type':'text','value':this['_getTextContext'](_0x1aeba6)}});const _0x23e840=_0x29d341['_threadToController']['get'](_0x18205c)['view'],_0x350e06=_0x239635['getByInnerView'](_0x23e840);_0x350e06&&_0xa14c68['registerAnnotation'](_0x350e06);},{'priority':'low'}):_0x29d341['fetchCommentThread']({'channelId':_0x2d9f73,'threadId':_0x1aeba6})['then'](_0x4e8cee=>{if('destroyed'!==_0x28450d['state']){if(_0x18205c=_0x4e8cee,_0x18205c&&!_0x18205c['isAttached']){const _0x4eba35=_0x18205c['attachTo'](()=>this['_getTargetForId'](_0x1aeba6));_0xa14c68['registerAnnotation'](_0x4eba35),_0x18205c['isResolved']&&this['_reconvertMarkers'](_0x1aeba6);}else{if(!_0x18205c){const _0x1f9beb=this['getAllMarkersForId'](_0x1aeba6);_0x28450d['model']['change'](_0x19b9d7=>{for(const _0x3fc69e of _0x1f9beb)_0x19b9d7['removeMarker'](_0x3fc69e);});}}}}),_0x18205c;}['_handleThreadMarker'](_0x4e2dd2,_0x5d601d){const _0x103ffd=this['_attachMarkerToThread'](_0x4e2dd2,_0x5d601d);_0x103ffd&&!_0x103ffd['context']&&_0x103ffd['setContext']({'type':'text','value':this['_getTextContext'](_0x5d601d)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4dff5c=this['editor'];rt(_0x4dff5c['model'],({left:_0x21a239,entered:_0x5b5567})=>{for(const _0x144f0d of _0x21a239)if(mt(_0x144f0d)){_0x4dff5c['ui']['ariaLiveAnnouncer']['announce'](N(_0x4dff5c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x57355b of _0x5b5567)if(mt(_0x57355b)){_0x4dff5c['ui']['ariaLiveAnnouncer']['announce'](N(_0x4dff5c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x101819)));break;}});}}function dt(_0x32c192,_0x4e4778){return _0x4e4778?_0x32c192+':'+_0x4e4778:_0x32c192;}function ht(_0x5a9c0f,_0x3fc1f1){const _0x52276c=_0x3fc1f1['schema'],_0x5aa7f1=_0x3fc1f1['createRange'](_0x5a9c0f['start']);for(const _0x1ce64f of _0x5a9c0f['getWalker']()){const {type:_0x33fc54,item:_0x360cd0,nextPosition:_0x145f79}=_0x1ce64f;if('text'===_0x33fc54||_0x52276c['isObject'](_0x360cd0)){const _0x216f34=_0x3fc1f1['createPositionBefore'](_0x360cd0);_0x5aa7f1['isCollapsed']&&(_0x5aa7f1['start']=_0x216f34),_0x5aa7f1['end']=_0x145f79;}}return _0x5aa7f1;}function mt(_0x2947ab){return'comment'===ft(_0x2947ab['name'])['group'];}class s extends _0xd49eba{['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 _0x57b392=this['editor'],_0x46833b=_0x57b392['plugins']['get'](o),_0x45606f=_0x57b392['plugins']['get'](r),_0x57c8fb=_0x57b392['plugins']['get'](y),_0x4c4faa=_0x57b392['plugins']['get'](b);_0x57b392['ui']['componentFactory']['add']('comment',()=>{const _0x3c3926=this['_createUIButton'](_0x331a0a);return _0x3c3926['tooltip']=!0x0,_0x3c3926;}),_0x57b392['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1f2a75)),_0x4c4faa['addSourceCollector'](()=>{const _0x31e848=[];for(const [_0x38e7b8,_0x1f4510]of _0x46833b['_threadToController']){const _0x439593=_0x45606f['getAllMarkersForId'](_0x38e7b8['id']),_0x39c563=_0x439593['map'](_0x4d1b8a=>_0x4d1b8a['getRange']());_0x439593['length']>0x0&&_0x31e848['push']([_0x1f4510['view'],_0x39c563]);}return _0x31e848;}),this['listenTo'](_0x57c8fb,'change:activeAnnotations',(_0x24c4a9,_0x5910a5,_0x45ff7b)=>{const _0x169151=Array['from'](_0x45ff7b)['map'](_0xbf37dd=>_0xbf37dd['innerView'])['find'](_0x4e69e3=>_0x46833b['_viewToController']['has'](_0x4e69e3));if(!_0x169151)return void(_0x45606f['activeMarker']=null);const _0x5dec09=_0x46833b['_viewToController']['get'](_0x169151)['model']['id'],_0x121c7c='comment:'+_0x5dec09;_0x5dec09&&_0x45606f['hasMarkerForId'](_0x5dec09)?_0x45606f['activeMarker']=_0x121c7c:_0x45606f['activeMarker']&&(_0x45606f['activeMarker']=null);}),this['listenTo'](_0x46833b,'removeCommentThread',(_0x25e0ef,{threadId:_0x4e435d,isFromAdapter:_0xf4dc2})=>{!_0xf4dc2&&_0x57b392['ui']['focusTracker']['isFocused']&&_0x45606f['hasMarkerForId'](_0x4e435d)&&_0x57b392['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x46833b,'addComment',(_0x5c837f,{threadId:_0x3f50b1,isFromAdapter:_0x172d10})=>{if(_0x172d10||!_0x45606f['hasMarkerForId'](_0x3f50b1)||!_0x46833b['hasCommentThread'](_0x3f50b1))return;0x1===_0x46833b['getCommentThread'](_0x3f50b1)['length']&&(_0x57b392['editing']['view']['focus'](),_0x5c837f['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x11898c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x575ba0;for(const _0xc4a42a in _0x11898c){const _0xae42b0=_0xc4a42a,_0x40d00a=_0x11898c[_0xae42b0];if('commentsLicenseKeyValid'==_0x40d00a||'commentsLicenseKeyInvalid'==_0x40d00a||'commentsLicenseKeyExpired'==_0x40d00a||'commentsLicenseKeyDomainLimit'==_0x40d00a||'commentsLicenseKeyNotAllowed'==_0x40d00a||'commentsLicenseKeyEvaluationLimit'==_0x40d00a||'commentsLicenseKeyUsageLimit'==_0x40d00a){delete _0x11898c[_0xae42b0],_0x575ba0=_0x40d00a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x575ba0&&_0x11898c['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x575ba0&&_0x11898c['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x575ba0&&_0x11898c['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x575ba0&&_0x11898c['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x575ba0&&_0x11898c['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x575ba0&&_0x11898c['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4ffbf5){const _0x24382e=this['editor'],_0x4afa28=new _0x4ffbf5(_0x24382e['locale']),_0x1f0bef=_0x24382e['commands']['get']('addCommentThread');return _0x4afa28['set']({'label':N(_0x24382e['locale'],'Comment'),'icon':_0x353a08}),_0x4afa28['bind']('isEnabled')['to'](_0x1f0bef,'isEnabled',_0x1f0bef,'hasContent',(_0x104463,_0x459d89)=>_0x104463&&_0x459d89),this['listenTo'](_0x4afa28,'execute',()=>{_0x1f0bef['execute']();}),_0x4afa28;}}class i extends _0xd49eba{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x76c4a){super(_0x76c4a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x589a16,_0x4db9a3,_0xb6fb6d)=>{_0xb6fb6d?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x58abcf,_0x1adb5b]of this['editor']['commands'])_0x1adb5b['affectsData']&&'addCommentThread'!==_0x58abcf&&_0x1adb5b['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 _0x6b331f=this['editor']['editing']['view']['document'];this['listenTo'](_0x6b331f,'cut',_0x9bd5c9=>_0x9bd5c9['stop'](),{'priority':'highest'}),this['listenTo'](_0x6b331f,'clipboardInput',_0x54038f=>_0x54038f['stop'](),{'priority':'highest'}),this['listenTo'](_0x6b331f,'delete',_0x4bd044=>_0x4bd044['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x16592c,_0x329814]of this['editor']['commands'])_0x329814['affectsData']&&'addCommentThread'!==_0x16592c&&_0x329814['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 _0x41aa84{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e98a5){super(_0x2e98a5),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x590112=this['context']['plugins']['get'](y);this['listenTo'](_0x590112,'_activateAnnotation',(_0x349194,_0x3a8eed)=>{for(const _0x22e492 of this['activeUIs']){const _0x2a6441=this['_uis']['get'](_0x22e492);(0x0,this['uisData']['get'](_0x22e492)['filter'])(_0x3a8eed)&&_0x2a6441['setActiveAnnotation'](_0x3a8eed);}}),this['listenTo'](_0x590112,'_deactivateAllAnnotations',()=>{for(const _0x37dcb8 of this['activeUIs']){this['_uis']['get'](_0x37dcb8)['setActiveAnnotation'](null);}}),this['listenTo'](_0x590112['_visibleAnnotations'],'add',(_0x236bbf,_0x517405)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x517405);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4eac51){return this['activeUIs']['has'](_0x4eac51);}['activate'](_0xf925de,_0xe9513f=this['defaultFilter']){const _0x5d2af5=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0xf925de))throw new _0xacf139('annotationsuis-missing-ui',this,{'uiName':_0xf925de});this['isActive'](_0xf925de)&&this['deactivate'](_0xf925de),this['activeUIs']['add'](_0xf925de);const _0x4fe179=new S();v({'source':_0x5d2af5['_visibleAnnotations'],'target':_0x4fe179,'filter':_0xe9513f}),this['uisData']['set'](_0xf925de,{'collection':_0x4fe179,'filter':_0xe9513f});const _0xd2bb19=this['_uis']['get'](_0xf925de);_0xd2bb19['attach'](_0x4fe179),this['listenTo'](_0xd2bb19,'change:activeAnnotation',(_0x43fd11,_0x1cb722,_0x4d185c,_0xfb754a)=>{_0xfb754a&&_0x5d2af5['_removeActiveAnnotation'](_0xfb754a),_0x4d185c&&_0x5d2af5['_addActiveAnnotation'](_0x4d185c);});}['deactivate'](_0x449e99){if(this['activeUIs']['delete'](_0x449e99),!this['_uis']['has'](_0x449e99))throw new _0xacf139('annotationsuis-missing-ui',this,{'uiName':_0x449e99});const _0x138218=this['_uis']['get'](_0x449e99);_0x138218['detach'](),this['stopListening'](_0x138218),this['uisData']['get'](_0x449e99)['collection']['destroy'](),this['uisData']['delete'](_0x449e99);}['switchTo'](_0x14fe11){if(!this['_uis']['has'](_0x14fe11))throw new _0xacf139('annotationsuis-missing-ui',this,{'uiName':_0x14fe11});const _0x26ed94=this['context']['plugins']['get'](y),_0x540fb6=Array['from'](_0x26ed94['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x14fe11);const _0x1b6740=this['_uis']['get'](_0x14fe11);_0x1b6740['setActiveAnnotation'](_0x540fb6),_0x1b6740['_setSelectedAnnotations']&&_0x540fb6&&_0x1b6740['_setSelectedAnnotations']([_0x540fb6]);}['deactivateAll'](){for(const _0x4f9ee7 of this['activeUIs'])this['deactivate'](_0x4f9ee7);}['register'](_0x377126,_0x461bf8){if(this['_uis']['has'](_0x377126))throw new _0xacf139('annotationsuis-register-already-registered');if('function'!=typeof _0x461bf8['attach']||'function'!=typeof _0x461bf8['detach']||'function'!=typeof _0x461bf8['setActiveAnnotation'])throw new _0xacf139('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x377126,_0x461bf8);}['refilterAnnotations'](){const _0x36e1a1=this['context']['plugins']['get'](y)['collection'],_0x1c0f7c=new Map(),_0x3a33b4=Array['from'](this['activeUIs']);for(const _0x4ddb42 of this['activeUIs']){const _0x5a2ace=this['uisData']['get'](_0x4ddb42)['collection'];for(const _0x28bec of _0x5a2ace)_0x1c0f7c['set'](_0x28bec,_0x4ddb42);}for(const _0x43f827 of _0x36e1a1){const _0x45fd6c=_0x1c0f7c['get'](_0x43f827);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x43f827);const _0x54b0e2=_0x3a33b4['find'](_0x3550ed=>this['uisData']['get'](_0x3550ed)['filter'](_0x43f827));_0x45fd6c!==_0x54b0e2&&(_0x45fd6c&&this['uisData']['get'](_0x45fd6c)['collection']['remove'](_0x43f827),_0x54b0e2&&this['uisData']['get'](_0x54b0e2)['collection']['add'](_0x43f827));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x218fd3){const _0xb380da=[];for(const _0x3962eb of this['activeUIs']){(0x0,this['uisData']['get'](_0x3962eb)['filter'])(_0x218fd3)&&_0xb380da['push'](_0x3962eb);}if(_0xb380da['length']>0x1)throw new _0xacf139('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xb380da,'annotationType':_0x218fd3['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4dd254){super(_0x4dd254);const _0x145535=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 _0x14dc48(),this['focusCycler']=new _0x35c9d0({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x145535['to']('class')],'style':{'minHeight':_0x145535['to']('minHeight',_0x46134b=>'number'==typeof _0x46134b?_i(_0x46134b+0xa):null)},'dir':_0x4dd254['uiLanguageDirection'],'role':'application','aria-label':N(_0x4dd254,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x4dd254,'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',_0x45f9c7=>{this['_updateItemPositionInFocusables'](_0x45f9c7['source']);}),this['list']['forEach'](_0x402b48=>{this['focusTracker']['add'](_0x402b48['element']),this['_updateItemPositionInFocusables'](_0x402b48);}),this['list']['on']('change',(_0x1b283d,_0x4365ae)=>{for(const _0xea5df9 of _0x4365ae['removed'])this['focusTracker']['remove'](_0xea5df9['element']),this['focusables']['remove'](_0xea5df9);for(const _0x492397 of _0x4365ae['added'])this['focusTracker']['add'](_0x492397['element']),this['_updateItemPositionInFocusables'](_0x492397);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2a043c){const _0x2468c9=this['focusables']['getIndex'](_0x2a043c);let _0x20725f,_0x518bd;for(const _0x42b7ef of this['focusables'])if(_0x2a043c['top']<_0x42b7ef['top']){_0x20725f=_0x42b7ef;break;}if(_0x518bd=_0x20725f?this['focusables']['getIndex'](_0x20725f):this['focusables']['length'],-0x1!==_0x2468c9){if(_0x2468c9===_0x518bd-0x1)return;this['focusables']['remove'](_0x2a043c),_0x518bd=_0x20725f?this['focusables']['getIndex'](_0x20725f):this['focusables']['length'];}this['focusables']['add'](_0x2a043c,_0x518bd);}}const Ot=/* #__PURE__ -- @preserve */
33
- Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3144b4){super(_0x3144b4),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x452be4,_0x1e3553)=>_0x452be4+_0x1e3553),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x114152=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x114152['to']('isAnimationDisabled',_0x2c2952=>_0x2c2952?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x114152['to']('top',_0xf14170=>Ot(_0xf14170))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x38bf0d=this['element']['clientHeight'];_0x38bf0d&&(this['height']=_0x38bf0d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x41aa84{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x500dad){super(_0x500dad),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 _0x118fc0=this['context']['config']['get']('sidebar.container');_0x118fc0&&this['setContainer'](_0x118fc0);}['setContainer'](_0x2e2ac6){if(!g(_0x2e2ac6))throw new _0xacf139('sidebar-setcontainer-invalid-element');this['container']=_0x2e2ac6;}['_attachToContainer']({viewClass:_0x1d849c='',spaceBetweenItems:_0x377e13=0x19}={}){if(!g(this['container']))throw new _0xacf139('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1d849c,this['_spaceBetweenItems']=_0x377e13;}['rearrange']({removedAnnotation:_0x2b9739,previousAnnotation:_0x4520e1,nextAnnotation:_0x38a98d}){const _0x379b23=this['getSidebarItemView'](_0x2b9739);this['view']['list']['remove'](_0x379b23),this['_destroySidebarItemView'](_0x2b9739),_0x4520e1&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4520e1)),_0x38a98d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x38a98d)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4c22e0,activatedAnnotation:_0x2ac5ef,disableAnimationOnActivatedAnnotation:_0x1bc748}){if(this['_activeAnnotation']=_0x2ac5ef,_0x4c22e0){_0x4c22e0['isActive']=!0x1;const _0x2f3b19=this['getSidebarItemView'](_0x4c22e0);_0x2f3b19&&_0x1bc748&&(_0x2f3b19['isAnimationDisabled']=!0x1);}if(_0x2ac5ef){const _0x35aa63=this['getSidebarItemView'](_0x2ac5ef);_0x35aa63&&(_0x2ac5ef['isActive']=!0x0,_0x1bc748&&(_0x35aa63['isAnimationDisabled']=!0x0,_0x35aa63['top']+=0x1),this['_alignToTargetRect'](_0x35aa63));}}['_detachFromContainer'](_0x3a7548){if(this['view']['element']['remove'](),_0x3a7548){for(const _0x3ba27d of _0x3a7548)this['_destroySidebarItemView'](_0x3ba27d);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1410ae,_0x34a9a0){_0x34a9a0||(_0x34a9a0=_0x1410ae['view']);const _0xd282a6=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xd282a6,_0x1410ae),this['_annotationToSidebarItemView']['set'](_0x1410ae,_0xd282a6),_0xd282a6['content']['add'](_0x34a9a0),this['listenTo'](_0x1410ae['view'],'change:targetRect',(_0x44fab1,_0x4c3beb,_0x444185)=>{const _0x239958=this['_getTargetTop'](_0x1410ae,_0x444185);_0xd282a6['_targetTop']!=_0x239958&&(_0xd282a6['_targetTop']=_0x239958,this['_setItemTop'](_0xd282a6,_0x239958));}),this['listenTo'](_0xd282a6,'change:top',()=>{this['_recalculate'](_0xd282a6,'top');}),this['listenTo'](_0xd282a6,'change:bottom',()=>{this['_recalculate'](_0xd282a6,'bottom');}),this['_alignToTargetRect'](_0xd282a6);const _0x12e71c=this['_getItemBefore'](_0xd282a6);if(_0x12e71c)this['_alignAfterItem'](_0x12e71c,_0xd282a6)||this['_alignToTargetRect'](_0xd282a6);else this['_alignToTargetRect'](_0xd282a6);return this['_updateLastItem'](),this['view']['list']['add'](_0xd282a6),_0xd282a6;}['_alignForTopChange'](_0x292189){if(!_0x292189['content']['length'])return;const _0x4c6f1a=this['_getItemBefore'](_0x292189);if(!_0x4c6f1a)return;const _0x5826b8=this['_sidebarItemViewToAnnotation']['get'](_0x4c6f1a),_0x16d5e9=this['_activeAnnotation'];_0x16d5e9&&_0x16d5e9===_0x5826b8?this['_alignAfterItem'](_0x4c6f1a,_0x292189):this['_alignBeforeItem'](_0x292189,_0x4c6f1a);}['_alignForBottomChange'](_0x31b8d8){if(!_0x31b8d8['content']['length'])return;const _0x3dd56d=this['_getItemAfter'](_0x31b8d8);if(!_0x3dd56d)return;const _0x11ee32=this['_sidebarItemViewToAnnotation']['get'](_0x3dd56d),_0x29bd69=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3c0cdf=this['_activeAnnotation'];_0x3c0cdf&&_0x3c0cdf===_0x11ee32&&_0x29bd69?(this['_alignBeforeItem'](_0x3dd56d,_0x31b8d8),this['_alignAfterItem'](_0x31b8d8,_0x3dd56d)):_0x3c0cdf&&_0x3c0cdf===_0x11ee32?this['_alignBeforeItem'](_0x3dd56d,_0x31b8d8):this['_alignAfterItem'](_0x31b8d8,_0x3dd56d);}['_recalculate'](_0x45f6a3,_0x438eeb){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4659aa,changedProp:_0x576c17}of this['_recalculateBuffer'])'top'===_0x576c17?this['_alignForTopChange'](_0x4659aa):this['_alignForBottomChange'](_0x4659aa);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x45f6a3,'changedProp':_0x438eeb});}['getSidebarItemView'](_0x392422){return this['_annotationToSidebarItemView']['get'](_0x392422);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x32f435){const _0x3bd234=this['getSidebarItemView'](_0x32f435);this['stopListening'](_0x3bd234),this['stopListening'](_0x32f435['view']),_0x3bd234['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x32f435),this['_sidebarItemViewToAnnotation']['delete'](_0x3bd234);}['_createSidebarView'](){const _0x1e4d5b=new H(this['context']['locale']);return _0x1e4d5b['render'](),this['on']('change:_lastItem',(_0x2579fe,_0x4cf025,_0x176fbe,_0x10af53)=>{_0x10af53&&_0x1e4d5b['unbind']('minHeight'),_0x176fbe?_0x1e4d5b['bind']('minHeight')['to'](_0x176fbe,'bottom'):_0x1e4d5b['minHeight']=null;}),_0x1e4d5b;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4fdc3b){const _0x371f88=this['_sidebarItemViewToAnnotation']['get'](_0x4fdc3b),_0x693baa=_0x371f88&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x371f88)-0x1);return _0x693baa&&this['getSidebarItemView'](_0x693baa)||null;}['_getItemAfter'](_0x24cd8d){const _0x3103d7=this['_sidebarItemViewToAnnotation']['get'](_0x24cd8d),_0x2673f3=_0x3103d7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3103d7)+0x1);return _0x2673f3&&this['getSidebarItemView'](_0x2673f3)||null;}['_alignBeforeItem'](_0x690c3b,_0x2ed31d){_0x690c3b['updateHeight']();const _0x45a2fd=G(_0x2ed31d['bottom']+this['_spaceBetweenItems'],_0x690c3b['top']);return!!_0x45a2fd&&(this['_setItemTop'](_0x2ed31d,_0x2ed31d['top']-_0x45a2fd),!0x0);}['_alignAfterItem'](_0x3edcef,_0x44ead7){_0x3edcef['updateHeight']();const _0x5b08a8=G(_0x3edcef['bottom']+this['_spaceBetweenItems'],_0x44ead7['top']);return!!_0x5b08a8&&(this['_setItemTop'](_0x44ead7,_0x44ead7['top']+_0x5b08a8,!0x1),!0x0);}['_alignToTargetRect'](_0x305e65){const _0x2b528e=this['_sidebarItemViewToAnnotation']['get'](_0x305e65);if(!_0x2b528e||!_0x2b528e['target']||!_0x2b528e['targetRect'])return;const _0x310acd=this['_getTargetTop'](_0x2b528e,_0x2b528e['targetRect']);this['_setItemTop'](_0x305e65,_0x310acd);}['_getTargetTop'](_0x2b0ceb,_0x302494){if(null===_0x302494)return 0x0;if(_0x2b0ceb['target']instanceof _0x4bd5bc)return _0x302494['top'];{const _0x107340=new _0x4bd5bc(this['view']['element'])['top'];return _0x302494['top']-_0x107340;}}['_setItemTop'](_0x2d0761,_0xef0796,_0x531896=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x531896&&(_0xef0796=Math['max'](_0xef0796,this['_getMaxAvailableTop'](_0x2d0761))),_0x2d0761['top']=_0xef0796;}['_getMaxAvailableTop'](_0x4dd161){let _0x11b19a=this['_getItemBefore'](_0x4dd161),_0x314ec5=0x0;for(;_0x11b19a;)_0x11b19a['updateHeight'](),_0x314ec5+=this['_spaceBetweenItems']+_0x11b19a['height'],_0x11b19a=this['_getItemBefore'](_0x11b19a);return _0x314ec5;}}function G(_0x56105d,_0x7a875a){return Math['max'](_0x56105d-_0x7a875a,0x0);}function g(_0x32f562){return null!==_0x32f562&&'object'==typeof _0x32f562&&0x1===_0x32f562['nodeType'];}class e extends _0x41aa84{['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(_0x5d3e7b){super(_0x5d3e7b),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2d3dca(),this['_refreshPositioningDebounced']=_0x2df535(()=>{_0x5d3e7b['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3af8f6=this['context']['plugins']['get'](j),_0x12017d=this['context']['plugins']['get'](z);_0x3af8f6['register']('wideSidebar',this),_0x12017d['container']&&_0x3af8f6['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x19be85){if(_0x19be85===this['activeAnnotation'])return;const _0x2be23a=this['context']['plugins']['get'](z);_0x2be23a['_activeAnnotation']=_0x19be85;const _0x328724=this['activeAnnotation'];_0x2be23a['refresh']({'blurredAnnotation':_0x328724,'activatedAnnotation':_0x19be85}),this['activeAnnotation']=_0x19be85;}['attach'](_0x29c659){this['annotations']=_0x29c659;const _0x3e9fd2=this['context']['plugins']['get'](z);if(_0x3e9fd2['_annotations']=_0x29c659,this['isAttached'])throw new _0xacf139('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3e9fd2,'set:container',()=>{this['detach'](),this['listenTo'](_0x3e9fd2,'change:container',_0x24cf38=>{_0x24cf38['off'](),this['attach'](_0x29c659);});}),_0x3e9fd2['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1e7cd9=_0x445011=>{_0x445011['updateTargetRect'](),_0x3e9fd2['addAnnotation'](_0x445011);};for(const _0x1015af of _0x29c659)_0x1e7cd9(_0x1015af);this['listenTo'](_0x29c659,'add',(_0x29627e,_0x35082d)=>{_0x1e7cd9(_0x35082d);}),this['listenTo'](_0x29c659,'remove',(_0x2c7ac9,_0x82fb3c,_0x11b705)=>{_0x3e9fd2['rearrange']({'removedAnnotation':_0x82fb3c,'previousAnnotation':_0x29c659['get'](_0x11b705-0x1),'nextAnnotation':_0x29c659['get'](_0x11b705+0x1)}),_0x82fb3c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x29c659,'focus',(_0x5035d4,_0x4c5386)=>{this['setActiveAnnotation'](_0x4c5386);}),this['listenTo'](_0x29c659,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4f804c=this['context']instanceof _0x5f566b?this['context']['editors']:new _0x2d3dca([this['context']]);for(const _0x25fa9f of _0x4f804c)this['_integrateWithEditorAnnotations'](_0x25fa9f);this['listenTo'](_0x4f804c,'add',(_0x457da4,_0x3acbc0)=>{this['listenTo'](_0x3acbc0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3acbc0);});}),this['listenTo'](_0x4f804c,'remove',(_0x1a8bb2,_0xe200e3)=>{_0xe200e3['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xe200e3['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xacf139('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x433aa7=this['context']['plugins']['get'](z);_0x433aa7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x433aa7),this['stopListening'](this['annotations']),this['context']instanceof _0x5f566b&&this['stopListening'](this['context']['editors']);for(const _0x1b865d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1b865d);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x24d6cf){if(!_0x24d6cf['plugins']['has']('EditorAnnotations'))return;const _0x3be7ed=_0x24d6cf['plugins']['get']('EditorAnnotations'),_0x21af9f=()=>{const _0x51916f=_0x3be7ed['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x51916f[0x0]||null);};this['listenTo'](_0x3be7ed,'refresh',_0x21af9f),this['listenTo'](_0x3be7ed,'blur',(_0x55f8c8,{isAnnotationTracked:_0x57f87f})=>{this['activeAnnotation']&&_0x57f87f(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3be7ed,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5c6db2=>{_0x3be7ed['hasDomSelection']()&&(_0x21af9f(),_0x5c6db2['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3be7ed);}['_destroyEditorAnnotationsIntegration'](_0x5005cf){this['stopListening'](_0x5005cf),this['_editorAnnotations']['remove'](_0x5005cf);}}class C extends _0x331a0a{['counterView'];constructor(_0x537acc){super(_0x537acc);const _0x3f32a4=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x18d4af,_0x2f0a38)=>_0x18d4af?'...':_0x2f0a38['toString']()),this['set']('annotationType',''),this['icon']=_0x353a08,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3f32a4['to']('annotationType',_0x54937c=>'ck-annotation-counter__badge--'+_0x54937c),_0x3f32a4['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3f32a4['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x41aa84{['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(_0x2ee76d){super(_0x2ee76d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4917db())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2d3dca(),this['_refreshPositioningDebounced']=_0x2df535(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x192f59(this['context']['locale']),this['balloonPanelView']=new _0x2d57a3(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x20cf9e){this['annotations']=_0x20cf9e;const _0x5edadd=this['context']['plugins']['get'](z),_0x425d61=this['balloonPanelView'];if(_0x5edadd['_annotations']=_0x20cf9e,this['isAttached'])throw new _0xacf139('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5edadd,'set:container',()=>{this['detach'](),this['listenTo'](_0x5edadd,'change:container',_0x3cda26=>{_0x3cda26['off'](),this['attach'](_0x20cf9e);});}),_0x5edadd['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5346a1=_0x15ad31=>{const _0xd290e4=new C(this['context']['locale']);_0x5edadd['addAnnotation'](_0x15ad31,_0xd290e4),this['_annotationToNarrowView']['set'](_0x15ad31,_0xd290e4),_0xd290e4['bind']('isDirty','annotationType','number')['to'](_0x15ad31['view'],'isDirty','type','length'),_0xd290e4['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x425d61['content']['first']!==_0x15ad31['view']?(this['_showBalloon'](_0x15ad31),_0x15ad31['view']['element']['focus'](),this['setActiveAnnotation'](_0x15ad31)):this['setActiveAnnotation'](null);});};for(const _0x2f48cd of _0x20cf9e)_0x5346a1(_0x2f48cd);this['listenTo'](_0x20cf9e,'add',(_0x23493e,_0x4060e6)=>{_0x5346a1(_0x4060e6);}),this['listenTo'](_0x20cf9e,'remove',(_0x35a639,_0x48e649,_0xb2d6f9)=>{this['_annotationToNarrowView']['get'](_0x48e649)['destroy'](),this['_annotationToNarrowView']['delete'](_0x48e649),_0x5edadd['rearrange']({'removedAnnotation':_0x48e649,'previousAnnotation':_0x20cf9e['get'](_0xb2d6f9-0x1),'nextAnnotation':_0x20cf9e['get'](_0xb2d6f9+0x1)}),_0x48e649===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x20cf9e,'focus',(_0x463138,_0x1ac5ac)=>{this['setActiveAnnotation'](_0x1ac5ac);}),this['listenTo'](_0x20cf9e,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x573592,_0xf3cd33)=>{_0xf3cd33['keyCode']===_0x3c3fb1['esc']&&_0x425d61['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x425d61['content']['first']),this['_hideBalloon'](),_0xf3cd33['stopPropagation'](),_0xf3cd33['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2d7dec,_0x53a948)=>{const _0x1d8788=_0x53a948['target'];_0x425d61['isVisible']&&_0x425d61['element']['contains'](_0x1d8788)||_0x5edadd['view']['element']['contains'](_0x1d8788)||_0x2d7dec['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x16e361=>_0x16e361['contains'](_0x1d8788))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2a2ff8=this['context']instanceof _0x5f566b?this['context']['editors']:new _0x2d3dca([this['context']]);for(const _0x40f2be of _0x2a2ff8)this['_integrateWithEditorAnnotations'](_0x40f2be);this['listenTo'](_0x2a2ff8,'add',(_0x49862f,_0x201f7f)=>{this['listenTo'](_0x201f7f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x201f7f);});}),this['listenTo'](_0x2a2ff8,'remove',(_0xfe2726,_0x958662)=>{_0x958662['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x958662['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2a3aa2){if(_0x2a3aa2===this['activeAnnotation'])return;const _0x1883ff=this['context']['plugins']['get'](z);if(_0x1883ff['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2a3aa2,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2a3aa2)_0x1883ff['getSidebarItemView'](_0x2a3aa2)?this['_showBalloon'](_0x2a3aa2):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2a3aa2;}['detach'](){if(!this['isAttached'])throw new _0xacf139('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x59c4a8=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xc65687=>_0xc65687['destroy']()),this['_annotationToNarrowView']['clear'](),_0x59c4a8['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5f566b&&this['stopListening'](this['context']['editors']);for(const _0x3e92d5 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3e92d5);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'](_0x2b9b67){if(!_0x2b9b67['plugins']['has']('EditorAnnotations'))return;const _0x368bb5=_0x2b9b67['plugins']['get']('EditorAnnotations'),_0x46e37f=this['context']['plugins']['get'](z),_0x5c738f=this['annotations'],_0x63be5c=this['balloonPanelView'],_0x4c9899=()=>{const _0x247908=_0x368bb5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x247908),this['setActiveAnnotation'](_0x247908[0x0]||null);};this['listenTo'](_0x368bb5,'refresh',_0x4c9899),this['listenTo'](_0x368bb5,'blur',(_0x242d63,{isAnnotationTracked:_0x1c445f})=>{this['activeAnnotation']&&_0x1c445f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x368bb5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x5c738f,'blur',_0x4ad44e=>{_0x368bb5['hasDomSelection']()&&_0x4ad44e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5de3f3,_0x2dcf74)=>{const _0x4720eb=_0x2dcf74['target'];_0x63be5c['isVisible']&&_0x63be5c['element']['contains'](_0x4720eb)||_0x46e37f['view']['element']['contains'](_0x4720eb)||this['activeAnnotation']&&_0x368bb5['hasDomSelection']()&&(_0x4c9899(),_0x5de3f3['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x368bb5);}['_destroyEditorAnnotationsIntegration'](_0x152b78){_0x152b78&&(this['stopListening'](_0x152b78),this['_editorAnnotations']['remove'](_0x152b78));}['_setSelectedAnnotations'](_0x2f737f){for(const _0x1a994d of this['_selectedAnnotations'])_0x2f737f['includes'](_0x1a994d)||this['_manuallyClosedAnnotationViews']['delete'](_0x1a994d['view']);this['_selectedAnnotations']=_0x2f737f;}['_refreshPositioning'](){const _0x2687cd=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x2687cd['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x493258){if(this['_manuallyClosedAnnotationViews']['has'](_0x493258['view']))return;const _0x51762b=this['balloonPanelView']['content']['first'];_0x51762b!==_0x493258['view']?(_0x51762b&&this['_detachListeners'](_0x51762b),this['_attachListeners'](_0x493258['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x493258['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x310249=this['balloonPanelView']['content']['first'],_0x345aa9=_0x310249&&this['annotations']['getByView'](_0x310249);if(!_0x345aa9||!this['_annotationToNarrowView']['has'](_0x345aa9))return;const _0x286c2b=this['_annotationToNarrowView']['get'](_0x345aa9)['element'],_0x3067bc=(function(){const _0x274233=_0x2d57a3['defaultPositions'];return[_0x274233['southArrowNorthEast'],_0x274233['northArrowSouthEast'],_0x274233['southArrowNorth'],_0x274233['northArrowSouth'],_0x274233['southArrowNorthWest'],_0x274233['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x286c2b,'positions':_0x3067bc});}['_hideBalloon'](){const _0x19f64e=this['balloonPanelView'],_0x406d88=_0x19f64e['content']['first'];_0x406d88&&(this['_detachListeners'](_0x406d88),_0x19f64e['unpin'](),_0x19f64e['content']['clear']());}['_attachListeners'](_0x4e2bc9){this['listenTo'](_0x4e2bc9,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4e2bc9,'Esc',(_0x1f5724,_0x4cd0b7)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4e2bc9),this['_hideBalloon'](),_0x4cd0b7();});}['_detachListeners'](_0x22063c){this['stopListening'](_0x22063c);}}class c extends _0xd49eba{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x236885,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24e009){super(_0x24e009),_0x24e009['editing']['view']['addObserver'](_0x50a083),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x24e009['plugins']['get'](_0x236885),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x2df535(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0xb147d7=this['editor']['plugins']['get'](j);_0xb147d7['context']===this['editor']&&(_0xb147d7['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x275490,_0x31d66d)=>{const _0x387930=this['_balloon'];if(this['isAttached']&&_0x387930['visibleView']){const _0x3299c6=this['annotations']['getByView'](_0x387930['visibleView']);_0x3299c6&&this['_closeAnnotation'](_0x3299c6),_0x31d66d();}}));}['afterInit'](){const _0x133a1f=this['editor']['plugins']['get'](j);_0x133a1f['context']===this['editor']&&(_0x133a1f['hasActive']()||_0x133a1f['switchTo']('inline'));}['setActiveAnnotation'](_0x27f411){_0x27f411!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x27f411&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x27f411)&&this['_addAnnotationToBalloon'](_0x27f411,!0x0),_0x27f411['isActive']=!0x0),_0x27f411||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x27f411);}['attach'](_0x1e85bb){this['annotations']=_0x1e85bb;const _0x292973=this['editor']['plugins']['get'](j),_0x29a8f5=this['_balloon'];if(this['isAttached'])throw new _0xacf139('inlineannotations-attach-already-attached',this);if(_0x292973['context']!==this['editor'])throw new _0xacf139('inlineannotations-not-allowed-with-context',this);const _0x532698=this['editor']['plugins']['get'](b);this['listenTo'](_0x532698,'refresh',()=>{const _0x312191=_0x532698['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2ddaba,_0x3d87e7;!this['_forceRefresh']&&(_0x2ddaba=_0x312191,_0x3d87e7=this['_selectedAnnotations'],_0x2ddaba['length']===_0x3d87e7['length']&&_0x2ddaba['every'](_0x1d09c7=>_0x3d87e7['includes'](_0x1d09c7)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x312191),this['setActiveAnnotation'](_0x312191[0x0]||null));}),this['listenTo'](_0x532698,'blur',(_0x167328,{isAnnotationTracked:_0x16a9db})=>{this['activeAnnotation']&&_0x16a9db(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x532698,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x251f06,_0x45ecf8,_0xd631de)=>{_0xd631de||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1e85bb,'remove',(_0x4ad2c0,_0x563e5f)=>{this['_removeAnnotationFromBalloon'](_0x563e5f),_0x563e5f===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x29a8f5,'change:visibleView',(_0x215ba9,_0x3dfd88,_0x12a284,_0x5c2e4d)=>{_0x5c2e4d&&this['stopListening'](_0x5c2e4d);const _0xe1cee3=_0x1e85bb['getByView'](_0x12a284);_0x12a284&&_0xe1cee3&&(this['listenTo'](_0x12a284,'change:height',()=>{_0x29a8f5['updatePosition']();}),this['listenTo'](_0x12a284,'Esc',()=>{this['_closeAnnotation'](_0xe1cee3),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xe1cee3&&this['setActiveAnnotation'](_0xe1cee3));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x29a8f5['visibleView']&&(_0x1e85bb['getByView'](_0x29a8f5['visibleView'])&&_0x29a8f5['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 _0xacf139('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x10f3df of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x10f3df);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x208608){for(const _0x180120 of this['_selectedAnnotations'])_0x208608['includes'](_0x180120)||this['_manuallyClosed']['delete'](_0x180120);for(const _0x5b70b9 of this['annotations'])_0x208608['includes'](_0x5b70b9)||this['_removeAnnotationFromBalloon'](_0x5b70b9);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x17cb92 of _0x208608)this['_addAnnotationToBalloon'](_0x17cb92);}this['_selectedAnnotations']=_0x208608;}['_addAnnotationToBalloon'](_0x1ee5d8,_0x253765=!0x1){this['_manuallyClosed']['has'](_0x1ee5d8)||(this['_addedAnnotations']['has'](_0x1ee5d8)||this['_balloon']['hasView'](_0x1ee5d8['view'])||(this['_addedAnnotations']['add'](_0x1ee5d8),this['_balloon']['add']({'stackId':_0x1ee5d8['view']['id'],'view':_0x1ee5d8['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1ee5d8)}})),_0x253765&&this['_balloon']['showStack'](_0x1ee5d8['view']['id']));}['_getBalloonTargetForAnnotation'](_0x81275c){const _0x1b20a3=_0x81275c['target'],_0x5d7271=this['editor']['editing']['view'],_0x530e90=_0x5d7271['document']['selection']['getFirstRange'](),_0x14621f=_0x5d7271['domConverter']['viewRangeToDom'](_0x530e90);if(_0x14621f['collapse'](!0x0),_0x1b20a3){if(_0x1b20a3 instanceof _0x4bd5bc)return _0x1b20a3;let _0x2c21f6=[];for(const _0x589a69 of _0x1b20a3)_0x2c21f6['push'](...F(_0x589a69['getClientRects']()));_0x2c21f6=function(_0x2b57bb){const _0x2d266e=[];let _0x52f334=_0x2b57bb[0x0];for(let _0x2cfdfe=0x1;_0x2cfdfe<_0x2b57bb['length'];_0x2cfdfe++)P(_0x52f334,_0x2b57bb[_0x2cfdfe])?_0x52f334['width']+=_0x2b57bb[_0x2cfdfe]['width']:(_0x2d266e['push'](_0x52f334),_0x52f334=_0x2b57bb[_0x2cfdfe]);return _0x2d266e['push'](_0x52f334),_0x2d266e;}(_0x2c21f6);const _0x5c9495=_0x14621f['getBoundingClientRect']();return _0x2c21f6['find'](_0x2deebc=>_0x2deebc['top']<=_0x5c9495['top']&&_0x2deebc['bottom']>=_0x5c9495['bottom']&&_0x2deebc['left']<=_0x5c9495['left']&&_0x2deebc['right']>=_0x5c9495['right'])||_0x2c21f6[0x0];}return _0x81275c['targetRect']||_0x14621f;}['_removeAnnotationFromBalloon'](_0x2bc8be){this['_addedAnnotations']['has'](_0x2bc8be)&&this['_balloon']['hasView'](_0x2bc8be['view'])&&(this['_addedAnnotations']['delete'](_0x2bc8be),this['_balloon']['remove'](_0x2bc8be['view']));}['_closeAnnotation'](_0x2b5cb9){this['_manuallyClosed']['add'](_0x2b5cb9),this['_removeAnnotationFromBalloon'](_0x2b5cb9);}}function F(_0x3cd5a0){return Array['from'](_0x3cd5a0)['map'](DOMRect['fromRect']);}function P(_0x4de6c1,_0x3addcb){return _0x4de6c1['top']===_0x3addcb['top']&&_0x4de6c1['bottom']===_0x3addcb['bottom']&&_0x4de6c1['right']===_0x3addcb['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x28777d,_0x1f5427){super(_0x28777d),this['set']('isEmpty',!_0x1f5427['length']),this['focusTracker']=new _0x14dc48(),this['_annotationViews']=_0x1f5427,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x35c9d0({'focusables':_0x1f5427,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1f5427,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1f5427,'remove',(_0x4f28da,_0x3888bd)=>{_0x3888bd['isActive']&&this['focus'](),_0x1f5427['length']||(this['isEmpty']=!0x0);});const _0x382d43=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x28777d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1f5427},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x382d43['if']('isEmpty','ck-hidden',_0x9f6750=>!_0x9f6750)]},'children':[{'text':N(_0x28777d,'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 _0x187fc3 of this['_annotationViews'])this['focusTracker']['add'](_0x187fc3['element']);this['_annotationViews']['on']('change',(_0x2c50db,{added:_0x1f45f6,removed:_0x420723})=>{for(const _0x23cd65 of _0x1f45f6)this['focusTracker']['add'](_0x23cd65['element']);for(const _0x52183d of _0x420723)this['focusTracker']['remove'](_0x52183d['element']);});}}class p extends _0x41aa84{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x502325){super(_0x502325),this['archivedThreads']=new _0x2d3dca();}['init'](){const _0x4ffdd2=this['context'],_0xec6b5d=_0x4ffdd2['plugins']['get'](o),_0x509baf=_0x4ffdd2['plugins']['get'](y);this['listenTo'](_0xec6b5d,'addCommentThread',(_0x4966bb,{threadId:_0xc3cffb})=>{const _0x191c09=_0xec6b5d['getCommentThread'](_0xc3cffb);_0x191c09['archivedAt']&&this['archivedThreads']['add'](_0x191c09,this['_calculatePosition'](_0x191c09['archivedAt'])),this['listenTo'](_0x191c09,'change:archivedAt',(_0x478b43,_0x476907,_0x4eb4e5)=>{_0x4eb4e5?this['archivedThreads']['has'](_0x191c09)||this['archivedThreads']['add'](_0x191c09,this['_calculatePosition'](_0x191c09['archivedAt'])):this['archivedThreads']['has'](_0x191c09)&&this['archivedThreads']['remove'](_0x191c09);});}),this['listenTo'](_0xec6b5d,'removeCommentThread',(_0x34db02,{threadId:_0x346dd9})=>{const _0x3250fd=_0xec6b5d['getCommentThread'](_0x346dd9);this['stopListening'](_0x3250fd),this['archivedThreads']['has'](_0x3250fd)&&this['archivedThreads']['remove'](_0x3250fd);},{'priority':'highest'}),this['listenTo'](_0x509baf['collection'],'focus',(_0x2a09f2,_0x454fc9)=>{_0x454fc9['isVisible']||(_0x454fc9['isActive']=!0x0,_0x509baf['activate'](_0x454fc9));});}['_calculatePosition'](_0x36f015){const _0x119aa8=[...this['archivedThreads']]['findIndex'](_0x2676c3=>_0x2676c3['archivedAt']<_0x36f015);return _0x119aa8>-0x1?_0x119aa8:this['archivedThreads']['length'];}}class a extends _0xd49eba{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x40987b];}constructor(_0x4a6e41){super(_0x4a6e41),this['annotationViews']=new _0x32af43(),this['_pendingThreads']=[];}['init'](){const _0x3de6a8=this['editor'],_0x3ca3eb=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3de6a8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x331a0a,!0x0)),_0x3de6a8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2c4d91=this['_createCommentsArchiveButton'](_0x1f2a75);return _0x2c4d91['set']({'role':'menuitemcheckbox'}),_0x2c4d91;});const _0x593b27=_0x3de6a8['plugins']['get'](p),_0x4e0e3c=_0x3de6a8['plugins']['get']('Annotations'),_0x28e250=_0x3de6a8['plugins']['get']('CommentsRepository');_0x593b27['archivedThreads']['forEach'](_0x5a6d3c=>{this['_handleNewThread'](_0x5a6d3c);}),this['listenTo'](_0x593b27['archivedThreads'],'add',(_0x5bf4c5,_0x7ba2bf)=>{this['_handleNewThread'](_0x7ba2bf);}),this['listenTo'](_0x4e0e3c['collection'],'add',(_0x1a3444,_0x2a83cd)=>{const _0x55f611=this['_pendingThreads']['find'](_0x12b564=>{const _0x2651ef=_0x28e250['_threadToController']['get'](_0x12b564);return _0x2651ef&&_0x2a83cd['innerView']===_0x2651ef['view'];});if(_0x55f611){const _0x1e0bc7=this['_calculatePosition'](_0x55f611['archivedAt']);this['_addAnnotationToArchive'](_0x2a83cd,_0x1e0bc7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x55f611),0x1);}}),this['listenTo'](_0x593b27['archivedThreads'],'remove',(_0x5da84d,_0x505fb2)=>{const _0x148598=_0x3de6a8['config']['get']('collaboration.channelId');if(!_0x148598||_0x505fb2['channelId']===_0x148598){if(this['_pendingThreads']['includes'](_0x505fb2))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x505fb2),0x1);else{const _0x2005d9=_0x28e250['_threadToController']['get'](_0x505fb2),_0x3ea59c=_0x4e0e3c['getByInnerView'](_0x2005d9['view']);this['annotationViews']['remove'](_0x3ea59c['view']),this['stopListening'](_0x3ea59c),this['stopListening'](_0x3ea59c['focusableElements']);}}}),this['listenTo'](_0x4e0e3c['collection'],'add',(_0x149bbb,_0x17b497)=>{this['listenTo'](_0x17b497,'escape',_0x3ca3eb);}),this['listenTo'](_0x4e0e3c['collection'],'remove',(_0x549e44,_0x17adad)=>{this['stopListening'](_0x17adad,'escape',_0x3ca3eb);});}['_addAnnotationToArchive'](_0x5740ba,_0xf55a7){this['listenTo'](_0x5740ba,'set:isVisible',_0x473252=>{_0x473252['return']=!0x1,_0x473252['stop']();}),this['annotationViews']['add'](_0x5740ba['view'],_0xf55a7);}['_handleNewThread'](_0x2f0eff){const _0x37c110=this['editor']['plugins']['get']('CommentsRepository'),_0x26923f=this['editor']['plugins']['get']('Annotations'),_0x588711=this['editor']['config']['get']('collaboration.channelId');if(!_0x588711||_0x2f0eff['channelId']===_0x588711){const _0x2c463a=_0x37c110['_threadToController']['get'](_0x2f0eff);if(!_0x2c463a)return void this['_pendingThreads']['push'](_0x2f0eff);const _0x48681e=this['_calculatePosition'](_0x2f0eff['archivedAt']),_0x319177=_0x26923f['getByInnerView'](_0x2c463a['view']);_0x319177['isVisible']&&_0x26923f['_visibleAnnotations']['remove'](_0x319177),this['_addAnnotationToArchive'](_0x319177,_0x48681e);}}['_calculatePosition'](_0x5dbcfc){const _0x1ffe00=this['editor']['config']['get']('collaboration.channelId'),_0x31ac88=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4eae84=>_0x4eae84['channelId']===_0x1ffe00)['findIndex'](_0x345355=>_0x345355['archivedAt']<_0x5dbcfc);return _0x31ac88<0x0||_0x31ac88>this['annotationViews']['length']?this['annotationViews']['length']:_0x31ac88-0x1;}['_toggleDialog'](){const _0x17721f=this['editor'],_0x22802a=_0x17721f['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x17721f['locale'],this['annotationViews'])),'commentsArchive'===_0x22802a['id']?_0x22802a['hide']():_0x22802a['show']({'id':'commentsArchive','title':N(_0x17721f['locale'],'COMMENTS_ARCHIVE'),'icon':_0x28c328,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x20cf06['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2b8896,_0x585463=!0x1){const _0x5b7e8c=this['editor']['locale'],_0x461d36=this['editor']['plugins']['get']('Dialog'),_0x12108a=new _0x2b8896(_0x5b7e8c);return _0x12108a['bind']('isEnabled')['to'](this,'isEnabled'),_0x12108a['bind']('isOn')['to'](_0x461d36,'id',_0x5738d9=>'commentsArchive'===_0x5738d9),_0x12108a['set']({'label':N(_0x5b7e8c,'COMMENTS_ARCHIVE'),'icon':_0x28c328,'isToggleable':!0x0}),_0x585463&&(_0x12108a['tooltip']=!0x0),this['listenTo'](_0x12108a,'execute',()=>this['_toggleDialog']()),_0x12108a;}['_hideDialogOnAnnotationEscape']=_0x137995=>{const _0x2253ff=_0x137995['source'];if(!this['annotationViews']['has'](_0x2253ff['view']))return;const _0x13b457=this['editor']['plugins']['get']('Dialog');_0x13b457['isOpen']&&'commentsArchive'===_0x13b457['id']&&(_0x13b457['hide'](),_0x137995['stop']());};}class gi extends _0xd49eba{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 _0x1ab5fd,ContextPlugin as _0x4cc9b8,PendingActions as lt,Command as _0x5a73bb,Plugin as _0x4dde71,Context as _0x419674}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x5d3564,uid as _0x483b07,KeystrokeHandler as jt,FocusTracker as _0x1e6d7b,diff as _0x4fa66d,Collection as _0x2bdfd3,Rect as _0x48c8c0,CKEditorError as _0x542f67,first as _0x206a23,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x3eb79f,keyCodes as _0x449fd0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x25a327,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x2c0ed7,trimHtml as ts,LateFocusDropdownButtonView as _0x2f210f,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x47e754}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,cloneDeep as wt,set as yt,unset as Ct,isEqual as At,debounce as _0x30831a}from'es-toolkit/compat';import{IconUndo as _0x36d79e,IconCheck as _0x2f46b3,IconPencil as _0x2aebe4,IconRemoveComment as _0x2a2e86,IconThreeVerticalDots as _0x245ce4,IconAddComment as _0x585956,IconCommentsArchive as _0x4f9773}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x5d2dd8,ButtonView as _0x451c43,ViewCollection as _0x539dc0,createDropdown as _0x4c42ed,ListView as _0x320168,focusChildOnDropdownOpen as _0x3b5180,ListItemView as _0x331c53,MenuBarMenuListItemButtonView as _0x28d01d,BodyCollection as _0x5a566a,BalloonPanelView as _0x34763c,ContextualBalloon as _0x469550,Dialog as _0x559cf2,DialogViewPosition as _0x26194c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x1ad6fd}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 _0x4b4914}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0xef7933}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0x5d3564(){['model'];['view'];constructor(_0x37e528,_0x598b85){super(),this['model']=_0x37e528,this['model']['_isAttached']=!0x0,this['view']=_0x598b85,this['listenTo'](_0x598b85,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x598b85,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x598b85,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x598b85,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x598b85,'addComment',(_0x1f42ba,_0x59d01a)=>this['addComment'](_0x59d01a)),this['listenTo'](_0x598b85,'updateComment',(_0x58ccf7,_0x489838,_0x3ef695)=>this['updateComment'](_0x489838,_0x3ef695)),this['listenTo'](_0x598b85,'removeComment',(_0x5e8281,_0x55ec3a)=>this['removeComment'](_0x55ec3a));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x507b10){this['model']['addComment']({'content':_0x507b10,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x22da51,_0xc14f7e){this['model']['getComment'](_0x22da51)['update']({'content':_0xc14f7e});}['removeComment'](_0x311d69){this['model']['getComment'](_0x311d69)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x3db9d3,_0x5663b9,_0x236b58){const t=_0x3db9d3['t'];switch(_0x5663b9){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'},_0x236b58);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'},_0x236b58);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'},_0x236b58);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'},_0x236b58);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x236b58);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'},_0x236b58);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'},_0x236b58);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'},_0x236b58);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(_0x4bfe18,_0x13aed1){super(_0x4bfe18);const _0xfbb15e=_0x483b07();this['main']=this['createCollection'](),this['editable']=new Vt(_0x4bfe18,_0x13aed1,void 0x0,{'label':()=>N(_0x4bfe18,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4bfe18['uiLanguageDirection'],'lang':_0x4bfe18['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xfbb15e},'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(_0x557e40){super(_0x557e40),this['view']=new Rt(_0x557e40['locale'],_0x557e40['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x4a714f=this['editor']['editing']['view'],_0x3d4828=this['view']['editable'],_0x290237=_0x4a714f['document']['getRoot']();_0x3d4828['name']=_0x290237['rootName'],this['view']['render']();const _0x4f9869=_0x3d4828['element'];this['setEditableElement'](_0x3d4828['name'],_0x4f9869),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4a714f['attachDomRoot'](_0x4f9869),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
+ _0x5d3564(_0x1ab5fd){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x44cfb8={}){function _0x338e5f(_0x40caca){return _0x40caca['map'](_0x1ca63d=>String['fromCharCode'](_0x1ca63d))['join']('');}(_0x44cfb8=Object['assign']({},_0x44cfb8))['plugins']||(_0x44cfb8['plugins']=hs['defaultPlugins']),super(_0x44cfb8),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[_0x338e5f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x338e5f([0x76,0x69,0x65,0x77])][_0x338e5f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x338e5f([0x61,0x75,0x74,0x6f]),this[_0x338e5f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x338e5f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x338e5f([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x338e5f([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x338e5f([0x6f,0x6b])});}['create'](){const _0x55fab4=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x55fab4))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5c160f=>{const _0x25101f=this['model']['document']['getRoot'](),_0x6ebdc6=_0x25101f&&_0x25101f['getChild'](_0x25101f['childCount']-0x1);_0x5c160f['setSelection'](_0x6ebdc6,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2eb826=this['editing']['view'],_0x2cc372=_0x2eb826['document']['getRoot'](),_0x2ff169=_0x2cc372['getChild'](0x0);_0x2cc372['childCount']>0x1||!_0x2ff169||'p'!=_0x2ff169['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x2eb826,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2ff169['placeholder']=this['placeholder']),Ft({'view':_0x2eb826,'element':_0x2ff169,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2ff169);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x591065,_0xb709c3={}){super(_0x591065),this['editor']=null,this['_editorConfig']=_0xb709c3,this['set']('value',_0xb709c3['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x591065,'Reply...')),this['set']('submitLabel',N(_0x591065,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1e6d7b(),this['focusCycler']=new _0x5d2dd8({'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',(_0x641cd6,_0x34bbf1)=>{this['cancelButtonView']['fire']('execute'),_0x34bbf1();}),this['keystrokes']['set']('Ctrl+Enter',(_0x43b2f,_0x51c1ae)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x51c1ae());}),this['on']('submit',(_0x5c3828,_0x3fa976)=>{_0x3fa976['length']>0xfde8?(alert(N(_0x591065,'TOO_LONG_COMMENT_ALERT',[_0x3fa976['length'],0xfde8])),_0x5c3828['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 _0xef6111=this['editor'];this['element']['insertBefore'](_0xef6111['ui']['element'],this['element']['firstChild']),_0xef6111['model']['document']['on']('change',()=>this['value']=_0xef6111['getData']()),_0xef6111['bind']('placeholder')['to'](this),this['focusables']['add'](_0xef6111['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x311deb){-0x1===_0x311deb?(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:_0x5d6506}=this,_0x34e65d=new _0x451c43(_0x5d6506);return _0x34e65d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x34e65d['withText']=!0x0,_0x34e65d['bind']('label')['to'](this,'submitLabel'),_0x34e65d['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x34e65d['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x165a6e,_0x192624)=>!_0x192624&&!!_0x165a6e['trim']()),_0x34e65d;}['_createCancelButton'](){const {locale:_0x1d308d}=this,_0x1311b6=new _0x451c43(_0x1d308d);return _0x1311b6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1311b6['label']=N(_0x1d308d,'Cancel'),_0x1311b6['withText']=!0x0,_0x1311b6['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1311b6;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xe1836b=>{this['focusTracker']['add'](_0xe1836b['element']);}),this['focusables']['on']('change',(_0x690c70,_0x217eff)=>{for(const _0x15be68 of Array['from'](_0x217eff['added'])['reverse']())this['focusTracker']['add'](_0x15be68['element']);});}}class ie extends kt{constructor(_0x971922,_0x583ec2,_0x34be96){super(_0x971922),this['commentInputView']=new es(_0x971922,_0x34be96),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2bf58e,_0x1b1374)=>_0x2bf58e||!!_0x1b1374),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 _0x25a327(_0x971922,_0x583ec2),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'](_0x3d8978){this['commentInputView']['focus'](_0x3d8978);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x167c2d,_0x429f66)=>{const {submitButtonView:_0x455c4e,cancelButtonView:_0x574e81,editor:_0x51e6c1}=this['commentInputView'];[_0x455c4e['element'],_0x574e81['element'],_0x51e6c1?_0x51e6c1['editing']['view']['getDomRoot']():null]['filter'](_0x192ace=>_0x192ace)['some'](_0x3f7869=>_0x3f7869['contains'](_0x429f66['target']))||(this['focus'](),_0x429f66['preventDefault']());});}}class rs extends kt{constructor(_0x1035c2){super(_0x1035c2);const _0x1cbe53=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1cbe53['to']('count',_0xc5ba97=>N(_0x1035c2,'NUMBER_OF_COMMENTS',_0xc5ba97))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1ef3f6,_0x3f0461,_0x12dbb9){super(_0x1ef3f6);const _0x2bcf64=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x3f0461['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x3f0461,this['_config']=_0x12dbb9,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1e6d7b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5d2dd8({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x82039d=>this['commentViews']['map'](_0xb11fc3=>_0xb11fc3['element'])['includes'](_0x82039d['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x1ef3f6),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x52fdac=>_0x52fdac-this['_config']['maxCommentsWhenCollapsed']);for(const _0x465554 of _0x3f0461['comments'])this['_handleNewCommentModel'](_0x465554);this['_handleInfoComment'](),this['listenTo'](_0x3f0461['comments'],'add',(_0x2e7f52,_0x39faac)=>{const _0x2849a5=this['_calculatePosition'](_0x39faac);this['length']++,this['_handleNewCommentModel'](_0x39faac,_0x2849a5),this['refreshVisibleViews']();}),this['listenTo'](_0x3f0461['comments'],'remove',(_0x359acc,_0x361219)=>{this['length']--,this['_handleRemoveCommentModel'](_0x361219),this['refreshVisibleViews']();}),this['listenTo'](_0x3f0461,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x3f0461,'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',_0x2bcf64['if']('length','ck-hidden',_0x100ae2=>!_0x100ae2)],'aria-label':N(_0x1ef3f6,'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'](_0x300f88){-0x1===_0x300f88?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4ec0e8 of this['commentViews'])_0x4ec0e8['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x5be3e6,_0x4ea109){const _0x87682f=new this['_config']['CommentView'](this['locale'],_0x5be3e6,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x87682f['viewUid']=_0x5be3e6['id'],_0x87682f['delegate']('removeComment')['to'](this),_0x87682f['delegate']('updateComment')['to'](this),_0x87682f['delegate']('resolveCommentThread')['to'](this),_0x87682f['delegate']('editorReady')['to'](this),_0x87682f['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x87682f,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x87682f,_0x4ea109);}['_calculatePosition'](_0x229351){const _0x394bde=this['_model']['_findOptimalIndex'](_0x229351);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x229351['authoredAt']?_0x394bde-0x1:_0x394bde:_0x394bde-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1986d5={'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'],_0x1986d5,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1986d5));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3dd09d){const _0x5b3d27=this['commentViews']['remove'](_0x3dd09d['id']);this['stopListening'](_0x5b3d27),_0x5b3d27['isEditMode']&&this['_updateHasDirtyComment'](),_0x5b3d27['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x72610e=>_0x72610e['isEditMode']);}['_rearrangeCollapse'](){const _0x13ea8f=function(_0x355ee0){const _0x472438=new _0x2bdfd3();for(const _0x18c613 of _0x355ee0)_0x472438['add'](_0x18c613);return _0x472438;}(this['commentViews']),_0x40cc99=this['_collapsedCommentsView']['count'];for(let _0x1e88bf=0x1;_0x1e88bf<=_0x40cc99;_0x1e88bf++)_0x13ea8f['remove'](0x1);for(const _0x1ea6b4 of _0x13ea8f)_0x1ea6b4['collapse']();_0x40cc99>0x0&&_0x13ea8f['add'](this['_collapsedCommentsView'],0x1),ns(_0x4fa66d(Array['from'](this['visibleViews']),Array['from'](_0x13ea8f)),this['visibleViews'],_0x13ea8f);}['_rearrangeExpand'](){ns(_0x4fa66d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xce0fe5 of this['visibleViews'])_0xce0fe5['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x159627=>{this['focusTracker']['add'](_0x159627['element']),this['keystrokes']['listenTo'](_0x159627['element']);}),this['commentViews']['on']('change',(_0x39d359,_0x30ecd7)=>{for(const _0x1d9341 of _0x30ecd7['removed'])this['focusTracker']['remove'](_0x1d9341['element']),this['keystrokes']['stopListening'](_0x1d9341['element']);for(const _0x285e50 of Array['from'](_0x30ecd7['added'])['reverse']())this['focusTracker']['add'](_0x285e50['element']),this['keystrokes']['listenTo'](_0x285e50['element']);});}}function ns(_0x2f8206,_0x9e749c,_0x4aac5e){let _0x1da830=0x0;for(const _0x4df339 of _0x2f8206)switch(_0x4df339){case'insert':_0x9e749c['add'](_0x4aac5e['get'](_0x1da830),_0x1da830),_0x1da830++;break;case'delete':_0x9e749c['remove'](_0x1da830);break;case'equal':_0x1da830++;}}class oe extends kt{constructor(_0x3859e7){super(_0x3859e7);const _0x25e5e2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x25e5e2['to']('contextValue',_0x1790a8=>N(_0x3859e7,'THREAD_CONTEXT_LABEL',_0x1790a8)),'tabindex':-0x1},'children':[{'text':_0x25e5e2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3c672f,_0x1425ee){super(_0x3c672f);const _0x21cfab=this['bindTemplate'];this['_model']=_0x1425ee,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1e6d7b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5d2dd8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x52069e=>!!_0x52069e),this['bind']('contextValue')['to'](this['_model'],'context',_0x17ff6b=>_0x17ff6b&&_0x17ff6b['value']?this['_trimContextValue'](_0x17ff6b['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',_0x21cfab['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 _0x360e1d=new _0x451c43(this['locale']);return _0x360e1d['label']=N(this['locale'],'Reopen'),_0x360e1d['tooltip']=N(this['locale'],'Reopen'),_0x360e1d['icon']=_0x36d79e,_0x360e1d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x32a9dd=>!_0x32a9dd),_0x360e1d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4556ba,_0x1d9a4e)=>_0x4556ba&&_0x1d9a4e),_0x360e1d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x360e1d;}['_trimContextValue'](_0x5bb7f5){if(_0x5bb7f5['length']<0x96)return _0x5bb7f5;const _0x2f8e2c=_0x5bb7f5['lastIndexOf']('\x20',0x93);return _0x5bb7f5['substring'](0x0,_0x2f8e2c>-0x1?_0x2f8e2c:0x93)+'...';}['_attachContextActions'](){const _0x5de5d6=this['element']['querySelector']('.ck-context'),_0x3c0a25=_0x5de5d6['querySelector']('.ck-context__value');this['listenTo'](_0x5de5d6,'mouseenter',()=>{_0x3c0a25['offsetWidth']<_0x3c0a25['scrollWidth']&&_0x5de5d6['classList']['add']('overlay');}),this['listenTo'](_0x5de5d6,'mouseleave',()=>{_0x5de5d6['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4510ae of this['focusables'])this['focusTracker']['add'](_0x4510ae['element']),this['keystrokes']['listenTo'](_0x4510ae['element']);}['_createContextView'](){const _0x3bb80c=new oe(this['locale']);return _0x3bb80c['bind']('contextValue')['to'](this),_0x3bb80c;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x6f3757,_0x517bc7,_0x5fd468,_0x4996f3){super(_0x6f3757),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x517bc7,this['_localUser']=_0x5fd468,this['_config']=_0x4996f3,this['commentThreadHeaderView']=new Xt(_0x6f3757,_0x517bc7),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x6f3757,N(_0x6f3757,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x6f3757,_0x517bc7,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4996f3)),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',(_0x4ef35f,_0x59949e)=>_0x4ef35f||!!_0x59949e),this['bind']('isUnlinked')['to'](_0x517bc7,'unlinkedAt',_0x1a4efb=>!!_0x1a4efb),this['bind']('ariaLabel')['to'](this,'length',_0x18ed58=>{const _0x2d853c=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x18ed58,_0x2d853c]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1e6d7b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5d2dd8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x24bd22=>_0x24bd22['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 _0xaa5877=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5107e1=_0xaa5877['commentInputView'];return _0xaa5877['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5107e1,'value',(_0x2bee4f,_0x2dbdf6,_0x53f441,_0x43f9b5,_0x40d8f0)=>!!_0x40d8f0||!!_0x43f9b5&&_0x53f441&&!_0x2dbdf6||_0x2bee4f&&_0x53f441&&!_0x2dbdf6),_0x5107e1['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3af0a7,_0x3557b2,_0x561ca3)=>{let _0x16c080;return _0x16c080=_0x561ca3&&_0x3557b2?'Reply\x20to\x20reopen\x20discussion...':_0x3af0a7?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x16c080);}),_0x5107e1['bind']('submitLabel')['to'](this,'length',_0xe86082=>N(this['locale'],_0xe86082?'Reply':'Comment')),_0x5107e1['on']('submit',(_0x503727,_0x5da9a2)=>{this['fire']('addComment',_0x5da9a2),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5107e1['on']('cancel',()=>{this['focus']();}),_0x5107e1['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5107e1['on']('cancel',_0x30a37d=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x30a37d['stop']());}),this['on']('change:isActive',(_0x23a2fe,_0x5c81ad,_0x44959c)=>{_0x44959c||this['length']||_0x5107e1['value']||this['fire']('removeCommentThread');}),_0xaa5877;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x5af397,_0x477058,_0x59c28d,_0x7aa2d5){super(_0x5af397,_0x477058,_0x59c28d,_0x7aa2d5),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5af397,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x5afd12,_0x1e1a71,_0x1c55d8)=>{_0x1c55d8||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x532657,_0x50cf23,_0x306e71)=>{_0x306e71&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5912a7=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5912a7['if']('isActive','ck-thread--active'),_0x5912a7['if']('isUnlinked','ck-thread--unlinked'),_0x5912a7['to']('actionIndicator',_0x584a28=>_0x584a28?'ck-thread--'+_0x584a28:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5912a7['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 _0x34e610 of this['commentsListView']['commentViews'])_0x34e610['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1e3d51}=this,_0x28066d=this['commentsListView']['commentViews']['get'](0x0);_0x28066d===this['_boundFirstCommentView']||_0x28066d['isSystemComment']||(this['_boundFirstCommentView']=_0x28066d,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x28066d,'actionIndicator',_0x282771=>'remove'===_0x282771?'remove':null),_0x28066d['placeholder']=N(_0x1e3d51,'Write\x20a\x20comment...'),_0x28066d['removeButton']['on']('execute',_0x2efb05=>{_0x2efb05['stop'](),this['showConfirm'](N(_0x1e3d51,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x28066d['focus']();}),_0x28066d['actionBar']['add'](this['resolveButton'],0x0),_0x28066d['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x3ad30e=new _0x2c0ed7(this['locale']);return _0x3ad30e['label']=N(this['locale'],'Resolve'),_0x3ad30e['tooltip']=N(this['locale'],'Resolve'),_0x3ad30e['icon']=_0x2f46b3,_0x3ad30e['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3ad30e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x32c2e3=>!_0x32c2e3),_0x3ad30e['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4f5787,_0x45195c)=>_0x4f5787&&!_0x45195c),_0x3ad30e['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3ad30e;}['_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(_0x24aba6){super(_0x24aba6),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x3df4b0,_0x58402c,_0xca8210)=>{this['element']['innerHTML']=_0xca8210;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x442c66,_0x518baf,_0x141a02){super(_0x442c66),this['_model']=_0x518baf,this['_config']=_0x141a02,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x518baf,'content',_0x518baf,'authoredAt',(_0x3010a8,_0x2352f0)=>N(_0x442c66,'COMMENT_ARIA_LABEL',[_0x518baf['author']['name'],_0x141a02['formatDateTime'](_0x2352f0),new DOMParser()['parseFromString'](_0x3010a8,'text/html')['body']['textContent'],_0x518baf['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x442c66,N(_0x442c66,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x539dc0(),this['focusTracker']=new _0x1e6d7b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5d2dd8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x309479=>_0x309479['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 _0x3583bc=new is(this['locale']);return _0x3583bc['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x5062aa,_0x15f32a)=>_0x15f32a?ts(_0x5062aa,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x5062aa),_0x3583bc;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x40c3fe=new es(this['locale'],this['_config']['editorConfig']);return _0x40c3fe['value']=this['_model']['content'],_0x40c3fe['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x40c3fe['submitLabel']=N(this['locale'],'Save'),_0x40c3fe['on']('submit',(_0x2edb6c,_0x3e99a7)=>{this['fire']('updateComment',this['_model']['id'],_0x3e99a7),this['switchToDisplayMode'](),this['focus']();}),_0x40c3fe['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x40c3fe['once']('editorReady',()=>{_0x40c3fe['focus']();}),_0x40c3fe['createEditor'](),_0x40c3fe['delegate']('editorReady')['to'](this),_0x40c3fe['delegate']('editorDestroyed')['to'](this),_0x40c3fe;}['_setupKeyboardNavigation'](){const _0x5a2159=this['element'];this['keystrokes']['listenTo'](_0x5a2159);for(const _0xf4d393 of this['focusables'])this['focusTracker']['add'](_0xf4d393['element']),this['keystrokes']['listenTo'](_0xf4d393['element']);this['focusables']['on']('change',(_0x4956c9,_0xa1e5d4)=>{for(const _0x24522b of _0xa1e5d4['removed'])this['focusTracker']['remove'](_0x24522b['element']),this['keystrokes']['stopListening'](_0x24522b['element']);for(const _0x2fc626 of _0xa1e5d4['added'])this['focusTracker']['add'](_0x2fc626['element']),this['keystrokes']['listenTo'](_0x2fc626['element']);}),this['keystrokes']['set']('enter',(_0x340c01,_0x9502d5)=>{_0x5a2159===_0x340c01['target']&&(this['focusCycler']['focusFirst'](),_0x9502d5());}),this['keystrokes']['set']('esc',(_0x29f5f7,_0x3388ab)=>{_0x5a2159!==_0x29f5f7['target']&&(this['focus'](),_0x3388ab());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(di){['actionBar'];['userView'];constructor(_0x42545c,_0x147620,_0x5e1440){super(_0x42545c,_0x147620,_0x5e1440),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x42545c,'Reply...')),this['bind']('authoredAt')['to'](_0x147620),this['bind']('resolvedAt')['to'](_0x147620),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 _0x25a327(_0x42545c,_0x147620['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x147620,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0xc1d038=this['bindTemplate'],_0x506059=[{'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':_0xc1d038['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xc1d038['to']('authoredAt',_0x194c81=>this['_config']['formatDateTime'](_0x194c81))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0xc1d038['if']('isEditMode','ck-comment__actions--hidden'),_0xc1d038['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']&&_0x506059['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0xc1d038['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0xc1d038['if']('isEditMode','ck-comment--edit'),_0xc1d038['if']('isSystemComment','ck-comment--info'),_0xc1d038['to']('actionIndicator',_0x472055=>_0x472055?'ck-comment--'+_0x472055:'')],'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':_0x506059}]}]};}['_createEditButton'](){const _0x3088fa=new _0x451c43(this['locale']);return _0x3088fa['label']=N(this['locale'],'Edit'),_0x3088fa['icon']=_0x2aebe4,_0x3088fa['withText']=!0x0,_0x3088fa['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x3088fa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x186655=>!_0x186655),_0x3088fa['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x3088fa['on']('execute',()=>this['switchToEditMode']()),_0x3088fa;}['_createRemoveButton'](){const _0x46db01=new _0x451c43(this['locale']);return _0x46db01['label']=N(this['locale'],'Remove'),_0x46db01['icon']=_0x2a2e86,_0x46db01['withText']=!0x0,_0x46db01['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x46db01['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x568ef4=>!_0x568ef4),_0x46db01['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x46db01['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x46db01;}['_createDropdown'](){const _0x70c6e4=_0x4c42ed(this['locale'],_0x2f210f),_0x1a408e=_0x70c6e4['panelView']['children'],_0x1e0d5b=new _0x320168(this['locale']),_0x2d8bbb=_0x70c6e4['bindTemplate'];_0x3b5180(_0x70c6e4,()=>this['items']['find'](_0x2527ef=>_0x2527ef['isVisible'])),_0x70c6e4['extendTemplate']({'attributes':{'class':[_0x2d8bbb['if']('isVisible','ck-hidden',_0x4d206=>!_0x4d206)]}});const _0x449939=(_0x10cb06,_0x4d7bb8=-0x1)=>{const _0x48da9d=new _0x331c53(this['locale']);_0x48da9d['children']['add'](_0x10cb06);const _0x3926ac=_0x4d7bb8>-0x1?_0x4d7bb8:_0x1e0d5b['items']['length'];_0x1e0d5b['items']['add'](_0x48da9d,_0x3926ac);const _0x5e7cd3=Array['from'](this['items']);_0x70c6e4['unbind']('isEnabled','isVisible'),_0x70c6e4['bind']('isEnabled')['toMany'](_0x5e7cd3,'isEnabled',(..._0x576a74)=>_0x576a74['some'](_0x3d2f5c=>_0x3d2f5c)),_0x70c6e4['bind']('isVisible')['toMany'](_0x5e7cd3,'isVisible',(..._0x38b949)=>_0x38b949['some'](_0x579a0=>_0x579a0));};_0x70c6e4['panelPosition']='sw',_0x70c6e4['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x245ce4});for(const _0x2d9774 of this['items'])_0x449939(_0x2d9774);return _0x1a408e['add'](_0x1e0d5b),_0x70c6e4['listenTo'](this['items'],'add',(_0x12173c,_0x1014db,_0x3ab104)=>{_0x449939(_0x1014db,_0x3ab104);}),_0x70c6e4['listenTo'](this['items'],'remove',(_0x450280,_0x45595d,_0x116349)=>{_0x1e0d5b['items']['remove'](_0x116349);}),_0x70c6e4;}['_attachActions'](_0x7bd340,_0x2d30e4){const _0x576b01=_0x7bd340&&_0x7bd340['element'];_0x576b01&&(this['listenTo'](_0x576b01,'mouseenter',()=>this['actionIndicator']=_0x2d30e4),this['listenTo'](_0x576b01,'focus',()=>this['actionIndicator']=_0x2d30e4),this['listenTo'](_0x576b01,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x576b01,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x16d89a=super['_createCommentInputView']();return _0x16d89a['bind']('placeholder')['to'](this),_0x16d89a;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x1904c4){const _0x42f06e=Dt(_0x1904c4,0x1e),_0xecbba0=new MutationObserver(_0x1a4520=>{for(const _0x539aa5 of _0x1a4520)('attributes'==_0x539aa5['type']&&'class'==_0x539aa5['attributeName']||'childList'==_0x539aa5['type']||'characterData'==_0x539aa5['type'])&&_0x42f06e();});return{'attach'(_0x5508b3){_0xecbba0['observe'](_0x5508b3,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xecbba0['disconnect'](),_0x42f06e['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x257552,_0x2252f3){super(_0x257552),this['id']=_0x483b07(),this['focusTracker']=new _0x1e6d7b(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x17e147,_0x243e54)=>this['fire']('Esc',_0x243e54)),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'](_0x2252f3),this['mainView']=_0x2252f3;const _0x265fe5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x265fe5['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 _0x395ab6=this['element']['clientHeight'];_0x395ab6&&(this['height']=_0x395ab6);}}class T extends/* #__PURE__ -- @preserve */
29
+ _0x5d3564(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xd047a2,target:_0x95ce5d,type:_0x1f1791,isVisible:_0x12c108=!0x0}){super(),this['view']=_0xd047a2,this['view']['element']||this['view']['render'](),this['_type']=_0x1f1791,this['_target']=_0x95ce5d,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2bdfd3([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x701977,_0x24b1b7)=>{this['view']['focusTracker']['add'](_0x24b1b7);}),this['focusableElements']['on']('remove',(_0x258069,_0x41de0f)=>{this['view']['focusTracker']['remove'](_0x41de0f);}),this['set']('isVisible',_0x12c108);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x6d907e=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x6d907e),_0x6d907e;}get['targetRect'](){const _0x23b630=this['target'];if(null===_0x23b630)return null;if(_0x23b630 instanceof _0x48c8c0)return _0x23b630;const _0x3da48d=_0x23b630['filter'](_0x543b53=>function(_0x40d84f){const _0x56ee83=_0x40d84f['offsetParent'];if(_0x56ee83)return!0x0;const _0x2bdbcc=_0x40d84f['getClientRects']()['item'](0x0);return!!_0x2bdbcc;}(_0x543b53));return 0x0===_0x3da48d['length']?null:new _0x48c8c0(_0x3da48d[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x43515d){this['view']['isActive']=_0x43515d,this['view']['mainView']['isActive']=_0x43515d;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x91154f){if(!(null===_0x91154f||_0x91154f instanceof _0x48c8c0||Array['isArray'](_0x91154f)&&_0x91154f['every'](_0x44e243=>fi(_0x44e243))))throw new _0x542f67('annotation-invalid-target',null,{'target':_0x91154f});}['_getNormalizedTarget'](){const _0x8339e5='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x8339e5)?[_0x8339e5]:_0x8339e5;}}function fi(_0x5d3821){return null!==_0x5d3821&&'object'==typeof _0x5d3821&&'nodeType'in _0x5d3821&&0x1===_0x5d3821['nodeType'];}class S extends _0x2bdfd3{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x29ed95=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1e6d7b(),this['_focusTracker']['on']('change:isFocused',(_0x43739a,_0x12679b,_0xbf72e)=>{_0xbf72e||this['fire']('blur');});for(const _0x12daf3 of _0x29ed95)this['add'](_0x12daf3);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x35c575){if(this['has'](_0x35c575))throw new _0x542f67('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x35c575['innerView'],_0x35c575),this['_viewToAnnotation']['set'](_0x35c575['view'],_0x35c575);for(const _0xd9fc8 of _0x35c575['focusableElements'])this['_focusTracker']['add'](_0xd9fc8);this['listenTo'](_0x35c575['focusableElements'],'add',(_0x5f5ba6,_0x4c50b1)=>{this['_focusTracker']['add'](_0x4c50b1);}),this['listenTo'](_0x35c575['focusableElements'],'remove',(_0x352f1b,_0x2e5d59)=>{this['_focusTracker']['remove'](_0x2e5d59);}),this['listenTo'](_0x35c575['view']['focusTracker'],'change:isFocused',(_0x205a3b,_0x529d13,_0x3bcc7d)=>{_0x3bcc7d&&this['fire']('focus',_0x35c575);}),_0x35c575['updateTargetRect']();const _0x189e84=this['_getOrderInContent'](_0x35c575['view']['targetRect']);return super['add'](_0x35c575,_0x189e84);}['remove'](_0x4a02d6){if(!this['has'](_0x4a02d6))throw new _0x542f67('annotationcollection-not-existing-item',null);this['stopListening'](_0x4a02d6['view']['focusTracker']),this['stopListening'](_0x4a02d6['focusableElements']);for(const _0x51c006 of _0x4a02d6['focusableElements'])this['_focusTracker']['remove'](_0x51c006);return this['_viewToAnnotation']['delete'](_0x4a02d6['view']),this['_innerViewToAnnotation']['delete'](_0x4a02d6['innerView']),super['remove'](_0x4a02d6);}['getByInnerView'](_0xfaaaef){return this['_innerViewToAnnotation']['get'](_0xfaaaef);}['getByView'](_0x2e0fb5){return this['_viewToAnnotation']['get'](_0x2e0fb5);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0xd2b2a1 of this)_0xd2b2a1['updateTargetRect']();this['_sort']();}['_sort'](){const _0xbebc3f=Array['from'](this)['sort']((_0x1af82f,_0x31cbba)=>w(_0x1af82f['view']['targetRect'],_0x31cbba['view']['targetRect']));for(let _0x69cce9=_0xbebc3f['length']-0x1;_0x69cce9>0x0;_0x69cce9--){const _0x5f3b41=_0xbebc3f[_0x69cce9];_0x69cce9!==this['getIndex'](_0x5f3b41)&&(this['remove'](_0x5f3b41),this['add'](_0x5f3b41));}}['_getOrderInContent'](_0x12d5cb){let _0x916b94=0x0;if(!_0x12d5cb)return this['length'];for(const _0x83ec0b of this){const _0x434f09=_0x83ec0b['view']['targetRect'];if(_0x434f09){if(w(_0x12d5cb,_0x434f09)<0x0)return _0x916b94;_0x916b94++;}}return _0x916b94;}}function v({source:_0x2bdf9d,target:_0x4b6278,filter:_0x729ec5}){for(const _0x23b0e0 of _0x2bdf9d)_0x729ec5(_0x23b0e0)&&_0x4b6278['add'](_0x23b0e0);_0x4b6278['listenTo'](_0x2bdf9d,'add',(_0x590f1b,_0x1fb34b)=>{_0x729ec5(_0x1fb34b)&&_0x4b6278['add'](_0x1fb34b);}),_0x4b6278['listenTo'](_0x2bdf9d,'remove',(_0x55d1fd,_0x25281e)=>{_0x4b6278['has'](_0x25281e)&&_0x4b6278['remove'](_0x25281e);});}function w(_0x17d0ab,_0x2a3144){if(null===_0x17d0ab&&null===_0x2a3144)return 0x0;if(null===_0x17d0ab)return-0x1;if(null===_0x2a3144)return 0x1;const _0x49b8d8=_0x17d0ab['top']-_0x2a3144['top'];return 0x0==_0x49b8d8?_0x17d0ab['left']-_0x2a3144['left']:_0x49b8d8;}class y extends _0x4cc9b8{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ca88e){if(super(_0x1ca88e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1ca88e instanceof _0x1ab5fd){const _0x2f9ea4=_0x1ca88e['locale'];_0x1ca88e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x2f9ea4,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x2f9ea4,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x2f9ea4,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x2f9ea4,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x2f9ea4,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x2f9ea4,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x2f9ea4,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0xa5d1d0){this['collection']['add'](_0xa5d1d0);}['remove'](_0x1439d3){this['collection']['remove'](_0x1439d3),_0x1439d3['destroy']();}['refreshVisibility'](){for(const _0x171946 of this['collection'])_0x171946['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x316ff7){return this['collection']['getByInnerView'](_0x316ff7);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x27f6ef of this['collection'])_0x27f6ef['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x14615e){this['fire']('_activateAnnotation',_0x14615e);}['createAnnotation'](_0x599ead){return new T(_0x599ead);}['createAnnotationView'](_0x13fc93,_0x5d5e48){return new E(_0x13fc93,_0x5d5e48);}['_addActiveAnnotation'](_0x5c7f0c){const _0x648818=new Set(this['activeAnnotations']);_0x648818['add'](_0x5c7f0c),this['activeAnnotations']=_0x648818;}['_removeActiveAnnotation'](_0x2e1a73){const _0x49f093=new Set(this['activeAnnotations']);_0x49f093['delete'](_0x2e1a73),this['activeAnnotations']=_0x49f093;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2fcc86=this['collection'],_0x240cbc=this['_visibleAnnotations'];function _0x21679a(_0xbe4087){const _0x5e4b9e=_0xbe4087['source'];_0x5e4b9e['isVisible']&&!_0x240cbc['has'](_0x5e4b9e)?_0x240cbc['add'](_0x5e4b9e):!_0x5e4b9e['isVisible']&&_0x240cbc['has'](_0x5e4b9e)&&_0x240cbc['remove'](_0x5e4b9e),_0x5e4b9e['view']['focusTracker']['remove'](_0x5e4b9e['view']['element']),_0x5e4b9e['view']['focusTracker']['add'](_0x5e4b9e['view']['element']);}this['listenTo'](_0x2fcc86,'add',(_0x29da4d,_0x107a26)=>{_0x107a26['isVisible']&&_0x240cbc['add'](_0x107a26),this['listenTo'](_0x107a26,'change:isVisible',_0x21679a);}),this['listenTo'](_0x2fcc86,'remove',(_0xa2745e,_0x4081f3)=>{_0x240cbc['has'](_0x4081f3)&&_0x240cbc['remove'](_0x4081f3),this['stopListening'](_0x4081f3,'change:isVisible',_0x21679a);});}['_setupEnterAnnotationKeystroke'](){const _0x30deb2=_0x59e3c1=>{_0x59e3c1['on']('ready',()=>{_0x59e3c1['keystrokes']['set'](_0x4b4914,(_0xcd4dc5,_0x395034)=>{const _0x3663c3=_0x206a23(this['activeAnnotations']['values']());_0x3663c3&&(_0x3663c3['view']['focus'](),_0x395034());});});};this['context']instanceof _0x1ab5fd?_0x30deb2(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5f5964,_0xa99bfd)=>{_0x30deb2(_0xa99bfd);});}['_setupEscapeAnnotationHandling'](){const _0xb754d2=_0x620eca=>{const _0x87bc8c=_0x620eca['source'],_0x5e22f5=[];let _0x1db03c;if(Array['isArray'](_0x87bc8c['target'])){_0x1db03c=_0x87bc8c['target'][0x0],this['context']instanceof _0x1ab5fd?_0x5e22f5['push'](this['context']):this['context']['editors']&&_0x5e22f5['push'](...this['context']['editors']);for(const _0x31bd5b of _0x5e22f5)for(const _0x2abe7e of _0x31bd5b['editing']['view']['domRoots']['values']())if(_0x2abe7e['contains'](_0x1db03c))return void _0x31bd5b['editing']['view']['focus']();_0x1db03c['focus']();}};this['listenTo'](this['collection'],'add',(_0x213e94,_0x359c35)=>{this['listenTo'](_0x359c35,'escape',_0xb754d2,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1aaa78,_0x3afd03)=>{this['stopListening'](_0x3afd03,'escape',_0xb754d2);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4cc9b8{['_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(_0x40312f){super(_0x40312f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x244dc2=this['context']['config'];_0x244dc2['define']('comments.maxCommentsWhenCollapsed',0x2),_0x244dc2['define']('comments.maxThreadTotalWeight',0x1f4),_0x244dc2['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x244dc2['define']('comments.CommentThreadView',gt),_0x244dc2['define']('comments.CommentView',Tt),_0x244dc2['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x304ba5=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2448f3,_0x496caf)=>this['_addCommentThread'](_0x496caf)),this['on']('submitCommentThread',(_0x538e82,_0x170b4d)=>this['_submitCommentThread'](_0x170b4d)),this['on']('resolveCommentThread',(_0x595cd5,_0x17c5b5)=>this['_resolveCommentThread'](_0x17c5b5)),this['on']('resolveCommentThread',(_0x2987fe,_0x3d4926)=>this['_updateActiveAnnotation'](_0x3d4926),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xe4f340,_0x20da14)=>this['_reopenCommentThread'](_0x20da14)),this['on']('reopenCommentThread',(_0x46c368,_0x4f7538)=>this['_updateActiveAnnotation'](_0x4f7538),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4d7637,_0xd850a7)=>this['_removeCommentThread'](_0xd850a7)),this['on']('updateCommentThread',(_0x1d7f3f,_0xb04960)=>this['_updateCommentThread'](_0xb04960)),this['on']('updateCommentThread',(_0x182dab,_0x22b09b)=>this['_updateActiveAnnotation'](_0x22b09b),{'priority':'lowest'}),this['on']('addComment',(_0x5c5be0,_0x4dd2bd)=>this['_addComment'](_0x4dd2bd)),this['on']('updateComment',(_0x12179a,_0x9bedb1)=>this['_updateComment'](_0x9bedb1)),this['on']('removeComment',(_0x2609e2,_0x4440cb)=>this['_removeComment'](_0x4440cb)),this['on']('addComment',(_0x512677,{threadId:_0x457809,isFromAdapter:_0x21a176})=>{if(_0x21a176)return;const _0x4f9ad0=this['getCommentThread'](_0x457809),_0x457816=_0x4f9ad0&&this['_threadToController']['get'](_0x4f9ad0);_0x457816&&_0x457816['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x304ba5,'change:activeAnnotations',(_0x5eefdd,_0x5f3a00,_0x588b51)=>{const _0x53fcfd=Array['from'](_0x588b51)['map'](_0x281674=>this['_viewToController']['get'](_0x281674['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x53fcfd?_0x53fcfd['model']:null;});}set['adapter'](_0x1e256d){if(this['_adapter'])throw new _0x542f67('commentsrepository-adapter-already-set');this['_adapter']=_0x1e256d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4121e5=_t,threadId:_0x5c40c7=_0x483b07(),comments:_0x48224e=[],unlinkedAt:_0x3e5cb1=null,resolvedAt:_0x2da48f=null,resolvedBy:_0x208ff7=null,target:_0x478286=null,context:_0x61e12a=null,attributes:_0xb3276e={},isResolvable:_0x44d418=!0x0,isSubmitted:_0x1e268e=!0x1,isFromAdapter:_0x100d27=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4121e5),{'channelId':_0x4121e5,'threadId':_0x5c40c7,'comments':_0x48224e,'unlinkedAt':_0x3e5cb1,'resolvedAt':_0x2da48f,'resolvedBy':_0x208ff7,'target':_0x478286,'context':_0x61e12a,'attributes':_0xb3276e,'isFromAdapter':_0x100d27,'isResolvable':_0x44d418,'isSubmitted':_0x1e268e}),this['getCommentThread'](_0x5c40c7);}['openNewCommentThread']({channelId:_0xe4c6d9=_t,threadId:_0x464f2a=_0x483b07(),target:_0xaed6a0,context:_0x4404c0=null,isResolvable:_0x3a91cf=!0x0}){if(this['_readOnlyChannels']['has'](_0xe4c6d9)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0xaed6a0)throw new _0x542f67('commentsrepository-missing-target');const _0x2a4133=this['addCommentThread']({'channelId':_0xe4c6d9,'threadId':_0x464f2a,'target':_0xaed6a0,'context':_0x4404c0,'isResolvable':_0x3a91cf});if(!_0x2a4133)return null;const _0x1dc750=this['_threadToController']['get'](_0x2a4133),_0xeb2647=_0x1dc750['view']['commentThreadInputView']['commentInputView'],_0x3d9646=this['context']['plugins']['get'](y),_0x1f17f3=_0x3d9646['getByInnerView'](_0x1dc750['view']);return _0x3d9646['activate'](_0x1f17f3),_0xeb2647['once']('editorReady',()=>_0xeb2647['focus']()),_0x2a4133;}['hasCommentThread'](_0x1a1b1a){if('string'!=typeof _0x1a1b1a)throw new _0x542f67('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1a1b1a);}['updateCommentThread']({channelId:_0x5385cb=_t,threadId:_0x2a52ed,context:_0x477f27,unlinkedAt:_0x13d710,attributes:_0x23f23a,isFromAdapter:_0x493c98=!0x1}){return this['fire'](Nt('updateCommentThread',_0x5385cb),{'channelId':_0x5385cb,'threadId':_0x2a52ed,'context':_0x477f27,'unlinkedAt':_0x13d710,'attributes':_0x23f23a,'isFromAdapter':_0x493c98}),this['getCommentThread'](_0x2a52ed);}['getCommentThread'](_0x5d6459){if('string'!=typeof _0x5d6459)throw new _0x542f67('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5d6459);}['fetchCommentThread']({channelId:_0x41367f,threadId:_0x2923c8}={}){const _0x5c1441=this['getCommentThread'](_0x2923c8);if(_0x5c1441)return Promise['resolve'](_0x5c1441);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x542f67('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x41367f,'threadId':_0x2923c8})['then'](_0x43ed67=>this['hasCommentThread'](_0x2923c8)?this['getCommentThread'](_0x2923c8):_0x43ed67?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x41367f},_0x43ed67)):void 0x0)['catch'](_0x455030=>{throw console['error'](_0x455030),new _0x542f67('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2d6fea,skipNotAttached:_0x31269e=!0x1,skipEmpty:_0x6bafe=!0x1,toJSON:_0x1eae95=!0x1}={}){const _0x2ae068=[];for(const _0x5aa336 of this['_threads']['values']())_0x2d6fea&&_0x5aa336['channelId']!==_0x2d6fea||_0x31269e&&!_0x5aa336['isAttached']||_0x6bafe&&0x0===_0x5aa336['length']||_0x2ae068['push'](_0x5aa336);return _0x1eae95?_0x2ae068['map'](_0x41b45f=>_0x41b45f['toJSON']()):_0x2ae068;}['getAnnotationForCommentThread'](_0x5969c0){const _0x35187a=this['_threadToController']['get'](_0x5969c0);if(!_0x35187a)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x35187a['view'])||null;}['getCommentThreadForAnnotation'](_0x290823){const _0x487629=this['_viewToController']['get'](_0x290823['innerView']);return _0x487629?_0x487629['model']:null;}['setActiveCommentThread'](_0xbd7433){const _0x2aeeae=this['context']['plugins']['get'](y);if(!_0xbd7433)return void(this['activeCommentThread']&&_0x2aeeae['deactivateAll']());const _0x212d6d=this['getCommentThread'](_0xbd7433);if(!_0x212d6d)throw new _0x542f67('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xbd7433});if(!this['_threadToController']['has'](_0x212d6d))throw new _0x542f67('commentsrepository-active-not-attached',null,{'threadId':_0xbd7433});const _0x382292=_0x2aeeae['getByInnerView'](this['_threadToController']['get'](_0x212d6d)['view']);_0x2aeeae['activate'](_0x382292);}['switchReadOnly'](_0x20d609,_0x395463){_0x20d609?this['_readOnlyChannels']['add'](_0x395463):this['_readOnlyChannels']['delete'](_0x395463),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3a7c14){return this['_readOnlyChannels']['has'](_0x3a7c14)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x27be55,_0x521aa4){return new vt(_0x27be55,_0x521aa4);}['setPermissions'](_0x4f8068,_0xf0ef51=_t){this['_permissions']['set'](_0xf0ef51,_0x4f8068),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2f44c9=_t){return this['_permissions']['has'](_0x2f44c9)?this['_permissions']['get'](_0x2f44c9):bt;}['_addCommentThread']({channelId:_0x3055d1,threadId:_0x5d0dc2,comments:_0x5cd664,unlinkedAt:_0x5a718e,resolvedAt:_0x950945,resolvedBy:_0xdff1fe,target:_0x4a092a,context:_0x446aae,attributes:_0x59febd,isFromAdapter:_0x19d2c0,isResolvable:_0x5768f2,isSubmitted:_0x249f88}){if('string'!=typeof _0x5d0dc2)throw new _0x542f67('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5d0dc2});if(this['hasCommentThread'](_0x5d0dc2))throw new _0x542f67('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5d0dc2});const _0x5dd5cc=new pi(this,{'channelId':_0x3055d1,'id':_0x5d0dc2,'context':_0x446aae,'attributes':_0x59febd,'unlinkedAt':_0x5a718e,'resolvedAt':_0x950945,'resolvedBy':_0xdff1fe?this['context']['plugins']['get'](it)['getUser'](_0xdff1fe):null,'isResolvable':_0x5768f2,'isSubmitted':_0x249f88||_0x19d2c0});this['_threads']['set'](_0x5d0dc2,_0x5dd5cc);for(const _0x496a7b of _0x5cd664)_0x5dd5cc['_add'](this['_createNewComment']({'threadId':_0x5d0dc2,..._0x496a7b}));return _0x4a092a&&_0x5dd5cc['attachTo'](_0x4a092a),_0x19d2c0||!_0x5dd5cc['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3055d1,'threadId':_0x5d0dc2});}['_submitCommentThread']({channelId:_0x5c9640,threadId:_0x216830}){if(!this['hasCommentThread'](_0x216830))throw new _0x542f67('commentsrepository-missing-comment-thread',this);const _0xe75b62=this['getCommentThread'](_0x216830);if(_0xe75b62['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x528a7b,comments:_0x15b784,resolvedAt:_0x24caec,resolvedBy:_0x2289b9,context:_0xdc65a3,attributes:_0x6b7794}=_0xe75b62,_0x12a2ac=this['context']['plugins']['get']('PendingActions'),_0x4bb9dd=_0x12a2ac['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5c9640,'threadId':_0x528a7b,'comments':_0x15b784['map'](_0x5e2aa2=>_0x5e2aa2['toJSON']()),'resolvedAt':_0x24caec,'resolvedBy':_0x2289b9?_0x2289b9['id']:_0x2289b9,'context':_0xdc65a3,'attributes':_0x6b7794})['then'](({comments:_0x1e3efd})=>{_0x12a2ac['remove'](_0x4bb9dd);for(const _0x51214d of _0x1e3efd)this['_updateComment']({'channelId':_0x5c9640,'threadId':_0x216830,'commentId':_0x51214d['commentId'],'createdAt':_0x51214d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x28b692=>{throw console['error'](_0x28b692),new _0x542f67('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x3c4f4c,target:_0x41c74f}){const _0x917bbc=this['getCommentThread'](_0x3c4f4c);if(!_0x917bbc)throw new _0x542f67('commentsrepository-attach-missing-comment-thread',this);const _0x3dd54f=this['context']['plugins']['get']('PendingActions'),_0x579d4d=this['context']['plugins']['get'](y),_0x2ab5f5=this['_createCommentThreadView'](_0x917bbc),_0xbdb986=new vt(_0x917bbc,_0x2ab5f5);let _0x258b1e=null;_0x2ab5f5['on']('change:isDirty',(_0x1dcf1c,_0x52651b,_0x50e18f)=>{_0x50e18f?_0x258b1e=_0x3dd54f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x258b1e&&(_0x3dd54f['remove'](_0x258b1e),_0x258b1e=null);}),this['_threadToController']['set'](_0x917bbc,_0xbdb986),this['_viewToController']['set'](_0x2ab5f5,_0xbdb986);const _0x2a68db=new E(this['context']['locale'],_0x2ab5f5);_0x2a68db['bind']('length')['to'](_0x2ab5f5),_0x2a68db['bind']('isDirty')['to'](_0x2ab5f5,'isDirty',_0x2ab5f5,'length',(_0x598138,_0x3b6751)=>_0x598138||!_0x3b6751),_0x2a68db['bind']('isActive')['to'](_0x2ab5f5),_0x2a68db['type']='comment';const _0x913b1b=new T({'view':_0x2a68db,'target':_0x41c74f,'type':'comment','isVisible':!_0x917bbc['archivedAt']&&!!('function'==typeof _0x41c74f?_0x41c74f():_0x41c74f)});return _0x2ab5f5['on']('escape',()=>{_0x913b1b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x2ab5f5,_0x913b1b),_0x579d4d['add'](_0x913b1b),_0x913b1b;}['_bindAnnotationToEditors'](_0x28fa2e,_0x12eab1){this['listenTo'](_0x28fa2e,'editorReady',(_0x2469e9,_0x594727)=>{const _0x4bad1d=_0x594727['ui']['view']['body']['bodyCollectionContainer'];_0x12eab1['focusableElements']['add'](_0x4bad1d),this['context']instanceof _0x1ab5fd&&this['context']['ui']['focusTracker']['add'](_0x4bad1d);},{'priority':'highest'}),this['listenTo'](_0x28fa2e,'editorDestroyed',(_0x4d9d33,_0x870710)=>{const _0xd20dc0=_0x870710['ui']['view']['body']['bodyCollectionContainer'];_0x12eab1['focusableElements']['has'](_0xd20dc0)&&_0x12eab1['focusableElements']['remove'](_0xd20dc0),this['context']instanceof _0x1ab5fd&&this['context']['ui']['focusTracker']['remove'](_0xd20dc0);});}['_unbindEditors'](_0x5a6234){this['stopListening'](_0x5a6234,'editorReady'),this['stopListening'](_0x5a6234,'editorDestroyed');}['_createCommentThreadView'](_0x17083a){const _0x11b548=this['context']['plugins']['get'](it),{config:_0x497731,locale:_0x1c7e9f}=this['context'],_0x2538c6=pt(_0x497731['get']('locale'),_0x1c7e9f);return new(0x0,(_0x497731['get']('comments'))['CommentThreadView'])(_0x1c7e9f,_0x17083a,_0x11b548['me'],{'editorConfig':{..._0x497731['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x497731['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x497731['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x497731['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x497731['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2538c6,'CommentView':_0x497731['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5f702d,channelId:_0x4e9423,resolvedAt:_0x1f6d3d,resolvedBy:_0x39f62e,isFromAdapter:_0x25cde1}){if(!this['hasCommentThread'](_0x5f702d))throw new _0x542f67('commentsrepository-missing-comment-thread',null,{'threadId':_0x5f702d});const _0x502e3e=this['getCommentThread'](_0x5f702d);if(_0x502e3e['isResolved'])throw new _0x542f67('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5f702d});const _0x135288=this['context']['plugins']['get'](it);if(_0x502e3e['resolvedBy']=_0x135288['getUser'](_0x39f62e),_0x502e3e['resolvedAt']=_0x1f6d3d,_0x25cde1||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x458bca=this['context']['plugins']['get']('PendingActions'),_0x1df7cc=_0x458bca['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4e9423,'threadId':_0x5f702d})['then'](({resolvedAt:_0x13b7b3,resolvedBy:_0x505240})=>{_0x458bca['remove'](_0x1df7cc),_0x502e3e['resolvedBy']['id']!==_0x505240&&(_0x502e3e['resolvedBy']=_0x135288['getUser'](_0x505240)),_0x502e3e['resolvedAt']=_0x13b7b3;})['catch'](_0x5a8454=>{throw console['error'](_0x5a8454),new _0x542f67('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x477efc,channelId:_0x50b26d,isFromAdapter:_0xe41d1f}){if(!this['hasCommentThread'](_0x477efc))throw new _0x542f67('commentsrepository-missing-comment-thread',null,{'threadId':_0x477efc});const _0x31f1d2=this['getCommentThread'](_0x477efc);if(!_0x31f1d2['isResolved'])throw new _0x542f67('commentsrepository-reopen-comment-thread',null,{'threadId':_0x477efc});if(_0x31f1d2['resolvedBy']=null,_0x31f1d2['resolvedAt']=null,_0xe41d1f||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5565b9=this['context']['plugins']['get']('PendingActions'),_0x233038=_0x5565b9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x50b26d,'threadId':_0x477efc})['then'](()=>_0x5565b9['remove'](_0x233038))['catch'](_0x3da8e4=>{throw console['error'](_0x3da8e4),new _0x542f67('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4132a4,isFromAdapter:_0xdee0f2}){const _0x4c3daf=this['getCommentThread'](_0x4132a4);if(!_0x4c3daf)throw new _0x542f67('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4132a4),this['_threads']['delete'](_0x4132a4),!_0x4c3daf['isSubmitted']||_0xdee0f2||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x469a84=this['context']['plugins']['get']('PendingActions'),{channelId:_0x167cf7}=_0x4c3daf,_0x13eee9=_0x469a84['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x167cf7,'threadId':_0x4132a4})['then'](()=>_0x469a84['remove'](_0x13eee9))['catch'](_0x602170=>{throw console['error'](_0x602170),new _0x542f67('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x20e99b,unlinkedAt:_0x2e2a10,context:_0x13221c,attributes:_0x5fc58d,isFromAdapter:_0x513114}){if('string'!=typeof _0x20e99b)throw new _0x542f67('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x20e99b});if(!this['hasCommentThread'](_0x20e99b))throw new _0x542f67('commentsrepository-missing-comment-thread',null,{'threadId':_0x20e99b});const _0x162c65=this['getCommentThread'](_0x20e99b);let _0x15897d=!0x1;if(void 0x0!==_0x13221c&&_0x162c65['context']!==_0x13221c&&(_0x162c65['context']=_0x13221c,_0x15897d=!0x0),void 0x0!==_0x2e2a10&&_0x162c65['unlinkedAt']!==_0x2e2a10&&(_0x162c65['unlinkedAt']=_0x2e2a10,_0x15897d=!0x0),_0x5fc58d&&!At(_0x5fc58d,_0x162c65['attributes'])&&(_0x162c65['attributes']=_0x5fc58d,_0x15897d=!0x0),!_0x15897d)return Promise['resolve']();if(!_0x162c65['isSubmitted']||_0x513114||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4a19b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x46b99d}=_0x162c65,_0x10d633=_0x4a19b2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x46b99d,'threadId':_0x20e99b,'context':_0x13221c,'unlinkedAt':_0x2e2a10,'attributes':_0x5fc58d})['then'](()=>_0x4a19b2['remove'](_0x10d633))['catch'](_0x56636c=>{throw console['error'](_0x56636c),new _0x542f67('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x148fb9){const _0x3b6d75=this['context']['plugins']['get'](y),_0x32f11d=this['getCommentThread'](_0x148fb9);if(_0x32f11d['_isAttached']=!0x1,this['_threadToController']['has'](_0x32f11d)){const _0x36373b=this['_threadToController']['get'](_0x32f11d),_0x4bf921=_0x36373b['view'],_0x1ee7ae=_0x3b6d75['getByInnerView'](_0x4bf921);this['_threadToController']['delete'](_0x32f11d),this['_viewToController']['delete'](_0x4bf921),_0x1ee7ae&&_0x3b6d75['remove'](_0x1ee7ae),_0x36373b['destroy'](),_0x4bf921['destroy']()['then'](()=>{this['_unbindEditors'](_0x4bf921);});}}['_updateActiveAnnotation']({threadId:_0x18d13d,resolvedAt:_0x5c7dd9,unlinkedAt:_0x3fda5d}){const _0x199dad=!!_0x5c7dd9,_0x26c194=this['context']['plugins']['get'](y),_0x3d60c6=this['getCommentThread'](_0x18d13d);if(this['_threadToController']['has'](_0x3d60c6)){const _0x59e08f=this['_threadToController']['get'](_0x3d60c6)['view'],_0x766957=_0x26c194['getByInnerView'](_0x59e08f);_0x766957&&(_0x199dad&&_0x26c194['_removeActiveAnnotation'](_0x766957),_0x3fda5d?_0x766957['isVisible']=!0x1:_0x766957['refreshVisibility']());}}['_getExternalAuthor'](_0x355f54){const _0x2f311f=this['context']['plugins']['get'](it),_0x190c9e=It('external:'+_0x355f54),_0x3c7891=_0x2f311f['getUser'](_0x190c9e);return _0x3c7891||_0x2f311f['addUser']({'id':_0x190c9e,'name':_0x355f54});}['_createNewComment']({threadId:_0x16e948,commentId:_0x1ae00f=_0x483b07(),content:_0x75d6ea,authorId:_0x3a15ad,createdAt:_0x1a4a53,attributes:_0x9f04bb}){if('string'!=typeof _0x1ae00f)throw new _0x542f67('commentsrepository-invalid-commentid');if('string'!=typeof _0x3a15ad)throw new _0x542f67('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x75d6ea||!_0x75d6ea['trim']())throw new _0x542f67('commentsrepository-invalid-comment-content');const _0x323a77=this['context']['plugins']['get'](it)['getUser'](_0x3a15ad);if(!_0x323a77)throw new _0x542f67('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3a15ad});let _0x328397=null,_0x24cebd=_0x1a4a53;return _0x9f04bb?.['@external']&&(_0x328397=this['_getExternalAuthor'](_0x9f04bb['@external']['authorName']),_0x24cebd=new Date(_0x9f04bb['@external']['createdAt'])),new wi(this,{'threadId':_0x16e948,'id':_0x1ae00f,'author':_0x328397||_0x323a77,'creator':_0x323a77,'content':_0x75d6ea,'createdAt':_0x1a4a53,'authoredAt':_0x24cebd,'attributes':_0x9f04bb});}['_addComment'](_0x3f38ba){let {threadId:_0x2418ab,content:_0x53d494,attributes:_0x312fa3,isFromAdapter:_0x1fe524}=_0x3f38ba;const _0x4b7b4a=this['getCommentThread'](_0x3f38ba['threadId']);if(!_0x4b7b4a)throw new _0x542f67('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x18c92e=this['_createNewComment'](_0x3f38ba),{id:_0x44ab0b}=_0x18c92e;if(_0x4b7b4a['_add'](_0x18c92e),_0x1fe524||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4b7b4a['isSubmitted'])return Promise['resolve']();const _0x3d35dd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e5959}=_0x4b7b4a,_0xf7c041=_0x3d35dd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x312fa3||(_0x312fa3={}),this['adapter']['addComment']({'channelId':_0x1e5959,'threadId':_0x2418ab,'commentId':_0x44ab0b,'content':_0x53d494,'attributes':_0x312fa3})['then'](_0x19d08d=>{_0x3d35dd['remove'](_0xf7c041),_0x19d08d&&this['_updateComment']({'channelId':_0x1e5959,'threadId':_0x2418ab,'commentId':_0x44ab0b,'createdAt':_0x19d08d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2cfbe4=>{throw console['error'](_0x2cfbe4),new _0x542f67('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x218c9e,commentId:_0x3c48a9,content:_0x5691f9,createdAt:_0x2ab3d1,attributes:_0x2312f0,isFromAdapter:_0x264a62}){if(void 0x0!==_0x5691f9&&('string'!=typeof _0x5691f9||!_0x5691f9['trim']()['length']))throw new _0x542f67('commentsrepository-update-comment-invalid-content');const _0x164f2c=this['getCommentThread'](_0x218c9e),_0x4bbffb=_0x164f2c['getComment'](_0x3c48a9);if(!_0x4bbffb)throw new _0x542f67('commentsrepository-update-missing-comment',this);let _0x1e9f4c=!0x1;if(_0x5691f9&&_0x5691f9!==_0x4bbffb['content']&&(_0x4bbffb['isEditable']||_0x264a62)&&(_0x4bbffb['content']=_0x5691f9,_0x1e9f4c=!0x0),_0x2ab3d1&&_0x2ab3d1!==_0x4bbffb['createdAt']&&(_0x4bbffb['createdAt']=_0x2ab3d1,_0x4bbffb['attributes']&&_0x4bbffb['attributes']['@external']||(_0x4bbffb['authoredAt']=_0x2ab3d1),_0x1e9f4c=!0x0),_0x2312f0&&!At(_0x2312f0,_0x4bbffb['attributes'])&&(_0x4bbffb['attributes']=_0x2312f0,_0x1e9f4c=!0x0),!_0x1e9f4c)return Promise['resolve']();if(_0x164f2c['fire']('commentUpdated'),_0x264a62||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x6be98=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23f086}=this['getCommentThread'](_0x4bbffb['threadId']),_0x28a1ca=_0x6be98['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x23f086,'threadId':_0x218c9e,'commentId':_0x3c48a9,'content':_0x5691f9,'attributes':_0x2312f0})['then'](()=>_0x6be98['remove'](_0x28a1ca))['catch'](_0x778f13=>{throw console['error'](_0x778f13),new _0x542f67('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x43aa63,commentId:_0x34b255,isFromAdapter:_0xe735a0}){const _0x74a0bd=this['getCommentThread'](_0x43aa63),_0x37bd00=_0x74a0bd['getComment'](_0x34b255);if(!_0x37bd00)throw new _0x542f67('commentsrepository-remove-missing-comment',this);if(_0x74a0bd['_remove'](_0x37bd00),_0xe735a0||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1a03a9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x782094}=_0x74a0bd,_0xa60f1d=_0x1a03a9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x782094,'threadId':_0x43aa63,'commentId':_0x34b255})['then'](()=>_0x1a03a9['remove'](_0xa60f1d))['catch'](_0xf1566d=>{throw console['error'](_0xf1566d),new _0x542f67('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
+ _0x5d3564(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3a72f0,_0x538cc1){super();const _0x5bd450=_0x538cc1['isResolvable'];this['channelId']=_0x538cc1['channelId'],this['id']=_0x538cc1['id'],this['comments']=new _0x2bdfd3(),this['_repository']=_0x3a72f0,this['_isAttached']=!0x1,this['_isSubmitted']=_0x538cc1['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3a72f0,'_permissions',_0x3a72f0,'_readOnlyChannels',()=>_0x3a72f0['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3a72f0,'_permissions',()=>_0x3a72f0['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3a72f0,'_permissions',()=>{const _0x394fb0=_0x3a72f0['getPermissions'](this['channelId']);return _0x394fb0['write']||_0x394fb0['admin'];}),this['bind']('isResolvable')['to'](_0x3a72f0,'_permissions',()=>_0x5bd450&&_0x3a72f0['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x538cc1['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1ec645,_0x17b2f8)=>_0x1ec645?_0x17b2f8?_0x1ec645<_0x17b2f8?_0x1ec645:_0x17b2f8:_0x1ec645:_0x17b2f8),this['set']('unlinkedAt',_0x538cc1['unlinkedAt']||null),this['set']('resolvedAt',_0x538cc1['resolvedAt']||null),this['set']('resolvedBy',_0x538cc1['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x33c66e=>!!_0x33c66e),this['set']('attributes',_0x538cc1['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x5eea27,_0x5053e0)=>_0x5eea27+_0x5053e0['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5cdbc3,id:_0x36072a}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x5cdbc3),{'channelId':_0x5cdbc3,'threadId':_0x36072a});}['setUnlinkedAt'](_0x475e0a){this['_update']({'unlinkedAt':_0x475e0a});}['resolve']({resolvedAt:_0x495d3d=new Date(),resolvedBy:_0x2ab2ce='',isFromAdapter:_0x3fb264=!0x1}={}){const _0x18c604=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x98a24e,id:_0x45858f}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x98a24e),{'channelId':_0x98a24e,'threadId':_0x45858f,'resolvedAt':_0x495d3d,'resolvedBy':_0x2ab2ce||_0x18c604['id'],'isFromAdapter':_0x3fb264});}['reopen']({isFromAdapter:_0x42e852=!0x1}={}){const {channelId:_0x2f300a,id:_0x22fdb0}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2f300a),{'channelId':_0x2f300a,'threadId':_0x22fdb0,'isFromAdapter':_0x42e852});}['setContext'](_0x22c24c){this['context']||this['_update']({'context':_0x22c24c});}['setAttribute'](_0x316af7,_0x1f9cd9){const _0x39e762=wt(this['attributes']);yt(_0x39e762,_0x316af7,_0x1f9cd9),this['_update']({'attributes':_0x39e762});}['removeAttribute'](_0x1549bc){const _0x381de8=wt(this['attributes']);Ct(_0x381de8,_0x1549bc),this['_update']({'attributes':_0x381de8});}['remove']({isFromAdapter:_0x54f802=!0x1}={}){const {channelId:_0x4a2eb4,id:_0x367b81}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x4a2eb4),{'channelId':_0x4a2eb4,'threadId':_0x367b81,'isFromAdapter':_0x54f802});}['attachTo'](_0x1c152d){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x1c152d});}['addComment'](_0x4b784d){const {channelId:_0x5a5a62,id:_0x23a6e5}=this;this['_repository']['fire'](Nt('addComment',_0x5a5a62,_0x23a6e5),Object['assign']({'channelId':_0x5a5a62,'threadId':_0x23a6e5},_0x4b784d));}['getComment'](_0x1cd4bb){if('string'!=typeof _0x1cd4bb)throw new _0x542f67('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x1cd4bb});return this['comments']['get'](_0x1cd4bb);}['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'](_0x26e190=>_0x26e190['toJSON']()),'attributes':this['attributes']};}['_add'](_0x21a462){return this['listenTo'](_0x21a462,'change:authoredAt',()=>{const _0x361eb3=this['_findOptimalIndex'](_0x21a462),_0x5a56f3=this['comments'];_0x361eb3-0x1!=_0x5a56f3['getIndex'](_0x21a462)&&_0x361eb3+0x1!=_0x5a56f3['getIndex'](_0x21a462)&&(this['_remove'](_0x21a462),this['_add'](_0x21a462));}),this['comments']['add'](_0x21a462,this['_findOptimalIndex'](_0x21a462));}['_update'](_0x2f47b1){const {channelId:_0x4ea1cf,id:_0x3ac8a9}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x4ea1cf),{..._0x2f47b1,'channelId':_0x4ea1cf,'threadId':_0x3ac8a9});}['_remove'](_0x389dad){return this['stopListening'](_0x389dad),_0x389dad['destroy'](),this['comments']['remove'](_0x389dad);}['_findOptimalIndex'](_0x4d44b8){const _0x3d5ac4=this['comments']['find'](_0x15c3cc=>new Date(_0x15c3cc['authoredAt'])['getTime']()>new Date(_0x4d44b8['authoredAt'])['getTime']());return _0x3d5ac4?this['comments']['getIndex'](_0x3d5ac4):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
+ _0x5d3564(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x30796b,_0x1e8a58){super();const _0x549dc7=_0x30796b['context']['plugins']['get'](it)['me'],_0xd39ca7=_0x30796b['getCommentThread'](_0x1e8a58['threadId']),_0x5f4c2c=0x0===_0xd39ca7['comments']['length'],_0x399356=_0x549dc7===_0x1e8a58['author'];this['id']=_0x1e8a58['id'],this['threadId']=_0x1e8a58['threadId'],this['author']=_0x1e8a58['author'],this['creator']=_0x1e8a58['creator'],this['isExternal']=Boolean(_0x1e8a58['attributes']&&_0x1e8a58['attributes']['@external']),this['set']('content',_0x1e8a58['content']),this['createdAt']=_0x1e8a58['createdAt']||new Date(),this['set']('authoredAt',_0x1e8a58['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xd39ca7,'resolvedAt'),this['set']('attributes',_0x1e8a58['attributes']||{}),this['bind']('isEditable')['to'](_0x30796b,'_permissions',()=>{const _0x98237c=_0x30796b['getPermissions'](_0xd39ca7['channelId'])['write'],_0x11da25=_0x30796b['getPermissions'](_0xd39ca7['channelId'])['modifyAll'];return _0x399356&&_0x98237c||!_0x399356&&_0x11da25;}),this['bind']('isRemovable')['to'](_0xd39ca7,'isRemovable',_0x30796b,'_permissions',_0x1951b9=>{const _0x404cf7=_0x30796b['getPermissions'](_0xd39ca7['channelId'])['write'],_0x54cf8d=_0x30796b['getPermissions'](_0xd39ca7['channelId'])['modifyAll'];return _0x399356&&_0x404cf7||_0x1951b9&&_0x5f4c2c||!_0x399356&&_0x54cf8d&&!_0x5f4c2c;}),this['bind']('isReadOnly')['to'](_0xd39ca7,'isReadOnly'),this['_repository']=_0x30796b;}get['weight'](){return Math['max'](function(_0x448d0e){const _0x52434b=document['createElement']('div');return _0x52434b['innerHTML']=_0x448d0e,_0x52434b['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3d39ff){const {threadId:_0x4c2e03,id:_0x2b5bde}=this;if(!this['_repository']['hasCommentThread'](_0x4c2e03))throw new _0x542f67('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x126b6d}=this['_repository']['getCommentThread'](_0x4c2e03);this['_repository']['fire'](Nt('updateComment',_0x126b6d,_0x4c2e03),{'channelId':_0x126b6d,'threadId':_0x4c2e03,'commentId':_0x2b5bde,..._0x3d39ff});}['setAttribute'](_0x438bd7,_0x4ebb5d){const _0x5be377=wt(this['attributes']);yt(_0x5be377,_0x438bd7,_0x4ebb5d),this['update']({'attributes':_0x5be377});}['removeAttribute'](_0x1bbe9d){const _0x109987=wt(this['attributes']);Ct(_0x109987,_0x1bbe9d),this['update']({'attributes':_0x109987});}['remove'](_0x56f26f={}){if(!_0x56f26f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x58c5c3,id:_0x5d6bf0}=this;if(!this['_repository']['hasCommentThread'](_0x58c5c3))throw new _0x542f67('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1d9400}=this['_repository']['getCommentThread'](_0x58c5c3);this['_repository']['fire'](Nt('removeComment',_0x1d9400,_0x58c5c3),{'channelId':_0x1d9400,'threadId':_0x58c5c3,'commentId':_0x5d6bf0,..._0x56f26f});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x452b66,..._0x34858b){for(const _0x10ce9f of _0x34858b)void 0x0!==_0x10ce9f&&(_0x452b66+=':'+String(_0x10ce9f));return _0x452b66;}class ot extends _0x5a73bb{constructor(_0x10035e){super(_0x10035e),this['set']('hasContent',!0x1);}['refresh'](){const _0x14cd2c=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x1459d9 of _0x14cd2c['getRanges']())if(this['_hasContent'](_0x1459d9))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x53e77e=_0x483b07(),ranges:_0x5a5dfd,comment:_0x844603}={}){const _0x392d50=this['editor']['model'],_0x320579=_0x5a5dfd??Array['from'](_0x392d50['document']['selection']['getRanges']()),_0x167b07=[];for(const _0x441913 of _0x320579)this['_hasContent'](_0x441913)&&_0x167b07['push'](this['_trimToContent'](_0x441913));if(!_0x167b07['length'])throw new _0x542f67('addcommentthreadcommand-incorrect-ranges',null);_0x844603&&this['_createCommentThread'](_0x53e77e,_0x844603),this['_createMarkersFromRanges'](_0x53e77e,_0x167b07,!!_0x844603);}['_createMarkersFromRanges'](_0x44cd5f,_0xc86a4a,_0x3c5ae8){this['editor']['model']['change'](_0x3d77b4=>{for(const _0x59790d of _0xc86a4a){const _0x2a7ca8=_0x483b07()['substr'](0x1,0x5),_0x1b14e2='comment:'+_0x44cd5f+':'+_0x2a7ca8;_0x3d77b4['addMarker'](_0x1b14e2,{'range':_0x59790d,'usingOperation':_0x3c5ae8,'affectsData':_0x3c5ae8});}});}['_createCommentThread'](_0x3cbbb2,_0x4debd3){const _0x573cb3=this['editor']['plugins']['get']('CommentsRepository'),_0x1a49df=this['editor']['config']['get']('collaboration.channelId'),_0x10a5d2=this['editor']['plugins']['get']('Users')['me'];if(!_0x10a5d2)throw new _0x542f67('addcommentthreadcommand-user-not-found',null);_0x573cb3['addCommentThread']({'threadId':_0x3cbbb2,'channelId':_0x1a49df,'comments':[{'authorId':_0x10a5d2['id'],'content':_0x4debd3,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0xbd3e69){for(const _0x507cbf of _0xbd3e69['getItems']())if(this['_itemIsContent'](_0x507cbf))return!0x0;return!0x1;}['_itemIsContent'](_0x43231d){return _0x43231d['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x43231d)&&!_0x43231d['is']('element','tableCell');}['_trimToContent'](_0x4d0a9b){const _0x53f965=_0x3e9267=>!this['_itemIsContent'](_0x3e9267['item']),_0x5b6cad=_0x4d0a9b['start']['getLastMatchingPosition'](_0x53f965),_0xf2923=_0x4d0a9b['end']['getLastMatchingPosition'](_0x53f965,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5b6cad,_0xf2923);}}class b extends _0x4dde71{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56d9b7){super(_0x56d9b7),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x53913e=this['editor'],_0x5318d4=_0x53913e['model']['document']['selection'],_0x19423b=_0x30831a(()=>this['refreshSelectedViews'](),0xa);_0x5318d4['on']('change:range',(_0x4d176e,_0x296983)=>{_0x296983['directChange']&&(_0x19423b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x53913e['editing']['view']['document'],'change:isFocused',(_0x20652e,_0x2ca159,_0x208a85)=>{_0x208a85&&_0x19423b();}),this['listenTo'](_0x53913e['ui']['focusTracker'],'change:isFocused',(_0x58f5a2,_0x2d4ede,_0x2ca1ae)=>{_0x2ca1ae||this['fire']('blur',{'isAnnotationTracked':_0x18e6fa=>this['_editorAnnotationsData']['has'](_0x18e6fa['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0xbe659){if(this['_editorAnnotations']['has'](_0xbe659['view']))return;this['_editorAnnotations']['add'](_0xbe659['view']),this['editor']['ui']['focusTracker']['add'](_0xbe659['view']['element']);const _0x10e139=this['editor']['plugins']['get'](y);this['listenTo'](_0x10e139['collection'],'remove',(_0x11534f,_0x87204a)=>{this['editor']['ui']['focusTracker']['remove'](_0x87204a['view']['element']),this['_editorAnnotations']['delete'](_0x87204a['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x5f42ae){if('function'!=typeof _0x5f42ae)throw new _0x542f67('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5f42ae);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x26ec91,annotations:_0x55c40e}){const _0x27931c=[],_0x383f1e=this['editor']['model']['document']['selection'],_0x55cbb8=Array['from'](_0x383f1e['getRanges']());for(const [_0x37bf1c,_0x16b11e]of this['_editorAnnotationsData']){const _0x57019c=_0x501175(_0x16b11e),_0x46372b=_0x55c40e['getByInnerView'](_0x37bf1c);_0x57019c&&_0x46372b&&_0x27931c['push']({'annotation':_0x46372b,'range':_0x57019c});}function _0x501175(_0x148516){for(const _0x590fcb of _0x148516)for(const _0x4bf8f1 of _0x55cbb8)if(_0x590fcb['containsRange'](_0x4bf8f1,!_0x383f1e['isCollapsed']))return _0x590fcb;return null;}return _0x27931c['sort']((_0x243986,_0xfb3867)=>{const _0x5ce18f=_0x243986['range'],_0x58cd46=_0xfb3867['range'];if(!_0x5ce18f['isEqual'](_0x58cd46)){if(_0x5ce18f['containsRange'](_0x58cd46,!0x0))return 0x1;if(_0x58cd46['containsRange'](_0x5ce18f,!0x0))return-0x1;}return _0x243986['annotation']==_0x26ec91?-0x1:_0xfb3867['annotation']==_0x26ec91?0x1:0x0;})['map'](_0x3a5314=>_0x3a5314['annotation']);}get['_editorAnnotationsData'](){const _0x4cfcc8=new Map();for(const _0x1b9b5a of Array['from'](this['_dataCollectors']))for(const [_0x30d28c,_0x8c7c10]of _0x1b9b5a())_0x4cfcc8['set'](_0x30d28c,_0x8c7c10);return _0x4cfcc8;}}class st extends _0x4dde71{['afterInit'](){const _0x4da02e=this['editor'];if(!_0x4da02e['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4da02e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4dde71{constructor(_0x4401d3){super(_0x4401d3),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xa5c971=this['editor'],_0x5dbc74=_0xa5c971['commands']['get']('importWord'),_0x4c200a=_0xa5c971['plugins']['get'](it);_0x5dbc74&&(_0x5dbc74['on']('execute',(_0x31f74c,[,_0x281fed])=>{_0x281fed['collaboration_features']={'comments':!0x0,'user_id':_0x4c200a['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5dbc74,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x438935,_0x2fa7a2){const {comment_threads:_0x39a0ff}=_0x2fa7a2;_0x39a0ff&&_0x39a0ff['forEach'](({thread_id:_0x306726,comments:_0x1e1cef,is_resolved:_0x4a589f})=>{const _0x5e652f=new Date(),_0x26bbf3=_0x1e1cef['map'](({author:_0x1aa130,content:_0x4c9806,created_at:_0x4e64df})=>({'content':_0x4c9806,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x5e652f,'attributes':{'@external':{'authorName':_0x1aa130,'createdAt':_0x4e64df?new Date(_0x4e64df):new Date(),'source':'importWord'}}})),_0x579350=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x579350,'threadId':_0x306726,'comments':_0x26bbf3,'resolvedAt':_0x4a589f?_0x5e652f:null});});}}class at extends _0x4dde71{constructor(_0x179f5a){super(_0x179f5a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x545ae9=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x545ae9,'contentInsertion',(_0x5b4cdc,_0x4922c7)=>this['_removeMarkersWithoutThreads'](_0x4922c7['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x104242){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x104242;const _0x13df7e=this['editor']['plugins']['get']('CommentsRepository');for(const _0x15139f of _0x104242['keys']()){const [_0x4d71dd,_0x4576ef]=_0x15139f['split'](':');'comment'!=_0x4d71dd||_0x13df7e['hasCommentThread'](_0x4576ef)||_0x104242['delete'](_0x15139f);}return _0x104242;}['_registerMarkerInClipboardPipeline'](){const _0x2326fb=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x19191a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x19191a&&_0x2326fb['_registerMarkerToCopy']('comment',_0x19191a);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4af1b6){switch(_0x4af1b6){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5e1eb7){const _0x2d76f0=_0x5e1eb7['split'](':');return{'group':_0x2d76f0[0x0],'id':_0x2d76f0[0x1],'part':_0x2d76f0[0x2]};}class ut extends _0x4dde71{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2a5286,_0x5c7796)=>{if(!_0x5c7796['options']['showCommentHighlights'])return null;if(_0x5c7796['options']['ignoreResolvedComments']){const {id:_0x4a3cbc}=ft(_0x2a5286['markerName']),_0x470715=this['editor']['plugins']['get'](o);if(_0x470715['getCommentThread'](_0x4a3cbc)?.['isResolved']&&_0x2a5286['item'])return _0x5c7796['consumable']['consume'](_0x2a5286['item'],'addMarker:'+_0x2a5286['markerName']),_0x5c7796['consumable']['consume'](_0x2a5286['item'],'removeMarker:'+_0x2a5286['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x579dc1=>{_0x579dc1['on']('addMarker:comment',(_0x4eb3ed,_0x520ba0,_0x184e46)=>{if(!_0x184e46['options']['showCommentHighlights'])return;const _0x581dc9=_0x520ba0['item'];if(!_0x581dc9)return;const _0x57767c=_0x184e46['mapper']['toViewElement'](_0x581dc9);this['editor']['model']['schema']['isObject'](_0x581dc9)&&_0x57767c&&!_0x57767c['getCustomProperty']('widget')&&_0x57767c['is']('containerElement')&&_0xef7933(_0x57767c,_0x184e46['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x491817,{writer:_0x7a1ac0,options:_0x3934b9})=>{if(!_0x3934b9['showCommentHighlights'])return null;const _0x335e59=_0x7a1ac0['createContainerElement']('div'),_0x305573=_0x7a1ac0['createEmptyElement']('hr');return _0x7a1ac0['addClass']('ck-horizontal-line',_0x335e59),_0x7a1ac0['insert'](_0x7a1ac0['createPositionAt'](_0x335e59,0x0),_0x305573),_0x335e59;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x475074,{writer:_0x5153ab,options:_0x570a60})=>{if(!_0x570a60['showCommentHighlights'])return null;const _0x16fca2=_0x5153ab['createContainerElement']('span'),_0x282cdc=_0x5153ab['createEmptyElement']('img');return _0x5153ab['addClass']('image-inline',_0x16fca2),_0x5153ab['insert'](_0x5153ab['createPositionAt'](_0x16fca2,0x0),_0x282cdc),_0x16fca2;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x12d51f,{writer:_0x5ca067,options:_0x32bde9})=>{if(_0x32bde9['showCommentHighlights'])return _0x5ca067['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x36484e,_0x29b5a5,_0x44ab61)=>{_0x44ab61['options']['showCommentHighlights']&&_0x36484e['stop']();},{'priority':'high'});}}class r extends _0x4dde71{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(_0x50341b){super(_0x50341b),this['set']('isThreadsLoadingPaused',!0x0),_0x50341b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xd83475,_0x53cef6,_0x8fdb5c,_0xf0d635)=>{const _0x1faba9=_0x50341b['plugins']['get'](o),_0x35f219=_0x8fdb5c?ft(_0x8fdb5c)['id']:null;_0x50341b['model']['change'](()=>{if(_0x35f219){const _0x5c0c44=this['getAllMarkersForId'](_0x35f219);for(const _0x514624 of _0x5c0c44)_0x50341b['editing']['reconvertMarker'](_0x514624);}if(_0xf0d635){const {id:_0x208e4a}=ft(_0xf0d635),_0x2abdf2=_0x1faba9['getCommentThread'](_0x208e4a);if(_0x2abdf2&&_0x2abdf2['unlinkedAt'])return;if(_0x2abdf2&&!_0x2abdf2['isAttached'])return;const _0x326dda=this['getAllMarkersForId'](_0x208e4a);for(const _0x2148f7 of _0x326dda)_0x50341b['editing']['reconvertMarker'](_0x2148f7);}}),_0x35f219&&this['scrollToThreadMarker'](_0x35f219);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x219df7=this['editor'],_0x36ae6f=_0x219df7['plugins']['get'](o),_0x218a61=_0x219df7['config']['get']('collaboration.channelId'),_0x5d4e8b=_0x36ae6f['getCommentThreads']()['filter'](_0x1723af=>_0x1723af['channelId']!==_0x218a61);_0x219df7['commands']['add']('addCommentThread',new ot(_0x219df7)),this['listenTo'](_0x219df7,'change:isReadOnly',(_0x4df457,_0x6d9473,_0x26c154)=>{_0x36ae6f['switchReadOnly'](_0x26c154,_0x219df7['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x36ae6f,dt('addCommentThread',_0x218a61),(_0x1231c3,{threadId:_0xa9f01e})=>{const _0x2f1df8=this['editor']['plugins']['get'](o)['getCommentThread'](_0xa9f01e);_0x2f1df8?.['unlinkedAt']&&this['_attachArchivedThread'](_0xa9f01e);}),this['listenTo'](_0x36ae6f,dt('removeCommentThread',_0x218a61),(_0x2eb393,{threadId:_0x1a6528})=>{_0x219df7['model']['enqueueChange']({'isUndoable':!0x1},_0x3067a7=>{const _0x287112=this['getAllMarkersForId'](_0x1a6528);for(const _0x454b31 of _0x287112)_0x3067a7['removeMarker'](_0x454b31);});}),this['listenTo'](_0x36ae6f,dt('resolveCommentThread',_0x218a61),(_0x15bf48,{threadId:_0x50cf98})=>{(this['_reconvertMarkers'](_0x50cf98),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x50cf98)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x36ae6f,dt('reopenCommentThread',_0x218a61),(_0x436ea8,{threadId:_0x2a15ec})=>{this['_reconvertMarkers'](_0x2a15ec);},{'priority':'low'}),this['listenTo'](_0x36ae6f,dt('addComment',_0x218a61),(_0x51a9ad,{threadId:_0x266cf7,isFromAdapter:_0x3fe5cd})=>{const _0x1d2e07=this['getAllMarkersForId'](_0x266cf7);if(_0x3fe5cd||0x0==_0x1d2e07['length']||!_0x36ae6f['hasCommentThread'](_0x266cf7))return;0x1===_0x36ae6f['getCommentThread'](_0x266cf7)['length']&&_0x219df7['model']['enqueueChange']({'isUndoable':!0x1},_0x13d070=>{for(const _0x4e293c of _0x1d2e07)_0x13d070['updateMarker'](_0x4e293c,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5d4e8b);}['afterInit'](){!async function(_0x1f1c38){const _0x583b36=_0x4d0ba8([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]),_0x3a97a4=0x73460ab3,_0x11a6c7=0x73418de3^_0x3a97a4,_0x13ce81=window[_0x4d0ba8([0x44,0x61,0x74,0x65])][_0x4d0ba8([0x6e,0x6f,0x77])](),_0x5ab38b=_0x1f1c38[_0x4d0ba8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x59ea12=new window[(_0x4d0ba8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x734eb8=>{_0x5ab38b[_0x4d0ba8([0x6f,0x6e,0x63,0x65])](_0x4d0ba8([0x72,0x65,0x61,0x64,0x79]),_0x734eb8);}),_0x14f6ef={[_0x4d0ba8([0x6b,0x74,0x79])]:_0x4d0ba8([0x45,0x43]),[_0x4d0ba8([0x75,0x73,0x65])]:_0x4d0ba8([0x73,0x69,0x67]),[_0x4d0ba8([0x63,0x72,0x76])]:_0x4d0ba8([0x50,0x2d,0x32,0x35,0x36]),[_0x4d0ba8([0x78])]:_0x4d0ba8([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]),[_0x4d0ba8([0x79])]:_0x4d0ba8([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]),[_0x4d0ba8([0x61,0x6c,0x67])]:_0x4d0ba8([0x45,0x53,0x32,0x35,0x36])},_0x3d86a3=_0x5ab38b[_0x4d0ba8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4d0ba8([0x67,0x65,0x74])](_0x4d0ba8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x7f2ffd(){let _0xe01799,_0x52cd18=null,_0x214ae4=null;try{if(_0x3d86a3==_0x4d0ba8([0x47,0x50,0x4c]))return _0x4d0ba8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xe01799=_0x26afd4(),!_0xe01799)return _0x4d0ba8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xe01799[_0x4d0ba8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x214ae4=_0x333336(_0xe01799[_0x4d0ba8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xe01799[_0x4d0ba8([0x6a,0x74,0x69])])),await _0x4cf79e()?_0x1515c2()?_0x22ff0f()?_0x4d0ba8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xc91ad4()?(_0xe01799[_0x4d0ba8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4d0ba8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x52cd18=_0x467ecb(_0x4d0ba8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0xc58799()):_0x4d0ba8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4d0ba8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4d0ba8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4d0ba8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x22ff0f(){const _0x31735d=[_0x4d0ba8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4d0ba8([0x74,0x72,0x69,0x61,0x6c])][_0x4d0ba8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe01799[_0x4d0ba8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x13ce81/0x3e8:0xe10*_0x11a6c7;return _0xe01799[_0x4d0ba8([0x65,0x78,0x70])]<_0x31735d;}function _0x1515c2(){const _0x75e0cc=_0xe01799[_0x4d0ba8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x75e0cc)return!0x1;if(_0x75e0cc[_0x4d0ba8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d0ba8([0x2a])))return!0x0;if(_0x75e0cc[_0x4d0ba8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d0ba8([0x43,0x4d,0x54])))return!0x0;if(_0x75e0cc[_0x4d0ba8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d0ba8([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4b84fc())return!0x0;if(_0x75e0cc[_0x4d0ba8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d0ba8([0x52,0x43,0x4d,0x54]))){if(_0xb05847())return!0x0;if(_0x374edf()||_0x1808b7())return!0x0;}return!0x1;}function _0xc91ad4(){const _0x26eb1e=_0xe01799[_0x4d0ba8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x26eb1e||0x0==_0x26eb1e[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1024d7}=new URL(window[_0x4d0ba8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x26eb1e[_0x4d0ba8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1024d7))return!0x0;const _0x880d19=_0x1024d7[_0x4d0ba8([0x73,0x70,0x6c,0x69,0x74])](_0x4d0ba8([0x2e]));return _0x26eb1e[_0x4d0ba8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x42ded2=>_0x42ded2[_0x4d0ba8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d0ba8([0x2a])))[_0x4d0ba8([0x6d,0x61,0x70])](_0x5c18f7=>_0x5c18f7[_0x4d0ba8([0x73,0x70,0x6c,0x69,0x74])](_0x4d0ba8([0x2e])))[_0x4d0ba8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2e3a19=>_0x2e3a19[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x880d19[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4d0ba8([0x6d,0x61,0x70])](_0x295bbf=>Array(_0x880d19[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x295bbf[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4d0ba8([0x66,0x69,0x6c,0x6c])](_0x295bbf[0x0]===_0x4d0ba8([0x2a])?_0x4d0ba8([0x2a]):'')[_0x4d0ba8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x295bbf))[_0x4d0ba8([0x73,0x6f,0x6d,0x65])](_0x3094f2=>_0x880d19[_0x4d0ba8([0x65,0x76,0x65,0x72,0x79])]((_0x6f1cf5,_0x43d91d)=>_0x3094f2[_0x43d91d]===_0x6f1cf5||_0x3094f2[_0x43d91d]===_0x4d0ba8([0x2a])));}function _0xc58799(){return _0x52cd18&&_0x214ae4?new window[(_0x4d0ba8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x12f5a3,_0x412f23)=>{_0x52cd18[_0x4d0ba8([0x74,0x68,0x65,0x6e])](_0x12f5a3,_0x412f23),_0x214ae4[_0x4d0ba8([0x74,0x68,0x65,0x6e])](_0x27b1fe=>{_0x27b1fe!=_0x4d0ba8([0x56,0x61,0x6c,0x69,0x64])&&_0x12f5a3(_0x27b1fe);},_0x412f23);}):_0x52cd18||_0x214ae4||_0x4d0ba8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x333336(_0x13a48d,_0x245813){return new window[(_0x4d0ba8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x334c63=>{if(_0x4c636())return _0x334c63(_0x4d0ba8([0x56,0x61,0x6c,0x69,0x64]));_0xa74437(),_0x5ab38b[_0x4d0ba8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4d0ba8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2d59a4=!0x1;const _0x37488a=_0x483b07();function _0x8c1d24(_0x353604){return!!_0x353604&&(typeof _0x353604===_0x4d0ba8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x353604===_0x4d0ba8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x353604[_0x4d0ba8([0x74,0x68,0x65,0x6e])]===_0x4d0ba8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x353604[_0x4d0ba8([0x63,0x61,0x74,0x63,0x68])]===_0x4d0ba8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x478d60(_0x3ffdc0){_0x46bcc6(_0x3ffdc0)[_0x4d0ba8([0x74,0x68,0x65,0x6e])](_0x44f641=>{if(!_0x44f641||_0x44f641[_0x4d0ba8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4d0ba8([0x6f,0x6b]))return _0x4d0ba8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x33f46f(_0x5a8435(_0x37488a+_0x245813))!=_0x44f641[_0x4d0ba8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4d0ba8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4d0ba8([0x56,0x61,0x6c,0x69,0x64]);})[_0x4d0ba8([0x74,0x68,0x65,0x6e])](_0x1197af=>(_0x3e97aa(),_0x1197af),()=>{const _0x3d49cc=_0x551915();return null==_0x3d49cc?(_0x3e97aa(),_0x4d0ba8([0x56,0x61,0x6c,0x69,0x64])):_0x4d0ba8(_0x13ce81-_0x3d49cc>(0x574a8eb3^_0x3a97a4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4d0ba8([0x74,0x68,0x65,0x6e])](_0x334c63)[_0x4d0ba8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x334c63(_0x4d0ba8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xf97d50=0x7370e433^_0x3a97a4;function _0x3e97aa(){const _0x51f9d1=_0x4d0ba8([0x6c,0x6c,0x63,0x74,0x2d])+_0x33f46f(_0x5a8435(_0x13a48d)),_0x2c488c=_0x57498d(_0x33f46f(window[_0x4d0ba8([0x4d,0x61,0x74,0x68])][_0x4d0ba8([0x63,0x65,0x69,0x6c])](_0x13ce81/_0xf97d50)));window[_0x4d0ba8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d0ba8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x51f9d1,_0x2c488c);}function _0x551915(){const _0x4f43ac=_0x4d0ba8([0x6c,0x6c,0x63,0x74,0x2d])+_0x33f46f(_0x5a8435(_0x13a48d)),_0x2c31e4=window[_0x4d0ba8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d0ba8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f43ac);return _0x2c31e4?window[_0x4d0ba8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57498d(_0x2c31e4),0x10)*_0xf97d50:null;}function _0x46bcc6(_0x27021b){return new window[(_0x4d0ba8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x544e9a,_0x1bce53)=>{_0x27021b[_0x4d0ba8([0x74,0x68,0x65,0x6e])](_0x544e9a,_0x1bce53),window[_0x4d0ba8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1bce53,0x7347de73^_0x3a97a4);});}}_0x5ab38b[_0x4d0ba8([0x6f,0x6e])](_0x4d0ba8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x163062,_0x81b115)=>{if(_0x81b115[0x0]!=_0x13a48d)return _0x334c63(_0x4d0ba8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x81b115[0x1]={..._0x81b115[0x1],[_0x4d0ba8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x37488a};},{[_0x4d0ba8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d0ba8([0x68,0x69,0x67,0x68])}),_0x5ab38b[_0x4d0ba8([0x6f,0x6e])](_0x4d0ba8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5b182e=>{_0x8c1d24(_0x5b182e[_0x4d0ba8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2d59a4=!0x0,_0x478d60(_0x5b182e[_0x4d0ba8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4d0ba8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d0ba8([0x6c,0x6f,0x77])}),_0x59ea12[_0x4d0ba8([0x74,0x68,0x65,0x6e])](()=>{_0x2d59a4||_0x334c63(_0x4d0ba8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4c636(){return _0x5ab38b[_0x4d0ba8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d0ba8([0x76,0x69,0x65,0x77])][_0x4d0ba8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4d0ba8([0x61,0x75,0x74,0x6f]);}function _0xa74437(){_0x5ab38b[_0x4d0ba8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d0ba8([0x76,0x69,0x65,0x77])][_0x4d0ba8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4d0ba8([0x61,0x75,0x74,0x6f]);}}function _0x467ecb(_0x5e413c){const _0xdaa898=[new window[(_0x4d0ba8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2dd7b6=>setTimeout(_0x2dd7b6,0x734f347f^_0x3a97a4)),_0x59ea12[_0x4d0ba8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4d0ba8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3669a0=>{let _0x170d0f=0x0;_0x5ab38b[_0x4d0ba8([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d0ba8([0x6f,0x6e])](_0x4d0ba8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x493322,_0x45dded)=>{_0x45dded[0x0][_0x4d0ba8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x170d0f++,_0x170d0f==(0x73460f5b^_0x3a97a4)&&(_0x3669a0(),_0x493322[_0x4d0ba8([0x6f,0x66,0x66])]());});}))];return window[_0x4d0ba8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4d0ba8([0x72,0x61,0x63,0x65])](_0xdaa898)[_0x4d0ba8([0x74,0x68,0x65,0x6e])](()=>_0x5e413c);}async function _0x3359a6(){await _0x59ea12,_0x5ab38b[_0x4d0ba8([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d0ba8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4cd32b,_0x5ab38b[_0x4d0ba8([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d0ba8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4cd32b,_0x5ab38b[_0x4d0ba8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4d0ba8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4b84fc(){return window[_0x4d0ba8([0x67,0x6c,0x6f,0x62])]&&window[_0x4d0ba8([0x67,0x6c,0x6f,0x62])][_0x4d0ba8([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0xb05847(){return _0x13f867(_0x4d0ba8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x571391(_0x4d0ba8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4d0ba8([0x73,0x74,0x61,0x74,0x65])]==_0x4d0ba8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x374edf(){return _0x13f867(_0x4d0ba8([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 _0x1808b7(){return _0x13f867(_0x4d0ba8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2c25a9(_0x2453df){const _0x50465e=_0x490b62();_0x5ab38b[_0x50465e]=_0x4d0ba8([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2453df,_0x2453df!=_0x4d0ba8([0x56,0x61,0x6c,0x69,0x64])&&_0x3359a6();}function _0x490b62(){const _0x11292a=window[_0x4d0ba8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4d0ba8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4d0ba8([0x6e,0x6f,0x77])]())[_0x4d0ba8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4d0ba8([0x2e]),'');let _0x151b6f=_0x4d0ba8([0x4b]);for(let _0x4b000d=0x0;_0x4b000d<_0x11292a[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b000d+=0x2){let _0x53a6e6=window[_0x4d0ba8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x11292a[_0x4d0ba8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b000d,_0x4b000d+0x2));_0x53a6e6>=_0x583b36[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x53a6e6-=_0x583b36[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x151b6f+=_0x583b36[_0x53a6e6];}return _0x151b6f;}function _0x26afd4(){const _0x14aef8=_0x3d86a3[_0x4d0ba8([0x73,0x70,0x6c,0x69,0x74])](_0x4d0ba8([0x2e]));if(0x3!=_0x14aef8[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2d7e6a(_0x14aef8[0x1]);function _0x2d7e6a(_0x209468){const _0x4a9950=_0x41019e(_0x209468);return _0x4a9950&&_0x5a121c()?_0x4a9950:null;function _0x5a121c(){const _0x1e31f4=_0x4a9950[_0x4d0ba8([0x6a,0x74,0x69])],_0x3ccbf4=window[_0x4d0ba8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e31f4[_0x4d0ba8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1e31f4[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x27c4e4={..._0x4a9950,[_0x4d0ba8([0x6a,0x74,0x69])]:_0x1e31f4[_0x4d0ba8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1e31f4[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x27c4e4[_0x4d0ba8([0x76,0x63])],_0x5a8435(_0x27c4e4)==_0x3ccbf4;}}}async function _0x4cf79e(){let _0x13bb41=!0x0;try{const _0x206fb5=_0x3d86a3[_0x4d0ba8([0x73,0x70,0x6c,0x69,0x74])](_0x4d0ba8([0x2e])),[_0x3c11e0,_0x14c7bf,_0x4f7e80]=_0x206fb5;return _0x4e8666(_0x3c11e0),await _0x5d5108(_0x3c11e0,_0x14c7bf,_0x4f7e80),_0x13bb41;}catch{return!0x1;}function _0x4e8666(_0x188671){const _0x5b23fd=_0x41019e(_0x188671);_0x5b23fd&&_0x5b23fd[_0x4d0ba8([0x61,0x6c,0x67])]==_0x4d0ba8([0x45,0x53,0x32,0x35,0x36])||(_0x13bb41=!0x1);}async function _0x5d5108(_0x10add9,_0x4b5696,_0x1a4a3d){const _0x22ffc9=window[_0x4d0ba8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4d0ba8([0x66,0x72,0x6f,0x6d])](_0x2900d2(_0x1a4a3d),_0x2e93b2=>_0x2e93b2[_0x4d0ba8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2d6181=new window[(_0x4d0ba8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4d0ba8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x10add9+_0x4d0ba8([0x2e])+_0x4b5696),_0x393c5e=window[_0x4d0ba8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4d0ba8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x393c5e)return;const _0x3d372b=await _0x393c5e[_0x4d0ba8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4d0ba8([0x6a,0x77,0x6b]),_0x14f6ef,{[_0x4d0ba8([0x6e,0x61,0x6d,0x65])]:_0x4d0ba8([0x45,0x43,0x44,0x53,0x41]),[_0x4d0ba8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4d0ba8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4d0ba8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x393c5e[_0x4d0ba8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4d0ba8([0x6e,0x61,0x6d,0x65])]:_0x4d0ba8([0x45,0x43,0x44,0x53,0x41]),[_0x4d0ba8([0x68,0x61,0x73,0x68])]:{[_0x4d0ba8([0x6e,0x61,0x6d,0x65])]:_0x4d0ba8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3d372b,_0x22ffc9,_0x2d6181)||(_0x13bb41=!0x1);}}function _0x41019e(_0x20bb82){return _0x20bb82[_0x4d0ba8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4d0ba8([0x65,0x79]))?JSON[_0x4d0ba8([0x70,0x61,0x72,0x73,0x65])](_0x2900d2(_0x20bb82)):null;}function _0x2900d2(_0x338647){return window[_0x4d0ba8([0x61,0x74,0x6f,0x62])](_0x338647[_0x4d0ba8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4d0ba8([0x2b]))[_0x4d0ba8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4d0ba8([0x2f])));}function _0x5a8435(_0x125c01){let _0x577125=0x1505;function _0x1480f4(_0x271b9d){for(let _0x353cea=0x0;_0x353cea<_0x271b9d[_0x4d0ba8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x353cea++){const _0x2f54d6=_0x271b9d[_0x4d0ba8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x353cea);_0x577125=(_0x577125<<0x5)+_0x577125+_0x2f54d6,_0x577125&=_0x577125;}}function _0x5aa866(_0x57a7c0){Array[_0x4d0ba8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x57a7c0)?_0x57a7c0[_0x4d0ba8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5aa866):_0x57a7c0&&typeof _0x57a7c0==_0x4d0ba8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4d0ba8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x57a7c0)[_0x4d0ba8([0x73,0x6f,0x72,0x74])]()[_0x4d0ba8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x50a462,_0x6d1f1f])=>{_0x1480f4(_0x50a462),_0x5aa866(_0x6d1f1f);}):_0x1480f4(window[_0x4d0ba8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x57a7c0));}return _0x5aa866(_0x125c01),_0x577125>>>0x0;}function _0x33f46f(_0x32e561){return _0x32e561[_0x4d0ba8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4d0ba8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4d0ba8([0x30]));}function _0x57498d(_0x451f99){return _0x451f99[_0x4d0ba8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4d0ba8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4d0ba8([0x6a,0x6f,0x69,0x6e])]('');}function _0x13f867(_0x3fefce){return _0x5ab38b[_0x4d0ba8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4d0ba8([0x68,0x61,0x73])](_0x3fefce);}function _0x571391(_0x19b068){return _0x5ab38b[_0x4d0ba8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4d0ba8([0x67,0x65,0x74])](_0x19b068);}function _0x4cd32b(){}function _0x4d0ba8(_0x3422b6){return _0x3422b6['map'](_0x58fa4c=>String['fromCharCode'](_0x58fa4c))['join']('');}_0x2c25a9(await _0x7f2ffd());}(this);}['destroy'](){const _0x5a1033=this['editor']['plugins']['get'](o),_0x2db583=this['editor']['config']['get']('collaboration.channelId');for(const _0x3df58d of _0x5a1033['getCommentThreads']({'channelId':_0x2db583}))_0x5a1033['_detachCommentThread'](_0x3df58d['id']),_0x5a1033['_threads']['delete'](_0x3df58d['id']);super['destroy']();}['hasMarkerForId'](_0x20da31){return this['getAllMarkersForId'](_0x20da31)['length']>0x0;}['getAllMarkersForId'](_0x44204a){const _0x4ea2b3=[];for(const _0x5093dd of this['editor']['model']['markers'])_0x5093dd['name']['startsWith']('comment:'+_0x44204a)&&_0x4ea2b3['push'](_0x5093dd);return _0x4ea2b3;}['scrollToThreadMarker'](_0x3a2d09){setTimeout(()=>{const _0x58d715=this['_getTargetForId'](_0x3a2d09);if(!_0x58d715)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x3a2d09&&nt({'target':_0x58d715[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x31bbab){this['editor']['model']['change'](()=>{for(const _0xa170bb of this['getAllMarkersForId'](_0x31bbab))this['editor']['editing']['reconvertMarker'](_0xa170bb);});}['_attachArchivedThread'](_0x157cdd){const _0x4328b8=this['editor']['plugins']['get'](o),_0x1a1193=this['editor']['plugins']['get'](b),_0x309860=_0x4328b8['getCommentThread'](_0x157cdd);if(!_0x309860['isAttached']){const _0x21694e=_0x309860['attachTo'](()=>this['_getTargetForId'](_0x309860['id']));_0x1a1193['registerAnnotation'](_0x21694e),_0x309860['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x516152=this['editor'],_0x22e285=_0x516152['plugins']['get'](it);_0x516152['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3de7d9,_0x26c626)=>{const {id:_0x2e549e}=ft(_0x3de7d9['markerName']),_0x4a1093=_0x516152['plugins']['get'](o)['getCommentThread'](_0x2e549e),_0xd67029=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2e549e;let _0x46580e;if(_0x4a1093&&_0x4a1093['isResolved']&&!_0xd67029&&_0x3de7d9['item'])return _0x26c626['consumable']['consume'](_0x3de7d9['item'],'addMarker:'+_0x3de7d9['markerName']),_0x26c626['consumable']['consume'](_0x3de7d9['item'],'removeMarker:'+_0x3de7d9['markerName']),null;const _0x3609bf=['ck-comment-marker'];return _0xd67029&&_0x3609bf['push']('ck-comment-marker--active'),_0x46580e=_0x4a1093?.['length']?_0x4a1093['comments']['first']['author']['id']:_0x22e285['me']['id'],{'classes':_0x3609bf,'attributes':{'data-comment':_0x2e549e,'data-author-id':_0x46580e}};}}),_0x516152['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x644b9d,{options:_0x1981ae})=>{if(_0x1981ae['showCommentHighlights'])return null;const _0x1cd97d=_0x516152['plugins']['get'](o),_0x50f1c7=_0x516152['model']['markers']['get'](_0x644b9d),{id:_0x197aec,part:_0x18d2f6}=ft(_0x644b9d);return _0x50f1c7&&!_0x50f1c7['affectsData']||_0x1981ae['ignoreResolvedComments']&&_0x1cd97d['getCommentThread'](_0x197aec)?.['isResolved']?null:{'group':'comment','name':_0x18d2f6?_0x197aec+':'+_0x18d2f6:_0x197aec};}}),_0x516152['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x24b657,{writer:_0x2f2e2c})=>_0x2f2e2c['createElement']('$marker',{'data-name':'comment:'+_0x24b657['getAttribute']('id')})}),_0x516152['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1b0a3b=this['editor'],_0x5ee47f=_0x1b0a3b['plugins']['get'](o),_0x36e038=new Set(),_0x3f9519=new Set();_0x1b0a3b['model']['document']['registerPostFixer'](_0x2348da=>{let _0x36fd88=!0x1;for(const {name:_0x3f339c,data:_0x3c283e}of _0x1b0a3b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2f8985,id:_0x3fd9ee}=ft(_0x3f339c);let _0x3409a3=_0x3c283e['newRange'];if('comment'!==_0x2f8985||!_0x3409a3)continue;const _0x39071a='$graveyard'===_0x3409a3['root']['rootName'];_0x39071a||(_0x3409a3=ht(_0x3409a3,_0x1b0a3b['model']),!_0x3409a3||_0x3409a3['isCollapsed']||!_0x3c283e['newRange']||_0x3409a3['isEqual'](_0x3c283e['newRange']))?_0x1b0a3b['model']['hasContent'](_0x3409a3)&&!_0x39071a?this['isThreadsLoadingPaused']?_0x36e038['add'](_0x3f339c):this['_handleThreadMarker'](_0x3f339c,_0x3fd9ee):(_0x3f9519['add'](_0x3f339c),_0x36e038['delete'](_0x3f339c),_0x2348da['removeMarker'](_0x3f339c),_0x36fd88=!0x0):(_0x2348da['updateMarker'](_0x3f339c,{'range':_0x3409a3}),_0x36fd88=!0x0);}return _0x36fd88;}),this['on']('change:isThreadsLoadingPaused',(_0x58afb4,_0x525da9,_0x27665f)=>{if(!_0x27665f&&_0x36e038['size'])for(const _0x572cda of _0x36e038){const {id:_0x5b1230}=ft(_0x572cda);_0x36e038['delete'](_0x572cda),_0x1b0a3b['model']['markers']['get'](_0x572cda)&&this['_handleThreadMarker'](_0x572cda,_0x5b1230);}}),this['listenTo'](_0x1b0a3b['model']['document'],'change',()=>{for(const {name:_0xb19f00,data:{newRange:_0x24c2b3}}of _0x1b0a3b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x24e8d6,id:_0x57a303}=ft(_0xb19f00);if('comment'!==_0x24e8d6)continue;const _0x3a9960=_0x5ee47f['getCommentThread'](_0x57a303),_0x17d9ff=this['hasMarkerForId'](_0x57a303);_0x3a9960&&(!_0x3a9960['_hasTargetInContent']&&_0x24c2b3&&_0x1b0a3b['editing']['view']['once']('render',()=>{const _0x18085e=_0x1b0a3b['plugins']['get'](y),_0x36c892=_0x5ee47f['_threadToController']['get'](_0x3a9960)['view'];_0x18085e['getByInnerView'](_0x36c892)['refreshVisibility']();},{'priority':'low'}),_0x3a9960['_hasTargetInContent']=_0x17d9ff||!!_0x24c2b3),_0x24c2b3||(_0x3f9519['add'](_0xb19f00),_0x36e038['delete'](_0xb19f00));}for(const _0x548dae of _0x3f9519){const {id:_0x1d22be}=ft(_0x548dae),_0x69edcb=_0x5ee47f['getCommentThread'](_0x1d22be);if(_0x36e038['delete'](_0x548dae),!_0x69edcb)continue;const _0x591626=this['hasMarkerForId'](_0x1d22be);_0x591626||_0x69edcb['isSubmitted']?_0x591626||_0x69edcb['unlinkedAt']||_0x69edcb['setUnlinkedAt'](new Date()):_0x69edcb['remove']();}_0x3f9519['clear']();});}['_handleInitialThreads'](_0x3fa77c){_0x3fa77c['forEach'](_0x39cab4=>{_0x39cab4['unlinkedAt']&&this['_attachArchivedThread'](_0x39cab4['id']);});}['_getTargetForId'](_0x176fe3){const _0x3ff028=this['editor'],_0x9498c7=this['getAllMarkersForId'](_0x176fe3);return et(_0x3ff028['editing'],_0x9498c7);}['_getTextContext'](_0x47ce24){const _0x51a77a=this['getAllMarkersForId'](_0x47ce24);let _0x49bc28='',_0x2d8e93=!0x1;for(const _0x33e63e of _0x51a77a){const _0x52ce14=_0x33e63e['getRange']();for(const _0x5932b7 of Array['from'](_0x52ce14['getItems']()))_0x5932b7['is']('$textProxy')?(_0x49bc28&&_0x2d8e93&&(_0x49bc28+='\x20',_0x2d8e93=!0x1),_0x49bc28+=_0x5932b7['data']):_0x2d8e93=!0x0;_0x2d8e93=!0x0;}return _0x49bc28['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x10033f,_0x1a0253){const _0x1ee501=this['editor'],_0x18a658=_0x1ee501['plugins']['get'](o);let _0x56166a=_0x18a658['getCommentThread'](_0x1a0253);const _0x501742=_0x1ee501['config']['get']('collaboration.channelId'),_0x3d7bc1=_0x1ee501['plugins']['get'](b);if(_0x56166a&&(_0x56166a['unlinkedAt']&&_0x56166a['setUnlinkedAt'](null),_0x56166a['isAttached']))return _0x56166a;return!this['getAllMarkersForId'](_0x1a0253)[0x0]['managedUsingOperations']?_0x1ee501['editing']['view']['once']('render',()=>{if(_0x18a658['getCommentThread'](_0x1a0253))return;const _0x1fde7d=_0x1ee501['plugins']['get'](y);_0x56166a=_0x18a658['openNewCommentThread']({'channelId':_0x501742,'threadId':_0x1a0253,'target':()=>this['_getTargetForId'](_0x1a0253),'context':{'type':'text','value':this['_getTextContext'](_0x1a0253)}});const _0x4feaeb=_0x18a658['_threadToController']['get'](_0x56166a)['view'],_0x4747fc=_0x1fde7d['getByInnerView'](_0x4feaeb);_0x4747fc&&_0x3d7bc1['registerAnnotation'](_0x4747fc);},{'priority':'low'}):_0x18a658['fetchCommentThread']({'channelId':_0x501742,'threadId':_0x1a0253})['then'](_0x20164d=>{if('destroyed'!==_0x1ee501['state']){if(_0x56166a=_0x20164d,_0x56166a&&!_0x56166a['isAttached']){const _0x4964a5=_0x56166a['attachTo'](()=>this['_getTargetForId'](_0x1a0253));_0x3d7bc1['registerAnnotation'](_0x4964a5),_0x56166a['isResolved']&&this['_reconvertMarkers'](_0x1a0253);}else{if(!_0x56166a){const _0x21cc22=this['getAllMarkersForId'](_0x1a0253);_0x1ee501['model']['change'](_0x5e90a1=>{for(const _0x3a7a86 of _0x21cc22)_0x5e90a1['removeMarker'](_0x3a7a86);});}}}}),_0x56166a;}['_handleThreadMarker'](_0x5134d5,_0x4517d9){const _0xcf8090=this['_attachMarkerToThread'](_0x5134d5,_0x4517d9);_0xcf8090&&!_0xcf8090['context']&&_0xcf8090['setContext']({'type':'text','value':this['_getTextContext'](_0x4517d9)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4c618c=this['editor'];rt(_0x4c618c['model'],({left:_0x47c742,entered:_0x2755af})=>{for(const _0x52ce64 of _0x47c742)if(mt(_0x52ce64)){_0x4c618c['ui']['ariaLiveAnnouncer']['announce'](N(_0x4c618c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x392289 of _0x2755af)if(mt(_0x392289)){_0x4c618c['ui']['ariaLiveAnnouncer']['announce'](N(_0x4c618c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x47e754)));break;}});}}function dt(_0x2134bb,_0x4c8037){return _0x4c8037?_0x2134bb+':'+_0x4c8037:_0x2134bb;}function ht(_0x576198,_0x1a564f){const _0x52d190=_0x1a564f['schema'],_0x513d32=_0x1a564f['createRange'](_0x576198['start']);for(const _0x3c68ae of _0x576198['getWalker']()){const {type:_0x5f1dff,item:_0x570709,nextPosition:_0x3b863c}=_0x3c68ae;if('text'===_0x5f1dff||_0x52d190['isObject'](_0x570709)){const _0x574889=_0x1a564f['createPositionBefore'](_0x570709);_0x513d32['isCollapsed']&&(_0x513d32['start']=_0x574889),_0x513d32['end']=_0x3b863c;}}return _0x513d32;}function mt(_0x376579){return'comment'===ft(_0x376579['name'])['group'];}class s extends _0x4dde71{['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 _0x435972=this['editor'],_0x707e5a=_0x435972['plugins']['get'](o),_0x3d7b9d=_0x435972['plugins']['get'](r),_0x2e5a2a=_0x435972['plugins']['get'](y),_0x3837ae=_0x435972['plugins']['get'](b);_0x435972['ui']['componentFactory']['add']('comment',()=>{const _0x53fdd7=this['_createUIButton'](_0x451c43);return _0x53fdd7['tooltip']=!0x0,_0x53fdd7;}),_0x435972['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x28d01d)),_0x3837ae['addSourceCollector'](()=>{const _0x51ddd3=[];for(const [_0x30ac2d,_0x2f9432]of _0x707e5a['_threadToController']){const _0xa74f5b=_0x3d7b9d['getAllMarkersForId'](_0x30ac2d['id']),_0x30867c=_0xa74f5b['map'](_0x36e0fa=>_0x36e0fa['getRange']());_0xa74f5b['length']>0x0&&_0x51ddd3['push']([_0x2f9432['view'],_0x30867c]);}return _0x51ddd3;}),this['listenTo'](_0x2e5a2a,'change:activeAnnotations',(_0x2d4396,_0x2f4882,_0x15974a)=>{const _0x22ccaf=Array['from'](_0x15974a)['map'](_0x53b663=>_0x53b663['innerView'])['find'](_0x15b599=>_0x707e5a['_viewToController']['has'](_0x15b599));if(!_0x22ccaf)return void(_0x3d7b9d['activeMarker']=null);const _0xf050d9=_0x707e5a['_viewToController']['get'](_0x22ccaf)['model']['id'],_0x50bad5='comment:'+_0xf050d9;_0xf050d9&&_0x3d7b9d['hasMarkerForId'](_0xf050d9)?_0x3d7b9d['activeMarker']=_0x50bad5:_0x3d7b9d['activeMarker']&&(_0x3d7b9d['activeMarker']=null);}),this['listenTo'](_0x707e5a,'removeCommentThread',(_0x39d97c,{threadId:_0x3546c3,isFromAdapter:_0x54d4cc})=>{!_0x54d4cc&&_0x435972['ui']['focusTracker']['isFocused']&&_0x3d7b9d['hasMarkerForId'](_0x3546c3)&&_0x435972['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x707e5a,'addComment',(_0x46ced8,{threadId:_0x2dc72f,isFromAdapter:_0x3dbdae})=>{if(_0x3dbdae||!_0x3d7b9d['hasMarkerForId'](_0x2dc72f)||!_0x707e5a['hasCommentThread'](_0x2dc72f))return;0x1===_0x707e5a['getCommentThread'](_0x2dc72f)['length']&&(_0x435972['editing']['view']['focus'](),_0x46ced8['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4fcab5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x540ac9;for(const _0x2c1180 in _0x4fcab5){const _0x4c9fd3=_0x2c1180,_0x40e0b5=_0x4fcab5[_0x4c9fd3];if('commentsLicenseKeyValid'==_0x40e0b5||'commentsLicenseKeyInvalid'==_0x40e0b5||'commentsLicenseKeyExpired'==_0x40e0b5||'commentsLicenseKeyDomainLimit'==_0x40e0b5||'commentsLicenseKeyNotAllowed'==_0x40e0b5||'commentsLicenseKeyEvaluationLimit'==_0x40e0b5||'commentsLicenseKeyUsageLimit'==_0x40e0b5){delete _0x4fcab5[_0x4c9fd3],_0x540ac9=_0x40e0b5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x540ac9&&_0x4fcab5['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x540ac9&&_0x4fcab5['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x540ac9&&_0x4fcab5['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x540ac9&&_0x4fcab5['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x540ac9&&_0x4fcab5['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x540ac9&&_0x4fcab5['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4a4415){const _0x311fde=this['editor'],_0x1dc2ba=new _0x4a4415(_0x311fde['locale']),_0x3d8a99=_0x311fde['commands']['get']('addCommentThread');return _0x1dc2ba['set']({'label':N(_0x311fde['locale'],'Comment'),'icon':_0x585956}),_0x1dc2ba['bind']('isEnabled')['to'](_0x3d8a99,'isEnabled',_0x3d8a99,'hasContent',(_0x137363,_0xde68fd)=>_0x137363&&_0xde68fd),this['listenTo'](_0x1dc2ba,'execute',()=>{_0x3d8a99['execute']();}),_0x1dc2ba;}}class i extends _0x4dde71{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x42389e){super(_0x42389e),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3eaf61,_0x27750c,_0x53e304)=>{_0x53e304?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2b59d7,_0x5e696e]of this['editor']['commands'])_0x5e696e['affectsData']&&'addCommentThread'!==_0x2b59d7&&_0x5e696e['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 _0x56ed84=this['editor']['editing']['view']['document'];this['listenTo'](_0x56ed84,'cut',_0x31bfd8=>_0x31bfd8['stop'](),{'priority':'highest'}),this['listenTo'](_0x56ed84,'clipboardInput',_0x3cf964=>_0x3cf964['stop'](),{'priority':'highest'}),this['listenTo'](_0x56ed84,'delete',_0x485e69=>_0x485e69['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x537839,_0x35a380]of this['editor']['commands'])_0x35a380['affectsData']&&'addCommentThread'!==_0x537839&&_0x35a380['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 _0x4cc9b8{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44f0e8){super(_0x44f0e8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x206028=this['context']['plugins']['get'](y);this['listenTo'](_0x206028,'_activateAnnotation',(_0x26bd14,_0x4a0a25)=>{for(const _0x4fde05 of this['activeUIs']){const _0x510228=this['_uis']['get'](_0x4fde05);(0x0,this['uisData']['get'](_0x4fde05)['filter'])(_0x4a0a25)&&_0x510228['setActiveAnnotation'](_0x4a0a25);}}),this['listenTo'](_0x206028,'_deactivateAllAnnotations',()=>{for(const _0x357cf0 of this['activeUIs']){this['_uis']['get'](_0x357cf0)['setActiveAnnotation'](null);}}),this['listenTo'](_0x206028['_visibleAnnotations'],'add',(_0x32464e,_0x8ef53)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x8ef53);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x36dc77){return this['activeUIs']['has'](_0x36dc77);}['activate'](_0x17692d,_0x2b3e60=this['defaultFilter']){const _0x5f219=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x17692d))throw new _0x542f67('annotationsuis-missing-ui',this,{'uiName':_0x17692d});this['isActive'](_0x17692d)&&this['deactivate'](_0x17692d),this['activeUIs']['add'](_0x17692d);const _0x438567=new S();v({'source':_0x5f219['_visibleAnnotations'],'target':_0x438567,'filter':_0x2b3e60}),this['uisData']['set'](_0x17692d,{'collection':_0x438567,'filter':_0x2b3e60});const _0x4ce7da=this['_uis']['get'](_0x17692d);_0x4ce7da['attach'](_0x438567),this['listenTo'](_0x4ce7da,'change:activeAnnotation',(_0x43600b,_0x115d17,_0x541ce4,_0x430031)=>{_0x430031&&_0x5f219['_removeActiveAnnotation'](_0x430031),_0x541ce4&&_0x5f219['_addActiveAnnotation'](_0x541ce4);});}['deactivate'](_0x3c0c82){if(this['activeUIs']['delete'](_0x3c0c82),!this['_uis']['has'](_0x3c0c82))throw new _0x542f67('annotationsuis-missing-ui',this,{'uiName':_0x3c0c82});const _0x9cdc8e=this['_uis']['get'](_0x3c0c82);_0x9cdc8e['detach'](),this['stopListening'](_0x9cdc8e),this['uisData']['get'](_0x3c0c82)['collection']['destroy'](),this['uisData']['delete'](_0x3c0c82);}['switchTo'](_0x5817f2){if(!this['_uis']['has'](_0x5817f2))throw new _0x542f67('annotationsuis-missing-ui',this,{'uiName':_0x5817f2});const _0x35b97e=this['context']['plugins']['get'](y),_0x308d57=Array['from'](_0x35b97e['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5817f2);const _0x3136d1=this['_uis']['get'](_0x5817f2);_0x3136d1['setActiveAnnotation'](_0x308d57),_0x3136d1['_setSelectedAnnotations']&&_0x308d57&&_0x3136d1['_setSelectedAnnotations']([_0x308d57]);}['deactivateAll'](){for(const _0x1d0a91 of this['activeUIs'])this['deactivate'](_0x1d0a91);}['register'](_0x48c812,_0x410321){if(this['_uis']['has'](_0x48c812))throw new _0x542f67('annotationsuis-register-already-registered');if('function'!=typeof _0x410321['attach']||'function'!=typeof _0x410321['detach']||'function'!=typeof _0x410321['setActiveAnnotation'])throw new _0x542f67('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x48c812,_0x410321);}['refilterAnnotations'](){const _0x44f3e7=this['context']['plugins']['get'](y)['collection'],_0x3995d7=new Map(),_0x45ecfe=Array['from'](this['activeUIs']);for(const _0x41dc2c of this['activeUIs']){const _0x5e9ac1=this['uisData']['get'](_0x41dc2c)['collection'];for(const _0x4d98fd of _0x5e9ac1)_0x3995d7['set'](_0x4d98fd,_0x41dc2c);}for(const _0x90ef67 of _0x44f3e7){const _0x5bc426=_0x3995d7['get'](_0x90ef67);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x90ef67);const _0x1516cd=_0x45ecfe['find'](_0x1703f5=>this['uisData']['get'](_0x1703f5)['filter'](_0x90ef67));_0x5bc426!==_0x1516cd&&(_0x5bc426&&this['uisData']['get'](_0x5bc426)['collection']['remove'](_0x90ef67),_0x1516cd&&this['uisData']['get'](_0x1516cd)['collection']['add'](_0x90ef67));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4d4020){const _0x1c0944=[];for(const _0x5cdff7 of this['activeUIs']){(0x0,this['uisData']['get'](_0x5cdff7)['filter'])(_0x4d4020)&&_0x1c0944['push'](_0x5cdff7);}if(_0x1c0944['length']>0x1)throw new _0x542f67('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1c0944,'annotationType':_0x4d4020['type']});}}const _i=/* #__PURE__ -- @preserve */
32
+ Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2d3147){super(_0x2d3147);const _0x2e263b=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 _0x1e6d7b(),this['focusCycler']=new _0x5d2dd8({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2e263b['to']('class')],'style':{'minHeight':_0x2e263b['to']('minHeight',_0x2517b3=>'number'==typeof _0x2517b3?_i(_0x2517b3+0xa):null)},'dir':_0x2d3147['uiLanguageDirection'],'role':'application','aria-label':N(_0x2d3147,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x2d3147,'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',_0x2aaf1f=>{this['_updateItemPositionInFocusables'](_0x2aaf1f['source']);}),this['list']['forEach'](_0x456aa9=>{this['focusTracker']['add'](_0x456aa9['element']),this['_updateItemPositionInFocusables'](_0x456aa9);}),this['list']['on']('change',(_0x114705,_0x37188c)=>{for(const _0x275d92 of _0x37188c['removed'])this['focusTracker']['remove'](_0x275d92['element']),this['focusables']['remove'](_0x275d92);for(const _0x3ad635 of _0x37188c['added'])this['focusTracker']['add'](_0x3ad635['element']),this['_updateItemPositionInFocusables'](_0x3ad635);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5c3f0d){const _0x1f0d90=this['focusables']['getIndex'](_0x5c3f0d);let _0x17eece,_0x3aea59;for(const _0x129bad of this['focusables'])if(_0x5c3f0d['top']<_0x129bad['top']){_0x17eece=_0x129bad;break;}if(_0x3aea59=_0x17eece?this['focusables']['getIndex'](_0x17eece):this['focusables']['length'],-0x1!==_0x1f0d90){if(_0x1f0d90===_0x3aea59-0x1)return;this['focusables']['remove'](_0x5c3f0d),_0x3aea59=_0x17eece?this['focusables']['getIndex'](_0x17eece):this['focusables']['length'];}this['focusables']['add'](_0x5c3f0d,_0x3aea59);}}const Ot=/* #__PURE__ -- @preserve */
33
+ Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1c76aa){super(_0x1c76aa),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x1a3a5a,_0x4d1443)=>_0x1a3a5a+_0x4d1443),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xd2aa22=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xd2aa22['to']('isAnimationDisabled',_0x107894=>_0x107894?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xd2aa22['to']('top',_0x4f7f10=>Ot(_0x4f7f10))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x394b2c=this['element']['clientHeight'];_0x394b2c&&(this['height']=_0x394b2c);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4cc9b8{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xce4b3d){super(_0xce4b3d),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 _0x565cee=this['context']['config']['get']('sidebar.container');_0x565cee&&this['setContainer'](_0x565cee);}['setContainer'](_0x36845f){if(!g(_0x36845f))throw new _0x542f67('sidebar-setcontainer-invalid-element');this['container']=_0x36845f;}['_attachToContainer']({viewClass:_0x12738d='',spaceBetweenItems:_0x175344=0x19}={}){if(!g(this['container']))throw new _0x542f67('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x12738d,this['_spaceBetweenItems']=_0x175344;}['rearrange']({removedAnnotation:_0x5b5a26,previousAnnotation:_0x57af7d,nextAnnotation:_0x2736d6}){const _0x327d3a=this['getSidebarItemView'](_0x5b5a26);this['view']['list']['remove'](_0x327d3a),this['_destroySidebarItemView'](_0x5b5a26),_0x57af7d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x57af7d)),_0x2736d6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2736d6)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9ba34b,activatedAnnotation:_0x11654b,disableAnimationOnActivatedAnnotation:_0x17b409}){if(this['_activeAnnotation']=_0x11654b,_0x9ba34b){_0x9ba34b['isActive']=!0x1;const _0x589908=this['getSidebarItemView'](_0x9ba34b);_0x589908&&_0x17b409&&(_0x589908['isAnimationDisabled']=!0x1);}if(_0x11654b){const _0x258b3c=this['getSidebarItemView'](_0x11654b);_0x258b3c&&(_0x11654b['isActive']=!0x0,_0x17b409&&(_0x258b3c['isAnimationDisabled']=!0x0,_0x258b3c['top']+=0x1),this['_alignToTargetRect'](_0x258b3c));}}['_detachFromContainer'](_0x17d1fc){if(this['view']['element']['remove'](),_0x17d1fc){for(const _0x4d63cb of _0x17d1fc)this['_destroySidebarItemView'](_0x4d63cb);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5a00e7,_0xacfbb){_0xacfbb||(_0xacfbb=_0x5a00e7['view']);const _0x10f4dc=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x10f4dc,_0x5a00e7),this['_annotationToSidebarItemView']['set'](_0x5a00e7,_0x10f4dc),_0x10f4dc['content']['add'](_0xacfbb),this['listenTo'](_0x5a00e7['view'],'change:targetRect',(_0x222cdb,_0x4bc284,_0xa1a6b0)=>{const _0x488aa7=this['_getTargetTop'](_0x5a00e7,_0xa1a6b0);_0x10f4dc['_targetTop']!=_0x488aa7&&(_0x10f4dc['_targetTop']=_0x488aa7,this['_setItemTop'](_0x10f4dc,_0x488aa7));}),this['listenTo'](_0x10f4dc,'change:top',()=>{this['_recalculate'](_0x10f4dc,'top');}),this['listenTo'](_0x10f4dc,'change:bottom',()=>{this['_recalculate'](_0x10f4dc,'bottom');}),this['_alignToTargetRect'](_0x10f4dc);const _0x387c10=this['_getItemBefore'](_0x10f4dc);if(_0x387c10)this['_alignAfterItem'](_0x387c10,_0x10f4dc)||this['_alignToTargetRect'](_0x10f4dc);else this['_alignToTargetRect'](_0x10f4dc);return this['_updateLastItem'](),this['view']['list']['add'](_0x10f4dc),_0x10f4dc;}['_alignForTopChange'](_0x4669b8){if(!_0x4669b8['content']['length'])return;const _0x57a2d6=this['_getItemBefore'](_0x4669b8);if(!_0x57a2d6)return;const _0x5d71f1=this['_sidebarItemViewToAnnotation']['get'](_0x57a2d6),_0x17f0c3=this['_activeAnnotation'];_0x17f0c3&&_0x17f0c3===_0x5d71f1?this['_alignAfterItem'](_0x57a2d6,_0x4669b8):this['_alignBeforeItem'](_0x4669b8,_0x57a2d6);}['_alignForBottomChange'](_0x5871e8){if(!_0x5871e8['content']['length'])return;const _0x182227=this['_getItemAfter'](_0x5871e8);if(!_0x182227)return;const _0x4f50d1=this['_sidebarItemViewToAnnotation']['get'](_0x182227),_0x4b971d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5a99be=this['_activeAnnotation'];_0x5a99be&&_0x5a99be===_0x4f50d1&&_0x4b971d?(this['_alignBeforeItem'](_0x182227,_0x5871e8),this['_alignAfterItem'](_0x5871e8,_0x182227)):_0x5a99be&&_0x5a99be===_0x4f50d1?this['_alignBeforeItem'](_0x182227,_0x5871e8):this['_alignAfterItem'](_0x5871e8,_0x182227);}['_recalculate'](_0x482ace,_0x2f633a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1ab536,changedProp:_0x318f77}of this['_recalculateBuffer'])'top'===_0x318f77?this['_alignForTopChange'](_0x1ab536):this['_alignForBottomChange'](_0x1ab536);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x482ace,'changedProp':_0x2f633a});}['getSidebarItemView'](_0x1ffc9a){return this['_annotationToSidebarItemView']['get'](_0x1ffc9a);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x34b19f){const _0x54bb88=this['getSidebarItemView'](_0x34b19f);this['stopListening'](_0x54bb88),this['stopListening'](_0x34b19f['view']),_0x54bb88['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x34b19f),this['_sidebarItemViewToAnnotation']['delete'](_0x54bb88);}['_createSidebarView'](){const _0x39d573=new H(this['context']['locale']);return _0x39d573['render'](),this['on']('change:_lastItem',(_0x4be4bf,_0x24f1c2,_0x1b37d9,_0x34ad67)=>{_0x34ad67&&_0x39d573['unbind']('minHeight'),_0x1b37d9?_0x39d573['bind']('minHeight')['to'](_0x1b37d9,'bottom'):_0x39d573['minHeight']=null;}),_0x39d573;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x507a97){const _0x1d76ed=this['_sidebarItemViewToAnnotation']['get'](_0x507a97),_0xbc4f6f=_0x1d76ed&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1d76ed)-0x1);return _0xbc4f6f&&this['getSidebarItemView'](_0xbc4f6f)||null;}['_getItemAfter'](_0x3b7943){const _0x597b56=this['_sidebarItemViewToAnnotation']['get'](_0x3b7943),_0x10a501=_0x597b56&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x597b56)+0x1);return _0x10a501&&this['getSidebarItemView'](_0x10a501)||null;}['_alignBeforeItem'](_0x135dee,_0x4240f9){_0x135dee['updateHeight']();const _0x9b0e89=G(_0x4240f9['bottom']+this['_spaceBetweenItems'],_0x135dee['top']);return!!_0x9b0e89&&(this['_setItemTop'](_0x4240f9,_0x4240f9['top']-_0x9b0e89),!0x0);}['_alignAfterItem'](_0x2ae6b1,_0x5ee1f6){_0x2ae6b1['updateHeight']();const _0x7595a0=G(_0x2ae6b1['bottom']+this['_spaceBetweenItems'],_0x5ee1f6['top']);return!!_0x7595a0&&(this['_setItemTop'](_0x5ee1f6,_0x5ee1f6['top']+_0x7595a0,!0x1),!0x0);}['_alignToTargetRect'](_0x2ceda5){const _0x5e8b3b=this['_sidebarItemViewToAnnotation']['get'](_0x2ceda5);if(!_0x5e8b3b||!_0x5e8b3b['target']||!_0x5e8b3b['targetRect'])return;const _0x405a92=this['_getTargetTop'](_0x5e8b3b,_0x5e8b3b['targetRect']);this['_setItemTop'](_0x2ceda5,_0x405a92);}['_getTargetTop'](_0x57a15b,_0x59b3e6){if(null===_0x59b3e6)return 0x0;if(_0x57a15b['target']instanceof _0x48c8c0)return _0x59b3e6['top'];{const _0x4cb201=new _0x48c8c0(this['view']['element'])['top'];return _0x59b3e6['top']-_0x4cb201;}}['_setItemTop'](_0x248624,_0x20c6d4,_0x25dbbf=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x25dbbf&&(_0x20c6d4=Math['max'](_0x20c6d4,this['_getMaxAvailableTop'](_0x248624))),_0x248624['top']=_0x20c6d4;}['_getMaxAvailableTop'](_0x4475f0){let _0x58ccc9=this['_getItemBefore'](_0x4475f0),_0x3e4097=0x0;for(;_0x58ccc9;)_0x58ccc9['updateHeight'](),_0x3e4097+=this['_spaceBetweenItems']+_0x58ccc9['height'],_0x58ccc9=this['_getItemBefore'](_0x58ccc9);return _0x3e4097;}}function G(_0x5e3ce6,_0x1f44c4){return Math['max'](_0x5e3ce6-_0x1f44c4,0x0);}function g(_0x2727d1){return null!==_0x2727d1&&'object'==typeof _0x2727d1&&0x1===_0x2727d1['nodeType'];}class e extends _0x4cc9b8{['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(_0x3d700b){super(_0x3d700b),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2bdfd3(),this['_refreshPositioningDebounced']=_0x30831a(()=>{_0x3d700b['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3b05ba=this['context']['plugins']['get'](j),_0x589c94=this['context']['plugins']['get'](z);_0x3b05ba['register']('wideSidebar',this),_0x589c94['container']&&_0x3b05ba['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4eb086){if(_0x4eb086===this['activeAnnotation'])return;const _0x2bd043=this['context']['plugins']['get'](z);_0x2bd043['_activeAnnotation']=_0x4eb086;const _0x55b1db=this['activeAnnotation'];_0x2bd043['refresh']({'blurredAnnotation':_0x55b1db,'activatedAnnotation':_0x4eb086}),this['activeAnnotation']=_0x4eb086;}['attach'](_0x74c1cd){this['annotations']=_0x74c1cd;const _0x4cd121=this['context']['plugins']['get'](z);if(_0x4cd121['_annotations']=_0x74c1cd,this['isAttached'])throw new _0x542f67('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4cd121,'set:container',()=>{this['detach'](),this['listenTo'](_0x4cd121,'change:container',_0x44dee8=>{_0x44dee8['off'](),this['attach'](_0x74c1cd);});}),_0x4cd121['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x46e917=_0x5eded6=>{_0x5eded6['updateTargetRect'](),_0x4cd121['addAnnotation'](_0x5eded6);};for(const _0x3f4d62 of _0x74c1cd)_0x46e917(_0x3f4d62);this['listenTo'](_0x74c1cd,'add',(_0x1439ad,_0xb1341c)=>{_0x46e917(_0xb1341c);}),this['listenTo'](_0x74c1cd,'remove',(_0x579256,_0x7edcb0,_0x37012e)=>{_0x4cd121['rearrange']({'removedAnnotation':_0x7edcb0,'previousAnnotation':_0x74c1cd['get'](_0x37012e-0x1),'nextAnnotation':_0x74c1cd['get'](_0x37012e+0x1)}),_0x7edcb0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x74c1cd,'focus',(_0x150ce0,_0x1ca428)=>{this['setActiveAnnotation'](_0x1ca428);}),this['listenTo'](_0x74c1cd,'blur',()=>{this['setActiveAnnotation'](null);});const _0x34bd71=this['context']instanceof _0x419674?this['context']['editors']:new _0x2bdfd3([this['context']]);for(const _0x28f388 of _0x34bd71)this['_integrateWithEditorAnnotations'](_0x28f388);this['listenTo'](_0x34bd71,'add',(_0x38d52d,_0x16918f)=>{this['listenTo'](_0x16918f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x16918f);});}),this['listenTo'](_0x34bd71,'remove',(_0x305486,_0x2e4434)=>{_0x2e4434['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2e4434['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x542f67('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x37fa82=this['context']['plugins']['get'](z);_0x37fa82['_detachFromContainer'](this['annotations']),this['stopListening'](_0x37fa82),this['stopListening'](this['annotations']),this['context']instanceof _0x419674&&this['stopListening'](this['context']['editors']);for(const _0x8be4f3 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x8be4f3);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x21b985){if(!_0x21b985['plugins']['has']('EditorAnnotations'))return;const _0x53275a=_0x21b985['plugins']['get']('EditorAnnotations'),_0x1f9144=()=>{const _0x14a456=_0x53275a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x14a456[0x0]||null);};this['listenTo'](_0x53275a,'refresh',_0x1f9144),this['listenTo'](_0x53275a,'blur',(_0x25bf82,{isAnnotationTracked:_0x1ddd72})=>{this['activeAnnotation']&&_0x1ddd72(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x53275a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4be1b8=>{_0x53275a['hasDomSelection']()&&(_0x1f9144(),_0x4be1b8['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x53275a);}['_destroyEditorAnnotationsIntegration'](_0x502507){this['stopListening'](_0x502507),this['_editorAnnotations']['remove'](_0x502507);}}class C extends _0x451c43{['counterView'];constructor(_0x49f764){super(_0x49f764);const _0x4d3765=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3d0fc3,_0x1cea0b)=>_0x3d0fc3?'...':_0x1cea0b['toString']()),this['set']('annotationType',''),this['icon']=_0x585956,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4d3765['to']('annotationType',_0x44daa7=>'ck-annotation-counter__badge--'+_0x44daa7),_0x4d3765['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4d3765['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4cc9b8{['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(_0x1ebd87){super(_0x1ebd87),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3eb79f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2bdfd3(),this['_refreshPositioningDebounced']=_0x30831a(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5a566a(this['context']['locale']),this['balloonPanelView']=new _0x34763c(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x6f7f7c){this['annotations']=_0x6f7f7c;const _0x493250=this['context']['plugins']['get'](z),_0x23b345=this['balloonPanelView'];if(_0x493250['_annotations']=_0x6f7f7c,this['isAttached'])throw new _0x542f67('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x493250,'set:container',()=>{this['detach'](),this['listenTo'](_0x493250,'change:container',_0x2073fb=>{_0x2073fb['off'](),this['attach'](_0x6f7f7c);});}),_0x493250['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2dcba5=_0x1b657d=>{const _0x389b1d=new C(this['context']['locale']);_0x493250['addAnnotation'](_0x1b657d,_0x389b1d),this['_annotationToNarrowView']['set'](_0x1b657d,_0x389b1d),_0x389b1d['bind']('isDirty','annotationType','number')['to'](_0x1b657d['view'],'isDirty','type','length'),_0x389b1d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x23b345['content']['first']!==_0x1b657d['view']?(this['_showBalloon'](_0x1b657d),_0x1b657d['view']['element']['focus'](),this['setActiveAnnotation'](_0x1b657d)):this['setActiveAnnotation'](null);});};for(const _0x232038 of _0x6f7f7c)_0x2dcba5(_0x232038);this['listenTo'](_0x6f7f7c,'add',(_0x4eaebb,_0x127154)=>{_0x2dcba5(_0x127154);}),this['listenTo'](_0x6f7f7c,'remove',(_0x5e6e63,_0x588c8c,_0x4e3977)=>{this['_annotationToNarrowView']['get'](_0x588c8c)['destroy'](),this['_annotationToNarrowView']['delete'](_0x588c8c),_0x493250['rearrange']({'removedAnnotation':_0x588c8c,'previousAnnotation':_0x6f7f7c['get'](_0x4e3977-0x1),'nextAnnotation':_0x6f7f7c['get'](_0x4e3977+0x1)}),_0x588c8c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x6f7f7c,'focus',(_0x22a20b,_0x5ca5fa)=>{this['setActiveAnnotation'](_0x5ca5fa);}),this['listenTo'](_0x6f7f7c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x414f97,_0x4eb54a)=>{_0x4eb54a['keyCode']===_0x449fd0['esc']&&_0x23b345['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x23b345['content']['first']),this['_hideBalloon'](),_0x4eb54a['stopPropagation'](),_0x4eb54a['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x35cf1f,_0x12b1da)=>{const _0x4885f9=_0x12b1da['target'];_0x23b345['isVisible']&&_0x23b345['element']['contains'](_0x4885f9)||_0x493250['view']['element']['contains'](_0x4885f9)||_0x35cf1f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3893ad=>_0x3893ad['contains'](_0x4885f9))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2a8b0b=this['context']instanceof _0x419674?this['context']['editors']:new _0x2bdfd3([this['context']]);for(const _0x3e01fb of _0x2a8b0b)this['_integrateWithEditorAnnotations'](_0x3e01fb);this['listenTo'](_0x2a8b0b,'add',(_0x4fe013,_0x320360)=>{this['listenTo'](_0x320360,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x320360);});}),this['listenTo'](_0x2a8b0b,'remove',(_0x51ca66,_0x546644)=>{_0x546644['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x546644['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x46f120){if(_0x46f120===this['activeAnnotation'])return;const _0x2f78db=this['context']['plugins']['get'](z);if(_0x2f78db['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x46f120,'disableAnimationOnActivatedAnnotation':!0x0}),_0x46f120)_0x2f78db['getSidebarItemView'](_0x46f120)?this['_showBalloon'](_0x46f120):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x46f120;}['detach'](){if(!this['isAttached'])throw new _0x542f67('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x31d1f1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x16bf79=>_0x16bf79['destroy']()),this['_annotationToNarrowView']['clear'](),_0x31d1f1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x419674&&this['stopListening'](this['context']['editors']);for(const _0x169513 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x169513);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'](_0x2278d9){if(!_0x2278d9['plugins']['has']('EditorAnnotations'))return;const _0x5cba5f=_0x2278d9['plugins']['get']('EditorAnnotations'),_0x3b415f=this['context']['plugins']['get'](z),_0x37f307=this['annotations'],_0x45c114=this['balloonPanelView'],_0x2a86a8=()=>{const _0xae8adc=_0x5cba5f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xae8adc),this['setActiveAnnotation'](_0xae8adc[0x0]||null);};this['listenTo'](_0x5cba5f,'refresh',_0x2a86a8),this['listenTo'](_0x5cba5f,'blur',(_0x1eb128,{isAnnotationTracked:_0x28f2b1})=>{this['activeAnnotation']&&_0x28f2b1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5cba5f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x37f307,'blur',_0x8224dc=>{_0x5cba5f['hasDomSelection']()&&_0x8224dc['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x32b447,_0x107cb7)=>{const _0x22ee46=_0x107cb7['target'];_0x45c114['isVisible']&&_0x45c114['element']['contains'](_0x22ee46)||_0x3b415f['view']['element']['contains'](_0x22ee46)||this['activeAnnotation']&&_0x5cba5f['hasDomSelection']()&&(_0x2a86a8(),_0x32b447['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5cba5f);}['_destroyEditorAnnotationsIntegration'](_0x55f605){_0x55f605&&(this['stopListening'](_0x55f605),this['_editorAnnotations']['remove'](_0x55f605));}['_setSelectedAnnotations'](_0x315ff0){for(const _0x123b94 of this['_selectedAnnotations'])_0x315ff0['includes'](_0x123b94)||this['_manuallyClosedAnnotationViews']['delete'](_0x123b94['view']);this['_selectedAnnotations']=_0x315ff0;}['_refreshPositioning'](){const _0x1921df=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1921df['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x5332d5){if(this['_manuallyClosedAnnotationViews']['has'](_0x5332d5['view']))return;const _0x23e5dc=this['balloonPanelView']['content']['first'];_0x23e5dc!==_0x5332d5['view']?(_0x23e5dc&&this['_detachListeners'](_0x23e5dc),this['_attachListeners'](_0x5332d5['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x5332d5['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3b2b49=this['balloonPanelView']['content']['first'],_0x12ffd9=_0x3b2b49&&this['annotations']['getByView'](_0x3b2b49);if(!_0x12ffd9||!this['_annotationToNarrowView']['has'](_0x12ffd9))return;const _0x1087d2=this['_annotationToNarrowView']['get'](_0x12ffd9)['element'],_0x384e38=(function(){const _0x4d3a2f=_0x34763c['defaultPositions'];return[_0x4d3a2f['southArrowNorthEast'],_0x4d3a2f['northArrowSouthEast'],_0x4d3a2f['southArrowNorth'],_0x4d3a2f['northArrowSouth'],_0x4d3a2f['southArrowNorthWest'],_0x4d3a2f['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1087d2,'positions':_0x384e38});}['_hideBalloon'](){const _0x5b66c0=this['balloonPanelView'],_0x32709b=_0x5b66c0['content']['first'];_0x32709b&&(this['_detachListeners'](_0x32709b),_0x5b66c0['unpin'](),_0x5b66c0['content']['clear']());}['_attachListeners'](_0x5d37fa){this['listenTo'](_0x5d37fa,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5d37fa,'Esc',(_0x343b67,_0x1ddbed)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5d37fa),this['_hideBalloon'](),_0x1ddbed();});}['_detachListeners'](_0x16484b){this['stopListening'](_0x16484b);}}class c extends _0x4dde71{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x469550,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4818df){super(_0x4818df),_0x4818df['editing']['view']['addObserver'](_0x1ad6fd),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4818df['plugins']['get'](_0x469550),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x30831a(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x51d1ea=this['editor']['plugins']['get'](j);_0x51d1ea['context']===this['editor']&&(_0x51d1ea['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xabf44a,_0x4155a7)=>{const _0x1da247=this['_balloon'];if(this['isAttached']&&_0x1da247['visibleView']){const _0x490ab8=this['annotations']['getByView'](_0x1da247['visibleView']);_0x490ab8&&this['_closeAnnotation'](_0x490ab8),_0x4155a7();}}));}['afterInit'](){const _0x275ff5=this['editor']['plugins']['get'](j);_0x275ff5['context']===this['editor']&&(_0x275ff5['hasActive']()||_0x275ff5['switchTo']('inline'));}['setActiveAnnotation'](_0x2233b6){_0x2233b6!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2233b6&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2233b6)&&this['_addAnnotationToBalloon'](_0x2233b6,!0x0),_0x2233b6['isActive']=!0x0),_0x2233b6||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2233b6);}['attach'](_0x4b7f99){this['annotations']=_0x4b7f99;const _0x17d340=this['editor']['plugins']['get'](j),_0x52b8db=this['_balloon'];if(this['isAttached'])throw new _0x542f67('inlineannotations-attach-already-attached',this);if(_0x17d340['context']!==this['editor'])throw new _0x542f67('inlineannotations-not-allowed-with-context',this);const _0x1b3d48=this['editor']['plugins']['get'](b);this['listenTo'](_0x1b3d48,'refresh',()=>{const _0x448312=_0x1b3d48['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x16bc57,_0x4300a7;!this['_forceRefresh']&&(_0x16bc57=_0x448312,_0x4300a7=this['_selectedAnnotations'],_0x16bc57['length']===_0x4300a7['length']&&_0x16bc57['every'](_0x5deb44=>_0x4300a7['includes'](_0x5deb44)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x448312),this['setActiveAnnotation'](_0x448312[0x0]||null));}),this['listenTo'](_0x1b3d48,'blur',(_0x591135,{isAnnotationTracked:_0x24f983})=>{this['activeAnnotation']&&_0x24f983(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1b3d48,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x193885,_0x5072d6,_0x2d8278)=>{_0x2d8278||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4b7f99,'remove',(_0x3f0390,_0x3f9602)=>{this['_removeAnnotationFromBalloon'](_0x3f9602),_0x3f9602===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x52b8db,'change:visibleView',(_0x37c885,_0xd093f6,_0xa49b64,_0x4b940f)=>{_0x4b940f&&this['stopListening'](_0x4b940f);const _0x33db32=_0x4b7f99['getByView'](_0xa49b64);_0xa49b64&&_0x33db32&&(this['listenTo'](_0xa49b64,'change:height',()=>{_0x52b8db['updatePosition']();}),this['listenTo'](_0xa49b64,'Esc',()=>{this['_closeAnnotation'](_0x33db32),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x33db32&&this['setActiveAnnotation'](_0x33db32));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x52b8db['visibleView']&&(_0x4b7f99['getByView'](_0x52b8db['visibleView'])&&_0x52b8db['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 _0x542f67('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xaf90d7 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xaf90d7);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x11055e){for(const _0x36e5fe of this['_selectedAnnotations'])_0x11055e['includes'](_0x36e5fe)||this['_manuallyClosed']['delete'](_0x36e5fe);for(const _0x236630 of this['annotations'])_0x11055e['includes'](_0x236630)||this['_removeAnnotationFromBalloon'](_0x236630);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x175c50 of _0x11055e)this['_addAnnotationToBalloon'](_0x175c50);}this['_selectedAnnotations']=_0x11055e;}['_addAnnotationToBalloon'](_0x522f79,_0x53d10d=!0x1){this['_manuallyClosed']['has'](_0x522f79)||(this['_addedAnnotations']['has'](_0x522f79)||this['_balloon']['hasView'](_0x522f79['view'])||(this['_addedAnnotations']['add'](_0x522f79),this['_balloon']['add']({'stackId':_0x522f79['view']['id'],'view':_0x522f79['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x522f79)}})),_0x53d10d&&this['_balloon']['showStack'](_0x522f79['view']['id']));}['_getBalloonTargetForAnnotation'](_0x455971){const _0x40f7f4=_0x455971['target'],_0x407f98=this['editor']['editing']['view'],_0x59cb24=_0x407f98['document']['selection']['getFirstRange'](),_0x49412a=_0x407f98['domConverter']['viewRangeToDom'](_0x59cb24);if(_0x49412a['collapse'](!0x0),_0x40f7f4){if(_0x40f7f4 instanceof _0x48c8c0)return _0x40f7f4;let _0x104cd1=[];for(const _0x5ac68f of _0x40f7f4)_0x104cd1['push'](...F(_0x5ac68f['getClientRects']()));_0x104cd1=function(_0x369141){const _0x51d4b3=[];let _0x2c7b35=_0x369141[0x0];for(let _0x7bd4dd=0x1;_0x7bd4dd<_0x369141['length'];_0x7bd4dd++)P(_0x2c7b35,_0x369141[_0x7bd4dd])?_0x2c7b35['width']+=_0x369141[_0x7bd4dd]['width']:(_0x51d4b3['push'](_0x2c7b35),_0x2c7b35=_0x369141[_0x7bd4dd]);return _0x51d4b3['push'](_0x2c7b35),_0x51d4b3;}(_0x104cd1);const _0x41eac8=_0x49412a['getBoundingClientRect']();return _0x104cd1['find'](_0xf5fed4=>_0xf5fed4['top']<=_0x41eac8['top']&&_0xf5fed4['bottom']>=_0x41eac8['bottom']&&_0xf5fed4['left']<=_0x41eac8['left']&&_0xf5fed4['right']>=_0x41eac8['right'])||_0x104cd1[0x0];}return _0x455971['targetRect']||_0x49412a;}['_removeAnnotationFromBalloon'](_0x1d097a){this['_addedAnnotations']['has'](_0x1d097a)&&this['_balloon']['hasView'](_0x1d097a['view'])&&(this['_addedAnnotations']['delete'](_0x1d097a),this['_balloon']['remove'](_0x1d097a['view']));}['_closeAnnotation'](_0x587d54){this['_manuallyClosed']['add'](_0x587d54),this['_removeAnnotationFromBalloon'](_0x587d54);}}function F(_0x3b353a){return Array['from'](_0x3b353a)['map'](DOMRect['fromRect']);}function P(_0x5cbff7,_0x289d4e){return _0x5cbff7['top']===_0x289d4e['top']&&_0x5cbff7['bottom']===_0x289d4e['bottom']&&_0x5cbff7['right']===_0x289d4e['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x61ae89,_0x213011){super(_0x61ae89),this['set']('isEmpty',!_0x213011['length']),this['focusTracker']=new _0x1e6d7b(),this['_annotationViews']=_0x213011,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x5d2dd8({'focusables':_0x213011,'focusTracker':this['focusTracker']}),this['listenTo'](_0x213011,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x213011,'remove',(_0x33f83c,_0x140326)=>{_0x140326['isActive']&&this['focus'](),_0x213011['length']||(this['isEmpty']=!0x0);});const _0x268aa4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x61ae89,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x213011},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x268aa4['if']('isEmpty','ck-hidden',_0x5b1e62=>!_0x5b1e62)]},'children':[{'text':N(_0x61ae89,'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 _0x50f874 of this['_annotationViews'])this['focusTracker']['add'](_0x50f874['element']);this['_annotationViews']['on']('change',(_0x39767e,{added:_0x238352,removed:_0x19615d})=>{for(const _0x41b385 of _0x238352)this['focusTracker']['add'](_0x41b385['element']);for(const _0x350aa1 of _0x19615d)this['focusTracker']['remove'](_0x350aa1['element']);});}}class p extends _0x4cc9b8{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0xe607ff){super(_0xe607ff),this['archivedThreads']=new _0x2bdfd3();}['init'](){const _0x2cfa40=this['context'],_0x205114=_0x2cfa40['plugins']['get'](o),_0x3ff786=_0x2cfa40['plugins']['get'](y);this['listenTo'](_0x205114,'addCommentThread',(_0x39bb22,{threadId:_0x527021})=>{const _0x5f07e8=_0x205114['getCommentThread'](_0x527021);_0x5f07e8['archivedAt']&&this['archivedThreads']['add'](_0x5f07e8,this['_calculatePosition'](_0x5f07e8['archivedAt'])),this['listenTo'](_0x5f07e8,'change:archivedAt',(_0x2b3c8a,_0x2bd53c,_0x113379)=>{_0x113379?this['archivedThreads']['has'](_0x5f07e8)||this['archivedThreads']['add'](_0x5f07e8,this['_calculatePosition'](_0x5f07e8['archivedAt'])):this['archivedThreads']['has'](_0x5f07e8)&&this['archivedThreads']['remove'](_0x5f07e8);});}),this['listenTo'](_0x205114,'removeCommentThread',(_0x27a63e,{threadId:_0x277d55})=>{const _0x3c42c9=_0x205114['getCommentThread'](_0x277d55);this['stopListening'](_0x3c42c9),this['archivedThreads']['has'](_0x3c42c9)&&this['archivedThreads']['remove'](_0x3c42c9);},{'priority':'highest'}),this['listenTo'](_0x3ff786['collection'],'focus',(_0x33eb55,_0x332d6b)=>{_0x332d6b['isVisible']||(_0x332d6b['isActive']=!0x0,_0x3ff786['activate'](_0x332d6b));});}['_calculatePosition'](_0x281da9){const _0x209cdf=[...this['archivedThreads']]['findIndex'](_0x1413a7=>_0x1413a7['archivedAt']<_0x281da9);return _0x209cdf>-0x1?_0x209cdf:this['archivedThreads']['length'];}}class a extends _0x4dde71{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x559cf2];}constructor(_0x121bfc){super(_0x121bfc),this['annotationViews']=new _0x539dc0(),this['_pendingThreads']=[];}['init'](){const _0x5db245=this['editor'],_0x353ac0=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5db245['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x451c43,!0x0)),_0x5db245['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2493cc=this['_createCommentsArchiveButton'](_0x28d01d);return _0x2493cc['set']({'role':'menuitemcheckbox'}),_0x2493cc;});const _0x13193f=_0x5db245['plugins']['get'](p),_0x55fc58=_0x5db245['plugins']['get']('Annotations'),_0x242329=_0x5db245['plugins']['get']('CommentsRepository');_0x13193f['archivedThreads']['forEach'](_0x566850=>{this['_handleNewThread'](_0x566850);}),this['listenTo'](_0x13193f['archivedThreads'],'add',(_0x1280ac,_0xad830f)=>{this['_handleNewThread'](_0xad830f);}),this['listenTo'](_0x55fc58['collection'],'add',(_0x4fc4c8,_0x5533b8)=>{const _0x1f14b7=this['_pendingThreads']['find'](_0x263113=>{const _0x261cf3=_0x242329['_threadToController']['get'](_0x263113);return _0x261cf3&&_0x5533b8['innerView']===_0x261cf3['view'];});if(_0x1f14b7){const _0x337309=this['_calculatePosition'](_0x1f14b7['archivedAt']);this['_addAnnotationToArchive'](_0x5533b8,_0x337309),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1f14b7),0x1);}}),this['listenTo'](_0x13193f['archivedThreads'],'remove',(_0x5b7269,_0x2df234)=>{const _0x4cb952=_0x5db245['config']['get']('collaboration.channelId');if(!_0x4cb952||_0x2df234['channelId']===_0x4cb952){if(this['_pendingThreads']['includes'](_0x2df234))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2df234),0x1);else{const _0x2364d2=_0x242329['_threadToController']['get'](_0x2df234),_0x426f6b=_0x55fc58['getByInnerView'](_0x2364d2['view']);this['annotationViews']['remove'](_0x426f6b['view']),this['stopListening'](_0x426f6b),this['stopListening'](_0x426f6b['focusableElements']);}}}),this['listenTo'](_0x55fc58['collection'],'add',(_0x2e51f2,_0x3585c1)=>{this['listenTo'](_0x3585c1,'escape',_0x353ac0);}),this['listenTo'](_0x55fc58['collection'],'remove',(_0x419c1e,_0x334666)=>{this['stopListening'](_0x334666,'escape',_0x353ac0);});}['_addAnnotationToArchive'](_0x1ef0a9,_0x25adb0){this['listenTo'](_0x1ef0a9,'set:isVisible',_0x3fe660=>{_0x3fe660['return']=!0x1,_0x3fe660['stop']();}),this['annotationViews']['add'](_0x1ef0a9['view'],_0x25adb0);}['_handleNewThread'](_0x3a9832){const _0x314a03=this['editor']['plugins']['get']('CommentsRepository'),_0x462dbf=this['editor']['plugins']['get']('Annotations'),_0xf560f6=this['editor']['config']['get']('collaboration.channelId');if(!_0xf560f6||_0x3a9832['channelId']===_0xf560f6){const _0x19ee1d=_0x314a03['_threadToController']['get'](_0x3a9832);if(!_0x19ee1d)return void this['_pendingThreads']['push'](_0x3a9832);const _0x1591cc=this['_calculatePosition'](_0x3a9832['archivedAt']),_0x5b644e=_0x462dbf['getByInnerView'](_0x19ee1d['view']);_0x5b644e['isVisible']&&_0x462dbf['_visibleAnnotations']['remove'](_0x5b644e),this['_addAnnotationToArchive'](_0x5b644e,_0x1591cc);}}['_calculatePosition'](_0x23b38d){const _0x455cf5=this['editor']['config']['get']('collaboration.channelId'),_0x40098e=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x9db369=>_0x9db369['channelId']===_0x455cf5)['findIndex'](_0xf9e862=>_0xf9e862['archivedAt']<_0x23b38d);return _0x40098e<0x0||_0x40098e>this['annotationViews']['length']?this['annotationViews']['length']:_0x40098e-0x1;}['_toggleDialog'](){const _0x4a3e37=this['editor'],_0x211ae0=_0x4a3e37['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x4a3e37['locale'],this['annotationViews'])),'commentsArchive'===_0x211ae0['id']?_0x211ae0['hide']():_0x211ae0['show']({'id':'commentsArchive','title':N(_0x4a3e37['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4f9773,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x26194c['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x20cb83,_0x5141a8=!0x1){const _0x2e01d2=this['editor']['locale'],_0x2d2f00=this['editor']['plugins']['get']('Dialog'),_0x28c8e2=new _0x20cb83(_0x2e01d2);return _0x28c8e2['bind']('isEnabled')['to'](this,'isEnabled'),_0x28c8e2['bind']('isOn')['to'](_0x2d2f00,'id',_0x286762=>'commentsArchive'===_0x286762),_0x28c8e2['set']({'label':N(_0x2e01d2,'COMMENTS_ARCHIVE'),'icon':_0x4f9773,'isToggleable':!0x0}),_0x5141a8&&(_0x28c8e2['tooltip']=!0x0),this['listenTo'](_0x28c8e2,'execute',()=>this['_toggleDialog']()),_0x28c8e2;}['_hideDialogOnAnnotationEscape']=_0x2e91d3=>{const _0x1c1146=_0x2e91d3['source'];if(!this['annotationViews']['has'](_0x1c1146['view']))return;const _0x4536ab=this['editor']['plugins']['get']('Dialog');_0x4536ab['isOpen']&&'commentsArchive'===_0x4536ab['id']&&(_0x4536ab['hide'](),_0x2e91d3['stop']());};}class gi extends _0x4dde71{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};