@ckeditor/ckeditor5-comments 48.3.0-alpha.7 → 48.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.js +1 -1
  3. package/dist/translations/af.umd.js +1 -1
  4. package/dist/translations/ar.js +1 -1
  5. package/dist/translations/ar.umd.js +1 -1
  6. package/dist/translations/ast.js +1 -1
  7. package/dist/translations/ast.umd.js +1 -1
  8. package/dist/translations/az.js +1 -1
  9. package/dist/translations/az.umd.js +1 -1
  10. package/dist/translations/be.js +1 -1
  11. package/dist/translations/be.umd.js +1 -1
  12. package/dist/translations/bg.js +1 -1
  13. package/dist/translations/bg.umd.js +1 -1
  14. package/dist/translations/bn.js +1 -1
  15. package/dist/translations/bn.umd.js +1 -1
  16. package/dist/translations/bs.js +1 -1
  17. package/dist/translations/bs.umd.js +1 -1
  18. package/dist/translations/ca.js +1 -1
  19. package/dist/translations/ca.umd.js +1 -1
  20. package/dist/translations/cs.js +1 -1
  21. package/dist/translations/cs.umd.js +1 -1
  22. package/dist/translations/da.js +1 -1
  23. package/dist/translations/da.umd.js +1 -1
  24. package/dist/translations/de-ch.js +1 -1
  25. package/dist/translations/de-ch.umd.js +1 -1
  26. package/dist/translations/de.js +1 -1
  27. package/dist/translations/de.umd.js +1 -1
  28. package/dist/translations/el.js +1 -1
  29. package/dist/translations/el.umd.js +1 -1
  30. package/dist/translations/en-au.js +1 -1
  31. package/dist/translations/en-au.umd.js +1 -1
  32. package/dist/translations/en-gb.js +1 -1
  33. package/dist/translations/en-gb.umd.js +1 -1
  34. package/dist/translations/en.js +1 -1
  35. package/dist/translations/en.umd.js +1 -1
  36. package/dist/translations/eo.js +1 -1
  37. package/dist/translations/eo.umd.js +1 -1
  38. package/dist/translations/es-co.js +1 -1
  39. package/dist/translations/es-co.umd.js +1 -1
  40. package/dist/translations/es.js +1 -1
  41. package/dist/translations/es.umd.js +1 -1
  42. package/dist/translations/et.js +1 -1
  43. package/dist/translations/et.umd.js +1 -1
  44. package/dist/translations/eu.js +1 -1
  45. package/dist/translations/eu.umd.js +1 -1
  46. package/dist/translations/fa.js +1 -1
  47. package/dist/translations/fa.umd.js +1 -1
  48. package/dist/translations/fi.js +1 -1
  49. package/dist/translations/fi.umd.js +1 -1
  50. package/dist/translations/fr.js +1 -1
  51. package/dist/translations/fr.umd.js +1 -1
  52. package/dist/translations/gl.js +1 -1
  53. package/dist/translations/gl.umd.js +1 -1
  54. package/dist/translations/gu.js +1 -1
  55. package/dist/translations/gu.umd.js +1 -1
  56. package/dist/translations/he.js +1 -1
  57. package/dist/translations/he.umd.js +1 -1
  58. package/dist/translations/hi.js +1 -1
  59. package/dist/translations/hi.umd.js +1 -1
  60. package/dist/translations/hr.js +1 -1
  61. package/dist/translations/hr.umd.js +1 -1
  62. package/dist/translations/hu.js +1 -1
  63. package/dist/translations/hu.umd.js +1 -1
  64. package/dist/translations/hy.js +1 -1
  65. package/dist/translations/hy.umd.js +1 -1
  66. package/dist/translations/id.js +1 -1
  67. package/dist/translations/id.umd.js +1 -1
  68. package/dist/translations/it.js +1 -1
  69. package/dist/translations/it.umd.js +1 -1
  70. package/dist/translations/ja.js +1 -1
  71. package/dist/translations/ja.umd.js +1 -1
  72. package/dist/translations/jv.js +1 -1
  73. package/dist/translations/jv.umd.js +1 -1
  74. package/dist/translations/kk.js +1 -1
  75. package/dist/translations/kk.umd.js +1 -1
  76. package/dist/translations/km.js +1 -1
  77. package/dist/translations/km.umd.js +1 -1
  78. package/dist/translations/kn.js +1 -1
  79. package/dist/translations/kn.umd.js +1 -1
  80. package/dist/translations/ko.js +1 -1
  81. package/dist/translations/ko.umd.js +1 -1
  82. package/dist/translations/ku.js +1 -1
  83. package/dist/translations/ku.umd.js +1 -1
  84. package/dist/translations/lt.js +1 -1
  85. package/dist/translations/lt.umd.js +1 -1
  86. package/dist/translations/lv.js +1 -1
  87. package/dist/translations/lv.umd.js +1 -1
  88. package/dist/translations/ms.js +1 -1
  89. package/dist/translations/ms.umd.js +1 -1
  90. package/dist/translations/nb.js +1 -1
  91. package/dist/translations/nb.umd.js +1 -1
  92. package/dist/translations/ne.js +1 -1
  93. package/dist/translations/ne.umd.js +1 -1
  94. package/dist/translations/nl.js +1 -1
  95. package/dist/translations/nl.umd.js +1 -1
  96. package/dist/translations/no.js +1 -1
  97. package/dist/translations/no.umd.js +1 -1
  98. package/dist/translations/oc.js +1 -1
  99. package/dist/translations/oc.umd.js +1 -1
  100. package/dist/translations/pl.js +1 -1
  101. package/dist/translations/pl.umd.js +1 -1
  102. package/dist/translations/pt-br.js +1 -1
  103. package/dist/translations/pt-br.umd.js +1 -1
  104. package/dist/translations/pt.js +1 -1
  105. package/dist/translations/pt.umd.js +1 -1
  106. package/dist/translations/ro.js +1 -1
  107. package/dist/translations/ro.umd.js +1 -1
  108. package/dist/translations/ru.js +1 -1
  109. package/dist/translations/ru.umd.js +1 -1
  110. package/dist/translations/si.js +1 -1
  111. package/dist/translations/si.umd.js +1 -1
  112. package/dist/translations/sk.js +1 -1
  113. package/dist/translations/sk.umd.js +1 -1
  114. package/dist/translations/sl.js +1 -1
  115. package/dist/translations/sl.umd.js +1 -1
  116. package/dist/translations/sq.js +1 -1
  117. package/dist/translations/sq.umd.js +1 -1
  118. package/dist/translations/sr-latn.js +1 -1
  119. package/dist/translations/sr-latn.umd.js +1 -1
  120. package/dist/translations/sr.js +1 -1
  121. package/dist/translations/sr.umd.js +1 -1
  122. package/dist/translations/sv.js +1 -1
  123. package/dist/translations/sv.umd.js +1 -1
  124. package/dist/translations/th.js +1 -1
  125. package/dist/translations/th.umd.js +1 -1
  126. package/dist/translations/ti.js +1 -1
  127. package/dist/translations/ti.umd.js +1 -1
  128. package/dist/translations/tk.js +1 -1
  129. package/dist/translations/tk.umd.js +1 -1
  130. package/dist/translations/tr.js +1 -1
  131. package/dist/translations/tr.umd.js +1 -1
  132. package/dist/translations/tt.js +1 -1
  133. package/dist/translations/tt.umd.js +1 -1
  134. package/dist/translations/ug.js +1 -1
  135. package/dist/translations/ug.umd.js +1 -1
  136. package/dist/translations/uk.js +1 -1
  137. package/dist/translations/uk.umd.js +1 -1
  138. package/dist/translations/ur.js +1 -1
  139. package/dist/translations/ur.umd.js +1 -1
  140. package/dist/translations/uz.js +1 -1
  141. package/dist/translations/uz.umd.js +1 -1
  142. package/dist/translations/vi.js +1 -1
  143. package/dist/translations/vi.umd.js +1 -1
  144. package/dist/translations/zh-cn.js +1 -1
  145. package/dist/translations/zh-cn.umd.js +1 -1
  146. package/dist/translations/zh.js +1 -1
  147. package/dist/translations/zh.umd.js +1 -1
  148. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x54d867,Context as _0x429018,ContextPlugin as _0x388472,Editor as _0x5df8d8,PendingActions as _0x35ca69,Plugin as _0x1228a1}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x3cac4c,Collection as _0x5c875e,DomEmitterMixin as _0xff39d,FocusTracker as _0x57589a,KeystrokeHandler as _0x6e4d4a,ObservableMixin as _0x181a7c,Rect as _0x50fe83,diff as _0x5c96b4,first as _0x48775c,getEnvKeystrokeText as _0x3d03a9,keyCodes as _0x161b1f,priorities as _0x5f4140,scrollViewportToShowTarget as _0x5199,toUnit as _0xe08cc4,uid as _0x238ccd}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x1a41e7,ConfirmMixin as _0x10bd48,FOCUS_ANNOTATION_KEYSTROKE as _0x4a902b,LateFocusButtonView as _0x470ff8,LateFocusDropdownButtonView as _0x4802c0,UserView as _0x19feda,Users as _0x52cabf,getAllMarkersDomElementsSorted as _0x30db39,getDateTimeFormatter as _0x5330d2,hashObject as _0x31a5a3,setupThreadKeyboardNavigation as _0x57b841,surroundingMarkersDetector as _0x56b924,trimHtml as _0x260955}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x2cf7e4,debounce as _0x55ca5d,isEqual as _0x4074d8,set as _0x27c082,throttle as _0x5e5c2f,unset as _0xeea9c4}from'es-toolkit/compat';import{IconAddComment as _0x232043,IconCheck as _0x10acf0,IconCommentsArchive as _0x49f299,IconPencil as _0x16d61c,IconRemoveComment as _0x5dcef3,IconThreeVerticalDots as _0x4443a6,IconUndo as _0x431f9a}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x230065,BodyCollection as _0x31232d,ButtonView as _0x3a0b06,ContextualBalloon as _0x4bf11d,Dialog as _0x13db02,DialogViewPosition as _0x2718da,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
- _0x181a7c();var bt=class extends It{['model'];['view'];constructor(_0x3da8b9,_0x373d18){super(),this['model']=_0x3da8b9,this['model']['_isAttached']=!0x0,this['view']=_0x373d18,this['listenTo'](_0x373d18,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x373d18,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x373d18,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x373d18,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x373d18,'addComment',(_0x4b01ba,_0x93fe8c)=>this['addComment'](_0x93fe8c)),this['listenTo'](_0x373d18,'updateComment',(_0x562e6a,_0x24c5d8,_0xf0dc98)=>this['updateComment'](_0x24c5d8,_0xf0dc98)),this['listenTo'](_0x373d18,'removeComment',(_0x39cae2,_0xf38b59)=>this['removeComment'](_0xf38b59));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x256cdd){this['model']['addComment']({'content':_0x256cdd,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xd90564,_0x3a8471){this['model']['getComment'](_0xd90564)['update']({'content':_0x3a8471});}['removeComment'](_0x339b29){this['model']['getComment'](_0x339b29)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x11c5a5,_0x18e1ff,_0x26c7f2){const t=_0x11c5a5['t'];switch(_0x18e1ff){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'},_0x26c7f2);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x26c7f2);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'},_0x26c7f2);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'},_0x26c7f2);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x26c7f2);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'},_0x26c7f2);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'},_0x26c7f2);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'},_0x26c7f2);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}var kt=class extends it{['main'];['editable'];constructor(_0x425017,_0x3165c3){super(_0x425017);const _0x8529aa=_0x238ccd();this['main']=this['createCollection'](),this['editable']=new st(_0x425017,_0x3165c3,void 0x0,{'label':()=>Et(_0x425017,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x425017['uiLanguageDirection'],'lang':_0x425017['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x8529aa},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}},Nt=class extends tt{['view'];constructor(_0x43d25b){super(_0x43d25b),this['view']=new kt(_0x43d25b['locale'],_0x43d25b['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x8ff8e2=this['editor']['editing']['view'],_0x4081ef=this['view']['editable'];_0x4081ef['name']=_0x8ff8e2['document']['getRoot']()['rootName'],this['view']['render']();const _0x37c33b=_0x4081ef['element'];this['setEditableElement'](_0x4081ef['name'],_0x37c33b),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x8ff8e2['attachDomRoot'](_0x37c33b),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x181a7c(_0x5df8d8);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x3f0f93={}){(_0x3f0f93=Object['assign']({},_0x3f0f93))['plugins']||(_0x3f0f93['plugins']=CommentEditor['defaultPlugins']),super(_0x3f0f93),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0xeb6133=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xeb6133))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2da7c9=>{const _0x11e8d2=this['model']['document']['getRoot'](),_0x2ecd46=_0x11e8d2&&_0x11e8d2['getChild'](_0x11e8d2['childCount']-0x1);_0x2da7c9['setSelection'](_0x2ecd46,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x28af66=this['editing']['view'],_0x4ab45c=_0x28af66['document']['getRoot'](),_0x44cd92=_0x4ab45c['getChild'](0x0);_0x4ab45c['childCount']>0x1||!_0x44cd92||'p'!=_0x44cd92['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x28af66,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x44cd92['placeholder']=this['placeholder']),ut({'view':_0x28af66,'element':_0x44cd92,'keepOnFocus':!0x0}),this['placeholderElement']=_0x44cd92);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x31f79f,_0x4cd582={}){super(_0x31f79f),this['editor']=null,this['_editorConfig']=_0x4cd582,this['set']('value',_0x4cd582['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x31f79f,'Reply...')),this['set']('submitLabel',Et(_0x31f79f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x6e4d4a(),this['focusTracker']=new _0x57589a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3aa677=>!_0x3aa677['defaultPrevented']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x24590d,_0x6c0dd2)=>{this['cancelButtonView']['fire']('execute'),_0x6c0dd2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4f9825,_0x4179bf)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4179bf());}),this['on']('submit',(_0x1523e6,_0xb09355)=>{_0xb09355['length']>0xfde8?(alert(Et(_0x31f79f,'TOO_LONG_COMMENT_ALERT',[_0xb09355['length'],0xfde8])),_0x1523e6['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2f1560=this['editor'];this['element']['insertBefore'](_0x2f1560['ui']['element'],this['element']['firstChild']),_0x2f1560['model']['document']['on']('change',()=>this['value']=_0x2f1560['getData']()),_0x2f1560['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2f1560['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3236f7){-0x1===_0x3236f7?(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:_0x1a012b}=this,_0x1a53a6=new _0x3a0b06(_0x1a012b);return _0x1a53a6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1a53a6['withText']=!0x0,_0x1a53a6['bind']('label')['to'](this,'submitLabel'),_0x1a53a6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1a53a6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x537925,_0x3fe20a)=>!_0x3fe20a&&!!_0x537925['trim']()),_0x1a53a6;}['_createCancelButton'](){const {locale:_0x2b897c}=this,_0x168cfa=new _0x3a0b06(_0x2b897c);return _0x168cfa['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x168cfa['label']=Et(_0x2b897c,'Cancel'),_0x168cfa['withText']=!0x0,_0x168cfa['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x168cfa;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5a7eb1=>{this['focusTracker']['add'](_0x5a7eb1['element']);}),this['focusables']['on']('change',(_0x1b2bd6,_0x559826)=>{for(const _0x112986 of Array['from'](_0x559826['added'])['reverse']())this['focusTracker']['add'](_0x112986['element']);});}},xt=class extends ht{constructor(_0x53e202,_0x128a7b,_0x97ca73){super(_0x53e202),this['commentInputView']=new St(_0x53e202,_0x97ca73),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x31bddb,_0x3c8f4a)=>_0x31bddb||!!_0x3c8f4a),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 _0x19feda(_0x53e202,_0x128a7b),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'](_0x47b998){this['commentInputView']['focus'](_0x47b998);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1f2adc,_0x479b28)=>{const {submitButtonView:_0x351110,cancelButtonView:_0x15e003,editor:_0x59c0ba}=this['commentInputView'];[_0x351110['element'],_0x15e003['element'],_0x59c0ba?_0x59c0ba['editing']['view']['getDomRoot']():null]['filter'](_0x5b4d82=>_0x5b4d82)['some'](_0x1ae42e=>_0x1ae42e['contains'](_0x479b28['target']))||(this['focus'](),_0x479b28['preventDefault']());});}},Pt=class extends ht{constructor(_0x5cff02){super(_0x5cff02);const _0x49d78f=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x49d78f['to']('count',_0x2f8f88=>Et(_0x5cff02,'NUMBER_OF_COMMENTS',_0x2f8f88))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x27b303,_0x2e0aed,_0x556ce1){super(_0x27b303);const _0x594ac9=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2e0aed['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2e0aed,this['_config']=_0x556ce1,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2c7bb5=>this['commentViews']['map'](_0x9a07d7=>_0x9a07d7['element'])['includes'](_0x2c7bb5['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x27b303),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1ead9e=>_0x1ead9e-this['_config']['maxCommentsWhenCollapsed']);for(const _0x17ca53 of _0x2e0aed['comments'])this['_handleNewCommentModel'](_0x17ca53);this['_handleInfoComment'](),this['listenTo'](_0x2e0aed['comments'],'add',(_0x313c8c,_0xda2a38)=>{const _0x3021cb=this['_calculatePosition'](_0xda2a38);this['length']++,this['_handleNewCommentModel'](_0xda2a38,_0x3021cb),this['refreshVisibleViews']();}),this['listenTo'](_0x2e0aed['comments'],'remove',(_0x4ba7af,_0xc9573f)=>{this['length']--,this['_handleRemoveCommentModel'](_0xc9573f),this['refreshVisibleViews']();}),this['listenTo'](_0x2e0aed,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2e0aed,'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',_0x594ac9['if']('length','ck-hidden',_0x19c4b6=>!_0x19c4b6)],'aria-label':Et(_0x27b303,'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'](_0x55708f){-0x1===_0x55708f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1f88e4 of this['commentViews'])_0x1f88e4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4525b2,_0xabbd7e){const _0x574add=new this['_config']['CommentView'](this['locale'],_0x4525b2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x574add['viewUid']=_0x4525b2['id'],_0x574add['delegate']('removeComment')['to'](this),_0x574add['delegate']('updateComment')['to'](this),_0x574add['delegate']('resolveCommentThread')['to'](this),_0x574add['delegate']('editorReady')['to'](this),_0x574add['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x574add,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x574add,_0xabbd7e);}['_calculatePosition'](_0x280be4){const _0xa0c202=this['_model']['_findOptimalIndex'](_0x280be4);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x280be4['authoredAt']?_0xa0c202-0x1:_0xa0c202:_0xa0c202-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x256c09={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x256c09,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x256c09));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x37b6c6){const _0x4b4aa6=this['commentViews']['remove'](_0x37b6c6['id']);this['stopListening'](_0x4b4aa6),_0x4b4aa6['isEditMode']&&this['_updateHasDirtyComment'](),_0x4b4aa6['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1f7601=>_0x1f7601['isEditMode']);}['_rearrangeCollapse'](){const _0x44fba0=function(_0x207f01){const _0x4df0c0=new _0x5c875e();for(const _0x1c66bf of _0x207f01)_0x4df0c0['add'](_0x1c66bf);return _0x4df0c0;}(this['commentViews']),_0x2d9d0f=this['_collapsedCommentsView']['count'];for(let _0x145e1c=0x1;_0x145e1c<=_0x2d9d0f;_0x145e1c++)_0x44fba0['remove'](0x1);for(const _0xef1062 of _0x44fba0)_0xef1062['collapse']();_0x2d9d0f>0x0&&_0x44fba0['add'](this['_collapsedCommentsView'],0x1),Dt(_0x5c96b4(Array['from'](this['visibleViews']),Array['from'](_0x44fba0)),this['visibleViews'],_0x44fba0);}['_rearrangeExpand'](){Dt(_0x5c96b4(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xb37099 of this['visibleViews'])_0xb37099['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x556938=>{this['focusTracker']['add'](_0x556938['element']),this['keystrokes']['listenTo'](_0x556938['element']);}),this['commentViews']['on']('change',(_0x136cea,_0x3e7629)=>{for(const _0x486424 of _0x3e7629['removed'])this['focusTracker']['remove'](_0x486424['element']),this['keystrokes']['stopListening'](_0x486424['element']);for(const _0x7b132b of Array['from'](_0x3e7629['added'])['reverse']())this['focusTracker']['add'](_0x7b132b['element']),this['keystrokes']['listenTo'](_0x7b132b['element']);});}};function Dt(_0x189184,_0x486d07,_0xcb11b2){let _0xfc20b6=0x0;for(const _0x519e58 of _0x189184)switch(_0x519e58){case'insert':_0x486d07['add'](_0xcb11b2['get'](_0xfc20b6),_0xfc20b6),_0xfc20b6++;break;case'delete':_0x486d07['remove'](_0xfc20b6);break;case'equal':_0xfc20b6++;}}var Vt=class extends ht{constructor(_0x279fc2){super(_0x279fc2);const _0x4bd9d3=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4bd9d3['to']('contextValue',_0x1be60a=>Et(_0x279fc2,'THREAD_CONTEXT_LABEL',_0x1be60a)),'tabindex':-0x1},'children':[{'text':_0x4bd9d3['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4c7f3c,_0x3cfc08){super(_0x4c7f3c);const _0x3687b1=this['bindTemplate'];this['_model']=_0x3cfc08,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x253348=>!!_0x253348),this['bind']('contextValue')['to'](this['_model'],'context',_0x598866=>_0x598866&&_0x598866['value']?this['_trimContextValue'](_0x598866['value']):Et(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x3687b1['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 _0x571b4a=new _0x3a0b06(this['locale']);return _0x571b4a['label']=Et(this['locale'],'Reopen'),_0x571b4a['tooltip']=Et(this['locale'],'Reopen'),_0x571b4a['icon']=_0x431f9a,_0x571b4a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x33e2eb=>!_0x33e2eb),_0x571b4a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x566747,_0xdd1434)=>_0x566747&&_0xdd1434),_0x571b4a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x571b4a;}['_trimContextValue'](_0x596be7){if(_0x596be7['length']<0x96)return _0x596be7;const _0x52818e=_0x596be7['lastIndexOf']('\x20',0x93);return _0x596be7['substring'](0x0,_0x52818e>-0x1?_0x52818e:0x93)+'...';}['_attachContextActions'](){const _0x495c87=this['element']['querySelector']('.ck-context'),_0x46bbdf=_0x495c87['querySelector']('.ck-context__value');this['listenTo'](_0x495c87,'mouseenter',()=>{_0x46bbdf['offsetWidth']<_0x46bbdf['scrollWidth']&&_0x495c87['classList']['add']('overlay');}),this['listenTo'](_0x495c87,'mouseleave',()=>{_0x495c87['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4c23a5 of this['focusables'])this['focusTracker']['add'](_0x4c23a5['element']),this['keystrokes']['listenTo'](_0x4c23a5['element']);}['_createContextView'](){const _0x38743f=new Vt(this['locale']);return _0x38743f['bind']('contextValue')['to'](this),_0x38743f;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x588ae7,_0x52e80b,_0x399f73,_0xdd0150){super(_0x588ae7),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x52e80b,this['_localUser']=_0x399f73,this['_config']=_0xdd0150,this['commentThreadHeaderView']=new Bt(_0x588ae7,_0x52e80b),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x1a41e7(_0x588ae7,Et(_0x588ae7,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x588ae7,_0x52e80b,Object['assign']({'CommentView':this['_config']['CommentView']},_0xdd0150)),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',(_0x49fa2d,_0x1eafe4)=>_0x49fa2d||!!_0x1eafe4),this['bind']('isUnlinked')['to'](_0x52e80b,'unlinkedAt',_0x5c109e=>!!_0x5c109e);let _0x3d7bd6=null;const _0x5d0da3=()=>{const _0x46a978=this['_model']['comments']['first']||null;_0x46a978!==_0x3d7bd6&&(_0x3d7bd6&&this['stopListening'](_0x3d7bd6,'change:content'),_0x3d7bd6=_0x46a978,_0x46a978&&this['listenTo'](_0x46a978,'change:content',_0x5d0da3));const _0x57ed4d=_0x46a978?_0x46a978['author']['name']:this['_localUser']['name'],_0x1fe5c5=_0x46a978?new DOMParser()['parseFromString'](_0x260955(_0x46a978['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0xe423d4=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x57ed4d]);this['set']('ariaLabel',_0x1fe5c5?_0xe423d4+'\x20'+_0x1fe5c5:_0xe423d4);};this['listenTo'](this['_model']['comments'],'change',_0x5d0da3),_0x5d0da3(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x352d1d=>_0x352d1d['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x57b841(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xe5f283=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x48e63d=_0xe5f283['commentInputView'];return _0xe5f283['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x48e63d,'value',(_0x6e2f,_0x19946b,_0x294fcf,_0x3175ff,_0x258693)=>!!_0x258693||!!_0x3175ff&&_0x294fcf&&!_0x19946b||_0x6e2f&&_0x294fcf&&!_0x19946b),_0x48e63d['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4d35a8,_0x28271d,_0x573686)=>{let _0xd5c596;return _0xd5c596=_0x573686&&_0x28271d?'Reply\x20to\x20reopen\x20discussion...':_0x4d35a8?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0xd5c596);}),_0x48e63d['bind']('submitLabel')['to'](this,'length',_0x2cc043=>Et(this['locale'],_0x2cc043?'Reply':'Comment')),_0x48e63d['on']('submit',(_0x313bc7,_0xfbec71)=>{this['fire']('addComment',_0xfbec71),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x48e63d['on']('cancel',()=>{this['focus']();}),_0x48e63d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x48e63d['on']('cancel',_0x3c3891=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3c3891['stop']());}),this['on']('change:isActive',(_0x4f80ea,_0x3e5bbe,_0xf02bb3)=>{_0xf02bb3||this['length']||_0x48e63d['value']||this['fire']('removeCommentThread');}),_0xe5f283;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x10bd48(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x31206e,_0x460ebe,_0x5b844f,_0x3a4ad4){super(_0x31206e,_0x460ebe,_0x5b844f,_0x3a4ad4),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x31206e,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x155694,_0x4c4a75,_0x10eea3)=>{_0x10eea3||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1b82ed,_0xe8efd8,_0x554f97)=>{_0x554f97&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x59a35c=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x59a35c['if']('isActive','ck-thread--active'),_0x59a35c['if']('isUnlinked','ck-thread--unlinked'),_0x59a35c['to']('actionIndicator',_0xacfce4=>_0xacfce4?'ck-thread--'+_0xacfce4:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x59a35c['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 _0x2d5263 of this['commentsListView']['commentViews'])_0x2d5263['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5017a9}=this,_0x2d322a=this['commentsListView']['commentViews']['get'](0x0);_0x2d322a===this['_boundFirstCommentView']||_0x2d322a['isSystemComment']||(this['_boundFirstCommentView']=_0x2d322a,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2d322a,'actionIndicator',_0x2837ba=>'remove'===_0x2837ba?'remove':null),_0x2d322a['placeholder']=Et(_0x5017a9,'Write\x20a\x20comment...'),_0x2d322a['removeButton']['on']('execute',_0x426363=>{_0x426363['stop'](),this['showConfirm'](Et(_0x5017a9,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2d322a['focus']();}),_0x2d322a['actionBar']['add'](this['resolveButton'],0x0),_0x2d322a['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x35fce5=new _0x470ff8(this['locale']);return _0x35fce5['label']=Et(this['locale'],'Resolve'),_0x35fce5['tooltip']=Et(this['locale'],'Resolve'),_0x35fce5['icon']=_0x10acf0,_0x35fce5['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x35fce5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1dda89=>!_0x1dda89),_0x35fce5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5af41b,_0x8db376)=>_0x5af41b&&!_0x8db376),_0x35fce5['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x35fce5;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}},Wt=class extends ht{constructor(_0x148a18){super(_0x148a18),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x133f21,_0x380a7b,_0x3db7ee)=>{this['element']['innerHTML']=_0x3db7ee;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1c354b,_0x15d8d4,_0x5ea88a){super(_0x1c354b),this['_model']=_0x15d8d4,this['_config']=_0x5ea88a,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x15d8d4,'content',_0x15d8d4,'authoredAt',(_0x9ecc74,_0x147fac)=>Et(_0x1c354b,'COMMENT_ARIA_LABEL',[_0x15d8d4['author']['name'],_0x5ea88a['formatDateTime'](_0x147fac),new DOMParser()['parseFromString'](_0x9ecc74,'text/html')['body']['textContent'],_0x15d8d4['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x1a41e7(_0x1c354b,Et(_0x1c354b,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x173e34=>_0x173e34['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x49a395=new Wt(this['locale']);return _0x49a395['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x570ea0,_0x251fa0)=>_0x251fa0?_0x260955(_0x570ea0,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x570ea0),_0x49a395;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0xcbb9ac=new St(this['locale'],this['_config']['editorConfig']);return _0xcbb9ac['value']=this['_model']['content'],_0xcbb9ac['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xcbb9ac['submitLabel']=Et(this['locale'],'Save'),_0xcbb9ac['on']('submit',(_0x25fd26,_0xf928d3)=>{this['fire']('updateComment',this['_model']['id'],_0xf928d3),this['switchToDisplayMode'](),this['focus']();}),_0xcbb9ac['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0xcbb9ac['once']('editorReady',()=>{_0xcbb9ac['focus']();}),_0xcbb9ac['createEditor'](),_0xcbb9ac['delegate']('editorReady')['to'](this),_0xcbb9ac['delegate']('editorDestroyed')['to'](this),_0xcbb9ac;}['_setupKeyboardNavigation'](){const _0x31055c=this['element'];this['keystrokes']['listenTo'](_0x31055c);for(const _0x37d0f0 of this['focusables'])this['focusTracker']['add'](_0x37d0f0['element']),this['keystrokes']['listenTo'](_0x37d0f0['element']);this['focusables']['on']('change',(_0x38a7f3,_0x351e7c)=>{for(const _0x24bcde of _0x351e7c['removed'])this['focusTracker']['remove'](_0x24bcde['element']),this['keystrokes']['stopListening'](_0x24bcde['element']);for(const _0x29f26f of _0x351e7c['added'])this['focusTracker']['add'](_0x29f26f['element']),this['keystrokes']['listenTo'](_0x29f26f['element']);}),this['keystrokes']['set']('enter',(_0x4fd467,_0x273e81)=>{_0x31055c===_0x4fd467['target']&&(this['focusCycler']['focusFirst'](),_0x273e81());}),this['keystrokes']['set']('esc',(_0x596e96,_0x1057ad)=>{_0x31055c!==_0x596e96['target']&&(this['focus'](),_0x1057ad());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x10bd48(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x21badc,_0x3c0892,_0x1ce561){super(_0x21badc,_0x3c0892,_0x1ce561),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x21badc,'Reply...')),this['bind']('authoredAt')['to'](_0x3c0892),this['bind']('resolvedAt')['to'](_0x3c0892),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 _0x19feda(_0x21badc,_0x3c0892['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3c0892,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1e7df9=this['bindTemplate'],_0x4c0d3d=[{'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':_0x1e7df9['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1e7df9['to']('authoredAt',_0x4b5270=>this['_config']['formatDateTime'](_0x4b5270))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1e7df9['if']('isEditMode','ck-comment__actions--hidden'),_0x1e7df9['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']&&_0x4c0d3d['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x1e7df9['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1e7df9['if']('isEditMode','ck-comment--edit'),_0x1e7df9['if']('isSystemComment','ck-comment--info'),_0x1e7df9['to']('actionIndicator',_0x21a266=>_0x21a266?'ck-comment--'+_0x21a266:'')],'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':_0x4c0d3d}]}]};}['_createEditButton'](){const _0xcd46a4=new _0x3a0b06(this['locale']);return _0xcd46a4['label']=Et(this['locale'],'Edit'),_0xcd46a4['icon']=_0x16d61c,_0xcd46a4['withText']=!0x0,_0xcd46a4['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xcd46a4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a6c04=>!_0x2a6c04),_0xcd46a4['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xcd46a4['on']('execute',()=>this['switchToEditMode']()),_0xcd46a4;}['_createRemoveButton'](){const _0x1e8d42=new _0x3a0b06(this['locale']);return _0x1e8d42['label']=Et(this['locale'],'Remove'),_0x1e8d42['icon']=_0x5dcef3,_0x1e8d42['withText']=!0x0,_0x1e8d42['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1e8d42['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x30b9fa=>!_0x30b9fa),_0x1e8d42['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1e8d42['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1e8d42;}['_createDropdown'](){const _0x3e9a41=ct(this['locale'],_0x4802c0),_0x3275c1=_0x3e9a41['panelView']['children'],_0x3af4c2=new ot(this['locale']),_0x50b4e6=_0x3e9a41['bindTemplate'];dt(_0x3e9a41,()=>this['items']['find'](_0xf4ef48=>_0xf4ef48['isVisible'])),_0x3e9a41['extendTemplate']({'attributes':{'class':[_0x50b4e6['if']('isVisible','ck-hidden',_0x40f03b=>!_0x40f03b)]}});const _0x54a155=(_0x52551a,_0x5585d6=-0x1)=>{const _0x5d012a=new nt(this['locale']);_0x5d012a['children']['add'](_0x52551a);const _0x408565=_0x5585d6>-0x1?_0x5585d6:_0x3af4c2['items']['length'];_0x3af4c2['items']['add'](_0x5d012a,_0x408565);const _0x32c709=Array['from'](this['items']);_0x3e9a41['unbind']('isEnabled','isVisible'),_0x3e9a41['bind']('isEnabled')['toMany'](_0x32c709,'isEnabled',(..._0x342b87)=>_0x342b87['some'](_0x207e5e=>_0x207e5e)),_0x3e9a41['bind']('isVisible')['toMany'](_0x32c709,'isVisible',(..._0x340f0a)=>_0x340f0a['some'](_0x65a9a3=>_0x65a9a3));};_0x3e9a41['panelPosition']='sw',_0x3e9a41['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x4443a6});for(const _0x48fd8e of this['items'])_0x54a155(_0x48fd8e);return _0x3275c1['add'](_0x3af4c2),_0x3e9a41['listenTo'](this['items'],'add',(_0x3c0f2e,_0x47bab9,_0xfcd03e)=>{_0x54a155(_0x47bab9,_0xfcd03e);}),_0x3e9a41['listenTo'](this['items'],'remove',(_0x15240a,_0x33f709,_0x378a03)=>{_0x3af4c2['items']['remove'](_0x378a03);}),_0x3e9a41;}['_attachActions'](_0xd08b80,_0x252b9f){const _0x5e0456=_0xd08b80&&_0xd08b80['element'];_0x5e0456&&(this['listenTo'](_0x5e0456,'mouseenter',()=>this['actionIndicator']=_0x252b9f),this['listenTo'](_0x5e0456,'focus',()=>this['actionIndicator']=_0x252b9f),this['listenTo'](_0x5e0456,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5e0456,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x58895d=super['_createCommentInputView']();return _0x58895d['bind']('placeholder')['to'](this),_0x58895d;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x32c79a){const _0x4fb55e=_0x5e5c2f(_0x32c79a,0x1e),_0x46025a=new MutationObserver(_0x2020b0=>{for(const _0x35b63d of _0x2020b0)('attributes'==_0x35b63d['type']&&'class'==_0x35b63d['attributeName']||'childList'==_0x35b63d['type']||'characterData'==_0x35b63d['type'])&&_0x4fb55e();});return{'attach'(_0x7c517f){_0x46025a['observe'](_0x7c517f,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x46025a['disconnect'](),_0x4fb55e['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x1e8758,_0x5db820){super(_0x1e8758),this['id']=_0x238ccd(),this['focusTracker']=new _0x57589a(),this['keystrokes']=new _0x6e4d4a(),this['keystrokes']['set']('Esc',(_0x20ae90,_0x14f7fc)=>this['fire']('Esc',_0x14f7fc)),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'](_0x5db820),this['mainView']=_0x5db820;const _0x3d39d2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3d39d2['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 _0x3f9470=this['element']['clientHeight'];_0x3f9470&&(this['height']=_0x3f9470);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x181a7c();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x11f100,target:_0x8d26be,type:_0x4542a2,isVisible:_0x4aaa45=!0x0}){super(),this['view']=_0x11f100,this['view']['element']||this['view']['render'](),this['_type']=_0x4542a2,this['_target']=_0x8d26be,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5c875e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5bcdf2,_0x429530)=>{this['view']['focusTracker']['add'](_0x429530);}),this['focusableElements']['on']('remove',(_0x5d3b17,_0x4b310b)=>{this['view']['focusTracker']['remove'](_0x4b310b);}),this['set']('isVisible',_0x4aaa45);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x50b967=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x50b967),_0x50b967;}get['targetRect'](){const _0x1a945f=this['target'];if(null===_0x1a945f)return null;if(_0x1a945f instanceof _0x50fe83)return _0x1a945f;const _0x137b83=_0x1a945f['filter'](_0x3d2adb=>function(_0x236bd8){return!!_0x236bd8['offsetParent']||!!_0x236bd8['getClientRects']()['item'](0x0);}(_0x3d2adb));return 0x0===_0x137b83['length']?null:_0x50fe83['getDomElementRects'](_0x137b83[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x15a619){this['view']['isActive']=_0x15a619,this['view']['mainView']['isActive']=_0x15a619;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x14b17a){if(!(null===_0x14b17a||_0x14b17a instanceof _0x50fe83||Array['isArray'](_0x14b17a)&&_0x14b17a['every'](_0x2c5d4d=>zt(_0x2c5d4d))))throw new _0x3cac4c('annotation-invalid-target',null,{'target':_0x14b17a});}['_getNormalizedTarget'](){const _0x560bb2='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x560bb2)?[_0x560bb2]:_0x560bb2;}};function zt(_0x3cdec8){return null!==_0x3cdec8&&'object'==typeof _0x3cdec8&&'nodeType'in _0x3cdec8&&0x1===_0x3cdec8['nodeType'];}var Jt=class extends _0x5c875e{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x129a1b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x57589a(),this['_focusTracker']['on']('change:isFocused',(_0x1c5266,_0x588d8f,_0x10c7c8)=>{_0x10c7c8||this['fire']('blur');});for(const _0x2862df of _0x129a1b)this['add'](_0x2862df);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x299af5){if(this['has'](_0x299af5))throw new _0x3cac4c('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x299af5['innerView'],_0x299af5),this['_viewToAnnotation']['set'](_0x299af5['view'],_0x299af5);for(const _0x1ad3f8 of _0x299af5['focusableElements'])this['_focusTracker']['add'](_0x1ad3f8);if(this['listenTo'](_0x299af5['focusableElements'],'add',(_0x376bf9,_0x345484)=>{this['_focusTracker']['add'](_0x345484);}),this['listenTo'](_0x299af5['focusableElements'],'remove',(_0x5da7f3,_0x341f0a)=>{this['_focusTracker']['remove'](_0x341f0a);}),this['listenTo'](_0x299af5['view']['focusTracker'],'change:isFocused',(_0x30d4c9,_0x145cb2,_0x4e062b)=>{_0x4e062b&&this['fire']('focus',_0x299af5);}),_0x299af5['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x33aaf0 of this)_0x33aaf0['updateTargetRect']();}const _0x96fdd1=this['_getOrderInContent'](_0x299af5['view']['targetRect']);return super['add'](_0x299af5,_0x96fdd1);}['remove'](_0x368bad){if(!this['has'](_0x368bad))throw new _0x3cac4c('annotationcollection-not-existing-item',null);this['stopListening'](_0x368bad['view']['focusTracker']),this['stopListening'](_0x368bad['focusableElements']);for(const _0x17a9bd of _0x368bad['focusableElements'])this['_focusTracker']['remove'](_0x17a9bd);return this['_viewToAnnotation']['delete'](_0x368bad['view']),this['_innerViewToAnnotation']['delete'](_0x368bad['innerView']),super['remove'](_0x368bad);}['getByInnerView'](_0x4d3efe){return this['_innerViewToAnnotation']['get'](_0x4d3efe);}['getByView'](_0x3a3744){return this['_viewToAnnotation']['get'](_0x3a3744);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3bdb0e of this)_0x3bdb0e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4962db=Array['from'](this)['sort']((_0x490ce5,_0x10ad79)=>Zt(_0x490ce5['view']['targetRect'],_0x10ad79['view']['targetRect']));for(let _0x25fa6c=_0x4962db['length']-0x1;_0x25fa6c>0x0;_0x25fa6c--){const _0x28309f=_0x4962db[_0x25fa6c];_0x25fa6c!==this['getIndex'](_0x28309f)&&(this['remove'](_0x28309f),this['add'](_0x28309f));}}['_getOrderInContent'](_0x54c704){let _0x3666a2=0x0;if(!_0x54c704)return this['length'];for(const _0x44f763 of this){const _0x414c30=_0x44f763['view']['targetRect'];if(_0x414c30){if(Zt(_0x54c704,_0x414c30)<0x0)return _0x3666a2;_0x3666a2++;}}return _0x3666a2;}['_areCachedRectsStale'](){const _0x1c9d71=this['get'](0x0);if(!_0x1c9d71)return!0x1;const _0x54e0da=_0x1c9d71['view']['targetRect'],_0x39e6c0=_0x1c9d71['targetRect'];return!(!_0x54e0da||!_0x39e6c0)&&(_0x54e0da['top']!==_0x39e6c0['top']||_0x54e0da['left']!==_0x39e6c0['left']);}};function Qt({source:_0x168d0d,target:_0x2e5ec1,filter:_0x1dfce8}){for(const _0x5d900f of _0x168d0d)_0x1dfce8(_0x5d900f)&&_0x2e5ec1['add'](_0x5d900f);_0x2e5ec1['listenTo'](_0x168d0d,'add',(_0x4fe40e,_0x27619d)=>{_0x1dfce8(_0x27619d)&&_0x2e5ec1['add'](_0x27619d);}),_0x2e5ec1['listenTo'](_0x168d0d,'remove',(_0x2cc2bc,_0x296ea3)=>{_0x2e5ec1['has'](_0x296ea3)&&_0x2e5ec1['remove'](_0x296ea3);});}function Zt(_0x4bf63c,_0x29c056){if(null===_0x4bf63c&&null===_0x29c056)return 0x0;if(null===_0x4bf63c)return-0x1;if(null===_0x29c056)return 0x1;const _0x4252b3=_0x4bf63c['top']-_0x29c056['top'];return 0x0==_0x4252b3?_0x4bf63c['left']-_0x29c056['left']:_0x4252b3;}var ti=class extends _0x388472{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x50e0d3){if(super(_0x50e0d3),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x50e0d3 instanceof _0x5df8d8){const _0x3869d3=_0x50e0d3['locale'];_0x50e0d3['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x3869d3,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x142bd5){this['collection']['add'](_0x142bd5);}['remove'](_0x432352){this['collection']['remove'](_0x432352),_0x432352['destroy']();}['refreshVisibility'](){for(const _0xe3797 of this['collection'])_0xe3797['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x331a62){return this['collection']['getByInnerView'](_0x331a62);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2e9c5c of this['collection'])_0x2e9c5c['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x44d838){this['fire']('_activateAnnotation',_0x44d838);}['createAnnotation'](_0x55f694){return new $t(_0x55f694);}['createAnnotationView'](_0x30e2d3,_0x511c34){return new qt(_0x30e2d3,_0x511c34);}['_addActiveAnnotation'](_0x1b0a4f){const _0x3d0c12=new Set(this['activeAnnotations']);_0x3d0c12['add'](_0x1b0a4f),this['activeAnnotations']=_0x3d0c12;}['_removeActiveAnnotation'](_0x2ed181){const _0x3ef71a=new Set(this['activeAnnotations']);_0x3ef71a['delete'](_0x2ed181),this['activeAnnotations']=_0x3ef71a;}['_bindAnnotationsToVisibleAnnotations'](){const _0x456a41=this['collection'],_0x2ca952=this['_visibleAnnotations'];function _0x243b94(_0x855abe){const _0x348d00=_0x855abe['source'];_0x348d00['isVisible']&&!_0x2ca952['has'](_0x348d00)?_0x2ca952['add'](_0x348d00):!_0x348d00['isVisible']&&_0x2ca952['has'](_0x348d00)&&_0x2ca952['remove'](_0x348d00),_0x348d00['view']['focusTracker']['remove'](_0x348d00['view']['element']),_0x348d00['view']['focusTracker']['add'](_0x348d00['view']['element']);}this['listenTo'](_0x456a41,'add',(_0x16d5fe,_0x1c465a)=>{_0x1c465a['isVisible']&&_0x2ca952['add'](_0x1c465a),this['listenTo'](_0x1c465a,'change:isVisible',_0x243b94);}),this['listenTo'](_0x456a41,'remove',(_0x39cf52,_0xdbcce3)=>{_0x2ca952['has'](_0xdbcce3)&&_0x2ca952['remove'](_0xdbcce3),this['stopListening'](_0xdbcce3,'change:isVisible',_0x243b94);});}['_setupEnterAnnotationKeystroke'](){const _0x48ef02=_0x58a062=>{_0x58a062['on']('ready',()=>{_0x58a062['keystrokes']['set'](_0x4a902b,(_0x3cbf98,_0x4ce1a5)=>{const _0x47baed=_0x48775c(this['activeAnnotations']['values']());_0x47baed&&(_0x47baed['view']['focus'](),_0x4ce1a5());});});};this['context']instanceof _0x5df8d8?_0x48ef02(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2a954b,_0x50f7e6)=>{_0x48ef02(_0x50f7e6);});}['_setupEscapeAnnotationHandling'](){const _0x19da4d=_0x54b560=>{const _0x47d9b8=_0x54b560['source'],_0x3996fe=[];let _0x2a77aa;if(Array['isArray'](_0x47d9b8['target'])){_0x2a77aa=_0x47d9b8['target'][0x0],this['context']instanceof _0x5df8d8?_0x3996fe['push'](this['context']):this['context']['editors']&&_0x3996fe['push'](...this['context']['editors']);for(const _0x1d073d of _0x3996fe)for(const _0x1e9ece of _0x1d073d['editing']['view']['domRoots']['values']())if(_0x1e9ece['contains'](_0x2a77aa))return void _0x1d073d['editing']['view']['focus']();_0x2a77aa['focus']();}};this['listenTo'](this['collection'],'add',(_0x9473db,_0x25718d)=>{this['listenTo'](_0x25718d,'escape',_0x19da4d,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5d4377,_0x4fb5b8)=>{this['stopListening'](_0x4fb5b8,'escape',_0x19da4d);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x181a7c(),ni=/* #__PURE__ -- @preserve */
31
- _0x181a7c();var oi=class extends _0x388472{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x35ca69,_0x52cabf];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x12c36e){super(_0x12c36e),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x55dc69=this['context']['config'];_0x55dc69['define']('comments.maxCommentsWhenCollapsed',0x2),_0x55dc69['define']('comments.maxThreadTotalWeight',0x1f4),_0x55dc69['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x55dc69['define']('comments.CommentThreadView',Ut),_0x55dc69['define']('comments.CommentView',Yt),_0x55dc69['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xa88459=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2be2ec,_0x37aefd)=>this['_addCommentThread'](_0x37aefd)),this['on']('submitCommentThread',(_0x57a0d7,_0x54c531)=>this['_submitCommentThread'](_0x54c531)),this['on']('resolveCommentThread',(_0xfa7dc1,_0x190fd7)=>this['_resolveCommentThread'](_0x190fd7)),this['on']('resolveCommentThread',(_0x4cbe46,_0x310cc9)=>this['_updateActiveAnnotation'](_0x310cc9),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x6dcd69,_0x570659)=>this['_reopenCommentThread'](_0x570659)),this['on']('reopenCommentThread',(_0x4cdcbf,_0xcb25e1)=>this['_updateActiveAnnotation'](_0xcb25e1),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5520b6,_0x1fd1c6)=>this['_removeCommentThread'](_0x1fd1c6)),this['on']('updateCommentThread',(_0x20758b,_0x32ae77)=>this['_updateCommentThread'](_0x32ae77)),this['on']('updateCommentThread',(_0x5a3341,_0xc6c7b5)=>this['_updateActiveAnnotation'](_0xc6c7b5),{'priority':'lowest'}),this['on']('addComment',(_0x5a9078,_0x2595a3)=>this['_addComment'](_0x2595a3)),this['on']('updateComment',(_0xe37c6a,_0x22d8cd)=>this['_updateComment'](_0x22d8cd)),this['on']('removeComment',(_0x7206a7,_0x3ae3d8)=>this['_removeComment'](_0x3ae3d8)),this['on']('addComment',(_0x45dce5,{threadId:_0x2d63bf,isFromAdapter:_0x4a9d63})=>{if(_0x4a9d63)return;const _0x46e535=this['getCommentThread'](_0x2d63bf),_0x5e9530=_0x46e535&&this['_threadToController']['get'](_0x46e535);_0x5e9530&&_0x5e9530['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xa88459,'change:activeAnnotations',(_0x1d0eec,_0x163de1,_0x5ef0dc)=>{const _0x1818e9=Array['from'](_0x5ef0dc)['map'](_0x56cbcf=>this['_viewToController']['get'](_0x56cbcf['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1818e9?_0x1818e9['model']:null;});}set['adapter'](_0x310c86){if(this['_adapter'])throw new _0x3cac4c('commentsrepository-adapter-already-set');this['_adapter']=_0x310c86;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x66a0ac=ii,threadId:_0x32edf0=_0x238ccd(),comments:_0x27504e=[],unlinkedAt:_0x55bdd8=null,resolvedAt:_0x5395d1=null,resolvedBy:_0x32940e=null,target:_0x462dbd=null,context:_0x368ddf=null,attributes:_0x2cd8b6={},isResolvable:_0x1c8e08=!0x0,isSubmitted:_0x3ef4f6=!0x1,isFromAdapter:_0x329ace=!0x1}={}){return this['fire'](ai('addCommentThread',_0x66a0ac),{'channelId':_0x66a0ac,'threadId':_0x32edf0,'comments':_0x27504e,'unlinkedAt':_0x55bdd8,'resolvedAt':_0x5395d1,'resolvedBy':_0x32940e,'target':_0x462dbd,'context':_0x368ddf,'attributes':_0x2cd8b6,'isFromAdapter':_0x329ace,'isResolvable':_0x1c8e08,'isSubmitted':_0x3ef4f6}),this['getCommentThread'](_0x32edf0);}['openNewCommentThread']({channelId:_0x40a928=ii,threadId:_0x166f41=_0x238ccd(),target:_0x4198c2,context:_0x4609cf=null,isResolvable:_0x3acd46=!0x0}){if(this['_readOnlyChannels']['has'](_0x40a928)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4198c2)throw new _0x3cac4c('commentsrepository-missing-target');const _0x2fb341=this['addCommentThread']({'channelId':_0x40a928,'threadId':_0x166f41,'target':_0x4198c2,'context':_0x4609cf,'isResolvable':_0x3acd46});if(!_0x2fb341)return null;const _0x3b5fe8=this['_threadToController']['get'](_0x2fb341),_0x144e42=_0x3b5fe8['view']['commentThreadInputView']['commentInputView'],_0x2fb9d8=this['context']['plugins']['get'](ti),_0x5be878=_0x2fb9d8['getByInnerView'](_0x3b5fe8['view']);return _0x2fb9d8['activate'](_0x5be878),_0x144e42['once']('editorReady',()=>_0x144e42['focus']()),_0x2fb341;}['hasCommentThread'](_0x24a000){if('string'!=typeof _0x24a000)throw new _0x3cac4c('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x24a000);}['updateCommentThread']({channelId:_0x7885a0=ii,threadId:_0xaf3a38,context:_0x403c30,unlinkedAt:_0x235a9a,attributes:_0x1f3e6e,isFromAdapter:_0x2b3d75=!0x1}){return this['fire'](ai('updateCommentThread',_0x7885a0),{'channelId':_0x7885a0,'threadId':_0xaf3a38,'context':_0x403c30,'unlinkedAt':_0x235a9a,'attributes':_0x1f3e6e,'isFromAdapter':_0x2b3d75}),this['getCommentThread'](_0xaf3a38);}['getCommentThread'](_0x59c543){if('string'!=typeof _0x59c543)throw new _0x3cac4c('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x59c543);}['fetchCommentThread']({channelId:_0x41f944,threadId:_0x2329cb}={}){const _0x4d1a21=this['getCommentThread'](_0x2329cb);if(_0x4d1a21)return Promise['resolve'](_0x4d1a21);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3cac4c('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x41f944,'threadId':_0x2329cb})['then'](_0xc5006a=>this['hasCommentThread'](_0x2329cb)?this['getCommentThread'](_0x2329cb):_0xc5006a?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x41f944},_0xc5006a)):void 0x0)['catch'](_0x58e2e2=>{throw console['error'](_0x58e2e2),new _0x3cac4c('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x24b6aa,skipNotAttached:_0x4863c7=!0x1,skipEmpty:_0x1a7d6c=!0x1,toJSON:_0x56df03=!0x1}={}){const _0x4baba9=[];for(const _0x27d440 of this['_threads']['values']())_0x24b6aa&&_0x27d440['channelId']!==_0x24b6aa||_0x4863c7&&!_0x27d440['isAttached']||_0x1a7d6c&&0x0===_0x27d440['length']||_0x4baba9['push'](_0x27d440);return _0x56df03?_0x4baba9['map'](_0x31d571=>_0x31d571['toJSON']()):_0x4baba9;}['getAnnotationForCommentThread'](_0x186609){const _0x420877=this['_threadToController']['get'](_0x186609);return _0x420877&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x420877['view'])||null;}['getCommentThreadForAnnotation'](_0x22fd54){const _0x8ce293=this['_viewToController']['get'](_0x22fd54['innerView']);return _0x8ce293?_0x8ce293['model']:null;}['setActiveCommentThread'](_0x4817eb){const _0x296c84=this['context']['plugins']['get'](ti);if(!_0x4817eb)return void(this['activeCommentThread']&&_0x296c84['deactivateAll']());const _0x33ef6f=this['getCommentThread'](_0x4817eb);if(!_0x33ef6f)throw new _0x3cac4c('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4817eb});if(!this['_threadToController']['has'](_0x33ef6f))throw new _0x3cac4c('commentsrepository-active-not-attached',null,{'threadId':_0x4817eb});const _0x31cbe1=_0x296c84['getByInnerView'](this['_threadToController']['get'](_0x33ef6f)['view']);_0x296c84['activate'](_0x31cbe1);}['switchReadOnly'](_0xcc9836,_0x26e4f2){_0xcc9836?this['_readOnlyChannels']['add'](_0x26e4f2):this['_readOnlyChannels']['delete'](_0x26e4f2),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5c6618){return this['_readOnlyChannels']['has'](_0x5c6618)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x8840b4,_0x49d7ae){return new bt(_0x8840b4,_0x49d7ae);}['setPermissions'](_0x1d6479,_0x50e5b1=ii){this['_permissions']['set'](_0x50e5b1,_0x1d6479),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4d3bd5=ii){return this['_permissions']['has'](_0x4d3bd5)?this['_permissions']['get'](_0x4d3bd5):ei;}['_addCommentThread']({channelId:_0x155bcb,threadId:_0x52b503,comments:_0x5daba6,unlinkedAt:_0x227bc2,resolvedAt:_0x5bc910,resolvedBy:_0x1b842a,target:_0x615138,context:_0x24c73c,attributes:_0x1f2384,isFromAdapter:_0x3f2d88,isResolvable:_0x335396,isSubmitted:_0x471c0c}){if('string'!=typeof _0x52b503)throw new _0x3cac4c('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x52b503});if(this['hasCommentThread'](_0x52b503))throw new _0x3cac4c('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x52b503});const _0x23a5a8=new ri(this,{'channelId':_0x155bcb,'id':_0x52b503,'context':_0x24c73c,'attributes':_0x1f2384,'unlinkedAt':_0x227bc2,'resolvedAt':_0x5bc910,'resolvedBy':_0x1b842a?this['context']['plugins']['get'](_0x52cabf)['getUser'](_0x1b842a):null,'isResolvable':_0x335396,'isSubmitted':_0x471c0c||_0x3f2d88});this['_threads']['set'](_0x52b503,_0x23a5a8);for(const _0xfcf10a of _0x5daba6)_0x23a5a8['_add'](this['_createNewComment']({'threadId':_0x52b503,..._0xfcf10a}));return _0x615138&&_0x23a5a8['attachTo'](_0x615138),_0x3f2d88||!_0x23a5a8['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x155bcb,'threadId':_0x52b503});}['_submitCommentThread']({channelId:_0x294ef5,threadId:_0x98b4de}){if(!this['hasCommentThread'](_0x98b4de))throw new _0x3cac4c('commentsrepository-missing-comment-thread',this);const _0x34532e=this['getCommentThread'](_0x98b4de);if(_0x34532e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4ccbcf,comments:_0x58afc7,resolvedAt:_0x1dac28,resolvedBy:_0x5827d0,context:_0x488b76,attributes:_0x2329e0}=_0x34532e,_0x503067=this['context']['plugins']['get']('PendingActions'),_0x5922b4=_0x503067['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x294ef5,'threadId':_0x4ccbcf,'comments':_0x58afc7['map'](_0x2a285f=>_0x2a285f['toJSON']()),'resolvedAt':_0x1dac28,'resolvedBy':_0x5827d0?_0x5827d0['id']:_0x5827d0,'context':_0x488b76,'attributes':_0x2329e0})['then'](({comments:_0x545de5})=>{_0x503067['remove'](_0x5922b4);for(const _0x4d8f0c of _0x545de5)this['_updateComment']({'channelId':_0x294ef5,'threadId':_0x98b4de,'commentId':_0x4d8f0c['commentId'],'createdAt':_0x4d8f0c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x242ba3=>{throw console['error'](_0x242ba3),new _0x3cac4c('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x32251d,target:_0x295f77}){const _0x256152=this['getCommentThread'](_0x32251d);if(!_0x256152)throw new _0x3cac4c('commentsrepository-attach-missing-comment-thread',this);const _0x2d3c70=this['context']['plugins']['get']('PendingActions'),_0x2eb2f8=this['context']['plugins']['get'](ti),_0x224a2d=this['_createCommentThreadView'](_0x256152),_0x4d54cf=new bt(_0x256152,_0x224a2d);let _0x1a66b9=null;_0x224a2d['on']('change:isDirty',(_0xa0941b,_0x392351,_0x151431)=>{_0x151431?_0x1a66b9=_0x2d3c70['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1a66b9&&(_0x2d3c70['remove'](_0x1a66b9),_0x1a66b9=null);}),this['_threadToController']['set'](_0x256152,_0x4d54cf),this['_viewToController']['set'](_0x224a2d,_0x4d54cf);const _0x4fd2a0=new qt(this['context']['locale'],_0x224a2d);_0x4fd2a0['bind']('length')['to'](_0x224a2d),_0x4fd2a0['bind']('isDirty')['to'](_0x224a2d,'isDirty',_0x224a2d,'length',(_0x1efb8e,_0x282b36)=>_0x1efb8e||!_0x282b36),_0x4fd2a0['bind']('isActive')['to'](_0x224a2d),_0x4fd2a0['type']='comment';const _0x133d73=new $t({'view':_0x4fd2a0,'target':_0x295f77,'type':'comment','isVisible':!_0x256152['archivedAt']&&!!('function'==typeof _0x295f77?_0x295f77():_0x295f77)});return _0x224a2d['on']('escape',()=>{_0x133d73['fire']('escape');}),this['_bindAnnotationToEditors'](_0x224a2d,_0x133d73),_0x2eb2f8['add'](_0x133d73),_0x133d73;}['_bindAnnotationToEditors'](_0x466ec4,_0x486559){this['listenTo'](_0x466ec4,'editorReady',(_0x2c49b1,_0x37e922)=>{const _0x4e7797=_0x37e922['ui']['view']['body']['bodyCollectionContainer'];_0x486559['focusableElements']['add'](_0x4e7797),this['context']instanceof _0x5df8d8&&this['context']['ui']['focusTracker']['add'](_0x4e7797);},{'priority':'highest'}),this['listenTo'](_0x466ec4,'editorDestroyed',(_0x20abfb,_0x4de655)=>{const _0x18b7c4=_0x4de655['ui']['view']['body']['bodyCollectionContainer'];_0x486559['focusableElements']['has'](_0x18b7c4)&&_0x486559['focusableElements']['remove'](_0x18b7c4),this['context']instanceof _0x5df8d8&&this['context']['ui']['focusTracker']['remove'](_0x18b7c4);});}['_unbindEditors'](_0x56cd4a){this['stopListening'](_0x56cd4a,'editorReady'),this['stopListening'](_0x56cd4a,'editorDestroyed');}['_createCommentThreadView'](_0x17ca91){const _0x1a0267=this['context']['plugins']['get'](_0x52cabf),{config:_0x193ddf,locale:_0x3fa70a}=this['context'],_0x280cbe=_0x5330d2(_0x193ddf['get']('locale'),_0x3fa70a);return new(0x0,(_0x193ddf['get']('comments'))['CommentThreadView'])(_0x3fa70a,_0x17ca91,_0x1a0267['me'],{'editorConfig':{..._0x193ddf['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x193ddf['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x193ddf['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x193ddf['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x193ddf['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x280cbe,'CommentView':_0x193ddf['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x11d275,channelId:_0x13c6ca,resolvedAt:_0x249e05,resolvedBy:_0x4c645d,isFromAdapter:_0x9e8e34}){if(!this['hasCommentThread'](_0x11d275))throw new _0x3cac4c('commentsrepository-missing-comment-thread',null,{'threadId':_0x11d275});const _0x85bace=this['getCommentThread'](_0x11d275);if(_0x85bace['isResolved'])throw new _0x3cac4c('commentsrepository-resolved-comment-thread',null,{'threadId':_0x11d275});const _0x57d693=this['context']['plugins']['get'](_0x52cabf);if(_0x85bace['resolvedBy']=_0x57d693['getUser'](_0x4c645d),_0x85bace['resolvedAt']=_0x249e05,_0x9e8e34||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x48ae0c=this['context']['plugins']['get']('PendingActions'),_0x15d96d=_0x48ae0c['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x13c6ca,'threadId':_0x11d275})['then'](({resolvedAt:_0x5951cc,resolvedBy:_0x37c61c})=>{_0x48ae0c['remove'](_0x15d96d),_0x85bace['resolvedBy']['id']!==_0x37c61c&&(_0x85bace['resolvedBy']=_0x57d693['getUser'](_0x37c61c)),_0x85bace['resolvedAt']=_0x5951cc;})['catch'](_0x43f8e3=>{throw console['error'](_0x43f8e3),new _0x3cac4c('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x553af3,channelId:_0x1e2fcb,isFromAdapter:_0x340b05}){if(!this['hasCommentThread'](_0x553af3))throw new _0x3cac4c('commentsrepository-missing-comment-thread',null,{'threadId':_0x553af3});const _0x3085b1=this['getCommentThread'](_0x553af3);if(!_0x3085b1['isResolved'])throw new _0x3cac4c('commentsrepository-reopen-comment-thread',null,{'threadId':_0x553af3});if(_0x3085b1['resolvedBy']=null,_0x3085b1['resolvedAt']=null,_0x340b05||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5ab6e2=this['context']['plugins']['get']('PendingActions'),_0xa6b996=_0x5ab6e2['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1e2fcb,'threadId':_0x553af3})['then'](()=>_0x5ab6e2['remove'](_0xa6b996))['catch'](_0x579a8f=>{throw console['error'](_0x579a8f),new _0x3cac4c('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4d54dc,isFromAdapter:_0x27aff8}){const _0x2ad2de=this['getCommentThread'](_0x4d54dc);if(!_0x2ad2de)throw new _0x3cac4c('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4d54dc),this['_threads']['delete'](_0x4d54dc),!_0x2ad2de['isSubmitted']||_0x27aff8||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x14f943=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2482e9}=_0x2ad2de,_0x1c65a8=_0x14f943['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2482e9,'threadId':_0x4d54dc})['then'](()=>_0x14f943['remove'](_0x1c65a8))['catch'](_0x3fedb2=>{throw console['error'](_0x3fedb2),new _0x3cac4c('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3fae5f,unlinkedAt:_0x132b38,context:_0x2f5d7e,attributes:_0x5b205e,isFromAdapter:_0x120e0a}){if('string'!=typeof _0x3fae5f)throw new _0x3cac4c('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3fae5f});if(!this['hasCommentThread'](_0x3fae5f))throw new _0x3cac4c('commentsrepository-missing-comment-thread',null,{'threadId':_0x3fae5f});const _0x397de3=this['getCommentThread'](_0x3fae5f);let _0x1fef01=!0x1;if(void 0x0!==_0x2f5d7e&&_0x397de3['context']!==_0x2f5d7e&&(_0x397de3['context']=_0x2f5d7e,_0x1fef01=!0x0),void 0x0!==_0x132b38&&_0x397de3['unlinkedAt']!==_0x132b38&&(_0x397de3['unlinkedAt']=_0x132b38,_0x1fef01=!0x0),_0x5b205e&&!_0x4074d8(_0x5b205e,_0x397de3['attributes'])&&(_0x397de3['attributes']=_0x5b205e,_0x1fef01=!0x0),!_0x1fef01)return Promise['resolve']();if(!_0x397de3['isSubmitted']||_0x120e0a||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1c4295=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2882a7}=_0x397de3,_0x40aa44=_0x1c4295['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2882a7,'threadId':_0x3fae5f,'context':_0x2f5d7e,'unlinkedAt':_0x132b38,'attributes':_0x5b205e})['then'](()=>_0x1c4295['remove'](_0x40aa44))['catch'](_0x13a20e=>{throw console['error'](_0x13a20e),new _0x3cac4c('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3e949b){const _0x563d7f=this['context']['plugins']['get'](ti),_0xaaf207=this['getCommentThread'](_0x3e949b);if(_0xaaf207['_isAttached']=!0x1,this['_threadToController']['has'](_0xaaf207)){const _0x2c9a70=this['_threadToController']['get'](_0xaaf207),_0x568452=_0x2c9a70['view'],_0xcc4cee=_0x563d7f['getByInnerView'](_0x568452);this['_threadToController']['delete'](_0xaaf207),this['_viewToController']['delete'](_0x568452),_0xcc4cee&&_0x563d7f['remove'](_0xcc4cee),_0x2c9a70['destroy'](),_0x568452['destroy']()['then'](()=>{this['_unbindEditors'](_0x568452);});}}['_updateActiveAnnotation']({threadId:_0x1974b5,resolvedAt:_0x53abbe,unlinkedAt:_0x93ada4}){const _0x5c3da6=!!_0x53abbe,_0x3bff41=this['context']['plugins']['get'](ti),_0x24e58d=this['getCommentThread'](_0x1974b5);if(this['_threadToController']['has'](_0x24e58d)){const _0x5f3148=this['_threadToController']['get'](_0x24e58d)['view'],_0x4d3fda=_0x3bff41['getByInnerView'](_0x5f3148);_0x4d3fda&&(_0x5c3da6&&_0x3bff41['_removeActiveAnnotation'](_0x4d3fda),_0x93ada4?_0x4d3fda['isVisible']=!0x1:_0x4d3fda['refreshVisibility']());}}['_getExternalAuthor'](_0x4ca12e){const _0x503f03=this['context']['plugins']['get'](_0x52cabf),_0x1cc334=_0x31a5a3('external:'+_0x4ca12e),_0x2257b0=_0x503f03['getUser'](_0x1cc334);return _0x2257b0||_0x503f03['addUser']({'id':_0x1cc334,'name':_0x4ca12e});}['_createNewComment']({threadId:_0xea8341,commentId:_0x3db99b=_0x238ccd(),content:_0x49f3fe,authorId:_0x22d53f,createdAt:_0x5b63db,attributes:_0x38e73c}){if('string'!=typeof _0x3db99b)throw new _0x3cac4c('commentsrepository-invalid-commentid');if('string'!=typeof _0x22d53f)throw new _0x3cac4c('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x49f3fe||!_0x49f3fe['trim']())throw new _0x3cac4c('commentsrepository-invalid-comment-content');const _0x577063=this['context']['plugins']['get'](_0x52cabf)['getUser'](_0x22d53f);if(!_0x577063)throw new _0x3cac4c('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x22d53f});let _0x56c096=null,_0xdfef55=_0x5b63db;return _0x38e73c?.['@external']&&(_0x56c096=this['_getExternalAuthor'](_0x38e73c['@external']['authorName']),_0xdfef55=new Date(_0x38e73c['@external']['createdAt'])),new hi(this,{'threadId':_0xea8341,'id':_0x3db99b,'author':_0x56c096||_0x577063,'creator':_0x577063,'content':_0x49f3fe,'createdAt':_0x5b63db,'authoredAt':_0xdfef55,'attributes':_0x38e73c});}['_addComment'](_0x23c204){let {threadId:_0x9add53,content:_0x49472a,attributes:_0x139f57,isFromAdapter:_0x5a6fd9}=_0x23c204;const _0xcd64be=this['getCommentThread'](_0x23c204['threadId']);if(!_0xcd64be)throw new _0x3cac4c('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1bd04e=this['_createNewComment'](_0x23c204),{id:_0x3847f6}=_0x1bd04e;if(_0xcd64be['_add'](_0x1bd04e),_0x5a6fd9||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xcd64be['isSubmitted'])return Promise['resolve']();const _0x2da2a3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x191404}=_0xcd64be,_0x2a6f3f=_0x2da2a3['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x139f57||(_0x139f57={}),this['adapter']['addComment']({'channelId':_0x191404,'threadId':_0x9add53,'commentId':_0x3847f6,'content':_0x49472a,'attributes':_0x139f57})['then'](_0x16b1c0=>{_0x2da2a3['remove'](_0x2a6f3f),_0x16b1c0&&this['_updateComment']({'channelId':_0x191404,'threadId':_0x9add53,'commentId':_0x3847f6,'createdAt':_0x16b1c0['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x555fa0=>{throw console['error'](_0x555fa0),new _0x3cac4c('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x1cce74,commentId:_0x25f1cd,content:_0x1d49c8,createdAt:_0x580965,attributes:_0x416d21,isFromAdapter:_0x63da4e}){if(void 0x0!==_0x1d49c8&&('string'!=typeof _0x1d49c8||!_0x1d49c8['trim']()['length']))throw new _0x3cac4c('commentsrepository-update-comment-invalid-content');const _0x4f746b=this['getCommentThread'](_0x1cce74),_0x24e73d=_0x4f746b['getComment'](_0x25f1cd);if(!_0x24e73d)throw new _0x3cac4c('commentsrepository-update-missing-comment',this);let _0x517493=!0x1;if(_0x1d49c8&&_0x1d49c8!==_0x24e73d['content']&&(_0x24e73d['isEditable']||_0x63da4e)&&(_0x24e73d['content']=_0x1d49c8,_0x517493=!0x0),_0x580965&&_0x580965!==_0x24e73d['createdAt']&&(_0x24e73d['createdAt']=_0x580965,_0x24e73d['isExternal']||(_0x24e73d['authoredAt']=_0x580965),_0x517493=!0x0),_0x416d21&&!_0x4074d8(_0x416d21,_0x24e73d['attributes'])&&(_0x24e73d['attributes']=_0x416d21,_0x517493=!0x0),!_0x517493)return Promise['resolve']();if(_0x4f746b['fire']('commentUpdated'),_0x63da4e||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xf8e636=this['context']['plugins']['get']('PendingActions'),{channelId:_0x20c993}=this['getCommentThread'](_0x24e73d['threadId']),_0x4def98=_0xf8e636['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x20c993,'threadId':_0x1cce74,'commentId':_0x25f1cd,'content':_0x1d49c8,'attributes':_0x416d21})['then'](()=>_0xf8e636['remove'](_0x4def98))['catch'](_0x47f044=>{throw console['error'](_0x47f044),new _0x3cac4c('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xd53e10,commentId:_0x3d8041,isFromAdapter:_0x549663}){const _0x54c2a6=this['getCommentThread'](_0xd53e10),_0x435033=_0x54c2a6['getComment'](_0x3d8041);if(!_0x435033)throw new _0x3cac4c('commentsrepository-remove-missing-comment',this);if(_0x54c2a6['_remove'](_0x435033),_0x549663||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4b8032=this['context']['plugins']['get']('PendingActions'),{channelId:_0x443f51}=_0x54c2a6,_0x18ffbc=_0x4b8032['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x443f51,'threadId':_0xd53e10,'commentId':_0x3d8041})['then'](()=>_0x4b8032['remove'](_0x18ffbc))['catch'](_0x1f5d94=>{throw console['error'](_0x1f5d94),new _0x3cac4c('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x267814,_0x2b9dd2){super();const _0x7c0712=_0x2b9dd2['isResolvable'];this['channelId']=_0x2b9dd2['channelId'],this['id']=_0x2b9dd2['id'],this['comments']=new _0x5c875e(),this['_repository']=_0x267814,this['_isAttached']=!0x1,this['_isSubmitted']=_0x2b9dd2['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x267814,'_permissions',_0x267814,'_readOnlyChannels',()=>_0x267814['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x267814,'_permissions',()=>_0x267814['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x267814,'_permissions',()=>{const _0x1a9286=_0x267814['getPermissions'](this['channelId']);return _0x1a9286['write']||_0x1a9286['admin'];}),this['bind']('isResolvable')['to'](_0x267814,'_permissions',()=>_0x7c0712&&_0x267814['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x2b9dd2['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2af22e,_0x1f8f1b)=>_0x2af22e?_0x1f8f1b?_0x2af22e<_0x1f8f1b?_0x2af22e:_0x1f8f1b:_0x2af22e:_0x1f8f1b),this['set']('unlinkedAt',_0x2b9dd2['unlinkedAt']||null),this['set']('resolvedAt',_0x2b9dd2['resolvedAt']||null),this['set']('resolvedBy',_0x2b9dd2['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4581ae=>!!_0x4581ae),this['set']('attributes',_0x2b9dd2['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x219607,_0x6b808a)=>_0x219607+_0x6b808a['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x33c401,id:_0x81c7ca}=this;this['_repository']['fire'](ai('submitCommentThread',_0x33c401),{'channelId':_0x33c401,'threadId':_0x81c7ca});}['setUnlinkedAt'](_0x4b8209){this['_update']({'unlinkedAt':_0x4b8209});}['resolve']({resolvedAt:_0x3372f6=new Date(),resolvedBy:_0x27c2dd='',isFromAdapter:_0x52835f=!0x1}={}){const _0xaa8535=this['_repository']['context']['plugins']['get'](_0x52cabf)['me'],{channelId:_0x7370f8,id:_0x37ab8a}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x7370f8),{'channelId':_0x7370f8,'threadId':_0x37ab8a,'resolvedAt':_0x3372f6,'resolvedBy':_0x27c2dd||_0xaa8535['id'],'isFromAdapter':_0x52835f});}['reopen']({isFromAdapter:_0x4f381a=!0x1}={}){const {channelId:_0x3d2134,id:_0x4f8939}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x3d2134),{'channelId':_0x3d2134,'threadId':_0x4f8939,'isFromAdapter':_0x4f381a});}['setContext'](_0x2f3eb3){this['context']||this['_update']({'context':_0x2f3eb3});}['setAttribute'](_0x354897,_0xa92176){const _0x590adc=_0x2cf7e4(this['attributes']);_0x27c082(_0x590adc,_0x354897,_0xa92176),this['_update']({'attributes':_0x590adc});}['removeAttribute'](_0x2700b3){const _0xd07c39=_0x2cf7e4(this['attributes']);_0xeea9c4(_0xd07c39,_0x2700b3),this['_update']({'attributes':_0xd07c39});}['remove']({isFromAdapter:_0x4c193a=!0x1}={}){const {channelId:_0x350a60,id:_0x12451f}=this;this['_repository']['fire'](ai('removeCommentThread',_0x350a60),{'channelId':_0x350a60,'threadId':_0x12451f,'isFromAdapter':_0x4c193a});}['attachTo'](_0xf080de){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xf080de});}['addComment'](_0x42ee67){const {channelId:_0x24b7fa,id:_0x2bf35d}=this;this['_repository']['fire'](ai('addComment',_0x24b7fa,_0x2bf35d),Object['assign']({'channelId':_0x24b7fa,'threadId':_0x2bf35d},_0x42ee67));}['getComment'](_0x539ece){if('string'!=typeof _0x539ece)throw new _0x3cac4c('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x539ece});return this['comments']['get'](_0x539ece);}['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'](_0x2ba58e=>_0x2ba58e['toJSON']()),'attributes':this['attributes']};}['_add'](_0x88a9fd){return this['listenTo'](_0x88a9fd,'change:authoredAt',()=>{const _0x73ff49=this['_findOptimalIndex'](_0x88a9fd),_0x71ddf9=this['comments'];_0x73ff49-0x1!=_0x71ddf9['getIndex'](_0x88a9fd)&&_0x73ff49+0x1!=_0x71ddf9['getIndex'](_0x88a9fd)&&(this['_remove'](_0x88a9fd),this['_add'](_0x88a9fd));}),this['comments']['add'](_0x88a9fd,this['_findOptimalIndex'](_0x88a9fd));}['_update'](_0x508232){const {channelId:_0x3d61b6,id:_0x46054d}=this;this['_repository']['fire'](ai('updateCommentThread',_0x3d61b6),{..._0x508232,'channelId':_0x3d61b6,'threadId':_0x46054d});}['_remove'](_0x208354){return this['stopListening'](_0x208354),_0x208354['destroy'](),this['comments']['remove'](_0x208354);}['_findOptimalIndex'](_0x332d83){const _0x56b98c=this['comments']['find'](_0x95aa7=>new Date(_0x95aa7['authoredAt'])['getTime']()>new Date(_0x332d83['authoredAt'])['getTime']());return _0x56b98c?this['comments']['getIndex'](_0x56b98c):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x3a914e,_0x298306){super();const _0x41eed8=_0x3a914e['context']['plugins']['get'](_0x52cabf)['me'],_0x1bb2a0=_0x3a914e['getCommentThread'](_0x298306['threadId']),_0x49d414=0x0===_0x1bb2a0['comments']['length'],_0x1461c5=_0x41eed8===_0x298306['author'];this['id']=_0x298306['id'],this['threadId']=_0x298306['threadId'],this['author']=_0x298306['author'],this['creator']=_0x298306['creator'],this['set']('content',_0x298306['content']),this['createdAt']=_0x298306['createdAt']||new Date(),this['set']('authoredAt',_0x298306['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1bb2a0,'resolvedAt'),this['set']('attributes',_0x298306['attributes']||{}),this['bind']('isEditable')['to'](_0x3a914e,'_permissions',()=>{const _0x4d3a7d=_0x3a914e['getPermissions'](_0x1bb2a0['channelId'])['write'],_0x18a0bc=_0x3a914e['getPermissions'](_0x1bb2a0['channelId'])['modifyAll'];return _0x1461c5&&_0x4d3a7d||!_0x1461c5&&_0x18a0bc;}),this['bind']('isRemovable')['to'](_0x1bb2a0,'isRemovable',_0x3a914e,'_permissions',_0x15d34c=>{const _0x274ae6=_0x3a914e['getPermissions'](_0x1bb2a0['channelId'])['write'],_0x1f1a1b=_0x3a914e['getPermissions'](_0x1bb2a0['channelId'])['modifyAll'];return _0x1461c5&&_0x274ae6||_0x15d34c&&_0x49d414||!_0x1461c5&&_0x1f1a1b&&!_0x49d414;}),this['bind']('isReadOnly')['to'](_0x1bb2a0,'isReadOnly'),this['_repository']=_0x3a914e;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x41cee6){const _0x3bf180=document['createElement']('div');return _0x3bf180['innerHTML']=_0x41cee6,_0x3bf180['textContent']['length'];}(this['content']),0xc8);}['update'](_0x35721e){const {threadId:_0x41ffb8,id:_0x1fcca3}=this;if(!this['_repository']['hasCommentThread'](_0x41ffb8))throw new _0x3cac4c('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x32b69b}=this['_repository']['getCommentThread'](_0x41ffb8);this['_repository']['fire'](ai('updateComment',_0x32b69b,_0x41ffb8),{'channelId':_0x32b69b,'threadId':_0x41ffb8,'commentId':_0x1fcca3,..._0x35721e});}['setAttribute'](_0x52b116,_0x243ddb){const _0x3bfb9b=_0x2cf7e4(this['attributes']);_0x27c082(_0x3bfb9b,_0x52b116,_0x243ddb),this['update']({'attributes':_0x3bfb9b});}['removeAttribute'](_0x1c1f34){const _0x2075b8=_0x2cf7e4(this['attributes']);_0xeea9c4(_0x2075b8,_0x1c1f34),this['update']({'attributes':_0x2075b8});}['remove'](_0x168d67={}){if(!_0x168d67['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x49fac8,id:_0x236afc}=this;if(!this['_repository']['hasCommentThread'](_0x49fac8))throw new _0x3cac4c('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4de300}=this['_repository']['getCommentThread'](_0x49fac8);this['_repository']['fire'](ai('removeComment',_0x4de300,_0x49fac8),{'channelId':_0x4de300,'threadId':_0x49fac8,'commentId':_0x236afc,..._0x168d67});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x474856,..._0x3e3004){for(const _0x2e671f of _0x3e3004)void 0x0!==_0x2e671f&&(_0x474856+=':'+String(_0x2e671f));return _0x474856;}var ci=class extends _0x54d867{constructor(_0x327cd1){super(_0x327cd1),this['set']('hasContent',!0x1);}['refresh'](){const _0x458cce=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x569f1b of _0x458cce['getRanges']())if(this['_hasContent'](_0x569f1b))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x357631=_0x238ccd(),ranges:_0x5c98d2,comment:_0x4062c2}={}){const _0x21de1e=this['editor']['model'],_0x59c2f6=_0x5c98d2??Array['from'](_0x21de1e['document']['selection']['getRanges']()),_0x55e6b8=[];for(const _0x528e4f of _0x59c2f6)this['_hasContent'](_0x528e4f)&&_0x55e6b8['push'](this['_trimToContent'](_0x528e4f));if(!_0x55e6b8['length'])throw new _0x3cac4c('addcommentthreadcommand-incorrect-ranges',null);_0x4062c2&&this['_createCommentThread'](_0x357631,_0x4062c2),this['_createMarkersFromRanges'](_0x357631,_0x55e6b8,!!_0x4062c2);}['_createMarkersFromRanges'](_0x20d658,_0x5e1a19,_0x4a5e32){this['editor']['model']['change'](_0x4095f8=>{for(const _0x3dd711 of _0x5e1a19){const _0x3fd115='comment:'+_0x20d658+':'+_0x238ccd()['substr'](0x1,0x5);_0x4095f8['addMarker'](_0x3fd115,{'range':_0x3dd711,'usingOperation':_0x4a5e32,'affectsData':_0x4a5e32});}});}['_createCommentThread'](_0x1e11cc,_0xba76f9){const _0x4168b8=this['editor']['plugins']['get']('CommentsRepository'),_0x54fd0b=this['editor']['config']['get']('collaboration.channelId'),_0x2a321a=this['editor']['plugins']['get']('Users')['me'];if(!_0x2a321a)throw new _0x3cac4c('addcommentthreadcommand-user-not-found',null);_0x4168b8['addCommentThread']({'threadId':_0x1e11cc,'channelId':_0x54fd0b,'comments':[{'authorId':_0x2a321a['id'],'content':_0xba76f9,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x5b5f8b){for(const _0x5eb0d6 of _0x5b5f8b['getItems']())if(this['_itemIsContent'](_0x5eb0d6))return!0x0;return!0x1;}['_itemIsContent'](_0x186775){return _0x186775['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x186775)&&!_0x186775['is']('element','tableCell');}['_trimToContent'](_0x5369f4){const _0x2ba389=_0xc3d75b=>!this['_itemIsContent'](_0xc3d75b['item']),_0xd3c9e8=_0x5369f4['start']['getLastMatchingPosition'](_0x2ba389),_0x18c985=_0x5369f4['end']['getLastMatchingPosition'](_0x2ba389,{'direction':'backward'});return this['editor']['model']['createRange'](_0xd3c9e8,_0x18c985);}},di=class extends _0x1228a1{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x37a415){super(_0x37a415),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xdb10bd=this['editor'],_0x728c56=_0xdb10bd['model']['document']['selection'],_0xc9e6ce=_0x55ca5d(()=>this['refreshSelectedViews'](),0xa);_0x728c56['on']('change:range',(_0x3b47e6,_0x3a58f3)=>{_0x3a58f3['directChange']&&(_0xc9e6ce['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xdb10bd['editing']['view']['document'],'change:isFocused',(_0xa1ba5c,_0x38f16b,_0x15585a)=>{_0x15585a&&_0xc9e6ce();}),this['listenTo'](_0xdb10bd['ui']['focusTracker'],'change:isFocused',(_0x46103a,_0x485e9d,_0x21c5c6)=>{_0x21c5c6||this['fire']('blur',{'isAnnotationTracked':_0x2bd8ca=>this['_editorAnnotationsData']['has'](_0x2bd8ca['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x313cab){if(this['_editorAnnotations']['has'](_0x313cab['view']))return;this['_editorAnnotations']['add'](_0x313cab['view']),this['editor']['ui']['focusTracker']['add'](_0x313cab['view']['element']);const _0x126298=this['editor']['plugins']['get'](ti);this['listenTo'](_0x126298['collection'],'remove',(_0x3b3a61,_0x31ffc7)=>{this['editor']['ui']['focusTracker']['remove'](_0x31ffc7['view']['element']),this['_editorAnnotations']['delete'](_0x31ffc7['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x15b513){if('function'!=typeof _0x15b513)throw new _0x3cac4c('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x15b513);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4c178f,annotations:_0x253d0c}){const _0x30bbd2=[],_0xefe185=this['editor']['model']['document']['selection'],_0x2eebd8=Array['from'](_0xefe185['getRanges']());for(const [_0x59f7a7,_0x75b967]of this['_editorAnnotationsData']){const _0xa12f7f=_0x1543db(_0x75b967),_0x31882f=_0x253d0c['getByInnerView'](_0x59f7a7);_0xa12f7f&&_0x31882f&&_0x30bbd2['push']({'annotation':_0x31882f,'range':_0xa12f7f});}function _0x1543db(_0x5741e3){for(const _0x40d715 of _0x5741e3)for(const _0x59e98f of _0x2eebd8)if(_0x40d715['containsRange'](_0x59e98f,!_0xefe185['isCollapsed']))return _0x40d715;return null;}return _0x30bbd2['sort']((_0x56e81d,_0x1fefcc)=>{const _0x1f188a=_0x56e81d['range'],_0x51fb38=_0x1fefcc['range'];if(!_0x1f188a['isEqual'](_0x51fb38)){if(_0x1f188a['containsRange'](_0x51fb38,!0x0))return 0x1;if(_0x51fb38['containsRange'](_0x1f188a,!0x0))return-0x1;}return _0x56e81d['annotation']==_0x4c178f?-0x1:_0x1fefcc['annotation']==_0x4c178f?0x1:0x0;})['map'](_0x3aba41=>_0x3aba41['annotation']);}get['_editorAnnotationsData'](){const _0x4a14ad=new Map();for(const _0x389bfe of Array['from'](this['_dataCollectors']))for(const [_0x3fc11d,_0x867175]of _0x389bfe())_0x4a14ad['set'](_0x3fc11d,_0x867175);return _0x4a14ad;}},li=class extends _0x1228a1{['afterInit'](){const _0x22cac3=this['editor'];_0x22cac3['plugins']['has']('RestrictedEditingModeEditing')&&_0x22cac3['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x1228a1{constructor(_0x21f2e3){super(_0x21f2e3),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x45aa8f=this['editor'],_0x3ea765=_0x45aa8f['commands']['get']('importWord'),_0x1dccb0=_0x45aa8f['plugins']['get'](_0x52cabf);_0x3ea765&&(_0x3ea765['on']('execute',(_0xfac127,[,_0x3ce540])=>{_0x3ce540['collaboration_features']={'comments':!0x0,'user_id':_0x1dccb0['me']['id']};},{'priority':_0x5f4140['high']+0xa}),this['listenTo'](_0x3ea765,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x13a86c,_0x5aae2c){const {comment_threads:_0x405727}=_0x5aae2c;_0x405727&&_0x405727['forEach'](({thread_id:_0x36857f,comments:_0x398cd1,is_resolved:_0x42967b})=>{const _0x389d51=new Date(),_0x4d71ac=_0x398cd1['map'](({author:_0x406e85,content:_0x520b76,created_at:_0x35e3e1})=>({'content':_0x520b76,'authorId':this['editor']['plugins']['get'](_0x52cabf)['me']['id'],'createdAt':_0x389d51,'attributes':{'@external':{'authorName':_0x406e85,'createdAt':_0x35e3e1?new Date(_0x35e3e1):new Date(),'source':'importWord'}}})),_0x585e39=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x585e39,'threadId':_0x36857f,'comments':_0x4d71ac,'resolvedAt':_0x42967b?_0x389d51:null});});}},ui=class extends _0x1228a1{constructor(_0x2bf838){super(_0x2bf838),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x535c4e=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x535c4e,'contentInsertion',(_0x59d704,_0x44ac78)=>this['_removeMarkersWithoutThreads'](_0x44ac78['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4a1f57){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4a1f57;const _0x3d426d=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1413f6 of _0x4a1f57['keys']()){const [_0x39bcd6,_0x4bc816]=_0x1413f6['split'](':');'comment'!=_0x39bcd6||_0x3d426d['hasCommentThread'](_0x4bc816)||_0x4a1f57['delete'](_0x1413f6);}return _0x4a1f57;}['_registerMarkerInClipboardPipeline'](){const _0x4d6941=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4537e1=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4537e1&&_0x4d6941['_registerMarkerToCopy']('comment',_0x4537e1);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x370159){switch(_0x370159){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x315ea8){const _0x4d1f06=_0x315ea8['split'](':');return{'group':_0x4d1f06[0x0],'id':_0x4d1f06[0x1],'part':_0x4d1f06[0x2]};}var pi=class extends _0x1228a1{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x45514a,_0x53e316)=>{if(!_0x53e316['options']['showCommentHighlights'])return null;if(_0x53e316['options']['ignoreResolvedComments']){const {id:_0x37fde2}=fi(_0x45514a['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x37fde2)?.['isResolved']&&_0x45514a['item'])return _0x53e316['consumable']['consume'](_0x45514a['item'],'addMarker:'+_0x45514a['markerName']),_0x53e316['consumable']['consume'](_0x45514a['item'],'removeMarker:'+_0x45514a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5b2941=>{_0x5b2941['on']('addMarker:comment',(_0x350a2c,_0x4bca31,_0xf17947)=>{if(!_0xf17947['options']['showCommentHighlights'])return;const _0x49d1ec=_0x4bca31['item'];if(!_0x49d1ec)return;const _0x489c43=_0xf17947['mapper']['toViewElement'](_0x49d1ec);this['editor']['model']['schema']['isObject'](_0x49d1ec)&&_0x489c43&&!_0x489c43['getCustomProperty']('widget')&&_0x489c43['is']('containerElement')&&Ct(_0x489c43,_0xf17947['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4a49de,{writer:_0x154af5,options:_0x490fad})=>{if(!_0x490fad['showCommentHighlights'])return null;const _0x381fde=_0x154af5['createContainerElement']('div'),_0x2e805f=_0x154af5['createEmptyElement']('hr');return _0x154af5['addClass']('ck-horizontal-line',_0x381fde),_0x154af5['insert'](_0x154af5['createPositionAt'](_0x381fde,0x0),_0x2e805f),_0x381fde;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5c8041,{writer:_0x5f4cdd,options:_0x3403da})=>{if(!_0x3403da['showCommentHighlights'])return null;const _0x14d0dc=_0x5f4cdd['createContainerElement']('span'),_0x2e04a4=_0x5f4cdd['createEmptyElement']('img');return _0x5f4cdd['addClass']('image-inline',_0x14d0dc),_0x5f4cdd['insert'](_0x5f4cdd['createPositionAt'](_0x14d0dc,0x0),_0x2e04a4),_0x14d0dc;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1d7057,{writer:_0x206af7,options:_0x34199b})=>{if(_0x34199b['showCommentHighlights'])return _0x206af7['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5729f1,_0x21fa75,_0x32712c)=>{_0x32712c['options']['showCommentHighlights']&&_0x5729f1['stop']();},{'priority':'high'});}},wi=class extends _0x1228a1{static get['requires'](){return[oi,di,_0x52cabf,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x371699){super(_0x371699),this['set']('isThreadsLoadingPaused',!0x0),_0x371699['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x167f9a,_0x5e6042,_0xeb71e8,_0x75479f)=>{const _0x47a131=_0x371699['plugins']['get'](oi),_0x298a67=_0xeb71e8?fi(_0xeb71e8)['id']:null;_0x371699['model']['change'](()=>{if(_0x298a67){const _0x18318b=this['getAllMarkersForId'](_0x298a67);for(const _0x459364 of _0x18318b)_0x371699['editing']['reconvertMarker'](_0x459364);}if(_0x75479f){const {id:_0x5007f1}=fi(_0x75479f),_0x430d4f=_0x47a131['getCommentThread'](_0x5007f1);if(_0x430d4f&&_0x430d4f['unlinkedAt'])return;if(_0x430d4f&&!_0x430d4f['isAttached'])return;const _0x426245=this['getAllMarkersForId'](_0x5007f1);for(const _0x2550d7 of _0x426245)_0x371699['editing']['reconvertMarker'](_0x2550d7);}}),_0x298a67&&this['scrollToThreadMarker'](_0x298a67);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x165492=this['editor'],_0x3f83db=_0x165492['plugins']['get'](oi),_0x4ae279=_0x165492['config']['get']('collaboration.channelId'),_0x2b1e18=_0x3f83db['getCommentThreads']()['filter'](_0x4e6b2b=>_0x4e6b2b['channelId']!==_0x4ae279);_0x165492['commands']['add']('addCommentThread',new ci(_0x165492)),this['listenTo'](_0x165492,'change:isReadOnly',(_0x44da99,_0x40c44d,_0xcd71cb)=>{_0x3f83db['switchReadOnly'](_0xcd71cb,_0x165492['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3f83db,gi('addCommentThread',_0x4ae279),(_0x4d927e,{threadId:_0x5d40cc})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5d40cc)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5d40cc);}),this['listenTo'](_0x3f83db,gi('removeCommentThread',_0x4ae279),(_0x437499,{threadId:_0x50d5f3})=>{_0x165492['model']['enqueueChange']({'isUndoable':!0x1},_0x2378ea=>{const _0x4abe1b=this['getAllMarkersForId'](_0x50d5f3);for(const _0x18c3b2 of _0x4abe1b)_0x2378ea['removeMarker'](_0x18c3b2);});}),this['listenTo'](_0x3f83db,gi('resolveCommentThread',_0x4ae279),(_0x26fe4a,{threadId:_0x267a70})=>{this['_reconvertMarkers'](_0x267a70);const _0x5c7e19=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x5c7e19['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x267a70)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3f83db,gi('reopenCommentThread',_0x4ae279),(_0x7fc1b0,{threadId:_0x5a34b3})=>{this['_reconvertMarkers'](_0x5a34b3);},{'priority':'low'}),this['listenTo'](_0x3f83db,gi('addComment',_0x4ae279),(_0x14b8b3,{threadId:_0x49819c,isFromAdapter:_0x13c3e9})=>{const _0x5c0633=this['getAllMarkersForId'](_0x49819c);!_0x13c3e9&&0x0!=_0x5c0633['length']&&_0x3f83db['hasCommentThread'](_0x49819c)&&0x1===_0x3f83db['getCommentThread'](_0x49819c)['length']&&_0x165492['model']['enqueueChange']({'isUndoable':!0x1},_0x2a904e=>{for(const _0x12e68a of _0x5c0633)_0x2a904e['updateMarker'](_0x12e68a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x2b1e18);}['afterInit'](){!async function(_0x24f1a7){const _0x55a86d='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x1efb72=0x78e70,_0x4c282d=window['Date']['now'](),_0x5e3fcc=_0x24f1a7['editor'],_0x325639=new window['Promise'](_0x3afe8a=>{_0x5e3fcc['once']('ready',_0x3afe8a);}),_0x32385b={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x40876b=_0x5e3fcc['config']['get']('licenseKey');async function _0x1e73e3(){let _0x20d36a,_0x2b5271=null,_0x35107a=null;try{return'GPL'==_0x40876b?'NotAllowed':(_0x20d36a=_0x29f0b0(),_0x20d36a?(_0x20d36a['usageEndpoint']&&(_0x35107a=_0x4a4572(_0x20d36a['usageEndpoint'],_0x20d36a['jti'])),await _0x4457ad()?_0x1f382f()?_0x321672()?'Expired':_0x37ddb8()?('evaluation'==_0x20d36a['licenseType']&&(_0x2b5271=_0x4c9b94('EvaluationLimit')),await _0x41e65e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x321672(){const _0x3409f6=['evaluation','trial']['includes'](_0x20d36a['licenseType'])?_0x4c282d/0x3e8:0xe10*_0x1efb72;return _0x20d36a['exp']<_0x3409f6;}function _0x1f382f(){const _0x2fa294=_0x20d36a['features'];if(!_0x2fa294)return!0x1;if(_0x2fa294['includes']('*'))return!0x0;if(_0x2fa294['includes']('CMT'))return!0x0;if(_0x2fa294['includes']('TRILIUM')&&_0x2d0985())return!0x0;if(_0x2fa294['includes']('RCMT')){if(_0x1b6ba7())return!0x0;if(_0xf40fc1()||_0x3fef77())return!0x0;}return!0x1;}function _0x37ddb8(){const _0x3ff0b5=_0x20d36a['licensedHosts'];if(!_0x3ff0b5||0x0==_0x3ff0b5['length'])return!0x0;const {hostname:_0x54a62e}=new URL(window['location']['href']);if(_0x3ff0b5['includes'](_0x54a62e))return!0x0;const _0x4d3758=_0x54a62e['split']('.');return _0x3ff0b5['filter'](_0x247081=>_0x247081['includes']('*'))['map'](_0xa47028=>_0xa47028['split']('.'))['filter'](_0x33f617=>_0x33f617['length']<=_0x4d3758['length'])['map'](_0x16f77f=>Array(_0x4d3758['length']-_0x16f77f['length'])['fill']('*'===_0x16f77f[0x0]?'*':'')['concat'](_0x16f77f))['some'](_0x45b9b4=>_0x4d3758['every']((_0x4cd335,_0x14d516)=>_0x45b9b4[_0x14d516]===_0x4cd335||'*'===_0x45b9b4[_0x14d516]));}function _0x41e65e(){return _0x2b5271&&_0x35107a?new window['Promise']((_0x370e6d,_0xa2d898)=>{_0x2b5271['then'](_0x370e6d,_0xa2d898),_0x35107a['then'](_0x1076fb=>{'Valid'!=_0x1076fb&&_0x370e6d(_0x1076fb);},_0xa2d898);}):_0x2b5271||_0x35107a||'Valid';}}function _0x4a4572(_0x596fe3,_0x44fa4a){return new window['Promise'](_0x43c832=>{if(_0x590f60())return _0x43c832('Valid');_0x350d57(),_0x5e3fcc['decorate']('_sendUsageRequest');let _0x3c174f=!0x1;const _0x47b47d=_0x238ccd();function _0x52d800(_0x496f8e){return!!_0x496f8e&&('object'==typeof _0x496f8e||'function'==typeof _0x496f8e)&&'function'==typeof _0x496f8e['then']&&'function'==typeof _0x496f8e['catch'];}function _0x1d474f(_0x5e8e93){_0x3e2ccf(_0x5e8e93)['then'](_0x5d6b67=>_0x5d6b67&&'ok'==_0x5d6b67['status']?_0xb427d1(_0x52248a(_0x47b47d+_0x44fa4a))!=_0x5d6b67['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x333c0e=>(_0x11350c(),_0x333c0e),()=>{const _0x19b00d=_0x972383();return null==_0x19b00d?(_0x11350c(),'Valid'):_0x4c282d-_0x19b00d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x43c832)['catch'](()=>{_0x43c832('UsageLimit');});const _0x24e02a=0x36ee80;function _0x11350c(){const _0x446d11='llct-'+_0xb427d1(_0x52248a(_0x596fe3)),_0x118207=_0x32dd74(_0xb427d1(window['Math']['ceil'](_0x4c282d/_0x24e02a)));window['localStorage']['setItem'](_0x446d11,_0x118207);}function _0x972383(){const _0x9c3e61='llct-'+_0xb427d1(_0x52248a(_0x596fe3)),_0x1cfbe4=window['localStorage']['getItem'](_0x9c3e61);return _0x1cfbe4?window['parseInt'](_0x32dd74(_0x1cfbe4),0x10)*_0x24e02a:null;}function _0x3e2ccf(_0x186052){return new window['Promise']((_0x3c9dea,_0x2396eb)=>{_0x186052['then'](_0x3c9dea,_0x2396eb),window['setTimeout'](_0x2396eb,0x1d4c0);});}}_0x5e3fcc['on']('_sendUsageRequest',(_0x367c4c,_0xd29ebd)=>{if(_0xd29ebd[0x0]!=_0x596fe3)return _0x43c832('UsageLimit');_0xd29ebd[0x1]={..._0xd29ebd[0x1],'requestId':_0x47b47d};},{'priority':'high'}),_0x5e3fcc['on']('_sendUsageRequest',_0x297b90=>{_0x52d800(_0x297b90['return'])&&(_0x3c174f=!0x0,_0x1d474f(_0x297b90['return']));},{'priority':'low'}),_0x325639['then'](()=>{_0x3c174f||_0x43c832('UsageLimit');});});function _0x590f60(){return'auto'==_0x5e3fcc['editing']['view']['_overlayModeHint'];}function _0x350d57(){_0x5e3fcc['editing']['view']['_overlayModeHint']='auto';}}function _0x4c9b94(_0x34b4ee){const _0x27b3cd=[new window['Promise'](_0xe66fbe=>setTimeout(_0xe66fbe,0x93ecc)),_0x325639['then'](()=>new window['Promise'](_0x5dc772=>{let _0x425a9f=0x0;_0x5e3fcc['model']['on']('applyOperation',(_0x48aaf9,_0x1ebf41)=>{_0x1ebf41[0x0]['isDocumentOperation']&&_0x425a9f++,0x5e8==_0x425a9f&&(_0x5dc772(),_0x48aaf9['off']());});}))];return window['Promise']['race'](_0x27b3cd)['then'](()=>_0x34b4ee);}async function _0x5d0c7f(){await _0x325639,_0x5e3fcc['model']['change']=_0xadfb26,_0x5e3fcc['model']['enqueueChange']=_0xadfb26,_0x5e3fcc['enableReadOnlyMode']('model');}function _0x2d0985(){return window['glob']&&window['glob']['triliumVersion'];}function _0x1b6ba7(){return _0x39818f('WebSocketGateway')&&'connected'==_0x84d1bc('WebSocketGateway')['state'];}function _0xf40fc1(){return _0x39818f('RevisionViewerIntegration');}function _0x3fef77(){return _0x39818f('TrackChangesDataGetter');}function _0x501230(_0x39fa72){const _0x349f12=_0x4a9403();_0x5e3fcc[_0x349f12]='commentsLicenseKey'+_0x39fa72,'Valid'!=_0x39fa72&&_0x5d0c7f();}function _0x4a9403(){const _0x5ba4b6=window['String'](window['performance']['now']())['replace']('.','');let _0x518b5c='K';for(let _0x4bb710=0x0;_0x4bb710<_0x5ba4b6['length'];_0x4bb710+=0x2){let _0x14a55d=window['parseInt'](_0x5ba4b6['substring'](_0x4bb710,_0x4bb710+0x2));_0x14a55d>=0x3e&&(_0x14a55d-=0x3e),_0x518b5c+=_0x55a86d[_0x14a55d];}return _0x518b5c;}function _0x29f0b0(){const _0x2ed3c6=_0x40876b['split']('.');if(0x3!=_0x2ed3c6['length'])return null;return _0x1378f8(_0x2ed3c6[0x1]);function _0x1378f8(_0x44ca05){const _0xf5906f=_0x3768e1(_0x44ca05);return _0xf5906f&&_0x1cc813()?_0xf5906f:null;function _0x1cc813(){const _0x4c17f8=_0xf5906f['jti'],_0x2f965c=window['parseInt'](_0x4c17f8['substring'](_0x4c17f8['length']-0x8),0x10),_0x341af0={..._0xf5906f,'jti':_0x4c17f8['substring'](0x0,_0x4c17f8['length']-0x8)};return delete _0x341af0['vc'],_0x52248a(_0x341af0)==_0x2f965c;}}}async function _0x4457ad(){let _0x452bb5=!0x0;try{const [_0x7747c6,_0x15285a,_0x52df0d]=_0x40876b['split']('.');return _0x246304(_0x7747c6),await _0x325f3c(_0x7747c6,_0x15285a,_0x52df0d),_0x452bb5;}catch{return!0x1;}function _0x246304(_0xe1b046){const _0x2bf24e=_0x3768e1(_0xe1b046);_0x2bf24e&&'ES256'==_0x2bf24e['alg']||(_0x452bb5=!0x1);}async function _0x325f3c(_0x122e4a,_0x41efef,_0x1ffc92){const _0x24b7df=window['Uint8Array']['from'](_0x49f244(_0x1ffc92),_0x1259d9=>_0x1259d9['charCodeAt'](0x0)),_0x143199=new window['TextEncoder']()['encode'](_0x122e4a+'.'+_0x41efef),_0x4c83bd=window['crypto']['subtle'];if(!_0x4c83bd)return;const _0x580eb4=await _0x4c83bd['importKey']('jwk',_0x32385b,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4c83bd['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x580eb4,_0x24b7df,_0x143199)||(_0x452bb5=!0x1);}}function _0x3768e1(_0x5db959){return _0x5db959['startsWith']('ey')?JSON['parse'](_0x49f244(_0x5db959)):null;}function _0x49f244(_0x47d56a){return window['atob'](_0x47d56a['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x52248a(_0x545105){let _0x1fd645=0x1505;function _0x1d11ed(_0x34ab6a){for(let _0x4a501c=0x0;_0x4a501c<_0x34ab6a['length'];_0x4a501c++){const _0x5bdfe1=_0x34ab6a['charCodeAt'](_0x4a501c);_0x1fd645=(_0x1fd645<<0x5)+_0x1fd645+_0x5bdfe1,_0x1fd645&=_0x1fd645;}}function _0x444302(_0x7828b2){Array['isArray'](_0x7828b2)?_0x7828b2['forEach'](_0x444302):_0x7828b2&&'object'==typeof _0x7828b2?Object['entries'](_0x7828b2)['sort']()['forEach'](([_0x415c19,_0x282f73])=>{_0x1d11ed(_0x415c19),_0x444302(_0x282f73);}):_0x1d11ed(window['String'](_0x7828b2));}return _0x444302(_0x545105),_0x1fd645>>>0x0;}function _0xb427d1(_0x13095e){return _0x13095e['toString'](0x10)['padStart'](0x8,'0');}function _0x32dd74(_0x264b93){return _0x264b93['split']('')['reverse']()['join']('');}function _0x39818f(_0xd8091){return _0x5e3fcc['plugins']['has'](_0xd8091);}function _0x84d1bc(_0x162414){return _0x5e3fcc['plugins']['get'](_0x162414);}function _0xadfb26(){}_0x501230(await _0x1e73e3());}(this);}['destroy'](){const _0x702988=this['editor']['plugins']['get'](oi),_0xab9b1c=this['editor']['config']['get']('collaboration.channelId');for(const _0x4e615e of _0x702988['getCommentThreads']({'channelId':_0xab9b1c}))_0x702988['_detachCommentThread'](_0x4e615e['id']),_0x702988['_threads']['delete'](_0x4e615e['id']);super['destroy']();}['hasMarkerForId'](_0x5cb301){return this['getAllMarkersForId'](_0x5cb301)['length']>0x0;}['getAllMarkersForId'](_0x40b7bb){const _0x3234a5=[];for(const _0x1e85b4 of this['editor']['model']['markers'])_0x1e85b4['name']['startsWith']('comment:'+_0x40b7bb)&&_0x3234a5['push'](_0x1e85b4);return _0x3234a5;}['scrollToThreadMarker'](_0x5e834e){setTimeout(()=>{const _0x52b6cd=this['_getTargetForId'](_0x5e834e);_0x52b6cd&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x5e834e&&_0x5199({'target':_0x52b6cd[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xb3e5d5){this['editor']['model']['change'](()=>{for(const _0x49de76 of this['getAllMarkersForId'](_0xb3e5d5))this['editor']['editing']['reconvertMarker'](_0x49de76);});}['_attachArchivedThread'](_0x40dc88){const _0x30dded=this['editor']['plugins']['get'](oi),_0x4cde7e=this['editor']['plugins']['get'](di),_0x4e49a3=_0x30dded['getCommentThread'](_0x40dc88);if(!_0x4e49a3['isAttached']){const _0x5651ca=_0x4e49a3['attachTo'](()=>this['_getTargetForId'](_0x4e49a3['id']));_0x4cde7e['registerAnnotation'](_0x5651ca),_0x4e49a3['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xc49471=this['editor'],_0x14d19c=_0xc49471['plugins']['get'](_0x52cabf);_0xc49471['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d098b,_0xdbfbc4)=>{const {id:_0xbc5953}=fi(_0x5d098b['markerName']),_0x3ad435=_0xc49471['plugins']['get'](oi)['getCommentThread'](_0xbc5953),_0x4feee2=this['activeMarker']&&fi(this['activeMarker'])['id']===_0xbc5953;let _0x38de86;if(_0x3ad435&&_0x3ad435['isResolved']&&!_0x4feee2&&_0x5d098b['item'])return _0xdbfbc4['consumable']['consume'](_0x5d098b['item'],'addMarker:'+_0x5d098b['markerName']),_0xdbfbc4['consumable']['consume'](_0x5d098b['item'],'removeMarker:'+_0x5d098b['markerName']),null;const _0x298ee7=['ck-comment-marker'];return _0x4feee2&&_0x298ee7['push']('ck-comment-marker--active'),_0x38de86=_0x3ad435?.['length']?_0x3ad435['comments']['first']['author']['id']:_0x14d19c['me']['id'],{'classes':_0x298ee7,'attributes':{'data-comment':_0xbc5953,'data-author-id':_0x38de86}};}}),_0xc49471['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5606a1,{options:_0x379a40})=>{if(_0x379a40['showCommentHighlights'])return null;const _0x27aa27=_0xc49471['plugins']['get'](oi),_0x79c324=_0xc49471['model']['markers']['get'](_0x5606a1),{id:_0x46024e,part:_0x139264}=fi(_0x5606a1);return _0x79c324&&!_0x79c324['affectsData']||_0x379a40['ignoreResolvedComments']&&_0x27aa27['getCommentThread'](_0x46024e)?.['isResolved']?null:{'group':'comment','name':_0x139264?_0x46024e+':'+_0x139264:_0x46024e};}}),_0xc49471['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xbf9fe2,{writer:_0x2c7818})=>_0x2c7818['createElement']('$marker',{'data-name':'comment:'+_0xbf9fe2['getAttribute']('id')})}),_0xc49471['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3c8d47=this['editor'],_0x331bce=_0x3c8d47['plugins']['get'](oi),_0x4d236e=new Set(),_0x2e1a26=new Set();_0x3c8d47['model']['document']['registerPostFixer'](_0x277a9d=>{let _0x226120=!0x1;for(const {name:_0x612ebe,data:_0x4edb5c}of _0x3c8d47['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2cc378,id:_0x2edd62}=fi(_0x612ebe);let _0x3824f0=_0x4edb5c['newRange'];if('comment'!==_0x2cc378||!_0x3824f0)continue;const _0x57fbc9='$graveyard'===_0x3824f0['root']['rootName'];_0x57fbc9||(_0x3824f0=_i(_0x3824f0,_0x3c8d47['model']),!_0x3824f0||_0x3824f0['isCollapsed']||!_0x4edb5c['newRange']||_0x3824f0['isEqual'](_0x4edb5c['newRange']))?_0x3c8d47['model']['hasContent'](_0x3824f0)&&!_0x57fbc9?this['isThreadsLoadingPaused']?_0x4d236e['add'](_0x612ebe):this['_handleThreadMarker'](_0x612ebe,_0x2edd62):(_0x2e1a26['add'](_0x612ebe),_0x4d236e['delete'](_0x612ebe),_0x277a9d['removeMarker'](_0x612ebe),_0x226120=!0x0):(_0x277a9d['updateMarker'](_0x612ebe,{'range':_0x3824f0}),_0x226120=!0x0);}return _0x226120;}),this['on']('change:isThreadsLoadingPaused',(_0x1d48b2,_0x23ec90,_0x39cdf3)=>{if(!_0x39cdf3&&_0x4d236e['size'])for(const _0x6e20aa of _0x4d236e){const {id:_0x17951a}=fi(_0x6e20aa);_0x4d236e['delete'](_0x6e20aa),_0x3c8d47['model']['markers']['get'](_0x6e20aa)&&this['_handleThreadMarker'](_0x6e20aa,_0x17951a);}}),this['listenTo'](_0x3c8d47['model']['document'],'change',()=>{for(const {name:_0x2d8c4f,data:{newRange:_0x5edeca}}of _0x3c8d47['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5d015b,id:_0x20bf96}=fi(_0x2d8c4f);if('comment'!==_0x5d015b)continue;const _0x55fe8a=_0x331bce['getCommentThread'](_0x20bf96),_0x15391c=this['hasMarkerForId'](_0x20bf96);_0x55fe8a&&(!_0x55fe8a['_hasTargetInContent']&&_0x5edeca&&_0x3c8d47['editing']['view']['once']('render',()=>{const _0x3f0b27=_0x3c8d47['plugins']['get'](ti),_0x5d6916=_0x331bce['_threadToController']['get'](_0x55fe8a)['view'];_0x3f0b27['getByInnerView'](_0x5d6916)['refreshVisibility']();},{'priority':'low'}),_0x55fe8a['_hasTargetInContent']=_0x15391c||!!_0x5edeca),_0x5edeca||(_0x2e1a26['add'](_0x2d8c4f),_0x4d236e['delete'](_0x2d8c4f));}for(const _0x192496 of _0x2e1a26){const {id:_0x138a67}=fi(_0x192496),_0x4b0a4b=_0x331bce['getCommentThread'](_0x138a67);if(_0x4d236e['delete'](_0x192496),!_0x4b0a4b)continue;const _0x129e6d=this['hasMarkerForId'](_0x138a67);_0x129e6d||_0x4b0a4b['isSubmitted']?_0x129e6d||_0x4b0a4b['unlinkedAt']||_0x4b0a4b['setUnlinkedAt'](new Date()):_0x4b0a4b['remove']();}_0x2e1a26['clear']();});}['_handleInitialThreads'](_0x5318c7){_0x5318c7['forEach'](_0x49e058=>{_0x49e058['unlinkedAt']&&this['_attachArchivedThread'](_0x49e058['id']);});}['_getTargetForId'](_0x1d6f53){const _0x41a302=this['editor'],_0x5b2f17=this['getAllMarkersForId'](_0x1d6f53);return _0x30db39(_0x41a302['editing'],_0x5b2f17);}['_getTextContext'](_0x589321){const _0x1c26eb=this['getAllMarkersForId'](_0x589321);let _0x360978='',_0x4d5341=!0x1;for(const _0x2095b2 of _0x1c26eb){const _0x577a33=_0x2095b2['getRange']();for(const _0x2f3ccc of Array['from'](_0x577a33['getItems']()))_0x2f3ccc['is']('$textProxy')?(_0x360978&&_0x4d5341&&(_0x360978+='\x20',_0x4d5341=!0x1),_0x360978+=_0x2f3ccc['data']):_0x4d5341=!0x0;_0x4d5341=!0x0;}return _0x360978['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5c2082,_0x2c67ed){const _0x29524f=this['editor'],_0x57fcc7=_0x29524f['plugins']['get'](oi);let _0x7d3c6f=_0x57fcc7['getCommentThread'](_0x2c67ed);const _0x159e25=_0x29524f['config']['get']('collaboration.channelId'),_0x467f21=_0x29524f['plugins']['get'](di);return _0x7d3c6f&&(_0x7d3c6f['unlinkedAt']&&_0x7d3c6f['setUnlinkedAt'](null),_0x7d3c6f['isAttached'])||(this['getAllMarkersForId'](_0x2c67ed)[0x0]['managedUsingOperations']?_0x57fcc7['fetchCommentThread']({'channelId':_0x159e25,'threadId':_0x2c67ed})['then'](_0x35e159=>{if('destroyed'!==_0x29524f['state']){if(_0x7d3c6f=_0x35e159,_0x7d3c6f&&!_0x7d3c6f['isAttached']){const _0x2e067f=_0x7d3c6f['attachTo'](()=>this['_getTargetForId'](_0x2c67ed));_0x467f21['registerAnnotation'](_0x2e067f),_0x7d3c6f['isResolved']&&this['_reconvertMarkers'](_0x2c67ed);}else{if(!_0x7d3c6f){const _0x449b34=this['getAllMarkersForId'](_0x2c67ed);_0x29524f['model']['change'](_0x4aea54=>{for(const _0x1bda26 of _0x449b34)_0x4aea54['removeMarker'](_0x1bda26);});}}}}):_0x29524f['editing']['view']['once']('render',()=>{if(_0x57fcc7['getCommentThread'](_0x2c67ed))return;const _0x1c32f4=_0x29524f['plugins']['get'](ti);_0x7d3c6f=_0x57fcc7['openNewCommentThread']({'channelId':_0x159e25,'threadId':_0x2c67ed,'target':()=>this['_getTargetForId'](_0x2c67ed),'context':{'type':'text','value':this['_getTextContext'](_0x2c67ed)}});const _0x1a871e=_0x57fcc7['_threadToController']['get'](_0x7d3c6f)['view'],_0x317883=_0x1c32f4['getByInnerView'](_0x1a871e);_0x317883&&_0x467f21['registerAnnotation'](_0x317883);},{'priority':'low'})),_0x7d3c6f;}['_handleThreadMarker'](_0x1218f9,_0x10d130){const _0x94a591=this['_attachMarkerToThread'](_0x1218f9,_0x10d130);_0x94a591&&!_0x94a591['context']&&_0x94a591['setContext']({'type':'text','value':this['_getTextContext'](_0x10d130)});}['_initAriaMarkerChangeAnnouncements'](){const _0xe00e53=this['editor'];_0x56b924(_0xe00e53['model'],({left:_0x53c0c6,entered:_0x4b45fb})=>{for(const _0x256609 of _0x53c0c6)if(Ai(_0x256609)){_0xe00e53['ui']['ariaLiveAnnouncer']['announce'](Et(_0xe00e53['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4ed70d of _0x4b45fb)if(Ai(_0x4ed70d)){_0xe00e53['ui']['ariaLiveAnnouncer']['announce'](Et(_0xe00e53['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x3d03a9(_0x4a902b)));break;}});}};function gi(_0x211953,_0x344f26){return _0x344f26?_0x211953+':'+_0x344f26:_0x211953;}function _i(_0x20b97a,_0x141fba){const _0x5d72a2=_0x141fba['schema'],_0x32c9ef=_0x141fba['createRange'](_0x20b97a['start']);for(const _0x9ef311 of _0x20b97a['getWalker']()){const {type:_0x1d798b,item:_0x232be4,nextPosition:_0x167db5}=_0x9ef311;if('text'===_0x1d798b||_0x5d72a2['isObject'](_0x232be4)){const _0x3d1c68=_0x141fba['createPositionBefore'](_0x232be4);_0x32c9ef['isCollapsed']&&(_0x32c9ef['start']=_0x3d1c68),_0x32c9ef['end']=_0x167db5;}}return _0x32c9ef;}function Ai(_0x2239b9){return'comment'===fi(_0x2239b9['name'])['group'];}var vi=class extends _0x1228a1{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0xf466f0=this['editor'],_0x195736=_0xf466f0['plugins']['get'](oi),_0x90025c=_0xf466f0['plugins']['get'](wi),_0x381d8b=_0xf466f0['plugins']['get'](ti),_0x58013b=_0xf466f0['plugins']['get'](di);_0xf466f0['ui']['componentFactory']['add']('comment',()=>{const _0x387d65=this['_createUIButton'](_0x3a0b06);return _0x387d65['tooltip']=!0x0,_0x387d65;}),_0xf466f0['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x58013b['addSourceCollector'](()=>{const _0x8bd220=[];for(const [_0x1af581,_0x1faec1]of _0x195736['_threadToController']){const _0x20ff1a=_0x90025c['getAllMarkersForId'](_0x1af581['id']),_0x4de617=_0x20ff1a['map'](_0x136a60=>_0x136a60['getRange']());_0x20ff1a['length']>0x0&&_0x8bd220['push']([_0x1faec1['view'],_0x4de617]);}return _0x8bd220;}),this['listenTo'](_0x381d8b,'change:activeAnnotations',(_0x491be8,_0x5c38c1,_0x478907)=>{const _0x546142=Array['from'](_0x478907)['map'](_0x1e0ca5=>_0x1e0ca5['innerView'])['find'](_0x4965ee=>_0x195736['_viewToController']['has'](_0x4965ee));if(!_0x546142)return void(_0x90025c['activeMarker']=null);const _0x415f3c=_0x195736['_viewToController']['get'](_0x546142)['model']['id'],_0x1d5b69='comment:'+_0x415f3c;_0x415f3c&&_0x90025c['hasMarkerForId'](_0x415f3c)?_0x90025c['activeMarker']=_0x1d5b69:_0x90025c['activeMarker']&&(_0x90025c['activeMarker']=null);}),this['listenTo'](_0x195736,'removeCommentThread',(_0x13c7a8,{threadId:_0x2ffa28,isFromAdapter:_0x536e1f})=>{!_0x536e1f&&_0xf466f0['ui']['focusTracker']['isFocused']&&_0x90025c['hasMarkerForId'](_0x2ffa28)&&_0xf466f0['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x195736,'addComment',(_0x38c18,{threadId:_0x5c10b3,isFromAdapter:_0x3cca3c})=>{!_0x3cca3c&&_0x90025c['hasMarkerForId'](_0x5c10b3)&&_0x195736['hasCommentThread'](_0x5c10b3)&&0x1===_0x195736['getCommentThread'](_0x5c10b3)['length']&&(_0xf466f0['editing']['view']['focus'](),_0x38c18['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x40a1fa=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2581b0;for(const _0x25068f in _0x40a1fa){const _0x4f66f3=_0x25068f,_0x3c960c=_0x40a1fa[_0x4f66f3];if('commentsLicenseKeyValid'==_0x3c960c||'commentsLicenseKeyInvalid'==_0x3c960c||'commentsLicenseKeyExpired'==_0x3c960c||'commentsLicenseKeyDomainLimit'==_0x3c960c||'commentsLicenseKeyNotAllowed'==_0x3c960c||'commentsLicenseKeyEvaluationLimit'==_0x3c960c||'commentsLicenseKeyUsageLimit'==_0x3c960c){delete _0x40a1fa[_0x4f66f3],_0x2581b0=_0x3c960c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2581b0&&_0x40a1fa['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2581b0&&_0x40a1fa['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2581b0&&_0x40a1fa['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2581b0&&_0x40a1fa['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2581b0&&_0x40a1fa['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x2581b0&&_0x40a1fa['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xb041c8){const _0x17ef36=this['editor'],_0x1730f1=new _0xb041c8(_0x17ef36['locale']),_0x24e795=_0x17ef36['commands']['get']('addCommentThread');return _0x1730f1['set']({'label':Et(_0x17ef36['locale'],'Comment'),'icon':_0x232043}),_0x1730f1['bind']('isEnabled')['to'](_0x24e795,'isEnabled',_0x24e795,'hasContent',(_0x278c16,_0x125eb3)=>_0x278c16&&_0x125eb3),this['listenTo'](_0x1730f1,'execute',()=>{_0x24e795['execute']();}),_0x1730f1;}},yi=class extends _0x1228a1{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x589e97){super(_0x589e97),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x433477,_0x26e391,_0x1b707b)=>{_0x1b707b?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5c3625,_0x28d066]of this['editor']['commands'])_0x28d066['affectsData']&&'addCommentThread'!==_0x5c3625&&_0x28d066['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 _0xc09eff=this['editor']['editing']['view']['document'];this['listenTo'](_0xc09eff,'cut',_0x3d3679=>_0x3d3679['stop'](),{'priority':'highest'}),this['listenTo'](_0xc09eff,'clipboardInput',_0xf39262=>_0xf39262['stop'](),{'priority':'highest'}),this['listenTo'](_0xc09eff,'delete',_0x3011ac=>_0x3011ac['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x30bb1c,_0x42ed5a]of this['editor']['commands'])_0x42ed5a['affectsData']&&'addCommentThread'!==_0x30bb1c&&_0x42ed5a['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}},Ti=class extends _0x388472{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x13d3c1){super(_0x13d3c1),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x46ebc9=this['context']['plugins']['get'](ti);this['listenTo'](_0x46ebc9,'_activateAnnotation',(_0x1690c3,_0x597146)=>{for(const _0xf4cee7 of this['activeUIs']){const _0xd5f114=this['_uis']['get'](_0xf4cee7);(0x0,this['uisData']['get'](_0xf4cee7)['filter'])(_0x597146)&&_0xd5f114['setActiveAnnotation'](_0x597146);}}),this['listenTo'](_0x46ebc9,'_deactivateAllAnnotations',()=>{for(const _0x4174f2 of this['activeUIs'])this['_uis']['get'](_0x4174f2)['setActiveAnnotation'](null);}),this['listenTo'](_0x46ebc9['_visibleAnnotations'],'add',(_0x592c3b,_0x522b77)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x522b77);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4c5e30){return this['activeUIs']['has'](_0x4c5e30);}['activate'](_0x56e180,_0x5801c3=this['defaultFilter']){const _0xed658a=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x56e180))throw new _0x3cac4c('annotationsuis-missing-ui',this,{'uiName':_0x56e180});this['isActive'](_0x56e180)&&this['deactivate'](_0x56e180),this['activeUIs']['add'](_0x56e180);const _0xb23b20=new Jt();Qt({'source':_0xed658a['_visibleAnnotations'],'target':_0xb23b20,'filter':_0x5801c3}),this['uisData']['set'](_0x56e180,{'collection':_0xb23b20,'filter':_0x5801c3});const _0x217b25=this['_uis']['get'](_0x56e180);_0x217b25['attach'](_0xb23b20),this['listenTo'](_0x217b25,'change:activeAnnotation',(_0x5d3161,_0x414736,_0x3f35f8,_0x5d3026)=>{_0x5d3026&&_0xed658a['_removeActiveAnnotation'](_0x5d3026),_0x3f35f8&&_0xed658a['_addActiveAnnotation'](_0x3f35f8);});}['deactivate'](_0x219b74){if(this['activeUIs']['delete'](_0x219b74),!this['_uis']['has'](_0x219b74))throw new _0x3cac4c('annotationsuis-missing-ui',this,{'uiName':_0x219b74});const _0x32d16f=this['_uis']['get'](_0x219b74);_0x32d16f['detach'](),this['stopListening'](_0x32d16f),this['uisData']['get'](_0x219b74)['collection']['destroy'](),this['uisData']['delete'](_0x219b74);}['switchTo'](_0x528a81){if(!this['_uis']['has'](_0x528a81))throw new _0x3cac4c('annotationsuis-missing-ui',this,{'uiName':_0x528a81});const _0x580542=this['context']['plugins']['get'](ti),_0x25785b=Array['from'](_0x580542['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x528a81);const _0x19961e=this['_uis']['get'](_0x528a81);_0x19961e['setActiveAnnotation'](_0x25785b),_0x19961e['_setSelectedAnnotations']&&_0x25785b&&_0x19961e['_setSelectedAnnotations']([_0x25785b]);}['deactivateAll'](){for(const _0x44a49e of this['activeUIs'])this['deactivate'](_0x44a49e);}['register'](_0x40f184,_0x5c4d37){if(this['_uis']['has'](_0x40f184))throw new _0x3cac4c('annotationsuis-register-already-registered');if('function'!=typeof _0x5c4d37['attach']||'function'!=typeof _0x5c4d37['detach']||'function'!=typeof _0x5c4d37['setActiveAnnotation'])throw new _0x3cac4c('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x40f184,_0x5c4d37);}['refilterAnnotations'](){const _0x2c8eec=this['context']['plugins']['get'](ti)['collection'],_0x332850=new Map(),_0x8efb56=Array['from'](this['activeUIs']);for(const _0x20e146 of this['activeUIs']){const _0x116fc3=this['uisData']['get'](_0x20e146)['collection'];for(const _0x12046a of _0x116fc3)_0x332850['set'](_0x12046a,_0x20e146);}for(const _0x408f73 of _0x2c8eec){const _0x3bf293=_0x332850['get'](_0x408f73);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x408f73);const _0x347f5d=_0x8efb56['find'](_0x1474b2=>this['uisData']['get'](_0x1474b2)['filter'](_0x408f73));_0x3bf293!==_0x347f5d&&(_0x3bf293&&this['uisData']['get'](_0x3bf293)['collection']['remove'](_0x408f73),_0x347f5d&&this['uisData']['get'](_0x347f5d)['collection']['add'](_0x408f73));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x457f6b){const _0x54865c=[];for(const _0x8b3625 of this['activeUIs']){(0x0,this['uisData']['get'](_0x8b3625)['filter'])(_0x457f6b)&&_0x54865c['push'](_0x8b3625);}if(_0x54865c['length']>0x1)throw new _0x3cac4c('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x54865c,'annotationType':_0x457f6b['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0xe08cc4('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x38b32f){super(_0x38b32f);const _0x12bbab=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 _0x57589a(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x12bbab['to']('class')],'style':{'minHeight':_0x12bbab['to']('minHeight',_0x16f581=>'number'==typeof _0x16f581?Ci(_0x16f581+0xa):null)},'dir':_0x38b32f['uiLanguageDirection'],'role':'application','aria-label':Et(_0x38b32f,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x38b32f,'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',_0x3c8a22=>{this['_updateItemPositionInFocusables'](_0x3c8a22['source']);}),this['list']['forEach'](_0x4ddfa0=>{this['focusTracker']['add'](_0x4ddfa0['element']),this['_updateItemPositionInFocusables'](_0x4ddfa0);}),this['list']['on']('change',(_0x355bb7,_0x2fde81)=>{for(const _0x460b53 of _0x2fde81['removed'])this['focusTracker']['remove'](_0x460b53['element']),this['focusables']['remove'](_0x460b53);for(const _0x442533 of _0x2fde81['added'])this['focusTracker']['add'](_0x442533['element']),this['_updateItemPositionInFocusables'](_0x442533);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1f4789){const _0x39e8fd=this['focusables']['getIndex'](_0x1f4789);let _0x482fbd,_0x46524a;for(const _0x95cc29 of this['focusables'])if(_0x1f4789['top']<_0x95cc29['top']){_0x482fbd=_0x95cc29;break;}if(_0x46524a=_0x482fbd?this['focusables']['getIndex'](_0x482fbd):this['focusables']['length'],-0x1!==_0x39e8fd){if(_0x39e8fd===_0x46524a-0x1)return;this['focusables']['remove'](_0x1f4789),_0x46524a=_0x482fbd?this['focusables']['getIndex'](_0x482fbd):this['focusables']['length'];}this['focusables']['add'](_0x1f4789,_0x46524a);}};const bi=/* #__PURE__ -- @preserve */
33
- _0xe08cc4('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0xa26bd9){super(_0xa26bd9),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x11c1d8,_0x249196)=>_0x11c1d8+_0x249196),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x11bb9d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x11bb9d['to']('isAnimationDisabled',_0x4344ef=>_0x4344ef?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x11bb9d['to']('top',_0x4e5919=>bi(_0x4e5919))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x46ad9f=this['element']['clientHeight'];_0x46ad9f&&(this['height']=_0x46ad9f);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x388472{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x21a05b){super(_0x21a05b),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 _0x41e79f=this['context']['config']['get']('sidebar.container');_0x41e79f&&this['setContainer'](_0x41e79f);}['setContainer'](_0xe73390){if(!Oi(_0xe73390))throw new _0x3cac4c('sidebar-setcontainer-invalid-element');this['container']=_0xe73390;}['_attachToContainer']({viewClass:_0x533818='',spaceBetweenItems:_0x2cfebe=0x19}={}){if(!Oi(this['container']))throw new _0x3cac4c('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x533818,this['_spaceBetweenItems']=_0x2cfebe;}['rearrange']({removedAnnotation:_0xe5864e,previousAnnotation:_0x4a7088,nextAnnotation:_0x244023}){const _0x47e5e3=this['getSidebarItemView'](_0xe5864e);this['view']['list']['remove'](_0x47e5e3),this['_destroySidebarItemView'](_0xe5864e),_0x4a7088&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4a7088)),_0x244023&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x244023)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x28f5b4,activatedAnnotation:_0x50cf35,disableAnimationOnActivatedAnnotation:_0x83c11e}){if(this['_activeAnnotation']=_0x50cf35,_0x28f5b4){_0x28f5b4['isActive']=!0x1;const _0x46552a=this['getSidebarItemView'](_0x28f5b4);_0x46552a&&_0x83c11e&&(_0x46552a['isAnimationDisabled']=!0x1);}if(_0x50cf35){const _0x4af8e5=this['getSidebarItemView'](_0x50cf35);_0x4af8e5&&(_0x50cf35['isActive']=!0x0,_0x83c11e&&(_0x4af8e5['isAnimationDisabled']=!0x0,_0x4af8e5['top']+=0x1),this['_alignToTargetRect'](_0x4af8e5));}}['_detachFromContainer'](_0x500f95){if(this['view']['element']['remove'](),_0x500f95){for(const _0x278cf6 of _0x500f95)this['_destroySidebarItemView'](_0x278cf6);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x175740,_0x3f6744){_0x3f6744||(_0x3f6744=_0x175740['view']);const _0xa9bf92=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xa9bf92,_0x175740),this['_annotationToSidebarItemView']['set'](_0x175740,_0xa9bf92),_0xa9bf92['content']['add'](_0x3f6744),this['listenTo'](_0x175740['view'],'change:targetRect',(_0x44d50c,_0x5bdf18,_0x5ab078)=>{const _0x125729=this['_getTargetTop'](_0x175740,_0x5ab078);_0xa9bf92['_targetTop']!=_0x125729&&(_0xa9bf92['_targetTop']=_0x125729,this['_setItemTop'](_0xa9bf92,_0x125729));}),this['listenTo'](_0xa9bf92,'change:top',()=>{this['_recalculate'](_0xa9bf92,'top');}),this['listenTo'](_0xa9bf92,'change:bottom',()=>{this['_recalculate'](_0xa9bf92,'bottom');}),this['_alignToTargetRect'](_0xa9bf92);const _0x71ae40=this['_getItemBefore'](_0xa9bf92);return _0x71ae40&&this['_alignAfterItem'](_0x71ae40,_0xa9bf92)||this['_alignToTargetRect'](_0xa9bf92),this['_updateLastItem'](),this['view']['list']['add'](_0xa9bf92),_0xa9bf92;}['_alignForTopChange'](_0x29a434){if(!_0x29a434['content']['length'])return;const _0x13ee9e=this['_getItemBefore'](_0x29a434);if(!_0x13ee9e)return;const _0x1edd8c=this['_sidebarItemViewToAnnotation']['get'](_0x13ee9e),_0x4088ff=this['_activeAnnotation'];_0x4088ff&&_0x4088ff===_0x1edd8c?this['_alignAfterItem'](_0x13ee9e,_0x29a434):this['_alignBeforeItem'](_0x29a434,_0x13ee9e);}['_alignForBottomChange'](_0x405b42){if(!_0x405b42['content']['length'])return;const _0x48ec0d=this['_getItemAfter'](_0x405b42);if(!_0x48ec0d)return;const _0x1e1e1c=this['_sidebarItemViewToAnnotation']['get'](_0x48ec0d),_0x31eb36=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x32866c=this['_activeAnnotation'];_0x32866c&&_0x32866c===_0x1e1e1c&&_0x31eb36?(this['_alignBeforeItem'](_0x48ec0d,_0x405b42),this['_alignAfterItem'](_0x405b42,_0x48ec0d)):_0x32866c&&_0x32866c===_0x1e1e1c?this['_alignBeforeItem'](_0x48ec0d,_0x405b42):this['_alignAfterItem'](_0x405b42,_0x48ec0d);}['_recalculate'](_0x27796a,_0x5d4a96){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x224673,changedProp:_0xce111f}of this['_recalculateBuffer'])'top'===_0xce111f?this['_alignForTopChange'](_0x224673):this['_alignForBottomChange'](_0x224673);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x27796a,'changedProp':_0x5d4a96});}['getSidebarItemView'](_0xb987e9){return this['_annotationToSidebarItemView']['get'](_0xb987e9);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1101e1){const _0xcbb904=this['getSidebarItemView'](_0x1101e1);this['stopListening'](_0xcbb904),this['stopListening'](_0x1101e1['view']),_0xcbb904['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1101e1),this['_sidebarItemViewToAnnotation']['delete'](_0xcbb904);}['_createSidebarView'](){const _0x4095dd=new Ii(this['context']['locale']);return _0x4095dd['render'](),this['on']('change:_lastItem',(_0x8b2283,_0x1d95fb,_0x1df10e,_0x9c113b)=>{_0x9c113b&&_0x4095dd['unbind']('minHeight'),_0x1df10e?_0x4095dd['bind']('minHeight')['to'](_0x1df10e,'bottom'):_0x4095dd['minHeight']=null;}),_0x4095dd;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4a5814){const _0x3924d7=this['_sidebarItemViewToAnnotation']['get'](_0x4a5814),_0x19ef7d=_0x3924d7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3924d7)-0x1);return _0x19ef7d&&this['getSidebarItemView'](_0x19ef7d)||null;}['_getItemAfter'](_0x3b9ff0){const _0x3ef7ae=this['_sidebarItemViewToAnnotation']['get'](_0x3b9ff0),_0x30c36e=_0x3ef7ae&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3ef7ae)+0x1);return _0x30c36e&&this['getSidebarItemView'](_0x30c36e)||null;}['_alignBeforeItem'](_0x2f5563,_0x4f584c){_0x2f5563['updateHeight']();const _0x344cb6=Ni(_0x4f584c['bottom']+this['_spaceBetweenItems'],_0x2f5563['top']);return!!_0x344cb6&&(this['_setItemTop'](_0x4f584c,_0x4f584c['top']-_0x344cb6),!0x0);}['_alignAfterItem'](_0x5cf344,_0xb0d950){_0x5cf344['updateHeight']();const _0x20ac10=Ni(_0x5cf344['bottom']+this['_spaceBetweenItems'],_0xb0d950['top']);return!!_0x20ac10&&(this['_setItemTop'](_0xb0d950,_0xb0d950['top']+_0x20ac10,!0x1),!0x0);}['_alignToTargetRect'](_0x1bc1fb){const _0x4a4968=this['_sidebarItemViewToAnnotation']['get'](_0x1bc1fb);if(!_0x4a4968||!_0x4a4968['target']||!_0x4a4968['targetRect'])return;const _0x57d605=this['_getTargetTop'](_0x4a4968,_0x4a4968['targetRect']);this['_setItemTop'](_0x1bc1fb,_0x57d605);}['_getTargetTop'](_0x4a3b83,_0x334539){if(null===_0x334539)return 0x0;if(_0x4a3b83['target']instanceof _0x50fe83)return _0x334539['top'];{const _0x4e0922=new _0x50fe83(this['view']['element'])['top'];return _0x334539['top']-_0x4e0922;}}['_setItemTop'](_0x233c66,_0x3b6274,_0x58272b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x58272b&&(_0x3b6274=Math['max'](_0x3b6274,this['_getMaxAvailableTop'](_0x233c66))),_0x233c66['top']=_0x3b6274;}['_getMaxAvailableTop'](_0x1a8ef3){let _0x196616=this['_getItemBefore'](_0x1a8ef3),_0x6d67bf=0x0;for(;_0x196616;)_0x196616['updateHeight'](),_0x6d67bf+=this['_spaceBetweenItems']+_0x196616['height'],_0x196616=this['_getItemBefore'](_0x196616);return _0x6d67bf;}};function Ni(_0x4c2d23,_0x21799f){return Math['max'](_0x4c2d23-_0x21799f,0x0);}function Oi(_0x400d02){return null!==_0x400d02&&'object'==typeof _0x400d02&&0x1===_0x400d02['nodeType'];}var Mi=class extends _0x388472{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a76df){super(_0x3a76df),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5c875e(),this['_refreshPositioningDebounced']=_0x55ca5d(()=>{_0x3a76df['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1a5862=this['context']['plugins']['get'](Ti),_0x253e1d=this['context']['plugins']['get'](ki);_0x1a5862['register']('wideSidebar',this),_0x253e1d['container']&&_0x1a5862['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x41eda3){if(_0x41eda3===this['activeAnnotation'])return;const _0x3c36ba=this['context']['plugins']['get'](ki);_0x3c36ba['_activeAnnotation']=_0x41eda3;const _0x1a332c=this['activeAnnotation'];_0x3c36ba['refresh']({'blurredAnnotation':_0x1a332c,'activatedAnnotation':_0x41eda3}),this['activeAnnotation']=_0x41eda3;}['attach'](_0x4bab55){this['annotations']=_0x4bab55;const _0x2d5606=this['context']['plugins']['get'](ki);if(_0x2d5606['_annotations']=_0x4bab55,this['isAttached'])throw new _0x3cac4c('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2d5606,'set:container',()=>{this['detach'](),this['listenTo'](_0x2d5606,'change:container',_0x63fa26=>{_0x63fa26['off'](),this['attach'](_0x4bab55);});}),_0x2d5606['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x554ae5=_0x32654f=>{_0x32654f['updateTargetRect'](),_0x2d5606['addAnnotation'](_0x32654f);};for(const _0x306fc3 of _0x4bab55)_0x554ae5(_0x306fc3);this['listenTo'](_0x4bab55,'add',(_0x1b7d4c,_0x1ae6ec)=>{_0x554ae5(_0x1ae6ec);}),this['listenTo'](_0x4bab55,'remove',(_0x395a23,_0x582542,_0x2877ea)=>{_0x2d5606['rearrange']({'removedAnnotation':_0x582542,'previousAnnotation':_0x4bab55['get'](_0x2877ea-0x1),'nextAnnotation':_0x4bab55['get'](_0x2877ea+0x1)}),_0x582542===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4bab55,'focus',(_0x2fb504,_0x6c4e38)=>{this['setActiveAnnotation'](_0x6c4e38);}),this['listenTo'](_0x4bab55,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4219e1=this['context']instanceof _0x429018?this['context']['editors']:new _0x5c875e([this['context']]);for(const _0x4687a6 of _0x4219e1)this['_integrateWithEditorAnnotations'](_0x4687a6);this['listenTo'](_0x4219e1,'add',(_0x2c0922,_0x444b6b)=>{this['listenTo'](_0x444b6b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x444b6b);});}),this['listenTo'](_0x4219e1,'remove',(_0x5e60ba,_0x29e44a)=>{_0x29e44a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x29e44a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3cac4c('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5215f9=this['context']['plugins']['get'](ki);_0x5215f9['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5215f9),this['stopListening'](this['annotations']),this['context']instanceof _0x429018&&this['stopListening'](this['context']['editors']);for(const _0x44ba0e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x44ba0e);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2945ce){if(!_0x2945ce['plugins']['has']('EditorAnnotations'))return;const _0xd776b0=_0x2945ce['plugins']['get']('EditorAnnotations'),_0x53c3a8=()=>{const _0x2fe1e9=_0xd776b0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2fe1e9[0x0]||null);};this['listenTo'](_0xd776b0,'refresh',_0x53c3a8),this['listenTo'](_0xd776b0,'blur',(_0xd469bd,{isAnnotationTracked:_0xe8e23d})=>{this['activeAnnotation']&&_0xe8e23d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xd776b0,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3e2d5f=>{_0xd776b0['hasDomSelection']()&&(_0x53c3a8(),_0x3e2d5f['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xd776b0);}['_destroyEditorAnnotationsIntegration'](_0x4321a9){this['stopListening'](_0x4321a9),this['_editorAnnotations']['remove'](_0x4321a9);}},Ri=class extends _0x3a0b06{['counterView'];constructor(_0x3f4705){super(_0x3f4705);const _0x384ab0=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x534caf,_0x528f4b)=>_0x534caf?'...':_0x528f4b['toString']()),this['set']('annotationType',''),this['icon']=_0x232043,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x384ab0['to']('annotationType',_0x27a27f=>'ck-annotation-counter__badge--'+_0x27a27f),_0x384ab0['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x384ab0['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x388472{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1eed10){super(_0x1eed10),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xff39d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5c875e(),this['_refreshPositioningDebounced']=_0x55ca5d(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x31232d(this['context']['locale']),this['balloonPanelView']=new _0x230065(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5d8cf8){this['annotations']=_0x5d8cf8;const _0x518aa8=this['context']['plugins']['get'](ki),_0x3782a8=this['balloonPanelView'];if(_0x518aa8['_annotations']=_0x5d8cf8,this['isAttached'])throw new _0x3cac4c('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x518aa8,'set:container',()=>{this['detach'](),this['listenTo'](_0x518aa8,'change:container',_0x50fe5d=>{_0x50fe5d['off'](),this['attach'](_0x5d8cf8);});}),_0x518aa8['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1bc772=_0x50af29=>{const _0x272644=new Ri(this['context']['locale']);_0x518aa8['addAnnotation'](_0x50af29,_0x272644),this['_annotationToNarrowView']['set'](_0x50af29,_0x272644),_0x272644['bind']('isDirty','annotationType','number')['to'](_0x50af29['view'],'isDirty','type','length'),_0x272644['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3782a8['content']['first']!==_0x50af29['view']?(this['_showBalloon'](_0x50af29),_0x50af29['view']['element']['focus'](),this['setActiveAnnotation'](_0x50af29)):this['setActiveAnnotation'](null);});};for(const _0x346767 of _0x5d8cf8)_0x1bc772(_0x346767);this['listenTo'](_0x5d8cf8,'add',(_0x2d710a,_0x2c6cee)=>{_0x1bc772(_0x2c6cee);}),this['listenTo'](_0x5d8cf8,'remove',(_0x361701,_0x1a3aa0,_0x276b5a)=>{this['_annotationToNarrowView']['get'](_0x1a3aa0)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1a3aa0),_0x518aa8['rearrange']({'removedAnnotation':_0x1a3aa0,'previousAnnotation':_0x5d8cf8['get'](_0x276b5a-0x1),'nextAnnotation':_0x5d8cf8['get'](_0x276b5a+0x1)}),_0x1a3aa0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5d8cf8,'focus',(_0x5bfa35,_0x16b82e)=>{this['setActiveAnnotation'](_0x16b82e);}),this['listenTo'](_0x5d8cf8,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x38d4d3,_0x2251df)=>{_0x2251df['keyCode']===_0x161b1f['esc']&&_0x3782a8['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3782a8['content']['first']),this['_hideBalloon'](),_0x2251df['stopPropagation'](),_0x2251df['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5db6cc,_0x1fa8d7)=>{const _0x2d917e=_0x1fa8d7['target'];_0x3782a8['isVisible']&&_0x3782a8['element']['contains'](_0x2d917e)||_0x518aa8['view']['element']['contains'](_0x2d917e)||_0x5db6cc['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x17b7d9=>_0x17b7d9['contains'](_0x2d917e))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xae59cf=this['context']instanceof _0x429018?this['context']['editors']:new _0x5c875e([this['context']]);for(const _0x1adb4e of _0xae59cf)this['_integrateWithEditorAnnotations'](_0x1adb4e);this['listenTo'](_0xae59cf,'add',(_0x47c6bb,_0x3ec4d1)=>{this['listenTo'](_0x3ec4d1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3ec4d1);});}),this['listenTo'](_0xae59cf,'remove',(_0x159474,_0x423ecc)=>{_0x423ecc['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x423ecc['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x450e8d){if(_0x450e8d===this['activeAnnotation'])return;const _0xaaeab=this['context']['plugins']['get'](ki);_0xaaeab['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x450e8d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x450e8d&&_0xaaeab['getSidebarItemView'](_0x450e8d)?this['_showBalloon'](_0x450e8d):this['_hideBalloon'](),this['activeAnnotation']=_0x450e8d;}['detach'](){if(!this['isAttached'])throw new _0x3cac4c('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5b5c69=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1a0b4e=>_0x1a0b4e['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5b5c69['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x429018&&this['stopListening'](this['context']['editors']);for(const _0x25deea of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x25deea);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'](_0x43356c){if(!_0x43356c['plugins']['has']('EditorAnnotations'))return;const _0x31efde=_0x43356c['plugins']['get']('EditorAnnotations'),_0x14cac5=this['context']['plugins']['get'](ki),_0x3c0706=this['annotations'],_0x27c556=this['balloonPanelView'],_0x1b56f2=()=>{const _0x363f27=_0x31efde['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x363f27),this['setActiveAnnotation'](_0x363f27[0x0]||null);};this['listenTo'](_0x31efde,'refresh',_0x1b56f2),this['listenTo'](_0x31efde,'blur',(_0xb01f48,{isAnnotationTracked:_0x4d1046})=>{this['activeAnnotation']&&_0x4d1046(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x31efde,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3c0706,'blur',_0xaa4100=>{_0x31efde['hasDomSelection']()&&_0xaa4100['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1c99f9,_0x44970e)=>{const _0x20e020=_0x44970e['target'];_0x27c556['isVisible']&&_0x27c556['element']['contains'](_0x20e020)||_0x14cac5['view']['element']['contains'](_0x20e020)||this['activeAnnotation']&&_0x31efde['hasDomSelection']()&&(_0x1b56f2(),_0x1c99f9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x31efde);}['_destroyEditorAnnotationsIntegration'](_0x2091df){_0x2091df&&(this['stopListening'](_0x2091df),this['_editorAnnotations']['remove'](_0x2091df));}['_setSelectedAnnotations'](_0x1fa355){for(const _0x1f2c28 of this['_selectedAnnotations'])_0x1fa355['includes'](_0x1f2c28)||this['_manuallyClosedAnnotationViews']['delete'](_0x1f2c28['view']);this['_selectedAnnotations']=_0x1fa355;}['_refreshPositioning'](){const _0x227ba9=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x227ba9['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xc3ec8f){if(this['_manuallyClosedAnnotationViews']['has'](_0xc3ec8f['view']))return;const _0x2a426b=this['balloonPanelView']['content']['first'];_0x2a426b!==_0xc3ec8f['view']?(_0x2a426b&&this['_detachListeners'](_0x2a426b),this['_attachListeners'](_0xc3ec8f['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xc3ec8f['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3dd383=this['balloonPanelView']['content']['first'],_0x5c9885=_0x3dd383&&this['annotations']['getByView'](_0x3dd383);if(!_0x5c9885||!this['_annotationToNarrowView']['has'](_0x5c9885))return;const _0x26ddb4=this['_annotationToNarrowView']['get'](_0x5c9885)['element'],_0x3aa266=(function(){const _0x359038=_0x230065['defaultPositions'];return[_0x359038['southArrowNorthEast'],_0x359038['northArrowSouthEast'],_0x359038['southArrowNorth'],_0x359038['northArrowSouth'],_0x359038['southArrowNorthWest'],_0x359038['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x26ddb4,'positions':_0x3aa266});}['_hideBalloon'](){const _0xea34ef=this['balloonPanelView'],_0x4a1570=_0xea34ef['content']['first'];_0x4a1570&&(this['_detachListeners'](_0x4a1570),_0xea34ef['unpin'](),_0xea34ef['content']['clear']());}['_attachListeners'](_0x66f0ab){this['listenTo'](_0x66f0ab,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x66f0ab,'Esc',(_0x2e3106,_0x32cddb)=>{this['_manuallyClosedAnnotationViews']['add'](_0x66f0ab),this['_hideBalloon'](),_0x32cddb();});}['_detachListeners'](_0x1bba91){this['stopListening'](_0x1bba91);}},xi=class extends _0x1228a1{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x4bf11d,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x423e80){super(_0x423e80),_0x423e80['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x423e80['plugins']['get'](_0x4bf11d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x55ca5d(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0xdb329=this['editor']['plugins']['get'](Ti);_0xdb329['context']===this['editor']&&(_0xdb329['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x239e8f,_0x4a522a)=>{const _0x4e25dc=this['_balloon'];if(this['isAttached']&&_0x4e25dc['visibleView']){const _0x5f076e=this['annotations']['getByView'](_0x4e25dc['visibleView']);_0x5f076e&&this['_closeAnnotation'](_0x5f076e),_0x4a522a();}}));}['afterInit'](){const _0x451c79=this['editor']['plugins']['get'](Ti);_0x451c79['context']===this['editor']&&(_0x451c79['hasActive']()||_0x451c79['switchTo']('inline'));}['setActiveAnnotation'](_0x1075ee){_0x1075ee!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1075ee&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1075ee)&&this['_addAnnotationToBalloon'](_0x1075ee,!0x0),_0x1075ee['isActive']=!0x0),_0x1075ee||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1075ee);}['attach'](_0x18b1e8){this['annotations']=_0x18b1e8;const _0x1920f9=this['editor']['plugins']['get'](Ti),_0x54f3ed=this['_balloon'];if(this['isAttached'])throw new _0x3cac4c('inlineannotations-attach-already-attached',this);if(_0x1920f9['context']!==this['editor'])throw new _0x3cac4c('inlineannotations-not-allowed-with-context',this);const _0x430647=this['editor']['plugins']['get'](di);this['listenTo'](_0x430647,'refresh',()=>{const _0x4003aa=_0x430647['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1c33de,_0x44a52c;!this['_forceRefresh']&&(_0x1c33de=_0x4003aa,_0x44a52c=this['_selectedAnnotations'],_0x1c33de['length']===_0x44a52c['length']&&_0x1c33de['every'](_0x18c6a3=>_0x44a52c['includes'](_0x18c6a3)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4003aa),this['setActiveAnnotation'](_0x4003aa[0x0]||null));}),this['listenTo'](_0x430647,'blur',(_0x5dc6f7,{isAnnotationTracked:_0x4b11e0})=>{this['activeAnnotation']&&_0x4b11e0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x430647,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2127ad,_0x5e9f8f,_0x45f19a)=>{_0x45f19a||this['setActiveAnnotation'](null);}),this['listenTo'](_0x18b1e8,'remove',(_0x3b1e0c,_0xa0b43)=>{this['_removeAnnotationFromBalloon'](_0xa0b43),_0xa0b43===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x54f3ed,'change:visibleView',(_0x3414e0,_0x21df80,_0xdc0d43,_0x2745d1)=>{_0x2745d1&&this['stopListening'](_0x2745d1);const _0x553780=_0x18b1e8['getByView'](_0xdc0d43);_0xdc0d43&&_0x553780&&(this['listenTo'](_0xdc0d43,'change:height',()=>{_0x54f3ed['updatePosition']();}),this['listenTo'](_0xdc0d43,'Esc',()=>{this['_closeAnnotation'](_0x553780),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x553780&&this['setActiveAnnotation'](_0x553780));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x54f3ed['visibleView']&&_0x18b1e8['getByView'](_0x54f3ed['visibleView'])&&_0x54f3ed['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 _0x3cac4c('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x173325 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x173325);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x271417){for(const _0x8dd0f1 of this['_selectedAnnotations'])_0x271417['includes'](_0x8dd0f1)||this['_manuallyClosed']['delete'](_0x8dd0f1);for(const _0x699ee8 of this['annotations'])_0x271417['includes'](_0x699ee8)||this['_removeAnnotationFromBalloon'](_0x699ee8);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x48c603 of _0x271417)this['_addAnnotationToBalloon'](_0x48c603);}this['_selectedAnnotations']=_0x271417;}['_addAnnotationToBalloon'](_0x24a083,_0x558975=!0x1){this['_manuallyClosed']['has'](_0x24a083)||(this['_addedAnnotations']['has'](_0x24a083)||this['_balloon']['hasView'](_0x24a083['view'])||(this['_addedAnnotations']['add'](_0x24a083),this['_balloon']['add']({'stackId':_0x24a083['view']['id'],'view':_0x24a083['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x24a083)}})),_0x558975&&this['_balloon']['showStack'](_0x24a083['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4c5ddc){const _0x4eb3fb=_0x4c5ddc['target'],_0x1352c2=this['editor']['editing']['view'],_0x3082a8=_0x1352c2['document']['selection']['getFirstRange'](),_0x14eb7c=_0x1352c2['domConverter']['viewRangeToDom'](_0x3082a8);if(_0x14eb7c['collapse'](!0x0),_0x4eb3fb){if(_0x4eb3fb instanceof _0x50fe83)return _0x4eb3fb;let _0x25293f=[];for(const _0x2c17c5 of _0x4eb3fb)_0x25293f['push'](..._0x50fe83['getDomElementRects'](_0x2c17c5));_0x25293f=function(_0x1a7065){const _0x5b4b30=[];let _0x2ef16e=_0x1a7065[0x0];for(let _0x5940fb=0x1;_0x5940fb<_0x1a7065['length'];_0x5940fb++)if(Pi(_0x2ef16e,_0x1a7065[_0x5940fb])){const _0x43fbb4=_0x1a7065[_0x5940fb]['width'];_0x2ef16e['width']+=_0x43fbb4,_0x2ef16e['right']+=_0x43fbb4;}else _0x5b4b30['push'](_0x2ef16e),_0x2ef16e=_0x1a7065[_0x5940fb];return _0x5b4b30['push'](_0x2ef16e),_0x5b4b30;}(_0x25293f);const _0x2cc3e0=_0x14eb7c['getBoundingClientRect']();return _0x25293f['find'](_0x2ee006=>_0x2ee006['top']<=_0x2cc3e0['top']&&_0x2ee006['bottom']>=_0x2cc3e0['bottom']&&_0x2ee006['left']<=_0x2cc3e0['left']&&_0x2ee006['right']>=_0x2cc3e0['right'])||_0x25293f[0x0];}return _0x4c5ddc['targetRect']||_0x14eb7c;}['_removeAnnotationFromBalloon'](_0x2d62d0){this['_addedAnnotations']['has'](_0x2d62d0)&&this['_balloon']['hasView'](_0x2d62d0['view'])&&(this['_addedAnnotations']['delete'](_0x2d62d0),this['_balloon']['remove'](_0x2d62d0['view']));}['_closeAnnotation'](_0x29937f){this['_manuallyClosed']['add'](_0x29937f),this['_removeAnnotationFromBalloon'](_0x29937f);}};function Pi(_0x54657e,_0x440c3d){return _0x54657e['top']===_0x440c3d['top']&&_0x54657e['bottom']===_0x440c3d['bottom']&&_0x54657e['right']===_0x440c3d['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x15b935,_0x170448){super(_0x15b935),this['set']('isEmpty',!_0x170448['length']),this['focusTracker']=new _0x57589a(),this['_annotationViews']=_0x170448,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x170448,'focusTracker':this['focusTracker']}),this['listenTo'](_0x170448,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x170448,'remove',(_0x2fb8a5,_0x38fde8)=>{_0x38fde8['isActive']&&this['focus'](),_0x170448['length']||(this['isEmpty']=!0x0);});const _0x11fa3c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x15b935,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x170448},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x11fa3c['if']('isEmpty','ck-hidden',_0x1ba73f=>!_0x1ba73f)]},'children':[{'text':Et(_0x15b935,'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 _0x10bcd8 of this['_annotationViews'])this['focusTracker']['add'](_0x10bcd8['element']);this['_annotationViews']['on']('change',(_0x2ec111,{added:_0x172f61,removed:_0x202718})=>{for(const _0x4f43cc of _0x172f61)this['focusTracker']['add'](_0x4f43cc['element']);for(const _0x29ac4d of _0x202718)this['focusTracker']['remove'](_0x29ac4d['element']);});}},Di=class extends _0x388472{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x59008a){super(_0x59008a),this['archivedThreads']=new _0x5c875e();}['init'](){const _0x319fd2=this['context'],_0x20fee7=_0x319fd2['plugins']['get'](oi),_0xdf139d=_0x319fd2['plugins']['get'](ti);this['listenTo'](_0x20fee7,'addCommentThread',(_0x2db58e,{threadId:_0x4c6cb4})=>{const _0x145163=_0x20fee7['getCommentThread'](_0x4c6cb4);_0x145163['archivedAt']&&this['archivedThreads']['add'](_0x145163,this['_calculatePosition'](_0x145163['archivedAt'])),this['listenTo'](_0x145163,'change:archivedAt',(_0x3e1063,_0x5eb1e9,_0x49a9a4)=>{_0x49a9a4?this['archivedThreads']['has'](_0x145163)||this['archivedThreads']['add'](_0x145163,this['_calculatePosition'](_0x145163['archivedAt'])):this['archivedThreads']['has'](_0x145163)&&this['archivedThreads']['remove'](_0x145163);});}),this['listenTo'](_0x20fee7,'removeCommentThread',(_0x5828cb,{threadId:_0x5a6e3f})=>{const _0x590482=_0x20fee7['getCommentThread'](_0x5a6e3f);this['stopListening'](_0x590482),this['archivedThreads']['has'](_0x590482)&&this['archivedThreads']['remove'](_0x590482);},{'priority':'highest'}),this['listenTo'](_0xdf139d['collection'],'focus',(_0x11aa57,_0x1811c0)=>{_0x1811c0['isVisible']||(_0x1811c0['isActive']=!0x0,_0xdf139d['activate'](_0x1811c0));});}['_calculatePosition'](_0xeab401){const _0x28b5c0=[...this['archivedThreads']]['findIndex'](_0x247d00=>_0x247d00['archivedAt']<_0xeab401);return _0x28b5c0>-0x1?_0x28b5c0:this['archivedThreads']['length'];}},Vi=class extends _0x1228a1{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x13db02];}constructor(_0x26e53b){super(_0x26e53b),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x99ef5=this['editor'],_0x377339=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x99ef5['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3a0b06,!0x0)),_0x99ef5['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1d2395=this['_createCommentsArchiveButton'](rt);return _0x1d2395['set']({'role':'menuitemcheckbox'}),_0x1d2395;});const _0x4de2f4=_0x99ef5['plugins']['get'](Di),_0x4db810=_0x99ef5['plugins']['get']('Annotations'),_0x34cb2f=_0x99ef5['plugins']['get']('CommentsRepository');_0x4de2f4['archivedThreads']['forEach'](_0x242d84=>{this['_handleNewThread'](_0x242d84);}),this['listenTo'](_0x4de2f4['archivedThreads'],'add',(_0x4778ad,_0x1f34f2)=>{this['_handleNewThread'](_0x1f34f2);}),this['listenTo'](_0x4db810['collection'],'add',(_0x79691e,_0x295352)=>{const _0x43e593=this['_pendingThreads']['find'](_0x1a7c34=>{const _0x4dee7e=_0x34cb2f['_threadToController']['get'](_0x1a7c34);return _0x4dee7e&&_0x295352['innerView']===_0x4dee7e['view'];});if(_0x43e593){const _0xe3616f=this['_calculatePosition'](_0x43e593['archivedAt']);this['_addAnnotationToArchive'](_0x295352,_0xe3616f),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x43e593),0x1);}}),this['listenTo'](_0x4de2f4['archivedThreads'],'remove',(_0x45149c,_0x44358d)=>{const _0x584a09=_0x99ef5['config']['get']('collaboration.channelId');if(!_0x584a09||_0x44358d['channelId']===_0x584a09){if(this['_pendingThreads']['includes'](_0x44358d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x44358d),0x1);else{const _0x46d30c=_0x34cb2f['_threadToController']['get'](_0x44358d),_0x4037fe=_0x4db810['getByInnerView'](_0x46d30c['view']);this['annotationViews']['remove'](_0x4037fe['view']),this['stopListening'](_0x4037fe),this['stopListening'](_0x4037fe['focusableElements']);}}}),this['listenTo'](_0x4db810['collection'],'add',(_0x1d53d1,_0x296a74)=>{this['listenTo'](_0x296a74,'escape',_0x377339);}),this['listenTo'](_0x4db810['collection'],'remove',(_0x4d19e6,_0x2b93a)=>{this['stopListening'](_0x2b93a,'escape',_0x377339);});}['_addAnnotationToArchive'](_0x41b899,_0x42e973){this['listenTo'](_0x41b899,'set:isVisible',_0xdee290=>{_0xdee290['return']=!0x1,_0xdee290['stop']();}),this['annotationViews']['add'](_0x41b899['view'],_0x42e973);}['_handleNewThread'](_0x2e53a8){const _0xdcf5e3=this['editor']['plugins']['get']('CommentsRepository'),_0x5b2af1=this['editor']['plugins']['get']('Annotations'),_0x136e77=this['editor']['config']['get']('collaboration.channelId');if(!_0x136e77||_0x2e53a8['channelId']===_0x136e77){const _0x11c7ac=_0xdcf5e3['_threadToController']['get'](_0x2e53a8);if(!_0x11c7ac)return void this['_pendingThreads']['push'](_0x2e53a8);const _0x3e91d2=this['_calculatePosition'](_0x2e53a8['archivedAt']),_0x377754=_0x5b2af1['getByInnerView'](_0x11c7ac['view']);_0x377754['isVisible']&&_0x5b2af1['_visibleAnnotations']['remove'](_0x377754),this['_addAnnotationToArchive'](_0x377754,_0x3e91d2);}}['_calculatePosition'](_0x6966f3){const _0x29263a=this['editor']['config']['get']('collaboration.channelId'),_0x90a19c=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x3d40fd=>_0x3d40fd['channelId']===_0x29263a)['findIndex'](_0x5e1bee=>_0x5e1bee['archivedAt']<_0x6966f3);return _0x90a19c<0x0||_0x90a19c>this['annotationViews']['length']?this['annotationViews']['length']:_0x90a19c-0x1;}['_toggleDialog'](){const _0x224797=this['editor'],_0x56d388=_0x224797['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x224797['locale'],this['annotationViews'])),'commentsArchive'===_0x56d388['id']?_0x56d388['hide']():_0x56d388['show']({'id':'commentsArchive','title':Et(_0x224797['locale'],'COMMENTS_ARCHIVE'),'icon':_0x49f299,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x2718da['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x34bd45,_0x2484a4=!0x1){const _0x2614a1=this['editor']['locale'],_0x584651=this['editor']['plugins']['get']('Dialog'),_0x2afe70=new _0x34bd45(_0x2614a1);return _0x2afe70['bind']('isEnabled')['to'](this,'isEnabled'),_0x2afe70['bind']('isOn')['to'](_0x584651,'id',_0x3f069b=>'commentsArchive'===_0x3f069b),_0x2afe70['set']({'label':Et(_0x2614a1,'COMMENTS_ARCHIVE'),'icon':_0x49f299,'isToggleable':!0x0}),_0x2484a4&&(_0x2afe70['tooltip']=!0x0),this['listenTo'](_0x2afe70,'execute',()=>this['_toggleDialog']()),_0x2afe70;}['_hideDialogOnAnnotationEscape']=_0x34674d=>{const _0x2a1371=_0x34674d['source'];if(!this['annotationViews']['has'](_0x2a1371['view']))return;const _0x35d8cb=this['editor']['plugins']['get']('Dialog');_0x35d8cb['isOpen']&&'commentsArchive'===_0x35d8cb['id']&&(_0x35d8cb['hide'](),_0x34674d['stop']());};},Bi=class extends _0x1228a1{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
23
+ import{Command as _0x5de849,Context as _0x2e85d8,ContextPlugin as _0x5d945e,Editor as _0x8c9b70,PendingActions as _0x4019cf,Plugin as _0x32d196}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x460944,Collection as _0x1d3c5e,DomEmitterMixin as _0x270b14,FocusTracker as _0x46cfaf,KeystrokeHandler as _0x44e221,ObservableMixin as _0x4f4856,Rect as _0x3f41c9,diff as _0x4d2557,first as _0x1a2afb,getEnvKeystrokeText as _0x5bcf0b,keyCodes as _0x40bd72,priorities as _0x48ddaa,scrollViewportToShowTarget as _0x474fe7,toUnit as _0x4b19c0,uid as _0x4ff4e9}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x30e892,ConfirmMixin as _0x505bcf,FOCUS_ANNOTATION_KEYSTROKE as _0x4e8a21,LateFocusButtonView as _0x4ccc42,LateFocusDropdownButtonView as _0x3bd6df,UserView as _0x95843f,Users as _0x5d61c1,getAllMarkersDomElementsSorted as _0x3df547,getDateTimeFormatter as _0x5b4e92,hashObject as _0x5ab5a3,setupThreadKeyboardNavigation as _0x2c8780,surroundingMarkersDetector as _0x5a3dd3,trimHtml as _0x3e71f1}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x172f46,debounce as _0x1ebf5f,isEqual as _0x440498,set as _0x4f2003,throttle as _0x17f62c,unset as _0x59ab04}from'es-toolkit/compat';import{IconAddComment as _0x1f3af2,IconCheck as _0x3aa4d1,IconCommentsArchive as _0x4a6a61,IconPencil as _0xb8044e,IconRemoveComment as _0x2d40b9,IconThreeVerticalDots as _0x4b53ab,IconUndo as _0x16ab3a}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0xd4a3f7,BodyCollection as _0x701dbb,ButtonView as _0x5a263d,ContextualBalloon as _0x63646c,Dialog as _0x3da067,DialogViewPosition as _0x3cf2f2,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
+ _0x4f4856();var bt=class extends It{['model'];['view'];constructor(_0x494d1d,_0x5a515c){super(),this['model']=_0x494d1d,this['model']['_isAttached']=!0x0,this['view']=_0x5a515c,this['listenTo'](_0x5a515c,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5a515c,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5a515c,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5a515c,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5a515c,'addComment',(_0x3e2272,_0x17e785)=>this['addComment'](_0x17e785)),this['listenTo'](_0x5a515c,'updateComment',(_0x1795d0,_0x1af990,_0x5c0eab)=>this['updateComment'](_0x1af990,_0x5c0eab)),this['listenTo'](_0x5a515c,'removeComment',(_0x5df4d1,_0x4874fe)=>this['removeComment'](_0x4874fe));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3994db){this['model']['addComment']({'content':_0x3994db,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x5054ca,_0x45ef48){this['model']['getComment'](_0x5054ca)['update']({'content':_0x45ef48});}['removeComment'](_0x324560){this['model']['getComment'](_0x324560)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x38e5f1,_0x8f1cf,_0x582ee3){const t=_0x38e5f1['t'];switch(_0x8f1cf){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'},_0x582ee3);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x582ee3);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'},_0x582ee3);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'},_0x582ee3);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x582ee3);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'},_0x582ee3);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'},_0x582ee3);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'},_0x582ee3);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}var kt=class extends it{['main'];['editable'];constructor(_0x322a5f,_0x5196d7){super(_0x322a5f);const _0x14c587=_0x4ff4e9();this['main']=this['createCollection'](),this['editable']=new st(_0x322a5f,_0x5196d7,void 0x0,{'label':()=>Et(_0x322a5f,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x322a5f['uiLanguageDirection'],'lang':_0x322a5f['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x14c587},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}},Nt=class extends tt{['view'];constructor(_0x1343d7){super(_0x1343d7),this['view']=new kt(_0x1343d7['locale'],_0x1343d7['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2045e7=this['editor']['editing']['view'],_0xc99982=this['view']['editable'];_0xc99982['name']=_0x2045e7['document']['getRoot']()['rootName'],this['view']['render']();const _0x2fbda9=_0xc99982['element'];this['setEditableElement'](_0xc99982['name'],_0x2fbda9),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2045e7['attachDomRoot'](_0x2fbda9),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x4f4856(_0x8c9b70);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x822e7e={}){(_0x822e7e=Object['assign']({},_0x822e7e))['plugins']||(_0x822e7e['plugins']=CommentEditor['defaultPlugins']),super(_0x822e7e),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0x2f185f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2f185f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5dd30a=>{const _0x4f02d4=this['model']['document']['getRoot'](),_0x12b37e=_0x4f02d4&&_0x4f02d4['getChild'](_0x4f02d4['childCount']-0x1);_0x5dd30a['setSelection'](_0x12b37e,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1d22f8=this['editing']['view'],_0x377e9a=_0x1d22f8['document']['getRoot'](),_0x546e1e=_0x377e9a['getChild'](0x0);_0x377e9a['childCount']>0x1||!_0x546e1e||'p'!=_0x546e1e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x1d22f8,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x546e1e['placeholder']=this['placeholder']),ut({'view':_0x1d22f8,'element':_0x546e1e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x546e1e);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x40664d,_0x54b9fd={}){super(_0x40664d),this['editor']=null,this['_editorConfig']=_0x54b9fd,this['set']('value',_0x54b9fd['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x40664d,'Reply...')),this['set']('submitLabel',Et(_0x40664d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x44e221(),this['focusTracker']=new _0x46cfaf(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x406e21=>!_0x406e21['defaultPrevented']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x4a0df5,_0x274328)=>{this['cancelButtonView']['fire']('execute'),_0x274328();}),this['keystrokes']['set']('Ctrl+Enter',(_0x23f65f,_0x42dec2)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x42dec2());}),this['on']('submit',(_0x424440,_0x30e4ce)=>{_0x30e4ce['length']>0xfde8?(alert(Et(_0x40664d,'TOO_LONG_COMMENT_ALERT',[_0x30e4ce['length'],0xfde8])),_0x424440['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4656d4=this['editor'];this['element']['insertBefore'](_0x4656d4['ui']['element'],this['element']['firstChild']),_0x4656d4['model']['document']['on']('change',()=>this['value']=_0x4656d4['getData']()),_0x4656d4['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4656d4['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2f5265){-0x1===_0x2f5265?(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:_0x3f51a9}=this,_0xc934d4=new _0x5a263d(_0x3f51a9);return _0xc934d4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xc934d4['withText']=!0x0,_0xc934d4['bind']('label')['to'](this,'submitLabel'),_0xc934d4['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xc934d4['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x630cd5,_0x2e45ae)=>!_0x2e45ae&&!!_0x630cd5['trim']()),_0xc934d4;}['_createCancelButton'](){const {locale:_0x4db6f5}=this,_0x484228=new _0x5a263d(_0x4db6f5);return _0x484228['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x484228['label']=Et(_0x4db6f5,'Cancel'),_0x484228['withText']=!0x0,_0x484228['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x484228;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x38b223=>{this['focusTracker']['add'](_0x38b223['element']);}),this['focusables']['on']('change',(_0x23c0f8,_0x17bacc)=>{for(const _0x58c280 of Array['from'](_0x17bacc['added'])['reverse']())this['focusTracker']['add'](_0x58c280['element']);});}},xt=class extends ht{constructor(_0x43f68d,_0x2a8c04,_0x45bb7b){super(_0x43f68d),this['commentInputView']=new St(_0x43f68d,_0x45bb7b),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x118229,_0x4321a5)=>_0x118229||!!_0x4321a5),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 _0x95843f(_0x43f68d,_0x2a8c04),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'](_0x475a0b){this['commentInputView']['focus'](_0x475a0b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x27adb0,_0x4281e3)=>{const {submitButtonView:_0x4ee7c8,cancelButtonView:_0x360777,editor:_0x219ea1}=this['commentInputView'];[_0x4ee7c8['element'],_0x360777['element'],_0x219ea1?_0x219ea1['editing']['view']['getDomRoot']():null]['filter'](_0x42a9b6=>_0x42a9b6)['some'](_0xc47986=>_0xc47986['contains'](_0x4281e3['target']))||(this['focus'](),_0x4281e3['preventDefault']());});}},Pt=class extends ht{constructor(_0x2def75){super(_0x2def75);const _0x149537=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x149537['to']('count',_0x11c34a=>Et(_0x2def75,'NUMBER_OF_COMMENTS',_0x11c34a))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1d864f,_0x8c9843,_0x1c9cbe){super(_0x1d864f);const _0x213902=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x8c9843['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x8c9843,this['_config']=_0x1c9cbe,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3681f3=>this['commentViews']['map'](_0x168a05=>_0x168a05['element'])['includes'](_0x3681f3['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x1d864f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x14dec0=>_0x14dec0-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5b56a9 of _0x8c9843['comments'])this['_handleNewCommentModel'](_0x5b56a9);this['_handleInfoComment'](),this['listenTo'](_0x8c9843['comments'],'add',(_0x35001b,_0x32c6fc)=>{const _0x1290f6=this['_calculatePosition'](_0x32c6fc);this['length']++,this['_handleNewCommentModel'](_0x32c6fc,_0x1290f6),this['refreshVisibleViews']();}),this['listenTo'](_0x8c9843['comments'],'remove',(_0x532604,_0x40b744)=>{this['length']--,this['_handleRemoveCommentModel'](_0x40b744),this['refreshVisibleViews']();}),this['listenTo'](_0x8c9843,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x8c9843,'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',_0x213902['if']('length','ck-hidden',_0x5c5f12=>!_0x5c5f12)],'aria-label':Et(_0x1d864f,'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'](_0x494c72){-0x1===_0x494c72?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1e7cad of this['commentViews'])_0x1e7cad['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x8b8237,_0x5ae593){const _0x562c40=new this['_config']['CommentView'](this['locale'],_0x8b8237,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x562c40['viewUid']=_0x8b8237['id'],_0x562c40['delegate']('removeComment')['to'](this),_0x562c40['delegate']('updateComment')['to'](this),_0x562c40['delegate']('resolveCommentThread')['to'](this),_0x562c40['delegate']('editorReady')['to'](this),_0x562c40['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x562c40,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x562c40,_0x5ae593);}['_calculatePosition'](_0xbaaa76){const _0x13d461=this['_model']['_findOptimalIndex'](_0xbaaa76);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xbaaa76['authoredAt']?_0x13d461-0x1:_0x13d461:_0x13d461-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x29cd10={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x29cd10,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x29cd10));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x143125){const _0x28b79e=this['commentViews']['remove'](_0x143125['id']);this['stopListening'](_0x28b79e),_0x28b79e['isEditMode']&&this['_updateHasDirtyComment'](),_0x28b79e['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5e6470=>_0x5e6470['isEditMode']);}['_rearrangeCollapse'](){const _0x1a17dc=function(_0x1bd657){const _0x3b6ad2=new _0x1d3c5e();for(const _0x4199ec of _0x1bd657)_0x3b6ad2['add'](_0x4199ec);return _0x3b6ad2;}(this['commentViews']),_0x53e5e0=this['_collapsedCommentsView']['count'];for(let _0xd5a7f2=0x1;_0xd5a7f2<=_0x53e5e0;_0xd5a7f2++)_0x1a17dc['remove'](0x1);for(const _0x2cf8ed of _0x1a17dc)_0x2cf8ed['collapse']();_0x53e5e0>0x0&&_0x1a17dc['add'](this['_collapsedCommentsView'],0x1),Dt(_0x4d2557(Array['from'](this['visibleViews']),Array['from'](_0x1a17dc)),this['visibleViews'],_0x1a17dc);}['_rearrangeExpand'](){Dt(_0x4d2557(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3ba061 of this['visibleViews'])_0x3ba061['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x37e9ce=>{this['focusTracker']['add'](_0x37e9ce['element']),this['keystrokes']['listenTo'](_0x37e9ce['element']);}),this['commentViews']['on']('change',(_0x12a9bf,_0x138601)=>{for(const _0x59f434 of _0x138601['removed'])this['focusTracker']['remove'](_0x59f434['element']),this['keystrokes']['stopListening'](_0x59f434['element']);for(const _0x14c02e of Array['from'](_0x138601['added'])['reverse']())this['focusTracker']['add'](_0x14c02e['element']),this['keystrokes']['listenTo'](_0x14c02e['element']);});}};function Dt(_0xac38fe,_0x9325d1,_0x1b036c){let _0x46b3f2=0x0;for(const _0x5d2646 of _0xac38fe)switch(_0x5d2646){case'insert':_0x9325d1['add'](_0x1b036c['get'](_0x46b3f2),_0x46b3f2),_0x46b3f2++;break;case'delete':_0x9325d1['remove'](_0x46b3f2);break;case'equal':_0x46b3f2++;}}var Vt=class extends ht{constructor(_0x169269){super(_0x169269);const _0x359cd6=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x359cd6['to']('contextValue',_0x5812b1=>Et(_0x169269,'THREAD_CONTEXT_LABEL',_0x5812b1)),'tabindex':-0x1},'children':[{'text':_0x359cd6['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4601fe,_0x5522ca){super(_0x4601fe);const _0x3498d7=this['bindTemplate'];this['_model']=_0x5522ca,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xba422=>!!_0xba422),this['bind']('contextValue')['to'](this['_model'],'context',_0xe29092=>_0xe29092&&_0xe29092['value']?this['_trimContextValue'](_0xe29092['value']):Et(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x3498d7['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 _0x3e56fa=new _0x5a263d(this['locale']);return _0x3e56fa['label']=Et(this['locale'],'Reopen'),_0x3e56fa['tooltip']=Et(this['locale'],'Reopen'),_0x3e56fa['icon']=_0x16ab3a,_0x3e56fa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x393f80=>!_0x393f80),_0x3e56fa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3357ff,_0x202f3d)=>_0x3357ff&&_0x202f3d),_0x3e56fa['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3e56fa;}['_trimContextValue'](_0x312959){if(_0x312959['length']<0x96)return _0x312959;const _0x2ab65d=_0x312959['lastIndexOf']('\x20',0x93);return _0x312959['substring'](0x0,_0x2ab65d>-0x1?_0x2ab65d:0x93)+'...';}['_attachContextActions'](){const _0xdb275e=this['element']['querySelector']('.ck-context'),_0x57a004=_0xdb275e['querySelector']('.ck-context__value');this['listenTo'](_0xdb275e,'mouseenter',()=>{_0x57a004['offsetWidth']<_0x57a004['scrollWidth']&&_0xdb275e['classList']['add']('overlay');}),this['listenTo'](_0xdb275e,'mouseleave',()=>{_0xdb275e['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2bd506 of this['focusables'])this['focusTracker']['add'](_0x2bd506['element']),this['keystrokes']['listenTo'](_0x2bd506['element']);}['_createContextView'](){const _0x36b0a6=new Vt(this['locale']);return _0x36b0a6['bind']('contextValue')['to'](this),_0x36b0a6;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x25a382,_0x295a65,_0x4342da,_0x222e5e){super(_0x25a382),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x295a65,this['_localUser']=_0x4342da,this['_config']=_0x222e5e,this['commentThreadHeaderView']=new Bt(_0x25a382,_0x295a65),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x30e892(_0x25a382,Et(_0x25a382,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x25a382,_0x295a65,Object['assign']({'CommentView':this['_config']['CommentView']},_0x222e5e)),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',(_0x3f61e7,_0x4458ea)=>_0x3f61e7||!!_0x4458ea),this['bind']('isUnlinked')['to'](_0x295a65,'unlinkedAt',_0x385660=>!!_0x385660);let _0x429abb=null;const _0x47e1c3=()=>{const _0x69e296=this['_model']['comments']['first']||null;_0x69e296!==_0x429abb&&(_0x429abb&&this['stopListening'](_0x429abb,'change:content'),_0x429abb=_0x69e296,_0x69e296&&this['listenTo'](_0x69e296,'change:content',_0x47e1c3));const _0x224c03=_0x69e296?_0x69e296['author']['name']:this['_localUser']['name'],_0x21a8ee=_0x69e296?new DOMParser()['parseFromString'](_0x3e71f1(_0x69e296['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x35c4cb=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x224c03]);this['set']('ariaLabel',_0x21a8ee?_0x35c4cb+'\x20'+_0x21a8ee:_0x35c4cb);};this['listenTo'](this['_model']['comments'],'change',_0x47e1c3),_0x47e1c3(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x300152=>_0x300152['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2c8780(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x357e2f=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x11501f=_0x357e2f['commentInputView'];return _0x357e2f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x11501f,'value',(_0xe871b,_0x2d45ca,_0x5b2158,_0x232892,_0x27e3e6)=>!!_0x27e3e6||!!_0x232892&&_0x5b2158&&!_0x2d45ca||_0xe871b&&_0x5b2158&&!_0x2d45ca),_0x11501f['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1c88fc,_0x2f35bd,_0x43b485)=>{let _0x217c91;return _0x217c91=_0x43b485&&_0x2f35bd?'Reply\x20to\x20reopen\x20discussion...':_0x1c88fc?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x217c91);}),_0x11501f['bind']('submitLabel')['to'](this,'length',_0x5c7506=>Et(this['locale'],_0x5c7506?'Reply':'Comment')),_0x11501f['on']('submit',(_0x228877,_0x5981d0)=>{this['fire']('addComment',_0x5981d0),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x11501f['on']('cancel',()=>{this['focus']();}),_0x11501f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x11501f['on']('cancel',_0x465109=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x465109['stop']());}),this['on']('change:isActive',(_0x230326,_0x359d21,_0x308afe)=>{_0x308afe||this['length']||_0x11501f['value']||this['fire']('removeCommentThread');}),_0x357e2f;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x505bcf(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x2feeda,_0x32dd10,_0x2bed55,_0x284d96){super(_0x2feeda,_0x32dd10,_0x2bed55,_0x284d96),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2feeda,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3935c6,_0x551d68,_0x2a8ed2)=>{_0x2a8ed2||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xf754e2,_0x1bfcc5,_0x3142a0)=>{_0x3142a0&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3e6cdb=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3e6cdb['if']('isActive','ck-thread--active'),_0x3e6cdb['if']('isUnlinked','ck-thread--unlinked'),_0x3e6cdb['to']('actionIndicator',_0x36413c=>_0x36413c?'ck-thread--'+_0x36413c:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3e6cdb['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 _0xfdaef8 of this['commentsListView']['commentViews'])_0xfdaef8['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x214c74}=this,_0x293cfc=this['commentsListView']['commentViews']['get'](0x0);_0x293cfc===this['_boundFirstCommentView']||_0x293cfc['isSystemComment']||(this['_boundFirstCommentView']=_0x293cfc,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x293cfc,'actionIndicator',_0x5b41f0=>'remove'===_0x5b41f0?'remove':null),_0x293cfc['placeholder']=Et(_0x214c74,'Write\x20a\x20comment...'),_0x293cfc['removeButton']['on']('execute',_0x4d90f1=>{_0x4d90f1['stop'](),this['showConfirm'](Et(_0x214c74,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x293cfc['focus']();}),_0x293cfc['actionBar']['add'](this['resolveButton'],0x0),_0x293cfc['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5d7454=new _0x4ccc42(this['locale']);return _0x5d7454['label']=Et(this['locale'],'Resolve'),_0x5d7454['tooltip']=Et(this['locale'],'Resolve'),_0x5d7454['icon']=_0x3aa4d1,_0x5d7454['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5d7454['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x59a239=>!_0x59a239),_0x5d7454['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3ca23f,_0x4ab7f5)=>_0x3ca23f&&!_0x4ab7f5),_0x5d7454['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5d7454;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}},Wt=class extends ht{constructor(_0x4d8399){super(_0x4d8399),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x15917b,_0x4aea08,_0x4dbeb5)=>{this['element']['innerHTML']=_0x4dbeb5;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x35c469,_0x30538f,_0x5177f6){super(_0x35c469),this['_model']=_0x30538f,this['_config']=_0x5177f6,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x30538f,'content',_0x30538f,'authoredAt',(_0x5ef655,_0x9b5348)=>Et(_0x35c469,'COMMENT_ARIA_LABEL',[_0x30538f['author']['name'],_0x5177f6['formatDateTime'](_0x9b5348),new DOMParser()['parseFromString'](_0x5ef655,'text/html')['body']['textContent'],_0x30538f['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x30e892(_0x35c469,Et(_0x35c469,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x410e99=>_0x410e99['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x54f75c=new Wt(this['locale']);return _0x54f75c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xd48704,_0x596b8f)=>_0x596b8f?_0x3e71f1(_0xd48704,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xd48704),_0x54f75c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4a84b9=new St(this['locale'],this['_config']['editorConfig']);return _0x4a84b9['value']=this['_model']['content'],_0x4a84b9['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4a84b9['submitLabel']=Et(this['locale'],'Save'),_0x4a84b9['on']('submit',(_0x45646e,_0x484aa4)=>{this['fire']('updateComment',this['_model']['id'],_0x484aa4),this['switchToDisplayMode'](),this['focus']();}),_0x4a84b9['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4a84b9['once']('editorReady',()=>{_0x4a84b9['focus']();}),_0x4a84b9['createEditor'](),_0x4a84b9['delegate']('editorReady')['to'](this),_0x4a84b9['delegate']('editorDestroyed')['to'](this),_0x4a84b9;}['_setupKeyboardNavigation'](){const _0x4790a5=this['element'];this['keystrokes']['listenTo'](_0x4790a5);for(const _0xdf5d7e of this['focusables'])this['focusTracker']['add'](_0xdf5d7e['element']),this['keystrokes']['listenTo'](_0xdf5d7e['element']);this['focusables']['on']('change',(_0x4255cb,_0x62915c)=>{for(const _0x4afe9b of _0x62915c['removed'])this['focusTracker']['remove'](_0x4afe9b['element']),this['keystrokes']['stopListening'](_0x4afe9b['element']);for(const _0x445887 of _0x62915c['added'])this['focusTracker']['add'](_0x445887['element']),this['keystrokes']['listenTo'](_0x445887['element']);}),this['keystrokes']['set']('enter',(_0x105e10,_0xa5c4e3)=>{_0x4790a5===_0x105e10['target']&&(this['focusCycler']['focusFirst'](),_0xa5c4e3());}),this['keystrokes']['set']('esc',(_0x45bad2,_0x107672)=>{_0x4790a5!==_0x45bad2['target']&&(this['focus'](),_0x107672());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x505bcf(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x3faaaf,_0x133b61,_0x1e16f6){super(_0x3faaaf,_0x133b61,_0x1e16f6),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x3faaaf,'Reply...')),this['bind']('authoredAt')['to'](_0x133b61),this['bind']('resolvedAt')['to'](_0x133b61),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 _0x95843f(_0x3faaaf,_0x133b61['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x133b61,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x10c053=this['bindTemplate'],_0x50bdb3=[{'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':_0x10c053['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x10c053['to']('authoredAt',_0x40024=>this['_config']['formatDateTime'](_0x40024))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x10c053['if']('isEditMode','ck-comment__actions--hidden'),_0x10c053['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']&&_0x50bdb3['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x10c053['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x10c053['if']('isEditMode','ck-comment--edit'),_0x10c053['if']('isSystemComment','ck-comment--info'),_0x10c053['to']('actionIndicator',_0x1b058d=>_0x1b058d?'ck-comment--'+_0x1b058d:'')],'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':_0x50bdb3}]}]};}['_createEditButton'](){const _0x2f63e5=new _0x5a263d(this['locale']);return _0x2f63e5['label']=Et(this['locale'],'Edit'),_0x2f63e5['icon']=_0xb8044e,_0x2f63e5['withText']=!0x0,_0x2f63e5['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2f63e5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5c856a=>!_0x5c856a),_0x2f63e5['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2f63e5['on']('execute',()=>this['switchToEditMode']()),_0x2f63e5;}['_createRemoveButton'](){const _0x488a62=new _0x5a263d(this['locale']);return _0x488a62['label']=Et(this['locale'],'Remove'),_0x488a62['icon']=_0x2d40b9,_0x488a62['withText']=!0x0,_0x488a62['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x488a62['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x57272d=>!_0x57272d),_0x488a62['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x488a62['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x488a62;}['_createDropdown'](){const _0x4cdc19=ct(this['locale'],_0x3bd6df),_0x43cfb1=_0x4cdc19['panelView']['children'],_0x222ba8=new ot(this['locale']),_0x4da45a=_0x4cdc19['bindTemplate'];dt(_0x4cdc19,()=>this['items']['find'](_0x5d31ca=>_0x5d31ca['isVisible'])),_0x4cdc19['extendTemplate']({'attributes':{'class':[_0x4da45a['if']('isVisible','ck-hidden',_0x354f67=>!_0x354f67)]}});const _0x56a757=(_0x80ef74,_0x314728=-0x1)=>{const _0x38ec92=new nt(this['locale']);_0x38ec92['children']['add'](_0x80ef74);const _0x5cbe6b=_0x314728>-0x1?_0x314728:_0x222ba8['items']['length'];_0x222ba8['items']['add'](_0x38ec92,_0x5cbe6b);const _0x1092ba=Array['from'](this['items']);_0x4cdc19['unbind']('isEnabled','isVisible'),_0x4cdc19['bind']('isEnabled')['toMany'](_0x1092ba,'isEnabled',(..._0x2eec7a)=>_0x2eec7a['some'](_0x518e39=>_0x518e39)),_0x4cdc19['bind']('isVisible')['toMany'](_0x1092ba,'isVisible',(..._0x513463)=>_0x513463['some'](_0x19e213=>_0x19e213));};_0x4cdc19['panelPosition']='sw',_0x4cdc19['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x4b53ab});for(const _0x46f3c3 of this['items'])_0x56a757(_0x46f3c3);return _0x43cfb1['add'](_0x222ba8),_0x4cdc19['listenTo'](this['items'],'add',(_0x43d699,_0x440b27,_0x10c33a)=>{_0x56a757(_0x440b27,_0x10c33a);}),_0x4cdc19['listenTo'](this['items'],'remove',(_0x1720dc,_0x4c784d,_0x1a2479)=>{_0x222ba8['items']['remove'](_0x1a2479);}),_0x4cdc19;}['_attachActions'](_0x12914b,_0x4764c9){const _0x474dc2=_0x12914b&&_0x12914b['element'];_0x474dc2&&(this['listenTo'](_0x474dc2,'mouseenter',()=>this['actionIndicator']=_0x4764c9),this['listenTo'](_0x474dc2,'focus',()=>this['actionIndicator']=_0x4764c9),this['listenTo'](_0x474dc2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x474dc2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x21b587=super['_createCommentInputView']();return _0x21b587['bind']('placeholder')['to'](this),_0x21b587;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0xb0dd0){const _0x3b9c66=_0x17f62c(_0xb0dd0,0x1e),_0xa76c01=new MutationObserver(_0x2d3521=>{for(const _0x24d914 of _0x2d3521)('attributes'==_0x24d914['type']&&'class'==_0x24d914['attributeName']||'childList'==_0x24d914['type']||'characterData'==_0x24d914['type'])&&_0x3b9c66();});return{'attach'(_0x40881d){_0xa76c01['observe'](_0x40881d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xa76c01['disconnect'](),_0x3b9c66['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x55bbeb,_0x33e634){super(_0x55bbeb),this['id']=_0x4ff4e9(),this['focusTracker']=new _0x46cfaf(),this['keystrokes']=new _0x44e221(),this['keystrokes']['set']('Esc',(_0x1b21c6,_0xe279e9)=>this['fire']('Esc',_0xe279e9)),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'](_0x33e634),this['mainView']=_0x33e634;const _0x261d6c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x261d6c['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 _0x1cb6e5=this['element']['clientHeight'];_0x1cb6e5&&(this['height']=_0x1cb6e5);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x4f4856();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3a1036,target:_0x2b475f,type:_0x554d91,isVisible:_0x222c15=!0x0}){super(),this['view']=_0x3a1036,this['view']['element']||this['view']['render'](),this['_type']=_0x554d91,this['_target']=_0x2b475f,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1d3c5e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1ba863,_0xd299cf)=>{this['view']['focusTracker']['add'](_0xd299cf);}),this['focusableElements']['on']('remove',(_0x1364d4,_0x69f047)=>{this['view']['focusTracker']['remove'](_0x69f047);}),this['set']('isVisible',_0x222c15);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x56842a=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x56842a),_0x56842a;}get['targetRect'](){const _0x25a390=this['target'];if(null===_0x25a390)return null;if(_0x25a390 instanceof _0x3f41c9)return _0x25a390;const _0x28e9a9=_0x25a390['filter'](_0x310ba0=>function(_0x177aac){return!!_0x177aac['offsetParent']||!!_0x177aac['getClientRects']()['item'](0x0);}(_0x310ba0));return 0x0===_0x28e9a9['length']?null:_0x3f41c9['getDomElementRects'](_0x28e9a9[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1cd855){this['view']['isActive']=_0x1cd855,this['view']['mainView']['isActive']=_0x1cd855;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x37f22a){if(!(null===_0x37f22a||_0x37f22a instanceof _0x3f41c9||Array['isArray'](_0x37f22a)&&_0x37f22a['every'](_0x3f51be=>zt(_0x3f51be))))throw new _0x460944('annotation-invalid-target',null,{'target':_0x37f22a});}['_getNormalizedTarget'](){const _0x171e7b='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x171e7b)?[_0x171e7b]:_0x171e7b;}};function zt(_0x19fa7c){return null!==_0x19fa7c&&'object'==typeof _0x19fa7c&&'nodeType'in _0x19fa7c&&0x1===_0x19fa7c['nodeType'];}var Jt=class extends _0x1d3c5e{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x53fd5d=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x46cfaf(),this['_focusTracker']['on']('change:isFocused',(_0x241bc5,_0x2ca7eb,_0x18e89f)=>{_0x18e89f||this['fire']('blur');});for(const _0x19df96 of _0x53fd5d)this['add'](_0x19df96);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3a9288){if(this['has'](_0x3a9288))throw new _0x460944('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3a9288['innerView'],_0x3a9288),this['_viewToAnnotation']['set'](_0x3a9288['view'],_0x3a9288);for(const _0x1a12d5 of _0x3a9288['focusableElements'])this['_focusTracker']['add'](_0x1a12d5);if(this['listenTo'](_0x3a9288['focusableElements'],'add',(_0x30ed70,_0x3004c3)=>{this['_focusTracker']['add'](_0x3004c3);}),this['listenTo'](_0x3a9288['focusableElements'],'remove',(_0x535a8b,_0x5d3073)=>{this['_focusTracker']['remove'](_0x5d3073);}),this['listenTo'](_0x3a9288['view']['focusTracker'],'change:isFocused',(_0x28f5d9,_0x528f86,_0x155003)=>{_0x155003&&this['fire']('focus',_0x3a9288);}),_0x3a9288['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x10e392 of this)_0x10e392['updateTargetRect']();}const _0x32571d=this['_getOrderInContent'](_0x3a9288['view']['targetRect']);return super['add'](_0x3a9288,_0x32571d);}['remove'](_0x55405e){if(!this['has'](_0x55405e))throw new _0x460944('annotationcollection-not-existing-item',null);this['stopListening'](_0x55405e['view']['focusTracker']),this['stopListening'](_0x55405e['focusableElements']);for(const _0x122a2d of _0x55405e['focusableElements'])this['_focusTracker']['remove'](_0x122a2d);return this['_viewToAnnotation']['delete'](_0x55405e['view']),this['_innerViewToAnnotation']['delete'](_0x55405e['innerView']),super['remove'](_0x55405e);}['getByInnerView'](_0x13993c){return this['_innerViewToAnnotation']['get'](_0x13993c);}['getByView'](_0x563103){return this['_viewToAnnotation']['get'](_0x563103);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x44ba46 of this)_0x44ba46['updateTargetRect']();this['_sort']();}['_sort'](){const _0x45b55=Array['from'](this)['sort']((_0x4bd9d6,_0x27edec)=>Zt(_0x4bd9d6['view']['targetRect'],_0x27edec['view']['targetRect']));for(let _0xedf91d=_0x45b55['length']-0x1;_0xedf91d>0x0;_0xedf91d--){const _0x47f137=_0x45b55[_0xedf91d];_0xedf91d!==this['getIndex'](_0x47f137)&&(this['remove'](_0x47f137),this['add'](_0x47f137));}}['_getOrderInContent'](_0x2795af){let _0x1b2872=0x0;if(!_0x2795af)return this['length'];for(const _0x47cbfe of this){const _0x444264=_0x47cbfe['view']['targetRect'];if(_0x444264){if(Zt(_0x2795af,_0x444264)<0x0)return _0x1b2872;_0x1b2872++;}}return _0x1b2872;}['_areCachedRectsStale'](){const _0x135955=this['get'](0x0);if(!_0x135955)return!0x1;const _0x2c5bb1=_0x135955['view']['targetRect'],_0x16e21a=_0x135955['targetRect'];return!(!_0x2c5bb1||!_0x16e21a)&&(_0x2c5bb1['top']!==_0x16e21a['top']||_0x2c5bb1['left']!==_0x16e21a['left']);}};function Qt({source:_0x334f1c,target:_0x194053,filter:_0x4aa610}){for(const _0x2103ad of _0x334f1c)_0x4aa610(_0x2103ad)&&_0x194053['add'](_0x2103ad);_0x194053['listenTo'](_0x334f1c,'add',(_0x468599,_0x1079c7)=>{_0x4aa610(_0x1079c7)&&_0x194053['add'](_0x1079c7);}),_0x194053['listenTo'](_0x334f1c,'remove',(_0x21e59b,_0x2ab17e)=>{_0x194053['has'](_0x2ab17e)&&_0x194053['remove'](_0x2ab17e);});}function Zt(_0x1b5159,_0x1b4dc2){if(null===_0x1b5159&&null===_0x1b4dc2)return 0x0;if(null===_0x1b5159)return-0x1;if(null===_0x1b4dc2)return 0x1;const _0x25924d=_0x1b5159['top']-_0x1b4dc2['top'];return 0x0==_0x25924d?_0x1b5159['left']-_0x1b4dc2['left']:_0x25924d;}var ti=class extends _0x5d945e{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x122b18){if(super(_0x122b18),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x122b18 instanceof _0x8c9b70){const _0x589a94=_0x122b18['locale'];_0x122b18['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x589a94,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4a0a73){this['collection']['add'](_0x4a0a73);}['remove'](_0x5bc3e2){this['collection']['remove'](_0x5bc3e2),_0x5bc3e2['destroy']();}['refreshVisibility'](){for(const _0x23c9de of this['collection'])_0x23c9de['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1f3cdc){return this['collection']['getByInnerView'](_0x1f3cdc);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x217e62 of this['collection'])_0x217e62['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x49decc){this['fire']('_activateAnnotation',_0x49decc);}['createAnnotation'](_0x3547dd){return new $t(_0x3547dd);}['createAnnotationView'](_0x5e875e,_0x26dac7){return new qt(_0x5e875e,_0x26dac7);}['_addActiveAnnotation'](_0x4bc73d){const _0x39b5ed=new Set(this['activeAnnotations']);_0x39b5ed['add'](_0x4bc73d),this['activeAnnotations']=_0x39b5ed;}['_removeActiveAnnotation'](_0x2551a5){const _0x52f468=new Set(this['activeAnnotations']);_0x52f468['delete'](_0x2551a5),this['activeAnnotations']=_0x52f468;}['_bindAnnotationsToVisibleAnnotations'](){const _0x269f6f=this['collection'],_0x497aff=this['_visibleAnnotations'];function _0x5d2a7d(_0x2827a3){const _0x32cd6d=_0x2827a3['source'];_0x32cd6d['isVisible']&&!_0x497aff['has'](_0x32cd6d)?_0x497aff['add'](_0x32cd6d):!_0x32cd6d['isVisible']&&_0x497aff['has'](_0x32cd6d)&&_0x497aff['remove'](_0x32cd6d),_0x32cd6d['view']['focusTracker']['remove'](_0x32cd6d['view']['element']),_0x32cd6d['view']['focusTracker']['add'](_0x32cd6d['view']['element']);}this['listenTo'](_0x269f6f,'add',(_0x89dce0,_0x141bdf)=>{_0x141bdf['isVisible']&&_0x497aff['add'](_0x141bdf),this['listenTo'](_0x141bdf,'change:isVisible',_0x5d2a7d);}),this['listenTo'](_0x269f6f,'remove',(_0x1cb60a,_0x4b4da3)=>{_0x497aff['has'](_0x4b4da3)&&_0x497aff['remove'](_0x4b4da3),this['stopListening'](_0x4b4da3,'change:isVisible',_0x5d2a7d);});}['_setupEnterAnnotationKeystroke'](){const _0x11d9e5=_0x3b2fca=>{_0x3b2fca['on']('ready',()=>{_0x3b2fca['keystrokes']['set'](_0x4e8a21,(_0x430587,_0x37f283)=>{const _0x418479=_0x1a2afb(this['activeAnnotations']['values']());_0x418479&&(_0x418479['view']['focus'](),_0x37f283());});});};this['context']instanceof _0x8c9b70?_0x11d9e5(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x569376,_0x5a4d54)=>{_0x11d9e5(_0x5a4d54);});}['_setupEscapeAnnotationHandling'](){const _0x7d781=_0x3b3e8e=>{const _0x5eb3ca=_0x3b3e8e['source'],_0x4598cc=[];let _0x2adad9;if(Array['isArray'](_0x5eb3ca['target'])){_0x2adad9=_0x5eb3ca['target'][0x0],this['context']instanceof _0x8c9b70?_0x4598cc['push'](this['context']):this['context']['editors']&&_0x4598cc['push'](...this['context']['editors']);for(const _0x1edfc8 of _0x4598cc)for(const _0x168984 of _0x1edfc8['editing']['view']['domRoots']['values']())if(_0x168984['contains'](_0x2adad9))return void _0x1edfc8['editing']['view']['focus']();_0x2adad9['focus']();}};this['listenTo'](this['collection'],'add',(_0x4a1eb1,_0x16f043)=>{this['listenTo'](_0x16f043,'escape',_0x7d781,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x53f1e1,_0x14afe3)=>{this['stopListening'](_0x14afe3,'escape',_0x7d781);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x4f4856(),ni=/* #__PURE__ -- @preserve */
31
+ _0x4f4856();var oi=class extends _0x5d945e{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x4019cf,_0x5d61c1];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x27c564){super(_0x27c564),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5d2086=this['context']['config'];_0x5d2086['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5d2086['define']('comments.maxThreadTotalWeight',0x1f4),_0x5d2086['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5d2086['define']('comments.CommentThreadView',Ut),_0x5d2086['define']('comments.CommentView',Yt),_0x5d2086['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4d885e=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x20382f,_0x49c43c)=>this['_addCommentThread'](_0x49c43c)),this['on']('submitCommentThread',(_0x4b20d5,_0x166e63)=>this['_submitCommentThread'](_0x166e63)),this['on']('resolveCommentThread',(_0x17bc49,_0x18a096)=>this['_resolveCommentThread'](_0x18a096)),this['on']('resolveCommentThread',(_0x558800,_0x31e1c2)=>this['_updateActiveAnnotation'](_0x31e1c2),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x57f57c,_0x58c645)=>this['_reopenCommentThread'](_0x58c645)),this['on']('reopenCommentThread',(_0xa0886,_0x2662b2)=>this['_updateActiveAnnotation'](_0x2662b2),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3fc8fc,_0x184a94)=>this['_removeCommentThread'](_0x184a94)),this['on']('updateCommentThread',(_0x2d21aa,_0x5af93e)=>this['_updateCommentThread'](_0x5af93e)),this['on']('updateCommentThread',(_0x7808a0,_0x2603b0)=>this['_updateActiveAnnotation'](_0x2603b0),{'priority':'lowest'}),this['on']('addComment',(_0x46fb25,_0x20364f)=>this['_addComment'](_0x20364f)),this['on']('updateComment',(_0x298419,_0xd96fb6)=>this['_updateComment'](_0xd96fb6)),this['on']('removeComment',(_0x2baf26,_0x5ce2b1)=>this['_removeComment'](_0x5ce2b1)),this['on']('addComment',(_0x3b2938,{threadId:_0x20c2c9,isFromAdapter:_0x2b5463})=>{if(_0x2b5463)return;const _0x4e5b0d=this['getCommentThread'](_0x20c2c9),_0x19655f=_0x4e5b0d&&this['_threadToController']['get'](_0x4e5b0d);_0x19655f&&_0x19655f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4d885e,'change:activeAnnotations',(_0x1fe4a0,_0x18157a,_0x4364c8)=>{const _0x465be1=Array['from'](_0x4364c8)['map'](_0x31d11e=>this['_viewToController']['get'](_0x31d11e['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x465be1?_0x465be1['model']:null;});}set['adapter'](_0x1bd9db){if(this['_adapter'])throw new _0x460944('commentsrepository-adapter-already-set');this['_adapter']=_0x1bd9db;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3ba01f=ii,threadId:_0x45b9b5=_0x4ff4e9(),comments:_0x5cd4a0=[],unlinkedAt:_0x2e7fac=null,resolvedAt:_0x58da71=null,resolvedBy:_0x459a20=null,target:_0x5d8f9c=null,context:_0x5a2450=null,attributes:_0x541cad={},isResolvable:_0x50b5e2=!0x0,isSubmitted:_0x7641c9=!0x1,isFromAdapter:_0x5e722c=!0x1}={}){return this['fire'](ai('addCommentThread',_0x3ba01f),{'channelId':_0x3ba01f,'threadId':_0x45b9b5,'comments':_0x5cd4a0,'unlinkedAt':_0x2e7fac,'resolvedAt':_0x58da71,'resolvedBy':_0x459a20,'target':_0x5d8f9c,'context':_0x5a2450,'attributes':_0x541cad,'isFromAdapter':_0x5e722c,'isResolvable':_0x50b5e2,'isSubmitted':_0x7641c9}),this['getCommentThread'](_0x45b9b5);}['openNewCommentThread']({channelId:_0x5afac6=ii,threadId:_0x4d5095=_0x4ff4e9(),target:_0x100565,context:_0x23f866=null,isResolvable:_0x2a7782=!0x0}){if(this['_readOnlyChannels']['has'](_0x5afac6)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x100565)throw new _0x460944('commentsrepository-missing-target');const _0x3ddf97=this['addCommentThread']({'channelId':_0x5afac6,'threadId':_0x4d5095,'target':_0x100565,'context':_0x23f866,'isResolvable':_0x2a7782});if(!_0x3ddf97)return null;const _0x1b71f2=this['_threadToController']['get'](_0x3ddf97),_0x3dadfd=_0x1b71f2['view']['commentThreadInputView']['commentInputView'],_0x15fc39=this['context']['plugins']['get'](ti),_0x498e91=_0x15fc39['getByInnerView'](_0x1b71f2['view']);return _0x15fc39['activate'](_0x498e91),_0x3dadfd['once']('editorReady',()=>_0x3dadfd['focus']()),_0x3ddf97;}['hasCommentThread'](_0x172298){if('string'!=typeof _0x172298)throw new _0x460944('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x172298);}['updateCommentThread']({channelId:_0x974ae6=ii,threadId:_0x39b369,context:_0x2b8ba3,unlinkedAt:_0x158c61,attributes:_0x4d1b0d,isFromAdapter:_0x49ebbf=!0x1}){return this['fire'](ai('updateCommentThread',_0x974ae6),{'channelId':_0x974ae6,'threadId':_0x39b369,'context':_0x2b8ba3,'unlinkedAt':_0x158c61,'attributes':_0x4d1b0d,'isFromAdapter':_0x49ebbf}),this['getCommentThread'](_0x39b369);}['getCommentThread'](_0x5a1335){if('string'!=typeof _0x5a1335)throw new _0x460944('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5a1335);}['fetchCommentThread']({channelId:_0x14ddfb,threadId:_0x135e28}={}){const _0x27f9e3=this['getCommentThread'](_0x135e28);if(_0x27f9e3)return Promise['resolve'](_0x27f9e3);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x460944('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x14ddfb,'threadId':_0x135e28})['then'](_0x35113a=>this['hasCommentThread'](_0x135e28)?this['getCommentThread'](_0x135e28):_0x35113a?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x14ddfb},_0x35113a)):void 0x0)['catch'](_0x57dcd3=>{throw console['error'](_0x57dcd3),new _0x460944('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x25ea81,skipNotAttached:_0x35ad2f=!0x1,skipEmpty:_0x3dcc3d=!0x1,toJSON:_0x2d19ac=!0x1}={}){const _0x101399=[];for(const _0x1a5a42 of this['_threads']['values']())_0x25ea81&&_0x1a5a42['channelId']!==_0x25ea81||_0x35ad2f&&!_0x1a5a42['isAttached']||_0x3dcc3d&&0x0===_0x1a5a42['length']||_0x101399['push'](_0x1a5a42);return _0x2d19ac?_0x101399['map'](_0x5b7838=>_0x5b7838['toJSON']()):_0x101399;}['getAnnotationForCommentThread'](_0x1a3136){const _0x4bca85=this['_threadToController']['get'](_0x1a3136);return _0x4bca85&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x4bca85['view'])||null;}['getCommentThreadForAnnotation'](_0x155a04){const _0x5cc7d7=this['_viewToController']['get'](_0x155a04['innerView']);return _0x5cc7d7?_0x5cc7d7['model']:null;}['setActiveCommentThread'](_0x14ba3f){const _0x5411a2=this['context']['plugins']['get'](ti);if(!_0x14ba3f)return void(this['activeCommentThread']&&_0x5411a2['deactivateAll']());const _0x516ed2=this['getCommentThread'](_0x14ba3f);if(!_0x516ed2)throw new _0x460944('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x14ba3f});if(!this['_threadToController']['has'](_0x516ed2))throw new _0x460944('commentsrepository-active-not-attached',null,{'threadId':_0x14ba3f});const _0x35df2b=_0x5411a2['getByInnerView'](this['_threadToController']['get'](_0x516ed2)['view']);_0x5411a2['activate'](_0x35df2b);}['switchReadOnly'](_0x5a6656,_0x363e25){_0x5a6656?this['_readOnlyChannels']['add'](_0x363e25):this['_readOnlyChannels']['delete'](_0x363e25),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x201cbf){return this['_readOnlyChannels']['has'](_0x201cbf)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x333abe,_0x51e2fe){return new bt(_0x333abe,_0x51e2fe);}['setPermissions'](_0x4f95d0,_0x2d83d5=ii){this['_permissions']['set'](_0x2d83d5,_0x4f95d0),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x30b611=ii){return this['_permissions']['has'](_0x30b611)?this['_permissions']['get'](_0x30b611):ei;}['_addCommentThread']({channelId:_0x8f635a,threadId:_0x22c83e,comments:_0x1101de,unlinkedAt:_0x1d21cd,resolvedAt:_0x5a1748,resolvedBy:_0x44701f,target:_0x30291a,context:_0x4b789c,attributes:_0x39594a,isFromAdapter:_0x179852,isResolvable:_0xbc433c,isSubmitted:_0x8d16ac}){if('string'!=typeof _0x22c83e)throw new _0x460944('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x22c83e});if(this['hasCommentThread'](_0x22c83e))throw new _0x460944('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x22c83e});const _0x94b4e7=new ri(this,{'channelId':_0x8f635a,'id':_0x22c83e,'context':_0x4b789c,'attributes':_0x39594a,'unlinkedAt':_0x1d21cd,'resolvedAt':_0x5a1748,'resolvedBy':_0x44701f?this['context']['plugins']['get'](_0x5d61c1)['getUser'](_0x44701f):null,'isResolvable':_0xbc433c,'isSubmitted':_0x8d16ac||_0x179852});this['_threads']['set'](_0x22c83e,_0x94b4e7);for(const _0x5b8b97 of _0x1101de)_0x94b4e7['_add'](this['_createNewComment']({'threadId':_0x22c83e,..._0x5b8b97}));return _0x30291a&&_0x94b4e7['attachTo'](_0x30291a),_0x179852||!_0x94b4e7['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x8f635a,'threadId':_0x22c83e});}['_submitCommentThread']({channelId:_0x2ce4f7,threadId:_0x271c4e}){if(!this['hasCommentThread'](_0x271c4e))throw new _0x460944('commentsrepository-missing-comment-thread',this);const _0x2e2860=this['getCommentThread'](_0x271c4e);if(_0x2e2860['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x290b6a,comments:_0xaf6a88,resolvedAt:_0x3eb9ee,resolvedBy:_0x26fc8a,context:_0x5b1402,attributes:_0x11aa9b}=_0x2e2860,_0x6b0c5b=this['context']['plugins']['get']('PendingActions'),_0x333678=_0x6b0c5b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2ce4f7,'threadId':_0x290b6a,'comments':_0xaf6a88['map'](_0x48cad1=>_0x48cad1['toJSON']()),'resolvedAt':_0x3eb9ee,'resolvedBy':_0x26fc8a?_0x26fc8a['id']:_0x26fc8a,'context':_0x5b1402,'attributes':_0x11aa9b})['then'](({comments:_0x283820})=>{_0x6b0c5b['remove'](_0x333678);for(const _0x25f4d9 of _0x283820)this['_updateComment']({'channelId':_0x2ce4f7,'threadId':_0x271c4e,'commentId':_0x25f4d9['commentId'],'createdAt':_0x25f4d9['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x7865e0=>{throw console['error'](_0x7865e0),new _0x460944('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x54cd8a,target:_0x42475c}){const _0x338cf7=this['getCommentThread'](_0x54cd8a);if(!_0x338cf7)throw new _0x460944('commentsrepository-attach-missing-comment-thread',this);const _0x28f52a=this['context']['plugins']['get']('PendingActions'),_0x4ce622=this['context']['plugins']['get'](ti),_0x5d1eb6=this['_createCommentThreadView'](_0x338cf7),_0x27374b=new bt(_0x338cf7,_0x5d1eb6);let _0x13cec0=null;_0x5d1eb6['on']('change:isDirty',(_0x2a8205,_0xc84226,_0x502c6a)=>{_0x502c6a?_0x13cec0=_0x28f52a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x13cec0&&(_0x28f52a['remove'](_0x13cec0),_0x13cec0=null);}),this['_threadToController']['set'](_0x338cf7,_0x27374b),this['_viewToController']['set'](_0x5d1eb6,_0x27374b);const _0x291f0f=new qt(this['context']['locale'],_0x5d1eb6);_0x291f0f['bind']('length')['to'](_0x5d1eb6),_0x291f0f['bind']('isDirty')['to'](_0x5d1eb6,'isDirty',_0x5d1eb6,'length',(_0x44a78e,_0x15e4c0)=>_0x44a78e||!_0x15e4c0),_0x291f0f['bind']('isActive')['to'](_0x5d1eb6),_0x291f0f['type']='comment';const _0xa14c4f=new $t({'view':_0x291f0f,'target':_0x42475c,'type':'comment','isVisible':!_0x338cf7['archivedAt']&&!!('function'==typeof _0x42475c?_0x42475c():_0x42475c)});return _0x5d1eb6['on']('escape',()=>{_0xa14c4f['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5d1eb6,_0xa14c4f),_0x4ce622['add'](_0xa14c4f),_0xa14c4f;}['_bindAnnotationToEditors'](_0x313683,_0x576f86){this['listenTo'](_0x313683,'editorReady',(_0x4e1265,_0x49f927)=>{const _0x11093a=_0x49f927['ui']['view']['body']['bodyCollectionContainer'];_0x576f86['focusableElements']['add'](_0x11093a),this['context']instanceof _0x8c9b70&&this['context']['ui']['focusTracker']['add'](_0x11093a);},{'priority':'highest'}),this['listenTo'](_0x313683,'editorDestroyed',(_0x597612,_0x476cfe)=>{const _0x125ed6=_0x476cfe['ui']['view']['body']['bodyCollectionContainer'];_0x576f86['focusableElements']['has'](_0x125ed6)&&_0x576f86['focusableElements']['remove'](_0x125ed6),this['context']instanceof _0x8c9b70&&this['context']['ui']['focusTracker']['remove'](_0x125ed6);});}['_unbindEditors'](_0x3860b0){this['stopListening'](_0x3860b0,'editorReady'),this['stopListening'](_0x3860b0,'editorDestroyed');}['_createCommentThreadView'](_0x563a61){const _0x321ecb=this['context']['plugins']['get'](_0x5d61c1),{config:_0xb4ae0a,locale:_0xbf1e0}=this['context'],_0x10fefd=_0x5b4e92(_0xb4ae0a['get']('locale'),_0xbf1e0);return new(0x0,(_0xb4ae0a['get']('comments'))['CommentThreadView'])(_0xbf1e0,_0x563a61,_0x321ecb['me'],{'editorConfig':{..._0xb4ae0a['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xb4ae0a['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xb4ae0a['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xb4ae0a['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xb4ae0a['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x10fefd,'CommentView':_0xb4ae0a['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x36d6ac,channelId:_0x161f3f,resolvedAt:_0x424123,resolvedBy:_0x315ccc,isFromAdapter:_0x357fbf}){if(!this['hasCommentThread'](_0x36d6ac))throw new _0x460944('commentsrepository-missing-comment-thread',null,{'threadId':_0x36d6ac});const _0x207d7f=this['getCommentThread'](_0x36d6ac);if(_0x207d7f['isResolved'])throw new _0x460944('commentsrepository-resolved-comment-thread',null,{'threadId':_0x36d6ac});const _0x2c7882=this['context']['plugins']['get'](_0x5d61c1);if(_0x207d7f['resolvedBy']=_0x2c7882['getUser'](_0x315ccc),_0x207d7f['resolvedAt']=_0x424123,_0x357fbf||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1be579=this['context']['plugins']['get']('PendingActions'),_0x448d17=_0x1be579['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x161f3f,'threadId':_0x36d6ac})['then'](({resolvedAt:_0x54fc7d,resolvedBy:_0xe6bf8a})=>{_0x1be579['remove'](_0x448d17),_0x207d7f['resolvedBy']['id']!==_0xe6bf8a&&(_0x207d7f['resolvedBy']=_0x2c7882['getUser'](_0xe6bf8a)),_0x207d7f['resolvedAt']=_0x54fc7d;})['catch'](_0x17bb95=>{throw console['error'](_0x17bb95),new _0x460944('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0xd87127,channelId:_0x9ba8c,isFromAdapter:_0x5e399e}){if(!this['hasCommentThread'](_0xd87127))throw new _0x460944('commentsrepository-missing-comment-thread',null,{'threadId':_0xd87127});const _0x228a79=this['getCommentThread'](_0xd87127);if(!_0x228a79['isResolved'])throw new _0x460944('commentsrepository-reopen-comment-thread',null,{'threadId':_0xd87127});if(_0x228a79['resolvedBy']=null,_0x228a79['resolvedAt']=null,_0x5e399e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1d8126=this['context']['plugins']['get']('PendingActions'),_0x35aa99=_0x1d8126['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x9ba8c,'threadId':_0xd87127})['then'](()=>_0x1d8126['remove'](_0x35aa99))['catch'](_0x58b2e1=>{throw console['error'](_0x58b2e1),new _0x460944('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2648e2,isFromAdapter:_0x341e94}){const _0x485c71=this['getCommentThread'](_0x2648e2);if(!_0x485c71)throw new _0x460944('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2648e2),this['_threads']['delete'](_0x2648e2),!_0x485c71['isSubmitted']||_0x341e94||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x25c4fe=this['context']['plugins']['get']('PendingActions'),{channelId:_0x428c00}=_0x485c71,_0x3f903c=_0x25c4fe['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x428c00,'threadId':_0x2648e2})['then'](()=>_0x25c4fe['remove'](_0x3f903c))['catch'](_0xc8620c=>{throw console['error'](_0xc8620c),new _0x460944('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4ebe43,unlinkedAt:_0x3988fe,context:_0x301d2c,attributes:_0x5631d6,isFromAdapter:_0x1dbf54}){if('string'!=typeof _0x4ebe43)throw new _0x460944('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4ebe43});if(!this['hasCommentThread'](_0x4ebe43))throw new _0x460944('commentsrepository-missing-comment-thread',null,{'threadId':_0x4ebe43});const _0x536ed4=this['getCommentThread'](_0x4ebe43);let _0x8ea661=!0x1;if(void 0x0!==_0x301d2c&&_0x536ed4['context']!==_0x301d2c&&(_0x536ed4['context']=_0x301d2c,_0x8ea661=!0x0),void 0x0!==_0x3988fe&&_0x536ed4['unlinkedAt']!==_0x3988fe&&(_0x536ed4['unlinkedAt']=_0x3988fe,_0x8ea661=!0x0),_0x5631d6&&!_0x440498(_0x5631d6,_0x536ed4['attributes'])&&(_0x536ed4['attributes']=_0x5631d6,_0x8ea661=!0x0),!_0x8ea661)return Promise['resolve']();if(!_0x536ed4['isSubmitted']||_0x1dbf54||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4cd8e7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3886b7}=_0x536ed4,_0x3d3d27=_0x4cd8e7['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3886b7,'threadId':_0x4ebe43,'context':_0x301d2c,'unlinkedAt':_0x3988fe,'attributes':_0x5631d6})['then'](()=>_0x4cd8e7['remove'](_0x3d3d27))['catch'](_0x26b681=>{throw console['error'](_0x26b681),new _0x460944('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x6c0cf5){const _0x524401=this['context']['plugins']['get'](ti),_0xd5d2d4=this['getCommentThread'](_0x6c0cf5);if(_0xd5d2d4['_isAttached']=!0x1,this['_threadToController']['has'](_0xd5d2d4)){const _0x481f4=this['_threadToController']['get'](_0xd5d2d4),_0x3a8983=_0x481f4['view'],_0x56bc93=_0x524401['getByInnerView'](_0x3a8983);this['_threadToController']['delete'](_0xd5d2d4),this['_viewToController']['delete'](_0x3a8983),_0x56bc93&&_0x524401['remove'](_0x56bc93),_0x481f4['destroy'](),_0x3a8983['destroy']()['then'](()=>{this['_unbindEditors'](_0x3a8983);});}}['_updateActiveAnnotation']({threadId:_0x314c27,resolvedAt:_0x51a036,unlinkedAt:_0xc11b7a}){const _0x4b5391=!!_0x51a036,_0x157aa7=this['context']['plugins']['get'](ti),_0x45d902=this['getCommentThread'](_0x314c27);if(this['_threadToController']['has'](_0x45d902)){const _0x4f2fef=this['_threadToController']['get'](_0x45d902)['view'],_0x2cbadb=_0x157aa7['getByInnerView'](_0x4f2fef);_0x2cbadb&&(_0x4b5391&&_0x157aa7['_removeActiveAnnotation'](_0x2cbadb),_0xc11b7a?_0x2cbadb['isVisible']=!0x1:_0x2cbadb['refreshVisibility']());}}['_getExternalAuthor'](_0x27a6ae){const _0x258a05=this['context']['plugins']['get'](_0x5d61c1),_0x485504=_0x5ab5a3('external:'+_0x27a6ae),_0x4c685b=_0x258a05['getUser'](_0x485504);return _0x4c685b||_0x258a05['addUser']({'id':_0x485504,'name':_0x27a6ae});}['_createNewComment']({threadId:_0x5a5d10,commentId:_0x267bfc=_0x4ff4e9(),content:_0x366901,authorId:_0x1271cb,createdAt:_0x3d9381,attributes:_0x186c04}){if('string'!=typeof _0x267bfc)throw new _0x460944('commentsrepository-invalid-commentid');if('string'!=typeof _0x1271cb)throw new _0x460944('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x366901||!_0x366901['trim']())throw new _0x460944('commentsrepository-invalid-comment-content');const _0x5e992c=this['context']['plugins']['get'](_0x5d61c1)['getUser'](_0x1271cb);if(!_0x5e992c)throw new _0x460944('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1271cb});let _0x318f33=null,_0x4567a9=_0x3d9381;return _0x186c04?.['@external']&&(_0x318f33=this['_getExternalAuthor'](_0x186c04['@external']['authorName']),_0x4567a9=new Date(_0x186c04['@external']['createdAt'])),new hi(this,{'threadId':_0x5a5d10,'id':_0x267bfc,'author':_0x318f33||_0x5e992c,'creator':_0x5e992c,'content':_0x366901,'createdAt':_0x3d9381,'authoredAt':_0x4567a9,'attributes':_0x186c04});}['_addComment'](_0x570400){let {threadId:_0x5bad59,content:_0x37ecf9,attributes:_0x1cda9a,isFromAdapter:_0x15f8cb}=_0x570400;const _0x4c8a5f=this['getCommentThread'](_0x570400['threadId']);if(!_0x4c8a5f)throw new _0x460944('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x7157c9=this['_createNewComment'](_0x570400),{id:_0xe43a60}=_0x7157c9;if(_0x4c8a5f['_add'](_0x7157c9),_0x15f8cb||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4c8a5f['isSubmitted'])return Promise['resolve']();const _0x299b7d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x69c78c}=_0x4c8a5f,_0x3a1049=_0x299b7d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1cda9a||(_0x1cda9a={}),this['adapter']['addComment']({'channelId':_0x69c78c,'threadId':_0x5bad59,'commentId':_0xe43a60,'content':_0x37ecf9,'attributes':_0x1cda9a})['then'](_0x3900fe=>{_0x299b7d['remove'](_0x3a1049),_0x3900fe&&this['_updateComment']({'channelId':_0x69c78c,'threadId':_0x5bad59,'commentId':_0xe43a60,'createdAt':_0x3900fe['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3d890b=>{throw console['error'](_0x3d890b),new _0x460944('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x17410e,commentId:_0x275c12,content:_0x14d6b2,createdAt:_0x4230f5,attributes:_0x1a2884,isFromAdapter:_0x31c31e}){if(void 0x0!==_0x14d6b2&&('string'!=typeof _0x14d6b2||!_0x14d6b2['trim']()['length']))throw new _0x460944('commentsrepository-update-comment-invalid-content');const _0x5a42c2=this['getCommentThread'](_0x17410e),_0x5d51f6=_0x5a42c2['getComment'](_0x275c12);if(!_0x5d51f6)throw new _0x460944('commentsrepository-update-missing-comment',this);let _0x3591ba=!0x1;if(_0x14d6b2&&_0x14d6b2!==_0x5d51f6['content']&&(_0x5d51f6['isEditable']||_0x31c31e)&&(_0x5d51f6['content']=_0x14d6b2,_0x3591ba=!0x0),_0x4230f5&&_0x4230f5!==_0x5d51f6['createdAt']&&(_0x5d51f6['createdAt']=_0x4230f5,_0x5d51f6['isExternal']||(_0x5d51f6['authoredAt']=_0x4230f5),_0x3591ba=!0x0),_0x1a2884&&!_0x440498(_0x1a2884,_0x5d51f6['attributes'])&&(_0x5d51f6['attributes']=_0x1a2884,_0x3591ba=!0x0),!_0x3591ba)return Promise['resolve']();if(_0x5a42c2['fire']('commentUpdated'),_0x31c31e||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5a430d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x45760d}=this['getCommentThread'](_0x5d51f6['threadId']),_0x107a66=_0x5a430d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x45760d,'threadId':_0x17410e,'commentId':_0x275c12,'content':_0x14d6b2,'attributes':_0x1a2884})['then'](()=>_0x5a430d['remove'](_0x107a66))['catch'](_0x43f147=>{throw console['error'](_0x43f147),new _0x460944('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3bdd47,commentId:_0x31f638,isFromAdapter:_0x26dba4}){const _0x4608e0=this['getCommentThread'](_0x3bdd47),_0x44e995=_0x4608e0['getComment'](_0x31f638);if(!_0x44e995)throw new _0x460944('commentsrepository-remove-missing-comment',this);if(_0x4608e0['_remove'](_0x44e995),_0x26dba4||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2e9546=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d588d}=_0x4608e0,_0xd10c9=_0x2e9546['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3d588d,'threadId':_0x3bdd47,'commentId':_0x31f638})['then'](()=>_0x2e9546['remove'](_0xd10c9))['catch'](_0x4467f3=>{throw console['error'](_0x4467f3),new _0x460944('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x70eb2c,_0x5a4bcf){super();const _0x5e12aa=_0x5a4bcf['isResolvable'];this['channelId']=_0x5a4bcf['channelId'],this['id']=_0x5a4bcf['id'],this['comments']=new _0x1d3c5e(),this['_repository']=_0x70eb2c,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5a4bcf['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x70eb2c,'_permissions',_0x70eb2c,'_readOnlyChannels',()=>_0x70eb2c['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x70eb2c,'_permissions',()=>_0x70eb2c['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x70eb2c,'_permissions',()=>{const _0x8de44=_0x70eb2c['getPermissions'](this['channelId']);return _0x8de44['write']||_0x8de44['admin'];}),this['bind']('isResolvable')['to'](_0x70eb2c,'_permissions',()=>_0x5e12aa&&_0x70eb2c['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5a4bcf['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0xd9d9db,_0x76fa27)=>_0xd9d9db?_0x76fa27?_0xd9d9db<_0x76fa27?_0xd9d9db:_0x76fa27:_0xd9d9db:_0x76fa27),this['set']('unlinkedAt',_0x5a4bcf['unlinkedAt']||null),this['set']('resolvedAt',_0x5a4bcf['resolvedAt']||null),this['set']('resolvedBy',_0x5a4bcf['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1aacd2=>!!_0x1aacd2),this['set']('attributes',_0x5a4bcf['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x4d8740,_0x4db0cc)=>_0x4d8740+_0x4db0cc['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x10a4ff,id:_0x998ad}=this;this['_repository']['fire'](ai('submitCommentThread',_0x10a4ff),{'channelId':_0x10a4ff,'threadId':_0x998ad});}['setUnlinkedAt'](_0x400c43){this['_update']({'unlinkedAt':_0x400c43});}['resolve']({resolvedAt:_0x5897bb=new Date(),resolvedBy:_0x26c599='',isFromAdapter:_0x156747=!0x1}={}){const _0x4fd281=this['_repository']['context']['plugins']['get'](_0x5d61c1)['me'],{channelId:_0x3166af,id:_0x54f193}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x3166af),{'channelId':_0x3166af,'threadId':_0x54f193,'resolvedAt':_0x5897bb,'resolvedBy':_0x26c599||_0x4fd281['id'],'isFromAdapter':_0x156747});}['reopen']({isFromAdapter:_0x36ddf0=!0x1}={}){const {channelId:_0x47da46,id:_0x19de0b}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x47da46),{'channelId':_0x47da46,'threadId':_0x19de0b,'isFromAdapter':_0x36ddf0});}['setContext'](_0x43dff8){this['context']||this['_update']({'context':_0x43dff8});}['setAttribute'](_0x40bccb,_0x32c85e){const _0x35a0d7=_0x172f46(this['attributes']);_0x4f2003(_0x35a0d7,_0x40bccb,_0x32c85e),this['_update']({'attributes':_0x35a0d7});}['removeAttribute'](_0x580dc9){const _0x38e961=_0x172f46(this['attributes']);_0x59ab04(_0x38e961,_0x580dc9),this['_update']({'attributes':_0x38e961});}['remove']({isFromAdapter:_0x500e8a=!0x1}={}){const {channelId:_0x560ee6,id:_0x6f00bb}=this;this['_repository']['fire'](ai('removeCommentThread',_0x560ee6),{'channelId':_0x560ee6,'threadId':_0x6f00bb,'isFromAdapter':_0x500e8a});}['attachTo'](_0x3c836a){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x3c836a});}['addComment'](_0x44ce53){const {channelId:_0x280c1d,id:_0x632580}=this;this['_repository']['fire'](ai('addComment',_0x280c1d,_0x632580),Object['assign']({'channelId':_0x280c1d,'threadId':_0x632580},_0x44ce53));}['getComment'](_0x450ae7){if('string'!=typeof _0x450ae7)throw new _0x460944('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x450ae7});return this['comments']['get'](_0x450ae7);}['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'](_0xfbcd82=>_0xfbcd82['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4650ce){return this['listenTo'](_0x4650ce,'change:authoredAt',()=>{const _0x5220dd=this['_findOptimalIndex'](_0x4650ce),_0x2fd4fc=this['comments'];_0x5220dd-0x1!=_0x2fd4fc['getIndex'](_0x4650ce)&&_0x5220dd+0x1!=_0x2fd4fc['getIndex'](_0x4650ce)&&(this['_remove'](_0x4650ce),this['_add'](_0x4650ce));}),this['comments']['add'](_0x4650ce,this['_findOptimalIndex'](_0x4650ce));}['_update'](_0x324099){const {channelId:_0xcbb0d2,id:_0x21bbe2}=this;this['_repository']['fire'](ai('updateCommentThread',_0xcbb0d2),{..._0x324099,'channelId':_0xcbb0d2,'threadId':_0x21bbe2});}['_remove'](_0x441ffa){return this['stopListening'](_0x441ffa),_0x441ffa['destroy'](),this['comments']['remove'](_0x441ffa);}['_findOptimalIndex'](_0x3e02ce){const _0x497d43=this['comments']['find'](_0x5a804e=>new Date(_0x5a804e['authoredAt'])['getTime']()>new Date(_0x3e02ce['authoredAt'])['getTime']());return _0x497d43?this['comments']['getIndex'](_0x497d43):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x2cd43e,_0x4a7eeb){super();const _0x1992de=_0x2cd43e['context']['plugins']['get'](_0x5d61c1)['me'],_0x479696=_0x2cd43e['getCommentThread'](_0x4a7eeb['threadId']),_0x509800=0x0===_0x479696['comments']['length'],_0x555403=_0x1992de===_0x4a7eeb['author'];this['id']=_0x4a7eeb['id'],this['threadId']=_0x4a7eeb['threadId'],this['author']=_0x4a7eeb['author'],this['creator']=_0x4a7eeb['creator'],this['set']('content',_0x4a7eeb['content']),this['createdAt']=_0x4a7eeb['createdAt']||new Date(),this['set']('authoredAt',_0x4a7eeb['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x479696,'resolvedAt'),this['set']('attributes',_0x4a7eeb['attributes']||{}),this['bind']('isEditable')['to'](_0x2cd43e,'_permissions',()=>{const _0x165212=_0x2cd43e['getPermissions'](_0x479696['channelId'])['write'],_0x379cfe=_0x2cd43e['getPermissions'](_0x479696['channelId'])['modifyAll'];return _0x555403&&_0x165212||!_0x555403&&_0x379cfe;}),this['bind']('isRemovable')['to'](_0x479696,'isRemovable',_0x2cd43e,'_permissions',_0x32766a=>{const _0x450c82=_0x2cd43e['getPermissions'](_0x479696['channelId'])['write'],_0x4025e4=_0x2cd43e['getPermissions'](_0x479696['channelId'])['modifyAll'];return _0x555403&&_0x450c82||_0x32766a&&_0x509800||!_0x555403&&_0x4025e4&&!_0x509800;}),this['bind']('isReadOnly')['to'](_0x479696,'isReadOnly'),this['_repository']=_0x2cd43e;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x113fb1){const _0x529d92=document['createElement']('div');return _0x529d92['innerHTML']=_0x113fb1,_0x529d92['textContent']['length'];}(this['content']),0xc8);}['update'](_0x50621b){const {threadId:_0x2bf5fe,id:_0x2f3593}=this;if(!this['_repository']['hasCommentThread'](_0x2bf5fe))throw new _0x460944('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x151af3}=this['_repository']['getCommentThread'](_0x2bf5fe);this['_repository']['fire'](ai('updateComment',_0x151af3,_0x2bf5fe),{'channelId':_0x151af3,'threadId':_0x2bf5fe,'commentId':_0x2f3593,..._0x50621b});}['setAttribute'](_0x417a75,_0x324e28){const _0xb67f70=_0x172f46(this['attributes']);_0x4f2003(_0xb67f70,_0x417a75,_0x324e28),this['update']({'attributes':_0xb67f70});}['removeAttribute'](_0x5240e5){const _0x1ab404=_0x172f46(this['attributes']);_0x59ab04(_0x1ab404,_0x5240e5),this['update']({'attributes':_0x1ab404});}['remove'](_0x336c86={}){if(!_0x336c86['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1137b8,id:_0x48bb91}=this;if(!this['_repository']['hasCommentThread'](_0x1137b8))throw new _0x460944('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2a10cd}=this['_repository']['getCommentThread'](_0x1137b8);this['_repository']['fire'](ai('removeComment',_0x2a10cd,_0x1137b8),{'channelId':_0x2a10cd,'threadId':_0x1137b8,'commentId':_0x48bb91,..._0x336c86});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x2da6ba,..._0x24a5a1){for(const _0x4606da of _0x24a5a1)void 0x0!==_0x4606da&&(_0x2da6ba+=':'+String(_0x4606da));return _0x2da6ba;}var ci=class extends _0x5de849{constructor(_0x436454){super(_0x436454),this['set']('hasContent',!0x1);}['refresh'](){const _0xf705cb=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x35f941 of _0xf705cb['getRanges']())if(this['_hasContent'](_0x35f941))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x55211a=_0x4ff4e9(),ranges:_0x599575,comment:_0x670932}={}){const _0x2a1f92=this['editor']['model'],_0x74232c=_0x599575??Array['from'](_0x2a1f92['document']['selection']['getRanges']()),_0x10af65=[];for(const _0x595abb of _0x74232c)this['_hasContent'](_0x595abb)&&_0x10af65['push'](this['_trimToContent'](_0x595abb));if(!_0x10af65['length'])throw new _0x460944('addcommentthreadcommand-incorrect-ranges',null);_0x670932&&this['_createCommentThread'](_0x55211a,_0x670932),this['_createMarkersFromRanges'](_0x55211a,_0x10af65,!!_0x670932);}['_createMarkersFromRanges'](_0x552f5b,_0x134be5,_0x53ab77){this['editor']['model']['change'](_0x154b06=>{for(const _0x4eb246 of _0x134be5){const _0x2ba665='comment:'+_0x552f5b+':'+_0x4ff4e9()['substr'](0x1,0x5);_0x154b06['addMarker'](_0x2ba665,{'range':_0x4eb246,'usingOperation':_0x53ab77,'affectsData':_0x53ab77});}});}['_createCommentThread'](_0x46401f,_0x42b7e8){const _0xfdaa4d=this['editor']['plugins']['get']('CommentsRepository'),_0x1255a9=this['editor']['config']['get']('collaboration.channelId'),_0x3643d0=this['editor']['plugins']['get']('Users')['me'];if(!_0x3643d0)throw new _0x460944('addcommentthreadcommand-user-not-found',null);_0xfdaa4d['addCommentThread']({'threadId':_0x46401f,'channelId':_0x1255a9,'comments':[{'authorId':_0x3643d0['id'],'content':_0x42b7e8,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4d58cd){for(const _0x187a4c of _0x4d58cd['getItems']())if(this['_itemIsContent'](_0x187a4c))return!0x0;return!0x1;}['_itemIsContent'](_0x1551e5){return _0x1551e5['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1551e5)&&!_0x1551e5['is']('element','tableCell');}['_trimToContent'](_0x4ae84d){const _0x8f32a4=_0x3770ee=>!this['_itemIsContent'](_0x3770ee['item']),_0x3d650c=_0x4ae84d['start']['getLastMatchingPosition'](_0x8f32a4),_0x39144b=_0x4ae84d['end']['getLastMatchingPosition'](_0x8f32a4,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3d650c,_0x39144b);}},di=class extends _0x32d196{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x123cdd){super(_0x123cdd),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x511c34=this['editor'],_0x4a1fe4=_0x511c34['model']['document']['selection'],_0x1db6e2=_0x1ebf5f(()=>this['refreshSelectedViews'](),0xa);_0x4a1fe4['on']('change:range',(_0x60a4db,_0x2caf89)=>{_0x2caf89['directChange']&&(_0x1db6e2['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x511c34['editing']['view']['document'],'change:isFocused',(_0x549847,_0xe676e2,_0x4f39e0)=>{_0x4f39e0&&_0x1db6e2();}),this['listenTo'](_0x511c34['ui']['focusTracker'],'change:isFocused',(_0x4e3aa2,_0x48933f,_0xb03452)=>{_0xb03452||this['fire']('blur',{'isAnnotationTracked':_0x889c84=>this['_editorAnnotationsData']['has'](_0x889c84['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3befd1){if(this['_editorAnnotations']['has'](_0x3befd1['view']))return;this['_editorAnnotations']['add'](_0x3befd1['view']),this['editor']['ui']['focusTracker']['add'](_0x3befd1['view']['element']);const _0x4a49bb=this['editor']['plugins']['get'](ti);this['listenTo'](_0x4a49bb['collection'],'remove',(_0x357e02,_0x5cce79)=>{this['editor']['ui']['focusTracker']['remove'](_0x5cce79['view']['element']),this['_editorAnnotations']['delete'](_0x5cce79['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2929fd){if('function'!=typeof _0x2929fd)throw new _0x460944('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2929fd);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3be1e0,annotations:_0x4d3ed6}){const _0x4d97b0=[],_0x164aa2=this['editor']['model']['document']['selection'],_0x54bbbc=Array['from'](_0x164aa2['getRanges']());for(const [_0xdf6565,_0x5dafe5]of this['_editorAnnotationsData']){const _0x325327=_0x441caa(_0x5dafe5),_0x41bf5c=_0x4d3ed6['getByInnerView'](_0xdf6565);_0x325327&&_0x41bf5c&&_0x4d97b0['push']({'annotation':_0x41bf5c,'range':_0x325327});}function _0x441caa(_0xf14d9a){for(const _0x4099f5 of _0xf14d9a)for(const _0x5337b5 of _0x54bbbc)if(_0x4099f5['containsRange'](_0x5337b5,!_0x164aa2['isCollapsed']))return _0x4099f5;return null;}return _0x4d97b0['sort']((_0xb8d081,_0x5649c2)=>{const _0x59b7c9=_0xb8d081['range'],_0x226488=_0x5649c2['range'];if(!_0x59b7c9['isEqual'](_0x226488)){if(_0x59b7c9['containsRange'](_0x226488,!0x0))return 0x1;if(_0x226488['containsRange'](_0x59b7c9,!0x0))return-0x1;}return _0xb8d081['annotation']==_0x3be1e0?-0x1:_0x5649c2['annotation']==_0x3be1e0?0x1:0x0;})['map'](_0x4be6dd=>_0x4be6dd['annotation']);}get['_editorAnnotationsData'](){const _0x57a2cd=new Map();for(const _0x4ac1be of Array['from'](this['_dataCollectors']))for(const [_0x41c782,_0xf83dd1]of _0x4ac1be())_0x57a2cd['set'](_0x41c782,_0xf83dd1);return _0x57a2cd;}},li=class extends _0x32d196{['afterInit'](){const _0x3292e1=this['editor'];_0x3292e1['plugins']['has']('RestrictedEditingModeEditing')&&_0x3292e1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x32d196{constructor(_0x3ed21e){super(_0x3ed21e),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x228e41=this['editor'],_0x555cdf=_0x228e41['commands']['get']('importWord'),_0x57e40a=_0x228e41['plugins']['get'](_0x5d61c1);_0x555cdf&&(_0x555cdf['on']('execute',(_0x4e2651,[,_0x176f0d])=>{_0x176f0d['collaboration_features']={'comments':!0x0,'user_id':_0x57e40a['me']['id']};},{'priority':_0x48ddaa['high']+0xa}),this['listenTo'](_0x555cdf,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1b3c4e,_0x5209b0){const {comment_threads:_0x4af752}=_0x5209b0;_0x4af752&&_0x4af752['forEach'](({thread_id:_0x2a3c5e,comments:_0x9b0138,is_resolved:_0x1df748})=>{const _0x15f95b=new Date(),_0x43884d=_0x9b0138['map'](({author:_0x128efd,content:_0x8c6d42,created_at:_0x2aaef6})=>({'content':_0x8c6d42,'authorId':this['editor']['plugins']['get'](_0x5d61c1)['me']['id'],'createdAt':_0x15f95b,'attributes':{'@external':{'authorName':_0x128efd,'createdAt':_0x2aaef6?new Date(_0x2aaef6):new Date(),'source':'importWord'}}})),_0x126ca9=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x126ca9,'threadId':_0x2a3c5e,'comments':_0x43884d,'resolvedAt':_0x1df748?_0x15f95b:null});});}},ui=class extends _0x32d196{constructor(_0x5a4826){super(_0x5a4826),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x1b09df=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1b09df,'contentInsertion',(_0x27ba3b,_0x1b797c)=>this['_removeMarkersWithoutThreads'](_0x1b797c['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2667fb){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2667fb;const _0x1a0ab3=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2ceb9c of _0x2667fb['keys']()){const [_0x201ab6,_0xd4dabd]=_0x2ceb9c['split'](':');'comment'!=_0x201ab6||_0x1a0ab3['hasCommentThread'](_0xd4dabd)||_0x2667fb['delete'](_0x2ceb9c);}return _0x2667fb;}['_registerMarkerInClipboardPipeline'](){const _0x2c6f82=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x223acf=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x223acf&&_0x2c6f82['_registerMarkerToCopy']('comment',_0x223acf);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xd8b7bc){switch(_0xd8b7bc){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0xf41e4a){const _0x28ab46=_0xf41e4a['split'](':');return{'group':_0x28ab46[0x0],'id':_0x28ab46[0x1],'part':_0x28ab46[0x2]};}var pi=class extends _0x32d196{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x209233,_0x795c9d)=>{if(!_0x795c9d['options']['showCommentHighlights'])return null;if(_0x795c9d['options']['ignoreResolvedComments']){const {id:_0x37d45c}=fi(_0x209233['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x37d45c)?.['isResolved']&&_0x209233['item'])return _0x795c9d['consumable']['consume'](_0x209233['item'],'addMarker:'+_0x209233['markerName']),_0x795c9d['consumable']['consume'](_0x209233['item'],'removeMarker:'+_0x209233['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x947b43=>{_0x947b43['on']('addMarker:comment',(_0x38ae3a,_0x3ba1d0,_0x1c43e8)=>{if(!_0x1c43e8['options']['showCommentHighlights'])return;const _0x33d025=_0x3ba1d0['item'];if(!_0x33d025)return;const _0x253514=_0x1c43e8['mapper']['toViewElement'](_0x33d025);this['editor']['model']['schema']['isObject'](_0x33d025)&&_0x253514&&!_0x253514['getCustomProperty']('widget')&&_0x253514['is']('containerElement')&&Ct(_0x253514,_0x1c43e8['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x10381a,{writer:_0x5740a2,options:_0x5ea43b})=>{if(!_0x5ea43b['showCommentHighlights'])return null;const _0x5d5d07=_0x5740a2['createContainerElement']('div'),_0x1b64f8=_0x5740a2['createEmptyElement']('hr');return _0x5740a2['addClass']('ck-horizontal-line',_0x5d5d07),_0x5740a2['insert'](_0x5740a2['createPositionAt'](_0x5d5d07,0x0),_0x1b64f8),_0x5d5d07;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4e3d61,{writer:_0x3b51cc,options:_0x4c77e9})=>{if(!_0x4c77e9['showCommentHighlights'])return null;const _0x2292d9=_0x3b51cc['createContainerElement']('span'),_0x37f43d=_0x3b51cc['createEmptyElement']('img');return _0x3b51cc['addClass']('image-inline',_0x2292d9),_0x3b51cc['insert'](_0x3b51cc['createPositionAt'](_0x2292d9,0x0),_0x37f43d),_0x2292d9;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5dfda5,{writer:_0x2155b8,options:_0x45d321})=>{if(_0x45d321['showCommentHighlights'])return _0x2155b8['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2b361b,_0x3c63ca,_0x13bd88)=>{_0x13bd88['options']['showCommentHighlights']&&_0x2b361b['stop']();},{'priority':'high'});}},wi=class extends _0x32d196{static get['requires'](){return[oi,di,_0x5d61c1,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4afc67){super(_0x4afc67),this['set']('isThreadsLoadingPaused',!0x0),_0x4afc67['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2aec27,_0x18a461,_0x8aae2,_0x4027ff)=>{const _0x2e4b3a=_0x4afc67['plugins']['get'](oi),_0x2a60cd=_0x8aae2?fi(_0x8aae2)['id']:null;_0x4afc67['model']['change'](()=>{if(_0x2a60cd){const _0x45940f=this['getAllMarkersForId'](_0x2a60cd);for(const _0x53a61e of _0x45940f)_0x4afc67['editing']['reconvertMarker'](_0x53a61e);}if(_0x4027ff){const {id:_0x15d6e4}=fi(_0x4027ff),_0x5f0040=_0x2e4b3a['getCommentThread'](_0x15d6e4);if(_0x5f0040&&_0x5f0040['unlinkedAt'])return;if(_0x5f0040&&!_0x5f0040['isAttached'])return;const _0x1aad8c=this['getAllMarkersForId'](_0x15d6e4);for(const _0x463e2a of _0x1aad8c)_0x4afc67['editing']['reconvertMarker'](_0x463e2a);}}),_0x2a60cd&&this['scrollToThreadMarker'](_0x2a60cd);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x307ab0=this['editor'],_0x9e6930=_0x307ab0['plugins']['get'](oi),_0x57f786=_0x307ab0['config']['get']('collaboration.channelId'),_0x582941=_0x9e6930['getCommentThreads']()['filter'](_0x16bfbd=>_0x16bfbd['channelId']!==_0x57f786);_0x307ab0['commands']['add']('addCommentThread',new ci(_0x307ab0)),this['listenTo'](_0x307ab0,'change:isReadOnly',(_0x3b5e37,_0x3ab2c0,_0x4c7f06)=>{_0x9e6930['switchReadOnly'](_0x4c7f06,_0x307ab0['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x9e6930,gi('addCommentThread',_0x57f786),(_0x321566,{threadId:_0xb4e5a1})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0xb4e5a1)?.['unlinkedAt']&&this['_attachArchivedThread'](_0xb4e5a1);}),this['listenTo'](_0x9e6930,gi('removeCommentThread',_0x57f786),(_0x1c7836,{threadId:_0x4a90e1})=>{_0x307ab0['model']['enqueueChange']({'isUndoable':!0x1},_0x1b5cd0=>{const _0x215cd9=this['getAllMarkersForId'](_0x4a90e1);for(const _0x31f0e8 of _0x215cd9)_0x1b5cd0['removeMarker'](_0x31f0e8);});}),this['listenTo'](_0x9e6930,gi('resolveCommentThread',_0x57f786),(_0x57490c,{threadId:_0x253c82})=>{this['_reconvertMarkers'](_0x253c82);const _0x4282ed=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x4282ed['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x253c82)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x9e6930,gi('reopenCommentThread',_0x57f786),(_0x179efe,{threadId:_0x5d142f})=>{this['_reconvertMarkers'](_0x5d142f);},{'priority':'low'}),this['listenTo'](_0x9e6930,gi('addComment',_0x57f786),(_0x52c97b,{threadId:_0x2a36f1,isFromAdapter:_0x2d45be})=>{const _0x86c972=this['getAllMarkersForId'](_0x2a36f1);!_0x2d45be&&0x0!=_0x86c972['length']&&_0x9e6930['hasCommentThread'](_0x2a36f1)&&0x1===_0x9e6930['getCommentThread'](_0x2a36f1)['length']&&_0x307ab0['model']['enqueueChange']({'isUndoable':!0x1},_0x4dfd1a=>{for(const _0x486105 of _0x86c972)_0x4dfd1a['updateMarker'](_0x486105,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x582941);}['afterInit'](){!async function(_0x5da337){const _0x3fe405='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x538abe=0x78e88,_0x3d94b3=window['Date']['now'](),_0x2ba4b1=_0x5da337['editor'],_0x42f6b6=new window['Promise'](_0x1ab350=>{_0x2ba4b1['once']('ready',_0x1ab350);}),_0x5f5806={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x195e16=_0x2ba4b1['config']['get']('licenseKey');async function _0x2a5713(){let _0x573a92,_0x47598=null,_0xc774b4=null;try{return'GPL'==_0x195e16?'NotAllowed':(_0x573a92=_0x12b016(),_0x573a92?(_0x573a92['usageEndpoint']&&(_0xc774b4=_0x506d8e(_0x573a92['usageEndpoint'],_0x573a92['jti'])),await _0x38c191()?_0xf630fb()?_0x92de51()?'Expired':_0x116b4a()?('evaluation'==_0x573a92['licenseType']&&(_0x47598=_0x4d7351('EvaluationLimit')),await _0xbea8fe()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x92de51(){const _0x3d9033=['evaluation','trial']['includes'](_0x573a92['licenseType'])?_0x3d94b3/0x3e8:0xe10*_0x538abe;return _0x573a92['exp']<_0x3d9033;}function _0xf630fb(){const _0x35de1b=_0x573a92['features'];if(!_0x35de1b)return!0x1;if(_0x35de1b['includes']('*'))return!0x0;if(_0x35de1b['includes']('CMT'))return!0x0;if(_0x35de1b['includes']('TRILIUM')&&_0x808cd6())return!0x0;if(_0x35de1b['includes']('RCMT')){if(_0x2236c3())return!0x0;if(_0x456122()||_0x243590())return!0x0;}return!0x1;}function _0x116b4a(){const _0xa65b=_0x573a92['licensedHosts'];if(!_0xa65b||0x0==_0xa65b['length'])return!0x0;const {hostname:_0x4bc24a}=new URL(window['location']['href']);if(_0xa65b['includes'](_0x4bc24a))return!0x0;const _0x5162dd=_0x4bc24a['split']('.');return _0xa65b['filter'](_0x4847fe=>_0x4847fe['includes']('*'))['map'](_0x4e2857=>_0x4e2857['split']('.'))['filter'](_0x586ab3=>_0x586ab3['length']<=_0x5162dd['length'])['map'](_0x275a2a=>Array(_0x5162dd['length']-_0x275a2a['length'])['fill']('*'===_0x275a2a[0x0]?'*':'')['concat'](_0x275a2a))['some'](_0x551800=>_0x5162dd['every']((_0x980a58,_0x40ddc2)=>_0x551800[_0x40ddc2]===_0x980a58||'*'===_0x551800[_0x40ddc2]));}function _0xbea8fe(){return _0x47598&&_0xc774b4?new window['Promise']((_0x2486d8,_0x26ffb1)=>{_0x47598['then'](_0x2486d8,_0x26ffb1),_0xc774b4['then'](_0x3f8e0d=>{'Valid'!=_0x3f8e0d&&_0x2486d8(_0x3f8e0d);},_0x26ffb1);}):_0x47598||_0xc774b4||'Valid';}}function _0x506d8e(_0x1a9baa,_0x42e0ae){return new window['Promise'](_0x4eb131=>{if(_0x47ddef())return _0x4eb131('Valid');_0x234d46(),_0x2ba4b1['decorate']('_sendUsageRequest');let _0x481d1a=!0x1;const _0x5f7136=_0x4ff4e9();function _0xe97b22(_0x3d2b07){return!!_0x3d2b07&&('object'==typeof _0x3d2b07||'function'==typeof _0x3d2b07)&&'function'==typeof _0x3d2b07['then']&&'function'==typeof _0x3d2b07['catch'];}function _0x4865a3(_0x471672){_0x23e0a6(_0x471672)['then'](_0x177190=>_0x177190&&'ok'==_0x177190['status']?_0x443a39(_0x5cd2ab(_0x5f7136+_0x42e0ae))!=_0x177190['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x53e430=>(_0x290a5e(),_0x53e430),()=>{const _0x1ca1ca=_0x58d282();return null==_0x1ca1ca?(_0x290a5e(),'Valid'):_0x3d94b3-_0x1ca1ca>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4eb131)['catch'](()=>{_0x4eb131('UsageLimit');});const _0x163215=0x36ee80;function _0x290a5e(){const _0x576a2f='llct-'+_0x443a39(_0x5cd2ab(_0x1a9baa)),_0x260fcf=_0x53ae60(_0x443a39(window['Math']['ceil'](_0x3d94b3/_0x163215)));window['localStorage']['setItem'](_0x576a2f,_0x260fcf);}function _0x58d282(){const _0x525003='llct-'+_0x443a39(_0x5cd2ab(_0x1a9baa)),_0x17b579=window['localStorage']['getItem'](_0x525003);return _0x17b579?window['parseInt'](_0x53ae60(_0x17b579),0x10)*_0x163215:null;}function _0x23e0a6(_0x296e74){return new window['Promise']((_0x4c5531,_0x2dc47a)=>{_0x296e74['then'](_0x4c5531,_0x2dc47a),window['setTimeout'](_0x2dc47a,0x1d4c0);});}}_0x2ba4b1['on']('_sendUsageRequest',(_0x4c5a39,_0x5b55c1)=>{if(_0x5b55c1[0x0]!=_0x1a9baa)return _0x4eb131('UsageLimit');_0x5b55c1[0x1]={..._0x5b55c1[0x1],'requestId':_0x5f7136};},{'priority':'high'}),_0x2ba4b1['on']('_sendUsageRequest',_0x59ba06=>{_0xe97b22(_0x59ba06['return'])&&(_0x481d1a=!0x0,_0x4865a3(_0x59ba06['return']));},{'priority':'low'}),_0x42f6b6['then'](()=>{_0x481d1a||_0x4eb131('UsageLimit');});});function _0x47ddef(){return'auto'==_0x2ba4b1['editing']['view']['_overlayModeHint'];}function _0x234d46(){_0x2ba4b1['editing']['view']['_overlayModeHint']='auto';}}function _0x4d7351(_0x285f92){const _0x1469ce=[new window['Promise'](_0x2a0cf7=>setTimeout(_0x2a0cf7,0x93ecc)),_0x42f6b6['then'](()=>new window['Promise'](_0x319be2=>{let _0x56ee16=0x0;_0x2ba4b1['model']['on']('applyOperation',(_0x27cc49,_0x42beea)=>{_0x42beea[0x0]['isDocumentOperation']&&_0x56ee16++,0x5e8==_0x56ee16&&(_0x319be2(),_0x27cc49['off']());});}))];return window['Promise']['race'](_0x1469ce)['then'](()=>_0x285f92);}async function _0x3c2aae(){await _0x42f6b6,_0x2ba4b1['model']['change']=_0x1850ec,_0x2ba4b1['model']['enqueueChange']=_0x1850ec,_0x2ba4b1['enableReadOnlyMode']('model');}function _0x808cd6(){return window['glob']&&window['glob']['triliumVersion'];}function _0x2236c3(){return _0x47cadc('WebSocketGateway')&&'connected'==_0x75849e('WebSocketGateway')['state'];}function _0x456122(){return _0x47cadc('RevisionViewerIntegration');}function _0x243590(){return _0x47cadc('TrackChangesDataGetter');}function _0x59381c(_0x50f8ac){const _0x26ad35=_0x563546();_0x2ba4b1[_0x26ad35]='commentsLicenseKey'+_0x50f8ac,'Valid'!=_0x50f8ac&&_0x3c2aae();}function _0x563546(){const _0x3c1ad1=window['String'](window['performance']['now']())['replace']('.','');let _0x385415='K';for(let _0x341437=0x0;_0x341437<_0x3c1ad1['length'];_0x341437+=0x2){let _0x1cbe95=window['parseInt'](_0x3c1ad1['substring'](_0x341437,_0x341437+0x2));_0x1cbe95>=0x3e&&(_0x1cbe95-=0x3e),_0x385415+=_0x3fe405[_0x1cbe95];}return _0x385415;}function _0x12b016(){const _0x42bcba=_0x195e16['split']('.');if(0x3!=_0x42bcba['length'])return null;return _0x12d0af(_0x42bcba[0x1]);function _0x12d0af(_0x3a5b30){const _0x43d767=_0x4d0759(_0x3a5b30);return _0x43d767&&_0x3455af()?_0x43d767:null;function _0x3455af(){const _0x50dcf4=_0x43d767['jti'],_0x5781bd=window['parseInt'](_0x50dcf4['substring'](_0x50dcf4['length']-0x8),0x10),_0x34716d={..._0x43d767,'jti':_0x50dcf4['substring'](0x0,_0x50dcf4['length']-0x8)};return delete _0x34716d['vc'],_0x5cd2ab(_0x34716d)==_0x5781bd;}}}async function _0x38c191(){let _0x54bd37=!0x0;try{const [_0x1fefcd,_0x19ece8,_0x2651b7]=_0x195e16['split']('.');return _0x59a75f(_0x1fefcd),await _0x278132(_0x1fefcd,_0x19ece8,_0x2651b7),_0x54bd37;}catch{return!0x1;}function _0x59a75f(_0xfbd31f){const _0x393f25=_0x4d0759(_0xfbd31f);_0x393f25&&'ES256'==_0x393f25['alg']||(_0x54bd37=!0x1);}async function _0x278132(_0x11c5fe,_0x5e5779,_0x5f3b86){const _0x3e4606=window['Uint8Array']['from'](_0x32f8e9(_0x5f3b86),_0x4b70e5=>_0x4b70e5['charCodeAt'](0x0)),_0x32338a=new window['TextEncoder']()['encode'](_0x11c5fe+'.'+_0x5e5779),_0x45a1e1=window['crypto']['subtle'];if(!_0x45a1e1)return;const _0x1ba60b=await _0x45a1e1['importKey']('jwk',_0x5f5806,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x45a1e1['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x1ba60b,_0x3e4606,_0x32338a)||(_0x54bd37=!0x1);}}function _0x4d0759(_0x49a879){return _0x49a879['startsWith']('ey')?JSON['parse'](_0x32f8e9(_0x49a879)):null;}function _0x32f8e9(_0x41ab47){return window['atob'](_0x41ab47['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5cd2ab(_0xd0757c){let _0x58e516=0x1505;function _0x144373(_0x1e3b5b){for(let _0x16bf71=0x0;_0x16bf71<_0x1e3b5b['length'];_0x16bf71++){const _0xb67252=_0x1e3b5b['charCodeAt'](_0x16bf71);_0x58e516=(_0x58e516<<0x5)+_0x58e516+_0xb67252,_0x58e516&=_0x58e516;}}function _0x20de73(_0x522b26){Array['isArray'](_0x522b26)?_0x522b26['forEach'](_0x20de73):_0x522b26&&'object'==typeof _0x522b26?Object['entries'](_0x522b26)['sort']()['forEach'](([_0x4dc7f9,_0x138212])=>{_0x144373(_0x4dc7f9),_0x20de73(_0x138212);}):_0x144373(window['String'](_0x522b26));}return _0x20de73(_0xd0757c),_0x58e516>>>0x0;}function _0x443a39(_0x3e105a){return _0x3e105a['toString'](0x10)['padStart'](0x8,'0');}function _0x53ae60(_0x34d0dd){return _0x34d0dd['split']('')['reverse']()['join']('');}function _0x47cadc(_0x2d0554){return _0x2ba4b1['plugins']['has'](_0x2d0554);}function _0x75849e(_0x3b75ed){return _0x2ba4b1['plugins']['get'](_0x3b75ed);}function _0x1850ec(){}_0x59381c(await _0x2a5713());}(this);}['destroy'](){const _0x4291e7=this['editor']['plugins']['get'](oi),_0x1a7bee=this['editor']['config']['get']('collaboration.channelId');for(const _0x308a5b of _0x4291e7['getCommentThreads']({'channelId':_0x1a7bee}))_0x4291e7['_detachCommentThread'](_0x308a5b['id']),_0x4291e7['_threads']['delete'](_0x308a5b['id']);super['destroy']();}['hasMarkerForId'](_0xb40550){return this['getAllMarkersForId'](_0xb40550)['length']>0x0;}['getAllMarkersForId'](_0x10c23e){const _0x16fe55=[];for(const _0x385f1f of this['editor']['model']['markers'])_0x385f1f['name']['startsWith']('comment:'+_0x10c23e)&&_0x16fe55['push'](_0x385f1f);return _0x16fe55;}['scrollToThreadMarker'](_0x1a4fae){setTimeout(()=>{const _0xfa1f66=this['_getTargetForId'](_0x1a4fae);_0xfa1f66&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x1a4fae&&_0x474fe7({'target':_0xfa1f66[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x520ec7){this['editor']['model']['change'](()=>{for(const _0x35d468 of this['getAllMarkersForId'](_0x520ec7))this['editor']['editing']['reconvertMarker'](_0x35d468);});}['_attachArchivedThread'](_0xf45db){const _0x5d048d=this['editor']['plugins']['get'](oi),_0x293ddd=this['editor']['plugins']['get'](di),_0x12d4ce=_0x5d048d['getCommentThread'](_0xf45db);if(!_0x12d4ce['isAttached']){const _0x151f23=_0x12d4ce['attachTo'](()=>this['_getTargetForId'](_0x12d4ce['id']));_0x293ddd['registerAnnotation'](_0x151f23),_0x12d4ce['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x40f7f3=this['editor'],_0xd0510d=_0x40f7f3['plugins']['get'](_0x5d61c1);_0x40f7f3['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5189f1,_0x40ed98)=>{const {id:_0x46eebb}=fi(_0x5189f1['markerName']),_0x4c4daa=_0x40f7f3['plugins']['get'](oi)['getCommentThread'](_0x46eebb),_0x308e96=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x46eebb;let _0x57603f;if(_0x4c4daa&&_0x4c4daa['isResolved']&&!_0x308e96&&_0x5189f1['item'])return _0x40ed98['consumable']['consume'](_0x5189f1['item'],'addMarker:'+_0x5189f1['markerName']),_0x40ed98['consumable']['consume'](_0x5189f1['item'],'removeMarker:'+_0x5189f1['markerName']),null;const _0x31166e=['ck-comment-marker'];return _0x308e96&&_0x31166e['push']('ck-comment-marker--active'),_0x57603f=_0x4c4daa?.['length']?_0x4c4daa['comments']['first']['author']['id']:_0xd0510d['me']['id'],{'classes':_0x31166e,'attributes':{'data-comment':_0x46eebb,'data-author-id':_0x57603f}};}}),_0x40f7f3['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x14aed9,{options:_0x47599b})=>{if(_0x47599b['showCommentHighlights'])return null;const _0x3a008e=_0x40f7f3['plugins']['get'](oi),_0x1d650f=_0x40f7f3['model']['markers']['get'](_0x14aed9),{id:_0x4dbe95,part:_0x469955}=fi(_0x14aed9);return _0x1d650f&&!_0x1d650f['affectsData']||_0x47599b['ignoreResolvedComments']&&_0x3a008e['getCommentThread'](_0x4dbe95)?.['isResolved']?null:{'group':'comment','name':_0x469955?_0x4dbe95+':'+_0x469955:_0x4dbe95};}}),_0x40f7f3['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x338c7c,{writer:_0x539fd9})=>_0x539fd9['createElement']('$marker',{'data-name':'comment:'+_0x338c7c['getAttribute']('id')})}),_0x40f7f3['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2b20b7=this['editor'],_0x50753a=_0x2b20b7['plugins']['get'](oi),_0x163352=new Set(),_0x120339=new Set();_0x2b20b7['model']['document']['registerPostFixer'](_0x529cbd=>{let _0x12c712=!0x1;for(const {name:_0x5a8a26,data:_0x2d1550}of _0x2b20b7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2d616c,id:_0x408a48}=fi(_0x5a8a26);let _0x207263=_0x2d1550['newRange'];if('comment'!==_0x2d616c||!_0x207263)continue;const _0x51c5b3='$graveyard'===_0x207263['root']['rootName'];_0x51c5b3||(_0x207263=_i(_0x207263,_0x2b20b7['model']),!_0x207263||_0x207263['isCollapsed']||!_0x2d1550['newRange']||_0x207263['isEqual'](_0x2d1550['newRange']))?_0x2b20b7['model']['hasContent'](_0x207263)&&!_0x51c5b3?this['isThreadsLoadingPaused']?_0x163352['add'](_0x5a8a26):this['_handleThreadMarker'](_0x5a8a26,_0x408a48):(_0x120339['add'](_0x5a8a26),_0x163352['delete'](_0x5a8a26),_0x529cbd['removeMarker'](_0x5a8a26),_0x12c712=!0x0):(_0x529cbd['updateMarker'](_0x5a8a26,{'range':_0x207263}),_0x12c712=!0x0);}return _0x12c712;}),this['on']('change:isThreadsLoadingPaused',(_0x3496c0,_0x4e159d,_0x212cb6)=>{if(!_0x212cb6&&_0x163352['size'])for(const _0x546865 of _0x163352){const {id:_0x107536}=fi(_0x546865);_0x163352['delete'](_0x546865),_0x2b20b7['model']['markers']['get'](_0x546865)&&this['_handleThreadMarker'](_0x546865,_0x107536);}}),this['listenTo'](_0x2b20b7['model']['document'],'change',()=>{for(const {name:_0x3779fd,data:{newRange:_0x49fc25}}of _0x2b20b7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x561df4,id:_0x4376e8}=fi(_0x3779fd);if('comment'!==_0x561df4)continue;const _0x306bef=_0x50753a['getCommentThread'](_0x4376e8),_0x54d77d=this['hasMarkerForId'](_0x4376e8);_0x306bef&&(!_0x306bef['_hasTargetInContent']&&_0x49fc25&&_0x2b20b7['editing']['view']['once']('render',()=>{const _0x1ed81b=_0x2b20b7['plugins']['get'](ti),_0x3c44fc=_0x50753a['_threadToController']['get'](_0x306bef)['view'];_0x1ed81b['getByInnerView'](_0x3c44fc)['refreshVisibility']();},{'priority':'low'}),_0x306bef['_hasTargetInContent']=_0x54d77d||!!_0x49fc25),_0x49fc25||(_0x120339['add'](_0x3779fd),_0x163352['delete'](_0x3779fd));}for(const _0x73680b of _0x120339){const {id:_0x1778fe}=fi(_0x73680b),_0x46dda1=_0x50753a['getCommentThread'](_0x1778fe);if(_0x163352['delete'](_0x73680b),!_0x46dda1)continue;const _0x3d7958=this['hasMarkerForId'](_0x1778fe);_0x3d7958||_0x46dda1['isSubmitted']?_0x3d7958||_0x46dda1['unlinkedAt']||_0x46dda1['setUnlinkedAt'](new Date()):_0x46dda1['remove']();}_0x120339['clear']();});}['_handleInitialThreads'](_0x1d0dca){_0x1d0dca['forEach'](_0x2b2794=>{_0x2b2794['unlinkedAt']&&this['_attachArchivedThread'](_0x2b2794['id']);});}['_getTargetForId'](_0x5ce277){const _0x20b825=this['editor'],_0x180300=this['getAllMarkersForId'](_0x5ce277);return _0x3df547(_0x20b825['editing'],_0x180300);}['_getTextContext'](_0x19f5ff){const _0xe7c2=this['getAllMarkersForId'](_0x19f5ff);let _0x24cd49='',_0x484a22=!0x1;for(const _0x2d55cc of _0xe7c2){const _0x53454a=_0x2d55cc['getRange']();for(const _0x2746cc of Array['from'](_0x53454a['getItems']()))_0x2746cc['is']('$textProxy')?(_0x24cd49&&_0x484a22&&(_0x24cd49+='\x20',_0x484a22=!0x1),_0x24cd49+=_0x2746cc['data']):_0x484a22=!0x0;_0x484a22=!0x0;}return _0x24cd49['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2500ea,_0x2e1e2f){const _0x1b9563=this['editor'],_0x1c353c=_0x1b9563['plugins']['get'](oi);let _0x2f574e=_0x1c353c['getCommentThread'](_0x2e1e2f);const _0x368a4d=_0x1b9563['config']['get']('collaboration.channelId'),_0x366555=_0x1b9563['plugins']['get'](di);return _0x2f574e&&(_0x2f574e['unlinkedAt']&&_0x2f574e['setUnlinkedAt'](null),_0x2f574e['isAttached'])||(this['getAllMarkersForId'](_0x2e1e2f)[0x0]['managedUsingOperations']?_0x1c353c['fetchCommentThread']({'channelId':_0x368a4d,'threadId':_0x2e1e2f})['then'](_0x5829fc=>{if('destroyed'!==_0x1b9563['state']){if(_0x2f574e=_0x5829fc,_0x2f574e&&!_0x2f574e['isAttached']){const _0x28430c=_0x2f574e['attachTo'](()=>this['_getTargetForId'](_0x2e1e2f));_0x366555['registerAnnotation'](_0x28430c),_0x2f574e['isResolved']&&this['_reconvertMarkers'](_0x2e1e2f);}else{if(!_0x2f574e){const _0x5884c2=this['getAllMarkersForId'](_0x2e1e2f);_0x1b9563['model']['change'](_0x7d3e81=>{for(const _0x37acac of _0x5884c2)_0x7d3e81['removeMarker'](_0x37acac);});}}}}):_0x1b9563['editing']['view']['once']('render',()=>{if(_0x1c353c['getCommentThread'](_0x2e1e2f))return;const _0x4291ae=_0x1b9563['plugins']['get'](ti);_0x2f574e=_0x1c353c['openNewCommentThread']({'channelId':_0x368a4d,'threadId':_0x2e1e2f,'target':()=>this['_getTargetForId'](_0x2e1e2f),'context':{'type':'text','value':this['_getTextContext'](_0x2e1e2f)}});const _0x2c8f4d=_0x1c353c['_threadToController']['get'](_0x2f574e)['view'],_0x11e20c=_0x4291ae['getByInnerView'](_0x2c8f4d);_0x11e20c&&_0x366555['registerAnnotation'](_0x11e20c);},{'priority':'low'})),_0x2f574e;}['_handleThreadMarker'](_0x2f7e9f,_0x4f400a){const _0x5ba1a2=this['_attachMarkerToThread'](_0x2f7e9f,_0x4f400a);_0x5ba1a2&&!_0x5ba1a2['context']&&_0x5ba1a2['setContext']({'type':'text','value':this['_getTextContext'](_0x4f400a)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5bbf35=this['editor'];_0x5a3dd3(_0x5bbf35['model'],({left:_0x347ced,entered:_0x1c37fb})=>{for(const _0x12b52a of _0x347ced)if(Ai(_0x12b52a)){_0x5bbf35['ui']['ariaLiveAnnouncer']['announce'](Et(_0x5bbf35['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1c55df of _0x1c37fb)if(Ai(_0x1c55df)){_0x5bbf35['ui']['ariaLiveAnnouncer']['announce'](Et(_0x5bbf35['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x5bcf0b(_0x4e8a21)));break;}});}};function gi(_0x3dff11,_0x12b093){return _0x12b093?_0x3dff11+':'+_0x12b093:_0x3dff11;}function _i(_0x18e461,_0x43074e){const _0xfe8341=_0x43074e['schema'],_0x202973=_0x43074e['createRange'](_0x18e461['start']);for(const _0x5410ff of _0x18e461['getWalker']()){const {type:_0x30b9c3,item:_0x25a968,nextPosition:_0x2daeb2}=_0x5410ff;if('text'===_0x30b9c3||_0xfe8341['isObject'](_0x25a968)){const _0x33b046=_0x43074e['createPositionBefore'](_0x25a968);_0x202973['isCollapsed']&&(_0x202973['start']=_0x33b046),_0x202973['end']=_0x2daeb2;}}return _0x202973;}function Ai(_0x4f1ad6){return'comment'===fi(_0x4f1ad6['name'])['group'];}var vi=class extends _0x32d196{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0x4ff740=this['editor'],_0x46c66a=_0x4ff740['plugins']['get'](oi),_0x5b46bd=_0x4ff740['plugins']['get'](wi),_0x54702f=_0x4ff740['plugins']['get'](ti),_0x58823a=_0x4ff740['plugins']['get'](di);_0x4ff740['ui']['componentFactory']['add']('comment',()=>{const _0xe91c13=this['_createUIButton'](_0x5a263d);return _0xe91c13['tooltip']=!0x0,_0xe91c13;}),_0x4ff740['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x58823a['addSourceCollector'](()=>{const _0x3724ae=[];for(const [_0x4658bc,_0xfaa567]of _0x46c66a['_threadToController']){const _0xfc645e=_0x5b46bd['getAllMarkersForId'](_0x4658bc['id']),_0x5e1949=_0xfc645e['map'](_0x464948=>_0x464948['getRange']());_0xfc645e['length']>0x0&&_0x3724ae['push']([_0xfaa567['view'],_0x5e1949]);}return _0x3724ae;}),this['listenTo'](_0x54702f,'change:activeAnnotations',(_0x497c17,_0x4c2ef2,_0x4fdc90)=>{const _0xfbb003=Array['from'](_0x4fdc90)['map'](_0x51e6ef=>_0x51e6ef['innerView'])['find'](_0x4bfe50=>_0x46c66a['_viewToController']['has'](_0x4bfe50));if(!_0xfbb003)return void(_0x5b46bd['activeMarker']=null);const _0x23850e=_0x46c66a['_viewToController']['get'](_0xfbb003)['model']['id'],_0x524413='comment:'+_0x23850e;_0x23850e&&_0x5b46bd['hasMarkerForId'](_0x23850e)?_0x5b46bd['activeMarker']=_0x524413:_0x5b46bd['activeMarker']&&(_0x5b46bd['activeMarker']=null);}),this['listenTo'](_0x46c66a,'removeCommentThread',(_0x5d95f2,{threadId:_0x134a7e,isFromAdapter:_0xbe5895})=>{!_0xbe5895&&_0x4ff740['ui']['focusTracker']['isFocused']&&_0x5b46bd['hasMarkerForId'](_0x134a7e)&&_0x4ff740['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x46c66a,'addComment',(_0x3d75ec,{threadId:_0x17740a,isFromAdapter:_0x4f0382})=>{!_0x4f0382&&_0x5b46bd['hasMarkerForId'](_0x17740a)&&_0x46c66a['hasCommentThread'](_0x17740a)&&0x1===_0x46c66a['getCommentThread'](_0x17740a)['length']&&(_0x4ff740['editing']['view']['focus'](),_0x3d75ec['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5f14a6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x236bab;for(const _0x18d6a6 in _0x5f14a6){const _0x3f654f=_0x18d6a6,_0x36e542=_0x5f14a6[_0x3f654f];if('commentsLicenseKeyValid'==_0x36e542||'commentsLicenseKeyInvalid'==_0x36e542||'commentsLicenseKeyExpired'==_0x36e542||'commentsLicenseKeyDomainLimit'==_0x36e542||'commentsLicenseKeyNotAllowed'==_0x36e542||'commentsLicenseKeyEvaluationLimit'==_0x36e542||'commentsLicenseKeyUsageLimit'==_0x36e542){delete _0x5f14a6[_0x3f654f],_0x236bab=_0x36e542,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x236bab&&_0x5f14a6['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x236bab&&_0x5f14a6['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x236bab&&_0x5f14a6['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x236bab&&_0x5f14a6['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x236bab&&_0x5f14a6['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x236bab&&_0x5f14a6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4e109f){const _0x3e884f=this['editor'],_0x99888a=new _0x4e109f(_0x3e884f['locale']),_0xac0514=_0x3e884f['commands']['get']('addCommentThread');return _0x99888a['set']({'label':Et(_0x3e884f['locale'],'Comment'),'icon':_0x1f3af2}),_0x99888a['bind']('isEnabled')['to'](_0xac0514,'isEnabled',_0xac0514,'hasContent',(_0x34d0d5,_0x473361)=>_0x34d0d5&&_0x473361),this['listenTo'](_0x99888a,'execute',()=>{_0xac0514['execute']();}),_0x99888a;}},yi=class extends _0x32d196{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x5263dd){super(_0x5263dd),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5e07f3,_0xfa5a61,_0x172cc5)=>{_0x172cc5?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1910ee,_0x48c348]of this['editor']['commands'])_0x48c348['affectsData']&&'addCommentThread'!==_0x1910ee&&_0x48c348['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 _0x4e3bd2=this['editor']['editing']['view']['document'];this['listenTo'](_0x4e3bd2,'cut',_0x4d6a12=>_0x4d6a12['stop'](),{'priority':'highest'}),this['listenTo'](_0x4e3bd2,'clipboardInput',_0x648c3a=>_0x648c3a['stop'](),{'priority':'highest'}),this['listenTo'](_0x4e3bd2,'delete',_0x244fc8=>_0x244fc8['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5e1137,_0x17962a]of this['editor']['commands'])_0x17962a['affectsData']&&'addCommentThread'!==_0x5e1137&&_0x17962a['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}},Ti=class extends _0x5d945e{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ce4bb){super(_0x3ce4bb),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x506dca=this['context']['plugins']['get'](ti);this['listenTo'](_0x506dca,'_activateAnnotation',(_0x1a6e0f,_0x3ed533)=>{for(const _0x3318a7 of this['activeUIs']){const _0x271959=this['_uis']['get'](_0x3318a7);(0x0,this['uisData']['get'](_0x3318a7)['filter'])(_0x3ed533)&&_0x271959['setActiveAnnotation'](_0x3ed533);}}),this['listenTo'](_0x506dca,'_deactivateAllAnnotations',()=>{for(const _0x36483d of this['activeUIs'])this['_uis']['get'](_0x36483d)['setActiveAnnotation'](null);}),this['listenTo'](_0x506dca['_visibleAnnotations'],'add',(_0x56a783,_0x5d3fd0)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5d3fd0);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3673c0){return this['activeUIs']['has'](_0x3673c0);}['activate'](_0x36f0a4,_0x3c4ddd=this['defaultFilter']){const _0x377c2d=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x36f0a4))throw new _0x460944('annotationsuis-missing-ui',this,{'uiName':_0x36f0a4});this['isActive'](_0x36f0a4)&&this['deactivate'](_0x36f0a4),this['activeUIs']['add'](_0x36f0a4);const _0x4d0376=new Jt();Qt({'source':_0x377c2d['_visibleAnnotations'],'target':_0x4d0376,'filter':_0x3c4ddd}),this['uisData']['set'](_0x36f0a4,{'collection':_0x4d0376,'filter':_0x3c4ddd});const _0x39c5f7=this['_uis']['get'](_0x36f0a4);_0x39c5f7['attach'](_0x4d0376),this['listenTo'](_0x39c5f7,'change:activeAnnotation',(_0xd9d17d,_0x46b713,_0x1ba2c3,_0x2f6b66)=>{_0x2f6b66&&_0x377c2d['_removeActiveAnnotation'](_0x2f6b66),_0x1ba2c3&&_0x377c2d['_addActiveAnnotation'](_0x1ba2c3);});}['deactivate'](_0x5972aa){if(this['activeUIs']['delete'](_0x5972aa),!this['_uis']['has'](_0x5972aa))throw new _0x460944('annotationsuis-missing-ui',this,{'uiName':_0x5972aa});const _0x889e3b=this['_uis']['get'](_0x5972aa);_0x889e3b['detach'](),this['stopListening'](_0x889e3b),this['uisData']['get'](_0x5972aa)['collection']['destroy'](),this['uisData']['delete'](_0x5972aa);}['switchTo'](_0x2944a2){if(!this['_uis']['has'](_0x2944a2))throw new _0x460944('annotationsuis-missing-ui',this,{'uiName':_0x2944a2});const _0x23ac4a=this['context']['plugins']['get'](ti),_0x141f60=Array['from'](_0x23ac4a['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2944a2);const _0x467970=this['_uis']['get'](_0x2944a2);_0x467970['setActiveAnnotation'](_0x141f60),_0x467970['_setSelectedAnnotations']&&_0x141f60&&_0x467970['_setSelectedAnnotations']([_0x141f60]);}['deactivateAll'](){for(const _0x1a2271 of this['activeUIs'])this['deactivate'](_0x1a2271);}['register'](_0x125f1a,_0x3655d0){if(this['_uis']['has'](_0x125f1a))throw new _0x460944('annotationsuis-register-already-registered');if('function'!=typeof _0x3655d0['attach']||'function'!=typeof _0x3655d0['detach']||'function'!=typeof _0x3655d0['setActiveAnnotation'])throw new _0x460944('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x125f1a,_0x3655d0);}['refilterAnnotations'](){const _0x2b404e=this['context']['plugins']['get'](ti)['collection'],_0x201d8b=new Map(),_0xafded8=Array['from'](this['activeUIs']);for(const _0x3272e2 of this['activeUIs']){const _0x1e8044=this['uisData']['get'](_0x3272e2)['collection'];for(const _0x57f0a0 of _0x1e8044)_0x201d8b['set'](_0x57f0a0,_0x3272e2);}for(const _0x4bedf9 of _0x2b404e){const _0x576db7=_0x201d8b['get'](_0x4bedf9);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4bedf9);const _0x1fb7b5=_0xafded8['find'](_0x4563aa=>this['uisData']['get'](_0x4563aa)['filter'](_0x4bedf9));_0x576db7!==_0x1fb7b5&&(_0x576db7&&this['uisData']['get'](_0x576db7)['collection']['remove'](_0x4bedf9),_0x1fb7b5&&this['uisData']['get'](_0x1fb7b5)['collection']['add'](_0x4bedf9));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x44bc03){const _0x1af047=[];for(const _0x4f07b2 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4f07b2)['filter'])(_0x44bc03)&&_0x1af047['push'](_0x4f07b2);}if(_0x1af047['length']>0x1)throw new _0x460944('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1af047,'annotationType':_0x44bc03['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x4b19c0('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x73215){super(_0x73215);const _0x10c9c9=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 _0x46cfaf(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x10c9c9['to']('class')],'style':{'minHeight':_0x10c9c9['to']('minHeight',_0x19788b=>'number'==typeof _0x19788b?Ci(_0x19788b+0xa):null)},'dir':_0x73215['uiLanguageDirection'],'role':'application','aria-label':Et(_0x73215,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x73215,'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',_0x1e7f1e=>{this['_updateItemPositionInFocusables'](_0x1e7f1e['source']);}),this['list']['forEach'](_0x3bdc4b=>{this['focusTracker']['add'](_0x3bdc4b['element']),this['_updateItemPositionInFocusables'](_0x3bdc4b);}),this['list']['on']('change',(_0x214792,_0x4b0676)=>{for(const _0x2b4cd1 of _0x4b0676['removed'])this['focusTracker']['remove'](_0x2b4cd1['element']),this['focusables']['remove'](_0x2b4cd1);for(const _0x120842 of _0x4b0676['added'])this['focusTracker']['add'](_0x120842['element']),this['_updateItemPositionInFocusables'](_0x120842);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2624fe){const _0x82783a=this['focusables']['getIndex'](_0x2624fe);let _0x332612,_0x51b358;for(const _0x336153 of this['focusables'])if(_0x2624fe['top']<_0x336153['top']){_0x332612=_0x336153;break;}if(_0x51b358=_0x332612?this['focusables']['getIndex'](_0x332612):this['focusables']['length'],-0x1!==_0x82783a){if(_0x82783a===_0x51b358-0x1)return;this['focusables']['remove'](_0x2624fe),_0x51b358=_0x332612?this['focusables']['getIndex'](_0x332612):this['focusables']['length'];}this['focusables']['add'](_0x2624fe,_0x51b358);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x4b19c0('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x7f38c1){super(_0x7f38c1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x444bdb,_0x2eb9c6)=>_0x444bdb+_0x2eb9c6),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x126736=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x126736['to']('isAnimationDisabled',_0x23c4f2=>_0x23c4f2?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x126736['to']('top',_0x4739a7=>bi(_0x4739a7))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xf96e6a=this['element']['clientHeight'];_0xf96e6a&&(this['height']=_0xf96e6a);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x5d945e{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2dc7fb){super(_0x2dc7fb),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 _0x2090e6=this['context']['config']['get']('sidebar.container');_0x2090e6&&this['setContainer'](_0x2090e6);}['setContainer'](_0x4f775e){if(!Oi(_0x4f775e))throw new _0x460944('sidebar-setcontainer-invalid-element');this['container']=_0x4f775e;}['_attachToContainer']({viewClass:_0x4202af='',spaceBetweenItems:_0x4bb81a=0x19}={}){if(!Oi(this['container']))throw new _0x460944('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4202af,this['_spaceBetweenItems']=_0x4bb81a;}['rearrange']({removedAnnotation:_0x4adad9,previousAnnotation:_0x2e2509,nextAnnotation:_0x45e068}){const _0x23b504=this['getSidebarItemView'](_0x4adad9);this['view']['list']['remove'](_0x23b504),this['_destroySidebarItemView'](_0x4adad9),_0x2e2509&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2e2509)),_0x45e068&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x45e068)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3ee469,activatedAnnotation:_0x35e37f,disableAnimationOnActivatedAnnotation:_0x26883d}){if(this['_activeAnnotation']=_0x35e37f,_0x3ee469){_0x3ee469['isActive']=!0x1;const _0x2e63c8=this['getSidebarItemView'](_0x3ee469);_0x2e63c8&&_0x26883d&&(_0x2e63c8['isAnimationDisabled']=!0x1);}if(_0x35e37f){const _0x121050=this['getSidebarItemView'](_0x35e37f);_0x121050&&(_0x35e37f['isActive']=!0x0,_0x26883d&&(_0x121050['isAnimationDisabled']=!0x0,_0x121050['top']+=0x1),this['_alignToTargetRect'](_0x121050));}}['_detachFromContainer'](_0x47745b){if(this['view']['element']['remove'](),_0x47745b){for(const _0x5b4969 of _0x47745b)this['_destroySidebarItemView'](_0x5b4969);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3bb077,_0x2eba40){_0x2eba40||(_0x2eba40=_0x3bb077['view']);const _0x5c941b=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5c941b,_0x3bb077),this['_annotationToSidebarItemView']['set'](_0x3bb077,_0x5c941b),_0x5c941b['content']['add'](_0x2eba40),this['listenTo'](_0x3bb077['view'],'change:targetRect',(_0x299a82,_0x4748e8,_0x33429e)=>{const _0x216f18=this['_getTargetTop'](_0x3bb077,_0x33429e);_0x5c941b['_targetTop']!=_0x216f18&&(_0x5c941b['_targetTop']=_0x216f18,this['_setItemTop'](_0x5c941b,_0x216f18));}),this['listenTo'](_0x5c941b,'change:top',()=>{this['_recalculate'](_0x5c941b,'top');}),this['listenTo'](_0x5c941b,'change:bottom',()=>{this['_recalculate'](_0x5c941b,'bottom');}),this['_alignToTargetRect'](_0x5c941b);const _0x808b4a=this['_getItemBefore'](_0x5c941b);return _0x808b4a&&this['_alignAfterItem'](_0x808b4a,_0x5c941b)||this['_alignToTargetRect'](_0x5c941b),this['_updateLastItem'](),this['view']['list']['add'](_0x5c941b),_0x5c941b;}['_alignForTopChange'](_0x3b554c){if(!_0x3b554c['content']['length'])return;const _0x31305c=this['_getItemBefore'](_0x3b554c);if(!_0x31305c)return;const _0x23d998=this['_sidebarItemViewToAnnotation']['get'](_0x31305c),_0x4a7351=this['_activeAnnotation'];_0x4a7351&&_0x4a7351===_0x23d998?this['_alignAfterItem'](_0x31305c,_0x3b554c):this['_alignBeforeItem'](_0x3b554c,_0x31305c);}['_alignForBottomChange'](_0x1ff244){if(!_0x1ff244['content']['length'])return;const _0x48bff8=this['_getItemAfter'](_0x1ff244);if(!_0x48bff8)return;const _0x41bc4d=this['_sidebarItemViewToAnnotation']['get'](_0x48bff8),_0x4bb9ac=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x169bf9=this['_activeAnnotation'];_0x169bf9&&_0x169bf9===_0x41bc4d&&_0x4bb9ac?(this['_alignBeforeItem'](_0x48bff8,_0x1ff244),this['_alignAfterItem'](_0x1ff244,_0x48bff8)):_0x169bf9&&_0x169bf9===_0x41bc4d?this['_alignBeforeItem'](_0x48bff8,_0x1ff244):this['_alignAfterItem'](_0x1ff244,_0x48bff8);}['_recalculate'](_0x3ea34d,_0x2a36ee){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1a0d82,changedProp:_0x4e62f2}of this['_recalculateBuffer'])'top'===_0x4e62f2?this['_alignForTopChange'](_0x1a0d82):this['_alignForBottomChange'](_0x1a0d82);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3ea34d,'changedProp':_0x2a36ee});}['getSidebarItemView'](_0x2532dd){return this['_annotationToSidebarItemView']['get'](_0x2532dd);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x434750){const _0x1abf53=this['getSidebarItemView'](_0x434750);this['stopListening'](_0x1abf53),this['stopListening'](_0x434750['view']),_0x1abf53['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x434750),this['_sidebarItemViewToAnnotation']['delete'](_0x1abf53);}['_createSidebarView'](){const _0x4c9c76=new Ii(this['context']['locale']);return _0x4c9c76['render'](),this['on']('change:_lastItem',(_0x32f03e,_0x4a5a22,_0x2757c2,_0x278f04)=>{_0x278f04&&_0x4c9c76['unbind']('minHeight'),_0x2757c2?_0x4c9c76['bind']('minHeight')['to'](_0x2757c2,'bottom'):_0x4c9c76['minHeight']=null;}),_0x4c9c76;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1a01d3){const _0x423796=this['_sidebarItemViewToAnnotation']['get'](_0x1a01d3),_0x402ecd=_0x423796&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x423796)-0x1);return _0x402ecd&&this['getSidebarItemView'](_0x402ecd)||null;}['_getItemAfter'](_0x216457){const _0x1ca63b=this['_sidebarItemViewToAnnotation']['get'](_0x216457),_0x1b9a40=_0x1ca63b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1ca63b)+0x1);return _0x1b9a40&&this['getSidebarItemView'](_0x1b9a40)||null;}['_alignBeforeItem'](_0x40809e,_0xaa981){_0x40809e['updateHeight']();const _0x13eb56=Ni(_0xaa981['bottom']+this['_spaceBetweenItems'],_0x40809e['top']);return!!_0x13eb56&&(this['_setItemTop'](_0xaa981,_0xaa981['top']-_0x13eb56),!0x0);}['_alignAfterItem'](_0x536c18,_0x40ab21){_0x536c18['updateHeight']();const _0x11feb4=Ni(_0x536c18['bottom']+this['_spaceBetweenItems'],_0x40ab21['top']);return!!_0x11feb4&&(this['_setItemTop'](_0x40ab21,_0x40ab21['top']+_0x11feb4,!0x1),!0x0);}['_alignToTargetRect'](_0x52bfeb){const _0x133795=this['_sidebarItemViewToAnnotation']['get'](_0x52bfeb);if(!_0x133795||!_0x133795['target']||!_0x133795['targetRect'])return;const _0x1ebb5f=this['_getTargetTop'](_0x133795,_0x133795['targetRect']);this['_setItemTop'](_0x52bfeb,_0x1ebb5f);}['_getTargetTop'](_0x4e99e5,_0x5a93b4){if(null===_0x5a93b4)return 0x0;if(_0x4e99e5['target']instanceof _0x3f41c9)return _0x5a93b4['top'];{const _0x3d292b=new _0x3f41c9(this['view']['element'])['top'];return _0x5a93b4['top']-_0x3d292b;}}['_setItemTop'](_0x3c6503,_0x477878,_0x45b18e=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x45b18e&&(_0x477878=Math['max'](_0x477878,this['_getMaxAvailableTop'](_0x3c6503))),_0x3c6503['top']=_0x477878;}['_getMaxAvailableTop'](_0x125dd5){let _0x775260=this['_getItemBefore'](_0x125dd5),_0x4bc781=0x0;for(;_0x775260;)_0x775260['updateHeight'](),_0x4bc781+=this['_spaceBetweenItems']+_0x775260['height'],_0x775260=this['_getItemBefore'](_0x775260);return _0x4bc781;}};function Ni(_0x4389f7,_0x1a2d5a){return Math['max'](_0x4389f7-_0x1a2d5a,0x0);}function Oi(_0x42d46d){return null!==_0x42d46d&&'object'==typeof _0x42d46d&&0x1===_0x42d46d['nodeType'];}var Mi=class extends _0x5d945e{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3b78a2){super(_0x3b78a2),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1d3c5e(),this['_refreshPositioningDebounced']=_0x1ebf5f(()=>{_0x3b78a2['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x125153=this['context']['plugins']['get'](Ti),_0x4847eb=this['context']['plugins']['get'](ki);_0x125153['register']('wideSidebar',this),_0x4847eb['container']&&_0x125153['switchTo']('wideSidebar');}['setActiveAnnotation'](_0xd48eab){if(_0xd48eab===this['activeAnnotation'])return;const _0x3049ae=this['context']['plugins']['get'](ki);_0x3049ae['_activeAnnotation']=_0xd48eab;const _0x38ac58=this['activeAnnotation'];_0x3049ae['refresh']({'blurredAnnotation':_0x38ac58,'activatedAnnotation':_0xd48eab}),this['activeAnnotation']=_0xd48eab;}['attach'](_0x1ab435){this['annotations']=_0x1ab435;const _0x50490b=this['context']['plugins']['get'](ki);if(_0x50490b['_annotations']=_0x1ab435,this['isAttached'])throw new _0x460944('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x50490b,'set:container',()=>{this['detach'](),this['listenTo'](_0x50490b,'change:container',_0x119abd=>{_0x119abd['off'](),this['attach'](_0x1ab435);});}),_0x50490b['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x418034=_0x274d2f=>{_0x274d2f['updateTargetRect'](),_0x50490b['addAnnotation'](_0x274d2f);};for(const _0x1bc1a9 of _0x1ab435)_0x418034(_0x1bc1a9);this['listenTo'](_0x1ab435,'add',(_0x4b1ada,_0x26393e)=>{_0x418034(_0x26393e);}),this['listenTo'](_0x1ab435,'remove',(_0x4609ea,_0xf75f4e,_0x3dad1e)=>{_0x50490b['rearrange']({'removedAnnotation':_0xf75f4e,'previousAnnotation':_0x1ab435['get'](_0x3dad1e-0x1),'nextAnnotation':_0x1ab435['get'](_0x3dad1e+0x1)}),_0xf75f4e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1ab435,'focus',(_0x3c1e04,_0x43f6ad)=>{this['setActiveAnnotation'](_0x43f6ad);}),this['listenTo'](_0x1ab435,'blur',()=>{this['setActiveAnnotation'](null);});const _0xa31834=this['context']instanceof _0x2e85d8?this['context']['editors']:new _0x1d3c5e([this['context']]);for(const _0x8e9f9a of _0xa31834)this['_integrateWithEditorAnnotations'](_0x8e9f9a);this['listenTo'](_0xa31834,'add',(_0x3bcb34,_0x149705)=>{this['listenTo'](_0x149705,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x149705);});}),this['listenTo'](_0xa31834,'remove',(_0xa15fb3,_0x4ef5fa)=>{_0x4ef5fa['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4ef5fa['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x460944('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x315745=this['context']['plugins']['get'](ki);_0x315745['_detachFromContainer'](this['annotations']),this['stopListening'](_0x315745),this['stopListening'](this['annotations']),this['context']instanceof _0x2e85d8&&this['stopListening'](this['context']['editors']);for(const _0x4b2113 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4b2113);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4b963e){if(!_0x4b963e['plugins']['has']('EditorAnnotations'))return;const _0x178170=_0x4b963e['plugins']['get']('EditorAnnotations'),_0x244e9f=()=>{const _0x44b463=_0x178170['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x44b463[0x0]||null);};this['listenTo'](_0x178170,'refresh',_0x244e9f),this['listenTo'](_0x178170,'blur',(_0x56cc58,{isAnnotationTracked:_0x5b7cbd})=>{this['activeAnnotation']&&_0x5b7cbd(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x178170,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x21fd07=>{_0x178170['hasDomSelection']()&&(_0x244e9f(),_0x21fd07['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x178170);}['_destroyEditorAnnotationsIntegration'](_0x2683f7){this['stopListening'](_0x2683f7),this['_editorAnnotations']['remove'](_0x2683f7);}},Ri=class extends _0x5a263d{['counterView'];constructor(_0x378d37){super(_0x378d37);const _0x12aab7=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x17a33d,_0x284025)=>_0x17a33d?'...':_0x284025['toString']()),this['set']('annotationType',''),this['icon']=_0x1f3af2,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x12aab7['to']('annotationType',_0x40a326=>'ck-annotation-counter__badge--'+_0x40a326),_0x12aab7['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x12aab7['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x5d945e{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xb1ed5d){super(_0xb1ed5d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x270b14())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1d3c5e(),this['_refreshPositioningDebounced']=_0x1ebf5f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x701dbb(this['context']['locale']),this['balloonPanelView']=new _0xd4a3f7(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xaa16f5){this['annotations']=_0xaa16f5;const _0x344bbd=this['context']['plugins']['get'](ki),_0x422b4e=this['balloonPanelView'];if(_0x344bbd['_annotations']=_0xaa16f5,this['isAttached'])throw new _0x460944('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x344bbd,'set:container',()=>{this['detach'](),this['listenTo'](_0x344bbd,'change:container',_0x424c36=>{_0x424c36['off'](),this['attach'](_0xaa16f5);});}),_0x344bbd['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4860c5=_0x378384=>{const _0x4756de=new Ri(this['context']['locale']);_0x344bbd['addAnnotation'](_0x378384,_0x4756de),this['_annotationToNarrowView']['set'](_0x378384,_0x4756de),_0x4756de['bind']('isDirty','annotationType','number')['to'](_0x378384['view'],'isDirty','type','length'),_0x4756de['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x422b4e['content']['first']!==_0x378384['view']?(this['_showBalloon'](_0x378384),_0x378384['view']['element']['focus'](),this['setActiveAnnotation'](_0x378384)):this['setActiveAnnotation'](null);});};for(const _0x32f103 of _0xaa16f5)_0x4860c5(_0x32f103);this['listenTo'](_0xaa16f5,'add',(_0x453e94,_0x290a67)=>{_0x4860c5(_0x290a67);}),this['listenTo'](_0xaa16f5,'remove',(_0x433dbd,_0x3b7cfd,_0x13ea50)=>{this['_annotationToNarrowView']['get'](_0x3b7cfd)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3b7cfd),_0x344bbd['rearrange']({'removedAnnotation':_0x3b7cfd,'previousAnnotation':_0xaa16f5['get'](_0x13ea50-0x1),'nextAnnotation':_0xaa16f5['get'](_0x13ea50+0x1)}),_0x3b7cfd===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xaa16f5,'focus',(_0x2eb13b,_0x3b9a70)=>{this['setActiveAnnotation'](_0x3b9a70);}),this['listenTo'](_0xaa16f5,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x58cdf9,_0x52c7dc)=>{_0x52c7dc['keyCode']===_0x40bd72['esc']&&_0x422b4e['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x422b4e['content']['first']),this['_hideBalloon'](),_0x52c7dc['stopPropagation'](),_0x52c7dc['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5b8942,_0x705c76)=>{const _0x37de22=_0x705c76['target'];_0x422b4e['isVisible']&&_0x422b4e['element']['contains'](_0x37de22)||_0x344bbd['view']['element']['contains'](_0x37de22)||_0x5b8942['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x15a115=>_0x15a115['contains'](_0x37de22))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x351bb5=this['context']instanceof _0x2e85d8?this['context']['editors']:new _0x1d3c5e([this['context']]);for(const _0x560e21 of _0x351bb5)this['_integrateWithEditorAnnotations'](_0x560e21);this['listenTo'](_0x351bb5,'add',(_0x36d912,_0x31f843)=>{this['listenTo'](_0x31f843,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x31f843);});}),this['listenTo'](_0x351bb5,'remove',(_0x42ac2c,_0x57e5b9)=>{_0x57e5b9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x57e5b9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x245c50){if(_0x245c50===this['activeAnnotation'])return;const _0x31e796=this['context']['plugins']['get'](ki);_0x31e796['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x245c50,'disableAnimationOnActivatedAnnotation':!0x0}),_0x245c50&&_0x31e796['getSidebarItemView'](_0x245c50)?this['_showBalloon'](_0x245c50):this['_hideBalloon'](),this['activeAnnotation']=_0x245c50;}['detach'](){if(!this['isAttached'])throw new _0x460944('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3235a5=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2e3037=>_0x2e3037['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3235a5['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2e85d8&&this['stopListening'](this['context']['editors']);for(const _0x30c7a8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x30c7a8);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'](_0x5ce3c2){if(!_0x5ce3c2['plugins']['has']('EditorAnnotations'))return;const _0x1d6af8=_0x5ce3c2['plugins']['get']('EditorAnnotations'),_0x160198=this['context']['plugins']['get'](ki),_0x4d5a60=this['annotations'],_0x280a2c=this['balloonPanelView'],_0x992c47=()=>{const _0x475f0a=_0x1d6af8['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x475f0a),this['setActiveAnnotation'](_0x475f0a[0x0]||null);};this['listenTo'](_0x1d6af8,'refresh',_0x992c47),this['listenTo'](_0x1d6af8,'blur',(_0x17cda6,{isAnnotationTracked:_0x1c959f})=>{this['activeAnnotation']&&_0x1c959f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1d6af8,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4d5a60,'blur',_0x24cd55=>{_0x1d6af8['hasDomSelection']()&&_0x24cd55['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x260e50,_0x1d7456)=>{const _0x371fb9=_0x1d7456['target'];_0x280a2c['isVisible']&&_0x280a2c['element']['contains'](_0x371fb9)||_0x160198['view']['element']['contains'](_0x371fb9)||this['activeAnnotation']&&_0x1d6af8['hasDomSelection']()&&(_0x992c47(),_0x260e50['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1d6af8);}['_destroyEditorAnnotationsIntegration'](_0x35f898){_0x35f898&&(this['stopListening'](_0x35f898),this['_editorAnnotations']['remove'](_0x35f898));}['_setSelectedAnnotations'](_0x5d7320){for(const _0xc152ff of this['_selectedAnnotations'])_0x5d7320['includes'](_0xc152ff)||this['_manuallyClosedAnnotationViews']['delete'](_0xc152ff['view']);this['_selectedAnnotations']=_0x5d7320;}['_refreshPositioning'](){const _0x5a08ec=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5a08ec['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x236801){if(this['_manuallyClosedAnnotationViews']['has'](_0x236801['view']))return;const _0x8494c=this['balloonPanelView']['content']['first'];_0x8494c!==_0x236801['view']?(_0x8494c&&this['_detachListeners'](_0x8494c),this['_attachListeners'](_0x236801['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x236801['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1f1e74=this['balloonPanelView']['content']['first'],_0x56ae7c=_0x1f1e74&&this['annotations']['getByView'](_0x1f1e74);if(!_0x56ae7c||!this['_annotationToNarrowView']['has'](_0x56ae7c))return;const _0xe55e5c=this['_annotationToNarrowView']['get'](_0x56ae7c)['element'],_0x2eb7c3=(function(){const _0x3acc1c=_0xd4a3f7['defaultPositions'];return[_0x3acc1c['southArrowNorthEast'],_0x3acc1c['northArrowSouthEast'],_0x3acc1c['southArrowNorth'],_0x3acc1c['northArrowSouth'],_0x3acc1c['southArrowNorthWest'],_0x3acc1c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xe55e5c,'positions':_0x2eb7c3});}['_hideBalloon'](){const _0x20a492=this['balloonPanelView'],_0x18f70b=_0x20a492['content']['first'];_0x18f70b&&(this['_detachListeners'](_0x18f70b),_0x20a492['unpin'](),_0x20a492['content']['clear']());}['_attachListeners'](_0x46fbb9){this['listenTo'](_0x46fbb9,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x46fbb9,'Esc',(_0x5d0c79,_0x926823)=>{this['_manuallyClosedAnnotationViews']['add'](_0x46fbb9),this['_hideBalloon'](),_0x926823();});}['_detachListeners'](_0x48be37){this['stopListening'](_0x48be37);}},xi=class extends _0x32d196{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x63646c,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x278913){super(_0x278913),_0x278913['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x278913['plugins']['get'](_0x63646c),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x1ebf5f(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x395578=this['editor']['plugins']['get'](Ti);_0x395578['context']===this['editor']&&(_0x395578['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4d32c4,_0x581489)=>{const _0x307d67=this['_balloon'];if(this['isAttached']&&_0x307d67['visibleView']){const _0x36b3a9=this['annotations']['getByView'](_0x307d67['visibleView']);_0x36b3a9&&this['_closeAnnotation'](_0x36b3a9),_0x581489();}}));}['afterInit'](){const _0x487250=this['editor']['plugins']['get'](Ti);_0x487250['context']===this['editor']&&(_0x487250['hasActive']()||_0x487250['switchTo']('inline'));}['setActiveAnnotation'](_0x475d7d){_0x475d7d!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x475d7d&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x475d7d)&&this['_addAnnotationToBalloon'](_0x475d7d,!0x0),_0x475d7d['isActive']=!0x0),_0x475d7d||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x475d7d);}['attach'](_0x3ae315){this['annotations']=_0x3ae315;const _0x565522=this['editor']['plugins']['get'](Ti),_0x300553=this['_balloon'];if(this['isAttached'])throw new _0x460944('inlineannotations-attach-already-attached',this);if(_0x565522['context']!==this['editor'])throw new _0x460944('inlineannotations-not-allowed-with-context',this);const _0x421eb0=this['editor']['plugins']['get'](di);this['listenTo'](_0x421eb0,'refresh',()=>{const _0x55eba4=_0x421eb0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4db6d8,_0x35770a;!this['_forceRefresh']&&(_0x4db6d8=_0x55eba4,_0x35770a=this['_selectedAnnotations'],_0x4db6d8['length']===_0x35770a['length']&&_0x4db6d8['every'](_0x3789ff=>_0x35770a['includes'](_0x3789ff)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x55eba4),this['setActiveAnnotation'](_0x55eba4[0x0]||null));}),this['listenTo'](_0x421eb0,'blur',(_0x5dc874,{isAnnotationTracked:_0x42f11b})=>{this['activeAnnotation']&&_0x42f11b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x421eb0,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4e3df1,_0x152abd,_0x3d22ad)=>{_0x3d22ad||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3ae315,'remove',(_0x106a8c,_0x382957)=>{this['_removeAnnotationFromBalloon'](_0x382957),_0x382957===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x300553,'change:visibleView',(_0x1a8f96,_0x3f1825,_0xcf748f,_0x2b67d7)=>{_0x2b67d7&&this['stopListening'](_0x2b67d7);const _0xd2e8c7=_0x3ae315['getByView'](_0xcf748f);_0xcf748f&&_0xd2e8c7&&(this['listenTo'](_0xcf748f,'change:height',()=>{_0x300553['updatePosition']();}),this['listenTo'](_0xcf748f,'Esc',()=>{this['_closeAnnotation'](_0xd2e8c7),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xd2e8c7&&this['setActiveAnnotation'](_0xd2e8c7));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x300553['visibleView']&&_0x3ae315['getByView'](_0x300553['visibleView'])&&_0x300553['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 _0x460944('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x360c41 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x360c41);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x517ac0){for(const _0x46ae0b of this['_selectedAnnotations'])_0x517ac0['includes'](_0x46ae0b)||this['_manuallyClosed']['delete'](_0x46ae0b);for(const _0x27d5d2 of this['annotations'])_0x517ac0['includes'](_0x27d5d2)||this['_removeAnnotationFromBalloon'](_0x27d5d2);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2d17bf of _0x517ac0)this['_addAnnotationToBalloon'](_0x2d17bf);}this['_selectedAnnotations']=_0x517ac0;}['_addAnnotationToBalloon'](_0x11da9e,_0x1ea460=!0x1){this['_manuallyClosed']['has'](_0x11da9e)||(this['_addedAnnotations']['has'](_0x11da9e)||this['_balloon']['hasView'](_0x11da9e['view'])||(this['_addedAnnotations']['add'](_0x11da9e),this['_balloon']['add']({'stackId':_0x11da9e['view']['id'],'view':_0x11da9e['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x11da9e)}})),_0x1ea460&&this['_balloon']['showStack'](_0x11da9e['view']['id']));}['_getBalloonTargetForAnnotation'](_0x29aab9){const _0x50adfb=_0x29aab9['target'],_0x26ad89=this['editor']['editing']['view'],_0x2e40f7=_0x26ad89['document']['selection']['getFirstRange'](),_0x43d86c=_0x26ad89['domConverter']['viewRangeToDom'](_0x2e40f7);if(_0x43d86c['collapse'](!0x0),_0x50adfb){if(_0x50adfb instanceof _0x3f41c9)return _0x50adfb;let _0x4884b4=[];for(const _0x3913d6 of _0x50adfb)_0x4884b4['push'](..._0x3f41c9['getDomElementRects'](_0x3913d6));_0x4884b4=function(_0x26c065){const _0x1dde1a=[];let _0x4b2aa=_0x26c065[0x0];for(let _0x3bb831=0x1;_0x3bb831<_0x26c065['length'];_0x3bb831++)if(Pi(_0x4b2aa,_0x26c065[_0x3bb831])){const _0x5d622f=_0x26c065[_0x3bb831]['width'];_0x4b2aa['width']+=_0x5d622f,_0x4b2aa['right']+=_0x5d622f;}else _0x1dde1a['push'](_0x4b2aa),_0x4b2aa=_0x26c065[_0x3bb831];return _0x1dde1a['push'](_0x4b2aa),_0x1dde1a;}(_0x4884b4);const _0x3e8892=_0x43d86c['getBoundingClientRect']();return _0x4884b4['find'](_0x50541c=>_0x50541c['top']<=_0x3e8892['top']&&_0x50541c['bottom']>=_0x3e8892['bottom']&&_0x50541c['left']<=_0x3e8892['left']&&_0x50541c['right']>=_0x3e8892['right'])||_0x4884b4[0x0];}return _0x29aab9['targetRect']||_0x43d86c;}['_removeAnnotationFromBalloon'](_0x57f65e){this['_addedAnnotations']['has'](_0x57f65e)&&this['_balloon']['hasView'](_0x57f65e['view'])&&(this['_addedAnnotations']['delete'](_0x57f65e),this['_balloon']['remove'](_0x57f65e['view']));}['_closeAnnotation'](_0x3ac424){this['_manuallyClosed']['add'](_0x3ac424),this['_removeAnnotationFromBalloon'](_0x3ac424);}};function Pi(_0xb3bcb4,_0x23928b){return _0xb3bcb4['top']===_0x23928b['top']&&_0xb3bcb4['bottom']===_0x23928b['bottom']&&_0xb3bcb4['right']===_0x23928b['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5038c7,_0x1f7df8){super(_0x5038c7),this['set']('isEmpty',!_0x1f7df8['length']),this['focusTracker']=new _0x46cfaf(),this['_annotationViews']=_0x1f7df8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x1f7df8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1f7df8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1f7df8,'remove',(_0x1ec123,_0x3bfcfe)=>{_0x3bfcfe['isActive']&&this['focus'](),_0x1f7df8['length']||(this['isEmpty']=!0x0);});const _0x394579=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x5038c7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1f7df8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x394579['if']('isEmpty','ck-hidden',_0x4ffe70=>!_0x4ffe70)]},'children':[{'text':Et(_0x5038c7,'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 _0x52d876 of this['_annotationViews'])this['focusTracker']['add'](_0x52d876['element']);this['_annotationViews']['on']('change',(_0x33a865,{added:_0xc02967,removed:_0x3040ae})=>{for(const _0x32d596 of _0xc02967)this['focusTracker']['add'](_0x32d596['element']);for(const _0x3eb3a0 of _0x3040ae)this['focusTracker']['remove'](_0x3eb3a0['element']);});}},Di=class extends _0x5d945e{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x5df9ff){super(_0x5df9ff),this['archivedThreads']=new _0x1d3c5e();}['init'](){const _0x4ec483=this['context'],_0x3945be=_0x4ec483['plugins']['get'](oi),_0x5e91ef=_0x4ec483['plugins']['get'](ti);this['listenTo'](_0x3945be,'addCommentThread',(_0x310100,{threadId:_0x21f6c5})=>{const _0x43e261=_0x3945be['getCommentThread'](_0x21f6c5);_0x43e261['archivedAt']&&this['archivedThreads']['add'](_0x43e261,this['_calculatePosition'](_0x43e261['archivedAt'])),this['listenTo'](_0x43e261,'change:archivedAt',(_0x3fcc26,_0x3bef96,_0x4d5b7f)=>{_0x4d5b7f?this['archivedThreads']['has'](_0x43e261)||this['archivedThreads']['add'](_0x43e261,this['_calculatePosition'](_0x43e261['archivedAt'])):this['archivedThreads']['has'](_0x43e261)&&this['archivedThreads']['remove'](_0x43e261);});}),this['listenTo'](_0x3945be,'removeCommentThread',(_0xfd8be2,{threadId:_0x4c09bc})=>{const _0x231048=_0x3945be['getCommentThread'](_0x4c09bc);this['stopListening'](_0x231048),this['archivedThreads']['has'](_0x231048)&&this['archivedThreads']['remove'](_0x231048);},{'priority':'highest'}),this['listenTo'](_0x5e91ef['collection'],'focus',(_0x348406,_0xef5188)=>{_0xef5188['isVisible']||(_0xef5188['isActive']=!0x0,_0x5e91ef['activate'](_0xef5188));});}['_calculatePosition'](_0x335619){const _0x1d9fe3=[...this['archivedThreads']]['findIndex'](_0x4362f1=>_0x4362f1['archivedAt']<_0x335619);return _0x1d9fe3>-0x1?_0x1d9fe3:this['archivedThreads']['length'];}},Vi=class extends _0x32d196{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x3da067];}constructor(_0x5a87c6){super(_0x5a87c6),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x5efbaf=this['editor'],_0x13792c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5efbaf['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5a263d,!0x0)),_0x5efbaf['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xe6ebf3=this['_createCommentsArchiveButton'](rt);return _0xe6ebf3['set']({'role':'menuitemcheckbox'}),_0xe6ebf3;});const _0x43bd19=_0x5efbaf['plugins']['get'](Di),_0x59023b=_0x5efbaf['plugins']['get']('Annotations'),_0x36fc7e=_0x5efbaf['plugins']['get']('CommentsRepository');_0x43bd19['archivedThreads']['forEach'](_0x33e8c3=>{this['_handleNewThread'](_0x33e8c3);}),this['listenTo'](_0x43bd19['archivedThreads'],'add',(_0x17672b,_0x217147)=>{this['_handleNewThread'](_0x217147);}),this['listenTo'](_0x59023b['collection'],'add',(_0x1cebb1,_0x4778c2)=>{const _0x3277ee=this['_pendingThreads']['find'](_0x17ab74=>{const _0xe8f750=_0x36fc7e['_threadToController']['get'](_0x17ab74);return _0xe8f750&&_0x4778c2['innerView']===_0xe8f750['view'];});if(_0x3277ee){const _0x25406a=this['_calculatePosition'](_0x3277ee['archivedAt']);this['_addAnnotationToArchive'](_0x4778c2,_0x25406a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3277ee),0x1);}}),this['listenTo'](_0x43bd19['archivedThreads'],'remove',(_0x164a41,_0x472430)=>{const _0xda49a3=_0x5efbaf['config']['get']('collaboration.channelId');if(!_0xda49a3||_0x472430['channelId']===_0xda49a3){if(this['_pendingThreads']['includes'](_0x472430))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x472430),0x1);else{const _0x14f857=_0x36fc7e['_threadToController']['get'](_0x472430),_0x23f461=_0x59023b['getByInnerView'](_0x14f857['view']);this['annotationViews']['remove'](_0x23f461['view']),this['stopListening'](_0x23f461),this['stopListening'](_0x23f461['focusableElements']);}}}),this['listenTo'](_0x59023b['collection'],'add',(_0xe0e6d4,_0x386c9c)=>{this['listenTo'](_0x386c9c,'escape',_0x13792c);}),this['listenTo'](_0x59023b['collection'],'remove',(_0x533e3d,_0x1e41f9)=>{this['stopListening'](_0x1e41f9,'escape',_0x13792c);});}['_addAnnotationToArchive'](_0x419b8e,_0x18cdc3){this['listenTo'](_0x419b8e,'set:isVisible',_0x34d13f=>{_0x34d13f['return']=!0x1,_0x34d13f['stop']();}),this['annotationViews']['add'](_0x419b8e['view'],_0x18cdc3);}['_handleNewThread'](_0x17298d){const _0x3fc6dc=this['editor']['plugins']['get']('CommentsRepository'),_0x52ec90=this['editor']['plugins']['get']('Annotations'),_0x199658=this['editor']['config']['get']('collaboration.channelId');if(!_0x199658||_0x17298d['channelId']===_0x199658){const _0x371ca4=_0x3fc6dc['_threadToController']['get'](_0x17298d);if(!_0x371ca4)return void this['_pendingThreads']['push'](_0x17298d);const _0x4257bf=this['_calculatePosition'](_0x17298d['archivedAt']),_0x3fc573=_0x52ec90['getByInnerView'](_0x371ca4['view']);_0x3fc573['isVisible']&&_0x52ec90['_visibleAnnotations']['remove'](_0x3fc573),this['_addAnnotationToArchive'](_0x3fc573,_0x4257bf);}}['_calculatePosition'](_0x31baba){const _0x438b34=this['editor']['config']['get']('collaboration.channelId'),_0x7bdea5=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x3b1ddb=>_0x3b1ddb['channelId']===_0x438b34)['findIndex'](_0x169771=>_0x169771['archivedAt']<_0x31baba);return _0x7bdea5<0x0||_0x7bdea5>this['annotationViews']['length']?this['annotationViews']['length']:_0x7bdea5-0x1;}['_toggleDialog'](){const _0xa1bf80=this['editor'],_0x15e4c3=_0xa1bf80['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0xa1bf80['locale'],this['annotationViews'])),'commentsArchive'===_0x15e4c3['id']?_0x15e4c3['hide']():_0x15e4c3['show']({'id':'commentsArchive','title':Et(_0xa1bf80['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4a6a61,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3cf2f2['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0xecb46,_0x542bac=!0x1){const _0x2d8b89=this['editor']['locale'],_0x3830db=this['editor']['plugins']['get']('Dialog'),_0x960a3a=new _0xecb46(_0x2d8b89);return _0x960a3a['bind']('isEnabled')['to'](this,'isEnabled'),_0x960a3a['bind']('isOn')['to'](_0x3830db,'id',_0x3eaa85=>'commentsArchive'===_0x3eaa85),_0x960a3a['set']({'label':Et(_0x2d8b89,'COMMENTS_ARCHIVE'),'icon':_0x4a6a61,'isToggleable':!0x0}),_0x542bac&&(_0x960a3a['tooltip']=!0x0),this['listenTo'](_0x960a3a,'execute',()=>this['_toggleDialog']()),_0x960a3a;}['_hideDialogOnAnnotationEscape']=_0x108e59=>{const _0x4aafc8=_0x108e59['source'];if(!this['annotationViews']['has'](_0x4aafc8['view']))return;const _0x1f3050=this['editor']['plugins']['get']('Dialog');_0x1f3050['isOpen']&&'commentsArchive'===_0x1f3050['id']&&(_0x1f3050['hide'](),_0x108e59['stop']());};},Bi=class extends _0x32d196{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};