@ckeditor/ckeditor5-uploadcare 48.0.0-alpha.2 → 48.0.0-alpha.3

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x2b498e,Command as _0x27989f}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2bee1e,IconGooglePhotos as _0x2f0d24,IconGoogleDrive as _0x1b3073,IconFacebook as _0x3e8b19,IconDropbox as _0x580824,IconUploadcareLink as _0x226f38,IconUploadcareImageUpload as _0x17ef19,IconError as _0x27f1a7,IconUploadcareImageEdit as _0x3c7e92}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x818bcb,MenuBarMenuListItemButtonView as _0xc4abfa,View as _0x59df62,FocusCycler as _0x165883,Dialog as _0xd4409f,DialogViewPosition as _0x474297,SpinnerView as _0x3c19ec,IconView as _0x5ca6ba,Notification as _0x22f7fb}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x11cb3b,DomEmitterMixin as _0x1e0b76,global as _0xe88406,getAncestors as _0x3e0c43,ObservableMixin as _0x4c7b3d,uid as _0x18b926,createElement as _0x1cb64c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ImageUploadEditing as _0x2b9972,ImageUploadProgress as _0x2039ee,PictureEditing as _0x2f8c59,ImageUtils as _0x57e4e6,ImageEditing as _0x14f923}from'@ckeditor/ckeditor5-image/dist/index.js';import{FileRepository as _0x5ad755}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x15129c,info as _0x3d3837}from'@uploadcare/upload-client';import*as _0x57e39d from'@uploadcare/file-uploader';var D=function(_0x7536d3){return _0x7536d3['Local']='local',_0x7536d3['URL']='url',_0x7536d3['Dropbox']='dropbox',_0x7536d3['GDrive']='gdrive',_0x7536d3['Facebook']='facebook',_0x7536d3['GPhotos']='gphotos',_0x7536d3['OneDrive']='onedrive',_0x7536d3;}({});function F(_0x1c5085,_0x21d1d8,_0x32e6bc){const t=_0x1c5085['t'],_0x3ac2bd=_0x1c5085['t'];switch(_0x21d1d8){case D['Local']:return{'text':_0x3ac2bd('Insert'===_0x32e6bc?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x3ac2bd('From\x20computer')};case D['URL']:return{'text':'Insert'===_0x32e6bc?_0x3ac2bd('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x3ac2bd('Via\x20URL')};case D['Dropbox']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case D['Facebook']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case D['GDrive']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case D['GPhotos']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case D['OneDrive']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x21d1d8;}}class $ extends _0x2b498e{['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 _0x19a44a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x37fd50;for(const _0x2148f9 in _0x19a44a){const _0x368ef5=_0x2148f9,_0x10bfb4=_0x19a44a[_0x368ef5];if('uploadcareLicenseKeyValid'==_0x10bfb4||'uploadcareLicenseKeyInvalid'==_0x10bfb4||'uploadcareLicenseKeyExpired'==_0x10bfb4||'uploadcareLicenseKeyDomainLimit'==_0x10bfb4||'uploadcareLicenseKeyNotAllowed'==_0x10bfb4||'uploadcareLicenseKeyEvaluationLimit'==_0x10bfb4||'uploadcareLicenseKeyUsageLimit'==_0x10bfb4){delete _0x19a44a[_0x368ef5],_0x37fd50=_0x10bfb4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x37fd50&&_0x19a44a['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x37fd50&&_0x19a44a['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x37fd50&&_0x19a44a['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x37fd50&&_0x19a44a['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x37fd50&&_0x19a44a['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x37fd50&&_0x19a44a['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x487ee0}=this,_0xf64faf=_0x487ee0['commands']['get']('uploadcare');if(!_0xf64faf)return;const _0x4e800d=this['_normalizeConfigSourceList'](_0x487ee0['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4626c1,_0x21e5ad)=>{const _0x53a3c0=this['_getIntegrationKey'](_0x21e5ad['type']);return _0x4626c1[_0x53a3c0]||(_0x4626c1[_0x53a3c0]=[]),_0x4626c1[_0x53a3c0]['push'](_0x21e5ad),_0x4626c1;},{});_0x487ee0['plugins']['has']('ImageInsertUI')&&_0x487ee0['commands']['get']('uploadcare')&&Object['entries'](_0x4e800d)['forEach'](([_0xeb4bd1,_0x49f737])=>{_0x487ee0['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0xeb4bd1,'observable':()=>_0xf64faf,'buttonViewCreator':()=>this['_createToolbarButton'](_0x49f737),'formViewCreator':()=>this['_createDropdownButtons'](_0x49f737),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x49f737),'override':'assetManager'!==_0xeb4bd1});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x2b1fad){const {locale:_0xaae43e}=this['editor'];return _0x2b1fad['map'](_0x4f348b=>{const _0x4b74e0=F(_0xaae43e,_0x4f348b,'Insert');switch(_0x4f348b){case D['Local']:return{'icon':_0x17ef19,'type':D['Local'],..._0x4b74e0};case D['URL']:return{'icon':_0x226f38,'type':D['URL'],..._0x4b74e0};case D['Dropbox']:return{'icon':_0x580824,'type':D['Dropbox'],..._0x4b74e0};case D['Facebook']:return{'icon':_0x3e8b19,'type':D['Facebook'],..._0x4b74e0};case D['GDrive']:return{'icon':_0x1b3073,'type':D['GDrive'],..._0x4b74e0};case D['GPhotos']:return{'icon':_0x2f0d24,'type':D['GPhotos'],..._0x4b74e0};case D['OneDrive']:return{'icon':_0x2bee1e,'type':D['OneDrive'],..._0x4b74e0};}});}['_getIntegrationKey'](_0x499b6b){switch(_0x499b6b){case D['Local']:return'upload';case D['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x1d90fd,_0x1f88fc){const _0xa75308=this['editor'],_0x330365=new _0x1d90fd(_0xa75308['locale']),_0x333a58=_0xa75308['commands']['get']('uploadcare');return _0x330365['bind']('isEnabled')['to'](_0x333a58),_0x330365['on']('execute',()=>{_0x333a58['execute'](_0x1f88fc);}),_0x330365;}['_createToolbarButton'](_0x2e565f){const {locale:_0x2bc123}=this['editor'],_0x1974ba=this['editor']['plugins']['get']('ImageInsertUI'),_0x149eeb=_0x2e565f[0x0],_0x4f03fd=this['_createButton'](_0x818bcb,_0x149eeb['type']);return _0x4f03fd['icon']=_0x149eeb['icon'],_0x4f03fd['bind']('label')['to'](_0x1974ba,'isImageSelected',_0x24b2d8=>F(_0x2bc123,_0x149eeb['type'],_0x24b2d8?'Replace':'Insert')['text']),_0x4f03fd['tooltip']=!0x0,_0x4f03fd;}['_createDropdownButtons'](_0x5a1325){const {locale:_0x55eab6}=this['editor'],_0x5e0dfa=this['editor']['plugins']['get']('ImageInsertUI');return _0x5a1325['map'](_0x56169d=>{const _0x269c32=this['_createButton'](_0x818bcb,_0x56169d['type']);return _0x269c32['withText']=!0x0,_0x269c32['icon']=_0x56169d['icon'],_0x269c32['bind']('label')['to'](_0x5e0dfa,'isImageSelected',_0xeb8cf9=>F(_0x55eab6,_0x56169d['type'],_0xeb8cf9?'Replace':'Insert')['text']),_0x269c32;});}['_createMenuBarButtons'](_0x461347){return _0x461347['map'](_0xb0e7af=>{const _0x5e0b82=this['_createButton'](_0xc4abfa,_0xb0e7af['type']);return _0x5e0b82['icon']=_0xb0e7af['icon'],_0x5e0b82['label']=_0xb0e7af['shortText'],_0x5e0b82;});}}class B extends _0x59df62{['focusTracker'];['focusCycler'];constructor(_0x4c0e28){super(_0x4c0e28),this['focusTracker']=new _0x11cb3b(),this['focusCycler']=new _0x165883({'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 V extends B{constructor(_0x5e58cd,_0x1d33d4){super(_0x5e58cd),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-'+_0x1d33d4}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function j(_0x14b354,_0x2598d1){const _0x7248aa=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x464ada=>_0x464ada<=_0x2598d1)['map'](_0xaf6e4e=>_0x14b354['replace'](/\/$/,'')+'/-/resize/'+_0xaf6e4e+'x/\x20'+_0xaf6e4e+'w');return{'imageFallbackUrl':_0x14b354,'imageSources':[{'srcset':_0x7248aa['join'](',\x20'),'sizes':'(max-width:\x20'+_0x2598d1+'px)\x20100vw,\x20'+_0x2598d1+'px','type':'image/webp'}]};}function M(_0x49736a,_0x115693,_0x885f32){const _0x1f7f43=_0x49736a['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1f7f43?parseInt(_0x1f7f43[0x1],0xa):_0x115693,'height':_0x1f7f43?parseInt(_0x1f7f43[0x2],0xa):_0x885f32};}function q(_0x26a0b4,_0x3665d1){const _0x395421=new(_0x1e0b76())(),_0x51215e=_0x26a0b4['plugins']['get']('ImageUtils'),_0x109115=_0x26a0b4['editing']['mapper']['toViewElement'](_0x3665d1),_0x34831f=_0x51215e['findViewImgElement'](_0x109115),_0x3ef1d2=_0x26a0b4['editing']['view']['domConverter']['viewToDom'](_0x34831f),_0x3d0899=_0x3665d1['getAttribute']('width'),_0x3afddc=_0x3665d1['getAttribute']('height'),_0x175b13='image-processing';_0x26a0b4['editing']['view']['change'](_0x444f29=>{_0x444f29['addClass'](_0x175b13,_0x109115),_0x444f29['setStyle']('aspect-ratio',_0x3d0899+'/'+_0x3afddc,_0x34831f);}),_0x395421['listenTo'](_0x3ef1d2,'load',()=>{_0x395421['stopListening'](_0x3ef1d2,'load'),_0x26a0b4['editing']['view']['change'](_0x5e0f67=>{_0x5e0f67['removeClass'](_0x175b13,_0x109115),_0x5e0f67['removeStyle']('aspect-ratio',_0x34831f);});});}function W(_0x36383f){if(Array['isArray'](_0x36383f)){const _0x2bca73=_0x36383f['map'](W);return _0x29cd2f=>_0x2bca73['some'](_0x235eaa=>_0x235eaa(_0x29cd2f));}if('origin'==_0x36383f){const _0x421561=_0xe88406['window']['location']['origin'];return _0x74a42=>new URL(_0x74a42,_0xe88406['document']['baseURI'])['origin']==_0x421561;}return'function'==typeof _0x36383f?_0x36383f:_0x36383f instanceof RegExp?_0x58f44e=>!(!_0x58f44e['match'](_0x36383f)&&!_0x58f44e['replace'](/^https?:\/\//,'')['match'](_0x36383f)):()=>!0x1;}function G(_0x3e8ff3,_0x5b8639){return _0x3e0c43(_0x3e8ff3['target'])['includes'](_0x5b8639);}class z extends/* #__PURE__ -- @preserve */
24
- _0x4c7b3d(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0xc06d4e,_0xcbfe19,_0x5a6f2b){super(),this['_editor']=_0xc06d4e,this['_editing']=_0xcbfe19,this['_dialog']=_0xc06d4e['plugins']['get'](_0xd4409f),this['_api']=_0xcbfe19['ctxElement']['getAPI'](),this['_type']=_0x5a6f2b,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:_0x46faf0,model:_0x453bab}=this['_editor'],_0x338685=_0x453bab['document']['selection']['getSelectedElement'](),_0x56f05d=_0x338685&&(_0x338685['is']('element','imageBlock')||_0x338685['is']('element','imageInline'));this['_formView']=new V(_0x46faf0,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x17ef19,'title':F(_0x46faf0,this['_type'],_0x56f05d?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x474297['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1b5431=>!G(_0x1b5431,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x2f2a17}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4f1dd4=>{const _0x1562eb=_0x2f2a17['length'];for(const _0x293c7e of _0x2f2a17){const _0x524a68=_0x293c7e===_0x2f2a17[_0x1562eb-0x1],{cdnUrl:_0x349e44,fileInfo:_0x20694c}=_0x293c7e;if(!_0x349e44||!_0x20694c)continue;const {width:_0x56adc8,height:_0x3c73c4}=_0x20694c['imageInfo'],_0x5c4726=M(_0x349e44,_0x56adc8,_0x3c73c4),_0x3b01d9=j(_0x349e44,_0x5c4726['width']),_0x51252e={'id':_0x20694c['uuid'],'type':'image','attributes':{'imageDimension':_0x5c4726,..._0x3b01d9}};this['_insertAsset'](_0x51252e,_0x524a68,_0x4f1dd4);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x440e8f=>{'idle'===_0x440e8f['detail']['status']&&!_0x440e8f['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===D['Local']?this['_api']['setCurrentActivity'](D['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x3362f6,_0x3225b5,_0x36b753){const _0x1032fd=this['_editor']['model']['document']['selection'],_0x2e0148=_0x1032fd['getSelectedElement'](),_0x96d2b0=!(!_0x2e0148||!_0x2e0148['is']('element','imageInline'));_0x36b753['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x3362f6,_0x96d2b0),_0x3225b5||_0x36b753['setSelection'](_0x1032fd['getLastPosition']());}['_insertImage'](_0x209a69,_0x14a413){const _0x50825f=this['_editor'],{imageDimension:_0x16fc94,imageFallbackUrl:_0x295c5b,imageSources:_0x12604a}=_0x209a69['attributes'];_0x50825f['execute']('insertImage',{'imageType':_0x14a413?'imageInline':null,'source':{'uploadcareImageId':_0x209a69['id'],'src':_0x295c5b,'sources':_0x12604a,..._0x16fc94}});}}class H extends _0x27989f{['_editing'];['_controller']=null;static get['requires'](){return[_0xd4409f,X];}constructor(_0x51527f){super(_0x51527f),this['_editing']=_0x51527f['plugins']['get'](X);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x4173a2){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new z(this['editor'],this['_editing'],_0x4173a2);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class J{static['upload']({file:_0x5ba504,..._0x3acb48}){return _0x15129c(_0x5ba504,_0x3acb48);}static['getInfo'](_0x26ed1c,_0x27868c){return _0x3d3837(_0x26ed1c,_0x27868c);}}class Z extends _0x2b498e{static get['requires'](){return[_0x2b9972,_0x2039ee,_0x5ad755,X];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x11b453=this['editor'];if(!!!_0x11b453['config']['get']('uploadcare'))return;_0x11b453['plugins']['get'](_0x5ad755)['createUploadAdapter']=_0x5680cc=>new Q(_0x5680cc,_0x11b453),_0x11b453['plugins']['get'](_0x2b9972)['on']('uploadComplete',(_0x477be3,{imageElement:_0x3105d8,data:_0x2d5bfc})=>{_0x11b453['model']['change'](_0x1e2ed2=>{_0x1e2ed2['setAttribute']('uploadcareImageId',_0x2d5bfc['uploadcareImageId'],_0x3105d8);});});}}class Q{['loader'];['editor'];['controller'];constructor(_0x293450,_0x117cbf){this['loader']=_0x293450,this['editor']=_0x117cbf,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x6e74aa=await this['loader']['file'];return J['upload']({'file':_0x6e74aa,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x10750a=>{_0x10750a&&_0x10750a['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x10750a['value']);}})['then'](async _0x1f8585=>{const {imageFallbackUrl:_0x43587f,imageSources:_0x13b212}=j(_0x1f8585['cdnUrl'],_0x1f8585['imageInfo']['width']);return{'uploadcareImageId':_0x1f8585['uuid'],'default':_0x43587f,'sources':_0x13b212};})['catch'](()=>{const _0x2bf466=t('Cannot\x20upload\x20file:')+('\x20'+_0x6e74aa['name']+'.');return Promise['reject'](_0x2bf466);});}['abort'](){this['controller']['abort']();}}class X extends _0x2b498e{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return[_0x2f8c59,Z,_0xd4409f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x571eb1){super(_0x571eb1),this['ucContextId']=_0x18b926();}['init'](){const _0x319073=this['editor'];_0x319073['commands']['add']('uploadcare',new H(_0x319073));}['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 _0x52174f=_0xe88406['document']['querySelector']('input[uploadcare-file-input]');_0x52174f&&_0x52174f['remove']();}),async function(_0x5f086e){const _0xece1af=_0x154713([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x5524c4=0x535f8c3a,_0x1efa8c=0x535808c2^_0x5524c4,_0x3e6f50=window[_0x154713([0x44,0x61,0x74,0x65])][_0x154713([0x6e,0x6f,0x77])](),_0x47b9ad=_0x5f086e[_0x154713([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2f9516=new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22355e=>{_0x47b9ad[_0x154713([0x6f,0x6e,0x63,0x65])](_0x154713([0x72,0x65,0x61,0x64,0x79]),_0x22355e);}),_0x2a60e8={[_0x154713([0x6b,0x74,0x79])]:_0x154713([0x45,0x43]),[_0x154713([0x75,0x73,0x65])]:_0x154713([0x73,0x69,0x67]),[_0x154713([0x63,0x72,0x76])]:_0x154713([0x50,0x2d,0x32,0x35,0x36]),[_0x154713([0x78])]:_0x154713([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]),[_0x154713([0x79])]:_0x154713([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]),[_0x154713([0x61,0x6c,0x67])]:_0x154713([0x45,0x53,0x32,0x35,0x36])},_0x4714e0=_0x47b9ad[_0x154713([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x154713([0x67,0x65,0x74])](_0x154713([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x243d6b(){let _0x144676,_0x5a66a8=null,_0x5d1276=null;try{if(_0x4714e0==_0x154713([0x47,0x50,0x4c]))return _0x154713([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x144676=_0x24ac37(),!_0x144676)return _0x154713([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x144676[_0x154713([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5d1276=_0xf26d28(_0x144676[_0x154713([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x144676[_0x154713([0x6a,0x74,0x69])])),await _0x572daa()?_0x2ba277()?_0x2647bf()?_0x154713([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3effb9()?(_0x144676[_0x154713([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x154713([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5a66a8=_0x3d433d(_0x154713([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5c8aec()):_0x154713([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x154713([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x154713([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x154713([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2647bf(){const _0x7e75c3=[_0x154713([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x154713([0x74,0x72,0x69,0x61,0x6c])][_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x144676[_0x154713([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3e6f50/0x3e8:0xe10*_0x1efa8c;return _0x144676[_0x154713([0x65,0x78,0x70])]<_0x7e75c3;}function _0x2ba277(){const _0x4d5217=_0x144676[_0x154713([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4d5217&&(!!_0x4d5217[_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x154713([0x2a]))||!!_0x4d5217[_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x154713([0x55,0x50,0x4c,0x43])));}function _0x3effb9(){const _0x1a0630=_0x144676[_0x154713([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1a0630||0x0==_0x1a0630[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1a885}=new URL(window[_0x154713([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1a0630[_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a885))return!0x0;const _0x239bb9=_0x1a885[_0x154713([0x73,0x70,0x6c,0x69,0x74])](_0x154713([0x2e]));return _0x1a0630[_0x154713([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1f5139=>_0x1f5139[_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x154713([0x2a])))[_0x154713([0x6d,0x61,0x70])](_0x382ad6=>_0x382ad6[_0x154713([0x73,0x70,0x6c,0x69,0x74])](_0x154713([0x2e])))[_0x154713([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x403432=>_0x403432[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x239bb9[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x154713([0x6d,0x61,0x70])](_0x8f5716=>Array(_0x239bb9[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x8f5716[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x154713([0x66,0x69,0x6c,0x6c])](_0x8f5716[0x0]===_0x154713([0x2a])?_0x154713([0x2a]):'')[_0x154713([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x8f5716))[_0x154713([0x73,0x6f,0x6d,0x65])](_0x3157b0=>_0x239bb9[_0x154713([0x65,0x76,0x65,0x72,0x79])]((_0x2462cf,_0x4fc66a)=>_0x3157b0[_0x4fc66a]===_0x2462cf||_0x3157b0[_0x4fc66a]===_0x154713([0x2a])));}function _0x5c8aec(){return _0x5a66a8&&_0x5d1276?new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x10dc9e,_0x3ba403)=>{_0x5a66a8[_0x154713([0x74,0x68,0x65,0x6e])](_0x10dc9e,_0x3ba403),_0x5d1276[_0x154713([0x74,0x68,0x65,0x6e])](_0x161d9b=>{_0x161d9b!=_0x154713([0x56,0x61,0x6c,0x69,0x64])&&_0x10dc9e(_0x161d9b);},_0x3ba403);}):_0x5a66a8||_0x5d1276||_0x154713([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf26d28(_0x3d4dde,_0x227a40){return new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x481ba5=>{if(_0x213edf())return _0x481ba5(_0x154713([0x56,0x61,0x6c,0x69,0x64]));_0x33b152(),_0x47b9ad[_0x154713([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x154713([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3d719a=!0x1;const _0x547c88=_0x18b926();function _0x4246c3(_0x3ccb66){return!!_0x3ccb66&&(typeof _0x3ccb66===_0x154713([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3ccb66===_0x154713([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3ccb66[_0x154713([0x74,0x68,0x65,0x6e])]===_0x154713([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3ccb66[_0x154713([0x63,0x61,0x74,0x63,0x68])]===_0x154713([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x509e84(_0x67eda9){_0x160acf(_0x67eda9)[_0x154713([0x74,0x68,0x65,0x6e])](_0x553527=>{if(!_0x553527||_0x553527[_0x154713([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x154713([0x6f,0x6b]))return _0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x453d5a(_0x1cf1e7(_0x547c88+_0x227a40))!=_0x553527[_0x154713([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x154713([0x56,0x61,0x6c,0x69,0x64]);})[_0x154713([0x74,0x68,0x65,0x6e])](_0x1190f2=>(_0x46c261(),_0x1190f2),()=>{const _0x5be969=_0x246257();return null==_0x5be969?(_0x46c261(),_0x154713([0x56,0x61,0x6c,0x69,0x64])):_0x154713(_0x3e6f50-_0x5be969>(0x7753083a^_0x5524c4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x154713([0x74,0x68,0x65,0x6e])](_0x481ba5)[_0x154713([0x63,0x61,0x74,0x63,0x68])](()=>{_0x481ba5(_0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1bac33=0x536962ba^_0x5524c4;function _0x46c261(){const _0x5de973=_0x154713([0x6c,0x6c,0x63,0x74,0x2d])+_0x453d5a(_0x1cf1e7(_0x3d4dde)),_0x265b73=_0x322997(_0x453d5a(window[_0x154713([0x4d,0x61,0x74,0x68])][_0x154713([0x63,0x65,0x69,0x6c])](_0x3e6f50/_0x1bac33)));window[_0x154713([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x154713([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5de973,_0x265b73);}function _0x246257(){const _0x10b0a6=_0x154713([0x6c,0x6c,0x63,0x74,0x2d])+_0x453d5a(_0x1cf1e7(_0x3d4dde)),_0x58fae4=window[_0x154713([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x154713([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10b0a6);return _0x58fae4?window[_0x154713([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x322997(_0x58fae4),0x10)*_0x1bac33:null;}function _0x160acf(_0x1f7a82){return new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x514350,_0x4db5d8)=>{_0x1f7a82[_0x154713([0x74,0x68,0x65,0x6e])](_0x514350,_0x4db5d8),window[_0x154713([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4db5d8,0x535e58fa^_0x5524c4);});}}_0x47b9ad[_0x154713([0x6f,0x6e])](_0x154713([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2805e5,_0x3d07b4)=>{if(_0x3d07b4[0x0]!=_0x3d4dde)return _0x481ba5(_0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3d07b4[0x1]={..._0x3d07b4[0x1],[_0x154713([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x547c88};},{[_0x154713([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x154713([0x68,0x69,0x67,0x68])}),_0x47b9ad[_0x154713([0x6f,0x6e])](_0x154713([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x20573c=>{_0x4246c3(_0x20573c[_0x154713([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3d719a=!0x0,_0x509e84(_0x20573c[_0x154713([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x154713([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x154713([0x6c,0x6f,0x77])}),_0x2f9516[_0x154713([0x74,0x68,0x65,0x6e])](()=>{_0x3d719a||_0x481ba5(_0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x213edf(){return _0x47b9ad[_0x154713([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x154713([0x76,0x69,0x65,0x77])][_0x154713([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x154713([0x61,0x75,0x74,0x6f]);}function _0x33b152(){_0x47b9ad[_0x154713([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x154713([0x76,0x69,0x65,0x77])][_0x154713([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x154713([0x61,0x75,0x74,0x6f]);}}function _0x3d433d(_0x4a63de){const _0x86e913=[new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e2efd=>setTimeout(_0x1e2efd,0x5356b2f6^_0x5524c4)),_0x2f9516[_0x154713([0x74,0x68,0x65,0x6e])](()=>new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3bd877=>{let _0x1462b5=0x0;_0x47b9ad[_0x154713([0x6d,0x6f,0x64,0x65,0x6c])][_0x154713([0x6f,0x6e])](_0x154713([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5cc00b,_0x331b95)=>{_0x331b95[0x0][_0x154713([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1462b5++,_0x1462b5==(0x535f89d2^_0x5524c4)&&(_0x3bd877(),_0x5cc00b[_0x154713([0x6f,0x66,0x66])]());});}))];return window[_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x154713([0x72,0x61,0x63,0x65])](_0x86e913)[_0x154713([0x74,0x68,0x65,0x6e])](()=>_0x4a63de);}async function _0x5465f6(){await _0x2f9516,_0x47b9ad[_0x154713([0x6d,0x6f,0x64,0x65,0x6c])][_0x154713([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x58c722,_0x47b9ad[_0x154713([0x6d,0x6f,0x64,0x65,0x6c])][_0x154713([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x58c722,_0x47b9ad[_0x154713([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x154713([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x18cfa2(_0x33fc8c){const _0x1fae09=_0x3f29ab();_0x47b9ad[_0x1fae09]=_0x154713([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x33fc8c,_0x33fc8c!=_0x154713([0x56,0x61,0x6c,0x69,0x64])&&_0x5465f6();}function _0x3f29ab(){const _0x10eb17=window[_0x154713([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x154713([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x154713([0x6e,0x6f,0x77])]())[_0x154713([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x154713([0x2e]),'');let _0x14bddf=_0x154713([0x68]);for(let _0x709224=0x0;_0x709224<_0x10eb17[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x709224+=0x2){let _0x4cc795=window[_0x154713([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10eb17[_0x154713([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x709224,_0x709224+0x2));_0x4cc795>=_0xece1af[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4cc795-=_0xece1af[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x14bddf+=_0xece1af[_0x4cc795];}return _0x14bddf;}function _0x24ac37(){const _0x4c3ffa=_0x4714e0[_0x154713([0x73,0x70,0x6c,0x69,0x74])](_0x154713([0x2e]));if(0x3!=_0x4c3ffa[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3e4ed1(_0x4c3ffa[0x1]);function _0x3e4ed1(_0x1aba58){const _0x2d12fa=_0x3756a2(_0x1aba58);return _0x2d12fa&&_0x22ad1c()?_0x2d12fa:null;function _0x22ad1c(){const _0x215727=_0x2d12fa[_0x154713([0x6a,0x74,0x69])],_0x3b9ee8=window[_0x154713([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x215727[_0x154713([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x215727[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2ec881={..._0x2d12fa,[_0x154713([0x6a,0x74,0x69])]:_0x215727[_0x154713([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x215727[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2ec881[_0x154713([0x76,0x63])],_0x1cf1e7(_0x2ec881)==_0x3b9ee8;}}}async function _0x572daa(){let _0x7af4ef=!0x0;try{const _0x25e70f=_0x4714e0[_0x154713([0x73,0x70,0x6c,0x69,0x74])](_0x154713([0x2e])),[_0x28e60d,_0x19da07,_0x6cd878]=_0x25e70f;return _0x8e8c7c(_0x28e60d),await _0x4b8534(_0x28e60d,_0x19da07,_0x6cd878),_0x7af4ef;}catch{return!0x1;}function _0x8e8c7c(_0x1cb311){const _0x55f09a=_0x3756a2(_0x1cb311);_0x55f09a&&_0x55f09a[_0x154713([0x61,0x6c,0x67])]==_0x154713([0x45,0x53,0x32,0x35,0x36])||(_0x7af4ef=!0x1);}async function _0x4b8534(_0x1ff1c1,_0x528207,_0x436ffb){const _0x2f3350=window[_0x154713([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x154713([0x66,0x72,0x6f,0x6d])](_0x539054(_0x436ffb),_0x34b28c=>_0x34b28c[_0x154713([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x44b44e=new window[(_0x154713([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x154713([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1ff1c1+_0x154713([0x2e])+_0x528207),_0x5498fc=window[_0x154713([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x154713([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5498fc)return;const _0x1f9fb2=await _0x5498fc[_0x154713([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x154713([0x6a,0x77,0x6b]),_0x2a60e8,{[_0x154713([0x6e,0x61,0x6d,0x65])]:_0x154713([0x45,0x43,0x44,0x53,0x41]),[_0x154713([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x154713([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x154713([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5498fc[_0x154713([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x154713([0x6e,0x61,0x6d,0x65])]:_0x154713([0x45,0x43,0x44,0x53,0x41]),[_0x154713([0x68,0x61,0x73,0x68])]:{[_0x154713([0x6e,0x61,0x6d,0x65])]:_0x154713([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1f9fb2,_0x2f3350,_0x44b44e)||(_0x7af4ef=!0x1);}}function _0x3756a2(_0x570c12){return _0x570c12[_0x154713([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x154713([0x65,0x79]))?JSON[_0x154713([0x70,0x61,0x72,0x73,0x65])](_0x539054(_0x570c12)):null;}function _0x539054(_0x451340){return window[_0x154713([0x61,0x74,0x6f,0x62])](_0x451340[_0x154713([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x154713([0x2b]))[_0x154713([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x154713([0x2f])));}function _0x1cf1e7(_0xf4de4){let _0x678d61=0x1505;function _0x6a1c3c(_0x204db5){for(let _0x37e60b=0x0;_0x37e60b<_0x204db5[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x37e60b++){const _0x3f86ad=_0x204db5[_0x154713([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x37e60b);_0x678d61=(_0x678d61<<0x5)+_0x678d61+_0x3f86ad,_0x678d61&=_0x678d61;}}function _0x231eb4(_0x2daa83){Array[_0x154713([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2daa83)?_0x2daa83[_0x154713([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x231eb4):_0x2daa83&&typeof _0x2daa83==_0x154713([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x154713([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2daa83)[_0x154713([0x73,0x6f,0x72,0x74])]()[_0x154713([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x21dfe4,_0x4519d7])=>{_0x6a1c3c(_0x21dfe4),_0x231eb4(_0x4519d7);}):_0x6a1c3c(window[_0x154713([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2daa83));}return _0x231eb4(_0xf4de4),_0x678d61>>>0x0;}function _0x453d5a(_0x56fc8f){return _0x56fc8f[_0x154713([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x154713([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x154713([0x30]));}function _0x322997(_0x262fc2){return _0x262fc2[_0x154713([0x73,0x70,0x6c,0x69,0x74])]('')[_0x154713([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x154713([0x6a,0x6f,0x69,0x6e])]('');}function _0x58c722(){}function _0x154713(_0x4ecadb){return _0x4ecadb['map'](_0x356227=>String['fromCharCode'](_0x356227))['join']('');}_0x18cfa2(await _0x243d6b());}(this);}['_initSchema'](){const _0x447a48=this['editor']['model']['schema'];_0x447a48['isRegistered']('imageBlock')&&_0x447a48['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x447a48['isRegistered']('imageInline')&&_0x447a48['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x3f7cc0=this['editor'];_0x3f7cc0['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x3f7cc0['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x102642=>_0x102642['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5d8b64=_0x3f7cc0['commands']['get']('replaceImageSource');_0x5d8b64&&this['listenTo'](_0x5d8b64,'cleanupImage',(_0x4398bd,[_0x2292a7,_0x3c5833])=>{_0x2292a7['removeAttribute']('uploadcareImageId',_0x3c5833);});}['_initConfig'](){const _0x1c6d8e=this['editor']['config']['get']('uploadcare.uploader')||{},_0x5b7409=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1cb64c(_0xe88406['document'],'uc-config',{..._0x1c6d8e,'pubkey':_0x5b7409,'ctx-name':'uploader-'+this['ucContextId'],'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']=_0x5e7d97=>{if('closeMax'==_0x5e7d97)return'#uc-icon-arrow-down';},_0xe88406['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1cb64c(_0xe88406['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0xe88406['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x599549=this['editor']['commands']['get']('insertImage');_0x599549&&this['listenTo'](_0x599549,'execute',()=>{const _0x34ffaf=this['editor']['model']['document']['selection']['getSelectedElement']();_0x34ffaf&&_0x34ffaf['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x34ffaf);});});const _0x93156e=this['editor']['commands']['get']('uploadcareImageReplace');_0x93156e&&this['listenTo'](_0x93156e,'execute',()=>{const _0x47e49b=this['editor']['model']['document']['selection']['getSelectedElement']();_0x47e49b&&_0x47e49b['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x47e49b);});});}}class Y extends _0x2b498e{static get['requires'](){return[X,$];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d395f){super(_0x3d395f),_0x3d395f['config']['define']('uploadcare.uploader.sourceList',[D['Local'],D['URL']]),_0x57e39d['defineComponents'](_0x57e39d),this['_defineLocale']();}['_defineLocale'](){const _0x5dc5b1=this['editor']['config']['get']('uploadcare.locale'),_0x4973ac=this['editor']['locale']['contentLanguage'];_0x5dc5b1&&_0x57e39d['defineLocale'](_0x4973ac,_0x5dc5b1);}}class tt extends _0x59df62{constructor(_0x9156cd){super(_0x9156cd);const t=_0x9156cd['t'],_0x9c9c1c=this['bindTemplate'],_0x1a7129=new _0x3c19ec();_0x1a7129['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':[_0x1a7129,{'text':_0x9c9c1c['to']('imageUploadProgress',_0x250871=>t('Loading\x20image...')+'\x20('+(_0x250871||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 et extends _0x59df62{constructor(_0x4b2865){super(_0x4b2865);const t=_0x4b2865['t'];this['set']('errorType',null);const _0x25e94c=new _0x818bcb(_0x4b2865);_0x25e94c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x25e94c['withText']=!0x0,_0x25e94c['class']='ck-button-action',_0x25e94c['on']('execute',()=>{this['fire']('retry');}),_0x25e94c['bind']('isVisible')['to'](this,'errorType',_0x1b4e21=>'NotFound'!==_0x1b4e21);const _0x5d7800=new _0x5ca6ba();_0x5d7800['content']=_0x27f1a7,_0x5d7800['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x38af17=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':[_0x5d7800,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x38af17['to']('errorType',_0x3b3ec7=>t('NotFound'!==_0x3b3ec7?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x25e94c]},{'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 it extends _0x59df62{constructor(_0x1b12f6,_0x905913){super(_0x1b12f6);const _0x2341a2=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x905913,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2341a2['to']('imageSrc')}});}}class st extends B{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x1c7f6d,_0x147fe7,_0x420e0c){super(_0x1c7f6d),this['_items']=this['createCollection'](),this['_loadingView']=new tt(_0x1c7f6d),this['_errorView']=new et(_0x1c7f6d),this['_editingView']=new it(_0x1c7f6d,_0x420e0c),this['_focusableView']=new _0x59df62(_0x1c7f6d),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x147fe7),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'],_0x2209c8=>{this['_addUploadcareImageEditorListeners'](_0x2209c8);});}),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'](_0x1ca1f0,_0x182a1a){const _0x382ae3='uc-cloud-image-editor',_0x4088c0=_0x1ca1f0['querySelector'](_0x382ae3);if(_0x4088c0)return _0x182a1a(_0x4088c0);const _0x4c111e=new MutationObserver(_0x367cac=>{const _0x237d78=_0x367cac['filter'](_0x3c245b=>_0x3c245b['target']===_0x1ca1f0&&_0x3c245b['addedNodes']['length']>0x0&&_0x3c245b['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x382ae3);_0x237d78['length']&&(_0x4c111e['disconnect'](),_0x182a1a(_0x237d78[0x0]['addedNodes'][0x0]));});_0x4c111e['observe'](_0x1ca1f0,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x14aeb9){_0x14aeb9['addEventListener']('apply',_0x337347=>{this['fire']('apply',{'imageSrc':_0x337347['detail']['cdnUrl']});}),_0x14aeb9['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class nt extends/* #__PURE__ -- @preserve */
25
- _0x4c7b3d(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2a4bb4,_0x26f742,_0x3f44e4){super(),this['_editor']=_0x2a4bb4,this['_dialog']=_0x26f742,this['_imageElement']=_0x3f44e4,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 _0x31cacb=this['_imageElement'],_0x33978b=_0x31cacb['getAttribute']('uploadcareImageId'),_0x3efe73=_0x31cacb['getAttribute']('src');if(_0x33978b)await this['_loadImageInfo'](_0x33978b,_0x3efe73);else{if(this['_imageCache']['has'](_0x3efe73)){const _0x951897=this['_imageCache']['get'](_0x3efe73);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x951897['url'],this['imageDimension']=_0x951897['dimension'],this['imageId']=_0x951897['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2aedab}=this['_editor'],t=_0x2aedab['t'],_0x3dd5d6=new st(_0x2aedab,this['imageStatus'],this['_attributes']);_0x3dd5d6['bind']('status')['to'](this,'imageStatus'),_0x3dd5d6['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3dd5d6['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3dd5d6['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3dd5d6,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3c7e92,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3dd5d6,'position':_0x474297['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3dd5d6['focus']();},'onHide':()=>{_0x3dd5d6['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4f3622=>!G(_0x4f3622,_0x3dd5d6['element'])}});}['_loadImageInfo'](_0x24ab77,_0x5e3083){return J['getInfo'](_0x24ab77,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x1871c2=>{const {width:_0x4ed8e2,height:_0x30c331}=_0x1871c2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5e3083,this['imageDimension']={'width':_0x4ed8e2,'height':_0x30c331},this['imageId']=_0x24ab77;})['catch'](_0x36b962=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x36b962['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x18f2bb,_0x13c8cd){return this['_getImageAsFile'](_0x18f2bb)['then'](_0x251986=>J['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x13c8cd['signal'],'file':_0x251986,'onProgress':_0xff75bd=>{_0xff75bd&&_0xff75bd['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0xff75bd['value']));}}))['then'](_0x2e9db9=>{const {width:_0x441eb2,height:_0x12d67b}=_0x2e9db9['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2e9db9['cdnUrl'],this['imageDimension']={'width':_0x441eb2,'height':_0x12d67b},this['imageId']=_0x2e9db9['uuid'],this['imageUploadProgress']=null;const _0x3631dc=_0x18f2bb['getAttribute']('src');this['_imageCache']['set'](_0x3631dc,{'id':_0x2e9db9['uuid'],'url':_0x2e9db9['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x387a7c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x387a7c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x6e6de7,_0x3105c5){_0x6e6de7['on']('apply',(_0x40f321,_0x499d3e)=>{this['_replaceImage'](_0x3105c5,_0x499d3e['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x6e6de7['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x6e6de7['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2ee1ae,_0x46cdcf,_0x5c0fc9){const _0x63e094=this['_editor'],{width:_0x3f8cc2,height:_0x3572b6}=M(_0x46cdcf,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x42052c,imageSources:_0x1db6bd}=j(_0x46cdcf,_0x3f8cc2);_0x63e094['model']['change'](_0x1a6a33=>{if('$graveyard'===_0x2ee1ae['root']['rootName']){_0x63e094['execute']('insertImage',{'imageType':_0x2ee1ae['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2ee1ae['getAttributes']()),'uploadcareImageId':_0x5c0fc9,'src':_0x42052c,'sources':_0x1db6bd,'width':_0x3f8cc2,'height':_0x3572b6}});const _0x21dab5=_0x2ee1ae['getChildren']();_0x2ee1ae=_0x63e094['model']['document']['selection']['getSelectedElement']();for(const _0x25124f of _0x21dab5)_0x1a6a33['append'](_0x1a6a33['cloneElement'](_0x25124f),_0x2ee1ae);}else _0x1a6a33['setSelection'](_0x2ee1ae,'on'),_0x63e094['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2ee1ae['getAttributes']()),'uploadcareImageId':_0x5c0fc9,'src':_0x42052c,'sources':_0x1db6bd,'width':_0x3f8cc2,'height':_0x3572b6},_0x2ee1ae);_0x1a6a33['setSelection'](_0x2ee1ae,'on');});}async['_getImageAsFile'](_0x3d53db){const _0x5d6391=_0xe88406['window'],_0x3db86f=_0xe88406['document']['location']['href'],_0x1fa061=new _0x5d6391['URL'](_0x3d53db['getAttribute']('src'),_0x3db86f);if('data:'===_0x1fa061['protocol']){const _0x5bdd6b=_0x1fa061['href']['split'](','),_0x231359=_0x5bdd6b[0x0]['match'](/:(.*?);/)[0x1],_0x1d0d5f=_0x231359['split']('/')[0x1],_0x4d63a7=_0x5d6391['atob'](_0x5bdd6b[_0x5bdd6b['length']-0x1]);let _0x3e677d=_0x4d63a7['length'];const _0x21d011=new _0x5d6391['Uint8Array'](_0x3e677d);for(;_0x3e677d--;)_0x21d011[_0x3e677d]=_0x4d63a7['charCodeAt'](_0x3e677d);return new _0x5d6391['File']([_0x21d011],'image.'+_0x1d0d5f,{'type':_0x231359});}const _0x528ee7=_0x1fa061['href']['split']('/'),_0x29a03a=_0x528ee7[_0x528ee7['length']-0x1],_0x4acc82=_0x29a03a['split']('.')[0x1];return _0x5d6391['fetch'](_0x1fa061['href'])['then'](_0x53f12d=>_0x53f12d['clone']()['blob']())['then'](_0x5cef3b=>new _0x5d6391['File']([_0x5cef3b],_0x29a03a,{'type':'image/'+_0x4acc82}));}}class rt extends _0x27989f{['imageEditController'];static get['requires'](){return[_0xd4409f];}['_isEditable'];constructor(_0x56b694){super(_0x56b694),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4a9e2b){const _0x44c1cc=W(_0x4a9e2b);return _0x1e2c25=>!(!_0x1e2c25||!_0x1e2c25['is']('element','imageBlock')&&!_0x1e2c25['is']('element','imageInline'))&&(!!_0x1e2c25['hasAttribute']('uploadcareImageId')||!!_0x1e2c25['hasAttribute']('src')&&_0x44c1cc(_0x1e2c25['getAttribute']('src')));}(_0x56b694['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x32ede1=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x32ede1);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x22b6bc=this['editor']['model']['document']['selection']['getSelectedElement']();_0x22b6bc&&(_0x22b6bc['is']('element','imageBlock')||_0x22b6bc['is']('element','imageInline'))&&(this['imageEditController']=new nt(this['editor'],this['editor']['plugins']['get'](_0xd4409f),_0x22b6bc),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class at extends _0x27989f{['refresh'](){const _0x1ce28c=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1ce28c&&(_0x1ce28c['is']('element','imageBlock')||_0x1ce28c['is']('element','imageInline')));}['execute'](_0xf5e6ff){const _0x1762a9=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0xc4e8e8=>{_0xc4e8e8['setAttributes'](_0xf5e6ff,_0x1762a9),_0xc4e8e8['removeAttribute']('srcset',_0x1762a9),_0xc4e8e8['removeAttribute']('sizes',_0x1762a9);});}}class ot extends _0x2b498e{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[X,_0x22f7fb,_0x57e4e6,_0x14f923];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2d6935}=this;_0x2d6935['commands']['add']('uploadcareImageEdit',new rt(_0x2d6935)),_0x2d6935['commands']['add']('uploadcareImageReplace',new at(_0x2d6935));}}class ct extends _0x2b498e{['_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 _0x545b79=this['editor'];_0x545b79['ui']['componentFactory']['add']('uploadcareImageEdit',_0x25d539=>{const _0x15753f=_0x545b79['commands']['get']('uploadcareImageEdit'),_0x16e7f1=new _0x818bcb(_0x25d539),t=_0x25d539['t'];return _0x16e7f1['set']({'icon':_0x3c7e92,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x16e7f1['bind']('isEnabled')['to'](_0x15753f),_0x16e7f1['bind']('isOn')['to'](_0x15753f,'isActive'),this['listenTo'](_0x16e7f1,'execute',()=>{_0x545b79['execute']('uploadcareImageEdit'),_0x545b79['editing']['view']['focus']();}),_0x16e7f1;}),this['_initConfig']();}['_initConfig'](){const _0x1f9d1c=_0x1cb64c(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1f9d1c),this['listenTo'](this['editor'],'destroy',()=>{_0x1f9d1c['remove']();});}}class lt extends _0x2b498e{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[ot,ct];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{Y as Uploadcare,H as UploadcareCommand,X as UploadcareEditing,lt as UploadcareImageEdit,rt as UploadcareImageEditCommand,ot as UploadcareImageEditEditing,ct as UploadcareImageEditUI,$ as UploadcareUI,Z as UploadcareUploadAdapter};
23
+ import{Plugin as _0x3f0f54,Command as _0x9fb5fc}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x31e8ef,IconGooglePhotos as _0x31d13b,IconGoogleDrive as _0x2a74ef,IconFacebook as _0x1e030c,IconDropbox as _0x3e6656,IconUploadcareLink as _0x21633b,IconUploadcareImageUpload as _0x35e69,IconError as _0x3b733d,IconUploadcareImageEdit as _0x587da1}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xd90ab4,MenuBarMenuListItemButtonView as _0x892d82,View as _0x49d17e,FocusCycler as _0x458733,Dialog as _0x163884,DialogViewPosition as _0x468cbb,SpinnerView as _0x3ef835,IconView as _0xbe1ad,Notification as _0x18366e}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x480aa3,DomEmitterMixin as _0x43265f,global as _0x38573e,getAncestors as _0x29fa64,ObservableMixin as _0x431206,uid as _0x36e641,createElement as _0x58fa27}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ImageUploadEditing as _0x31b02c,ImageUploadProgress as _0x23c378,PictureEditing as _0x20dd41,ImageUtils as _0x2b41a6,ImageEditing as _0x5e3c38}from'@ckeditor/ckeditor5-image/dist/index.js';import{FileRepository as _0x173bf1}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x5d3321,info as _0x4f7f3b}from'@uploadcare/upload-client';import*as _0x4a530a from'@uploadcare/file-uploader';var D=function(_0x71a18c){return _0x71a18c['Local']='local',_0x71a18c['URL']='url',_0x71a18c['Dropbox']='dropbox',_0x71a18c['GDrive']='gdrive',_0x71a18c['Facebook']='facebook',_0x71a18c['GPhotos']='gphotos',_0x71a18c['OneDrive']='onedrive',_0x71a18c;}({});function F(_0x2ebb4e,_0x21ea3c,_0x1f128d){const t=_0x2ebb4e['t'],_0x384b28=_0x2ebb4e['t'];switch(_0x21ea3c){case D['Local']:return{'text':_0x384b28('Insert'===_0x1f128d?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x384b28('From\x20computer')};case D['URL']:return{'text':'Insert'===_0x1f128d?_0x384b28('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x384b28('Via\x20URL')};case D['Dropbox']:return{'text':t('Insert'===_0x1f128d?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case D['Facebook']:return{'text':t('Insert'===_0x1f128d?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case D['GDrive']:return{'text':t('Insert'===_0x1f128d?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case D['GPhotos']:return{'text':t('Insert'===_0x1f128d?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case D['OneDrive']:return{'text':t('Insert'===_0x1f128d?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x21ea3c;}}class $ extends _0x3f0f54{['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 _0x539ea1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2cda9;for(const _0x2c07b4 in _0x539ea1){const _0x50426e=_0x2c07b4,_0x56e858=_0x539ea1[_0x50426e];if('uploadcareLicenseKeyValid'==_0x56e858||'uploadcareLicenseKeyInvalid'==_0x56e858||'uploadcareLicenseKeyExpired'==_0x56e858||'uploadcareLicenseKeyDomainLimit'==_0x56e858||'uploadcareLicenseKeyNotAllowed'==_0x56e858||'uploadcareLicenseKeyEvaluationLimit'==_0x56e858||'uploadcareLicenseKeyUsageLimit'==_0x56e858){delete _0x539ea1[_0x50426e],_0x2cda9=_0x56e858,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x2cda9&&_0x539ea1['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x2cda9&&_0x539ea1['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x2cda9&&_0x539ea1['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x2cda9&&_0x539ea1['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x2cda9&&_0x539ea1['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x2cda9&&_0x539ea1['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x3ca95f}=this,_0x178e34=_0x3ca95f['commands']['get']('uploadcare');if(!_0x178e34)return;const _0x1e9f6a=this['_normalizeConfigSourceList'](_0x3ca95f['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x38cef3,_0x3bca36)=>{const _0x2246dc=this['_getIntegrationKey'](_0x3bca36['type']);return _0x38cef3[_0x2246dc]||(_0x38cef3[_0x2246dc]=[]),_0x38cef3[_0x2246dc]['push'](_0x3bca36),_0x38cef3;},{});_0x3ca95f['plugins']['has']('ImageInsertUI')&&_0x3ca95f['commands']['get']('uploadcare')&&Object['entries'](_0x1e9f6a)['forEach'](([_0x744f88,_0xb54ba8])=>{_0x3ca95f['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x744f88,'observable':()=>_0x178e34,'buttonViewCreator':()=>this['_createToolbarButton'](_0xb54ba8),'formViewCreator':()=>this['_createDropdownButtons'](_0xb54ba8),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0xb54ba8),'override':'assetManager'!==_0x744f88});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0xb26d67){const {locale:_0x55f3af}=this['editor'];return _0xb26d67['map'](_0x2c739f=>{const _0x315171=F(_0x55f3af,_0x2c739f,'Insert');switch(_0x2c739f){case D['Local']:return{'icon':_0x35e69,'type':D['Local'],..._0x315171};case D['URL']:return{'icon':_0x21633b,'type':D['URL'],..._0x315171};case D['Dropbox']:return{'icon':_0x3e6656,'type':D['Dropbox'],..._0x315171};case D['Facebook']:return{'icon':_0x1e030c,'type':D['Facebook'],..._0x315171};case D['GDrive']:return{'icon':_0x2a74ef,'type':D['GDrive'],..._0x315171};case D['GPhotos']:return{'icon':_0x31d13b,'type':D['GPhotos'],..._0x315171};case D['OneDrive']:return{'icon':_0x31e8ef,'type':D['OneDrive'],..._0x315171};}});}['_getIntegrationKey'](_0xd93652){switch(_0xd93652){case D['Local']:return'upload';case D['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x16bd02,_0x895d4a){const _0x3098b4=this['editor'],_0x42625f=new _0x16bd02(_0x3098b4['locale']),_0x3993b7=_0x3098b4['commands']['get']('uploadcare');return _0x42625f['bind']('isEnabled')['to'](_0x3993b7),_0x42625f['on']('execute',()=>{_0x3993b7['execute'](_0x895d4a);}),_0x42625f;}['_createToolbarButton'](_0x3a5db1){const {locale:_0xfcd7b8}=this['editor'],_0x57e315=this['editor']['plugins']['get']('ImageInsertUI'),_0x5003cd=_0x3a5db1[0x0],_0x4b1ef2=this['_createButton'](_0xd90ab4,_0x5003cd['type']);return _0x4b1ef2['icon']=_0x5003cd['icon'],_0x4b1ef2['bind']('label')['to'](_0x57e315,'isImageSelected',_0x360d63=>F(_0xfcd7b8,_0x5003cd['type'],_0x360d63?'Replace':'Insert')['text']),_0x4b1ef2['tooltip']=!0x0,_0x4b1ef2;}['_createDropdownButtons'](_0x2cd09f){const {locale:_0x5e6aa9}=this['editor'],_0x15022c=this['editor']['plugins']['get']('ImageInsertUI');return _0x2cd09f['map'](_0x2a2f02=>{const _0x1b21dd=this['_createButton'](_0xd90ab4,_0x2a2f02['type']);return _0x1b21dd['withText']=!0x0,_0x1b21dd['icon']=_0x2a2f02['icon'],_0x1b21dd['bind']('label')['to'](_0x15022c,'isImageSelected',_0xa2046f=>F(_0x5e6aa9,_0x2a2f02['type'],_0xa2046f?'Replace':'Insert')['text']),_0x1b21dd;});}['_createMenuBarButtons'](_0x56c415){return _0x56c415['map'](_0x62e99d=>{const _0x1ac82b=this['_createButton'](_0x892d82,_0x62e99d['type']);return _0x1ac82b['icon']=_0x62e99d['icon'],_0x1ac82b['label']=_0x62e99d['shortText'],_0x1ac82b;});}}class B extends _0x49d17e{['focusTracker'];['focusCycler'];constructor(_0xf68d57){super(_0xf68d57),this['focusTracker']=new _0x480aa3(),this['focusCycler']=new _0x458733({'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 V extends B{constructor(_0xfc224d,_0x3b78f8){super(_0xfc224d),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-'+_0x3b78f8}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function j(_0x21e183,_0x117edf){const _0x326583=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x374414=>_0x374414<=_0x117edf)['map'](_0x228e6b=>_0x21e183['replace'](/\/$/,'')+'/-/resize/'+_0x228e6b+'x/\x20'+_0x228e6b+'w');return{'imageFallbackUrl':_0x21e183,'imageSources':[{'srcset':_0x326583['join'](',\x20'),'sizes':'(max-width:\x20'+_0x117edf+'px)\x20100vw,\x20'+_0x117edf+'px','type':'image/webp'}]};}function M(_0x37125f,_0x1c3c2d,_0x2c517d){const _0x3b04d7=_0x37125f['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3b04d7?parseInt(_0x3b04d7[0x1],0xa):_0x1c3c2d,'height':_0x3b04d7?parseInt(_0x3b04d7[0x2],0xa):_0x2c517d};}function q(_0x1b814c,_0x1ddd9c){const _0x13c8b0=new(_0x43265f())(),_0x53f34=_0x1b814c['plugins']['get']('ImageUtils'),_0x35428b=_0x1b814c['editing']['mapper']['toViewElement'](_0x1ddd9c),_0xf7dcd7=_0x53f34['findViewImgElement'](_0x35428b),_0x3e74e7=_0x1b814c['editing']['view']['domConverter']['viewToDom'](_0xf7dcd7),_0x36d0fc=_0x1ddd9c['getAttribute']('width'),_0xe30ab1=_0x1ddd9c['getAttribute']('height'),_0x571b73='image-processing';_0x1b814c['editing']['view']['change'](_0x361def=>{_0x361def['addClass'](_0x571b73,_0x35428b),_0x361def['setStyle']('aspect-ratio',_0x36d0fc+'/'+_0xe30ab1,_0xf7dcd7);}),_0x13c8b0['listenTo'](_0x3e74e7,'load',()=>{_0x13c8b0['stopListening'](_0x3e74e7,'load'),_0x1b814c['editing']['view']['change'](_0x4e9f59=>{_0x4e9f59['removeClass'](_0x571b73,_0x35428b),_0x4e9f59['removeStyle']('aspect-ratio',_0xf7dcd7);});});}function W(_0x4b0fc4){if(Array['isArray'](_0x4b0fc4)){const _0x8eaeb7=_0x4b0fc4['map'](W);return _0x2a5018=>_0x8eaeb7['some'](_0x2ac78f=>_0x2ac78f(_0x2a5018));}if('origin'==_0x4b0fc4){const _0x30cef4=_0x38573e['window']['location']['origin'];return _0x516139=>new URL(_0x516139,_0x38573e['document']['baseURI'])['origin']==_0x30cef4;}return'function'==typeof _0x4b0fc4?_0x4b0fc4:_0x4b0fc4 instanceof RegExp?_0x403b2b=>!(!_0x403b2b['match'](_0x4b0fc4)&&!_0x403b2b['replace'](/^https?:\/\//,'')['match'](_0x4b0fc4)):()=>!0x1;}function G(_0x45f364,_0x792b6f){return _0x29fa64(_0x45f364['target'])['includes'](_0x792b6f);}class z extends/* #__PURE__ -- @preserve */
24
+ _0x431206(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x3969a,_0x47f5d9,_0x472960){super(),this['_editor']=_0x3969a,this['_editing']=_0x47f5d9,this['_dialog']=_0x3969a['plugins']['get'](_0x163884),this['_api']=_0x47f5d9['ctxElement']['getAPI'](),this['_type']=_0x472960,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:_0x1670ca,model:_0x3c4a8a}=this['_editor'],_0x29e0cb=_0x3c4a8a['document']['selection']['getSelectedElement'](),_0x5cf429=_0x29e0cb&&(_0x29e0cb['is']('element','imageBlock')||_0x29e0cb['is']('element','imageInline'));this['_formView']=new V(_0x1670ca,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x35e69,'title':F(_0x1670ca,this['_type'],_0x5cf429?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x468cbb['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3bac3d=>!G(_0x3bac3d,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x11c406}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x17123e=>{const _0x499aa4=_0x11c406['length'];for(const _0x4eba9d of _0x11c406){const _0x55d8cb=_0x4eba9d===_0x11c406[_0x499aa4-0x1],{cdnUrl:_0x3cd823,fileInfo:_0x4234fa}=_0x4eba9d;if(!_0x3cd823||!_0x4234fa)continue;const {width:_0x24a185,height:_0x3ae9ae}=_0x4234fa['imageInfo'],_0x8a8819=M(_0x3cd823,_0x24a185,_0x3ae9ae),_0x1bd05a=j(_0x3cd823,_0x8a8819['width']),_0x53be32={'id':_0x4234fa['uuid'],'type':'image','attributes':{'imageDimension':_0x8a8819,..._0x1bd05a}};this['_insertAsset'](_0x53be32,_0x55d8cb,_0x17123e);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x596765=>{'idle'===_0x596765['detail']['status']&&!_0x596765['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===D['Local']?this['_api']['setCurrentActivity'](D['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x49dfb5,_0x1a0ee6,_0x4c285d){const _0x2a5a6b=this['_editor']['model']['document']['selection'],_0x5b2c2e=_0x2a5a6b['getSelectedElement'](),_0x37c9b4=!(!_0x5b2c2e||!_0x5b2c2e['is']('element','imageInline'));_0x4c285d['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x49dfb5,_0x37c9b4),_0x1a0ee6||_0x4c285d['setSelection'](_0x2a5a6b['getLastPosition']());}['_insertImage'](_0x3cf7c0,_0x914be6){const _0x1937ee=this['_editor'],{imageDimension:_0x494a6f,imageFallbackUrl:_0x43c83f,imageSources:_0x345850}=_0x3cf7c0['attributes'];_0x1937ee['execute']('insertImage',{'imageType':_0x914be6?'imageInline':null,'source':{'uploadcareImageId':_0x3cf7c0['id'],'src':_0x43c83f,'sources':_0x345850,..._0x494a6f}});}}class H extends _0x9fb5fc{['_editing'];['_controller']=null;static get['requires'](){return[_0x163884,X];}constructor(_0x4f3143){super(_0x4f3143),this['_editing']=_0x4f3143['plugins']['get'](X);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3dbf3d){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new z(this['editor'],this['_editing'],_0x3dbf3d);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class J{static['upload']({file:_0x1ae552,..._0x1dbcfe}){return _0x5d3321(_0x1ae552,_0x1dbcfe);}static['getInfo'](_0x2911cd,_0x56520c){return _0x4f7f3b(_0x2911cd,_0x56520c);}}class Z extends _0x3f0f54{static get['requires'](){return[_0x31b02c,_0x23c378,_0x173bf1,X];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x4b04f2=this['editor'];if(!!!_0x4b04f2['config']['get']('uploadcare'))return;_0x4b04f2['plugins']['get'](_0x173bf1)['createUploadAdapter']=_0x7ebc42=>new Q(_0x7ebc42,_0x4b04f2),_0x4b04f2['plugins']['get'](_0x31b02c)['on']('uploadComplete',(_0x412b7d,{imageElement:_0xdfe5fa,data:_0x4e0a96})=>{_0x4b04f2['model']['change'](_0x5ac053=>{_0x5ac053['setAttribute']('uploadcareImageId',_0x4e0a96['uploadcareImageId'],_0xdfe5fa);});});}}class Q{['loader'];['editor'];['controller'];constructor(_0x264338,_0x5b053b){this['loader']=_0x264338,this['editor']=_0x5b053b,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x5846ef=await this['loader']['file'];return J['upload']({'file':_0x5846ef,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x2ade51=>{_0x2ade51&&_0x2ade51['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x2ade51['value']);}})['then'](async _0x5f543d=>{const {imageFallbackUrl:_0x27c736,imageSources:_0x4a8af8}=j(_0x5f543d['cdnUrl'],_0x5f543d['imageInfo']['width']);return{'uploadcareImageId':_0x5f543d['uuid'],'default':_0x27c736,'sources':_0x4a8af8};})['catch'](()=>{const _0x49cfc3=t('Cannot\x20upload\x20file:')+('\x20'+_0x5846ef['name']+'.');return Promise['reject'](_0x49cfc3);});}['abort'](){this['controller']['abort']();}}class X extends _0x3f0f54{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return[_0x20dd41,Z,_0x163884];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x43a606){super(_0x43a606),this['ucContextId']=_0x36e641();}['init'](){const _0x4aa1db=this['editor'];_0x4aa1db['commands']['add']('uploadcare',new H(_0x4aa1db));}['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 _0x27f16a=_0x38573e['document']['querySelector']('input[uploadcare-file-input]');_0x27f16a&&_0x27f16a['remove']();}),async function(_0x4d2f82){const _0x2db227=_0x8fae51([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x5d3318=0x535f8c3a,_0x3ee04e=0x5358092a^_0x5d3318,_0x3070e8=window[_0x8fae51([0x44,0x61,0x74,0x65])][_0x8fae51([0x6e,0x6f,0x77])](),_0x37abb9=_0x4d2f82[_0x8fae51([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x40c6e1=new window[(_0x8fae51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c1b72=>{_0x37abb9[_0x8fae51([0x6f,0x6e,0x63,0x65])](_0x8fae51([0x72,0x65,0x61,0x64,0x79]),_0x1c1b72);}),_0x41f8e1={[_0x8fae51([0x6b,0x74,0x79])]:_0x8fae51([0x45,0x43]),[_0x8fae51([0x75,0x73,0x65])]:_0x8fae51([0x73,0x69,0x67]),[_0x8fae51([0x63,0x72,0x76])]:_0x8fae51([0x50,0x2d,0x32,0x35,0x36]),[_0x8fae51([0x78])]:_0x8fae51([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]),[_0x8fae51([0x79])]:_0x8fae51([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]),[_0x8fae51([0x61,0x6c,0x67])]:_0x8fae51([0x45,0x53,0x32,0x35,0x36])},_0x20297a=_0x37abb9[_0x8fae51([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x8fae51([0x67,0x65,0x74])](_0x8fae51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x39c801(){let _0x29bf18,_0x3b248c=null,_0x3f9d36=null;try{if(_0x20297a==_0x8fae51([0x47,0x50,0x4c]))return _0x8fae51([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x29bf18=_0x130b83(),!_0x29bf18)return _0x8fae51([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x29bf18[_0x8fae51([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3f9d36=_0x36a10a(_0x29bf18[_0x8fae51([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x29bf18[_0x8fae51([0x6a,0x74,0x69])])),await _0x3a1ff2()?_0x2f679e()?_0x1832e2()?_0x8fae51([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x443124()?(_0x29bf18[_0x8fae51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x8fae51([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3b248c=_0x54d08d(_0x8fae51([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1508ac()):_0x8fae51([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x8fae51([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x8fae51([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x8fae51([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1832e2(){const _0x187756=[_0x8fae51([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x8fae51([0x74,0x72,0x69,0x61,0x6c])][_0x8fae51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29bf18[_0x8fae51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3070e8/0x3e8:0xe10*_0x3ee04e;return _0x29bf18[_0x8fae51([0x65,0x78,0x70])]<_0x187756;}function _0x2f679e(){const _0x403b46=_0x29bf18[_0x8fae51([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x403b46&&(!!_0x403b46[_0x8fae51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8fae51([0x2a]))||!!_0x403b46[_0x8fae51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8fae51([0x55,0x50,0x4c,0x43])));}function _0x443124(){const _0x5d32ee=_0x29bf18[_0x8fae51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5d32ee||0x0==_0x5d32ee[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x30db02}=new URL(window[_0x8fae51([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5d32ee[_0x8fae51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30db02))return!0x0;const _0x4bb5fd=_0x30db02[_0x8fae51([0x73,0x70,0x6c,0x69,0x74])](_0x8fae51([0x2e]));return _0x5d32ee[_0x8fae51([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3ed583=>_0x3ed583[_0x8fae51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8fae51([0x2a])))[_0x8fae51([0x6d,0x61,0x70])](_0x376f5c=>_0x376f5c[_0x8fae51([0x73,0x70,0x6c,0x69,0x74])](_0x8fae51([0x2e])))[_0x8fae51([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x53dcf5=>_0x53dcf5[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4bb5fd[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x8fae51([0x6d,0x61,0x70])](_0x272106=>Array(_0x4bb5fd[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x272106[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x8fae51([0x66,0x69,0x6c,0x6c])](_0x272106[0x0]===_0x8fae51([0x2a])?_0x8fae51([0x2a]):'')[_0x8fae51([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x272106))[_0x8fae51([0x73,0x6f,0x6d,0x65])](_0x2903a7=>_0x4bb5fd[_0x8fae51([0x65,0x76,0x65,0x72,0x79])]((_0x14f648,_0x2bc4d6)=>_0x2903a7[_0x2bc4d6]===_0x14f648||_0x2903a7[_0x2bc4d6]===_0x8fae51([0x2a])));}function _0x1508ac(){return _0x3b248c&&_0x3f9d36?new window[(_0x8fae51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c165c,_0x5aaa70)=>{_0x3b248c[_0x8fae51([0x74,0x68,0x65,0x6e])](_0x5c165c,_0x5aaa70),_0x3f9d36[_0x8fae51([0x74,0x68,0x65,0x6e])](_0x10a902=>{_0x10a902!=_0x8fae51([0x56,0x61,0x6c,0x69,0x64])&&_0x5c165c(_0x10a902);},_0x5aaa70);}):_0x3b248c||_0x3f9d36||_0x8fae51([0x56,0x61,0x6c,0x69,0x64]);}}function _0x36a10a(_0x17ff89,_0x42c297){return new window[(_0x8fae51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3df9a8=>{if(_0x34f27a())return _0x3df9a8(_0x8fae51([0x56,0x61,0x6c,0x69,0x64]));_0x1f0e59(),_0x37abb9[_0x8fae51([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x8fae51([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x24d3d2=!0x1;const _0x5b5711=_0x36e641();function _0x448901(_0x3c8ee7){return!!_0x3c8ee7&&(typeof _0x3c8ee7===_0x8fae51([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3c8ee7===_0x8fae51([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3c8ee7[_0x8fae51([0x74,0x68,0x65,0x6e])]===_0x8fae51([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3c8ee7[_0x8fae51([0x63,0x61,0x74,0x63,0x68])]===_0x8fae51([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x53d65c(_0x3a58e7){_0x467f4b(_0x3a58e7)[_0x8fae51([0x74,0x68,0x65,0x6e])](_0x327293=>{if(!_0x327293||_0x327293[_0x8fae51([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x8fae51([0x6f,0x6b]))return _0x8fae51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x163a08(_0x1ebb32(_0x5b5711+_0x42c297))!=_0x327293[_0x8fae51([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x8fae51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x8fae51([0x56,0x61,0x6c,0x69,0x64]);})[_0x8fae51([0x74,0x68,0x65,0x6e])](_0x408621=>(_0x3f436f(),_0x408621),()=>{const _0x3bdde1=_0x29d54e();return null==_0x3bdde1?(_0x3f436f(),_0x8fae51([0x56,0x61,0x6c,0x69,0x64])):_0x8fae51(_0x3070e8-_0x3bdde1>(0x7753083a^_0x5d3318)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x8fae51([0x74,0x68,0x65,0x6e])](_0x3df9a8)[_0x8fae51([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3df9a8(_0x8fae51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xd6b1d3=0x536962ba^_0x5d3318;function _0x3f436f(){const _0x24d648=_0x8fae51([0x6c,0x6c,0x63,0x74,0x2d])+_0x163a08(_0x1ebb32(_0x17ff89)),_0x1b88e0=_0x4fe6cb(_0x163a08(window[_0x8fae51([0x4d,0x61,0x74,0x68])][_0x8fae51([0x63,0x65,0x69,0x6c])](_0x3070e8/_0xd6b1d3)));window[_0x8fae51([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x8fae51([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x24d648,_0x1b88e0);}function _0x29d54e(){const _0x417a2d=_0x8fae51([0x6c,0x6c,0x63,0x74,0x2d])+_0x163a08(_0x1ebb32(_0x17ff89)),_0x28dccd=window[_0x8fae51([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x8fae51([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x417a2d);return _0x28dccd?window[_0x8fae51([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4fe6cb(_0x28dccd),0x10)*_0xd6b1d3:null;}function _0x467f4b(_0x553a6f){return new window[(_0x8fae51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4ac5bc,_0x2ee032)=>{_0x553a6f[_0x8fae51([0x74,0x68,0x65,0x6e])](_0x4ac5bc,_0x2ee032),window[_0x8fae51([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2ee032,0x535e58fa^_0x5d3318);});}}_0x37abb9[_0x8fae51([0x6f,0x6e])](_0x8fae51([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x49586b,_0x531df5)=>{if(_0x531df5[0x0]!=_0x17ff89)return _0x3df9a8(_0x8fae51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x531df5[0x1]={..._0x531df5[0x1],[_0x8fae51([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5b5711};},{[_0x8fae51([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x8fae51([0x68,0x69,0x67,0x68])}),_0x37abb9[_0x8fae51([0x6f,0x6e])](_0x8fae51([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1f402a=>{_0x448901(_0x1f402a[_0x8fae51([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x24d3d2=!0x0,_0x53d65c(_0x1f402a[_0x8fae51([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x8fae51([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x8fae51([0x6c,0x6f,0x77])}),_0x40c6e1[_0x8fae51([0x74,0x68,0x65,0x6e])](()=>{_0x24d3d2||_0x3df9a8(_0x8fae51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x34f27a(){return _0x37abb9[_0x8fae51([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x8fae51([0x76,0x69,0x65,0x77])][_0x8fae51([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x8fae51([0x61,0x75,0x74,0x6f]);}function _0x1f0e59(){_0x37abb9[_0x8fae51([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x8fae51([0x76,0x69,0x65,0x77])][_0x8fae51([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x8fae51([0x61,0x75,0x74,0x6f]);}}function _0x54d08d(_0x560be1){const _0x4fa8f0=[new window[(_0x8fae51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x360334=>setTimeout(_0x360334,0x5356b2f6^_0x5d3318)),_0x40c6e1[_0x8fae51([0x74,0x68,0x65,0x6e])](()=>new window[(_0x8fae51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13307b=>{let _0x274555=0x0;_0x37abb9[_0x8fae51([0x6d,0x6f,0x64,0x65,0x6c])][_0x8fae51([0x6f,0x6e])](_0x8fae51([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2a0c39,_0x316b9a)=>{_0x316b9a[0x0][_0x8fae51([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x274555++,_0x274555==(0x535f89d2^_0x5d3318)&&(_0x13307b(),_0x2a0c39[_0x8fae51([0x6f,0x66,0x66])]());});}))];return window[_0x8fae51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x8fae51([0x72,0x61,0x63,0x65])](_0x4fa8f0)[_0x8fae51([0x74,0x68,0x65,0x6e])](()=>_0x560be1);}async function _0x49dca9(){await _0x40c6e1,_0x37abb9[_0x8fae51([0x6d,0x6f,0x64,0x65,0x6c])][_0x8fae51([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4c2787,_0x37abb9[_0x8fae51([0x6d,0x6f,0x64,0x65,0x6c])][_0x8fae51([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4c2787,_0x37abb9[_0x8fae51([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x8fae51([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x365641(_0x2cb7bb){const _0x1c5ed3=_0x1a5311();_0x37abb9[_0x1c5ed3]=_0x8fae51([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2cb7bb,_0x2cb7bb!=_0x8fae51([0x56,0x61,0x6c,0x69,0x64])&&_0x49dca9();}function _0x1a5311(){const _0x5a52f5=window[_0x8fae51([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x8fae51([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x8fae51([0x6e,0x6f,0x77])]())[_0x8fae51([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x8fae51([0x2e]),'');let _0x42b5f7=_0x8fae51([0x68]);for(let _0x20ea64=0x0;_0x20ea64<_0x5a52f5[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20ea64+=0x2){let _0x5ef311=window[_0x8fae51([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a52f5[_0x8fae51([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x20ea64,_0x20ea64+0x2));_0x5ef311>=_0x2db227[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5ef311-=_0x2db227[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x42b5f7+=_0x2db227[_0x5ef311];}return _0x42b5f7;}function _0x130b83(){const _0x1cfcc7=_0x20297a[_0x8fae51([0x73,0x70,0x6c,0x69,0x74])](_0x8fae51([0x2e]));if(0x3!=_0x1cfcc7[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xb25a86(_0x1cfcc7[0x1]);function _0xb25a86(_0x4c0441){const _0x1f8611=_0x1a4208(_0x4c0441);return _0x1f8611&&_0x44dd27()?_0x1f8611:null;function _0x44dd27(){const _0x2fd59f=_0x1f8611[_0x8fae51([0x6a,0x74,0x69])],_0x94c7b8=window[_0x8fae51([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2fd59f[_0x8fae51([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2fd59f[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x500cf5={..._0x1f8611,[_0x8fae51([0x6a,0x74,0x69])]:_0x2fd59f[_0x8fae51([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2fd59f[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x500cf5[_0x8fae51([0x76,0x63])],_0x1ebb32(_0x500cf5)==_0x94c7b8;}}}async function _0x3a1ff2(){let _0x2b8900=!0x0;try{const _0x32761d=_0x20297a[_0x8fae51([0x73,0x70,0x6c,0x69,0x74])](_0x8fae51([0x2e])),[_0x18c8c5,_0x476e62,_0x47b750]=_0x32761d;return _0xe0d0db(_0x18c8c5),await _0x566b28(_0x18c8c5,_0x476e62,_0x47b750),_0x2b8900;}catch{return!0x1;}function _0xe0d0db(_0x437515){const _0x2bdbdb=_0x1a4208(_0x437515);_0x2bdbdb&&_0x2bdbdb[_0x8fae51([0x61,0x6c,0x67])]==_0x8fae51([0x45,0x53,0x32,0x35,0x36])||(_0x2b8900=!0x1);}async function _0x566b28(_0x303dac,_0x242451,_0x4edd61){const _0x5df975=window[_0x8fae51([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x8fae51([0x66,0x72,0x6f,0x6d])](_0x35593c(_0x4edd61),_0x345554=>_0x345554[_0x8fae51([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x23111b=new window[(_0x8fae51([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x8fae51([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x303dac+_0x8fae51([0x2e])+_0x242451),_0x55c330=window[_0x8fae51([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x8fae51([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x55c330)return;const _0x4885f9=await _0x55c330[_0x8fae51([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x8fae51([0x6a,0x77,0x6b]),_0x41f8e1,{[_0x8fae51([0x6e,0x61,0x6d,0x65])]:_0x8fae51([0x45,0x43,0x44,0x53,0x41]),[_0x8fae51([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x8fae51([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x8fae51([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x55c330[_0x8fae51([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x8fae51([0x6e,0x61,0x6d,0x65])]:_0x8fae51([0x45,0x43,0x44,0x53,0x41]),[_0x8fae51([0x68,0x61,0x73,0x68])]:{[_0x8fae51([0x6e,0x61,0x6d,0x65])]:_0x8fae51([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4885f9,_0x5df975,_0x23111b)||(_0x2b8900=!0x1);}}function _0x1a4208(_0x32bc0e){return _0x32bc0e[_0x8fae51([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x8fae51([0x65,0x79]))?JSON[_0x8fae51([0x70,0x61,0x72,0x73,0x65])](_0x35593c(_0x32bc0e)):null;}function _0x35593c(_0x43aba4){return window[_0x8fae51([0x61,0x74,0x6f,0x62])](_0x43aba4[_0x8fae51([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x8fae51([0x2b]))[_0x8fae51([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x8fae51([0x2f])));}function _0x1ebb32(_0x1106df){let _0x1482dc=0x1505;function _0x51766c(_0x383c2c){for(let _0x590b68=0x0;_0x590b68<_0x383c2c[_0x8fae51([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x590b68++){const _0x3f36fd=_0x383c2c[_0x8fae51([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x590b68);_0x1482dc=(_0x1482dc<<0x5)+_0x1482dc+_0x3f36fd,_0x1482dc&=_0x1482dc;}}function _0x55c363(_0x1c7d7a){Array[_0x8fae51([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1c7d7a)?_0x1c7d7a[_0x8fae51([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x55c363):_0x1c7d7a&&typeof _0x1c7d7a==_0x8fae51([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x8fae51([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1c7d7a)[_0x8fae51([0x73,0x6f,0x72,0x74])]()[_0x8fae51([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5c392d,_0x18b546])=>{_0x51766c(_0x5c392d),_0x55c363(_0x18b546);}):_0x51766c(window[_0x8fae51([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1c7d7a));}return _0x55c363(_0x1106df),_0x1482dc>>>0x0;}function _0x163a08(_0x5a18db){return _0x5a18db[_0x8fae51([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x8fae51([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x8fae51([0x30]));}function _0x4fe6cb(_0x2a3124){return _0x2a3124[_0x8fae51([0x73,0x70,0x6c,0x69,0x74])]('')[_0x8fae51([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x8fae51([0x6a,0x6f,0x69,0x6e])]('');}function _0x4c2787(){}function _0x8fae51(_0x24c0d5){return _0x24c0d5['map'](_0x3ce794=>String['fromCharCode'](_0x3ce794))['join']('');}_0x365641(await _0x39c801());}(this);}['_initSchema'](){const _0x6471a6=this['editor']['model']['schema'];_0x6471a6['isRegistered']('imageBlock')&&_0x6471a6['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x6471a6['isRegistered']('imageInline')&&_0x6471a6['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5acef6=this['editor'];_0x5acef6['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5acef6['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x54e330=>_0x54e330['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x12315a=_0x5acef6['commands']['get']('replaceImageSource');_0x12315a&&this['listenTo'](_0x12315a,'cleanupImage',(_0x151d4a,[_0xd7a6a2,_0x4c2daa])=>{_0xd7a6a2['removeAttribute']('uploadcareImageId',_0x4c2daa);});}['_initConfig'](){const _0x1a50c6=this['editor']['config']['get']('uploadcare.uploader')||{},_0x2c0caa=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x58fa27(_0x38573e['document'],'uc-config',{..._0x1a50c6,'pubkey':_0x2c0caa,'ctx-name':'uploader-'+this['ucContextId'],'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']=_0x26ea90=>{if('closeMax'==_0x26ea90)return'#uc-icon-arrow-down';},_0x38573e['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x58fa27(_0x38573e['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x38573e['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x88cf24=this['editor']['commands']['get']('insertImage');_0x88cf24&&this['listenTo'](_0x88cf24,'execute',()=>{const _0x5b8e76=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5b8e76&&_0x5b8e76['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x5b8e76);});});const _0x785c82=this['editor']['commands']['get']('uploadcareImageReplace');_0x785c82&&this['listenTo'](_0x785c82,'execute',()=>{const _0x218f3f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x218f3f&&_0x218f3f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x218f3f);});});}}class Y extends _0x3f0f54{static get['requires'](){return[X,$];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c0122){super(_0x3c0122),_0x3c0122['config']['define']('uploadcare.uploader.sourceList',[D['Local'],D['URL']]),_0x4a530a['defineComponents'](_0x4a530a),this['_defineLocale']();}['_defineLocale'](){const _0x5e32ba=this['editor']['config']['get']('uploadcare.locale'),_0x55736c=this['editor']['locale']['contentLanguage'];_0x5e32ba&&_0x4a530a['defineLocale'](_0x55736c,_0x5e32ba);}}class tt extends _0x49d17e{constructor(_0x339707){super(_0x339707);const t=_0x339707['t'],_0x357d9d=this['bindTemplate'],_0x1eded9=new _0x3ef835();_0x1eded9['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':[_0x1eded9,{'text':_0x357d9d['to']('imageUploadProgress',_0x2400b8=>t('Loading\x20image...')+'\x20('+(_0x2400b8||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 et extends _0x49d17e{constructor(_0x5ab011){super(_0x5ab011);const t=_0x5ab011['t'];this['set']('errorType',null);const _0xe36837=new _0xd90ab4(_0x5ab011);_0xe36837['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xe36837['withText']=!0x0,_0xe36837['class']='ck-button-action',_0xe36837['on']('execute',()=>{this['fire']('retry');}),_0xe36837['bind']('isVisible')['to'](this,'errorType',_0x246f9e=>'NotFound'!==_0x246f9e);const _0x12c4ed=new _0xbe1ad();_0x12c4ed['content']=_0x3b733d,_0x12c4ed['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xee5fe0=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':[_0x12c4ed,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xee5fe0['to']('errorType',_0x27e3d1=>t('NotFound'!==_0x27e3d1?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xe36837]},{'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 it extends _0x49d17e{constructor(_0x211f16,_0x5cadec){super(_0x211f16);const _0xc7c075=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5cadec,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xc7c075['to']('imageSrc')}});}}class st extends B{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4768ac,_0x2e3583,_0x5a12c9){super(_0x4768ac),this['_items']=this['createCollection'](),this['_loadingView']=new tt(_0x4768ac),this['_errorView']=new et(_0x4768ac),this['_editingView']=new it(_0x4768ac,_0x5a12c9),this['_focusableView']=new _0x49d17e(_0x4768ac),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2e3583),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'],_0x331281=>{this['_addUploadcareImageEditorListeners'](_0x331281);});}),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'](_0x3f109c,_0x56c683){const _0x5cf18c='uc-cloud-image-editor',_0x82b832=_0x3f109c['querySelector'](_0x5cf18c);if(_0x82b832)return _0x56c683(_0x82b832);const _0x24459f=new MutationObserver(_0x4fcbef=>{const _0x36cc0a=_0x4fcbef['filter'](_0x456466=>_0x456466['target']===_0x3f109c&&_0x456466['addedNodes']['length']>0x0&&_0x456466['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5cf18c);_0x36cc0a['length']&&(_0x24459f['disconnect'](),_0x56c683(_0x36cc0a[0x0]['addedNodes'][0x0]));});_0x24459f['observe'](_0x3f109c,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x22fb20){_0x22fb20['addEventListener']('apply',_0x3f2518=>{this['fire']('apply',{'imageSrc':_0x3f2518['detail']['cdnUrl']});}),_0x22fb20['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class nt extends/* #__PURE__ -- @preserve */
25
+ _0x431206(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4b23d8,_0x419d17,_0x24f715){super(),this['_editor']=_0x4b23d8,this['_dialog']=_0x419d17,this['_imageElement']=_0x24f715,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 _0xbdf344=this['_imageElement'],_0x4af1f8=_0xbdf344['getAttribute']('uploadcareImageId'),_0x3c8d2d=_0xbdf344['getAttribute']('src');if(_0x4af1f8)await this['_loadImageInfo'](_0x4af1f8,_0x3c8d2d);else{if(this['_imageCache']['has'](_0x3c8d2d)){const _0x3136f7=this['_imageCache']['get'](_0x3c8d2d);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3136f7['url'],this['imageDimension']=_0x3136f7['dimension'],this['imageId']=_0x3136f7['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5cdbe2}=this['_editor'],t=_0x5cdbe2['t'],_0x374eea=new st(_0x5cdbe2,this['imageStatus'],this['_attributes']);_0x374eea['bind']('status')['to'](this,'imageStatus'),_0x374eea['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x374eea['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x374eea['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x374eea,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x587da1,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x374eea,'position':_0x468cbb['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x374eea['focus']();},'onHide':()=>{_0x374eea['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3e40cd=>!G(_0x3e40cd,_0x374eea['element'])}});}['_loadImageInfo'](_0x5c46d,_0x18c606){return J['getInfo'](_0x5c46d,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x2ac146=>{const {width:_0x5711ba,height:_0x43bb37}=_0x2ac146['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x18c606,this['imageDimension']={'width':_0x5711ba,'height':_0x43bb37},this['imageId']=_0x5c46d;})['catch'](_0xffb306=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xffb306['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2feef3,_0x348184){return this['_getImageAsFile'](_0x2feef3)['then'](_0x177eb5=>J['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x348184['signal'],'file':_0x177eb5,'onProgress':_0x18b29c=>{_0x18b29c&&_0x18b29c['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x18b29c['value']));}}))['then'](_0x447be2=>{const {width:_0x281674,height:_0x328420}=_0x447be2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x447be2['cdnUrl'],this['imageDimension']={'width':_0x281674,'height':_0x328420},this['imageId']=_0x447be2['uuid'],this['imageUploadProgress']=null;const _0x571d5b=_0x2feef3['getAttribute']('src');this['_imageCache']['set'](_0x571d5b,{'id':_0x447be2['uuid'],'url':_0x447be2['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3aed58=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3aed58['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x243362,_0x54eb47){_0x243362['on']('apply',(_0x10bcea,_0x59984b)=>{this['_replaceImage'](_0x54eb47,_0x59984b['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x243362['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x243362['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0xc7a4a2,_0x3b3848,_0x5373bd){const _0x3e1c37=this['_editor'],{width:_0x45a519,height:_0x461714}=M(_0x3b3848,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x2d1b7f,imageSources:_0x39f134}=j(_0x3b3848,_0x45a519);_0x3e1c37['model']['change'](_0x1b2e13=>{if('$graveyard'===_0xc7a4a2['root']['rootName']){_0x3e1c37['execute']('insertImage',{'imageType':_0xc7a4a2['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0xc7a4a2['getAttributes']()),'uploadcareImageId':_0x5373bd,'src':_0x2d1b7f,'sources':_0x39f134,'width':_0x45a519,'height':_0x461714}});const _0x36fb32=_0xc7a4a2['getChildren']();_0xc7a4a2=_0x3e1c37['model']['document']['selection']['getSelectedElement']();for(const _0x3d7d7f of _0x36fb32)_0x1b2e13['append'](_0x1b2e13['cloneElement'](_0x3d7d7f),_0xc7a4a2);}else _0x1b2e13['setSelection'](_0xc7a4a2,'on'),_0x3e1c37['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0xc7a4a2['getAttributes']()),'uploadcareImageId':_0x5373bd,'src':_0x2d1b7f,'sources':_0x39f134,'width':_0x45a519,'height':_0x461714},_0xc7a4a2);_0x1b2e13['setSelection'](_0xc7a4a2,'on');});}async['_getImageAsFile'](_0x5031b8){const _0x222d4a=_0x38573e['window'],_0x195019=_0x38573e['document']['location']['href'],_0x449553=new _0x222d4a['URL'](_0x5031b8['getAttribute']('src'),_0x195019);if('data:'===_0x449553['protocol']){const _0x3e9385=_0x449553['href']['split'](','),_0xdddb42=_0x3e9385[0x0]['match'](/:(.*?);/)[0x1],_0x40ab75=_0xdddb42['split']('/')[0x1],_0x4511a1=_0x222d4a['atob'](_0x3e9385[_0x3e9385['length']-0x1]);let _0x1b2fc4=_0x4511a1['length'];const _0x431c51=new _0x222d4a['Uint8Array'](_0x1b2fc4);for(;_0x1b2fc4--;)_0x431c51[_0x1b2fc4]=_0x4511a1['charCodeAt'](_0x1b2fc4);return new _0x222d4a['File']([_0x431c51],'image.'+_0x40ab75,{'type':_0xdddb42});}const _0x167923=_0x449553['href']['split']('/'),_0x19cf15=_0x167923[_0x167923['length']-0x1],_0x551afa=_0x19cf15['split']('.')[0x1];return _0x222d4a['fetch'](_0x449553['href'])['then'](_0x28d0e0=>_0x28d0e0['clone']()['blob']())['then'](_0xc0c67f=>new _0x222d4a['File']([_0xc0c67f],_0x19cf15,{'type':'image/'+_0x551afa}));}}class rt extends _0x9fb5fc{['imageEditController'];static get['requires'](){return[_0x163884];}['_isEditable'];constructor(_0x5d0f43){super(_0x5d0f43),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x2f00ae){const _0x3bf2a6=W(_0x2f00ae);return _0x18d5d9=>!(!_0x18d5d9||!_0x18d5d9['is']('element','imageBlock')&&!_0x18d5d9['is']('element','imageInline'))&&(!!_0x18d5d9['hasAttribute']('uploadcareImageId')||!!_0x18d5d9['hasAttribute']('src')&&_0x3bf2a6(_0x18d5d9['getAttribute']('src')));}(_0x5d0f43['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0xaf50fe=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0xaf50fe);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5db995=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5db995&&(_0x5db995['is']('element','imageBlock')||_0x5db995['is']('element','imageInline'))&&(this['imageEditController']=new nt(this['editor'],this['editor']['plugins']['get'](_0x163884),_0x5db995),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class at extends _0x9fb5fc{['refresh'](){const _0x316e9c=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x316e9c&&(_0x316e9c['is']('element','imageBlock')||_0x316e9c['is']('element','imageInline')));}['execute'](_0x44b135){const _0x2c2b0b=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x1854d6=>{_0x1854d6['setAttributes'](_0x44b135,_0x2c2b0b),_0x1854d6['removeAttribute']('srcset',_0x2c2b0b),_0x1854d6['removeAttribute']('sizes',_0x2c2b0b);});}}class ot extends _0x3f0f54{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[X,_0x18366e,_0x2b41a6,_0x5e3c38];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4c00c8}=this;_0x4c00c8['commands']['add']('uploadcareImageEdit',new rt(_0x4c00c8)),_0x4c00c8['commands']['add']('uploadcareImageReplace',new at(_0x4c00c8));}}class ct extends _0x3f0f54{['_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 _0x160e97=this['editor'];_0x160e97['ui']['componentFactory']['add']('uploadcareImageEdit',_0x599484=>{const _0x19eb50=_0x160e97['commands']['get']('uploadcareImageEdit'),_0x203844=new _0xd90ab4(_0x599484),t=_0x599484['t'];return _0x203844['set']({'icon':_0x587da1,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x203844['bind']('isEnabled')['to'](_0x19eb50),_0x203844['bind']('isOn')['to'](_0x19eb50,'isActive'),this['listenTo'](_0x203844,'execute',()=>{_0x160e97['execute']('uploadcareImageEdit'),_0x160e97['editing']['view']['focus']();}),_0x203844;}),this['_initConfig']();}['_initConfig'](){const _0x3dff59=_0x58fa27(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x3dff59),this['listenTo'](this['editor'],'destroy',()=>{_0x3dff59['remove']();});}}class lt extends _0x3f0f54{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[ot,ct];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{Y as Uploadcare,H as UploadcareCommand,X as UploadcareEditing,lt as UploadcareImageEdit,rt as UploadcareImageEditCommand,ot as UploadcareImageEditEditing,ct as UploadcareImageEditUI,$ as UploadcareUI,Z as UploadcareUploadAdapter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "48.0.0-alpha.2",
3
+ "version": "48.0.0-alpha.3",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -37,13 +37,13 @@
37
37
  "dist/translations/*.umd.js"
38
38
  ],
39
39
  "dependencies": {
40
- "@ckeditor/ckeditor5-core": "48.0.0-alpha.2",
41
- "@ckeditor/ckeditor5-engine": "48.0.0-alpha.2",
42
- "@ckeditor/ckeditor5-icons": "48.0.0-alpha.2",
43
- "@ckeditor/ckeditor5-image": "48.0.0-alpha.2",
44
- "@ckeditor/ckeditor5-ui": "48.0.0-alpha.2",
45
- "@ckeditor/ckeditor5-upload": "48.0.0-alpha.2",
46
- "@ckeditor/ckeditor5-utils": "48.0.0-alpha.2",
40
+ "@ckeditor/ckeditor5-core": "48.0.0-alpha.3",
41
+ "@ckeditor/ckeditor5-engine": "48.0.0-alpha.3",
42
+ "@ckeditor/ckeditor5-icons": "48.0.0-alpha.3",
43
+ "@ckeditor/ckeditor5-image": "48.0.0-alpha.3",
44
+ "@ckeditor/ckeditor5-ui": "48.0.0-alpha.3",
45
+ "@ckeditor/ckeditor5-upload": "48.0.0-alpha.3",
46
+ "@ckeditor/ckeditor5-utils": "48.0.0-alpha.3",
47
47
  "@uploadcare/file-uploader": "1.24.5",
48
48
  "@uploadcare/upload-client": "6.14.3"
49
49
  },