@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20260105.0 → 0.0.0-nightly-20260106.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 _0x1e349d,ObservableMixin as _0x41b685}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x1c8430}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0xc3b6ec}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x2b3b40}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x6e1aa3}from'../../utils/uploadutils.js';import{getImageUrls as _0x2e7c57,getImageDimension as _0x4bd549}from'../../utils/editingutils.js';import{isAncestor as _0x520614}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x41b685(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x713b5d,_0x681c3d,_0x42dc03){super(),this['_editor']=_0x713b5d,this['_dialog']=_0x681c3d,this['_imageElement']=_0x42dc03,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 _0x5d27d6=this['_imageElement'],_0x27b758=_0x5d27d6['getAttribute']('uploadcareImageId'),_0xcd3960=_0x5d27d6['getAttribute']('src');if(_0x27b758)await this['_loadImageInfo'](_0x27b758,_0xcd3960);else{if(this['_imageCache']['has'](_0xcd3960)){const _0x409c66=this['_imageCache']['get'](_0xcd3960);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x409c66['url'],this['imageDimension']=_0x409c66['dimension'],this['imageId']=_0x409c66['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0xdf0667}=this['_editor'],t=_0xdf0667['t'],_0x213c83=new _0x2b3b40(_0xdf0667,this['imageStatus'],this['_attributes']);_0x213c83['bind']('status')['to'](this,'imageStatus'),_0x213c83['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x213c83['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x213c83['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x213c83,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0xc3b6ec,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x213c83,'position':_0x1c8430['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x213c83['focus']();},'onHide':()=>{_0x213c83['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x7e6411=>!_0x520614(_0x7e6411,_0x213c83['element'])}});}['_loadImageInfo'](_0x49b777,_0x50842c){return _0x6e1aa3['getInfo'](_0x49b777,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x34c68c=>{const {width:_0x187b3d,height:_0x242a3b}=_0x34c68c['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x50842c,this['imageDimension']={'width':_0x187b3d,'height':_0x242a3b},this['imageId']=_0x49b777;})['catch'](_0x38ff4e=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x38ff4e['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x417e86,_0x18e228){return this['_getImageAsFile'](_0x417e86)['then'](_0x1a91ff=>_0x6e1aa3['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':_0x18e228['signal'],'file':_0x1a91ff,'onProgress':_0x3efc48=>{_0x3efc48&&_0x3efc48['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3efc48['value']));}}))['then'](_0x530b4e=>{const {width:_0x19350f,height:_0x1485c7}=_0x530b4e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x530b4e['cdnUrl'],this['imageDimension']={'width':_0x19350f,'height':_0x1485c7},this['imageId']=_0x530b4e['uuid'],this['imageUploadProgress']=null;const _0x4a6049=_0x417e86['getAttribute']('src');this['_imageCache']['set'](_0x4a6049,{'id':_0x530b4e['uuid'],'url':_0x530b4e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x545936=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x545936['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x14db33,_0x494e4){_0x14db33['on']('apply',(_0x2b9497,_0xbc4403)=>{this['_replaceImage'](_0x494e4,_0xbc4403['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x14db33['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x14db33['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x306831,_0x89eaee,_0x375069){const _0x1aba88=this['_editor'],{width:_0xe05dd0,height:_0x3631dc}=_0x4bd549(_0x89eaee,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x53383f,imageSources:_0x554b04}=_0x2e7c57(_0x89eaee,_0xe05dd0);_0x1aba88['model']['change'](_0x21372f=>{if('$graveyard'===_0x306831['root']['rootName']){_0x1aba88['execute']('insertImage',{'imageType':_0x306831['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x306831['getAttributes']()),'uploadcareImageId':_0x375069,'src':_0x53383f,'sources':_0x554b04,'width':_0xe05dd0,'height':_0x3631dc}});const _0x316084=_0x306831['getChildren']();_0x306831=_0x1aba88['model']['document']['selection']['getSelectedElement']();for(const _0x43a325 of _0x316084)_0x21372f['append'](_0x21372f['cloneElement'](_0x43a325),_0x306831);}else _0x21372f['setSelection'](_0x306831,'on'),_0x1aba88['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x306831['getAttributes']()),'uploadcareImageId':_0x375069,'src':_0x53383f,'sources':_0x554b04,'width':_0xe05dd0,'height':_0x3631dc},_0x306831);_0x21372f['setSelection'](_0x306831,'on');});}async['_getImageAsFile'](_0x44cff3){const _0x1544ed=_0x1e349d['window'],_0x12233b=_0x1e349d['document']['location']['href'],_0x203380=new _0x1544ed['URL'](_0x44cff3['getAttribute']('src'),_0x12233b);if('data:'===_0x203380['protocol']){const _0x2db952=_0x203380['href']['split'](','),_0x341388=_0x2db952[0x0]['match'](/:(.*?);/)[0x1],_0x3e1314=_0x341388['split']('/')[0x1],_0x1a457a=_0x1544ed['atob'](_0x2db952[_0x2db952['length']-0x1]);let _0x39149b=_0x1a457a['length'];const _0x4e9704=new _0x1544ed['Uint8Array'](_0x39149b);for(;_0x39149b--;)_0x4e9704[_0x39149b]=_0x1a457a['charCodeAt'](_0x39149b);return new _0x1544ed['File']([_0x4e9704],'image.'+_0x3e1314,{'type':_0x341388});}const _0x106147=_0x203380['href']['split']('/'),_0x11dba1=_0x106147[_0x106147['length']-0x1],_0xeee9c6=_0x11dba1['split']('.')[0x1];return _0x1544ed['fetch'](_0x203380['href'])['then'](_0x3b4885=>_0x3b4885['clone']()['blob']())['then'](_0x9cb306=>new _0x1544ed['File']([_0x9cb306],_0x11dba1,{'type':'image/'+_0xeee9c6}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x1cf5(){const _0xe5abb7=['1176469nlKwgb','set','29372950ZPVpPQ','6746562JAKPIQ','image-edit','5856OBkvjA','1698FsuGbe','748293iIprgB','bindTemplate','2533704tuqrTS','setTemplate','uc-light','ck-uploadcare-theme','uc-cloud-image-editor','imageSrc','1710lHJzKi','88LGHLqJ','2090ECiBvq'];_0x1cf5=function(){return _0xe5abb7;};return _0x1cf5();}(function(_0x30736d,_0x387047){const _0x19b109=_0x2f63,_0x35435e=_0x30736d();while(!![]){try{const _0x3ab56f=-parseInt(_0x19b109(0x1a1))/0x1+-parseInt(_0x19b109(0x198))/0x2+-parseInt(_0x19b109(0x1a7))/0x3*(-parseInt(_0x19b109(0x1a6))/0x4)+parseInt(_0x19b109(0x1a0))/0x5*(-parseInt(_0x19b109(0x19e))/0x6)+parseInt(_0x19b109(0x1a8))/0x7*(-parseInt(_0x19b109(0x19f))/0x8)+parseInt(_0x19b109(0x1a4))/0x9+parseInt(_0x19b109(0x1a3))/0xa;if(_0x3ab56f===_0x387047)break;else _0x35435e['push'](_0x35435e['shift']());}catch(_0x40898f){_0x35435e['push'](_0x35435e['shift']());}}}(_0x1cf5,0xbdbed));function _0x2f63(_0x4aa6af,_0x3dd280){const _0x1cf573=_0x1cf5();return _0x2f63=function(_0x2f63cc,_0x43ce3f){_0x2f63cc=_0x2f63cc-0x197;let _0x3d86cd=_0x1cf573[_0x2f63cc];return _0x3d86cd;},_0x2f63(_0x4aa6af,_0x3dd280);}import{View as _0x23e0fb}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x23e0fb{constructor(_0x30c86f,_0x14238f){const _0x7ad74f=_0x2f63;super(_0x30c86f);const _0x52210b=this[_0x7ad74f(0x197)];this[_0x7ad74f(0x1a2)](_0x7ad74f(0x19d),''),this[_0x7ad74f(0x199)]({'tag':_0x7ad74f(0x19c),'attributes':{..._0x14238f,'class':[_0x7ad74f(0x19a),_0x7ad74f(0x19b)],'ctx-name':_0x7ad74f(0x1a5),'cdn-url':_0x52210b['to'](_0x7ad74f(0x19d))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x4a9558}from'ckeditor5/src/icons.js';import{ButtonView as _0x5732d3,IconView as _0x574e0f,View as _0x11813a}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x11813a{constructor(_0x3aa85c){super(_0x3aa85c);const t=_0x3aa85c['t'];this['set']('errorType',null);const _0x4f684f=new _0x5732d3(_0x3aa85c);_0x4f684f['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4f684f['withText']=!0x0,_0x4f684f['class']='ck-button-action',_0x4f684f['on']('execute',()=>{this['fire']('retry');}),_0x4f684f['bind']('isVisible')['to'](this,'errorType',_0x42e464=>'NotFound'!==_0x42e464);const _0x5b47fb=new _0x574e0f();_0x5b47fb['content']=_0x4a9558,_0x5b47fb['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3e86a4=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':[_0x5b47fb,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3e86a4['to']('errorType',_0x1f17e5=>t('NotFound'!==_0x1f17e5?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4f684f]},{'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 _0x4efc47,View as _0x11be69}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x11be69{constructor(_0x14b2b7){super(_0x14b2b7);const t=_0x14b2b7['t'],_0x41eb8b=this['bindTemplate'],_0x3581e6=new _0x4efc47();_0x3581e6['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':[_0x3581e6,{'text':_0x41eb8b['to']('imageUploadProgress',_0x451dcf=>t('Loading\x20image...')+'\x20('+(_0x451dcf||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 _0x19be(_0x8d118f,_0x3aa0a2){const _0x305c5a=_0x305c();return _0x19be=function(_0x19be5b,_0x5f3591){_0x19be5b=_0x19be5b-0xea;let _0x275359=_0x305c5a[_0x19be5b];return _0x275359;},_0x19be(_0x8d118f,_0x3aa0a2);}const _0x2e1f09=_0x19be;(function(_0x560fe8,_0x164f53){const _0x2cb0a2=_0x19be,_0x516854=_0x560fe8();while(!![]){try{const _0x440905=-parseInt(_0x2cb0a2(0x11c))/0x1+parseInt(_0x2cb0a2(0x121))/0x2+-parseInt(_0x2cb0a2(0x109))/0x3*(-parseInt(_0x2cb0a2(0xf2))/0x4)+-parseInt(_0x2cb0a2(0xea))/0x5*(parseInt(_0x2cb0a2(0xf1))/0x6)+-parseInt(_0x2cb0a2(0x111))/0x7+-parseInt(_0x2cb0a2(0xeb))/0x8*(-parseInt(_0x2cb0a2(0x112))/0x9)+parseInt(_0x2cb0a2(0x10f))/0xa*(parseInt(_0x2cb0a2(0xff))/0xb);if(_0x440905===_0x164f53)break;else _0x516854['push'](_0x516854['shift']());}catch(_0xd0a039){_0x516854['push'](_0x516854['shift']());}}}(_0x305c,0x5d8d7));import{View as _0x2be3bc}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0xec9bde}from'./uploadcareimageeditformloadingview.js';function _0x305c(){const _0xb581c5=['_focusableView','length','div','_loadingView','element','add','ck-uploadcare-form','184839KPUCub','_editingView','clear','addMany','uc-cloud-image-editor','observe','1750870PqpRiO','set','4238164UaXNSB','9iCahDq','_waitForImageEditorComponent','disconnect','addEventListener','apply','uploading','_setView','filter','_items','toLowerCase','552590qHVrYo','ck-reset_all-excluded','createCollection','ready','detail','375850HMgzme','13345bmMeYp','5364104TwgBaH','_errorView','_addErrorViewListeners','addedNodes','_addUploadcareImageEditorListeners','render','732uoQWlt','20foqvdZ','cdnUrl','focus','nodeName','fire','error','getFocusableElement','target','status','change:status','once','setTemplate','cancel','44xNcBww','querySelector','retry'];_0x305c=function(){return _0xb581c5;};return _0x305c();}import{UploadcareImageEditFormErrorView as _0x17528a}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x210ee6}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x2a0dd0}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x2a0dd0{[_0x2e1f09(0x11a)];[_0x2e1f09(0x105)];[_0x2e1f09(0xec)];[_0x2e1f09(0x10a)];[_0x2e1f09(0x102)];constructor(_0x3b2b4e,_0x26b1b6,_0x5dca9b){const _0x283d7e=_0x2e1f09;super(_0x3b2b4e),this[_0x283d7e(0x11a)]=this[_0x283d7e(0x11e)](),this[_0x283d7e(0x105)]=new _0xec9bde(_0x3b2b4e),this[_0x283d7e(0xec)]=new _0x17528a(_0x3b2b4e),this[_0x283d7e(0x10a)]=new _0x210ee6(_0x3b2b4e,_0x5dca9b),this[_0x283d7e(0x102)]=new _0x2be3bc(_0x3b2b4e),this[_0x283d7e(0x102)][_0x283d7e(0xfd)](this[_0x283d7e(0xf8)]()),this[_0x283d7e(0x110)](_0x283d7e(0xfa),_0x26b1b6),this[_0x283d7e(0xfd)]({'tag':_0x283d7e(0x104),'attributes':{'class':['ck',_0x283d7e(0x11d),_0x283d7e(0x108)],'tabindex':'-1'},'children':this[_0x283d7e(0x11a)]}),this[_0x283d7e(0x118)](),this[_0x283d7e(0xfc)](_0x283d7e(0xf0),()=>{const _0x4a9b55=_0x283d7e;this[_0x4a9b55(0x113)](this[_0x4a9b55(0x106)],_0x122483=>{const _0x135b3c=_0x4a9b55;this[_0x135b3c(0xef)](_0x122483);});}),this['on'](_0x283d7e(0xfb),()=>{const _0x3e6e16=_0x283d7e;this[_0x3e6e16(0x118)]();}),this[_0x283d7e(0xed)]();}[_0x2e1f09(0xf4)](){const _0x29b9af=_0x2e1f09;this[_0x29b9af(0x106)][_0x29b9af(0xf4)]();}[_0x2e1f09(0x118)](){const _0xe70f5a=_0x2e1f09;switch(this[_0xe70f5a(0x11a)][_0xe70f5a(0x10b)](),this[_0xe70f5a(0xfa)]){case _0xe70f5a(0x117):this[_0xe70f5a(0x11a)][_0xe70f5a(0x107)](this[_0xe70f5a(0x105)]);break;case _0xe70f5a(0xf7):this[_0xe70f5a(0x11a)][_0xe70f5a(0x107)](this[_0xe70f5a(0xec)]);break;case _0xe70f5a(0x11f):this[_0xe70f5a(0x11a)][_0xe70f5a(0x10c)]([this[_0xe70f5a(0x10a)],this[_0xe70f5a(0x102)]]);}}[_0x2e1f09(0x113)](_0xfbc20a,_0x1208fa){const _0x4a0793=_0x2e1f09,_0xfa8562=_0x4a0793(0x10d),_0x2375b0=_0xfbc20a[_0x4a0793(0x100)](_0xfa8562);if(_0x2375b0)return _0x1208fa(_0x2375b0);const _0x3950c9=new MutationObserver(_0x158f40=>{const _0x57b272=_0x4a0793,_0x131bcf=_0x158f40[_0x57b272(0x119)](_0x32dbe9=>_0x32dbe9[_0x57b272(0xf9)]===_0xfbc20a&&_0x32dbe9[_0x57b272(0xee)][_0x57b272(0x103)]>0x0&&_0x32dbe9[_0x57b272(0xee)][0x0][_0x57b272(0xf5)][_0x57b272(0x11b)]()===_0xfa8562);_0x131bcf[_0x57b272(0x103)]&&(_0x3950c9[_0x57b272(0x114)](),_0x1208fa(_0x131bcf[0x0][_0x57b272(0xee)][0x0]));});_0x3950c9[_0x4a0793(0x10e)](_0xfbc20a,{'childList':!0x0,'subtree':!0x0});}[_0x2e1f09(0xef)](_0x5ea8e1){const _0x5dd1e6=_0x2e1f09;_0x5ea8e1[_0x5dd1e6(0x115)](_0x5dd1e6(0x116),_0x224872=>{const _0x2b942d=_0x5dd1e6;this[_0x2b942d(0xf6)](_0x2b942d(0x116),{'imageSrc':_0x224872[_0x2b942d(0x120)][_0x2b942d(0xf3)]});}),_0x5ea8e1[_0x5dd1e6(0x115)](_0x5dd1e6(0xfe),()=>{const _0x3b1d26=_0x5dd1e6;this[_0x3b1d26(0xf6)](_0x3b1d26(0xfe));});}[_0x2e1f09(0xed)](){const _0x632dd1=_0x2e1f09;this[_0x632dd1(0xec)]['on'](_0x632dd1(0x101),()=>{const _0x4480b1=_0x632dd1;this[_0x4480b1(0xf6)](_0x4480b1(0x101));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3e7d7d=_0x448d;(function(_0x31b140,_0xb562a7){const _0x2f7daf=_0x448d,_0x1f9865=_0x31b140();while(!![]){try{const _0x4ea309=-parseInt(_0x2f7daf(0xca))/0x1+-parseInt(_0x2f7daf(0xc5))/0x2+parseInt(_0x2f7daf(0xd9))/0x3+-parseInt(_0x2f7daf(0xd6))/0x4+parseInt(_0x2f7daf(0xd3))/0x5+parseInt(_0x2f7daf(0xce))/0x6*(parseInt(_0x2f7daf(0xcd))/0x7)+-parseInt(_0x2f7daf(0xd1))/0x8*(parseInt(_0x2f7daf(0xcf))/0x9);if(_0x4ea309===_0xb562a7)break;else _0x1f9865['push'](_0x1f9865['shift']());}catch(_0x132797){_0x1f9865['push'](_0x1f9865['shift']());}}}(_0x25c5,0xd5c7d));function _0x448d(_0x55d682,_0x1e8fde){const _0x25c5a5=_0x25c5();return _0x448d=function(_0x448dbd,_0x4a669){_0x448dbd=_0x448dbd-0xbc;let _0x213d1a=_0x25c5a5[_0x448dbd];return _0x213d1a;},_0x448d(_0x55d682,_0x1e8fde);}import{Command as _0x408597}from'ckeditor5/src/core.js';function _0x25c5(){const _0x1067d9=['uploadcare.allowExternalImagesEditing','8521145FvYdAZ','requires','model','2130128cyDZfl','editor','imageInline','2030988DEdSpK','imageEditController','plugins','isEnabled','document','bind','config','set','refresh','unbind','isActive','2397608tucImh','get','selection','imageBlock','element','1112199AJXRem','getSelectedElement','execute','91AIiLzZ','728466WQirsD','2163492joFOZc','_isEditable','8vToAeY'];_0x25c5=function(){return _0x1067d9;};return _0x25c5();}import{Dialog as _0x55a095}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x31f80f}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x4637ca}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x408597{[_0x3e7d7d(0xda)];static get[_0x3e7d7d(0xd4)](){return[_0x55a095];}[_0x3e7d7d(0xd0)];constructor(_0x41cb52){const _0x339b35=_0x3e7d7d;super(_0x41cb52),this[_0x339b35(0xda)]=void 0x0,this[_0x339b35(0xd0)]=_0x4637ca(_0x41cb52[_0x339b35(0xc0)][_0x339b35(0xc6)](_0x339b35(0xd2))||[]),this[_0x339b35(0xc1)]({'isActive':!0x1});}[_0x3e7d7d(0xc2)](){const _0x50220e=_0x3e7d7d,_0x5e55d3=this[_0x50220e(0xd7)][_0x50220e(0xd5)][_0x50220e(0xbe)][_0x50220e(0xc7)][_0x50220e(0xcb)]();this[_0x50220e(0xbd)]=this[_0x50220e(0xd0)](_0x5e55d3);}[_0x3e7d7d(0xcc)](){const _0x16c93c=_0x3e7d7d;this[_0x16c93c(0xda)]&&(this[_0x16c93c(0xc3)](_0x16c93c(0xc4)),this[_0x16c93c(0xda)]=void 0x0);const _0x596caa=this[_0x16c93c(0xd7)][_0x16c93c(0xd5)][_0x16c93c(0xbe)][_0x16c93c(0xc7)][_0x16c93c(0xcb)]();_0x596caa&&(_0x596caa['is'](_0x16c93c(0xc9),_0x16c93c(0xc8))||_0x596caa['is'](_0x16c93c(0xc9),_0x16c93c(0xd8)))&&(this[_0x16c93c(0xda)]=new _0x31f80f(this[_0x16c93c(0xd7)],this[_0x16c93c(0xd7)][_0x16c93c(0xbc)][_0x16c93c(0xc6)](_0x55a095),_0x596caa),this[_0x16c93c(0xbf)](_0x16c93c(0xc4))['to'](this[_0x16c93c(0xda)],_0x16c93c(0xc4)));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
const _0x358dc3=_0x111a;function _0x111a(_0x40930a,_0x49d880){const _0x20d2ab=_0x20d2();return _0x111a=function(_0x111a92,_0x22a086){_0x111a92=_0x111a92-0x1cc;let _0x5e1217=_0x20d2ab[_0x111a92];return _0x5e1217;},_0x111a(_0x40930a,_0x49d880);}(function(_0xe50433,_0x36cda9){const _0x25d995=_0x111a,_0x39280b=_0xe50433();while(!![]){try{const _0x7e62bd=parseInt(_0x25d995(0x1d5))/0x1+parseInt(_0x25d995(0x1d6))/0x2+-parseInt(_0x25d995(0x1dc))/0x3+parseInt(_0x25d995(0x1d0))/0x4*(parseInt(_0x25d995(0x1d4))/0x5)+-parseInt(_0x25d995(0x1dd))/0x6+parseInt(_0x25d995(0x1cf))/0x7+parseInt(_0x25d995(0x1cd))/0x8*(-parseInt(_0x25d995(0x1e0))/0x9);if(_0x7e62bd===_0x36cda9)break;else _0x39280b['push'](_0x39280b['shift']());}catch(_0x3d3ff1){_0x39280b['push'](_0x39280b['shift']());}}}(_0x20d2,0x47235));function _0x20d2(){const _0x4fdaba=['commands','2638370nHKONb','700pwQPUH','uploadcareImageEdit','requires','isOfficialPlugin','8175xkTJvp','406785AkqGlt','791534XPpaMb','ImageEditing','ImageUtils','pluginName','add','UploadcareImageEditEditing','1591986NeLmFl','1979724TNndvt','init','isPremiumPlugin','470385GuxMeS','uploadcareImageReplace','48TejJWg'];_0x20d2=function(){return _0x4fdaba;};return _0x20d2();}import{Plugin as _0x3a1eb9}from'ckeditor5/src/core.js';import{Notification as _0xaa3ee5}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x2dedec}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x1bf763}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x2cbfe1}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x3a1eb9{static get[_0x358dc3(0x1d9)](){const _0x1e4a60=_0x358dc3;return _0x1e4a60(0x1db);}static get[_0x358dc3(0x1d2)](){const _0x3b00cb=_0x358dc3;return[_0x2cbfe1,_0xaa3ee5,_0x3b00cb(0x1d8),_0x3b00cb(0x1d7)];}static get[_0x358dc3(0x1d3)](){return!0x0;}static get[_0x358dc3(0x1df)](){return!0x0;}[_0x358dc3(0x1de)](){const _0x2b2a08=_0x358dc3,{editor:_0x3d4560}=this;_0x3d4560[_0x2b2a08(0x1ce)][_0x2b2a08(0x1da)](_0x2b2a08(0x1d1),new _0x2dedec(_0x3d4560)),_0x3d4560[_0x2b2a08(0x1ce)][_0x2b2a08(0x1da)](_0x2b2a08(0x1cc),new _0x1bf763(_0x3d4560));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x55c6c5}from'ckeditor5/src/core.js';import{ButtonView as _0x54e2a9}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x1184f5}from'ckeditor5/src/icons.js';import{createElement as _0x30766a}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 _0x55c6c5{['_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 _0x3d210b=this['editor'];_0x3d210b['ui']['componentFactory']['add']('uploadcareImageEdit',_0x19d271=>{const _0x5df5ef=_0x3d210b['commands']['get']('uploadcareImageEdit'),_0x4f5bb0=new _0x54e2a9(_0x19d271),t=_0x19d271['t'];return _0x4f5bb0['set']({'icon':_0x1184f5,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x4f5bb0['bind']('isEnabled')['to'](_0x5df5ef),_0x4f5bb0['bind']('isOn')['to'](_0x5df5ef,'isActive'),this['listenTo'](_0x4f5bb0,'execute',()=>{_0x3d210b['execute']('uploadcareImageEdit'),_0x3d210b['editing']['view']['focus']();}),_0x4f5bb0;}),this['_initConfig']();}['_initConfig'](){const _0x12d85e=_0x30766a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x12d85e),this['listenTo'](this['editor'],'destroy',()=>{_0x12d85e['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x1af836=_0x267a;(function(_0x34b6f0,_0x19aeea){var _0x386738=_0x267a,_0xd64517=_0x34b6f0();while(!![]){try{var _0x193230=parseInt(_0x386738(0x134))/0x1*(parseInt(_0x386738(0x136))/0x2)+parseInt(_0x386738(0x132))/0x3*(parseInt(_0x386738(0x13b))/0x4)+parseInt(_0x386738(0x130))/0x5*(-parseInt(_0x386738(0x135))/0x6)+-parseInt(_0x386738(0x13a))/0x7*(parseInt(_0x386738(0x13c))/0x8)+parseInt(_0x386738(0x140))/0x9+parseInt(_0x386738(0x144))/0xa*(-parseInt(_0x386738(0x139))/0xb)+-parseInt(_0x386738(0x133))/0xc*(-parseInt(_0x386738(0x142))/0xd);if(_0x193230===_0x19aeea)break;else _0xd64517['push'](_0xd64517['shift']());}catch(_0x3134c0){_0xd64517['push'](_0xd64517['shift']());}}}(_0x5291,0x92c16));function _0x267a(_0x194ae7,_0x515fbe){var _0x52916d=_0x5291();return _0x267a=function(_0x267a8e,_0x562bf8){_0x267a8e=_0x267a8e-0x130;var _0x34e0b0=_0x52916d[_0x267a8e];return _0x34e0b0;},_0x267a(_0x194ae7,_0x515fbe);}import{FocusTracker as _0x1b3906}from'ckeditor5/src/utils.js';function _0x5291(){var _0x3e389f=['4wBcgyy','848OLCzHh','fire','forwardCycle','div','3264039nVsrYo','getFocusableElement','2514707Lsxzqb','createCollection','730wxyOAY','true','117525DDBDPA','focusCycler','3096621EMaFHC','60cdENKC','308623xCAjpH','60ZAqOVD','2XaKkJh','focusTracker','bindTemplate','103246VVBSdA','75901gepwZA'];_0x5291=function(){return _0x3e389f;};return _0x5291();}import{View as _0x177391,FocusCycler as _0x2129e8}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0x177391{[_0x1af836(0x137)];[_0x1af836(0x131)];constructor(_0x1375b2){var _0x17a8b6=_0x1af836;super(_0x1375b2),this[_0x17a8b6(0x137)]=new _0x1b3906(),this[_0x17a8b6(0x131)]=new _0x2129e8({'focusables':this[_0x17a8b6(0x143)](),'focusTracker':this[_0x17a8b6(0x137)]});}[_0x1af836(0x141)](){var _0x48e919=_0x1af836;return{'tag':_0x48e919(0x13f),'attributes':{'aria-hidden':_0x48e919(0x145),'tabindex':'0'},'on':{'focus':this[_0x48e919(0x138)]['to'](()=>{var _0x1eceb5=_0x48e919;this[_0x1eceb5(0x131)][_0x1eceb5(0x13d)](_0x1eceb5(0x13e));})}};}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x333eac,_0x27339f){const _0x1baca1=_0x2786,_0x3b1e17=_0x333eac();while(!![]){try{const _0x47d42a=-parseInt(_0x1baca1(0x15d))/0x1+-parseInt(_0x1baca1(0x16c))/0x2*(parseInt(_0x1baca1(0x165))/0x3)+-parseInt(_0x1baca1(0x143))/0x4*(parseInt(_0x1baca1(0x16a))/0x5)+parseInt(_0x1baca1(0x162))/0x6+parseInt(_0x1baca1(0x16f))/0x7+parseInt(_0x1baca1(0x141))/0x8*(-parseInt(_0x1baca1(0x15e))/0x9)+parseInt(_0x1baca1(0x172))/0xa;if(_0x47d42a===_0x27339f)break;else _0x3b1e17['push'](_0x3b1e17['shift']());}catch(_0x4c23ed){_0x3b1e17['push'](_0x3b1e17['shift']());}}}(_0x39f8,0x66209));import{global as _0x279b8b,DomEmitterMixin as _0x5d2bdb}from'ckeditor5/src/utils.js';function _0x39f8(){const _0x389d87=['toViewElement','px)\x20100vw,\x20','editing','replace','ImageUtils','163138xOgtxF','23256YXyOMZ','filter','isArray','match','1427892xbUlGN','location','uploadcareImageId','3261aHaFXF','width','getAttribute','imageBlock','removeStyle','95druDhI','load','708snDrgO','join','removeClass','1524404rSgyuS','mapper','src','9120980eptjMH','map','window','image-processing','stopListening','document','/-/resize/','element','1120bpjGgC','view','8388NdVPgs','x/\x20','domConverter','viewToDom','imageInline','some','baseURI','image/webp','aspect-ratio','listenTo','height','setStyle','(max-width:\x20','change','origin','addClass','function','get','hasAttribute','plugins','findViewImgElement'];_0x39f8=function(){return _0x389d87;};return _0x39f8();}function _0x2786(_0x599f4f,_0xe8d52a){const _0x39f85e=_0x39f8();return _0x2786=function(_0x278615,_0x4b5d61){_0x278615=_0x278615-0x13f;let _0x4dbad2=_0x39f85e[_0x278615];return _0x4dbad2;},_0x2786(_0x599f4f,_0xe8d52a);}export function createEditabilityChecker(_0x3f642d){const _0x13bab3=_0x2786,_0x1f572b=R(_0x3f642d);return _0x1e2044=>!(!_0x1e2044||!_0x1e2044['is'](_0x13bab3(0x140),_0x13bab3(0x168))&&!_0x1e2044['is'](_0x13bab3(0x140),_0x13bab3(0x147)))&&(!!_0x1e2044[_0x13bab3(0x155)](_0x13bab3(0x164))||!!_0x1e2044[_0x13bab3(0x155)](_0x13bab3(0x171))&&_0x1f572b(_0x1e2044[_0x13bab3(0x167)](_0x13bab3(0x171))));}export function getImageUrls(_0x454acb,_0x3c6481){const _0x16ca5b=_0x2786,_0x4f88f7=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960][_0x16ca5b(0x15f)](_0x1f874e=>_0x1f874e<=_0x3c6481)[_0x16ca5b(0x173)](_0x5bc755=>_0x454acb[_0x16ca5b(0x15b)](/\/$/,'')+_0x16ca5b(0x13f)+_0x5bc755+_0x16ca5b(0x144)+_0x5bc755+'w');return{'imageFallbackUrl':_0x454acb,'imageSources':[{'srcset':_0x4f88f7[_0x16ca5b(0x16d)](',\x20'),'sizes':_0x16ca5b(0x14f)+_0x3c6481+_0x16ca5b(0x159)+_0x3c6481+'px','type':_0x16ca5b(0x14a)}]};}export function getImageDimension(_0x5486f4,_0x4e5b9b,_0x438f06){const _0x153a92=_0x2786,_0x515645=_0x5486f4[_0x153a92(0x161)](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x515645?parseInt(_0x515645[0x1],0xa):_0x4e5b9b,'height':_0x515645?parseInt(_0x515645[0x2],0xa):_0x438f06};}export function showImageProcessingIndicator(_0x1e6e1d,_0x1eaf0a){const _0x36fb50=_0x2786,_0x52cbb5=new(_0x5d2bdb())(),_0x5e332b=_0x1e6e1d[_0x36fb50(0x156)][_0x36fb50(0x154)](_0x36fb50(0x15c)),_0x2aeeb2=_0x1e6e1d[_0x36fb50(0x15a)][_0x36fb50(0x170)][_0x36fb50(0x158)](_0x1eaf0a),_0x2b4668=_0x5e332b[_0x36fb50(0x157)](_0x2aeeb2),_0x3a82b3=_0x1e6e1d[_0x36fb50(0x15a)][_0x36fb50(0x142)][_0x36fb50(0x145)][_0x36fb50(0x146)](_0x2b4668),_0x408d2c=_0x1eaf0a[_0x36fb50(0x167)](_0x36fb50(0x166)),_0x5a34cc=_0x1eaf0a[_0x36fb50(0x167)](_0x36fb50(0x14d)),_0x59e2a9=_0x36fb50(0x175);_0x1e6e1d[_0x36fb50(0x15a)][_0x36fb50(0x142)][_0x36fb50(0x150)](_0x3a9355=>{const _0x5efdf4=_0x36fb50;_0x3a9355[_0x5efdf4(0x152)](_0x59e2a9,_0x2aeeb2),_0x3a9355[_0x5efdf4(0x14e)](_0x5efdf4(0x14b),_0x408d2c+'/'+_0x5a34cc,_0x2b4668);}),_0x52cbb5[_0x36fb50(0x14c)](_0x3a82b3,_0x36fb50(0x16b),()=>{const _0x54395b=_0x36fb50;_0x52cbb5[_0x54395b(0x176)](_0x3a82b3,_0x54395b(0x16b)),_0x1e6e1d[_0x54395b(0x15a)][_0x54395b(0x142)][_0x54395b(0x150)](_0x2ec7d4=>{const _0x2b43a0=_0x54395b;_0x2ec7d4[_0x2b43a0(0x16e)](_0x59e2a9,_0x2aeeb2),_0x2ec7d4[_0x2b43a0(0x169)](_0x2b43a0(0x14b),_0x2b4668);});});}function R(_0x2335f5){const _0x5c7994=_0x2786;if(Array[_0x5c7994(0x160)](_0x2335f5)){const _0x363efc=_0x2335f5[_0x5c7994(0x173)](R);return _0x212269=>_0x363efc[_0x5c7994(0x148)](_0x4970f5=>_0x4970f5(_0x212269));}if(_0x5c7994(0x151)==_0x2335f5){const _0x9d8d0a=_0x279b8b[_0x5c7994(0x174)][_0x5c7994(0x163)][_0x5c7994(0x151)];return _0x28a191=>new URL(_0x28a191,_0x279b8b[_0x5c7994(0x177)][_0x5c7994(0x149)])[_0x5c7994(0x151)]==_0x9d8d0a;}return _0x5c7994(0x153)==typeof _0x2335f5?_0x2335f5:_0x2335f5 instanceof RegExp?_0x71488=>!(!_0x71488[_0x5c7994(0x161)](_0x2335f5)&&!_0x71488[_0x5c7994(0x15b)](/^https?:\/\//,'')[_0x5c7994(0x161)](_0x2335f5)):()=>!0x1;}
|