@ckeditor/ckeditor5-uploadcare 47.7.0-alpha.0 → 47.7.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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 _0x4cfe92,ObservableMixin as _0x2742f1}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x554c3a}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x341f9b}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x3b470d}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x7e97e0}from'../../utils/uploadutils.js';import{getImageUrls as _0x11778f,getImageDimension as _0x122584}from'../../utils/editingutils.js';import{isAncestor as _0x300faa}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2742f1(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1a58b0,_0x57c6ab,_0x541dce){super(),this['_editor']=_0x1a58b0,this['_dialog']=_0x57c6ab,this['_imageElement']=_0x541dce,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 _0x2cc436=this['_imageElement'],_0x45d381=_0x2cc436['getAttribute']('uploadcareImageId'),_0x254cc8=_0x2cc436['getAttribute']('src');if(_0x45d381)await this['_loadImageInfo'](_0x45d381,_0x254cc8);else{if(this['_imageCache']['has'](_0x254cc8)){const _0x3513e4=this['_imageCache']['get'](_0x254cc8);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3513e4['url'],this['imageDimension']=_0x3513e4['dimension'],this['imageId']=_0x3513e4['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x32cff4}=this['_editor'],t=_0x32cff4['t'],_0x3b91da=new _0x3b470d(_0x32cff4,this['imageStatus'],this['_attributes']);_0x3b91da['bind']('status')['to'](this,'imageStatus'),_0x3b91da['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3b91da['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3b91da['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3b91da,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x341f9b,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3b91da,'position':_0x554c3a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3b91da['focus']();},'onHide':()=>{_0x3b91da['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x469561=>!_0x300faa(_0x469561,_0x3b91da['element'])}});}['_loadImageInfo'](_0x4da98b,_0x462385){return _0x7e97e0['getInfo'](_0x4da98b,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x282622=>{const {width:_0x83d141,height:_0x52362e}=_0x282622['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x462385,this['imageDimension']={'width':_0x83d141,'height':_0x52362e},this['imageId']=_0x4da98b;})['catch'](_0x14d825=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x14d825['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x7ec51e,_0x58c541){return this['_getImageAsFile'](_0x7ec51e)['then'](_0x237a0c=>_0x7e97e0['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':_0x58c541['signal'],'file':_0x237a0c,'onProgress':_0x1efdd1=>{_0x1efdd1&&_0x1efdd1['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1efdd1['value']));}}))['then'](_0x46aa08=>{const {width:_0x59c4be,height:_0x23a7cd}=_0x46aa08['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x46aa08['cdnUrl'],this['imageDimension']={'width':_0x59c4be,'height':_0x23a7cd},this['imageId']=_0x46aa08['uuid'],this['imageUploadProgress']=null;const _0x3c840e=_0x7ec51e['getAttribute']('src');this['_imageCache']['set'](_0x3c840e,{'id':_0x46aa08['uuid'],'url':_0x46aa08['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2a742e=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2a742e['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3cfb0c,_0xb1f146){_0x3cfb0c['on']('apply',(_0x4d9073,_0x8c7203)=>{this['_replaceImage'](_0xb1f146,_0x8c7203['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3cfb0c['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3cfb0c['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x35b7f4,_0x22cbe5,_0x24c994){const _0x25c816=this['_editor'],{width:_0x50b17b,height:_0x3f270c}=_0x122584(_0x22cbe5,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4d8970,imageSources:_0x160752}=_0x11778f(_0x22cbe5,_0x50b17b);_0x25c816['model']['change'](_0x12a59a=>{if('$graveyard'===_0x35b7f4['root']['rootName']){_0x25c816['execute']('insertImage',{'imageType':_0x35b7f4['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x35b7f4['getAttributes']()),'uploadcareImageId':_0x24c994,'src':_0x4d8970,'sources':_0x160752,'width':_0x50b17b,'height':_0x3f270c}});const _0x95e4e0=_0x35b7f4['getChildren']();_0x35b7f4=_0x25c816['model']['document']['selection']['getSelectedElement']();for(const _0x24bda4 of _0x95e4e0)_0x12a59a['append'](_0x12a59a['cloneElement'](_0x24bda4),_0x35b7f4);}else _0x12a59a['setSelection'](_0x35b7f4,'on'),_0x25c816['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x35b7f4['getAttributes']()),'uploadcareImageId':_0x24c994,'src':_0x4d8970,'sources':_0x160752,'width':_0x50b17b,'height':_0x3f270c},_0x35b7f4);_0x12a59a['setSelection'](_0x35b7f4,'on');});}async['_getImageAsFile'](_0x5edc8b){const _0x10c677=_0x4cfe92['window'],_0x418c02=_0x4cfe92['document']['location']['href'],_0x54a1f9=new _0x10c677['URL'](_0x5edc8b['getAttribute']('src'),_0x418c02);if('data:'===_0x54a1f9['protocol']){const _0x1dc773=_0x54a1f9['href']['split'](','),_0x5a1c7d=_0x1dc773[0x0]['match'](/:(.*?);/)[0x1],_0x4785c3=_0x5a1c7d['split']('/')[0x1],_0x488c12=_0x10c677['atob'](_0x1dc773[_0x1dc773['length']-0x1]);let _0x43781a=_0x488c12['length'];const _0x1616ba=new _0x10c677['Uint8Array'](_0x43781a);for(;_0x43781a--;)_0x1616ba[_0x43781a]=_0x488c12['charCodeAt'](_0x43781a);return new _0x10c677['File']([_0x1616ba],'image.'+_0x4785c3,{'type':_0x5a1c7d});}const _0x29231b=_0x54a1f9['href']['split']('/'),_0x51cdae=_0x29231b[_0x29231b['length']-0x1],_0x1105f4=_0x51cdae['split']('.')[0x1];return _0x10c677['fetch'](_0x54a1f9['href'])['then'](_0x2e55e3=>_0x2e55e3['clone']()['blob']())['then'](_0x5b62ec=>new _0x10c677['File']([_0x5b62ec],_0x51cdae,{'type':'image/'+_0x1105f4}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x50b5d5,_0x579819){const _0x392682=_0x5d22,_0x1c7152=_0x50b5d5();while(!![]){try{const _0x2f825a=parseInt(_0x392682(0x91))/0x1+parseInt(_0x392682(0x94))/0x2+parseInt(_0x392682(0x8b))/0x3+-parseInt(_0x392682(0x86))/0x4+parseInt(_0x392682(0x87))/0x5*(-parseInt(_0x392682(0x8a))/0x6)+parseInt(_0x392682(0x93))/0x7+-parseInt(_0x392682(0x89))/0x8*(parseInt(_0x392682(0x85))/0x9);if(_0x2f825a===_0x579819)break;else _0x1c7152['push'](_0x1c7152['shift']());}catch(_0x1b6274){_0x1c7152['push'](_0x1c7152['shift']());}}}(_0x1ed6,0x82f0d));function _0x5d22(_0x1bbb72,_0x25ebf3){const _0x1ed645=_0x1ed6();return _0x5d22=function(_0x5d227c,_0x2aa0a9){_0x5d227c=_0x5d227c-0x85;let _0x2a3d89=_0x1ed645[_0x5d227c];return _0x2a3d89;},_0x5d22(_0x1bbb72,_0x25ebf3);}import{View as _0x5d691a}from'ckeditor5/src/ui.js';function _0x1ed6(){const _0x3bf126=['uc-cloud-image-editor','63auoiiM','1285700OyVJSc','1045iXaSdm','uc-light','433304bCYPwl','29322RGdIsE','3175968YZuTgJ','bindTemplate','setTemplate','set','ck-uploadcare-theme','image-edit','136043NnZRNh','imageSrc','456834AHZhQX','1996642MvhakQ'];_0x1ed6=function(){return _0x3bf126;};return _0x1ed6();}export class UploadcareImageEditFormEditingView extends _0x5d691a{constructor(_0x191e50,_0x18828a){const _0x51dbef=_0x5d22;super(_0x191e50);const _0x48dbad=this[_0x51dbef(0x8c)];this[_0x51dbef(0x8e)](_0x51dbef(0x92),''),this[_0x51dbef(0x8d)]({'tag':_0x51dbef(0x95),'attributes':{..._0x18828a,'class':[_0x51dbef(0x88),_0x51dbef(0x8f)],'ctx-name':_0x51dbef(0x90),'cdn-url':_0x48dbad['to'](_0x51dbef(0x92))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x295e58}from'ckeditor5/src/icons.js';import{ButtonView as _0x4b22d8,IconView as _0x475056,View as _0x213109}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x213109{constructor(_0x53e404){super(_0x53e404);const t=_0x53e404['t'];this['set']('errorType',null);const _0x54fc17=new _0x4b22d8(_0x53e404);_0x54fc17['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x54fc17['withText']=!0x0,_0x54fc17['class']='ck-button-action',_0x54fc17['on']('execute',()=>{this['fire']('retry');}),_0x54fc17['bind']('isVisible')['to'](this,'errorType',_0x3f9b33=>'NotFound'!==_0x3f9b33);const _0x5e9316=new _0x475056();_0x5e9316['content']=_0x295e58,_0x5e9316['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xce7fd9=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':[_0x5e9316,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xce7fd9['to']('errorType',_0x546b6f=>t('NotFound'!==_0x546b6f?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x54fc17]},{'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 _0x212da3,View as _0x329adc}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x329adc{constructor(_0x398bff){super(_0x398bff);const t=_0x398bff['t'],_0x279d07=this['bindTemplate'],_0x3eb1e1=new _0x212da3();_0x3eb1e1['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':[_0x3eb1e1,{'text':_0x279d07['to']('imageUploadProgress',_0x218a6b=>t('Loading\x20image...')+'\x20('+(_0x218a6b||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 _0x5ccca0=_0x4ac1;(function(_0x3d6c79,_0xc82c97){const _0xfb86e6=_0x4ac1,_0x3bb773=_0x3d6c79();while(!![]){try{const _0x5beebc=-parseInt(_0xfb86e6(0x123))/0x1+-parseInt(_0xfb86e6(0x151))/0x2*(-parseInt(_0xfb86e6(0x154))/0x3)+parseInt(_0xfb86e6(0x127))/0x4+parseInt(_0xfb86e6(0x153))/0x5+-parseInt(_0xfb86e6(0x143))/0x6*(-parseInt(_0xfb86e6(0x12c))/0x7)+parseInt(_0xfb86e6(0x14c))/0x8+-parseInt(_0xfb86e6(0x135))/0x9;if(_0x5beebc===_0xc82c97)break;else _0x3bb773['push'](_0x3bb773['shift']());}catch(_0x53939d){_0x3bb773['push'](_0x3bb773['shift']());}}}(_0xace6,0x24eef));import{View as _0xc9d36}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x11da43}from'./uploadcareimageeditformloadingview.js';function _0x4ac1(_0xe68a04,_0x183852){const _0xace6a4=_0xace6();return _0x4ac1=function(_0x4ac1b2,_0x2f61cf){_0x4ac1b2=_0x4ac1b2-0x123;let _0x168dd6=_0xace6a4[_0x4ac1b2];return _0x168dd6;},_0x4ac1(_0xe68a04,_0x183852);}import{UploadcareImageEditFormErrorView as _0x5e788d}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x4f62d8}from'./uploadcareimageeditformeditingview.js';function _0xace6(){const _0x965653=['length','_focusableView','_loadingView','_errorView','error','once','_addErrorViewListeners','element','5109309qQGlSd','querySelector','toLowerCase','createCollection','addEventListener','uc-cloud-image-editor','status','ready','cdnUrl','focus','retry','uploading','change:status','_waitForImageEditorComponent','18XcPgZW','nodeName','getFocusableElement','ck-uploadcare-form','set','_editingView','_items','detail','cancel','2264528FjTRSR','ck-reset_all-excluded','addedNodes','setTemplate','div','297442cecdDj','_setView','1113715cJfpMV','3YazuPB','clear','render','add','observe','149236BprAuh','_addUploadcareImageEditorListeners','apply','disconnect','712436TvMZPS','target','filter','addMany','fire','83013xgBLUk'];_0xace6=function(){return _0x965653;};return _0xace6();}import{DialogFocusManagerView as _0x3efe41}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x3efe41{[_0x5ccca0(0x149)];[_0x5ccca0(0x12f)];[_0x5ccca0(0x130)];[_0x5ccca0(0x148)];[_0x5ccca0(0x12e)];constructor(_0x3c8b75,_0x112ab0,_0x256c67){const _0x47064a=_0x5ccca0;super(_0x3c8b75),this[_0x47064a(0x149)]=this[_0x47064a(0x138)](),this[_0x47064a(0x12f)]=new _0x11da43(_0x3c8b75),this[_0x47064a(0x130)]=new _0x5e788d(_0x3c8b75),this[_0x47064a(0x148)]=new _0x4f62d8(_0x3c8b75,_0x256c67),this[_0x47064a(0x12e)]=new _0xc9d36(_0x3c8b75),this[_0x47064a(0x12e)][_0x47064a(0x14f)](this[_0x47064a(0x145)]()),this[_0x47064a(0x147)](_0x47064a(0x13b),_0x112ab0),this[_0x47064a(0x14f)]({'tag':_0x47064a(0x150),'attributes':{'class':['ck',_0x47064a(0x14d),_0x47064a(0x146)],'tabindex':'-1'},'children':this[_0x47064a(0x149)]}),this[_0x47064a(0x152)](),this[_0x47064a(0x132)](_0x47064a(0x156),()=>{const _0x50ee2c=_0x47064a;this[_0x50ee2c(0x142)](this[_0x50ee2c(0x134)],_0x13cb5a=>{const _0x51ef96=_0x50ee2c;this[_0x51ef96(0x124)](_0x13cb5a);});}),this['on'](_0x47064a(0x141),()=>{const _0x177683=_0x47064a;this[_0x177683(0x152)]();}),this[_0x47064a(0x133)]();}[_0x5ccca0(0x13e)](){const _0x228830=_0x5ccca0;this[_0x228830(0x134)][_0x228830(0x13e)]();}[_0x5ccca0(0x152)](){const _0x1867d3=_0x5ccca0;switch(this[_0x1867d3(0x149)][_0x1867d3(0x155)](),this[_0x1867d3(0x13b)]){case _0x1867d3(0x140):this[_0x1867d3(0x149)][_0x1867d3(0x157)](this[_0x1867d3(0x12f)]);break;case _0x1867d3(0x131):this[_0x1867d3(0x149)][_0x1867d3(0x157)](this[_0x1867d3(0x130)]);break;case _0x1867d3(0x13c):this[_0x1867d3(0x149)][_0x1867d3(0x12a)]([this[_0x1867d3(0x148)],this[_0x1867d3(0x12e)]]);}}[_0x5ccca0(0x142)](_0x50392a,_0xb878c2){const _0x4a4e6e=_0x5ccca0,_0xe64cc5=_0x4a4e6e(0x13a),_0xadf4d4=_0x50392a[_0x4a4e6e(0x136)](_0xe64cc5);if(_0xadf4d4)return _0xb878c2(_0xadf4d4);const _0x3c701f=new MutationObserver(_0x59027c=>{const _0x15a037=_0x4a4e6e,_0x1d43ba=_0x59027c[_0x15a037(0x129)](_0x162451=>_0x162451[_0x15a037(0x128)]===_0x50392a&&_0x162451[_0x15a037(0x14e)][_0x15a037(0x12d)]>0x0&&_0x162451[_0x15a037(0x14e)][0x0][_0x15a037(0x144)][_0x15a037(0x137)]()===_0xe64cc5);_0x1d43ba[_0x15a037(0x12d)]&&(_0x3c701f[_0x15a037(0x126)](),_0xb878c2(_0x1d43ba[0x0][_0x15a037(0x14e)][0x0]));});_0x3c701f[_0x4a4e6e(0x158)](_0x50392a,{'childList':!0x0,'subtree':!0x0});}[_0x5ccca0(0x124)](_0x338d1e){const _0x4c559c=_0x5ccca0;_0x338d1e[_0x4c559c(0x139)](_0x4c559c(0x125),_0x4fd464=>{const _0x61c229=_0x4c559c;this[_0x61c229(0x12b)](_0x61c229(0x125),{'imageSrc':_0x4fd464[_0x61c229(0x14a)][_0x61c229(0x13d)]});}),_0x338d1e[_0x4c559c(0x139)](_0x4c559c(0x14b),()=>{const _0x3ab7a7=_0x4c559c;this[_0x3ab7a7(0x12b)](_0x3ab7a7(0x14b));});}[_0x5ccca0(0x133)](){const _0x4ca6f7=_0x5ccca0;this[_0x4ca6f7(0x130)]['on'](_0x4ca6f7(0x13f),()=>{const _0x3f42a7=_0x4ca6f7;this[_0x3f42a7(0x12b)](_0x3f42a7(0x13f));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x3fe0(){const _0x125b1a=['config','execute','requires','selection','document','editor','plugins','isEnabled','getSelectedElement','63wpuGUn','set','get','137577kZHdQf','44EcJkcc','54LrbueK','element','bind','model','imageBlock','imageEditController','3695083oyOVKH','3127892eRpOxd','814064eTNsMZ','10TqqdaX','_isEditable','isActive','52080YvZIzK','refresh','4121UDRmHu','4147460yptRNT','18dClBok','unbind','uploadcare.allowExternalImagesEditing','1263540oLBzbC','imageInline'];_0x3fe0=function(){return _0x125b1a;};return _0x3fe0();}const _0x2ae16d=_0x4ad1;(function(_0x432390,_0x28e4e4){const _0x127a76=_0x4ad1,_0x507030=_0x432390();while(!![]){try{const _0x224166=-parseInt(_0x127a76(0x1b0))/0x1+parseInt(_0x127a76(0x1c0))/0x2*(parseInt(_0x127a76(0x1be))/0x3)+-parseInt(_0x127a76(0x1c7))/0x4*(parseInt(_0x127a76(0x1c9))/0x5)+parseInt(_0x127a76(0x1ad))/0x6*(parseInt(_0x127a76(0x1c6))/0x7)+-parseInt(_0x127a76(0x1c8))/0x8*(-parseInt(_0x127a76(0x1bb))/0x9)+parseInt(_0x127a76(0x1ac))/0xa*(parseInt(_0x127a76(0x1bf))/0xb)+-parseInt(_0x127a76(0x1a9))/0xc*(parseInt(_0x127a76(0x1ab))/0xd);if(_0x224166===_0x28e4e4)break;else _0x507030['push'](_0x507030['shift']());}catch(_0xb8d65d){_0x507030['push'](_0x507030['shift']());}}}(_0x3fe0,0xf1a80));function _0x4ad1(_0x4749fb,_0x55922d){const _0x3fe06f=_0x3fe0();return _0x4ad1=function(_0x4ad155,_0x4be1d8){_0x4ad155=_0x4ad155-0x1a9;let _0x683592=_0x3fe06f[_0x4ad155];return _0x683592;},_0x4ad1(_0x4749fb,_0x55922d);}import{Command as _0x495cb3}from'ckeditor5/src/core.js';import{Dialog as _0x1d2cf8}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x47d0cd}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x2fec37}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x495cb3{[_0x2ae16d(0x1c5)];static get[_0x2ae16d(0x1b4)](){return[_0x1d2cf8];}[_0x2ae16d(0x1ca)];constructor(_0x1ada92){const _0x4e327b=_0x2ae16d;super(_0x1ada92),this[_0x4e327b(0x1c5)]=void 0x0,this[_0x4e327b(0x1ca)]=_0x2fec37(_0x1ada92[_0x4e327b(0x1b2)][_0x4e327b(0x1bd)](_0x4e327b(0x1af))||[]),this[_0x4e327b(0x1bc)]({'isActive':!0x1});}[_0x2ae16d(0x1aa)](){const _0x59a0a1=_0x2ae16d,_0x1b309a=this[_0x59a0a1(0x1b7)][_0x59a0a1(0x1c3)][_0x59a0a1(0x1b6)][_0x59a0a1(0x1b5)][_0x59a0a1(0x1ba)]();this[_0x59a0a1(0x1b9)]=this[_0x59a0a1(0x1ca)](_0x1b309a);}[_0x2ae16d(0x1b3)](){const _0x2a94e8=_0x2ae16d;this[_0x2a94e8(0x1c5)]&&(this[_0x2a94e8(0x1ae)](_0x2a94e8(0x1cb)),this[_0x2a94e8(0x1c5)]=void 0x0);const _0x28bc21=this[_0x2a94e8(0x1b7)][_0x2a94e8(0x1c3)][_0x2a94e8(0x1b6)][_0x2a94e8(0x1b5)][_0x2a94e8(0x1ba)]();_0x28bc21&&(_0x28bc21['is'](_0x2a94e8(0x1c1),_0x2a94e8(0x1c4))||_0x28bc21['is'](_0x2a94e8(0x1c1),_0x2a94e8(0x1b1)))&&(this[_0x2a94e8(0x1c5)]=new _0x47d0cd(this[_0x2a94e8(0x1b7)],this[_0x2a94e8(0x1b7)][_0x2a94e8(0x1b8)][_0x2a94e8(0x1bd)](_0x1d2cf8),_0x28bc21),this[_0x2a94e8(0x1c2)](_0x2a94e8(0x1cb))['to'](this[_0x2a94e8(0x1c5)],_0x2a94e8(0x1cb)));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3a889e=_0x42be;(function(_0x3f9c2a,_0x50fe35){const _0xc21d04=_0x42be,_0x3ee430=_0x3f9c2a();while(!![]){try{const _0x1d3410=parseInt(_0xc21d04(0x1b4))/0x1+-parseInt(_0xc21d04(0x1b9))/0x2*(parseInt(_0xc21d04(0x1ba))/0x3)+-parseInt(_0xc21d04(0x1b2))/0x4+parseInt(_0xc21d04(0x1ac))/0x5*(parseInt(_0xc21d04(0x1a6))/0x6)+-parseInt(_0xc21d04(0x1ad))/0x7*(parseInt(_0xc21d04(0x1b1))/0x8)+parseInt(_0xc21d04(0x1b8))/0x9*(parseInt(_0xc21d04(0x1bc))/0xa)+parseInt(_0xc21d04(0x1a9))/0xb;if(_0x1d3410===_0x50fe35)break;else _0x3ee430['push'](_0x3ee430['shift']());}catch(_0x503e6c){_0x3ee430['push'](_0x3ee430['shift']());}}}(_0xf228,0xa14e5));function _0xf228(){const _0x345e79=['6470DDbOSK','915AwqXyv','uploadcareImageEdit','1390DmkNBn','132XzkAWz','ImageUtils','commands','30907052RffLxQ','pluginName','uploadcareImageReplace','122645QdXxdl','3529729GJIdat','isPremiumPlugin','init','requires','8uoFzka','5237720fJBMmz','UploadcareImageEditEditing','7719KDNcTF','add','ImageEditing','isOfficialPlugin','6732icNTpt'];_0xf228=function(){return _0x345e79;};return _0xf228();}import{Plugin as _0x3dba7b}from'ckeditor5/src/core.js';function _0x42be(_0x47d8de,_0x2b0031){const _0xf22840=_0xf228();return _0x42be=function(_0x42be4c,_0x28085c){_0x42be4c=_0x42be4c-0x1a6;let _0x36d28f=_0xf22840[_0x42be4c];return _0x36d28f;},_0x42be(_0x47d8de,_0x2b0031);}import{Notification as _0x53cb71}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x29071c}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x551444}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x59a7e7}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x3dba7b{static get[_0x3a889e(0x1aa)](){const _0x172c15=_0x3a889e;return _0x172c15(0x1b3);}static get[_0x3a889e(0x1b0)](){const _0xf7bab9=_0x3a889e;return[_0x59a7e7,_0x53cb71,_0xf7bab9(0x1a7),_0xf7bab9(0x1b6)];}static get[_0x3a889e(0x1b7)](){return!0x0;}static get[_0x3a889e(0x1ae)](){return!0x0;}[_0x3a889e(0x1af)](){const _0x34008d=_0x3a889e,{editor:_0x48da53}=this;_0x48da53[_0x34008d(0x1a8)][_0x34008d(0x1b5)](_0x34008d(0x1bb),new _0x29071c(_0x48da53)),_0x48da53[_0x34008d(0x1a8)][_0x34008d(0x1b5)](_0x34008d(0x1ab),new _0x551444(_0x48da53));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
function _0x20f2(_0x5868f9,_0x1e61ae){var _0x28e405=_0x28e4();return _0x20f2=function(_0x20f23e,_0x2940c7){_0x20f23e=_0x20f23e-0x66;var _0x2eaea2=_0x28e405[_0x20f23e];return _0x2eaea2;},_0x20f2(_0x5868f9,_0x1e61ae);}var _0x2f57e3=_0x20f2;function _0x28e4(){var _0xb3e7d9=['forwardCycle','getFocusableElement','bindTemplate','true','670500KIDSqE','11587989tYxQca','9361602EmIXUC','div','focusCycler','9016515PbiSic','2855344JCjNNI','focusTracker','1028694RcafgF','6eUddzw','fire','createCollection','29870240wvpcth'];_0x28e4=function(){return _0xb3e7d9;};return _0x28e4();}(function(_0x51637b,_0x17e2bf){var _0x132c10=_0x20f2,_0x54386b=_0x51637b();while(!![]){try{var _0x36c909=parseInt(_0x132c10(0x67))/0x1+parseInt(_0x132c10(0x6f))/0x2*(-parseInt(_0x132c10(0x70))/0x3)+-parseInt(_0x132c10(0x6d))/0x4+-parseInt(_0x132c10(0x6c))/0x5+-parseInt(_0x132c10(0x69))/0x6+parseInt(_0x132c10(0x68))/0x7+parseInt(_0x132c10(0x73))/0x8;if(_0x36c909===_0x17e2bf)break;else _0x54386b['push'](_0x54386b['shift']());}catch(_0xef9f3d){_0x54386b['push'](_0x54386b['shift']());}}}(_0x28e4,0xe8d07));import{FocusTracker as _0x1ed9d9}from'ckeditor5/src/utils.js';import{View as _0x4a6a09,FocusCycler as _0x2d7d6d}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0x4a6a09{[_0x2f57e3(0x6e)];[_0x2f57e3(0x6b)];constructor(_0x2c3e80){var _0x1c743d=_0x2f57e3;super(_0x2c3e80),this[_0x1c743d(0x6e)]=new _0x1ed9d9(),this[_0x1c743d(0x6b)]=new _0x2d7d6d({'focusables':this[_0x1c743d(0x72)](),'focusTracker':this[_0x1c743d(0x6e)]});}[_0x2f57e3(0x75)](){var _0x46a737=_0x2f57e3;return{'tag':_0x46a737(0x6a),'attributes':{'aria-hidden':_0x46a737(0x66),'tabindex':'0'},'on':{'focus':this[_0x46a737(0x76)]['to'](()=>{var _0xa38d6e=_0x46a737;this[_0xa38d6e(0x6b)][_0xa38d6e(0x71)](_0xa38d6e(0x74));})}};}}
|
package/src/utils/isancestor.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x221731,_0x5e7cb3){var _0x511610=_0x2625,_0x52370a=_0x221731();while(!![]){try{var _0x3eee6b=parseInt(_0x511610(0x1c4))/0x1*(-parseInt(_0x511610(0x1bb))/0x2)+-parseInt(_0x511610(0x1c3))/0x3+-parseInt(_0x511610(0x1c5))/0x4*(parseInt(_0x511610(0x1c2))/0x5)+-parseInt(_0x511610(0x1bd))/0x6+parseInt(_0x511610(0x1c0))/0x7+-parseInt(_0x511610(0x1c1))/0x8+parseInt(_0x511610(0x1bc))/0x9;if(_0x3eee6b===_0x5e7cb3)break;else _0x52370a['push'](_0x52370a['shift']());}catch(_0x55582d){_0x52370a['push'](_0x52370a['shift']());}}}(_0x3ef1,0xb201c));function _0x2625(_0x16fc1d,_0x59af78){var _0x3ef1c7=_0x3ef1();return _0x2625=function(_0x262540,_0x4aad52){_0x262540=_0x262540-0x1bb;var _0x56b92c=_0x3ef1c7[_0x262540];return _0x56b92c;},_0x2625(_0x16fc1d,_0x59af78);}import{getAncestors as _0x1b4241}from'ckeditor5/src/utils.js';export function isAncestor(_0x544d91,_0x4922b4){var _0x1c171f=_0x2625;return _0x1b4241(_0x544d91[_0x1c171f(0x1bf)])[_0x1c171f(0x1be)](_0x4922b4);}function _0x3ef1(){var _0x415a81=['14078hfDijK','8lDbxcq','172ZVDQJW','49916907jwjegl','7934892ewkeoG','includes','target','3505887PGRzKU','9348008rSPgXq','2280245puyMxT','2112777maAyvg'];_0x3ef1=function(){return _0x415a81;};return _0x3ef1();}
|
package/src/utils/uploadutils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
var _0x28c095=_0x29ea;(function(_0x435bc2,_0x154af2){var _0x36df29=_0x29ea,_0x3226c1=_0x435bc2();while(!![]){try{var _0x57d1ce=parseInt(_0x36df29(0x165))/0x1*(parseInt(_0x36df29(0x16c))/0x2)+parseInt(_0x36df29(0x16a))/0x3+parseInt(_0x36df29(0x169))/0x4*(-parseInt(_0x36df29(0x166))/0x5)+parseInt(_0x36df29(0x16d))/0x6*(parseInt(_0x36df29(0x16f))/0x7)+parseInt(_0x36df29(0x170))/0x8+parseInt(_0x36df29(0x168))/0x9+-parseInt(_0x36df29(0x167))/0xa*(parseInt(_0x36df29(0x171))/0xb);if(_0x57d1ce===_0x154af2)break;else _0x3226c1['push'](_0x3226c1['shift']());}catch(_0x2eab29){_0x3226c1['push'](_0x3226c1['shift']());}}}(_0x38e4,0x6a584));import{uploadFile as _0x5ca7ac,info as _0x38a144}from'@uploadcare/upload-client';function _0x29ea(_0x2a42e6,_0x3ac736){var _0x38e406=_0x38e4();return _0x29ea=function(_0x29eaf4,_0x3aa5bd){_0x29eaf4=_0x29eaf4-0x165;var _0x4ec16a=_0x38e406[_0x29eaf4];return _0x4ec16a;},_0x29ea(_0x2a42e6,_0x3ac736);}export class UploadUtils{static[_0x28c095(0x16b)]({file:_0x6f422b,..._0x34db8f}){return _0x5ca7ac(_0x6f422b,_0x34db8f);}static[_0x28c095(0x16e)](_0x529e00,_0x4754e2){return _0x38a144(_0x529e00,_0x4754e2);}}function _0x38e4(){var _0x57c87f=['1210JJBbUE','164450XPljsA','1359072Jszffd','9256lOiAqm','489546oIrBEn','upload','276IeBChJ','3257130uUHDSX','getInfo','7UrnCjR','5454512pWEKoA','583hsLBqf','2379cxZFap'];_0x38e4=function(){return _0x57c87f;};return _0x38e4();}
|