@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20260111.0 → 0.0.0-nightly-20260112.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/ui/uploadcarecontroller.js +2 -2
- package/src/ui/uploadcareformview.js +1 -1
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x40fe85,ObservableMixin as _0x1937c8}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x592f16}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x2333d1}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4f7cce}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x4dae21}from'../../utils/uploadutils.js';import{getImageUrls as _0x18622b,getImageDimension as _0x27ad5b}from'../../utils/editingutils.js';import{isAncestor as _0x320b6}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1937c8(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4fe1a0,_0x44dcc7,_0x43b63b){super(),this['_editor']=_0x4fe1a0,this['_dialog']=_0x44dcc7,this['_imageElement']=_0x43b63b,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 _0x2c6ae5=this['_imageElement'],_0x2ef9bd=_0x2c6ae5['getAttribute']('uploadcareImageId'),_0x45d3e6=_0x2c6ae5['getAttribute']('src');if(_0x2ef9bd)await this['_loadImageInfo'](_0x2ef9bd,_0x45d3e6);else{if(this['_imageCache']['has'](_0x45d3e6)){const _0x2a11f4=this['_imageCache']['get'](_0x45d3e6);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2a11f4['url'],this['imageDimension']=_0x2a11f4['dimension'],this['imageId']=_0x2a11f4['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x20236a}=this['_editor'],t=_0x20236a['t'],_0x231055=new _0x4f7cce(_0x20236a,this['imageStatus'],this['_attributes']);_0x231055['bind']('status')['to'](this,'imageStatus'),_0x231055['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x231055['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x231055['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x231055,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2333d1,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x231055,'position':_0x592f16['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x231055['focus']();},'onHide':()=>{_0x231055['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x523978=>!_0x320b6(_0x523978,_0x231055['element'])}});}['_loadImageInfo'](_0x1f8050,_0x15dd46){return _0x4dae21['getInfo'](_0x1f8050,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x278d1f=>{const {width:_0x143669,height:_0x524a02}=_0x278d1f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x15dd46,this['imageDimension']={'width':_0x143669,'height':_0x524a02},this['imageId']=_0x1f8050;})['catch'](_0x538203=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x538203['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2f9683,_0x79f7de){return this['_getImageAsFile'](_0x2f9683)['then'](_0x52d137=>_0x4dae21['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x79f7de['signal'],'file':_0x52d137,'onProgress':_0x16649d=>{_0x16649d&&_0x16649d['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x16649d['value']));}}))['then'](_0x5394db=>{const {width:_0x16bdac,height:_0x16423c}=_0x5394db['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5394db['cdnUrl'],this['imageDimension']={'width':_0x16bdac,'height':_0x16423c},this['imageId']=_0x5394db['uuid'],this['imageUploadProgress']=null;const _0x426f49=_0x2f9683['getAttribute']('src');this['_imageCache']['set'](_0x426f49,{'id':_0x5394db['uuid'],'url':_0x5394db['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1622ec=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1622ec['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4756f5,_0x335254){_0x4756f5['on']('apply',(_0x2693f5,_0x518b15)=>{this['_replaceImage'](_0x335254,_0x518b15['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4756f5['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4756f5['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x238556,_0x59d19d,_0x13b372){const _0x3f8ea0=this['_editor'],{width:_0x5b3a24,height:_0x2bdfa6}=_0x27ad5b(_0x59d19d,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x2ca27b,imageSources:_0x1667f3}=_0x18622b(_0x59d19d,_0x5b3a24);_0x3f8ea0['model']['change'](_0x398b05=>{if('$graveyard'===_0x238556['root']['rootName']){_0x3f8ea0['execute']('insertImage',{'imageType':_0x238556['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x238556['getAttributes']()),'uploadcareImageId':_0x13b372,'src':_0x2ca27b,'sources':_0x1667f3,'width':_0x5b3a24,'height':_0x2bdfa6}});const _0x2842c8=_0x238556['getChildren']();_0x238556=_0x3f8ea0['model']['document']['selection']['getSelectedElement']();for(const _0x548d93 of _0x2842c8)_0x398b05['append'](_0x398b05['cloneElement'](_0x548d93),_0x238556);}else _0x398b05['setSelection'](_0x238556,'on'),_0x3f8ea0['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x238556['getAttributes']()),'uploadcareImageId':_0x13b372,'src':_0x2ca27b,'sources':_0x1667f3,'width':_0x5b3a24,'height':_0x2bdfa6},_0x238556);_0x398b05['setSelection'](_0x238556,'on');});}async['_getImageAsFile'](_0x1f97dd){const _0x42ba60=_0x40fe85['window'],_0x431f2a=_0x40fe85['document']['location']['href'],_0x47e0d7=new _0x42ba60['URL'](_0x1f97dd['getAttribute']('src'),_0x431f2a);if('data:'===_0x47e0d7['protocol']){const _0x4c68a3=_0x47e0d7['href']['split'](','),_0x403998=_0x4c68a3[0x0]['match'](/:(.*?);/)[0x1],_0x13acec=_0x403998['split']('/')[0x1],_0x4c507c=_0x42ba60['atob'](_0x4c68a3[_0x4c68a3['length']-0x1]);let _0x32f29b=_0x4c507c['length'];const _0x2f8080=new _0x42ba60['Uint8Array'](_0x32f29b);for(;_0x32f29b--;)_0x2f8080[_0x32f29b]=_0x4c507c['charCodeAt'](_0x32f29b);return new _0x42ba60['File']([_0x2f8080],'image.'+_0x13acec,{'type':_0x403998});}const _0x2db063=_0x47e0d7['href']['split']('/'),_0x4ac552=_0x2db063[_0x2db063['length']-0x1],_0x12943d=_0x4ac552['split']('.')[0x1];return _0x42ba60['fetch'](_0x47e0d7['href'])['then'](_0x15b5f2=>_0x15b5f2['clone']()['blob']())['then'](_0x30230a=>new _0x42ba60['File']([_0x30230a],_0x4ac552,{'type':'image/'+_0x12943d}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x483bf1,_0x27893c){const _0x2a45c6=_0x4279,_0x4f28d7=_0x483bf1();while(!![]){try{const _0x5bc3ac=-parseInt(_0x2a45c6(0x121))/0x1+parseInt(_0x2a45c6(0x128))/0x2*(parseInt(_0x2a45c6(0x12a))/0x3)+-parseInt(_0x2a45c6(0x127))/0x4+-parseInt(_0x2a45c6(0x11c))/0x5*(-parseInt(_0x2a45c6(0x122))/0x6)+parseInt(_0x2a45c6(0x126))/0x7*(-parseInt(_0x2a45c6(0x120))/0x8)+-parseInt(_0x2a45c6(0x11e))/0x9+parseInt(_0x2a45c6(0x124))/0xa;if(_0x5bc3ac===_0x27893c)break;else _0x4f28d7['push'](_0x4f28d7['shift']());}catch(_0x4b5767){_0x4f28d7['push'](_0x4f28d7['shift']());}}}(_0x341b,0xd269b));import{View as _0x1daf98}from'ckeditor5/src/ui.js';function _0x4279(_0x1f37c1,_0x144d24){const _0x341bf4=_0x341b();return _0x4279=function(_0x42797b,_0x55abaf){_0x42797b=_0x42797b-0x11b;let _0x569220=_0x341bf4[_0x42797b];return _0x569220;},_0x4279(_0x1f37c1,_0x144d24);}function _0x341b(){const _0x129287=['ck-uploadcare-theme','4882346vapYRr','3286672TXrlry','775508psNyfZ','set','3iiugwB','setTemplate','uc-light','imageSrc','849830PFJInf','image-edit','4995648IaWYVr','bindTemplate','8FmdTWq','1045343yxXtjr','12lTqNPf','uc-cloud-image-editor','32537260mQDTHR'];_0x341b=function(){return _0x129287;};return _0x341b();}export class UploadcareImageEditFormEditingView extends _0x1daf98{constructor(_0x597f90,_0x238857){const _0x5b1f92=_0x4279;super(_0x597f90);const _0x43738a=this[_0x5b1f92(0x11f)];this[_0x5b1f92(0x129)](_0x5b1f92(0x11b),''),this[_0x5b1f92(0x12b)]({'tag':_0x5b1f92(0x123),'attributes':{..._0x238857,'class':[_0x5b1f92(0x12c),_0x5b1f92(0x125)],'ctx-name':_0x5b1f92(0x11d),'cdn-url':_0x43738a['to'](_0x5b1f92(0x11b))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x4e809f}from'ckeditor5/src/icons.js';import{ButtonView as _0x4fbb4c,IconView as _0x1ab43f,View as _0x4a2ede}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x4a2ede{constructor(_0x5dfd8e){super(_0x5dfd8e);const t=_0x5dfd8e['t'];this['set']('errorType',null);const _0x134f0f=new _0x4fbb4c(_0x5dfd8e);_0x134f0f['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x134f0f['withText']=!0x0,_0x134f0f['class']='ck-button-action',_0x134f0f['on']('execute',()=>{this['fire']('retry');}),_0x134f0f['bind']('isVisible')['to'](this,'errorType',_0x187a78=>'NotFound'!==_0x187a78);const _0x4e8484=new _0x1ab43f();_0x4e8484['content']=_0x4e809f,_0x4e8484['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x15d0e7=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':[_0x4e8484,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x15d0e7['to']('errorType',_0xb92c0c=>t('NotFound'!==_0xb92c0c?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x134f0f]},{'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'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{SpinnerView as
|
|
23
|
+
import{SpinnerView as _0x480f26,View as _0x57d9ce}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x57d9ce{constructor(_0x57b1f1){super(_0x57b1f1);const t=_0x57b1f1['t'],_0x2096f4=this['bindTemplate'],_0x133982=new _0x480f26();_0x133982['isVisible']=!0x0,this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__loading'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__loading-spinner']},'children':[_0x133982,{'text':_0x2096f4['to']('imageUploadProgress',_0x14bc07=>t('Loading\x20image...')+'\x20('+(_0x14bc07||0x0)+'%)')}]},{'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'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4df027=_0x4c33;(function(_0x5e3e9c,_0x8e06b1){const _0x10e337=_0x4c33,_0x384a5f=_0x5e3e9c();while(!![]){try{const _0xd399c3=parseInt(_0x10e337(0x99))/0x1+parseInt(_0x10e337(0x9a))/0x2+-parseInt(_0x10e337(0x8e))/0x3*(-parseInt(_0x10e337(0x97))/0x4)+-parseInt(_0x10e337(0xc1))/0x5+parseInt(_0x10e337(0xc0))/0x6*(parseInt(_0x10e337(0xa9))/0x7)+parseInt(_0x10e337(0xb1))/0x8+-parseInt(_0x10e337(0x90))/0x9*(parseInt(_0x10e337(0xae))/0xa);if(_0xd399c3===_0x8e06b1)break;else _0x384a5f['push'](_0x384a5f['shift']());}catch(_0x3cf0f8){_0x384a5f['push'](_0x384a5f['shift']());}}}(_0x3a2b,0x2d272));function _0x4c33(_0x1a278a,_0x1a4094){const _0x3a2bea=_0x3a2b();return _0x4c33=function(_0x4c3343,_0x3275f7){_0x4c3343=_0x4c3343-0x8e;let _0x35d934=_0x3a2bea[_0x4c3343];return _0x35d934;},_0x4c33(_0x1a278a,_0x1a4094);}import{View as _0x3299e9}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x4a9030}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0x325e71}from'./uploadcareimageeditformerrorview.js';function _0x3a2b(){const _0x5ef4c2=['_errorView','9AWWLOJ','_addUploadcareImageEditorListeners','clear','ready','element','_addErrorViewListeners','_focusableView','8cdCXcX','observe','139975DTNYPT','230976jzkvcW','_setView','set','cdnUrl','createCollection','fire','addedNodes','ck-reset_all-excluded','apply','querySelector','target','filter','ck-uploadcare-form','div','once','77OfgsFN','addMany','_editingView','_waitForImageEditorComponent','disconnect','5115920GbTOAD','status','setTemplate','2844688rutZDe','detail','uc-cloud-image-editor','cancel','render','addEventListener','getFocusableElement','toLowerCase','nodeName','focus','uploading','_loadingView','error','add','change:status','70020ylcxLQ','1580215OvKExg','length','retry','_items','409743WTetir'];_0x3a2b=function(){return _0x5ef4c2;};return _0x3a2b();}import{UploadcareImageEditFormEditingView as _0x21107a}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x1b73d7}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x1b73d7{[_0x4df027(0xc4)];[_0x4df027(0xbc)];[_0x4df027(0x8f)];[_0x4df027(0xab)];[_0x4df027(0x96)];constructor(_0x475ad1,_0x2b391f,_0x44239a){const _0x422c85=_0x4df027;super(_0x475ad1),this[_0x422c85(0xc4)]=this[_0x422c85(0x9e)](),this[_0x422c85(0xbc)]=new _0x4a9030(_0x475ad1),this[_0x422c85(0x8f)]=new _0x325e71(_0x475ad1),this[_0x422c85(0xab)]=new _0x21107a(_0x475ad1,_0x44239a),this[_0x422c85(0x96)]=new _0x3299e9(_0x475ad1),this[_0x422c85(0x96)][_0x422c85(0xb0)](this[_0x422c85(0xb7)]()),this[_0x422c85(0x9c)](_0x422c85(0xaf),_0x2b391f),this[_0x422c85(0xb0)]({'tag':_0x422c85(0xa7),'attributes':{'class':['ck',_0x422c85(0xa1),_0x422c85(0xa6)],'tabindex':'-1'},'children':this[_0x422c85(0xc4)]}),this[_0x422c85(0x9b)](),this[_0x422c85(0xa8)](_0x422c85(0xb5),()=>{const _0x45abd6=_0x422c85;this[_0x45abd6(0xac)](this[_0x45abd6(0x94)],_0x55e59f=>{const _0x394822=_0x45abd6;this[_0x394822(0x91)](_0x55e59f);});}),this['on'](_0x422c85(0xbf),()=>{const _0x59b971=_0x422c85;this[_0x59b971(0x9b)]();}),this[_0x422c85(0x95)]();}[_0x4df027(0xba)](){const _0x13019d=_0x4df027;this[_0x13019d(0x94)][_0x13019d(0xba)]();}[_0x4df027(0x9b)](){const _0x1572ca=_0x4df027;switch(this[_0x1572ca(0xc4)][_0x1572ca(0x92)](),this[_0x1572ca(0xaf)]){case _0x1572ca(0xbb):this[_0x1572ca(0xc4)][_0x1572ca(0xbe)](this[_0x1572ca(0xbc)]);break;case _0x1572ca(0xbd):this[_0x1572ca(0xc4)][_0x1572ca(0xbe)](this[_0x1572ca(0x8f)]);break;case _0x1572ca(0x93):this[_0x1572ca(0xc4)][_0x1572ca(0xaa)]([this[_0x1572ca(0xab)],this[_0x1572ca(0x96)]]);}}[_0x4df027(0xac)](_0x413413,_0x5e3ce0){const _0x4a443f=_0x4df027,_0x301f26=_0x4a443f(0xb3),_0x58c1be=_0x413413[_0x4a443f(0xa3)](_0x301f26);if(_0x58c1be)return _0x5e3ce0(_0x58c1be);const _0x370cad=new MutationObserver(_0x210327=>{const _0x1ccf6e=_0x4a443f,_0x3e77c6=_0x210327[_0x1ccf6e(0xa5)](_0x4378ad=>_0x4378ad[_0x1ccf6e(0xa4)]===_0x413413&&_0x4378ad[_0x1ccf6e(0xa0)][_0x1ccf6e(0xc2)]>0x0&&_0x4378ad[_0x1ccf6e(0xa0)][0x0][_0x1ccf6e(0xb9)][_0x1ccf6e(0xb8)]()===_0x301f26);_0x3e77c6[_0x1ccf6e(0xc2)]&&(_0x370cad[_0x1ccf6e(0xad)](),_0x5e3ce0(_0x3e77c6[0x0][_0x1ccf6e(0xa0)][0x0]));});_0x370cad[_0x4a443f(0x98)](_0x413413,{'childList':!0x0,'subtree':!0x0});}[_0x4df027(0x91)](_0x39e2a4){const _0xf5fe9b=_0x4df027;_0x39e2a4[_0xf5fe9b(0xb6)](_0xf5fe9b(0xa2),_0x1c1cad=>{const _0x22f01e=_0xf5fe9b;this[_0x22f01e(0x9f)](_0x22f01e(0xa2),{'imageSrc':_0x1c1cad[_0x22f01e(0xb2)][_0x22f01e(0x9d)]});}),_0x39e2a4[_0xf5fe9b(0xb6)](_0xf5fe9b(0xb4),()=>{const _0x4580be=_0xf5fe9b;this[_0x4580be(0x9f)](_0x4580be(0xb4));});}[_0x4df027(0x95)](){const _0x1efa8f=_0x4df027;this[_0x1efa8f(0x8f)]['on'](_0x1efa8f(0xc3),()=>{const _0x1121bf=_0x1efa8f;this[_0x1121bf(0x9f)](_0x1121bf(0xc3));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x19bdc9=_0x408c;(function(_0xb007b0,_0x22e027){const _0x4d80bb=_0x408c,_0xf16847=_0xb007b0();while(!![]){try{const _0x1dd290=-parseInt(_0x4d80bb(0x1da))/0x1*(-parseInt(_0x4d80bb(0x1db))/0x2)+-parseInt(_0x4d80bb(0x1c2))/0x3*(parseInt(_0x4d80bb(0x1df))/0x4)+parseInt(_0x4d80bb(0x1d7))/0x5+parseInt(_0x4d80bb(0x1cc))/0x6+-parseInt(_0x4d80bb(0x1d8))/0x7*(-parseInt(_0x4d80bb(0x1c4))/0x8)+parseInt(_0x4d80bb(0x1c1))/0x9*(-parseInt(_0x4d80bb(0x1d5))/0xa)+parseInt(_0x4d80bb(0x1d9))/0xb*(-parseInt(_0x4d80bb(0x1d0))/0xc);if(_0x1dd290===_0x22e027)break;else _0xf16847['push'](_0xf16847['shift']());}catch(_0x23ec98){_0xf16847['push'](_0xf16847['shift']());}}}(_0x2443,0x7316f));import{Command as _0x431e6c}from'ckeditor5/src/core.js';import{Dialog as _0x5df2a6}from'ckeditor5/src/ui.js';function _0x2443(){const _0x2c0042=['10686BVTeuM','document','set','requires','4OEeBba','refresh','isEnabled','isActive','2007oxGMqH','75453xVFUcr','_isEditable','8OaOrjw','uploadcare.allowExternalImagesEditing','bind','execute','config','selection','imageEditController','imageInline','4816320YjJgMt','getSelectedElement','model','imageBlock','12JkrYDO','get','editor','unbind','element','36280BUdefZ','plugins','4272190xPaenQ','5542775siXpbS','15280749phmFNv','46yjQlHT'];_0x2443=function(){return _0x2c0042;};return _0x2443();}import{UploadcareImageEditController as _0x145a7e}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x332d89}from'../utils/editingutils.js';function _0x408c(_0xf92757,_0x3e83c5){const _0x24434c=_0x2443();return _0x408c=function(_0x408cc7,_0x55aed5){_0x408cc7=_0x408cc7-0x1c1;let _0x40fc3f=_0x24434c[_0x408cc7];return _0x40fc3f;},_0x408c(_0xf92757,_0x3e83c5);}export class UploadcareImageEditCommand extends _0x431e6c{[_0x19bdc9(0x1ca)];static get[_0x19bdc9(0x1de)](){return[_0x5df2a6];}[_0x19bdc9(0x1c3)];constructor(_0x3cf106){const _0x1efc2a=_0x19bdc9;super(_0x3cf106),this[_0x1efc2a(0x1ca)]=void 0x0,this[_0x1efc2a(0x1c3)]=_0x332d89(_0x3cf106[_0x1efc2a(0x1c8)][_0x1efc2a(0x1d1)](_0x1efc2a(0x1c5))||[]),this[_0x1efc2a(0x1dd)]({'isActive':!0x1});}[_0x19bdc9(0x1e0)](){const _0x457f09=_0x19bdc9,_0xf57ddb=this[_0x457f09(0x1d2)][_0x457f09(0x1ce)][_0x457f09(0x1dc)][_0x457f09(0x1c9)][_0x457f09(0x1cd)]();this[_0x457f09(0x1e1)]=this[_0x457f09(0x1c3)](_0xf57ddb);}[_0x19bdc9(0x1c7)](){const _0x3ed108=_0x19bdc9;this[_0x3ed108(0x1ca)]&&(this[_0x3ed108(0x1d3)](_0x3ed108(0x1e2)),this[_0x3ed108(0x1ca)]=void 0x0);const _0x5ca1ed=this[_0x3ed108(0x1d2)][_0x3ed108(0x1ce)][_0x3ed108(0x1dc)][_0x3ed108(0x1c9)][_0x3ed108(0x1cd)]();_0x5ca1ed&&(_0x5ca1ed['is'](_0x3ed108(0x1d4),_0x3ed108(0x1cf))||_0x5ca1ed['is'](_0x3ed108(0x1d4),_0x3ed108(0x1cb)))&&(this[_0x3ed108(0x1ca)]=new _0x145a7e(this[_0x3ed108(0x1d2)],this[_0x3ed108(0x1d2)][_0x3ed108(0x1d6)][_0x3ed108(0x1d1)](_0x5df2a6),_0x5ca1ed),this[_0x3ed108(0x1c6)](_0x3ed108(0x1e2))['to'](this[_0x3ed108(0x1ca)],_0x3ed108(0x1e2)));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x24e3f2=_0x980e;(function(_0x41224f,_0x34c5d6){const _0x76e750=_0x980e,_0x194ce5=_0x41224f();while(!![]){try{const _0x57bbbf=-parseInt(_0x76e750(0x140))/0x1+-parseInt(_0x76e750(0x138))/0x2+-parseInt(_0x76e750(0x136))/0x3+-parseInt(_0x76e750(0x134))/0x4*(-parseInt(_0x76e750(0x13c))/0x5)+parseInt(_0x76e750(0x13e))/0x6*(parseInt(_0x76e750(0x12e))/0x7)+parseInt(_0x76e750(0x13b))/0x8*(parseInt(_0x76e750(0x137))/0x9)+-parseInt(_0x76e750(0x13f))/0xa*(-parseInt(_0x76e750(0x133))/0xb);if(_0x57bbbf===_0x34c5d6)break;else _0x194ce5['push'](_0x194ce5['shift']());}catch(_0x4988c9){_0x194ce5['push'](_0x194ce5['shift']());}}}(_0x32fc,0xcab48));import{Plugin as _0xb0e365}from'ckeditor5/src/core.js';import{Notification as _0x14fafb}from'ckeditor5/src/ui.js';function _0x32fc(){const _0x51cf2f=['UploadcareImageEditEditing','add','ImageEditing','uploadcareImageEdit','6699tFAfnN','4NpzCmE','isOfficialPlugin','1996677OIbiyo','9wFGluO','1289542ymKRYi','isPremiumPlugin','pluginName','1942616pSCDrj','3864215TYzGju','uploadcareImageReplace','4002Hhbtnr','28430MTQlEo','1266110vJZFPh','requires','ImageUtils','init','commands','6923cOgeej'];_0x32fc=function(){return _0x51cf2f;};return _0x32fc();}function _0x980e(_0x4c50d1,_0x41e250){const _0x32fc46=_0x32fc();return _0x980e=function(_0x980e81,_0x461429){_0x980e81=_0x980e81-0x12e;let _0x544bc5=_0x32fc46[_0x980e81];return _0x544bc5;},_0x980e(_0x4c50d1,_0x41e250);}import{UploadcareImageEditCommand as _0x55dc95}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x285c2e}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x2db0e8}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0xb0e365{static get[_0x24e3f2(0x13a)](){const _0x43bbcf=_0x24e3f2;return _0x43bbcf(0x12f);}static get[_0x24e3f2(0x141)](){const _0x3b0f73=_0x24e3f2;return[_0x2db0e8,_0x14fafb,_0x3b0f73(0x142),_0x3b0f73(0x131)];}static get[_0x24e3f2(0x135)](){return!0x0;}static get[_0x24e3f2(0x139)](){return!0x0;}[_0x24e3f2(0x143)](){const _0x25b8fd=_0x24e3f2,{editor:_0x5b7f0b}=this;_0x5b7f0b[_0x25b8fd(0x144)][_0x25b8fd(0x130)](_0x25b8fd(0x132),new _0x55dc95(_0x5b7f0b)),_0x5b7f0b[_0x25b8fd(0x144)][_0x25b8fd(0x130)](_0x25b8fd(0x13d),new _0x285c2e(_0x5b7f0b));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x1d5b46}from'ckeditor5/src/core.js';import{ButtonView as _0x3913cc}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4b601e}from'ckeditor5/src/icons.js';import{createElement as _0x55ac3c}from'ckeditor5/src/utils.js';import'@uploadcare/file-uploader/web/uc-cloud-image-editor.min.css';import'../../theme/uploadcare-theme.css';export class UploadcareImageEditUI extends _0x1d5b46{['_imageCache']=new Map();static get['pluginName'](){return'UploadcareImageEditUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['imageCache'](){return this['_imageCache'];}['init'](){const _0x36ce29=this['editor'];_0x36ce29['ui']['componentFactory']['add']('uploadcareImageEdit',_0xdfd436=>{const _0x26fbd3=_0x36ce29['commands']['get']('uploadcareImageEdit'),_0x162dcf=new _0x3913cc(_0xdfd436),t=_0xdfd436['t'];return _0x162dcf['set']({'icon':_0x4b601e,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x162dcf['bind']('isEnabled')['to'](_0x26fbd3),_0x162dcf['bind']('isOn')['to'](_0x26fbd3,'isActive'),this['listenTo'](_0x162dcf,'execute',()=>{_0x36ce29['execute']('uploadcareImageEdit'),_0x36ce29['editing']['view']['focus']();}),_0x162dcf;}),this['_initConfig']();}['_initConfig'](){const _0x386361=_0x55ac3c(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x386361),this['listenTo'](this['editor'],'destroy',()=>{_0x386361['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x4853a9=_0x33ac;function _0x33ac(_0x2c0458,_0x4bdeab){var _0x411120=_0x4111();return _0x33ac=function(_0x33ac3d,_0x31413a){_0x33ac3d=_0x33ac3d-0x7d;var _0xa6e676=_0x411120[_0x33ac3d];return _0xa6e676;},_0x33ac(_0x2c0458,_0x4bdeab);}(function(_0x583f3e,_0x575125){var _0x3b9898=_0x33ac,_0x500b51=_0x583f3e();while(!![]){try{var _0x4a2de4=-parseInt(_0x3b9898(0x8c))/0x1+parseInt(_0x3b9898(0x88))/0x2*(-parseInt(_0x3b9898(0x8a))/0x3)+parseInt(_0x3b9898(0x85))/0x4+parseInt(_0x3b9898(0x7f))/0x5+parseInt(_0x3b9898(0x80))/0x6+parseInt(_0x3b9898(0x84))/0x7*(-parseInt(_0x3b9898(0x8e))/0x8)+-parseInt(_0x3b9898(0x7d))/0x9*(-parseInt(_0x3b9898(0x8b))/0xa);if(_0x4a2de4===_0x575125)break;else _0x500b51['push'](_0x500b51['shift']());}catch(_0x3531d9){_0x500b51['push'](_0x500b51['shift']());}}}(_0x4111,0xef071));import{FocusTracker as _0x377c37}from'ckeditor5/src/utils.js';function _0x4111(){var _0x1cdc24=['forwardCycle','7wgMgPX','4271952zNAkIX','div','getFocusableElement','10FImOFM','true','103953idiGTI','10PbIzMD','418435fbaZaz','bindTemplate','13507888JnKutI','createCollection','13149657TjHPkD','focusCycler','2140825DtdmoB','1812042qjtMWv','focusTracker','fire'];_0x4111=function(){return _0x1cdc24;};return _0x4111();}import{View as _0x68d466,FocusCycler as _0x5c38c2}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0x68d466{[_0x4853a9(0x81)];[_0x4853a9(0x7e)];constructor(_0x69ab7){var _0x5df1ea=_0x4853a9;super(_0x69ab7),this[_0x5df1ea(0x81)]=new _0x377c37(),this[_0x5df1ea(0x7e)]=new _0x5c38c2({'focusables':this[_0x5df1ea(0x8f)](),'focusTracker':this[_0x5df1ea(0x81)]});}[_0x4853a9(0x87)](){var _0x5a20ff=_0x4853a9;return{'tag':_0x5a20ff(0x86),'attributes':{'aria-hidden':_0x5a20ff(0x89),'tabindex':'0'},'on':{'focus':this[_0x5a20ff(0x8d)]['to'](()=>{var _0x2ddc55=_0x5a20ff;this[_0x2ddc55(0x7e)][_0x2ddc55(0x82)](_0x2ddc55(0x83));})}};}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x457f00,_0x1964d7){const _0x53e25f=_0x4169,_0x1be37d=_0x457f00();while(!![]){try{const _0x329b50=-parseInt(_0x53e25f(0x10a))/0x1*(parseInt(_0x53e25f(0x107))/0x2)+parseInt(_0x53e25f(0x124))/0x3*(-parseInt(_0x53e25f(0xf6))/0x4)+parseInt(_0x53e25f(0x123))/0x5*(-parseInt(_0x53e25f(0x10b))/0x6)+-parseInt(_0x53e25f(0x101))/0x7*(-parseInt(_0x53e25f(0xfd))/0x8)+-parseInt(_0x53e25f(0x11c))/0x9+parseInt(_0x53e25f(0xf2))/0xa*(parseInt(_0x53e25f(0xff))/0xb)+parseInt(_0x53e25f(0x102))/0xc;if(_0x329b50===_0x1964d7)break;else _0x1be37d['push'](_0x1be37d['shift']());}catch(_0x599a94){_0x1be37d['push'](_0x1be37d['shift']());}}}(_0x517e,0xb390d));import{global as _0x31e9d5,DomEmitterMixin as _0x20c449}from'ckeditor5/src/utils.js';export function createEditabilityChecker(_0x1bf298){const _0x4ddb83=_0x4169,_0x553a2d=R(_0x1bf298);return _0x387ab4=>!(!_0x387ab4||!_0x387ab4['is'](_0x4ddb83(0x120),_0x4ddb83(0x104))&&!_0x387ab4['is'](_0x4ddb83(0x120),_0x4ddb83(0xf4)))&&(!!_0x387ab4[_0x4ddb83(0x100)](_0x4ddb83(0xf9))||!!_0x387ab4[_0x4ddb83(0x100)](_0x4ddb83(0x11d))&&_0x553a2d(_0x387ab4[_0x4ddb83(0x109)](_0x4ddb83(0x11d))));}export function getImageUrls(_0x313837,_0x2d54fa){const _0x297e1e=_0x4169,_0x265284=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960][_0x297e1e(0xed)](_0x345073=>_0x345073<=_0x2d54fa)[_0x297e1e(0x112)](_0x30dbe=>_0x313837[_0x297e1e(0x125)](/\/$/,'')+_0x297e1e(0x106)+_0x30dbe+_0x297e1e(0x11e)+_0x30dbe+'w');return{'imageFallbackUrl':_0x313837,'imageSources':[{'srcset':_0x265284[_0x297e1e(0xec)](',\x20'),'sizes':_0x297e1e(0xf3)+_0x2d54fa+_0x297e1e(0x119)+_0x2d54fa+'px','type':_0x297e1e(0x10f)}]};}export function getImageDimension(_0x396a20,_0x3885c5,_0x3dbe42){const _0x1da9e3=_0x4169,_0x2f927c=_0x396a20[_0x1da9e3(0x108)](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x2f927c?parseInt(_0x2f927c[0x1],0xa):_0x3885c5,'height':_0x2f927c?parseInt(_0x2f927c[0x2],0xa):_0x3dbe42};}function _0x4169(_0x794512,_0x4572a2){const _0x517e21=_0x517e();return _0x4169=function(_0x416977,_0x120005){_0x416977=_0x416977-0xec;let _0x9d1f4d=_0x517e21[_0x416977];return _0x9d1f4d;},_0x4169(_0x794512,_0x4572a2);}export function showImageProcessingIndicator(_0xb3bb4b,_0x279f55){const _0x49e119=_0x4169,_0x3a48ba=new(_0x20c449())(),_0x51e3c7=_0xb3bb4b[_0x49e119(0x113)][_0x49e119(0x118)](_0x49e119(0xf0)),_0x4cd270=_0xb3bb4b[_0x49e119(0x10c)][_0x49e119(0xfa)][_0x49e119(0x11f)](_0x279f55),_0x573150=_0x51e3c7[_0x49e119(0x117)](_0x4cd270),_0xd3bbda=_0xb3bb4b[_0x49e119(0x10c)][_0x49e119(0x121)][_0x49e119(0x111)][_0x49e119(0x11b)](_0x573150),_0x109b69=_0x279f55[_0x49e119(0x109)](_0x49e119(0x103)),_0x44bd8a=_0x279f55[_0x49e119(0x109)](_0x49e119(0xee)),_0x2bdf30=_0x49e119(0x122);_0xb3bb4b[_0x49e119(0x10c)][_0x49e119(0x121)][_0x49e119(0x116)](_0x251123=>{const _0x1d7b24=_0x49e119;_0x251123[_0x1d7b24(0x10e)](_0x2bdf30,_0x4cd270),_0x251123[_0x1d7b24(0xf7)](_0x1d7b24(0xf1),_0x109b69+'/'+_0x44bd8a,_0x573150);}),_0x3a48ba[_0x49e119(0x115)](_0xd3bbda,_0x49e119(0x105),()=>{const _0x5d1d0e=_0x49e119;_0x3a48ba[_0x5d1d0e(0x110)](_0xd3bbda,_0x5d1d0e(0x105)),_0xb3bb4b[_0x5d1d0e(0x10c)][_0x5d1d0e(0x121)][_0x5d1d0e(0x116)](_0x31d335=>{const _0x547974=_0x5d1d0e;_0x31d335[_0x547974(0xfb)](_0x2bdf30,_0x4cd270),_0x31d335[_0x547974(0xfc)](_0x547974(0xf1),_0x573150);});});}function R(_0x1286cf){const _0x39893b=_0x4169;if(Array[_0x39893b(0xf8)](_0x1286cf)){const _0x486005=_0x1286cf[_0x39893b(0x112)](R);return _0x56a9bb=>_0x486005[_0x39893b(0x11a)](_0x486906=>_0x486906(_0x56a9bb));}if(_0x39893b(0xef)==_0x1286cf){const _0x15676d=_0x31e9d5[_0x39893b(0xf5)][_0x39893b(0xfe)][_0x39893b(0xef)];return _0x493131=>new URL(_0x493131,_0x31e9d5[_0x39893b(0x10d)][_0x39893b(0x114)])[_0x39893b(0xef)]==_0x15676d;}return _0x39893b(0x126)==typeof _0x1286cf?_0x1286cf:_0x1286cf instanceof RegExp?_0x12f849=>!(!_0x12f849[_0x39893b(0x108)](_0x1286cf)&&!_0x12f849[_0x39893b(0x125)](/^https?:\/\//,'')[_0x39893b(0x108)](_0x1286cf)):()=>!0x1;}function _0x517e(){const _0x59b6d4=['image/webp','stopListening','domConverter','map','plugins','baseURI','listenTo','change','findViewImgElement','get','px)\x20100vw,\x20','some','viewToDom','6391989OQWPUe','src','x/\x20','toViewElement','element','view','image-processing','73385ANpHvR','15MqFpmy','replace','function','join','filter','height','origin','ImageUtils','aspect-ratio','30WBQTnN','(max-width:\x20','imageInline','window','1167068GMtCmS','setStyle','isArray','uploadcareImageId','mapper','removeClass','removeStyle','329248lFlPzw','location','2127345QZBGlp','hasAttribute','70CbDFFN','54074880DFsMUQ','width','imageBlock','load','/-/resize/','1389914VFoQCV','match','getAttribute','2NboMJD','492SlmxOD','editing','document','addClass'];_0x517e=function(){return _0x59b6d4;};return _0x517e();}
|