@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20250212.0 → 0.0.0-nightly-20250212.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/ckeditor5-metadata.json +1 -1
- package/dist/index.js +3 -3
- package/package.json +8 -9
- package/src/index.js +1 -1
- package/src/ui/uploadcarecontroller.d.ts +6 -2
- package/src/ui/uploadcarecontroller.js +2 -2
- package/src/ui/uploadcareformview.js +1 -1
- package/src/uploadcare.js +1 -1
- package/src/uploadcarecommand.js +1 -1
- package/src/uploadcareconfig.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.d.ts +4 -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/uploadcareimageedit/uploadcareimagereplacecommand.js +1 -1
- package/src/uploadcareimageedit.js +1 -1
- package/src/uploadcareui.js +1 -1
- package/src/uploadcareuploadadapter.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
- package/theme/icons/dropbox.svg +11 -0
- package/theme/icons/error.svg +1 -0
- package/theme/icons/facebook.svg +11 -0
- package/theme/icons/google-drive.svg +11 -0
- package/theme/icons/google-photos.svg +11 -0
- package/theme/icons/image-upload.svg +11 -0
- package/theme/icons/instagram.svg +11 -0
- package/theme/icons/link.svg +11 -0
- package/theme/icons/local.svg +11 -0
- package/theme/icons/onedrive.svg +11 -0
- package/theme/icons/uploadcare-image-edit.svg +11 -0
package/ckeditor5-metadata.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x2544ae,Command as _0x76a7f9}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2181f0,IconInstagram as _0x337e8c,IconGooglePhotos as _0x51fdc4,IconGoogleDrive as _0x3d7f87,IconFacebook as _0x4fbc52,IconDropbox as _0x104c24,IconUploadcareLink as _0xc13d9c,IconUploadcareImageUpload as _0x36b33b,IconError as et,IconUploadcareImageEdit as _0x3aa786}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x5b9268,MenuBarMenuListItemButtonView as _0x29028f,View as _0x334409,FocusCycler as _0xb392a6,Dialog as _0x3ffdfe,DialogViewPosition as _0xa4f76d,SpinnerView as _0x2da488,IconView as at,Notification as _0x3cbf33}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x27ca56,DomEmitterMixin as _0x53cc36,global as _0x4244d7,getAncestors as _0x118af3,ObservableMixin as _0x2e1d99,createElement as _0x4abd0f,uid as _0x1c0462}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2b96ce}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x30aec0,info as _0xaa2859}from'@uploadcare/upload-client';import*as _0x24dc53 from'@uploadcare/file-uploader';var o=function(_0x6309b7){return _0x6309b7['Local']='local',_0x6309b7['URL']='url',_0x6309b7['Dropbox']='dropbox',_0x6309b7['GDrive']='gdrive',_0x6309b7['Facebook']='facebook',_0x6309b7['GPhotos']='gphotos',_0x6309b7['Instagram']='instagram',_0x6309b7['OneDrive']='onedrive',_0x6309b7;}({});function x(_0x2b0b5e,_0x46418c,_0x5f148a){const t=_0x2b0b5e['t'],_0x560d64=_0x2b0b5e['t'];switch(_0x46418c){case o['Local']:return{'text':_0x560d64('Insert'===_0x5f148a?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x560d64('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x5f148a?_0x560d64('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x560d64('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['Instagram']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Instagram':'Replace\x20with\x20Instagram'),'shortText':t('With\x20Instagram')};case o['OneDrive']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x46418c;}}class e extends _0x2544ae{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'UploadcareUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3cf6e8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x23e365;for(const _0x582fcb in _0x3cf6e8){const _0x17d57a=_0x582fcb,_0x15d7d1=_0x3cf6e8[_0x17d57a];if('uploadcareLicenseKeyValid'==_0x15d7d1||'uploadcareLicenseKeyInvalid'==_0x15d7d1||'uploadcareLicenseKeyExpired'==_0x15d7d1||'uploadcareLicenseKeyDomainLimit'==_0x15d7d1||'uploadcareLicenseKeyNotAllowed'==_0x15d7d1||'uploadcareLicenseKeyEvaluationLimit'==_0x15d7d1||'uploadcareLicenseKeyTrialLimit'==_0x15d7d1||'uploadcareLicenseKeyUsageLimit'==_0x15d7d1){delete _0x3cf6e8[_0x17d57a],_0x23e365=_0x15d7d1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x23e365&&_0x3cf6e8['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x23e365&&_0x3cf6e8['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x23e365&&_0x3cf6e8['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x23e365&&_0x3cf6e8['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x23e365&&_0x3cf6e8['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x23e365&&_0x3cf6e8['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x23e365&&_0x3cf6e8['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x4cd75c}=this,_0x399e29=_0x4cd75c['commands']['get']('uploadcare');if(!_0x399e29)return;const _0x37c338=this['_normalizeConfigSourceList'](_0x4cd75c['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4954b6,_0x1a184a)=>{const _0x1d3e73=this['_getIntegrationKey'](_0x1a184a['type']);return _0x4954b6[_0x1d3e73]||(_0x4954b6[_0x1d3e73]=[]),_0x4954b6[_0x1d3e73]['push'](_0x1a184a),_0x4954b6;},{});_0x4cd75c['plugins']['has']('ImageInsertUI')&&_0x4cd75c['commands']['get']('uploadcare')&&Object['entries'](_0x37c338)['forEach'](([_0xe2ddd3,_0x4f0475])=>{_0x4cd75c['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0xe2ddd3,'observable':()=>_0x399e29,'buttonViewCreator':()=>this['_createToolbarButton'](_0x4f0475),'formViewCreator':()=>this['_createDropdownButtons'](_0x4f0475),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x4f0475),'override':'assetManager'!==_0xe2ddd3});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x5ef0ce){const {locale:_0xd300e6}=this['editor'];return _0x5ef0ce['map'](_0x2554fc=>{const _0x424dc4=x(_0xd300e6,_0x2554fc,'Insert');switch(_0x2554fc){case o['Local']:return{'icon':_0x36b33b,'type':o['Local'],..._0x424dc4};case o['URL']:return{'icon':_0xc13d9c,'type':o['URL'],..._0x424dc4};case o['Dropbox']:return{'icon':_0x104c24,'type':o['Dropbox'],..._0x424dc4};case o['Facebook']:return{'icon':_0x4fbc52,'type':o['Facebook'],..._0x424dc4};case o['GDrive']:return{'icon':_0x3d7f87,'type':o['GDrive'],..._0x424dc4};case o['GPhotos']:return{'icon':_0x51fdc4,'type':o['GPhotos'],..._0x424dc4};case o['Instagram']:return{'icon':_0x337e8c,'type':o['Instagram'],..._0x424dc4};case o['OneDrive']:return{'icon':_0x2181f0,'type':o['OneDrive'],..._0x424dc4};}});}['_getIntegrationKey'](_0x49be89){switch(_0x49be89){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x1c9761,_0x3ed193){const _0x2a40eb=this['editor'],_0x1d6ba2=new _0x1c9761(_0x2a40eb['locale']),_0x29a519=_0x2a40eb['commands']['get']('uploadcare');return _0x1d6ba2['bind']('isEnabled')['to'](_0x29a519),_0x1d6ba2['on']('execute',()=>{_0x29a519['execute'](_0x3ed193);}),_0x1d6ba2;}['_createToolbarButton'](_0x425495){const {locale:_0x13661b}=this['editor'],_0x58992a=this['editor']['plugins']['get']('ImageInsertUI'),_0x20f9ae=_0x425495[0x0],_0x246f2d=this['_createButton'](_0x5b9268,_0x20f9ae['type']);return _0x246f2d['icon']=_0x20f9ae['icon'],_0x246f2d['bind']('label')['to'](_0x58992a,'isImageSelected',_0x5d7fd2=>x(_0x13661b,_0x20f9ae['type'],_0x5d7fd2?'Replace':'Insert')['text']),_0x246f2d['tooltip']=!0x0,_0x246f2d;}['_createDropdownButtons'](_0x2fcdcb){const {locale:_0x403f65}=this['editor'],_0xc57703=this['editor']['plugins']['get']('ImageInsertUI');return _0x2fcdcb['map'](_0x1a34f3=>{const _0x4a68c9=this['_createButton'](_0x5b9268,_0x1a34f3['type']);return _0x4a68c9['withText']=!0x0,_0x4a68c9['icon']=_0x1a34f3['icon'],_0x4a68c9['bind']('label')['to'](_0xc57703,'isImageSelected',_0x5b7273=>x(_0x403f65,_0x1a34f3['type'],_0x5b7273?'Replace':'Insert')['text']),_0x4a68c9;});}['_createMenuBarButtons'](_0x3d705a){return _0x3d705a['map'](_0x31f490=>{const _0x4d7be6=this['_createButton'](_0x29028f,_0x31f490['type']);return _0x4d7be6['icon']=_0x31f490['icon'],_0x4d7be6['label']=_0x31f490['shortText'],_0x4d7be6;});}}class q extends _0x334409{['focusTracker'];['focusCycler'];constructor(_0x525673){super(_0x525673),this['focusTracker']=new _0x27ca56(),this['focusCycler']=new _0xb392a6({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class S extends q{constructor(_0x48e1a7){super(_0x48e1a7),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x55701a,_0x4140e3){const _0x4886e7=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x16afc2=>_0x16afc2<=_0x4140e3)['map'](_0x354460=>_0x55701a['replace'](/\/$/,'')+'/-/resize/'+_0x354460+'x/\x20'+_0x354460+'w');return{'imageFallbackUrl':_0x55701a,'imageSources':[{'srcset':_0x4886e7['join'](',\x20'),'sizes':'(max-width:\x20'+_0x4140e3+'px)\x20100vw,\x20'+_0x4140e3+'px','type':'image/webp'}]};}function F(_0x19a3ac,_0xa0ecb5,_0x230f8b){const _0xf7bb2d=_0x19a3ac['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0xf7bb2d?parseInt(_0xf7bb2d[0x1],0xa):_0xa0ecb5,'height':_0xf7bb2d?parseInt(_0xf7bb2d[0x2],0xa):_0x230f8b};}function m(_0x45a123,_0x48d31d){const _0x25763b=Object['create'](_0x53cc36),_0x56b0d9=_0x45a123['plugins']['get']('ImageUtils'),_0x59f774=_0x45a123['editing']['mapper']['toViewElement'](_0x48d31d),_0x506319=_0x56b0d9['findViewImgElement'](_0x59f774),_0x2a2443=_0x45a123['editing']['view']['domConverter']['viewToDom'](_0x506319),_0x49c395=_0x48d31d['getAttribute']('width'),_0x1c45b5=_0x48d31d['getAttribute']('height'),_0x5bf03f='image-processing';_0x45a123['editing']['view']['change'](_0x4146c6=>{_0x4146c6['addClass'](_0x5bf03f,_0x59f774),_0x4146c6['setStyle']('aspect-ratio',_0x49c395+'/'+_0x1c45b5,_0x506319);}),_0x25763b['listenTo'](_0x2a2443,'load',()=>{_0x25763b['stopListening'](_0x2a2443,'load'),_0x45a123['editing']['view']['change'](_0x40a63c=>{_0x40a63c['removeClass'](_0x5bf03f,_0x59f774),_0x40a63c['removeStyle']('aspect-ratio',_0x506319);});});}function W(_0x564059){if(Array['isArray'](_0x564059)){const _0x41a5cf=_0x564059['map'](W);return _0x4de4d7=>_0x41a5cf['some'](_0x4f78f6=>_0x4f78f6(_0x4de4d7));}if('origin'==_0x564059){const _0x613e3a=_0x4244d7['window']['location']['origin'];return _0x526bb0=>new URL(_0x526bb0,_0x4244d7['document']['baseURI'])['origin']==_0x613e3a;}return'function'==typeof _0x564059?_0x564059:_0x564059 instanceof RegExp?_0x4667ee=>!(!_0x4667ee['match'](_0x564059)&&!_0x4667ee['replace'](/^https?:\/\//,'')['match'](_0x564059)):()=>!0x1;}function M(_0x13398c,_0x1e688c){return _0x118af3(_0x13398c['target'])['includes'](_0x1e688c);}class l extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x2e1d99(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x49a67f,_0x555ab2,_0x2fa2bb){super(),this['_editor']=_0x49a67f,this['_editing']=_0x555ab2,this['_dialog']=_0x49a67f['plugins']['get'](_0x3ffdfe),this['_api']=_0x555ab2['ctxElement']['getAPI'](),this['_type']=_0x2fa2bb,this['_editing']['configElement']['setAttribute']('source-list',this['_type']),this['_initDialog'](),this['_initListeners'](),this['_api']['initFlow']();}['destroy'](){this['_formView']&&(this['_formView']['destroy'](),this['_formView']=null),this['_api']&&this['_api']['doneFlow'](),this['stopListening'](),this['stopDelegating']();}['_initDialog'](){const {locale:_0x1af5c0,model:_0x26c6a8}=this['_editor'],_0x3e8977=_0x26c6a8['document']['selection']['getSelectedElement'](),_0x3eb479=_0x3e8977&&(_0x3e8977['is']('element','imageBlock')||_0x3e8977['is']('element','imageInline'));this['_formView']=new S(_0x1af5c0),this['_dialog']['show']({'id':'uploadCare','icon':_0x36b33b,'title':x(_0x1af5c0,this['_type'],_0x3eb479?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xa4f76d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x253002=>!M(_0x253002,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x28823a}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x5ef37a=>{const _0x560d27=_0x28823a['length'];for(const _0x1f1d25 of _0x28823a){const _0x1b3669=_0x1f1d25===_0x28823a[_0x560d27-0x1],{cdnUrl:_0x1b4458,fileInfo:_0x51e81c}=_0x1f1d25;if(!_0x1b4458||!_0x51e81c)continue;const {width:_0x4a99a0,height:_0x482364}=_0x51e81c['imageInfo'],_0x561ecc=F(_0x1b4458,_0x4a99a0,_0x482364),_0x4b9830=E(_0x1b4458,_0x561ecc['width']),_0x84b678={'id':_0x51e81c['uuid'],'type':'image','attributes':{'imageDimension':_0x561ecc,..._0x4b9830}};this['_insertAsset'](_0x84b678,_0x1b3669,_0x5ef37a);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x433fd6=>{'idle'===_0x433fd6['detail']['status']&&!_0x433fd6['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x3b8308,_0x21c6e7,_0x4c7cca){const _0x26dd73=this['_editor']['model']['document']['selection'],_0x54e57f=_0x26dd73['getSelectedElement'](),_0x463e31=!(!_0x54e57f||!_0x54e57f['is']('element','imageInline'));_0x4c7cca['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x3b8308,_0x463e31),_0x21c6e7||_0x4c7cca['setSelection'](_0x26dd73['getLastPosition']());}['_insertImage'](_0x5072bb,_0x59bb8c){const _0xca5541=this['_editor'],{imageDimension:_0x2de129,imageFallbackUrl:_0x1309fb,imageSources:_0x2e5cfe}=_0x5072bb['attributes'];_0xca5541['execute']('insertImage',{'imageType':_0x59bb8c?'imageInline':null,'source':{'uploadcareImageId':_0x5072bb['id'],'src':_0x1309fb,'sources':_0x2e5cfe,..._0x2de129}});}}class n extends _0x76a7f9{['_editing'];['_controller']=null;static get['requires'](){return[_0x3ffdfe,i];}constructor(_0x58deaf){super(_0x58deaf),this['_editing']=_0x58deaf['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2bc388){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x2bc388);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x36a75a,publicKey:_0x1b9088,signal:_0xeaa74a,onProgress:_0x28c503}){return _0x30aec0(_0x36a75a,{'publicKey':_0x1b9088,'store':'auto','signal':_0xeaa74a,'onProgress':_0x28c503});}static['getInfo'](_0x46bf1f,_0x193151){return _0xaa2859(_0x46bf1f,_0x193151);}}class p extends _0x2544ae{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2b96ce,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2fe6d7=this['editor'];if(!!!_0x2fe6d7['config']['get']('uploadcare'))return;_0x2fe6d7['plugins']['get'](_0x2b96ce)['createUploadAdapter']=_0x2f303b=>new A(_0x2f303b,_0x2fe6d7),_0x2fe6d7['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4974ba,{imageElement:_0x49a15e,data:_0x1319ad})=>{_0x2fe6d7['model']['change'](_0x3058ba=>{_0x3058ba['setAttribute']('uploadcareImageId',_0x1319ad['uploadcareImageId'],_0x49a15e);});});}}class A{['loader'];['editor'];['controller'];constructor(_0xfaeb3e,_0x489e68){this['loader']=_0xfaeb3e,this['editor']=_0x489e68,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1bd360=this['editor']['config']['get']('uploadcare.pubkey'),_0x332c41=await this['loader']['file'];return C['upload']({'file':_0x332c41,'publicKey':_0x1bd360,'signal':this['controller']['signal'],'onProgress':_0x541eff=>{_0x541eff&&_0x541eff['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x541eff['value']);}})['then'](async _0x3b02d2=>{const {imageFallbackUrl:_0x1f7483,imageSources:_0x494421}=E(_0x3b02d2['cdnUrl'],_0x3b02d2['imageInfo']['width']);return{'uploadcareImageId':_0x3b02d2['uuid'],'default':_0x1f7483,'sources':_0x494421};})['catch'](()=>{const _0x1c6d40=t('Cannot\x20upload\x20file:')+('\x20'+_0x332c41['name']+'.');return Promise['reject'](_0x1c6d40);});}['abort'](){this['controller']['abort']();}}class i extends _0x2544ae{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x3ffdfe];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x436737=this['editor'];_0x436737['commands']['add']('uploadcare',new n(_0x436737));}['afterInit'](){this['_initSchema'](),this['_initConversion'](),this['_initConfig'](),this['_initCtx'](),this['_initImageProcessingIndicator'](),this['listenTo'](this['editor'],'destroy',()=>{this['_configElement']&&(this['_configElement']['remove'](),this['_configElement']=null),this['_ctxElement']&&(this['_ctxElement']['remove'](),this['_ctxElement']=null);const _0x244643=_0x4244d7['document']['querySelector']('input[uploadcare-file-input]');_0x244643&&_0x244643['remove']();}),async function(_0x4ae13d){const _0x2e868a=_0x4e8bb6([0x51,0x47,0x38,0x57,0x4f,0x46,0x6e,0x36,0x77,0x7a,0x56,0x55,0x6d,0x42,0x48,0x70,0x75,0x6f,0x41,0x44,0x76,0x37,0x67,0x4d,0x73,0x64,0x63,0x4a,0x4b,0x61,0x49,0x58,0x5a,0x39,0x50,0x71,0x68,0x69,0x74,0x6a,0x6c,0x45,0x32,0x78,0x65,0x35,0x4c,0x52,0x54,0x72,0x33,0x66,0x59,0x6b,0x30,0x43,0x79,0x4e,0x34,0x53,0x31,0x62]),_0x3b2c18=0x114ca2e9,_0x27cbe6=0x114bfda1^_0x3b2c18,_0x8ca4df=window[_0x4e8bb6([0x44,0x61,0x74,0x65])][_0x4e8bb6([0x6e,0x6f,0x77])](),_0x2849b5=_0x4ae13d[_0x4e8bb6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2a706f=new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x359500=>{_0x2849b5[_0x4e8bb6([0x6f,0x6e,0x63,0x65])](_0x4e8bb6([0x72,0x65,0x61,0x64,0x79]),_0x359500);}),_0x1d3c7f={[_0x4e8bb6([0x6b,0x74,0x79])]:_0x4e8bb6([0x45,0x43]),[_0x4e8bb6([0x75,0x73,0x65])]:_0x4e8bb6([0x73,0x69,0x67]),[_0x4e8bb6([0x63,0x72,0x76])]:_0x4e8bb6([0x50,0x2d,0x32,0x35,0x36]),[_0x4e8bb6([0x78])]:_0x4e8bb6([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x4e8bb6([0x79])]:_0x4e8bb6([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x4e8bb6([0x61,0x6c,0x67])]:_0x4e8bb6([0x45,0x53,0x32,0x35,0x36])},_0x877605=_0x2849b5[_0x4e8bb6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4e8bb6([0x67,0x65,0x74])](_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x437ce3(){let _0x2111f5,_0x43771a=null,_0x28088d=null;try{if(_0x877605==_0x4e8bb6([0x47,0x50,0x4c]))return _0x4e8bb6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2111f5=_0x218b03(),!_0x2111f5)return _0x4e8bb6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2111f5[_0x4e8bb6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x28088d=_0x523ff1(_0x2111f5[_0x4e8bb6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2111f5[_0x4e8bb6([0x6a,0x74,0x69])])),await _0x237a79()?_0x573472()?_0xda51cd()?_0x4e8bb6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x332f2a()?(_0x2111f5[_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4e8bb6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x43771a=_0x52e72c(_0x4e8bb6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2111f5[_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4e8bb6([0x74,0x72,0x69,0x61,0x6c])&&(_0x43771a=_0x52e72c(_0x4e8bb6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x284f20()):_0x4e8bb6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4e8bb6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4e8bb6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x2f1ec7){return _0x4e8bb6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xda51cd(){const _0x3fe0c1=[_0x4e8bb6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4e8bb6([0x74,0x72,0x69,0x61,0x6c])][_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2111f5[_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x8ca4df/0x3e8:0xe10*_0x27cbe6;return _0x2111f5[_0x4e8bb6([0x65,0x78,0x70])]<_0x3fe0c1;}function _0x573472(){const _0x58c71b=_0x2111f5[_0x4e8bb6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x58c71b&&(!!_0x58c71b[_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e8bb6([0x2a]))||!!_0x58c71b[_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e8bb6([0x55,0x50,0x4c,0x43])));}function _0x332f2a(){const _0xebe6c7=_0x2111f5[_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xebe6c7||0x0==_0xebe6c7[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3bd67a}=new URL(window[_0x4e8bb6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xebe6c7[_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bd67a))return!0x0;const _0x50fb24=_0x3bd67a[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])](_0x4e8bb6([0x2e]));return _0xebe6c7[_0x4e8bb6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x146308=>_0x146308[_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e8bb6([0x2a])))[_0x4e8bb6([0x6d,0x61,0x70])](_0x174cdc=>_0x174cdc[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])](_0x4e8bb6([0x2e])))[_0x4e8bb6([0x73,0x6f,0x6d,0x65])](_0x4fa583=>_0x50fb24[_0x4e8bb6([0x65,0x76,0x65,0x72,0x79])]((_0x26f690,_0x470da4)=>_0x4fa583[_0x470da4]===_0x26f690||_0x4fa583[_0x470da4]===_0x4e8bb6([0x2a])));}function _0x284f20(){return _0x43771a&&_0x28088d?new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2488f6,_0x43a18f)=>{_0x43771a[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x2488f6,_0x43a18f),_0x28088d[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x47deae=>{_0x47deae!=_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64])&&_0x2488f6(_0x47deae);},_0x43a18f);}):_0x43771a||_0x28088d||_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x523ff1(_0x434b79,_0x16e7e7){return new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d587d=>{if(_0x4e0059())return _0x4d587d(_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64]));_0x2bf9e3(),_0x2849b5[_0x4e8bb6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4e8bb6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x424940=!0x1;const _0x1905c2=_0x1c0462();function _0x38b2e4(_0x374b14){return!!_0x374b14&&(typeof _0x374b14===_0x4e8bb6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x374b14===_0x4e8bb6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x374b14[_0x4e8bb6([0x74,0x68,0x65,0x6e])]===_0x4e8bb6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x374b14[_0x4e8bb6([0x63,0x61,0x74,0x63,0x68])]===_0x4e8bb6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x56e70e(_0x29cd2c){_0x49fb4c(_0x29cd2c)[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x4af09d=>{if(!_0x4af09d||_0x4af09d[_0x4e8bb6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4e8bb6([0x6f,0x6b]))return _0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xb71c6e(_0x1504b3(_0x1905c2+_0x16e7e7))!=_0x4af09d[_0x4e8bb6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64]);})[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x2f1f23=>(_0x5de045(),_0x2f1f23),()=>{const _0x3723c2=_0x1a1f2f();return null==_0x3723c2?(_0x5de045(),_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64])):_0x4e8bb6(_0x8ca4df-_0x3723c2>(0x354026e9^_0x3b2c18)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x4d587d)[_0x4e8bb6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4d587d(_0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5a1e6c=0x117a4c69^_0x3b2c18;function _0x5de045(){const _0x201313=_0x4e8bb6([0x6c,0x6c,0x63,0x74,0x2d])+_0xb71c6e(_0x1504b3(_0x434b79)),_0x286852=_0x12391e(_0xb71c6e(window[_0x4e8bb6([0x4d,0x61,0x74,0x68])][_0x4e8bb6([0x63,0x65,0x69,0x6c])](_0x8ca4df/_0x5a1e6c)));window[_0x4e8bb6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4e8bb6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x201313,_0x286852);}function _0x1a1f2f(){const _0x281208=_0x4e8bb6([0x6c,0x6c,0x63,0x74,0x2d])+_0xb71c6e(_0x1504b3(_0x434b79)),_0x168041=window[_0x4e8bb6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4e8bb6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x281208);return _0x168041?window[_0x4e8bb6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x12391e(_0x168041),0x10)*_0x5a1e6c:null;}function _0x49fb4c(_0x33e0c8){return new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4829cb,_0x437623)=>{_0x33e0c8[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x4829cb,_0x437623),window[_0x4e8bb6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x437623,0x114d7629^_0x3b2c18);});}}_0x2849b5[_0x4e8bb6([0x6f,0x6e])](_0x4e8bb6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1ef418,_0x81ae11)=>{if(_0x81ae11[0x0]!=_0x434b79)return _0x4d587d(_0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x81ae11[0x1]={..._0x81ae11[0x1],[_0x4e8bb6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1905c2};},{[_0x4e8bb6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4e8bb6([0x68,0x69,0x67,0x68])}),_0x2849b5[_0x4e8bb6([0x6f,0x6e])](_0x4e8bb6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2493f8=>{_0x38b2e4(_0x2493f8[_0x4e8bb6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x424940=!0x0,_0x56e70e(_0x2493f8[_0x4e8bb6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4e8bb6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4e8bb6([0x6c,0x6f,0x77])}),_0x2a706f[_0x4e8bb6([0x74,0x68,0x65,0x6e])](()=>{_0x424940||_0x4d587d(_0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4e0059(){return _0x2849b5[_0x4e8bb6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e8bb6([0x76,0x69,0x65,0x77])][_0x4e8bb6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4e8bb6([0x61,0x75,0x74,0x6f]);}function _0x2bf9e3(){_0x2849b5[_0x4e8bb6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e8bb6([0x76,0x69,0x65,0x77])][_0x4e8bb6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4e8bb6([0x61,0x75,0x74,0x6f]);}}function _0x52e72c(_0x3dea11){const _0xd90618=[new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22ab3b=>setTimeout(_0x22ab3b,0x11459c25^_0x3b2c18)),_0x2a706f[_0x4e8bb6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43b533=>{let _0x327538=0x0;_0x2849b5[_0x4e8bb6([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e8bb6([0x6f,0x6e])](_0x4e8bb6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x799f9c,_0x4b22d8)=>{_0x4b22d8[0x0][_0x4e8bb6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x327538++,_0x327538==(0x114ca311^_0x3b2c18)&&(_0x43b533(),_0x799f9c[_0x4e8bb6([0x6f,0x66,0x66])]());});}))];return window[_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4e8bb6([0x72,0x61,0x63,0x65])](_0xd90618)[_0x4e8bb6([0x74,0x68,0x65,0x6e])](()=>_0x3dea11);}async function _0x63df39(){await _0x2a706f,_0x2849b5[_0x4e8bb6([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e8bb6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x56db6f,_0x2849b5[_0x4e8bb6([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e8bb6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x56db6f,_0x2849b5[_0x4e8bb6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4e8bb6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x291520(_0x526ce5){const _0x4c24d9=_0x538878();_0x2849b5[_0x4c24d9]=_0x4e8bb6([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x526ce5,_0x526ce5!=_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64])&&_0x63df39();}function _0x538878(){const _0x2e37c3=window[_0x4e8bb6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4e8bb6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4e8bb6([0x6e,0x6f,0x77])]())[_0x4e8bb6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4e8bb6([0x2e]),'');let _0x55b3cb=_0x4e8bb6([0x51]);for(let _0x15be83=0x0;_0x15be83<_0x2e37c3[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x15be83+=0x2){let _0xd64eb1=window[_0x4e8bb6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e37c3[_0x4e8bb6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15be83,_0x15be83+0x2));_0xd64eb1>=_0x2e868a[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xd64eb1-=_0x2e868a[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x55b3cb+=_0x2e868a[_0xd64eb1];}return _0x55b3cb;}function _0x218b03(){const _0xb3ace3=_0x877605[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])](_0x4e8bb6([0x2e]));if(0x3!=_0xb3ace3[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x36eadd(_0xb3ace3[0x1]);function _0x36eadd(_0x401bb0){const _0xdb9723=_0x33f2bf(_0x401bb0);return _0xdb9723&&_0x79fb1f()?_0xdb9723:null;function _0x79fb1f(){const _0x486cb1=_0xdb9723[_0x4e8bb6([0x6a,0x74,0x69])],_0x338e88=window[_0x4e8bb6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x486cb1[_0x4e8bb6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x486cb1[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4869f6={..._0xdb9723,[_0x4e8bb6([0x6a,0x74,0x69])]:_0x486cb1[_0x4e8bb6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x486cb1[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4869f6[_0x4e8bb6([0x76,0x63])],_0x1504b3(_0x4869f6)==_0x338e88;}}}async function _0x237a79(){let _0x76c82b=!0x0;try{const _0x576f25=_0x877605[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])](_0x4e8bb6([0x2e])),[_0x192269,_0x98b7ef,_0x18d7d8]=_0x576f25;return _0x1e0e3b(_0x192269),await _0xb8856b(_0x192269,_0x98b7ef,_0x18d7d8),_0x76c82b;}catch(_0x1a7738){return!0x1;}function _0x1e0e3b(_0x5d5794){const _0x3ade61=_0x33f2bf(_0x5d5794);_0x3ade61&&_0x3ade61[_0x4e8bb6([0x61,0x6c,0x67])]==_0x4e8bb6([0x45,0x53,0x32,0x35,0x36])||(_0x76c82b=!0x1);}async function _0xb8856b(_0x1b934a,_0x45c891,_0xcaef9b){const _0xe1b347=window[_0x4e8bb6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4e8bb6([0x66,0x72,0x6f,0x6d])](_0x17d2f7(_0xcaef9b),_0x246b98=>_0x246b98[_0x4e8bb6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4ba454=new window[(_0x4e8bb6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4e8bb6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1b934a+_0x4e8bb6([0x2e])+_0x45c891),_0x358676=window[_0x4e8bb6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4e8bb6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x358676)return;const _0x418699=await _0x358676[_0x4e8bb6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4e8bb6([0x6a,0x77,0x6b]),_0x1d3c7f,{[_0x4e8bb6([0x6e,0x61,0x6d,0x65])]:_0x4e8bb6([0x45,0x43,0x44,0x53,0x41]),[_0x4e8bb6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4e8bb6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4e8bb6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x358676[_0x4e8bb6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4e8bb6([0x6e,0x61,0x6d,0x65])]:_0x4e8bb6([0x45,0x43,0x44,0x53,0x41]),[_0x4e8bb6([0x68,0x61,0x73,0x68])]:{[_0x4e8bb6([0x6e,0x61,0x6d,0x65])]:_0x4e8bb6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x418699,_0xe1b347,_0x4ba454)||(_0x76c82b=!0x1);}}function _0x33f2bf(_0x17251e){return _0x17251e[_0x4e8bb6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4e8bb6([0x65,0x79]))?JSON[_0x4e8bb6([0x70,0x61,0x72,0x73,0x65])](_0x17d2f7(_0x17251e)):null;}function _0x17d2f7(_0x8cd626){return window[_0x4e8bb6([0x61,0x74,0x6f,0x62])](_0x8cd626[_0x4e8bb6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4e8bb6([0x2b]))[_0x4e8bb6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4e8bb6([0x2f])));}function _0x1504b3(_0xd4c913){let _0x6d7868=0x1505;function _0x2299be(_0xa5dbec){for(let _0x4740ca=0x0;_0x4740ca<_0xa5dbec[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4740ca++){const _0x340d2a=_0xa5dbec[_0x4e8bb6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4740ca);_0x6d7868=(_0x6d7868<<0x5)+_0x6d7868+_0x340d2a,_0x6d7868&=_0x6d7868;}}function _0x483135(_0x4955ed){Array[_0x4e8bb6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4955ed)?_0x4955ed[_0x4e8bb6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x483135):_0x4955ed&&typeof _0x4955ed==_0x4e8bb6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4e8bb6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4955ed)[_0x4e8bb6([0x73,0x6f,0x72,0x74])]()[_0x4e8bb6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4c2f78,_0x42cbda])=>{_0x2299be(_0x4c2f78),_0x483135(_0x42cbda);}):_0x2299be(window[_0x4e8bb6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4955ed));}return _0x483135(_0xd4c913),_0x6d7868>>>0x0;}function _0xb71c6e(_0x5bb768){return _0x5bb768[_0x4e8bb6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4e8bb6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4e8bb6([0x30]));}function _0x12391e(_0xf651c4){return _0xf651c4[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4e8bb6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4e8bb6([0x6a,0x6f,0x69,0x6e])]('');}function _0x56db6f(){}function _0x4e8bb6(_0x4599ed){return _0x4599ed['map'](_0x5d9efe=>String['fromCharCode'](_0x5d9efe))['join']('');}_0x291520(await _0x437ce3());}(this);}['_initSchema'](){const _0x4fba18=this['editor']['model']['schema'];_0x4fba18['isRegistered']('imageBlock')&&_0x4fba18['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x4fba18['isRegistered']('imageInline')&&_0x4fba18['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x3d944f=this['editor'];_0x3d944f['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x3d944f['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x4bb2c0=>_0x4bb2c0['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1c32fe=_0x3d944f['commands']['get']('replaceImageSource');_0x1c32fe&&this['listenTo'](_0x1c32fe,'cleanupImage',(_0x24ca02,[_0x1923f8,_0x3e86a6])=>{_0x1923f8['removeAttribute']('uploadcareImageId',_0x3e86a6);});}['_initConfig'](){const _0x4c245f=this['editor']['config']['get']('uploadcare.uploader')||{},_0xf0623a=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4abd0f(_0x4244d7['document'],'uc-config',{..._0x4c245f,'pubkey':_0xf0623a,'ctx-name':'uploader','sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x1a671c=>{if('closeMax'==_0x1a671c)return'#uc-icon-arrow-down';},_0x4244d7['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4abd0f(_0x4244d7['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x4244d7['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x1cd261=this['editor']['commands']['get']('insertImage');_0x1cd261&&this['listenTo'](_0x1cd261,'execute',()=>{const _0x5135c3=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5135c3&&_0x5135c3['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x5135c3);});});const _0x14d447=this['editor']['commands']['get']('uploadcareImageReplace');_0x14d447&&this['listenTo'](_0x14d447,'execute',()=>{const _0x2ab308=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2ab308&&_0x2ab308['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x2ab308);});});}}class u extends _0x2544ae{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56b00e){super(_0x56b00e),_0x56b00e['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x24dc53['defineComponents'](_0x24dc53);}}class ta extends _0x334409{constructor(_0xb40380){super(_0xb40380);const t=_0xb40380['t'],_0x17fe8a=this['bindTemplate'],_0x3438db=new _0x2da488();_0x3438db['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':[_0x3438db,{'text':_0x17fe8a['to']('imageUploadProgress',_0x3ce234=>t('Loading\x20image...')+'\x20('+(_0x3ce234||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'}]}]}]});}}class rt extends _0x334409{constructor(_0x2468fd){super(_0x2468fd);const t=_0x2468fd['t'];this['set']('errorType',null);const _0x58adb2=new _0x5b9268(_0x2468fd);_0x58adb2['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x58adb2['withText']=!0x0,_0x58adb2['class']='ck-button-action',_0x58adb2['on']('execute',()=>{this['fire']('retry');}),_0x58adb2['bind']('isVisible')['to'](this,'errorType',_0x40a1e6=>'NotFound'!==_0x40a1e6);const _0x2edd53=new at();_0x2edd53['content']=et,_0x2edd53['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4103c9=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':[_0x2edd53,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4103c9['to']('errorType',_0x1c2cea=>t('NotFound'!==_0x1c2cea?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x58adb2]},{'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'}]}]}]});}}class tt extends _0x334409{constructor(_0x1de372,_0x147dd8){super(_0x1de372);const _0xae64f7=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x147dd8,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xae64f7['to']('imageSrc')}});}}class ii extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x54a8a3,_0x5b1018,_0x1df704){super(_0x54a8a3),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x54a8a3),this['_errorView']=new rt(_0x54a8a3),this['_editingView']=new tt(_0x54a8a3,_0x1df704),this['_focusableView']=new _0x334409(_0x54a8a3),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5b1018),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':this['_items']}),this['_setView'](),this['once']('render',()=>{this['_waitForImageEditorComponent'](this['element'],_0x38e44b=>{this['_addUploadcareImageEditorListeners'](_0x38e44b);});}),this['on']('change:status',()=>{this['_setView']();}),this['_addErrorViewListeners']();}['focus'](){this['element']['focus']();}['_setView'](){switch(this['_items']['clear'](),this['status']){case'uploading':this['_items']['add'](this['_loadingView']);break;case'error':this['_items']['add'](this['_errorView']);break;case'ready':this['_items']['addMany']([this['_editingView'],this['_focusableView']]);}}['_waitForImageEditorComponent'](_0x20c56c,_0x577d5c){const _0x2a12cb='uc-cloud-image-editor',_0xea5428=_0x20c56c['querySelector'](_0x2a12cb);if(_0xea5428)return _0x577d5c(_0xea5428);const _0x142383=new MutationObserver(_0xd73abf=>{const _0xc21932=_0xd73abf['filter'](_0x45fe70=>_0x45fe70['target']===_0x20c56c&&_0x45fe70['addedNodes']['length']>0x0&&_0x45fe70['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x2a12cb);_0xc21932['length']&&(_0x142383['disconnect'](),_0x577d5c(_0xc21932[0x0]['addedNodes'][0x0]));});_0x142383['observe'](_0x20c56c,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x73e44b){_0x73e44b['addEventListener']('apply',_0x14dbce=>{this['fire']('apply',{'imageSrc':_0x14dbce['detail']['cdnUrl']});}),_0x73e44b['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class z extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x2e1d99(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x273f64,_0x4b331d,_0xbb2b70){super(),this['_editor']=_0x273f64,this['_dialog']=_0x4b331d,this['_imageElement']=_0xbb2b70,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 _0x3cb4f4=this['_imageElement'],_0x7718a2=_0x3cb4f4['getAttribute']('uploadcareImageId'),_0x3d2f94=_0x3cb4f4['getAttribute']('src');if(_0x7718a2)await this['_loadImageInfo'](_0x7718a2,_0x3d2f94);else{if(this['_imageCache']['has'](_0x3d2f94)){const _0x4bac5c=this['_imageCache']['get'](_0x3d2f94);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4bac5c['url'],this['imageDimension']=_0x4bac5c['dimension'],this['imageId']=_0x4bac5c['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4649c7}=this['_editor'],t=_0x4649c7['t'],_0x517b8c=new ii(_0x4649c7,this['imageStatus'],this['_attributes']);_0x517b8c['bind']('status')['to'](this,'imageStatus'),_0x517b8c['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x517b8c['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x517b8c['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x517b8c,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3aa786,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x517b8c,'position':_0xa4f76d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x517b8c['focus']();},'onHide':()=>{_0x517b8c['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2fe7dc=>!M(_0x2fe7dc,_0x517b8c['element'])}});}['_loadImageInfo'](_0x32ada6,_0x3089a1){return C['getInfo'](_0x32ada6,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x3c6b02=>{const {width:_0x13adb4,height:_0x505413}=_0x3c6b02['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3089a1,this['imageDimension']={'width':_0x13adb4,'height':_0x505413},this['imageId']=_0x32ada6;})['catch'](_0x2691c6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2691c6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4be7a7,_0x54dbad){return this['_getImageAsFile'](_0x4be7a7)['then'](_0x47f7e7=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x54dbad['signal'],'file':_0x47f7e7,'onProgress':_0x2a49fc=>{_0x2a49fc&&_0x2a49fc['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2a49fc['value']));}}))['then'](_0x249fdc=>{const {width:_0x2c85e7,height:_0x52daae}=_0x249fdc['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x249fdc['cdnUrl'],this['imageDimension']={'width':_0x2c85e7,'height':_0x52daae},this['imageId']=_0x249fdc['uuid'],this['imageUploadProgress']=null;const _0x2fc00f=_0x4be7a7['getAttribute']('src');this['_imageCache']['set'](_0x2fc00f,{'id':_0x249fdc['uuid'],'url':_0x249fdc['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x48d6a6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x48d6a6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x234e52,_0x31a892){_0x234e52['on']('apply',(_0x364693,_0x4c9449)=>{this['_replaceImage'](_0x31a892,_0x4c9449['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x234e52['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x234e52['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x47b6af,_0x459441,_0x179935){const _0x4fc105=this['_editor'],{width:_0x196b84,height:_0x115f2e}=F(_0x459441,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x54a21a,imageSources:_0x1fa29b}=E(_0x459441,_0x196b84);_0x4fc105['model']['change'](_0x64f38=>{if('$graveyard'===_0x47b6af['root']['rootName']){_0x4fc105['execute']('insertImage',{'imageType':_0x47b6af['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x47b6af['getAttributes']()),'uploadcareImageId':_0x179935,'src':_0x54a21a,'sources':_0x1fa29b,'width':_0x196b84,'height':_0x115f2e}});const _0x5573c5=_0x47b6af['getChildren']();_0x47b6af=_0x4fc105['model']['document']['selection']['getSelectedElement']();for(const _0x361346 of _0x5573c5)_0x64f38['append'](_0x64f38['cloneElement'](_0x361346),_0x47b6af);}else _0x64f38['setSelection'](_0x47b6af,'on'),_0x4fc105['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x47b6af['getAttributes']()),'uploadcareImageId':_0x179935,'src':_0x54a21a,'sources':_0x1fa29b,'width':_0x196b84,'height':_0x115f2e},_0x47b6af);_0x64f38['setSelection'](_0x47b6af,'on');});}async['_getImageAsFile'](_0x5a4055){const _0x83ed3f=_0x4244d7['window'],_0x356db1=_0x4244d7['document']['location']['href'],_0x2da7f0=new _0x83ed3f['URL'](_0x5a4055['getAttribute']('src'),_0x356db1);if('data:'===_0x2da7f0['protocol']){const _0x56a5c0=_0x2da7f0['href']['split'](','),_0x5bca5e=_0x56a5c0[0x0]['match'](/:(.*?);/)[0x1],_0x5ab7b0=_0x5bca5e['split']('/')[0x1],_0x13420d=_0x83ed3f['atob'](_0x56a5c0[_0x56a5c0['length']-0x1]);let _0x537858=_0x13420d['length'];const _0x58c952=new _0x83ed3f['Uint8Array'](_0x537858);for(;_0x537858--;)_0x58c952[_0x537858]=_0x13420d['charCodeAt'](_0x537858);return new _0x83ed3f['File']([_0x58c952],'image.'+_0x5ab7b0,{'type':_0x5bca5e});}const _0x306679=_0x2da7f0['href']['split']('/'),_0x5d92fd=_0x306679[_0x306679['length']-0x1],_0x776f6a=_0x5d92fd['split']('.')[0x1];return _0x83ed3f['fetch'](_0x2da7f0['href'])['then'](_0x572226=>_0x572226['clone']()['blob']())['then'](_0x8c3354=>new _0x83ed3f['File']([_0x8c3354],_0x5d92fd,{'type':'image/'+_0x776f6a}));}}class J extends _0x76a7f9{['imageEditController'];static get['requires'](){return[_0x3ffdfe];}['_isEditable'];constructor(_0xa93044){super(_0xa93044),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x22bfe1){const _0x2f43c1=W(_0x22bfe1);return _0x2c41bd=>!(!_0x2c41bd||!_0x2c41bd['is']('element','imageBlock')&&!_0x2c41bd['is']('element','imageInline'))&&(!!_0x2c41bd['hasAttribute']('uploadcareImageId')||!!_0x2c41bd['hasAttribute']('src')&&_0x2f43c1(_0x2c41bd['getAttribute']('src')));}(_0xa93044['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x8fa1f9=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x8fa1f9);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x2cacb6=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2cacb6&&(_0x2cacb6['is']('element','imageBlock')||_0x2cacb6['is']('element','imageInline'))&&(this['imageEditController']=new z(this['editor'],this['editor']['plugins']['get'](_0x3ffdfe),_0x2cacb6),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class O extends _0x76a7f9{['refresh'](){const _0x278ec1=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x278ec1&&(_0x278ec1['is']('element','imageBlock')||_0x278ec1['is']('element','imageInline')));}['execute'](_0x40e362){const _0x1b78a5=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x4b98c6=>{_0x4b98c6['setAttributes'](_0x40e362,_0x1b78a5),_0x4b98c6['removeAttribute']('srcset',_0x1b78a5),_0x4b98c6['removeAttribute']('sizes',_0x1b78a5);});}}class g extends _0x2544ae{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x3cbf33,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2119a5}=this;_0x2119a5['commands']['add']('uploadcareImageEdit',new J(_0x2119a5)),_0x2119a5['commands']['add']('uploadcareImageReplace',new O(_0x2119a5));}}class j extends _0x2544ae{['_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 _0x213389=this['editor'];_0x213389['ui']['componentFactory']['add']('uploadcareImageEdit',_0x586d36=>{const _0x23af58=_0x213389['commands']['get']('uploadcareImageEdit'),_0x562818=new _0x5b9268(_0x586d36),t=_0x586d36['t'];return _0x562818['set']({'icon':_0x3aa786,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x562818['bind']('isEnabled')['to'](_0x23af58),_0x562818['bind']('isOn')['to'](_0x23af58,'isActive'),this['listenTo'](_0x562818,'execute',()=>{_0x213389['execute']('uploadcareImageEdit'),_0x213389['editing']['view']['focus']();}),_0x562818;}),this['_initConfig']();}['_initConfig'](){const _0x435a01=_0x4abd0f(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x435a01),this['listenTo'](this['editor'],'destroy',()=>{_0x435a01['remove']();});}}class P extends _0x2544ae{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[g,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,P as UploadcareImageEdit,g as UploadcareImageEditEditing,j as UploadcareImageEditUI,e as UploadcareUI};
|
|
23
|
+
import{Plugin as _0x9b523c,icons as _0x12da63,Command as _0x603a30}from'@ckeditor/ckeditor5-core/dist/index.js';import{ButtonView as _0x176bae,MenuBarMenuListItemButtonView as _0x2fe898,View as _0x221043,FocusCycler as _0x5f088b,Dialog as _0x2de3fa,DialogViewPosition as _0x25e66d,SpinnerView as _0xe0a2c5,IconView as et,Notification as _0x4617db}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x39e7a8,DomEmitterMixin as _0x88fd80,global as _0x1780c2,getAncestors as _0x162bff,ObservableMixin as _0x15dd85,createElement as _0x3cd5a0,uid as _0x45f319}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x3b6a16}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2a775a,info as _0x4394c0}from'@uploadcare/upload-client';import*as _0x8aa24e from'@uploadcare/file-uploader';var o=function(_0x2c1eb4){return _0x2c1eb4['Local']='local',_0x2c1eb4['URL']='url',_0x2c1eb4['Dropbox']='dropbox',_0x2c1eb4['GDrive']='gdrive',_0x2c1eb4['Facebook']='facebook',_0x2c1eb4['GPhotos']='gphotos',_0x2c1eb4['Instagram']='instagram',_0x2c1eb4['OneDrive']='onedrive',_0x2c1eb4;}({});function k(_0xde1dd0,_0x244aa1,_0x262b3f){const t=_0xde1dd0['t'],_0x334667=_0xde1dd0['t'];switch(_0x244aa1){case o['Local']:return{'text':_0x334667('Insert'===_0x262b3f?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x334667('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x262b3f?_0x334667('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x334667('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x262b3f?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x262b3f?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x262b3f?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x262b3f?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['Instagram']:return{'text':t('Insert'===_0x262b3f?'Insert\x20with\x20Instagram':'Replace\x20with\x20Instagram'),'shortText':t('With\x20Instagram')};case o['OneDrive']:return{'text':t('Insert'===_0x262b3f?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x244aa1;}}class e extends _0x9b523c{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'UploadcareUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x278598=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x497288;for(const _0x6f71c6 in _0x278598){const _0x53f3c7=_0x6f71c6,_0x3f191a=_0x278598[_0x53f3c7];if('uploadcareLicenseKeyValid'==_0x3f191a||'uploadcareLicenseKeyInvalid'==_0x3f191a||'uploadcareLicenseKeyExpired'==_0x3f191a||'uploadcareLicenseKeyDomainLimit'==_0x3f191a||'uploadcareLicenseKeyNotAllowed'==_0x3f191a||'uploadcareLicenseKeyEvaluationLimit'==_0x3f191a||'uploadcareLicenseKeyTrialLimit'==_0x3f191a||'uploadcareLicenseKeyUsageLimit'==_0x3f191a){delete _0x278598[_0x53f3c7],_0x497288=_0x3f191a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x497288&&_0x278598['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x497288&&_0x278598['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x497288&&_0x278598['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x497288&&_0x278598['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x497288&&_0x278598['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x497288&&_0x278598['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x497288&&_0x278598['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2bd9d5}=this,_0x3c7c88=_0x2bd9d5['commands']['get']('uploadcare');if(!_0x3c7c88)return;const _0x38dd18=this['_normalizeConfigSourceList'](_0x2bd9d5['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x6bb221,_0x26e75c)=>{const _0x4a2386=this['_getIntegrationKey'](_0x26e75c['type']);return _0x6bb221[_0x4a2386]||(_0x6bb221[_0x4a2386]=[]),_0x6bb221[_0x4a2386]['push'](_0x26e75c),_0x6bb221;},{});_0x2bd9d5['plugins']['has']('ImageInsertUI')&&_0x2bd9d5['commands']['get']('uploadcare')&&Object['entries'](_0x38dd18)['forEach'](([_0x5d710d,_0x80dd71])=>{_0x2bd9d5['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x5d710d,'observable':()=>_0x3c7c88,'buttonViewCreator':()=>this['_createToolbarButton'](_0x80dd71),'formViewCreator':()=>this['_createDropdownButtons'](_0x80dd71),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x80dd71),'override':'assetManager'!==_0x5d710d});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x1bc545){const {locale:_0x489dca}=this['editor'];return _0x1bc545['map'](_0x56fc04=>{const _0x521533=k(_0x489dca,_0x56fc04,'Insert');switch(_0x56fc04){case o['Local']:return{'icon':_0x12da63['imageUpload'],'type':o['Local'],..._0x521533};case o['URL']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M12.748\x202a4.622\x204.622\x200\x200\x200-3.174\x201.362L8.02\x204.915a.783.783\x200\x200\x200\x20.002\x201.11.786.786\x200\x200\x200\x201.11\x200l1.55-1.553c1.185-1.185\x203.024-1.195\x204.116-.104l.851.854c1.092\x201.091\x201.083\x202.927-.101\x204.11l-1.555\x201.554a.787.787\x200\x200\x200\x20.557\x201.34.78.78\x200\x200\x200\x20.553-.23l1.554-1.552c1.758-1.757\x201.838-4.597.102-6.332l-.854-.853A4.31\x204.31\x200\x200\x200\x2012.748\x202Zm-.488\x204.973a.78.78\x200\x200\x200-.553.23L7.2\x2011.71l-.004.002a.784.784\x200\x200\x200\x201.11\x201.107l.003-.002\x204.504-4.505a.785.785\x200\x200\x200-.554-1.339Zm-6.79.815a.791.791\x200\x200\x200-.554.234L3.36\x209.573c-1.757\x201.758-1.836\x204.597-.101\x206.332l.853.852c1.736\x201.734\x204.572\x201.655\x206.33-.102l1.547-1.547.006-.008a.777.777\x200\x200\x200\x20.244-.554.782.782\x200\x200\x200-.799-.797.774.774\x200\x200\x200-.56.248l-1.545\x201.547c-1.184\x201.184-3.021\x201.195-4.113.104l-.854-.854c-1.091-1.091-1.083-2.927.102-4.111l1.552-1.555a.787.787\x200\x200\x200\x20.233-.555.79.79\x200\x200\x200-.06-.3.793.793\x200\x200\x200-.173-.253s-.104-.14-.183-.185c-.051-.03-.133-.047-.37-.047Z\x22/></svg>\x0a','type':o['URL'],..._0x521533};case o['Dropbox']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M5.972\x203.115A.746.746\x200\x200\x201\x206.374\x203c.14\x200\x20.28.037.402.115l3.229\x202.059\x203.228-2.057a.75.75\x200\x200\x201\x20.805\x200l3.629\x202.31h.002a.757.757\x200\x200\x201\x200\x201.264h-.002L15.034\x208.37l2.633\x201.678h.002a.756.756\x200\x200\x201\x200\x201.262h-.002l-3.63\x202.312a.746.746\x200\x200\x201-.161.076c.234.08.409.275.482.5a.75.75\x200\x200\x201-.322.854l-3.629\x202.308a.75.75\x200\x200\x201-.805\x200l-3.63-2.31a.75.75\x200\x200\x201-.229-1.031l.076-.122h.022a.746.746\x200\x200\x201\x20.32-.189.75.75\x200\x200\x201-.19-.086l-3.63-2.312a.756.756\x200\x200\x201\x200-1.264l2.632-1.678-2.632-1.676a.757.757\x200\x200\x201\x200-1.263l3.63-2.313Zm2.64\x202.946L6.374\x204.635\x204.136\x206.06l2.238\x201.423\x202.238-1.423Zm7.262\x200-2.236-1.426-2.239\x201.426\x202.237\x201.423\x202.238-1.423Zm-3.637\x202.306-2.232-1.422-2.233\x201.422\x202.235\x201.422\x202.23-1.422Zm-3.625\x202.31L6.374\x209.253l-2.238\x201.426\x202.238\x201.424\x202.238-1.424Zm7.262\x200-2.236-1.425-2.239\x201.426\x202.237\x201.424\x202.238-1.424Zm-2.64\x202.944-3.23-2.056-3.228\x202.056a.75.75\x200\x200\x201-.185.084.724.724\x200\x200\x201\x20.185.08l3.229\x202.057\x203.226-2.055a.827.827\x200\x200\x201\x20.18-.084.746.746\x200\x200\x201-.178-.082Z\x22/></svg>\x0a','type':o['Dropbox'],..._0x521533};case o['Facebook']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10.01\x202C5.59\x202\x202\x205.59\x202\x2010.01a8.011\x208.011\x200\x200\x200\x206.775\x207.914.754.754\x200\x200\x200\x20.598-.17.75.75\x200\x200\x200\x20.262-.565v-5.02a.745.745\x200\x200\x200-.22-.524.745.745\x200\x200\x200-.526-.221H7.77v-.627H8.89a.745.745\x200\x200\x200\x20.525-.22c.14-.14.22-.329.22-.526V8.324c0-.466.122-1.083.524-1.48.33-.326\x201.017-.6\x202.332-.43v.408c-.152.012-.305.017-.457.04-.335.048-.662.136-.943.326-.313.21-.497.505-.59.804-.093.3-.107.602-.107.88v1.18a.746.746\x200\x200\x200\x20.744.746h1.158l-.098.63h-1.06a.744.744\x200\x200\x200-.744.744v5.017a.752.752\x200\x200\x200\x20.26.567c.081.07.177.119.28.148a.75.75\x200\x200\x200\x20.319.022A8.012\x208.012\x200\x200\x200\x2010.01\x202Zm0\x201.486a6.52\x206.52\x200\x200\x201\x206.521\x206.524c0\x202.945-1.973\x205.386-4.65\x206.197v-3.291h.951a.749.749\x200\x200\x200\x20.736-.63l.332-2.12a.742.742\x200\x200\x200-.17-.6.745.745\x200\x200\x200-.564-.26h-1.285V8.87c0-.252.024-.384.039-.433.003-.008.002-.012.002-.016.016-.011.104-.055.326-.088a7\x207\x200\x200\x201\x20.984-.05.746.746\x200\x200\x200\x20.528-.218c.14-.139.217-.33.217-.527V5.76a.747.747\x200\x200\x200-.586-.729c-2.04-.438-3.433-.083-4.278.75-.818.807-.968\x201.884-.968\x202.543v.983H7.027a.744.744\x200\x200\x200-.525.22.743.743\x200\x200\x200-.219.526v2.119c0\x20.197.08.386.219.525.14.14.328.221.525.221h1.118v3.291c-2.681-.809-4.659-3.25-4.659-6.197a6.523\x206.523\x200\x200\x201\x206.524-6.526Z\x22/></svg>\x0a','type':o['Facebook'],..._0x521533};case o['GDrive']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M7.666\x203a.736.736\x200\x200\x200-.371.1.748.748\x200\x200\x200-.275.267l-4.918\x208.397a.743.743\x200\x200\x200-.006.744l2.46\x204.318a.747.747\x200\x200\x200\x20.65.377h9.606a.754.754\x200\x200\x200\x20.65-.377l2.46-4.318a.74.74\x200\x200\x200\x20.002-.735l-4.688-8.392a.754.754\x200\x200\x200-.654-.38H7.666Zm1.285\x201.492h3.195l3.854\x206.9h-3.1l-3.949-6.9Zm-1.293.742L9.223\x207.97l-4.016\x206.988-1.6-2.813\x204.051-6.91Zm2.424\x204.237\x201.098\x201.922H8.977l1.105-1.922ZM8.12\x2012.885h7.87L14.38\x2015.71H6.494l1.625-2.826Z\x22/></svg>\x0a','type':o['GDrive'],..._0x521533};case o['GPhotos']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.258\x203.082c0-.594.486-1.082\x201.08-1.082a4.38\x204.38\x200\x200\x201\x204.239\x205.489c-.18.688-.633\x201.245-1.109\x201.767h3.468c.595\x200\x201.082.488\x201.082\x201.082a4.382\x204.382\x200\x200\x201-5.49\x204.24v-.001c-.689-.18-1.246-.633-1.768-1.109v3.468c0\x20.595-.487\x201.082-1.082\x201.082a4.384\x204.384\x200\x200\x201-4.111-2.866\x204.382\x204.382\x200\x200\x201-.125-2.624c.18-.689.632-1.246\x201.108-1.768H3.082A1.085\x201.085\x200\x200\x201\x202\x209.68a4.382\x204.382\x200\x200\x201\x205.49-4.238c.69.18\x201.246.632\x201.768\x201.108V3.082Zm3.164\x201.32c-.435-.46-1.043-.667-1.662-.767v5.49c.619-.1\x201.227-.307\x201.662-.766a2.875\x202.875\x200\x200\x200\x200-3.958ZM7.21\x206.918a2.876\x202.876\x200\x200\x200-2.93.789c-.396.423-.569.983-.658\x201.55h5.56c-.045-.295-.091-.59-.224-.859a2.879\x202.879\x200\x200\x200-1.748-1.48Zm9.254\x203.841h-5.653l.013.1c.012.098.025.197.053.292a2.873\x202.873\x200\x200\x200\x204.862\x201.158\x202.87\x202.87\x200\x200\x200\x20.398-.54v-.001c.111-.195.2-.403.263-.619.026-.092.038-.188.05-.283l.014-.107Zm-8.872\x204.86c.437.459\x201.045.666\x201.665.766V10.89c-1.369.222-2.456\x201.314-2.456\x202.747\x200\x20.738.283\x201.447.791\x201.981Z\x22/></svg>\x0a','type':o['GPhotos'],..._0x521533};case o['Instagram']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M8.978\x202c-.945.004-1.73.02-2.4.086-.906.09-1.66.28-2.318.706A4.95\x204.95\x200\x200\x200\x202.79\x204.26c-.427.66-.615\x201.412-.704\x202.319C1.998\x207.47\x202\x208.57\x202\x209.98v.057c0\x201.41-.003\x202.51.086\x203.402.09.906.278\x201.657.703\x202.316.38.589.882\x201.09\x201.47\x201.471.659.426\x201.413.615\x202.32.705.891.089\x201.991.086\x203.401.086h.057c1.41\x200\x202.51.003\x203.402-.086.907-.089\x201.658-.28\x202.317-.705a4.958\x204.958\x200\x200\x200\x201.47-1.47c.425-.66.614-1.41.704-2.317.088-.892.088-1.992.088-3.402V9.98c0-1.41\x200-2.51-.088-3.402-.09-.907-.278-1.66-.703-2.319a4.95\x204.95\x200\x200\x200-1.471-1.468c-.659-.425-1.41-.616-2.316-.706-.893-.088-1.992-.085-3.403-.085H9.98c-.352\x200-.686-.002-1.002\x200Zm1.028\x201.502c1.444\x200\x202.488.002\x203.283.08.788.079\x201.27.225\x201.652.471.41.265.757.614\x201.022\x201.024.247.381.393.864.47\x201.652.08.795.083\x201.836.083\x203.28\x200\x201.443-.004\x202.487-.082\x203.283-.079.787-.225\x201.27-.471\x201.65-.265.41-.612.759-1.022\x201.023-.381.247-.866.393-1.654.471-.795.08-1.837.08-3.281.08-1.444\x200-2.488-.003-3.283-.082-.787-.078-1.268-.222-1.649-.469a3.438\x203.438\x200\x200\x201-1.021-1.023c-.247-.383-.394-.865-.473-1.652-.079-.795-.08-1.838-.08-3.282\x200-1.443\x200-2.485.08-3.279.079-.788.225-1.27.47-1.65a3.45\x203.45\x200\x200\x201\x201.024-1.026c.383-.246.862-.392\x201.649-.47.795-.08\x201.839-.08\x203.283-.08ZM14.22\x204.62a1.175\x201.175\x200\x200\x200-1.18\x201.178c0\x20.312.123.613.344.833a1.185\x201.185\x200\x200\x200\x201.668\x200c.109-.109.196-.24.256-.382.059-.143.086-.297.086-.452\x200-.154-.029-.308-.086-.45a1.18\x201.18\x200\x200\x200-1.088-.727Zm-4.213\x201.343a4.042\x204.042\x200\x200\x200-4.045\x204.045\x204.047\x204.047\x200\x200\x200\x206.906\x202.862\x204.047\x204.047\x200\x200\x200-2.861-6.907Zm0\x201.504a2.538\x202.538\x200\x200\x201\x202.541\x202.541c0\x20.675-.265\x201.322-.742\x201.8a2.543\x202.543\x200\x200\x201-1.8.741\x202.54\x202.54\x200\x200\x201-1.796-.742\x202.55\x202.55\x200\x200\x201-.55-2.771\x202.54\x202.54\x200\x200\x201\x202.347-1.569Z\x22/></svg>\x0a','type':o['Instagram'],..._0x521533};case o['OneDrive']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10.223\x205.001a5.277\x205.277\x200\x200\x200-4.408\x202.258c-3.224.423-4.908\x204.123-3.032\x206.814l.004.008.002.004c.48.627\x201.712\x201.84\x203.588\x201.84h7.936c.667\x200\x201.32-.179\x201.894-.522a3.838\x203.838\x200\x200\x200\x201.381-1.46v-.005c1.13-2.16-.133-4.777-2.488-5.298-.617-1.853-2.177-3.242-4.111-3.565a5.273\x205.273\x200\x200\x200-.766-.074Zm-.092\x201.5c.078\x200\x20.154.001.23.008.077.004.154.014.231.021l.226.035a5.203\x205.203\x200\x200\x201\x20.45.116\x203.31\x203.31\x200\x200\x201\x20.433.166\x204.079\x204.079\x200\x200\x201\x20.606.348\x204.195\x204.195\x200\x200\x201\x20.37.293\x203.54\x203.54\x200\x200\x201\x20.33.348\x203.517\x203.517\x200\x200\x201\x20.505.778\x203.182\x203.182\x200\x200\x200-.42.117c-.082.03-.164.06-.244.094l-1.49.627-2.686-1.61a4.39\x204.39\x200\x200\x200-1.002-.445c.015-.01.032-.026.047-.039a3.744\x203.744\x200\x200\x201\x20.4-.289\x203.713\x203.713\x200\x200\x201\x20.424-.23\x203.02\x203.02\x200\x200\x201\x20.219-.094c.074-.03.15-.053.225-.076a3.77\x203.77\x200\x200\x201\x20.222-.06c.077-.02.157-.035.233-.05.075-.015.15-.025.228-.033.077-.007.154-.015.233-.02.078-.003.154-.005.23-.005Zm-3.8\x202.193h.003c.54.001\x201.111.156\x201.551.428l1.783\x201.07-5.867\x202.471c-.535-1.29-.15-2.788\x201.059-3.537l.007-.004c.441-.271.946-.42\x201.463-.428Zm7.974\x201.33.152.008c.086.008.173.018.258.033a1.956\x201.956\x200\x200\x201\x20.477.145\x202.179\x202.179\x200\x200\x201\x20.918.756c.046.066.09.133.127.2a2.284\x202.284\x200\x200\x201\x20.269.919c.004.081.008.165.002.248-.003.055-.012.111-.02.166l-3.507-2.102.459-.193.015-.008a2.118\x202.118\x200\x200\x201\x20.41-.125\x202.297\x202.297\x200\x200\x201\x20.44-.047Zm-3.008\x201.112\x204.506\x202.699a2.217\x202.217\x200\x200\x201-.338.26\x202.228\x202.228\x200\x200\x201-.668.275c-.078.019-.157.03-.24.04-.081.007-.164.015-.246.015H6.373c-.057\x200-.113-.001-.168-.004a1.904\x201.904\x200\x200\x201-.164-.016l-.154-.023c-.051-.008-.102-.014-.15-.026a2.942\x202.942\x200\x200\x201-.77-.3\x202.889\x202.889\x200\x200\x201-.21-.133c-.012-.008-.019-.016-.03-.024l6.57-2.763Z\x22/></svg>\x0a','type':o['OneDrive'],..._0x521533};}});}['_getIntegrationKey'](_0x2565cf){switch(_0x2565cf){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x4dc39a,_0x30d961){const _0x349d54=this['editor'],_0x28824b=new _0x4dc39a(_0x349d54['locale']),_0x4875ab=_0x349d54['commands']['get']('uploadcare');return _0x28824b['bind']('isEnabled')['to'](_0x4875ab),_0x28824b['on']('execute',()=>{_0x4875ab['execute'](_0x30d961);}),_0x28824b;}['_createToolbarButton'](_0x3cf09f){const {locale:_0x30d0cf}=this['editor'],_0x157d77=this['editor']['plugins']['get']('ImageInsertUI'),_0x21ad8f=_0x3cf09f[0x0],_0x4f9b32=this['_createButton'](_0x176bae,_0x21ad8f['type']);return _0x4f9b32['icon']=_0x21ad8f['icon'],_0x4f9b32['bind']('label')['to'](_0x157d77,'isImageSelected',_0x4a9c9f=>k(_0x30d0cf,_0x21ad8f['type'],_0x4a9c9f?'Replace':'Insert')['text']),_0x4f9b32['tooltip']=!0x0,_0x4f9b32;}['_createDropdownButtons'](_0xcfa47d){const {locale:_0x57067e}=this['editor'],_0x34190b=this['editor']['plugins']['get']('ImageInsertUI');return _0xcfa47d['map'](_0x101751=>{const _0x507cb6=this['_createButton'](_0x176bae,_0x101751['type']);return _0x507cb6['withText']=!0x0,_0x507cb6['icon']=_0x101751['icon'],_0x507cb6['bind']('label')['to'](_0x34190b,'isImageSelected',_0x451fd4=>k(_0x57067e,_0x101751['type'],_0x451fd4?'Replace':'Insert')['text']),_0x507cb6;});}['_createMenuBarButtons'](_0x2ad64d){return _0x2ad64d['map'](_0x5e3ccd=>{const _0x44ea58=this['_createButton'](_0x2fe898,_0x5e3ccd['type']);return _0x44ea58['icon']=_0x5e3ccd['icon'],_0x44ea58['label']=_0x5e3ccd['shortText'],_0x44ea58;});}}class q extends _0x221043{['focusTracker'];['focusCycler'];constructor(_0x409128){super(_0x409128),this['focusTracker']=new _0x39e7a8(),this['focusCycler']=new _0x5f088b({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class S extends q{constructor(_0x283b27){super(_0x283b27),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x1c5cbe,_0x5ad4ab){const _0xee489d=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x6b34d1=>_0x6b34d1<=_0x5ad4ab)['map'](_0x2d3228=>_0x1c5cbe['replace'](/\/$/,'')+'/-/resize/'+_0x2d3228+'x/\x20'+_0x2d3228+'w');return{'imageFallbackUrl':_0x1c5cbe,'imageSources':[{'srcset':_0xee489d['join'](',\x20'),'sizes':'(max-width:\x20'+_0x5ad4ab+'px)\x20100vw,\x20'+_0x5ad4ab+'px','type':'image/webp'}]};}function F(_0x32cab7,_0x5aa90e,_0x5c179c){const _0x468ff9=_0x32cab7['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x468ff9?parseInt(_0x468ff9[0x1],0xa):_0x5aa90e,'height':_0x468ff9?parseInt(_0x468ff9[0x2],0xa):_0x5c179c};}function p(_0x189251,_0x56623a){const _0x3f6a96=Object['create'](_0x88fd80),_0x45028a=_0x189251['plugins']['get']('ImageUtils'),_0x15b074=_0x189251['editing']['mapper']['toViewElement'](_0x56623a),_0xf5e54f=_0x45028a['findViewImgElement'](_0x15b074),_0x211587=_0x189251['editing']['view']['domConverter']['viewToDom'](_0xf5e54f),_0x4a5b82=_0x56623a['getAttribute']('width'),_0x22b6fc=_0x56623a['getAttribute']('height'),_0x23b0ff='image-processing';_0x189251['editing']['view']['change'](_0x19e259=>{_0x19e259['addClass'](_0x23b0ff,_0x15b074),_0x19e259['setStyle']('aspect-ratio',_0x4a5b82+'/'+_0x22b6fc,_0xf5e54f);}),_0x3f6a96['listenTo'](_0x211587,'load',()=>{_0x3f6a96['stopListening'](_0x211587,'load'),_0x189251['editing']['view']['change'](_0x16b7fe=>{_0x16b7fe['removeClass'](_0x23b0ff,_0x15b074),_0x16b7fe['removeStyle']('aspect-ratio',_0xf5e54f);});});}function W(_0x3e5644){if(Array['isArray'](_0x3e5644)){const _0x3d9e92=_0x3e5644['map'](W);return _0x41f00f=>_0x3d9e92['some'](_0x82fd1f=>_0x82fd1f(_0x41f00f));}if('origin'==_0x3e5644){const _0x5b28af=_0x1780c2['window']['location']['origin'];return _0x1e1523=>new URL(_0x1e1523,_0x1780c2['document']['baseURI'])['origin']==_0x5b28af;}return'function'==typeof _0x3e5644?_0x3e5644:_0x3e5644 instanceof RegExp?_0x135f9a=>!(!_0x135f9a['match'](_0x3e5644)&&!_0x135f9a['replace'](/^https?:\/\//,'')['match'](_0x3e5644)):()=>!0x1;}function M(_0x2d7b3d,_0x39a2b3){return _0x162bff(_0x2d7b3d['target'])['includes'](_0x39a2b3);}class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x15dd85(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x55a5a3,_0x5309ba,_0xab6ae9){super(),this['_editor']=_0x55a5a3,this['_editing']=_0x5309ba,this['_dialog']=_0x55a5a3['plugins']['get'](_0x2de3fa),this['_api']=_0x5309ba['ctxElement']['getAPI'](),this['_type']=_0xab6ae9,this['_editing']['configElement']['setAttribute']('source-list',this['_type']),this['_initDialog'](),this['_initListeners'](),this['_api']['initFlow']();}['destroy'](){this['_formView']&&(this['_formView']['destroy'](),this['_formView']=null),this['_api']&&this['_api']['doneFlow'](),this['stopListening'](),this['stopDelegating']();}['_initDialog'](){const {locale:_0x2202df,model:_0x4c5f7b}=this['_editor'],_0x3eb59d=_0x4c5f7b['document']['selection']['getSelectedElement'](),_0x4a7dc6=_0x3eb59d&&(_0x3eb59d['is']('element','imageBlock')||_0x3eb59d['is']('element','imageInline'));this['_formView']=new S(_0x2202df),this['_dialog']['show']({'id':'uploadCare','icon':_0x12da63['imageUpload'],'title':k(_0x2202df,this['_type'],_0x4a7dc6?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x25e66d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2386a1=>!M(_0x2386a1,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x344f4e}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x48d389=>{const _0xa4f3=_0x344f4e['length'];for(const _0x14b436 of _0x344f4e){const _0x13dac3=_0x14b436===_0x344f4e[_0xa4f3-0x1],{cdnUrl:_0x5544b9,fileInfo:_0xef4501}=_0x14b436;if(!_0x5544b9||!_0xef4501)continue;const {width:_0x1e24f6,height:_0x459e0d}=_0xef4501['imageInfo'],_0x2d2337=F(_0x5544b9,_0x1e24f6,_0x459e0d),_0xbe0c0a=E(_0x5544b9,_0x2d2337['width']),_0x402ca7={'id':_0xef4501['uuid'],'type':'image','attributes':{'imageDimension':_0x2d2337,..._0xbe0c0a}};this['_insertAsset'](_0x402ca7,_0x13dac3,_0x48d389);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2e1be3=>{'idle'===_0x2e1be3['detail']['status']&&!_0x2e1be3['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x1e9a5f,_0x386327,_0x487670){const _0x47badc=this['_editor']['model']['document']['selection'],_0x1e990b=_0x47badc['getSelectedElement'](),_0x4fa91d=!(!_0x1e990b||!_0x1e990b['is']('element','imageInline'));_0x487670['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x1e9a5f,_0x4fa91d),_0x386327||_0x487670['setSelection'](_0x47badc['getLastPosition']());}['_insertImage'](_0x3f0e77,_0x5994f2){const _0x3d9bf2=this['_editor'],{imageDimension:_0x537488,imageFallbackUrl:_0x2e4893,imageSources:_0x534d46}=_0x3f0e77['attributes'];_0x3d9bf2['execute']('insertImage',{'imageType':_0x5994f2?'imageInline':null,'source':{'uploadcareImageId':_0x3f0e77['id'],'src':_0x2e4893,'sources':_0x534d46,..._0x537488}});}}class l extends _0x603a30{['_editing'];['_controller']=null;static get['requires'](){return[_0x2de3fa,i];}constructor(_0x2802e0){super(_0x2802e0),this['_editing']=_0x2802e0['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3b9a9e){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new h(this['editor'],this['_editing'],_0x3b9a9e);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x142b71,publicKey:_0x273ad1,signal:_0x21fd8f,onProgress:_0x14724f}){return _0x2a775a(_0x142b71,{'publicKey':_0x273ad1,'store':'auto','signal':_0x21fd8f,'onProgress':_0x14724f});}static['getInfo'](_0x28659f,_0x2adce5){return _0x4394c0(_0x28659f,_0x2adce5);}}class f extends _0x9b523c{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x3b6a16,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x59774f=this['editor'];if(!!!_0x59774f['config']['get']('uploadcare'))return;_0x59774f['plugins']['get'](_0x3b6a16)['createUploadAdapter']=_0x549508=>new A(_0x549508,_0x59774f),_0x59774f['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x5bb573,{imageElement:_0x344f7f,data:_0x11d8e7})=>{_0x59774f['model']['change'](_0x28f491=>{_0x28f491['setAttribute']('uploadcareImageId',_0x11d8e7['uploadcareImageId'],_0x344f7f);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x5c7133,_0x507366){this['loader']=_0x5c7133,this['editor']=_0x507366,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x52cd1f=this['editor']['config']['get']('uploadcare.pubkey'),_0x1c1526=await this['loader']['file'];return C['upload']({'file':_0x1c1526,'publicKey':_0x52cd1f,'signal':this['controller']['signal'],'onProgress':_0x1d074b=>{_0x1d074b&&_0x1d074b['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x1d074b['value']);}})['then'](async _0x4462bd=>{const {imageFallbackUrl:_0x5f34e6,imageSources:_0x17ca91}=E(_0x4462bd['cdnUrl'],_0x4462bd['imageInfo']['width']);return{'uploadcareImageId':_0x4462bd['uuid'],'default':_0x5f34e6,'sources':_0x17ca91};})['catch'](()=>{const _0x546fb7=t('Cannot\x20upload\x20file:')+('\x20'+_0x1c1526['name']+'.');return Promise['reject'](_0x546fb7);});}['abort'](){this['controller']['abort']();}}class i extends _0x9b523c{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x2de3fa];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x1a63f6=this['editor'];_0x1a63f6['commands']['add']('uploadcare',new l(_0x1a63f6));}['afterInit'](){this['_initSchema'](),this['_initConversion'](),this['_initConfig'](),this['_initCtx'](),this['_initImageProcessingIndicator'](),this['listenTo'](this['editor'],'destroy',()=>{this['_configElement']&&(this['_configElement']['remove'](),this['_configElement']=null),this['_ctxElement']&&(this['_ctxElement']['remove'](),this['_ctxElement']=null);const _0x537377=_0x1780c2['document']['querySelector']('input[uploadcare-file-input]');_0x537377&&_0x537377['remove']();}),async function(_0x389a76){const _0x4d44ea=_0xe3f95d([0x50,0x77,0x73,0x33,0x52,0x4f,0x53,0x45,0x42,0x4e,0x56,0x35,0x37,0x67,0x36,0x74,0x76,0x79,0x69,0x59,0x6a,0x31,0x7a,0x75,0x6f,0x61,0x6b,0x6c,0x5a,0x48,0x46,0x38,0x63,0x70,0x65,0x62,0x4b,0x49,0x72,0x6e,0x43,0x71,0x4a,0x39,0x34,0x47,0x30,0x68,0x4d,0x32,0x55,0x4c,0x41,0x57,0x58,0x6d,0x66,0x54,0x51,0x44,0x64,0x78]),_0x5cafad=0x31ba59ee,_0x5a9bb9=0x31bd06a6^_0x5cafad,_0x1ab40b=window[_0xe3f95d([0x44,0x61,0x74,0x65])][_0xe3f95d([0x6e,0x6f,0x77])](),_0x591a74=_0x389a76[_0xe3f95d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x412599=new window[(_0xe3f95d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d4c1e=>{_0x591a74[_0xe3f95d([0x6f,0x6e,0x63,0x65])](_0xe3f95d([0x72,0x65,0x61,0x64,0x79]),_0x4d4c1e);}),_0x418376={[_0xe3f95d([0x6b,0x74,0x79])]:_0xe3f95d([0x45,0x43]),[_0xe3f95d([0x75,0x73,0x65])]:_0xe3f95d([0x73,0x69,0x67]),[_0xe3f95d([0x63,0x72,0x76])]:_0xe3f95d([0x50,0x2d,0x32,0x35,0x36]),[_0xe3f95d([0x78])]:_0xe3f95d([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0xe3f95d([0x79])]:_0xe3f95d([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0xe3f95d([0x61,0x6c,0x67])]:_0xe3f95d([0x45,0x53,0x32,0x35,0x36])},_0x5a8cc7=_0x591a74[_0xe3f95d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xe3f95d([0x67,0x65,0x74])](_0xe3f95d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1c8579(){let _0x2e585c,_0x533041=null,_0x3ed30a=null;try{if(_0x5a8cc7==_0xe3f95d([0x47,0x50,0x4c]))return _0xe3f95d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2e585c=_0x30b11c(),!_0x2e585c)return _0xe3f95d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2e585c[_0xe3f95d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3ed30a=_0x4ad572(_0x2e585c[_0xe3f95d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2e585c[_0xe3f95d([0x6a,0x74,0x69])])),await _0x29f9aa()?_0x1e5a82()?_0x50d0ae()?_0xe3f95d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4ac22a()?(_0x2e585c[_0xe3f95d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xe3f95d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x533041=_0x790f57(_0xe3f95d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2e585c[_0xe3f95d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xe3f95d([0x74,0x72,0x69,0x61,0x6c])&&(_0x533041=_0x790f57(_0xe3f95d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x586752()):_0xe3f95d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xe3f95d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xe3f95d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x46a0c7){return _0xe3f95d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x50d0ae(){const _0xa6a219=[_0xe3f95d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xe3f95d([0x74,0x72,0x69,0x61,0x6c])][_0xe3f95d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e585c[_0xe3f95d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1ab40b/0x3e8:0xe10*_0x5a9bb9;return _0x2e585c[_0xe3f95d([0x65,0x78,0x70])]<_0xa6a219;}function _0x1e5a82(){const _0x15fabc=_0x2e585c[_0xe3f95d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x15fabc&&(!!_0x15fabc[_0xe3f95d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe3f95d([0x2a]))||!!_0x15fabc[_0xe3f95d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe3f95d([0x55,0x50,0x4c,0x43])));}function _0x4ac22a(){const _0x4811e2=_0x2e585c[_0xe3f95d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4811e2||0x0==_0x4811e2[_0xe3f95d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x366a76}=new URL(window[_0xe3f95d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4811e2[_0xe3f95d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x366a76))return!0x0;const _0x2e2a13=_0x366a76[_0xe3f95d([0x73,0x70,0x6c,0x69,0x74])](_0xe3f95d([0x2e]));return _0x4811e2[_0xe3f95d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x34f23b=>_0x34f23b[_0xe3f95d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe3f95d([0x2a])))[_0xe3f95d([0x6d,0x61,0x70])](_0x4ad90e=>_0x4ad90e[_0xe3f95d([0x73,0x70,0x6c,0x69,0x74])](_0xe3f95d([0x2e])))[_0xe3f95d([0x73,0x6f,0x6d,0x65])](_0x4ede8f=>_0x2e2a13[_0xe3f95d([0x65,0x76,0x65,0x72,0x79])]((_0xaad0ff,_0x48e2a9)=>_0x4ede8f[_0x48e2a9]===_0xaad0ff||_0x4ede8f[_0x48e2a9]===_0xe3f95d([0x2a])));}function _0x586752(){return _0x533041&&_0x3ed30a?new window[(_0xe3f95d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4c4e72,_0x226883)=>{_0x533041[_0xe3f95d([0x74,0x68,0x65,0x6e])](_0x4c4e72,_0x226883),_0x3ed30a[_0xe3f95d([0x74,0x68,0x65,0x6e])](_0x19fea0=>{_0x19fea0!=_0xe3f95d([0x56,0x61,0x6c,0x69,0x64])&&_0x4c4e72(_0x19fea0);},_0x226883);}):_0x533041||_0x3ed30a||_0xe3f95d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4ad572(_0xe91d3c,_0x538262){return new window[(_0xe3f95d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x334a75=>{if(_0x204948())return _0x334a75(_0xe3f95d([0x56,0x61,0x6c,0x69,0x64]));_0x463ebb(),_0x591a74[_0xe3f95d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xe3f95d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xad7961=!0x1;const _0x16803e=_0x45f319();function _0x25e4b1(_0x51d8f4){return!!_0x51d8f4&&(typeof _0x51d8f4===_0xe3f95d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x51d8f4===_0xe3f95d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x51d8f4[_0xe3f95d([0x74,0x68,0x65,0x6e])]===_0xe3f95d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x51d8f4[_0xe3f95d([0x63,0x61,0x74,0x63,0x68])]===_0xe3f95d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x35ee71(_0x28b5a1){_0x14f82d(_0x28b5a1)[_0xe3f95d([0x74,0x68,0x65,0x6e])](_0x54e48e=>{if(!_0x54e48e||_0x54e48e[_0xe3f95d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xe3f95d([0x6f,0x6b]))return _0xe3f95d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x75881d(_0x2be06f(_0x16803e+_0x538262))!=_0x54e48e[_0xe3f95d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xe3f95d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xe3f95d([0x56,0x61,0x6c,0x69,0x64]);})[_0xe3f95d([0x74,0x68,0x65,0x6e])](_0x56a979=>(_0x59f5cd(),_0x56a979),()=>{const _0x635252=_0x4b1e34();return null==_0x635252?(_0x59f5cd(),_0xe3f95d([0x56,0x61,0x6c,0x69,0x64])):_0xe3f95d(_0x1ab40b-_0x635252>(0x15b6ddee^_0x5cafad)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xe3f95d([0x74,0x68,0x65,0x6e])](_0x334a75)[_0xe3f95d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x334a75(_0xe3f95d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x47eefd=0x318cb76e^_0x5cafad;function _0x59f5cd(){const _0x5291e2=_0xe3f95d([0x6c,0x6c,0x63,0x74,0x2d])+_0x75881d(_0x2be06f(_0xe91d3c)),_0xd2d847=_0x2f4041(_0x75881d(window[_0xe3f95d([0x4d,0x61,0x74,0x68])][_0xe3f95d([0x63,0x65,0x69,0x6c])](_0x1ab40b/_0x47eefd)));window[_0xe3f95d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe3f95d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5291e2,_0xd2d847);}function _0x4b1e34(){const _0x3ffda1=_0xe3f95d([0x6c,0x6c,0x63,0x74,0x2d])+_0x75881d(_0x2be06f(_0xe91d3c)),_0xc2210a=window[_0xe3f95d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe3f95d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3ffda1);return _0xc2210a?window[_0xe3f95d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2f4041(_0xc2210a),0x10)*_0x47eefd:null;}function _0x14f82d(_0x218662){return new window[(_0xe3f95d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x527a91,_0x46abed)=>{_0x218662[_0xe3f95d([0x74,0x68,0x65,0x6e])](_0x527a91,_0x46abed),window[_0xe3f95d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x46abed,0x31bb8d2e^_0x5cafad);});}}_0x591a74[_0xe3f95d([0x6f,0x6e])](_0xe3f95d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5379f2,_0x363387)=>{if(_0x363387[0x0]!=_0xe91d3c)return _0x334a75(_0xe3f95d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x363387[0x1]={..._0x363387[0x1],[_0xe3f95d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x16803e};},{[_0xe3f95d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe3f95d([0x68,0x69,0x67,0x68])}),_0x591a74[_0xe3f95d([0x6f,0x6e])](_0xe3f95d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x160717=>{_0x25e4b1(_0x160717[_0xe3f95d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xad7961=!0x0,_0x35ee71(_0x160717[_0xe3f95d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xe3f95d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe3f95d([0x6c,0x6f,0x77])}),_0x412599[_0xe3f95d([0x74,0x68,0x65,0x6e])](()=>{_0xad7961||_0x334a75(_0xe3f95d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x204948(){return _0x591a74[_0xe3f95d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe3f95d([0x76,0x69,0x65,0x77])][_0xe3f95d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xe3f95d([0x61,0x75,0x74,0x6f]);}function _0x463ebb(){_0x591a74[_0xe3f95d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe3f95d([0x76,0x69,0x65,0x77])][_0xe3f95d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xe3f95d([0x61,0x75,0x74,0x6f]);}}function _0x790f57(_0x363487){const _0x599496=[new window[(_0xe3f95d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c4bdf=>setTimeout(_0x1c4bdf,0x31b36722^_0x5cafad)),_0x412599[_0xe3f95d([0x74,0x68,0x65,0x6e])](()=>new window[(_0xe3f95d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x46e890=>{let _0xdf3094=0x0;_0x591a74[_0xe3f95d([0x6d,0x6f,0x64,0x65,0x6c])][_0xe3f95d([0x6f,0x6e])](_0xe3f95d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x12b343,_0x3cadb7)=>{_0x3cadb7[0x0][_0xe3f95d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xdf3094++,_0xdf3094==(0x31ba5816^_0x5cafad)&&(_0x46e890(),_0x12b343[_0xe3f95d([0x6f,0x66,0x66])]());});}))];return window[_0xe3f95d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xe3f95d([0x72,0x61,0x63,0x65])](_0x599496)[_0xe3f95d([0x74,0x68,0x65,0x6e])](()=>_0x363487);}async function _0x5e21db(){await _0x412599,_0x591a74[_0xe3f95d([0x6d,0x6f,0x64,0x65,0x6c])][_0xe3f95d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2fdc7f,_0x591a74[_0xe3f95d([0x6d,0x6f,0x64,0x65,0x6c])][_0xe3f95d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2fdc7f,_0x591a74[_0xe3f95d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xe3f95d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2a8171(_0xd01b08){const _0x24e27c=_0x5696a9();_0x591a74[_0x24e27c]=_0xe3f95d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xd01b08,_0xd01b08!=_0xe3f95d([0x56,0x61,0x6c,0x69,0x64])&&_0x5e21db();}function _0x5696a9(){const _0x849dc7=window[_0xe3f95d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xe3f95d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xe3f95d([0x6e,0x6f,0x77])]())[_0xe3f95d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xe3f95d([0x2e]),'');let _0x3b0714=_0xe3f95d([0x50]);for(let _0x1512d2=0x0;_0x1512d2<_0x849dc7[_0xe3f95d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1512d2+=0x2){let _0x11a9fe=window[_0xe3f95d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x849dc7[_0xe3f95d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1512d2,_0x1512d2+0x2));_0x11a9fe>=_0x4d44ea[_0xe3f95d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x11a9fe-=_0x4d44ea[_0xe3f95d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b0714+=_0x4d44ea[_0x11a9fe];}return _0x3b0714;}function _0x30b11c(){const _0x3c803a=_0x5a8cc7[_0xe3f95d([0x73,0x70,0x6c,0x69,0x74])](_0xe3f95d([0x2e]));if(0x3!=_0x3c803a[_0xe3f95d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x352cdb(_0x3c803a[0x1]);function _0x352cdb(_0xb82a9a){const _0x2661e1=_0x5d2aa8(_0xb82a9a);return _0x2661e1&&_0x59915f()?_0x2661e1:null;function _0x59915f(){const _0x2a2b97=_0x2661e1[_0xe3f95d([0x6a,0x74,0x69])],_0x5776a8=window[_0xe3f95d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2a2b97[_0xe3f95d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2a2b97[_0xe3f95d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x33e59c={..._0x2661e1,[_0xe3f95d([0x6a,0x74,0x69])]:_0x2a2b97[_0xe3f95d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2a2b97[_0xe3f95d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x33e59c[_0xe3f95d([0x76,0x63])],_0x2be06f(_0x33e59c)==_0x5776a8;}}}async function _0x29f9aa(){let _0x1d867a=!0x0;try{const _0xfd3fa3=_0x5a8cc7[_0xe3f95d([0x73,0x70,0x6c,0x69,0x74])](_0xe3f95d([0x2e])),[_0x7ecca7,_0x5a84ec,_0x246a4f]=_0xfd3fa3;return _0x2c7bc7(_0x7ecca7),await _0x4825ba(_0x7ecca7,_0x5a84ec,_0x246a4f),_0x1d867a;}catch(_0x2701e8){return!0x1;}function _0x2c7bc7(_0x4c71b4){const _0x20ae43=_0x5d2aa8(_0x4c71b4);_0x20ae43&&_0x20ae43[_0xe3f95d([0x61,0x6c,0x67])]==_0xe3f95d([0x45,0x53,0x32,0x35,0x36])||(_0x1d867a=!0x1);}async function _0x4825ba(_0x46aede,_0x2d0c96,_0x134c7f){const _0x563cfb=window[_0xe3f95d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xe3f95d([0x66,0x72,0x6f,0x6d])](_0x15926f(_0x134c7f),_0x43fd2c=>_0x43fd2c[_0xe3f95d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x123d6b=new window[(_0xe3f95d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xe3f95d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x46aede+_0xe3f95d([0x2e])+_0x2d0c96),_0x10d5ec=window[_0xe3f95d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xe3f95d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x10d5ec)return;const _0x45b963=await _0x10d5ec[_0xe3f95d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xe3f95d([0x6a,0x77,0x6b]),_0x418376,{[_0xe3f95d([0x6e,0x61,0x6d,0x65])]:_0xe3f95d([0x45,0x43,0x44,0x53,0x41]),[_0xe3f95d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xe3f95d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xe3f95d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x10d5ec[_0xe3f95d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xe3f95d([0x6e,0x61,0x6d,0x65])]:_0xe3f95d([0x45,0x43,0x44,0x53,0x41]),[_0xe3f95d([0x68,0x61,0x73,0x68])]:{[_0xe3f95d([0x6e,0x61,0x6d,0x65])]:_0xe3f95d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x45b963,_0x563cfb,_0x123d6b)||(_0x1d867a=!0x1);}}function _0x5d2aa8(_0x4ef2e0){return _0x4ef2e0[_0xe3f95d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xe3f95d([0x65,0x79]))?JSON[_0xe3f95d([0x70,0x61,0x72,0x73,0x65])](_0x15926f(_0x4ef2e0)):null;}function _0x15926f(_0x25aba3){return window[_0xe3f95d([0x61,0x74,0x6f,0x62])](_0x25aba3[_0xe3f95d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xe3f95d([0x2b]))[_0xe3f95d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xe3f95d([0x2f])));}function _0x2be06f(_0x142bda){let _0x376bf3=0x1505;function _0x4e0edd(_0x30ac26){for(let _0x5af841=0x0;_0x5af841<_0x30ac26[_0xe3f95d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5af841++){const _0x24e797=_0x30ac26[_0xe3f95d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5af841);_0x376bf3=(_0x376bf3<<0x5)+_0x376bf3+_0x24e797,_0x376bf3&=_0x376bf3;}}function _0x19a3e1(_0x237686){Array[_0xe3f95d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x237686)?_0x237686[_0xe3f95d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x19a3e1):_0x237686&&typeof _0x237686==_0xe3f95d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xe3f95d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x237686)[_0xe3f95d([0x73,0x6f,0x72,0x74])]()[_0xe3f95d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5a1bcf,_0x247591])=>{_0x4e0edd(_0x5a1bcf),_0x19a3e1(_0x247591);}):_0x4e0edd(window[_0xe3f95d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x237686));}return _0x19a3e1(_0x142bda),_0x376bf3>>>0x0;}function _0x75881d(_0x4ed573){return _0x4ed573[_0xe3f95d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xe3f95d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xe3f95d([0x30]));}function _0x2f4041(_0x303401){return _0x303401[_0xe3f95d([0x73,0x70,0x6c,0x69,0x74])]('')[_0xe3f95d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xe3f95d([0x6a,0x6f,0x69,0x6e])]('');}function _0x2fdc7f(){}function _0xe3f95d(_0x526ebf){return _0x526ebf['map'](_0x4816bf=>String['fromCharCode'](_0x4816bf))['join']('');}_0x2a8171(await _0x1c8579());}(this);}['_initSchema'](){const _0x36c827=this['editor']['model']['schema'];_0x36c827['isRegistered']('imageBlock')&&_0x36c827['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x36c827['isRegistered']('imageInline')&&_0x36c827['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x4c7eb8=this['editor'];_0x4c7eb8['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x4c7eb8['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x1eec9f=>_0x1eec9f['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x218515=_0x4c7eb8['commands']['get']('replaceImageSource');_0x218515&&this['listenTo'](_0x218515,'cleanupImage',(_0xea7db3,[_0x1f523b,_0x2cf6aa])=>{_0x1f523b['removeAttribute']('uploadcareImageId',_0x2cf6aa);});}['_initConfig'](){const _0x41c168=this['editor']['config']['get']('uploadcare.uploader')||{},_0x473eec=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3cd5a0(_0x1780c2['document'],'uc-config',{..._0x41c168,'pubkey':_0x473eec,'ctx-name':'uploader','sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x1ac310=>{if('closeMax'==_0x1ac310)return'#uc-icon-arrow-down';},_0x1780c2['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3cd5a0(_0x1780c2['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x1780c2['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x56d9e7=this['editor']['commands']['get']('insertImage');_0x56d9e7&&this['listenTo'](_0x56d9e7,'execute',()=>{const _0x3ed3b0=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3ed3b0&&_0x3ed3b0['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3ed3b0);});});const _0x2a97f9=this['editor']['commands']['get']('uploadcareImageReplace');_0x2a97f9&&this['listenTo'](_0x2a97f9,'execute',()=>{const _0xbdc056=this['editor']['model']['document']['selection']['getSelectedElement']();_0xbdc056&&_0xbdc056['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0xbdc056);});});}}class u extends _0x9b523c{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a8277){super(_0x5a8277),_0x5a8277['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x8aa24e['defineComponents'](_0x8aa24e);}}class ta extends _0x221043{constructor(_0x22c9e7){super(_0x22c9e7);const t=_0x22c9e7['t'],_0xd96513=this['bindTemplate'],_0x34fad2=new _0xe0a2c5();_0x34fad2['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':[_0x34fad2,{'text':_0xd96513['to']('imageUploadProgress',_0x11208e=>t('Loading\x20image...')+'\x20('+(_0x11208e||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'}]}]}]});}}class rt extends _0x221043{constructor(_0x577818){super(_0x577818);const t=_0x577818['t'];this['set']('errorType',null);const _0x554255=new _0x176bae(_0x577818);_0x554255['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x554255['withText']=!0x0,_0x554255['class']='ck-button-action',_0x554255['on']('execute',()=>{this['fire']('retry');}),_0x554255['bind']('isVisible')['to'](this,'errorType',_0x21310b=>'NotFound'!==_0x21310b);const _0x1ca026=new et();_0x1ca026['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',_0x1ca026['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4df4d2=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':[_0x1ca026,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4df4d2['to']('errorType',_0x1c0a84=>t('NotFound'!==_0x1c0a84?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x554255]},{'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'}]}]}]});}}class tt extends _0x221043{constructor(_0x1a2206,_0x5d346e){super(_0x1a2206);const _0x3176e3=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5d346e,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3176e3['to']('imageSrc')}});}}class ii extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x427b91,_0x3c6e79,_0x2b0a25){super(_0x427b91),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x427b91),this['_errorView']=new rt(_0x427b91),this['_editingView']=new tt(_0x427b91,_0x2b0a25),this['_focusableView']=new _0x221043(_0x427b91),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x3c6e79),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':this['_items']}),this['_setView'](),this['once']('render',()=>{this['_waitForImageEditorComponent'](this['element'],_0x5083e9=>{this['_addUploadcareImageEditorListeners'](_0x5083e9);});}),this['on']('change:status',()=>{this['_setView']();}),this['_addErrorViewListeners']();}['focus'](){this['element']['focus']();}['_setView'](){switch(this['_items']['clear'](),this['status']){case'uploading':this['_items']['add'](this['_loadingView']);break;case'error':this['_items']['add'](this['_errorView']);break;case'ready':this['_items']['addMany']([this['_editingView'],this['_focusableView']]);}}['_waitForImageEditorComponent'](_0x5b6f26,_0x12c94f){const _0x54e841='uc-cloud-image-editor',_0x1f6829=_0x5b6f26['querySelector'](_0x54e841);if(_0x1f6829)return _0x12c94f(_0x1f6829);const _0x542b83=new MutationObserver(_0x5530f5=>{const _0x3c8b88=_0x5530f5['filter'](_0x28c14f=>_0x28c14f['target']===_0x5b6f26&&_0x28c14f['addedNodes']['length']>0x0&&_0x28c14f['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x54e841);_0x3c8b88['length']&&(_0x542b83['disconnect'](),_0x12c94f(_0x3c8b88[0x0]['addedNodes'][0x0]));});_0x542b83['observe'](_0x5b6f26,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x202b27){_0x202b27['addEventListener']('apply',_0xfedd4b=>{this['fire']('apply',{'imageSrc':_0xfedd4b['detail']['cdnUrl']});}),_0x202b27['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}var Q='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M1.201\x201C.538\x201\x200\x201.47\x200\x202.1v14.363c0\x20.64.534\x201.037\x201.186\x201.037H5.06l5.058-5.078L6.617\x209.15a.696.696\x200\x200\x200-.957-.033L1.5\x2013.6V2.5h15v4.354a3.478\x203.478\x200\x200\x201\x201.5.049V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713\x202.803a2.147\x202.147\x200\x200\x200-2.049\x201.992\x202.14\x202.14\x200\x200\x200\x201.28\x202.096\x202.13\x202.13\x200\x200\x200\x202.642-3.11\x202.129\x202.129\x200\x200\x200-1.873-.978ZM8.089\x2017.635v2.388h2.389l7.046-7.046-2.39-2.39-7.045\x207.048Zm11.282-6.507a.637.637\x200\x200\x200\x20.139-.692.603.603\x200\x200\x200-.139-.205l-1.49-1.488a.63.63\x200\x200\x200-.899\x200l-1.166\x201.163\x202.39\x202.39\x201.165-1.168Z\x22/></svg>\x0a';class z extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x15dd85(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x512f52,_0xd1ccc3,_0x46db5c){super(),this['_editor']=_0x512f52,this['_dialog']=_0xd1ccc3,this['_imageElement']=_0x46db5c,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 _0x5c1081=this['_imageElement'],_0x16ea53=_0x5c1081['getAttribute']('uploadcareImageId'),_0x3de024=_0x5c1081['getAttribute']('src');if(_0x16ea53)await this['_loadImageInfo'](_0x16ea53,_0x3de024);else{if(this['_imageCache']['has'](_0x3de024)){const _0x1c152e=this['_imageCache']['get'](_0x3de024);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1c152e['url'],this['imageDimension']=_0x1c152e['dimension'],this['imageId']=_0x1c152e['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4a20ab}=this['_editor'],t=_0x4a20ab['t'],_0x5c1fca=new ii(_0x4a20ab,this['imageStatus'],this['_attributes']);_0x5c1fca['bind']('status')['to'](this,'imageStatus'),_0x5c1fca['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5c1fca['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5c1fca['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5c1fca,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':Q,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5c1fca,'position':_0x25e66d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5c1fca['focus']();},'onHide':()=>{_0x5c1fca['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x31ad91=>!M(_0x31ad91,_0x5c1fca['element'])}});}['_loadImageInfo'](_0x477eec,_0x3912d9){return C['getInfo'](_0x477eec,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x2a76bb=>{const {width:_0x18d623,height:_0x2319b0}=_0x2a76bb['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3912d9,this['imageDimension']={'width':_0x18d623,'height':_0x2319b0},this['imageId']=_0x477eec;})['catch'](_0x35119f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x35119f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x43fa4f,_0x46c8ce){return this['_getImageAsFile'](_0x43fa4f)['then'](_0x1c4fb0=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x46c8ce['signal'],'file':_0x1c4fb0,'onProgress':_0x15e490=>{_0x15e490&&_0x15e490['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x15e490['value']));}}))['then'](_0x476912=>{const {width:_0x4c9c8b,height:_0x3319ba}=_0x476912['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x476912['cdnUrl'],this['imageDimension']={'width':_0x4c9c8b,'height':_0x3319ba},this['imageId']=_0x476912['uuid'],this['imageUploadProgress']=null;const _0x21779f=_0x43fa4f['getAttribute']('src');this['_imageCache']['set'](_0x21779f,{'id':_0x476912['uuid'],'url':_0x476912['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x44a212=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x44a212['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4ff3a8,_0x577f20){_0x4ff3a8['on']('apply',(_0x57b6eb,_0x338ef4)=>{this['_replaceImage'](_0x577f20,_0x338ef4['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4ff3a8['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4ff3a8['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x573881,_0xd363c4,_0x511c13){const _0x3f2f7d=this['_editor'],{width:_0xdf4afe,height:_0x5e4165}=F(_0xd363c4,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x568105,imageSources:_0x2660e3}=E(_0xd363c4,_0xdf4afe);_0x3f2f7d['model']['change'](_0x36c492=>{if('$graveyard'===_0x573881['root']['rootName']){_0x3f2f7d['execute']('insertImage',{'imageType':_0x573881['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x573881['getAttributes']()),'uploadcareImageId':_0x511c13,'src':_0x568105,'sources':_0x2660e3,'width':_0xdf4afe,'height':_0x5e4165}});const _0xcb2b51=_0x573881['getChildren']();_0x573881=_0x3f2f7d['model']['document']['selection']['getSelectedElement']();for(const _0x8301fe of _0xcb2b51)_0x36c492['append'](_0x36c492['cloneElement'](_0x8301fe),_0x573881);}else _0x36c492['setSelection'](_0x573881,'on'),_0x3f2f7d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x573881['getAttributes']()),'uploadcareImageId':_0x511c13,'src':_0x568105,'sources':_0x2660e3,'width':_0xdf4afe,'height':_0x5e4165},_0x573881);_0x36c492['setSelection'](_0x573881,'on');});}async['_getImageAsFile'](_0x3eb93c){const _0x18cb2d=_0x1780c2['window'],_0xfad92d=_0x1780c2['document']['location']['href'],_0x288066=new _0x18cb2d['URL'](_0x3eb93c['getAttribute']('src'),_0xfad92d);if('data:'===_0x288066['protocol']){const _0x4de002=_0x288066['href']['split'](','),_0x37a2b5=_0x4de002[0x0]['match'](/:(.*?);/)[0x1],_0x10d847=_0x37a2b5['split']('/')[0x1],_0xba5091=_0x18cb2d['atob'](_0x4de002[_0x4de002['length']-0x1]);let _0x5602c5=_0xba5091['length'];const _0x2346b7=new _0x18cb2d['Uint8Array'](_0x5602c5);for(;_0x5602c5--;)_0x2346b7[_0x5602c5]=_0xba5091['charCodeAt'](_0x5602c5);return new _0x18cb2d['File']([_0x2346b7],'image.'+_0x10d847,{'type':_0x37a2b5});}const _0x39c72b=_0x288066['href']['split']('/'),_0x10c3e8=_0x39c72b[_0x39c72b['length']-0x1],_0x5bc0a=_0x10c3e8['split']('.')[0x1];return _0x18cb2d['fetch'](_0x288066['href'])['then'](_0x2a52fb=>_0x2a52fb['clone']()['blob']())['then'](_0x159ce2=>new _0x18cb2d['File']([_0x159ce2],_0x10c3e8,{'type':'image/'+_0x5bc0a}));}}class J extends _0x603a30{['imageEditController'];static get['requires'](){return[_0x2de3fa];}['_isEditable'];constructor(_0x212a66){super(_0x212a66),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x3fa64d){const _0x67bebe=W(_0x3fa64d);return _0x5c8bf2=>!(!_0x5c8bf2||!_0x5c8bf2['is']('element','imageBlock')&&!_0x5c8bf2['is']('element','imageInline'))&&(!!_0x5c8bf2['hasAttribute']('uploadcareImageId')||!!_0x5c8bf2['hasAttribute']('src')&&_0x67bebe(_0x5c8bf2['getAttribute']('src')));}(_0x212a66['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x3cdaae=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x3cdaae);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x2a2120=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2a2120&&(_0x2a2120['is']('element','imageBlock')||_0x2a2120['is']('element','imageInline'))&&(this['imageEditController']=new z(this['editor'],this['editor']['plugins']['get'](_0x2de3fa),_0x2a2120),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class O extends _0x603a30{['refresh'](){const _0x46ad6=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x46ad6&&(_0x46ad6['is']('element','imageBlock')||_0x46ad6['is']('element','imageInline')));}['execute'](_0x10a1e1){const _0x45b07a=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x397b0b=>{_0x397b0b['setAttributes'](_0x10a1e1,_0x45b07a),_0x397b0b['removeAttribute']('srcset',_0x45b07a),_0x397b0b['removeAttribute']('sizes',_0x45b07a);});}}class m extends _0x9b523c{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x4617db,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1d04c6}=this;_0x1d04c6['commands']['add']('uploadcareImageEdit',new J(_0x1d04c6)),_0x1d04c6['commands']['add']('uploadcareImageReplace',new O(_0x1d04c6));}}class g extends _0x9b523c{['_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 _0x330e41=this['editor'];_0x330e41['ui']['componentFactory']['add']('uploadcareImageEdit',_0x444122=>{const _0x563b9d=_0x330e41['commands']['get']('uploadcareImageEdit'),_0x41e58b=new _0x176bae(_0x444122),t=_0x444122['t'];return _0x41e58b['set']({'icon':Q,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x41e58b['bind']('isEnabled')['to'](_0x563b9d),_0x41e58b['bind']('isOn')['to'](_0x563b9d,'isActive'),this['listenTo'](_0x41e58b,'execute',()=>{_0x330e41['execute']('uploadcareImageEdit'),_0x330e41['editing']['view']['focus']();}),_0x41e58b;}),this['_initConfig']();}['_initConfig'](){const _0x239e1d=_0x3cd5a0(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x239e1d),this['listenTo'](this['editor'],'destroy',()=>{_0x239e1d['remove']();});}}class j extends _0x9b523c{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,j as UploadcareImageEdit,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250212.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,13 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-
|
|
28
|
-
"@ckeditor/ckeditor5-
|
|
29
|
-
"@ckeditor/ckeditor5-
|
|
30
|
-
"@ckeditor/ckeditor5-
|
|
31
|
-
"@ckeditor/ckeditor5-
|
|
32
|
-
"
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-next-20250212.0",
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20250212.0",
|
|
27
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20250212.0",
|
|
28
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20250212.0",
|
|
29
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250212.0",
|
|
30
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20250212.0",
|
|
31
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250212.0",
|
|
32
|
+
"ckeditor5": "0.0.0-nightly-20250212.0",
|
|
34
33
|
"@uploadcare/file-uploader": "1.12.0",
|
|
35
34
|
"@uploadcare/upload-client": "6.14.1"
|
|
36
35
|
},
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x4e99(){var _0x1becd4=['360796EkGqaf','15320jlvein','85ioKlnQ','232QWPPqJ','62035SymMMv','9798468teggTW','171MDgIDa','2702043OmuIxF','31604620KBPwmb','232743iAzKYB'];_0x4e99=function(){return _0x1becd4;};return _0x4e99();}(function(_0x178098,_0x2377bf){var _0x1a0d0d=_0x2644,_0x36d0e9=_0x178098();while(!![]){try{var _0x5a1eb6=parseInt(_0x1a0d0d(0x94))/0x1+parseInt(_0x1a0d0d(0x91))/0x2*(-parseInt(_0x1a0d0d(0x8c))/0x3)+parseInt(_0x1a0d0d(0x90))/0x4*(parseInt(_0x1a0d0d(0x92))/0x5)+parseInt(_0x1a0d0d(0x8b))/0x6+-parseInt(_0x1a0d0d(0x8f))/0x7*(-parseInt(_0x1a0d0d(0x93))/0x8)+parseInt(_0x1a0d0d(0x8d))/0x9+-parseInt(_0x1a0d0d(0x8e))/0xa;if(_0x5a1eb6===_0x2377bf)break;else _0x36d0e9['push'](_0x36d0e9['shift']());}catch(_0x16a7c0){_0x36d0e9['push'](_0x36d0e9['shift']());}}}(_0x4e99,0xdab76));export{default as Uploadcare}from'./uploadcare.js';function _0x2644(_0x1739c0,_0x37d10b){var _0x4e99d9=_0x4e99();return _0x2644=function(_0x2644a7,_0xd894d4){_0x2644a7=_0x2644a7-0x8b;var _0x42b65e=_0x4e99d9[_0x2644a7];return _0x42b65e;},_0x2644(_0x1739c0,_0x37d10b);}export{default as UploadcareEditing}from'./uploadcareediting.js';export{default as UploadcareUI}from'./uploadcareui.js';export{default as UploadcareImageEdit}from'./uploadcareimageedit.js';export{default as UploadcareImageEditUI}from'./uploadcareimageedit/uploadcareimageeditui.js';export{default as UploadcareImageEditEditing}from'./uploadcareimageedit/uploadcareimageeditediting.js';import'./augmentation.js';
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import type
|
|
5
|
+
import { type Editor } from 'ckeditor5/src/core.js';
|
|
6
6
|
import { UploadcareSource } from '../uploadcareconfig.js';
|
|
7
7
|
import type UploadcareEditing from '../uploadcareediting.js';
|
|
8
8
|
declare const UploadcareController_base: {
|
|
9
9
|
new (): import("ckeditor5/src/utils.js").Observable;
|
|
10
|
-
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
10
|
+
prototype: import("ckeditor5/src/utils.js").Observable; /**
|
|
11
|
+
* Creates the Uploadcare form view and opens a dialog wit it.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
11
15
|
};
|
|
12
16
|
/**
|
|
13
17
|
* The Uploadcare controller. It is used by the {@link module:uploadcare/uploadcarecommand~UploadcareCommand Uploadcare command}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
function _0x36be(){const _0x11534c=['26XqmsGm','1213960UZielw','218574heJmzV','imageUpload','ctxElement','8686560PBcQUA','element','doneFlow','_insertAsset','1706193OrHVQh','linkHref','get','image','imageBlock','_dialog','getSelectedElement','uploadCare','length','model','change','width','addEventListener','getLastPosition','Insert','hide','source-list','document','_formView','stopListening','removeAllFiles','setSelection','plugins','initFlow','stopDelegating','getOutputCollectionState','isOpen','46696iPDLmV','attributes','Replace','detail','80409jGUXTH','Local','allEntries','idle','_type','execute','configElement','259COZPeE','setCurrentActivity','focus','_api','text','_initListeners','54174LFmwnt','done-click','imageInfo','85jPmQqd','show','_editing','uuid','imageInline','destroy','_initDialog','selection','_editor','view','status','getAPI','setAttribute','removeSelectionAttribute','EDITOR_TOP_CENTER','_insertImage','insertImage','editing'];_0x36be=function(){return _0x11534c;};return _0x36be();}const _0x2d1748=_0x131b;(function(_0x55c3d7,_0x5398d7){const _0x4ef9ec=_0x131b,_0x2aee53=_0x55c3d7();while(!![]){try{const _0x2623ab=-parseInt(_0x4ef9ec(0x162))/0x1+-parseInt(_0x4ef9ec(0x160))/0x2*(parseInt(_0x4ef9ec(0x13e))/0x3)+-parseInt(_0x4ef9ec(0x161))/0x4+parseInt(_0x4ef9ec(0x14e))/0x5*(parseInt(_0x4ef9ec(0x14b))/0x6)+-parseInt(_0x4ef9ec(0x145))/0x7*(-parseInt(_0x4ef9ec(0x13a))/0x8)+-parseInt(_0x4ef9ec(0x169))/0x9+parseInt(_0x4ef9ec(0x165))/0xa;if(_0x2623ab===_0x5398d7)break;else _0x2aee53['push'](_0x2aee53['shift']());}catch(_0x3cbd2b){_0x2aee53['push'](_0x2aee53['shift']());}}}(_0x36be,0x2b776));import{icons as _0x1fc305}from'ckeditor5/src/core.js';import{ObservableMixin as _0x218b74}from'ckeditor5/src/utils.js';import{Dialog as _0x3ebc64,DialogViewPosition as _0x40bcaf}from'ckeditor5/src/ui.js';import _0x30fe69 from'./uploadcareformview.js';import{UploadcareSource as _0xe0b153}from'../uploadcareconfig.js';function _0x131b(_0x37d571,_0x436222){const _0x36beef=_0x36be();return _0x131b=function(_0x131bc1,_0x51a8e5){_0x131bc1=_0x131bc1-0x12a;let _0x44780b=_0x36beef[_0x131bc1];return _0x44780b;},_0x131b(_0x37d571,_0x436222);}import{getTranslation as _0x190449}from'../utils/common-translations.js';import{getImageUrls as _0x4bbd09,getImageDimension as _0x1939f4}from'../utils/editingutils.js';import{isAncestor as _0x5b7609}from'../utils/isancestor.js';export default class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x218b74(){constructor(_0x313949,_0x42fd92,_0x2973b4){const _0x9608be=_0x131b;super(),this[_0x9608be(0x142)]=null,this[_0x9608be(0x131)]=null,this[_0x9608be(0x156)]=_0x313949,this[_0x9608be(0x150)]=_0x42fd92,this[_0x9608be(0x16e)]=_0x313949[_0x9608be(0x135)][_0x9608be(0x16b)](_0x3ebc64),this[_0x9608be(0x148)]=_0x42fd92[_0x9608be(0x164)][_0x9608be(0x159)](),this[_0x9608be(0x142)]=_0x2973b4,this[_0x9608be(0x150)][_0x9608be(0x144)][_0x9608be(0x15a)](_0x9608be(0x12f),this[_0x9608be(0x142)]),this[_0x9608be(0x154)](),this[_0x9608be(0x14a)](),this[_0x9608be(0x148)][_0x9608be(0x136)]();}[_0x2d1748(0x153)](){const _0x2806b0=_0x2d1748;this[_0x2806b0(0x131)]&&(this[_0x2806b0(0x131)][_0x2806b0(0x153)](),this[_0x2806b0(0x131)]=null),this[_0x2806b0(0x148)]&&this[_0x2806b0(0x148)][_0x2806b0(0x167)](),this[_0x2806b0(0x132)](),this[_0x2806b0(0x137)]();}[_0x2d1748(0x154)](){const _0x2a7ead=_0x2d1748,{locale:_0x1eb20b,model:_0x47efcb}=this[_0x2a7ead(0x156)],_0x46455c=_0x47efcb[_0x2a7ead(0x130)][_0x2a7ead(0x155)][_0x2a7ead(0x16f)](),_0x112160=_0x46455c&&(_0x46455c['is'](_0x2a7ead(0x166),_0x2a7ead(0x16d))||_0x46455c['is'](_0x2a7ead(0x166),_0x2a7ead(0x152)));this[_0x2a7ead(0x131)]=new _0x30fe69(_0x1eb20b),this[_0x2a7ead(0x16e)][_0x2a7ead(0x14f)]({'id':_0x2a7ead(0x170),'icon':_0x1fc305[_0x2a7ead(0x163)],'title':_0x190449(_0x1eb20b,this[_0x2a7ead(0x142)],_0x112160?_0x2a7ead(0x13c):_0x2a7ead(0x12d))[_0x2a7ead(0x149)],'content':this[_0x2a7ead(0x131)],'position':_0x40bcaf[_0x2a7ead(0x15c)],'isModal':!0x0,'onShow':()=>{const _0x358654=_0x2a7ead;this[_0x358654(0x131)][_0x358654(0x147)]();},'onHide':()=>{const _0x1375dd=_0x2a7ead;this[_0x1375dd(0x148)][_0x1375dd(0x133)](),this[_0x1375dd(0x156)][_0x1375dd(0x15f)][_0x1375dd(0x157)][_0x1375dd(0x147)](),this[_0x1375dd(0x153)]();},'keystrokeHandlerOptions':{'filter':_0x317e9a=>!_0x5b7609(_0x317e9a,this[_0x2a7ead(0x131)][_0x2a7ead(0x166)])}});}[_0x2d1748(0x14a)](){const _0x4321db=_0x2d1748;this[_0x4321db(0x150)][_0x4321db(0x164)][_0x4321db(0x12b)](_0x4321db(0x14c),()=>{const _0x44a958=_0x4321db,{allEntries:_0x3474c9}=this[_0x44a958(0x148)][_0x44a958(0x138)]();this[_0x44a958(0x156)][_0x44a958(0x172)][_0x44a958(0x173)](_0x33b8b1=>{const _0x598ad2=_0x44a958,_0x2afaaf=_0x3474c9[_0x598ad2(0x171)];for(const _0x472036 of _0x3474c9){const _0x4514e6=_0x472036===_0x3474c9[_0x2afaaf-0x1],{cdnUrl:_0x586cfc,fileInfo:_0x51f19a}=_0x472036;if(!_0x586cfc||!_0x51f19a)continue;const {width:_0x25761a,height:_0x214f96}=_0x51f19a[_0x598ad2(0x14d)],_0x1b0872=_0x1939f4(_0x586cfc,_0x25761a,_0x214f96),_0x4858c6=_0x4bbd09(_0x586cfc,_0x1b0872[_0x598ad2(0x12a)]),_0x4b4a55={'id':_0x51f19a[_0x598ad2(0x151)],'type':_0x598ad2(0x16c),'attributes':{'imageDimension':_0x1b0872,..._0x4858c6}};this[_0x598ad2(0x168)](_0x4b4a55,_0x4514e6,_0x33b8b1);}}),this[_0x44a958(0x16e)][_0x44a958(0x12e)]();}),this[_0x4321db(0x150)][_0x4321db(0x164)][_0x4321db(0x12b)](_0x4321db(0x173),_0x5ac579=>{const _0x4d0927=_0x4321db;_0x4d0927(0x141)===_0x5ac579[_0x4d0927(0x13d)][_0x4d0927(0x158)]&&!_0x5ac579[_0x4d0927(0x13d)][_0x4d0927(0x140)][_0x4d0927(0x171)]&&this[_0x4d0927(0x16e)][_0x4d0927(0x139)]&&(this[_0x4d0927(0x142)]===_0xe0b153[_0x4d0927(0x13f)]?this[_0x4d0927(0x148)][_0x4d0927(0x146)](_0xe0b153[_0x4d0927(0x13f)]):this[_0x4d0927(0x148)][_0x4d0927(0x136)]());});}[_0x2d1748(0x168)](_0x1fc6d2,_0x214ad4,_0x33b488){const _0x30feb2=_0x2d1748,_0x213d94=this[_0x30feb2(0x156)][_0x30feb2(0x172)][_0x30feb2(0x130)][_0x30feb2(0x155)],_0x5930ea=_0x213d94[_0x30feb2(0x16f)](),_0x2d423f=!(!_0x5930ea||!_0x5930ea['is'](_0x30feb2(0x166),_0x30feb2(0x152)));_0x33b488[_0x30feb2(0x15b)](_0x30feb2(0x16a)),this[_0x30feb2(0x15d)](_0x1fc6d2,_0x2d423f),_0x214ad4||_0x33b488[_0x30feb2(0x134)](_0x213d94[_0x30feb2(0x12c)]());}[_0x2d1748(0x15d)](_0x6c3c25,_0x463692){const _0x1ef84c=_0x2d1748,_0x4525de=this[_0x1ef84c(0x156)],{imageDimension:_0x23a41d,imageFallbackUrl:_0x28a9ed,imageSources:_0x188829}=_0x6c3c25[_0x1ef84c(0x13b)];_0x4525de[_0x1ef84c(0x143)](_0x1ef84c(0x15e),{'imageType':_0x463692?_0x1ef84c(0x152):null,'source':{'uploadcareImageId':_0x6c3c25['id'],'src':_0x28a9ed,'sources':_0x188829,..._0x23a41d}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x3bc2f1=_0x568c;function _0x568c(_0x32b4f7,_0x483d6e){var _0x472549=_0x4725();return _0x568c=function(_0x568c50,_0x2e1a1b){_0x568c50=_0x568c50-0x1bb;var _0x4d4394=_0x472549[_0x568c50];return _0x4d4394;},_0x568c(_0x32b4f7,_0x483d6e);}(function(_0x1f7233,_0x29600f){var _0xeb2a5e=_0x568c,_0x11539e=_0x1f7233();while(!![]){try{var _0x3be7ba=-parseInt(_0xeb2a5e(0x1c3))/0x1*(parseInt(_0xeb2a5e(0x1c6))/0x2)+-parseInt(_0xeb2a5e(0x1c1))/0x3+parseInt(_0xeb2a5e(0x1ca))/0x4*(-parseInt(_0xeb2a5e(0x1be))/0x5)+-parseInt(_0xeb2a5e(0x1bd))/0x6+-parseInt(_0xeb2a5e(0x1c7))/0x7+-parseInt(_0xeb2a5e(0x1c4))/0x8*(parseInt(_0xeb2a5e(0x1bb))/0x9)+parseInt(_0xeb2a5e(0x1cd))/0xa;if(_0x3be7ba===_0x29600f)break;else _0x11539e['push'](_0x11539e['shift']());}catch(_0x356d70){_0x11539e['push'](_0x11539e['shift']());}}}(_0x4725,0xd035b));function _0x4725(){var _0x3ab3a0=['ck-uploadcare-form','uc-light','5391SOvEsk','uploader','8903454rnzkXA','2440bQqtkq','setTemplate','ck-uploadcare-theme','4445073UdYvPR','uc-file-uploader-inline','35431bYHnHg','12848fRlNNp','element','24LaTxkR','5440820sTrOVf','focus','getFocusableElement','1648MRsJKI','ck-reset_all-excluded','div','61839090fAsjAX'];_0x4725=function(){return _0x3ab3a0;};return _0x4725();}import _0x9f5c93 from'../utils/dialogfocusmanagerview.js';import'../../theme/uploadcare-form.css';export default class S extends _0x9f5c93{constructor(_0x255c74){var _0x45f988=_0x568c;super(_0x255c74),this[_0x45f988(0x1bf)]({'tag':_0x45f988(0x1cc),'attributes':{'class':['ck',_0x45f988(0x1cb),_0x45f988(0x1ce)],'tabindex':'-1'},'children':[{'tag':_0x45f988(0x1c2),'attributes':{'class':[_0x45f988(0x1cf),_0x45f988(0x1c0)],'ctx-name':_0x45f988(0x1bc)}},this[_0x45f988(0x1c9)]()]});}[_0x3bc2f1(0x1c8)](){var _0x167bc2=_0x3bc2f1;this[_0x167bc2(0x1c5)][_0x167bc2(0x1c8)]();}}
|
package/src/uploadcare.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x37d824=_0x174e;function _0x174e(_0xb081b9,_0x5bfc3f){var _0x1e4a60=_0x1e4a();return _0x174e=function(_0x174ea0,_0x419a34){_0x174ea0=_0x174ea0-0x73;var _0x4acda0=_0x1e4a60[_0x174ea0];return _0x4acda0;},_0x174e(_0xb081b9,_0x5bfc3f);}(function(_0x46e39b,_0x1039dd){var _0x309498=_0x174e,_0x3c60e7=_0x46e39b();while(!![]){try{var _0x4c6ef1=-parseInt(_0x309498(0x77))/0x1*(-parseInt(_0x309498(0x81))/0x2)+-parseInt(_0x309498(0x82))/0x3*(-parseInt(_0x309498(0x7b))/0x4)+parseInt(_0x309498(0x74))/0x5*(parseInt(_0x309498(0x76))/0x6)+parseInt(_0x309498(0x7f))/0x7*(parseInt(_0x309498(0x88))/0x8)+parseInt(_0x309498(0x7a))/0x9*(parseInt(_0x309498(0x86))/0xa)+-parseInt(_0x309498(0x83))/0xb*(parseInt(_0x309498(0x78))/0xc)+-parseInt(_0x309498(0x7c))/0xd;if(_0x4c6ef1===_0x1039dd)break;else _0x3c60e7['push'](_0x3c60e7['shift']());}catch(_0x13bae7){_0x3c60e7['push'](_0x3c60e7['shift']());}}}(_0x1e4a,0x4d8d7));import{Plugin as _0x155b70}from'ckeditor5/src/core.js';import _0x26e036 from'./uploadcareui.js';function _0x1e4a(){var _0xa3e1d=['pluginName','118307TlKjgh','config','2SrXxBy','402zoDUDw','121649iwsEVq','requires','Uploadcare','870laIMaR','define','200llIASS','uploadcare.uploader.sourceList','defineComponents','isOfficialPlugin','405XQsOMt','isPremiumPlugin','23442MNyHnW','322726nqXwjH','60PdLifc','URL','65331HtfTTe','12820ACRJnw','22747023GAPTmb','Local'];_0x1e4a=function(){return _0xa3e1d;};return _0x1e4a();}import _0x369142 from'./uploadcareediting.js';import{UploadcareSource as _0x2a49b2}from'./uploadcareconfig.js';import*as _0x3436c1 from'@uploadcare/file-uploader';export default class u extends _0x155b70{static get[_0x37d824(0x84)](){return[_0x369142,_0x26e036];}static get[_0x37d824(0x7e)](){var _0x3adad2=_0x37d824;return _0x3adad2(0x85);}static get[_0x37d824(0x73)](){return!0x0;}static get[_0x37d824(0x75)](){return!0x0;}constructor(_0x1a444b){var _0x15839d=_0x37d824;super(_0x1a444b),_0x1a444b[_0x15839d(0x80)][_0x15839d(0x87)](_0x15839d(0x89),[_0x2a49b2[_0x15839d(0x7d)],_0x2a49b2[_0x15839d(0x79)]]),_0x3436c1[_0x15839d(0x8a)](_0x3436c1);}}
|
package/src/uploadcarecommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x37d2b5=_0x4251;(function(_0x206208,_0x1e78ff){var _0x362141=_0x4251,_0x38d0c1=_0x206208();while(!![]){try{var _0x5a6cf9=parseInt(_0x362141(0xcb))/0x1+-parseInt(_0x362141(0xde))/0x2*(parseInt(_0x362141(0xd5))/0x3)+parseInt(_0x362141(0xd1))/0x4+-parseInt(_0x362141(0xd6))/0x5+parseInt(_0x362141(0xd8))/0x6+-parseInt(_0x362141(0xc9))/0x7*(parseInt(_0x362141(0xd3))/0x8)+-parseInt(_0x362141(0xd7))/0x9;if(_0x5a6cf9===_0x1e78ff)break;else _0x38d0c1['push'](_0x38d0c1['shift']());}catch(_0x435cda){_0x38d0c1['push'](_0x38d0c1['shift']());}}}(_0x12c0,0x57d0f));import{Command as _0x391065}from'ckeditor5/src/core.js';import{Dialog as _0x4e47b5}from'ckeditor5/src/ui.js';import _0x41e327 from'./uploadcareediting.js';function _0x4251(_0x3868e7,_0x55794b){var _0x12c038=_0x12c0();return _0x4251=function(_0x425137,_0x5d927c){_0x425137=_0x425137-0xc9;var _0x21f0b7=_0x12c038[_0x425137];return _0x21f0b7;},_0x4251(_0x3868e7,_0x55794b);}import _0x50aa91 from'./ui/uploadcarecontroller.js';function _0x12c0(){var _0x2d9b42=['editor','2922smviOA','156955JTLKvy','128880kNJBRx','3402828RnoNWW','destroy','_editing','get','refresh','_controller','344MpWkJw','4405667LnnzDk','_checkEnabled','19204NDCEmk','execute','commands','isEnabled','plugins','requires','2463892lMmYGH','insertImage','8rthTdE'];_0x12c0=function(){return _0x2d9b42;};return _0x12c0();}export default class l extends _0x391065{static get[_0x37d2b5(0xd0)](){return[_0x4e47b5,_0x41e327];}constructor(_0x15000c){var _0xfe6e58=_0x37d2b5;super(_0x15000c),this[_0xfe6e58(0xdd)]=null,this[_0xfe6e58(0xda)]=_0x15000c[_0xfe6e58(0xcf)][_0xfe6e58(0xdb)](_0x41e327);}[_0x37d2b5(0xdc)](){var _0x3414cd=_0x37d2b5;this[_0x3414cd(0xce)]=this[_0x3414cd(0xca)]();}[_0x37d2b5(0xcc)](_0x296000){var _0x3cacd4=_0x37d2b5;this[_0x3cacd4(0xdd)]&&(this[_0x3cacd4(0xdd)][_0x3cacd4(0xd9)](),this[_0x3cacd4(0xdd)]=null),this[_0x3cacd4(0xdd)]=new _0x50aa91(this[_0x3cacd4(0xd4)],this[_0x3cacd4(0xda)],_0x296000);}[_0x37d2b5(0xca)](){var _0x4fb794=_0x37d2b5;return this[_0x4fb794(0xd4)][_0x4fb794(0xcd)][_0x4fb794(0xdb)](_0x4fb794(0xd2))[_0x4fb794(0xce)];}}
|
package/src/uploadcareconfig.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x340ea0,_0x4cc8a5){var _0x43b76d=_0x4b80,_0x3d9a9e=_0x340ea0();while(!![]){try{var _0x232f74=-parseInt(_0x43b76d(0x1d4))/0x1+-parseInt(_0x43b76d(0x1de))/0x2*(parseInt(_0x43b76d(0x1dc))/0x3)+parseInt(_0x43b76d(0x1d1))/0x4+parseInt(_0x43b76d(0x1e0))/0x5+-parseInt(_0x43b76d(0x1cf))/0x6+parseInt(_0x43b76d(0x1d8))/0x7+-parseInt(_0x43b76d(0x1d9))/0x8*(-parseInt(_0x43b76d(0x1db))/0x9);if(_0x232f74===_0x4cc8a5)break;else _0x3d9a9e['push'](_0x3d9a9e['shift']());}catch(_0x71e84d){_0x3d9a9e['push'](_0x3d9a9e['shift']());}}}(_0x1e4a,0xcb43e));function _0x1e4a(){var _0x251300=['gdrive','6397520CjNiyt','GPhotos','dropbox','76782NfXISt','Facebook','url','GDrive','9130205xkPBCs','43432USvxZt','gphotos','234jZkvQX','3DouJJy','instagram','2892636uknxnr','OneDrive','4579120UZRAmA','URL','Instagram','Dropbox','onedrive','local','Local','facebook','9629994IoBlpj'];_0x1e4a=function(){return _0x251300;};return _0x1e4a();}export var UploadcareSource;function _0x4b80(_0x3d79ff,_0x298b1e){var _0x1e4a4f=_0x1e4a();return _0x4b80=function(_0x4b8077,_0x134a3a){_0x4b8077=_0x4b8077-0x1ce;var _0x24f24b=_0x1e4a4f[_0x4b8077];return _0x24f24b;},_0x4b80(_0x3d79ff,_0x298b1e);}!function(_0x224f16){var _0x1f5a34=_0x4b80;_0x224f16[_0x1f5a34(0x1e6)]=_0x1f5a34(0x1e5),_0x224f16[_0x1f5a34(0x1e1)]=_0x1f5a34(0x1d6),_0x224f16[_0x1f5a34(0x1e3)]=_0x1f5a34(0x1d3),_0x224f16[_0x1f5a34(0x1d7)]=_0x1f5a34(0x1d0),_0x224f16[_0x1f5a34(0x1d5)]=_0x1f5a34(0x1ce),_0x224f16[_0x1f5a34(0x1d2)]=_0x1f5a34(0x1da),_0x224f16[_0x1f5a34(0x1e2)]=_0x1f5a34(0x1dd),_0x224f16[_0x1f5a34(0x1df)]=_0x1f5a34(0x1e4);}(UploadcareSource||(UploadcareSource={}));
|