@ckeditor/ckeditor5-export-word 41.2.1 → 41.3.0-alpha.3

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 (106) hide show
  1. package/build/export-word.js +1 -1
  2. package/dist/content-index.css +4 -0
  3. package/dist/editor-index.css +4 -0
  4. package/dist/index.css +4 -0
  5. package/dist/translations/ar.d.ts +8 -0
  6. package/dist/translations/ar.js +23 -0
  7. package/dist/translations/bg.d.ts +8 -0
  8. package/dist/translations/bg.js +23 -0
  9. package/dist/translations/bn.d.ts +8 -0
  10. package/dist/translations/bn.js +23 -0
  11. package/dist/translations/ca.d.ts +8 -0
  12. package/dist/translations/ca.js +23 -0
  13. package/dist/translations/cs.d.ts +8 -0
  14. package/dist/translations/cs.js +23 -0
  15. package/dist/translations/da.d.ts +8 -0
  16. package/dist/translations/da.js +23 -0
  17. package/dist/translations/de.d.ts +8 -0
  18. package/dist/translations/de.js +23 -0
  19. package/dist/translations/el.d.ts +8 -0
  20. package/dist/translations/el.js +23 -0
  21. package/dist/translations/en-au.d.ts +8 -0
  22. package/dist/translations/en-au.js +23 -0
  23. package/dist/translations/en.d.ts +8 -0
  24. package/dist/translations/en.js +23 -0
  25. package/dist/translations/es.d.ts +8 -0
  26. package/dist/translations/es.js +23 -0
  27. package/dist/translations/et.d.ts +8 -0
  28. package/dist/translations/et.js +23 -0
  29. package/dist/translations/fi.d.ts +8 -0
  30. package/dist/translations/fi.js +23 -0
  31. package/dist/translations/fr.d.ts +8 -0
  32. package/dist/translations/fr.js +23 -0
  33. package/dist/translations/gl.d.ts +8 -0
  34. package/dist/translations/gl.js +23 -0
  35. package/dist/translations/he.d.ts +8 -0
  36. package/dist/translations/he.js +23 -0
  37. package/dist/translations/hi.d.ts +8 -0
  38. package/dist/translations/hi.js +23 -0
  39. package/dist/translations/hr.d.ts +8 -0
  40. package/dist/translations/hr.js +23 -0
  41. package/dist/translations/hu.d.ts +8 -0
  42. package/dist/translations/hu.js +23 -0
  43. package/dist/translations/id.d.ts +8 -0
  44. package/dist/translations/id.js +23 -0
  45. package/dist/translations/it.d.ts +8 -0
  46. package/dist/translations/it.js +23 -0
  47. package/dist/translations/ja.d.ts +8 -0
  48. package/dist/translations/ja.js +23 -0
  49. package/dist/translations/jv.d.ts +8 -0
  50. package/dist/translations/jv.js +23 -0
  51. package/dist/translations/ko.d.ts +8 -0
  52. package/dist/translations/ko.js +23 -0
  53. package/dist/translations/lt.d.ts +8 -0
  54. package/dist/translations/lt.js +23 -0
  55. package/dist/translations/lv.d.ts +8 -0
  56. package/dist/translations/lv.js +23 -0
  57. package/dist/translations/ms.d.ts +8 -0
  58. package/dist/translations/ms.js +23 -0
  59. package/dist/translations/nl.d.ts +8 -0
  60. package/dist/translations/nl.js +23 -0
  61. package/dist/translations/no.d.ts +8 -0
  62. package/dist/translations/no.js +23 -0
  63. package/dist/translations/pl.d.ts +8 -0
  64. package/dist/translations/pl.js +23 -0
  65. package/dist/translations/pt-br.d.ts +8 -0
  66. package/dist/translations/pt-br.js +23 -0
  67. package/dist/translations/pt.d.ts +8 -0
  68. package/dist/translations/pt.js +23 -0
  69. package/dist/translations/ro.d.ts +8 -0
  70. package/dist/translations/ro.js +23 -0
  71. package/dist/translations/ru.d.ts +8 -0
  72. package/dist/translations/ru.js +23 -0
  73. package/dist/translations/sk.d.ts +8 -0
  74. package/dist/translations/sk.js +23 -0
  75. package/dist/translations/sr-latn.d.ts +8 -0
  76. package/dist/translations/sr-latn.js +23 -0
  77. package/dist/translations/sr.d.ts +8 -0
  78. package/dist/translations/sr.js +23 -0
  79. package/dist/translations/sv.d.ts +8 -0
  80. package/dist/translations/sv.js +23 -0
  81. package/dist/translations/th.d.ts +8 -0
  82. package/dist/translations/th.js +23 -0
  83. package/dist/translations/tr.d.ts +8 -0
  84. package/dist/translations/tr.js +23 -0
  85. package/dist/translations/ug.d.ts +8 -0
  86. package/dist/translations/ug.js +23 -0
  87. package/dist/translations/uk.d.ts +8 -0
  88. package/dist/translations/uk.js +23 -0
  89. package/dist/translations/ur.d.ts +8 -0
  90. package/dist/translations/ur.js +23 -0
  91. package/dist/translations/vi.d.ts +8 -0
  92. package/dist/translations/vi.js +23 -0
  93. package/dist/translations/zh-cn.d.ts +8 -0
  94. package/dist/translations/zh-cn.js +23 -0
  95. package/dist/translations/zh.d.ts +8 -0
  96. package/dist/translations/zh.js +23 -0
  97. package/dist/types/augmentation.d.ts +25 -0
  98. package/dist/types/exportword.d.ts +235 -0
  99. package/dist/types/exportwordcommand.d.ts +40 -0
  100. package/dist/types/index.d.ts +14 -0
  101. package/dist/types/utils.d.ts +40 -0
  102. package/package.json +3 -2
  103. package/src/exportword.js +1 -1
  104. package/src/exportwordcommand.js +1 -1
  105. package/src/index.js +1 -1
  106. package/src/utils.js +1 -1
@@ -0,0 +1,235 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, 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
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module export-word/exportword
11
+ * @publicApi
12
+ */
13
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
14
+ import { Notification } from 'ckeditor5/src/ui.js';
15
+ import type { InitializedToken, TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
16
+ /**
17
+ * The export to Word feature.
18
+ *
19
+ * It allows you to generate a Word file directly from the editor content.
20
+ *
21
+ * For a detailed overview, check the {@glink features/converters/export-word export to Word} feature documentation.
22
+ */
23
+ export default class ExportWord extends Plugin {
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "ExportWord";
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get requires(): readonly ["CloudServices", typeof Notification];
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ init(): void;
36
+ }
37
+ /**
38
+ * The configuration of the export to Word feature. It is used by the Word export features from
39
+ * the `@ckeditor/ckeditor5-export-word` package.
40
+ *
41
+ * ```ts
42
+ * ClassicEditor
43
+ * .create( editorElement, {
44
+ * exportWord: ... // Export to Word feature options.
45
+ * } )
46
+ * .then( ... )
47
+ * .catch( ... );
48
+ * ```
49
+ *
50
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
51
+ */
52
+ export interface ExportWordConfig {
53
+ /**
54
+ * Paths to the `.css` files containing additional styling for the editor's content (**the order of provided items matters**).
55
+ *
56
+ * ```ts
57
+ * const exportWordConfig = {
58
+ * stylesheets: [ './path/to/custom-style.css' ]
59
+ * }
60
+ * ```
61
+ *
62
+ * **NOTE:** If `stylesheets` are not provided, the plugin will sent only
63
+ * {@glink installation/advanced/content-styles#the-full-list-of-content-styles the default editor content styles} to the converter.
64
+ *
65
+ * **Default editor's content styles**:
66
+ * {@glink installation/advanced/content-styles#the-full-list-of-content-styles The default editor content styles}
67
+ * are applied to the generated Word file thanks to the 'EDITOR_STYLES' token, which is provided to the `stylesheets` by default.
68
+ * If you don't want them to be applied, you have to omit the token:
69
+ *
70
+ * ```ts
71
+ * const exportWordConfig = {
72
+ * stylesheets: [ './path/to/custom-editor-styles.css' ]
73
+ * }
74
+ * ```
75
+ *
76
+ * **Custom styling:** For more advanced styling, your configuration should look like this:
77
+ *
78
+ * ```ts
79
+ * const exportWordConfig = {
80
+ * stylesheets: [
81
+ * 'EDITOR_STYLES',
82
+ * './path/to/custom-styles.css'
83
+ * ]
84
+ * }
85
+ * ```
86
+ *
87
+ * @default `[ 'EDITOR_STYLES' ]`
88
+ */
89
+ stylesheets?: Array<string>;
90
+ /**
91
+ * The name of the generated Word file.
92
+ *
93
+ * ```ts
94
+ * // Static file name.
95
+ * const exportWordConfig = {
96
+ * fileName: 'my-document.docx'
97
+ * }
98
+ *
99
+ *
100
+ * // Dynamic file name.
101
+ * const exportWordConfig = {
102
+ * fileName: () => {
103
+ * const articleTitle = document.querySelector( '#title' );
104
+ *
105
+ * return `${ articleTitle.value }.docx`;
106
+ * }
107
+ * }
108
+ * ```
109
+ *
110
+ * **NOTE:** The file name must contain the `.docx` extension.
111
+ * Otherwise your operating system or device may have trouble identifying the file type.
112
+ *
113
+ * @default 'document.docx'
114
+ */
115
+ fileName?: string | (() => string);
116
+ /**
117
+ * A URL to the Docx converter.
118
+ *
119
+ * ```ts
120
+ * const exportWordConfig = {
121
+ * converterUrl: 'https://myconverter.com/v1/'
122
+ * }
123
+ * ```
124
+ *
125
+ * **NOTE:** The plugin uses the default HTML to Word converter delivered by CKEditor Cloud Services.
126
+ * You can provide a URL to an on-premises converter instead.
127
+ *
128
+ * @default 'https://docx-converter.cke-cs.com/v1/convert'
129
+ */
130
+ converterUrl?: string;
131
+ /**
132
+ * The CKEditor Cloud Services HTML to DOCX Converter [configuration options](https://docx-converter.cke-cs.com/docs#section/Options).
133
+ *
134
+ * **NOTE:** Configuring the plugin is not mandatory.
135
+ *
136
+ * ```ts
137
+ * const exportWordConfig = {
138
+ * converterOptions: {
139
+ * ...
140
+ * }
141
+ * }
142
+ * ```
143
+ *
144
+ * @default `{
145
+ * format: 'A4',
146
+ * margin_top: '1in',
147
+ * margin_bottom: '1in',
148
+ * margin_right: '1in',
149
+ * margin_left: '1in',
150
+ * header: undefined,
151
+ * footer: undefined,
152
+ * comments: undefined,
153
+ * suggestions: undefined,
154
+ * orientation: 'portrait',
155
+ * auto_pagination: true,
156
+ * base_url: undefined,
157
+ * timezone: 'UTC'
158
+ * }`
159
+ */
160
+ converterOptions?: ExportWordConverterOptions;
161
+ /**
162
+ * A function to gather the HTML to be converted to Word.
163
+ *
164
+ * **NOTE:** This option may be useful when the editor does not have a `getData()` method,
165
+ * or if the HTML to be converted should be different than the edited one.
166
+ *
167
+ * ```ts
168
+ * const exportWordConfig = {
169
+ * dataCallback: ( editor ) => {
170
+ * return `
171
+ * <header id="header">${ editor.data.get( { rootName: 'header' } ) }</header>
172
+ * <div id="content">${ editor.data.get( { rootName: 'content' } ) }</div>
173
+ * `;
174
+ * }
175
+ * }
176
+ * ```
177
+ *
178
+ * @default `( editor ) => editor.getData( { pagination: true } )
179
+ *
180
+ * If using the {@glink features/pagination/pagination pagination} feature, the `pagination:true` option inserts additional markers into
181
+ * editor's data. Thanks to that, the Docx converter creates a Word document similar to what is displayed in the editor.
182
+ */
183
+ dataCallback?: (editor: Editor) => string;
184
+ /**
185
+ * A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl` is required for
186
+ * the export to Word feature.
187
+ *
188
+ * **Note:** The token can be disabled with the `false` value provided.
189
+ *
190
+ * See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
191
+ */
192
+ tokenUrl?: TokenUrl | false;
193
+ /**
194
+ * The authentication token.
195
+ *
196
+ * See: {@link module:cloud-services/cloudservices~CloudServices#token}
197
+ */
198
+ token?: InitializedToken;
199
+ }
200
+ export type ExportWordConverterOptions = {
201
+ format?: ExportWordConverterFormatOption;
202
+ margin_top?: string;
203
+ margin_bottom?: string;
204
+ margin_right?: string;
205
+ margin_left?: string;
206
+ header?: ExportWordConverterHeaderFooterOption;
207
+ footer?: ExportWordConverterHeaderFooterOption;
208
+ comments?: ExportWordConverterCommentsOption;
209
+ suggestions?: ExportWordConverterSuggestionsOption;
210
+ orientation?: ExportWordConverterOrientationOption;
211
+ auto_pagination?: boolean;
212
+ base_url?: string;
213
+ timezone?: string;
214
+ };
215
+ export type ExportWordConverterFormatOption = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5';
216
+ export type ExportWordConverterOrientationOption = 'portrait' | 'landscape';
217
+ export type ExportWordConverterHeaderFooterOption = Array<{
218
+ html?: string;
219
+ css?: string;
220
+ type?: 'default' | 'even' | 'odd' | 'first';
221
+ }>;
222
+ export type ExportWordConverterCommentsOption = {
223
+ [id: string]: Array<{
224
+ author: string;
225
+ created: Date;
226
+ content?: string;
227
+ is_resolved: boolean;
228
+ }>;
229
+ };
230
+ export type ExportWordConverterSuggestionsOption = {
231
+ [id: string]: {
232
+ author: string;
233
+ created: Date | null;
234
+ };
235
+ };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, 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
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module export-word/exportwordcommand
11
+ * @publicApi
12
+ */
13
+ import { Command, type Editor } from 'ckeditor5/src/core.js';
14
+ import { type ExportWordConfig } from './exportword.js';
15
+ /**
16
+ * The export to Word command.
17
+ *
18
+ * It takes the editor's HTML and CSS rules from the document and sends them to the HTML to Word converter.
19
+ * After processing, the converter will send back a Word file for download.
20
+ */
21
+ export default class ExportWordCommand extends Command {
22
+ /**
23
+ * A command state that indicates if the command is currently executing.
24
+ *
25
+ * @observable
26
+ */
27
+ isBusy: boolean;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ constructor(editor: Editor);
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ refresh(): void;
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ execute(options?: ExportWordConfig): Promise<void>;
40
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, 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
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module export-word
11
+ */
12
+ export { default as ExportWord, type ExportWordConfig } from './exportword.js';
13
+ export type { default as ExportWordCommand } from './exportwordcommand.js';
14
+ import './augmentation.js';
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, 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
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ import type { Editor } from 'ckeditor5/src/core.js';
10
+ import type { Collection } from 'ckeditor5/src/utils.js';
11
+ import type { ExportWordConverterOptions, ExportWordConverterCommentsOption, ExportWordConverterSuggestionsOption } from './exportword.js';
12
+ import type { CommentThread } from '@ckeditor/ckeditor5-comments';
13
+ import type { SuggestionJSON } from '@ckeditor/ckeditor5-track-changes';
14
+ import type { User } from '@ckeditor/ckeditor5-collaboration-core';
15
+ /**
16
+ * A helper function for getting concatenated CSS rules from external stylesheets.
17
+ *
18
+ * @param stylesheets An array of stylesheet paths delivered by the user through the plugin configuration.
19
+ */
20
+ export declare function getStyles(stylesheets?: Array<string>): Promise<string>;
21
+ /**
22
+ * A helper function for getting a proper options object containing
23
+ * comments, suggestions and the browser's timezone for the "Export to Word" converter.
24
+ *
25
+ * @param editor An editor instance.
26
+ */
27
+ export declare function getConverterOptions(editor: Editor): ExportWordConverterOptions;
28
+ /**
29
+ * A helper function for getting a comments object for the converter options.
30
+ *
31
+ * @param threads The comment threads array.
32
+ */
33
+ export declare function getComments(threads: Array<CommentThread>): ExportWordConverterCommentsOption;
34
+ /**
35
+ * A helper function for getting a suggestions object for the converter options.
36
+ *
37
+ * @param suggestions The suggestions array.
38
+ * @param users A list of all users in the editor.
39
+ */
40
+ export declare function getSuggestions(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOption;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-export-word",
3
- "version": "41.2.1",
3
+ "version": "41.3.0-alpha.3",
4
4
  "description": "Export to Word feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -30,13 +30,14 @@
30
30
  "type": "module",
31
31
  "main": "src/index.js",
32
32
  "dependencies": {
33
- "ckeditor5": "41.2.1"
33
+ "ckeditor5": "41.3.0-alpha.3"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (https://cksource.com/)",
37
37
  "homepage": "https://ckeditor.com/ckeditor-5",
38
38
  "bugs": "https://support.ckeditor.com/hc/en-us/requests/new",
39
39
  "files": [
40
+ "dist",
40
41
  "lang",
41
42
  "src/**/*.js",
42
43
  "src/**/*.d.ts",
package/src/exportword.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x2b243c}from'ckeditor5/src/core.js';import{ButtonView as _0x1d2c61,Notification as _0x54f25b,SpinnerView as _0x15fcac}from'ckeditor5/src/ui.js';import _0x1adc36 from'./exportwordcommand.js';import _0x51e9d6 from'../theme/icons/exportword.svg';export default class d extends _0x2b243c{static get['pluginName'](){return'ExportWord';}static get['requires'](){return['CloudServices',_0x54f25b];}['init'](){const _0x5bea06=this['editor'],t=_0x5bea06['t'],_0x153925=_0x5bea06['config']['get']('exportWord')||{};_0x5bea06['commands']['add']('exportWord',new _0x1adc36(_0x5bea06)),_0x5bea06['ui']['componentFactory']['add']('exportWord',_0x419abf=>{const _0x664fc5=_0x5bea06['commands']['get']('exportWord'),_0x9470f5=new _0x1d2c61(_0x419abf),_0x2167b2=new _0x15fcac();return _0x9470f5['set']({'label':t('Export\x20to\x20Word'),'icon':_0x51e9d6,'tooltip':!0x0}),_0x9470f5['children']['add'](_0x2167b2),_0x9470f5['bind']('isOn','isEnabled')['to'](_0x664fc5,'isBusy','isEnabled'),_0x2167b2['bind']('isVisible')['to'](_0x664fc5,'isBusy'),_0x9470f5['iconView']['bind']('isVisible')['to'](_0x664fc5,'isBusy',_0x2de8fa=>!_0x2de8fa),this['listenTo'](_0x9470f5,'execute',()=>{_0x5bea06['execute']('exportWord',_0x153925),_0x5bea06['editing']['view']['focus']();}),_0x9470f5;});const _0x1fa846=_0x5bea06['plugins']['get']('CloudServices');!0x1===_0x153925['tokenUrl']?this['_token']=null:_0x153925['tokenUrl']?_0x1fa846['registerTokenUrl'](_0x153925['tokenUrl'])['then'](_0x14f429=>{this['_token']=_0x14f429;}):this['_token']=_0x1fa846['token'];}}
23
+ import{Plugin as _0x1818da}from'ckeditor5/src/core.js';import{ButtonView as _0x141fea,Notification as _0x4cbfa5,SpinnerView as _0x29c150}from'ckeditor5/src/ui.js';import _0x3b4761 from'./exportwordcommand.js';import _0x12f797 from'../theme/icons/exportword.svg';export default class d extends _0x1818da{static get['pluginName'](){return'ExportWord';}static get['requires'](){return['CloudServices',_0x4cbfa5];}['init'](){const _0x463fdd=this['editor'],t=_0x463fdd['t'],_0x1e5c51=_0x463fdd['config']['get']('exportWord')||{};_0x463fdd['commands']['add']('exportWord',new _0x3b4761(_0x463fdd)),_0x463fdd['ui']['componentFactory']['add']('exportWord',_0xa47b7f=>{const _0x12f800=_0x463fdd['commands']['get']('exportWord'),_0x1306e8=new _0x141fea(_0xa47b7f),_0x453337=new _0x29c150();return _0x1306e8['set']({'label':t('Export\x20to\x20Word'),'icon':_0x12f797,'tooltip':!0x0}),_0x1306e8['children']['add'](_0x453337),_0x1306e8['bind']('isOn','isEnabled')['to'](_0x12f800,'isBusy','isEnabled'),_0x453337['bind']('isVisible')['to'](_0x12f800,'isBusy'),_0x1306e8['iconView']['bind']('isVisible')['to'](_0x12f800,'isBusy',_0x2fe70e=>!_0x2fe70e),this['listenTo'](_0x1306e8,'execute',()=>{_0x463fdd['execute']('exportWord',_0x1e5c51),_0x463fdd['editing']['view']['focus']();}),_0x1306e8;});const _0x4c12d3=_0x463fdd['plugins']['get']('CloudServices');!0x1===_0x1e5c51['tokenUrl']?this['_token']=null:_0x1e5c51['tokenUrl']?_0x4c12d3['registerTokenUrl'](_0x1e5c51['tokenUrl'])['then'](_0x5b3545=>{this['_token']=_0x5b3545;}):this['_token']=_0x4c12d3['token'];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x1b469b}from'ckeditor5/src/core.js';import{getStyles as _0x2ae59f,getConverterOptions as _0x1090e3}from'./utils.js';export default class i extends _0x1b469b{constructor(_0x1d114e){super(_0x1d114e),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x21b6ef={}){const _0x537837=this['editor'],t=_0x537837['t'],_0x437948=_0x21b6ef['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0x509211=_0x21b6ef['converterOptions']||{},_0x1dba79=_0x537837['plugins']['get']('ExportWord'),_0x31fb9b=_0x21b6ef['token']||_0x1dba79['_token'],_0x362ab0=!0x1!==_0x509211['auto_pagination'],_0x46f91f=_0x21b6ef['dataCallback']||(_0x58e0de=>_0x58e0de['data']['get']({'pagination':_0x362ab0}));return this['isBusy']=!0x0,this['refresh'](),_0x2ae59f(_0x21b6ef['stylesheets']||['EDITOR_STYLES'])['then'](async _0x1eb76a=>{const _0x160df7=await _0x46f91f(_0x537837),_0x42a267={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x537837['locale']['contentLanguageDirection']+'\x22>'+_0x160df7+'</div>','css':_0x1eb76a,'options':{..._0x509211,..._0x1090e3(_0x537837)}},_0x42b3a6={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x31fb9b?{'Authorization':_0x31fb9b['value']}:null},'body':JSON['stringify'](_0x42a267)};return window['fetch'](_0x437948,_0x42b3a6)['then'](_0x3f612f=>{if(0xc8!==_0x3f612f['status'])throw _0x3f612f;return _0x3f612f['blob']();})['then'](_0x2719b8=>{const _0xf73101='function'==typeof _0x21b6ef['fileName']?_0x21b6ef['fileName']():_0x21b6ef['fileName'];this['_downloadFile'](_0x2719b8,_0xf73101||'document.docx');});})['catch'](_0x338cdb=>{throw _0x537837['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x338cdb;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x4b4a81,_0x55109e){const _0x4e28c7=document['createElement']('a');_0x4e28c7['href']=window['URL']['createObjectURL'](_0x4b4a81),_0x4e28c7['download']=_0x55109e,_0x4e28c7['click'](),_0x4e28c7['remove']();}}
23
+ import{Command as _0x25fc53}from'ckeditor5/src/core.js';import{getStyles as _0x2324b6,getConverterOptions as _0x4ba2c4}from'./utils.js';export default class i extends _0x25fc53{constructor(_0x3913d1){super(_0x3913d1),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x3f0196={}){const _0x262852=this['editor'],t=_0x262852['t'],_0x16f0a5=_0x3f0196['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0x1dee69=_0x3f0196['converterOptions']||{},_0xfa3af=_0x262852['plugins']['get']('ExportWord'),_0x393dea=_0x3f0196['token']||_0xfa3af['_token'],_0x4cf77f=!0x1!==_0x1dee69['auto_pagination'],_0x4ce532=_0x3f0196['dataCallback']||(_0x5d1c70=>_0x5d1c70['data']['get']({'pagination':_0x4cf77f}));return this['isBusy']=!0x0,this['refresh'](),_0x2324b6(_0x3f0196['stylesheets']||['EDITOR_STYLES'])['then'](async _0x4f3e49=>{const _0x25eed3=await _0x4ce532(_0x262852),_0x2f9a6d={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x262852['locale']['contentLanguageDirection']+'\x22>'+_0x25eed3+'</div>','css':_0x4f3e49,'options':{..._0x1dee69,..._0x4ba2c4(_0x262852)}},_0x2555b3={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x393dea?{'Authorization':_0x393dea['value']}:null},'body':JSON['stringify'](_0x2f9a6d)};return window['fetch'](_0x16f0a5,_0x2555b3)['then'](_0x9809d6=>{if(0xc8!==_0x9809d6['status'])throw _0x9809d6;return _0x9809d6['blob']();})['then'](_0x515731=>{const _0x387fe0='function'==typeof _0x3f0196['fileName']?_0x3f0196['fileName']():_0x3f0196['fileName'];this['_downloadFile'](_0x515731,_0x387fe0||'document.docx');});})['catch'](_0xe4060b=>{throw _0x262852['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0xe4060b;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x21213,_0x3e21f4){const _0xd6a3fc=document['createElement']('a');_0xd6a3fc['href']=window['URL']['createObjectURL'](_0x21213),_0xd6a3fc['download']=_0x3e21f4,_0xd6a3fc['click'](),_0xd6a3fc['remove']();}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x53d884,_0x912caf){var _0x352fc2=_0x5c3e,_0x1db28b=_0x53d884();while(!![]){try{var _0x5d65b0=-parseInt(_0x352fc2(0x69))/0x1+-parseInt(_0x352fc2(0x71))/0x2*(-parseInt(_0x352fc2(0x6d))/0x3)+parseInt(_0x352fc2(0x6f))/0x4*(-parseInt(_0x352fc2(0x6e))/0x5)+parseInt(_0x352fc2(0x6a))/0x6+-parseInt(_0x352fc2(0x72))/0x7+-parseInt(_0x352fc2(0x6c))/0x8+-parseInt(_0x352fc2(0x70))/0x9*(-parseInt(_0x352fc2(0x6b))/0xa);if(_0x5d65b0===_0x912caf)break;else _0x1db28b['push'](_0x1db28b['shift']());}catch(_0x22a18d){_0x1db28b['push'](_0x1db28b['shift']());}}}(_0x4846,0xbb902));function _0x5c3e(_0x5e3dba,_0x55d972){var _0x4846ff=_0x4846();return _0x5c3e=function(_0x5c3e4d,_0x4d0b8a){_0x5c3e4d=_0x5c3e4d-0x69;var _0x4b4fa4=_0x4846ff[_0x5c3e4d];return _0x4b4fa4;},_0x5c3e(_0x5e3dba,_0x55d972);}export{default as ExportWord}from'./exportword.js';function _0x4846(){var _0x2d4714=['27MjCJvK','289868VSpifc','1656067vcSMwR','54257XxiRUf','7153308MvUJFt','1450760sCWrej','1298568FWKVfL','18KLdVFF','51855oBzyJG','492HsXQIi'];_0x4846=function(){return _0x2d4714;};return _0x4846();}import'./augmentation.js';
23
+ function _0x466a(){var _0x17dfa8=['3235450JChOqE','15538380wyHogX','2624792IKjBJV','5824554JxjolD','1571595mQGCJF','64zrlROG','2PeWfqZ','23247EQkLvC','828506PvAiiq','7ldVuRa'];_0x466a=function(){return _0x17dfa8;};return _0x466a();}(function(_0x97dd54,_0x38a839){var _0x1e2968=_0x2a31,_0x3186d6=_0x97dd54();while(!![]){try{var _0x2b65d9=-parseInt(_0x1e2968(0x157))/0x1+parseInt(_0x1e2968(0x155))/0x2*(-parseInt(_0x1e2968(0x153))/0x3)+parseInt(_0x1e2968(0x151))/0x4+parseInt(_0x1e2968(0x14f))/0x5+-parseInt(_0x1e2968(0x152))/0x6*(parseInt(_0x1e2968(0x158))/0x7)+parseInt(_0x1e2968(0x154))/0x8*(-parseInt(_0x1e2968(0x156))/0x9)+parseInt(_0x1e2968(0x150))/0xa;if(_0x2b65d9===_0x38a839)break;else _0x3186d6['push'](_0x3186d6['shift']());}catch(_0x20dedd){_0x3186d6['push'](_0x3186d6['shift']());}}}(_0x466a,0x7d534));export{default as ExportWord}from'./exportword.js';function _0x2a31(_0x748b8c,_0x574b58){var _0x466aaa=_0x466a();return _0x2a31=function(_0x2a31cc,_0x30b47d){_0x2a31cc=_0x2a31cc-0x14f;var _0x1365bc=_0x466aaa[_0x2a31cc];return _0x1365bc;},_0x2a31(_0x748b8c,_0x574b58);}import'./augmentation.js';
package/src/utils.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x57833b,_0x20d397){const _0x4f874c=_0x24d8,_0x5441ac=_0x57833b();while(!![]){try{const _0x1e9568=-parseInt(_0x4f874c(0x1cf))/0x1+-parseInt(_0x4f874c(0x1b0))/0x2*(-parseInt(_0x4f874c(0x1ce))/0x3)+parseInt(_0x4f874c(0x1d7))/0x4*(-parseInt(_0x4f874c(0x1a8))/0x5)+parseInt(_0x4f874c(0x1bf))/0x6+-parseInt(_0x4f874c(0x1c3))/0x7+-parseInt(_0x4f874c(0x1ba))/0x8*(-parseInt(_0x4f874c(0x1b5))/0x9)+-parseInt(_0x4f874c(0x1b9))/0xa;if(_0x1e9568===_0x20d397)break;else _0x5441ac['push'](_0x5441ac['shift']());}catch(_0x138769){_0x5441ac['push'](_0x5441ac['shift']());}}}(_0x1464,0x7315f));function _0x24d8(_0x2bdce0,_0x426435){const _0x146449=_0x1464();return _0x24d8=function(_0x24d857,_0x2c8ef1){_0x24d857=_0x24d857-0x1a7;let _0x50777f=_0x146449[_0x24d857];return _0x50777f;},_0x24d8(_0x2bdce0,_0x426435);}export function getStyles(_0x2fab03){const _0xed7196=_0x24d8;if(!_0x2fab03)return new Promise(_0xfe0c66=>_0xfe0c66(''));const _0x533d9a=[];for(const _0x3753e9 of _0x2fab03)_0xed7196(0x1d5)!==_0x3753e9?_0x533d9a[_0xed7196(0x1cd)](window[_0xed7196(0x1b1)](_0x3753e9)[_0xed7196(0x1b7)](_0x1976f2=>_0x1976f2[_0xed7196(0x1a7)]())):_0x533d9a[_0xed7196(0x1cd)](u());return Promise[_0xed7196(0x1d8)](_0x533d9a)[_0xed7196(0x1b7)](_0x502611=>_0x502611[_0xed7196(0x1d0)]('\x20')[_0xed7196(0x1c1)]());}function _0x1464(){const _0x4f0a88=['cssRules','CommentsRepository','authorId','map','TrackChanges','push','3JKQXxW','635903QzqTPs','join','name',':root','author','has','EDITOR_STYLES','hasAttribute','348TmRuwG','all','length','isResolved','indexOf','ownerNode','text','8345kfFUFL','DateTimeFormat','styleSheets','resolvedOptions','keys','timeZone','getSuggestions','Users','1113654ASsDQM','fetch','plugins','warn','cssText','108846zMUnBT','from','then','get','7033850OVPPlL','424YDGzuX','content','.ck-content','getCommentThreads','users','4968774NfdBTM','createdAt','trim','suggestions','490392IXIkQI','comments','data-cke','timezone','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.'];_0x1464=function(){return _0x4f0a88;};return _0x1464();}function u(){const _0xe51e4d=_0x24d8,_0x2189ac=[],_0x1595b1=[];for(const _0x53111e of Array[_0xe51e4d(0x1b6)](document[_0xe51e4d(0x1aa)])){if(_0x53111e[_0xe51e4d(0x1dc)][_0xe51e4d(0x1d6)](_0xe51e4d(0x1c5))){for(const _0x278313 of Array[_0xe51e4d(0x1b6)](_0x53111e[_0xe51e4d(0x1c8)]))-0x1!==_0x278313[_0xe51e4d(0x1b4)][_0xe51e4d(0x1db)](_0xe51e4d(0x1bc))?_0x2189ac[_0xe51e4d(0x1cd)](_0x278313[_0xe51e4d(0x1b4)]):-0x1!==_0x278313[_0xe51e4d(0x1b4)][_0xe51e4d(0x1db)](_0xe51e4d(0x1d2))&&_0x1595b1[_0xe51e4d(0x1cd)](_0x278313[_0xe51e4d(0x1b4)]);}}return _0x2189ac[_0xe51e4d(0x1d9)]||console[_0xe51e4d(0x1b3)](_0xe51e4d(0x1c7)),[..._0x1595b1,..._0x2189ac][_0xe51e4d(0x1d0)]('\x20')[_0xe51e4d(0x1c1)]();}export function getConverterOptions(_0xeb747d){const _0x29935b=_0x24d8,_0x20772e=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1d4)](_0x29935b(0x1af)),_0x2b7c32=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1d4)](_0x29935b(0x1c9)),_0x4e8bc6=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1d4)](_0x29935b(0x1cc)),_0x278580={};if(_0x20772e&&_0x2b7c32){const _0xe74f80=getComments(_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1b8)](_0x29935b(0x1c9))[_0x29935b(0x1bd)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x29935b(0x1ac)](_0xe74f80)[_0x29935b(0x1d9)]&&(_0x278580[_0x29935b(0x1c4)]=_0xe74f80);}if(_0x20772e&&_0x4e8bc6){const _0x316e12=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1b8)](_0x29935b(0x1cc)),_0x454be0=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1b8)](_0x29935b(0x1af)),_0x4d7adc=getSuggestions(_0x316e12[_0x29935b(0x1ae)]({'toJSON':!0x0}),_0x454be0[_0x29935b(0x1be)]);Object[_0x29935b(0x1ac)](_0x4d7adc)[_0x29935b(0x1d9)]&&(_0x278580[_0x29935b(0x1c2)]=_0x4d7adc);}return(_0x278580[_0x29935b(0x1c2)]||_0x278580[_0x29935b(0x1c4)])&&(_0x278580[_0x29935b(0x1c6)]=new Intl[(_0x29935b(0x1a9))]()[_0x29935b(0x1ab)]()[_0x29935b(0x1ad)]),_0x278580;}export function getComments(_0x52339a){const _0x1703e5=_0x24d8,_0x2d1853={};if(!_0x52339a[_0x1703e5(0x1d9)])return _0x2d1853;for(const _0x538d63 of _0x52339a)_0x538d63[_0x1703e5(0x1c4)][_0x1703e5(0x1cb)](_0x47de94=>{const _0x4013e6=_0x1703e5;void 0x0===_0x2d1853[_0x538d63['id']]&&(_0x2d1853[_0x538d63['id']]=[]),_0x2d1853[_0x538d63['id']][_0x4013e6(0x1cd)]({'author':_0x47de94[_0x4013e6(0x1d3)][_0x4013e6(0x1d1)],'content':_0x47de94[_0x4013e6(0x1bb)],'created':_0x47de94[_0x4013e6(0x1c0)],'is_resolved':_0x538d63[_0x4013e6(0x1da)]});});return _0x2d1853;}export function getSuggestions(_0xaf9259,_0x4e736e){const _0x482656=_0x24d8,_0xa05338={};if(!_0xaf9259[_0x482656(0x1d9)]||!_0x4e736e[_0x482656(0x1d9)])return _0xa05338;for(const _0x11a928 of _0xaf9259)_0xa05338[_0x11a928['id']]={'author':_0x4e736e[_0x482656(0x1b8)](_0x11a928[_0x482656(0x1ca)])[_0x482656(0x1d1)],'created':_0x11a928[_0x482656(0x1c0)]};return _0xa05338;}
23
+ (function(_0x2c1b41,_0x4b6bdf){const _0xba24ce=_0x555a,_0x5196e1=_0x2c1b41();while(!![]){try{const _0x29dab8=-parseInt(_0xba24ce(0xd7))/0x1+parseInt(_0xba24ce(0xf4))/0x2*(parseInt(_0xba24ce(0xe6))/0x3)+-parseInt(_0xba24ce(0xd9))/0x4*(-parseInt(_0xba24ce(0x106))/0x5)+parseInt(_0xba24ce(0xfc))/0x6*(parseInt(_0xba24ce(0xe7))/0x7)+-parseInt(_0xba24ce(0xf8))/0x8*(-parseInt(_0xba24ce(0xf0))/0x9)+parseInt(_0xba24ce(0x102))/0xa*(parseInt(_0xba24ce(0xe0))/0xb)+-parseInt(_0xba24ce(0xe4))/0xc;if(_0x29dab8===_0x4b6bdf)break;else _0x5196e1['push'](_0x5196e1['shift']());}catch(_0x2545aa){_0x5196e1['push'](_0x5196e1['shift']());}}}(_0x5a8b,0x9f27f));export function getStyles(_0x2ff660){const _0x39edfa=_0x555a;if(!_0x2ff660)return new Promise(_0x114d12=>_0x114d12(''));const _0x302603=[];for(const _0xeebe4b of _0x2ff660)_0x39edfa(0xe5)!==_0xeebe4b?_0x302603[_0x39edfa(0xf3)](window[_0x39edfa(0xdf)](_0xeebe4b)[_0x39edfa(0xf5)](_0x1883c1=>_0x1883c1[_0x39edfa(0x103)]())):_0x302603[_0x39edfa(0xf3)](u());return Promise[_0x39edfa(0x107)](_0x302603)[_0x39edfa(0xf5)](_0x1c0051=>_0x1c0051[_0x39edfa(0xec)]('\x20')[_0x39edfa(0xe8)]());}function u(){const _0x57f600=_0x555a,_0x295d04=[],_0xb4ad83=[];for(const _0x1bd2cb of Array[_0x57f600(0x105)](document[_0x57f600(0xee)])){if(_0x1bd2cb[_0x57f600(0xf6)][_0x57f600(0x100)](_0x57f600(0xda))){for(const _0x50ddb1 of Array[_0x57f600(0x105)](_0x1bd2cb[_0x57f600(0xe9)]))-0x1!==_0x50ddb1[_0x57f600(0xd5)][_0x57f600(0xed)](_0x57f600(0xf1))?_0x295d04[_0x57f600(0xf3)](_0x50ddb1[_0x57f600(0xd5)]):-0x1!==_0x50ddb1[_0x57f600(0xd5)][_0x57f600(0xed)](_0x57f600(0xf7))&&_0xb4ad83[_0x57f600(0xf3)](_0x50ddb1[_0x57f600(0xd5)]);}}return _0x295d04[_0x57f600(0xfa)]||console[_0x57f600(0xd8)](_0x57f600(0x101)),[..._0xb4ad83,..._0x295d04][_0x57f600(0xec)]('\x20')[_0x57f600(0xe8)]();}function _0x5a8b(){const _0x6ee39e=['keys','fetch','27038FGYLnR','CommentsRepository','get','users','19051044VauBMO','EDITOR_STYLES','27FWvluD','3039449beBWjT','trim','cssRules','content','name','join','indexOf','styleSheets','authorId','27wsCkOG','.ck-content','createdAt','push','161872CKBXvt','then','ownerNode',':root','1760872BZbxdA','resolvedOptions','length','author','12NwuKrc','getSuggestions','isResolved','timeZone','hasAttribute','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.','470pWoPYd','text','TrackChanges','from','1672795HNFXhB','all','has','timezone','map','plugins','suggestions','cssText','DateTimeFormat','467760kGpxUq','warn','4knMNBt','data-cke','comments','Users','getCommentThreads'];_0x5a8b=function(){return _0x6ee39e;};return _0x5a8b();}function _0x555a(_0x3cbc42,_0x1dba12){const _0x5a8b45=_0x5a8b();return _0x555a=function(_0x555abf,_0x493fee){_0x555abf=_0x555abf-0xd5;let _0xd4fe2f=_0x5a8b45[_0x555abf];return _0xd4fe2f;},_0x555a(_0x3cbc42,_0x1dba12);}export function getConverterOptions(_0x157c81){const _0x488716=_0x555a,_0xf1e314=_0x157c81[_0x488716(0x10b)][_0x488716(0x108)](_0x488716(0xdc)),_0x24b27b=_0x157c81[_0x488716(0x10b)][_0x488716(0x108)](_0x488716(0xe1)),_0x4955ae=_0x157c81[_0x488716(0x10b)][_0x488716(0x108)](_0x488716(0x104)),_0x94afa4={};if(_0xf1e314&&_0x24b27b){const _0x489109=getComments(_0x157c81[_0x488716(0x10b)][_0x488716(0xe2)](_0x488716(0xe1))[_0x488716(0xdd)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x488716(0xde)](_0x489109)[_0x488716(0xfa)]&&(_0x94afa4[_0x488716(0xdb)]=_0x489109);}if(_0xf1e314&&_0x4955ae){const _0x51b160=_0x157c81[_0x488716(0x10b)][_0x488716(0xe2)](_0x488716(0x104)),_0x1ef15b=_0x157c81[_0x488716(0x10b)][_0x488716(0xe2)](_0x488716(0xdc)),_0x1bf8c2=getSuggestions(_0x51b160[_0x488716(0xfd)]({'toJSON':!0x0}),_0x1ef15b[_0x488716(0xe3)]);Object[_0x488716(0xde)](_0x1bf8c2)[_0x488716(0xfa)]&&(_0x94afa4[_0x488716(0x10c)]=_0x1bf8c2);}return(_0x94afa4[_0x488716(0x10c)]||_0x94afa4[_0x488716(0xdb)])&&(_0x94afa4[_0x488716(0x109)]=new Intl[(_0x488716(0xd6))]()[_0x488716(0xf9)]()[_0x488716(0xff)]),_0x94afa4;}export function getComments(_0x1867c9){const _0x15c869=_0x555a,_0x5a55e8={};if(!_0x1867c9[_0x15c869(0xfa)])return _0x5a55e8;for(const _0x19e8da of _0x1867c9)_0x19e8da[_0x15c869(0xdb)][_0x15c869(0x10a)](_0x2148d6=>{const _0xaa387=_0x15c869;void 0x0===_0x5a55e8[_0x19e8da['id']]&&(_0x5a55e8[_0x19e8da['id']]=[]),_0x5a55e8[_0x19e8da['id']][_0xaa387(0xf3)]({'author':_0x2148d6[_0xaa387(0xfb)][_0xaa387(0xeb)],'content':_0x2148d6[_0xaa387(0xea)],'created':_0x2148d6[_0xaa387(0xf2)],'is_resolved':_0x19e8da[_0xaa387(0xfe)]});});return _0x5a55e8;}export function getSuggestions(_0x30184b,_0x2e7ea5){const _0x3349d7=_0x555a,_0x13239={};if(!_0x30184b[_0x3349d7(0xfa)]||!_0x2e7ea5[_0x3349d7(0xfa)])return _0x13239;for(const _0x518a5d of _0x30184b)_0x13239[_0x518a5d['id']]={'author':_0x2e7ea5[_0x3349d7(0xe2)](_0x518a5d[_0x3349d7(0xef)])[_0x3349d7(0xeb)],'created':_0x518a5d[_0x3349d7(0xf2)]};return _0x13239;}