@ckeditor/ckeditor5-uploadcare 47.3.0-alpha.3 → 47.3.0-alpha.4
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/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0xea112e,ObservableMixin as _0x228abd}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x578421}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x40b554}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4cee5a}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x53577d}from'../../utils/uploadutils.js';import{getImageUrls as _0xb4eacc,getImageDimension as _0x2d2b98}from'../../utils/editingutils.js';import{isAncestor as _0x173def}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x228abd(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x6b8377,_0xe55e46,_0x4e022a){super(),this['_editor']=_0x6b8377,this['_dialog']=_0xe55e46,this['_imageElement']=_0x4e022a,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 _0x57058b=this['_imageElement'],_0x1407aa=_0x57058b['getAttribute']('uploadcareImageId'),_0x35d165=_0x57058b['getAttribute']('src');if(_0x1407aa)await this['_loadImageInfo'](_0x1407aa,_0x35d165);else{if(this['_imageCache']['has'](_0x35d165)){const _0x189bc7=this['_imageCache']['get'](_0x35d165);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x189bc7['url'],this['imageDimension']=_0x189bc7['dimension'],this['imageId']=_0x189bc7['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1787a9}=this['_editor'],t=_0x1787a9['t'],_0x559f2c=new _0x4cee5a(_0x1787a9,this['imageStatus'],this['_attributes']);_0x559f2c['bind']('status')['to'](this,'imageStatus'),_0x559f2c['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x559f2c['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x559f2c['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x559f2c,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x40b554,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x559f2c,'position':_0x578421['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x559f2c['focus']();},'onHide':()=>{_0x559f2c['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x305ec5=>!_0x173def(_0x305ec5,_0x559f2c['element'])}});}['_loadImageInfo'](_0x6169d8,_0x29affd){return _0x53577d['getInfo'](_0x6169d8,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x565485=>{const {width:_0x1f6d42,height:_0x18ce34}=_0x565485['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x29affd,this['imageDimension']={'width':_0x1f6d42,'height':_0x18ce34},this['imageId']=_0x6169d8;})['catch'](_0x1e4f57=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1e4f57['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x47f705,_0x153dab){return this['_getImageAsFile'](_0x47f705)['then'](_0x98c9dc=>_0x53577d['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':_0x153dab['signal'],'file':_0x98c9dc,'onProgress':_0x498c88=>{_0x498c88&&_0x498c88['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x498c88['value']));}}))['then'](_0x4d4928=>{const {width:_0x16c4a3,height:_0xe536c5}=_0x4d4928['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4d4928['cdnUrl'],this['imageDimension']={'width':_0x16c4a3,'height':_0xe536c5},this['imageId']=_0x4d4928['uuid'],this['imageUploadProgress']=null;const _0x158f8c=_0x47f705['getAttribute']('src');this['_imageCache']['set'](_0x158f8c,{'id':_0x4d4928['uuid'],'url':_0x4d4928['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x329584=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x329584['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4cf824,_0x38f250){_0x4cf824['on']('apply',(_0x3503ee,_0x193bd1)=>{this['_replaceImage'](_0x38f250,_0x193bd1['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4cf824['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4cf824['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x45844f,_0x136c31,_0x1abc25){const _0x2524a1=this['_editor'],{width:_0x47aea0,height:_0x5ab43b}=_0x2d2b98(_0x136c31,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x417237,imageSources:_0x5f0f6b}=_0xb4eacc(_0x136c31,_0x47aea0);_0x2524a1['model']['change'](_0x3aee80=>{if('$graveyard'===_0x45844f['root']['rootName']){_0x2524a1['execute']('insertImage',{'imageType':_0x45844f['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x45844f['getAttributes']()),'uploadcareImageId':_0x1abc25,'src':_0x417237,'sources':_0x5f0f6b,'width':_0x47aea0,'height':_0x5ab43b}});const _0x365f20=_0x45844f['getChildren']();_0x45844f=_0x2524a1['model']['document']['selection']['getSelectedElement']();for(const _0x397ae8 of _0x365f20)_0x3aee80['append'](_0x3aee80['cloneElement'](_0x397ae8),_0x45844f);}else _0x3aee80['setSelection'](_0x45844f,'on'),_0x2524a1['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x45844f['getAttributes']()),'uploadcareImageId':_0x1abc25,'src':_0x417237,'sources':_0x5f0f6b,'width':_0x47aea0,'height':_0x5ab43b},_0x45844f);_0x3aee80['setSelection'](_0x45844f,'on');});}async['_getImageAsFile'](_0x42de77){const _0x537533=_0xea112e['window'],_0x4baedf=_0xea112e['document']['location']['href'],_0x5b7440=new _0x537533['URL'](_0x42de77['getAttribute']('src'),_0x4baedf);if('data:'===_0x5b7440['protocol']){const _0x248239=_0x5b7440['href']['split'](','),_0x49477e=_0x248239[0x0]['match'](/:(.*?);/)[0x1],_0x3073f7=_0x49477e['split']('/')[0x1],_0x456fcd=_0x537533['atob'](_0x248239[_0x248239['length']-0x1]);let _0x45f247=_0x456fcd['length'];const _0x168997=new _0x537533['Uint8Array'](_0x45f247);for(;_0x45f247--;)_0x168997[_0x45f247]=_0x456fcd['charCodeAt'](_0x45f247);return new _0x537533['File']([_0x168997],'image.'+_0x3073f7,{'type':_0x49477e});}const _0x30f544=_0x5b7440['href']['split']('/'),_0x3f428c=_0x30f544[_0x30f544['length']-0x1],_0x259c2e=_0x3f428c['split']('.')[0x1];return _0x537533['fetch'](_0x5b7440['href'])['then'](_0xb801d=>_0xb801d['clone']()['blob']())['then'](_0x1fec3b=>new _0x537533['File']([_0x1fec3b],_0x3f428c,{'type':'image/'+_0x259c2e}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x590337,_0x242c46){const _0x50dc00=_0x4e58,_0x29b98b=_0x590337();while(!![]){try{const _0x2df4d4=-parseInt(_0x50dc00(0x1ea))/0x1+parseInt(_0x50dc00(0x1de))/0x2*(parseInt(_0x50dc00(0x1db))/0x3)+parseInt(_0x50dc00(0x1e6))/0x4+parseInt(_0x50dc00(0x1df))/0x5*(-parseInt(_0x50dc00(0x1d9))/0x6)+parseInt(_0x50dc00(0x1e0))/0x7+-parseInt(_0x50dc00(0x1d8))/0x8*(-parseInt(_0x50dc00(0x1e2))/0x9)+-parseInt(_0x50dc00(0x1e4))/0xa*(parseInt(_0x50dc00(0x1e9))/0xb);if(_0x2df4d4===_0x242c46)break;else _0x29b98b['push'](_0x29b98b['shift']());}catch(_0x51d362){_0x29b98b['push'](_0x29b98b['shift']());}}}(_0x3559,0xc57ca));function _0x4e58(_0x4ac1a5,_0x259536){const _0x3559e2=_0x3559();return _0x4e58=function(_0x4e5891,_0x27c95d){_0x4e5891=_0x4e5891-0x1d8;let _0x39fcbc=_0x3559e2[_0x4e5891];return _0x39fcbc;},_0x4e58(_0x4ac1a5,_0x259536);}function _0x3559(){const _0x1d1894=['setTemplate','image-edit','11eMEXoK','409593fdTHze','9844152BPRwAk','41526pfZlOc','set','9459PxYbWz','bindTemplate','uc-cloud-image-editor','484iSONXP','240HJnQUa','5142158kheavX','imageSrc','9lLZhfu','uc-light','21173870rdcUOW','ck-uploadcare-theme','3759820vjfZwr'];_0x3559=function(){return _0x1d1894;};return _0x3559();}import{View as _0xe224ad}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0xe224ad{constructor(_0x1c715f,_0x194c59){const _0x9758c5=_0x4e58;super(_0x1c715f);const _0xce1930=this[_0x9758c5(0x1dc)];this[_0x9758c5(0x1da)](_0x9758c5(0x1e1),''),this[_0x9758c5(0x1e7)]({'tag':_0x9758c5(0x1dd),'attributes':{..._0x194c59,'class':[_0x9758c5(0x1e3),_0x9758c5(0x1e5)],'ctx-name':_0x9758c5(0x1e8),'cdn-url':_0xce1930['to'](_0x9758c5(0x1e1))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x4f8c25}from'ckeditor5/src/icons.js';import{ButtonView as _0x5801db,IconView as _0x27d747,View as _0xc6aa9a}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0xc6aa9a{constructor(_0x3fac1a){super(_0x3fac1a);const t=_0x3fac1a['t'];this['set']('errorType',null);const _0xc1ded=new _0x5801db(_0x3fac1a);_0xc1ded['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xc1ded['withText']=!0x0,_0xc1ded['class']='ck-button-action',_0xc1ded['on']('execute',()=>{this['fire']('retry');}),_0xc1ded['bind']('isVisible')['to'](this,'errorType',_0x514f89=>'NotFound'!==_0x514f89);const _0x427812=new _0x27d747();_0x427812['content']=_0x4f8c25,_0x427812['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1986c1=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':[_0x427812,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1986c1['to']('errorType',_0x2170d6=>t('NotFound'!==_0x2170d6?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xc1ded]},{'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 _0x2f81c8,View as _0x1b82b7}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x1b82b7{constructor(_0x25caa7){super(_0x25caa7);const t=_0x25caa7['t'],_0x15dbbe=this['bindTemplate'],_0x24be96=new _0x2f81c8();_0x24be96['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':[_0x24be96,{'text':_0x15dbbe['to']('imageUploadProgress',_0x244f69=>t('Loading\x20image...')+'\x20('+(_0x244f69||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 _0x3f5225=_0x4d28;function _0x4d28(_0x2b4d58,_0x4a340f){const _0x290518=_0x2905();return _0x4d28=function(_0x4d2898,_0x36c50f){_0x4d2898=_0x4d2898-0x80;let _0x39ec96=_0x290518[_0x4d2898];return _0x39ec96;},_0x4d28(_0x2b4d58,_0x4a340f);}(function(_0x245bc7,_0x3d95ce){const _0x46c9f5=_0x4d28,_0x11e761=_0x245bc7();while(!![]){try{const _0x289eeb=-parseInt(_0x46c9f5(0x8a))/0x1*(-parseInt(_0x46c9f5(0xad))/0x2)+-parseInt(_0x46c9f5(0xae))/0x3*(parseInt(_0x46c9f5(0x82))/0x4)+-parseInt(_0x46c9f5(0x80))/0x5*(parseInt(_0x46c9f5(0x87))/0x6)+parseInt(_0x46c9f5(0x88))/0x7*(-parseInt(_0x46c9f5(0xb5))/0x8)+parseInt(_0x46c9f5(0x84))/0x9*(parseInt(_0x46c9f5(0x90))/0xa)+parseInt(_0x46c9f5(0x97))/0xb*(-parseInt(_0x46c9f5(0xa0))/0xc)+parseInt(_0x46c9f5(0xa6))/0xd;if(_0x289eeb===_0x3d95ce)break;else _0x11e761['push'](_0x11e761['shift']());}catch(_0x318795){_0x11e761['push'](_0x11e761['shift']());}}}(_0x2905,0xb415e));import{View as _0x168a17}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x1e8075}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0x34ab50}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x40914a}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x1c6c19}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x1c6c19{[_0x3f5225(0x98)];[_0x3f5225(0xa9)];[_0x3f5225(0x9e)];[_0x3f5225(0x9f)];[_0x3f5225(0x81)];constructor(_0x28b43f,_0x1d9547,_0x13989a){const _0x1ae3d8=_0x3f5225;super(_0x28b43f),this[_0x1ae3d8(0x98)]=this[_0x1ae3d8(0xab)](),this[_0x1ae3d8(0xa9)]=new _0x1e8075(_0x28b43f),this[_0x1ae3d8(0x9e)]=new _0x34ab50(_0x28b43f),this[_0x1ae3d8(0x9f)]=new _0x40914a(_0x28b43f,_0x13989a),this[_0x1ae3d8(0x81)]=new _0x168a17(_0x28b43f),this[_0x1ae3d8(0x81)][_0x1ae3d8(0x8c)](this[_0x1ae3d8(0xb8)]()),this[_0x1ae3d8(0x9a)](_0x1ae3d8(0xa1),_0x1d9547),this[_0x1ae3d8(0x8c)]({'tag':_0x1ae3d8(0x9d),'attributes':{'class':['ck',_0x1ae3d8(0x83),_0x1ae3d8(0x93)],'tabindex':'-1'},'children':this[_0x1ae3d8(0x98)]}),this[_0x1ae3d8(0xb0)](),this[_0x1ae3d8(0xb3)](_0x1ae3d8(0xaa),()=>{const _0xbb3bd0=_0x1ae3d8;this[_0xbb3bd0(0xa8)](this[_0xbb3bd0(0x94)],_0x386af8=>{const _0x3b0dc9=_0xbb3bd0;this[_0x3b0dc9(0xb7)](_0x386af8);});}),this['on'](_0x1ae3d8(0xb9),()=>{const _0x4f2003=_0x1ae3d8;this[_0x4f2003(0xb0)]();}),this[_0x1ae3d8(0x96)]();}[_0x3f5225(0x8f)](){const _0x172a26=_0x3f5225;this[_0x172a26(0x94)][_0x172a26(0x8f)]();}[_0x3f5225(0xb0)](){const _0x5e1efc=_0x3f5225;switch(this[_0x5e1efc(0x98)][_0x5e1efc(0xa7)](),this[_0x5e1efc(0xa1)]){case _0x5e1efc(0xac):this[_0x5e1efc(0x98)][_0x5e1efc(0x99)](this[_0x5e1efc(0xa9)]);break;case _0x5e1efc(0x8b):this[_0x5e1efc(0x98)][_0x5e1efc(0x99)](this[_0x5e1efc(0x9e)]);break;case _0x5e1efc(0xb4):this[_0x5e1efc(0x98)][_0x5e1efc(0x9c)]([this[_0x5e1efc(0x9f)],this[_0x5e1efc(0x81)]]);}}[_0x3f5225(0xa8)](_0x1f881d,_0x34e61e){const _0x43b54a=_0x3f5225,_0x53db0b=_0x43b54a(0x9b),_0x1ce041=_0x1f881d[_0x43b54a(0xa3)](_0x53db0b);if(_0x1ce041)return _0x34e61e(_0x1ce041);const _0x1c781d=new MutationObserver(_0x329f13=>{const _0x4934fe=_0x43b54a,_0x2b0581=_0x329f13[_0x4934fe(0x8e)](_0x18eafe=>_0x18eafe[_0x4934fe(0xa2)]===_0x1f881d&&_0x18eafe[_0x4934fe(0xaf)][_0x4934fe(0x92)]>0x0&&_0x18eafe[_0x4934fe(0xaf)][0x0][_0x4934fe(0x91)][_0x4934fe(0xb1)]()===_0x53db0b);_0x2b0581[_0x4934fe(0x92)]&&(_0x1c781d[_0x4934fe(0x8d)](),_0x34e61e(_0x2b0581[0x0][_0x4934fe(0xaf)][0x0]));});_0x1c781d[_0x43b54a(0xa4)](_0x1f881d,{'childList':!0x0,'subtree':!0x0});}[_0x3f5225(0xb7)](_0x47945f){const _0x29bff1=_0x3f5225;_0x47945f[_0x29bff1(0xb6)](_0x29bff1(0x89),_0x4cdc7f=>{const _0x22c55a=_0x29bff1;this[_0x22c55a(0x86)](_0x22c55a(0x89),{'imageSrc':_0x4cdc7f[_0x22c55a(0xb2)][_0x22c55a(0xa5)]});}),_0x47945f[_0x29bff1(0xb6)](_0x29bff1(0x85),()=>{const _0x23e943=_0x29bff1;this[_0x23e943(0x86)](_0x23e943(0x85));});}[_0x3f5225(0x96)](){const _0x27319c=_0x3f5225;this[_0x27319c(0x9e)]['on'](_0x27319c(0x95),()=>{const _0x3a93b4=_0x27319c;this[_0x3a93b4(0x86)](_0x3a93b4(0x95));});}}function _0x2905(){const _0xe1b789=['16540nNjXlL','nodeName','length','ck-uploadcare-form','element','retry','_addErrorViewListeners','3443DvtaTN','_items','add','set','uc-cloud-image-editor','addMany','div','_errorView','_editingView','10884fDzsRB','status','target','querySelector','observe','cdnUrl','31292846AkhtUm','clear','_waitForImageEditorComponent','_loadingView','render','createCollection','uploading','13652IEBUWM','1398ZxvUvA','addedNodes','_setView','toLowerCase','detail','once','ready','1571336TSgEOu','addEventListener','_addUploadcareImageEditorListeners','getFocusableElement','change:status','935140uPlAYT','_focusableView','11920NMNmRd','ck-reset_all-excluded','4131peEpvE','cancel','fire','30wopQTA','7YUNpFK','apply','55vngtlR','error','setTemplate','disconnect','filter','focus'];_0x2905=function(){return _0xe1b789;};return _0x2905();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x53ca(){const _0x3836ed=['uploadcare.allowExternalImagesEditing','refresh','getSelectedElement','_isEditable','1771748IuXHUK','isEnabled','bind','set','1062wRzuMT','10035IHtFGm','26081TAIEvW','execute','model','unbind','591039zzoinw','2954646yriKkm','imageEditController','16pPnVfN','10fnTYWY','plugins','document','586377eibZbc','element','isActive','107472ADbfge','imageInline','imageBlock','42UtBipa','get','24RbAbIA','selection','config','editor','requires'];_0x53ca=function(){return _0x3836ed;};return _0x53ca();}function _0x3588(_0x511376,_0x108f42){const _0x53ca5f=_0x53ca();return _0x3588=function(_0x358837,_0x2358fe){_0x358837=_0x358837-0x1f0;let _0x59b21e=_0x53ca5f[_0x358837];return _0x59b21e;},_0x3588(_0x511376,_0x108f42);}const _0xebc598=_0x3588;(function(_0x74fa55,_0x568f69){const _0x209f13=_0x3588,_0x508490=_0x74fa55();while(!![]){try{const _0x51a406=-parseInt(_0x209f13(0x206))/0x1*(parseInt(_0x209f13(0x20d))/0x2)+-parseInt(_0x209f13(0x20a))/0x3+parseInt(_0x209f13(0x200))/0x4+parseInt(_0x209f13(0x205))/0x5*(parseInt(_0x209f13(0x204))/0x6)+parseInt(_0x209f13(0x1f5))/0x7*(parseInt(_0x209f13(0x1f2))/0x8)+parseInt(_0x209f13(0x20b))/0x9*(-parseInt(_0x209f13(0x20e))/0xa)+-parseInt(_0x209f13(0x211))/0xb*(-parseInt(_0x209f13(0x1f7))/0xc);if(_0x51a406===_0x568f69)break;else _0x508490['push'](_0x508490['shift']());}catch(_0x170eba){_0x508490['push'](_0x508490['shift']());}}}(_0x53ca,0x3d62f));import{Command as _0x55f2d7}from'ckeditor5/src/core.js';import{Dialog as _0x4f3ed5}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x3f853c}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x1cf366}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x55f2d7{[_0xebc598(0x20c)];static get[_0xebc598(0x1fb)](){return[_0x4f3ed5];}[_0xebc598(0x1ff)];constructor(_0x19f850){const _0x61dea2=_0xebc598;super(_0x19f850),this[_0x61dea2(0x20c)]=void 0x0,this[_0x61dea2(0x1ff)]=_0x1cf366(_0x19f850[_0x61dea2(0x1f9)][_0x61dea2(0x1f6)](_0x61dea2(0x1fc))||[]),this[_0x61dea2(0x203)]({'isActive':!0x1});}[_0xebc598(0x1fd)](){const _0x463121=_0xebc598,_0x127a56=this[_0x463121(0x1fa)][_0x463121(0x208)][_0x463121(0x210)][_0x463121(0x1f8)][_0x463121(0x1fe)]();this[_0x463121(0x201)]=this[_0x463121(0x1ff)](_0x127a56);}[_0xebc598(0x207)](){const _0x2d97c0=_0xebc598;this[_0x2d97c0(0x20c)]&&(this[_0x2d97c0(0x209)](_0x2d97c0(0x1f1)),this[_0x2d97c0(0x20c)]=void 0x0);const _0x3b8d19=this[_0x2d97c0(0x1fa)][_0x2d97c0(0x208)][_0x2d97c0(0x210)][_0x2d97c0(0x1f8)][_0x2d97c0(0x1fe)]();_0x3b8d19&&(_0x3b8d19['is'](_0x2d97c0(0x1f0),_0x2d97c0(0x1f4))||_0x3b8d19['is'](_0x2d97c0(0x1f0),_0x2d97c0(0x1f3)))&&(this[_0x2d97c0(0x20c)]=new _0x3f853c(this[_0x2d97c0(0x1fa)],this[_0x2d97c0(0x1fa)][_0x2d97c0(0x20f)][_0x2d97c0(0x1f6)](_0x4f3ed5),_0x3b8d19),this[_0x2d97c0(0x202)](_0x2d97c0(0x1f1))['to'](this[_0x2d97c0(0x20c)],_0x2d97c0(0x1f1)));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4e4ec3=_0x369b;function _0x369b(_0x551296,_0x5f4ccc){const _0x151e50=_0x151e();return _0x369b=function(_0x369b5d,_0x31476c){_0x369b5d=_0x369b5d-0xaa;let _0x476a68=_0x151e50[_0x369b5d];return _0x476a68;},_0x369b(_0x551296,_0x5f4ccc);}(function(_0x9fc339,_0x26f013){const _0x7764da=_0x369b,_0x3d3e13=_0x9fc339();while(!![]){try{const _0x190448=parseInt(_0x7764da(0xb3))/0x1*(-parseInt(_0x7764da(0xb5))/0x2)+parseInt(_0x7764da(0xae))/0x3+parseInt(_0x7764da(0xb7))/0x4*(-parseInt(_0x7764da(0xb9))/0x5)+-parseInt(_0x7764da(0xaf))/0x6*(-parseInt(_0x7764da(0xad))/0x7)+-parseInt(_0x7764da(0xb0))/0x8*(-parseInt(_0x7764da(0xc2))/0x9)+parseInt(_0x7764da(0xac))/0xa*(-parseInt(_0x7764da(0xb1))/0xb)+parseInt(_0x7764da(0xab))/0xc*(parseInt(_0x7764da(0xbb))/0xd);if(_0x190448===_0x26f013)break;else _0x3d3e13['push'](_0x3d3e13['shift']());}catch(_0x495247){_0x3d3e13['push'](_0x3d3e13['shift']());}}}(_0x151e,0x23457));import{Plugin as _0x31d29b}from'ckeditor5/src/core.js';import{Notification as _0x1106ef}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x5d073a}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x3bc88a}from'./uploadcareimagereplacecommand.js';function _0x151e(){const _0x48493b=['ImageUtils','95PTskSx','init','13RRxgEN','commands','UploadcareImageEditEditing','ImageEditing','pluginName','isPremiumPlugin','add','3096DOHvOZ','uploadcareImageEdit','5388912FMKDWL','1625390DxMXTF','161CjwfGv','615213rpVtCO','5388kCgkvy','472IhRuZr','11LIwdhD','requires','5YBMSgL','isOfficialPlugin','86736gqlBGI','uploadcareImageReplace','36052dmWPzu'];_0x151e=function(){return _0x48493b;};return _0x151e();}import{UploadcareEditing as _0x4ad7db}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x31d29b{static get[_0x4e4ec3(0xbf)](){const _0x4b20da=_0x4e4ec3;return _0x4b20da(0xbd);}static get[_0x4e4ec3(0xb2)](){const _0x3ce935=_0x4e4ec3;return[_0x4ad7db,_0x1106ef,_0x3ce935(0xb8),_0x3ce935(0xbe)];}static get[_0x4e4ec3(0xb4)](){return!0x0;}static get[_0x4e4ec3(0xc0)](){return!0x0;}[_0x4e4ec3(0xba)](){const _0x20e05c=_0x4e4ec3,{editor:_0x48295d}=this;_0x48295d[_0x20e05c(0xbc)][_0x20e05c(0xc1)](_0x20e05c(0xaa),new _0x5d073a(_0x48295d)),_0x48295d[_0x20e05c(0xbc)][_0x20e05c(0xc1)](_0x20e05c(0xb6),new _0x3bc88a(_0x48295d));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x174816}from'ckeditor5/src/core.js';import{ButtonView as _0x530024}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0xb2cb68}from'ckeditor5/src/icons.js';import{createElement as _0x1c2788}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 _0x174816{['_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 _0x4a0793=this['editor'];_0x4a0793['ui']['componentFactory']['add']('uploadcareImageEdit',_0x4fb477=>{const _0x2e906c=_0x4a0793['commands']['get']('uploadcareImageEdit'),_0x63a14a=new _0x530024(_0x4fb477),t=_0x4fb477['t'];return _0x63a14a['set']({'icon':_0xb2cb68,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x63a14a['bind']('isEnabled')['to'](_0x2e906c),_0x63a14a['bind']('isOn')['to'](_0x2e906c,'isActive'),this['listenTo'](_0x63a14a,'execute',()=>{_0x4a0793['execute']('uploadcareImageEdit'),_0x4a0793['editing']['view']['focus']();}),_0x63a14a;}),this['_initConfig']();}['_initConfig'](){const _0x5c349a=_0x1c2788(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5c349a),this['listenTo'](this['editor'],'destroy',()=>{_0x5c349a['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
var _0x5ca781=_0x38cf;(function(_0x92297b,_0x4936c8){var _0x41a2be=_0x38cf,_0x2431ba=_0x92297b();while(!![]){try{var _0x25d462=parseInt(_0x41a2be(0x123))/0x1*(-parseInt(_0x41a2be(0x11c))/0x2)+parseInt(_0x41a2be(0x11f))/0x3+parseInt(_0x41a2be(0x115))/0x4*(parseInt(_0x41a2be(0x116))/0x5)+-parseInt(_0x41a2be(0x114))/0x6+parseInt(_0x41a2be(0x124))/0x7+-parseInt(_0x41a2be(0x119))/0x8+parseInt(_0x41a2be(0x121))/0x9;if(_0x25d462===_0x4936c8)break;else _0x2431ba['push'](_0x2431ba['shift']());}catch(_0x1c85ff){_0x2431ba['push'](_0x2431ba['shift']());}}}(_0xe666,0xdafd0));import{FocusTracker as _0x1d0d11}from'ckeditor5/src/utils.js';import{View as _0x32199c,FocusCycler as _0x4f181c}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0x32199c{[_0x5ca781(0x11b)];[_0x5ca781(0x11e)];constructor(_0x11d7fd){var _0x2b0484=_0x5ca781;super(_0x11d7fd),this[_0x2b0484(0x11b)]=new _0x1d0d11(),this[_0x2b0484(0x11e)]=new _0x4f181c({'focusables':this[_0x2b0484(0x11a)](),'focusTracker':this[_0x2b0484(0x11b)]});}[_0x5ca781(0x11d)](){var _0x1dad65=_0x5ca781;return{'tag':_0x1dad65(0x118),'attributes':{'aria-hidden':_0x1dad65(0x122),'tabindex':'0'},'on':{'focus':this[_0x1dad65(0x117)]['to'](()=>{var _0x43fc8c=_0x1dad65;this[_0x43fc8c(0x11e)][_0x43fc8c(0x113)](_0x43fc8c(0x120));})}};}}function _0x38cf(_0x4031e8,_0x5e0db5){var _0xe66661=_0xe666();return _0x38cf=function(_0x38cfc0,_0x21a5c9){_0x38cfc0=_0x38cfc0-0x113;var _0xb52ecd=_0xe66661[_0x38cfc0];return _0xb52ecd;},_0x38cf(_0x4031e8,_0x5e0db5);}function _0xe666(){var _0x33f090=['36454pxNxmr','getFocusableElement','focusCycler','2193270woChBf','forwardCycle','7827291NZsUIj','true','6BoChla','916734MobAub','fire','3099222wwLtPn','61604VPHxEd','305ibUDGd','bindTemplate','div','9186696IpbAxd','createCollection','focusTracker'];_0xe666=function(){return _0x33f090;};return _0xe666();}
|
package/src/utils/isancestor.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x4e16(){var _0x3a90c4=['212974vbzPcK','42PsAqww','3inPfQZ','3413768xBNOQw','8638420fnqUKs','includes','18HpCwWE','target','3616470xxMmxT','25960HywMIb','2675412MXshQM','362755DPxhzV'];_0x4e16=function(){return _0x3a90c4;};return _0x4e16();}(function(_0x1e38f6,_0x2cff78){var _0x1db7b8=_0x5f04,_0x689343=_0x1e38f6();while(!![]){try{var _0x56fb05=parseInt(_0x1db7b8(0x146))/0x1*(parseInt(_0x1db7b8(0x144))/0x2)+parseInt(_0x1db7b8(0x14e))/0x3+parseInt(_0x1db7b8(0x147))/0x4+parseInt(_0x1db7b8(0x143))/0x5*(-parseInt(_0x1db7b8(0x14a))/0x6)+parseInt(_0x1db7b8(0x145))/0x7*(-parseInt(_0x1db7b8(0x14d))/0x8)+-parseInt(_0x1db7b8(0x14c))/0x9+-parseInt(_0x1db7b8(0x148))/0xa;if(_0x56fb05===_0x2cff78)break;else _0x689343['push'](_0x689343['shift']());}catch(_0x2dabfe){_0x689343['push'](_0x689343['shift']());}}}(_0x4e16,0x892f8));import{getAncestors as _0x52120}from'ckeditor5/src/utils.js';function _0x5f04(_0x4d48ba,_0x35bad4){var _0x4e168e=_0x4e16();return _0x5f04=function(_0x5f048d,_0xdc2b92){_0x5f048d=_0x5f048d-0x143;var _0x374c1d=_0x4e168e[_0x5f048d];return _0x374c1d;},_0x5f04(_0x4d48ba,_0x35bad4);}export function isAncestor(_0x286d8c,_0x31968a){var _0x3260ab=_0x5f04;return _0x52120(_0x286d8c[_0x3260ab(0x14b)])[_0x3260ab(0x149)](_0x31968a);}
|
package/src/utils/uploadutils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
function _0x1f57(_0x305357,_0x32c793){var _0x3eb594=_0x3eb5();return _0x1f57=function(_0x1f5750,_0x42692f){_0x1f5750=_0x1f5750-0x114;var _0x43e08a=_0x3eb594[_0x1f5750];return _0x43e08a;},_0x1f57(_0x305357,_0x32c793);}var _0x398bcf=_0x1f57;(function(_0x2cc94d,_0x467ad3){var _0xda6e7e=_0x1f57,_0x157ae1=_0x2cc94d();while(!![]){try{var _0x4f614e=-parseInt(_0xda6e7e(0x117))/0x1*(parseInt(_0xda6e7e(0x11e))/0x2)+-parseInt(_0xda6e7e(0x119))/0x3+parseInt(_0xda6e7e(0x11d))/0x4*(-parseInt(_0xda6e7e(0x118))/0x5)+parseInt(_0xda6e7e(0x11a))/0x6+parseInt(_0xda6e7e(0x115))/0x7+-parseInt(_0xda6e7e(0x114))/0x8+parseInt(_0xda6e7e(0x11c))/0x9;if(_0x4f614e===_0x467ad3)break;else _0x157ae1['push'](_0x157ae1['shift']());}catch(_0x3deb7c){_0x157ae1['push'](_0x157ae1['shift']());}}}(_0x3eb5,0x5958d));function _0x3eb5(){var _0x1d3a35=['upload','5sByCtk','185AQqhcy','1851837Sjpzly','789708mFxYOw','getInfo','6718140zVZrsK','2836RpkeWt','141586fNYVVE','854992srOzNg','4145666ctSjts'];_0x3eb5=function(){return _0x1d3a35;};return _0x3eb5();}import{uploadFile as _0x5001ab,info as _0x3eed8c}from'@uploadcare/upload-client';export class UploadUtils{static[_0x398bcf(0x116)]({file:_0x374f4a,..._0x423475}){return _0x5001ab(_0x374f4a,_0x423475);}static[_0x398bcf(0x11b)](_0x5a8a0c,_0x31fcad){return _0x3eed8c(_0x5a8a0c,_0x31fcad);}}
|