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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 _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};
23
+ import{Plugin as _0x20cce4,Command as _0x39f285}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x12852f,IconGooglePhotos as _0x4451cf,IconGoogleDrive as _0x29d5e3,IconFacebook as _0x3d9ec4,IconDropbox as _0x2ef066,IconUploadcareLink as _0x2c5f10,IconUploadcareImageUpload as _0x547b7c,IconError as _0x3376b8,IconUploadcareImageEdit as _0x35592e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x121de2,MenuBarMenuListItemButtonView as _0x2d1277,View as _0x295101,FocusCycler as _0x293a7a,Dialog as _0x4b0eef,DialogViewPosition as _0x1384b6,SpinnerView as _0x40ab07,IconView as _0x36209b,Notification as _0x4d4cbd}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x51ee28,DomEmitterMixin as _0x2d50dd,global as _0x268822,getAncestors as _0x569d09,ObservableMixin as _0x492ba4,uid as _0x3b9c2f,createElement as _0x2d1cfc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ImageUploadEditing as _0x529657,ImageUploadProgress as _0xf1fff3,PictureEditing as _0x18cca6,ImageUtils as _0x308f32,ImageEditing as _0x555ed6}from'@ckeditor/ckeditor5-image/dist/index.js';import{FileRepository as _0x473012}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x14d5b0,info as _0x5c614d}from'@uploadcare/upload-client';import*as _0x46c3a1 from'@uploadcare/file-uploader';var D=function(_0x3bd3d7){return _0x3bd3d7['Local']='local',_0x3bd3d7['URL']='url',_0x3bd3d7['Dropbox']='dropbox',_0x3bd3d7['GDrive']='gdrive',_0x3bd3d7['Facebook']='facebook',_0x3bd3d7['GPhotos']='gphotos',_0x3bd3d7['OneDrive']='onedrive',_0x3bd3d7;}({});function F(_0x3e0e86,_0x18f4da,_0x3fa5d1){const t=_0x3e0e86['t'],_0x2d6c9d=_0x3e0e86['t'];switch(_0x18f4da){case D['Local']:return{'text':_0x2d6c9d('Insert'===_0x3fa5d1?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x2d6c9d('From\x20computer')};case D['URL']:return{'text':'Insert'===_0x3fa5d1?_0x2d6c9d('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x2d6c9d('Via\x20URL')};case D['Dropbox']:return{'text':t('Insert'===_0x3fa5d1?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case D['Facebook']:return{'text':t('Insert'===_0x3fa5d1?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case D['GDrive']:return{'text':t('Insert'===_0x3fa5d1?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case D['GPhotos']:return{'text':t('Insert'===_0x3fa5d1?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case D['OneDrive']:return{'text':t('Insert'===_0x3fa5d1?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x18f4da;}}class $ extends _0x20cce4{['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 _0x53b460=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x214648;for(const _0x2c6b82 in _0x53b460){const _0x5c402b=_0x2c6b82,_0x49567b=_0x53b460[_0x5c402b];if('uploadcareLicenseKeyValid'==_0x49567b||'uploadcareLicenseKeyInvalid'==_0x49567b||'uploadcareLicenseKeyExpired'==_0x49567b||'uploadcareLicenseKeyDomainLimit'==_0x49567b||'uploadcareLicenseKeyNotAllowed'==_0x49567b||'uploadcareLicenseKeyEvaluationLimit'==_0x49567b||'uploadcareLicenseKeyUsageLimit'==_0x49567b){delete _0x53b460[_0x5c402b],_0x214648=_0x49567b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x214648&&_0x53b460['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x214648&&_0x53b460['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x214648&&_0x53b460['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x214648&&_0x53b460['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x214648&&_0x53b460['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x214648&&_0x53b460['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x474f14}=this,_0x26fa18=_0x474f14['commands']['get']('uploadcare');if(!_0x26fa18)return;const _0x14b007=this['_normalizeConfigSourceList'](_0x474f14['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x3cf2a3,_0x4db306)=>{const _0x289e8c=this['_getIntegrationKey'](_0x4db306['type']);return _0x3cf2a3[_0x289e8c]||(_0x3cf2a3[_0x289e8c]=[]),_0x3cf2a3[_0x289e8c]['push'](_0x4db306),_0x3cf2a3;},{});_0x474f14['plugins']['has']('ImageInsertUI')&&_0x474f14['commands']['get']('uploadcare')&&Object['entries'](_0x14b007)['forEach'](([_0x156c75,_0x12cad1])=>{_0x474f14['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x156c75,'observable':()=>_0x26fa18,'buttonViewCreator':()=>this['_createToolbarButton'](_0x12cad1),'formViewCreator':()=>this['_createDropdownButtons'](_0x12cad1),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x12cad1),'override':'assetManager'!==_0x156c75});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x50e2c8){const {locale:_0x3dda0c}=this['editor'];return _0x50e2c8['map'](_0x106951=>{const _0xedbfc9=F(_0x3dda0c,_0x106951,'Insert');switch(_0x106951){case D['Local']:return{'icon':_0x547b7c,'type':D['Local'],..._0xedbfc9};case D['URL']:return{'icon':_0x2c5f10,'type':D['URL'],..._0xedbfc9};case D['Dropbox']:return{'icon':_0x2ef066,'type':D['Dropbox'],..._0xedbfc9};case D['Facebook']:return{'icon':_0x3d9ec4,'type':D['Facebook'],..._0xedbfc9};case D['GDrive']:return{'icon':_0x29d5e3,'type':D['GDrive'],..._0xedbfc9};case D['GPhotos']:return{'icon':_0x4451cf,'type':D['GPhotos'],..._0xedbfc9};case D['OneDrive']:return{'icon':_0x12852f,'type':D['OneDrive'],..._0xedbfc9};}});}['_getIntegrationKey'](_0x1a2d46){switch(_0x1a2d46){case D['Local']:return'upload';case D['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x4c6233,_0x47c671){const _0x1126da=this['editor'],_0x3a6eb3=new _0x4c6233(_0x1126da['locale']),_0xa5b847=_0x1126da['commands']['get']('uploadcare');return _0x3a6eb3['bind']('isEnabled')['to'](_0xa5b847),_0x3a6eb3['on']('execute',()=>{_0xa5b847['execute'](_0x47c671);}),_0x3a6eb3;}['_createToolbarButton'](_0x82dceb){const {locale:_0x55153e}=this['editor'],_0xecc07c=this['editor']['plugins']['get']('ImageInsertUI'),_0x4216b6=_0x82dceb[0x0],_0x2bfe3b=this['_createButton'](_0x121de2,_0x4216b6['type']);return _0x2bfe3b['icon']=_0x4216b6['icon'],_0x2bfe3b['bind']('label')['to'](_0xecc07c,'isImageSelected',_0xa1bcba=>F(_0x55153e,_0x4216b6['type'],_0xa1bcba?'Replace':'Insert')['text']),_0x2bfe3b['tooltip']=!0x0,_0x2bfe3b;}['_createDropdownButtons'](_0x3638b2){const {locale:_0x10fbf5}=this['editor'],_0x2ae752=this['editor']['plugins']['get']('ImageInsertUI');return _0x3638b2['map'](_0x225adb=>{const _0x51d33b=this['_createButton'](_0x121de2,_0x225adb['type']);return _0x51d33b['withText']=!0x0,_0x51d33b['icon']=_0x225adb['icon'],_0x51d33b['bind']('label')['to'](_0x2ae752,'isImageSelected',_0x194848=>F(_0x10fbf5,_0x225adb['type'],_0x194848?'Replace':'Insert')['text']),_0x51d33b;});}['_createMenuBarButtons'](_0x5d91db){return _0x5d91db['map'](_0x29c7bb=>{const _0x12afa1=this['_createButton'](_0x2d1277,_0x29c7bb['type']);return _0x12afa1['icon']=_0x29c7bb['icon'],_0x12afa1['label']=_0x29c7bb['shortText'],_0x12afa1;});}}class B extends _0x295101{['focusTracker'];['focusCycler'];constructor(_0xa1656e){super(_0xa1656e),this['focusTracker']=new _0x51ee28(),this['focusCycler']=new _0x293a7a({'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(_0x4df9b4,_0x4f8a00){super(_0x4df9b4),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-'+_0x4f8a00}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function j(_0x38261d,_0x433d73){const _0x55e0d7=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4a19a5=>_0x4a19a5<=_0x433d73)['map'](_0x21002a=>_0x38261d['replace'](/\/$/,'')+'/-/resize/'+_0x21002a+'x/\x20'+_0x21002a+'w');return{'imageFallbackUrl':_0x38261d,'imageSources':[{'srcset':_0x55e0d7['join'](',\x20'),'sizes':'(max-width:\x20'+_0x433d73+'px)\x20100vw,\x20'+_0x433d73+'px','type':'image/webp'}]};}function M(_0x28a9cd,_0x13f584,_0x16a71c){const _0x5cd9d7=_0x28a9cd['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5cd9d7?parseInt(_0x5cd9d7[0x1],0xa):_0x13f584,'height':_0x5cd9d7?parseInt(_0x5cd9d7[0x2],0xa):_0x16a71c};}function q(_0x3bbada,_0x196960){const _0x32b58a=new(_0x2d50dd())(),_0x366e84=_0x3bbada['plugins']['get']('ImageUtils'),_0x556e56=_0x3bbada['editing']['mapper']['toViewElement'](_0x196960),_0x13be05=_0x366e84['findViewImgElement'](_0x556e56),_0x951480=_0x3bbada['editing']['view']['domConverter']['viewToDom'](_0x13be05),_0xa059a=_0x196960['getAttribute']('width'),_0x277bec=_0x196960['getAttribute']('height'),_0x5a58f4='image-processing';_0x3bbada['editing']['view']['change'](_0x30ad9a=>{_0x30ad9a['addClass'](_0x5a58f4,_0x556e56),_0x30ad9a['setStyle']('aspect-ratio',_0xa059a+'/'+_0x277bec,_0x13be05);}),_0x32b58a['listenTo'](_0x951480,'load',()=>{_0x32b58a['stopListening'](_0x951480,'load'),_0x3bbada['editing']['view']['change'](_0x8bf070=>{_0x8bf070['removeClass'](_0x5a58f4,_0x556e56),_0x8bf070['removeStyle']('aspect-ratio',_0x13be05);});});}function W(_0x55f24a){if(Array['isArray'](_0x55f24a)){const _0xa7f90f=_0x55f24a['map'](W);return _0x82159e=>_0xa7f90f['some'](_0x2b4ca6=>_0x2b4ca6(_0x82159e));}if('origin'==_0x55f24a){const _0x53e613=_0x268822['window']['location']['origin'];return _0x2d3ec1=>new URL(_0x2d3ec1,_0x268822['document']['baseURI'])['origin']==_0x53e613;}return'function'==typeof _0x55f24a?_0x55f24a:_0x55f24a instanceof RegExp?_0x4308be=>!(!_0x4308be['match'](_0x55f24a)&&!_0x4308be['replace'](/^https?:\/\//,'')['match'](_0x55f24a)):()=>!0x1;}function G(_0x30d9ed,_0x312ee2){return _0x569d09(_0x30d9ed['target'])['includes'](_0x312ee2);}class z extends/* #__PURE__ -- @preserve */
24
+ _0x492ba4(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x19e9fc,_0x484dd5,_0x77f264){super(),this['_editor']=_0x19e9fc,this['_editing']=_0x484dd5,this['_dialog']=_0x19e9fc['plugins']['get'](_0x4b0eef),this['_api']=_0x484dd5['ctxElement']['getAPI'](),this['_type']=_0x77f264,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:_0x529273,model:_0x3bc444}=this['_editor'],_0x658d31=_0x3bc444['document']['selection']['getSelectedElement'](),_0x19d82e=_0x658d31&&(_0x658d31['is']('element','imageBlock')||_0x658d31['is']('element','imageInline'));this['_formView']=new V(_0x529273,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x547b7c,'title':F(_0x529273,this['_type'],_0x19d82e?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x1384b6['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2e80bf=>!G(_0x2e80bf,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0xb7936a}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1d7427=>{const _0x9d1514=_0xb7936a['length'];for(const _0x50279d of _0xb7936a){const _0x319266=_0x50279d===_0xb7936a[_0x9d1514-0x1],{cdnUrl:_0x2200a5,fileInfo:_0x21ffbc}=_0x50279d;if(!_0x2200a5||!_0x21ffbc)continue;const {width:_0x3ad484,height:_0x19d383}=_0x21ffbc['imageInfo'],_0x38a18e=M(_0x2200a5,_0x3ad484,_0x19d383),_0x50cba5=j(_0x2200a5,_0x38a18e['width']),_0x4abaf5={'id':_0x21ffbc['uuid'],'type':'image','attributes':{'imageDimension':_0x38a18e,..._0x50cba5}};this['_insertAsset'](_0x4abaf5,_0x319266,_0x1d7427);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2617ff=>{'idle'===_0x2617ff['detail']['status']&&!_0x2617ff['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===D['Local']?this['_api']['setCurrentActivity'](D['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x2d6962,_0xa743a3,_0x1040a8){const _0x40f741=this['_editor']['model']['document']['selection'],_0x461352=_0x40f741['getSelectedElement'](),_0x3c6fe6=!(!_0x461352||!_0x461352['is']('element','imageInline'));_0x1040a8['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x2d6962,_0x3c6fe6),_0xa743a3||_0x1040a8['setSelection'](_0x40f741['getLastPosition']());}['_insertImage'](_0x515a4a,_0x1a95b2){const _0x10304d=this['_editor'],{imageDimension:_0xccbf0b,imageFallbackUrl:_0x59bc98,imageSources:_0x31bf9d}=_0x515a4a['attributes'];_0x10304d['execute']('insertImage',{'imageType':_0x1a95b2?'imageInline':null,'source':{'uploadcareImageId':_0x515a4a['id'],'src':_0x59bc98,'sources':_0x31bf9d,..._0xccbf0b}});}}class H extends _0x39f285{['_editing'];['_controller']=null;static get['requires'](){return[_0x4b0eef,X];}constructor(_0x864465){super(_0x864465),this['_editing']=_0x864465['plugins']['get'](X);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x56c76c){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new z(this['editor'],this['_editing'],_0x56c76c);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class J{static['upload']({file:_0x416caf,..._0x20998f}){return _0x14d5b0(_0x416caf,_0x20998f);}static['getInfo'](_0x4e3b48,_0x11ed02){return _0x5c614d(_0x4e3b48,_0x11ed02);}}class Z extends _0x20cce4{static get['requires'](){return[_0x529657,_0xf1fff3,_0x473012,X];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x3906d6=this['editor'];if(!!!_0x3906d6['config']['get']('uploadcare'))return;_0x3906d6['plugins']['get'](_0x473012)['createUploadAdapter']=_0x26b3d3=>new Q(_0x26b3d3,_0x3906d6),_0x3906d6['plugins']['get'](_0x529657)['on']('uploadComplete',(_0x5c3471,{imageElement:_0x152790,data:_0x4806b0})=>{_0x3906d6['model']['change'](_0x3ef694=>{_0x3ef694['setAttribute']('uploadcareImageId',_0x4806b0['uploadcareImageId'],_0x152790);});});}}class Q{['loader'];['editor'];['controller'];constructor(_0x35e24b,_0x3445a5){this['loader']=_0x35e24b,this['editor']=_0x3445a5,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x20978a=await this['loader']['file'];return J['upload']({'file':_0x20978a,'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':_0x390b6f=>{_0x390b6f&&_0x390b6f['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x390b6f['value']);}})['then'](async _0x28728e=>{const {imageFallbackUrl:_0x760213,imageSources:_0x5f511f}=j(_0x28728e['cdnUrl'],_0x28728e['imageInfo']['width']);return{'uploadcareImageId':_0x28728e['uuid'],'default':_0x760213,'sources':_0x5f511f};})['catch'](()=>{const _0x2a78f6=t('Cannot\x20upload\x20file:')+('\x20'+_0x20978a['name']+'.');return Promise['reject'](_0x2a78f6);});}['abort'](){this['controller']['abort']();}}class X extends _0x20cce4{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return[_0x18cca6,Z,_0x4b0eef];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x5a689d){super(_0x5a689d),this['ucContextId']=_0x3b9c2f();}['init'](){const _0x4bc736=this['editor'];_0x4bc736['commands']['add']('uploadcare',new H(_0x4bc736));}['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 _0x4b8cb3=_0x268822['document']['querySelector']('input[uploadcare-file-input]');_0x4b8cb3&&_0x4b8cb3['remove']();}),async function(_0x5efaeb){const _0x4fa1a2=_0x32953f([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]),_0x5ae5aa=0x535f8c3a,_0x3116ea=0x53580912^_0x5ae5aa,_0x3e90f4=window[_0x32953f([0x44,0x61,0x74,0x65])][_0x32953f([0x6e,0x6f,0x77])](),_0x4b6ae2=_0x5efaeb[_0x32953f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5a129c=new window[(_0x32953f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x34abf2=>{_0x4b6ae2[_0x32953f([0x6f,0x6e,0x63,0x65])](_0x32953f([0x72,0x65,0x61,0x64,0x79]),_0x34abf2);}),_0x3bda50={[_0x32953f([0x6b,0x74,0x79])]:_0x32953f([0x45,0x43]),[_0x32953f([0x75,0x73,0x65])]:_0x32953f([0x73,0x69,0x67]),[_0x32953f([0x63,0x72,0x76])]:_0x32953f([0x50,0x2d,0x32,0x35,0x36]),[_0x32953f([0x78])]:_0x32953f([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]),[_0x32953f([0x79])]:_0x32953f([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]),[_0x32953f([0x61,0x6c,0x67])]:_0x32953f([0x45,0x53,0x32,0x35,0x36])},_0x3a962f=_0x4b6ae2[_0x32953f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x32953f([0x67,0x65,0x74])](_0x32953f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4b7bff(){let _0x10031a,_0x392210=null,_0x59ef8a=null;try{if(_0x3a962f==_0x32953f([0x47,0x50,0x4c]))return _0x32953f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x10031a=_0x6e40cf(),!_0x10031a)return _0x32953f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x10031a[_0x32953f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x59ef8a=_0xd21740(_0x10031a[_0x32953f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x10031a[_0x32953f([0x6a,0x74,0x69])])),await _0x3d2b6a()?_0x9e48c2()?_0x34dec2()?_0x32953f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1580ea()?(_0x10031a[_0x32953f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x32953f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x392210=_0x1711e8(_0x32953f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x43bda0()):_0x32953f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x32953f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x32953f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x32953f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x34dec2(){const _0x17afee=[_0x32953f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x32953f([0x74,0x72,0x69,0x61,0x6c])][_0x32953f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x10031a[_0x32953f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3e90f4/0x3e8:0xe10*_0x3116ea;return _0x10031a[_0x32953f([0x65,0x78,0x70])]<_0x17afee;}function _0x9e48c2(){const _0x302554=_0x10031a[_0x32953f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x302554&&(!!_0x302554[_0x32953f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32953f([0x2a]))||!!_0x302554[_0x32953f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32953f([0x55,0x50,0x4c,0x43])));}function _0x1580ea(){const _0x37f0ce=_0x10031a[_0x32953f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x37f0ce||0x0==_0x37f0ce[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3ed277}=new URL(window[_0x32953f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x37f0ce[_0x32953f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3ed277))return!0x0;const _0x4aa3f3=_0x3ed277[_0x32953f([0x73,0x70,0x6c,0x69,0x74])](_0x32953f([0x2e]));return _0x37f0ce[_0x32953f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4c0770=>_0x4c0770[_0x32953f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32953f([0x2a])))[_0x32953f([0x6d,0x61,0x70])](_0x40ea50=>_0x40ea50[_0x32953f([0x73,0x70,0x6c,0x69,0x74])](_0x32953f([0x2e])))[_0x32953f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x425226=>_0x425226[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4aa3f3[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x32953f([0x6d,0x61,0x70])](_0x1aef42=>Array(_0x4aa3f3[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1aef42[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x32953f([0x66,0x69,0x6c,0x6c])](_0x1aef42[0x0]===_0x32953f([0x2a])?_0x32953f([0x2a]):'')[_0x32953f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1aef42))[_0x32953f([0x73,0x6f,0x6d,0x65])](_0x5af099=>_0x4aa3f3[_0x32953f([0x65,0x76,0x65,0x72,0x79])]((_0x4fa826,_0x4857cb)=>_0x5af099[_0x4857cb]===_0x4fa826||_0x5af099[_0x4857cb]===_0x32953f([0x2a])));}function _0x43bda0(){return _0x392210&&_0x59ef8a?new window[(_0x32953f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1c7d7c,_0x58f327)=>{_0x392210[_0x32953f([0x74,0x68,0x65,0x6e])](_0x1c7d7c,_0x58f327),_0x59ef8a[_0x32953f([0x74,0x68,0x65,0x6e])](_0x41c787=>{_0x41c787!=_0x32953f([0x56,0x61,0x6c,0x69,0x64])&&_0x1c7d7c(_0x41c787);},_0x58f327);}):_0x392210||_0x59ef8a||_0x32953f([0x56,0x61,0x6c,0x69,0x64]);}}function _0xd21740(_0x2b39ac,_0x4f021c){return new window[(_0x32953f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d7969=>{if(_0x3bd8b9())return _0x4d7969(_0x32953f([0x56,0x61,0x6c,0x69,0x64]));_0x32b797(),_0x4b6ae2[_0x32953f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x32953f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2ed5a5=!0x1;const _0x560f68=_0x3b9c2f();function _0x1b37ad(_0x45f11c){return!!_0x45f11c&&(typeof _0x45f11c===_0x32953f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x45f11c===_0x32953f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x45f11c[_0x32953f([0x74,0x68,0x65,0x6e])]===_0x32953f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x45f11c[_0x32953f([0x63,0x61,0x74,0x63,0x68])]===_0x32953f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x116dcb(_0x459ead){_0x98263f(_0x459ead)[_0x32953f([0x74,0x68,0x65,0x6e])](_0x3fe987=>{if(!_0x3fe987||_0x3fe987[_0x32953f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x32953f([0x6f,0x6b]))return _0x32953f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x25670b(_0x362638(_0x560f68+_0x4f021c))!=_0x3fe987[_0x32953f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x32953f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x32953f([0x56,0x61,0x6c,0x69,0x64]);})[_0x32953f([0x74,0x68,0x65,0x6e])](_0x1561e6=>(_0x58fff2(),_0x1561e6),()=>{const _0x43237d=_0x2ecd17();return null==_0x43237d?(_0x58fff2(),_0x32953f([0x56,0x61,0x6c,0x69,0x64])):_0x32953f(_0x3e90f4-_0x43237d>(0x7753083a^_0x5ae5aa)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x32953f([0x74,0x68,0x65,0x6e])](_0x4d7969)[_0x32953f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4d7969(_0x32953f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x7fb35b=0x536962ba^_0x5ae5aa;function _0x58fff2(){const _0x1fd79a=_0x32953f([0x6c,0x6c,0x63,0x74,0x2d])+_0x25670b(_0x362638(_0x2b39ac)),_0x17553c=_0x250c6a(_0x25670b(window[_0x32953f([0x4d,0x61,0x74,0x68])][_0x32953f([0x63,0x65,0x69,0x6c])](_0x3e90f4/_0x7fb35b)));window[_0x32953f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x32953f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1fd79a,_0x17553c);}function _0x2ecd17(){const _0x54fc01=_0x32953f([0x6c,0x6c,0x63,0x74,0x2d])+_0x25670b(_0x362638(_0x2b39ac)),_0x4cd57a=window[_0x32953f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x32953f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x54fc01);return _0x4cd57a?window[_0x32953f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x250c6a(_0x4cd57a),0x10)*_0x7fb35b:null;}function _0x98263f(_0x48836c){return new window[(_0x32953f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x44d59e,_0x47be30)=>{_0x48836c[_0x32953f([0x74,0x68,0x65,0x6e])](_0x44d59e,_0x47be30),window[_0x32953f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x47be30,0x535e58fa^_0x5ae5aa);});}}_0x4b6ae2[_0x32953f([0x6f,0x6e])](_0x32953f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1ca4d4,_0x3958b0)=>{if(_0x3958b0[0x0]!=_0x2b39ac)return _0x4d7969(_0x32953f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3958b0[0x1]={..._0x3958b0[0x1],[_0x32953f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x560f68};},{[_0x32953f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x32953f([0x68,0x69,0x67,0x68])}),_0x4b6ae2[_0x32953f([0x6f,0x6e])](_0x32953f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x33272b=>{_0x1b37ad(_0x33272b[_0x32953f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2ed5a5=!0x0,_0x116dcb(_0x33272b[_0x32953f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x32953f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x32953f([0x6c,0x6f,0x77])}),_0x5a129c[_0x32953f([0x74,0x68,0x65,0x6e])](()=>{_0x2ed5a5||_0x4d7969(_0x32953f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3bd8b9(){return _0x4b6ae2[_0x32953f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x32953f([0x76,0x69,0x65,0x77])][_0x32953f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x32953f([0x61,0x75,0x74,0x6f]);}function _0x32b797(){_0x4b6ae2[_0x32953f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x32953f([0x76,0x69,0x65,0x77])][_0x32953f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x32953f([0x61,0x75,0x74,0x6f]);}}function _0x1711e8(_0x53b6a8){const _0x3b46a1=[new window[(_0x32953f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c8081=>setTimeout(_0x5c8081,0x5356b2f6^_0x5ae5aa)),_0x5a129c[_0x32953f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x32953f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4bf36d=>{let _0x5dc8cc=0x0;_0x4b6ae2[_0x32953f([0x6d,0x6f,0x64,0x65,0x6c])][_0x32953f([0x6f,0x6e])](_0x32953f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1956bd,_0x252e6e)=>{_0x252e6e[0x0][_0x32953f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5dc8cc++,_0x5dc8cc==(0x535f89d2^_0x5ae5aa)&&(_0x4bf36d(),_0x1956bd[_0x32953f([0x6f,0x66,0x66])]());});}))];return window[_0x32953f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x32953f([0x72,0x61,0x63,0x65])](_0x3b46a1)[_0x32953f([0x74,0x68,0x65,0x6e])](()=>_0x53b6a8);}async function _0xd5b31f(){await _0x5a129c,_0x4b6ae2[_0x32953f([0x6d,0x6f,0x64,0x65,0x6c])][_0x32953f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x462682,_0x4b6ae2[_0x32953f([0x6d,0x6f,0x64,0x65,0x6c])][_0x32953f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x462682,_0x4b6ae2[_0x32953f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x32953f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xa5fad9(_0x30777b){const _0xf992c4=_0x14c986();_0x4b6ae2[_0xf992c4]=_0x32953f([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x30777b,_0x30777b!=_0x32953f([0x56,0x61,0x6c,0x69,0x64])&&_0xd5b31f();}function _0x14c986(){const _0x3435fc=window[_0x32953f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x32953f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x32953f([0x6e,0x6f,0x77])]())[_0x32953f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x32953f([0x2e]),'');let _0x30ef4d=_0x32953f([0x68]);for(let _0x1fef91=0x0;_0x1fef91<_0x3435fc[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1fef91+=0x2){let _0x23a0e7=window[_0x32953f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3435fc[_0x32953f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1fef91,_0x1fef91+0x2));_0x23a0e7>=_0x4fa1a2[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x23a0e7-=_0x4fa1a2[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x30ef4d+=_0x4fa1a2[_0x23a0e7];}return _0x30ef4d;}function _0x6e40cf(){const _0x3df720=_0x3a962f[_0x32953f([0x73,0x70,0x6c,0x69,0x74])](_0x32953f([0x2e]));if(0x3!=_0x3df720[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x506adc(_0x3df720[0x1]);function _0x506adc(_0x40bccb){const _0x455ee1=_0x3dcc18(_0x40bccb);return _0x455ee1&&_0x188ce9()?_0x455ee1:null;function _0x188ce9(){const _0x28ad5f=_0x455ee1[_0x32953f([0x6a,0x74,0x69])],_0x4c2ff1=window[_0x32953f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x28ad5f[_0x32953f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x28ad5f[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3c079c={..._0x455ee1,[_0x32953f([0x6a,0x74,0x69])]:_0x28ad5f[_0x32953f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x28ad5f[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3c079c[_0x32953f([0x76,0x63])],_0x362638(_0x3c079c)==_0x4c2ff1;}}}async function _0x3d2b6a(){let _0x1293f4=!0x0;try{const _0x3ea9ea=_0x3a962f[_0x32953f([0x73,0x70,0x6c,0x69,0x74])](_0x32953f([0x2e])),[_0x32e665,_0x5a62f7,_0x2d488a]=_0x3ea9ea;return _0x382015(_0x32e665),await _0x57ac96(_0x32e665,_0x5a62f7,_0x2d488a),_0x1293f4;}catch{return!0x1;}function _0x382015(_0x20e3b0){const _0x3a272b=_0x3dcc18(_0x20e3b0);_0x3a272b&&_0x3a272b[_0x32953f([0x61,0x6c,0x67])]==_0x32953f([0x45,0x53,0x32,0x35,0x36])||(_0x1293f4=!0x1);}async function _0x57ac96(_0x1ffbec,_0x54af7e,_0x5a46b4){const _0x281b21=window[_0x32953f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x32953f([0x66,0x72,0x6f,0x6d])](_0x430ab0(_0x5a46b4),_0x3390eb=>_0x3390eb[_0x32953f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x36434e=new window[(_0x32953f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x32953f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1ffbec+_0x32953f([0x2e])+_0x54af7e),_0xe84a7=window[_0x32953f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x32953f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xe84a7)return;const _0x1aaa0d=await _0xe84a7[_0x32953f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x32953f([0x6a,0x77,0x6b]),_0x3bda50,{[_0x32953f([0x6e,0x61,0x6d,0x65])]:_0x32953f([0x45,0x43,0x44,0x53,0x41]),[_0x32953f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x32953f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x32953f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xe84a7[_0x32953f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x32953f([0x6e,0x61,0x6d,0x65])]:_0x32953f([0x45,0x43,0x44,0x53,0x41]),[_0x32953f([0x68,0x61,0x73,0x68])]:{[_0x32953f([0x6e,0x61,0x6d,0x65])]:_0x32953f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1aaa0d,_0x281b21,_0x36434e)||(_0x1293f4=!0x1);}}function _0x3dcc18(_0x3cc5ba){return _0x3cc5ba[_0x32953f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x32953f([0x65,0x79]))?JSON[_0x32953f([0x70,0x61,0x72,0x73,0x65])](_0x430ab0(_0x3cc5ba)):null;}function _0x430ab0(_0x246fb8){return window[_0x32953f([0x61,0x74,0x6f,0x62])](_0x246fb8[_0x32953f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x32953f([0x2b]))[_0x32953f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x32953f([0x2f])));}function _0x362638(_0x57bf55){let _0xc068f1=0x1505;function _0x2b5f7f(_0x42f2bb){for(let _0xff77d8=0x0;_0xff77d8<_0x42f2bb[_0x32953f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xff77d8++){const _0x1210ee=_0x42f2bb[_0x32953f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xff77d8);_0xc068f1=(_0xc068f1<<0x5)+_0xc068f1+_0x1210ee,_0xc068f1&=_0xc068f1;}}function _0x26ad0f(_0x2571e0){Array[_0x32953f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2571e0)?_0x2571e0[_0x32953f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x26ad0f):_0x2571e0&&typeof _0x2571e0==_0x32953f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x32953f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2571e0)[_0x32953f([0x73,0x6f,0x72,0x74])]()[_0x32953f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5ed01f,_0x1feb15])=>{_0x2b5f7f(_0x5ed01f),_0x26ad0f(_0x1feb15);}):_0x2b5f7f(window[_0x32953f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2571e0));}return _0x26ad0f(_0x57bf55),_0xc068f1>>>0x0;}function _0x25670b(_0x160939){return _0x160939[_0x32953f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x32953f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x32953f([0x30]));}function _0x250c6a(_0xefa9c5){return _0xefa9c5[_0x32953f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x32953f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x32953f([0x6a,0x6f,0x69,0x6e])]('');}function _0x462682(){}function _0x32953f(_0x289aad){return _0x289aad['map'](_0xdc9832=>String['fromCharCode'](_0xdc9832))['join']('');}_0xa5fad9(await _0x4b7bff());}(this);}['_initSchema'](){const _0x517ebf=this['editor']['model']['schema'];_0x517ebf['isRegistered']('imageBlock')&&_0x517ebf['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x517ebf['isRegistered']('imageInline')&&_0x517ebf['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0xf51da5=this['editor'];_0xf51da5['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0xf51da5['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x3f8b91=>_0x3f8b91['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x38bf3f=_0xf51da5['commands']['get']('replaceImageSource');_0x38bf3f&&this['listenTo'](_0x38bf3f,'cleanupImage',(_0x1f28b8,[_0x57f351,_0x5e619a])=>{_0x57f351['removeAttribute']('uploadcareImageId',_0x5e619a);});}['_initConfig'](){const _0x3d9a79=this['editor']['config']['get']('uploadcare.uploader')||{},_0x13e72a=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x2d1cfc(_0x268822['document'],'uc-config',{..._0x3d9a79,'pubkey':_0x13e72a,'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']=_0x580e08=>{if('closeMax'==_0x580e08)return'#uc-icon-arrow-down';},_0x268822['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x2d1cfc(_0x268822['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x268822['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x3dd84e=this['editor']['commands']['get']('insertImage');_0x3dd84e&&this['listenTo'](_0x3dd84e,'execute',()=>{const _0x1fef56=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1fef56&&_0x1fef56['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x1fef56);});});const _0xadd0b3=this['editor']['commands']['get']('uploadcareImageReplace');_0xadd0b3&&this['listenTo'](_0xadd0b3,'execute',()=>{const _0x2dbe13=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2dbe13&&_0x2dbe13['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x2dbe13);});});}}class Y extends _0x20cce4{static get['requires'](){return[X,$];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59f230){super(_0x59f230),_0x59f230['config']['define']('uploadcare.uploader.sourceList',[D['Local'],D['URL']]),_0x46c3a1['defineComponents'](_0x46c3a1),this['_defineLocale']();}['_defineLocale'](){const _0x49049f=this['editor']['config']['get']('uploadcare.locale'),_0x27e0f9=this['editor']['locale']['contentLanguage'];_0x49049f&&_0x46c3a1['defineLocale'](_0x27e0f9,_0x49049f);}}class tt extends _0x295101{constructor(_0x20912c){super(_0x20912c);const t=_0x20912c['t'],_0x4d25d4=this['bindTemplate'],_0x3462ca=new _0x40ab07();_0x3462ca['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':[_0x3462ca,{'text':_0x4d25d4['to']('imageUploadProgress',_0x674e71=>t('Loading\x20image...')+'\x20('+(_0x674e71||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 _0x295101{constructor(_0x30cd32){super(_0x30cd32);const t=_0x30cd32['t'];this['set']('errorType',null);const _0xf154c6=new _0x121de2(_0x30cd32);_0xf154c6['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xf154c6['withText']=!0x0,_0xf154c6['class']='ck-button-action',_0xf154c6['on']('execute',()=>{this['fire']('retry');}),_0xf154c6['bind']('isVisible')['to'](this,'errorType',_0x279393=>'NotFound'!==_0x279393);const _0x22e745=new _0x36209b();_0x22e745['content']=_0x3376b8,_0x22e745['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x421a53=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':[_0x22e745,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x421a53['to']('errorType',_0x5dd67f=>t('NotFound'!==_0x5dd67f?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xf154c6]},{'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 _0x295101{constructor(_0x30bf0c,_0x54e785){super(_0x30bf0c);const _0x392b40=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x54e785,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x392b40['to']('imageSrc')}});}}class st extends B{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x5bb053,_0x2cbf91,_0x1eba9b){super(_0x5bb053),this['_items']=this['createCollection'](),this['_loadingView']=new tt(_0x5bb053),this['_errorView']=new et(_0x5bb053),this['_editingView']=new it(_0x5bb053,_0x1eba9b),this['_focusableView']=new _0x295101(_0x5bb053),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2cbf91),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'],_0x29dc71=>{this['_addUploadcareImageEditorListeners'](_0x29dc71);});}),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'](_0x26b424,_0x4a05b4){const _0xf64929='uc-cloud-image-editor',_0x5111d8=_0x26b424['querySelector'](_0xf64929);if(_0x5111d8)return _0x4a05b4(_0x5111d8);const _0xc4b9f6=new MutationObserver(_0x26693f=>{const _0x3a6971=_0x26693f['filter'](_0x210826=>_0x210826['target']===_0x26b424&&_0x210826['addedNodes']['length']>0x0&&_0x210826['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0xf64929);_0x3a6971['length']&&(_0xc4b9f6['disconnect'](),_0x4a05b4(_0x3a6971[0x0]['addedNodes'][0x0]));});_0xc4b9f6['observe'](_0x26b424,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x1dd56f){_0x1dd56f['addEventListener']('apply',_0x12b84c=>{this['fire']('apply',{'imageSrc':_0x12b84c['detail']['cdnUrl']});}),_0x1dd56f['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class nt extends/* #__PURE__ -- @preserve */
25
+ _0x492ba4(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3927d1,_0xf6dbf0,_0x4cf8bb){super(),this['_editor']=_0x3927d1,this['_dialog']=_0xf6dbf0,this['_imageElement']=_0x4cf8bb,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 _0x546b79=this['_imageElement'],_0x2fdd93=_0x546b79['getAttribute']('uploadcareImageId'),_0xe11259=_0x546b79['getAttribute']('src');if(_0x2fdd93)await this['_loadImageInfo'](_0x2fdd93,_0xe11259);else{if(this['_imageCache']['has'](_0xe11259)){const _0x35d6aa=this['_imageCache']['get'](_0xe11259);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x35d6aa['url'],this['imageDimension']=_0x35d6aa['dimension'],this['imageId']=_0x35d6aa['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2796f3}=this['_editor'],t=_0x2796f3['t'],_0x588d05=new st(_0x2796f3,this['imageStatus'],this['_attributes']);_0x588d05['bind']('status')['to'](this,'imageStatus'),_0x588d05['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x588d05['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x588d05['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x588d05,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x35592e,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x588d05,'position':_0x1384b6['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x588d05['focus']();},'onHide':()=>{_0x588d05['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x715895=>!G(_0x715895,_0x588d05['element'])}});}['_loadImageInfo'](_0x1a3750,_0xeb8a9c){return J['getInfo'](_0x1a3750,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x447ca8=>{const {width:_0x2563b2,height:_0x24df80}=_0x447ca8['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xeb8a9c,this['imageDimension']={'width':_0x2563b2,'height':_0x24df80},this['imageId']=_0x1a3750;})['catch'](_0x2e504f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2e504f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0xf6e3ec,_0x30ec9a){return this['_getImageAsFile'](_0xf6e3ec)['then'](_0x2e18a8=>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':_0x30ec9a['signal'],'file':_0x2e18a8,'onProgress':_0x432af8=>{_0x432af8&&_0x432af8['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x432af8['value']));}}))['then'](_0x3ae8d0=>{const {width:_0x1ad287,height:_0x27627c}=_0x3ae8d0['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3ae8d0['cdnUrl'],this['imageDimension']={'width':_0x1ad287,'height':_0x27627c},this['imageId']=_0x3ae8d0['uuid'],this['imageUploadProgress']=null;const _0x5861ca=_0xf6e3ec['getAttribute']('src');this['_imageCache']['set'](_0x5861ca,{'id':_0x3ae8d0['uuid'],'url':_0x3ae8d0['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3062e7=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3062e7['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x14a4e2,_0x4071d2){_0x14a4e2['on']('apply',(_0xae29c2,_0x31c213)=>{this['_replaceImage'](_0x4071d2,_0x31c213['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x14a4e2['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x14a4e2['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x40e262,_0x22f29f,_0x4c5ce9){const _0x508a22=this['_editor'],{width:_0x5aaacb,height:_0x38cce4}=M(_0x22f29f,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x19cb13,imageSources:_0x174ab1}=j(_0x22f29f,_0x5aaacb);_0x508a22['model']['change'](_0x388a10=>{if('$graveyard'===_0x40e262['root']['rootName']){_0x508a22['execute']('insertImage',{'imageType':_0x40e262['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x40e262['getAttributes']()),'uploadcareImageId':_0x4c5ce9,'src':_0x19cb13,'sources':_0x174ab1,'width':_0x5aaacb,'height':_0x38cce4}});const _0x539191=_0x40e262['getChildren']();_0x40e262=_0x508a22['model']['document']['selection']['getSelectedElement']();for(const _0x39774e of _0x539191)_0x388a10['append'](_0x388a10['cloneElement'](_0x39774e),_0x40e262);}else _0x388a10['setSelection'](_0x40e262,'on'),_0x508a22['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x40e262['getAttributes']()),'uploadcareImageId':_0x4c5ce9,'src':_0x19cb13,'sources':_0x174ab1,'width':_0x5aaacb,'height':_0x38cce4},_0x40e262);_0x388a10['setSelection'](_0x40e262,'on');});}async['_getImageAsFile'](_0x368af4){const _0x4f9b6a=_0x268822['window'],_0x61637d=_0x268822['document']['location']['href'],_0x166d9c=new _0x4f9b6a['URL'](_0x368af4['getAttribute']('src'),_0x61637d);if('data:'===_0x166d9c['protocol']){const _0x20548b=_0x166d9c['href']['split'](','),_0x4def9b=_0x20548b[0x0]['match'](/:(.*?);/)[0x1],_0x307677=_0x4def9b['split']('/')[0x1],_0x4b0e2b=_0x4f9b6a['atob'](_0x20548b[_0x20548b['length']-0x1]);let _0x3a1d16=_0x4b0e2b['length'];const _0x347a0e=new _0x4f9b6a['Uint8Array'](_0x3a1d16);for(;_0x3a1d16--;)_0x347a0e[_0x3a1d16]=_0x4b0e2b['charCodeAt'](_0x3a1d16);return new _0x4f9b6a['File']([_0x347a0e],'image.'+_0x307677,{'type':_0x4def9b});}const _0x318603=_0x166d9c['href']['split']('/'),_0xa8b736=_0x318603[_0x318603['length']-0x1],_0x3252b6=_0xa8b736['split']('.')[0x1];return _0x4f9b6a['fetch'](_0x166d9c['href'])['then'](_0x5e743c=>_0x5e743c['clone']()['blob']())['then'](_0x4fe32e=>new _0x4f9b6a['File']([_0x4fe32e],_0xa8b736,{'type':'image/'+_0x3252b6}));}}class rt extends _0x39f285{['imageEditController'];static get['requires'](){return[_0x4b0eef];}['_isEditable'];constructor(_0x288e9f){super(_0x288e9f),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4f82d6){const _0x8199d4=W(_0x4f82d6);return _0x31288b=>!(!_0x31288b||!_0x31288b['is']('element','imageBlock')&&!_0x31288b['is']('element','imageInline'))&&(!!_0x31288b['hasAttribute']('uploadcareImageId')||!!_0x31288b['hasAttribute']('src')&&_0x8199d4(_0x31288b['getAttribute']('src')));}(_0x288e9f['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2d2da7=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2d2da7);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x49527c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x49527c&&(_0x49527c['is']('element','imageBlock')||_0x49527c['is']('element','imageInline'))&&(this['imageEditController']=new nt(this['editor'],this['editor']['plugins']['get'](_0x4b0eef),_0x49527c),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class at extends _0x39f285{['refresh'](){const _0x302a3e=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x302a3e&&(_0x302a3e['is']('element','imageBlock')||_0x302a3e['is']('element','imageInline')));}['execute'](_0x1a1c08){const _0x46ec59=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x462f4e=>{_0x462f4e['setAttributes'](_0x1a1c08,_0x46ec59),_0x462f4e['removeAttribute']('srcset',_0x46ec59),_0x462f4e['removeAttribute']('sizes',_0x46ec59);});}}class ot extends _0x20cce4{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[X,_0x4d4cbd,_0x308f32,_0x555ed6];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x26c718}=this;_0x26c718['commands']['add']('uploadcareImageEdit',new rt(_0x26c718)),_0x26c718['commands']['add']('uploadcareImageReplace',new at(_0x26c718));}}class ct extends _0x20cce4{['_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 _0x58c57a=this['editor'];_0x58c57a['ui']['componentFactory']['add']('uploadcareImageEdit',_0x6bacbf=>{const _0x2286f1=_0x58c57a['commands']['get']('uploadcareImageEdit'),_0x3526cf=new _0x121de2(_0x6bacbf),t=_0x6bacbf['t'];return _0x3526cf['set']({'icon':_0x35592e,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x3526cf['bind']('isEnabled')['to'](_0x2286f1),_0x3526cf['bind']('isOn')['to'](_0x2286f1,'isActive'),this['listenTo'](_0x3526cf,'execute',()=>{_0x58c57a['execute']('uploadcareImageEdit'),_0x58c57a['editing']['view']['focus']();}),_0x3526cf;}),this['_initConfig']();}['_initConfig'](){const _0x509305=_0x2d1cfc(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x509305),this['listenTo'](this['editor'],'destroy',()=>{_0x509305['remove']();});}}class lt extends _0x20cce4{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.3",
3
+ "version": "48.0.0-alpha.4",
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.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",
40
+ "@ckeditor/ckeditor5-core": "48.0.0-alpha.4",
41
+ "@ckeditor/ckeditor5-engine": "48.0.0-alpha.4",
42
+ "@ckeditor/ckeditor5-icons": "48.0.0-alpha.4",
43
+ "@ckeditor/ckeditor5-image": "48.0.0-alpha.4",
44
+ "@ckeditor/ckeditor5-ui": "48.0.0-alpha.4",
45
+ "@ckeditor/ckeditor5-upload": "48.0.0-alpha.4",
46
+ "@ckeditor/ckeditor5-utils": "48.0.0-alpha.4",
47
47
  "@uploadcare/file-uploader": "1.24.5",
48
48
  "@uploadcare/upload-client": "6.14.3"
49
49
  },