@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20250216.0 → 0.0.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/LICENSE.md +6 -5
- package/README.md +3 -35
- package/package.json +7 -74
- package/CHANGELOG.md +0 -6
- package/build/uploadcare.js +0 -4
- package/ckeditor5-metadata.json +0 -47
- package/dist/index-content.css +0 -5
- package/dist/index-editor.css +0 -265
- package/dist/index.css +0 -315
- package/dist/index.js +0 -25
- package/lang/contexts.json +0 -27
- package/src/augmentation.d.ts +0 -30
- package/src/augmentation.js +0 -23
- package/src/index.d.ts +0 -16
- package/src/index.js +0 -23
- package/src/ui/uploadcarecontroller.d.ts +0 -26
- package/src/ui/uploadcarecontroller.js +0 -24
- package/src/ui/uploadcareformview.d.ts +0 -23
- package/src/ui/uploadcareformview.js +0 -23
- package/src/uploadcare.d.ts +0 -48
- package/src/uploadcare.js +0 -23
- package/src/uploadcarecommand.d.ts +0 -38
- package/src/uploadcarecommand.js +0 -23
- package/src/uploadcareconfig.d.ts +0 -227
- package/src/uploadcareconfig.js +0 -23
- package/src/uploadcareediting.d.ts +0 -49
- package/src/uploadcareediting.js +0 -23
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.d.ts +0 -78
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +0 -24
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.d.ts +0 -25
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +0 -23
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.d.ts +0 -24
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +0 -23
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.d.ts +0 -24
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +0 -23
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.d.ts +0 -32
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +0 -23
- package/src/uploadcareimageedit/uploadcareimageeditcommand.d.ts +0 -49
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +0 -23
- package/src/uploadcareimageedit/uploadcareimageeditediting.d.ts +0 -38
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +0 -23
- package/src/uploadcareimageedit/uploadcareimageeditui.d.ts +0 -48
- package/src/uploadcareimageedit/uploadcareimageeditui.js +0 -23
- package/src/uploadcareimageedit/uploadcareimagereplacecommand.d.ts +0 -23
- package/src/uploadcareimageedit/uploadcareimagereplacecommand.js +0 -23
- package/src/uploadcareimageedit.d.ts +0 -32
- package/src/uploadcareimageedit.js +0 -23
- package/src/uploadcareui.d.ts +0 -41
- package/src/uploadcareui.js +0 -23
- package/src/uploadcareuploadadapter.d.ts +0 -39
- package/src/uploadcareuploadadapter.js +0 -23
- package/src/utils/common-translations.d.ts +0 -5
- package/src/utils/common-translations.js +0 -23
- package/src/utils/dialogfocusmanagerview.d.ts +0 -29
- package/src/utils/dialogfocusmanagerview.js +0 -23
- package/src/utils/editingutils.d.ts +0 -5
- package/src/utils/editingutils.js +0 -23
- package/src/utils/isancestor.d.ts +0 -8
- package/src/utils/isancestor.js +0 -23
- package/src/utils/uploadutils.d.ts +0 -5
- package/src/utils/uploadutils.js +0 -23
- package/theme/uploadcare-form.css +0 -198
- package/theme/uploadcare-theme.css +0 -20
- package/theme/uploadcareimageedit.css +0 -64
|
@@ -1,227 +0,0 @@
|
|
|
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 {};
|
package/src/uploadcareconfig.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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 _0x50cb(_0x81720f,_0x1a862d){var _0x1b677c=_0x1b67();return _0x50cb=function(_0x50cb79,_0x2dec76){_0x50cb79=_0x50cb79-0xb2;var _0x2cec6b=_0x1b677c[_0x50cb79];return _0x2cec6b;},_0x50cb(_0x81720f,_0x1a862d);}(function(_0x3c94fe,_0x83e7b4){var _0x46a013=_0x50cb,_0x4b33f8=_0x3c94fe();while(!![]){try{var _0x2b04bc=parseInt(_0x46a013(0xba))/0x1*(-parseInt(_0x46a013(0xc4))/0x2)+-parseInt(_0x46a013(0xbe))/0x3+parseInt(_0x46a013(0xbb))/0x4+-parseInt(_0x46a013(0xb3))/0x5+-parseInt(_0x46a013(0xb4))/0x6+parseInt(_0x46a013(0xbf))/0x7+-parseInt(_0x46a013(0xca))/0x8*(-parseInt(_0x46a013(0xb6))/0x9);if(_0x2b04bc===_0x83e7b4)break;else _0x4b33f8['push'](_0x4b33f8['shift']());}catch(_0x11fca0){_0x4b33f8['push'](_0x4b33f8['shift']());}}}(_0x1b67,0x19c0c));export var UploadcareSource;!function(_0x1cd89c){var _0xa6749c=_0x50cb;_0x1cd89c[_0xa6749c(0xc6)]=_0xa6749c(0xc5),_0x1cd89c[_0xa6749c(0xb2)]=_0xa6749c(0xc3),_0x1cd89c[_0xa6749c(0xc8)]=_0xa6749c(0xbc),_0x1cd89c[_0xa6749c(0xc7)]=_0xa6749c(0xb9),_0x1cd89c[_0xa6749c(0xc2)]=_0xa6749c(0xb5),_0x1cd89c[_0xa6749c(0xb7)]=_0xa6749c(0xb8),_0x1cd89c[_0xa6749c(0xc0)]=_0xa6749c(0xc9),_0x1cd89c[_0xa6749c(0xbd)]=_0xa6749c(0xc1);}(UploadcareSource||(UploadcareSource={}));function _0x1b67(){var _0x37b0d1=['10xjIfiu','local','Local','GDrive','Dropbox','instagram','224tSaOIf','URL','764385NkXEbW','251694ASFDiu','facebook','150543MvmyHe','GPhotos','gphotos','gdrive','3989jXowmZ','75832flozIF','dropbox','OneDrive','555324FUPEwQ','126343udghYb','Instagram','onedrive','Facebook','url'];_0x1b67=function(){return _0x37b0d1;};return _0x1b67();}
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
}
|
package/src/uploadcareediting.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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 _0x5b94(){const _0x28b40a=['154164UolvPp','uploadcareImageId','querySelector','config','257018UmDrVU','2255510PZQFFN','input[uploadcare-file-input]','fromCharCode','getAttribute','cleanupImage','uploadcareImageReplace','body','add','schema','map','6484QnHwUw','for','data-uc-image-id','_configElement','href','isOfficialPlugin','configElement','listenTo','_initCtx','imageInline','attributeToAttribute','pluginName','6019064SlsbdH','commands','join','document','1503FKqpBd','requires','execute','uploader','_initSchema','init','editor','remove','2508ZFspkj','2696226yDoDSt','#uc-icon-arrow-down','\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','render','view','extend','downcast','uploadcare.pubkey','get','upcast','editing','replaceImageSource','true','iconHrefResolver','insertImage','conversion','298590GiOeSo','selection','isRegistered','_ctxElement','model','uploadcare','afterInit','uc-upload-ctx-provider','3LukVuy','7KmuPGl','UploadcareEditing','_initConfig','contentLanguage','removeAttribute','uploadcare.uploader','isPremiumPlugin','imageBlock','_initImageProcessingIndicator','getSelectedElement','ctxElement','closeMax','36Sbkxba','uc-config','elementToAttribute','appendChild','_initConversion','locale','once','destroy','PictureEditing'];_0x5b94=function(){return _0x28b40a;};return _0x5b94();}const _0x5a98ab=_0x3df3;function _0x3df3(_0x1d79b1,_0x5352e6){const _0x5b941c=_0x5b94();return _0x3df3=function(_0x3df334,_0x1c3418){_0x3df334=_0x3df334-0x18b;let _0x1c0e1e=_0x5b941c[_0x3df334];return _0x1c0e1e;},_0x3df3(_0x1d79b1,_0x5352e6);}(function(_0xfbb783,_0x134641){const _0x52d7e2=_0x3df3,_0x56be38=_0xfbb783();while(!![]){try{const _0x3666d2=parseInt(_0x52d7e2(0x1db))/0x1*(parseInt(_0x52d7e2(0x19f))/0x2)+parseInt(_0x52d7e2(0x1ba))/0x3*(-parseInt(_0x52d7e2(0x1aa))/0x4)+parseInt(_0x52d7e2(0x1d3))/0x5+-parseInt(_0x52d7e2(0x1c3))/0x6+-parseInt(_0x52d7e2(0x1dc))/0x7*(parseInt(_0x52d7e2(0x1b6))/0x8)+parseInt(_0x52d7e2(0x192))/0x9*(-parseInt(_0x52d7e2(0x1a0))/0xa)+parseInt(_0x52d7e2(0x1c2))/0xb*(parseInt(_0x52d7e2(0x19b))/0xc);if(_0x3666d2===_0x134641)break;else _0x56be38['push'](_0x56be38['shift']());}catch(_0x4259d7){_0x56be38['push'](_0x56be38['shift']());}}}(_0x5b94,0x6fe2a));import{Plugin as _0x110210}from'ckeditor5/src/core.js';import{Dialog as _0x2374ec}from'ckeditor5/src/ui.js';import{createElement as _0x5cfb3e,global as _0x5688f2,uid as _0x1ad64c}from'ckeditor5/src/utils.js';import _0x458cc6 from'./uploadcarecommand.js';import _0x2296a9 from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x15a2ae}from'./utils/editingutils.js';export default class i extends _0x110210{[_0x5a98ab(0x1ad)]=null;[_0x5a98ab(0x1d6)]=null;static get[_0x5a98ab(0x1b5)](){const _0x5a58df=_0x5a98ab;return _0x5a58df(0x1dd);}static get[_0x5a98ab(0x1bb)](){const _0x4fdcf6=_0x5a98ab;return[_0x4fdcf6(0x19a),_0x2296a9,_0x2374ec];}static get[_0x5a98ab(0x1af)](){return!0x0;}static get[_0x5a98ab(0x18c)](){return!0x0;}get[_0x5a98ab(0x1b0)](){const _0x521e5f=_0x5a98ab;return this[_0x521e5f(0x1ad)];}get[_0x5a98ab(0x190)](){const _0x235186=_0x5a98ab;return this[_0x235186(0x1d6)];}[_0x5a98ab(0x1bf)](){const _0x56c1d4=_0x5a98ab,_0x57df70=this[_0x56c1d4(0x1c0)];_0x57df70[_0x56c1d4(0x1b7)][_0x56c1d4(0x1a7)](_0x56c1d4(0x1d8),new _0x458cc6(_0x57df70));}[_0x5a98ab(0x1d9)](){const _0x44239d=_0x5a98ab;this[_0x44239d(0x1be)](),this[_0x44239d(0x196)](),this[_0x44239d(0x1de)](),this[_0x44239d(0x1b2)](),this[_0x44239d(0x18e)](),this[_0x44239d(0x1b1)](this[_0x44239d(0x1c0)],_0x44239d(0x199),()=>{const _0x259759=_0x44239d;this[_0x259759(0x1ad)]&&(this[_0x259759(0x1ad)][_0x259759(0x1c1)](),this[_0x259759(0x1ad)]=null),this[_0x259759(0x1d6)]&&(this[_0x259759(0x1d6)][_0x259759(0x1c1)](),this[_0x259759(0x1d6)]=null);const _0x14c3be=_0x5688f2[_0x259759(0x1b9)][_0x259759(0x19d)](_0x259759(0x1a1));_0x14c3be&&_0x14c3be[_0x259759(0x1c1)]();}),async function(_0x237e73){const _0x8d584c=_0x31fd3b([0x43,0x48,0x44,0x51,0x64,0x7a,0x63,0x59,0x58,0x50,0x34,0x72,0x66,0x6f,0x38,0x61,0x53,0x31,0x71,0x75,0x4d,0x78,0x74,0x32,0x55,0x46,0x6c,0x65,0x47,0x35,0x6d,0x5a,0x30,0x4c,0x79,0x6a,0x54,0x57,0x4e,0x36,0x56,0x42,0x70,0x77,0x76,0x4a,0x4f,0x73,0x37,0x41,0x52,0x6e,0x33,0x62,0x39,0x67,0x68,0x49,0x6b,0x45,0x4b,0x69]),_0x16c58b=0x3ab88d25,_0x703cc4=0x3abfd28d^_0x16c58b,_0x4119ca=window[_0x31fd3b([0x44,0x61,0x74,0x65])][_0x31fd3b([0x6e,0x6f,0x77])](),_0x2bf5bf=_0x237e73[_0x31fd3b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1ea17f=new window[(_0x31fd3b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4af9f7=>{_0x2bf5bf[_0x31fd3b([0x6f,0x6e,0x63,0x65])](_0x31fd3b([0x72,0x65,0x61,0x64,0x79]),_0x4af9f7);}),_0xb40758={[_0x31fd3b([0x6b,0x74,0x79])]:_0x31fd3b([0x45,0x43]),[_0x31fd3b([0x75,0x73,0x65])]:_0x31fd3b([0x73,0x69,0x67]),[_0x31fd3b([0x63,0x72,0x76])]:_0x31fd3b([0x50,0x2d,0x32,0x35,0x36]),[_0x31fd3b([0x78])]:_0x31fd3b([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]),[_0x31fd3b([0x79])]:_0x31fd3b([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]),[_0x31fd3b([0x61,0x6c,0x67])]:_0x31fd3b([0x45,0x53,0x32,0x35,0x36])},_0x32db9c=_0x2bf5bf[_0x31fd3b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x31fd3b([0x67,0x65,0x74])](_0x31fd3b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2db450(){let _0x14707a,_0x9c6875=null,_0x32e964=null;try{if(_0x32db9c==_0x31fd3b([0x47,0x50,0x4c]))return _0x31fd3b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x14707a=_0x5daa3e(),!_0x14707a)return _0x31fd3b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x14707a[_0x31fd3b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x32e964=_0x2dae55(_0x14707a[_0x31fd3b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x14707a[_0x31fd3b([0x6a,0x74,0x69])])),await _0x533d33()?_0x5eb3df()?_0x8afdfe()?_0x31fd3b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1c0cef()?(_0x14707a[_0x31fd3b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x31fd3b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x9c6875=_0x42557e(_0x31fd3b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x14707a[_0x31fd3b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x31fd3b([0x74,0x72,0x69,0x61,0x6c])&&(_0x9c6875=_0x42557e(_0x31fd3b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5c911e()):_0x31fd3b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x31fd3b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x31fd3b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4d8f5d){return _0x31fd3b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x8afdfe(){const _0x1235a6=[_0x31fd3b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x31fd3b([0x74,0x72,0x69,0x61,0x6c])][_0x31fd3b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14707a[_0x31fd3b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4119ca/0x3e8:0xe10*_0x703cc4;return _0x14707a[_0x31fd3b([0x65,0x78,0x70])]<_0x1235a6;}function _0x5eb3df(){const _0x118c88=_0x14707a[_0x31fd3b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x118c88&&(!!_0x118c88[_0x31fd3b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31fd3b([0x2a]))||!!_0x118c88[_0x31fd3b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31fd3b([0x55,0x50,0x4c,0x43])));}function _0x1c0cef(){const _0x5b5afa=_0x3df3,_0xd54924=_0x14707a[_0x31fd3b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xd54924||0x0==_0xd54924[_0x31fd3b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1a737d}=new URL(window[_0x31fd3b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x5b5afa(0x1ae)]);if(_0xd54924[_0x31fd3b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a737d))return!0x0;const _0x1a0f62=_0x1a737d[_0x31fd3b([0x73,0x70,0x6c,0x69,0x74])](_0x31fd3b([0x2e]));return _0xd54924[_0x31fd3b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5106e1=>_0x5106e1[_0x31fd3b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31fd3b([0x2a])))[_0x31fd3b([0x6d,0x61,0x70])](_0x595fcd=>_0x595fcd[_0x31fd3b([0x73,0x70,0x6c,0x69,0x74])](_0x31fd3b([0x2e])))[_0x31fd3b([0x73,0x6f,0x6d,0x65])](_0xb4909f=>_0x1a0f62[_0x31fd3b([0x65,0x76,0x65,0x72,0x79])]((_0x2ca4b4,_0x3b0fb2)=>_0xb4909f[_0x3b0fb2]===_0x2ca4b4||_0xb4909f[_0x3b0fb2]===_0x31fd3b([0x2a])));}function _0x5c911e(){return _0x9c6875&&_0x32e964?new window[(_0x31fd3b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3cc105,_0x58bc6c)=>{_0x9c6875[_0x31fd3b([0x74,0x68,0x65,0x6e])](_0x3cc105,_0x58bc6c),_0x32e964[_0x31fd3b([0x74,0x68,0x65,0x6e])](_0x9c0cd=>{_0x9c0cd!=_0x31fd3b([0x56,0x61,0x6c,0x69,0x64])&&_0x3cc105(_0x9c0cd);},_0x58bc6c);}):_0x9c6875||_0x32e964||_0x31fd3b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2dae55(_0x414a2b,_0x270c49){return new window[(_0x31fd3b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x323508=>{if(_0x11461c())return _0x323508(_0x31fd3b([0x56,0x61,0x6c,0x69,0x64]));_0x30d34b(),_0x2bf5bf[_0x31fd3b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x31fd3b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4c9281=!0x1;const _0x35287a=_0x1ad64c();function _0x2295b2(_0x1ffcb6){return!!_0x1ffcb6&&(typeof _0x1ffcb6===_0x31fd3b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1ffcb6===_0x31fd3b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1ffcb6[_0x31fd3b([0x74,0x68,0x65,0x6e])]===_0x31fd3b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1ffcb6[_0x31fd3b([0x63,0x61,0x74,0x63,0x68])]===_0x31fd3b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x29f5e2(_0x58b499){_0x179871(_0x58b499)[_0x31fd3b([0x74,0x68,0x65,0x6e])](_0x1c2bce=>{if(!_0x1c2bce||_0x1c2bce[_0x31fd3b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x31fd3b([0x6f,0x6b]))return _0x31fd3b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2148cc(_0x4785c2(_0x35287a+_0x270c49))!=_0x1c2bce[_0x31fd3b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x31fd3b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x31fd3b([0x56,0x61,0x6c,0x69,0x64]);})[_0x31fd3b([0x74,0x68,0x65,0x6e])](_0x5232f6=>(_0x476b2d(),_0x5232f6),()=>{const _0x57a0b9=_0x1791d1();return null==_0x57a0b9?(_0x476b2d(),_0x31fd3b([0x56,0x61,0x6c,0x69,0x64])):_0x31fd3b(_0x4119ca-_0x57a0b9>(0x1eb40925^_0x16c58b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x31fd3b([0x74,0x68,0x65,0x6e])](_0x323508)[_0x31fd3b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x323508(_0x31fd3b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x113888=0x3a8e63a5^_0x16c58b;function _0x476b2d(){const _0x201ddb=_0x31fd3b([0x6c,0x6c,0x63,0x74,0x2d])+_0x2148cc(_0x4785c2(_0x414a2b)),_0x577179=_0x4c5ee3(_0x2148cc(window[_0x31fd3b([0x4d,0x61,0x74,0x68])][_0x31fd3b([0x63,0x65,0x69,0x6c])](_0x4119ca/_0x113888)));window[_0x31fd3b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x31fd3b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x201ddb,_0x577179);}function _0x1791d1(){const _0x26fe60=_0x31fd3b([0x6c,0x6c,0x63,0x74,0x2d])+_0x2148cc(_0x4785c2(_0x414a2b)),_0x395d73=window[_0x31fd3b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x31fd3b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x26fe60);return _0x395d73?window[_0x31fd3b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4c5ee3(_0x395d73),0x10)*_0x113888:null;}function _0x179871(_0xcec931){return new window[(_0x31fd3b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5e8f37,_0x37965a)=>{_0xcec931[_0x31fd3b([0x74,0x68,0x65,0x6e])](_0x5e8f37,_0x37965a),window[_0x31fd3b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x37965a,0x3ab959e5^_0x16c58b);});}}_0x2bf5bf[_0x31fd3b([0x6f,0x6e])](_0x31fd3b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x351af6,_0x301a9c)=>{if(_0x301a9c[0x0]!=_0x414a2b)return _0x323508(_0x31fd3b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x301a9c[0x1]={..._0x301a9c[0x1],[_0x31fd3b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x35287a};},{[_0x31fd3b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x31fd3b([0x68,0x69,0x67,0x68])}),_0x2bf5bf[_0x31fd3b([0x6f,0x6e])](_0x31fd3b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x15c785=>{_0x2295b2(_0x15c785[_0x31fd3b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4c9281=!0x0,_0x29f5e2(_0x15c785[_0x31fd3b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x31fd3b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x31fd3b([0x6c,0x6f,0x77])}),_0x1ea17f[_0x31fd3b([0x74,0x68,0x65,0x6e])](()=>{_0x4c9281||_0x323508(_0x31fd3b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x11461c(){return _0x2bf5bf[_0x31fd3b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x31fd3b([0x76,0x69,0x65,0x77])][_0x31fd3b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x31fd3b([0x61,0x75,0x74,0x6f]);}function _0x30d34b(){_0x2bf5bf[_0x31fd3b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x31fd3b([0x76,0x69,0x65,0x77])][_0x31fd3b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x31fd3b([0x61,0x75,0x74,0x6f]);}}function _0x42557e(_0x28d723){const _0x307394=[new window[(_0x31fd3b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x211a2b=>setTimeout(_0x211a2b,0x3ab1b3e9^_0x16c58b)),_0x1ea17f[_0x31fd3b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x31fd3b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a3487=>{let _0x14dfe6=0x0;_0x2bf5bf[_0x31fd3b([0x6d,0x6f,0x64,0x65,0x6c])][_0x31fd3b([0x6f,0x6e])](_0x31fd3b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x20061d,_0x3fd735)=>{_0x3fd735[0x0][_0x31fd3b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x14dfe6++,_0x14dfe6==(0x3ab88cdd^_0x16c58b)&&(_0x2a3487(),_0x20061d[_0x31fd3b([0x6f,0x66,0x66])]());});}))];return window[_0x31fd3b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x31fd3b([0x72,0x61,0x63,0x65])](_0x307394)[_0x31fd3b([0x74,0x68,0x65,0x6e])](()=>_0x28d723);}async function _0x22522d(){await _0x1ea17f,_0x2bf5bf[_0x31fd3b([0x6d,0x6f,0x64,0x65,0x6c])][_0x31fd3b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3a4a6f,_0x2bf5bf[_0x31fd3b([0x6d,0x6f,0x64,0x65,0x6c])][_0x31fd3b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3a4a6f,_0x2bf5bf[_0x31fd3b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x31fd3b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x53936e(_0x6f248f){const _0x2fa316=_0x4aa5fe();_0x2bf5bf[_0x2fa316]=_0x31fd3b([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x6f248f,_0x6f248f!=_0x31fd3b([0x56,0x61,0x6c,0x69,0x64])&&_0x22522d();}function _0x4aa5fe(){const _0x181426=window[_0x31fd3b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x31fd3b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x31fd3b([0x6e,0x6f,0x77])]())[_0x31fd3b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x31fd3b([0x2e]),'');let _0x17ab51=_0x31fd3b([0x43]);for(let _0x5048fb=0x0;_0x5048fb<_0x181426[_0x31fd3b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5048fb+=0x2){let _0x2f4514=window[_0x31fd3b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x181426[_0x31fd3b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5048fb,_0x5048fb+0x2));_0x2f4514>=_0x8d584c[_0x31fd3b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2f4514-=_0x8d584c[_0x31fd3b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x17ab51+=_0x8d584c[_0x2f4514];}return _0x17ab51;}function _0x5daa3e(){const _0x49458e=_0x32db9c[_0x31fd3b([0x73,0x70,0x6c,0x69,0x74])](_0x31fd3b([0x2e]));if(0x3!=_0x49458e[_0x31fd3b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5cb1de(_0x49458e[0x1]);function _0x5cb1de(_0x453dfa){const _0x5705f3=_0x2b9af6(_0x453dfa);return _0x5705f3&&_0x11573f()?_0x5705f3:null;function _0x11573f(){const _0x4e16c3=_0x5705f3[_0x31fd3b([0x6a,0x74,0x69])],_0x389cfa=window[_0x31fd3b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e16c3[_0x31fd3b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4e16c3[_0x31fd3b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2250ae={..._0x5705f3,[_0x31fd3b([0x6a,0x74,0x69])]:_0x4e16c3[_0x31fd3b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4e16c3[_0x31fd3b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2250ae[_0x31fd3b([0x76,0x63])],_0x4785c2(_0x2250ae)==_0x389cfa;}}}async function _0x533d33(){let _0x459943=!0x0;try{const _0x13fd3d=_0x32db9c[_0x31fd3b([0x73,0x70,0x6c,0x69,0x74])](_0x31fd3b([0x2e])),[_0x4ca521,_0x19f26b,_0x240da6]=_0x13fd3d;return _0x3c73e7(_0x4ca521),await _0x323624(_0x4ca521,_0x19f26b,_0x240da6),_0x459943;}catch(_0x53dfde){return!0x1;}function _0x3c73e7(_0x2c1e7c){const _0xb586b4=_0x2b9af6(_0x2c1e7c);_0xb586b4&&_0xb586b4[_0x31fd3b([0x61,0x6c,0x67])]==_0x31fd3b([0x45,0x53,0x32,0x35,0x36])||(_0x459943=!0x1);}async function _0x323624(_0x6a854,_0x2497e5,_0x47ed0a){const _0x1e2ac3=window[_0x31fd3b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x31fd3b([0x66,0x72,0x6f,0x6d])](_0x57e151(_0x47ed0a),_0xf24681=>_0xf24681[_0x31fd3b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x47b456=new window[(_0x31fd3b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x31fd3b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x6a854+_0x31fd3b([0x2e])+_0x2497e5),_0x5d3030=window[_0x31fd3b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x31fd3b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5d3030)return;const _0x930352=await _0x5d3030[_0x31fd3b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x31fd3b([0x6a,0x77,0x6b]),_0xb40758,{[_0x31fd3b([0x6e,0x61,0x6d,0x65])]:_0x31fd3b([0x45,0x43,0x44,0x53,0x41]),[_0x31fd3b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x31fd3b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x31fd3b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5d3030[_0x31fd3b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x31fd3b([0x6e,0x61,0x6d,0x65])]:_0x31fd3b([0x45,0x43,0x44,0x53,0x41]),[_0x31fd3b([0x68,0x61,0x73,0x68])]:{[_0x31fd3b([0x6e,0x61,0x6d,0x65])]:_0x31fd3b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x930352,_0x1e2ac3,_0x47b456)||(_0x459943=!0x1);}}function _0x2b9af6(_0x39cdbb){return _0x39cdbb[_0x31fd3b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x31fd3b([0x65,0x79]))?JSON[_0x31fd3b([0x70,0x61,0x72,0x73,0x65])](_0x57e151(_0x39cdbb)):null;}function _0x57e151(_0x4baeec){return window[_0x31fd3b([0x61,0x74,0x6f,0x62])](_0x4baeec[_0x31fd3b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x31fd3b([0x2b]))[_0x31fd3b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x31fd3b([0x2f])));}function _0x4785c2(_0x13a70d){let _0x398e4b=0x1505;function _0x39ebbc(_0x4c85bf){for(let _0x2aa2a3=0x0;_0x2aa2a3<_0x4c85bf[_0x31fd3b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2aa2a3++){const _0x4076b0=_0x4c85bf[_0x31fd3b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2aa2a3);_0x398e4b=(_0x398e4b<<0x5)+_0x398e4b+_0x4076b0,_0x398e4b&=_0x398e4b;}}function _0x52b2cd(_0x13183b){Array[_0x31fd3b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x13183b)?_0x13183b[_0x31fd3b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x52b2cd):_0x13183b&&typeof _0x13183b==_0x31fd3b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x31fd3b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x13183b)[_0x31fd3b([0x73,0x6f,0x72,0x74])]()[_0x31fd3b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3076ea,_0x2abfc4])=>{_0x39ebbc(_0x3076ea),_0x52b2cd(_0x2abfc4);}):_0x39ebbc(window[_0x31fd3b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x13183b));}return _0x52b2cd(_0x13a70d),_0x398e4b>>>0x0;}function _0x2148cc(_0x50cb02){return _0x50cb02[_0x31fd3b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x31fd3b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x31fd3b([0x30]));}function _0x4c5ee3(_0x329f11){return _0x329f11[_0x31fd3b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x31fd3b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x31fd3b([0x6a,0x6f,0x69,0x6e])]('');}function _0x3a4a6f(){}function _0x31fd3b(_0x49cb99){const _0x270c88=_0x3df3;return _0x49cb99[_0x270c88(0x1a9)](_0x10ff2b=>String[_0x270c88(0x1a2)](_0x10ff2b))[_0x270c88(0x1b8)]('');}_0x53936e(await _0x2db450());}(this);}[_0x5a98ab(0x1be)](){const _0x42d885=_0x5a98ab,_0x240c65=this[_0x42d885(0x1c0)][_0x42d885(0x1d7)][_0x42d885(0x1a8)];_0x240c65[_0x42d885(0x1d5)](_0x42d885(0x18d))&&_0x240c65[_0x42d885(0x1c8)](_0x42d885(0x18d),{'allowAttributes':[_0x42d885(0x19c)]}),_0x240c65[_0x42d885(0x1d5)](_0x42d885(0x1b3))&&_0x240c65[_0x42d885(0x1c8)](_0x42d885(0x1b3),{'allowAttributes':[_0x42d885(0x19c)]});}[_0x5a98ab(0x196)](){const _0x1bdfcd=_0x5a98ab,_0x9350fe=this[_0x1bdfcd(0x1c0)];_0x9350fe[_0x1bdfcd(0x1d2)][_0x1bdfcd(0x1ab)](_0x1bdfcd(0x1c9))[_0x1bdfcd(0x1b4)]({'model':_0x1bdfcd(0x19c),'view':_0x1bdfcd(0x1ac)}),_0x9350fe[_0x1bdfcd(0x1d2)][_0x1bdfcd(0x1ab)](_0x1bdfcd(0x1cc))[_0x1bdfcd(0x194)]({'model':{'key':_0x1bdfcd(0x19c),'value':_0x1165ff=>_0x1165ff[_0x1bdfcd(0x1a3)](_0x1bdfcd(0x1ac))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x750518=_0x9350fe[_0x1bdfcd(0x1b7)][_0x1bdfcd(0x1cb)](_0x1bdfcd(0x1ce));_0x750518&&this[_0x1bdfcd(0x1b1)](_0x750518,_0x1bdfcd(0x1a4),(_0x2588ce,[_0x14519b,_0x385705])=>{const _0x5a2e59=_0x1bdfcd;_0x14519b[_0x5a2e59(0x1e0)](_0x5a2e59(0x19c),_0x385705);});}[_0x5a98ab(0x1de)](){const _0x4c05da=_0x5a98ab,_0x391126=this[_0x4c05da(0x1c0)][_0x4c05da(0x19e)][_0x4c05da(0x1cb)](_0x4c05da(0x18b))||{},_0x1989e2=this[_0x4c05da(0x1c0)][_0x4c05da(0x19e)][_0x4c05da(0x1cb)](_0x4c05da(0x1ca))||'';this[_0x4c05da(0x1ad)]=_0x5cfb3e(_0x5688f2[_0x4c05da(0x1b9)],_0x4c05da(0x193),{..._0x391126,'pubkey':_0x1989e2,'ctx-name':_0x4c05da(0x1bd),'sourceList':'','imgOnly':_0x4c05da(0x1cf),'removeCopyright':_0x4c05da(0x1cf),'localeName':this[_0x4c05da(0x1c0)][_0x4c05da(0x197)][_0x4c05da(0x1df)],'externalSourcesEmbedCss':_0x4c05da(0x1c5)}),this[_0x4c05da(0x1ad)][_0x4c05da(0x1d0)]=_0x554ce4=>{const _0x4fb49e=_0x4c05da;if(_0x4fb49e(0x191)==_0x554ce4)return _0x4fb49e(0x1c4);},_0x5688f2[_0x4c05da(0x1b9)][_0x4c05da(0x1a6)][_0x4c05da(0x195)](this[_0x4c05da(0x1ad)]);}[_0x5a98ab(0x1b2)](){const _0x391d3d=_0x5a98ab;this[_0x391d3d(0x1d6)]=_0x5cfb3e(_0x5688f2[_0x391d3d(0x1b9)],_0x391d3d(0x1da),{'ctx-name':_0x391d3d(0x1bd)}),_0x5688f2[_0x391d3d(0x1b9)][_0x391d3d(0x1a6)][_0x391d3d(0x195)](this[_0x391d3d(0x1d6)]);}[_0x5a98ab(0x18e)](){const _0x5b9355=_0x5a98ab,_0x529a52=this[_0x5b9355(0x1c0)][_0x5b9355(0x1b7)][_0x5b9355(0x1cb)](_0x5b9355(0x1d1));_0x529a52&&this[_0x5b9355(0x1b1)](_0x529a52,_0x5b9355(0x1bc),()=>{const _0x1545ab=_0x5b9355,_0x3f09d6=this[_0x1545ab(0x1c0)][_0x1545ab(0x1d7)][_0x1545ab(0x1b9)][_0x1545ab(0x1d4)][_0x1545ab(0x18f)]();_0x3f09d6&&_0x3f09d6[_0x1545ab(0x1a3)](_0x1545ab(0x19c))&&this[_0x1545ab(0x1c0)][_0x1545ab(0x1cd)][_0x1545ab(0x1c7)][_0x1545ab(0x198)](_0x1545ab(0x1c6),()=>{const _0x505f5c=_0x1545ab;_0x15a2ae(this[_0x505f5c(0x1c0)],_0x3f09d6);});});const _0x49f353=this[_0x5b9355(0x1c0)][_0x5b9355(0x1b7)][_0x5b9355(0x1cb)](_0x5b9355(0x1a5));_0x49f353&&this[_0x5b9355(0x1b1)](_0x49f353,_0x5b9355(0x1bc),()=>{const _0x1ea61c=_0x5b9355,_0x3a98b1=this[_0x1ea61c(0x1c0)][_0x1ea61c(0x1d7)][_0x1ea61c(0x1b9)][_0x1ea61c(0x1d4)][_0x1ea61c(0x18f)]();_0x3a98b1&&_0x3a98b1[_0x1ea61c(0x1a3)](_0x1ea61c(0x19c))&&this[_0x1ea61c(0x1c0)][_0x1ea61c(0x1cd)][_0x1ea61c(0x1c7)][_0x1ea61c(0x198)](_0x1ea61c(0x1c6),()=>{const _0x2b4535=_0x1ea61c;_0x15a2ae(this[_0x2b4535(0x1c0)],_0x3a98b1);});});}}
|
|
@@ -1,78 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,24 +0,0 @@
|
|
|
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 _0x1daa16,ObservableMixin as _0x2c09c2}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x10353f}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x5a0256}from'ckeditor5/src/icons.js';import _0x7b10a7 from'./uploadcareimageeditformview.js';import _0x263fee from'../../utils/uploadutils.js';import{getImageUrls as _0x2799de,getImageDimension as _0x1ec555}from'../../utils/editingutils.js';import{isAncestor as _0x1c4c21}from'../../utils/isancestor.js';export default class q extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x2c09c2(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x381bcf,_0x1958cf,_0x191edf){super(),this['_editor']=_0x381bcf,this['_dialog']=_0x1958cf,this['_imageElement']=_0x191edf,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 _0x434ee0=this['_imageElement'],_0x7a78ad=_0x434ee0['getAttribute']('uploadcareImageId'),_0x1d0e4d=_0x434ee0['getAttribute']('src');if(_0x7a78ad)await this['_loadImageInfo'](_0x7a78ad,_0x1d0e4d);else{if(this['_imageCache']['has'](_0x1d0e4d)){const _0x24c6f9=this['_imageCache']['get'](_0x1d0e4d);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x24c6f9['url'],this['imageDimension']=_0x24c6f9['dimension'],this['imageId']=_0x24c6f9['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1e7478}=this['_editor'],t=_0x1e7478['t'],_0x489c6c=new _0x7b10a7(_0x1e7478,this['imageStatus'],this['_attributes']);_0x489c6c['bind']('status')['to'](this,'imageStatus'),_0x489c6c['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x489c6c['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x489c6c['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x489c6c,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x5a0256,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x489c6c,'position':_0x10353f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x489c6c['focus']();},'onHide':()=>{_0x489c6c['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x49091c=>!_0x1c4c21(_0x49091c,_0x489c6c['element'])}});}['_loadImageInfo'](_0x47c5ca,_0x476ea7){return _0x263fee['getInfo'](_0x47c5ca,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x3c5c1b=>{const {width:_0x28fdea,height:_0x370c70}=_0x3c5c1b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x476ea7,this['imageDimension']={'width':_0x28fdea,'height':_0x370c70},this['imageId']=_0x47c5ca;})['catch'](_0x1f2932=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1f2932['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x44bab2,_0x150742){return this['_getImageAsFile'](_0x44bab2)['then'](_0x27d157=>_0x263fee['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x150742['signal'],'file':_0x27d157,'onProgress':_0x1106c5=>{_0x1106c5&&_0x1106c5['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1106c5['value']));}}))['then'](_0x59b899=>{const {width:_0x124344,height:_0x3f14de}=_0x59b899['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x59b899['cdnUrl'],this['imageDimension']={'width':_0x124344,'height':_0x3f14de},this['imageId']=_0x59b899['uuid'],this['imageUploadProgress']=null;const _0x61e193=_0x44bab2['getAttribute']('src');this['_imageCache']['set'](_0x61e193,{'id':_0x59b899['uuid'],'url':_0x59b899['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4f4089=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4f4089['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x106086,_0x1698c9){_0x106086['on']('apply',(_0x1bf9e7,_0x2523f2)=>{this['_replaceImage'](_0x1698c9,_0x2523f2['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x106086['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x106086['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1136e9,_0x4562e8,_0x1f8463){const _0x20bf0a=this['_editor'],{width:_0x15c732,height:_0x3d57d5}=_0x1ec555(_0x4562e8,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4d8a16,imageSources:_0x4c90a8}=_0x2799de(_0x4562e8,_0x15c732);_0x20bf0a['model']['change'](_0x39fe2f=>{if('$graveyard'===_0x1136e9['root']['rootName']){_0x20bf0a['execute']('insertImage',{'imageType':_0x1136e9['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1136e9['getAttributes']()),'uploadcareImageId':_0x1f8463,'src':_0x4d8a16,'sources':_0x4c90a8,'width':_0x15c732,'height':_0x3d57d5}});const _0xf7cad7=_0x1136e9['getChildren']();_0x1136e9=_0x20bf0a['model']['document']['selection']['getSelectedElement']();for(const _0x1bd6a8 of _0xf7cad7)_0x39fe2f['append'](_0x39fe2f['cloneElement'](_0x1bd6a8),_0x1136e9);}else _0x39fe2f['setSelection'](_0x1136e9,'on'),_0x20bf0a['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1136e9['getAttributes']()),'uploadcareImageId':_0x1f8463,'src':_0x4d8a16,'sources':_0x4c90a8,'width':_0x15c732,'height':_0x3d57d5},_0x1136e9);_0x39fe2f['setSelection'](_0x1136e9,'on');});}async['_getImageAsFile'](_0x13af76){const _0x3245e5=_0x1daa16['window'],_0x373460=_0x1daa16['document']['location']['href'],_0x3a22bf=new _0x3245e5['URL'](_0x13af76['getAttribute']('src'),_0x373460);if('data:'===_0x3a22bf['protocol']){const _0x586ada=_0x3a22bf['href']['split'](','),_0x491142=_0x586ada[0x0]['match'](/:(.*?);/)[0x1],_0x1e6876=_0x491142['split']('/')[0x1],_0x3c0e2d=_0x3245e5['atob'](_0x586ada[_0x586ada['length']-0x1]);let _0x134167=_0x3c0e2d['length'];const _0x2165c3=new _0x3245e5['Uint8Array'](_0x134167);for(;_0x134167--;)_0x2165c3[_0x134167]=_0x3c0e2d['charCodeAt'](_0x134167);return new _0x3245e5['File']([_0x2165c3],'image.'+_0x1e6876,{'type':_0x491142});}const _0x1a3bb3=_0x3a22bf['href']['split']('/'),_0x65169b=_0x1a3bb3[_0x1a3bb3['length']-0x1],_0x44f207=_0x65169b['split']('.')[0x1];return _0x3245e5['fetch'](_0x3a22bf['href'])['then'](_0x21baa9=>_0x21baa9['clone']()['blob']())['then'](_0x480872=>new _0x3245e5['File']([_0x480872],_0x65169b,{'type':'image/'+_0x44f207}));}}
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
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 _0x2fde(){const _0x4c7178=['4244QOMfyr','1296889VsEooN','imageSrc','3xuIpdV','setTemplate','image-edit','23221DyvhuD','54678TIhnlA','992014xiVqNx','6929336RotAKc','3900PHShjl','set','uc-light','uc-cloud-image-editor','6135HlmDRe','ck-uploadcare-theme','bindTemplate','255880upBFfT','387htCbmx','819GHxONj'];_0x2fde=function(){return _0x4c7178;};return _0x2fde();}(function(_0x449724,_0x15f45e){const _0x5eb85d=_0x38a8,_0xae8d9e=_0x449724();while(!![]){try{const _0x1e8715=-parseInt(_0x5eb85d(0x136))/0x1+parseInt(_0x5eb85d(0x13d))/0x2*(parseInt(_0x5eb85d(0x138))/0x3)+-parseInt(_0x5eb85d(0x135))/0x4*(-parseInt(_0x5eb85d(0x12f))/0x5)+parseInt(_0x5eb85d(0x13c))/0x6*(-parseInt(_0x5eb85d(0x134))/0x7)+parseInt(_0x5eb85d(0x13e))/0x8+-parseInt(_0x5eb85d(0x133))/0x9*(-parseInt(_0x5eb85d(0x132))/0xa)+parseInt(_0x5eb85d(0x13b))/0xb*(-parseInt(_0x5eb85d(0x13f))/0xc);if(_0x1e8715===_0x15f45e)break;else _0xae8d9e['push'](_0xae8d9e['shift']());}catch(_0x5b0708){_0xae8d9e['push'](_0xae8d9e['shift']());}}}(_0x2fde,0xae970));import{View as _0x121149}from'ckeditor5/src/ui.js';function _0x38a8(_0x546664,_0x2747ba){const _0x2fde1c=_0x2fde();return _0x38a8=function(_0x38a838,_0x3b0128){_0x38a838=_0x38a838-0x12d;let _0x52086b=_0x2fde1c[_0x38a838];return _0x52086b;},_0x38a8(_0x546664,_0x2747ba);}export default class tt extends _0x121149{constructor(_0x249831,_0xd3807e){const _0x1616fa=_0x38a8;super(_0x249831);const _0x27329c=this[_0x1616fa(0x131)];this[_0x1616fa(0x140)](_0x1616fa(0x137),''),this[_0x1616fa(0x139)]({'tag':_0x1616fa(0x12e),'attributes':{..._0xd3807e,'class':[_0x1616fa(0x12d),_0x1616fa(0x130)],'ctx-name':_0x1616fa(0x13a),'cdn-url':_0x27329c['to'](_0x1616fa(0x137))}});}}
|
|
@@ -1,24 +0,0 @@
|
|
|
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 { View } from 'ckeditor5/src/ui.js';
|
|
6
|
-
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
7
|
-
import type UploadcareImageEditController from './uploadcareimageeditcontroller.js';
|
|
8
|
-
/**
|
|
9
|
-
* A class representing the form error view of the Uploadcare image edit feature.
|
|
10
|
-
*/
|
|
11
|
-
export default class UploadcareImageEditFormErrorView extends View {
|
|
12
|
-
/**
|
|
13
|
-
* The image upload error details.
|
|
14
|
-
*
|
|
15
|
-
* @observable
|
|
16
|
-
*/
|
|
17
|
-
errorType: UploadcareImageEditController['imageErrorType'];
|
|
18
|
-
/**
|
|
19
|
-
* Creates an instance of the UploadcareImageEditFormErrorView view.
|
|
20
|
-
*
|
|
21
|
-
* @fires retry
|
|
22
|
-
*/
|
|
23
|
-
constructor(locale: Locale);
|
|
24
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
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{IconError as et}from'ckeditor5/src/icons.js';import{ButtonView as _0x122b58,IconView as at,View as _0x469455}from'ckeditor5/src/ui.js';export default class rt extends _0x469455{constructor(_0x212e49){super(_0x212e49);const t=_0x212e49['t'];this['set']('errorType',null);const _0x2eaea4=new _0x122b58(_0x212e49);_0x2eaea4['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2eaea4['withText']=!0x0,_0x2eaea4['class']='ck-button-action',_0x2eaea4['on']('execute',()=>{this['fire']('retry');}),_0x2eaea4['bind']('isVisible')['to'](this,'errorType',_0x5df7ca=>'NotFound'!==_0x5df7ca);const _0x414a3b=new at();_0x414a3b['content']=et,_0x414a3b['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1beb53=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x414a3b,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1beb53['to']('errorType',_0x271499=>t('NotFound'!==_0x271499?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2eaea4]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
|
|
@@ -1,24 +0,0 @@
|
|
|
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/uploadcareimageeditformloadingview
|
|
7
|
-
*/
|
|
8
|
-
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
-
import { View } from 'ckeditor5/src/ui.js';
|
|
10
|
-
/**
|
|
11
|
-
* A class representing the form loading view of the Uploadcare image edit feature.
|
|
12
|
-
*/
|
|
13
|
-
export default class UploadcareImageEditFormLoadingView extends View {
|
|
14
|
-
/**
|
|
15
|
-
* The image upload progress.
|
|
16
|
-
*
|
|
17
|
-
* @observable
|
|
18
|
-
*/
|
|
19
|
-
imageUploadProgress: number | null;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
constructor(locale: Locale);
|
|
24
|
-
}
|