@ckeditor/ckeditor5-comments 40.2.0 → 41.0.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 (157) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/build/comments.js +2 -2
  4. package/lang/translations/af.po +1 -1
  5. package/lang/translations/ar.po +1 -1
  6. package/lang/translations/bg.po +1 -1
  7. package/lang/translations/bn.po +1 -1
  8. package/lang/translations/bs.po +1 -1
  9. package/lang/translations/ca.po +1 -1
  10. package/lang/translations/cs.po +1 -1
  11. package/lang/translations/da.po +1 -1
  12. package/lang/translations/de-ch.po +1 -1
  13. package/lang/translations/de.po +1 -1
  14. package/lang/translations/el.po +1 -1
  15. package/lang/translations/en-au.po +1 -1
  16. package/lang/translations/en.po +1 -1
  17. package/lang/translations/es-co.po +1 -1
  18. package/lang/translations/es.po +1 -1
  19. package/lang/translations/et.po +1 -1
  20. package/lang/translations/fa.po +1 -1
  21. package/lang/translations/fi.po +1 -1
  22. package/lang/translations/fr.po +1 -1
  23. package/lang/translations/gl.po +1 -1
  24. package/lang/translations/he.po +1 -1
  25. package/lang/translations/hi.po +1 -1
  26. package/lang/translations/hr.po +1 -1
  27. package/lang/translations/hu.po +1 -1
  28. package/lang/translations/id.po +1 -1
  29. package/lang/translations/it.po +1 -1
  30. package/lang/translations/ja.po +1 -1
  31. package/lang/translations/jv.po +1 -1
  32. package/lang/translations/ko.po +1 -1
  33. package/lang/translations/lt.po +1 -1
  34. package/lang/translations/lv.po +1 -1
  35. package/lang/translations/ms.po +1 -1
  36. package/lang/translations/nl.po +1 -1
  37. package/lang/translations/no.po +1 -1
  38. package/lang/translations/pl.po +1 -1
  39. package/lang/translations/pt-br.po +1 -1
  40. package/lang/translations/pt.po +1 -1
  41. package/lang/translations/ro.po +1 -1
  42. package/lang/translations/ru.po +1 -1
  43. package/lang/translations/sk.po +1 -1
  44. package/lang/translations/sq.po +1 -1
  45. package/lang/translations/sr-latn.po +1 -1
  46. package/lang/translations/sr.po +1 -1
  47. package/lang/translations/sv.po +1 -1
  48. package/lang/translations/th.po +1 -1
  49. package/lang/translations/tk.po +1 -1
  50. package/lang/translations/tr.po +1 -1
  51. package/lang/translations/tt.po +1 -1
  52. package/lang/translations/ug.po +1 -1
  53. package/lang/translations/uk.po +1 -1
  54. package/lang/translations/ur.po +1 -1
  55. package/lang/translations/vi.po +1 -1
  56. package/lang/translations/zh-cn.po +1 -1
  57. package/lang/translations/zh.po +1 -1
  58. package/package.json +4 -3
  59. package/src/annotations/annotation.d.ts +7 -7
  60. package/src/annotations/annotation.js +2 -2
  61. package/src/annotations/annotationcollection.d.ts +4 -4
  62. package/src/annotations/annotationcollection.js +2 -2
  63. package/src/annotations/annotations.d.ts +7 -7
  64. package/src/annotations/annotations.js +2 -2
  65. package/src/annotations/annotationsuis.d.ts +6 -6
  66. package/src/annotations/annotationsuis.js +2 -2
  67. package/src/annotations/editorannotations.d.ts +5 -5
  68. package/src/annotations/editorannotations.js +2 -2
  69. package/src/annotations/inlineannotations.d.ts +7 -7
  70. package/src/annotations/inlineannotations.js +2 -2
  71. package/src/annotations/narrowsidebar.d.ts +7 -7
  72. package/src/annotations/narrowsidebar.js +2 -2
  73. package/src/annotations/sidebar.d.ts +6 -6
  74. package/src/annotations/sidebar.js +2 -2
  75. package/src/annotations/view/annotationcounterbuttonview.d.ts +3 -3
  76. package/src/annotations/view/annotationcounterbuttonview.js +2 -2
  77. package/src/annotations/view/annotationview.d.ts +3 -3
  78. package/src/annotations/view/annotationview.js +2 -2
  79. package/src/annotations/view/sidebaritemview.d.ts +3 -3
  80. package/src/annotations/view/sidebaritemview.js +2 -2
  81. package/src/annotations/view/sidebarview.d.ts +3 -3
  82. package/src/annotations/view/sidebarview.js +2 -2
  83. package/src/annotations/widesidebar.d.ts +6 -6
  84. package/src/annotations/widesidebar.js +2 -2
  85. package/src/augmentation.d.ts +2 -2
  86. package/src/augmentation.js +1 -1
  87. package/src/comments/addcommentthreadcommand.d.ts +2 -2
  88. package/src/comments/addcommentthreadcommand.js +2 -2
  89. package/src/comments/commentsarchive.d.ts +5 -5
  90. package/src/comments/commentsarchive.js +2 -2
  91. package/src/comments/commentsarchiveui.d.ts +6 -6
  92. package/src/comments/commentsarchiveui.js +2 -2
  93. package/src/comments/commentsediting.d.ts +7 -7
  94. package/src/comments/commentsediting.js +2 -2
  95. package/src/comments/commentsrepository.d.ts +12 -12
  96. package/src/comments/commentsrepository.js +2 -2
  97. package/src/comments/commentsui.d.ts +6 -6
  98. package/src/comments/commentsui.js +2 -2
  99. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +2 -2
  100. package/src/comments/integrations/commentsrestrictededitingmode.js +2 -2
  101. package/src/comments/integrations/importword.d.ts +2 -2
  102. package/src/comments/integrations/importword.js +2 -2
  103. package/src/comments/ui/commenteditor/commenteditor.d.ts +5 -5
  104. package/src/comments/ui/commenteditor/commenteditor.js +2 -2
  105. package/src/comments/ui/commenteditor/commenteditorui.d.ts +4 -4
  106. package/src/comments/ui/commenteditor/commenteditorui.js +2 -2
  107. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +5 -5
  108. package/src/comments/ui/commenteditor/commenteditoruiview.js +2 -2
  109. package/src/comments/ui/commentthreadcontroller.d.ts +5 -5
  110. package/src/comments/ui/commentthreadcontroller.js +2 -2
  111. package/src/comments/ui/view/basecommentthreadview.d.ts +9 -9
  112. package/src/comments/ui/view/basecommentthreadview.js +2 -2
  113. package/src/comments/ui/view/basecommentview.d.ts +5 -5
  114. package/src/comments/ui/view/basecommentview.js +2 -2
  115. package/src/comments/ui/view/collapsedcommentsview.d.ts +3 -3
  116. package/src/comments/ui/view/collapsedcommentsview.js +2 -2
  117. package/src/comments/ui/view/commentcontentview.d.ts +3 -3
  118. package/src/comments/ui/view/commentcontentview.js +2 -2
  119. package/src/comments/ui/view/commentinputview.d.ts +5 -5
  120. package/src/comments/ui/view/commentinputview.js +2 -2
  121. package/src/comments/ui/view/commentsarchiveview.d.ts +4 -4
  122. package/src/comments/ui/view/commentsarchiveview.js +2 -2
  123. package/src/comments/ui/view/commentslistview.d.ts +6 -6
  124. package/src/comments/ui/view/commentslistview.js +2 -2
  125. package/src/comments/ui/view/commentthreadheaderview.d.ts +4 -4
  126. package/src/comments/ui/view/commentthreadheaderview.js +2 -2
  127. package/src/comments/ui/view/commentthreadinputview.d.ts +6 -6
  128. package/src/comments/ui/view/commentthreadinputview.js +2 -2
  129. package/src/comments/ui/view/commentthreadview.d.ts +8 -8
  130. package/src/comments/ui/view/commentthreadview.js +2 -2
  131. package/src/comments/ui/view/commentview.d.ts +9 -9
  132. package/src/comments/ui/view/commentview.js +2 -2
  133. package/src/comments.d.ts +11 -11
  134. package/src/comments.js +2 -2
  135. package/src/commentsonly.d.ts +3 -3
  136. package/src/commentsonly.js +2 -2
  137. package/src/config.d.ts +4 -4
  138. package/src/config.js +1 -1
  139. package/src/index.d.ts +21 -21
  140. package/src/index.js +2 -2
  141. package/src/utils/common-translations.d.ts +2 -2
  142. package/src/utils/common-translations.js +2 -2
  143. package/src/utils/createmutationobserver.d.ts +1 -1
  144. package/src/utils/createmutationobserver.js +2 -2
  145. package/theme/annotation-inline.css +1 -1
  146. package/theme/annotation.css +1 -1
  147. package/theme/comment.css +1 -1
  148. package/theme/commentinput.css +1 -1
  149. package/theme/commentmarker.css +1 -1
  150. package/theme/commentsarchive.css +2 -2
  151. package/theme/commentthread.css +1 -1
  152. package/theme/icons/add-comment.svg +1 -1
  153. package/theme/icons/comments-archive.svg +1 -1
  154. package/theme/icons/edit-comment.svg +1 -1
  155. package/theme/icons/remove-comment.svg +1 -1
  156. package/theme/sidebar-narrow.css +1 -1
  157. package/theme/sidebar.css +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2fc5=['deactivateAll','createAnnotation','stopListening','activeAnnotations','_activateAnnotation','activate','collection','createAnnotationView','delete','set','destroy','_removeActiveAnnotation','element','isVisible','refreshPositioning','_deactivateAllAnnotations','pluginName','source','view','change:isVisible','_visibleAnnotations','remove','listenTo','_bindAnnotationsToVisibleAnnotations','getByInnerView','has','Annotations','fire','add'];(function(_0x2039ff,_0x2fc512){const _0x1005e3=function(_0x20aa12){while(--_0x20aa12){_0x2039ff['push'](_0x2039ff['shift']());}};_0x1005e3(++_0x2fc512);}(_0x2fc5,0xeb));const _0x1005=function(_0x2039ff,_0x2fc512){_0x2039ff=_0x2039ff-0x0;let _0x1005e3=_0x2fc5[_0x2039ff];return _0x1005e3;};import{ContextPlugin as _0x202184}from'ckeditor5/src/core';import _0x4db80b from'./annotation';import _0x46d8cf from'./annotationcollection';import _0x3dc909 from'./view/annotationview';export default class b extends _0x202184{static get[_0x1005('0xd')](){return _0x1005('0x17');}constructor(_0x5de84f){super(_0x5de84f),this[_0x1005('0x3')]=new _0x46d8cf(),this['_visibleAnnotations']=new _0x46d8cf(),this[_0x1005('0x6')](_0x1005('0x0'),new Set()),this[_0x1005('0x14')]();}[_0x1005('0x19')](_0x344d87){this[_0x1005('0x3')][_0x1005('0x19')](_0x344d87);}[_0x1005('0x12')](_0x52aa76){this['collection'][_0x1005('0x12')](_0x52aa76),_0x52aa76[_0x1005('0x7')]();}['refreshVisibility'](){for(const _0xf8e732 of this[_0x1005('0x3')])_0xf8e732['refreshVisibility']();}[_0x1005('0xb')](){this[_0x1005('0x11')]['refreshPositioning']();}[_0x1005('0x15')](_0x19c69e){return this[_0x1005('0x3')][_0x1005('0x15')](_0x19c69e);}[_0x1005('0x1a')](){this[_0x1005('0x18')](_0x1005('0xc'));}[_0x1005('0x7')](){for(const _0x2c9288 of this[_0x1005('0x3')])_0x2c9288['destroy']();this[_0x1005('0x11')][_0x1005('0x7')](),this[_0x1005('0x3')][_0x1005('0x7')](),super[_0x1005('0x7')]();}[_0x1005('0x2')](_0x20f666){this['fire'](_0x1005('0x1'),_0x20f666);}[_0x1005('0x1b')](_0x9d00ad){return new _0x4db80b(_0x9d00ad);}[_0x1005('0x4')](_0x105b98,_0x57df5c){return new _0x3dc909(_0x105b98,_0x57df5c);}['_addActiveAnnotation'](_0x4116e1){const _0x20ea4e=new Set(this['activeAnnotations']);_0x20ea4e[_0x1005('0x19')](_0x4116e1),this[_0x1005('0x0')]=_0x20ea4e;}[_0x1005('0x8')](_0x292139){const _0x1b0155=new Set(this[_0x1005('0x0')]);_0x1b0155[_0x1005('0x5')](_0x292139),this[_0x1005('0x0')]=_0x1b0155;}[_0x1005('0x14')](){const _0x5e66f7=this['collection'],_0x37a79f=this[_0x1005('0x11')];function _0xae28c4(_0x3b3cda){const _0x166e3e=_0x3b3cda[_0x1005('0xe')];_0x166e3e[_0x1005('0xa')]&&!_0x37a79f[_0x1005('0x16')](_0x166e3e)?_0x37a79f['add'](_0x166e3e):!_0x166e3e[_0x1005('0xa')]&&_0x37a79f[_0x1005('0x16')](_0x166e3e)&&_0x37a79f[_0x1005('0x12')](_0x166e3e),_0x166e3e[_0x1005('0xf')]['focusTracker'][_0x1005('0x12')](_0x166e3e['view'][_0x1005('0x9')]),_0x166e3e['view']['focusTracker']['add'](_0x166e3e[_0x1005('0xf')][_0x1005('0x9')]);}this['listenTo'](_0x5e66f7,_0x1005('0x19'),(_0x104dc4,_0x2ab8c5)=>{_0x2ab8c5[_0x1005('0xa')]&&_0x37a79f['add'](_0x2ab8c5),this[_0x1005('0x13')](_0x2ab8c5,'change:isVisible',_0xae28c4);}),this[_0x1005('0x13')](_0x5e66f7,_0x1005('0x12'),(_0x23d4da,_0x11a9d5)=>{_0x37a79f['has'](_0x11a9d5)&&_0x37a79f[_0x1005('0x12')](_0x11a9d5),this[_0x1005('0x1c')](_0x11a9d5,_0x1005('0x10'),_0xae28c4);});}}
23
+ const _0x19a2=['fire','refreshPositioning','isVisible','focusTracker','has','_visibleAnnotations','getByInnerView','remove','activate','refreshVisibility','change:isVisible','_removeActiveAnnotation','element','activeAnnotations','createAnnotationView','listenTo','collection','_activateAnnotation','Annotations','view','stopListening','_bindAnnotationsToVisibleAnnotations','destroy','add','source','deactivateAll','createAnnotation'];(function(_0x34a802,_0x19a2e2){const _0x54a0e1=function(_0x22b74f){while(--_0x22b74f){_0x34a802['push'](_0x34a802['shift']());}};_0x54a0e1(++_0x19a2e2);}(_0x19a2,0x141));const _0x54a0=function(_0x34a802,_0x19a2e2){_0x34a802=_0x34a802-0x0;let _0x54a0e1=_0x19a2[_0x34a802];return _0x54a0e1;};import{ContextPlugin as _0x19ab2b}from'ckeditor5/src/core.js';import _0x272284 from'./annotation.js';import _0x4c7194 from'./annotationcollection.js';import _0xc4fa75 from'./view/annotationview.js';export default class b extends _0x19ab2b{static get['pluginName'](){return _0x54a0('0x15');}constructor(_0x2011c5){super(_0x2011c5),this['collection']=new _0x4c7194(),this[_0x54a0('0x8')]=new _0x4c7194(),this['set'](_0x54a0('0x10'),new Set()),this[_0x54a0('0x18')]();}[_0x54a0('0x1a')](_0x3994e8){this['collection']['add'](_0x3994e8);}[_0x54a0('0xa')](_0x46fcfb){this[_0x54a0('0x13')][_0x54a0('0xa')](_0x46fcfb),_0x46fcfb[_0x54a0('0x19')]();}[_0x54a0('0xc')](){for(const _0x3484bc of this[_0x54a0('0x13')])_0x3484bc[_0x54a0('0xc')]();}['refreshPositioning'](){this[_0x54a0('0x8')][_0x54a0('0x4')]();}[_0x54a0('0x9')](_0x3bf507){return this['collection'][_0x54a0('0x9')](_0x3bf507);}[_0x54a0('0x1')](){this[_0x54a0('0x3')]('_deactivateAllAnnotations');}[_0x54a0('0x19')](){for(const _0x25ccd1 of this[_0x54a0('0x13')])_0x25ccd1[_0x54a0('0x19')]();this['_visibleAnnotations'][_0x54a0('0x19')](),this['collection'][_0x54a0('0x19')](),super['destroy']();}[_0x54a0('0xb')](_0x495b68){this[_0x54a0('0x3')](_0x54a0('0x14'),_0x495b68);}[_0x54a0('0x2')](_0x1864c5){return new _0x272284(_0x1864c5);}[_0x54a0('0x11')](_0x292e01,_0x297f14){return new _0xc4fa75(_0x292e01,_0x297f14);}['_addActiveAnnotation'](_0x2f5a02){const _0x13da36=new Set(this[_0x54a0('0x10')]);_0x13da36['add'](_0x2f5a02),this[_0x54a0('0x10')]=_0x13da36;}[_0x54a0('0xe')](_0x3e9694){const _0x200191=new Set(this['activeAnnotations']);_0x200191['delete'](_0x3e9694),this[_0x54a0('0x10')]=_0x200191;}[_0x54a0('0x18')](){const _0x27a9cc=this[_0x54a0('0x13')],_0x4e57f0=this[_0x54a0('0x8')];function _0x3b2167(_0x68d66b){const _0x385234=_0x68d66b[_0x54a0('0x0')];_0x385234['isVisible']&&!_0x4e57f0[_0x54a0('0x7')](_0x385234)?_0x4e57f0[_0x54a0('0x1a')](_0x385234):!_0x385234[_0x54a0('0x5')]&&_0x4e57f0[_0x54a0('0x7')](_0x385234)&&_0x4e57f0[_0x54a0('0xa')](_0x385234),_0x385234[_0x54a0('0x16')][_0x54a0('0x6')][_0x54a0('0xa')](_0x385234[_0x54a0('0x16')][_0x54a0('0xf')]),_0x385234[_0x54a0('0x16')][_0x54a0('0x6')]['add'](_0x385234[_0x54a0('0x16')][_0x54a0('0xf')]);}this[_0x54a0('0x12')](_0x27a9cc,_0x54a0('0x1a'),(_0x429004,_0x4e250f)=>{_0x4e250f['isVisible']&&_0x4e57f0['add'](_0x4e250f),this[_0x54a0('0x12')](_0x4e250f,_0x54a0('0xd'),_0x3b2167);}),this[_0x54a0('0x12')](_0x27a9cc,'remove',(_0xd94467,_0x4e7cd4)=>{_0x4e57f0['has'](_0x4e7cd4)&&_0x4e57f0[_0x54a0('0xa')](_0x4e7cd4),this[_0x54a0('0x17')](_0x4e7cd4,_0x54a0('0xd'),_0x3b2167);});}}
@@ -1,16 +1,16 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module comments/annotations/annotationsuis
7
7
  * @publicApi
8
8
  */
9
- import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core';
10
- import { type Emitter } from 'ckeditor5/src/utils';
11
- import AnnotationCollection from './annotationcollection';
12
- import Annotations from './annotations';
13
- import type Annotation from './annotation';
9
+ import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core.js';
10
+ import { type Emitter } from 'ckeditor5/src/utils.js';
11
+ import AnnotationCollection from './annotationcollection.js';
12
+ import Annotations from './annotations.js';
13
+ import type Annotation from './annotation.js';
14
14
  /**
15
15
  * A repository of annotations UIs.
16
16
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2076=['_setSelectedAnnotations','_assertAnnotationDoesNotBelongToMultipleUIs','_activateAnnotation','_visibleAnnotations','listenTo','_removeActiveAnnotation','plugins','hasActive','set','register','remove','deactivate','context','deactivateAll','add','find','annotationsuis-register-already-registered','pluginName','from','attach','collection','has','filter','stopListening','init','setActiveAnnotation','destroy','get','push','_addActiveAnnotation','activate','activeAnnotations','_uis','isActive','annotationsuis-missing-ui','requires','function','delete','annotationsuis-register-invalid-interface','activeUIs','_uisData','_deactivateAllAnnotations'];(function(_0x476c1a,_0x207600){const _0x16f5c3=function(_0x1424ba){while(--_0x1424ba){_0x476c1a['push'](_0x476c1a['shift']());}};_0x16f5c3(++_0x207600);}(_0x2076,0x190));const _0x16f5=function(_0x476c1a,_0x207600){_0x476c1a=_0x476c1a-0x0;let _0x16f5c3=_0x2076[_0x476c1a];return _0x16f5c3;};import{ContextPlugin as _0x4c9eb0}from'ckeditor5/src/core';import{CKEditorError as _0x2ae167}from'ckeditor5/src/utils';import _0x36d090,{bindAnnotationCollections as _0x1f5955}from'./annotationcollection';import _0x3b2825 from'./annotations';export default class M extends _0x4c9eb0{static get[_0x16f5('0xd')](){return[_0x3b2825];}static get[_0x16f5('0x25')](){return'AnnotationsUIs';}constructor(_0x3e8dc5){super(_0x3e8dc5),this[_0x16f5('0x11')]=new Set(),this[_0x16f5('0xa')]=new Map(),this['_uisData']=new Map();}[_0x16f5('0x2')](){const _0x2118ca=this[_0x16f5('0x20')][_0x16f5('0x1a')]['get'](_0x3b2825);this[_0x16f5('0x18')](_0x2118ca,_0x16f5('0x16'),(_0xc7e654,_0x4b4914)=>{for(const _0x59ac6d of this[_0x16f5('0x11')]){const _0x7b1499=this[_0x16f5('0xa')]['get'](_0x59ac6d);(0x0,this['_uisData'][_0x16f5('0x5')](_0x59ac6d)[_0x16f5('0x0')])(_0x4b4914)&&_0x7b1499[_0x16f5('0x3')](_0x4b4914);}}),this[_0x16f5('0x18')](_0x2118ca,_0x16f5('0x13'),()=>{for(const _0x3d2064 of this['activeUIs']){this[_0x16f5('0xa')][_0x16f5('0x5')](_0x3d2064)[_0x16f5('0x3')](null);}}),this[_0x16f5('0x18')](_0x2118ca['_visibleAnnotations'],_0x16f5('0x22'),(_0x1b73ce,_0x1b33d1)=>{this[_0x16f5('0x15')](_0x1b33d1);});}[_0x16f5('0x1b')](){return this[_0x16f5('0x11')]['size']>0x0;}[_0x16f5('0xb')](_0x27db33){return this[_0x16f5('0x11')]['has'](_0x27db33);}[_0x16f5('0x8')](_0x107b56,_0x557b8a=()=>!0x0){const _0x477195=this[_0x16f5('0x20')][_0x16f5('0x1a')][_0x16f5('0x5')](_0x3b2825);if(!this[_0x16f5('0xa')][_0x16f5('0x29')](_0x107b56))throw new _0x2ae167(_0x16f5('0xc'),this,{'uiName':_0x107b56});this[_0x16f5('0xb')](_0x107b56)&&this[_0x16f5('0x1f')](_0x107b56),this[_0x16f5('0x11')][_0x16f5('0x22')](_0x107b56);const _0x23e808=new _0x36d090(),_0x2f3229=_0x477195[_0x16f5('0x17')];_0x1f5955({'source':_0x2f3229,'target':_0x23e808,'filter':_0x557b8a}),this[_0x16f5('0x12')]['set'](_0x107b56,{'collection':_0x23e808,'filter':_0x557b8a});const _0xf3e33f=this[_0x16f5('0xa')][_0x16f5('0x5')](_0x107b56);_0xf3e33f[_0x16f5('0x27')](_0x23e808),this[_0x16f5('0x18')](_0xf3e33f,'change:activeAnnotation',(_0x5a4bfe,_0x36c8e6,_0x40f9dc,_0x29a559)=>{_0x29a559&&_0x477195[_0x16f5('0x19')](_0x29a559),_0x40f9dc&&_0x477195[_0x16f5('0x7')](_0x40f9dc);});}[_0x16f5('0x1f')](_0x576242){if(this[_0x16f5('0x11')][_0x16f5('0xf')](_0x576242),!this[_0x16f5('0xa')][_0x16f5('0x29')](_0x576242))throw new _0x2ae167(_0x16f5('0xc'),this,{'uiName':_0x576242});const _0x38dc25=this[_0x16f5('0xa')][_0x16f5('0x5')](_0x576242);_0x38dc25['detach'](),this[_0x16f5('0x1')](_0x38dc25),this[_0x16f5('0x12')][_0x16f5('0x5')](_0x576242)[_0x16f5('0x28')][_0x16f5('0x4')](),this[_0x16f5('0x12')]['delete'](_0x576242);}['switchTo'](_0x1c42cf){if(!this[_0x16f5('0xa')][_0x16f5('0x29')](_0x1c42cf))throw new _0x2ae167(_0x16f5('0xc'),this,{'uiName':_0x1c42cf});const _0x10ce7c=this[_0x16f5('0x20')][_0x16f5('0x1a')][_0x16f5('0x5')](_0x3b2825),_0x5ccabf=Array[_0x16f5('0x26')](_0x10ce7c[_0x16f5('0x9')])[0x0]||null;this[_0x16f5('0x21')](),this[_0x16f5('0x8')](_0x1c42cf);const _0x57f0ed=this[_0x16f5('0xa')]['get'](_0x1c42cf);_0x57f0ed[_0x16f5('0x3')](_0x5ccabf),_0x57f0ed['_setSelectedAnnotations']&&_0x5ccabf&&_0x57f0ed[_0x16f5('0x14')]([_0x5ccabf]);}['deactivateAll'](){for(const _0x3d22a2 of this[_0x16f5('0x11')])this[_0x16f5('0x1f')](_0x3d22a2);}[_0x16f5('0x1d')](_0x1eb696,_0x3ebee6){if(this['_uis']['has'](_0x1eb696))throw new _0x2ae167(_0x16f5('0x24'));if(_0x16f5('0xe')!=typeof _0x3ebee6[_0x16f5('0x27')]||_0x16f5('0xe')!=typeof _0x3ebee6['detach']||_0x16f5('0xe')!=typeof _0x3ebee6[_0x16f5('0x3')])throw new _0x2ae167(_0x16f5('0x10'),null);this[_0x16f5('0xa')]['set'](_0x1eb696,_0x3ebee6);}['refilterAnnotations'](){const _0x48277e=this['context']['plugins'][_0x16f5('0x5')](_0x3b2825)['collection'],_0x4b6f8f=new Map(),_0x1e53c1=Array[_0x16f5('0x26')](this[_0x16f5('0x11')]);for(const _0xf9063c of this[_0x16f5('0x11')]){const _0x434469=this[_0x16f5('0x12')][_0x16f5('0x5')](_0xf9063c)['collection'];for(const _0xb19017 of _0x434469)_0x4b6f8f[_0x16f5('0x1c')](_0xb19017,_0xf9063c);}for(const _0x3869fc of _0x48277e){const _0x3aff8e=_0x4b6f8f[_0x16f5('0x5')](_0x3869fc);this[_0x16f5('0x15')](_0x3869fc);const _0x3b5c86=_0x1e53c1[_0x16f5('0x23')](_0x3b96e5=>this[_0x16f5('0x12')][_0x16f5('0x5')](_0x3b96e5)[_0x16f5('0x0')](_0x3869fc));_0x3aff8e!==_0x3b5c86&&(_0x3aff8e&&this[_0x16f5('0x12')][_0x16f5('0x5')](_0x3aff8e)[_0x16f5('0x28')][_0x16f5('0x1e')](_0x3869fc),_0x3b5c86&&this['_uisData'][_0x16f5('0x5')](_0x3b5c86)[_0x16f5('0x28')]['add'](_0x3869fc));}}[_0x16f5('0x4')](){this[_0x16f5('0x21')](),super['destroy']();}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xef212e){const _0x4c4487=[];for(const _0xf8334d of this['activeUIs']){(0x0,this['_uisData'][_0x16f5('0x5')](_0xf8334d)[_0x16f5('0x0')])(_0xef212e)&&_0x4c4487[_0x16f5('0x6')](_0xf8334d);}if(_0x4c4487['length']>0x1)throw new _0x2ae167('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4c4487,'annotationType':_0xef212e['type']});}}
23
+ const _0x29ab=['context','find','type','length','activate','set','_removeActiveAnnotation','delete','listenTo','_assertAnnotationDoesNotBelongToMultipleUIs','annotationsuis-register-invalid-interface','_uis','deactivate','register','function','deactivateAll','push','destroy','_uisData','activeUIs','get','filter','annotationsuis-missing-ui','switchTo','pluginName','change:activeAnnotation','_setSelectedAnnotations','detach','_addActiveAnnotation','requires','_visibleAnnotations','refilterAnnotations','add','attach','setActiveAnnotation','annotationsuis-register-already-registered','size','remove','from','collection','plugins','has'];(function(_0x20b86f,_0x29ab05){const _0x476d44=function(_0x5d92d2){while(--_0x5d92d2){_0x20b86f['push'](_0x20b86f['shift']());}};_0x476d44(++_0x29ab05);}(_0x29ab,0xed));const _0x476d=function(_0x20b86f,_0x29ab05){_0x20b86f=_0x20b86f-0x0;let _0x476d44=_0x29ab[_0x20b86f];return _0x476d44;};import{ContextPlugin as _0xdf4e48}from'ckeditor5/src/core.js';import{CKEditorError as _0x26eb3d}from'ckeditor5/src/utils.js';import _0x503867,{bindAnnotationCollections as _0x444311}from'./annotationcollection.js';import _0x35ab0b from'./annotations.js';export default class j extends _0xdf4e48{static get[_0x476d('0x2')](){return[_0x35ab0b];}static get[_0x476d('0x27')](){return'AnnotationsUIs';}constructor(_0x2fea17){super(_0x2fea17),this['activeUIs']=new Set(),this[_0x476d('0x1a')]=new Map(),this[_0x476d('0x21')]=new Map();}['init'](){const _0x30eca1=this['context']['plugins'][_0x476d('0x23')](_0x35ab0b);this[_0x476d('0x17')](_0x30eca1,'_activateAnnotation',(_0x782d2,_0x13825d)=>{for(const _0x3f415e of this['activeUIs']){const _0x439320=this[_0x476d('0x1a')]['get'](_0x3f415e);(0x0,this[_0x476d('0x21')]['get'](_0x3f415e)[_0x476d('0x24')])(_0x13825d)&&_0x439320['setActiveAnnotation'](_0x13825d);}}),this[_0x476d('0x17')](_0x30eca1,'_deactivateAllAnnotations',()=>{for(const _0x5c6a53 of this['activeUIs']){this[_0x476d('0x1a')][_0x476d('0x23')](_0x5c6a53)['setActiveAnnotation'](null);}}),this[_0x476d('0x17')](_0x30eca1[_0x476d('0x3')],_0x476d('0x5'),(_0x3bd5b1,_0x1138d6)=>{this[_0x476d('0x18')](_0x1138d6);});}['hasActive'](){return this[_0x476d('0x22')][_0x476d('0x9')]>0x0;}['isActive'](_0x1b54db){return this[_0x476d('0x22')][_0x476d('0xe')](_0x1b54db);}[_0x476d('0x13')](_0x48ab3b,_0x5bbecd=()=>!0x0){const _0x51a3f3=this['context'][_0x476d('0xd')][_0x476d('0x23')](_0x35ab0b);if(!this[_0x476d('0x1a')][_0x476d('0xe')](_0x48ab3b))throw new _0x26eb3d(_0x476d('0x25'),this,{'uiName':_0x48ab3b});this['isActive'](_0x48ab3b)&&this[_0x476d('0x1b')](_0x48ab3b),this[_0x476d('0x22')][_0x476d('0x5')](_0x48ab3b);const _0x2c82d5=new _0x503867(),_0x595a4a=_0x51a3f3[_0x476d('0x3')];_0x444311({'source':_0x595a4a,'target':_0x2c82d5,'filter':_0x5bbecd}),this[_0x476d('0x21')]['set'](_0x48ab3b,{'collection':_0x2c82d5,'filter':_0x5bbecd});const _0x598e9a=this[_0x476d('0x1a')][_0x476d('0x23')](_0x48ab3b);_0x598e9a[_0x476d('0x6')](_0x2c82d5),this[_0x476d('0x17')](_0x598e9a,_0x476d('0x28'),(_0x54fba2,_0x404477,_0x53b9f8,_0xcde575)=>{_0xcde575&&_0x51a3f3[_0x476d('0x15')](_0xcde575),_0x53b9f8&&_0x51a3f3[_0x476d('0x1')](_0x53b9f8);});}[_0x476d('0x1b')](_0x4efb3b){if(this[_0x476d('0x22')]['delete'](_0x4efb3b),!this[_0x476d('0x1a')]['has'](_0x4efb3b))throw new _0x26eb3d(_0x476d('0x25'),this,{'uiName':_0x4efb3b});const _0x1d1595=this[_0x476d('0x1a')][_0x476d('0x23')](_0x4efb3b);_0x1d1595[_0x476d('0x0')](),this['stopListening'](_0x1d1595),this[_0x476d('0x21')]['get'](_0x4efb3b)[_0x476d('0xc')]['destroy'](),this[_0x476d('0x21')][_0x476d('0x16')](_0x4efb3b);}[_0x476d('0x26')](_0x16d24c){if(!this['_uis']['has'](_0x16d24c))throw new _0x26eb3d(_0x476d('0x25'),this,{'uiName':_0x16d24c});const _0x13a25c=this[_0x476d('0xf')][_0x476d('0xd')][_0x476d('0x23')](_0x35ab0b),_0x3aee7b=Array[_0x476d('0xb')](_0x13a25c['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x16d24c);const _0x4fa77d=this[_0x476d('0x1a')]['get'](_0x16d24c);_0x4fa77d['setActiveAnnotation'](_0x3aee7b),_0x4fa77d[_0x476d('0x29')]&&_0x3aee7b&&_0x4fa77d[_0x476d('0x29')]([_0x3aee7b]);}[_0x476d('0x1e')](){for(const _0x5a591b of this[_0x476d('0x22')])this[_0x476d('0x1b')](_0x5a591b);}[_0x476d('0x1c')](_0x2d631b,_0x3aa24f){if(this['_uis'][_0x476d('0xe')](_0x2d631b))throw new _0x26eb3d(_0x476d('0x8'));if(_0x476d('0x1d')!=typeof _0x3aa24f[_0x476d('0x6')]||_0x476d('0x1d')!=typeof _0x3aa24f[_0x476d('0x0')]||_0x476d('0x1d')!=typeof _0x3aa24f[_0x476d('0x7')])throw new _0x26eb3d(_0x476d('0x19'),null);this[_0x476d('0x1a')][_0x476d('0x14')](_0x2d631b,_0x3aa24f);}[_0x476d('0x4')](){const _0x1a5c5e=this['context'][_0x476d('0xd')][_0x476d('0x23')](_0x35ab0b)[_0x476d('0xc')],_0x41a6d2=new Map(),_0x4f3a02=Array[_0x476d('0xb')](this[_0x476d('0x22')]);for(const _0x3866ce of this[_0x476d('0x22')]){const _0x4bd52f=this[_0x476d('0x21')][_0x476d('0x23')](_0x3866ce)[_0x476d('0xc')];for(const _0x5c810a of _0x4bd52f)_0x41a6d2[_0x476d('0x14')](_0x5c810a,_0x3866ce);}for(const _0x4d72c8 of _0x1a5c5e){const _0x4b8ee7=_0x41a6d2['get'](_0x4d72c8);this[_0x476d('0x18')](_0x4d72c8);const _0x555337=_0x4f3a02[_0x476d('0x10')](_0x3209a7=>this[_0x476d('0x21')][_0x476d('0x23')](_0x3209a7)['filter'](_0x4d72c8));_0x4b8ee7!==_0x555337&&(_0x4b8ee7&&this[_0x476d('0x21')][_0x476d('0x23')](_0x4b8ee7)[_0x476d('0xc')][_0x476d('0xa')](_0x4d72c8),_0x555337&&this['_uisData'][_0x476d('0x23')](_0x555337)[_0x476d('0xc')]['add'](_0x4d72c8));}}[_0x476d('0x20')](){this[_0x476d('0x1e')](),super['destroy']();}[_0x476d('0x18')](_0x53ba6a){const _0x272bc4=[];for(const _0x1195ce of this[_0x476d('0x22')]){(0x0,this[_0x476d('0x21')][_0x476d('0x23')](_0x1195ce)[_0x476d('0x24')])(_0x53ba6a)&&_0x272bc4[_0x476d('0x1f')](_0x1195ce);}if(_0x272bc4[_0x476d('0x12')]>0x1)throw new _0x26eb3d('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x272bc4,'annotationType':_0x53ba6a[_0x476d('0x11')]});}}
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module comments/annotations/editorannotations
7
7
  * @publicApi
8
8
  */
9
- import { Plugin, type Editor } from 'ckeditor5/src/core';
10
- import Annotations from './annotations';
11
- import type Annotation from './annotation';
12
- import type AnnotationCollection from './annotationcollection';
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
10
+ import Annotations from './annotations.js';
11
+ import type Annotation from './annotation.js';
12
+ import type AnnotationCollection from './annotationcollection.js';
13
13
  /**
14
14
  * Integrates {@link module:comments/annotations/annotations~Annotations annotations} with the editor to provide proper behavior
15
15
  * for annotations created through the editor features.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x374c=['EditorAnnotations','_dataCollectors','innerView','sort','delete','annotation','init','isEqual','refresh','directChange','refreshSelectedViews','containsRange','uiUpdate','_editorAnnotations','selection','isCollapsed','map','model','addSourceCollector','has','function','listenTo','push','fire','_editorAnnotationsData','update','hasDomSelection','element','from','view','plugins','document','getOrderedSelectedAnnotations','cancel','set','get','editor','remove','blur','range','getRanges','focusTracker','registerAnnotation','add','change:range','editorannotations-invalid-source-callback','requires','editing'];(function(_0x482da0,_0x374c2a){const _0x320ba5=function(_0x3bd760){while(--_0x3bd760){_0x482da0['push'](_0x482da0['shift']());}};_0x320ba5(++_0x374c2a);}(_0x374c,0x193));const _0x320b=function(_0x482da0,_0x374c2a){_0x482da0=_0x482da0-0x0;let _0x320ba5=_0x374c[_0x482da0];return _0x320ba5;};import{Plugin as _0x5ba1d1}from'ckeditor5/src/core';import{CKEditorError as _0x1a5e54}from'ckeditor5/src/utils';import{debounce as _0x1ca270}from'lodash-es';import _0x591021 from'./annotations';export default class k extends _0x5ba1d1{static get[_0x320b('0x1b')](){return[_0x591021];}static get['pluginName'](){return _0x320b('0x1d');}constructor(_0x14f6bd){super(_0x14f6bd),this[_0x320b('0x1e')]=new Set(),this['_editorAnnotations']=new Set();}[_0x320b('0x23')](){const _0x3a3c61=this[_0x320b('0x11')],_0x278278=_0x3a3c61['model'][_0x320b('0xc')][_0x320b('0x2b')],_0x1ac8bf=_0x1ca270(()=>this[_0x320b('0x27')](),0xa);_0x278278['on'](_0x320b('0x19'),(_0x90a0d,_0x103352)=>{_0x103352[_0x320b('0x26')]&&(_0x1ac8bf[_0x320b('0xe')](),this[_0x320b('0x27')]());}),this['listenTo'](_0x3a3c61[_0x320b('0x1c')][_0x320b('0xa')]['document'],'change:isFocused',(_0x25e9e7,_0x29592e,_0x54381e)=>{_0x54381e&&_0x1ac8bf();}),this[_0x320b('0x2')](_0x3a3c61['ui'][_0x320b('0x16')],'change:isFocused',(_0x455b2d,_0x1c55dc,_0x52db03)=>{_0x52db03||_0x3a3c61['isReadOnly']||this[_0x320b('0x4')](_0x320b('0x13'),{'isAnnotationTracked':_0x5abafd=>this[_0x320b('0x5')]['has'](_0x5abafd[_0x320b('0x1f')])});}),this[_0x320b('0x2')](this[_0x320b('0x11')]['ui'],_0x320b('0x6'),()=>this[_0x320b('0x4')](_0x320b('0x29')));}[_0x320b('0x17')](_0x426fca){if(this[_0x320b('0x2a')][_0x320b('0x0')](_0x426fca['view']))return;this['_editorAnnotations'][_0x320b('0x18')](_0x426fca[_0x320b('0xa')]),this['editor']['ui'][_0x320b('0x16')][_0x320b('0x18')](_0x426fca[_0x320b('0xa')][_0x320b('0x8')]);const _0x23f0fa=this[_0x320b('0x11')][_0x320b('0xb')][_0x320b('0x10')](_0x591021);this[_0x320b('0x2')](_0x23f0fa['collection'],_0x320b('0x12'),(_0x4df9e3,_0x56f468)=>{this['editor']['ui'][_0x320b('0x16')][_0x320b('0x12')](_0x56f468[_0x320b('0xa')][_0x320b('0x8')]),this[_0x320b('0x2a')][_0x320b('0x21')](_0x56f468['view']);});}['hasDomSelection'](){return this['editor'][_0x320b('0x1c')][_0x320b('0xa')][_0x320b('0x7')];}[_0x320b('0x2f')](_0x17d7db){if(_0x320b('0x1')!=typeof _0x17d7db)throw new _0x1a5e54(_0x320b('0x1a'));this[_0x320b('0x1e')][_0x320b('0x18')](_0x17d7db);}[_0x320b('0x27')](){this['fire'](_0x320b('0x25'));}[_0x320b('0xd')]({activeAnnotation:_0x28303,annotations:_0x19f41e}){const _0xf79a3c=[],_0x2690b9=this[_0x320b('0x11')][_0x320b('0x2e')]['document'][_0x320b('0x2b')],_0x54330d=Array[_0x320b('0x9')](_0x2690b9[_0x320b('0x15')]());for(const [_0x4e68ef,_0x50954b]of this[_0x320b('0x5')]){const _0x3b40f2=_0x3fb158(_0x50954b),_0x442969=_0x19f41e['getByInnerView'](_0x4e68ef);_0x3b40f2&&_0x442969&&_0xf79a3c[_0x320b('0x3')]({'annotation':_0x442969,'range':_0x3b40f2});}function _0x3fb158(_0x5f12ac){for(const _0x449a28 of _0x5f12ac)for(const _0x48b5bf of _0x54330d)if(_0x449a28[_0x320b('0x28')](_0x48b5bf,!_0x2690b9[_0x320b('0x2c')]))return _0x449a28;return null;}return _0xf79a3c[_0x320b('0x20')]((_0x30d1b3,_0x7ba02d)=>{const _0x7aec88=_0x30d1b3['range'],_0x144bc5=_0x7ba02d[_0x320b('0x14')];if(!_0x7aec88[_0x320b('0x24')](_0x144bc5)){if(_0x7aec88[_0x320b('0x28')](_0x144bc5,!0x0))return 0x1;if(_0x144bc5[_0x320b('0x28')](_0x7aec88,!0x0))return-0x1;}return _0x30d1b3[_0x320b('0x22')]==_0x28303?-0x1:_0x7ba02d[_0x320b('0x22')]==_0x28303?0x1:0x0;})[_0x320b('0x2d')](_0x1956e7=>_0x1956e7[_0x320b('0x22')]);}get['_editorAnnotationsData'](){const _0x4afad9=new Map();for(const _0x24be49 of Array[_0x320b('0x9')](this['_dataCollectors']))for(const [_0x51b928,_0x3b481c]of _0x24be49())_0x4afad9[_0x320b('0xf')](_0x51b928,_0x3b481c);return _0x4afad9;}}
23
+ const _0xdd6d=['blur','set','fire','isCollapsed','remove','refreshSelectedViews','change:isFocused','listenTo','cancel','hasDomSelection','containsRange','isEqual','annotation','editing','editor','uiUpdate','refresh','selection','_editorAnnotationsData','getOrderedSelectedAnnotations','sort','document','add','update','range','directChange','isReadOnly','innerView','_editorAnnotations','element','EditorAnnotations','get','getByInnerView','has','requires','view','model','_dataCollectors','collection','focusTracker','addSourceCollector','pluginName','editorannotations-invalid-source-callback','init','change:range','getRanges'];(function(_0x86d3e4,_0xdd6dcf){const _0x18462b=function(_0x21c2bd){while(--_0x21c2bd){_0x86d3e4['push'](_0x86d3e4['shift']());}};_0x18462b(++_0xdd6dcf);}(_0xdd6d,0x87));const _0x1846=function(_0x86d3e4,_0xdd6dcf){_0x86d3e4=_0x86d3e4-0x0;let _0x18462b=_0xdd6d[_0x86d3e4];return _0x18462b;};import{Plugin as _0x26b331}from'ckeditor5/src/core.js';import{CKEditorError as _0x5e2158}from'ckeditor5/src/utils.js';import{debounce as _0x1e4996}from'lodash-es';import _0x534d21 from'./annotations.js';export default class k extends _0x26b331{static get[_0x1846('0x25')](){return[_0x534d21];}static get[_0x1846('0x2c')](){return _0x1846('0x21');}constructor(_0x398050){super(_0x398050),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}[_0x1846('0x0')](){const _0x1167ba=this[_0x1846('0x11')],_0x1a06c1=_0x1167ba[_0x1846('0x27')][_0x1846('0x18')]['selection'],_0x5b1e93=_0x1e4996(()=>this[_0x1846('0x8')](),0xa);_0x1a06c1['on'](_0x1846('0x1'),(_0x2b28e7,_0x5727c3)=>{_0x5727c3[_0x1846('0x1c')]&&(_0x5b1e93[_0x1846('0xb')](),this[_0x1846('0x8')]());}),this[_0x1846('0xa')](_0x1167ba[_0x1846('0x10')]['view']['document'],_0x1846('0x9'),(_0x8f03a2,_0x26861f,_0x3330)=>{_0x3330&&_0x5b1e93();}),this[_0x1846('0xa')](_0x1167ba['ui'][_0x1846('0x2a')],_0x1846('0x9'),(_0x48abdf,_0x4fb235,_0x613d7f)=>{_0x613d7f||_0x1167ba[_0x1846('0x1d')]||this[_0x1846('0x5')](_0x1846('0x3'),{'isAnnotationTracked':_0x5bb4f4=>this[_0x1846('0x15')][_0x1846('0x24')](_0x5bb4f4[_0x1846('0x1e')])});}),this[_0x1846('0xa')](this[_0x1846('0x11')]['ui'],_0x1846('0x1a'),()=>this[_0x1846('0x5')](_0x1846('0x12')));}['registerAnnotation'](_0x5c1aa1){if(this[_0x1846('0x1f')]['has'](_0x5c1aa1[_0x1846('0x26')]))return;this[_0x1846('0x1f')][_0x1846('0x19')](_0x5c1aa1[_0x1846('0x26')]),this[_0x1846('0x11')]['ui']['focusTracker'][_0x1846('0x19')](_0x5c1aa1[_0x1846('0x26')][_0x1846('0x20')]);const _0x24e807=this[_0x1846('0x11')]['plugins'][_0x1846('0x22')](_0x534d21);this[_0x1846('0xa')](_0x24e807[_0x1846('0x29')],_0x1846('0x7'),(_0x1ffc62,_0x16a6b5)=>{this[_0x1846('0x11')]['ui']['focusTracker'][_0x1846('0x7')](_0x16a6b5['view'][_0x1846('0x20')]),this[_0x1846('0x1f')]['delete'](_0x16a6b5[_0x1846('0x26')]);});}[_0x1846('0xc')](){return this[_0x1846('0x11')][_0x1846('0x10')][_0x1846('0x26')][_0x1846('0xc')];}[_0x1846('0x2b')](_0x54abd3){if('function'!=typeof _0x54abd3)throw new _0x5e2158(_0x1846('0x2d'));this[_0x1846('0x28')][_0x1846('0x19')](_0x54abd3);}['refreshSelectedViews'](){this['fire'](_0x1846('0x13'));}[_0x1846('0x16')]({activeAnnotation:_0x44f4e3,annotations:_0x5a274f}){const _0x4f891d=[],_0x535872=this[_0x1846('0x11')][_0x1846('0x27')][_0x1846('0x18')][_0x1846('0x14')],_0x343fc8=Array['from'](_0x535872[_0x1846('0x2')]());for(const [_0xcf87bc,_0x39bfc5]of this[_0x1846('0x15')]){const _0x411bc5=_0xcb811f(_0x39bfc5),_0x5ac696=_0x5a274f[_0x1846('0x23')](_0xcf87bc);_0x411bc5&&_0x5ac696&&_0x4f891d['push']({'annotation':_0x5ac696,'range':_0x411bc5});}function _0xcb811f(_0x441fb7){for(const _0x47316a of _0x441fb7)for(const _0x28678c of _0x343fc8)if(_0x47316a['containsRange'](_0x28678c,!_0x535872[_0x1846('0x6')]))return _0x47316a;return null;}return _0x4f891d[_0x1846('0x17')]((_0x43b404,_0x399e11)=>{const _0x21bd60=_0x43b404[_0x1846('0x1b')],_0x368929=_0x399e11['range'];if(!_0x21bd60[_0x1846('0xe')](_0x368929)){if(_0x21bd60['containsRange'](_0x368929,!0x0))return 0x1;if(_0x368929[_0x1846('0xd')](_0x21bd60,!0x0))return-0x1;}return _0x43b404[_0x1846('0xf')]==_0x44f4e3?-0x1:_0x399e11['annotation']==_0x44f4e3?0x1:0x0;})['map'](_0x4a6f54=>_0x4a6f54[_0x1846('0xf')]);}get[_0x1846('0x15')](){const _0x4212f4=new Map();for(const _0x327636 of Array['from'](this['_dataCollectors']))for(const [_0x4e0412,_0x385dce]of _0x327636())_0x4212f4[_0x1846('0x4')](_0x4e0412,_0x385dce);return _0x4212f4;}}
@@ -1,18 +1,18 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module comments/annotations/inlineannotations
7
7
  * @publicApi
8
8
  */
9
- import { Plugin, type Editor } from 'ckeditor5/src/core';
10
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
11
- import EditorAnnotations from './editorannotations';
12
- import { ContextualBalloon } from 'ckeditor5/src/ui';
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
10
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
11
+ import EditorAnnotations from './editorannotations.js';
12
+ import { ContextualBalloon } from 'ckeditor5/src/ui.js';
13
13
  import './../../theme/annotation-inline.css';
14
- import type Annotation from './annotation';
15
- import type AnnotationCollection from './annotationcollection';
14
+ import type Annotation from './annotation.js';
15
+ import type AnnotationCollection from './annotationcollection.js';
16
16
  /**
17
17
  * The popup-style UI for displaying annotations next to editor target elements.
18
18
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3590=['keystrokes','editing','domConverter','refresh','annotations','activeAnnotation','clear','_setSelectedAnnotations','setActiveAnnotation','set','find','switchTo','selection','pluginName','length','editableElement','getFirstRange','includes','_getBalloonTargetForAnnotation','left','_closeAnnotation','_selectedAnnotations','listenTo','getByView','fromRect','isFocused','change:height','every','targetRect','has','focusTracker','inlineannotations-attach-already-attached','requires','_manuallyClosed','collapse','remove','target','attach','document','init','right','focus','blur','_forceRefresh','updatePosition','plugins','register','add','_addedAnnotations','InlineAnnotations','visibleView','push','update','Esc','getOrderedSelectedAnnotations','delete','get','inline','destroy','view','top','detach','getBoundingClientRect','width','inlineannotations-not-allowed-with-context','inlineannotations-detach-not-attached','afterInit','change:visibleView','_addAnnotationToBalloon','bottom','context','isAttached','hasActive','editor','hasView','isActive','stopListening','_removeAnnotationFromBalloon','_balloon'];(function(_0x4cdc3e,_0x3590a0){const _0x1b184d=function(_0x2cd4bd){while(--_0x2cd4bd){_0x4cdc3e['push'](_0x4cdc3e['shift']());}};_0x1b184d(++_0x3590a0);}(_0x3590,0x1a7));const _0x1b18=function(_0x4cdc3e,_0x3590a0){_0x4cdc3e=_0x4cdc3e-0x0;let _0x1b184d=_0x3590[_0x4cdc3e];return _0x1b184d;};import{Plugin as _0x27bcc6}from'ckeditor5/src/core';import _0x51c007 from'./annotationsuis';import _0x2bd586 from'./editorannotations';import{ContextualBalloon as _0x30d8cc}from'ckeditor5/src/ui';import{MouseObserver as _0x4b5a78}from'ckeditor5/src/engine';import{CKEditorError as _0x2b22e0,Rect as _0x369551}from'ckeditor5/src/utils';import'./../../theme/annotation-inline.css';export default class c extends _0x27bcc6{static get[_0x1b18('0x4')](){return[_0x2bd586,_0x30d8cc,_0x51c007];}static get[_0x1b18('0x40')](){return _0x1b18('0x15');}constructor(_0x49940b){super(_0x49940b),_0x49940b[_0x1b18('0x34')][_0x1b18('0x1f')]['addObserver'](_0x4b5a78),this[_0x1b18('0x2b')]=!0x1,this[_0x1b18('0x3c')](_0x1b18('0x38'),null),this[_0x1b18('0x37')]=null,this['_manuallyClosed']=new Set(),this[_0x1b18('0x32')]=_0x49940b[_0x1b18('0x11')][_0x1b18('0x1c')](_0x30d8cc),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}[_0x1b18('0xb')](){const _0x441251=this[_0x1b18('0x2d')][_0x1b18('0x11')][_0x1b18('0x1c')](_0x51c007);_0x441251[_0x1b18('0x2a')]===this[_0x1b18('0x2d')]&&(_0x441251[_0x1b18('0x12')]('inline',this),this['editor'][_0x1b18('0x33')]['set'](_0x1b18('0x19'),(_0xc15a5c,_0xe1b553)=>{const _0x2689d3=this[_0x1b18('0x32')];if(this[_0x1b18('0x2b')]&&_0x2689d3[_0x1b18('0x16')]){const _0x1ecb31=this[_0x1b18('0x37')][_0x1b18('0x4a')](_0x2689d3[_0x1b18('0x16')]);_0x1ecb31&&this[_0x1b18('0x47')](_0x1ecb31),_0xe1b553();}}));}[_0x1b18('0x26')](){const _0x47686f=this['editor'][_0x1b18('0x11')][_0x1b18('0x1c')](_0x51c007);_0x47686f['context']===this[_0x1b18('0x2d')]&&(_0x47686f[_0x1b18('0x2c')]()||_0x47686f[_0x1b18('0x3e')](_0x1b18('0x1d')));}[_0x1b18('0x3b')](_0x21d0e1){_0x21d0e1!==this['activeAnnotation']&&(this[_0x1b18('0x38')]&&(this['activeAnnotation'][_0x1b18('0x2f')]=!0x1),_0x21d0e1&&this[_0x1b18('0x2d')]['ui'][_0x1b18('0x2')][_0x1b18('0x4c')]&&(this[_0x1b18('0x37')][_0x1b18('0x1')](_0x21d0e1)&&this[_0x1b18('0x28')](_0x21d0e1,!0x0),_0x21d0e1[_0x1b18('0x2f')]=!0x0),_0x21d0e1||this[_0x1b18('0x3a')]([]),this['activeAnnotation']=_0x21d0e1);}[_0x1b18('0x9')](_0x906d44){this[_0x1b18('0x37')]=_0x906d44;const _0x297406=this[_0x1b18('0x2d')][_0x1b18('0x11')]['get'](_0x51c007),_0x564dca=this[_0x1b18('0x32')];if(this[_0x1b18('0x2b')])throw new _0x2b22e0(_0x1b18('0x3'),this);if(_0x297406[_0x1b18('0x2a')]!==this['editor'])throw new _0x2b22e0(_0x1b18('0x24'),this);const _0x591107=this[_0x1b18('0x2d')][_0x1b18('0x11')]['get'](_0x2bd586);this['listenTo'](_0x591107,_0x1b18('0x36'),()=>{const _0x214acc=_0x591107[_0x1b18('0x1a')]({'annotations':this['annotations'],'activeAnnotation':this[_0x1b18('0x38')]});var _0x272b3e,_0x4d74a0;!this['_forceRefresh']&&(_0x272b3e=_0x214acc,_0x4d74a0=this['_selectedAnnotations'],_0x272b3e[_0x1b18('0x41')]===_0x4d74a0[_0x1b18('0x41')]&&_0x272b3e[_0x1b18('0x4e')](_0x23ca19=>_0x4d74a0[_0x1b18('0x44')](_0x23ca19)))||(this[_0x1b18('0xf')]=!0x1,this[_0x1b18('0x3a')](_0x214acc),this[_0x1b18('0x3b')](_0x214acc[0x0]||null));}),this['listenTo'](_0x591107,_0x1b18('0xe'),(_0x7f77f5,{isAnnotationTracked:_0x352aa7})=>{this[_0x1b18('0x38')]&&_0x352aa7(this[_0x1b18('0x38')])&&(this[_0x1b18('0x3a')]([]),this[_0x1b18('0x3b')](null));}),this[_0x1b18('0x49')](this[_0x1b18('0x2d')]['ui']['focusTracker'],'change:isFocused',(_0x3012c2,_0x30cd2b,_0x95c32e)=>{_0x95c32e||this[_0x1b18('0x3b')](null);}),this['listenTo'](_0x906d44,_0x1b18('0x7'),(_0x112ffc,_0x145b9d)=>{this[_0x1b18('0x31')](_0x145b9d),_0x145b9d===this[_0x1b18('0x38')]&&this['setActiveAnnotation'](null);}),this[_0x1b18('0x49')](_0x564dca,_0x1b18('0x27'),(_0x54cff4,_0x5150d4,_0xb8c947,_0x5c195d)=>{_0x5c195d&&this[_0x1b18('0x30')](_0x5c195d);const _0x1d8422=_0x906d44[_0x1b18('0x4a')](_0xb8c947);_0xb8c947&&_0x1d8422&&(this['listenTo'](_0xb8c947,_0x1b18('0x4d'),()=>{_0x564dca[_0x1b18('0x10')]();}),this['listenTo'](_0xb8c947,_0x1b18('0x19'),()=>{this[_0x1b18('0x47')](_0x1d8422),this[_0x1b18('0x2d')][_0x1b18('0x34')][_0x1b18('0x1f')]['focus']();}),this[_0x1b18('0x38')]!==_0x1d8422&&this['setActiveAnnotation'](_0x1d8422));}),this['listenTo'](this[_0x1b18('0x2d')]['ui'],_0x1b18('0x18'),()=>{_0x564dca[_0x1b18('0x16')]&&(_0x906d44['getByView'](_0x564dca['visibleView'])&&_0x564dca[_0x1b18('0x10')]());}),this[_0x1b18('0x49')](this[_0x1b18('0x2d')][_0x1b18('0x34')]['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed'][_0x1b18('0x39')]();}),this[_0x1b18('0x2d')][_0x1b18('0x34')][_0x1b18('0x1f')][_0x1b18('0xa')][_0x1b18('0x3f')][_0x1b18('0x42')]&&this['editor'][_0x1b18('0x34')]['view'][_0x1b18('0xd')](),this[_0x1b18('0x2b')]=!0x0;}[_0x1b18('0x21')](){if(!this[_0x1b18('0x2b')])throw new _0x2b22e0(_0x1b18('0x25'),this);this['setActiveAnnotation'](null);for(const _0x7e50b9 of this['_addedAnnotations'])this[_0x1b18('0x31')](_0x7e50b9);this[_0x1b18('0x30')](),this['isAttached']=!0x1,this[_0x1b18('0x37')]=null;}[_0x1b18('0x1e')](){this['isAttached']&&this[_0x1b18('0x21')]();}[_0x1b18('0x3a')](_0x412cd8){for(const _0x1189e0 of this[_0x1b18('0x48')])_0x412cd8['includes'](_0x1189e0)||this[_0x1b18('0x5')][_0x1b18('0x1b')](_0x1189e0);for(const _0x191caa of this[_0x1b18('0x37')])_0x412cd8[_0x1b18('0x44')](_0x191caa)||this[_0x1b18('0x31')](_0x191caa);if(this['editor']['ui']['focusTracker'][_0x1b18('0x4c')])for(const _0x316e23 of _0x412cd8)this[_0x1b18('0x28')](_0x316e23);this['_selectedAnnotations']=_0x412cd8;}[_0x1b18('0x28')](_0x29c971,_0x55827c=!0x1){this['_manuallyClosed'][_0x1b18('0x1')](_0x29c971)||(this[_0x1b18('0x14')]['has'](_0x29c971)||this[_0x1b18('0x32')]['hasView'](_0x29c971[_0x1b18('0x1f')])||(this['_addedAnnotations'][_0x1b18('0x13')](_0x29c971),this[_0x1b18('0x32')]['add']({'stackId':_0x29c971[_0x1b18('0x1f')]['id'],'view':_0x29c971[_0x1b18('0x1f')],'position':{'target':()=>this[_0x1b18('0x45')](_0x29c971)}})),_0x55827c&&this[_0x1b18('0x32')]['showStack'](_0x29c971['view']['id']));}['_getBalloonTargetForAnnotation'](_0x183787){const _0x45dfb7=_0x183787[_0x1b18('0x8')],_0x31159f=this[_0x1b18('0x2d')]['editing'][_0x1b18('0x1f')],_0x1cacb8=_0x31159f[_0x1b18('0xa')]['selection'][_0x1b18('0x43')](),_0x4a9bb6=_0x31159f[_0x1b18('0x35')]['viewRangeToDom'](_0x1cacb8);if(_0x4a9bb6[_0x1b18('0x6')](!0x0),_0x45dfb7){if(_0x45dfb7 instanceof _0x369551)return _0x45dfb7;let _0x2d527c=[];for(const _0x2f0107 of _0x45dfb7)_0x2d527c[_0x1b18('0x17')](...(_0xb84257=_0x2f0107['getClientRects'](),Array['from'](_0xb84257)['map'](DOMRect[_0x1b18('0x4b')])));_0x2d527c=function(_0x47e7b5){const _0x20012a=[];let _0xe3faa3=_0x47e7b5[0x0];for(let _0x2a1888=0x1;_0x2a1888<_0x47e7b5['length'];_0x2a1888++)F(_0xe3faa3,_0x47e7b5[_0x2a1888])?_0xe3faa3[_0x1b18('0x23')]+=_0x47e7b5[_0x2a1888][_0x1b18('0x23')]:(_0x20012a[_0x1b18('0x17')](_0xe3faa3),_0xe3faa3=_0x47e7b5[_0x2a1888]);return _0x20012a[_0x1b18('0x17')](_0xe3faa3),_0x20012a;}(_0x2d527c);const _0x538bf8=_0x4a9bb6[_0x1b18('0x22')]();return _0x2d527c[_0x1b18('0x3d')](_0x49ddc0=>_0x49ddc0[_0x1b18('0x20')]<=_0x538bf8[_0x1b18('0x20')]&&_0x49ddc0['bottom']>=_0x538bf8[_0x1b18('0x29')]&&_0x49ddc0['left']<=_0x538bf8['left']&&_0x49ddc0[_0x1b18('0xc')]>=_0x538bf8[_0x1b18('0xc')])||_0x2d527c[0x0];}var _0xb84257;return _0x183787[_0x1b18('0x0')]||_0x4a9bb6;}[_0x1b18('0x31')](_0x3dc7bd){this[_0x1b18('0x14')]['has'](_0x3dc7bd)&&this[_0x1b18('0x32')][_0x1b18('0x2e')](_0x3dc7bd[_0x1b18('0x1f')])&&(this[_0x1b18('0x14')][_0x1b18('0x1b')](_0x3dc7bd),this[_0x1b18('0x32')]['remove'](_0x3dc7bd[_0x1b18('0x1f')]));}[_0x1b18('0x47')](_0x2fd039){this[_0x1b18('0x5')][_0x1b18('0x13')](_0x2fd039),this[_0x1b18('0x31')](_0x2fd039);}}function F(_0x588b82,_0x332738){return _0x588b82['top']===_0x332738[_0x1b18('0x20')]&&_0x588b82[_0x1b18('0x29')]===_0x332738[_0x1b18('0x29')]&&_0x588b82['right']===_0x332738[_0x1b18('0x46')];}
23
+ const _0x3586=['destroy','domConverter','annotations','activeAnnotation','top','right','hasView','_selectedAnnotations','_forceRefresh','clear','showStack','stopListening','isAttached','_manuallyClosed','getFirstRange','remove','focus','isFocused','left','update','hasActive','_setSelectedAnnotations','collapse','isActive','Esc','editableElement','push','afterInit','every','inlineannotations-detach-not-attached','includes','selection','setActiveAnnotation','attach','document','getClientRects','has','visibleView','mousedown','inline','addObserver','width','add','register','focusTracker','editing','change:visibleView','context','viewRangeToDom','inlineannotations-attach-already-attached','delete','_closeAnnotation','_addedAnnotations','listenTo','editor','target','_getBalloonTargetForAnnotation','updatePosition','plugins','getByView','_removeAnnotationFromBalloon','get','_balloon','view','_addAnnotationToBalloon','set','blur','change:isFocused','detach','inlineannotations-not-allowed-with-context','bottom'];(function(_0x336a9c,_0x358667){const _0x5d1c91=function(_0x18b999){while(--_0x18b999){_0x336a9c['push'](_0x336a9c['shift']());}};_0x5d1c91(++_0x358667);}(_0x3586,0x13c));const _0x5d1c=function(_0x336a9c,_0x358667){_0x336a9c=_0x336a9c-0x0;let _0x5d1c91=_0x3586[_0x336a9c];return _0x5d1c91;};import{Plugin as _0x24933c}from'ckeditor5/src/core.js';import _0x224c74 from'./annotationsuis.js';import _0x3a7dd9 from'./editorannotations.js';import{ContextualBalloon as _0x3e76bd}from'ckeditor5/src/ui.js';import{MouseObserver as _0xb89697}from'ckeditor5/src/engine.js';import{CKEditorError as _0x117704,Rect as _0x4326a4}from'ckeditor5/src/utils.js';import'./../../theme/annotation-inline.css';export default class c extends _0x24933c{static get['requires'](){return[_0x3a7dd9,_0x3e76bd,_0x224c74];}static get['pluginName'](){return'InlineAnnotations';}constructor(_0x314098){super(_0x314098),_0x314098[_0x5d1c('0xd')][_0x5d1c('0x1f')][_0x5d1c('0x8')](_0xb89697),this['isAttached']=!0x1,this[_0x5d1c('0x21')](_0x5d1c('0x2a'),null),this[_0x5d1c('0x29')]=null,this['_manuallyClosed']=new Set(),this[_0x5d1c('0x1e')]=_0x314098[_0x5d1c('0x1a')][_0x5d1c('0x1d')](_0x3e76bd),this[_0x5d1c('0x14')]=new Set(),this['_selectedAnnotations']=[],this[_0x5d1c('0x2f')]=!0x1;}['init'](){const _0x102cf5=this[_0x5d1c('0x16')]['plugins'][_0x5d1c('0x1d')](_0x224c74);_0x102cf5[_0x5d1c('0xf')]===this['editor']&&(_0x102cf5[_0x5d1c('0xb')]('inline',this),this[_0x5d1c('0x16')]['keystrokes'][_0x5d1c('0x21')]('Esc',(_0x1e2bc7,_0x55187c)=>{const _0x1f4c90=this[_0x5d1c('0x1e')];if(this['isAttached']&&_0x1f4c90[_0x5d1c('0x5')]){const _0x2c4a17=this[_0x5d1c('0x29')][_0x5d1c('0x1b')](_0x1f4c90[_0x5d1c('0x5')]);_0x2c4a17&&this[_0x5d1c('0x13')](_0x2c4a17),_0x55187c();}}));}[_0x5d1c('0x42')](){const _0x193922=this[_0x5d1c('0x16')][_0x5d1c('0x1a')]['get'](_0x224c74);_0x193922[_0x5d1c('0xf')]===this[_0x5d1c('0x16')]&&(_0x193922[_0x5d1c('0x3b')]()||_0x193922['switchTo'](_0x5d1c('0x7')));}[_0x5d1c('0x0')](_0x1725d0){_0x1725d0!==this[_0x5d1c('0x2a')]&&(this[_0x5d1c('0x2a')]&&(this['activeAnnotation'][_0x5d1c('0x3e')]=!0x1),_0x1725d0&&this[_0x5d1c('0x16')]['ui'][_0x5d1c('0xc')][_0x5d1c('0x38')]&&(this[_0x5d1c('0x29')][_0x5d1c('0x4')](_0x1725d0)&&this[_0x5d1c('0x20')](_0x1725d0,!0x0),_0x1725d0[_0x5d1c('0x3e')]=!0x0),_0x1725d0||this[_0x5d1c('0x3c')]([]),this[_0x5d1c('0x2a')]=_0x1725d0);}[_0x5d1c('0x1')](_0x2b5a4a){this['annotations']=_0x2b5a4a;const _0x3b9f37=this[_0x5d1c('0x16')]['plugins'][_0x5d1c('0x1d')](_0x224c74),_0x3c387b=this[_0x5d1c('0x1e')];if(this[_0x5d1c('0x33')])throw new _0x117704(_0x5d1c('0x11'),this);if(_0x3b9f37[_0x5d1c('0xf')]!==this[_0x5d1c('0x16')])throw new _0x117704(_0x5d1c('0x25'),this);const _0x2eea50=this['editor']['plugins'][_0x5d1c('0x1d')](_0x3a7dd9);this[_0x5d1c('0x15')](_0x2eea50,'refresh',()=>{const _0x2f98ae=_0x2eea50['getOrderedSelectedAnnotations']({'annotations':this[_0x5d1c('0x29')],'activeAnnotation':this[_0x5d1c('0x2a')]});var _0x14bdd6,_0x75a66c;!this[_0x5d1c('0x2f')]&&(_0x14bdd6=_0x2f98ae,_0x75a66c=this[_0x5d1c('0x2e')],_0x14bdd6['length']===_0x75a66c['length']&&_0x14bdd6[_0x5d1c('0x43')](_0x2f9d9f=>_0x75a66c[_0x5d1c('0x45')](_0x2f9d9f)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2f98ae),this[_0x5d1c('0x0')](_0x2f98ae[0x0]||null));}),this[_0x5d1c('0x15')](_0x2eea50,_0x5d1c('0x22'),(_0x50e2d2,{isAnnotationTracked:_0x24204b})=>{this[_0x5d1c('0x2a')]&&_0x24204b(this[_0x5d1c('0x2a')])&&(this[_0x5d1c('0x3c')]([]),this[_0x5d1c('0x0')](null));}),this[_0x5d1c('0x15')](this[_0x5d1c('0x16')]['ui'][_0x5d1c('0xc')],_0x5d1c('0x23'),(_0x510e08,_0x28f486,_0x44b467)=>{_0x44b467||this[_0x5d1c('0x0')](null);}),this['listenTo'](_0x2b5a4a,_0x5d1c('0x36'),(_0x5ee9bd,_0x42530e)=>{this[_0x5d1c('0x1c')](_0x42530e),_0x42530e===this[_0x5d1c('0x2a')]&&this[_0x5d1c('0x0')](null);}),this['listenTo'](_0x3c387b,_0x5d1c('0xe'),(_0x4e12d9,_0x773e1b,_0x5ef74f,_0x81eda3)=>{_0x81eda3&&this[_0x5d1c('0x32')](_0x81eda3);const _0x967751=_0x2b5a4a[_0x5d1c('0x1b')](_0x5ef74f);_0x5ef74f&&_0x967751&&(this[_0x5d1c('0x15')](_0x5ef74f,'change:height',()=>{_0x3c387b['updatePosition']();}),this[_0x5d1c('0x15')](_0x5ef74f,_0x5d1c('0x3f'),()=>{this['_closeAnnotation'](_0x967751),this[_0x5d1c('0x16')][_0x5d1c('0xd')]['view'][_0x5d1c('0x37')]();}),this[_0x5d1c('0x2a')]!==_0x967751&&this[_0x5d1c('0x0')](_0x967751));}),this[_0x5d1c('0x15')](this[_0x5d1c('0x16')]['ui'],_0x5d1c('0x3a'),()=>{_0x3c387b[_0x5d1c('0x5')]&&(_0x2b5a4a[_0x5d1c('0x1b')](_0x3c387b['visibleView'])&&_0x3c387b[_0x5d1c('0x19')]());}),this['listenTo'](this[_0x5d1c('0x16')][_0x5d1c('0xd')][_0x5d1c('0x1f')][_0x5d1c('0x2')],_0x5d1c('0x6'),()=>{this['_forceRefresh']=!0x0,this[_0x5d1c('0x34')][_0x5d1c('0x30')]();}),this['editor'][_0x5d1c('0xd')]['view'][_0x5d1c('0x2')][_0x5d1c('0x46')][_0x5d1c('0x40')]&&this[_0x5d1c('0x16')][_0x5d1c('0xd')][_0x5d1c('0x1f')][_0x5d1c('0x37')](),this[_0x5d1c('0x33')]=!0x0;}[_0x5d1c('0x24')](){if(!this[_0x5d1c('0x33')])throw new _0x117704(_0x5d1c('0x44'),this);this[_0x5d1c('0x0')](null);for(const _0x4581f5 of this[_0x5d1c('0x14')])this[_0x5d1c('0x1c')](_0x4581f5);this[_0x5d1c('0x32')](),this[_0x5d1c('0x33')]=!0x1,this[_0x5d1c('0x29')]=null;}[_0x5d1c('0x27')](){this[_0x5d1c('0x33')]&&this['detach']();}[_0x5d1c('0x3c')](_0x4aeb74){for(const _0x1097e3 of this[_0x5d1c('0x2e')])_0x4aeb74[_0x5d1c('0x45')](_0x1097e3)||this['_manuallyClosed']['delete'](_0x1097e3);for(const _0x46550f of this['annotations'])_0x4aeb74['includes'](_0x46550f)||this['_removeAnnotationFromBalloon'](_0x46550f);if(this[_0x5d1c('0x16')]['ui'][_0x5d1c('0xc')][_0x5d1c('0x38')])for(const _0x186b0f of _0x4aeb74)this[_0x5d1c('0x20')](_0x186b0f);this[_0x5d1c('0x2e')]=_0x4aeb74;}[_0x5d1c('0x20')](_0x16035d,_0xa01b20=!0x1){this[_0x5d1c('0x34')]['has'](_0x16035d)||(this['_addedAnnotations']['has'](_0x16035d)||this[_0x5d1c('0x1e')][_0x5d1c('0x2d')](_0x16035d['view'])||(this[_0x5d1c('0x14')]['add'](_0x16035d),this['_balloon']['add']({'stackId':_0x16035d['view']['id'],'view':_0x16035d[_0x5d1c('0x1f')],'position':{'target':()=>this[_0x5d1c('0x18')](_0x16035d)}})),_0xa01b20&&this[_0x5d1c('0x1e')][_0x5d1c('0x31')](_0x16035d['view']['id']));}[_0x5d1c('0x18')](_0x56fbf9){const _0xee9f63=_0x56fbf9[_0x5d1c('0x17')],_0x1fab4f=this[_0x5d1c('0x16')][_0x5d1c('0xd')][_0x5d1c('0x1f')],_0x30ebfc=_0x1fab4f['document'][_0x5d1c('0x46')][_0x5d1c('0x35')](),_0x18fd94=_0x1fab4f[_0x5d1c('0x28')][_0x5d1c('0x10')](_0x30ebfc);if(_0x18fd94[_0x5d1c('0x3d')](!0x0),_0xee9f63){if(_0xee9f63 instanceof _0x4326a4)return _0xee9f63;let _0x3f934b=[];for(const _0x5e983a of _0xee9f63)_0x3f934b[_0x5d1c('0x41')](...(_0xe9bb1=_0x5e983a[_0x5d1c('0x3')](),Array['from'](_0xe9bb1)['map'](DOMRect['fromRect'])));_0x3f934b=function(_0x1f56f4){const _0x4154e5=[];let _0x88af54=_0x1f56f4[0x0];for(let _0x3c7f29=0x1;_0x3c7f29<_0x1f56f4['length'];_0x3c7f29++)F(_0x88af54,_0x1f56f4[_0x3c7f29])?_0x88af54[_0x5d1c('0x9')]+=_0x1f56f4[_0x3c7f29][_0x5d1c('0x9')]:(_0x4154e5['push'](_0x88af54),_0x88af54=_0x1f56f4[_0x3c7f29]);return _0x4154e5[_0x5d1c('0x41')](_0x88af54),_0x4154e5;}(_0x3f934b);const _0x33c6af=_0x18fd94['getBoundingClientRect']();return _0x3f934b['find'](_0x4f8592=>_0x4f8592[_0x5d1c('0x2b')]<=_0x33c6af[_0x5d1c('0x2b')]&&_0x4f8592[_0x5d1c('0x26')]>=_0x33c6af[_0x5d1c('0x26')]&&_0x4f8592[_0x5d1c('0x39')]<=_0x33c6af[_0x5d1c('0x39')]&&_0x4f8592[_0x5d1c('0x2c')]>=_0x33c6af[_0x5d1c('0x2c')])||_0x3f934b[0x0];}var _0xe9bb1;return _0x56fbf9['targetRect']||_0x18fd94;}[_0x5d1c('0x1c')](_0x21f6b5){this['_addedAnnotations'][_0x5d1c('0x4')](_0x21f6b5)&&this[_0x5d1c('0x1e')][_0x5d1c('0x2d')](_0x21f6b5[_0x5d1c('0x1f')])&&(this[_0x5d1c('0x14')][_0x5d1c('0x12')](_0x21f6b5),this[_0x5d1c('0x1e')][_0x5d1c('0x36')](_0x21f6b5['view']));}[_0x5d1c('0x13')](_0x2956a9){this[_0x5d1c('0x34')][_0x5d1c('0xa')](_0x2956a9),this[_0x5d1c('0x1c')](_0x2956a9);}}function F(_0x4f7012,_0x5f039c){return _0x4f7012['top']===_0x5f039c[_0x5d1c('0x2b')]&&_0x4f7012[_0x5d1c('0x26')]===_0x5f039c['bottom']&&_0x4f7012['right']===_0x5f039c[_0x5d1c('0x39')];}
@@ -1,18 +1,18 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module comments/annotations/narrowsidebar
7
7
  * @publicApi
8
8
  */
9
- import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core';
10
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
11
- import Sidebar from './sidebar';
12
- import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui';
9
+ import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core.js';
10
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
11
+ import Sidebar from './sidebar.js';
12
+ import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui.js';
13
13
  import '../../theme/sidebar-narrow.css';
14
- import type Annotation from './annotation';
15
- import type { default as AnnotationCollection } from './annotationcollection';
14
+ import type Annotation from './annotation.js';
15
+ import type { default as AnnotationCollection } from './annotationcollection.js';
16
16
  /**
17
17
  * The narrow sidebar UI for displaying annotations.
18
18
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2158=['listenTo','context','set','_setSelectedAnnotations','high','view','refresh','_annotationToNarrowView','refreshPositioning','annotationType','off','requires','southArrowNorthEast','_refreshPositioningDebounced','length','remove','getByView','contains','content','change:height','_refreshPositioning','bodyCollection','create','getSidebarItemView','change:container','_detachListeners','set:container','ready','esc','_editorAnnotations','rearrange','balloonPanelView','low','_showBalloon','first','target','detach','setActiveAnnotation','execute','find','_annotations','isAttached','init','NarrowSidebar','hasDomSelection','editors','_updateBalloonPosition','keyCode','pin','mousedown','_integrateWithEditorAnnotations','_attachListeners','unpin','southArrowNorthWest','delete','addEventListener','_domEmitter','locale','northArrowSouth','clear','activeAnnotation','element','EditorAnnotations','values','preventClosingBalloon','_destroyEditorAnnotationsIntegration','removeEventListener','has','from','stopListening','destroy','add','getOrderedSelectedAnnotations','type','get','includes','_attachToContainer','number','annotations','stop','ck-sidebar--narrow','detachFromDom','focus','narrowsidebar-detach-not-attached','resize','register','_manuallyClosedAnnotationViews','bind','_selectedAnnotations','plugins','focusableElements','blur','keydown','isDirty','attach','isVisible','_hideBalloon'];(function(_0x3ca809,_0x215890){const _0x2c09c9=function(_0x57593d){while(--_0x57593d){_0x3ca809['push'](_0x3ca809['shift']());}};_0x2c09c9(++_0x215890);}(_0x2158,0x163));const _0x2c09=function(_0x3ca809,_0x215890){_0x3ca809=_0x3ca809-0x0;let _0x2c09c9=_0x2158[_0x3ca809];return _0x2c09c9;};import{ContextPlugin as _0x1e1122,Context as _0x5399e4}from'ckeditor5/src/core';import _0x2b334e from'./annotationsuis';import _0x361a7f from'./sidebar';import _0x326e38 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x37c988,BodyCollection as _0x5265ad}from'ckeditor5/src/ui';import{CKEditorError as _0x178521,DomEmitterMixin as _0x1b14f5,keyCodes as _0x28d4bc,Collection as _0x2f0a8b}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x5b8eb3}from'lodash-es';import _0x3c33a6 from'./editorannotations';export default class s extends _0x1e1122{static get[_0x2c09('0x2c')](){return[_0x361a7f,_0x2b334e];}static get['pluginName'](){return _0x2c09('0x4c');}constructor(_0x124282){super(_0x124282),this['isAttached']=!0x1,this[_0x2c09('0x16')]=new Set(),this[_0x2c09('0x59')]=Object[_0x2c09('0x37')](_0x1b14f5),this['_annotationToNarrowView']=new Map(),this[_0x2c09('0x23')](_0x2c09('0x5d'),null),this[_0x2c09('0xe')]=null,this[_0x2c09('0x18')]=[],this[_0x2c09('0x3e')]=new _0x2f0a8b(),this['_refreshPositioningDebounced']=_0x5b8eb3(()=>{this[_0x2c09('0x35')]();},0xfa,{'leading':!0x1});}[_0x2c09('0x4b')](){this[_0x2c09('0x22')][_0x2c09('0x19')][_0x2c09('0xa')](_0x2b334e)[_0x2c09('0x15')]('narrowSidebar',this),this[_0x2c09('0x36')]=new _0x5265ad(this['context'][_0x2c09('0x5a')]),this[_0x2c09('0x40')]=new _0x37c988(this[_0x2c09('0x22')][_0x2c09('0x5a')]),this[_0x2c09('0x36')]['attachToDom'](),this['bodyCollection'][_0x2c09('0x7')](this[_0x2c09('0x40')]);}[_0x2c09('0x1e')](_0x1ecf0b){this[_0x2c09('0xe')]=_0x1ecf0b;const _0x1727ac=this[_0x2c09('0x22')][_0x2c09('0x19')][_0x2c09('0xa')](_0x361a7f),_0x58c019=this[_0x2c09('0x40')];if(_0x1727ac[_0x2c09('0x49')]=_0x1ecf0b,this[_0x2c09('0x4a')])throw new _0x178521('narrowsidebar-attach-already-attached',this);this[_0x2c09('0x4a')]=!0x0,this[_0x2c09('0x21')](_0x1727ac,_0x2c09('0x3b'),()=>{this['detach'](),this['listenTo'](_0x1727ac,_0x2c09('0x39'),_0x338154=>{_0x338154[_0x2c09('0x2b')](),this[_0x2c09('0x1e')](_0x1ecf0b);});}),_0x1727ac[_0x2c09('0xc')]({'viewClass':_0x2c09('0x10'),'spaceBetweenItems':0x5});const _0xc2a731=_0x3dda65=>{const _0x3a0e1f=new _0x326e38(this[_0x2c09('0x22')][_0x2c09('0x5a')]);_0x1727ac['addAnnotation'](_0x3dda65,_0x3a0e1f),this['_annotationToNarrowView']['set'](_0x3dda65,_0x3a0e1f),_0x3a0e1f[_0x2c09('0x17')](_0x2c09('0x1d'),_0x2c09('0x2a'),_0x2c09('0xd'))['to'](_0x3dda65[_0x2c09('0x26')],_0x2c09('0x1d'),_0x2c09('0x9'),_0x2c09('0x2f')),_0x3a0e1f['on'](_0x2c09('0x47'),()=>{this[_0x2c09('0x16')][_0x2c09('0x5c')](),_0x58c019[_0x2c09('0x33')][_0x2c09('0x43')]!==_0x3dda65[_0x2c09('0x26')]?(this[_0x2c09('0x42')](_0x3dda65),_0x3dda65[_0x2c09('0x26')][_0x2c09('0x5e')][_0x2c09('0x12')](),this[_0x2c09('0x46')](_0x3dda65)):this['setActiveAnnotation'](null);});};for(const _0x1c299e of _0x1ecf0b)_0xc2a731(_0x1c299e);this[_0x2c09('0x21')](_0x1ecf0b,_0x2c09('0x7'),(_0xf42abf,_0x5a91a)=>{_0xc2a731(_0x5a91a);}),this[_0x2c09('0x21')](_0x1ecf0b,_0x2c09('0x30'),(_0xb99e77,_0x37343c,_0x275ef9)=>{this[_0x2c09('0x28')][_0x2c09('0xa')](_0x37343c)[_0x2c09('0x6')](),this['_annotationToNarrowView']['delete'](_0x37343c),_0x1727ac[_0x2c09('0x3f')]({'removedAnnotation':_0x37343c,'previousAnnotation':_0x1ecf0b[_0x2c09('0xa')](_0x275ef9-0x1),'nextAnnotation':_0x1ecf0b[_0x2c09('0xa')](_0x275ef9+0x1)}),_0x37343c===this[_0x2c09('0x5d')]&&this[_0x2c09('0x46')](null);},{'priority':_0x2c09('0x41')}),this['listenTo'](_0x1ecf0b,_0x2c09('0x12'),(_0x1ff267,_0x274e72)=>{this[_0x2c09('0x46')](_0x274e72);}),this[_0x2c09('0x21')](_0x1ecf0b,'blur',()=>{this[_0x2c09('0x46')](null);}),this[_0x2c09('0x59')]['listenTo'](document,_0x2c09('0x1c'),(_0x2e33df,_0x1aebda)=>{_0x1aebda[_0x2c09('0x50')]===_0x28d4bc[_0x2c09('0x3d')]&&_0x58c019[_0x2c09('0x1f')]&&(this['_manuallyClosedAnnotationViews']['add'](_0x58c019[_0x2c09('0x33')][_0x2c09('0x43')]),this[_0x2c09('0x20')](),_0x1aebda['stopPropagation'](),_0x1aebda['preventDefault']());}),this[_0x2c09('0x59')][_0x2c09('0x21')](document,_0x2c09('0x52'),(_0x3d78e1,_0x25ceb3)=>{const _0x425e94=_0x25ceb3[_0x2c09('0x44')];_0x58c019[_0x2c09('0x1f')]&&_0x58c019[_0x2c09('0x5e')]['contains'](_0x425e94)||_0x1727ac[_0x2c09('0x26')][_0x2c09('0x5e')][_0x2c09('0x32')](_0x425e94)||_0x3d78e1['preventClosingBalloon']||this[_0x2c09('0x5d')]&&this[_0x2c09('0x5d')][_0x2c09('0x1a')][_0x2c09('0x48')](_0xffdb32=>_0xffdb32[_0x2c09('0x32')](_0x425e94))||(this[_0x2c09('0x16')][_0x2c09('0x5c')](),this[_0x2c09('0x20')](),this[_0x2c09('0x46')](null));});const _0x2dba46=this[_0x2c09('0x22')]instanceof _0x5399e4?this[_0x2c09('0x22')]['editors']:new _0x2f0a8b([this[_0x2c09('0x22')]]);for(const _0x1cfc1e of _0x2dba46)this[_0x2c09('0x53')](_0x1cfc1e);this[_0x2c09('0x21')](_0x2dba46,_0x2c09('0x7'),(_0x487fff,_0x3db0d9)=>{this[_0x2c09('0x21')](_0x3db0d9,_0x2c09('0x3c'),()=>{this[_0x2c09('0x53')](_0x3db0d9);});}),this[_0x2c09('0x21')](_0x2dba46,_0x2c09('0x30'),(_0x430111,_0x17fd87)=>{_0x17fd87[_0x2c09('0x19')][_0x2c09('0x3')](_0x2c09('0x5f'))&&this['_destroyEditorAnnotationsIntegration'](_0x17fd87[_0x2c09('0x19')][_0x2c09('0xa')](_0x2c09('0x5f')));}),window[_0x2c09('0x58')](_0x2c09('0x14'),this['_refreshPositioningDebounced']),this[_0x2c09('0x35')]();}[_0x2c09('0x46')](_0x4cced0){if(_0x4cced0===this['activeAnnotation'])return;const _0x479233=this[_0x2c09('0x22')][_0x2c09('0x19')][_0x2c09('0xa')](_0x361a7f);if(_0x479233[_0x2c09('0x27')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4cced0,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4cced0)_0x479233[_0x2c09('0x38')](_0x4cced0)?this['_showBalloon'](_0x4cced0):this['_hideBalloon']();else this[_0x2c09('0x20')]();this[_0x2c09('0x5d')]=_0x4cced0;}[_0x2c09('0x45')](){if(!this['isAttached'])throw new _0x178521(_0x2c09('0x13'),this);this[_0x2c09('0x46')](null);const _0x5b4201=this['context'][_0x2c09('0x19')][_0x2c09('0xa')](_0x361a7f);this[_0x2c09('0x20')](),Array[_0x2c09('0x4')](this[_0x2c09('0x28')][_0x2c09('0x60')](),_0x14ff0c=>_0x14ff0c[_0x2c09('0x6')]()),this['_annotationToNarrowView'][_0x2c09('0x5c')](),_0x5b4201['_detachFromContainer'](this['annotations']),this[_0x2c09('0x5')](),this[_0x2c09('0x59')][_0x2c09('0x5')](),this[_0x2c09('0x22')]instanceof _0x5399e4&&this[_0x2c09('0x5')](this[_0x2c09('0x22')][_0x2c09('0x4e')]);for(const _0x5e0a4d of Array[_0x2c09('0x4')](this[_0x2c09('0x3e')]))this[_0x2c09('0x1')](_0x5e0a4d);window[_0x2c09('0x2')](_0x2c09('0x14'),this[_0x2c09('0x2e')]),this[_0x2c09('0x2e')]['cancel'](),this[_0x2c09('0x18')]=[],this[_0x2c09('0x4a')]=!0x1,this[_0x2c09('0xe')]=null;}[_0x2c09('0x6')](){this[_0x2c09('0x4a')]&&this[_0x2c09('0x45')](),this[_0x2c09('0x36')][_0x2c09('0x11')]();}[_0x2c09('0x53')](_0x3cc88){const _0x128e00=_0x3cc88[_0x2c09('0x19')][_0x2c09('0xa')](_0x3c33a6),_0x24d94e=this[_0x2c09('0x22')][_0x2c09('0x19')]['get'](_0x361a7f),_0x5ce962=this[_0x2c09('0xe')],_0x3dd83b=this[_0x2c09('0x40')],_0x1ac5f4=()=>{const _0x239f31=_0x128e00[_0x2c09('0x8')]({'annotations':this['annotations'],'activeAnnotation':this[_0x2c09('0x5d')]});this['_setSelectedAnnotations'](_0x239f31),this['setActiveAnnotation'](_0x239f31[0x0]||null);};this[_0x2c09('0x21')](_0x128e00,_0x2c09('0x27'),_0x1ac5f4),this[_0x2c09('0x21')](_0x128e00,_0x2c09('0x1b'),(_0x647157,{isAnnotationTracked:_0x1315be})=>{this[_0x2c09('0x5d')]&&_0x1315be(this['activeAnnotation'])&&(this[_0x2c09('0x24')]([]),this[_0x2c09('0x46')](null));}),this[_0x2c09('0x21')](_0x128e00,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x2c09('0x21')](_0x5ce962,_0x2c09('0x1b'),_0x5db006=>{_0x128e00[_0x2c09('0x4d')]()&&_0x5db006[_0x2c09('0xf')]();},{'priority':_0x2c09('0x25')}),this['listenTo'](this[_0x2c09('0x59')],'mousedown',(_0x1ac87e,_0x2dcc4a)=>{const _0x3912f2=_0x2dcc4a[_0x2c09('0x44')];_0x3dd83b['isVisible']&&_0x3dd83b[_0x2c09('0x5e')][_0x2c09('0x32')](_0x3912f2)||_0x24d94e[_0x2c09('0x26')]['element'][_0x2c09('0x32')](_0x3912f2)||this['activeAnnotation']&&_0x128e00[_0x2c09('0x4d')]()&&(_0x1ac5f4(),_0x1ac87e[_0x2c09('0x0')]=!0x0);},{'priority':_0x2c09('0x25')}),this[_0x2c09('0x3e')]['add'](_0x128e00);}[_0x2c09('0x1')](_0x460dd1){_0x460dd1&&(this[_0x2c09('0x5')](_0x460dd1),this[_0x2c09('0x3e')][_0x2c09('0x30')](_0x460dd1));}[_0x2c09('0x24')](_0x3e8387){for(const _0x4828e4 of this[_0x2c09('0x18')])_0x3e8387[_0x2c09('0xb')](_0x4828e4)||this[_0x2c09('0x16')][_0x2c09('0x57')](_0x4828e4[_0x2c09('0x26')]);this[_0x2c09('0x18')]=_0x3e8387;}[_0x2c09('0x35')](){const _0x598ca3=this['balloonPanelView'];this[_0x2c09('0xe')][_0x2c09('0x29')](),_0x598ca3[_0x2c09('0x1f')]&&this[_0x2c09('0x4f')]();}[_0x2c09('0x42')](_0x28c720){if(this[_0x2c09('0x16')][_0x2c09('0x3')](_0x28c720[_0x2c09('0x26')]))return;const _0x4d17d2=this[_0x2c09('0x40')]['content'][_0x2c09('0x43')];_0x4d17d2!==_0x28c720[_0x2c09('0x26')]?(_0x4d17d2&&this[_0x2c09('0x3a')](_0x4d17d2),this['_attachListeners'](_0x28c720[_0x2c09('0x26')]),this[_0x2c09('0x40')][_0x2c09('0x33')]['clear'](),this[_0x2c09('0x40')][_0x2c09('0x33')][_0x2c09('0x7')](_0x28c720['view']),this[_0x2c09('0x4f')]()):this[_0x2c09('0x4f')]();}[_0x2c09('0x4f')](){const _0x2a309a=this['balloonPanelView'][_0x2c09('0x33')][_0x2c09('0x43')],_0x535600=_0x2a309a&&this[_0x2c09('0xe')][_0x2c09('0x31')](_0x2a309a);if(!_0x535600||!this['_annotationToNarrowView'][_0x2c09('0x3')](_0x535600))return;const _0x488ac8=this[_0x2c09('0x28')][_0x2c09('0xa')](_0x535600)[_0x2c09('0x5e')],_0x5c9e4e=function(){const _0x430156=_0x37c988['defaultPositions'];return[_0x430156[_0x2c09('0x2d')],_0x430156['northArrowSouthEast'],_0x430156['southArrowNorth'],_0x430156[_0x2c09('0x5b')],_0x430156[_0x2c09('0x56')],_0x430156['northArrowSouthWest']];}();this['balloonPanelView'][_0x2c09('0x51')]({'target':_0x488ac8,'positions':_0x5c9e4e});}[_0x2c09('0x20')](){const _0x47c731=this[_0x2c09('0x40')],_0x37a3b7=_0x47c731[_0x2c09('0x33')][_0x2c09('0x43')];_0x37a3b7&&(this[_0x2c09('0x3a')](_0x37a3b7),_0x47c731[_0x2c09('0x55')](),_0x47c731['content'][_0x2c09('0x5c')]());}[_0x2c09('0x54')](_0x5aac5a){this[_0x2c09('0x21')](_0x5aac5a,_0x2c09('0x34'),()=>this[_0x2c09('0x4f')]()),this[_0x2c09('0x21')](_0x5aac5a,'Esc',(_0x48c590,_0x388976)=>{this[_0x2c09('0x16')][_0x2c09('0x7')](_0x5aac5a),this[_0x2c09('0x20')](),_0x388976();});}[_0x2c09('0x3a')](_0xa27e41){this['stopListening'](_0xa27e41);}}
23
+ const _0x5180=['_hideBalloon','resize','_destroyEditorAnnotationsIntegration','set','preventClosingBalloon','view','getSidebarItemView','editors','esc','hasDomSelection','_detachFromContainer','init','refreshPositioning','NarrowSidebar','remove','_updateBalloonPosition','contains','attachToDom','clear','_manuallyClosedAnnotationViews','southArrowNorth','detach','from','addAnnotation','set:container','first','southArrowNorthWest','_attachToContainer','isAttached','EditorAnnotations','values','ck-sidebar--narrow','_detachListeners','southArrowNorthEast','change:height','annotationType','off','removeEventListener','_editorAnnotations','unpin','high','stop','_setSelectedAnnotations','includes','length','content','pluginName','_domEmitter','change:container','find','mousedown','context','northArrowSouthWest','execute','destroy','annotations','Esc','_selectedAnnotations','locale','plugins','_refreshPositioning','_attachListeners','element','isDirty','_annotationToNarrowView','activeAnnotation','balloonPanelView','target','_showBalloon','northArrowSouth','stopListening','_refreshPositioningDebounced','bodyCollection','get','add','refresh','_integrateWithEditorAnnotations','attach','addEventListener','focus','rearrange','has','isVisible','bind','northArrowSouthEast','stopPropagation','detachFromDom','listenTo','blur','setActiveAnnotation'];(function(_0x161a93,_0x518045){const _0x5cc000=function(_0x3d1c94){while(--_0x3d1c94){_0x161a93['push'](_0x161a93['shift']());}};_0x5cc000(++_0x518045);}(_0x5180,0xc0));const _0x5cc0=function(_0x161a93,_0x518045){_0x161a93=_0x161a93-0x0;let _0x5cc000=_0x5180[_0x161a93];return _0x5cc000;};import{ContextPlugin as _0x354483,Context as _0x11da49}from'ckeditor5/src/core.js';import _0x51c439 from'./annotationsuis.js';import _0x1ff32b from'./sidebar.js';import _0x2a9b67 from'./view/annotationcounterbuttonview.js';import{BalloonPanelView as _0x4b2369,BodyCollection as _0x401def}from'ckeditor5/src/ui.js';import{CKEditorError as _0xa53ea9,DomEmitterMixin as _0x349dd7,keyCodes as _0x562c6c,Collection as _0x423911}from'ckeditor5/src/utils.js';import'../../theme/sidebar-narrow.css';import{debounce as _0x1ed349}from'lodash-es';import _0x547e2b from'./editorannotations.js';export default class i extends _0x354483{static get['requires'](){return[_0x1ff32b,_0x51c439];}static get[_0x5cc0('0x22')](){return _0x5cc0('0x1');}constructor(_0x55bf78){super(_0x55bf78),this['isAttached']=!0x1,this[_0x5cc0('0x7')]=new Set(),this[_0x5cc0('0x23')]=Object['create'](_0x349dd7),this[_0x5cc0('0x34')]=new Map(),this['set'](_0x5cc0('0x35'),null),this[_0x5cc0('0x2b')]=null,this[_0x5cc0('0x2d')]=[],this[_0x5cc0('0x1a')]=new _0x423911(),this[_0x5cc0('0x3b')]=_0x1ed349(()=>{this[_0x5cc0('0x30')]();},0xfa,{'leading':!0x1});}[_0x5cc0('0x59')](){this[_0x5cc0('0x27')][_0x5cc0('0x2f')][_0x5cc0('0x3d')](_0x51c439)['register']('narrowSidebar',this),this['bodyCollection']=new _0x401def(this['context']['locale']),this['balloonPanelView']=new _0x4b2369(this[_0x5cc0('0x27')]['locale']),this[_0x5cc0('0x3c')][_0x5cc0('0x5')](),this[_0x5cc0('0x3c')]['add'](this['balloonPanelView']);}[_0x5cc0('0x41')](_0x4235b4){this['annotations']=_0x4235b4;const _0x10eead=this[_0x5cc0('0x27')]['plugins'][_0x5cc0('0x3d')](_0x1ff32b),_0x34a7eb=this[_0x5cc0('0x36')];if(_0x10eead['_annotations']=_0x4235b4,this[_0x5cc0('0x10')])throw new _0xa53ea9('narrowsidebar-attach-already-attached',this);this[_0x5cc0('0x10')]=!0x0,this[_0x5cc0('0x4b')](_0x10eead,_0x5cc0('0xc'),()=>{this[_0x5cc0('0x9')](),this[_0x5cc0('0x4b')](_0x10eead,_0x5cc0('0x24'),_0x431e8d=>{_0x431e8d[_0x5cc0('0x18')](),this[_0x5cc0('0x41')](_0x4235b4);});}),_0x10eead[_0x5cc0('0xf')]({'viewClass':_0x5cc0('0x13'),'spaceBetweenItems':0x5});const _0x1821c1=_0xce2e2c=>{const _0x22cc43=new _0x2a9b67(this[_0x5cc0('0x27')][_0x5cc0('0x2e')]);_0x10eead[_0x5cc0('0xb')](_0xce2e2c,_0x22cc43),this[_0x5cc0('0x34')][_0x5cc0('0x51')](_0xce2e2c,_0x22cc43),_0x22cc43[_0x5cc0('0x47')]('isDirty',_0x5cc0('0x17'),'number')['to'](_0xce2e2c[_0x5cc0('0x53')],_0x5cc0('0x33'),'type',_0x5cc0('0x20')),_0x22cc43['on'](_0x5cc0('0x29'),()=>{this[_0x5cc0('0x7')]['clear'](),_0x34a7eb['content'][_0x5cc0('0xd')]!==_0xce2e2c[_0x5cc0('0x53')]?(this[_0x5cc0('0x38')](_0xce2e2c),_0xce2e2c[_0x5cc0('0x53')]['element']['focus'](),this[_0x5cc0('0x4d')](_0xce2e2c)):this[_0x5cc0('0x4d')](null);});};for(const _0x1c7434 of _0x4235b4)_0x1821c1(_0x1c7434);this[_0x5cc0('0x4b')](_0x4235b4,_0x5cc0('0x3e'),(_0x2072b6,_0x89e7f1)=>{_0x1821c1(_0x89e7f1);}),this[_0x5cc0('0x4b')](_0x4235b4,_0x5cc0('0x2'),(_0x28a64d,_0xdbb326,_0xa79d69)=>{this[_0x5cc0('0x34')][_0x5cc0('0x3d')](_0xdbb326)[_0x5cc0('0x2a')](),this[_0x5cc0('0x34')]['delete'](_0xdbb326),_0x10eead[_0x5cc0('0x44')]({'removedAnnotation':_0xdbb326,'previousAnnotation':_0x4235b4[_0x5cc0('0x3d')](_0xa79d69-0x1),'nextAnnotation':_0x4235b4[_0x5cc0('0x3d')](_0xa79d69+0x1)}),_0xdbb326===this[_0x5cc0('0x35')]&&this[_0x5cc0('0x4d')](null);},{'priority':'low'}),this[_0x5cc0('0x4b')](_0x4235b4,_0x5cc0('0x43'),(_0x530b97,_0x2464fd)=>{this[_0x5cc0('0x4d')](_0x2464fd);}),this[_0x5cc0('0x4b')](_0x4235b4,_0x5cc0('0x4c'),()=>{this['setActiveAnnotation'](null);}),this[_0x5cc0('0x23')][_0x5cc0('0x4b')](document,'keydown',(_0x487103,_0x1bb677)=>{_0x1bb677['keyCode']===_0x562c6c[_0x5cc0('0x56')]&&_0x34a7eb[_0x5cc0('0x46')]&&(this[_0x5cc0('0x7')][_0x5cc0('0x3e')](_0x34a7eb[_0x5cc0('0x21')]['first']),this[_0x5cc0('0x4e')](),_0x1bb677[_0x5cc0('0x49')](),_0x1bb677['preventDefault']());}),this[_0x5cc0('0x23')][_0x5cc0('0x4b')](document,_0x5cc0('0x26'),(_0x2f74dd,_0x24103c)=>{const _0x1a32f7=_0x24103c[_0x5cc0('0x37')];_0x34a7eb[_0x5cc0('0x46')]&&_0x34a7eb[_0x5cc0('0x32')][_0x5cc0('0x4')](_0x1a32f7)||_0x10eead[_0x5cc0('0x53')][_0x5cc0('0x32')][_0x5cc0('0x4')](_0x1a32f7)||_0x2f74dd[_0x5cc0('0x52')]||this['activeAnnotation']&&this[_0x5cc0('0x35')]['focusableElements'][_0x5cc0('0x25')](_0x2d042d=>_0x2d042d[_0x5cc0('0x4')](_0x1a32f7))||(this[_0x5cc0('0x7')][_0x5cc0('0x6')](),this[_0x5cc0('0x4e')](),this['setActiveAnnotation'](null));});const _0x4bc74a=this[_0x5cc0('0x27')]instanceof _0x11da49?this['context'][_0x5cc0('0x55')]:new _0x423911([this['context']]);for(const _0x496b8a of _0x4bc74a)this[_0x5cc0('0x40')](_0x496b8a);this['listenTo'](_0x4bc74a,'add',(_0x32c039,_0x182637)=>{this[_0x5cc0('0x4b')](_0x182637,'ready',()=>{this[_0x5cc0('0x40')](_0x182637);});}),this[_0x5cc0('0x4b')](_0x4bc74a,_0x5cc0('0x2'),(_0x2e3a4a,_0x316c94)=>{_0x316c94[_0x5cc0('0x2f')][_0x5cc0('0x45')]('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x316c94['plugins'][_0x5cc0('0x3d')](_0x5cc0('0x11')));}),window[_0x5cc0('0x42')](_0x5cc0('0x4f'),this[_0x5cc0('0x3b')]),this[_0x5cc0('0x30')]();}[_0x5cc0('0x4d')](_0x16c574){if(_0x16c574===this[_0x5cc0('0x35')])return;const _0x3e8ed9=this[_0x5cc0('0x27')][_0x5cc0('0x2f')]['get'](_0x1ff32b);if(_0x3e8ed9[_0x5cc0('0x3f')]({'blurredAnnotation':this[_0x5cc0('0x35')],'activatedAnnotation':_0x16c574,'disableAnimationOnActivatedAnnotation':!0x0}),_0x16c574)_0x3e8ed9[_0x5cc0('0x54')](_0x16c574)?this[_0x5cc0('0x38')](_0x16c574):this[_0x5cc0('0x4e')]();else this[_0x5cc0('0x4e')]();this[_0x5cc0('0x35')]=_0x16c574;}['detach'](){if(!this[_0x5cc0('0x10')])throw new _0xa53ea9('narrowsidebar-detach-not-attached',this);this[_0x5cc0('0x4d')](null);const _0x1d9709=this[_0x5cc0('0x27')][_0x5cc0('0x2f')][_0x5cc0('0x3d')](_0x1ff32b);this['_hideBalloon'](),Array[_0x5cc0('0xa')](this[_0x5cc0('0x34')][_0x5cc0('0x12')](),_0x1b6501=>_0x1b6501[_0x5cc0('0x2a')]()),this[_0x5cc0('0x34')]['clear'](),_0x1d9709[_0x5cc0('0x58')](this[_0x5cc0('0x2b')]),this[_0x5cc0('0x3a')](),this[_0x5cc0('0x23')][_0x5cc0('0x3a')](),this[_0x5cc0('0x27')]instanceof _0x11da49&&this[_0x5cc0('0x3a')](this['context'][_0x5cc0('0x55')]);for(const _0x5b7067 of Array[_0x5cc0('0xa')](this['_editorAnnotations']))this[_0x5cc0('0x50')](_0x5b7067);window[_0x5cc0('0x19')](_0x5cc0('0x4f'),this[_0x5cc0('0x3b')]),this[_0x5cc0('0x3b')]['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}[_0x5cc0('0x2a')](){this[_0x5cc0('0x10')]&&this[_0x5cc0('0x9')](),this['bodyCollection'][_0x5cc0('0x4a')]();}[_0x5cc0('0x40')](_0x32bc11){const _0x27429d=_0x32bc11[_0x5cc0('0x2f')][_0x5cc0('0x3d')](_0x547e2b),_0x1dc96c=this['context'][_0x5cc0('0x2f')][_0x5cc0('0x3d')](_0x1ff32b),_0x45101b=this['annotations'],_0x16850f=this[_0x5cc0('0x36')],_0x4350fd=()=>{const _0x1528ad=_0x27429d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this[_0x5cc0('0x35')]});this[_0x5cc0('0x1e')](_0x1528ad),this[_0x5cc0('0x4d')](_0x1528ad[0x0]||null);};this['listenTo'](_0x27429d,_0x5cc0('0x3f'),_0x4350fd),this['listenTo'](_0x27429d,_0x5cc0('0x4c'),(_0xa8edb5,{isAnnotationTracked:_0x12dd58})=>{this[_0x5cc0('0x35')]&&_0x12dd58(this[_0x5cc0('0x35')])&&(this[_0x5cc0('0x1e')]([]),this[_0x5cc0('0x4d')](null));}),this[_0x5cc0('0x4b')](_0x27429d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x5cc0('0x4b')](_0x45101b,'blur',_0x57a829=>{_0x27429d[_0x5cc0('0x57')]()&&_0x57a829[_0x5cc0('0x1d')]();},{'priority':_0x5cc0('0x1c')}),this[_0x5cc0('0x4b')](this[_0x5cc0('0x23')],_0x5cc0('0x26'),(_0x22574c,_0x41f34f)=>{const _0x301320=_0x41f34f[_0x5cc0('0x37')];_0x16850f['isVisible']&&_0x16850f[_0x5cc0('0x32')][_0x5cc0('0x4')](_0x301320)||_0x1dc96c[_0x5cc0('0x53')]['element'][_0x5cc0('0x4')](_0x301320)||this[_0x5cc0('0x35')]&&_0x27429d[_0x5cc0('0x57')]()&&(_0x4350fd(),_0x22574c['preventClosingBalloon']=!0x0);},{'priority':_0x5cc0('0x1c')}),this[_0x5cc0('0x1a')][_0x5cc0('0x3e')](_0x27429d);}['_destroyEditorAnnotationsIntegration'](_0x587268){_0x587268&&(this['stopListening'](_0x587268),this[_0x5cc0('0x1a')]['remove'](_0x587268));}[_0x5cc0('0x1e')](_0x3beb7f){for(const _0x3b6d2f of this[_0x5cc0('0x2d')])_0x3beb7f[_0x5cc0('0x1f')](_0x3b6d2f)||this[_0x5cc0('0x7')]['delete'](_0x3b6d2f['view']);this['_selectedAnnotations']=_0x3beb7f;}[_0x5cc0('0x30')](){const _0x1f4fb8=this[_0x5cc0('0x36')];this[_0x5cc0('0x2b')][_0x5cc0('0x0')](),_0x1f4fb8[_0x5cc0('0x46')]&&this[_0x5cc0('0x3')]();}[_0x5cc0('0x38')](_0x5da3bb){if(this[_0x5cc0('0x7')][_0x5cc0('0x45')](_0x5da3bb[_0x5cc0('0x53')]))return;const _0x221b3d=this['balloonPanelView'][_0x5cc0('0x21')]['first'];_0x221b3d!==_0x5da3bb['view']?(_0x221b3d&&this[_0x5cc0('0x14')](_0x221b3d),this['_attachListeners'](_0x5da3bb['view']),this[_0x5cc0('0x36')][_0x5cc0('0x21')][_0x5cc0('0x6')](),this[_0x5cc0('0x36')][_0x5cc0('0x21')][_0x5cc0('0x3e')](_0x5da3bb[_0x5cc0('0x53')]),this[_0x5cc0('0x3')]()):this[_0x5cc0('0x3')]();}['_updateBalloonPosition'](){const _0xbfa073=this[_0x5cc0('0x36')]['content'][_0x5cc0('0xd')],_0x3e46b3=_0xbfa073&&this[_0x5cc0('0x2b')]['getByView'](_0xbfa073);if(!_0x3e46b3||!this[_0x5cc0('0x34')]['has'](_0x3e46b3))return;const _0x38e0a0=this[_0x5cc0('0x34')][_0x5cc0('0x3d')](_0x3e46b3)['element'],_0x1afec7=function(){const _0x4ffde1=_0x4b2369['defaultPositions'];return[_0x4ffde1[_0x5cc0('0x15')],_0x4ffde1[_0x5cc0('0x48')],_0x4ffde1[_0x5cc0('0x8')],_0x4ffde1[_0x5cc0('0x39')],_0x4ffde1[_0x5cc0('0xe')],_0x4ffde1[_0x5cc0('0x28')]];}();this[_0x5cc0('0x36')]['pin']({'target':_0x38e0a0,'positions':_0x1afec7});}[_0x5cc0('0x4e')](){const _0x467e42=this[_0x5cc0('0x36')],_0x10df99=_0x467e42[_0x5cc0('0x21')][_0x5cc0('0xd')];_0x10df99&&(this[_0x5cc0('0x14')](_0x10df99),_0x467e42[_0x5cc0('0x1b')](),_0x467e42[_0x5cc0('0x21')][_0x5cc0('0x6')]());}[_0x5cc0('0x31')](_0x6049df){this[_0x5cc0('0x4b')](_0x6049df,_0x5cc0('0x16'),()=>this[_0x5cc0('0x3')]()),this['listenTo'](_0x6049df,_0x5cc0('0x2c'),(_0x537433,_0x1ac591)=>{this[_0x5cc0('0x7')]['add'](_0x6049df),this[_0x5cc0('0x4e')](),_0x1ac591();});}['_detachListeners'](_0x3ddc21){this[_0x5cc0('0x3a')](_0x3ddc21);}}
@@ -1,16 +1,16 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module comments/annotations/sidebar
7
7
  * @publicApi
8
8
  */
9
- import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
10
- import type { View } from 'ckeditor5/src/ui';
11
- import SidebarView from './view/sidebarview';
12
- import SidebarItemView from './view/sidebaritemview';
13
- import type Annotation from './annotation';
9
+ import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
10
+ import type { View } from 'ckeditor5/src/ui.js';
11
+ import SidebarView from './view/sidebarview.js';
12
+ import SidebarItemView from './view/sidebaritemview.js';
13
+ import type Annotation from './annotation.js';
14
14
  /**
15
15
  * Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
16
16
  *