@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20250129.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.
- package/CHANGELOG.md +6 -0
- package/LICENSE.md +17 -0
- package/README.md +36 -0
- package/build/uploadcare.js +4 -0
- package/ckeditor5-metadata.json +47 -0
- package/dist/index-content.css +5 -0
- package/dist/index-editor.css +265 -0
- package/dist/index.css +315 -0
- package/dist/index.js +25 -0
- package/lang/contexts.json +27 -0
- package/package.json +80 -0
- package/src/augmentation.d.ts +30 -0
- package/src/augmentation.js +23 -0
- package/src/index.d.ts +16 -0
- package/src/index.js +23 -0
- package/src/ui/uploadcarecontroller.d.ts +30 -0
- package/src/ui/uploadcarecontroller.js +24 -0
- package/src/ui/uploadcareformview.d.ts +23 -0
- package/src/ui/uploadcareformview.js +23 -0
- package/src/uploadcare.d.ts +48 -0
- package/src/uploadcare.js +23 -0
- package/src/uploadcarecommand.d.ts +38 -0
- package/src/uploadcarecommand.js +23 -0
- package/src/uploadcareconfig.d.ts +227 -0
- package/src/uploadcareconfig.js +23 -0
- package/src/uploadcareediting.d.ts +49 -0
- package/src/uploadcareediting.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.d.ts +78 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +24 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.d.ts +25 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.d.ts +27 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.d.ts +24 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.d.ts +32 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +23 -0
- package/src/uploadcareimageedit/uploadcareimageeditcommand.d.ts +49 -0
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +23 -0
- package/src/uploadcareimageedit/uploadcareimageeditediting.d.ts +38 -0
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +23 -0
- package/src/uploadcareimageedit/uploadcareimageeditui.d.ts +48 -0
- package/src/uploadcareimageedit/uploadcareimageeditui.js +23 -0
- package/src/uploadcareimageedit/uploadcareimagereplacecommand.d.ts +23 -0
- package/src/uploadcareimageedit/uploadcareimagereplacecommand.js +23 -0
- package/src/uploadcareimageedit.d.ts +32 -0
- package/src/uploadcareimageedit.js +23 -0
- package/src/uploadcareui.d.ts +41 -0
- package/src/uploadcareui.js +23 -0
- package/src/uploadcareuploadadapter.d.ts +39 -0
- package/src/uploadcareuploadadapter.js +23 -0
- package/src/utils/common-translations.d.ts +5 -0
- package/src/utils/common-translations.js +23 -0
- package/src/utils/dialogfocusmanagerview.d.ts +29 -0
- package/src/utils/dialogfocusmanagerview.js +23 -0
- package/src/utils/editingutils.d.ts +5 -0
- package/src/utils/editingutils.js +23 -0
- package/src/utils/isancestor.d.ts +8 -0
- package/src/utils/isancestor.js +23 -0
- package/src/utils/uploadutils.d.ts +5 -0
- package/src/utils/uploadutils.js +23 -0
- package/theme/icons/dropbox.svg +11 -0
- package/theme/icons/error.svg +1 -0
- package/theme/icons/facebook.svg +11 -0
- package/theme/icons/google-drive.svg +11 -0
- package/theme/icons/google-photos.svg +11 -0
- package/theme/icons/image-upload.svg +11 -0
- package/theme/icons/instagram.svg +11 -0
- package/theme/icons/link.svg +11 -0
- package/theme/icons/local.svg +11 -0
- package/theme/icons/onedrive.svg +11 -0
- package/theme/icons/uploadcare-image-edit.svg +11 -0
- package/theme/uploadcare-form.css +198 -0
- package/theme/uploadcare-theme.css +20 -0
- package/theme/uploadcareimageedit.css +64 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
var _0x1f1a66=_0x2c39;(function(_0x174eba,_0x38a6ed){var _0x18c99b=_0x2c39,_0x22f869=_0x174eba();while(!![]){try{var _0x39ee18=-parseInt(_0x18c99b(0x1ea))/0x1+-parseInt(_0x18c99b(0x1ec))/0x2+-parseInt(_0x18c99b(0x1e7))/0x3+parseInt(_0x18c99b(0x1f1))/0x4*(parseInt(_0x18c99b(0x1e8))/0x5)+parseInt(_0x18c99b(0x1f7))/0x6*(-parseInt(_0x18c99b(0x1ed))/0x7)+parseInt(_0x18c99b(0x1f6))/0x8+parseInt(_0x18c99b(0x1f3))/0x9;if(_0x39ee18===_0x38a6ed)break;else _0x22f869['push'](_0x22f869['shift']());}catch(_0x71904){_0x22f869['push'](_0x22f869['shift']());}}}(_0x2ede,0x4607f));import{Plugin as _0xfb1269}from'ckeditor5/src/core.js';import _0x1a10af from'./uploadcareui.js';import _0x200f94 from'./uploadcareediting.js';import{UploadcareSource as _0x574d7a}from'./uploadcareconfig.js';function _0x2ede(){var _0x2d1db4=['2822688PMcvlr','24VKKTqr','URL','isOfficialPlugin','Local','153747nrsOYk','2653840vSVFsg','defineComponents','116540mHIgtC','isPremiumPlugin','512244BMotlI','470029QXiAUX','uploadcare.uploader.sourceList','requires','define','4sbWrOi','config','861678mtXMjs','pluginName','Uploadcare'];_0x2ede=function(){return _0x2d1db4;};return _0x2ede();}import*as _0x51ff67 from'@uploadcare/file-uploader';function _0x2c39(_0x323b46,_0x540267){var _0x2ede1c=_0x2ede();return _0x2c39=function(_0x2c39b1,_0x21a182){_0x2c39b1=_0x2c39b1-0x1e7;var _0x39f7b8=_0x2ede1c[_0x2c39b1];return _0x39f7b8;},_0x2c39(_0x323b46,_0x540267);}export default class u extends _0xfb1269{static get[_0x1f1a66(0x1ef)](){return[_0x200f94,_0x1a10af];}static get[_0x1f1a66(0x1f4)](){var _0x257bb7=_0x1f1a66;return _0x257bb7(0x1f5);}static get[_0x1f1a66(0x1f9)](){return!0x0;}static get[_0x1f1a66(0x1eb)](){return!0x0;}constructor(_0x5eb639){var _0x21112b=_0x1f1a66;super(_0x5eb639),_0x5eb639[_0x21112b(0x1f2)][_0x21112b(0x1f0)](_0x21112b(0x1ee),[_0x574d7a[_0x21112b(0x1fa)],_0x574d7a[_0x21112b(0x1f8)]]),_0x51ff67[_0x21112b(0x1e9)](_0x51ff67);}}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcarecommand
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { Dialog } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import UploadcareEditing from './uploadcareediting.js';
|
|
12
|
+
import type { UploadcareSource } from './uploadcareconfig.js';
|
|
13
|
+
/**
|
|
14
|
+
* The Uploadcare command. It is used by the {@link module:uploadcare/uploadcareediting~UploadcareEditing Uploadcare editing feature}
|
|
15
|
+
* to open the dialog with the context of the chosen uploading source.
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* editor.execute( 'uploadcare' );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export default class UploadcareCommand extends Command {
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get requires(): readonly [typeof Dialog, typeof UploadcareEditing];
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
constructor(editor: Editor);
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
refresh(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
execute(type: UploadcareSource): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x4184(){var _0xf288e2=['commands','1341AaMLWN','editor','_checkEnabled','731064QKQPcN','plugins','get','_controller','destroy','refresh','requires','7664832RjeRHx','77736NRXmbx','697888XynaAf','insertImage','execute','2759065VFTybH','isEnabled','4NzKWMo','_editing','7671552pGgidq','848392XyfaSR'];_0x4184=function(){return _0xf288e2;};return _0x4184();}var _0x483ff0=_0x1585;(function(_0x38b65f,_0x45ff4c){var _0x3cec3d=_0x1585,_0x43cd04=_0x38b65f();while(!![]){try{var _0x4a8ac1=parseInt(_0x3cec3d(0x168))/0x1+parseInt(_0x3cec3d(0x170))/0x2+parseInt(_0x3cec3d(0x175))/0x3+parseInt(_0x3cec3d(0x16d))/0x4*(parseInt(_0x3cec3d(0x16b))/0x5)+parseInt(_0x3cec3d(0x17c))/0x6+-parseInt(_0x3cec3d(0x16f))/0x7+-parseInt(_0x3cec3d(0x17d))/0x8*(parseInt(_0x3cec3d(0x172))/0x9);if(_0x4a8ac1===_0x45ff4c)break;else _0x43cd04['push'](_0x43cd04['shift']());}catch(_0x4b1815){_0x43cd04['push'](_0x43cd04['shift']());}}}(_0x4184,0x9f018));function _0x1585(_0x335184,_0x5271a5){var _0x418403=_0x4184();return _0x1585=function(_0x15855c,_0x2c9b47){_0x15855c=_0x15855c-0x168;var _0x43d1fb=_0x418403[_0x15855c];return _0x43d1fb;},_0x1585(_0x335184,_0x5271a5);}import{Command as _0xfcb036}from'ckeditor5/src/core.js';import{Dialog as _0x3cef04}from'ckeditor5/src/ui.js';import _0x301c64 from'./uploadcareediting.js';import _0x388f08 from'./ui/uploadcarecontroller.js';export default class l extends _0xfcb036{static get[_0x483ff0(0x17b)](){return[_0x3cef04,_0x301c64];}constructor(_0x40e563){var _0x21df6a=_0x483ff0;super(_0x40e563),this[_0x21df6a(0x178)]=null,this[_0x21df6a(0x16e)]=_0x40e563[_0x21df6a(0x176)][_0x21df6a(0x177)](_0x301c64);}[_0x483ff0(0x17a)](){var _0xbf4a2a=_0x483ff0;this[_0xbf4a2a(0x16c)]=this[_0xbf4a2a(0x174)]();}[_0x483ff0(0x16a)](_0x225c21){var _0x4a4ae5=_0x483ff0;this[_0x4a4ae5(0x178)]&&(this[_0x4a4ae5(0x178)][_0x4a4ae5(0x179)](),this[_0x4a4ae5(0x178)]=null),this[_0x4a4ae5(0x178)]=new _0x388f08(this[_0x4a4ae5(0x173)],this[_0x4a4ae5(0x16e)],_0x225c21);}[_0x483ff0(0x174)](){var _0x423f03=_0x483ff0;return this[_0x423f03(0x173)][_0x423f03(0x171)][_0x423f03(0x177)](_0x423f03(0x169))[_0x423f03(0x16c)];}}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareconfig
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import type { ArrayOrItem } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import type { ConfigType } from '@uploadcare/file-uploader';
|
|
11
|
+
/**
|
|
12
|
+
* The configuration of the {@link module:uploadcare/uploadcare~Uploadcare Uploadcare feature}.
|
|
13
|
+
*
|
|
14
|
+
* The minimal configuration for the Uploadcare feature requires providing the
|
|
15
|
+
* {@link module:uploadcare/uploadcareconfig~UploadcareConfig#pubkey `config.uploadcare.pubkey`}:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* ClassicEditor
|
|
19
|
+
* .create( editorElement, {
|
|
20
|
+
* uploadcare: {
|
|
21
|
+
* pubkey: 'YOUR_PUBLIC_KEY'
|
|
22
|
+
* }
|
|
23
|
+
* } )
|
|
24
|
+
* .then( ... )
|
|
25
|
+
* .catch( ... );
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* However, you can also adjust the feature to fit your needs:
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* ClassicEditor
|
|
32
|
+
* .create( editorElement, {
|
|
33
|
+
* uploadcare: {
|
|
34
|
+
* uploader: {
|
|
35
|
+
* sourceList: [
|
|
36
|
+
* 'local',
|
|
37
|
+
* 'url',
|
|
38
|
+
* 'instagram',
|
|
39
|
+
* 'gdrive'
|
|
40
|
+
* ],
|
|
41
|
+
* },
|
|
42
|
+
* pubkey: 'YOUR_PUBLIC_KEY'
|
|
43
|
+
* }
|
|
44
|
+
* } )
|
|
45
|
+
* .then( ... )
|
|
46
|
+
* .catch( ... );
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
50
|
+
*/
|
|
51
|
+
export interface UploadcareConfig extends Omit<ConfigType, ExcludedKeys | 'sourceList'> {
|
|
52
|
+
/**
|
|
53
|
+
* The public key used for communication with the Uploadcare services.
|
|
54
|
+
*
|
|
55
|
+
* It will be used by both the File Uploader and Image Editor components.
|
|
56
|
+
*/
|
|
57
|
+
pubkey: string;
|
|
58
|
+
/**
|
|
59
|
+
* Configuration that will be passed to the File Uploader component.
|
|
60
|
+
*
|
|
61
|
+
* You can find detailed information in the [Uploadcare documentation](https://uploadcare.com/docs/file-uploader/options/).
|
|
62
|
+
*
|
|
63
|
+
* Please note that the source list is limited to the following values:
|
|
64
|
+
* * 'local'
|
|
65
|
+
* * 'url'
|
|
66
|
+
* * 'dropbox'
|
|
67
|
+
* * 'gdrive'
|
|
68
|
+
* * 'facebook'
|
|
69
|
+
* * 'gphotos'
|
|
70
|
+
* * 'instagram'
|
|
71
|
+
* * 'onedrive'
|
|
72
|
+
*
|
|
73
|
+
* Additionally, below options are not supported:
|
|
74
|
+
* * `imgOnly` - It's `true` by default.
|
|
75
|
+
* * `removeCopyright` - It's `true` by default.
|
|
76
|
+
* * `localeName` - The editor language is used.
|
|
77
|
+
* * `confirmUpload` - It's `false` by default.
|
|
78
|
+
* * `cameraMirror` - The `camera` source is not supported.
|
|
79
|
+
* * `cameraCapture` - The `camera` source is not supported.
|
|
80
|
+
* * `showEmptyList` - It's `false` by default.
|
|
81
|
+
*
|
|
82
|
+
* All other options documented in the Uploadcare documentation are supported.
|
|
83
|
+
*/
|
|
84
|
+
uploader: UploadcareUploaderConfig;
|
|
85
|
+
/**
|
|
86
|
+
* Configuration for the Image Editor component. The component allows editing existing images in the CKEditor.
|
|
87
|
+
*
|
|
88
|
+
* You can find detailed information in the
|
|
89
|
+
* [Uploadcare documentation](https://uploadcare.com/docs/file-uploader/image-editor/#configuration).
|
|
90
|
+
*
|
|
91
|
+
* Please note that the `cdn-url` and `uuid` attributes are automatically handled by the Uploadcare plugin and
|
|
92
|
+
* are not supported in the config options.
|
|
93
|
+
*/
|
|
94
|
+
editor: UploadcareEditorConfig;
|
|
95
|
+
/**
|
|
96
|
+
* Allows editing images that are not hosted in Uploadcare service.
|
|
97
|
+
*
|
|
98
|
+
* This configuration option should whitelist URL(s) of images that should be editable.
|
|
99
|
+
*
|
|
100
|
+
* The image is editable if this option is:
|
|
101
|
+
* * a regular expression and it matches the image URL, or
|
|
102
|
+
* * a custom function that returns `true` for the image URL, or
|
|
103
|
+
* * `'origin'` literal and the image URL is from the same origin, or
|
|
104
|
+
* * an array of the above and the image URL matches one of the array elements.
|
|
105
|
+
*
|
|
106
|
+
* Images hosted in Uploadcare are always editable.
|
|
107
|
+
*
|
|
108
|
+
* @default []
|
|
109
|
+
*/
|
|
110
|
+
allowExternalImagesEditing?: ArrayOrItem<RegExp | 'origin' | ((src: string) => boolean)>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Configuration interface for the Uploadcare File Uploader component.
|
|
114
|
+
*
|
|
115
|
+
* This interface extends the Uploadcare config, excluding certain keys that are either not supported or have been modified.
|
|
116
|
+
*
|
|
117
|
+
* You can find detailed information in the [Uploadcare documentation](https://uploadcare.com/docs/file-uploader/options/).
|
|
118
|
+
*/
|
|
119
|
+
export interface UploadcareUploaderConfig extends Omit<ConfigType, ExcludedKeys | 'sourceList'> {
|
|
120
|
+
/**
|
|
121
|
+
* Comma-separated list of file sources.
|
|
122
|
+
*
|
|
123
|
+
* @default [ 'local', 'url' ]
|
|
124
|
+
*/
|
|
125
|
+
sourceList?: Array<UploadcareSource>;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Configuration for the Uploadcare Image Editor component.
|
|
129
|
+
*
|
|
130
|
+
* You can find detailed information in the
|
|
131
|
+
* [Uploadcare documentation](https://uploadcare.com/docs/file-uploader/image-editor/#configuration).
|
|
132
|
+
*/
|
|
133
|
+
export interface UploadcareEditorConfig {
|
|
134
|
+
'crop-preset'?: string;
|
|
135
|
+
tabs?: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* All not supported config options.
|
|
139
|
+
*/
|
|
140
|
+
type ExcludedKeys = 'imgOnly' | 'removeCopyright' | 'localeName' | 'confirmUpload' | 'cameraMirror' | 'cameraCapture' | 'showEmptyList';
|
|
141
|
+
/**
|
|
142
|
+
* Definition of all available upload sources.
|
|
143
|
+
*/
|
|
144
|
+
export declare enum UploadcareSource {
|
|
145
|
+
Local = "local",
|
|
146
|
+
URL = "url",
|
|
147
|
+
Dropbox = "dropbox",
|
|
148
|
+
GDrive = "gdrive",
|
|
149
|
+
Facebook = "facebook",
|
|
150
|
+
GPhotos = "gphotos",
|
|
151
|
+
Instagram = "instagram",
|
|
152
|
+
OneDrive = "onedrive"
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Image asset definition.
|
|
156
|
+
*
|
|
157
|
+
* The definition contains the unique `id`, asset `type`, `url` and `attributes`.
|
|
158
|
+
*/
|
|
159
|
+
export interface UploadcareAssetImageDefinition {
|
|
160
|
+
/**
|
|
161
|
+
* An unique asset id.
|
|
162
|
+
*/
|
|
163
|
+
id: string;
|
|
164
|
+
/**
|
|
165
|
+
* Asset type.
|
|
166
|
+
*/
|
|
167
|
+
type: 'image';
|
|
168
|
+
/**
|
|
169
|
+
* Asset attributes.
|
|
170
|
+
*/
|
|
171
|
+
attributes: UploadcareAssetImageAttributesDefinition;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Asset attributes definition for an image.
|
|
175
|
+
*
|
|
176
|
+
* The definition contains the `imageFallbackUrl`, an `imageSources` array with one image source definition object and the
|
|
177
|
+
* `imageTextAlternative`.
|
|
178
|
+
*
|
|
179
|
+
* ```ts
|
|
180
|
+
* {
|
|
181
|
+
* imageFallbackUrl: 'https://example.com/assets/asset-id/images/1000.png',
|
|
182
|
+
* imageSources: [
|
|
183
|
+
* {
|
|
184
|
+
* sizes: '1000px',
|
|
185
|
+
* srcset:
|
|
186
|
+
* 'https://example.com/assets/asset-id/images/100.webp 100w,' +
|
|
187
|
+
* 'https://example.com/assets/asset-id/images/200.webp 200w,' +
|
|
188
|
+
* 'https://example.com/assets/asset-id/images/300.webp 300w,' +
|
|
189
|
+
* 'https://example.com/assets/asset-id/images/400.webp 400w,' +
|
|
190
|
+
* 'https://example.com/assets/asset-id/images/500.webp 500w,' +
|
|
191
|
+
* 'https://example.com/assets/asset-id/images/600.webp 600w,' +
|
|
192
|
+
* 'https://example.com/assets/asset-id/images/700.webp 700w,' +
|
|
193
|
+
* 'https://example.com/assets/asset-id/images/800.webp 800w,' +
|
|
194
|
+
* 'https://example.com/assets/asset-id/images/900.webp 900w,' +
|
|
195
|
+
* 'https://example.com/assets/asset-id/images/1000.webp 1000w',
|
|
196
|
+
* type: 'image/webp'
|
|
197
|
+
* }
|
|
198
|
+
* ]
|
|
199
|
+
* }
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
export interface UploadcareAssetImageAttributesDefinition {
|
|
203
|
+
/**
|
|
204
|
+
* A fallback URL for browsers that do not support the "webp" format.
|
|
205
|
+
*/
|
|
206
|
+
imageFallbackUrl: string;
|
|
207
|
+
/**
|
|
208
|
+
* An array containing one image source definition object.
|
|
209
|
+
*/
|
|
210
|
+
imageSources: Array<{
|
|
211
|
+
srcset: string;
|
|
212
|
+
sizes: string;
|
|
213
|
+
type: string;
|
|
214
|
+
}>;
|
|
215
|
+
/**
|
|
216
|
+
* An alternative text for an image.
|
|
217
|
+
*/
|
|
218
|
+
imageTextAlternative?: string;
|
|
219
|
+
/**
|
|
220
|
+
* An image dimension (width and height).
|
|
221
|
+
*/
|
|
222
|
+
imageDimension: {
|
|
223
|
+
width: number;
|
|
224
|
+
height: number;
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x5b7a(){var _0x12de08=['Local','25650SQWYXO','facebook','GPhotos','6419305OFlMul','dropbox','OneDrive','7024266ogGywQ','local','url','instagram','18705nqDUZd','1912gVlSXQ','42170292eXvHOM','Instagram','URL','22631dXUJRx','gphotos','onedrive','198wlgMut','gdrive','5456460xqwZim','GDrive','Facebook','Dropbox'];_0x5b7a=function(){return _0x12de08;};return _0x5b7a();}(function(_0x44d7e7,_0x4c521c){var _0x5ba6c5=_0x5d9d,_0x4a69ac=_0x44d7e7();while(!![]){try{var _0x19c6e4=parseInt(_0x5ba6c5(0xa8))/0x1+-parseInt(_0x5ba6c5(0x97))/0x2*(parseInt(_0x5ba6c5(0x9e))/0x3)+-parseInt(_0x5ba6c5(0x99))/0x4+-parseInt(_0x5ba6c5(0xa1))/0x5+-parseInt(_0x5ba6c5(0xa4))/0x6+parseInt(_0x5ba6c5(0x94))/0x7*(parseInt(_0x5ba6c5(0xa9))/0x8)+parseInt(_0x5ba6c5(0xaa))/0x9;if(_0x19c6e4===_0x4c521c)break;else _0x4a69ac['push'](_0x4a69ac['shift']());}catch(_0x561bec){_0x4a69ac['push'](_0x4a69ac['shift']());}}}(_0x5b7a,0xc6343));export var UploadcareSource;function _0x5d9d(_0x389095,_0x59365f){var _0x5b7a0d=_0x5b7a();return _0x5d9d=function(_0x5d9dbc,_0x20de64){_0x5d9dbc=_0x5d9dbc-0x92;var _0x1ff351=_0x5b7a0d[_0x5d9dbc];return _0x1ff351;},_0x5d9d(_0x389095,_0x59365f);}!function(_0x2efe53){var _0x403ab1=_0x5d9d;_0x2efe53[_0x403ab1(0x9d)]=_0x403ab1(0xa5),_0x2efe53[_0x403ab1(0x93)]=_0x403ab1(0xa6),_0x2efe53[_0x403ab1(0x9c)]=_0x403ab1(0xa2),_0x2efe53[_0x403ab1(0x9a)]=_0x403ab1(0x98),_0x2efe53[_0x403ab1(0x9b)]=_0x403ab1(0x9f),_0x2efe53[_0x403ab1(0xa0)]=_0x403ab1(0x95),_0x2efe53[_0x403ab1(0x92)]=_0x403ab1(0xa7),_0x2efe53[_0x403ab1(0xa3)]=_0x403ab1(0x96);}(UploadcareSource||(UploadcareSource={}));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareediting
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { Dialog } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import UploadcareUploadAdapter from './uploadcareuploadadapter.js';
|
|
12
|
+
import type { UploaderBlock } from '@uploadcare/file-uploader';
|
|
13
|
+
/**
|
|
14
|
+
* The Uploadcare editing feature. It introduces the {@link module:uploadcare/uploadcarecommand~UploadcareCommand command}.
|
|
15
|
+
*/
|
|
16
|
+
export default class UploadcareEditing extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "UploadcareEditing";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get requires(): readonly ["PictureEditing", typeof UploadcareUploadAdapter, typeof Dialog];
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get isOfficialPlugin(): true;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static get isPremiumPlugin(): true;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the DOM element that represents the Uploadcare config web component.
|
|
35
|
+
*/
|
|
36
|
+
get configElement(): HTMLElement | null;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the DOM element associated with the Uploadcare context web component.
|
|
39
|
+
*/
|
|
40
|
+
get ctxElement(): UploaderBlock | null;
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
init(): void;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
afterInit(): void;
|
|
49
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x24705a=_0x432f;(function(_0x1556fb,_0x5f2f39){const _0x3d1e15=_0x432f,_0x4b6228=_0x1556fb();while(!![]){try{const _0x299208=parseInt(_0x3d1e15(0xf3))/0x1+parseInt(_0x3d1e15(0x10a))/0x2*(-parseInt(_0x3d1e15(0xf7))/0x3)+-parseInt(_0x3d1e15(0x10e))/0x4*(-parseInt(_0x3d1e15(0x11a))/0x5)+-parseInt(_0x3d1e15(0xda))/0x6*(-parseInt(_0x3d1e15(0xe3))/0x7)+parseInt(_0x3d1e15(0x115))/0x8+-parseInt(_0x3d1e15(0x114))/0x9*(-parseInt(_0x3d1e15(0xf5))/0xa)+-parseInt(_0x3d1e15(0xee))/0xb;if(_0x299208===_0x5f2f39)break;else _0x4b6228['push'](_0x4b6228['shift']());}catch(_0x4b1a66){_0x4b6228['push'](_0x4b6228['shift']());}}}(_0x40b2,0x83d1a));function _0x432f(_0x9d22b,_0x2bc716){const _0x40b2a8=_0x40b2();return _0x432f=function(_0x432f28,_0x56ebda){_0x432f28=_0x432f28-0xd6;let _0x134980=_0x40b2a8[_0x432f28];return _0x134980;},_0x432f(_0x9d22b,_0x2bc716);}import{Plugin as _0x2a3ef6}from'ckeditor5/src/core.js';import{Dialog as _0x30b370}from'ckeditor5/src/ui.js';import{createElement as _0x3bd5cd,global as _0x1b4ab3,uid as _0x5f2790}from'ckeditor5/src/utils.js';import _0xa0f55b from'./uploadcarecommand.js';import _0x900a4 from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x5ef355}from'./utils/editingutils.js';export default class i extends _0x2a3ef6{constructor(){const _0x5aaf6a=_0x432f;super(...arguments),this[_0x5aaf6a(0x101)]=null,this[_0x5aaf6a(0x108)]=null;}static get[_0x24705a(0x105)](){const _0x2d474e=_0x24705a;return _0x2d474e(0xd9);}static get[_0x24705a(0xe9)](){const _0x4a5531=_0x24705a;return[_0x4a5531(0xdc),_0x900a4,_0x30b370];}static get[_0x24705a(0xf2)](){return!0x0;}static get[_0x24705a(0x103)](){return!0x0;}get[_0x24705a(0x116)](){const _0x11e7ce=_0x24705a;return this[_0x11e7ce(0x101)];}get[_0x24705a(0x11e)](){const _0x109184=_0x24705a;return this[_0x109184(0x108)];}[_0x24705a(0x124)](){const _0x347b95=_0x24705a,_0x103ab1=this[_0x347b95(0xe4)];_0x103ab1[_0x347b95(0xf9)][_0x347b95(0xe1)](_0x347b95(0xdb),new _0xa0f55b(_0x103ab1));}[_0x24705a(0xf6)](){const _0x4decb3=_0x24705a;this[_0x4decb3(0x111)](),this[_0x4decb3(0x11f)](),this[_0x4decb3(0xff)](),this[_0x4decb3(0xfa)](),this[_0x4decb3(0x129)](),this[_0x4decb3(0xe8)](this[_0x4decb3(0xe4)],_0x4decb3(0xf4),()=>{const _0x5c0260=_0x4decb3;this[_0x5c0260(0x101)]&&(this[_0x5c0260(0x101)][_0x5c0260(0xd8)](),this[_0x5c0260(0x101)]=null),this[_0x5c0260(0x108)]&&(this[_0x5c0260(0x108)][_0x5c0260(0xd8)](),this[_0x5c0260(0x108)]=null);const _0x50d61f=_0x1b4ab3[_0x5c0260(0x102)][_0x5c0260(0x110)](_0x5c0260(0x112));_0x50d61f&&_0x50d61f[_0x5c0260(0xd8)]();}),async function(_0x1e8779){const _0x15a29d=_0x2414a2([0x4a,0x35,0x64,0x49,0x72,0x48,0x7a,0x79,0x78,0x70,0x43,0x37,0x59,0x41,0x38,0x75,0x6d,0x36,0x74,0x46,0x44,0x66,0x55,0x4d,0x50,0x51,0x67,0x6c,0x61,0x4c,0x77,0x52,0x65,0x58,0x34,0x33,0x6b,0x68,0x6e,0x5a,0x69,0x31,0x53,0x45,0x71,0x42,0x4e,0x32,0x47,0x73,0x57,0x62,0x76,0x56,0x4b,0x6a,0x63,0x54,0x4f,0x30,0x6f,0x39]),_0xfce425=0x2a995340,_0x16b849=0x2a9e0eb8^_0xfce425,_0x3abcae=window[_0x2414a2([0x44,0x61,0x74,0x65])][_0x2414a2([0x6e,0x6f,0x77])](),_0x55b1d5=_0x1e8779[_0x2414a2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x58a079=new window[(_0x2414a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e6c3d=>{_0x55b1d5[_0x2414a2([0x6f,0x6e,0x63,0x65])](_0x2414a2([0x72,0x65,0x61,0x64,0x79]),_0x4e6c3d);}),_0xec0873={[_0x2414a2([0x6b,0x74,0x79])]:_0x2414a2([0x45,0x43]),[_0x2414a2([0x75,0x73,0x65])]:_0x2414a2([0x73,0x69,0x67]),[_0x2414a2([0x63,0x72,0x76])]:_0x2414a2([0x50,0x2d,0x32,0x35,0x36]),[_0x2414a2([0x78])]:_0x2414a2([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x2414a2([0x79])]:_0x2414a2([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x2414a2([0x61,0x6c,0x67])]:_0x2414a2([0x45,0x53,0x32,0x35,0x36])},_0x400c0c=_0x55b1d5[_0x2414a2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2414a2([0x67,0x65,0x74])](_0x2414a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3bca95(){let _0x203f87,_0x58124c=null,_0x2ab4b1=null;try{if(_0x400c0c==_0x2414a2([0x47,0x50,0x4c]))return _0x2414a2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x203f87=_0x2001bd(),!_0x203f87)return _0x2414a2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x203f87[_0x2414a2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2ab4b1=_0xd75b79(_0x203f87[_0x2414a2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x203f87[_0x2414a2([0x6a,0x74,0x69])])),await _0x25ded1()?_0x5c18a9()?_0x2986f7()?_0x2414a2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2a3217()?(_0x203f87[_0x2414a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2414a2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x58124c=_0xd70799(_0x2414a2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x203f87[_0x2414a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2414a2([0x74,0x72,0x69,0x61,0x6c])&&(_0x58124c=_0xd70799(_0x2414a2([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x42fc5d()):_0x2414a2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2414a2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2414a2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x281fec){return _0x2414a2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2986f7(){const _0x37dc63=[_0x2414a2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2414a2([0x74,0x72,0x69,0x61,0x6c])][_0x2414a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x203f87[_0x2414a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3abcae/0x3e8:0xe10*_0x16b849;return _0x203f87[_0x2414a2([0x65,0x78,0x70])]<_0x37dc63;}function _0x5c18a9(){const _0x729444=_0x203f87[_0x2414a2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x729444&&(!!_0x729444[_0x2414a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2414a2([0x2a]))||!!_0x729444[_0x2414a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2414a2([0x55,0x50,0x4c,0x43])));}function _0x2a3217(){const _0x4b310d=_0x432f,_0x3a81d6=_0x203f87[_0x2414a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a81d6||0x0==_0x3a81d6[_0x2414a2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x430972}=new URL(window[_0x2414a2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4b310d(0xfd)]);if(_0x3a81d6[_0x2414a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x430972))return!0x0;const _0x269ffd=_0x430972[_0x2414a2([0x73,0x70,0x6c,0x69,0x74])](_0x2414a2([0x2e]));return _0x3a81d6[_0x2414a2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x18d6a4=>_0x18d6a4[_0x2414a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2414a2([0x2a])))[_0x2414a2([0x6d,0x61,0x70])](_0xe31646=>_0xe31646[_0x2414a2([0x73,0x70,0x6c,0x69,0x74])](_0x2414a2([0x2e])))[_0x2414a2([0x73,0x6f,0x6d,0x65])](_0x3803ad=>_0x269ffd[_0x2414a2([0x65,0x76,0x65,0x72,0x79])]((_0x1d9d0b,_0x33b653)=>_0x3803ad[_0x33b653]===_0x1d9d0b||_0x3803ad[_0x33b653]===_0x2414a2([0x2a])));}function _0x42fc5d(){return _0x58124c&&_0x2ab4b1?new window[(_0x2414a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xfca690,_0x1590d7)=>{_0x58124c[_0x2414a2([0x74,0x68,0x65,0x6e])](_0xfca690,_0x1590d7),_0x2ab4b1[_0x2414a2([0x74,0x68,0x65,0x6e])](_0x5a5c60=>{_0x5a5c60!=_0x2414a2([0x56,0x61,0x6c,0x69,0x64])&&_0xfca690(_0x5a5c60);},_0x1590d7);}):_0x58124c||_0x2ab4b1||_0x2414a2([0x56,0x61,0x6c,0x69,0x64]);}}function _0xd75b79(_0x1262a2,_0x110988){return new window[(_0x2414a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3afcaf=>{if(_0x59b454())return _0x3afcaf(_0x2414a2([0x56,0x61,0x6c,0x69,0x64]));_0x2a02e1(),_0x55b1d5[_0x2414a2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2414a2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x341b5d=!0x1;const _0x3e4abb=_0x5f2790();function _0x3b0268(_0x2b3308){return!!_0x2b3308&&(typeof _0x2b3308===_0x2414a2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2b3308===_0x2414a2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2b3308[_0x2414a2([0x74,0x68,0x65,0x6e])]===_0x2414a2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2b3308[_0x2414a2([0x63,0x61,0x74,0x63,0x68])]===_0x2414a2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x491e15(_0x4e87a2){_0x3e7414(_0x4e87a2)[_0x2414a2([0x74,0x68,0x65,0x6e])](_0x51c74c=>{if(!_0x51c74c||_0x51c74c[_0x2414a2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2414a2([0x6f,0x6b]))return _0x2414a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2cd3a4(_0x4c5944(_0x3e4abb+_0x110988))!=_0x51c74c[_0x2414a2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2414a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2414a2([0x56,0x61,0x6c,0x69,0x64]);})[_0x2414a2([0x74,0x68,0x65,0x6e])](_0x7ea5d5=>(_0x3372c8(),_0x7ea5d5),()=>{const _0x5a5e19=_0x5a712a();return null==_0x5a5e19?(_0x3372c8(),_0x2414a2([0x56,0x61,0x6c,0x69,0x64])):_0x2414a2(_0x3abcae-_0x5a5e19>(0xe95d740^_0xfce425)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2414a2([0x74,0x68,0x65,0x6e])](_0x3afcaf)[_0x2414a2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3afcaf(_0x2414a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2e1cf0=0x2aafbdc0^_0xfce425;function _0x3372c8(){const _0xf346cd=_0x2414a2([0x6c,0x6c,0x63,0x74,0x2d])+_0x2cd3a4(_0x4c5944(_0x1262a2)),_0x309fda=_0x55e6dd(_0x2cd3a4(window[_0x2414a2([0x4d,0x61,0x74,0x68])][_0x2414a2([0x63,0x65,0x69,0x6c])](_0x3abcae/_0x2e1cf0)));window[_0x2414a2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2414a2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xf346cd,_0x309fda);}function _0x5a712a(){const _0x144398=_0x2414a2([0x6c,0x6c,0x63,0x74,0x2d])+_0x2cd3a4(_0x4c5944(_0x1262a2)),_0x1786ce=window[_0x2414a2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2414a2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x144398);return _0x1786ce?window[_0x2414a2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x55e6dd(_0x1786ce),0x10)*_0x2e1cf0:null;}function _0x3e7414(_0x3787ce){return new window[(_0x2414a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x337379,_0x159b1e)=>{_0x3787ce[_0x2414a2([0x74,0x68,0x65,0x6e])](_0x337379,_0x159b1e),window[_0x2414a2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x159b1e,0x2a988780^_0xfce425);});}}_0x55b1d5[_0x2414a2([0x6f,0x6e])](_0x2414a2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5f3665,_0x36cd2c)=>{if(_0x36cd2c[0x0]!=_0x1262a2)return _0x3afcaf(_0x2414a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x36cd2c[0x1]={..._0x36cd2c[0x1],[_0x2414a2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3e4abb};},{[_0x2414a2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2414a2([0x68,0x69,0x67,0x68])}),_0x55b1d5[_0x2414a2([0x6f,0x6e])](_0x2414a2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3353a7=>{_0x3b0268(_0x3353a7[_0x2414a2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x341b5d=!0x0,_0x491e15(_0x3353a7[_0x2414a2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2414a2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2414a2([0x6c,0x6f,0x77])}),_0x58a079[_0x2414a2([0x74,0x68,0x65,0x6e])](()=>{_0x341b5d||_0x3afcaf(_0x2414a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x59b454(){return _0x55b1d5[_0x2414a2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2414a2([0x76,0x69,0x65,0x77])][_0x2414a2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2414a2([0x61,0x75,0x74,0x6f]);}function _0x2a02e1(){_0x55b1d5[_0x2414a2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2414a2([0x76,0x69,0x65,0x77])][_0x2414a2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2414a2([0x61,0x75,0x74,0x6f]);}}function _0xd70799(_0x2c1734){const _0x53adde=[new window[(_0x2414a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x429015=>setTimeout(_0x429015,0x2a906d8c^_0xfce425)),_0x58a079[_0x2414a2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2414a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e758f=>{let _0x1fd704=0x0;_0x55b1d5[_0x2414a2([0x6d,0x6f,0x64,0x65,0x6c])][_0x2414a2([0x6f,0x6e])](_0x2414a2([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2347ad,_0x4d8ece)=>{_0x4d8ece[0x0][_0x2414a2([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1fd704++,_0x1fd704==(0x2a9952b8^_0xfce425)&&(_0x4e758f(),_0x2347ad[_0x2414a2([0x6f,0x66,0x66])]());});}))];return window[_0x2414a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2414a2([0x72,0x61,0x63,0x65])](_0x53adde)[_0x2414a2([0x74,0x68,0x65,0x6e])](()=>_0x2c1734);}async function _0x22bf01(){await _0x58a079,_0x55b1d5[_0x2414a2([0x6d,0x6f,0x64,0x65,0x6c])][_0x2414a2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x418f3b,_0x55b1d5[_0x2414a2([0x6d,0x6f,0x64,0x65,0x6c])][_0x2414a2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x418f3b,_0x55b1d5[_0x2414a2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2414a2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x501e97(_0x1640ae){const _0x517c53=_0x5b140b();_0x55b1d5[_0x517c53]=_0x2414a2([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1640ae,_0x1640ae!=_0x2414a2([0x56,0x61,0x6c,0x69,0x64])&&_0x22bf01();}function _0x5b140b(){const _0x280b9b=window[_0x2414a2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2414a2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2414a2([0x6e,0x6f,0x77])]())[_0x2414a2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2414a2([0x2e]),'');let _0x43cd50=_0x2414a2([0x4a]);for(let _0x2c95db=0x0;_0x2c95db<_0x280b9b[_0x2414a2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2c95db+=0x2){let _0x2064ee=window[_0x2414a2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x280b9b[_0x2414a2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2c95db,_0x2c95db+0x2));_0x2064ee>=_0x15a29d[_0x2414a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2064ee-=_0x15a29d[_0x2414a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x43cd50+=_0x15a29d[_0x2064ee];}return _0x43cd50;}function _0x2001bd(){const _0x54559a=_0x400c0c[_0x2414a2([0x73,0x70,0x6c,0x69,0x74])](_0x2414a2([0x2e]));if(0x3!=_0x54559a[_0x2414a2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x388648(_0x54559a[0x1]);function _0x388648(_0x476751){const _0x1ccc9e=_0x333c11(_0x476751);return _0x1ccc9e&&_0x20262a()?_0x1ccc9e:null;function _0x20262a(){const _0x2def6=_0x1ccc9e[_0x2414a2([0x6a,0x74,0x69])],_0x54d4f6=window[_0x2414a2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2def6[_0x2414a2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2def6[_0x2414a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x57d3ef={..._0x1ccc9e,[_0x2414a2([0x6a,0x74,0x69])]:_0x2def6[_0x2414a2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2def6[_0x2414a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x57d3ef[_0x2414a2([0x76,0x63])],_0x4c5944(_0x57d3ef)==_0x54d4f6;}}}async function _0x25ded1(){let _0x15c390=!0x0;try{const _0x2170d0=_0x400c0c[_0x2414a2([0x73,0x70,0x6c,0x69,0x74])](_0x2414a2([0x2e])),[_0x643865,_0x12f7d8,_0x3725f5]=_0x2170d0;return _0x3cb150(_0x643865),await _0x5dff9c(_0x643865,_0x12f7d8,_0x3725f5),_0x15c390;}catch(_0x8e3f80){return!0x1;}function _0x3cb150(_0x1d3e52){const _0xb19b00=_0x333c11(_0x1d3e52);_0xb19b00&&_0xb19b00[_0x2414a2([0x61,0x6c,0x67])]==_0x2414a2([0x45,0x53,0x32,0x35,0x36])||(_0x15c390=!0x1);}async function _0x5dff9c(_0x5ccb41,_0x3904b7,_0x55c962){const _0x1f253d=window[_0x2414a2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2414a2([0x66,0x72,0x6f,0x6d])](_0x222f42(_0x55c962),_0x32e3a6=>_0x32e3a6[_0x2414a2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x6e0fe9=new window[(_0x2414a2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2414a2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5ccb41+_0x2414a2([0x2e])+_0x3904b7),_0x928845=window[_0x2414a2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2414a2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x928845)return;const _0x5ad86e=await _0x928845[_0x2414a2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2414a2([0x6a,0x77,0x6b]),_0xec0873,{[_0x2414a2([0x6e,0x61,0x6d,0x65])]:_0x2414a2([0x45,0x43,0x44,0x53,0x41]),[_0x2414a2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2414a2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2414a2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x928845[_0x2414a2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2414a2([0x6e,0x61,0x6d,0x65])]:_0x2414a2([0x45,0x43,0x44,0x53,0x41]),[_0x2414a2([0x68,0x61,0x73,0x68])]:{[_0x2414a2([0x6e,0x61,0x6d,0x65])]:_0x2414a2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5ad86e,_0x1f253d,_0x6e0fe9)||(_0x15c390=!0x1);}}function _0x333c11(_0x1acbc2){return _0x1acbc2[_0x2414a2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2414a2([0x65,0x79]))?JSON[_0x2414a2([0x70,0x61,0x72,0x73,0x65])](_0x222f42(_0x1acbc2)):null;}function _0x222f42(_0x56ede8){return window[_0x2414a2([0x61,0x74,0x6f,0x62])](_0x56ede8[_0x2414a2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2414a2([0x2b]))[_0x2414a2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2414a2([0x2f])));}function _0x4c5944(_0x5ed118){let _0x141939=0x1505;function _0x320194(_0x2f1a6b){for(let _0x3a4023=0x0;_0x3a4023<_0x2f1a6b[_0x2414a2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3a4023++){const _0x23e659=_0x2f1a6b[_0x2414a2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3a4023);_0x141939=(_0x141939<<0x5)+_0x141939+_0x23e659,_0x141939&=_0x141939;}}function _0x54f534(_0x5b1591){Array[_0x2414a2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b1591)?_0x5b1591[_0x2414a2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x54f534):_0x5b1591&&typeof _0x5b1591==_0x2414a2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2414a2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b1591)[_0x2414a2([0x73,0x6f,0x72,0x74])]()[_0x2414a2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x46df33,_0x23e0ac])=>{_0x320194(_0x46df33),_0x54f534(_0x23e0ac);}):_0x320194(window[_0x2414a2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b1591));}return _0x54f534(_0x5ed118),_0x141939>>>0x0;}function _0x2cd3a4(_0x3b95d2){return _0x3b95d2[_0x2414a2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2414a2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2414a2([0x30]));}function _0x55e6dd(_0x32d637){return _0x32d637[_0x2414a2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2414a2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2414a2([0x6a,0x6f,0x69,0x6e])]('');}function _0x418f3b(){}function _0x2414a2(_0x5683fe){const _0x35d37c=_0x432f;return _0x5683fe[_0x35d37c(0x10c)](_0x2914d4=>String[_0x35d37c(0xf8)](_0x2914d4))[_0x35d37c(0x121)]('');}_0x501e97(await _0x3bca95());}(this);}[_0x24705a(0x111)](){const _0x496a75=_0x24705a,_0x5bc6a6=this[_0x496a75(0xe4)][_0x496a75(0x117)][_0x496a75(0x109)];_0x5bc6a6[_0x496a75(0xe6)](_0x496a75(0x122))&&_0x5bc6a6[_0x496a75(0xd6)](_0x496a75(0x122),{'allowAttributes':[_0x496a75(0x127)]}),_0x5bc6a6[_0x496a75(0xe6)](_0x496a75(0xfc))&&_0x5bc6a6[_0x496a75(0xd6)](_0x496a75(0xfc),{'allowAttributes':[_0x496a75(0x127)]});}[_0x24705a(0x11f)](){const _0x55d2ac=_0x24705a,_0x14c1a4=this[_0x55d2ac(0xe4)];_0x14c1a4[_0x55d2ac(0x10f)][_0x55d2ac(0x10b)](_0x55d2ac(0xdd))[_0x55d2ac(0x10d)]({'model':_0x55d2ac(0x127),'view':_0x55d2ac(0x107)}),_0x14c1a4[_0x55d2ac(0x10f)][_0x55d2ac(0x10b)](_0x55d2ac(0x12a))[_0x55d2ac(0xdf)]({'model':{'key':_0x55d2ac(0x127),'value':_0x1e7608=>_0x1e7608[_0x55d2ac(0x125)](_0x55d2ac(0x107))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x2de1da=_0x14c1a4[_0x55d2ac(0xf9)][_0x55d2ac(0x119)](_0x55d2ac(0x104));_0x2de1da&&this[_0x55d2ac(0xe8)](_0x2de1da,_0x55d2ac(0xeb),(_0x1f752f,[_0x556a65,_0x46174e])=>{const _0x4f5488=_0x55d2ac;_0x556a65[_0x4f5488(0x113)](_0x4f5488(0x127),_0x46174e);});}[_0x24705a(0xff)](){const _0x12e818=_0x24705a,_0x3f7bda=this[_0x12e818(0xe4)][_0x12e818(0xfe)][_0x12e818(0x119)](_0x12e818(0x120))||{},_0x3da908=this[_0x12e818(0xe4)][_0x12e818(0xfe)][_0x12e818(0x119)](_0x12e818(0xe0))||'';this[_0x12e818(0x101)]=_0x3bd5cd(_0x1b4ab3[_0x12e818(0x102)],_0x12e818(0xe2),{..._0x3f7bda,'pubkey':_0x3da908,'ctx-name':_0x12e818(0x126),'sourceList':'','imgOnly':_0x12e818(0xf0),'removeCopyright':_0x12e818(0xf0),'localeName':this[_0x12e818(0xe4)][_0x12e818(0xea)][_0x12e818(0xe5)],'externalSourcesEmbedCss':_0x12e818(0xfb)}),this[_0x12e818(0x101)][_0x12e818(0x11b)]=_0x1c0eaf=>{const _0x166e8a=_0x12e818;if(_0x166e8a(0xe7)==_0x1c0eaf)return _0x166e8a(0x118);},_0x1b4ab3[_0x12e818(0x102)][_0x12e818(0xed)][_0x12e818(0xef)](this[_0x12e818(0x101)]);}[_0x24705a(0xfa)](){const _0x153098=_0x24705a;this[_0x153098(0x108)]=_0x3bd5cd(_0x1b4ab3[_0x153098(0x102)],_0x153098(0xec),{'ctx-name':_0x153098(0x126)}),_0x1b4ab3[_0x153098(0x102)][_0x153098(0xed)][_0x153098(0xef)](this[_0x153098(0x108)]);}[_0x24705a(0x129)](){const _0x4f0270=_0x24705a,_0x2fd0ed=this[_0x4f0270(0xe4)][_0x4f0270(0xf9)][_0x4f0270(0x119)](_0x4f0270(0xf1));_0x2fd0ed&&this[_0x4f0270(0xe8)](_0x2fd0ed,_0x4f0270(0x128),()=>{const _0x1c9d8f=_0x4f0270,_0x2450c3=this[_0x1c9d8f(0xe4)][_0x1c9d8f(0x117)][_0x1c9d8f(0x102)][_0x1c9d8f(0xde)][_0x1c9d8f(0x123)]();_0x2450c3&&_0x2450c3[_0x1c9d8f(0x125)](_0x1c9d8f(0x127))&&this[_0x1c9d8f(0xe4)][_0x1c9d8f(0x11d)][_0x1c9d8f(0x106)][_0x1c9d8f(0x11c)](_0x1c9d8f(0xd7),()=>{const _0xb26e7e=_0x1c9d8f;_0x5ef355(this[_0xb26e7e(0xe4)],_0x2450c3);});});const _0x53af63=this[_0x4f0270(0xe4)][_0x4f0270(0xf9)][_0x4f0270(0x119)](_0x4f0270(0x100));_0x53af63&&this[_0x4f0270(0xe8)](_0x53af63,_0x4f0270(0x128),()=>{const _0x54321e=_0x4f0270,_0x470b4d=this[_0x54321e(0xe4)][_0x54321e(0x117)][_0x54321e(0x102)][_0x54321e(0xde)][_0x54321e(0x123)]();_0x470b4d&&_0x470b4d[_0x54321e(0x125)](_0x54321e(0x127))&&this[_0x54321e(0xe4)][_0x54321e(0x11d)][_0x54321e(0x106)][_0x54321e(0x11c)](_0x54321e(0xd7),()=>{const _0x3eb4d3=_0x54321e;_0x5ef355(this[_0x3eb4d3(0xe4)],_0x470b4d);});});}}function _0x40b2(){const _0x1c8cf5=['getSelectedElement','init','getAttribute','uploader','uploadcareImageId','execute','_initImageProcessingIndicator','upcast','extend','render','remove','UploadcareEditing','28602kEYAgZ','uploadcare','PictureEditing','downcast','selection','elementToAttribute','uploadcare.pubkey','add','uc-config','1337bOdClU','editor','contentLanguage','isRegistered','closeMax','listenTo','requires','locale','cleanupImage','uc-upload-ctx-provider','body','28655803zcRUKk','appendChild','true','insertImage','isOfficialPlugin','1050547FKrkDI','destroy','905210Peanmn','afterInit','4002PMrhIu','fromCharCode','commands','_initCtx','\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09','imageInline','href','config','_initConfig','uploadcareImageReplace','_configElement','document','isPremiumPlugin','replaceImageSource','pluginName','view','data-uc-image-id','_ctxElement','schema','166bKuIkt','for','map','attributeToAttribute','2428DQsyrw','conversion','querySelector','_initSchema','input[uploadcare-file-input]','removeAttribute','27vNOqKj','6499912USdvMj','configElement','model','#uc-icon-arrow-down','get','1735kLXfmw','iconHrefResolver','once','editing','ctxElement','_initConversion','uploadcare.uploader','join','imageBlock'];_0x40b2=function(){return _0x1c8cf5;};return _0x40b2();}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type Dialog } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
7
|
+
import type { Element as ModelElement } from 'ckeditor5/src/engine.js';
|
|
8
|
+
declare const UploadcareImageEditController_base: {
|
|
9
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
10
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Controller for the Image Edit Dialog.
|
|
14
|
+
*
|
|
15
|
+
* It manages the dialog and all the related actions during dialog instance lifecycle. It is bound to a dialog instance
|
|
16
|
+
* and an active image element and destroyed when dialog instance is closed.
|
|
17
|
+
*/
|
|
18
|
+
export default class UploadcareImageEditController extends /* #__PURE__ -- @preserve */ UploadcareImageEditController_base {
|
|
19
|
+
/**
|
|
20
|
+
* Whenever the controller is active and dialog UI visible.
|
|
21
|
+
*
|
|
22
|
+
* @observable
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
isActive: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Status of the selected image when command is executed:
|
|
28
|
+
*
|
|
29
|
+
* * `uploading` - image is being uploaded to Uploadcare,
|
|
30
|
+
* * `ready` - image is ready to be edited (already in Uploadcare or just uploaded to it),
|
|
31
|
+
* * `error` - error occurred during image upload.
|
|
32
|
+
*
|
|
33
|
+
* @observable
|
|
34
|
+
* @readonly
|
|
35
|
+
*/
|
|
36
|
+
imageStatus: 'uploading' | 'ready' | 'error';
|
|
37
|
+
imageErrorType: 'Network' | 'NotFound' | null;
|
|
38
|
+
/**
|
|
39
|
+
* The Uploadcare image ID.
|
|
40
|
+
*
|
|
41
|
+
* @observable
|
|
42
|
+
* @readonly
|
|
43
|
+
*/
|
|
44
|
+
imageId: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* The Uploadcare image source URL.
|
|
47
|
+
*
|
|
48
|
+
* @observable
|
|
49
|
+
* @readonly
|
|
50
|
+
*/
|
|
51
|
+
imageSrc: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* The image width and height. It is used to calculate proper `srcset` attributes and aspect ratio.
|
|
54
|
+
*
|
|
55
|
+
* @observable
|
|
56
|
+
* @readonly
|
|
57
|
+
*/
|
|
58
|
+
imageDimension: {
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
} | null;
|
|
62
|
+
/**
|
|
63
|
+
* The Uploadcare image upload progress.
|
|
64
|
+
*
|
|
65
|
+
* @observable
|
|
66
|
+
* @readonly
|
|
67
|
+
*/
|
|
68
|
+
imageUploadProgress: number | null;
|
|
69
|
+
/**
|
|
70
|
+
* Creates a new instance of `UploadcareImageEditController`.
|
|
71
|
+
*/
|
|
72
|
+
constructor(editor: Editor, dialog: Dialog, imageElement: ModelElement);
|
|
73
|
+
/**
|
|
74
|
+
* Destroys `UploadcareImageEditController` instance.
|
|
75
|
+
*/
|
|
76
|
+
destroy(): void;
|
|
77
|
+
}
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
import{global as _0x4df267,ObservableMixin as _0x2d8f25}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x485fbd}from'ckeditor5/src/ui.js';import _0x4878e7 from'./uploadcareimageeditformview.js';import _0x314534 from'../../utils/uploadutils.js';import _0x300689 from'../../../theme/icons/uploadcare-image-edit.svg';import{getImageUrls as _0x4a0113,getImageDimension as _0x576caf}from'../../utils/editingutils.js';import{isAncestor as _0x5b2f62}from'../../utils/isancestor.js';export default class Q extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2d8f25(){constructor(_0x55ac14,_0x13b3ef,_0x2ccc8a){super(),this['_editor']=_0x55ac14,this['_dialog']=_0x13b3ef,this['_imageElement']=_0x2ccc8a,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x39d8ba=this['_imageElement'],_0x3465d1=_0x39d8ba['getAttribute']('uploadcareImageId'),_0x169036=_0x39d8ba['getAttribute']('src');if(_0x3465d1)await this['_loadImageInfo'](_0x3465d1,_0x169036);else{if(this['_imageCache']['has'](_0x169036)){const _0x583eb2=this['_imageCache']['get'](_0x169036);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x583eb2['url'],this['imageDimension']=_0x583eb2['dimension'],this['imageId']=_0x583eb2['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x482eaa}=this['_editor'],t=_0x482eaa['t'],_0x26f0dd=new _0x4878e7(_0x482eaa,this['imageStatus'],this['_attributes']);_0x26f0dd['bind']('status')['to'](this,'imageStatus'),_0x26f0dd['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x26f0dd['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x26f0dd['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x26f0dd,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x300689,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x26f0dd,'position':_0x485fbd['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x26f0dd['focus']();},'onHide':()=>{_0x26f0dd['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1d0e9e=>!_0x5b2f62(_0x1d0e9e,_0x26f0dd['element'])}});}['_loadImageInfo'](_0x645e94,_0x3b45da){return _0x314534['getInfo'](_0x645e94,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x48ae4e=>{const {width:_0x40ec64,height:_0x4a8b96}=_0x48ae4e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3b45da,this['imageDimension']={'width':_0x40ec64,'height':_0x4a8b96},this['imageId']=_0x645e94;})['catch'](_0x584c1e=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x584c1e['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1e98f4,_0x83846){return this['_getImageAsFile'](_0x1e98f4)['then'](_0x129d2b=>_0x314534['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x83846['signal'],'file':_0x129d2b,'onProgress':_0x488395=>{_0x488395&&_0x488395['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x488395['value']));}}))['then'](_0xd2f07a=>{const {width:_0x189de0,height:_0x2ef0f9}=_0xd2f07a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xd2f07a['cdnUrl'],this['imageDimension']={'width':_0x189de0,'height':_0x2ef0f9},this['imageId']=_0xd2f07a['uuid'],this['imageUploadProgress']=null;const _0xcde6c9=_0x1e98f4['getAttribute']('src');this['_imageCache']['set'](_0xcde6c9,{'id':_0xd2f07a['uuid'],'url':_0xd2f07a['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x9e1024=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x9e1024['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4a379e,_0x25bfba){_0x4a379e['on']('apply',(_0x118509,_0x54b231)=>{this['_replaceImage'](_0x25bfba,_0x54b231['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4a379e['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4a379e['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x58ded3,_0x92a608,_0x1a9e2a){const _0x43c3c6=this['_editor'],{width:_0x1a11dd,height:_0x4c6401}=_0x576caf(_0x92a608,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x72a13,imageSources:_0x2db513}=_0x4a0113(_0x92a608,_0x1a11dd);_0x43c3c6['model']['change'](_0x3bb595=>{if('$graveyard'===_0x58ded3['root']['rootName']){_0x43c3c6['execute']('insertImage',{'imageType':_0x58ded3['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x58ded3['getAttributes']()),'uploadcareImageId':_0x1a9e2a,'src':_0x72a13,'sources':_0x2db513,'width':_0x1a11dd,'height':_0x4c6401}});const _0x34d733=_0x58ded3['getChildren']();_0x58ded3=_0x43c3c6['model']['document']['selection']['getSelectedElement']();for(const _0x4605e8 of _0x34d733)_0x3bb595['append'](_0x3bb595['cloneElement'](_0x4605e8),_0x58ded3);}else _0x3bb595['setSelection'](_0x58ded3,'on'),_0x43c3c6['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x58ded3['getAttributes']()),'uploadcareImageId':_0x1a9e2a,'src':_0x72a13,'sources':_0x2db513,'width':_0x1a11dd,'height':_0x4c6401},_0x58ded3);_0x3bb595['setSelection'](_0x58ded3,'on');});}async['_getImageAsFile'](_0x3fcdc8){const _0x3ca0c5=_0x4df267['window'],_0x12b1eb=_0x4df267['document']['location']['href'],_0x24a462=new _0x3ca0c5['URL'](_0x3fcdc8['getAttribute']('src'),_0x12b1eb);if('data:'===_0x24a462['protocol']){const _0x2f7420=_0x24a462['href']['split'](','),_0x55944a=_0x2f7420[0x0]['match'](/:(.*?);/)[0x1],_0x47dba6=_0x55944a['split']('/')[0x1],_0x17c69f=_0x3ca0c5['atob'](_0x2f7420[_0x2f7420['length']-0x1]);let _0x4dd15f=_0x17c69f['length'];const _0x23f459=new _0x3ca0c5['Uint8Array'](_0x4dd15f);for(;_0x4dd15f--;)_0x23f459[_0x4dd15f]=_0x17c69f['charCodeAt'](_0x4dd15f);return new _0x3ca0c5['File']([_0x23f459],'image.'+_0x47dba6,{'type':_0x55944a});}const _0x173df0=_0x24a462['href']['split']('/'),_0x2c66a5=_0x173df0[_0x173df0['length']-0x1],_0x4d1b30=_0x2c66a5['split']('.')[0x1];return _0x3ca0c5['fetch'](_0x24a462['href'])['then'](_0x19af07=>_0x19af07['clone']()['blob']())['then'](_0x3066ac=>new _0x3ca0c5['File']([_0x3066ac],_0x2c66a5,{'type':'image/'+_0x4d1b30}));}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareimageedit/ui/uploadcareimageeditformeditingview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { View } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import type { UploadcareEditorConfig } from '../../uploadcareconfig.js';
|
|
11
|
+
/**
|
|
12
|
+
* A class representing the form editing view of the Uploadcare image edit feature.
|
|
13
|
+
*/
|
|
14
|
+
export default class UploadcareImageEditFormEditingView extends View {
|
|
15
|
+
/**
|
|
16
|
+
* Image source URL.
|
|
17
|
+
*
|
|
18
|
+
* @observable
|
|
19
|
+
*/
|
|
20
|
+
imageSrc: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
constructor(locale: Locale, attributes: UploadcareEditorConfig);
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
(function(_0x2b8794,_0x296044){const _0x3e0169=_0x5a1c,_0x45eca0=_0x2b8794();while(!![]){try{const _0x4b26e4=parseInt(_0x3e0169(0x1f7))/0x1*(parseInt(_0x3e0169(0x1f4))/0x2)+-parseInt(_0x3e0169(0x1ed))/0x3+-parseInt(_0x3e0169(0x1ec))/0x4+parseInt(_0x3e0169(0x1f6))/0x5*(-parseInt(_0x3e0169(0x1f0))/0x6)+parseInt(_0x3e0169(0x1f8))/0x7*(-parseInt(_0x3e0169(0x1f9))/0x8)+parseInt(_0x3e0169(0x1fb))/0x9*(-parseInt(_0x3e0169(0x1f1))/0xa)+parseInt(_0x3e0169(0x1ee))/0xb;if(_0x4b26e4===_0x296044)break;else _0x45eca0['push'](_0x45eca0['shift']());}catch(_0x24c4cd){_0x45eca0['push'](_0x45eca0['shift']());}}}(_0xa49d,0x4fbcc));import{View as _0x1de79c}from'ckeditor5/src/ui.js';function _0x5a1c(_0x1663cf,_0x30ac73){const _0xa49dbd=_0xa49d();return _0x5a1c=function(_0x5a1c72,_0xbccf36){_0x5a1c72=_0x5a1c72-0x1eb;let _0x4c4f1d=_0xa49dbd[_0x5a1c72];return _0x4c4f1d;},_0x5a1c(_0x1663cf,_0x30ac73);}export default class tt extends _0x1de79c{constructor(_0x2534f2,_0x7ce046){const _0x40cd8e=_0x5a1c;super(_0x2534f2);const _0xb0c621=this[_0x40cd8e(0x1eb)];this[_0x40cd8e(0x1f5)](_0x40cd8e(0x1ef),''),this[_0x40cd8e(0x1fa)]({'tag':_0x40cd8e(0x1f2),'attributes':{..._0x7ce046,'class':[_0x40cd8e(0x1f3),_0x40cd8e(0x1fd)],'ctx-name':_0x40cd8e(0x1fc),'cdn-url':_0xb0c621['to'](_0x40cd8e(0x1ef))}});}}function _0xa49d(){const _0x23919d=['18mPxlUs','image-edit','ck-uploadcare-theme','bindTemplate','160464hhNESn','396525McwRXF','14979074ojvmzD','imageSrc','418686otrkzO','162050JsdVQy','uc-cloud-image-editor','uc-light','10uLeQQp','set','35RofgOU','10895onpREh','2775059VWTjcX','8dKJWbE','setTemplate'];_0xa49d=function(){return _0x23919d;};return _0xa49d();}
|