@ckeditor/ckeditor5-track-changes 38.0.1 → 38.1.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 (129) hide show
  1. package/build/track-changes.js +1 -1
  2. package/package.json +10 -8
  3. package/src/augmentation.d.ts +36 -36
  4. package/src/commands/acceptsuggestioncommand.d.ts +20 -20
  5. package/src/commands/acceptsuggestioncommand.js +1 -1
  6. package/src/commands/discardsuggestioncommand.d.ts +20 -20
  7. package/src/commands/discardsuggestioncommand.js +1 -1
  8. package/src/commands/executeonallsuggestionscommand.d.ts +20 -20
  9. package/src/commands/executeonallsuggestionscommand.js +1 -1
  10. package/src/commands/executeonselectedsuggestionscommand.d.ts +20 -20
  11. package/src/commands/executeonselectedsuggestionscommand.js +1 -1
  12. package/src/commands/trackchangescommand.d.ts +22 -22
  13. package/src/commands/trackchangescommand.js +1 -1
  14. package/src/index.d.ts +12 -12
  15. package/src/integrations/alignment.d.ts +13 -13
  16. package/src/integrations/alignment.js +1 -1
  17. package/src/integrations/basicstyles.d.ts +13 -13
  18. package/src/integrations/basicstyles.js +1 -1
  19. package/src/integrations/blockquote.d.ts +13 -13
  20. package/src/integrations/blockquote.js +1 -1
  21. package/src/integrations/ckbox.d.ts +13 -13
  22. package/src/integrations/ckbox.js +1 -1
  23. package/src/integrations/codeblock.d.ts +13 -13
  24. package/src/integrations/codeblock.js +1 -1
  25. package/src/integrations/comments.d.ts +10 -10
  26. package/src/integrations/comments.js +1 -1
  27. package/src/integrations/deletecommand.d.ts +13 -12
  28. package/src/integrations/deletecommand.js +1 -1
  29. package/src/integrations/documentlist.d.ts +13 -13
  30. package/src/integrations/documentlist.js +1 -1
  31. package/src/integrations/documentlistproperties.d.ts +25 -25
  32. package/src/integrations/documentlistproperties.js +1 -1
  33. package/src/integrations/entercommand.d.ts +12 -11
  34. package/src/integrations/entercommand.js +1 -1
  35. package/src/integrations/findandreplace.d.ts +17 -17
  36. package/src/integrations/findandreplace.js +1 -1
  37. package/src/integrations/font.d.ts +13 -13
  38. package/src/integrations/font.js +1 -1
  39. package/src/integrations/formatpainter.d.ts +13 -13
  40. package/src/integrations/formatpainter.js +1 -1
  41. package/src/integrations/heading.d.ts +13 -13
  42. package/src/integrations/heading.js +1 -1
  43. package/src/integrations/highlight.d.ts +13 -13
  44. package/src/integrations/highlight.js +1 -1
  45. package/src/integrations/horizontalline.d.ts +13 -13
  46. package/src/integrations/horizontalline.js +1 -1
  47. package/src/integrations/htmlembed.d.ts +13 -13
  48. package/src/integrations/htmlembed.js +1 -1
  49. package/src/integrations/image.d.ts +13 -13
  50. package/src/integrations/image.js +1 -1
  51. package/src/integrations/imagereplace.d.ts +19 -19
  52. package/src/integrations/imagereplace.js +1 -1
  53. package/src/integrations/importword.d.ts +14 -14
  54. package/src/integrations/importword.js +1 -1
  55. package/src/integrations/indent.d.ts +13 -13
  56. package/src/integrations/indent.js +1 -1
  57. package/src/integrations/inputcommand.d.ts +12 -11
  58. package/src/integrations/inputcommand.js +1 -1
  59. package/src/integrations/link.d.ts +13 -13
  60. package/src/integrations/link.js +1 -1
  61. package/src/integrations/list.d.ts +13 -13
  62. package/src/integrations/list.js +1 -1
  63. package/src/integrations/listproperties.d.ts +25 -25
  64. package/src/integrations/listproperties.js +1 -1
  65. package/src/integrations/mediaembed.d.ts +13 -13
  66. package/src/integrations/mediaembed.js +1 -1
  67. package/src/integrations/mention.d.ts +13 -13
  68. package/src/integrations/mention.js +1 -1
  69. package/src/integrations/pagebreak.d.ts +13 -13
  70. package/src/integrations/pagebreak.js +1 -1
  71. package/src/integrations/paragraph.d.ts +13 -13
  72. package/src/integrations/paragraph.js +1 -1
  73. package/src/integrations/removeformat.d.ts +13 -13
  74. package/src/integrations/removeformat.js +1 -1
  75. package/src/integrations/restrictededitingmode.d.ts +13 -13
  76. package/src/integrations/restrictededitingmode.js +1 -1
  77. package/src/integrations/shiftentercommand.d.ts +12 -11
  78. package/src/integrations/shiftentercommand.js +1 -1
  79. package/src/integrations/standardeditingmode.d.ts +13 -13
  80. package/src/integrations/standardeditingmode.js +1 -1
  81. package/src/integrations/style.d.ts +14 -14
  82. package/src/integrations/style.js +1 -1
  83. package/src/integrations/table.d.ts +38 -38
  84. package/src/integrations/table.js +1 -1
  85. package/src/integrations/tablecaption.d.ts +18 -17
  86. package/src/integrations/tablecaption.js +1 -1
  87. package/src/integrations/tableclipboard.d.ts +18 -17
  88. package/src/integrations/tableclipboard.js +1 -1
  89. package/src/integrations/tablecolumnresize.d.ts +22 -22
  90. package/src/integrations/tablecolumnresize.js +1 -1
  91. package/src/integrations/tableheadings.d.ts +18 -17
  92. package/src/integrations/tableheadings.js +1 -1
  93. package/src/integrations/tablemergesplit.d.ts +18 -17
  94. package/src/integrations/tablemergesplit.js +1 -1
  95. package/src/integrations/tableofcontents.d.ts +13 -13
  96. package/src/integrations/tableofcontents.js +1 -1
  97. package/src/integrations/tableproperties.d.ts +23 -23
  98. package/src/integrations/tableproperties.js +1 -1
  99. package/src/integrations/template.d.ts +13 -13
  100. package/src/integrations/template.js +1 -1
  101. package/src/integrations/title.d.ts +13 -13
  102. package/src/integrations/title.js +1 -1
  103. package/src/integrations/undo.d.ts +13 -13
  104. package/src/integrations/undo.js +1 -1
  105. package/src/integrations/utils.d.ts +17 -17
  106. package/src/integrations/utils.js +1 -1
  107. package/src/suggestion.d.ts +266 -266
  108. package/src/suggestion.js +1 -1
  109. package/src/suggestiondescriptionfactory.d.ts +151 -151
  110. package/src/suggestiondescriptionfactory.js +1 -1
  111. package/src/trackchanges.d.ts +240 -240
  112. package/src/trackchanges.js +1 -1
  113. package/src/trackchangesconfig.d.ts +71 -71
  114. package/src/trackchangesdata.d.ts +37 -38
  115. package/src/trackchangesdata.js +1 -1
  116. package/src/trackchangesediting.d.ts +435 -391
  117. package/src/trackchangesediting.js +1 -1
  118. package/src/trackchangesui.d.ts +34 -34
  119. package/src/trackchangesui.js +1 -1
  120. package/src/ui/suggestioncontroller.d.ts +36 -36
  121. package/src/ui/suggestioncontroller.js +1 -1
  122. package/src/ui/view/basesuggestionthreadview.d.ts +166 -166
  123. package/src/ui/view/basesuggestionthreadview.js +1 -1
  124. package/src/ui/view/suggestionthreadview.d.ts +182 -184
  125. package/src/ui/view/suggestionthreadview.js +1 -1
  126. package/src/utils/common-translations.d.ts +5 -5
  127. package/src/utils/common-translations.js +1 -1
  128. package/src/utils/utils.d.ts +26 -26
  129. package/src/utils/utils.js +1 -1
@@ -1,151 +1,151 @@
1
- /**
2
- * @module track-changes/suggestiondescriptionfactory
3
- * @publicApi
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
- }
1
+ /**
2
+ * @module track-changes/suggestiondescriptionfactory
3
+ * @publicApi
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
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4d22=['addContainer','removeContainer','isEmpty','function','isInContent','*Insert:*\x20%0','_schema','Object','_itemLabels','registerElementLabel','ELEMENT_SPACE','get','deletion','$1\x20$2','start','remove','softBreak','element','quantity','elementEnd','isEqual','Container','skip','insertion','indexOf','$text','removeEmptyContainer','type','text','getItemLabel','*Remove:*\x20%0','replace','data','name','getFirstRange','pop','_locale','nextSibling','previousSibling','addEmptyContainer','_resolveDescriptionItems','$textProxy','item','add','set','elementStart','_itemLabelsCallbacks','match','label','length','end','matchingCallback','_addDescriptionItems','_customCallbacks','isObject','getWalker','push'];(function(_0x4e0009,_0x4d2287){const _0x1b1f83=function(_0x21b1e5){while(--_0x21b1e5){_0x4e0009['push'](_0x4e0009['shift']());}};_0x1b1f83(++_0x4d2287);}(_0x4d22,0x1ab));const _0x1b1f=function(_0x4e0009,_0x4d2287){_0x4e0009=_0x4e0009-0x0;let _0x1b1f83=_0x4d22[_0x4e0009];return _0x1b1f83;};import{getTranslation as _0x8ba7a5}from'./utils/common-translations';import{priorities as _0x27b4bb,insertToPriorityArray as _0x4574a9}from'ckeditor5/src/utils';export default class m{constructor(_0x2048c9,_0x2a6531){this['_customCallbacks']=[],this['_itemLabels']=new Map(),this[_0x1b1f('0x12')]=[],this[_0x1b1f('0x23')]=_0x2048c9,this[_0x1b1f('0x8')]=_0x2a6531;}['getDescriptions'](_0x2ffb87){const _0x24556f=[];for(let _0xf74c4e=0x0;_0xf74c4e<_0x2ffb87[_0x1b1f('0x15')];_0xf74c4e++){const _0x70b07a=_0x2ffb87[_0xf74c4e];if(!_0x70b07a[_0x1b1f('0x21')])continue;let _0x3c8b1d=!0x1;for(const _0x1180bf of this[_0x1b1f('0x19')]){const _0x2a7795=_0x1180bf(_0x70b07a);if(_0x2a7795){_0x1b1f('0x38')in _0x2a7795&&_0x24556f[_0x1b1f('0x1c')](_0x2a7795),_0x3c8b1d=!0x0;break;}}if(!_0x3c8b1d){this['_addDescriptionItems'](_0x24556f,_0x70b07a);const _0x596309=_0x2ffb87[_0xf74c4e+0x1];if(_0x596309&&!_0x70b07a['getFirstRange']()[_0x1b1f('0x16')][_0x1b1f('0x31')](_0x596309[_0x1b1f('0x6')]()[_0x1b1f('0x2b')])){const _0x278eb2=_0x24556f[_0x24556f[_0x1b1f('0x15')]-0x1],_0x4d0e08=_0x1b1f('0x34')==_0x70b07a[_0x1b1f('0x38')]?_0x1b1f('0xf'):_0x1b1f('0x2c');_0x278eb2&&_0x1b1f('0x0')==_0x278eb2[_0x1b1f('0x38')]&&(_0x278eb2[_0x4d0e08]+='\x0a');}}}return this['_resolveDescriptionItems'](_0x24556f);}['registerDescriptionCallback'](_0x23ecb2){this[_0x1b1f('0x19')]['push'](_0x23ecb2);}[_0x1b1f('0x26')](_0xba20a5,_0x30c6f3,_0x590167=_0x27b4bb['normal']){_0x1b1f('0x20')==typeof _0xba20a5?_0x4574a9(this[_0x1b1f('0x12')],{'matchingCallback':_0xba20a5,'label':_0x30c6f3,'priority':_0x590167}):this[_0x1b1f('0x25')][_0x1b1f('0x10')](_0xba20a5,_0x30c6f3);}[_0x1b1f('0x1')](_0x524009,_0x12328f=0x1){let _0x1d7ead;for(const _0x1da25f of this[_0x1b1f('0x12')])if(_0x1da25f[_0x1b1f('0x17')](_0x524009)){_0x1d7ead=_0x1da25f[_0x1b1f('0x14')];break;}return _0x1d7ead||(_0x1d7ead=this['_itemLabels'][_0x1b1f('0x28')](_0x524009['name'])),_0x1d7ead?_0x1d7ead(_0x12328f):0x1!==_0x12328f?_0x12328f+'\x20'+_0x524009[_0x1b1f('0x5')]+'s':''+_0x524009[_0x1b1f('0x5')];}[_0x1b1f('0x18')](_0x4999ad,_0x5e0475){const _0x4a74c4=_0x5e0475['getFirstRange']()[_0x1b1f('0x1b')](),_0x4883d8=_0x1b1f('0x34')==_0x5e0475[_0x1b1f('0x38')]?_0x1b1f('0xf'):'remove';for(const _0x4ff1c0 of _0x4a74c4){const _0x6419e9=_0x4ff1c0['item'],_0x21170d=_0x4999ad[_0x4999ad[_0x1b1f('0x15')]-0x1];if(_0x6419e9['is'](_0x1b1f('0xd')))_0x21170d&&_0x21170d[_0x1b1f('0x38')][_0x1b1f('0x35')](_0x1b1f('0x32'))>-0x1&&_0x4999ad[_0x1b1f('0x7')](),_0x21170d&&'text'==_0x21170d[_0x1b1f('0x38')]?_0x21170d[_0x4883d8]+=_0x6419e9['data']:_0x4999ad[_0x1b1f('0x1c')]({'type':'text','add':'add'==_0x4883d8?_0x6419e9['data']:'','remove':_0x1b1f('0x2c')==_0x4883d8?_0x6419e9[_0x1b1f('0x4')]:''});else{if(this[_0x1b1f('0x23')][_0x1b1f('0x1a')](_0x6419e9)){const _0x18bddd=_0x6419e9;if(_0x21170d&&_0x21170d[_0x1b1f('0x38')][_0x1b1f('0x35')](_0x1b1f('0x32'))>-0x1&&_0x4999ad[_0x1b1f('0x7')](),_0x1b1f('0x30')==_0x4ff1c0['type'])continue;_0x21170d&&_0x21170d[_0x1b1f('0x38')]==_0x4883d8+_0x1b1f('0x24')&&_0x21170d[_0x1b1f('0x2e')][_0x1b1f('0x5')]==_0x18bddd[_0x1b1f('0x5')]?_0x21170d[_0x1b1f('0x2f')]++:_0x4999ad[_0x1b1f('0x1c')]({'type':_0x4883d8+_0x1b1f('0x24'),'element':_0x18bddd,'quantity':0x1}),_0x4a74c4[_0x1b1f('0x33')](_0x207580=>!(_0x1b1f('0x30')==_0x207580[_0x1b1f('0x38')]&&_0x207580[_0x1b1f('0xe')]==_0x6419e9));}else{if(this[_0x1b1f('0x23')]['checkChild'](_0x6419e9,_0x1b1f('0x36'))||_0x6419e9['is'](_0x1b1f('0x2e'),_0x1b1f('0x2d'))){const _0x43cb2a=_0x6419e9;if(_0x1b1f('0xf')==_0x4883d8&&_0x1b1f('0x11')==_0x4ff1c0[_0x1b1f('0x38')]||_0x1b1f('0x2c')==_0x4883d8&&_0x1b1f('0x30')==_0x4ff1c0[_0x1b1f('0x38')])continue;if(_0x21170d&&-0x1==_0x21170d[_0x1b1f('0x38')][_0x1b1f('0x35')]('Container')){_0x1b1f('0x0')==_0x21170d[_0x1b1f('0x38')]&&(_0x21170d[_0x4883d8]+='\x0a');continue;}let _0x108285;if(_0x108285=_0x1b1f('0xf')==_0x4883d8?_0x43cb2a['nextSibling']&&!this['_schema'][_0x1b1f('0x1a')](_0x43cb2a['nextSibling'])?_0x43cb2a[_0x1b1f('0x9')]:null:_0x43cb2a['previousSibling']&&!this[_0x1b1f('0x23')][_0x1b1f('0x1a')](_0x43cb2a[_0x1b1f('0xa')])?_0x43cb2a[_0x1b1f('0xa')]:null,_0x43cb2a['isEmpty']||_0x108285&&_0x108285[_0x1b1f('0x1f')]){const _0x587025=_0x108285&&_0x108285['isEmpty']?_0x108285:_0x43cb2a;_0x21170d&&_0x21170d[_0x1b1f('0x38')]==_0x4883d8+'EmptyContainer'&&_0x21170d[_0x1b1f('0x2e')][_0x1b1f('0x5')]==_0x587025[_0x1b1f('0x5')]?_0x21170d[_0x1b1f('0x2f')]++:_0x4999ad[_0x1b1f('0x1c')]({'type':_0x4883d8+'EmptyContainer','element':_0x587025,'quantity':0x1});}else _0x4999ad[_0x1b1f('0x1c')]({'type':_0x4883d8+_0x1b1f('0x32'),'element':_0x43cb2a});}}}}}[_0x1b1f('0xc')](_0x1f008b){const _0x3836ff=this[_0x1b1f('0x8')],_0x59d36d=[];for(const _0x9edc15 of _0x1f008b){switch(_0x9edc15[_0x1b1f('0x38')]){case _0x1b1f('0x0'):if(_0x9edc15['add']=_0x9edc15[_0x1b1f('0xf')][_0x1b1f('0x3')](/(\S)\u000A+(\S)/g,_0x1b1f('0x2a'))[_0x1b1f('0x3')](/\u000A/g,''),_0x9edc15[_0x1b1f('0x2c')]=_0x9edc15[_0x1b1f('0x2c')][_0x1b1f('0x3')](/(\S)\u000A+(\S)/g,_0x1b1f('0x2a'))['replace'](/\u000A/g,''),''!=_0x9edc15[_0x1b1f('0xf')]&&''!=_0x9edc15['remove']){_0x59d36d[_0x1b1f('0x1c')]({'type':_0x1b1f('0x3'),'content':_0x8ba7a5(_0x3836ff,'REPLACE_TEXT',['\x22'+_0x9edc15[_0x1b1f('0x2c')]+'\x22','\x22'+_0x9edc15['add']+'\x22'])});continue;}if(null!=_0x9edc15[_0x1b1f('0xf')][_0x1b1f('0x13')](/^ +$/)){_0x59d36d['push']({'type':_0x1b1f('0x34'),'content':_0x8ba7a5(_0x3836ff,_0x1b1f('0x22'),_0x8ba7a5(_0x3836ff,_0x1b1f('0x27'),_0x9edc15[_0x1b1f('0xf')][_0x1b1f('0x15')]))});continue;}if(null!=_0x9edc15['remove'][_0x1b1f('0x13')](/^ +$/)){_0x59d36d['push']({'type':_0x1b1f('0x29'),'content':_0x8ba7a5(_0x3836ff,'*Remove:*\x20%0',_0x8ba7a5(_0x3836ff,_0x1b1f('0x27'),_0x9edc15[_0x1b1f('0x2c')][_0x1b1f('0x15')]))});continue;}if(''!=_0x9edc15[_0x1b1f('0xf')]){_0x59d36d[_0x1b1f('0x1c')]({'type':'insertion','content':_0x8ba7a5(_0x3836ff,_0x1b1f('0x22'),'\x22'+_0x9edc15['add']+'\x22')});continue;}_0x59d36d[_0x1b1f('0x1c')]({'type':_0x1b1f('0x29'),'content':_0x8ba7a5(_0x3836ff,_0x1b1f('0x2'),'\x22'+_0x9edc15[_0x1b1f('0x2c')]+'\x22')});continue;case _0x1b1f('0xb'):case'addObject':_0x59d36d[_0x1b1f('0x1c')]({'type':'insertion','content':_0x8ba7a5(_0x3836ff,'*Insert:*\x20%0',this['getItemLabel'](_0x9edc15[_0x1b1f('0x2e')],_0x9edc15[_0x1b1f('0x2f')]))});continue;case _0x1b1f('0x37'):case'removeObject':_0x59d36d[_0x1b1f('0x1c')]({'type':_0x1b1f('0x29'),'content':_0x8ba7a5(_0x3836ff,_0x1b1f('0x2'),this[_0x1b1f('0x1')](_0x9edc15[_0x1b1f('0x2e')],_0x9edc15[_0x1b1f('0x2f')]))});continue;case _0x1b1f('0x1d'):_0x59d36d[_0x1b1f('0x1c')]({'type':'insertion','content':_0x8ba7a5(_0x3836ff,'*Split:*\x20%0',this[_0x1b1f('0x1')](_0x9edc15['element'],_0x9edc15[_0x1b1f('0x2f')]))});continue;case _0x1b1f('0x1e'):_0x59d36d[_0x1b1f('0x1c')]({'type':_0x1b1f('0x29'),'content':_0x8ba7a5(_0x3836ff,'*Merge:*\x20%0',this['getItemLabel'](_0x9edc15[_0x1b1f('0x2e')],_0x9edc15[_0x1b1f('0x2f')]))});continue;}_0x59d36d[_0x1b1f('0x1c')](_0x9edc15);}return _0x59d36d;}}
23
+ const _0x5540=['getDescriptions','ELEMENT_SPACE','*Split:*\x20%0','getFirstRange','_customCallbacks','add','function','isObject','isInContent','name','set','_locale','EmptyContainer','softBreak','_resolveDescriptionItems','addContainer','_itemLabels','removeContainer','getWalker','_itemLabelsCallbacks','getItemLabel','indexOf','normal','$text','isEqual','type','elementEnd','_addDescriptionItems','addObject','*Merge:*\x20%0','REPLACE_TEXT','nextSibling','insertion','data','replace','*Remove:*\x20%0','text','$textProxy','pop','$1\x20$2','item','match','get','element','matchingCallback','deletion','skip','label','isEmpty','Container','quantity','remove','previousSibling','registerDescriptionCallback','addEmptyContainer','_schema','length','*Insert:*\x20%0','start','end','Object','push'];(function(_0x39763f,_0x554074){const _0x1adb38=function(_0x2f9367){while(--_0x2f9367){_0x39763f['push'](_0x39763f['shift']());}};_0x1adb38(++_0x554074);}(_0x5540,0x155));const _0x1adb=function(_0x39763f,_0x554074){_0x39763f=_0x39763f-0x0;let _0x1adb38=_0x5540[_0x39763f];return _0x1adb38;};import{getTranslation as _0x262fa7}from'./utils/common-translations';import{priorities as _0x2248b2,insertToPriorityArray as _0x130d79}from'ckeditor5/src/utils';export default class m{constructor(_0x4fdd42,_0x1329dd){this['_customCallbacks']=[],this[_0x1adb('0x2f')]=new Map(),this[_0x1adb('0x32')]=[],this[_0x1adb('0x18')]=_0x4fdd42,this[_0x1adb('0x2a')]=_0x1329dd;}[_0x1adb('0x1f')](_0x58dfae){const _0x1a1513=[];for(let _0x246473=0x0;_0x246473<_0x58dfae[_0x1adb('0x19')];_0x246473++){const _0x22b92e=_0x58dfae[_0x246473];if(!_0x22b92e[_0x1adb('0x27')])continue;let _0x1c7f49=!0x1;for(const _0x3b2be4 of this[_0x1adb('0x23')]){const _0x329d16=_0x3b2be4(_0x22b92e);if(_0x329d16){_0x1adb('0x38')in _0x329d16&&_0x1a1513[_0x1adb('0x1e')](_0x329d16),_0x1c7f49=!0x0;break;}}if(!_0x1c7f49){this['_addDescriptionItems'](_0x1a1513,_0x22b92e);const _0x57d2b9=_0x58dfae[_0x246473+0x1];if(_0x57d2b9&&!_0x22b92e['getFirstRange']()[_0x1adb('0x1c')][_0x1adb('0x37')](_0x57d2b9[_0x1adb('0x22')]()[_0x1adb('0x1b')])){const _0x4e6326=_0x1a1513[_0x1a1513[_0x1adb('0x19')]-0x1],_0x364759=_0x1adb('0x1')==_0x22b92e[_0x1adb('0x38')]?'add':_0x1adb('0x14');_0x4e6326&&_0x1adb('0x5')==_0x4e6326[_0x1adb('0x38')]&&(_0x4e6326[_0x364759]+='\x0a');}}}return this[_0x1adb('0x2d')](_0x1a1513);}[_0x1adb('0x16')](_0x141291){this['_customCallbacks'][_0x1adb('0x1e')](_0x141291);}['registerElementLabel'](_0x3b3aed,_0x101840,_0x1e820a=_0x2248b2[_0x1adb('0x35')]){_0x1adb('0x25')==typeof _0x3b3aed?_0x130d79(this['_itemLabelsCallbacks'],{'matchingCallback':_0x3b3aed,'label':_0x101840,'priority':_0x1e820a}):this['_itemLabels'][_0x1adb('0x29')](_0x3b3aed,_0x101840);}[_0x1adb('0x33')](_0x13147e,_0x53b3c6=0x1){let _0x3bd561;for(const _0x320ef1 of this['_itemLabelsCallbacks'])if(_0x320ef1[_0x1adb('0xd')](_0x13147e)){_0x3bd561=_0x320ef1[_0x1adb('0x10')];break;}return _0x3bd561||(_0x3bd561=this[_0x1adb('0x2f')][_0x1adb('0xb')](_0x13147e[_0x1adb('0x28')])),_0x3bd561?_0x3bd561(_0x53b3c6):0x1!==_0x53b3c6?_0x53b3c6+'\x20'+_0x13147e[_0x1adb('0x28')]+'s':''+_0x13147e['name'];}[_0x1adb('0x3a')](_0x36aa18,_0x1e2883){const _0x190e66=_0x1e2883[_0x1adb('0x22')]()[_0x1adb('0x31')](),_0x5c3088=_0x1adb('0x1')==_0x1e2883[_0x1adb('0x38')]?_0x1adb('0x24'):_0x1adb('0x14');for(const _0x2e06bb of _0x190e66){const _0x36b456=_0x2e06bb['item'],_0x393933=_0x36aa18[_0x36aa18[_0x1adb('0x19')]-0x1];if(_0x36b456['is'](_0x1adb('0x6')))_0x393933&&_0x393933[_0x1adb('0x38')][_0x1adb('0x34')](_0x1adb('0x12'))>-0x1&&_0x36aa18['pop'](),_0x393933&&_0x1adb('0x5')==_0x393933['type']?_0x393933[_0x5c3088]+=_0x36b456[_0x1adb('0x2')]:_0x36aa18['push']({'type':_0x1adb('0x5'),'add':_0x1adb('0x24')==_0x5c3088?_0x36b456['data']:'','remove':_0x1adb('0x14')==_0x5c3088?_0x36b456[_0x1adb('0x2')]:''});else{if(this['_schema'][_0x1adb('0x26')](_0x36b456)){const _0xe4435b=_0x36b456;if(_0x393933&&_0x393933['type'][_0x1adb('0x34')](_0x1adb('0x12'))>-0x1&&_0x36aa18[_0x1adb('0x7')](),_0x1adb('0x39')==_0x2e06bb['type'])continue;_0x393933&&_0x393933[_0x1adb('0x38')]==_0x5c3088+'Object'&&_0x393933['element'][_0x1adb('0x28')]==_0xe4435b[_0x1adb('0x28')]?_0x393933[_0x1adb('0x13')]++:_0x36aa18['push']({'type':_0x5c3088+_0x1adb('0x1d'),'element':_0xe4435b,'quantity':0x1}),_0x190e66[_0x1adb('0xf')](_0x313779=>!(_0x1adb('0x39')==_0x313779[_0x1adb('0x38')]&&_0x313779[_0x1adb('0x9')]==_0x36b456));}else{if(this[_0x1adb('0x18')]['checkChild'](_0x36b456,_0x1adb('0x36'))||_0x36b456['is'](_0x1adb('0xc'),_0x1adb('0x2c'))){const _0x2de86c=_0x36b456;if('add'==_0x5c3088&&'elementStart'==_0x2e06bb[_0x1adb('0x38')]||_0x1adb('0x14')==_0x5c3088&&_0x1adb('0x39')==_0x2e06bb[_0x1adb('0x38')])continue;if(_0x393933&&-0x1==_0x393933[_0x1adb('0x38')][_0x1adb('0x34')](_0x1adb('0x12'))){'text'==_0x393933[_0x1adb('0x38')]&&(_0x393933[_0x5c3088]+='\x0a');continue;}let _0x487c50;if(_0x487c50=_0x1adb('0x24')==_0x5c3088?_0x2de86c[_0x1adb('0x0')]&&!this[_0x1adb('0x18')][_0x1adb('0x26')](_0x2de86c[_0x1adb('0x0')])?_0x2de86c[_0x1adb('0x0')]:null:_0x2de86c['previousSibling']&&!this[_0x1adb('0x18')][_0x1adb('0x26')](_0x2de86c['previousSibling'])?_0x2de86c[_0x1adb('0x15')]:null,_0x2de86c['isEmpty']||_0x487c50&&_0x487c50[_0x1adb('0x11')]){const _0x5f165e=_0x487c50&&_0x487c50[_0x1adb('0x11')]?_0x487c50:_0x2de86c;_0x393933&&_0x393933[_0x1adb('0x38')]==_0x5c3088+_0x1adb('0x2b')&&_0x393933[_0x1adb('0xc')][_0x1adb('0x28')]==_0x5f165e['name']?_0x393933[_0x1adb('0x13')]++:_0x36aa18[_0x1adb('0x1e')]({'type':_0x5c3088+_0x1adb('0x2b'),'element':_0x5f165e,'quantity':0x1});}else _0x36aa18['push']({'type':_0x5c3088+_0x1adb('0x12'),'element':_0x2de86c});}}}}}[_0x1adb('0x2d')](_0x260f09){const _0x12ceab=this['_locale'],_0x49b323=[];for(const _0x4524ae of _0x260f09){switch(_0x4524ae[_0x1adb('0x38')]){case'text':if(_0x4524ae[_0x1adb('0x24')]=_0x4524ae[_0x1adb('0x24')][_0x1adb('0x3')](/(\S)\u000A+(\S)/g,'$1\x20$2')['replace'](/\u000A/g,''),_0x4524ae[_0x1adb('0x14')]=_0x4524ae[_0x1adb('0x14')]['replace'](/(\S)\u000A+(\S)/g,_0x1adb('0x8'))[_0x1adb('0x3')](/\u000A/g,''),''!=_0x4524ae[_0x1adb('0x24')]&&''!=_0x4524ae[_0x1adb('0x14')]){_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x3'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x3d'),['\x22'+_0x4524ae[_0x1adb('0x14')]+'\x22','\x22'+_0x4524ae[_0x1adb('0x24')]+'\x22'])});continue;}if(null!=_0x4524ae[_0x1adb('0x24')][_0x1adb('0xa')](/^ +$/)){_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x1'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x1a'),_0x262fa7(_0x12ceab,_0x1adb('0x20'),_0x4524ae[_0x1adb('0x24')][_0x1adb('0x19')]))});continue;}if(null!=_0x4524ae[_0x1adb('0x14')][_0x1adb('0xa')](/^ +$/)){_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0xe'),'content':_0x262fa7(_0x12ceab,'*Remove:*\x20%0',_0x262fa7(_0x12ceab,_0x1adb('0x20'),_0x4524ae[_0x1adb('0x14')][_0x1adb('0x19')]))});continue;}if(''!=_0x4524ae[_0x1adb('0x24')]){_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x1'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x1a'),'\x22'+_0x4524ae['add']+'\x22')});continue;}_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0xe'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x4'),'\x22'+_0x4524ae['remove']+'\x22')});continue;case _0x1adb('0x17'):case _0x1adb('0x3b'):_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x1'),'content':_0x262fa7(_0x12ceab,'*Insert:*\x20%0',this[_0x1adb('0x33')](_0x4524ae[_0x1adb('0xc')],_0x4524ae[_0x1adb('0x13')]))});continue;case'removeEmptyContainer':case'removeObject':_0x49b323[_0x1adb('0x1e')]({'type':'deletion','content':_0x262fa7(_0x12ceab,_0x1adb('0x4'),this['getItemLabel'](_0x4524ae[_0x1adb('0xc')],_0x4524ae[_0x1adb('0x13')]))});continue;case _0x1adb('0x2e'):_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x1'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x21'),this[_0x1adb('0x33')](_0x4524ae[_0x1adb('0xc')],_0x4524ae[_0x1adb('0x13')]))});continue;case _0x1adb('0x30'):_0x49b323['push']({'type':_0x1adb('0xe'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x3c'),this[_0x1adb('0x33')](_0x4524ae[_0x1adb('0xc')],_0x4524ae[_0x1adb('0x13')]))});continue;}_0x49b323[_0x1adb('0x1e')](_0x4524ae);}return _0x49b323;}}