@ckeditor/ckeditor5-paste-from-office-enhanced 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.
- package/build/paste-from-office-enhanced.js +1 -1
- package/dist/content-index.css +4 -0
- package/dist/editor-index.css +4 -0
- package/dist/index.css +4 -0
- package/dist/types/augmentation.d.ts +14 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/normalizers/inliner/msofficestylesinliner.d.ts +46 -0
- package/dist/types/normalizers/inliner/utils.d.ts +132 -0
- package/dist/types/normalizers/propagator/msofficeinlinestylepropagator.d.ts +47 -0
- package/dist/types/normalizers/propagator/utils.d.ts +101 -0
- package/dist/types/pastefromofficeenhanced.d.ts +33 -0
- package/dist/types/pastefromofficeenhancedinliner.d.ts +33 -0
- package/dist/types/pastefromofficeenhancedpropagator.d.ts +40 -0
- package/dist/types/utils.d.ts +15 -0
- package/package.json +4 -3
- package/src/index.js +1 -1
- package/src/normalizers/inliner/msofficestylesinliner.js +1 -1
- package/src/normalizers/inliner/utils.js +1 -1
- package/src/normalizers/propagator/msofficeinlinestylepropagator.js +1 -1
- package/src/normalizers/propagator/utils.js +1 -1
- package/src/pastefromofficeenhanced.js +1 -1
- package/src/pastefromofficeenhancedinliner.js +1 -1
- package/src/pastefromofficeenhancedpropagator.js +1 -1
- package/src/utils.js +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
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 paste-from-office-enhanced/normalizers/msofficeinlinestylepropagator/utils
|
|
11
|
+
*/
|
|
12
|
+
import type { UpcastWriter, ViewElement } from 'ckeditor5/src/engine.js';
|
|
13
|
+
/**
|
|
14
|
+
* The list of all `CSS` properties that need to be propagated.
|
|
15
|
+
*
|
|
16
|
+
* @protected
|
|
17
|
+
*/
|
|
18
|
+
export declare const CSS_PROPERTIES_TO_PROPAGATE: readonly ["color", "font-family", "font-size", "text-decoration", "text-decoration-line", "font-weight", "font-style", "vertical-align"];
|
|
19
|
+
/**
|
|
20
|
+
* The list of `CSS` properties that needs to be propagated as an inline `<span>` element.
|
|
21
|
+
*
|
|
22
|
+
* It's a subset of `CSS_PROPERTIES_TO_PROPAGATE`.
|
|
23
|
+
*
|
|
24
|
+
* @protected
|
|
25
|
+
*/
|
|
26
|
+
export declare const CSS_PROPERTIES_TO_BE_SPANS: readonly ["color", "font-family", "font-size"];
|
|
27
|
+
export type CSSPropertyValueAssertion = (value: string) => boolean;
|
|
28
|
+
export type CSSPropertyValueToElementNameMap = readonly [string | CSSPropertyValueAssertion, string];
|
|
29
|
+
/**
|
|
30
|
+
* The map of style to element propagate as a HTML elements
|
|
31
|
+
* (e.g. `text-decoration` with the `underline` value is propagated to `<u>`,
|
|
32
|
+
* or `font-weight` with the `bold` value is propagated to `<strong>`).
|
|
33
|
+
*
|
|
34
|
+
* @protected
|
|
35
|
+
*/
|
|
36
|
+
export declare const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS: {
|
|
37
|
+
[key in Exclude<typeof CSS_PROPERTIES_TO_PROPAGATE[number], typeof CSS_PROPERTIES_TO_BE_SPANS[number]>]: ReadonlyArray<CSSPropertyValueToElementNameMap>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Checks whether the given property should be propagated at all.
|
|
41
|
+
*
|
|
42
|
+
* @param property
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
export declare function isPropertyToBePropagated(property: string): property is typeof CSS_PROPERTIES_TO_PROPAGATE[number];
|
|
46
|
+
/**
|
|
47
|
+
* Checks whether the given property should be propagated as a span element.
|
|
48
|
+
*
|
|
49
|
+
* @param property
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
export declare function isPropertyToBePropagatedAsSpan(property: string): property is typeof CSS_PROPERTIES_TO_BE_SPANS[number];
|
|
53
|
+
/**
|
|
54
|
+
* Checks whether the given property should be propagated as an HTML element.
|
|
55
|
+
*
|
|
56
|
+
* @param property
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
export declare function isPropertyToBePropagatedAsHTMLElement(property: string): property is keyof typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS;
|
|
60
|
+
/**
|
|
61
|
+
* Collects a list of styles to propagate from a block element.
|
|
62
|
+
*
|
|
63
|
+
* @param element The source `ViewElement`.
|
|
64
|
+
* @returns List of valid CSS properties to propagate.
|
|
65
|
+
*/
|
|
66
|
+
export declare function getStylePropertyNamesToPropagate(element: ViewElement): Array<typeof CSS_PROPERTIES_TO_PROPAGATE[number]>;
|
|
67
|
+
/**
|
|
68
|
+
* Executes styles propagation.
|
|
69
|
+
*
|
|
70
|
+
* @param element The source `ViewElement`.
|
|
71
|
+
* @param writer `UpcastWriter` instance.
|
|
72
|
+
* @param propertiesToPropagate List of valid CSS properties to propagate.
|
|
73
|
+
*/
|
|
74
|
+
export declare function propagateStyleProperties(element: ViewElement, writer: UpcastWriter, propertiesToPropagate: Array<string>): void;
|
|
75
|
+
/**
|
|
76
|
+
* Creates an `HTML` structure based on styles propagated from parent block element.
|
|
77
|
+
*
|
|
78
|
+
* @param element The source `ViewElement`.
|
|
79
|
+
* @param writer `UpcastWriter` instance.
|
|
80
|
+
* @param stylesToBeHtmlElements List of styles properties to be propagated as a HTML elements.
|
|
81
|
+
*/
|
|
82
|
+
export declare function propagateStylesAsHTMLElements(element: ViewElement, writer: UpcastWriter, stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>): void;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a `span` as a first child of the `element` with styles propagated from parent block element.
|
|
85
|
+
*
|
|
86
|
+
* @param element The source `ViewElement`.
|
|
87
|
+
* @param writer `UpcastWriter` instance.
|
|
88
|
+
* @param spanStyles List of styles properties to propagate.
|
|
89
|
+
*/
|
|
90
|
+
export declare function propagateStylesAsSpan(element: ViewElement, writer: UpcastWriter, spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>): void;
|
|
91
|
+
/**
|
|
92
|
+
* Collects and filters element styles into proper objects for further propagation.
|
|
93
|
+
*
|
|
94
|
+
* @param element The source `ViewElement`.
|
|
95
|
+
* @param propertiesToPropagate The array of style properties to propagate.
|
|
96
|
+
* @returns An object with properties to propagate filtered into styles that will be propagated onto `span` and as a HTML elements.
|
|
97
|
+
*/
|
|
98
|
+
export declare function getStylesToPropagate(element: ViewElement, propertiesToPropagate: Array<string>): {
|
|
99
|
+
spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>;
|
|
100
|
+
stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>;
|
|
101
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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 paste-from-office-enhanced/pastefromofficeenhanced
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
14
|
+
import PasteFromOfficeEnhancedInliner from './pastefromofficeenhancedinliner.js';
|
|
15
|
+
import PasteFromOfficeEnhancedPropagator from './pastefromofficeenhancedpropagator.js';
|
|
16
|
+
/**
|
|
17
|
+
* The Paste from Office Enhanced feature.
|
|
18
|
+
*
|
|
19
|
+
* Introduces seamless content pasting from MS Office applications with improved formatting retention for a smoother
|
|
20
|
+
* and more efficient workflow.
|
|
21
|
+
*
|
|
22
|
+
* For a detailed overview, check the {@glink features/pasting/paste-from-office Paste from Office Enhanced feature guide}.
|
|
23
|
+
*/
|
|
24
|
+
export default class PasteFromOfficeEnhanced extends Plugin {
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get pluginName(): "PasteFromOfficeEnhanced";
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static get requires(): readonly ["PasteFromOffice", typeof PasteFromOfficeEnhancedInliner, typeof PasteFromOfficeEnhancedPropagator];
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 paste-from-office-enhanced/pastefromofficeenhancedinliner
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The Paste from Office Enhanced inliner plugin that inlines styles passed along the content from MS Office.
|
|
15
|
+
*/
|
|
16
|
+
export default class PasteFromOfficeEnhancedInliner extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "PasteFromOfficeEnhancedInliner";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get requires(): readonly ["PasteFromOffice"];
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
init(): void;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
afterInit(): void;
|
|
33
|
+
}
|
|
@@ -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 paste-from-office-enhanced/pastefromofficeenhancedpropagator
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The Paste from Office Enhanced propagator that propagates inline styles from block elements to:
|
|
15
|
+
* * `span` element with `style` properties,
|
|
16
|
+
* * `HTML` structures based block element styles.
|
|
17
|
+
*/
|
|
18
|
+
export default class PasteFromOfficeEnhancedPropagator extends Plugin {
|
|
19
|
+
licenseKey: string;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get pluginName(): "PasteFromOfficeEnhancedPropagator";
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get requires(): readonly ["PasteFromOffice"];
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
constructor(editor: Editor);
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
init(): void;
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
destroy(): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
* Check if content was pasted from MS Excel.
|
|
11
|
+
*
|
|
12
|
+
* @param html
|
|
13
|
+
* @returns True if content is pasted from MS Excel
|
|
14
|
+
*/
|
|
15
|
+
export declare function isMSExcelContent(html: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-paste-from-office-enhanced",
|
|
3
|
-
"version": "41.
|
|
3
|
+
"version": "41.3.0-alpha.3",
|
|
4
4
|
"description": "Enhanced paste from Office feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -22,14 +22,15 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "src/index.js",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"ckeditor5": "41.
|
|
26
|
-
"@ckeditor/ckeditor5-paste-from-office": "41.
|
|
25
|
+
"ckeditor5": "41.3.0-alpha.3",
|
|
26
|
+
"@ckeditor/ckeditor5-paste-from-office": "41.3.0-alpha.3"
|
|
27
27
|
},
|
|
28
28
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
29
29
|
"author": "CKSource (http://cksource.com/)",
|
|
30
30
|
"homepage": "https://ckeditor.com/ckeditor-5",
|
|
31
31
|
"bugs": "https://support.ckeditor.com/hc/en-us/requests/new",
|
|
32
32
|
"files": [
|
|
33
|
+
"dist",
|
|
33
34
|
"lang",
|
|
34
35
|
"src/**/*.js",
|
|
35
36
|
"src/**/*.d.ts",
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x30de07,_0x3ec0bd){var _0x1687f0=_0x4abc,_0x387599=_0x30de07();while(!![]){try{var _0x18c62a=-parseInt(_0x1687f0(0xcb))/0x1+-parseInt(_0x1687f0(0xcd))/0x2+-parseInt(_0x1687f0(0xc8))/0x3*(parseInt(_0x1687f0(0xcc))/0x4)+parseInt(_0x1687f0(0xca))/0x5+-parseInt(_0x1687f0(0xcf))/0x6*(parseInt(_0x1687f0(0xc7))/0x7)+-parseInt(_0x1687f0(0xc9))/0x8*(-parseInt(_0x1687f0(0xce))/0x9)+parseInt(_0x1687f0(0xd0))/0xa;if(_0x18c62a===_0x3ec0bd)break;else _0x387599['push'](_0x387599['shift']());}catch(_0x1accdc){_0x387599['push'](_0x387599['shift']());}}}(_0x1bae,0x8a908));export{default as PasteFromOfficeEnhanced}from'./pastefromofficeenhanced.js';function _0x4abc(_0x1472f5,_0x10d5de){var _0x1bae28=_0x1bae();return _0x4abc=function(_0x4abc97,_0x18b635){_0x4abc97=_0x4abc97-0xc7;var _0x490c14=_0x1bae28[_0x4abc97];return _0x490c14;},_0x4abc(_0x1472f5,_0x10d5de);}function _0x1bae(){var _0xafd654=['438212LVZaom','1352708NxLvMc','1059813NyFEai','12ckHvor','30042710CSdmXD','3464321hARdBK','18UTfkUQ','8KrXKBs','1226795KVYABK','476349ywCxQE'];_0x1bae=function(){return _0xafd654;};return _0x1bae();}import'./augmentation.js';
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x48b467=_0x2de6;function _0x2de6(_0x49a99c,_0x3c64bf){const _0xa03315=_0xa033();return _0x2de6=function(_0x2de6da,_0x1b72f4){_0x2de6da=_0x2de6da-0x1c7;let _0x5d221e=_0xa03315[_0x2de6da];return _0x5d221e;},_0x2de6(_0x49a99c,_0x3c64bf);}(function(_0x2d86b8,_0x46b2c6){const _0x59aacc=_0x2de6,_0x5df16b=_0x2d86b8();while(!![]){try{const _0x307115=-parseInt(_0x59aacc(0x1db))/0x1*(parseInt(_0x59aacc(0x1d6))/0x2)+parseInt(_0x59aacc(0x1cf))/0x3+parseInt(_0x59aacc(0x1c9))/0x4+-parseInt(_0x59aacc(0x1d2))/0x5*(parseInt(_0x59aacc(0x1c8))/0x6)+-parseInt(_0x59aacc(0x1c7))/0x7+parseInt(_0x59aacc(0x1d3))/0x8+-parseInt(_0x59aacc(0x1cd))/0x9;if(_0x307115===_0x46b2c6)break;else _0x5df16b['push'](_0x5df16b['shift']());}catch(_0x19fd40){_0x5df16b['push'](_0x5df16b['shift']());}}}(_0xa033,0x46089));import{UpcastWriter as _0xeca461}from'ckeditor5/src/engine.js';import{MSWordNormalizer as _0x39aff4}from'@ckeditor/ckeditor5-paste-from-office';function _0xa033(){const _0x512736=['elementStart','document','10495kJplgf','2572696RWxNaY','size','values','322756SHqets','item','content','setStyle','_parsedData','1EyyqXj','createRangeIn','type','1733662dqaVaW','1284oUDpUc','1630276JWhLeC','execute','hasStyle','isActive','1285002yMVckF','from','1676127hTXVFc'];_0xa033=function(){return _0x512736;};return _0xa033();}import{isMSExcelContent as _0x6a31d7}from'../../utils.js';import{extractStyles as _0x346d96,expandStyles as _0x3f0030,getMatchingStyles as _0xb19a2d,flattenStyleDefinitions as _0x3848c4}from'./utils.js';export default class u extends _0x39aff4{[_0x48b467(0x1ca)](_0x5dbf31){const _0x2f840c=_0x48b467,{body:_0x384a62,styles:_0x5b4a68}=_0x5dbf31[_0x2f840c(0x1da)],_0xdf0f81=new _0xeca461(_0x384a62[_0x2f840c(0x1d1)]),_0x2a7b9f=_0xdf0f81[_0x2f840c(0x1dc)](_0x384a62),_0x5073cc=_0x346d96(_0x5b4a68),_0x1e5145=_0x3f0030(_0x5073cc);for(const _0x3c2a8f of _0x2a7b9f){if(_0x2f840c(0x1d0)!==_0x3c2a8f[_0x2f840c(0x1dd)])continue;const _0x2a4d4b=_0xb19a2d(_0x3c2a8f[_0x2f840c(0x1d7)],_0x1e5145);if(_0x2a4d4b[_0x2f840c(0x1d4)]){const _0x12bfb2=_0x3848c4(Array[_0x2f840c(0x1ce)](_0x2a4d4b[_0x2f840c(0x1d5)]()));for(const _0x45c2f9 in _0x12bfb2){const _0x4f9a4f=_0x3c2a8f[_0x2f840c(0x1d7)];_0x4f9a4f[_0x2f840c(0x1cb)](_0x45c2f9)||_0xdf0f81[_0x2f840c(0x1d9)](_0x45c2f9,_0x12bfb2[_0x45c2f9],_0x4f9a4f);}}}_0x5dbf31[_0x2f840c(0x1d8)]=_0x384a62;}[_0x48b467(0x1cc)](_0x5c151c){const _0x1968d0=_0x48b467;return super[_0x1968d0(0x1cc)](_0x5c151c)||_0x6a31d7(_0x5c151c);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x4a4051,_0x2e6061){const _0x406a0a=_0x19f4,_0xfcf588=_0x4a4051();while(!![]){try{const _0x3557ce=parseInt(_0x406a0a(0x1d1))/0x1*(parseInt(_0x406a0a(0x1e1))/0x2)+parseInt(_0x406a0a(0x1e6))/0x3*(-parseInt(_0x406a0a(0x1d9))/0x4)+-parseInt(_0x406a0a(0x1e4))/0x5*(-parseInt(_0x406a0a(0x1dd))/0x6)+-parseInt(_0x406a0a(0x1d3))/0x7*(parseInt(_0x406a0a(0x1e3))/0x8)+-parseInt(_0x406a0a(0x1e5))/0x9*(-parseInt(_0x406a0a(0x1d8))/0xa)+parseInt(_0x406a0a(0x1d7))/0xb+-parseInt(_0x406a0a(0x1df))/0xc;if(_0x3557ce===_0x2e6061)break;else _0xfcf588['push'](_0xfcf588['shift']());}catch(_0x23c624){_0xfcf588['push'](_0xfcf588['shift']());}}}(_0x5ce2,0x4a244));const S=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function _0x5ce2(){const _0x7123d5=['4624032lwmsmj','groups','36002VeqeLu','name','3320rcUlJB','12735tNuWEf','144549vvPPtI','6NohCZy','length','assign','hasClass','split','trim','initial','getPropertyValue','selectorText','6EigHTU','exec','3143WvfHnM','cssRules','map','tagName','1779998FKCYTo','230mlAQjO','617860vfTkta','set','className','style','1284hPamEV','push'];_0x5ce2=function(){return _0x7123d5;};return _0x5ce2();}export function getMatchingStyles(_0x283b8a,_0x430bb9){const _0x19fb2d=_0x19f4,_0x4a72fd=new Map();for(const [_0x546619,_0x193e4]of _0x430bb9){if(!_0x546619[_0x19fb2d(0x1d6)]&&!_0x546619[_0x19fb2d(0x1db)])continue;const _0x458aae=!_0x546619[_0x19fb2d(0x1d6)]||_0x283b8a[_0x19fb2d(0x1e2)]===_0x546619[_0x19fb2d(0x1d6)],_0x386770=!_0x546619[_0x19fb2d(0x1db)]||_0x283b8a[_0x19fb2d(0x1e9)](_0x546619[_0x19fb2d(0x1db)]);_0x458aae&&_0x386770&&_0x4a72fd[_0x19fb2d(0x1da)](_0x546619,_0x193e4);}return _0x4a72fd;}export function extractStyles(_0xd4577b){const _0x2ce299=_0x19f4,_0x3a4da7={};for(const _0x2dcc69 of _0xd4577b)for(const _0x2f4745 of _0x2dcc69[_0x2ce299(0x1d4)])if(_0x2f4745 instanceof CSSStyleRule){const _0x9e5dc0=parseCSSStyleDeclaration(_0x2f4745[_0x2ce299(0x1dc)]);_0x3a4da7[_0x2f4745[_0x2ce299(0x1d0)]]=Object[_0x2ce299(0x1e8)]({},_0x3a4da7[_0x2f4745[_0x2ce299(0x1d0)]]||{},_0x9e5dc0);}return _0x3a4da7;}export function expandStyles(_0x193ba6){const _0x39b584=_0x19f4,_0x12b1c8=new Map();for(const _0x52e67e in _0x193ba6){const _0x586116=parseCSSSelector(_0x52e67e),_0x4dc9d8=_0x193ba6[_0x52e67e];for(const _0x32b420 of _0x586116)_0x12b1c8[_0x39b584(0x1da)](_0x32b420,_0x4dc9d8);}return _0x12b1c8;}export function parseCSSStyleDeclaration(_0x40af0b){const _0x430d9f=_0x19f4,_0x35744c={};for(let _0x3b1601=0x0;_0x3b1601<_0x40af0b[_0x430d9f(0x1e7)];_0x3b1601++){const _0x4f3812=_0x40af0b[_0x3b1601],_0x352cea=_0x40af0b[_0x430d9f(0x1cf)](_0x4f3812);_0x430d9f(0x1ce)!==_0x352cea&&(_0x35744c[_0x4f3812]=_0x352cea);}return _0x35744c;}export function parseCSSSelector(_0x443d84){const _0xc18fad=_0x19f4,_0x4db4ed=_0x443d84[_0xc18fad(0x1ea)](',')[_0xc18fad(0x1d5)](_0x28ed2b=>_0x28ed2b[_0xc18fad(0x1cd)]()),_0x473b31=[];for(const _0xad7906 of _0x4db4ed){const _0xe753db=S[_0xc18fad(0x1d2)](_0xad7906);_0xe753db&&_0x473b31[_0xc18fad(0x1de)](_0xe753db[_0xc18fad(0x1e0)]);}return _0x473b31;}function _0x19f4(_0x521c7a,_0x294824){const _0x5ce26e=_0x5ce2();return _0x19f4=function(_0x19f45b,_0xbb5b3f){_0x19f45b=_0x19f45b-0x1cd;let _0x21d0d5=_0x5ce26e[_0x19f45b];return _0x21d0d5;},_0x19f4(_0x521c7a,_0x294824);}export function flattenStyleDefinitions(_0x407caf){const _0x5260dc=_0x19f4,_0x46950d={};for(const _0x6f64d1 of _0x407caf)Object[_0x5260dc(0x1e8)](_0x46950d,_0x6f64d1);return _0x46950d;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x187ed0=_0x1045;function _0x2c06(){const _0x1aaf3e=['blockElements','1599825taSdSE','font','name','includes','isActive','content','7027960WWALeC','16BPGfWM','document','121416LxVLia','_parsedData','getItems','stylesProcessor','execute','18zJAgDl','1255009pBySLY','5MvXIiT','204048ylrIpf','createRangeIn','element','4937370WoesmE','34909850NFDzom'];_0x2c06=function(){return _0x1aaf3e;};return _0x2c06();}(function(_0x5e5289,_0x4cfcfe){const _0xe7a2a4=_0x1045,_0x174fbc=_0x5e5289();while(!![]){try{const _0x149cfe=-parseInt(_0xe7a2a4(0x1ae))/0x1+parseInt(_0xe7a2a4(0x1bc))/0x2*(-parseInt(_0xe7a2a4(0x1b7))/0x3)+-parseInt(_0xe7a2a4(0x1b4))/0x4*(parseInt(_0xe7a2a4(0x1a7))/0x5)+parseInt(_0xe7a2a4(0x1ab))/0x6+parseInt(_0xe7a2a4(0x1a6))/0x7*(parseInt(_0xe7a2a4(0x1b5))/0x8)+parseInt(_0xe7a2a4(0x1a8))/0x9+parseInt(_0xe7a2a4(0x1ac))/0xa;if(_0x149cfe===_0x4cfcfe)break;else _0x174fbc['push'](_0x174fbc['shift']());}catch(_0x169842){_0x174fbc['push'](_0x174fbc['shift']());}}}(_0x2c06,0xedcef));import{UpcastWriter as _0xb16100,DomConverter as _0x4da604,ViewDocument as _0x7efb56}from'ckeditor5/src/engine.js';import{MSWordNormalizer as _0x1be541}from'@ckeditor/ckeditor5-paste-from-office';import{isMSExcelContent as _0x3033df}from'../../utils.js';function _0x1045(_0x220570,_0x702a29){const _0x2c0669=_0x2c06();return _0x1045=function(_0x104599,_0xe454ca){_0x104599=_0x104599-0x1a6;let _0x28cf3b=_0x2c0669[_0x104599];return _0x28cf3b;},_0x1045(_0x220570,_0x702a29);}import{getStylePropertyNamesToPropagate as _0x345945,propagateStyleProperties as _0x66bdeb}from'./utils.js';export default class l extends _0x1be541{[_0x187ed0(0x1bb)](_0x39554d){const _0x1faf7a=_0x187ed0,{body:_0x59ce4a}=_0x39554d[_0x1faf7a(0x1b8)],_0x2e4787=new _0xb16100(_0x59ce4a[_0x1faf7a(0x1b6)]),_0x36ea5f=_0x2e4787[_0x1faf7a(0x1a9)](_0x59ce4a),_0x100627=new _0x7efb56(_0x2e4787[_0x1faf7a(0x1b6)][_0x1faf7a(0x1ba)]),_0x49952e=[...new _0x4da604(_0x100627)[_0x1faf7a(0x1ad)],_0x1faf7a(0x1af)],_0x27efaf=_0x36ea5f[_0x1faf7a(0x1b9)]();for(const _0x438f69 of _0x27efaf)if(_0x438f69['is'](_0x1faf7a(0x1aa))&&_0x49952e[_0x1faf7a(0x1b1)](_0x438f69[_0x1faf7a(0x1b0)])){const _0x36eb6f=_0x345945(_0x438f69);_0x66bdeb(_0x438f69,_0x2e4787,_0x36eb6f);}_0x39554d[_0x1faf7a(0x1b3)]=_0x59ce4a;}[_0x187ed0(0x1b2)](_0x43309d){const _0x510456=_0x187ed0;return super[_0x510456(0x1b2)](_0x43309d)||_0x3033df(_0x43309d);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x18bce8=_0x2976;(function(_0x512acc,_0x1464e3){const _0x37745d=_0x2976,_0x31cf97=_0x512acc();while(!![]){try{const _0xb7d7a5=parseInt(_0x37745d(0x179))/0x1+-parseInt(_0x37745d(0x153))/0x2*(parseInt(_0x37745d(0x14f))/0x3)+parseInt(_0x37745d(0x173))/0x4+parseInt(_0x37745d(0x16d))/0x5*(parseInt(_0x37745d(0x168))/0x6)+-parseInt(_0x37745d(0x156))/0x7*(-parseInt(_0x37745d(0x151))/0x8)+parseInt(_0x37745d(0x16c))/0x9*(parseInt(_0x37745d(0x16e))/0xa)+parseInt(_0x37745d(0x158))/0xb*(-parseInt(_0x37745d(0x170))/0xc);if(_0xb7d7a5===_0x1464e3)break;else _0x31cf97['push'](_0x31cf97['shift']());}catch(_0x49808d){_0x31cf97['push'](_0x31cf97['shift']());}}}(_0x5dbd,0x5a05f));export const CSS_PROPERTIES_TO_PROPAGATE=[_0x18bce8(0x166),_0x18bce8(0x15d),_0x18bce8(0x165),_0x18bce8(0x15a),_0x18bce8(0x15e),_0x18bce8(0x164),_0x18bce8(0x155),_0x18bce8(0x150)];export const CSS_PROPERTIES_TO_BE_SPANS=[_0x18bce8(0x166),_0x18bce8(0x15d),_0x18bce8(0x165)];export const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS={'font-style':[[_0x18bce8(0x152),'i']],'font-weight':[[_0x18bce8(0x17b),_0x18bce8(0x175)],[_0x18bce8(0x15b),_0x18bce8(0x175)],[_0x18bce8(0x167),_0x18bce8(0x175)],[_0x4cea81=>Number(_0x4cea81)>=0x258,_0x18bce8(0x175)]],'text-decoration':[[_0x18bce8(0x15f),'u'],[_0x18bce8(0x176),'s']],'text-decoration-line':[[_0x18bce8(0x15f),'u'],[_0x18bce8(0x176),'s']],'vertical-align':[[_0x18bce8(0x16f),_0x18bce8(0x16f)],[_0x18bce8(0x172),_0x18bce8(0x169)]]};export function isPropertyToBePropagated(_0x11a386){const _0x3220a2=_0x18bce8;return CSS_PROPERTIES_TO_PROPAGATE[_0x3220a2(0x177)](_0x11a386);}export function isPropertyToBePropagatedAsSpan(_0x3c61bb){const _0x4014dd=_0x18bce8;return CSS_PROPERTIES_TO_BE_SPANS[_0x4014dd(0x177)](_0x3c61bb);}export function isPropertyToBePropagatedAsHTMLElement(_0x18e07c){return _0x18e07c in CSS_PROPERTIES_TO_BE_HTML_ELEMENTS;}export function getStylePropertyNamesToPropagate(_0x5e792d){const _0x18bf94=_0x18bce8;return Array[_0x18bf94(0x154)](_0x5e792d[_0x18bf94(0x178)]())[_0x18bf94(0x161)](isPropertyToBePropagated);}export function propagateStyleProperties(_0x4c2f89,_0x5db65e,_0xcebe98){const {spanStyles:_0x1e9ec7,stylesToBeHtmlElements:_0x49f18d}=getStylesToPropagate(_0x4c2f89,_0xcebe98);propagateStylesAsHTMLElements(_0x4c2f89,_0x5db65e,_0x49f18d),propagateStylesAsSpan(_0x4c2f89,_0x5db65e,_0x1e9ec7);}export function propagateStylesAsHTMLElements(_0x2b1205,_0x2fe9d9,_0x4de99e){const _0x48c6c2=_0x18bce8;for(const _0x2a6cf3 in _0x4de99e){_0x4de99e[_0x2a6cf3][_0x48c6c2(0x17c)](([,_0x5e5646])=>{const _0x5cee69=_0x48c6c2,_0x306a50=_0x2fe9d9[_0x5cee69(0x159)](_0x5e5646,[],_0x2b1205[_0x5cee69(0x171)]());_0x2fe9d9[_0x5cee69(0x157)](0x0,_0x306a50,_0x2b1205);}),_0x2fe9d9[_0x48c6c2(0x174)](_0x2a6cf3,_0x2b1205);}}export function propagateStylesAsSpan(_0x4cf1e1,_0x2156a7,_0x1fc3d5){const _0x187c19=_0x18bce8;if(!Object[_0x187c19(0x163)](_0x1fc3d5)[_0x187c19(0x15c)])return;const _0x65feb3=_0x2156a7[_0x187c19(0x159)](_0x187c19(0x17a),[],_0x4cf1e1[_0x187c19(0x171)]());_0x2156a7[_0x187c19(0x160)](_0x1fc3d5,_0x65feb3),_0x2156a7[_0x187c19(0x157)](0x0,_0x65feb3,_0x4cf1e1),_0x2156a7[_0x187c19(0x174)](Object[_0x187c19(0x163)](_0x1fc3d5),_0x4cf1e1);}function _0x2976(_0x1c2777,_0x566cc7){const _0x5dbd01=_0x5dbd();return _0x2976=function(_0x297612,_0x42899a){_0x297612=_0x297612-0x14f;let _0x5805ca=_0x5dbd01[_0x297612];return _0x5805ca;},_0x2976(_0x1c2777,_0x566cc7);}function _0x5dbd(){const _0x5c95b4=['includes','getStyleNames','465654DVsRgs','span','medium','forEach','13950HRPhrf','vertical-align','687448JecMgz','italic','312xJLroI','from','font-style','49hzOfPX','insertChild','33qxoyUs','createElement','text-decoration','bold','length','font-family','text-decoration-line','underline','setStyle','filter','split','keys','font-weight','font-size','color','bolder','219642LtmMfM','sup','function','getStyle','801wbqeAK','35TZQjGk','22180GWyuzJ','sub','2561820ycdrCq','getChildren','super','855072RDvVmr','removeStyle','strong','line-through'];_0x5dbd=function(){return _0x5c95b4;};return _0x5dbd();}export function getStylesToPropagate(_0x2ee18d,_0x174b0e){const _0x5af3f4=_0x18bce8,_0x445ca6={},_0x258629={};return _0x174b0e[_0x5af3f4(0x17c)](_0x11f943=>{const _0x4319f2=_0x5af3f4,_0x1b4452=_0x2ee18d[_0x4319f2(0x16b)](_0x11f943);if(_0x1b4452){if(isPropertyToBePropagatedAsSpan(_0x11f943))_0x445ca6[_0x11f943]=_0x1b4452;else{if(isPropertyToBePropagatedAsHTMLElement(_0x11f943)){const _0x4c2c35=_0x1b4452[_0x4319f2(0x162)]('\x20');CSS_PROPERTIES_TO_BE_HTML_ELEMENTS[_0x11f943][_0x4319f2(0x17c)](([_0xdbf5f3,_0xab457])=>{const _0x17b042=_0x4319f2;for(const _0x119cd9 of _0x4c2c35){(_0x17b042(0x16a)==typeof _0xdbf5f3&&_0xdbf5f3(_0x119cd9)||_0xdbf5f3===_0x119cd9)&&(_0x258629[_0x11f943]=[..._0x258629[_0x11f943]||[],[_0xdbf5f3,_0xab457]]);}});}}}}),{'spanStyles':_0x445ca6,'stylesToBeHtmlElements':_0x258629};}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x210137=_0x6d34;(function(_0x7ed375,_0x585b45){var _0x4e6cbf=_0x6d34,_0xffccaf=_0x7ed375();while(!![]){try{var _0x109d9e=parseInt(_0x4e6cbf(0xec))/0x1+-parseInt(_0x4e6cbf(0xed))/0x2*(-parseInt(_0x4e6cbf(0xea))/0x3)+parseInt(_0x4e6cbf(0xeb))/0x4*(parseInt(_0x4e6cbf(0xe6))/0x5)+-parseInt(_0x4e6cbf(0xe5))/0x6*(-parseInt(_0x4e6cbf(0xee))/0x7)+-parseInt(_0x4e6cbf(0xe9))/0x8+parseInt(_0x4e6cbf(0xe7))/0x9*(-parseInt(_0x4e6cbf(0xe4))/0xa)+-parseInt(_0x4e6cbf(0xef))/0xb;if(_0x109d9e===_0x585b45)break;else _0xffccaf['push'](_0xffccaf['shift']());}catch(_0x4fd946){_0xffccaf['push'](_0xffccaf['shift']());}}}(_0x2257,0x37422));import{Plugin as _0x59004b}from'ckeditor5/src/core.js';import _0x117e88 from'./pastefromofficeenhancedinliner.js';import _0x18906c from'./pastefromofficeenhancedpropagator.js';function _0x6d34(_0xbdd898,_0x2072d8){var _0x225769=_0x2257();return _0x6d34=function(_0x6d3467,_0x5be1f3){_0x6d3467=_0x6d3467-0xe4;var _0x1a471a=_0x225769[_0x6d3467];return _0x1a471a;},_0x6d34(_0xbdd898,_0x2072d8);}export default class a extends _0x59004b{static get[_0x210137(0xf0)](){var _0x429705=_0x210137;return _0x429705(0xf1);}static get[_0x210137(0xf2)](){var _0x294316=_0x210137;return[_0x294316(0xe8),_0x117e88,_0x18906c];}}function _0x2257(){var _0x8d522d=['pluginName','PasteFromOfficeEnhanced','requires','70JPWgTr','54uEZkqe','5VsxRYz','465948MnFhIl','PasteFromOffice','218976lDIkik','9zHxRVB','1592288LHaVTj','357090rUadaX','206076OAXsik','293503oYvHRU','9080753lHkaEI'];_0x2257=function(){return _0x8d522d;};return _0x2257();}
|