@ckeditor/ckeditor5-comments 38.1.1 → 38.2.0-alpha.1

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 (86) hide show
  1. package/build/comments.js +1 -1
  2. package/package.json +4 -3
  3. package/src/annotations/annotation.d.ts +86 -86
  4. package/src/annotations/annotation.js +1 -1
  5. package/src/annotations/annotationcollection.d.ts +94 -94
  6. package/src/annotations/annotationcollection.js +1 -1
  7. package/src/annotations/annotations.d.ts +150 -150
  8. package/src/annotations/annotations.js +1 -1
  9. package/src/annotations/annotationsuis.d.ts +228 -228
  10. package/src/annotations/annotationsuis.js +1 -1
  11. package/src/annotations/editorannotations.d.ts +63 -63
  12. package/src/annotations/editorannotations.js +1 -1
  13. package/src/annotations/inlineannotations.d.ts +86 -86
  14. package/src/annotations/inlineannotations.js +1 -1
  15. package/src/annotations/narrowsidebar.d.ts +81 -81
  16. package/src/annotations/narrowsidebar.js +1 -1
  17. package/src/annotations/sidebar.d.ts +96 -96
  18. package/src/annotations/sidebar.js +1 -1
  19. package/src/annotations/view/annotationcounterbuttonview.d.ts +25 -25
  20. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  21. package/src/annotations/view/annotationview.d.ts +86 -86
  22. package/src/annotations/view/annotationview.js +1 -1
  23. package/src/annotations/view/sidebaritemview.d.ts +51 -51
  24. package/src/annotations/view/sidebaritemview.js +1 -1
  25. package/src/annotations/view/sidebarview.d.ts +28 -28
  26. package/src/annotations/view/sidebarview.js +1 -1
  27. package/src/annotations/widesidebar.d.ts +73 -73
  28. package/src/annotations/widesidebar.js +1 -1
  29. package/src/augmentation.d.ts +48 -48
  30. package/src/comments/addcommentthreadcommand.d.ts +31 -31
  31. package/src/comments/addcommentthreadcommand.js +1 -1
  32. package/src/comments/commentsarchive.d.ts +27 -27
  33. package/src/comments/commentsarchive.js +1 -1
  34. package/src/comments/commentsarchiveui.d.ts +34 -34
  35. package/src/comments/commentsarchiveui.js +1 -1
  36. package/src/comments/commentsediting.d.ts +75 -75
  37. package/src/comments/commentsediting.js +1 -1
  38. package/src/comments/commentsrepository.d.ts +1088 -1088
  39. package/src/comments/commentsrepository.js +1 -1
  40. package/src/comments/commentsui.d.ts +29 -29
  41. package/src/comments/commentsui.js +1 -1
  42. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +13 -13
  43. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  44. package/src/comments/integrations/importword.d.ts +17 -17
  45. package/src/comments/integrations/importword.js +1 -1
  46. package/src/comments/ui/commenteditor/commenteditor.d.ts +32 -32
  47. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  48. package/src/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
  49. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  50. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
  51. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  52. package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
  53. package/src/comments/ui/commentthreadcontroller.js +1 -1
  54. package/src/comments/ui/view/basecommentthreadview.d.ts +108 -108
  55. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  56. package/src/comments/ui/view/basecommentview.d.ts +108 -108
  57. package/src/comments/ui/view/basecommentview.js +1 -1
  58. package/src/comments/ui/view/collapsedcommentsview.d.ts +9 -9
  59. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  60. package/src/comments/ui/view/commentcontentview.d.ts +10 -10
  61. package/src/comments/ui/view/commentcontentview.js +1 -1
  62. package/src/comments/ui/view/commentinputview.d.ts +82 -82
  63. package/src/comments/ui/view/commentinputview.js +1 -1
  64. package/src/comments/ui/view/commentsarchiveview.d.ts +34 -34
  65. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  66. package/src/comments/ui/view/commentslistview.d.ts +96 -96
  67. package/src/comments/ui/view/commentslistview.js +1 -1
  68. package/src/comments/ui/view/commentthreadheaderview.d.ts +46 -46
  69. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  70. package/src/comments/ui/view/commentthreadinputview.d.ts +37 -37
  71. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  72. package/src/comments/ui/view/commentthreadview.d.ts +113 -113
  73. package/src/comments/ui/view/commentthreadview.js +1 -1
  74. package/src/comments/ui/view/commentview.d.ts +239 -239
  75. package/src/comments/ui/view/commentview.js +1 -1
  76. package/src/comments.d.ts +31 -31
  77. package/src/comments.js +1 -1
  78. package/src/commentsonly.d.ts +29 -29
  79. package/src/commentsonly.js +1 -1
  80. package/src/config.d.ts +172 -172
  81. package/src/index.d.ts +21 -21
  82. package/src/index.js +1 -1
  83. package/src/utils/common-translations.d.ts +5 -5
  84. package/src/utils/common-translations.js +1 -1
  85. package/src/utils/createmutationobserver.d.ts +13 -13
  86. package/src/utils/createmutationobserver.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x32b7=['element','refresh','isCollapsed','hasDomSelection','set','pluginName','selection','getOrderedSelectedAnnotations','blur','focusTracker','refreshSelectedViews','collection','directChange','map','getRanges','annotation','innerView','_editorAnnotationsData','remove','listenTo','push','getByInnerView','cancel','has','document','add','change:range','isEqual','from','isReadOnly','_editorAnnotations','plugins','editor','function','editorannotations-invalid-source-callback','_dataCollectors','uiUpdate','fire','view','model','editing','range','get','init','update','addSourceCollector','change:isFocused','containsRange'];(function(_0x5d7009,_0x32b7b1){const _0x14d6cd=function(_0x10d720){while(--_0x10d720){_0x5d7009['push'](_0x5d7009['shift']());}};_0x14d6cd(++_0x32b7b1);}(_0x32b7,0x1ec));const _0x14d6=function(_0x5d7009,_0x32b7b1){_0x5d7009=_0x5d7009-0x0;let _0x14d6cd=_0x32b7[_0x5d7009];return _0x14d6cd;};import{Plugin as _0x2c1bd5}from'ckeditor5/src/core';import{CKEditorError as _0x26e1ba}from'ckeditor5/src/utils';import{debounce as _0x2dc048}from'lodash-es';import _0x54e1fb from'./annotations';export default class k extends _0x2c1bd5{static get['requires'](){return[_0x54e1fb];}static get[_0x14d6('0x29')](){return'EditorAnnotations';}constructor(_0x1538fe){super(_0x1538fe),this[_0x14d6('0x17')]=new Set(),this['_editorAnnotations']=new Set();}[_0x14d6('0x1f')](){const _0x153aca=this['editor'],_0x5c0b7e=_0x153aca['model'][_0x14d6('0xc')][_0x14d6('0x2a')],_0x544140=_0x2dc048(()=>this[_0x14d6('0x2e')](),0xa);_0x5c0b7e['on'](_0x14d6('0xe'),(_0x12bce5,_0x5e7778)=>{_0x5e7778[_0x14d6('0x0')]&&(_0x544140[_0x14d6('0xa')](),this['refreshSelectedViews']());}),this[_0x14d6('0x7')](_0x153aca[_0x14d6('0x1c')][_0x14d6('0x1a')][_0x14d6('0xc')],_0x14d6('0x22'),(_0x26913c,_0x2443f4,_0x1ebcf8)=>{_0x1ebcf8&&_0x544140();}),this[_0x14d6('0x7')](_0x153aca['ui']['focusTracker'],_0x14d6('0x22'),(_0x27e60b,_0x164451,_0x51b5aa)=>{_0x51b5aa||_0x153aca[_0x14d6('0x11')]||this[_0x14d6('0x19')](_0x14d6('0x2c'),{'isAnnotationTracked':_0x3b3cc8=>this['_editorAnnotationsData']['has'](_0x3b3cc8[_0x14d6('0x4')])});}),this[_0x14d6('0x7')](this['editor']['ui'],_0x14d6('0x20'),()=>this['fire'](_0x14d6('0x18')));}['registerAnnotation'](_0xd6f92d){if(this[_0x14d6('0x12')][_0x14d6('0xb')](_0xd6f92d[_0x14d6('0x1a')]))return;this[_0x14d6('0x12')][_0x14d6('0xd')](_0xd6f92d[_0x14d6('0x1a')]),this[_0x14d6('0x14')]['ui'][_0x14d6('0x2d')][_0x14d6('0xd')](_0xd6f92d[_0x14d6('0x1a')][_0x14d6('0x24')]);const _0x37379c=this[_0x14d6('0x14')][_0x14d6('0x13')][_0x14d6('0x1e')](_0x54e1fb);this[_0x14d6('0x7')](_0x37379c[_0x14d6('0x2f')],_0x14d6('0x6'),(_0x123158,_0x1371f9)=>{this[_0x14d6('0x14')]['ui'][_0x14d6('0x2d')][_0x14d6('0x6')](_0x1371f9[_0x14d6('0x1a')][_0x14d6('0x24')]),this[_0x14d6('0x12')]['delete'](_0x1371f9[_0x14d6('0x1a')]);});}[_0x14d6('0x27')](){return this[_0x14d6('0x14')][_0x14d6('0x1c')][_0x14d6('0x1a')][_0x14d6('0x27')];}[_0x14d6('0x21')](_0x385686){if(_0x14d6('0x15')!=typeof _0x385686)throw new _0x26e1ba(_0x14d6('0x16'));this['_dataCollectors'][_0x14d6('0xd')](_0x385686);}[_0x14d6('0x2e')](){this[_0x14d6('0x19')](_0x14d6('0x25'));}[_0x14d6('0x2b')]({activeAnnotation:_0x4115d3,annotations:_0x2adb37}){const _0x58cdf4=[],_0x4270dc=this[_0x14d6('0x14')][_0x14d6('0x1b')]['document'][_0x14d6('0x2a')],_0x5a3561=Array[_0x14d6('0x10')](_0x4270dc[_0x14d6('0x2')]());for(const [_0x1dc852,_0x1ca95d]of this['_editorAnnotationsData']){const _0x5693dd=_0x369163(_0x1ca95d),_0x584437=_0x2adb37[_0x14d6('0x9')](_0x1dc852);_0x5693dd&&_0x584437&&_0x58cdf4[_0x14d6('0x8')]({'annotation':_0x584437,'range':_0x5693dd});}function _0x369163(_0x149bd7){for(const _0x1876aa of _0x149bd7)for(const _0x22c1a7 of _0x5a3561)if(_0x1876aa[_0x14d6('0x23')](_0x22c1a7,!_0x4270dc[_0x14d6('0x26')]))return _0x1876aa;return null;}return _0x58cdf4['sort']((_0x391634,_0x3b1de9)=>{const _0x5405c9=_0x391634[_0x14d6('0x1d')],_0x590765=_0x3b1de9[_0x14d6('0x1d')];if(!_0x5405c9[_0x14d6('0xf')](_0x590765)){if(_0x5405c9[_0x14d6('0x23')](_0x590765,!0x0))return 0x1;if(_0x590765['containsRange'](_0x5405c9,!0x0))return-0x1;}return _0x391634[_0x14d6('0x3')]==_0x4115d3?-0x1:_0x3b1de9[_0x14d6('0x3')]==_0x4115d3?0x1:0x0;})[_0x14d6('0x1')](_0x31f601=>_0x31f601[_0x14d6('0x3')]);}get[_0x14d6('0x5')](){const _0x2ac5d4=new Map();for(const _0x129bee of Array[_0x14d6('0x10')](this[_0x14d6('0x17')]))for(const [_0xb5af54,_0x5e5885]of _0x129bee())_0x2ac5d4[_0x14d6('0x28')](_0xb5af54,_0x5e5885);return _0x2ac5d4;}}
23
+ const _0x5270=['editorannotations-invalid-source-callback','getOrderedSelectedAnnotations','function','remove','selection','focusTracker','isCollapsed','hasDomSelection','uiUpdate','from','_dataCollectors','change:isFocused','element','directChange','push','fire','getByInnerView','innerView','refresh','listenTo','blur','model','view','refreshSelectedViews','has','cancel','range','containsRange','change:range','plugins','requires','isEqual','document','pluginName','_editorAnnotationsData','annotation','EditorAnnotations','editing','map','get','add','isReadOnly','getRanges','editor','update','_editorAnnotations'];(function(_0x30fa39,_0x5270e1){const _0x2c5c94=function(_0x54386a){while(--_0x54386a){_0x30fa39['push'](_0x30fa39['shift']());}};_0x2c5c94(++_0x5270e1);}(_0x5270,0x131));const _0x2c5c=function(_0x30fa39,_0x5270e1){_0x30fa39=_0x30fa39-0x0;let _0x2c5c94=_0x5270[_0x30fa39];return _0x2c5c94;};import{Plugin as _0x20b683}from'ckeditor5/src/core.js';import{CKEditorError as _0x3cf08c}from'ckeditor5/src/utils.js';import{debounce as _0x39d604}from'lodash-es';import _0x319f93 from'./annotations.js';export default class k extends _0x20b683{static get[_0x2c5c('0x1')](){return[_0x319f93];}static get[_0x2c5c('0x4')](){return _0x2c5c('0x7');}constructor(_0x3f427a){super(_0x3f427a),this[_0x2c5c('0x1b')]=new Set(),this[_0x2c5c('0x10')]=new Set();}['init'](){const _0x2b1ca2=this[_0x2c5c('0xe')],_0x2146da=_0x2b1ca2[_0x2c5c('0x26')]['document'][_0x2c5c('0x15')],_0x3e3aa0=_0x39d604(()=>this[_0x2c5c('0x28')](),0xa);_0x2146da['on'](_0x2c5c('0x2d'),(_0xb0b203,_0x4d84f1)=>{_0x4d84f1[_0x2c5c('0x1e')]&&(_0x3e3aa0[_0x2c5c('0x2a')](),this['refreshSelectedViews']());}),this[_0x2c5c('0x24')](_0x2b1ca2[_0x2c5c('0x8')][_0x2c5c('0x27')][_0x2c5c('0x3')],'change:isFocused',(_0x43e546,_0x9ca4ac,_0x516cde)=>{_0x516cde&&_0x3e3aa0();}),this[_0x2c5c('0x24')](_0x2b1ca2['ui'][_0x2c5c('0x16')],_0x2c5c('0x1c'),(_0x2b0ba0,_0x16a01b,_0x21f294)=>{_0x21f294||_0x2b1ca2[_0x2c5c('0xc')]||this[_0x2c5c('0x20')](_0x2c5c('0x25'),{'isAnnotationTracked':_0x5c49c2=>this['_editorAnnotationsData'][_0x2c5c('0x29')](_0x5c49c2[_0x2c5c('0x22')])});}),this[_0x2c5c('0x24')](this['editor']['ui'],_0x2c5c('0xf'),()=>this[_0x2c5c('0x20')](_0x2c5c('0x19')));}['registerAnnotation'](_0x594687){if(this['_editorAnnotations']['has'](_0x594687[_0x2c5c('0x27')]))return;this[_0x2c5c('0x10')][_0x2c5c('0xb')](_0x594687[_0x2c5c('0x27')]),this['editor']['ui'][_0x2c5c('0x16')][_0x2c5c('0xb')](_0x594687['view'][_0x2c5c('0x1d')]);const _0x52b7fc=this[_0x2c5c('0xe')][_0x2c5c('0x0')][_0x2c5c('0xa')](_0x319f93);this[_0x2c5c('0x24')](_0x52b7fc['collection'],_0x2c5c('0x14'),(_0x493e51,_0x4a358a)=>{this[_0x2c5c('0xe')]['ui'][_0x2c5c('0x16')]['remove'](_0x4a358a[_0x2c5c('0x27')][_0x2c5c('0x1d')]),this[_0x2c5c('0x10')]['delete'](_0x4a358a[_0x2c5c('0x27')]);});}[_0x2c5c('0x18')](){return this[_0x2c5c('0xe')][_0x2c5c('0x8')][_0x2c5c('0x27')][_0x2c5c('0x18')];}['addSourceCollector'](_0xf991d8){if(_0x2c5c('0x13')!=typeof _0xf991d8)throw new _0x3cf08c(_0x2c5c('0x11'));this[_0x2c5c('0x1b')][_0x2c5c('0xb')](_0xf991d8);}[_0x2c5c('0x28')](){this[_0x2c5c('0x20')](_0x2c5c('0x23'));}[_0x2c5c('0x12')]({activeAnnotation:_0x5911e2,annotations:_0x30fafc}){const _0x261d92=[],_0x776d9f=this[_0x2c5c('0xe')][_0x2c5c('0x26')][_0x2c5c('0x3')][_0x2c5c('0x15')],_0x24c262=Array['from'](_0x776d9f[_0x2c5c('0xd')]());for(const [_0x3532a1,_0x2521ed]of this[_0x2c5c('0x5')]){const _0x27793a=_0x37cd13(_0x2521ed),_0x184df2=_0x30fafc[_0x2c5c('0x21')](_0x3532a1);_0x27793a&&_0x184df2&&_0x261d92[_0x2c5c('0x1f')]({'annotation':_0x184df2,'range':_0x27793a});}function _0x37cd13(_0x54df90){for(const _0x4655d0 of _0x54df90)for(const _0x155556 of _0x24c262)if(_0x4655d0['containsRange'](_0x155556,!_0x776d9f[_0x2c5c('0x17')]))return _0x4655d0;return null;}return _0x261d92['sort']((_0x117af9,_0x3acf27)=>{const _0x217291=_0x117af9[_0x2c5c('0x2b')],_0x4d9026=_0x3acf27[_0x2c5c('0x2b')];if(!_0x217291[_0x2c5c('0x2')](_0x4d9026)){if(_0x217291[_0x2c5c('0x2c')](_0x4d9026,!0x0))return 0x1;if(_0x4d9026['containsRange'](_0x217291,!0x0))return-0x1;}return _0x117af9[_0x2c5c('0x6')]==_0x5911e2?-0x1:_0x3acf27[_0x2c5c('0x6')]==_0x5911e2?0x1:0x0;})[_0x2c5c('0x9')](_0x325062=>_0x325062[_0x2c5c('0x6')]);}get['_editorAnnotationsData'](){const _0x18c184=new Map();for(const _0x3845ba of Array[_0x2c5c('0x1a')](this['_dataCollectors']))for(const [_0x25d46d,_0x265182]of _0x3845ba())_0x18c184['set'](_0x25d46d,_0x265182);return _0x18c184;}}
@@ -1,86 +1,86 @@
1
- /**
2
- * @module comments/annotations/inlineannotations
3
- * @publicApi
4
- */
5
- import { Plugin, type Editor } from 'ckeditor5/src/core';
6
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
7
- import EditorAnnotations from './editorannotations';
8
- import { ContextualBalloon } from 'ckeditor5/src/ui';
9
- import './../../theme/annotation-inline.css';
10
- import type Annotation from './annotation';
11
- import type AnnotationCollection from './annotationcollection';
12
- /**
13
- * The popup-style UI for displaying annotations next to editor target elements.
14
- *
15
- * It displays {@link module:comments/annotations/annotation~Annotation annotations} in the
16
- * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon balloon} where the current
17
- * {@link module:comments/annotations/inlineannotations~InlineAnnotations#activeAnnotation} is the displayed one.
18
- *
19
- * Note: this UI type works only with {@link module:core/editor/editor~Editor the Editor} and cannot be used in integrations where
20
- * there is only {@link module:core/context~Context context} without any editor.
21
- *
22
- * This UI is intended for narrow screens.
23
- *
24
- * To activate this UI use one of the following:
25
- *
26
- * ```ts
27
- * editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'inline' );
28
- * editor.plugins.get( 'AnnotationsUIs' ).activate( 'inline', filter );
29
- * ```
30
- *
31
- * See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
32
- */
33
- export default class InlineAnnotations extends Plugin implements AnnotationsUI<Plugin> {
34
- /**
35
- * An active annotation tracked by this UI.
36
- *
37
- * @observable
38
- */
39
- activeAnnotation: Annotation | null;
40
- isAttached: boolean;
41
- /**
42
- * A collection of annotations controlled by this UI.
43
- *
44
- * This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
45
- *
46
- * It is set to `null` if `InlineAnnotations` is not
47
- * {@link module:comments/annotations/inlineannotations~InlineAnnotations#attach attached}.
48
- */
49
- annotations: AnnotationCollection | null;
50
- /**
51
- * @inheritDoc
52
- */
53
- static get requires(): readonly [typeof EditorAnnotations, typeof ContextualBalloon, typeof AnnotationsUIs];
54
- /**
55
- * @inheritDoc
56
- */
57
- static get pluginName(): "InlineAnnotations";
58
- /**
59
- * @inheritDoc
60
- */
61
- constructor(editor: Editor);
62
- /**
63
- * @inheritDoc
64
- */
65
- init(): void;
66
- /**
67
- * @inheritDoc
68
- */
69
- afterInit(): void;
70
- /**
71
- * Sets the active annotation for this UI.
72
- */
73
- setActiveAnnotation(annotation: Annotation | null): void;
74
- /**
75
- * @inheritDoc
76
- */
77
- attach(annotations: AnnotationCollection): void;
78
- /**
79
- * @inheritDoc
80
- */
81
- detach(): void;
82
- /**
83
- * @inheritDoc
84
- */
85
- destroy(): void;
86
- }
1
+ /**
2
+ * @module comments/annotations/inlineannotations
3
+ * @publicApi
4
+ */
5
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
6
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
7
+ import EditorAnnotations from './editorannotations.js';
8
+ import { ContextualBalloon } from 'ckeditor5/src/ui.js';
9
+ import './../../theme/annotation-inline.css';
10
+ import type Annotation from './annotation.js';
11
+ import type AnnotationCollection from './annotationcollection.js';
12
+ /**
13
+ * The popup-style UI for displaying annotations next to editor target elements.
14
+ *
15
+ * It displays {@link module:comments/annotations/annotation~Annotation annotations} in the
16
+ * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon balloon} where the current
17
+ * {@link module:comments/annotations/inlineannotations~InlineAnnotations#activeAnnotation} is the displayed one.
18
+ *
19
+ * Note: this UI type works only with {@link module:core/editor/editor~Editor the Editor} and cannot be used in integrations where
20
+ * there is only {@link module:core/context~Context context} without any editor.
21
+ *
22
+ * This UI is intended for narrow screens.
23
+ *
24
+ * To activate this UI use one of the following:
25
+ *
26
+ * ```ts
27
+ * editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'inline' );
28
+ * editor.plugins.get( 'AnnotationsUIs' ).activate( 'inline', filter );
29
+ * ```
30
+ *
31
+ * See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
32
+ */
33
+ export default class InlineAnnotations extends Plugin implements AnnotationsUI<Plugin> {
34
+ /**
35
+ * An active annotation tracked by this UI.
36
+ *
37
+ * @observable
38
+ */
39
+ activeAnnotation: Annotation | null;
40
+ isAttached: boolean;
41
+ /**
42
+ * A collection of annotations controlled by this UI.
43
+ *
44
+ * This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
45
+ *
46
+ * It is set to `null` if `InlineAnnotations` is not
47
+ * {@link module:comments/annotations/inlineannotations~InlineAnnotations#attach attached}.
48
+ */
49
+ annotations: AnnotationCollection | null;
50
+ /**
51
+ * @inheritDoc
52
+ */
53
+ static get requires(): readonly [typeof EditorAnnotations, typeof ContextualBalloon, typeof AnnotationsUIs];
54
+ /**
55
+ * @inheritDoc
56
+ */
57
+ static get pluginName(): "InlineAnnotations";
58
+ /**
59
+ * @inheritDoc
60
+ */
61
+ constructor(editor: Editor);
62
+ /**
63
+ * @inheritDoc
64
+ */
65
+ init(): void;
66
+ /**
67
+ * @inheritDoc
68
+ */
69
+ afterInit(): void;
70
+ /**
71
+ * Sets the active annotation for this UI.
72
+ */
73
+ setActiveAnnotation(annotation: Annotation | null): void;
74
+ /**
75
+ * @inheritDoc
76
+ */
77
+ attach(annotations: AnnotationCollection): void;
78
+ /**
79
+ * @inheritDoc
80
+ */
81
+ detach(): void;
82
+ /**
83
+ * @inheritDoc
84
+ */
85
+ destroy(): void;
86
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x68ec=['targetRect','_addAnnotationToBalloon','Esc','viewRangeToDom','hasView','isAttached','editableElement','getClientRects','view','hasActive','switchTo','updatePosition','activeAnnotation','detach','change:height','delete','map','getOrderedSelectedAnnotations','selection','update','stopListening','get','has','annotations','remove','target','listenTo','setActiveAnnotation','pluginName','destroy','_getBalloonTargetForAnnotation','getFirstRange','width','every','_addedAnnotations','attach','fromRect','left','afterInit','push','_closeAnnotation','mousedown','getBoundingClientRect','_setSelectedAnnotations','includes','isFocused','keystrokes','inlineannotations-detach-not-attached','focus','inline','domConverter','document','find','_forceRefresh','from','getByView','_selectedAnnotations','length','plugins','_manuallyClosed','editor','isActive','right','showStack','top','editing','change:visibleView','requires','clear','refresh','register','inlineannotations-not-allowed-with-context','InlineAnnotations','add','addObserver','visibleView','set','_balloon','_removeAnnotationFromBalloon','bottom','focusTracker','context'];(function(_0x35f67e,_0x68ecb3){const _0x11dcd7=function(_0x4aa1b6){while(--_0x4aa1b6){_0x35f67e['push'](_0x35f67e['shift']());}};_0x11dcd7(++_0x68ecb3);}(_0x68ec,0x146));const _0x11dc=function(_0x35f67e,_0x68ecb3){_0x35f67e=_0x35f67e-0x0;let _0x11dcd7=_0x68ec[_0x35f67e];return _0x11dcd7;};import{Plugin as _0x5665cc}from'ckeditor5/src/core';import _0x2d0665 from'./annotationsuis';import _0x10931f from'./editorannotations';import{ContextualBalloon as _0x22bb93}from'ckeditor5/src/ui';import{MouseObserver as _0x4a0163}from'ckeditor5/src/engine';import{CKEditorError as _0x2606df,Rect as _0x559d6e}from'ckeditor5/src/utils';import'./../../theme/annotation-inline.css';export default class c extends _0x5665cc{static get[_0x11dc('0x45')](){return[_0x10931f,_0x22bb93,_0x2d0665];}static get[_0x11dc('0x1e')](){return _0x11dc('0x4a');}constructor(_0x3853b9){super(_0x3853b9),_0x3853b9[_0x11dc('0x43')][_0x11dc('0xa')][_0x11dc('0x4c')](_0x4a0163),this['isAttached']=!0x1,this[_0x11dc('0x4e')]('activeAnnotation',null),this[_0x11dc('0x19')]=null,this[_0x11dc('0x3d')]=new Set(),this[_0x11dc('0x4f')]=_0x3853b9[_0x11dc('0x3c')][_0x11dc('0x17')](_0x22bb93),this[_0x11dc('0x24')]=new Set(),this['_selectedAnnotations']=[],this[_0x11dc('0x37')]=!0x1;}['init'](){const _0x1030e4=this[_0x11dc('0x3e')][_0x11dc('0x3c')][_0x11dc('0x17')](_0x2d0665);_0x1030e4[_0x11dc('0x1')]===this[_0x11dc('0x3e')]&&(_0x1030e4[_0x11dc('0x48')](_0x11dc('0x33'),this),this['editor'][_0x11dc('0x30')][_0x11dc('0x4e')]('Esc',(_0x53a118,_0x5a3a8a)=>{const _0x511be4=this[_0x11dc('0x4f')];if(this[_0x11dc('0x7')]&&_0x511be4[_0x11dc('0x4d')]){const _0x2beca9=this[_0x11dc('0x19')][_0x11dc('0x39')](_0x511be4['visibleView']);_0x2beca9&&this[_0x11dc('0x2a')](_0x2beca9),_0x5a3a8a();}}));}[_0x11dc('0x28')](){const _0x1aa42d=this[_0x11dc('0x3e')][_0x11dc('0x3c')][_0x11dc('0x17')](_0x2d0665);_0x1aa42d[_0x11dc('0x1')]===this[_0x11dc('0x3e')]&&(_0x1aa42d[_0x11dc('0xb')]()||_0x1aa42d[_0x11dc('0xc')](_0x11dc('0x33')));}[_0x11dc('0x1d')](_0x569be5){_0x569be5!==this[_0x11dc('0xe')]&&(this[_0x11dc('0xe')]&&(this['activeAnnotation'][_0x11dc('0x3f')]=!0x1),_0x569be5&&this[_0x11dc('0x3e')]['ui'][_0x11dc('0x0')][_0x11dc('0x2f')]&&(this[_0x11dc('0x19')][_0x11dc('0x18')](_0x569be5)&&this[_0x11dc('0x3')](_0x569be5,!0x0),_0x569be5[_0x11dc('0x3f')]=!0x0),_0x569be5||this[_0x11dc('0x2d')]([]),this[_0x11dc('0xe')]=_0x569be5);}[_0x11dc('0x25')](_0x19146c){this[_0x11dc('0x19')]=_0x19146c;const _0x5e7ad6=this[_0x11dc('0x3e')][_0x11dc('0x3c')][_0x11dc('0x17')](_0x2d0665),_0x107406=this[_0x11dc('0x4f')];if(this['isAttached'])throw new _0x2606df('inlineannotations-attach-already-attached',this);if(_0x5e7ad6[_0x11dc('0x1')]!==this[_0x11dc('0x3e')])throw new _0x2606df(_0x11dc('0x49'),this);const _0x18cc90=this[_0x11dc('0x3e')][_0x11dc('0x3c')][_0x11dc('0x17')](_0x10931f);this[_0x11dc('0x1c')](_0x18cc90,_0x11dc('0x47'),()=>{const _0x758bc4=_0x18cc90[_0x11dc('0x13')]({'annotations':this[_0x11dc('0x19')],'activeAnnotation':this['activeAnnotation']});var _0x3e5322,_0x20dc6c;!this[_0x11dc('0x37')]&&(_0x3e5322=_0x758bc4,_0x20dc6c=this[_0x11dc('0x3a')],_0x3e5322['length']===_0x20dc6c[_0x11dc('0x3b')]&&_0x3e5322[_0x11dc('0x23')](_0x34ab17=>_0x20dc6c[_0x11dc('0x2e')](_0x34ab17)))||(this[_0x11dc('0x37')]=!0x1,this[_0x11dc('0x2d')](_0x758bc4),this['setActiveAnnotation'](_0x758bc4[0x0]||null));}),this[_0x11dc('0x1c')](_0x18cc90,'blur',(_0x4d9956,{isAnnotationTracked:_0x4aa1b8})=>{this[_0x11dc('0xe')]&&_0x4aa1b8(this[_0x11dc('0xe')])&&(this[_0x11dc('0x2d')]([]),this[_0x11dc('0x1d')](null));}),this['listenTo'](this[_0x11dc('0x3e')]['ui'][_0x11dc('0x0')],'change:isFocused',(_0x448002,_0x27c2b5,_0x4ce9f7)=>{_0x4ce9f7||this[_0x11dc('0x1d')](null);}),this[_0x11dc('0x1c')](_0x19146c,_0x11dc('0x1a'),(_0x7cc125,_0x2191b0)=>{this['_removeAnnotationFromBalloon'](_0x2191b0),_0x2191b0===this[_0x11dc('0xe')]&&this[_0x11dc('0x1d')](null);}),this[_0x11dc('0x1c')](_0x107406,_0x11dc('0x44'),(_0x5c3a5b,_0x6b34b2,_0x6e2403,_0x264d89)=>{_0x264d89&&this[_0x11dc('0x16')](_0x264d89);const _0x13af38=_0x19146c['getByView'](_0x6e2403);_0x6e2403&&_0x13af38&&(this['listenTo'](_0x6e2403,_0x11dc('0x10'),()=>{_0x107406['updatePosition']();}),this[_0x11dc('0x1c')](_0x6e2403,_0x11dc('0x4'),()=>{this[_0x11dc('0x2a')](_0x13af38),this[_0x11dc('0x3e')][_0x11dc('0x43')][_0x11dc('0xa')][_0x11dc('0x32')]();}),this[_0x11dc('0xe')]!==_0x13af38&&this[_0x11dc('0x1d')](_0x13af38));}),this[_0x11dc('0x1c')](this[_0x11dc('0x3e')]['ui'],_0x11dc('0x15'),()=>{_0x107406['visibleView']&&(_0x19146c[_0x11dc('0x39')](_0x107406[_0x11dc('0x4d')])&&_0x107406[_0x11dc('0xd')]());}),this[_0x11dc('0x1c')](this[_0x11dc('0x3e')]['editing'][_0x11dc('0xa')]['document'],_0x11dc('0x2b'),()=>{this[_0x11dc('0x37')]=!0x0,this[_0x11dc('0x3d')][_0x11dc('0x46')]();}),this[_0x11dc('0x3e')][_0x11dc('0x43')]['view'][_0x11dc('0x35')][_0x11dc('0x14')][_0x11dc('0x8')]&&this[_0x11dc('0x3e')][_0x11dc('0x43')][_0x11dc('0xa')][_0x11dc('0x32')](),this[_0x11dc('0x7')]=!0x0;}[_0x11dc('0xf')](){if(!this[_0x11dc('0x7')])throw new _0x2606df(_0x11dc('0x31'),this);this[_0x11dc('0x1d')](null);for(const _0xcfb3da of this[_0x11dc('0x24')])this[_0x11dc('0x50')](_0xcfb3da);this[_0x11dc('0x16')](),this[_0x11dc('0x7')]=!0x1,this['annotations']=null;}[_0x11dc('0x1f')](){this[_0x11dc('0x7')]&&this['detach']();}[_0x11dc('0x2d')](_0x4c139c){for(const _0xb8a520 of this[_0x11dc('0x3a')])_0x4c139c[_0x11dc('0x2e')](_0xb8a520)||this['_manuallyClosed']['delete'](_0xb8a520);for(const _0x3d870e of this[_0x11dc('0x19')])_0x4c139c[_0x11dc('0x2e')](_0x3d870e)||this[_0x11dc('0x50')](_0x3d870e);if(this[_0x11dc('0x3e')]['ui'][_0x11dc('0x0')][_0x11dc('0x2f')])for(const _0x16d9db of _0x4c139c)this['_addAnnotationToBalloon'](_0x16d9db);this[_0x11dc('0x3a')]=_0x4c139c;}[_0x11dc('0x3')](_0x316563,_0x126f15=!0x1){this[_0x11dc('0x3d')]['has'](_0x316563)||(this['_addedAnnotations'][_0x11dc('0x18')](_0x316563)||this[_0x11dc('0x4f')][_0x11dc('0x6')](_0x316563[_0x11dc('0xa')])||(this['_addedAnnotations'][_0x11dc('0x4b')](_0x316563),this[_0x11dc('0x4f')][_0x11dc('0x4b')]({'stackId':_0x316563[_0x11dc('0xa')]['id'],'view':_0x316563['view'],'position':{'target':()=>this[_0x11dc('0x20')](_0x316563)}})),_0x126f15&&this['_balloon'][_0x11dc('0x41')](_0x316563[_0x11dc('0xa')]['id']));}[_0x11dc('0x20')](_0x1a5c8d){const _0x40b303=_0x1a5c8d[_0x11dc('0x1b')],_0x157aff=this[_0x11dc('0x3e')][_0x11dc('0x43')][_0x11dc('0xa')],_0x5a8d07=_0x157aff[_0x11dc('0x35')][_0x11dc('0x14')][_0x11dc('0x21')](),_0x15f0c1=_0x157aff[_0x11dc('0x34')][_0x11dc('0x5')](_0x5a8d07);if(_0x15f0c1['collapse'](!0x0),_0x40b303){if(_0x40b303 instanceof _0x559d6e)return _0x40b303;let _0xb5c670=[];for(const _0x8fb271 of _0x40b303)_0xb5c670['push'](...(_0x34a59f=_0x8fb271[_0x11dc('0x9')](),Array[_0x11dc('0x38')](_0x34a59f)[_0x11dc('0x12')](DOMRect[_0x11dc('0x26')])));_0xb5c670=function(_0x878bf8){const _0x55834b=[];let _0x5c79e3=_0x878bf8[0x0];for(let _0xf46029=0x1;_0xf46029<_0x878bf8[_0x11dc('0x3b')];_0xf46029++)F(_0x5c79e3,_0x878bf8[_0xf46029])?_0x5c79e3[_0x11dc('0x22')]+=_0x878bf8[_0xf46029][_0x11dc('0x22')]:(_0x55834b[_0x11dc('0x29')](_0x5c79e3),_0x5c79e3=_0x878bf8[_0xf46029]);return _0x55834b[_0x11dc('0x29')](_0x5c79e3),_0x55834b;}(_0xb5c670);const _0x31dac0=_0x15f0c1[_0x11dc('0x2c')]();return _0xb5c670[_0x11dc('0x36')](_0x966fd0=>_0x966fd0[_0x11dc('0x42')]<=_0x31dac0[_0x11dc('0x42')]&&_0x966fd0[_0x11dc('0x51')]>=_0x31dac0[_0x11dc('0x51')]&&_0x966fd0[_0x11dc('0x27')]<=_0x31dac0['left']&&_0x966fd0[_0x11dc('0x40')]>=_0x31dac0[_0x11dc('0x40')])||_0xb5c670[0x0];}var _0x34a59f;return _0x1a5c8d[_0x11dc('0x2')]||_0x15f0c1;}[_0x11dc('0x50')](_0x4d1f65){this[_0x11dc('0x24')][_0x11dc('0x18')](_0x4d1f65)&&this['_balloon'][_0x11dc('0x6')](_0x4d1f65[_0x11dc('0xa')])&&(this['_addedAnnotations'][_0x11dc('0x11')](_0x4d1f65),this['_balloon'][_0x11dc('0x1a')](_0x4d1f65['view']));}[_0x11dc('0x2a')](_0x830b4f){this['_manuallyClosed'][_0x11dc('0x4b')](_0x830b4f),this[_0x11dc('0x50')](_0x830b4f);}}function F(_0x1c639e,_0x3393b6){return _0x1c639e[_0x11dc('0x42')]===_0x3393b6[_0x11dc('0x42')]&&_0x1c639e['bottom']===_0x3393b6[_0x11dc('0x51')]&&_0x1c639e['right']===_0x3393b6['left'];}
23
+ const _0x29aa=['add','domConverter','context','keystrokes','update','_addedAnnotations','detach','hasActive','annotations','isFocused','getByView','editableElement','bottom','focus','_selectedAnnotations','_forceRefresh','right','delete','isAttached','change:visibleView','setActiveAnnotation','Esc','showStack','view','InlineAnnotations','pluginName','plugins','find','inlineannotations-not-allowed-with-context','visibleView','getFirstRange','editing','targetRect','includes','afterInit','_balloon','from','length','change:height','every','hasView','stopListening','editor','width','left','collapse','_addAnnotationToBalloon','isActive','has','_manuallyClosed','change:isFocused','_closeAnnotation','requires','focusTracker','get','refresh','mousedown','set','activeAnnotation','addObserver','switchTo','top','selection','inlineannotations-attach-already-attached','remove','inline','getBoundingClientRect','clear','_removeAnnotationFromBalloon','target','listenTo','document','getClientRects','register','_setSelectedAnnotations','_getBalloonTargetForAnnotation','push','updatePosition'];(function(_0x29b6df,_0x29aa63){const _0x5b265e=function(_0x4f6504){while(--_0x4f6504){_0x29b6df['push'](_0x29b6df['shift']());}};_0x5b265e(++_0x29aa63);}(_0x29aa,0x113));const _0x5b26=function(_0x29b6df,_0x29aa63){_0x29b6df=_0x29b6df-0x0;let _0x5b265e=_0x29aa[_0x29b6df];return _0x5b265e;};import{Plugin as _0x28f0fa}from'ckeditor5/src/core.js';import _0x3fb22b from'./annotationsuis.js';import _0x79915c from'./editorannotations.js';import{ContextualBalloon as _0x17c37d}from'ckeditor5/src/ui.js';import{MouseObserver as _0x31d23a}from'ckeditor5/src/engine.js';import{CKEditorError as _0xf89ff9,Rect as _0x54d489}from'ckeditor5/src/utils.js';import'./../../theme/annotation-inline.css';export default class c extends _0x28f0fa{static get[_0x5b26('0xb')](){return[_0x79915c,_0x17c37d,_0x3fb22b];}static get[_0x5b26('0x3e')](){return _0x5b26('0x3d');}constructor(_0x1625de){super(_0x1625de),_0x1625de[_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x12')](_0x31d23a),this[_0x5b26('0x37')]=!0x1,this[_0x5b26('0x10')](_0x5b26('0x11'),null),this[_0x5b26('0x2d')]=null,this[_0x5b26('0x8')]=new Set(),this[_0x5b26('0x48')]=_0x1625de[_0x5b26('0x3f')]['get'](_0x17c37d),this['_addedAnnotations']=new Set(),this[_0x5b26('0x33')]=[],this[_0x5b26('0x34')]=!0x1;}['init'](){const _0x5829b6=this[_0x5b26('0x1')][_0x5b26('0x3f')]['get'](_0x3fb22b);_0x5829b6[_0x5b26('0x27')]===this[_0x5b26('0x1')]&&(_0x5829b6[_0x5b26('0x20')](_0x5b26('0x18'),this),this[_0x5b26('0x1')][_0x5b26('0x28')][_0x5b26('0x10')](_0x5b26('0x3a'),(_0x408e4a,_0x5a40d7)=>{const _0x5bd676=this['_balloon'];if(this[_0x5b26('0x37')]&&_0x5bd676[_0x5b26('0x42')]){const _0x5d7fb4=this['annotations'][_0x5b26('0x2f')](_0x5bd676['visibleView']);_0x5d7fb4&&this['_closeAnnotation'](_0x5d7fb4),_0x5a40d7();}}));}[_0x5b26('0x47')](){const _0x2f45f2=this['editor']['plugins'][_0x5b26('0xd')](_0x3fb22b);_0x2f45f2[_0x5b26('0x27')]===this['editor']&&(_0x2f45f2[_0x5b26('0x2c')]()||_0x2f45f2[_0x5b26('0x13')](_0x5b26('0x18')));}['setActiveAnnotation'](_0xaa0552){_0xaa0552!==this[_0x5b26('0x11')]&&(this['activeAnnotation']&&(this[_0x5b26('0x11')][_0x5b26('0x6')]=!0x1),_0xaa0552&&this['editor']['ui'][_0x5b26('0xc')][_0x5b26('0x2e')]&&(this[_0x5b26('0x2d')]['has'](_0xaa0552)&&this[_0x5b26('0x5')](_0xaa0552,!0x0),_0xaa0552[_0x5b26('0x6')]=!0x0),_0xaa0552||this[_0x5b26('0x21')]([]),this[_0x5b26('0x11')]=_0xaa0552);}['attach'](_0x5ad459){this[_0x5b26('0x2d')]=_0x5ad459;const _0x39edce=this[_0x5b26('0x1')][_0x5b26('0x3f')][_0x5b26('0xd')](_0x3fb22b),_0x3d4f7d=this[_0x5b26('0x48')];if(this[_0x5b26('0x37')])throw new _0xf89ff9(_0x5b26('0x16'),this);if(_0x39edce[_0x5b26('0x27')]!==this[_0x5b26('0x1')])throw new _0xf89ff9(_0x5b26('0x41'),this);const _0x18d196=this['editor'][_0x5b26('0x3f')]['get'](_0x79915c);this[_0x5b26('0x1d')](_0x18d196,_0x5b26('0xe'),()=>{const _0x4e12a6=_0x18d196['getOrderedSelectedAnnotations']({'annotations':this[_0x5b26('0x2d')],'activeAnnotation':this[_0x5b26('0x11')]});var _0x3ebf1f,_0x36dd5d;!this[_0x5b26('0x34')]&&(_0x3ebf1f=_0x4e12a6,_0x36dd5d=this[_0x5b26('0x33')],_0x3ebf1f[_0x5b26('0x4a')]===_0x36dd5d[_0x5b26('0x4a')]&&_0x3ebf1f[_0x5b26('0x4c')](_0xdf860c=>_0x36dd5d[_0x5b26('0x46')](_0xdf860c)))||(this[_0x5b26('0x34')]=!0x1,this[_0x5b26('0x21')](_0x4e12a6),this['setActiveAnnotation'](_0x4e12a6[0x0]||null));}),this['listenTo'](_0x18d196,'blur',(_0x371fdb,{isAnnotationTracked:_0x4ca3a2})=>{this[_0x5b26('0x11')]&&_0x4ca3a2(this['activeAnnotation'])&&(this[_0x5b26('0x21')]([]),this['setActiveAnnotation'](null));}),this[_0x5b26('0x1d')](this[_0x5b26('0x1')]['ui'][_0x5b26('0xc')],_0x5b26('0x9'),(_0x44f975,_0x50b1ee,_0x4b5f1b)=>{_0x4b5f1b||this['setActiveAnnotation'](null);}),this[_0x5b26('0x1d')](_0x5ad459,_0x5b26('0x17'),(_0x128f95,_0x604f2)=>{this[_0x5b26('0x1b')](_0x604f2),_0x604f2===this['activeAnnotation']&&this[_0x5b26('0x39')](null);}),this[_0x5b26('0x1d')](_0x3d4f7d,_0x5b26('0x38'),(_0x116a60,_0x57a1e8,_0x49e4d6,_0x3dd117)=>{_0x3dd117&&this['stopListening'](_0x3dd117);const _0x535bba=_0x5ad459['getByView'](_0x49e4d6);_0x49e4d6&&_0x535bba&&(this['listenTo'](_0x49e4d6,_0x5b26('0x4b'),()=>{_0x3d4f7d[_0x5b26('0x24')]();}),this['listenTo'](_0x49e4d6,_0x5b26('0x3a'),()=>{this[_0x5b26('0xa')](_0x535bba),this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x32')]();}),this[_0x5b26('0x11')]!==_0x535bba&&this[_0x5b26('0x39')](_0x535bba));}),this[_0x5b26('0x1d')](this[_0x5b26('0x1')]['ui'],_0x5b26('0x29'),()=>{_0x3d4f7d[_0x5b26('0x42')]&&(_0x5ad459['getByView'](_0x3d4f7d[_0x5b26('0x42')])&&_0x3d4f7d[_0x5b26('0x24')]());}),this[_0x5b26('0x1d')](this['editor'][_0x5b26('0x44')][_0x5b26('0x3c')]['document'],_0x5b26('0xf'),()=>{this[_0x5b26('0x34')]=!0x0,this[_0x5b26('0x8')][_0x5b26('0x1a')]();}),this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x1e')]['selection'][_0x5b26('0x30')]&&this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x32')](),this[_0x5b26('0x37')]=!0x0;}[_0x5b26('0x2b')](){if(!this[_0x5b26('0x37')])throw new _0xf89ff9('inlineannotations-detach-not-attached',this);this[_0x5b26('0x39')](null);for(const _0x36ebc8 of this[_0x5b26('0x2a')])this[_0x5b26('0x1b')](_0x36ebc8);this[_0x5b26('0x0')](),this['isAttached']=!0x1,this[_0x5b26('0x2d')]=null;}['destroy'](){this[_0x5b26('0x37')]&&this[_0x5b26('0x2b')]();}[_0x5b26('0x21')](_0x4e5bae){for(const _0x19cc09 of this['_selectedAnnotations'])_0x4e5bae['includes'](_0x19cc09)||this['_manuallyClosed'][_0x5b26('0x36')](_0x19cc09);for(const _0xa7ff14 of this[_0x5b26('0x2d')])_0x4e5bae['includes'](_0xa7ff14)||this[_0x5b26('0x1b')](_0xa7ff14);if(this[_0x5b26('0x1')]['ui'][_0x5b26('0xc')][_0x5b26('0x2e')])for(const _0x51df62 of _0x4e5bae)this[_0x5b26('0x5')](_0x51df62);this[_0x5b26('0x33')]=_0x4e5bae;}['_addAnnotationToBalloon'](_0x540e12,_0x4fa06c=!0x1){this[_0x5b26('0x8')][_0x5b26('0x7')](_0x540e12)||(this[_0x5b26('0x2a')][_0x5b26('0x7')](_0x540e12)||this['_balloon'][_0x5b26('0x4d')](_0x540e12['view'])||(this[_0x5b26('0x2a')][_0x5b26('0x25')](_0x540e12),this['_balloon']['add']({'stackId':_0x540e12['view']['id'],'view':_0x540e12[_0x5b26('0x3c')],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x540e12)}})),_0x4fa06c&&this['_balloon'][_0x5b26('0x3b')](_0x540e12[_0x5b26('0x3c')]['id']));}[_0x5b26('0x22')](_0x4720d3){const _0x15507b=_0x4720d3[_0x5b26('0x1c')],_0x34106d=this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')],_0x41bdf3=_0x34106d['document'][_0x5b26('0x15')][_0x5b26('0x43')](),_0x419ff3=_0x34106d[_0x5b26('0x26')]['viewRangeToDom'](_0x41bdf3);if(_0x419ff3[_0x5b26('0x4')](!0x0),_0x15507b){if(_0x15507b instanceof _0x54d489)return _0x15507b;let _0x6d09c3=[];for(const _0x31ef6d of _0x15507b)_0x6d09c3[_0x5b26('0x23')](...(_0x245fae=_0x31ef6d[_0x5b26('0x1f')](),Array[_0x5b26('0x49')](_0x245fae)['map'](DOMRect['fromRect'])));_0x6d09c3=function(_0x5c8da1){const _0x497801=[];let _0x594d5e=_0x5c8da1[0x0];for(let _0x351fd5=0x1;_0x351fd5<_0x5c8da1[_0x5b26('0x4a')];_0x351fd5++)F(_0x594d5e,_0x5c8da1[_0x351fd5])?_0x594d5e[_0x5b26('0x2')]+=_0x5c8da1[_0x351fd5][_0x5b26('0x2')]:(_0x497801[_0x5b26('0x23')](_0x594d5e),_0x594d5e=_0x5c8da1[_0x351fd5]);return _0x497801[_0x5b26('0x23')](_0x594d5e),_0x497801;}(_0x6d09c3);const _0x4e9f4c=_0x419ff3[_0x5b26('0x19')]();return _0x6d09c3[_0x5b26('0x40')](_0x102802=>_0x102802[_0x5b26('0x14')]<=_0x4e9f4c[_0x5b26('0x14')]&&_0x102802[_0x5b26('0x31')]>=_0x4e9f4c[_0x5b26('0x31')]&&_0x102802[_0x5b26('0x3')]<=_0x4e9f4c[_0x5b26('0x3')]&&_0x102802[_0x5b26('0x35')]>=_0x4e9f4c['right'])||_0x6d09c3[0x0];}var _0x245fae;return _0x4720d3[_0x5b26('0x45')]||_0x419ff3;}[_0x5b26('0x1b')](_0x1ece28){this[_0x5b26('0x2a')][_0x5b26('0x7')](_0x1ece28)&&this[_0x5b26('0x48')][_0x5b26('0x4d')](_0x1ece28['view'])&&(this[_0x5b26('0x2a')]['delete'](_0x1ece28),this['_balloon'][_0x5b26('0x17')](_0x1ece28[_0x5b26('0x3c')]));}[_0x5b26('0xa')](_0x3326fa){this['_manuallyClosed'][_0x5b26('0x25')](_0x3326fa),this[_0x5b26('0x1b')](_0x3326fa);}}function F(_0x19b089,_0x2b857b){return _0x19b089['top']===_0x2b857b[_0x5b26('0x14')]&&_0x19b089[_0x5b26('0x31')]===_0x2b857b[_0x5b26('0x31')]&&_0x19b089['right']===_0x2b857b[_0x5b26('0x3')];}
@@ -1,81 +1,81 @@
1
- /**
2
- * @module comments/annotations/narrowsidebar
3
- * @publicApi
4
- */
5
- import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core';
6
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
7
- import Sidebar from './sidebar';
8
- import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui';
9
- import '../../theme/sidebar-narrow.css';
10
- import type Annotation from './annotation';
11
- import type { default as AnnotationCollection } from './annotationcollection';
12
- /**
13
- * The narrow sidebar UI for displaying annotations.
14
- *
15
- * Binds {@link module:comments/annotations/annotations~Annotations} plugin with
16
- * {@link module:comments/annotations/sidebar~Sidebar} plugin to display annotations in the sidebar as
17
- * {@link module:comments/annotations/view/annotationcounterbuttonview~AnnotationCounterButtonView small icons}.
18
- *
19
- * After selecting an annotation the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} with an
20
- * {@link module:comments/annotations/view/annotationview~AnnotationView} appears attached to the sidebar item.
21
- *
22
- * This UI is intended for medium-sized viewports.
23
- *
24
- * To activate this UI use one of the following:
25
- *
26
- * ```ts
27
- * editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'narrowSidebar' );
28
- * editor.plugins.get( 'AnnotationsUIs' ).activate( 'narrowSidebar', filter );
29
- * ```
30
- *
31
- * See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
32
- */
33
- export default class NarrowSidebar extends ContextPlugin implements AnnotationsUI<ContextPlugin> {
34
- /**
35
- * An active annotation tracked by this UI.
36
- */
37
- activeAnnotation: Annotation | null;
38
- bodyCollection: BodyCollection;
39
- balloonPanelView: BalloonPanelView;
40
- isAttached: boolean;
41
- /**
42
- * A collection of annotations controlled by this UI.
43
- *
44
- * This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
45
- *
46
- * It is set to `null` if `NarrowSidebar` is not {@link module:comments/annotations/narrowsidebar~NarrowSidebar#attach attached}.
47
- */
48
- annotations: AnnotationCollection | null;
49
- /**
50
- * @inheritDoc
51
- */
52
- static get requires(): readonly [typeof Sidebar, typeof AnnotationsUIs];
53
- /**
54
- * @inheritDoc
55
- */
56
- static get pluginName(): "NarrowSidebar";
57
- /**
58
- * @inheritDoc
59
- */
60
- constructor(context: Context | Editor);
61
- /**
62
- * @inheritDoc
63
- */
64
- init(): void;
65
- /**
66
- * @inheritDoc
67
- */
68
- attach(annotations: AnnotationCollection): void;
69
- /**
70
- * Sets the active annotation for this UI.
71
- */
72
- setActiveAnnotation(annotation: Annotation | null): void;
73
- /**
74
- * @inheritDoc
75
- */
76
- detach(): void;
77
- /**
78
- * @inheritDoc
79
- */
80
- destroy(): void;
81
- }
1
+ /**
2
+ * @module comments/annotations/narrowsidebar
3
+ * @publicApi
4
+ */
5
+ import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core.js';
6
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
7
+ import Sidebar from './sidebar.js';
8
+ import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui.js';
9
+ import '../../theme/sidebar-narrow.css';
10
+ import type Annotation from './annotation.js';
11
+ import type { default as AnnotationCollection } from './annotationcollection.js';
12
+ /**
13
+ * The narrow sidebar UI for displaying annotations.
14
+ *
15
+ * Binds {@link module:comments/annotations/annotations~Annotations} plugin with
16
+ * {@link module:comments/annotations/sidebar~Sidebar} plugin to display annotations in the sidebar as
17
+ * {@link module:comments/annotations/view/annotationcounterbuttonview~AnnotationCounterButtonView small icons}.
18
+ *
19
+ * After selecting an annotation the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} with an
20
+ * {@link module:comments/annotations/view/annotationview~AnnotationView} appears attached to the sidebar item.
21
+ *
22
+ * This UI is intended for medium-sized viewports.
23
+ *
24
+ * To activate this UI use one of the following:
25
+ *
26
+ * ```ts
27
+ * editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'narrowSidebar' );
28
+ * editor.plugins.get( 'AnnotationsUIs' ).activate( 'narrowSidebar', filter );
29
+ * ```
30
+ *
31
+ * See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
32
+ */
33
+ export default class NarrowSidebar extends ContextPlugin implements AnnotationsUI<ContextPlugin> {
34
+ /**
35
+ * An active annotation tracked by this UI.
36
+ */
37
+ activeAnnotation: Annotation | null;
38
+ bodyCollection: BodyCollection;
39
+ balloonPanelView: BalloonPanelView;
40
+ isAttached: boolean;
41
+ /**
42
+ * A collection of annotations controlled by this UI.
43
+ *
44
+ * This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
45
+ *
46
+ * It is set to `null` if `NarrowSidebar` is not {@link module:comments/annotations/narrowsidebar~NarrowSidebar#attach attached}.
47
+ */
48
+ annotations: AnnotationCollection | null;
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ static get requires(): readonly [typeof Sidebar, typeof AnnotationsUIs];
53
+ /**
54
+ * @inheritDoc
55
+ */
56
+ static get pluginName(): "NarrowSidebar";
57
+ /**
58
+ * @inheritDoc
59
+ */
60
+ constructor(context: Context | Editor);
61
+ /**
62
+ * @inheritDoc
63
+ */
64
+ init(): void;
65
+ /**
66
+ * @inheritDoc
67
+ */
68
+ attach(annotations: AnnotationCollection): void;
69
+ /**
70
+ * Sets the active annotation for this UI.
71
+ */
72
+ setActiveAnnotation(annotation: Annotation | null): void;
73
+ /**
74
+ * @inheritDoc
75
+ */
76
+ detach(): void;
77
+ /**
78
+ * @inheritDoc
79
+ */
80
+ destroy(): void;
81
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4bdf=['_editorAnnotations','getByView','_hideBalloon','_integrateWithEditorAnnotations','listenTo','getOrderedSelectedAnnotations','keydown','view','balloonPanelView','rearrange','content','annotations','from','refreshPositioning','southArrowNorthWest','_domEmitter','ready','_detachFromContainer','add','type','refresh','_showBalloon','remove','annotationType','isAttached','clear','number','values','delete','hasDomSelection','stopListening','northArrowSouthEast','_manuallyClosedAnnotationViews','execute','addEventListener','Esc','requires','keyCode','northArrowSouthWest','set:container','contains','unpin','_setSelectedAnnotations','blur','change:container','southArrowNorth','first','low','isVisible','southArrowNorthEast','detach','defaultPositions','isDirty','northArrowSouth','element','bind','target','get','_annotationToNarrowView','EditorAnnotations','activeAnnotation','register','_destroyEditorAnnotationsIntegration','bodyCollection','high','mousedown','addAnnotation','init','focus','editors','locale','_updateBalloonPosition','set','attach','NarrowSidebar','_detachListeners','_refreshPositioningDebounced','off','_attachListeners','_selectedAnnotations','length','stop','_refreshPositioning','plugins','detachFromDom','narrowSidebar','preventClosingBalloon','context','esc','pin','resize','setActiveAnnotation','removeEventListener','cancel','stopPropagation','has','destroy'];(function(_0x625103,_0x4bdfab){const _0x2af638=function(_0x1d0cbb){while(--_0x1d0cbb){_0x625103['push'](_0x625103['shift']());}};_0x2af638(++_0x4bdfab);}(_0x4bdf,0x7d));const _0x2af6=function(_0x625103,_0x4bdfab){_0x625103=_0x625103-0x0;let _0x2af638=_0x4bdf[_0x625103];return _0x2af638;};import{ContextPlugin as _0x13cc88,Context as _0x5e950c}from'ckeditor5/src/core';import _0x102ee3 from'./annotationsuis';import _0x50b4bf from'./sidebar';import _0x52e1a2 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x29e017,BodyCollection as _0x281ec5}from'ckeditor5/src/ui';import{CKEditorError as _0x1b69fc,DomEmitterMixin as _0x180125,keyCodes as _0x2dca77,Collection as _0x3342ee}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x9fd33b}from'lodash-es';import _0x2ce106 from'./editorannotations';export default class s extends _0x13cc88{static get[_0x2af6('0x8')](){return[_0x50b4bf,_0x102ee3];}static get['pluginName'](){return _0x2af6('0x2e');}constructor(_0x3e48ea){super(_0x3e48ea),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this[_0x2af6('0x54')]=Object['create'](_0x180125),this[_0x2af6('0x1e')]=new Map(),this[_0x2af6('0x2c')](_0x2af6('0x20'),null),this[_0x2af6('0x50')]=null,this['_selectedAnnotations']=[],this[_0x2af6('0x45')]=new _0x3342ee(),this['_refreshPositioningDebounced']=_0x9fd33b(()=>{this[_0x2af6('0x36')]();},0xfa,{'leading':!0x1});}[_0x2af6('0x27')](){this['context'][_0x2af6('0x37')][_0x2af6('0x1d')](_0x102ee3)[_0x2af6('0x21')](_0x2af6('0x39'),this),this[_0x2af6('0x23')]=new _0x281ec5(this['context'][_0x2af6('0x2a')]),this[_0x2af6('0x4d')]=new _0x29e017(this['context']['locale']),this[_0x2af6('0x23')]['attachToDom'](),this[_0x2af6('0x23')]['add'](this[_0x2af6('0x4d')]);}[_0x2af6('0x2d')](_0x64fc4c){this[_0x2af6('0x50')]=_0x64fc4c;const _0xbbcc9=this['context'][_0x2af6('0x37')][_0x2af6('0x1d')](_0x50b4bf),_0x439ba3=this[_0x2af6('0x4d')];if(_0xbbcc9['_annotations']=_0x64fc4c,this[_0x2af6('0x5d')])throw new _0x1b69fc('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this[_0x2af6('0x49')](_0xbbcc9,_0x2af6('0xb'),()=>{this[_0x2af6('0x16')](),this[_0x2af6('0x49')](_0xbbcc9,_0x2af6('0x10'),_0x195d30=>{_0x195d30[_0x2af6('0x31')](),this['attach'](_0x64fc4c);});}),_0xbbcc9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x593c73=_0x44f523=>{const _0x6be0a5=new _0x52e1a2(this[_0x2af6('0x3b')][_0x2af6('0x2a')]);_0xbbcc9[_0x2af6('0x26')](_0x44f523,_0x6be0a5),this['_annotationToNarrowView'][_0x2af6('0x2c')](_0x44f523,_0x6be0a5),_0x6be0a5[_0x2af6('0x1b')](_0x2af6('0x18'),_0x2af6('0x5c'),_0x2af6('0x5f'))['to'](_0x44f523['view'],_0x2af6('0x18'),_0x2af6('0x58'),_0x2af6('0x34')),_0x6be0a5['on'](_0x2af6('0x5'),()=>{this[_0x2af6('0x4')][_0x2af6('0x5e')](),_0x439ba3[_0x2af6('0x4f')][_0x2af6('0x12')]!==_0x44f523[_0x2af6('0x4c')]?(this[_0x2af6('0x5a')](_0x44f523),_0x44f523[_0x2af6('0x4c')][_0x2af6('0x1a')][_0x2af6('0x28')](),this[_0x2af6('0x3f')](_0x44f523)):this[_0x2af6('0x3f')](null);});};for(const _0xf6d57e of _0x64fc4c)_0x593c73(_0xf6d57e);this[_0x2af6('0x49')](_0x64fc4c,_0x2af6('0x57'),(_0x19d488,_0x548482)=>{_0x593c73(_0x548482);}),this['listenTo'](_0x64fc4c,_0x2af6('0x5b'),(_0x5c07bc,_0x537a44,_0x4507b0)=>{this[_0x2af6('0x1e')][_0x2af6('0x1d')](_0x537a44)['destroy'](),this[_0x2af6('0x1e')][_0x2af6('0x0')](_0x537a44),_0xbbcc9[_0x2af6('0x4e')]({'removedAnnotation':_0x537a44,'previousAnnotation':_0x64fc4c[_0x2af6('0x1d')](_0x4507b0-0x1),'nextAnnotation':_0x64fc4c[_0x2af6('0x1d')](_0x4507b0+0x1)}),_0x537a44===this['activeAnnotation']&&this[_0x2af6('0x3f')](null);},{'priority':_0x2af6('0x13')}),this['listenTo'](_0x64fc4c,_0x2af6('0x28'),(_0x2a2c64,_0x207f12)=>{this[_0x2af6('0x3f')](_0x207f12);}),this[_0x2af6('0x49')](_0x64fc4c,_0x2af6('0xf'),()=>{this[_0x2af6('0x3f')](null);}),this['_domEmitter'][_0x2af6('0x49')](document,_0x2af6('0x4b'),(_0x465c96,_0x216f3e)=>{_0x216f3e[_0x2af6('0x9')]===_0x2dca77[_0x2af6('0x3c')]&&_0x439ba3['isVisible']&&(this[_0x2af6('0x4')][_0x2af6('0x57')](_0x439ba3[_0x2af6('0x4f')][_0x2af6('0x12')]),this[_0x2af6('0x47')](),_0x216f3e[_0x2af6('0x42')](),_0x216f3e['preventDefault']());}),this[_0x2af6('0x54')][_0x2af6('0x49')](document,_0x2af6('0x25'),(_0x407bae,_0x38505b)=>{const _0x5835f4=_0x38505b[_0x2af6('0x1c')];_0x439ba3[_0x2af6('0x14')]&&_0x439ba3['element'][_0x2af6('0xc')](_0x5835f4)||_0xbbcc9['view']['element'][_0x2af6('0xc')](_0x5835f4)||_0x407bae[_0x2af6('0x3a')]||(this[_0x2af6('0x4')][_0x2af6('0x5e')](),this[_0x2af6('0x47')](),this[_0x2af6('0x3f')](null));});const _0x35fd24=this['context']instanceof _0x5e950c?this['context'][_0x2af6('0x29')]:new _0x3342ee([this[_0x2af6('0x3b')]]);for(const _0x3ec005 of _0x35fd24)this[_0x2af6('0x48')](_0x3ec005);this[_0x2af6('0x49')](_0x35fd24,_0x2af6('0x57'),(_0x28a075,_0x50f6d6)=>{this[_0x2af6('0x49')](_0x50f6d6,_0x2af6('0x55'),()=>{this['_integrateWithEditorAnnotations'](_0x50f6d6);});}),this['listenTo'](_0x35fd24,'remove',(_0x2a9cb7,_0x3ead03)=>{_0x3ead03['plugins'][_0x2af6('0x43')](_0x2af6('0x1f'))&&this[_0x2af6('0x22')](_0x3ead03['plugins']['get'](_0x2af6('0x1f')));}),window[_0x2af6('0x6')]('resize',this[_0x2af6('0x30')]),this[_0x2af6('0x36')]();}[_0x2af6('0x3f')](_0x1b7bf3){if(_0x1b7bf3===this[_0x2af6('0x20')])return;const _0x2d421d=this[_0x2af6('0x3b')][_0x2af6('0x37')][_0x2af6('0x1d')](_0x50b4bf);if(_0x2d421d[_0x2af6('0x59')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1b7bf3,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1b7bf3)_0x2d421d['getSidebarItemView'](_0x1b7bf3)?this['_showBalloon'](_0x1b7bf3):this[_0x2af6('0x47')]();else this['_hideBalloon']();this[_0x2af6('0x20')]=_0x1b7bf3;}['detach'](){if(!this[_0x2af6('0x5d')])throw new _0x1b69fc('narrowsidebar-detach-not-attached',this);this[_0x2af6('0x3f')](null);const _0x439919=this[_0x2af6('0x3b')][_0x2af6('0x37')][_0x2af6('0x1d')](_0x50b4bf);this[_0x2af6('0x47')](),Array[_0x2af6('0x51')](this['_annotationToNarrowView'][_0x2af6('0x60')](),_0x9aee6f=>_0x9aee6f[_0x2af6('0x44')]()),this[_0x2af6('0x1e')][_0x2af6('0x5e')](),_0x439919[_0x2af6('0x56')](this[_0x2af6('0x50')]),this['stopListening'](),this['_domEmitter'][_0x2af6('0x2')](),this[_0x2af6('0x3b')]instanceof _0x5e950c&&this['stopListening'](this['context'][_0x2af6('0x29')]);for(const _0x294e5b of Array[_0x2af6('0x51')](this[_0x2af6('0x45')]))this[_0x2af6('0x22')](_0x294e5b);window[_0x2af6('0x40')](_0x2af6('0x3e'),this[_0x2af6('0x30')]),this[_0x2af6('0x30')][_0x2af6('0x41')](),this[_0x2af6('0x33')]=[],this[_0x2af6('0x5d')]=!0x1,this[_0x2af6('0x50')]=null;}[_0x2af6('0x44')](){this['isAttached']&&this[_0x2af6('0x16')](),this[_0x2af6('0x23')][_0x2af6('0x38')]();}['_integrateWithEditorAnnotations'](_0x4195fd){const _0x4c3fb9=_0x4195fd[_0x2af6('0x37')][_0x2af6('0x1d')](_0x2ce106),_0x445da8=this[_0x2af6('0x3b')][_0x2af6('0x37')]['get'](_0x50b4bf),_0x1b32b5=this[_0x2af6('0x50')],_0x3f0421=this['balloonPanelView'],_0x587368=()=>{const _0x159807=_0x4c3fb9[_0x2af6('0x4a')]({'annotations':this[_0x2af6('0x50')],'activeAnnotation':this['activeAnnotation']});this[_0x2af6('0xe')](_0x159807),this[_0x2af6('0x3f')](_0x159807[0x0]||null);};this[_0x2af6('0x49')](_0x4c3fb9,'refresh',_0x587368),this[_0x2af6('0x49')](_0x4c3fb9,_0x2af6('0xf'),(_0x4c59a0,{isAnnotationTracked:_0x47dc52})=>{this['activeAnnotation']&&_0x47dc52(this['activeAnnotation'])&&(this[_0x2af6('0xe')]([]),this[_0x2af6('0x3f')](null));}),this['listenTo'](_0x4c3fb9,'uiUpdate',()=>{this[_0x2af6('0x30')]();}),this[_0x2af6('0x49')](_0x1b32b5,_0x2af6('0xf'),_0x1f9cce=>{_0x4c3fb9[_0x2af6('0x1')]()&&_0x1f9cce[_0x2af6('0x35')]();},{'priority':_0x2af6('0x24')}),this[_0x2af6('0x49')](this[_0x2af6('0x54')],_0x2af6('0x25'),(_0x163cc5,_0x31781f)=>{const _0x1260f9=_0x31781f[_0x2af6('0x1c')];_0x3f0421[_0x2af6('0x14')]&&_0x3f0421['element'][_0x2af6('0xc')](_0x1260f9)||_0x445da8[_0x2af6('0x4c')]['element'][_0x2af6('0xc')](_0x1260f9)||this[_0x2af6('0x20')]&&_0x4c3fb9[_0x2af6('0x1')]()&&(_0x587368(),_0x163cc5['preventClosingBalloon']=!0x0);},{'priority':_0x2af6('0x24')}),this['_editorAnnotations'][_0x2af6('0x57')](_0x4c3fb9);}[_0x2af6('0x22')](_0x759842){_0x759842&&(this[_0x2af6('0x2')](_0x759842),this[_0x2af6('0x45')]['remove'](_0x759842));}[_0x2af6('0xe')](_0xc87d7){for(const _0x327b05 of this[_0x2af6('0x33')])_0xc87d7['includes'](_0x327b05)||this[_0x2af6('0x4')][_0x2af6('0x0')](_0x327b05[_0x2af6('0x4c')]);this[_0x2af6('0x33')]=_0xc87d7;}[_0x2af6('0x36')](){const _0x34b05b=this['balloonPanelView'];this[_0x2af6('0x50')][_0x2af6('0x52')](),_0x34b05b[_0x2af6('0x14')]&&this['_updateBalloonPosition']();}[_0x2af6('0x5a')](_0x346936){if(this[_0x2af6('0x4')][_0x2af6('0x43')](_0x346936['view']))return;const _0x1c165a=this[_0x2af6('0x4d')][_0x2af6('0x4f')][_0x2af6('0x12')];_0x1c165a!==_0x346936[_0x2af6('0x4c')]?(_0x1c165a&&this[_0x2af6('0x2f')](_0x1c165a),this[_0x2af6('0x32')](_0x346936[_0x2af6('0x4c')]),this[_0x2af6('0x4d')][_0x2af6('0x4f')][_0x2af6('0x5e')](),this[_0x2af6('0x4d')][_0x2af6('0x4f')][_0x2af6('0x57')](_0x346936['view']),this[_0x2af6('0x2b')]()):this['_updateBalloonPosition']();}[_0x2af6('0x2b')](){const _0x3c1b6e=this['balloonPanelView'][_0x2af6('0x4f')][_0x2af6('0x12')],_0x483869=_0x3c1b6e&&this[_0x2af6('0x50')][_0x2af6('0x46')](_0x3c1b6e);if(!_0x483869||!this[_0x2af6('0x1e')][_0x2af6('0x43')](_0x483869))return;const _0x32078a=this[_0x2af6('0x1e')]['get'](_0x483869)['element'],_0x4fb68b=function(){const _0x1467f2=_0x29e017[_0x2af6('0x17')];return[_0x1467f2[_0x2af6('0x15')],_0x1467f2[_0x2af6('0x3')],_0x1467f2[_0x2af6('0x11')],_0x1467f2[_0x2af6('0x19')],_0x1467f2[_0x2af6('0x53')],_0x1467f2[_0x2af6('0xa')]];}();this[_0x2af6('0x4d')][_0x2af6('0x3d')]({'target':_0x32078a,'positions':_0x4fb68b});}[_0x2af6('0x47')](){const _0xebcd79=this[_0x2af6('0x4d')],_0x3df7a6=_0xebcd79['content'][_0x2af6('0x12')];_0x3df7a6&&(this[_0x2af6('0x2f')](_0x3df7a6),_0xebcd79[_0x2af6('0xd')](),_0xebcd79[_0x2af6('0x4f')][_0x2af6('0x5e')]());}['_attachListeners'](_0x5d46d4){this['listenTo'](_0x5d46d4,'change:height',()=>this[_0x2af6('0x2b')]()),this['listenTo'](_0x5d46d4,_0x2af6('0x7'),(_0x36cf51,_0x1d5670)=>{this['_manuallyClosedAnnotationViews'][_0x2af6('0x57')](_0x5d46d4),this[_0x2af6('0x47')](),_0x1d5670();});}[_0x2af6('0x2f')](_0x550dd7){this['stopListening'](_0x550dd7);}}
23
+ const _0x7adf=['_detachFromContainer','southArrowNorth','northArrowSouth','ready','removeEventListener','detach','narrowsidebar-detach-not-attached','length','_updateBalloonPosition','stopListening','focusableElements','annotationType','contains','content','blur','attach','_manuallyClosedAnnotationViews','remove','_showBalloon','type','mousedown','delete','add','_attachListeners','_setSelectedAnnotations','high','EditorAnnotations','from','isAttached','set','northArrowSouthEast','isDirty','get','context','resize','_attachToContainer','_refreshPositioningDebounced','_annotationToNarrowView','editors','getOrderedSelectedAnnotations','keyCode','cancel','isVisible','target','init','getByView','northArrowSouthWest','register','_refreshPositioning','narrowsidebar-attach-already-attached','_editorAnnotations','bind','plugins','refresh','focus','locale','change:container','execute','_destroyEditorAnnotationsIntegration','annotations','defaultPositions','has','addAnnotation','activeAnnotation','listenTo','getSidebarItemView','keydown','first','Esc','preventDefault','preventClosingBalloon','element','low','setActiveAnnotation','balloonPanelView','narrowSidebar','ck-sidebar--narrow','_integrateWithEditorAnnotations','_selectedAnnotations','number','change:height','_domEmitter','view','southArrowNorthEast','set:container','destroy','bodyCollection','stopPropagation','_hideBalloon','_detachListeners','values','pin','_annotations','find','hasDomSelection'];(function(_0x379305,_0x7adf6a){const _0x9de2b9=function(_0x2f5d93){while(--_0x2f5d93){_0x379305['push'](_0x379305['shift']());}};_0x9de2b9(++_0x7adf6a);}(_0x7adf,0x14d));const _0x9de2=function(_0x379305,_0x7adf6a){_0x379305=_0x379305-0x0;let _0x9de2b9=_0x7adf[_0x379305];return _0x9de2b9;};import{ContextPlugin as _0x3fc041,Context as _0x1ffb9e}from'ckeditor5/src/core.js';import _0x1f5aa4 from'./annotationsuis.js';import _0x3c0dc3 from'./sidebar.js';import _0x42c2a9 from'./view/annotationcounterbuttonview.js';import{BalloonPanelView as _0x413905,BodyCollection as _0x2b3093}from'ckeditor5/src/ui.js';import{CKEditorError as _0xb1407,DomEmitterMixin as _0x4cadf5,keyCodes as _0x16f04b,Collection as _0x4f82ae}from'ckeditor5/src/utils.js';import'../../theme/sidebar-narrow.css';import{debounce as _0x17dd3f}from'lodash-es';import _0x314388 from'./editorannotations.js';export default class i extends _0x3fc041{static get['requires'](){return[_0x3c0dc3,_0x1f5aa4];}static get['pluginName'](){return'NarrowSidebar';}constructor(_0x531251){super(_0x531251),this[_0x9de2('0x4b')]=!0x1,this[_0x9de2('0x3f')]=new Set(),this[_0x9de2('0x21')]=Object['create'](_0x4cadf5),this[_0x9de2('0x54')]=new Map(),this[_0x9de2('0x4c')](_0x9de2('0xf'),null),this[_0x9de2('0xb')]=null,this[_0x9de2('0x1e')]=[],this[_0x9de2('0x2')]=new _0x4f82ae(),this['_refreshPositioningDebounced']=_0x17dd3f(()=>{this[_0x9de2('0x0')]();},0xfa,{'leading':!0x1});}[_0x9de2('0x5b')](){this[_0x9de2('0x50')][_0x9de2('0x4')][_0x9de2('0x4f')](_0x1f5aa4)[_0x9de2('0x5e')](_0x9de2('0x1b'),this),this['bodyCollection']=new _0x2b3093(this[_0x9de2('0x50')][_0x9de2('0x7')]),this[_0x9de2('0x1a')]=new _0x413905(this[_0x9de2('0x50')][_0x9de2('0x7')]),this[_0x9de2('0x26')]['attachToDom'](),this['bodyCollection'][_0x9de2('0x45')](this[_0x9de2('0x1a')]);}[_0x9de2('0x3e')](_0x1ea26a){this['annotations']=_0x1ea26a;const _0x295f26=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3),_0x2e9e48=this[_0x9de2('0x1a')];if(_0x295f26[_0x9de2('0x2c')]=_0x1ea26a,this[_0x9de2('0x4b')])throw new _0xb1407(_0x9de2('0x1'),this);this[_0x9de2('0x4b')]=!0x0,this[_0x9de2('0x10')](_0x295f26,_0x9de2('0x24'),()=>{this[_0x9de2('0x34')](),this[_0x9de2('0x10')](_0x295f26,_0x9de2('0x8'),_0x1a7ada=>{_0x1a7ada['off'](),this[_0x9de2('0x3e')](_0x1ea26a);});}),_0x295f26[_0x9de2('0x52')]({'viewClass':_0x9de2('0x1c'),'spaceBetweenItems':0x5});const _0x5826c0=_0x2ec63e=>{const _0x4266f0=new _0x42c2a9(this['context'][_0x9de2('0x7')]);_0x295f26[_0x9de2('0xe')](_0x2ec63e,_0x4266f0),this[_0x9de2('0x54')][_0x9de2('0x4c')](_0x2ec63e,_0x4266f0),_0x4266f0[_0x9de2('0x3')]('isDirty',_0x9de2('0x3a'),_0x9de2('0x1f'))['to'](_0x2ec63e[_0x9de2('0x22')],_0x9de2('0x4e'),_0x9de2('0x42'),_0x9de2('0x36')),_0x4266f0['on'](_0x9de2('0x9'),()=>{this[_0x9de2('0x3f')]['clear'](),_0x2e9e48['content'][_0x9de2('0x13')]!==_0x2ec63e[_0x9de2('0x22')]?(this[_0x9de2('0x41')](_0x2ec63e),_0x2ec63e['view'][_0x9de2('0x17')]['focus'](),this[_0x9de2('0x19')](_0x2ec63e)):this[_0x9de2('0x19')](null);});};for(const _0x5cc5c9 of _0x1ea26a)_0x5826c0(_0x5cc5c9);this[_0x9de2('0x10')](_0x1ea26a,_0x9de2('0x45'),(_0x4943cd,_0x585878)=>{_0x5826c0(_0x585878);}),this[_0x9de2('0x10')](_0x1ea26a,'remove',(_0x2523d2,_0x18ef2f,_0x273a2e)=>{this['_annotationToNarrowView'][_0x9de2('0x4f')](_0x18ef2f)['destroy'](),this[_0x9de2('0x54')][_0x9de2('0x44')](_0x18ef2f),_0x295f26['rearrange']({'removedAnnotation':_0x18ef2f,'previousAnnotation':_0x1ea26a[_0x9de2('0x4f')](_0x273a2e-0x1),'nextAnnotation':_0x1ea26a[_0x9de2('0x4f')](_0x273a2e+0x1)}),_0x18ef2f===this[_0x9de2('0xf')]&&this[_0x9de2('0x19')](null);},{'priority':_0x9de2('0x18')}),this['listenTo'](_0x1ea26a,_0x9de2('0x6'),(_0x354d90,_0x13bb46)=>{this[_0x9de2('0x19')](_0x13bb46);}),this[_0x9de2('0x10')](_0x1ea26a,_0x9de2('0x3d'),()=>{this[_0x9de2('0x19')](null);}),this['_domEmitter'][_0x9de2('0x10')](document,_0x9de2('0x12'),(_0x577a8c,_0x5a96c8)=>{_0x5a96c8[_0x9de2('0x57')]===_0x16f04b['esc']&&_0x2e9e48['isVisible']&&(this[_0x9de2('0x3f')]['add'](_0x2e9e48[_0x9de2('0x3c')][_0x9de2('0x13')]),this[_0x9de2('0x28')](),_0x5a96c8[_0x9de2('0x27')](),_0x5a96c8[_0x9de2('0x15')]());}),this[_0x9de2('0x21')]['listenTo'](document,_0x9de2('0x43'),(_0x2f5b41,_0x1b61aa)=>{const _0xefb7f2=_0x1b61aa[_0x9de2('0x5a')];_0x2e9e48[_0x9de2('0x59')]&&_0x2e9e48[_0x9de2('0x17')][_0x9de2('0x3b')](_0xefb7f2)||_0x295f26[_0x9de2('0x22')][_0x9de2('0x17')][_0x9de2('0x3b')](_0xefb7f2)||_0x2f5b41['preventClosingBalloon']||this[_0x9de2('0xf')]&&this[_0x9de2('0xf')][_0x9de2('0x39')][_0x9de2('0x2d')](_0x1c59a7=>_0x1c59a7[_0x9de2('0x3b')](_0xefb7f2))||(this['_manuallyClosedAnnotationViews']['clear'](),this[_0x9de2('0x28')](),this[_0x9de2('0x19')](null));});const _0x497e26=this['context']instanceof _0x1ffb9e?this[_0x9de2('0x50')][_0x9de2('0x55')]:new _0x4f82ae([this['context']]);for(const _0x584bd2 of _0x497e26)this['_integrateWithEditorAnnotations'](_0x584bd2);this[_0x9de2('0x10')](_0x497e26,_0x9de2('0x45'),(_0x1f9e68,_0x4a81ca)=>{this[_0x9de2('0x10')](_0x4a81ca,_0x9de2('0x32'),()=>{this[_0x9de2('0x1d')](_0x4a81ca);});}),this[_0x9de2('0x10')](_0x497e26,_0x9de2('0x40'),(_0x376aca,_0x38a3ae)=>{_0x38a3ae['plugins'][_0x9de2('0xd')](_0x9de2('0x49'))&&this['_destroyEditorAnnotationsIntegration'](_0x38a3ae[_0x9de2('0x4')][_0x9de2('0x4f')](_0x9de2('0x49')));}),window['addEventListener'](_0x9de2('0x51'),this[_0x9de2('0x53')]),this[_0x9de2('0x0')]();}['setActiveAnnotation'](_0x22ca18){if(_0x22ca18===this[_0x9de2('0xf')])return;const _0x49e114=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3);if(_0x49e114[_0x9de2('0x5')]({'blurredAnnotation':this[_0x9de2('0xf')],'activatedAnnotation':_0x22ca18,'disableAnimationOnActivatedAnnotation':!0x0}),_0x22ca18)_0x49e114[_0x9de2('0x11')](_0x22ca18)?this[_0x9de2('0x41')](_0x22ca18):this[_0x9de2('0x28')]();else this[_0x9de2('0x28')]();this[_0x9de2('0xf')]=_0x22ca18;}[_0x9de2('0x34')](){if(!this[_0x9de2('0x4b')])throw new _0xb1407(_0x9de2('0x35'),this);this[_0x9de2('0x19')](null);const _0x23df14=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3);this[_0x9de2('0x28')](),Array[_0x9de2('0x4a')](this[_0x9de2('0x54')][_0x9de2('0x2a')](),_0x27a5f0=>_0x27a5f0[_0x9de2('0x25')]()),this[_0x9de2('0x54')]['clear'](),_0x23df14[_0x9de2('0x2f')](this[_0x9de2('0xb')]),this[_0x9de2('0x38')](),this[_0x9de2('0x21')][_0x9de2('0x38')](),this[_0x9de2('0x50')]instanceof _0x1ffb9e&&this[_0x9de2('0x38')](this[_0x9de2('0x50')][_0x9de2('0x55')]);for(const _0x57ea8a of Array[_0x9de2('0x4a')](this[_0x9de2('0x2')]))this[_0x9de2('0xa')](_0x57ea8a);window[_0x9de2('0x33')](_0x9de2('0x51'),this[_0x9de2('0x53')]),this[_0x9de2('0x53')][_0x9de2('0x58')](),this[_0x9de2('0x1e')]=[],this['isAttached']=!0x1,this[_0x9de2('0xb')]=null;}[_0x9de2('0x25')](){this[_0x9de2('0x4b')]&&this[_0x9de2('0x34')](),this[_0x9de2('0x26')]['detachFromDom']();}[_0x9de2('0x1d')](_0x4fd4c6){const _0xbb04ca=_0x4fd4c6[_0x9de2('0x4')][_0x9de2('0x4f')](_0x314388),_0x666bb4=this[_0x9de2('0x50')]['plugins'][_0x9de2('0x4f')](_0x3c0dc3),_0x330a5b=this['annotations'],_0x2e8471=this[_0x9de2('0x1a')],_0x2c6ef9=()=>{const _0x4f361c=_0xbb04ca[_0x9de2('0x56')]({'annotations':this[_0x9de2('0xb')],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4f361c),this['setActiveAnnotation'](_0x4f361c[0x0]||null);};this[_0x9de2('0x10')](_0xbb04ca,'refresh',_0x2c6ef9),this['listenTo'](_0xbb04ca,_0x9de2('0x3d'),(_0x501b3d,{isAnnotationTracked:_0x1348b9})=>{this['activeAnnotation']&&_0x1348b9(this[_0x9de2('0xf')])&&(this['_setSelectedAnnotations']([]),this[_0x9de2('0x19')](null));}),this['listenTo'](_0xbb04ca,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x9de2('0x10')](_0x330a5b,'blur',_0x45bd9d=>{_0xbb04ca['hasDomSelection']()&&_0x45bd9d['stop']();},{'priority':_0x9de2('0x48')}),this[_0x9de2('0x10')](this['_domEmitter'],_0x9de2('0x43'),(_0x5e575e,_0x1f73ed)=>{const _0xc7437b=_0x1f73ed[_0x9de2('0x5a')];_0x2e8471[_0x9de2('0x59')]&&_0x2e8471[_0x9de2('0x17')][_0x9de2('0x3b')](_0xc7437b)||_0x666bb4[_0x9de2('0x22')][_0x9de2('0x17')][_0x9de2('0x3b')](_0xc7437b)||this[_0x9de2('0xf')]&&_0xbb04ca[_0x9de2('0x2e')]()&&(_0x2c6ef9(),_0x5e575e[_0x9de2('0x16')]=!0x0);},{'priority':_0x9de2('0x48')}),this[_0x9de2('0x2')]['add'](_0xbb04ca);}[_0x9de2('0xa')](_0x286c88){_0x286c88&&(this[_0x9de2('0x38')](_0x286c88),this[_0x9de2('0x2')][_0x9de2('0x40')](_0x286c88));}[_0x9de2('0x47')](_0x44c7fe){for(const _0x41c825 of this['_selectedAnnotations'])_0x44c7fe['includes'](_0x41c825)||this[_0x9de2('0x3f')]['delete'](_0x41c825[_0x9de2('0x22')]);this[_0x9de2('0x1e')]=_0x44c7fe;}[_0x9de2('0x0')](){const _0x3fb89f=this[_0x9de2('0x1a')];this['annotations']['refreshPositioning'](),_0x3fb89f[_0x9de2('0x59')]&&this['_updateBalloonPosition']();}[_0x9de2('0x41')](_0x51d801){if(this[_0x9de2('0x3f')]['has'](_0x51d801[_0x9de2('0x22')]))return;const _0x5c0c7e=this[_0x9de2('0x1a')][_0x9de2('0x3c')][_0x9de2('0x13')];_0x5c0c7e!==_0x51d801[_0x9de2('0x22')]?(_0x5c0c7e&&this[_0x9de2('0x29')](_0x5c0c7e),this['_attachListeners'](_0x51d801[_0x9de2('0x22')]),this[_0x9de2('0x1a')][_0x9de2('0x3c')]['clear'](),this['balloonPanelView']['content']['add'](_0x51d801['view']),this['_updateBalloonPosition']()):this[_0x9de2('0x37')]();}['_updateBalloonPosition'](){const _0x3ff643=this[_0x9de2('0x1a')][_0x9de2('0x3c')][_0x9de2('0x13')],_0x59e4cf=_0x3ff643&&this[_0x9de2('0xb')][_0x9de2('0x5c')](_0x3ff643);if(!_0x59e4cf||!this[_0x9de2('0x54')][_0x9de2('0xd')](_0x59e4cf))return;const _0x345bbe=this[_0x9de2('0x54')][_0x9de2('0x4f')](_0x59e4cf)[_0x9de2('0x17')],_0x111aac=function(){const _0x5017e7=_0x413905[_0x9de2('0xc')];return[_0x5017e7[_0x9de2('0x23')],_0x5017e7[_0x9de2('0x4d')],_0x5017e7[_0x9de2('0x30')],_0x5017e7[_0x9de2('0x31')],_0x5017e7['southArrowNorthWest'],_0x5017e7[_0x9de2('0x5d')]];}();this['balloonPanelView'][_0x9de2('0x2b')]({'target':_0x345bbe,'positions':_0x111aac});}[_0x9de2('0x28')](){const _0x379dcd=this[_0x9de2('0x1a')],_0x563520=_0x379dcd[_0x9de2('0x3c')][_0x9de2('0x13')];_0x563520&&(this[_0x9de2('0x29')](_0x563520),_0x379dcd['unpin'](),_0x379dcd[_0x9de2('0x3c')]['clear']());}[_0x9de2('0x46')](_0xc109d7){this['listenTo'](_0xc109d7,_0x9de2('0x20'),()=>this[_0x9de2('0x37')]()),this[_0x9de2('0x10')](_0xc109d7,_0x9de2('0x14'),(_0x11c58f,_0x326900)=>{this[_0x9de2('0x3f')]['add'](_0xc109d7),this[_0x9de2('0x28')](),_0x326900();});}[_0x9de2('0x29')](_0x5058db){this[_0x9de2('0x38')](_0x5058db);}}