@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20251228.0 → 0.0.0-nightly-next-20251229.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 _0x578f15,ObservableMixin as _0x55b63b}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x1d3c98}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4a88c6}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x35b362}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x1124fb}from'../../utils/uploadutils.js';import{getImageUrls as _0x582b1c,getImageDimension as _0x2da0f0}from'../../utils/editingutils.js';import{isAncestor as _0x5f2585}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x55b63b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3a8997,_0x1fe145,_0x284a97){super(),this['_editor']=_0x3a8997,this['_dialog']=_0x1fe145,this['_imageElement']=_0x284a97,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 _0x411643=this['_imageElement'],_0x3c5d6b=_0x411643['getAttribute']('uploadcareImageId'),_0x1b546d=_0x411643['getAttribute']('src');if(_0x3c5d6b)await this['_loadImageInfo'](_0x3c5d6b,_0x1b546d);else{if(this['_imageCache']['has'](_0x1b546d)){const _0xbccfec=this['_imageCache']['get'](_0x1b546d);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xbccfec['url'],this['imageDimension']=_0xbccfec['dimension'],this['imageId']=_0xbccfec['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5125e6}=this['_editor'],t=_0x5125e6['t'],_0x5a5539=new _0x35b362(_0x5125e6,this['imageStatus'],this['_attributes']);_0x5a5539['bind']('status')['to'](this,'imageStatus'),_0x5a5539['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5a5539['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5a5539['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5a5539,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4a88c6,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5a5539,'position':_0x1d3c98['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5a5539['focus']();},'onHide':()=>{_0x5a5539['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2ca10b=>!_0x5f2585(_0x2ca10b,_0x5a5539['element'])}});}['_loadImageInfo'](_0x31b57c,_0x1b4372){return _0x1124fb['getInfo'](_0x31b57c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x44ba32=>{const {width:_0x521d1e,height:_0x2d7d99}=_0x44ba32['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1b4372,this['imageDimension']={'width':_0x521d1e,'height':_0x2d7d99},this['imageId']=_0x31b57c;})['catch'](_0x1a4b20=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1a4b20['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x134d32,_0x33f0a5){return this['_getImageAsFile'](_0x134d32)['then'](_0x5c12d6=>_0x1124fb['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':_0x33f0a5['signal'],'file':_0x5c12d6,'onProgress':_0x5bd552=>{_0x5bd552&&_0x5bd552['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5bd552['value']));}}))['then'](_0x53c2d9=>{const {width:_0x29d6ee,height:_0x38f38a}=_0x53c2d9['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x53c2d9['cdnUrl'],this['imageDimension']={'width':_0x29d6ee,'height':_0x38f38a},this['imageId']=_0x53c2d9['uuid'],this['imageUploadProgress']=null;const _0x4318f6=_0x134d32['getAttribute']('src');this['_imageCache']['set'](_0x4318f6,{'id':_0x53c2d9['uuid'],'url':_0x53c2d9['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x36f4e1=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x36f4e1['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x49fd4f,_0x4452ef){_0x49fd4f['on']('apply',(_0x4a9dc4,_0x2d6e70)=>{this['_replaceImage'](_0x4452ef,_0x2d6e70['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x49fd4f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x49fd4f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x25e13f,_0x3eb574,_0x309d28){const _0x23fc05=this['_editor'],{width:_0x4cf1bd,height:_0x1da2cf}=_0x2da0f0(_0x3eb574,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x33a24f,imageSources:_0x515304}=_0x582b1c(_0x3eb574,_0x4cf1bd);_0x23fc05['model']['change'](_0x3b1672=>{if('$graveyard'===_0x25e13f['root']['rootName']){_0x23fc05['execute']('insertImage',{'imageType':_0x25e13f['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x25e13f['getAttributes']()),'uploadcareImageId':_0x309d28,'src':_0x33a24f,'sources':_0x515304,'width':_0x4cf1bd,'height':_0x1da2cf}});const _0x45483d=_0x25e13f['getChildren']();_0x25e13f=_0x23fc05['model']['document']['selection']['getSelectedElement']();for(const _0x45834f of _0x45483d)_0x3b1672['append'](_0x3b1672['cloneElement'](_0x45834f),_0x25e13f);}else _0x3b1672['setSelection'](_0x25e13f,'on'),_0x23fc05['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x25e13f['getAttributes']()),'uploadcareImageId':_0x309d28,'src':_0x33a24f,'sources':_0x515304,'width':_0x4cf1bd,'height':_0x1da2cf},_0x25e13f);_0x3b1672['setSelection'](_0x25e13f,'on');});}async['_getImageAsFile'](_0x4dc935){const _0x357f77=_0x578f15['window'],_0x17ee99=_0x578f15['document']['location']['href'],_0xfc90d1=new _0x357f77['URL'](_0x4dc935['getAttribute']('src'),_0x17ee99);if('data:'===_0xfc90d1['protocol']){const _0x570e86=_0xfc90d1['href']['split'](','),_0x31c99c=_0x570e86[0x0]['match'](/:(.*?);/)[0x1],_0x5959b3=_0x31c99c['split']('/')[0x1],_0x11be0f=_0x357f77['atob'](_0x570e86[_0x570e86['length']-0x1]);let _0x98436e=_0x11be0f['length'];const _0x45de6f=new _0x357f77['Uint8Array'](_0x98436e);for(;_0x98436e--;)_0x45de6f[_0x98436e]=_0x11be0f['charCodeAt'](_0x98436e);return new _0x357f77['File']([_0x45de6f],'image.'+_0x5959b3,{'type':_0x31c99c});}const _0x3b79c3=_0xfc90d1['href']['split']('/'),_0x3e2e8e=_0x3b79c3[_0x3b79c3['length']-0x1],_0x75c9d8=_0x3e2e8e['split']('.')[0x1];return _0x357f77['fetch'](_0xfc90d1['href'])['then'](_0x5d788c=>_0x5d788c['clone']()['blob']())['then'](_0x41fbd2=>new _0x357f77['File']([_0x41fbd2],_0x3e2e8e,{'type':'image/'+_0x75c9d8}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0xe702(){const _0x4cfc2d=['97520gpvfZo','ck-uploadcare-theme','setTemplate','image-edit','set','imageSrc','uc-light','21086lRNvks','385168KguYXF','200730izMOST','uc-cloud-image-editor','14tULsze','4186500yDcgFE','90YJjbll','bindTemplate','588VHovFI','40345mASUMj','84sPdUwe'];_0xe702=function(){return _0x4cfc2d;};return _0xe702();}function _0x57e2(_0x38c31a,_0x21398b){const _0xe70224=_0xe702();return _0x57e2=function(_0x57e2ab,_0x263221){_0x57e2ab=_0x57e2ab-0x88;let _0x3921e3=_0xe70224[_0x57e2ab];return _0x3921e3;},_0x57e2(_0x38c31a,_0x21398b);}(function(_0x209e0a,_0x3541d5){const _0x213d4e=_0x57e2,_0x160e99=_0x209e0a();while(!![]){try{const _0x56114a=parseInt(_0x213d4e(0x93))/0x1*(parseInt(_0x213d4e(0x8f))/0x2)+-parseInt(_0x213d4e(0x91))/0x3+-parseInt(_0x213d4e(0x99))/0x4*(parseInt(_0x213d4e(0x98))/0x5)+-parseInt(_0x213d4e(0x97))/0x6+-parseInt(_0x213d4e(0x90))/0x7+parseInt(_0x213d4e(0x88))/0x8*(-parseInt(_0x213d4e(0x95))/0x9)+parseInt(_0x213d4e(0x94))/0xa;if(_0x56114a===_0x3541d5)break;else _0x160e99['push'](_0x160e99['shift']());}catch(_0x5322bb){_0x160e99['push'](_0x160e99['shift']());}}}(_0xe702,0x25527));import{View as _0x5a9686}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x5a9686{constructor(_0x488aef,_0x4e8ad4){const _0x507c59=_0x57e2;super(_0x488aef);const _0x3a4d06=this[_0x507c59(0x96)];this[_0x507c59(0x8c)](_0x507c59(0x8d),''),this[_0x507c59(0x8a)]({'tag':_0x507c59(0x92),'attributes':{..._0x4e8ad4,'class':[_0x507c59(0x8e),_0x507c59(0x89)],'ctx-name':_0x507c59(0x8b),'cdn-url':_0x3a4d06['to'](_0x507c59(0x8d))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x4e52b}from'ckeditor5/src/icons.js';import{ButtonView as _0x3a33d0,IconView as _0x2eea9e,View as _0xff7b49}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0xff7b49{constructor(_0xc4354c){super(_0xc4354c);const t=_0xc4354c['t'];this['set']('errorType',null);const _0x193ff6=new _0x3a33d0(_0xc4354c);_0x193ff6['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x193ff6['withText']=!0x0,_0x193ff6['class']='ck-button-action',_0x193ff6['on']('execute',()=>{this['fire']('retry');}),_0x193ff6['bind']('isVisible')['to'](this,'errorType',_0x5cc8bd=>'NotFound'!==_0x5cc8bd);const _0x376603=new _0x2eea9e();_0x376603['content']=_0x4e52b,_0x376603['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x6801ee=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':[_0x376603,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x6801ee['to']('errorType',_0x198fdc=>t('NotFound'!==_0x198fdc?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x193ff6]},{'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 _0x1c6f0e,View as _0x597ccc}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x597ccc{constructor(_0x3f6149){super(_0x3f6149);const t=_0x3f6149['t'],_0x54913d=this['bindTemplate'],_0xf63bf3=new _0x1c6f0e();_0xf63bf3['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':[_0xf63bf3,{'text':_0x54913d['to']('imageUploadProgress',_0x138d61=>t('Loading\x20image...')+'\x20('+(_0x138d61||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
|
+
function _0x19d5(){const _0x26f952=['disconnect','2lmDrrl','filter','focus','error','823562ahAGLW','element','uploading','apply','change:status','createCollection','_loadingView','retry','3ZPvkRm','status','getFocusableElement','observe','div','add','3297413vDfBxW','1620012yUOwsa','clear','querySelector','addEventListener','_editingView','_addErrorViewListeners','setTemplate','detail','_setView','length','toLowerCase','_errorView','2419640DkxbbH','cdnUrl','3159240EILXoi','cancel','9252imgnvr','ck-reset_all-excluded','target','ck-uploadcare-form','once','nodeName','_items','1279496LomBeC','addMany','render','addedNodes','ready','set','fire','uc-cloud-image-editor','_addUploadcareImageEditorListeners','_waitForImageEditorComponent','_focusableView','16180NDkEkE'];_0x19d5=function(){return _0x26f952;};return _0x19d5();}const _0x24e62c=_0x1f1e;function _0x1f1e(_0x2c0793,_0x4f1836){const _0x19d53c=_0x19d5();return _0x1f1e=function(_0x1f1ef2,_0xdf796){_0x1f1ef2=_0x1f1ef2-0x168;let _0x4022ec=_0x19d53c[_0x1f1ef2];return _0x4022ec;},_0x1f1e(_0x2c0793,_0x4f1836);}(function(_0x28c9ac,_0x2d3c88){const _0x2aaff6=_0x1f1e,_0x255fe9=_0x28c9ac();while(!![]){try{const _0x5d5a4e=-parseInt(_0x2aaff6(0x16d))/0x1*(-parseInt(_0x2aaff6(0x171))/0x2)+-parseInt(_0x2aaff6(0x179))/0x3*(parseInt(_0x2aaff6(0x197))/0x4)+-parseInt(_0x2aaff6(0x18c))/0x5+-parseInt(_0x2aaff6(0x180))/0x6+-parseInt(_0x2aaff6(0x17f))/0x7+-parseInt(_0x2aaff6(0x18e))/0x8+-parseInt(_0x2aaff6(0x190))/0x9*(-parseInt(_0x2aaff6(0x16b))/0xa);if(_0x5d5a4e===_0x2d3c88)break;else _0x255fe9['push'](_0x255fe9['shift']());}catch(_0x4614bd){_0x255fe9['push'](_0x255fe9['shift']());}}}(_0x19d5,0x8591a));import{View as _0x3c387f}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x428320}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0xe879cb}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x2068be}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x868a77}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x868a77{[_0x24e62c(0x196)];[_0x24e62c(0x177)];[_0x24e62c(0x18b)];[_0x24e62c(0x184)];[_0x24e62c(0x16a)];constructor(_0x255f0e,_0x1f3468,_0x3c7198){const _0x1c4d6c=_0x24e62c;super(_0x255f0e),this[_0x1c4d6c(0x196)]=this[_0x1c4d6c(0x176)](),this[_0x1c4d6c(0x177)]=new _0x428320(_0x255f0e),this[_0x1c4d6c(0x18b)]=new _0xe879cb(_0x255f0e),this[_0x1c4d6c(0x184)]=new _0x2068be(_0x255f0e,_0x3c7198),this[_0x1c4d6c(0x16a)]=new _0x3c387f(_0x255f0e),this[_0x1c4d6c(0x16a)][_0x1c4d6c(0x186)](this[_0x1c4d6c(0x17b)]()),this[_0x1c4d6c(0x19c)](_0x1c4d6c(0x17a),_0x1f3468),this[_0x1c4d6c(0x186)]({'tag':_0x1c4d6c(0x17d),'attributes':{'class':['ck',_0x1c4d6c(0x191),_0x1c4d6c(0x193)],'tabindex':'-1'},'children':this[_0x1c4d6c(0x196)]}),this[_0x1c4d6c(0x188)](),this[_0x1c4d6c(0x194)](_0x1c4d6c(0x199),()=>{const _0x650706=_0x1c4d6c;this[_0x650706(0x169)](this[_0x650706(0x172)],_0x16dc27=>{const _0x1936ac=_0x650706;this[_0x1936ac(0x168)](_0x16dc27);});}),this['on'](_0x1c4d6c(0x175),()=>{const _0x5e5081=_0x1c4d6c;this[_0x5e5081(0x188)]();}),this[_0x1c4d6c(0x185)]();}[_0x24e62c(0x16f)](){const _0x4ae822=_0x24e62c;this[_0x4ae822(0x172)][_0x4ae822(0x16f)]();}[_0x24e62c(0x188)](){const _0x306599=_0x24e62c;switch(this[_0x306599(0x196)][_0x306599(0x181)](),this[_0x306599(0x17a)]){case _0x306599(0x173):this[_0x306599(0x196)][_0x306599(0x17e)](this[_0x306599(0x177)]);break;case _0x306599(0x170):this[_0x306599(0x196)][_0x306599(0x17e)](this[_0x306599(0x18b)]);break;case _0x306599(0x19b):this[_0x306599(0x196)][_0x306599(0x198)]([this[_0x306599(0x184)],this[_0x306599(0x16a)]]);}}[_0x24e62c(0x169)](_0x20506c,_0x484d67){const _0x1199db=_0x24e62c,_0x3fbce9=_0x1199db(0x19e),_0x1670c5=_0x20506c[_0x1199db(0x182)](_0x3fbce9);if(_0x1670c5)return _0x484d67(_0x1670c5);const _0x295173=new MutationObserver(_0xbbaa06=>{const _0x4c46f9=_0x1199db,_0x4b25ff=_0xbbaa06[_0x4c46f9(0x16e)](_0x3cb1c6=>_0x3cb1c6[_0x4c46f9(0x192)]===_0x20506c&&_0x3cb1c6[_0x4c46f9(0x19a)][_0x4c46f9(0x189)]>0x0&&_0x3cb1c6[_0x4c46f9(0x19a)][0x0][_0x4c46f9(0x195)][_0x4c46f9(0x18a)]()===_0x3fbce9);_0x4b25ff[_0x4c46f9(0x189)]&&(_0x295173[_0x4c46f9(0x16c)](),_0x484d67(_0x4b25ff[0x0][_0x4c46f9(0x19a)][0x0]));});_0x295173[_0x1199db(0x17c)](_0x20506c,{'childList':!0x0,'subtree':!0x0});}[_0x24e62c(0x168)](_0x276f6e){const _0x3a2e24=_0x24e62c;_0x276f6e[_0x3a2e24(0x183)](_0x3a2e24(0x174),_0xacb15e=>{const _0x4f730d=_0x3a2e24;this[_0x4f730d(0x19d)](_0x4f730d(0x174),{'imageSrc':_0xacb15e[_0x4f730d(0x187)][_0x4f730d(0x18d)]});}),_0x276f6e[_0x3a2e24(0x183)](_0x3a2e24(0x18f),()=>{const _0x1f0786=_0x3a2e24;this[_0x1f0786(0x19d)](_0x1f0786(0x18f));});}[_0x24e62c(0x185)](){const _0xce749=_0x24e62c;this[_0xce749(0x18b)]['on'](_0xce749(0x178),()=>{const _0x421395=_0xce749;this[_0x421395(0x19d)](_0x421395(0x178));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x32a4(){const _0x1960f5=['64421OvxuhW','set','plugins','4565208uduofI','execute','refresh','isEnabled','selection','model','71628RWjuTm','config','72IVdrPK','2156kTJdrq','1136izBURa','imageEditController','get','2574960rOEKvi','297240TKhBhq','_isEditable','requires','1022361McyJoT','13495KMdiOd','imageInline','uploadcare.allowExternalImagesEditing','getSelectedElement','unbind','bind','element','document','editor','isActive','imageBlock'];_0x32a4=function(){return _0x1960f5;};return _0x32a4();}const _0x346417=_0x4dc6;(function(_0x190051,_0x33e661){const _0x4ef2e5=_0x4dc6,_0x437ee6=_0x190051();while(!![]){try{const _0x20ce04=-parseInt(_0x4ef2e5(0xc2))/0x1+-parseInt(_0x4ef2e5(0xb7))/0x2+parseInt(_0x4ef2e5(0xbe))/0x3+-parseInt(_0x4ef2e5(0xba))/0x4*(-parseInt(_0x4ef2e5(0xa3))/0x5)+parseInt(_0x4ef2e5(0xb1))/0x6+-parseInt(_0x4ef2e5(0xae))/0x7*(parseInt(_0x4ef2e5(0xbb))/0x8)+-parseInt(_0x4ef2e5(0xb9))/0x9*(-parseInt(_0x4ef2e5(0xbf))/0xa);if(_0x20ce04===_0x33e661)break;else _0x437ee6['push'](_0x437ee6['shift']());}catch(_0x2d1df7){_0x437ee6['push'](_0x437ee6['shift']());}}}(_0x32a4,0xe7234));import{Command as _0x330eb4}from'ckeditor5/src/core.js';import{Dialog as _0x45eab3}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x1e1312}from'./ui/uploadcareimageeditcontroller.js';function _0x4dc6(_0x32b1cb,_0x4cd752){const _0x32a428=_0x32a4();return _0x4dc6=function(_0x4dc64e,_0x3f1ca5){_0x4dc64e=_0x4dc64e-0xa3;let _0x569cbd=_0x32a428[_0x4dc64e];return _0x569cbd;},_0x4dc6(_0x32b1cb,_0x4cd752);}import{createEditabilityChecker as _0x3b50a6}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x330eb4{[_0x346417(0xbc)];static get[_0x346417(0xc1)](){return[_0x45eab3];}[_0x346417(0xc0)];constructor(_0x14d7ad){const _0x4fcaf9=_0x346417;super(_0x14d7ad),this[_0x4fcaf9(0xbc)]=void 0x0,this[_0x4fcaf9(0xc0)]=_0x3b50a6(_0x14d7ad[_0x4fcaf9(0xb8)][_0x4fcaf9(0xbd)](_0x4fcaf9(0xa5))||[]),this[_0x4fcaf9(0xaf)]({'isActive':!0x1});}[_0x346417(0xb3)](){const _0x451ecc=_0x346417,_0x4b508b=this[_0x451ecc(0xab)][_0x451ecc(0xb6)][_0x451ecc(0xaa)][_0x451ecc(0xb5)][_0x451ecc(0xa6)]();this[_0x451ecc(0xb4)]=this[_0x451ecc(0xc0)](_0x4b508b);}[_0x346417(0xb2)](){const _0xbb4ef1=_0x346417;this[_0xbb4ef1(0xbc)]&&(this[_0xbb4ef1(0xa7)](_0xbb4ef1(0xac)),this[_0xbb4ef1(0xbc)]=void 0x0);const _0x1639e2=this[_0xbb4ef1(0xab)][_0xbb4ef1(0xb6)][_0xbb4ef1(0xaa)][_0xbb4ef1(0xb5)][_0xbb4ef1(0xa6)]();_0x1639e2&&(_0x1639e2['is'](_0xbb4ef1(0xa9),_0xbb4ef1(0xad))||_0x1639e2['is'](_0xbb4ef1(0xa9),_0xbb4ef1(0xa4)))&&(this[_0xbb4ef1(0xbc)]=new _0x1e1312(this[_0xbb4ef1(0xab)],this[_0xbb4ef1(0xab)][_0xbb4ef1(0xb0)][_0xbb4ef1(0xbd)](_0x45eab3),_0x1639e2),this[_0xbb4ef1(0xa8)](_0xbb4ef1(0xac))['to'](this[_0xbb4ef1(0xbc)],_0xbb4ef1(0xac)));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x2a90(_0x4ea325,_0x44ca6b){const _0xd6771f=_0xd677();return _0x2a90=function(_0x2a90f4,_0x11989e){_0x2a90f4=_0x2a90f4-0x18e;let _0x12c7ad=_0xd6771f[_0x2a90f4];return _0x12c7ad;},_0x2a90(_0x4ea325,_0x44ca6b);}const _0x3fe214=_0x2a90;(function(_0x2c467a,_0x21bfa2){const _0x3402e7=_0x2a90,_0x498d55=_0x2c467a();while(!![]){try{const _0x5017d5=-parseInt(_0x3402e7(0x192))/0x1+-parseInt(_0x3402e7(0x199))/0x2+-parseInt(_0x3402e7(0x1a2))/0x3+parseInt(_0x3402e7(0x19e))/0x4+-parseInt(_0x3402e7(0x1a3))/0x5*(parseInt(_0x3402e7(0x198))/0x6)+parseInt(_0x3402e7(0x194))/0x7*(parseInt(_0x3402e7(0x19c))/0x8)+parseInt(_0x3402e7(0x193))/0x9*(parseInt(_0x3402e7(0x191))/0xa);if(_0x5017d5===_0x21bfa2)break;else _0x498d55['push'](_0x498d55['shift']());}catch(_0x2d570b){_0x498d55['push'](_0x498d55['shift']());}}}(_0xd677,0x3d4bf));function _0xd677(){const _0x135726=['add','commands','862560krxFvT','22935bXvpel','isOfficialPlugin','isPremiumPlugin','ImageUtils','2575970BUvpmg','89998zuIBxs','9xLGrpT','21OHuAOi','uploadcareImageReplace','uploadcareImageEdit','ImageEditing','348yeozxV','404850LEXiql','UploadcareImageEditEditing','requires','1066440bWvEMB','init','1758192zcyUlP','pluginName'];_0xd677=function(){return _0x135726;};return _0xd677();}import{Plugin as _0x35d972}from'ckeditor5/src/core.js';import{Notification as _0x3b38b0}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0xb7c5ff}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x5bc01f}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x17e862}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x35d972{static get[_0x3fe214(0x19f)](){const _0x3b897d=_0x3fe214;return _0x3b897d(0x19a);}static get[_0x3fe214(0x19b)](){const _0x1c4752=_0x3fe214;return[_0x17e862,_0x3b38b0,_0x1c4752(0x190),_0x1c4752(0x197)];}static get[_0x3fe214(0x18e)](){return!0x0;}static get[_0x3fe214(0x18f)](){return!0x0;}[_0x3fe214(0x19d)](){const _0x25ebc4=_0x3fe214,{editor:_0x3c41d6}=this;_0x3c41d6[_0x25ebc4(0x1a1)][_0x25ebc4(0x1a0)](_0x25ebc4(0x196),new _0xb7c5ff(_0x3c41d6)),_0x3c41d6[_0x25ebc4(0x1a1)][_0x25ebc4(0x1a0)](_0x25ebc4(0x195),new _0x5bc01f(_0x3c41d6));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x46b2db}from'ckeditor5/src/core.js';import{ButtonView as _0x2c7380}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x756df0}from'ckeditor5/src/icons.js';import{createElement as _0x512ede}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 _0x46b2db{['_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 _0x3d602b=this['editor'];_0x3d602b['ui']['componentFactory']['add']('uploadcareImageEdit',_0x5137a1=>{const _0x3482a7=_0x3d602b['commands']['get']('uploadcareImageEdit'),_0x213eb6=new _0x2c7380(_0x5137a1),t=_0x5137a1['t'];return _0x213eb6['set']({'icon':_0x756df0,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x213eb6['bind']('isEnabled')['to'](_0x3482a7),_0x213eb6['bind']('isOn')['to'](_0x3482a7,'isActive'),this['listenTo'](_0x213eb6,'execute',()=>{_0x3d602b['execute']('uploadcareImageEdit'),_0x3d602b['editing']['view']['focus']();}),_0x213eb6;}),this['_initConfig']();}['_initConfig'](){const _0x77fb95=_0x512ede(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x77fb95),this['listenTo'](this['editor'],'destroy',()=>{_0x77fb95['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x6be5(){var _0x43d90a=['8383902tCfino','7TpNriB','true','45768060AdiavN','forwardCycle','4wiAtuX','730386TMPFNo','focusTracker','fire','div','bindTemplate','2023928diHjIP','3203268oEEeaK','createCollection','2860035SsuCaT','794915AhHVeV','getFocusableElement','focusCycler'];_0x6be5=function(){return _0x43d90a;};return _0x6be5();}function _0x42b9(_0x29e3ce,_0x4badc8){var _0x6be5ba=_0x6be5();return _0x42b9=function(_0x42b9d0,_0x3a318d){_0x42b9d0=_0x42b9d0-0x135;var _0x3f8679=_0x6be5ba[_0x42b9d0];return _0x3f8679;},_0x42b9(_0x29e3ce,_0x4badc8);}var _0x5dac05=_0x42b9;(function(_0x2b286d,_0x557f4f){var _0x469886=_0x42b9,_0x520772=_0x2b286d();while(!![]){try{var _0x357e15=-parseInt(_0x469886(0x13e))/0x1+-parseInt(_0x469886(0x144))/0x2+-parseInt(_0x469886(0x146))/0x3*(parseInt(_0x469886(0x13d))/0x4)+parseInt(_0x469886(0x135))/0x5+-parseInt(_0x469886(0x138))/0x6+parseInt(_0x469886(0x139))/0x7*(parseInt(_0x469886(0x143))/0x8)+parseInt(_0x469886(0x13b))/0x9;if(_0x357e15===_0x557f4f)break;else _0x520772['push'](_0x520772['shift']());}catch(_0x50216c){_0x520772['push'](_0x520772['shift']());}}}(_0x6be5,0xc6e28));import{FocusTracker as _0x41a668}from'ckeditor5/src/utils.js';import{View as _0x5adb2c,FocusCycler as _0x3a7158}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0x5adb2c{[_0x5dac05(0x13f)];[_0x5dac05(0x137)];constructor(_0x5616ce){var _0x1c8db0=_0x5dac05;super(_0x5616ce),this[_0x1c8db0(0x13f)]=new _0x41a668(),this[_0x1c8db0(0x137)]=new _0x3a7158({'focusables':this[_0x1c8db0(0x145)](),'focusTracker':this[_0x1c8db0(0x13f)]});}[_0x5dac05(0x136)](){var _0x1c087e=_0x5dac05;return{'tag':_0x1c087e(0x141),'attributes':{'aria-hidden':_0x1c087e(0x13a),'tabindex':'0'},'on':{'focus':this[_0x1c087e(0x142)]['to'](()=>{var _0x292632=_0x1c087e;this[_0x292632(0x137)][_0x292632(0x140)](_0x292632(0x13c));})}};}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x11a1(_0x22935a,_0xafefc6){const _0x3bc45a=_0x3bc4();return _0x11a1=function(_0x11a1a3,_0x2e94b3){_0x11a1a3=_0x11a1a3-0xe1;let _0x37ec2c=_0x3bc45a[_0x11a1a3];return _0x37ec2c;},_0x11a1(_0x22935a,_0xafefc6);}(function(_0x582812,_0x237254){const _0x4e1d1f=_0x11a1,_0x4d1bd0=_0x582812();while(!![]){try{const _0x293db9=parseInt(_0x4e1d1f(0x114))/0x1+-parseInt(_0x4e1d1f(0x105))/0x2*(-parseInt(_0x4e1d1f(0xe3))/0x3)+parseInt(_0x4e1d1f(0xfb))/0x4+parseInt(_0x4e1d1f(0xe4))/0x5+-parseInt(_0x4e1d1f(0xf6))/0x6*(parseInt(_0x4e1d1f(0xe6))/0x7)+-parseInt(_0x4e1d1f(0xf0))/0x8*(-parseInt(_0x4e1d1f(0xe1))/0x9)+parseInt(_0x4e1d1f(0xf5))/0xa*(-parseInt(_0x4e1d1f(0x119))/0xb);if(_0x293db9===_0x237254)break;else _0x4d1bd0['push'](_0x4d1bd0['shift']());}catch(_0x5c949e){_0x4d1bd0['push'](_0x4d1bd0['shift']());}}}(_0x3bc4,0xea0f8));import{global as _0x48410d,DomEmitterMixin as _0x413a41}from'ckeditor5/src/utils.js';export function createEditabilityChecker(_0x100500){const _0x48ce31=_0x11a1,_0x24ef8a=R(_0x100500);return _0x151e41=>!(!_0x151e41||!_0x151e41['is'](_0x48ce31(0xe8),_0x48ce31(0xf8))&&!_0x151e41['is'](_0x48ce31(0xe8),_0x48ce31(0xf9)))&&(!!_0x151e41[_0x48ce31(0x106)](_0x48ce31(0xef))||!!_0x151e41[_0x48ce31(0x106)](_0x48ce31(0x101))&&_0x24ef8a(_0x151e41[_0x48ce31(0xff)](_0x48ce31(0x101))));}function _0x3bc4(){const _0x43abd8=['findViewImgElement','load','x/\x20','change','1254LbRzXL','mapper','63dvVWzJ','toViewElement','191265KAGxlA','7425040yIpdZr','addClass','42OSKIfn','join','element','aspect-ratio','/-/resize/','(max-width:\x20','get','height','image-processing','uploadcareImageId','657456uXmmNZ','width','view','domConverter','isArray','258460ImJBHQ','1648662LGifBJ','document','imageBlock','imageInline','window','862860bIxwZM','location','filter','plugins','getAttribute','replace','src','removeClass','some','match','50beepXs','hasAttribute','image/webp','function','listenTo','setStyle','baseURI','editing','origin','stopListening','px)\x20100vw,\x20','removeStyle','map','viewToDom','ImageUtils','1683946KGqisn'];_0x3bc4=function(){return _0x43abd8;};return _0x3bc4();}export function getImageUrls(_0x192b63,_0x44cd85){const _0x62e51f=_0x11a1,_0x568ba5=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960][_0x62e51f(0xfd)](_0x4883c7=>_0x4883c7<=_0x44cd85)[_0x62e51f(0x111)](_0x20a523=>_0x192b63[_0x62e51f(0x100)](/\/$/,'')+_0x62e51f(0xea)+_0x20a523+_0x62e51f(0x117)+_0x20a523+'w');return{'imageFallbackUrl':_0x192b63,'imageSources':[{'srcset':_0x568ba5[_0x62e51f(0xe7)](',\x20'),'sizes':_0x62e51f(0xeb)+_0x44cd85+_0x62e51f(0x10f)+_0x44cd85+'px','type':_0x62e51f(0x107)}]};}export function getImageDimension(_0x5c5171,_0xdb4d76,_0xca26cc){const _0x16ac1a=_0x11a1,_0x5ab854=_0x5c5171[_0x16ac1a(0x104)](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5ab854?parseInt(_0x5ab854[0x1],0xa):_0xdb4d76,'height':_0x5ab854?parseInt(_0x5ab854[0x2],0xa):_0xca26cc};}export function showImageProcessingIndicator(_0x261d69,_0x31ad1c){const _0x1b88b7=_0x11a1,_0x4dd510=new(_0x413a41())(),_0x3f0f0e=_0x261d69[_0x1b88b7(0xfe)][_0x1b88b7(0xec)](_0x1b88b7(0x113)),_0x402964=_0x261d69[_0x1b88b7(0x10c)][_0x1b88b7(0x11a)][_0x1b88b7(0xe2)](_0x31ad1c),_0x273ceb=_0x3f0f0e[_0x1b88b7(0x115)](_0x402964),_0x43cba1=_0x261d69[_0x1b88b7(0x10c)][_0x1b88b7(0xf2)][_0x1b88b7(0xf3)][_0x1b88b7(0x112)](_0x273ceb),_0x2c359c=_0x31ad1c[_0x1b88b7(0xff)](_0x1b88b7(0xf1)),_0x2a1e43=_0x31ad1c[_0x1b88b7(0xff)](_0x1b88b7(0xed)),_0x301df7=_0x1b88b7(0xee);_0x261d69[_0x1b88b7(0x10c)][_0x1b88b7(0xf2)][_0x1b88b7(0x118)](_0x40eba1=>{const _0x352c84=_0x1b88b7;_0x40eba1[_0x352c84(0xe5)](_0x301df7,_0x402964),_0x40eba1[_0x352c84(0x10a)](_0x352c84(0xe9),_0x2c359c+'/'+_0x2a1e43,_0x273ceb);}),_0x4dd510[_0x1b88b7(0x109)](_0x43cba1,_0x1b88b7(0x116),()=>{const _0x3383d5=_0x1b88b7;_0x4dd510[_0x3383d5(0x10e)](_0x43cba1,_0x3383d5(0x116)),_0x261d69[_0x3383d5(0x10c)][_0x3383d5(0xf2)][_0x3383d5(0x118)](_0x2476dd=>{const _0x3382a3=_0x3383d5;_0x2476dd[_0x3382a3(0x102)](_0x301df7,_0x402964),_0x2476dd[_0x3382a3(0x110)](_0x3382a3(0xe9),_0x273ceb);});});}function R(_0x8b1671){const _0x11bdc6=_0x11a1;if(Array[_0x11bdc6(0xf4)](_0x8b1671)){const _0x2ad3a9=_0x8b1671[_0x11bdc6(0x111)](R);return _0xc97da7=>_0x2ad3a9[_0x11bdc6(0x103)](_0x421fba=>_0x421fba(_0xc97da7));}if(_0x11bdc6(0x10d)==_0x8b1671){const _0x43c1a6=_0x48410d[_0x11bdc6(0xfa)][_0x11bdc6(0xfc)][_0x11bdc6(0x10d)];return _0x3d2187=>new URL(_0x3d2187,_0x48410d[_0x11bdc6(0xf7)][_0x11bdc6(0x10b)])[_0x11bdc6(0x10d)]==_0x43c1a6;}return _0x11bdc6(0x108)==typeof _0x8b1671?_0x8b1671:_0x8b1671 instanceof RegExp?_0x18bd9a=>!(!_0x18bd9a[_0x11bdc6(0x104)](_0x8b1671)&&!_0x18bd9a[_0x11bdc6(0x100)](/^https?:\/\//,'')[_0x11bdc6(0x104)](_0x8b1671)):()=>!0x1;}
|