@ckeditor/ckeditor5-track-changes 39.0.2 → 40.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 (136) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/build/track-changes.js +1 -1
  4. package/package.json +3 -3
  5. package/src/augmentation.d.ts +40 -40
  6. package/src/commands/acceptsuggestioncommand.d.ts +24 -24
  7. package/src/commands/acceptsuggestioncommand.js +1 -1
  8. package/src/commands/discardsuggestioncommand.d.ts +24 -24
  9. package/src/commands/discardsuggestioncommand.js +1 -1
  10. package/src/commands/executeonallsuggestionscommand.d.ts +24 -24
  11. package/src/commands/executeonallsuggestionscommand.js +1 -1
  12. package/src/commands/executeonselectedsuggestionscommand.d.ts +24 -24
  13. package/src/commands/executeonselectedsuggestionscommand.js +1 -1
  14. package/src/commands/trackchangescommand.d.ts +26 -26
  15. package/src/commands/trackchangescommand.js +1 -1
  16. package/src/index.d.ts +16 -16
  17. package/src/integrations/aiassistant.d.ts +17 -0
  18. package/src/integrations/aiassistant.js +23 -0
  19. package/src/integrations/alignment.d.ts +17 -17
  20. package/src/integrations/alignment.js +1 -1
  21. package/src/integrations/basicstyles.d.ts +17 -17
  22. package/src/integrations/basicstyles.js +1 -1
  23. package/src/integrations/blockquote.d.ts +17 -17
  24. package/src/integrations/blockquote.js +1 -1
  25. package/src/integrations/ckbox.d.ts +17 -17
  26. package/src/integrations/ckbox.js +1 -1
  27. package/src/integrations/codeblock.d.ts +17 -17
  28. package/src/integrations/codeblock.js +1 -1
  29. package/src/integrations/comments.d.ts +14 -14
  30. package/src/integrations/comments.js +1 -1
  31. package/src/integrations/deletecommand.d.ts +17 -17
  32. package/src/integrations/deletecommand.js +1 -1
  33. package/src/integrations/documentlist.d.ts +17 -17
  34. package/src/integrations/documentlist.js +1 -1
  35. package/src/integrations/documentlistproperties.d.ts +29 -29
  36. package/src/integrations/documentlistproperties.js +1 -1
  37. package/src/integrations/entercommand.d.ts +16 -16
  38. package/src/integrations/entercommand.js +1 -1
  39. package/src/integrations/findandreplace.d.ts +21 -21
  40. package/src/integrations/findandreplace.js +1 -1
  41. package/src/integrations/font.d.ts +17 -17
  42. package/src/integrations/font.js +1 -1
  43. package/src/integrations/formatpainter.d.ts +17 -17
  44. package/src/integrations/formatpainter.js +1 -1
  45. package/src/integrations/heading.d.ts +17 -17
  46. package/src/integrations/heading.js +1 -1
  47. package/src/integrations/highlight.d.ts +17 -17
  48. package/src/integrations/highlight.js +1 -1
  49. package/src/integrations/horizontalline.d.ts +17 -17
  50. package/src/integrations/horizontalline.js +1 -1
  51. package/src/integrations/htmlembed.d.ts +17 -17
  52. package/src/integrations/htmlembed.js +1 -1
  53. package/src/integrations/image.d.ts +17 -17
  54. package/src/integrations/image.js +1 -1
  55. package/src/integrations/imagereplace.d.ts +23 -23
  56. package/src/integrations/imagereplace.js +1 -1
  57. package/src/integrations/importword.d.ts +18 -18
  58. package/src/integrations/importword.js +1 -1
  59. package/src/integrations/indent.d.ts +17 -17
  60. package/src/integrations/indent.js +1 -1
  61. package/src/integrations/inputcommand.d.ts +16 -16
  62. package/src/integrations/inputcommand.js +1 -1
  63. package/src/integrations/link.d.ts +17 -17
  64. package/src/integrations/link.js +1 -1
  65. package/src/integrations/list.d.ts +17 -17
  66. package/src/integrations/list.js +1 -1
  67. package/src/integrations/listproperties.d.ts +29 -29
  68. package/src/integrations/listproperties.js +1 -1
  69. package/src/integrations/mediaembed.d.ts +17 -17
  70. package/src/integrations/mediaembed.js +1 -1
  71. package/src/integrations/mention.d.ts +17 -17
  72. package/src/integrations/mention.js +1 -1
  73. package/src/integrations/pagebreak.d.ts +17 -17
  74. package/src/integrations/pagebreak.js +1 -1
  75. package/src/integrations/paragraph.d.ts +17 -17
  76. package/src/integrations/paragraph.js +1 -1
  77. package/src/integrations/removeformat.d.ts +17 -17
  78. package/src/integrations/removeformat.js +1 -1
  79. package/src/integrations/restrictededitingmode.d.ts +17 -17
  80. package/src/integrations/restrictededitingmode.js +1 -1
  81. package/src/integrations/shiftentercommand.d.ts +16 -16
  82. package/src/integrations/shiftentercommand.js +1 -1
  83. package/src/integrations/standardeditingmode.d.ts +17 -17
  84. package/src/integrations/standardeditingmode.js +1 -1
  85. package/src/integrations/style.d.ts +18 -18
  86. package/src/integrations/style.js +1 -1
  87. package/src/integrations/table.d.ts +42 -42
  88. package/src/integrations/table.js +1 -1
  89. package/src/integrations/tablecaption.d.ts +22 -22
  90. package/src/integrations/tablecaption.js +1 -1
  91. package/src/integrations/tableclipboard.d.ts +19 -19
  92. package/src/integrations/tableclipboard.js +1 -1
  93. package/src/integrations/tablecolumnresize.d.ts +26 -26
  94. package/src/integrations/tablecolumnresize.js +1 -1
  95. package/src/integrations/tableheadings.d.ts +22 -22
  96. package/src/integrations/tableheadings.js +1 -1
  97. package/src/integrations/tablemergesplit.d.ts +22 -22
  98. package/src/integrations/tablemergesplit.js +1 -1
  99. package/src/integrations/tableofcontents.d.ts +17 -17
  100. package/src/integrations/tableofcontents.js +1 -1
  101. package/src/integrations/tableproperties.d.ts +27 -27
  102. package/src/integrations/tableproperties.js +1 -1
  103. package/src/integrations/template.d.ts +17 -17
  104. package/src/integrations/template.js +1 -1
  105. package/src/integrations/title.d.ts +17 -17
  106. package/src/integrations/title.js +1 -1
  107. package/src/integrations/undo.d.ts +17 -17
  108. package/src/integrations/undo.js +1 -1
  109. package/src/integrations/utils.d.ts +21 -21
  110. package/src/integrations/utils.js +1 -1
  111. package/src/suggestion.d.ts +276 -276
  112. package/src/suggestion.js +1 -1
  113. package/src/suggestiondescriptionfactory.d.ts +163 -163
  114. package/src/suggestiondescriptionfactory.js +1 -1
  115. package/src/trackchanges.d.ts +244 -244
  116. package/src/trackchanges.js +1 -1
  117. package/src/trackchangesconfig.d.ts +75 -75
  118. package/src/trackchangesdata.d.ts +41 -41
  119. package/src/trackchangesdata.js +1 -1
  120. package/src/trackchangesediting.d.ts +468 -467
  121. package/src/trackchangesediting.js +1 -1
  122. package/src/trackchangesui.d.ts +38 -38
  123. package/src/trackchangesui.js +1 -1
  124. package/src/ui/suggestioncontroller.d.ts +37 -37
  125. package/src/ui/suggestioncontroller.js +1 -1
  126. package/src/ui/view/basesuggestionthreadview.d.ts +170 -170
  127. package/src/ui/view/basesuggestionthreadview.js +1 -1
  128. package/src/ui/view/suggestionthreadview.d.ts +182 -182
  129. package/src/ui/view/suggestionthreadview.js +1 -1
  130. package/src/utils/common-translations.d.ts +9 -9
  131. package/src/utils/common-translations.js +1 -1
  132. package/src/utils/utils.d.ts +30 -30
  133. package/src/utils/utils.js +1 -1
  134. package/theme/icons/track-changes-accept.svg +1 -1
  135. package/theme/icons/track-changes-discard.svg +1 -1
  136. package/theme/icons/track-changes.svg +1 -1
@@ -1,163 +1,163 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- import { type Locale, type PriorityString } from 'ckeditor5/src/utils';
6
- import type { Schema, Element } from 'ckeditor5/src/engine';
7
- import type Suggestion from './suggestion';
8
- /**
9
- * Creates descriptions for suggestion chains.
10
- *
11
- * One or more suggestions that are next to each other create "suggestion chain". In such chain one suggestion may
12
- * impact other suggestion when it comes to the description of the whole chain. For example, insertion next to deletion
13
- * results in "Replaced" description.
14
- */
15
- export default class SuggestionDescriptionFactory {
16
- constructor(schema: Schema, locale: Locale);
17
- /**
18
- * Returns descriptions for given suggestion chain.
19
- *
20
- * The structure of the descriptions array is as follows (explained on an example):
21
- *
22
- * ```ts
23
- * [
24
- * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
25
- * { type: 'insertion', content: '*Insert:* image },
26
- * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
27
- * ]
28
- * ```
29
- *
30
- * In above example there are three description instances (or lines). Two new (empty) paragraphs were added,
31
- * an image was added and then "Foo" text was removed and "Bar" text was added. For example, above structure could be rendered as:
32
- *
33
- * ```html
34
- * <p><strong>Insert:</strong> 2 paragraphs</p>
35
- * <p><strong>Insert:</strong> image</p>
36
- * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
37
- * ```
38
- */
39
- getDescriptions(suggestions: Array<Suggestion>): Array<Description>;
40
- /**
41
- * Registers a callback function that returns a custom description for a suggestion.
42
- *
43
- * Registered callback is fired for a suggestion whenever there is a need to generate a description for that suggestion.
44
- *
45
- * The callback takes the suggestion instance as a parameter and should return
46
- * {@link module:track-changes/suggestiondescriptionfactory~Description description object} or a falsy value
47
- * if the suggestion was not handled by the callback.
48
- *
49
- * Example of a description callback for the bold style:
50
- *
51
- * ```ts
52
- * suggestionDescriptionFactory.registerDescriptionCallback( suggestion => {
53
- * const { data } = suggestion;
54
- *
55
- * // Omit suggestions that are not bold style suggestions.
56
- * if ( !data || data.commandName !== 'bold' ) {
57
- * return;
58
- * }
59
- *
60
- * const isSet = !!data.commandParams[ 0 ].forceValue;
61
- * const content = isSet ? '*Set format:* bold' : '*Remove format:* bold';
62
- *
63
- * return {
64
- * type: 'format',
65
- * content
66
- * };
67
- * } );
68
- * ```
69
- */
70
- registerDescriptionCallback(callback: DescriptionCallback): void;
71
- /**
72
- * For given `elementName` registers how this element will be labeled in a description (for example when it is added
73
- * or removed).
74
- *
75
- * Instead of a string name you may provide a matching function that takes item {@link module:engine/model/item~Item} as an input
76
- * and should return boolean value.
77
- *
78
- * Provided label callback takes one parameter, `quantity`, and is expected to return the label for the element as a string.
79
- *
80
- * A simple use case without using internationalization:
81
- *
82
- * ```ts
83
- * suggestionDescriptionFactory.registerElementLabel(
84
- * 'paragraph',
85
- * quantity => quantity == 1 ? 'paragraph' : quantity + ' paragraphs'
86
- * );
87
- * ```
88
- *
89
- * If you want your feature to be localized to other languages, use localization service:
90
- *
91
- * ```ts
92
- * const t = editor.locale.t; // Remember that you have to use function named `t`.
93
- *
94
- * suggestionDescriptionFactory.registerElementLabel(
95
- * 'paragraph',
96
- * quantity => t( { string: 'paragraph', plural: '%0 paragraphs', id: 'ELEMENT_PARAGRAPH' }, quantity )
97
- * );
98
- * ```
99
- */
100
- registerElementLabel(elementNameOrCallback: string | Function, labelCallback: LabelCallback, priority?: PriorityString): void;
101
- /**
102
- * Returns label registered for given element or the element name if there is no label registered for it.
103
- */
104
- getItemLabel(element: Element, quantity?: number): string;
105
- }
106
- /**
107
- * A description for the suggestion.
108
- *
109
- * ```ts
110
- * {
111
- * type: 'format',
112
- * label: '*Set format:* bold'
113
- * }
114
- * ```
115
- *
116
- * A description for the color-related suggestions like font color may specify the `color` property that will provide a better UX
117
- * by displaying a color box next to the suggestion.
118
- *
119
- * ```ts
120
- * {
121
- * type: 'format',
122
- * label: '*Set font color:*',
123
- * color: {
124
- * value: 'hsl( 60, 60%, 60% )',
125
- * title: 'yellow'
126
- * }
127
- * }
128
- * ```
129
- */
130
- export interface Description {
131
- type: 'insertion' | 'deletion' | 'replace' | 'format';
132
- /**
133
- * Description label. You may use `*` to bold part of the label.
134
- */
135
- content: string;
136
- /**
137
- * The optional `color` property used for color-related suggestions.
138
- * The object should provide the `value` (for displaying the color) and `title` (for describing the color) fields.
139
- */
140
- color?: {
141
- value: string;
142
- title: string;
143
- };
144
- }
145
- export type DescriptionCallback = (suggestion: Suggestion) => Description | DescriptionItem | undefined;
146
- export type LabelCallback = (quantity: number) => string;
147
- export interface LabelCallbackObject {
148
- matchingCallback: (element: Element) => boolean;
149
- label: LabelCallback;
150
- priority: PriorityString;
151
- }
152
- /**
153
- * An intermediate state which is easier to operate on when consecutive suggestion
154
- * ranges are traversed.
155
- */
156
- interface DescriptionItem {
157
- type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer';
158
- add?: string;
159
- remove?: string;
160
- element?: Element;
161
- quantity?: number;
162
- }
163
- export {};
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { type Locale, type PriorityString } from 'ckeditor5/src/utils';
6
+ import type { Schema, Element } from 'ckeditor5/src/engine';
7
+ import type Suggestion from './suggestion';
8
+ /**
9
+ * Creates descriptions for suggestion chains.
10
+ *
11
+ * One or more suggestions that are next to each other create "suggestion chain". In such chain one suggestion may
12
+ * impact other suggestion when it comes to the description of the whole chain. For example, insertion next to deletion
13
+ * results in "Replaced" description.
14
+ */
15
+ export default class SuggestionDescriptionFactory {
16
+ constructor(schema: Schema, locale: Locale);
17
+ /**
18
+ * Returns descriptions for given suggestion chain.
19
+ *
20
+ * The structure of the descriptions array is as follows (explained on an example):
21
+ *
22
+ * ```ts
23
+ * [
24
+ * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
25
+ * { type: 'insertion', content: '*Insert:* image },
26
+ * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
27
+ * ]
28
+ * ```
29
+ *
30
+ * In above example there are three description instances (or lines). Two new (empty) paragraphs were added,
31
+ * an image was added and then "Foo" text was removed and "Bar" text was added. For example, above structure could be rendered as:
32
+ *
33
+ * ```html
34
+ * <p><strong>Insert:</strong> 2 paragraphs</p>
35
+ * <p><strong>Insert:</strong> image</p>
36
+ * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
37
+ * ```
38
+ */
39
+ getDescriptions(suggestions: Array<Suggestion>): Array<Description>;
40
+ /**
41
+ * Registers a callback function that returns a custom description for a suggestion.
42
+ *
43
+ * Registered callback is fired for a suggestion whenever there is a need to generate a description for that suggestion.
44
+ *
45
+ * The callback takes the suggestion instance as a parameter and should return
46
+ * {@link module:track-changes/suggestiondescriptionfactory~Description description object} or a falsy value
47
+ * if the suggestion was not handled by the callback.
48
+ *
49
+ * Example of a description callback for the bold style:
50
+ *
51
+ * ```ts
52
+ * suggestionDescriptionFactory.registerDescriptionCallback( suggestion => {
53
+ * const { data } = suggestion;
54
+ *
55
+ * // Omit suggestions that are not bold style suggestions.
56
+ * if ( !data || data.commandName !== 'bold' ) {
57
+ * return;
58
+ * }
59
+ *
60
+ * const isSet = !!data.commandParams[ 0 ].forceValue;
61
+ * const content = isSet ? '*Set format:* bold' : '*Remove format:* bold';
62
+ *
63
+ * return {
64
+ * type: 'format',
65
+ * content
66
+ * };
67
+ * } );
68
+ * ```
69
+ */
70
+ registerDescriptionCallback(callback: DescriptionCallback): void;
71
+ /**
72
+ * For given `elementName` registers how this element will be labeled in a description (for example when it is added
73
+ * or removed).
74
+ *
75
+ * Instead of a string name you may provide a matching function that takes item {@link module:engine/model/item~Item} as an input
76
+ * and should return boolean value.
77
+ *
78
+ * Provided label callback takes one parameter, `quantity`, and is expected to return the label for the element as a string.
79
+ *
80
+ * A simple use case without using internationalization:
81
+ *
82
+ * ```ts
83
+ * suggestionDescriptionFactory.registerElementLabel(
84
+ * 'paragraph',
85
+ * quantity => quantity == 1 ? 'paragraph' : quantity + ' paragraphs'
86
+ * );
87
+ * ```
88
+ *
89
+ * If you want your feature to be localized to other languages, use localization service:
90
+ *
91
+ * ```ts
92
+ * const t = editor.locale.t; // Remember that you have to use function named `t`.
93
+ *
94
+ * suggestionDescriptionFactory.registerElementLabel(
95
+ * 'paragraph',
96
+ * quantity => t( { string: 'paragraph', plural: '%0 paragraphs', id: 'ELEMENT_PARAGRAPH' }, quantity )
97
+ * );
98
+ * ```
99
+ */
100
+ registerElementLabel(elementNameOrCallback: string | Function, labelCallback: LabelCallback, priority?: PriorityString): void;
101
+ /**
102
+ * Returns label registered for given element or the element name if there is no label registered for it.
103
+ */
104
+ getItemLabel(element: Element, quantity?: number): string;
105
+ }
106
+ /**
107
+ * A description for the suggestion.
108
+ *
109
+ * ```ts
110
+ * {
111
+ * type: 'format',
112
+ * label: '*Set format:* bold'
113
+ * }
114
+ * ```
115
+ *
116
+ * A description for the color-related suggestions like font color may specify the `color` property that will provide a better UX
117
+ * by displaying a color box next to the suggestion.
118
+ *
119
+ * ```ts
120
+ * {
121
+ * type: 'format',
122
+ * label: '*Set font color:*',
123
+ * color: {
124
+ * value: 'hsl( 60, 60%, 60% )',
125
+ * title: 'yellow'
126
+ * }
127
+ * }
128
+ * ```
129
+ */
130
+ export interface Description {
131
+ type: 'insertion' | 'deletion' | 'replace' | 'format';
132
+ /**
133
+ * Description label. You may use `*` to bold part of the label.
134
+ */
135
+ content: string;
136
+ /**
137
+ * The optional `color` property used for color-related suggestions.
138
+ * The object should provide the `value` (for displaying the color) and `title` (for describing the color) fields.
139
+ */
140
+ color?: {
141
+ value: string;
142
+ title: string;
143
+ };
144
+ }
145
+ export type DescriptionCallback = (suggestion: Suggestion) => Description | DescriptionItem | undefined;
146
+ export type LabelCallback = (quantity: number) => string;
147
+ export interface LabelCallbackObject {
148
+ matchingCallback: (element: Element) => boolean;
149
+ label: LabelCallback;
150
+ priority: PriorityString;
151
+ }
152
+ /**
153
+ * An intermediate state which is easier to operate on when consecutive suggestion
154
+ * ranges are traversed.
155
+ */
156
+ interface DescriptionItem {
157
+ type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer';
158
+ add?: string;
159
+ remove?: string;
160
+ element?: Element;
161
+ quantity?: number;
162
+ }
163
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3ba2=['previousSibling','registerDescriptionCallback','pop','quantity','Object','add','push','function','_resolveDescriptionItems','_itemLabelsCallbacks','$1\x20$2','text','getFirstRange','Container','*Merge:*\x20%0','replace','deletion','isEqual','addEmptyContainer','removeEmptyContainer','_schema','type','data','checkChild','name','remove','matchingCallback','_itemLabels','nextSibling','addContainer','isEmpty','elementEnd','_addDescriptionItems','insertion','isInContent','_customCallbacks','label','normal','getItemLabel','registerElementLabel','get','softBreak','isObject','elementStart','*Insert:*\x20%0','EmptyContainer','length','*Remove:*\x20%0','end','*Split:*\x20%0','start','ELEMENT_SPACE','match','indexOf','element','_locale'];(function(_0x3fcb39,_0x3ba227){const _0x322b00=function(_0x4a9913){while(--_0x4a9913){_0x3fcb39['push'](_0x3fcb39['shift']());}};_0x322b00(++_0x3ba227);}(_0x3ba2,0x170));const _0x322b=function(_0x3fcb39,_0x3ba227){_0x3fcb39=_0x3fcb39-0x0;let _0x322b00=_0x3ba2[_0x3fcb39];return _0x322b00;};import{getTranslation as _0x3b225d}from'./utils/common-translations';import{priorities as _0x51e3da,insertToPriorityArray as _0x50678a}from'ckeditor5/src/utils';export default class m{constructor(_0x4f182a,_0x47632d){this[_0x322b('0x3')]=[],this[_0x322b('0x33')]=new Map(),this['_itemLabelsCallbacks']=[],this[_0x322b('0x2c')]=_0x4f182a,this[_0x322b('0x17')]=_0x47632d;}['getDescriptions'](_0x36f7e1){const _0x4829e2=[];for(let _0x183e96=0x0;_0x183e96<_0x36f7e1[_0x322b('0xe')];_0x183e96++){const _0x31deb3=_0x36f7e1[_0x183e96];if(!_0x31deb3[_0x322b('0x2')])continue;let _0x1ded54=!0x1;for(const _0x83374a of this[_0x322b('0x3')]){const _0x57159c=_0x83374a(_0x31deb3);if(_0x57159c){_0x322b('0x2d')in _0x57159c&&_0x4829e2[_0x322b('0x1e')](_0x57159c),_0x1ded54=!0x0;break;}}if(!_0x1ded54){this[_0x322b('0x0')](_0x4829e2,_0x31deb3);const _0x5cdc17=_0x36f7e1[_0x183e96+0x1];if(_0x5cdc17&&!_0x31deb3[_0x322b('0x24')]()[_0x322b('0x10')][_0x322b('0x29')](_0x5cdc17[_0x322b('0x24')]()[_0x322b('0x12')])){const _0x465a8e=_0x4829e2[_0x4829e2['length']-0x1],_0x8d2766=_0x322b('0x1')==_0x31deb3['type']?_0x322b('0x1d'):'remove';_0x465a8e&&_0x322b('0x23')==_0x465a8e[_0x322b('0x2d')]&&(_0x465a8e[_0x8d2766]+='\x0a');}}}return this[_0x322b('0x20')](_0x4829e2);}[_0x322b('0x19')](_0x570019){this[_0x322b('0x3')][_0x322b('0x1e')](_0x570019);}[_0x322b('0x7')](_0x160fe,_0x51b9f5,_0x541b57=_0x51e3da[_0x322b('0x5')]){_0x322b('0x1f')==typeof _0x160fe?_0x50678a(this['_itemLabelsCallbacks'],{'matchingCallback':_0x160fe,'label':_0x51b9f5,'priority':_0x541b57}):this[_0x322b('0x33')]['set'](_0x160fe,_0x51b9f5);}[_0x322b('0x6')](_0x156505,_0x3ba74c=0x1){let _0x514952;for(const _0x792dc8 of this[_0x322b('0x21')])if(_0x792dc8[_0x322b('0x32')](_0x156505)){_0x514952=_0x792dc8[_0x322b('0x4')];break;}return _0x514952||(_0x514952=this[_0x322b('0x33')][_0x322b('0x8')](_0x156505['name'])),_0x514952?_0x514952(_0x3ba74c):0x1!==_0x3ba74c?_0x3ba74c+'\x20'+_0x156505['name']+'s':''+_0x156505[_0x322b('0x30')];}[_0x322b('0x0')](_0x56113c,_0x36b72a){const _0x3744f4=_0x36b72a['getFirstRange']()['getWalker'](),_0x59bc60=_0x322b('0x1')==_0x36b72a[_0x322b('0x2d')]?_0x322b('0x1d'):'remove';for(const _0x32362d of _0x3744f4){const _0x371263=_0x32362d['item'],_0x1233f5=_0x56113c[_0x56113c[_0x322b('0xe')]-0x1];if(_0x371263['is']('$textProxy'))_0x1233f5&&_0x1233f5[_0x322b('0x2d')][_0x322b('0x15')]('Container')>-0x1&&_0x56113c[_0x322b('0x1a')](),_0x1233f5&&_0x322b('0x23')==_0x1233f5[_0x322b('0x2d')]?_0x1233f5[_0x59bc60]+=_0x371263[_0x322b('0x2e')]:_0x56113c['push']({'type':_0x322b('0x23'),'add':_0x322b('0x1d')==_0x59bc60?_0x371263['data']:'','remove':_0x322b('0x31')==_0x59bc60?_0x371263['data']:''});else{if(this[_0x322b('0x2c')][_0x322b('0xa')](_0x371263)){const _0xb90fda=_0x371263;if(_0x1233f5&&_0x1233f5[_0x322b('0x2d')][_0x322b('0x15')](_0x322b('0x25'))>-0x1&&_0x56113c[_0x322b('0x1a')](),_0x322b('0x37')==_0x32362d[_0x322b('0x2d')])continue;_0x1233f5&&_0x1233f5[_0x322b('0x2d')]==_0x59bc60+'Object'&&_0x1233f5[_0x322b('0x16')]['name']==_0xb90fda[_0x322b('0x30')]?_0x1233f5[_0x322b('0x1b')]++:_0x56113c[_0x322b('0x1e')]({'type':_0x59bc60+_0x322b('0x1c'),'element':_0xb90fda,'quantity':0x1}),_0x3744f4['skip'](_0x2a6932=>!('elementEnd'==_0x2a6932['type']&&_0x2a6932['item']==_0x371263));}else{if(this['_schema'][_0x322b('0x2f')](_0x371263,'$text')||_0x371263['is'](_0x322b('0x16'),_0x322b('0x9'))){const _0xacd1f=_0x371263;if(_0x322b('0x1d')==_0x59bc60&&_0x322b('0xb')==_0x32362d[_0x322b('0x2d')]||_0x322b('0x31')==_0x59bc60&&_0x322b('0x37')==_0x32362d[_0x322b('0x2d')])continue;if(_0x1233f5&&-0x1==_0x1233f5[_0x322b('0x2d')][_0x322b('0x15')]('Container')){_0x322b('0x23')==_0x1233f5[_0x322b('0x2d')]&&(_0x1233f5[_0x59bc60]+='\x0a');continue;}let _0xadb7cc;if(_0xadb7cc=_0x322b('0x1d')==_0x59bc60?_0xacd1f['nextSibling']&&!this[_0x322b('0x2c')][_0x322b('0xa')](_0xacd1f[_0x322b('0x34')])?_0xacd1f['nextSibling']:null:_0xacd1f[_0x322b('0x18')]&&!this[_0x322b('0x2c')]['isObject'](_0xacd1f[_0x322b('0x18')])?_0xacd1f['previousSibling']:null,_0xacd1f[_0x322b('0x36')]||_0xadb7cc&&_0xadb7cc['isEmpty']){const _0x111759=_0xadb7cc&&_0xadb7cc[_0x322b('0x36')]?_0xadb7cc:_0xacd1f;_0x1233f5&&_0x1233f5[_0x322b('0x2d')]==_0x59bc60+_0x322b('0xd')&&_0x1233f5[_0x322b('0x16')][_0x322b('0x30')]==_0x111759[_0x322b('0x30')]?_0x1233f5[_0x322b('0x1b')]++:_0x56113c[_0x322b('0x1e')]({'type':_0x59bc60+_0x322b('0xd'),'element':_0x111759,'quantity':0x1});}else _0x56113c[_0x322b('0x1e')]({'type':_0x59bc60+'Container','element':_0xacd1f});}}}}}[_0x322b('0x20')](_0x4dea54){const _0x4e07e1=this[_0x322b('0x17')],_0x2d5b62=[];for(const _0x3bc475 of _0x4dea54){switch(_0x3bc475['type']){case _0x322b('0x23'):if(_0x3bc475[_0x322b('0x1d')]=_0x3bc475[_0x322b('0x1d')]['replace'](/(\S)\u000A+(\S)/g,_0x322b('0x22'))[_0x322b('0x27')](/\u000A/g,''),_0x3bc475[_0x322b('0x31')]=_0x3bc475[_0x322b('0x31')]['replace'](/(\S)\u000A+(\S)/g,_0x322b('0x22'))[_0x322b('0x27')](/\u000A/g,''),''!=_0x3bc475[_0x322b('0x1d')]&&''!=_0x3bc475[_0x322b('0x31')]){_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x27'),'content':_0x3b225d(_0x4e07e1,'REPLACE_TEXT',['\x22'+_0x3bc475[_0x322b('0x31')]+'\x22','\x22'+_0x3bc475[_0x322b('0x1d')]+'\x22'])});continue;}if(null!=_0x3bc475[_0x322b('0x1d')][_0x322b('0x14')](/^ +$/)){_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x1'),'content':_0x3b225d(_0x4e07e1,_0x322b('0xc'),_0x3b225d(_0x4e07e1,_0x322b('0x13'),_0x3bc475[_0x322b('0x1d')][_0x322b('0xe')]))});continue;}if(null!=_0x3bc475[_0x322b('0x31')][_0x322b('0x14')](/^ +$/)){_0x2d5b62[_0x322b('0x1e')]({'type':'deletion','content':_0x3b225d(_0x4e07e1,_0x322b('0xf'),_0x3b225d(_0x4e07e1,_0x322b('0x13'),_0x3bc475[_0x322b('0x31')]['length']))});continue;}if(''!=_0x3bc475[_0x322b('0x1d')]){_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x1'),'content':_0x3b225d(_0x4e07e1,_0x322b('0xc'),'\x22'+_0x3bc475['add']+'\x22')});continue;}_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x28'),'content':_0x3b225d(_0x4e07e1,_0x322b('0xf'),'\x22'+_0x3bc475[_0x322b('0x31')]+'\x22')});continue;case _0x322b('0x2a'):case'addObject':_0x2d5b62['push']({'type':_0x322b('0x1'),'content':_0x3b225d(_0x4e07e1,'*Insert:*\x20%0',this[_0x322b('0x6')](_0x3bc475[_0x322b('0x16')],_0x3bc475[_0x322b('0x1b')]))});continue;case _0x322b('0x2b'):case'removeObject':_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x28'),'content':_0x3b225d(_0x4e07e1,'*Remove:*\x20%0',this[_0x322b('0x6')](_0x3bc475['element'],_0x3bc475['quantity']))});continue;case _0x322b('0x35'):_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x1'),'content':_0x3b225d(_0x4e07e1,_0x322b('0x11'),this[_0x322b('0x6')](_0x3bc475[_0x322b('0x16')],_0x3bc475[_0x322b('0x1b')]))});continue;case'removeContainer':_0x2d5b62['push']({'type':'deletion','content':_0x3b225d(_0x4e07e1,_0x322b('0x26'),this[_0x322b('0x6')](_0x3bc475[_0x322b('0x16')],_0x3bc475[_0x322b('0x1b')]))});continue;}_0x2d5b62[_0x322b('0x1e')](_0x3bc475);}return _0x2d5b62;}}
23
+ const _0x52cf=['skip','isEmpty','push','REPLACE_TEXT','deletion','insertion','get','getWalker','$textProxy','_customCallbacks','getDescriptions','*Split:*\x20%0','_resolveDescriptionItems','replace','getItemLabel','*Merge:*\x20%0','data','getFirstRange','_itemLabels','isEqual','element','*Insert:*\x20%0','nextSibling','pop','function','match','_locale','length','EmptyContainer','*Remove:*\x20%0','isInContent','matchingCallback','registerElementLabel','_addDescriptionItems','$1\x20$2','ELEMENT_SPACE','label','Object','remove','_schema','indexOf','name','Container','addEmptyContainer','quantity','addObject','add','addContainer','item','removeContainer','isObject','_itemLabelsCallbacks','elementEnd','type','text'];(function(_0xbd38bd,_0x52cf7b){const _0x451aa5=function(_0xa212c7){while(--_0xa212c7){_0xbd38bd['push'](_0xbd38bd['shift']());}};_0x451aa5(++_0x52cf7b);}(_0x52cf,0x95));const _0x451a=function(_0xbd38bd,_0x52cf7b){_0xbd38bd=_0xbd38bd-0x0;let _0x451aa5=_0x52cf[_0xbd38bd];return _0x451aa5;};import{getTranslation as _0x5cc6c9}from'./utils/common-translations';import{priorities as _0x4d1b72,insertToPriorityArray as _0x420501}from'ckeditor5/src/utils';export default class m{constructor(_0x487cea,_0x1534c7){this[_0x451a('0x19')]=[],this[_0x451a('0x22')]=new Map(),this[_0x451a('0xc')]=[],this[_0x451a('0x0')]=_0x487cea,this[_0x451a('0x2a')]=_0x1534c7;}[_0x451a('0x1a')](_0x582db9){const _0x39f847=[];for(let _0x46decc=0x0;_0x46decc<_0x582db9[_0x451a('0x2b')];_0x46decc++){const _0x2837ce=_0x582db9[_0x46decc];if(!_0x2837ce[_0x451a('0x2e')])continue;let _0x2e3021=!0x1;for(const _0xd83e8d of this['_customCallbacks']){const _0x3dccad=_0xd83e8d(_0x2837ce);if(_0x3dccad){_0x451a('0xe')in _0x3dccad&&_0x39f847[_0x451a('0x12')](_0x3dccad),_0x2e3021=!0x0;break;}}if(!_0x2e3021){this[_0x451a('0x31')](_0x39f847,_0x2837ce);const _0x3bfcf7=_0x582db9[_0x46decc+0x1];if(_0x3bfcf7&&!_0x2837ce['getFirstRange']()['end'][_0x451a('0x23')](_0x3bfcf7[_0x451a('0x21')]()['start'])){const _0x1b6bd1=_0x39f847[_0x39f847[_0x451a('0x2b')]-0x1],_0x1dbbe5=_0x451a('0x15')==_0x2837ce[_0x451a('0xe')]?'add':'remove';_0x1b6bd1&&'text'==_0x1b6bd1[_0x451a('0xe')]&&(_0x1b6bd1[_0x1dbbe5]+='\x0a');}}}return this['_resolveDescriptionItems'](_0x39f847);}['registerDescriptionCallback'](_0x554655){this['_customCallbacks']['push'](_0x554655);}[_0x451a('0x30')](_0x571229,_0x4b1067,_0x4cd2a3=_0x4d1b72['normal']){_0x451a('0x28')==typeof _0x571229?_0x420501(this['_itemLabelsCallbacks'],{'matchingCallback':_0x571229,'label':_0x4b1067,'priority':_0x4cd2a3}):this[_0x451a('0x22')]['set'](_0x571229,_0x4b1067);}[_0x451a('0x1e')](_0x49065e,_0x33641b=0x1){let _0x1545ea;for(const _0xdc1da5 of this[_0x451a('0xc')])if(_0xdc1da5[_0x451a('0x2f')](_0x49065e)){_0x1545ea=_0xdc1da5[_0x451a('0x34')];break;}return _0x1545ea||(_0x1545ea=this[_0x451a('0x22')][_0x451a('0x16')](_0x49065e[_0x451a('0x2')])),_0x1545ea?_0x1545ea(_0x33641b):0x1!==_0x33641b?_0x33641b+'\x20'+_0x49065e[_0x451a('0x2')]+'s':''+_0x49065e[_0x451a('0x2')];}[_0x451a('0x31')](_0x3f41ad,_0x52f81f){const _0x4e0ee8=_0x52f81f['getFirstRange']()[_0x451a('0x17')](),_0x189ece='insertion'==_0x52f81f[_0x451a('0xe')]?'add':'remove';for(const _0x1c86d3 of _0x4e0ee8){const _0x1f496d=_0x1c86d3[_0x451a('0x9')],_0x2d6a59=_0x3f41ad[_0x3f41ad[_0x451a('0x2b')]-0x1];if(_0x1f496d['is'](_0x451a('0x18')))_0x2d6a59&&_0x2d6a59[_0x451a('0xe')][_0x451a('0x1')](_0x451a('0x3'))>-0x1&&_0x3f41ad[_0x451a('0x27')](),_0x2d6a59&&_0x451a('0xf')==_0x2d6a59[_0x451a('0xe')]?_0x2d6a59[_0x189ece]+=_0x1f496d[_0x451a('0x20')]:_0x3f41ad[_0x451a('0x12')]({'type':_0x451a('0xf'),'add':_0x451a('0x7')==_0x189ece?_0x1f496d[_0x451a('0x20')]:'','remove':'remove'==_0x189ece?_0x1f496d[_0x451a('0x20')]:''});else{if(this[_0x451a('0x0')][_0x451a('0xb')](_0x1f496d)){const _0x11357b=_0x1f496d;if(_0x2d6a59&&_0x2d6a59[_0x451a('0xe')][_0x451a('0x1')]('Container')>-0x1&&_0x3f41ad[_0x451a('0x27')](),_0x451a('0xd')==_0x1c86d3['type'])continue;_0x2d6a59&&_0x2d6a59[_0x451a('0xe')]==_0x189ece+_0x451a('0x35')&&_0x2d6a59[_0x451a('0x24')][_0x451a('0x2')]==_0x11357b['name']?_0x2d6a59[_0x451a('0x5')]++:_0x3f41ad[_0x451a('0x12')]({'type':_0x189ece+_0x451a('0x35'),'element':_0x11357b,'quantity':0x1}),_0x4e0ee8[_0x451a('0x10')](_0x2962a4=>!(_0x451a('0xd')==_0x2962a4[_0x451a('0xe')]&&_0x2962a4[_0x451a('0x9')]==_0x1f496d));}else{if(this[_0x451a('0x0')]['checkChild'](_0x1f496d,'$text')||_0x1f496d['is']('element','softBreak')){const _0x556edc=_0x1f496d;if(_0x451a('0x7')==_0x189ece&&'elementStart'==_0x1c86d3[_0x451a('0xe')]||'remove'==_0x189ece&&_0x451a('0xd')==_0x1c86d3[_0x451a('0xe')])continue;if(_0x2d6a59&&-0x1==_0x2d6a59['type'][_0x451a('0x1')](_0x451a('0x3'))){_0x451a('0xf')==_0x2d6a59[_0x451a('0xe')]&&(_0x2d6a59[_0x189ece]+='\x0a');continue;}let _0x10c473;if(_0x10c473=_0x451a('0x7')==_0x189ece?_0x556edc[_0x451a('0x26')]&&!this['_schema']['isObject'](_0x556edc[_0x451a('0x26')])?_0x556edc['nextSibling']:null:_0x556edc['previousSibling']&&!this['_schema'][_0x451a('0xb')](_0x556edc['previousSibling'])?_0x556edc['previousSibling']:null,_0x556edc[_0x451a('0x11')]||_0x10c473&&_0x10c473[_0x451a('0x11')]){const _0x5d6900=_0x10c473&&_0x10c473[_0x451a('0x11')]?_0x10c473:_0x556edc;_0x2d6a59&&_0x2d6a59['type']==_0x189ece+_0x451a('0x2c')&&_0x2d6a59[_0x451a('0x24')][_0x451a('0x2')]==_0x5d6900['name']?_0x2d6a59['quantity']++:_0x3f41ad[_0x451a('0x12')]({'type':_0x189ece+_0x451a('0x2c'),'element':_0x5d6900,'quantity':0x1});}else _0x3f41ad[_0x451a('0x12')]({'type':_0x189ece+_0x451a('0x3'),'element':_0x556edc});}}}}}[_0x451a('0x1c')](_0x49a9d7){const _0x1401e0=this[_0x451a('0x2a')],_0xeeea81=[];for(const _0x31cfbf of _0x49a9d7){switch(_0x31cfbf[_0x451a('0xe')]){case _0x451a('0xf'):if(_0x31cfbf[_0x451a('0x7')]=_0x31cfbf['add']['replace'](/(\S)\u000A+(\S)/g,_0x451a('0x32'))[_0x451a('0x1d')](/\u000A/g,''),_0x31cfbf[_0x451a('0x36')]=_0x31cfbf[_0x451a('0x36')][_0x451a('0x1d')](/(\S)\u000A+(\S)/g,_0x451a('0x32'))[_0x451a('0x1d')](/\u000A/g,''),''!=_0x31cfbf['add']&&''!=_0x31cfbf[_0x451a('0x36')]){_0xeeea81['push']({'type':'replace','content':_0x5cc6c9(_0x1401e0,_0x451a('0x13'),['\x22'+_0x31cfbf[_0x451a('0x36')]+'\x22','\x22'+_0x31cfbf[_0x451a('0x7')]+'\x22'])});continue;}if(null!=_0x31cfbf[_0x451a('0x7')]['match'](/^ +$/)){_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x25'),_0x5cc6c9(_0x1401e0,_0x451a('0x33'),_0x31cfbf[_0x451a('0x7')][_0x451a('0x2b')]))});continue;}if(null!=_0x31cfbf[_0x451a('0x36')][_0x451a('0x29')](/^ +$/)){_0xeeea81[_0x451a('0x12')]({'type':'deletion','content':_0x5cc6c9(_0x1401e0,_0x451a('0x2d'),_0x5cc6c9(_0x1401e0,'ELEMENT_SPACE',_0x31cfbf[_0x451a('0x36')][_0x451a('0x2b')]))});continue;}if(''!=_0x31cfbf['add']){_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,'*Insert:*\x20%0','\x22'+_0x31cfbf[_0x451a('0x7')]+'\x22')});continue;}_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x14'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x2d'),'\x22'+_0x31cfbf[_0x451a('0x36')]+'\x22')});continue;case _0x451a('0x4'):case _0x451a('0x6'):_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,'*Insert:*\x20%0',this['getItemLabel'](_0x31cfbf[_0x451a('0x24')],_0x31cfbf[_0x451a('0x5')]))});continue;case'removeEmptyContainer':case'removeObject':_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x14'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x2d'),this[_0x451a('0x1e')](_0x31cfbf['element'],_0x31cfbf['quantity']))});continue;case _0x451a('0x8'):_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x1b'),this[_0x451a('0x1e')](_0x31cfbf[_0x451a('0x24')],_0x31cfbf[_0x451a('0x5')]))});continue;case _0x451a('0xa'):_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x14'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x1f'),this['getItemLabel'](_0x31cfbf['element'],_0x31cfbf[_0x451a('0x5')]))});continue;}_0xeeea81[_0x451a('0x12')](_0x31cfbf);}return _0xeeea81;}}