@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20250824.0 → 0.0.0-nightly-20250825.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x3b2b54,Command as _0x165874}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x42cbbb,IconGooglePhotos as _0xa05d17,IconGoogleDrive as _0x2e79f7,IconFacebook as _0x39202a,IconDropbox as _0x5f3fbe,IconUploadcareLink as _0x1b7816,IconUploadcareImageUpload as _0x5b4ae3,IconError as _0x4123d2,IconUploadcareImageEdit as _0x2f1301}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x33d51a,MenuBarMenuListItemButtonView as _0x2d18b2,View as _0x1fba1c,FocusCycler as _0x4a0c97,Dialog as _0x150243,DialogViewPosition as _0x9c24c9,SpinnerView as _0xb1bf8d,IconView as _0x594da1,Notification as _0xee710e}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x25839c,DomEmitterMixin as _0x470c64,global as _0x2b3dd1,getAncestors as _0x52ce38,ObservableMixin as _0xfc34e1,uid as _0x117ec6,createElement as _0x2813fc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x3f4a4c}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x389f13,info as _0x1d036d}from'@uploadcare/upload-client';import*as _0x35f474 from'@uploadcare/file-uploader';var i=function(_0x9d61af){return _0x9d61af['Local']='local',_0x9d61af['URL']='url',_0x9d61af['Dropbox']='dropbox',_0x9d61af['GDrive']='gdrive',_0x9d61af['Facebook']='facebook',_0x9d61af['GPhotos']='gphotos',_0x9d61af['OneDrive']='onedrive',_0x9d61af;}({});function _(_0x46b67c,_0x377c9b,_0x39e2f6){const t=_0x46b67c['t'],_0x2335e4=_0x46b67c['t'];switch(_0x377c9b){case i['Local']:return{'text':_0x2335e4('Insert'===_0x39e2f6?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x2335e4('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x39e2f6?_0x2335e4('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x2335e4('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x39e2f6?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x39e2f6?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x39e2f6?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x39e2f6?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x39e2f6?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x377c9b;}}class e extends _0x3b2b54{['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 _0x22e744=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4e5fe2;for(const _0x6c29cb in _0x22e744){const _0x4650e3=_0x6c29cb,_0x2fcebd=_0x22e744[_0x4650e3];if('uploadcareLicenseKeyValid'==_0x2fcebd||'uploadcareLicenseKeyInvalid'==_0x2fcebd||'uploadcareLicenseKeyExpired'==_0x2fcebd||'uploadcareLicenseKeyDomainLimit'==_0x2fcebd||'uploadcareLicenseKeyNotAllowed'==_0x2fcebd||'uploadcareLicenseKeyEvaluationLimit'==_0x2fcebd||'uploadcareLicenseKeyTrialLimit'==_0x2fcebd||'uploadcareLicenseKeyUsageLimit'==_0x2fcebd){delete _0x22e744[_0x4650e3],_0x4e5fe2=_0x2fcebd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x4e5fe2&&_0x22e744['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x4e5fe2&&_0x22e744['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x4e5fe2&&_0x22e744['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x4e5fe2&&_0x22e744['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x4e5fe2&&_0x22e744['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x4e5fe2&&_0x22e744['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x4e5fe2&&_0x22e744['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x18823c}=this,_0x2123ee=_0x18823c['commands']['get']('uploadcare');if(!_0x2123ee)return;const _0x4b32c5=this['_normalizeConfigSourceList'](_0x18823c['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x128161,_0x8e1535)=>{const _0x315f18=this['_getIntegrationKey'](_0x8e1535['type']);return _0x128161[_0x315f18]||(_0x128161[_0x315f18]=[]),_0x128161[_0x315f18]['push'](_0x8e1535),_0x128161;},{});_0x18823c['plugins']['has']('ImageInsertUI')&&_0x18823c['commands']['get']('uploadcare')&&Object['entries'](_0x4b32c5)['forEach'](([_0x177378,_0x363e38])=>{_0x18823c['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x177378,'observable':()=>_0x2123ee,'buttonViewCreator':()=>this['_createToolbarButton'](_0x363e38),'formViewCreator':()=>this['_createDropdownButtons'](_0x363e38),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x363e38),'override':'assetManager'!==_0x177378});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x450f6e){const {locale:_0x52e8ab}=this['editor'];return _0x450f6e['map'](_0x567289=>{const _0xa5d0b3=_(_0x52e8ab,_0x567289,'Insert');switch(_0x567289){case i['Local']:return{'icon':_0x5b4ae3,'type':i['Local'],..._0xa5d0b3};case i['URL']:return{'icon':_0x1b7816,'type':i['URL'],..._0xa5d0b3};case i['Dropbox']:return{'icon':_0x5f3fbe,'type':i['Dropbox'],..._0xa5d0b3};case i['Facebook']:return{'icon':_0x39202a,'type':i['Facebook'],..._0xa5d0b3};case i['GDrive']:return{'icon':_0x2e79f7,'type':i['GDrive'],..._0xa5d0b3};case i['GPhotos']:return{'icon':_0xa05d17,'type':i['GPhotos'],..._0xa5d0b3};case i['OneDrive']:return{'icon':_0x42cbbb,'type':i['OneDrive'],..._0xa5d0b3};}});}['_getIntegrationKey'](_0x33fa05){switch(_0x33fa05){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x47771a,_0x5e9651){const _0x1be77b=this['editor'],_0x3b1d16=new _0x47771a(_0x1be77b['locale']),_0x4a8e48=_0x1be77b['commands']['get']('uploadcare');return _0x3b1d16['bind']('isEnabled')['to'](_0x4a8e48),_0x3b1d16['on']('execute',()=>{_0x4a8e48['execute'](_0x5e9651);}),_0x3b1d16;}['_createToolbarButton'](_0x567841){const {locale:_0x2cefeb}=this['editor'],_0x552da3=this['editor']['plugins']['get']('ImageInsertUI'),_0x54ead5=_0x567841[0x0],_0x2e4cdf=this['_createButton'](_0x33d51a,_0x54ead5['type']);return _0x2e4cdf['icon']=_0x54ead5['icon'],_0x2e4cdf['bind']('label')['to'](_0x552da3,'isImageSelected',_0x2a6ac2=>_(_0x2cefeb,_0x54ead5['type'],_0x2a6ac2?'Replace':'Insert')['text']),_0x2e4cdf['tooltip']=!0x0,_0x2e4cdf;}['_createDropdownButtons'](_0x366c19){const {locale:_0x2236ac}=this['editor'],_0x30ed96=this['editor']['plugins']['get']('ImageInsertUI');return _0x366c19['map'](_0x1a1c73=>{const _0x20571b=this['_createButton'](_0x33d51a,_0x1a1c73['type']);return _0x20571b['withText']=!0x0,_0x20571b['icon']=_0x1a1c73['icon'],_0x20571b['bind']('label')['to'](_0x30ed96,'isImageSelected',_0x214248=>_(_0x2236ac,_0x1a1c73['type'],_0x214248?'Replace':'Insert')['text']),_0x20571b;});}['_createMenuBarButtons'](_0x402ae){return _0x402ae['map'](_0xf0ba42=>{const _0x39a253=this['_createButton'](_0x2d18b2,_0xf0ba42['type']);return _0x39a253['icon']=_0xf0ba42['icon'],_0x39a253['label']=_0xf0ba42['shortText'],_0x39a253;});}}class F extends _0x1fba1c{['focusTracker'];['focusCycler'];constructor(_0x55b74a){super(_0x55b74a),this['focusTracker']=new _0x25839c(),this['focusCycler']=new _0x4a0c97({'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 x extends F{constructor(_0x3a28f7,_0x245c34){super(_0x3a28f7),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-'+_0x245c34}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x348bf0,_0x29c887){const _0x7d26fd=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x3079be=>_0x3079be<=_0x29c887)['map'](_0x46e06d=>_0x348bf0['replace'](/\/$/,'')+'/-/resize/'+_0x46e06d+'x/\x20'+_0x46e06d+'w');return{'imageFallbackUrl':_0x348bf0,'imageSources':[{'srcset':_0x7d26fd['join'](',\x20'),'sizes':'(max-width:\x20'+_0x29c887+'px)\x20100vw,\x20'+_0x29c887+'px','type':'image/webp'}]};}function C(_0x309db1,_0x4f1cd2,_0x32a47a){const _0x8c3073=_0x309db1['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x8c3073?parseInt(_0x8c3073[0x1],0xa):_0x4f1cd2,'height':_0x8c3073?parseInt(_0x8c3073[0x2],0xa):_0x32a47a};}function p(_0x4f9575,_0x131db1){const _0x129fd7=new(_0x470c64())(),_0x1e9dad=_0x4f9575['plugins']['get']('ImageUtils'),_0x14528d=_0x4f9575['editing']['mapper']['toViewElement'](_0x131db1),_0x5a9a65=_0x1e9dad['findViewImgElement'](_0x14528d),_0x5aebae=_0x4f9575['editing']['view']['domConverter']['viewToDom'](_0x5a9a65),_0x22f047=_0x131db1['getAttribute']('width'),_0x40e674=_0x131db1['getAttribute']('height'),_0x28572c='image-processing';_0x4f9575['editing']['view']['change'](_0x5cd7a0=>{_0x5cd7a0['addClass'](_0x28572c,_0x14528d),_0x5cd7a0['setStyle']('aspect-ratio',_0x22f047+'/'+_0x40e674,_0x5a9a65);}),_0x129fd7['listenTo'](_0x5aebae,'load',()=>{_0x129fd7['stopListening'](_0x5aebae,'load'),_0x4f9575['editing']['view']['change'](_0x33c211=>{_0x33c211['removeClass'](_0x28572c,_0x14528d),_0x33c211['removeStyle']('aspect-ratio',_0x5a9a65);});});}function G(_0x5e2433){if(Array['isArray'](_0x5e2433)){const _0x56609b=_0x5e2433['map'](G);return _0x24989c=>_0x56609b['some'](_0x36d161=>_0x36d161(_0x24989c));}if('origin'==_0x5e2433){const _0x34b84d=_0x2b3dd1['window']['location']['origin'];return _0x2f4396=>new URL(_0x2f4396,_0x2b3dd1['document']['baseURI'])['origin']==_0x34b84d;}return'function'==typeof _0x5e2433?_0x5e2433:_0x5e2433 instanceof RegExp?_0x588c60=>!(!_0x588c60['match'](_0x5e2433)&&!_0x588c60['replace'](/^https?:\/\//,'')['match'](_0x5e2433)):()=>!0x1;}function S(_0x5cffc5,_0x4dd029){return _0x52ce38(_0x5cffc5['target'])['includes'](_0x4dd029);}class n extends/* #__PURE__ -- @preserve */
24
- _0xfc34e1(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x42e10c,_0x245402,_0x462627){super(),this['_editor']=_0x42e10c,this['_editing']=_0x245402,this['_dialog']=_0x42e10c['plugins']['get'](_0x150243),this['_api']=_0x245402['ctxElement']['getAPI'](),this['_type']=_0x462627,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:_0x32fd8f,model:_0x37add3}=this['_editor'],_0x1e9790=_0x37add3['document']['selection']['getSelectedElement'](),_0x6a1edd=_0x1e9790&&(_0x1e9790['is']('element','imageBlock')||_0x1e9790['is']('element','imageInline'));this['_formView']=new x(_0x32fd8f,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x5b4ae3,'title':_(_0x32fd8f,this['_type'],_0x6a1edd?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x9c24c9['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x179a13=>!S(_0x179a13,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x15e58a}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2f300d=>{const _0x5b07ed=_0x15e58a['length'];for(const _0x4dd1fd of _0x15e58a){const _0x233272=_0x4dd1fd===_0x15e58a[_0x5b07ed-0x1],{cdnUrl:_0x454828,fileInfo:_0xc00e70}=_0x4dd1fd;if(!_0x454828||!_0xc00e70)continue;const {width:_0x552796,height:_0x591319}=_0xc00e70['imageInfo'],_0x4562be=C(_0x454828,_0x552796,_0x591319),_0xfa090f=k(_0x454828,_0x4562be['width']),_0x5645ca={'id':_0xc00e70['uuid'],'type':'image','attributes':{'imageDimension':_0x4562be,..._0xfa090f}};this['_insertAsset'](_0x5645ca,_0x233272,_0x2f300d);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x54752b=>{'idle'===_0x54752b['detail']['status']&&!_0x54752b['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x3e1c84,_0x271c20,_0x3bf75d){const _0x19178b=this['_editor']['model']['document']['selection'],_0x4be8c6=_0x19178b['getSelectedElement'](),_0x4c662a=!(!_0x4be8c6||!_0x4be8c6['is']('element','imageInline'));_0x3bf75d['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x3e1c84,_0x4c662a),_0x271c20||_0x3bf75d['setSelection'](_0x19178b['getLastPosition']());}['_insertImage'](_0x1a9dfb,_0x4e4cb9){const _0x264241=this['_editor'],{imageDimension:_0x20f3ea,imageFallbackUrl:_0x1505ce,imageSources:_0x50166d}=_0x1a9dfb['attributes'];_0x264241['execute']('insertImage',{'imageType':_0x4e4cb9?'imageInline':null,'source':{'uploadcareImageId':_0x1a9dfb['id'],'src':_0x1505ce,'sources':_0x50166d,..._0x20f3ea}});}}class w extends _0x165874{['_editing'];['_controller']=null;static get['requires'](){return[_0x150243,o];}constructor(_0x545275){super(_0x545275),this['_editing']=_0x545275['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x161765){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x161765);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x429343,publicKey:_0x5e32b0,signal:_0x3c1165,onProgress:_0x128a5b}){return _0x389f13(_0x429343,{'publicKey':_0x5e32b0,'store':'auto','signal':_0x3c1165,'onProgress':_0x128a5b});}static['getInfo'](_0x49df1e,_0xcf6f78){return _0x1d036d(_0x49df1e,_0xcf6f78);}}class f extends _0x3b2b54{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x3f4a4c,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x12312d=this['editor'];if(!!!_0x12312d['config']['get']('uploadcare'))return;_0x12312d['plugins']['get'](_0x3f4a4c)['createUploadAdapter']=_0x40d69e=>new A(_0x40d69e,_0x12312d),_0x12312d['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x3a6d31,{imageElement:_0x4b9e5f,data:_0x24bdae})=>{_0x12312d['model']['change'](_0x13ddad=>{_0x13ddad['setAttribute']('uploadcareImageId',_0x24bdae['uploadcareImageId'],_0x4b9e5f);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x4b1d96,_0x27a56b){this['loader']=_0x4b1d96,this['editor']=_0x27a56b,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0xeca719=this['editor']['config']['get']('uploadcare.pubkey'),_0x1cfd89=await this['loader']['file'];return j['upload']({'file':_0x1cfd89,'publicKey':_0xeca719,'signal':this['controller']['signal'],'onProgress':_0x20ab16=>{_0x20ab16&&_0x20ab16['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x20ab16['value']);}})['then'](async _0x3dbda9=>{const {imageFallbackUrl:_0x2070d3,imageSources:_0x3a6d07}=k(_0x3dbda9['cdnUrl'],_0x3dbda9['imageInfo']['width']);return{'uploadcareImageId':_0x3dbda9['uuid'],'default':_0x2070d3,'sources':_0x3a6d07};})['catch'](()=>{const _0x41d595=t('Cannot\x20upload\x20file:')+('\x20'+_0x1cfd89['name']+'.');return Promise['reject'](_0x41d595);});}['abort'](){this['controller']['abort']();}}class o extends _0x3b2b54{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x150243];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x2a2e1c){super(_0x2a2e1c),this['ucContextId']=_0x117ec6();}['init'](){const _0x54dd04=this['editor'];_0x54dd04['commands']['add']('uploadcare',new w(_0x54dd04));}['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 _0x139521=_0x2b3dd1['document']['querySelector']('input[uploadcare-file-input]');_0x139521&&_0x139521['remove']();}),async function(_0x1e20d7){const _0x419908=_0x42580c([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x5f295c=0x3d8d0df,_0x406fd3=0x3dfa1bf^_0x5f295c,_0x142cbe=window[_0x42580c([0x44,0x61,0x74,0x65])][_0x42580c([0x6e,0x6f,0x77])](),_0x413cf7=_0x1e20d7[_0x42580c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x367db4=new window[(_0x42580c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb4460=>{_0x413cf7[_0x42580c([0x6f,0x6e,0x63,0x65])](_0x42580c([0x72,0x65,0x61,0x64,0x79]),_0xb4460);}),_0x394653={[_0x42580c([0x6b,0x74,0x79])]:_0x42580c([0x45,0x43]),[_0x42580c([0x75,0x73,0x65])]:_0x42580c([0x73,0x69,0x67]),[_0x42580c([0x63,0x72,0x76])]:_0x42580c([0x50,0x2d,0x32,0x35,0x36]),[_0x42580c([0x78])]:_0x42580c([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]),[_0x42580c([0x79])]:_0x42580c([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]),[_0x42580c([0x61,0x6c,0x67])]:_0x42580c([0x45,0x53,0x32,0x35,0x36])},_0xccd931=_0x413cf7[_0x42580c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x42580c([0x67,0x65,0x74])](_0x42580c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1d0171(){let _0x1dac6e,_0x190f32=null,_0x644c8d=null;try{if(_0xccd931==_0x42580c([0x47,0x50,0x4c]))return _0x42580c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1dac6e=_0x182469(),!_0x1dac6e)return _0x42580c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1dac6e[_0x42580c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x644c8d=_0x9e065f(_0x1dac6e[_0x42580c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1dac6e[_0x42580c([0x6a,0x74,0x69])])),await _0x412f51()?_0xa44bab()?_0x4243e1()?_0x42580c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x113785()?(_0x1dac6e[_0x42580c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x42580c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x190f32=_0x160bf8(_0x42580c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1dac6e[_0x42580c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x42580c([0x74,0x72,0x69,0x61,0x6c])&&(_0x190f32=_0x160bf8(_0x42580c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2a9f7f()):_0x42580c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x42580c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x42580c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x42580c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4243e1(){const _0x5afab2=[_0x42580c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x42580c([0x74,0x72,0x69,0x61,0x6c])][_0x42580c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1dac6e[_0x42580c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x142cbe/0x3e8:0xe10*_0x406fd3;return _0x1dac6e[_0x42580c([0x65,0x78,0x70])]<_0x5afab2;}function _0xa44bab(){const _0x198b07=_0x1dac6e[_0x42580c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x198b07&&(!!_0x198b07[_0x42580c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42580c([0x2a]))||!!_0x198b07[_0x42580c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42580c([0x55,0x50,0x4c,0x43])));}function _0x113785(){const _0x23d7a2=_0x1dac6e[_0x42580c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x23d7a2||0x0==_0x23d7a2[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5cd969}=new URL(window[_0x42580c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x23d7a2[_0x42580c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5cd969))return!0x0;const _0x5e00f5=_0x5cd969[_0x42580c([0x73,0x70,0x6c,0x69,0x74])](_0x42580c([0x2e]));return _0x23d7a2[_0x42580c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4f0c9d=>_0x4f0c9d[_0x42580c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42580c([0x2a])))[_0x42580c([0x6d,0x61,0x70])](_0x582e7f=>_0x582e7f[_0x42580c([0x73,0x70,0x6c,0x69,0x74])](_0x42580c([0x2e])))[_0x42580c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x36e4bb=>_0x36e4bb[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5e00f5[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x42580c([0x6d,0x61,0x70])](_0x326ab2=>Array(_0x5e00f5[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x326ab2[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x42580c([0x66,0x69,0x6c,0x6c])](_0x326ab2[0x0]===_0x42580c([0x2a])?_0x42580c([0x2a]):'')[_0x42580c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x326ab2))[_0x42580c([0x73,0x6f,0x6d,0x65])](_0x3954e3=>_0x5e00f5[_0x42580c([0x65,0x76,0x65,0x72,0x79])]((_0x2e0cb2,_0x43cadf)=>_0x3954e3[_0x43cadf]===_0x2e0cb2||_0x3954e3[_0x43cadf]===_0x42580c([0x2a])));}function _0x2a9f7f(){return _0x190f32&&_0x644c8d?new window[(_0x42580c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3db6d2,_0x4930a0)=>{_0x190f32[_0x42580c([0x74,0x68,0x65,0x6e])](_0x3db6d2,_0x4930a0),_0x644c8d[_0x42580c([0x74,0x68,0x65,0x6e])](_0x332736=>{_0x332736!=_0x42580c([0x56,0x61,0x6c,0x69,0x64])&&_0x3db6d2(_0x332736);},_0x4930a0);}):_0x190f32||_0x644c8d||_0x42580c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x9e065f(_0x4ef7a9,_0x32170a){return new window[(_0x42580c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3729d4=>{if(_0xdd39ab())return _0x3729d4(_0x42580c([0x56,0x61,0x6c,0x69,0x64]));_0x14e45e(),_0x413cf7[_0x42580c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x42580c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x7bf681=!0x1;const _0x252618=_0x117ec6();function _0x554b4b(_0x21bb0d){return!!_0x21bb0d&&(typeof _0x21bb0d===_0x42580c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x21bb0d===_0x42580c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x21bb0d[_0x42580c([0x74,0x68,0x65,0x6e])]===_0x42580c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x21bb0d[_0x42580c([0x63,0x61,0x74,0x63,0x68])]===_0x42580c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x509d96(_0x10129d){_0x25a962(_0x10129d)[_0x42580c([0x74,0x68,0x65,0x6e])](_0x3699d2=>{if(!_0x3699d2||_0x3699d2[_0x42580c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x42580c([0x6f,0x6b]))return _0x42580c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2820ee(_0x3787f9(_0x252618+_0x32170a))!=_0x3699d2[_0x42580c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x42580c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x42580c([0x56,0x61,0x6c,0x69,0x64]);})[_0x42580c([0x74,0x68,0x65,0x6e])](_0x4c5fe5=>(_0x130e97(),_0x4c5fe5),()=>{const _0x4d8808=_0x5e6983();return null==_0x4d8808?(_0x130e97(),_0x42580c([0x56,0x61,0x6c,0x69,0x64])):_0x42580c(_0x142cbe-_0x4d8808>(0x27d454df^_0x5f295c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x42580c([0x74,0x68,0x65,0x6e])](_0x3729d4)[_0x42580c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3729d4(_0x42580c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x57809d=0x3ee3e5f^_0x5f295c;function _0x130e97(){const _0x5ef9e8=_0x42580c([0x6c,0x6c,0x63,0x74,0x2d])+_0x2820ee(_0x3787f9(_0x4ef7a9)),_0x1e6cb9=_0x42cc68(_0x2820ee(window[_0x42580c([0x4d,0x61,0x74,0x68])][_0x42580c([0x63,0x65,0x69,0x6c])](_0x142cbe/_0x57809d)));window[_0x42580c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x42580c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5ef9e8,_0x1e6cb9);}function _0x5e6983(){const _0x27cf9f=_0x42580c([0x6c,0x6c,0x63,0x74,0x2d])+_0x2820ee(_0x3787f9(_0x4ef7a9)),_0x5ac58c=window[_0x42580c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x42580c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x27cf9f);return _0x5ac58c?window[_0x42580c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x42cc68(_0x5ac58c),0x10)*_0x57809d:null;}function _0x25a962(_0x2042b8){return new window[(_0x42580c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x44aa44,_0x2ca691)=>{_0x2042b8[_0x42580c([0x74,0x68,0x65,0x6e])](_0x44aa44,_0x2ca691),window[_0x42580c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2ca691,0x3d9041f^_0x5f295c);});}}_0x413cf7[_0x42580c([0x6f,0x6e])](_0x42580c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xcc186a,_0x440c27)=>{if(_0x440c27[0x0]!=_0x4ef7a9)return _0x3729d4(_0x42580c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x440c27[0x1]={..._0x440c27[0x1],[_0x42580c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x252618};},{[_0x42580c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x42580c([0x68,0x69,0x67,0x68])}),_0x413cf7[_0x42580c([0x6f,0x6e])](_0x42580c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3422e0=>{_0x554b4b(_0x3422e0[_0x42580c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x7bf681=!0x0,_0x509d96(_0x3422e0[_0x42580c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x42580c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x42580c([0x6c,0x6f,0x77])}),_0x367db4[_0x42580c([0x74,0x68,0x65,0x6e])](()=>{_0x7bf681||_0x3729d4(_0x42580c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xdd39ab(){return _0x413cf7[_0x42580c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x42580c([0x76,0x69,0x65,0x77])][_0x42580c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x42580c([0x61,0x75,0x74,0x6f]);}function _0x14e45e(){_0x413cf7[_0x42580c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x42580c([0x76,0x69,0x65,0x77])][_0x42580c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x42580c([0x61,0x75,0x74,0x6f]);}}function _0x160bf8(_0xc539b0){const _0x1364d6=[new window[(_0x42580c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18913a=>setTimeout(_0x18913a,0x3d1ee13^_0x5f295c)),_0x367db4[_0x42580c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x42580c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x429abf=>{let _0x1de17b=0x0;_0x413cf7[_0x42580c([0x6d,0x6f,0x64,0x65,0x6c])][_0x42580c([0x6f,0x6e])](_0x42580c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2079de,_0x5479c7)=>{_0x5479c7[0x0][_0x42580c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1de17b++,_0x1de17b==(0x3d8d127^_0x5f295c)&&(_0x429abf(),_0x2079de[_0x42580c([0x6f,0x66,0x66])]());});}))];return window[_0x42580c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x42580c([0x72,0x61,0x63,0x65])](_0x1364d6)[_0x42580c([0x74,0x68,0x65,0x6e])](()=>_0xc539b0);}async function _0x5ae2da(){await _0x367db4,_0x413cf7[_0x42580c([0x6d,0x6f,0x64,0x65,0x6c])][_0x42580c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x21cb10,_0x413cf7[_0x42580c([0x6d,0x6f,0x64,0x65,0x6c])][_0x42580c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x21cb10,_0x413cf7[_0x42580c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x42580c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1166bb(_0x2c9151){const _0x169c06=_0x14e418();_0x413cf7[_0x169c06]=_0x42580c([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2c9151,_0x2c9151!=_0x42580c([0x56,0x61,0x6c,0x69,0x64])&&_0x5ae2da();}function _0x14e418(){const _0x2ce9db=window[_0x42580c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x42580c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x42580c([0x6e,0x6f,0x77])]())[_0x42580c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x42580c([0x2e]),'');let _0x3a3b36=_0x42580c([0x52]);for(let _0x3532b0=0x0;_0x3532b0<_0x2ce9db[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3532b0+=0x2){let _0x46706c=window[_0x42580c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2ce9db[_0x42580c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3532b0,_0x3532b0+0x2));_0x46706c>=_0x419908[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x46706c-=_0x419908[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3a3b36+=_0x419908[_0x46706c];}return _0x3a3b36;}function _0x182469(){const _0x381e1d=_0xccd931[_0x42580c([0x73,0x70,0x6c,0x69,0x74])](_0x42580c([0x2e]));if(0x3!=_0x381e1d[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x18628e(_0x381e1d[0x1]);function _0x18628e(_0x2f4b6b){const _0x5c4bf8=_0xb8dc8d(_0x2f4b6b);return _0x5c4bf8&&_0x20e4d7()?_0x5c4bf8:null;function _0x20e4d7(){const _0x565895=_0x5c4bf8[_0x42580c([0x6a,0x74,0x69])],_0x476499=window[_0x42580c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x565895[_0x42580c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x565895[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1dac2a={..._0x5c4bf8,[_0x42580c([0x6a,0x74,0x69])]:_0x565895[_0x42580c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x565895[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1dac2a[_0x42580c([0x76,0x63])],_0x3787f9(_0x1dac2a)==_0x476499;}}}async function _0x412f51(){let _0x2cc7c5=!0x0;try{const _0x377a6b=_0xccd931[_0x42580c([0x73,0x70,0x6c,0x69,0x74])](_0x42580c([0x2e])),[_0xac899d,_0x38a90d,_0x7a5c77]=_0x377a6b;return _0x2fd5e4(_0xac899d),await _0xea5be6(_0xac899d,_0x38a90d,_0x7a5c77),_0x2cc7c5;}catch{return!0x1;}function _0x2fd5e4(_0x444aa8){const _0x2572e8=_0xb8dc8d(_0x444aa8);_0x2572e8&&_0x2572e8[_0x42580c([0x61,0x6c,0x67])]==_0x42580c([0x45,0x53,0x32,0x35,0x36])||(_0x2cc7c5=!0x1);}async function _0xea5be6(_0x597858,_0x2b6c77,_0x441a72){const _0xb99e3b=window[_0x42580c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x42580c([0x66,0x72,0x6f,0x6d])](_0x1c1ba4(_0x441a72),_0xe4248d=>_0xe4248d[_0x42580c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x509af6=new window[(_0x42580c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x42580c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x597858+_0x42580c([0x2e])+_0x2b6c77),_0x5d3be4=window[_0x42580c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x42580c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5d3be4)return;const _0xa82a67=await _0x5d3be4[_0x42580c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x42580c([0x6a,0x77,0x6b]),_0x394653,{[_0x42580c([0x6e,0x61,0x6d,0x65])]:_0x42580c([0x45,0x43,0x44,0x53,0x41]),[_0x42580c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x42580c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x42580c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5d3be4[_0x42580c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x42580c([0x6e,0x61,0x6d,0x65])]:_0x42580c([0x45,0x43,0x44,0x53,0x41]),[_0x42580c([0x68,0x61,0x73,0x68])]:{[_0x42580c([0x6e,0x61,0x6d,0x65])]:_0x42580c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xa82a67,_0xb99e3b,_0x509af6)||(_0x2cc7c5=!0x1);}}function _0xb8dc8d(_0x2d6a13){return _0x2d6a13[_0x42580c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x42580c([0x65,0x79]))?JSON[_0x42580c([0x70,0x61,0x72,0x73,0x65])](_0x1c1ba4(_0x2d6a13)):null;}function _0x1c1ba4(_0x3fc5d8){return window[_0x42580c([0x61,0x74,0x6f,0x62])](_0x3fc5d8[_0x42580c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x42580c([0x2b]))[_0x42580c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x42580c([0x2f])));}function _0x3787f9(_0x575e80){let _0x2b2ad5=0x1505;function _0x4e9687(_0x582798){for(let _0x4d8deb=0x0;_0x4d8deb<_0x582798[_0x42580c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d8deb++){const _0x2b4de9=_0x582798[_0x42580c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d8deb);_0x2b2ad5=(_0x2b2ad5<<0x5)+_0x2b2ad5+_0x2b4de9,_0x2b2ad5&=_0x2b2ad5;}}function _0x30df6c(_0x583002){Array[_0x42580c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x583002)?_0x583002[_0x42580c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x30df6c):_0x583002&&typeof _0x583002==_0x42580c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x42580c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x583002)[_0x42580c([0x73,0x6f,0x72,0x74])]()[_0x42580c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x38696c,_0x570483])=>{_0x4e9687(_0x38696c),_0x30df6c(_0x570483);}):_0x4e9687(window[_0x42580c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x583002));}return _0x30df6c(_0x575e80),_0x2b2ad5>>>0x0;}function _0x2820ee(_0x230a20){return _0x230a20[_0x42580c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x42580c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x42580c([0x30]));}function _0x42cc68(_0xfc4ca3){return _0xfc4ca3[_0x42580c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x42580c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x42580c([0x6a,0x6f,0x69,0x6e])]('');}function _0x21cb10(){}function _0x42580c(_0x284ebc){return _0x284ebc['map'](_0x1aad88=>String['fromCharCode'](_0x1aad88))['join']('');}_0x1166bb(await _0x1d0171());}(this);}['_initSchema'](){const _0x32d30a=this['editor']['model']['schema'];_0x32d30a['isRegistered']('imageBlock')&&_0x32d30a['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x32d30a['isRegistered']('imageInline')&&_0x32d30a['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x35675d=this['editor'];_0x35675d['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x35675d['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x2a06a9=>_0x2a06a9['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x261527=_0x35675d['commands']['get']('replaceImageSource');_0x261527&&this['listenTo'](_0x261527,'cleanupImage',(_0x3997ea,[_0x2024ba,_0x5a0067])=>{_0x2024ba['removeAttribute']('uploadcareImageId',_0x5a0067);});}['_initConfig'](){const _0x10d0ad=this['editor']['config']['get']('uploadcare.uploader')||{},_0x39f83d=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x2813fc(_0x2b3dd1['document'],'uc-config',{..._0x10d0ad,'pubkey':_0x39f83d,'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']=_0x21a762=>{if('closeMax'==_0x21a762)return'#uc-icon-arrow-down';},_0x2b3dd1['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x2813fc(_0x2b3dd1['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x2b3dd1['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x518f1d=this['editor']['commands']['get']('insertImage');_0x518f1d&&this['listenTo'](_0x518f1d,'execute',()=>{const _0x2d616b=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2d616b&&_0x2d616b['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x2d616b);});});const _0x14412e=this['editor']['commands']['get']('uploadcareImageReplace');_0x14412e&&this['listenTo'](_0x14412e,'execute',()=>{const _0xf21587=this['editor']['model']['document']['selection']['getSelectedElement']();_0xf21587&&_0xf21587['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0xf21587);});});}}class tt extends _0x3b2b54{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x13ac0e){super(_0x13ac0e),_0x13ac0e['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x35f474['defineComponents'](_0x35f474);}}class ii extends _0x1fba1c{constructor(_0x4bfac9){super(_0x4bfac9);const t=_0x4bfac9['t'],_0x23cbc5=this['bindTemplate'],_0x13b72b=new _0xb1bf8d();_0x13b72b['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':[_0x13b72b,{'text':_0x23cbc5['to']('imageUploadProgress',_0x12ab21=>t('Loading\x20image...')+'\x20('+(_0x12ab21||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 ti extends _0x1fba1c{constructor(_0x1267b4){super(_0x1267b4);const t=_0x1267b4['t'];this['set']('errorType',null);const _0x4ee6fe=new _0x33d51a(_0x1267b4);_0x4ee6fe['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4ee6fe['withText']=!0x0,_0x4ee6fe['class']='ck-button-action',_0x4ee6fe['on']('execute',()=>{this['fire']('retry');}),_0x4ee6fe['bind']('isVisible')['to'](this,'errorType',_0x318ebf=>'NotFound'!==_0x318ebf);const _0x45d1df=new _0x594da1();_0x45d1df['content']=_0x4123d2,_0x45d1df['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x19f4d0=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':[_0x45d1df,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x19f4d0['to']('errorType',_0x555491=>t('NotFound'!==_0x555491?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4ee6fe]},{'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 ei extends _0x1fba1c{constructor(_0x36c902,_0x5160cd){super(_0x36c902);const _0x3a8cb4=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5160cd,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3a8cb4['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x37a578,_0x2e6281,_0x340998){super(_0x37a578),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x37a578),this['_errorView']=new ti(_0x37a578),this['_editingView']=new ei(_0x37a578,_0x340998),this['_focusableView']=new _0x1fba1c(_0x37a578),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2e6281),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'],_0x4f4fdf=>{this['_addUploadcareImageEditorListeners'](_0x4f4fdf);});}),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'](_0x4af561,_0x33d011){const _0x294c85='uc-cloud-image-editor',_0x5f30f2=_0x4af561['querySelector'](_0x294c85);if(_0x5f30f2)return _0x33d011(_0x5f30f2);const _0x4fd3ce=new MutationObserver(_0x523f90=>{const _0x4fa5eb=_0x523f90['filter'](_0x50df87=>_0x50df87['target']===_0x4af561&&_0x50df87['addedNodes']['length']>0x0&&_0x50df87['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x294c85);_0x4fa5eb['length']&&(_0x4fd3ce['disconnect'](),_0x33d011(_0x4fa5eb[0x0]['addedNodes'][0x0]));});_0x4fd3ce['observe'](_0x4af561,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x9a2127){_0x9a2127['addEventListener']('apply',_0x4776d7=>{this['fire']('apply',{'imageSrc':_0x4776d7['detail']['cdnUrl']});}),_0x9a2127['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
- _0xfc34e1(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x30dc5b,_0x327c21,_0x5ed392){super(),this['_editor']=_0x30dc5b,this['_dialog']=_0x327c21,this['_imageElement']=_0x5ed392,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 _0x5b058e=this['_imageElement'],_0x5ab46b=_0x5b058e['getAttribute']('uploadcareImageId'),_0x17b229=_0x5b058e['getAttribute']('src');if(_0x5ab46b)await this['_loadImageInfo'](_0x5ab46b,_0x17b229);else{if(this['_imageCache']['has'](_0x17b229)){const _0x247d85=this['_imageCache']['get'](_0x17b229);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x247d85['url'],this['imageDimension']=_0x247d85['dimension'],this['imageId']=_0x247d85['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x59203d}=this['_editor'],t=_0x59203d['t'],_0x6acac5=new X(_0x59203d,this['imageStatus'],this['_attributes']);_0x6acac5['bind']('status')['to'](this,'imageStatus'),_0x6acac5['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x6acac5['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x6acac5['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x6acac5,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2f1301,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x6acac5,'position':_0x9c24c9['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x6acac5['focus']();},'onHide':()=>{_0x6acac5['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x79c61f=>!S(_0x79c61f,_0x6acac5['element'])}});}['_loadImageInfo'](_0x5e279a,_0x4d2140){return j['getInfo'](_0x5e279a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0xb30885=>{const {width:_0x2ea112,height:_0xe15297}=_0xb30885['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4d2140,this['imageDimension']={'width':_0x2ea112,'height':_0xe15297},this['imageId']=_0x5e279a;})['catch'](_0x246bc1=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x246bc1['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x5cf5ce,_0xe8d71e){return this['_getImageAsFile'](_0x5cf5ce)['then'](_0x3f35fb=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0xe8d71e['signal'],'file':_0x3f35fb,'onProgress':_0x32a669=>{_0x32a669&&_0x32a669['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x32a669['value']));}}))['then'](_0x5a8113=>{const {width:_0xe76268,height:_0x59061b}=_0x5a8113['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5a8113['cdnUrl'],this['imageDimension']={'width':_0xe76268,'height':_0x59061b},this['imageId']=_0x5a8113['uuid'],this['imageUploadProgress']=null;const _0x4c6a9e=_0x5cf5ce['getAttribute']('src');this['_imageCache']['set'](_0x4c6a9e,{'id':_0x5a8113['uuid'],'url':_0x5a8113['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4f0a46=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4f0a46['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3d1aba,_0x3a382b){_0x3d1aba['on']('apply',(_0x3c4045,_0x33ce2a)=>{this['_replaceImage'](_0x3a382b,_0x33ce2a['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3d1aba['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3d1aba['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x325f12,_0x26b907,_0x3e8f64){const _0x58ef53=this['_editor'],{width:_0x4d7054,height:_0x1abb91}=C(_0x26b907,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x42e5bd,imageSources:_0x12727f}=k(_0x26b907,_0x4d7054);_0x58ef53['model']['change'](_0x4edc92=>{if('$graveyard'===_0x325f12['root']['rootName']){_0x58ef53['execute']('insertImage',{'imageType':_0x325f12['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x325f12['getAttributes']()),'uploadcareImageId':_0x3e8f64,'src':_0x42e5bd,'sources':_0x12727f,'width':_0x4d7054,'height':_0x1abb91}});const _0x122052=_0x325f12['getChildren']();_0x325f12=_0x58ef53['model']['document']['selection']['getSelectedElement']();for(const _0xfa3c1d of _0x122052)_0x4edc92['append'](_0x4edc92['cloneElement'](_0xfa3c1d),_0x325f12);}else _0x4edc92['setSelection'](_0x325f12,'on'),_0x58ef53['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x325f12['getAttributes']()),'uploadcareImageId':_0x3e8f64,'src':_0x42e5bd,'sources':_0x12727f,'width':_0x4d7054,'height':_0x1abb91},_0x325f12);_0x4edc92['setSelection'](_0x325f12,'on');});}async['_getImageAsFile'](_0x4d2b6f){const _0x2521ba=_0x2b3dd1['window'],_0x30ca32=_0x2b3dd1['document']['location']['href'],_0x96cc5c=new _0x2521ba['URL'](_0x4d2b6f['getAttribute']('src'),_0x30ca32);if('data:'===_0x96cc5c['protocol']){const _0x594374=_0x96cc5c['href']['split'](','),_0x1775a4=_0x594374[0x0]['match'](/:(.*?);/)[0x1],_0x4eaceb=_0x1775a4['split']('/')[0x1],_0x4d3648=_0x2521ba['atob'](_0x594374[_0x594374['length']-0x1]);let _0x1f6ad8=_0x4d3648['length'];const _0x54793a=new _0x2521ba['Uint8Array'](_0x1f6ad8);for(;_0x1f6ad8--;)_0x54793a[_0x1f6ad8]=_0x4d3648['charCodeAt'](_0x1f6ad8);return new _0x2521ba['File']([_0x54793a],'image.'+_0x4eaceb,{'type':_0x1775a4});}const _0x51cbd4=_0x96cc5c['href']['split']('/'),_0x2f28d5=_0x51cbd4[_0x51cbd4['length']-0x1],_0x5a746c=_0x2f28d5['split']('.')[0x1];return _0x2521ba['fetch'](_0x96cc5c['href'])['then'](_0x548f1b=>_0x548f1b['clone']()['blob']())['then'](_0x36484f=>new _0x2521ba['File']([_0x36484f],_0x2f28d5,{'type':'image/'+_0x5a746c}));}}class O extends _0x165874{['imageEditController'];static get['requires'](){return[_0x150243];}['_isEditable'];constructor(_0x211afa){super(_0x211afa),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x241bf6){const _0x3f87b2=G(_0x241bf6);return _0x1ff906=>!(!_0x1ff906||!_0x1ff906['is']('element','imageBlock')&&!_0x1ff906['is']('element','imageInline'))&&(!!_0x1ff906['hasAttribute']('uploadcareImageId')||!!_0x1ff906['hasAttribute']('src')&&_0x3f87b2(_0x1ff906['getAttribute']('src')));}(_0x211afa['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x34f84e=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x34f84e);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5bc584=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5bc584&&(_0x5bc584['is']('element','imageBlock')||_0x5bc584['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x150243),_0x5bc584),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x165874{['refresh'](){const _0x158116=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x158116&&(_0x158116['is']('element','imageBlock')||_0x158116['is']('element','imageInline')));}['execute'](_0x47ba8e){const _0x1acede=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x59127f=>{_0x59127f['setAttributes'](_0x47ba8e,_0x1acede),_0x59127f['removeAttribute']('srcset',_0x1acede),_0x59127f['removeAttribute']('sizes',_0x1acede);});}}class m extends _0x3b2b54{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0xee710e,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x11ff52}=this;_0x11ff52['commands']['add']('uploadcareImageEdit',new O(_0x11ff52)),_0x11ff52['commands']['add']('uploadcareImageReplace',new R(_0x11ff52));}}class g extends _0x3b2b54{['_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 _0x20f122=this['editor'];_0x20f122['ui']['componentFactory']['add']('uploadcareImageEdit',_0x2d55fc=>{const _0x507b15=_0x20f122['commands']['get']('uploadcareImageEdit'),_0x38be10=new _0x33d51a(_0x2d55fc),t=_0x2d55fc['t'];return _0x38be10['set']({'icon':_0x2f1301,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x38be10['bind']('isEnabled')['to'](_0x507b15),_0x38be10['bind']('isOn')['to'](_0x507b15,'isActive'),this['listenTo'](_0x38be10,'execute',()=>{_0x20f122['execute']('uploadcareImageEdit'),_0x20f122['editing']['view']['focus']();}),_0x38be10;}),this['_initConfig']();}['_initConfig'](){const _0x2e7834=_0x2813fc(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x2e7834),this['listenTo'](this['editor'],'destroy',()=>{_0x2e7834['remove']();});}}class et extends _0x3b2b54{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
23
+ import{Plugin as _0x1560bd,Command as _0x1b6101}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x5bbada,IconGooglePhotos as _0x2d4c4c,IconGoogleDrive as _0x5ca1be,IconFacebook as _0x299f5,IconDropbox as _0x2f9be1,IconUploadcareLink as _0x4423ad,IconUploadcareImageUpload as _0x207154,IconError as _0x570e18,IconUploadcareImageEdit as _0x465540}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x29ddbc,MenuBarMenuListItemButtonView as _0x249578,View as _0x4a2bf8,FocusCycler as _0x2466c4,Dialog as _0x32f184,DialogViewPosition as _0x106366,SpinnerView as _0x53f103,IconView as _0x195035,Notification as _0x2be181}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x4295f4,DomEmitterMixin as _0x555603,global as _0x45b4c7,getAncestors as _0x52a737,ObservableMixin as _0x2a1f66,uid as _0x55acdf,createElement as _0x2ea3d3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x173cf6}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2fa558,info as _0x23ff02}from'@uploadcare/upload-client';import*as _0x325f20 from'@uploadcare/file-uploader';var i=function(_0x2d5444){return _0x2d5444['Local']='local',_0x2d5444['URL']='url',_0x2d5444['Dropbox']='dropbox',_0x2d5444['GDrive']='gdrive',_0x2d5444['Facebook']='facebook',_0x2d5444['GPhotos']='gphotos',_0x2d5444['OneDrive']='onedrive',_0x2d5444;}({});function _(_0x379b74,_0x458d91,_0x5a1187){const t=_0x379b74['t'],_0x4c66ea=_0x379b74['t'];switch(_0x458d91){case i['Local']:return{'text':_0x4c66ea('Insert'===_0x5a1187?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4c66ea('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x5a1187?_0x4c66ea('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4c66ea('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x5a1187?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x5a1187?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x5a1187?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x5a1187?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x5a1187?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x458d91;}}class e extends _0x1560bd{['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 _0x54139b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x733571;for(const _0x10149e in _0x54139b){const _0x4f5b9c=_0x10149e,_0x3845e9=_0x54139b[_0x4f5b9c];if('uploadcareLicenseKeyValid'==_0x3845e9||'uploadcareLicenseKeyInvalid'==_0x3845e9||'uploadcareLicenseKeyExpired'==_0x3845e9||'uploadcareLicenseKeyDomainLimit'==_0x3845e9||'uploadcareLicenseKeyNotAllowed'==_0x3845e9||'uploadcareLicenseKeyEvaluationLimit'==_0x3845e9||'uploadcareLicenseKeyTrialLimit'==_0x3845e9||'uploadcareLicenseKeyUsageLimit'==_0x3845e9){delete _0x54139b[_0x4f5b9c],_0x733571=_0x3845e9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x733571&&_0x54139b['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x733571&&_0x54139b['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x733571&&_0x54139b['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x733571&&_0x54139b['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x733571&&_0x54139b['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x733571&&_0x54139b['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x733571&&_0x54139b['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x1e25b4}=this,_0x548013=_0x1e25b4['commands']['get']('uploadcare');if(!_0x548013)return;const _0x37b1ad=this['_normalizeConfigSourceList'](_0x1e25b4['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x14ad99,_0x51d388)=>{const _0x5f3ea5=this['_getIntegrationKey'](_0x51d388['type']);return _0x14ad99[_0x5f3ea5]||(_0x14ad99[_0x5f3ea5]=[]),_0x14ad99[_0x5f3ea5]['push'](_0x51d388),_0x14ad99;},{});_0x1e25b4['plugins']['has']('ImageInsertUI')&&_0x1e25b4['commands']['get']('uploadcare')&&Object['entries'](_0x37b1ad)['forEach'](([_0x22f2d4,_0x110d99])=>{_0x1e25b4['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x22f2d4,'observable':()=>_0x548013,'buttonViewCreator':()=>this['_createToolbarButton'](_0x110d99),'formViewCreator':()=>this['_createDropdownButtons'](_0x110d99),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x110d99),'override':'assetManager'!==_0x22f2d4});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x599a6e){const {locale:_0x50e1ec}=this['editor'];return _0x599a6e['map'](_0x2d5363=>{const _0x5d5d42=_(_0x50e1ec,_0x2d5363,'Insert');switch(_0x2d5363){case i['Local']:return{'icon':_0x207154,'type':i['Local'],..._0x5d5d42};case i['URL']:return{'icon':_0x4423ad,'type':i['URL'],..._0x5d5d42};case i['Dropbox']:return{'icon':_0x2f9be1,'type':i['Dropbox'],..._0x5d5d42};case i['Facebook']:return{'icon':_0x299f5,'type':i['Facebook'],..._0x5d5d42};case i['GDrive']:return{'icon':_0x5ca1be,'type':i['GDrive'],..._0x5d5d42};case i['GPhotos']:return{'icon':_0x2d4c4c,'type':i['GPhotos'],..._0x5d5d42};case i['OneDrive']:return{'icon':_0x5bbada,'type':i['OneDrive'],..._0x5d5d42};}});}['_getIntegrationKey'](_0x5bed88){switch(_0x5bed88){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3d954a,_0x53d5ca){const _0x58898f=this['editor'],_0x37dce1=new _0x3d954a(_0x58898f['locale']),_0x3ca3d3=_0x58898f['commands']['get']('uploadcare');return _0x37dce1['bind']('isEnabled')['to'](_0x3ca3d3),_0x37dce1['on']('execute',()=>{_0x3ca3d3['execute'](_0x53d5ca);}),_0x37dce1;}['_createToolbarButton'](_0x35ecac){const {locale:_0x1cef1b}=this['editor'],_0x29c1a6=this['editor']['plugins']['get']('ImageInsertUI'),_0x215b0d=_0x35ecac[0x0],_0x55c269=this['_createButton'](_0x29ddbc,_0x215b0d['type']);return _0x55c269['icon']=_0x215b0d['icon'],_0x55c269['bind']('label')['to'](_0x29c1a6,'isImageSelected',_0x105474=>_(_0x1cef1b,_0x215b0d['type'],_0x105474?'Replace':'Insert')['text']),_0x55c269['tooltip']=!0x0,_0x55c269;}['_createDropdownButtons'](_0x76dcc7){const {locale:_0x2acbad}=this['editor'],_0x40ab41=this['editor']['plugins']['get']('ImageInsertUI');return _0x76dcc7['map'](_0x525cb9=>{const _0x467e67=this['_createButton'](_0x29ddbc,_0x525cb9['type']);return _0x467e67['withText']=!0x0,_0x467e67['icon']=_0x525cb9['icon'],_0x467e67['bind']('label')['to'](_0x40ab41,'isImageSelected',_0x5158a6=>_(_0x2acbad,_0x525cb9['type'],_0x5158a6?'Replace':'Insert')['text']),_0x467e67;});}['_createMenuBarButtons'](_0xc9e004){return _0xc9e004['map'](_0xcf6cc9=>{const _0x2e3526=this['_createButton'](_0x249578,_0xcf6cc9['type']);return _0x2e3526['icon']=_0xcf6cc9['icon'],_0x2e3526['label']=_0xcf6cc9['shortText'],_0x2e3526;});}}class F extends _0x4a2bf8{['focusTracker'];['focusCycler'];constructor(_0x285a46){super(_0x285a46),this['focusTracker']=new _0x4295f4(),this['focusCycler']=new _0x2466c4({'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 x extends F{constructor(_0x234253,_0x2e8f29){super(_0x234253),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-'+_0x2e8f29}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x5534ed,_0x19a83d){const _0x5d8ee7=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x118277=>_0x118277<=_0x19a83d)['map'](_0xf7dbf2=>_0x5534ed['replace'](/\/$/,'')+'/-/resize/'+_0xf7dbf2+'x/\x20'+_0xf7dbf2+'w');return{'imageFallbackUrl':_0x5534ed,'imageSources':[{'srcset':_0x5d8ee7['join'](',\x20'),'sizes':'(max-width:\x20'+_0x19a83d+'px)\x20100vw,\x20'+_0x19a83d+'px','type':'image/webp'}]};}function C(_0x5e4ebc,_0x3bec42,_0x293f30){const _0x162322=_0x5e4ebc['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x162322?parseInt(_0x162322[0x1],0xa):_0x3bec42,'height':_0x162322?parseInt(_0x162322[0x2],0xa):_0x293f30};}function p(_0xe949e1,_0x5abcbc){const _0x2c6d4f=new(_0x555603())(),_0x975d47=_0xe949e1['plugins']['get']('ImageUtils'),_0x3151f4=_0xe949e1['editing']['mapper']['toViewElement'](_0x5abcbc),_0x1a505b=_0x975d47['findViewImgElement'](_0x3151f4),_0x346615=_0xe949e1['editing']['view']['domConverter']['viewToDom'](_0x1a505b),_0x10a565=_0x5abcbc['getAttribute']('width'),_0x1ef501=_0x5abcbc['getAttribute']('height'),_0x1fb834='image-processing';_0xe949e1['editing']['view']['change'](_0xfef607=>{_0xfef607['addClass'](_0x1fb834,_0x3151f4),_0xfef607['setStyle']('aspect-ratio',_0x10a565+'/'+_0x1ef501,_0x1a505b);}),_0x2c6d4f['listenTo'](_0x346615,'load',()=>{_0x2c6d4f['stopListening'](_0x346615,'load'),_0xe949e1['editing']['view']['change'](_0x5d9239=>{_0x5d9239['removeClass'](_0x1fb834,_0x3151f4),_0x5d9239['removeStyle']('aspect-ratio',_0x1a505b);});});}function z(_0x1a7fce){if(Array['isArray'](_0x1a7fce)){const _0x178505=_0x1a7fce['map'](z);return _0x2f5a10=>_0x178505['some'](_0x1990a6=>_0x1990a6(_0x2f5a10));}if('origin'==_0x1a7fce){const _0x5dfd91=_0x45b4c7['window']['location']['origin'];return _0x130a70=>new URL(_0x130a70,_0x45b4c7['document']['baseURI'])['origin']==_0x5dfd91;}return'function'==typeof _0x1a7fce?_0x1a7fce:_0x1a7fce instanceof RegExp?_0x3e0343=>!(!_0x3e0343['match'](_0x1a7fce)&&!_0x3e0343['replace'](/^https?:\/\//,'')['match'](_0x1a7fce)):()=>!0x1;}function S(_0x5bb87d,_0x4cea95){return _0x52a737(_0x5bb87d['target'])['includes'](_0x4cea95);}class n extends/* #__PURE__ -- @preserve */
24
+ _0x2a1f66(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x21806d,_0x10848a,_0x5cc9b7){super(),this['_editor']=_0x21806d,this['_editing']=_0x10848a,this['_dialog']=_0x21806d['plugins']['get'](_0x32f184),this['_api']=_0x10848a['ctxElement']['getAPI'](),this['_type']=_0x5cc9b7,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:_0x1b3099,model:_0x9b188d}=this['_editor'],_0x35f497=_0x9b188d['document']['selection']['getSelectedElement'](),_0x3b09d3=_0x35f497&&(_0x35f497['is']('element','imageBlock')||_0x35f497['is']('element','imageInline'));this['_formView']=new x(_0x1b3099,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x207154,'title':_(_0x1b3099,this['_type'],_0x3b09d3?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x106366['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x723652=>!S(_0x723652,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x5d9fdc}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x3a8a62=>{const _0x588891=_0x5d9fdc['length'];for(const _0x385675 of _0x5d9fdc){const _0x58809a=_0x385675===_0x5d9fdc[_0x588891-0x1],{cdnUrl:_0x2537a4,fileInfo:_0xb26d22}=_0x385675;if(!_0x2537a4||!_0xb26d22)continue;const {width:_0x2ee34b,height:_0x772e7c}=_0xb26d22['imageInfo'],_0x2a5c3c=C(_0x2537a4,_0x2ee34b,_0x772e7c),_0x4ad9d7=k(_0x2537a4,_0x2a5c3c['width']),_0x428bcb={'id':_0xb26d22['uuid'],'type':'image','attributes':{'imageDimension':_0x2a5c3c,..._0x4ad9d7}};this['_insertAsset'](_0x428bcb,_0x58809a,_0x3a8a62);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x835728=>{'idle'===_0x835728['detail']['status']&&!_0x835728['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x1adf51,_0x5a773d,_0x5b88b5){const _0x3180b9=this['_editor']['model']['document']['selection'],_0x3e9271=_0x3180b9['getSelectedElement'](),_0x1ac22e=!(!_0x3e9271||!_0x3e9271['is']('element','imageInline'));_0x5b88b5['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x1adf51,_0x1ac22e),_0x5a773d||_0x5b88b5['setSelection'](_0x3180b9['getLastPosition']());}['_insertImage'](_0x2cc4dd,_0x237284){const _0x4dbc89=this['_editor'],{imageDimension:_0x34a60f,imageFallbackUrl:_0x17eb90,imageSources:_0x1966dd}=_0x2cc4dd['attributes'];_0x4dbc89['execute']('insertImage',{'imageType':_0x237284?'imageInline':null,'source':{'uploadcareImageId':_0x2cc4dd['id'],'src':_0x17eb90,'sources':_0x1966dd,..._0x34a60f}});}}class w extends _0x1b6101{['_editing'];['_controller']=null;static get['requires'](){return[_0x32f184,o];}constructor(_0x583465){super(_0x583465),this['_editing']=_0x583465['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0xd19a16){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0xd19a16);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0xd9c6f9,publicKey:_0x2176a3,signal:_0x42ce8f,onProgress:_0x43592e}){return _0x2fa558(_0xd9c6f9,{'publicKey':_0x2176a3,'store':'auto','signal':_0x42ce8f,'onProgress':_0x43592e});}static['getInfo'](_0x177ee8,_0x552349){return _0x23ff02(_0x177ee8,_0x552349);}}class f extends _0x1560bd{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x173cf6,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x265b76=this['editor'];if(!!!_0x265b76['config']['get']('uploadcare'))return;_0x265b76['plugins']['get'](_0x173cf6)['createUploadAdapter']=_0x86d6f8=>new A(_0x86d6f8,_0x265b76),_0x265b76['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x58ef94,{imageElement:_0x25d9f2,data:_0x5815eb})=>{_0x265b76['model']['change'](_0x2ccc59=>{_0x2ccc59['setAttribute']('uploadcareImageId',_0x5815eb['uploadcareImageId'],_0x25d9f2);});});}}class A{['loader'];['editor'];['controller'];constructor(_0xaae450,_0x142d8a){this['loader']=_0xaae450,this['editor']=_0x142d8a,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x341b82=this['editor']['config']['get']('uploadcare.pubkey'),_0xf9ffd6=await this['loader']['file'];return j['upload']({'file':_0xf9ffd6,'publicKey':_0x341b82,'signal':this['controller']['signal'],'onProgress':_0x4c8c71=>{_0x4c8c71&&_0x4c8c71['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x4c8c71['value']);}})['then'](async _0xf0e9bc=>{const {imageFallbackUrl:_0x111707,imageSources:_0x36c3a9}=k(_0xf0e9bc['cdnUrl'],_0xf0e9bc['imageInfo']['width']);return{'uploadcareImageId':_0xf0e9bc['uuid'],'default':_0x111707,'sources':_0x36c3a9};})['catch'](()=>{const _0x236f18=t('Cannot\x20upload\x20file:')+('\x20'+_0xf9ffd6['name']+'.');return Promise['reject'](_0x236f18);});}['abort'](){this['controller']['abort']();}}class o extends _0x1560bd{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x32f184];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x36924b){super(_0x36924b),this['ucContextId']=_0x55acdf();}['init'](){const _0x597c7c=this['editor'];_0x597c7c['commands']['add']('uploadcare',new w(_0x597c7c));}['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 _0x44520b=_0x45b4c7['document']['querySelector']('input[uploadcare-file-input]');_0x44520b&&_0x44520b['remove']();}),async function(_0x5e7df8){const _0x3146b3=_0x36b055([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x4d1451=0x3d8d0df,_0x41f83b=0x3dfa1a7^_0x4d1451,_0x931414=window[_0x36b055([0x44,0x61,0x74,0x65])][_0x36b055([0x6e,0x6f,0x77])](),_0x11f6e0=_0x5e7df8[_0x36b055([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3ca7db=new window[(_0x36b055([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x268eaa=>{_0x11f6e0[_0x36b055([0x6f,0x6e,0x63,0x65])](_0x36b055([0x72,0x65,0x61,0x64,0x79]),_0x268eaa);}),_0x4fcb7e={[_0x36b055([0x6b,0x74,0x79])]:_0x36b055([0x45,0x43]),[_0x36b055([0x75,0x73,0x65])]:_0x36b055([0x73,0x69,0x67]),[_0x36b055([0x63,0x72,0x76])]:_0x36b055([0x50,0x2d,0x32,0x35,0x36]),[_0x36b055([0x78])]:_0x36b055([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]),[_0x36b055([0x79])]:_0x36b055([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]),[_0x36b055([0x61,0x6c,0x67])]:_0x36b055([0x45,0x53,0x32,0x35,0x36])},_0x39b0f6=_0x11f6e0[_0x36b055([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x36b055([0x67,0x65,0x74])](_0x36b055([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x52fe1c(){let _0x1d35a8,_0x341eea=null,_0x394d38=null;try{if(_0x39b0f6==_0x36b055([0x47,0x50,0x4c]))return _0x36b055([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1d35a8=_0x2c32f7(),!_0x1d35a8)return _0x36b055([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1d35a8[_0x36b055([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x394d38=_0x13f31d(_0x1d35a8[_0x36b055([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1d35a8[_0x36b055([0x6a,0x74,0x69])])),await _0x1cd67a()?_0x1a10d6()?_0x5cf7c5()?_0x36b055([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x36b4df()?(_0x1d35a8[_0x36b055([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36b055([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x341eea=_0x1d96ec(_0x36b055([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1d35a8[_0x36b055([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36b055([0x74,0x72,0x69,0x61,0x6c])&&(_0x341eea=_0x1d96ec(_0x36b055([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x571465()):_0x36b055([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x36b055([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x36b055([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x36b055([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5cf7c5(){const _0x39063f=[_0x36b055([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x36b055([0x74,0x72,0x69,0x61,0x6c])][_0x36b055([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d35a8[_0x36b055([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x931414/0x3e8:0xe10*_0x41f83b;return _0x1d35a8[_0x36b055([0x65,0x78,0x70])]<_0x39063f;}function _0x1a10d6(){const _0x7be7cd=_0x1d35a8[_0x36b055([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x7be7cd&&(!!_0x7be7cd[_0x36b055([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36b055([0x2a]))||!!_0x7be7cd[_0x36b055([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36b055([0x55,0x50,0x4c,0x43])));}function _0x36b4df(){const _0xce460f=_0x1d35a8[_0x36b055([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xce460f||0x0==_0xce460f[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5f3e59}=new URL(window[_0x36b055([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xce460f[_0x36b055([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f3e59))return!0x0;const _0x2f4f53=_0x5f3e59[_0x36b055([0x73,0x70,0x6c,0x69,0x74])](_0x36b055([0x2e]));return _0xce460f[_0x36b055([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf8405a=>_0xf8405a[_0x36b055([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36b055([0x2a])))[_0x36b055([0x6d,0x61,0x70])](_0x143dba=>_0x143dba[_0x36b055([0x73,0x70,0x6c,0x69,0x74])](_0x36b055([0x2e])))[_0x36b055([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x379a7a=>_0x379a7a[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2f4f53[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x36b055([0x6d,0x61,0x70])](_0x200dc7=>Array(_0x2f4f53[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x200dc7[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x36b055([0x66,0x69,0x6c,0x6c])](_0x200dc7[0x0]===_0x36b055([0x2a])?_0x36b055([0x2a]):'')[_0x36b055([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x200dc7))[_0x36b055([0x73,0x6f,0x6d,0x65])](_0x4f7380=>_0x2f4f53[_0x36b055([0x65,0x76,0x65,0x72,0x79])]((_0x5e4d12,_0x1264b2)=>_0x4f7380[_0x1264b2]===_0x5e4d12||_0x4f7380[_0x1264b2]===_0x36b055([0x2a])));}function _0x571465(){return _0x341eea&&_0x394d38?new window[(_0x36b055([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x27f2a8,_0x538f1f)=>{_0x341eea[_0x36b055([0x74,0x68,0x65,0x6e])](_0x27f2a8,_0x538f1f),_0x394d38[_0x36b055([0x74,0x68,0x65,0x6e])](_0x48fc85=>{_0x48fc85!=_0x36b055([0x56,0x61,0x6c,0x69,0x64])&&_0x27f2a8(_0x48fc85);},_0x538f1f);}):_0x341eea||_0x394d38||_0x36b055([0x56,0x61,0x6c,0x69,0x64]);}}function _0x13f31d(_0x1632de,_0x5580c3){return new window[(_0x36b055([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x701f34=>{if(_0x4ff768())return _0x701f34(_0x36b055([0x56,0x61,0x6c,0x69,0x64]));_0x226fdd(),_0x11f6e0[_0x36b055([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x36b055([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1997b2=!0x1;const _0x1db32f=_0x55acdf();function _0x25b96a(_0xa74d52){return!!_0xa74d52&&(typeof _0xa74d52===_0x36b055([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xa74d52===_0x36b055([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xa74d52[_0x36b055([0x74,0x68,0x65,0x6e])]===_0x36b055([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xa74d52[_0x36b055([0x63,0x61,0x74,0x63,0x68])]===_0x36b055([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1226f8(_0x20a40b){_0x54628f(_0x20a40b)[_0x36b055([0x74,0x68,0x65,0x6e])](_0xeb0b8=>{if(!_0xeb0b8||_0xeb0b8[_0x36b055([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x36b055([0x6f,0x6b]))return _0x36b055([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x526fab(_0x47add1(_0x1db32f+_0x5580c3))!=_0xeb0b8[_0x36b055([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x36b055([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x36b055([0x56,0x61,0x6c,0x69,0x64]);})[_0x36b055([0x74,0x68,0x65,0x6e])](_0xe194a1=>(_0x2bab4b(),_0xe194a1),()=>{const _0x12f6b1=_0x1809b5();return null==_0x12f6b1?(_0x2bab4b(),_0x36b055([0x56,0x61,0x6c,0x69,0x64])):_0x36b055(_0x931414-_0x12f6b1>(0x27d454df^_0x4d1451)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x36b055([0x74,0x68,0x65,0x6e])](_0x701f34)[_0x36b055([0x63,0x61,0x74,0x63,0x68])](()=>{_0x701f34(_0x36b055([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4ebe76=0x3ee3e5f^_0x4d1451;function _0x2bab4b(){const _0x200559=_0x36b055([0x6c,0x6c,0x63,0x74,0x2d])+_0x526fab(_0x47add1(_0x1632de)),_0x519cbb=_0x153664(_0x526fab(window[_0x36b055([0x4d,0x61,0x74,0x68])][_0x36b055([0x63,0x65,0x69,0x6c])](_0x931414/_0x4ebe76)));window[_0x36b055([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36b055([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x200559,_0x519cbb);}function _0x1809b5(){const _0x4a604e=_0x36b055([0x6c,0x6c,0x63,0x74,0x2d])+_0x526fab(_0x47add1(_0x1632de)),_0x1e065e=window[_0x36b055([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36b055([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a604e);return _0x1e065e?window[_0x36b055([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x153664(_0x1e065e),0x10)*_0x4ebe76:null;}function _0x54628f(_0x4543a7){return new window[(_0x36b055([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2a29a1,_0x52ef4d)=>{_0x4543a7[_0x36b055([0x74,0x68,0x65,0x6e])](_0x2a29a1,_0x52ef4d),window[_0x36b055([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x52ef4d,0x3d9041f^_0x4d1451);});}}_0x11f6e0[_0x36b055([0x6f,0x6e])](_0x36b055([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x44ecf6,_0x3d814f)=>{if(_0x3d814f[0x0]!=_0x1632de)return _0x701f34(_0x36b055([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3d814f[0x1]={..._0x3d814f[0x1],[_0x36b055([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1db32f};},{[_0x36b055([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36b055([0x68,0x69,0x67,0x68])}),_0x11f6e0[_0x36b055([0x6f,0x6e])](_0x36b055([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x24994f=>{_0x25b96a(_0x24994f[_0x36b055([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1997b2=!0x0,_0x1226f8(_0x24994f[_0x36b055([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x36b055([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36b055([0x6c,0x6f,0x77])}),_0x3ca7db[_0x36b055([0x74,0x68,0x65,0x6e])](()=>{_0x1997b2||_0x701f34(_0x36b055([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4ff768(){return _0x11f6e0[_0x36b055([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36b055([0x76,0x69,0x65,0x77])][_0x36b055([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x36b055([0x61,0x75,0x74,0x6f]);}function _0x226fdd(){_0x11f6e0[_0x36b055([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36b055([0x76,0x69,0x65,0x77])][_0x36b055([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36b055([0x61,0x75,0x74,0x6f]);}}function _0x1d96ec(_0x263c1f){const _0x413c9f=[new window[(_0x36b055([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e6c47=>setTimeout(_0x5e6c47,0x3d1ee13^_0x4d1451)),_0x3ca7db[_0x36b055([0x74,0x68,0x65,0x6e])](()=>new window[(_0x36b055([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b8949=>{let _0x484af4=0x0;_0x11f6e0[_0x36b055([0x6d,0x6f,0x64,0x65,0x6c])][_0x36b055([0x6f,0x6e])](_0x36b055([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xe509ff,_0x417fe8)=>{_0x417fe8[0x0][_0x36b055([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x484af4++,_0x484af4==(0x3d8d127^_0x4d1451)&&(_0x4b8949(),_0xe509ff[_0x36b055([0x6f,0x66,0x66])]());});}))];return window[_0x36b055([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36b055([0x72,0x61,0x63,0x65])](_0x413c9f)[_0x36b055([0x74,0x68,0x65,0x6e])](()=>_0x263c1f);}async function _0x19943b(){await _0x3ca7db,_0x11f6e0[_0x36b055([0x6d,0x6f,0x64,0x65,0x6c])][_0x36b055([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3f3260,_0x11f6e0[_0x36b055([0x6d,0x6f,0x64,0x65,0x6c])][_0x36b055([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3f3260,_0x11f6e0[_0x36b055([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x36b055([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x293c8e(_0x66d985){const _0x4ef2a1=_0x38fa4e();_0x11f6e0[_0x4ef2a1]=_0x36b055([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x66d985,_0x66d985!=_0x36b055([0x56,0x61,0x6c,0x69,0x64])&&_0x19943b();}function _0x38fa4e(){const _0x390d16=window[_0x36b055([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x36b055([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x36b055([0x6e,0x6f,0x77])]())[_0x36b055([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x36b055([0x2e]),'');let _0x498e3d=_0x36b055([0x52]);for(let _0x56b454=0x0;_0x56b454<_0x390d16[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x56b454+=0x2){let _0x5f3816=window[_0x36b055([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x390d16[_0x36b055([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x56b454,_0x56b454+0x2));_0x5f3816>=_0x3146b3[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5f3816-=_0x3146b3[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x498e3d+=_0x3146b3[_0x5f3816];}return _0x498e3d;}function _0x2c32f7(){const _0x25dfe0=_0x39b0f6[_0x36b055([0x73,0x70,0x6c,0x69,0x74])](_0x36b055([0x2e]));if(0x3!=_0x25dfe0[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5f4917(_0x25dfe0[0x1]);function _0x5f4917(_0x1674ba){const _0x27e124=_0x116809(_0x1674ba);return _0x27e124&&_0x2f3ef1()?_0x27e124:null;function _0x2f3ef1(){const _0x395ede=_0x27e124[_0x36b055([0x6a,0x74,0x69])],_0x54ad6d=window[_0x36b055([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x395ede[_0x36b055([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x395ede[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4e9524={..._0x27e124,[_0x36b055([0x6a,0x74,0x69])]:_0x395ede[_0x36b055([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x395ede[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4e9524[_0x36b055([0x76,0x63])],_0x47add1(_0x4e9524)==_0x54ad6d;}}}async function _0x1cd67a(){let _0x26e099=!0x0;try{const _0x13db79=_0x39b0f6[_0x36b055([0x73,0x70,0x6c,0x69,0x74])](_0x36b055([0x2e])),[_0x4702c6,_0x4599dc,_0xb980f1]=_0x13db79;return _0x4eaa7e(_0x4702c6),await _0x3c61db(_0x4702c6,_0x4599dc,_0xb980f1),_0x26e099;}catch{return!0x1;}function _0x4eaa7e(_0x4303df){const _0x37eff4=_0x116809(_0x4303df);_0x37eff4&&_0x37eff4[_0x36b055([0x61,0x6c,0x67])]==_0x36b055([0x45,0x53,0x32,0x35,0x36])||(_0x26e099=!0x1);}async function _0x3c61db(_0x347143,_0x2fe817,_0x1d59a3){const _0x3c4fe6=window[_0x36b055([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x36b055([0x66,0x72,0x6f,0x6d])](_0x10501f(_0x1d59a3),_0x4915de=>_0x4915de[_0x36b055([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x277758=new window[(_0x36b055([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x36b055([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x347143+_0x36b055([0x2e])+_0x2fe817),_0x334754=window[_0x36b055([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x36b055([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x334754)return;const _0x5dcc2b=await _0x334754[_0x36b055([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x36b055([0x6a,0x77,0x6b]),_0x4fcb7e,{[_0x36b055([0x6e,0x61,0x6d,0x65])]:_0x36b055([0x45,0x43,0x44,0x53,0x41]),[_0x36b055([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x36b055([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x36b055([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x334754[_0x36b055([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x36b055([0x6e,0x61,0x6d,0x65])]:_0x36b055([0x45,0x43,0x44,0x53,0x41]),[_0x36b055([0x68,0x61,0x73,0x68])]:{[_0x36b055([0x6e,0x61,0x6d,0x65])]:_0x36b055([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5dcc2b,_0x3c4fe6,_0x277758)||(_0x26e099=!0x1);}}function _0x116809(_0x421540){return _0x421540[_0x36b055([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x36b055([0x65,0x79]))?JSON[_0x36b055([0x70,0x61,0x72,0x73,0x65])](_0x10501f(_0x421540)):null;}function _0x10501f(_0x3a906f){return window[_0x36b055([0x61,0x74,0x6f,0x62])](_0x3a906f[_0x36b055([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x36b055([0x2b]))[_0x36b055([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x36b055([0x2f])));}function _0x47add1(_0x2df886){let _0x2465d9=0x1505;function _0x4ed0a2(_0x31ef05){for(let _0xfe3cd6=0x0;_0xfe3cd6<_0x31ef05[_0x36b055([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xfe3cd6++){const _0xed1ade=_0x31ef05[_0x36b055([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xfe3cd6);_0x2465d9=(_0x2465d9<<0x5)+_0x2465d9+_0xed1ade,_0x2465d9&=_0x2465d9;}}function _0x14ecba(_0x1c8301){Array[_0x36b055([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1c8301)?_0x1c8301[_0x36b055([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x14ecba):_0x1c8301&&typeof _0x1c8301==_0x36b055([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x36b055([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1c8301)[_0x36b055([0x73,0x6f,0x72,0x74])]()[_0x36b055([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x28962b,_0x5a6e0c])=>{_0x4ed0a2(_0x28962b),_0x14ecba(_0x5a6e0c);}):_0x4ed0a2(window[_0x36b055([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1c8301));}return _0x14ecba(_0x2df886),_0x2465d9>>>0x0;}function _0x526fab(_0x2c1b03){return _0x2c1b03[_0x36b055([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x36b055([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x36b055([0x30]));}function _0x153664(_0xf84c28){return _0xf84c28[_0x36b055([0x73,0x70,0x6c,0x69,0x74])]('')[_0x36b055([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x36b055([0x6a,0x6f,0x69,0x6e])]('');}function _0x3f3260(){}function _0x36b055(_0x4e7b84){return _0x4e7b84['map'](_0x28a0bc=>String['fromCharCode'](_0x28a0bc))['join']('');}_0x293c8e(await _0x52fe1c());}(this);}['_initSchema'](){const _0x2061f4=this['editor']['model']['schema'];_0x2061f4['isRegistered']('imageBlock')&&_0x2061f4['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x2061f4['isRegistered']('imageInline')&&_0x2061f4['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5afbbc=this['editor'];_0x5afbbc['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5afbbc['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x400338=>_0x400338['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5bc224=_0x5afbbc['commands']['get']('replaceImageSource');_0x5bc224&&this['listenTo'](_0x5bc224,'cleanupImage',(_0x2a2515,[_0x5d8d26,_0x12472e])=>{_0x5d8d26['removeAttribute']('uploadcareImageId',_0x12472e);});}['_initConfig'](){const _0x37d9b8=this['editor']['config']['get']('uploadcare.uploader')||{},_0x5ca031=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x2ea3d3(_0x45b4c7['document'],'uc-config',{..._0x37d9b8,'pubkey':_0x5ca031,'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']=_0x126088=>{if('closeMax'==_0x126088)return'#uc-icon-arrow-down';},_0x45b4c7['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x2ea3d3(_0x45b4c7['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x45b4c7['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x43c054=this['editor']['commands']['get']('insertImage');_0x43c054&&this['listenTo'](_0x43c054,'execute',()=>{const _0x2722c3=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2722c3&&_0x2722c3['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x2722c3);});});const _0x5f4995=this['editor']['commands']['get']('uploadcareImageReplace');_0x5f4995&&this['listenTo'](_0x5f4995,'execute',()=>{const _0x1a27de=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1a27de&&_0x1a27de['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1a27de);});});}}class tt extends _0x1560bd{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x398c28){super(_0x398c28),_0x398c28['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x325f20['defineComponents'](_0x325f20);}}class ii extends _0x4a2bf8{constructor(_0x45df40){super(_0x45df40);const t=_0x45df40['t'],_0x285046=this['bindTemplate'],_0x404f1b=new _0x53f103();_0x404f1b['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':[_0x404f1b,{'text':_0x285046['to']('imageUploadProgress',_0x2a25c5=>t('Loading\x20image...')+'\x20('+(_0x2a25c5||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 ti extends _0x4a2bf8{constructor(_0x360459){super(_0x360459);const t=_0x360459['t'];this['set']('errorType',null);const _0x18b147=new _0x29ddbc(_0x360459);_0x18b147['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x18b147['withText']=!0x0,_0x18b147['class']='ck-button-action',_0x18b147['on']('execute',()=>{this['fire']('retry');}),_0x18b147['bind']('isVisible')['to'](this,'errorType',_0x1ce04d=>'NotFound'!==_0x1ce04d);const _0x2201ce=new _0x195035();_0x2201ce['content']=_0x570e18,_0x2201ce['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4b9c28=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':[_0x2201ce,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4b9c28['to']('errorType',_0x57cc41=>t('NotFound'!==_0x57cc41?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x18b147]},{'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 ei extends _0x4a2bf8{constructor(_0x131649,_0x40e1a6){super(_0x131649);const _0x7cce91=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x40e1a6,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x7cce91['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0xf9c57b,_0x2bc9da,_0x10bb40){super(_0xf9c57b),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0xf9c57b),this['_errorView']=new ti(_0xf9c57b),this['_editingView']=new ei(_0xf9c57b,_0x10bb40),this['_focusableView']=new _0x4a2bf8(_0xf9c57b),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2bc9da),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'],_0x553bb2=>{this['_addUploadcareImageEditorListeners'](_0x553bb2);});}),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'](_0x5063f0,_0x334045){const _0x1e8221='uc-cloud-image-editor',_0xbd2f6d=_0x5063f0['querySelector'](_0x1e8221);if(_0xbd2f6d)return _0x334045(_0xbd2f6d);const _0x39e963=new MutationObserver(_0x4a4a60=>{const _0x341787=_0x4a4a60['filter'](_0x29d8c1=>_0x29d8c1['target']===_0x5063f0&&_0x29d8c1['addedNodes']['length']>0x0&&_0x29d8c1['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x1e8221);_0x341787['length']&&(_0x39e963['disconnect'](),_0x334045(_0x341787[0x0]['addedNodes'][0x0]));});_0x39e963['observe'](_0x5063f0,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0xa995b){_0xa995b['addEventListener']('apply',_0x5b1649=>{this['fire']('apply',{'imageSrc':_0x5b1649['detail']['cdnUrl']});}),_0xa995b['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
+ _0x2a1f66(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x8b1c5c,_0xb50fe0,_0x4d029d){super(),this['_editor']=_0x8b1c5c,this['_dialog']=_0xb50fe0,this['_imageElement']=_0x4d029d,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 _0x404409=this['_imageElement'],_0x317ccf=_0x404409['getAttribute']('uploadcareImageId'),_0x2ed516=_0x404409['getAttribute']('src');if(_0x317ccf)await this['_loadImageInfo'](_0x317ccf,_0x2ed516);else{if(this['_imageCache']['has'](_0x2ed516)){const _0x40e2cc=this['_imageCache']['get'](_0x2ed516);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x40e2cc['url'],this['imageDimension']=_0x40e2cc['dimension'],this['imageId']=_0x40e2cc['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x20260f}=this['_editor'],t=_0x20260f['t'],_0x4e05c2=new X(_0x20260f,this['imageStatus'],this['_attributes']);_0x4e05c2['bind']('status')['to'](this,'imageStatus'),_0x4e05c2['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4e05c2['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4e05c2['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4e05c2,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x465540,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4e05c2,'position':_0x106366['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4e05c2['focus']();},'onHide':()=>{_0x4e05c2['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x51626e=>!S(_0x51626e,_0x4e05c2['element'])}});}['_loadImageInfo'](_0x25a837,_0x1b78f6){return j['getInfo'](_0x25a837,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x54c895=>{const {width:_0x581b05,height:_0xf1c9b0}=_0x54c895['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1b78f6,this['imageDimension']={'width':_0x581b05,'height':_0xf1c9b0},this['imageId']=_0x25a837;})['catch'](_0x59fa57=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x59fa57['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x51b056,_0x2b3a75){return this['_getImageAsFile'](_0x51b056)['then'](_0x12f949=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x2b3a75['signal'],'file':_0x12f949,'onProgress':_0x5b6fde=>{_0x5b6fde&&_0x5b6fde['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5b6fde['value']));}}))['then'](_0x178400=>{const {width:_0x327f2e,height:_0x4e16c0}=_0x178400['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x178400['cdnUrl'],this['imageDimension']={'width':_0x327f2e,'height':_0x4e16c0},this['imageId']=_0x178400['uuid'],this['imageUploadProgress']=null;const _0x23396c=_0x51b056['getAttribute']('src');this['_imageCache']['set'](_0x23396c,{'id':_0x178400['uuid'],'url':_0x178400['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3bef34=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3bef34['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2a94e9,_0x14c969){_0x2a94e9['on']('apply',(_0x51de45,_0xcff662)=>{this['_replaceImage'](_0x14c969,_0xcff662['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2a94e9['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2a94e9['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5824b6,_0x572b03,_0x98a467){const _0x21e0ef=this['_editor'],{width:_0xd9d5f3,height:_0x35d39a}=C(_0x572b03,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3cbb05,imageSources:_0x22c321}=k(_0x572b03,_0xd9d5f3);_0x21e0ef['model']['change'](_0x471c80=>{if('$graveyard'===_0x5824b6['root']['rootName']){_0x21e0ef['execute']('insertImage',{'imageType':_0x5824b6['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5824b6['getAttributes']()),'uploadcareImageId':_0x98a467,'src':_0x3cbb05,'sources':_0x22c321,'width':_0xd9d5f3,'height':_0x35d39a}});const _0x169fa0=_0x5824b6['getChildren']();_0x5824b6=_0x21e0ef['model']['document']['selection']['getSelectedElement']();for(const _0x115f62 of _0x169fa0)_0x471c80['append'](_0x471c80['cloneElement'](_0x115f62),_0x5824b6);}else _0x471c80['setSelection'](_0x5824b6,'on'),_0x21e0ef['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5824b6['getAttributes']()),'uploadcareImageId':_0x98a467,'src':_0x3cbb05,'sources':_0x22c321,'width':_0xd9d5f3,'height':_0x35d39a},_0x5824b6);_0x471c80['setSelection'](_0x5824b6,'on');});}async['_getImageAsFile'](_0x241aa6){const _0x242010=_0x45b4c7['window'],_0x545330=_0x45b4c7['document']['location']['href'],_0x2e61b1=new _0x242010['URL'](_0x241aa6['getAttribute']('src'),_0x545330);if('data:'===_0x2e61b1['protocol']){const _0x45d889=_0x2e61b1['href']['split'](','),_0x3ae1ed=_0x45d889[0x0]['match'](/:(.*?);/)[0x1],_0x2e6402=_0x3ae1ed['split']('/')[0x1],_0x5ef9d6=_0x242010['atob'](_0x45d889[_0x45d889['length']-0x1]);let _0x4bdf35=_0x5ef9d6['length'];const _0x5c0683=new _0x242010['Uint8Array'](_0x4bdf35);for(;_0x4bdf35--;)_0x5c0683[_0x4bdf35]=_0x5ef9d6['charCodeAt'](_0x4bdf35);return new _0x242010['File']([_0x5c0683],'image.'+_0x2e6402,{'type':_0x3ae1ed});}const _0x5b043d=_0x2e61b1['href']['split']('/'),_0x58726a=_0x5b043d[_0x5b043d['length']-0x1],_0x36483e=_0x58726a['split']('.')[0x1];return _0x242010['fetch'](_0x2e61b1['href'])['then'](_0x79a0f3=>_0x79a0f3['clone']()['blob']())['then'](_0x3265ef=>new _0x242010['File']([_0x3265ef],_0x58726a,{'type':'image/'+_0x36483e}));}}class Q extends _0x1b6101{['imageEditController'];static get['requires'](){return[_0x32f184];}['_isEditable'];constructor(_0x141130){super(_0x141130),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xa5687f){const _0x4acf8b=z(_0xa5687f);return _0x4a4774=>!(!_0x4a4774||!_0x4a4774['is']('element','imageBlock')&&!_0x4a4774['is']('element','imageInline'))&&(!!_0x4a4774['hasAttribute']('uploadcareImageId')||!!_0x4a4774['hasAttribute']('src')&&_0x4acf8b(_0x4a4774['getAttribute']('src')));}(_0x141130['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x696825=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x696825);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0xea1a6b=this['editor']['model']['document']['selection']['getSelectedElement']();_0xea1a6b&&(_0xea1a6b['is']('element','imageBlock')||_0xea1a6b['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x32f184),_0xea1a6b),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x1b6101{['refresh'](){const _0x28cf43=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x28cf43&&(_0x28cf43['is']('element','imageBlock')||_0x28cf43['is']('element','imageInline')));}['execute'](_0x90543){const _0x2d1d42=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x19d7e4=>{_0x19d7e4['setAttributes'](_0x90543,_0x2d1d42),_0x19d7e4['removeAttribute']('srcset',_0x2d1d42),_0x19d7e4['removeAttribute']('sizes',_0x2d1d42);});}}class m extends _0x1560bd{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2be181,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2c55ca}=this;_0x2c55ca['commands']['add']('uploadcareImageEdit',new Q(_0x2c55ca)),_0x2c55ca['commands']['add']('uploadcareImageReplace',new V(_0x2c55ca));}}class g extends _0x1560bd{['_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 _0x15698b=this['editor'];_0x15698b['ui']['componentFactory']['add']('uploadcareImageEdit',_0x54037d=>{const _0x234fe6=_0x15698b['commands']['get']('uploadcareImageEdit'),_0x12a527=new _0x29ddbc(_0x54037d),t=_0x54037d['t'];return _0x12a527['set']({'icon':_0x465540,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x12a527['bind']('isEnabled')['to'](_0x234fe6),_0x12a527['bind']('isOn')['to'](_0x234fe6,'isActive'),this['listenTo'](_0x12a527,'execute',()=>{_0x15698b['execute']('uploadcareImageEdit'),_0x15698b['editing']['view']['focus']();}),_0x12a527;}),this['_initConfig']();}['_initConfig'](){const _0x4831a1=_0x2ea3d3(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4831a1),this['listenTo'](this['editor'],'destroy',()=>{_0x4831a1['remove']();});}}class et extends _0x1560bd{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "0.0.0-nightly-20250824.0",
3
+ "version": "0.0.0-nightly-20250825.0",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,14 +23,14 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-20250824.0",
27
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250824.0",
28
- "@ckeditor/ckeditor5-image": "0.0.0-nightly-20250824.0",
29
- "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20250824.0",
30
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250824.0",
31
- "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20250824.0",
32
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250824.0",
33
- "ckeditor5": "0.0.0-nightly-20250824.0",
26
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-20250825.0",
27
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250825.0",
28
+ "@ckeditor/ckeditor5-image": "0.0.0-nightly-20250825.0",
29
+ "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20250825.0",
30
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250825.0",
31
+ "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20250825.0",
32
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250825.0",
33
+ "ckeditor5": "0.0.0-nightly-20250825.0",
34
34
  "@uploadcare/file-uploader": "1.17.1",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x515179=_0x1670;(function(_0x36d016,_0x2eba78){const _0x3a856e=_0x1670,_0x1b3575=_0x36d016();while(!![]){try{const _0x1678b4=-parseInt(_0x3a856e(0x1df))/0x1*(parseInt(_0x3a856e(0x1bf))/0x2)+parseInt(_0x3a856e(0x1f6))/0x3*(parseInt(_0x3a856e(0x1cb))/0x4)+parseInt(_0x3a856e(0x1e2))/0x5+parseInt(_0x3a856e(0x200))/0x6+parseInt(_0x3a856e(0x1c2))/0x7*(-parseInt(_0x3a856e(0x1ed))/0x8)+parseInt(_0x3a856e(0x1d4))/0x9*(-parseInt(_0x3a856e(0x1fd))/0xa)+-parseInt(_0x3a856e(0x1e3))/0xb;if(_0x1678b4===_0x2eba78)break;else _0x1b3575['push'](_0x1b3575['shift']());}catch(_0x459001){_0x1b3575['push'](_0x1b3575['shift']());}}}(_0x3ae0,0x592e6));function _0x1670(_0x53ff42,_0xfc36bf){const _0x3ae0ab=_0x3ae0();return _0x1670=function(_0x167014,_0x238b32){_0x167014=_0x167014-0x1b3;let _0x1b9eeb=_0x3ae0ab[_0x167014];return _0x1b9eeb;},_0x1670(_0x53ff42,_0xfc36bf);}import{Plugin as _0x1d26e2}from'ckeditor5/src/core.js';import{Dialog as _0x454e09}from'ckeditor5/src/ui.js';import{createElement as _0x91ffd8,global as _0x566566,uid as _0x1f8674}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x3faf13}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x5377f1}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0xc436b0}from'./utils/editingutils.js';function _0x3ae0(){const _0x3dac45=['execute','fromCharCode','render','iconHrefResolver','destroy','imageInline','requires','2165224KNnWSm','attributeToAttribute','conversion','uploadcareImageReplace','listenTo','editing','model','uploadcareImageId','appendChild','20745pQGuby','_initImageProcessingIndicator','isOfficialPlugin','selection','getSelectedElement','true','uploadcare.uploader','editor','config','upcast','UploadcareEditing','1YKAajn','insertImage','ctxElement','2371520qJETNZ','4590410tweDGd','\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','for','_configElement','removeAttribute','_initConversion','remove','map','href','document','784zgrUWi','cleanupImage','once','body','configElement','data-uc-image-id','ucContextId','afterInit','downcast','3pQAhYS','PictureEditing','closeMax','input[uploadcare-file-input]','isRegistered','imageBlock','pluginName','510vWBkBK','uploadcare.pubkey','querySelector','1211886RoFFbK','replaceImageSource','getAttribute','add','init','_initConfig','uploadcare','uc-upload-ctx-provider','extend','commands','_ctxElement','isPremiumPlugin','uploader-','#uc-icon-arrow-down','_initCtx','view','contentLanguage','locale','elementToAttribute','get','join','227396krtAWU','uc-config','schema','14553EjtwOe','_initSchema'];_0x3ae0=function(){return _0x3dac45;};return _0x3ae0();}export class UploadcareEditing extends _0x1d26e2{[_0x515179(0x1e6)]=null;[_0x515179(0x1b4)]=null;static get[_0x515179(0x1fc)](){const _0x510790=_0x515179;return _0x510790(0x1de);}static get[_0x515179(0x1ca)](){const _0x1e9ba7=_0x515179;return[_0x1e9ba7(0x1f7),_0x5377f1,_0x454e09];}static get[_0x515179(0x1d6)](){return!0x0;}static get[_0x515179(0x1b5)](){return!0x0;}[_0x515179(0x1f3)];get[_0x515179(0x1f1)](){const _0x1f7e0e=_0x515179;return this[_0x1f7e0e(0x1e6)];}get[_0x515179(0x1e1)](){const _0x10d44a=_0x515179;return this[_0x10d44a(0x1b4)];}constructor(_0x59980e){const _0x3e5202=_0x515179;super(_0x59980e),this[_0x3e5202(0x1f3)]=_0x1f8674();}[_0x515179(0x204)](){const _0x55ff8e=_0x515179,_0x10f2a7=this[_0x55ff8e(0x1db)];_0x10f2a7[_0x55ff8e(0x1b3)][_0x55ff8e(0x203)](_0x55ff8e(0x206),new _0x3faf13(_0x10f2a7));}[_0x515179(0x1f4)](){const _0x2d1dc8=_0x515179;this[_0x2d1dc8(0x1c3)](),this[_0x2d1dc8(0x1e8)](),this[_0x2d1dc8(0x205)](),this[_0x2d1dc8(0x1b8)](),this[_0x2d1dc8(0x1d5)](),this[_0x2d1dc8(0x1cf)](this[_0x2d1dc8(0x1db)],_0x2d1dc8(0x1c8),()=>{const _0x6dbe7b=_0x2d1dc8;this[_0x6dbe7b(0x1e6)]&&(this[_0x6dbe7b(0x1e6)][_0x6dbe7b(0x1e9)](),this[_0x6dbe7b(0x1e6)]=null),this[_0x6dbe7b(0x1b4)]&&(this[_0x6dbe7b(0x1b4)][_0x6dbe7b(0x1e9)](),this[_0x6dbe7b(0x1b4)]=null);const _0x15dd06=_0x566566[_0x6dbe7b(0x1ec)][_0x6dbe7b(0x1ff)](_0x6dbe7b(0x1f9));_0x15dd06&&_0x15dd06[_0x6dbe7b(0x1e9)]();}),async function(_0x1a64a3){const _0x592258=_0x4ba973([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x332de8=0x3d8d0df,_0x454abf=0x3dfa1bf^_0x332de8,_0x455390=window[_0x4ba973([0x44,0x61,0x74,0x65])][_0x4ba973([0x6e,0x6f,0x77])](),_0x5efcee=_0x1a64a3[_0x4ba973([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1fbd28=new window[(_0x4ba973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x290fbb=>{_0x5efcee[_0x4ba973([0x6f,0x6e,0x63,0x65])](_0x4ba973([0x72,0x65,0x61,0x64,0x79]),_0x290fbb);}),_0x296b91={[_0x4ba973([0x6b,0x74,0x79])]:_0x4ba973([0x45,0x43]),[_0x4ba973([0x75,0x73,0x65])]:_0x4ba973([0x73,0x69,0x67]),[_0x4ba973([0x63,0x72,0x76])]:_0x4ba973([0x50,0x2d,0x32,0x35,0x36]),[_0x4ba973([0x78])]:_0x4ba973([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]),[_0x4ba973([0x79])]:_0x4ba973([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]),[_0x4ba973([0x61,0x6c,0x67])]:_0x4ba973([0x45,0x53,0x32,0x35,0x36])},_0x3c9df4=_0x5efcee[_0x4ba973([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4ba973([0x67,0x65,0x74])](_0x4ba973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x90bdc4(){let _0x5bd36,_0x258007=null,_0x269b0c=null;try{if(_0x3c9df4==_0x4ba973([0x47,0x50,0x4c]))return _0x4ba973([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5bd36=_0x240309(),!_0x5bd36)return _0x4ba973([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5bd36[_0x4ba973([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x269b0c=_0x27592c(_0x5bd36[_0x4ba973([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5bd36[_0x4ba973([0x6a,0x74,0x69])])),await _0x45a5c8()?_0x34a56d()?_0x5939af()?_0x4ba973([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5c71b7()?(_0x5bd36[_0x4ba973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ba973([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x258007=_0x5b6a7d(_0x4ba973([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5bd36[_0x4ba973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ba973([0x74,0x72,0x69,0x61,0x6c])&&(_0x258007=_0x5b6a7d(_0x4ba973([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5e2baf()):_0x4ba973([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4ba973([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4ba973([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4ba973([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5939af(){const _0xdd90fe=[_0x4ba973([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4ba973([0x74,0x72,0x69,0x61,0x6c])][_0x4ba973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5bd36[_0x4ba973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x455390/0x3e8:0xe10*_0x454abf;return _0x5bd36[_0x4ba973([0x65,0x78,0x70])]<_0xdd90fe;}function _0x34a56d(){const _0x1ffb6b=_0x5bd36[_0x4ba973([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1ffb6b&&(!!_0x1ffb6b[_0x4ba973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ba973([0x2a]))||!!_0x1ffb6b[_0x4ba973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ba973([0x55,0x50,0x4c,0x43])));}function _0x5c71b7(){const _0x42d120=_0x1670,_0x2c948e=_0x5bd36[_0x4ba973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2c948e||0x0==_0x2c948e[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x249caf}=new URL(window[_0x4ba973([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x42d120(0x1eb)]);if(_0x2c948e[_0x4ba973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x249caf))return!0x0;const _0x46b09c=_0x249caf[_0x4ba973([0x73,0x70,0x6c,0x69,0x74])](_0x4ba973([0x2e]));return _0x2c948e[_0x4ba973([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x57464d=>_0x57464d[_0x4ba973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ba973([0x2a])))[_0x4ba973([0x6d,0x61,0x70])](_0x7269cf=>_0x7269cf[_0x4ba973([0x73,0x70,0x6c,0x69,0x74])](_0x4ba973([0x2e])))[_0x4ba973([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2aef1b=>_0x2aef1b[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x46b09c[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4ba973([0x6d,0x61,0x70])](_0x3c78c5=>Array(_0x46b09c[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3c78c5[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4ba973([0x66,0x69,0x6c,0x6c])](_0x3c78c5[0x0]===_0x4ba973([0x2a])?_0x4ba973([0x2a]):'')[_0x4ba973([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3c78c5))[_0x4ba973([0x73,0x6f,0x6d,0x65])](_0x1bb0e7=>_0x46b09c[_0x4ba973([0x65,0x76,0x65,0x72,0x79])]((_0x1cacf8,_0x252df5)=>_0x1bb0e7[_0x252df5]===_0x1cacf8||_0x1bb0e7[_0x252df5]===_0x4ba973([0x2a])));}function _0x5e2baf(){return _0x258007&&_0x269b0c?new window[(_0x4ba973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x50aa7c,_0x2a4c0a)=>{_0x258007[_0x4ba973([0x74,0x68,0x65,0x6e])](_0x50aa7c,_0x2a4c0a),_0x269b0c[_0x4ba973([0x74,0x68,0x65,0x6e])](_0x311e3b=>{_0x311e3b!=_0x4ba973([0x56,0x61,0x6c,0x69,0x64])&&_0x50aa7c(_0x311e3b);},_0x2a4c0a);}):_0x258007||_0x269b0c||_0x4ba973([0x56,0x61,0x6c,0x69,0x64]);}}function _0x27592c(_0x517b05,_0x264bd6){return new window[(_0x4ba973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x46d38e=>{if(_0x504481())return _0x46d38e(_0x4ba973([0x56,0x61,0x6c,0x69,0x64]));_0x1bf07d(),_0x5efcee[_0x4ba973([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4ba973([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x374c9a=!0x1;const _0x58e376=_0x1f8674();function _0x3178a9(_0x3bbfb2){return!!_0x3bbfb2&&(typeof _0x3bbfb2===_0x4ba973([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3bbfb2===_0x4ba973([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3bbfb2[_0x4ba973([0x74,0x68,0x65,0x6e])]===_0x4ba973([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3bbfb2[_0x4ba973([0x63,0x61,0x74,0x63,0x68])]===_0x4ba973([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x160843(_0x5cc0ee){_0x500209(_0x5cc0ee)[_0x4ba973([0x74,0x68,0x65,0x6e])](_0x29a76a=>{if(!_0x29a76a||_0x29a76a[_0x4ba973([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4ba973([0x6f,0x6b]))return _0x4ba973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2439f8(_0x429a62(_0x58e376+_0x264bd6))!=_0x29a76a[_0x4ba973([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4ba973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4ba973([0x56,0x61,0x6c,0x69,0x64]);})[_0x4ba973([0x74,0x68,0x65,0x6e])](_0x4f9311=>(_0x381a7e(),_0x4f9311),()=>{const _0x9de9e=_0x17ece1();return null==_0x9de9e?(_0x381a7e(),_0x4ba973([0x56,0x61,0x6c,0x69,0x64])):_0x4ba973(_0x455390-_0x9de9e>(0x27d454df^_0x332de8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4ba973([0x74,0x68,0x65,0x6e])](_0x46d38e)[_0x4ba973([0x63,0x61,0x74,0x63,0x68])](()=>{_0x46d38e(_0x4ba973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x6de048=0x3ee3e5f^_0x332de8;function _0x381a7e(){const _0x2aaa97=_0x4ba973([0x6c,0x6c,0x63,0x74,0x2d])+_0x2439f8(_0x429a62(_0x517b05)),_0x369d3f=_0x280870(_0x2439f8(window[_0x4ba973([0x4d,0x61,0x74,0x68])][_0x4ba973([0x63,0x65,0x69,0x6c])](_0x455390/_0x6de048)));window[_0x4ba973([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ba973([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2aaa97,_0x369d3f);}function _0x17ece1(){const _0x12577d=_0x4ba973([0x6c,0x6c,0x63,0x74,0x2d])+_0x2439f8(_0x429a62(_0x517b05)),_0x4c7cb2=window[_0x4ba973([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ba973([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x12577d);return _0x4c7cb2?window[_0x4ba973([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x280870(_0x4c7cb2),0x10)*_0x6de048:null;}function _0x500209(_0xbae7e0){return new window[(_0x4ba973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1bfb94,_0x57c265)=>{_0xbae7e0[_0x4ba973([0x74,0x68,0x65,0x6e])](_0x1bfb94,_0x57c265),window[_0x4ba973([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x57c265,0x3d9041f^_0x332de8);});}}_0x5efcee[_0x4ba973([0x6f,0x6e])](_0x4ba973([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x6f2808,_0x17305a)=>{if(_0x17305a[0x0]!=_0x517b05)return _0x46d38e(_0x4ba973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x17305a[0x1]={..._0x17305a[0x1],[_0x4ba973([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x58e376};},{[_0x4ba973([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ba973([0x68,0x69,0x67,0x68])}),_0x5efcee[_0x4ba973([0x6f,0x6e])](_0x4ba973([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1ae7f9=>{_0x3178a9(_0x1ae7f9[_0x4ba973([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x374c9a=!0x0,_0x160843(_0x1ae7f9[_0x4ba973([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4ba973([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ba973([0x6c,0x6f,0x77])}),_0x1fbd28[_0x4ba973([0x74,0x68,0x65,0x6e])](()=>{_0x374c9a||_0x46d38e(_0x4ba973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x504481(){return _0x5efcee[_0x4ba973([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ba973([0x76,0x69,0x65,0x77])][_0x4ba973([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4ba973([0x61,0x75,0x74,0x6f]);}function _0x1bf07d(){_0x5efcee[_0x4ba973([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ba973([0x76,0x69,0x65,0x77])][_0x4ba973([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4ba973([0x61,0x75,0x74,0x6f]);}}function _0x5b6a7d(_0x1a0718){const _0xa86f8b=[new window[(_0x4ba973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5cfcc2=>setTimeout(_0x5cfcc2,0x3d1ee13^_0x332de8)),_0x1fbd28[_0x4ba973([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4ba973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xaaeaa7=>{let _0x579c31=0x0;_0x5efcee[_0x4ba973([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ba973([0x6f,0x6e])](_0x4ba973([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x460b06,_0x56bc88)=>{_0x56bc88[0x0][_0x4ba973([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x579c31++,_0x579c31==(0x3d8d127^_0x332de8)&&(_0xaaeaa7(),_0x460b06[_0x4ba973([0x6f,0x66,0x66])]());});}))];return window[_0x4ba973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4ba973([0x72,0x61,0x63,0x65])](_0xa86f8b)[_0x4ba973([0x74,0x68,0x65,0x6e])](()=>_0x1a0718);}async function _0x3c1eeb(){await _0x1fbd28,_0x5efcee[_0x4ba973([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ba973([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x54dd97,_0x5efcee[_0x4ba973([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ba973([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x54dd97,_0x5efcee[_0x4ba973([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4ba973([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x392ec0(_0x251907){const _0x9dd6aa=_0x381ea9();_0x5efcee[_0x9dd6aa]=_0x4ba973([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x251907,_0x251907!=_0x4ba973([0x56,0x61,0x6c,0x69,0x64])&&_0x3c1eeb();}function _0x381ea9(){const _0x5a00ff=window[_0x4ba973([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4ba973([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4ba973([0x6e,0x6f,0x77])]())[_0x4ba973([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4ba973([0x2e]),'');let _0x57a680=_0x4ba973([0x52]);for(let _0x12708e=0x0;_0x12708e<_0x5a00ff[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x12708e+=0x2){let _0x5809b7=window[_0x4ba973([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a00ff[_0x4ba973([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x12708e,_0x12708e+0x2));_0x5809b7>=_0x592258[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5809b7-=_0x592258[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x57a680+=_0x592258[_0x5809b7];}return _0x57a680;}function _0x240309(){const _0x3b08cb=_0x3c9df4[_0x4ba973([0x73,0x70,0x6c,0x69,0x74])](_0x4ba973([0x2e]));if(0x3!=_0x3b08cb[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2a85a6(_0x3b08cb[0x1]);function _0x2a85a6(_0x37ebc4){const _0x45c83b=_0x202e68(_0x37ebc4);return _0x45c83b&&_0x4eff9a()?_0x45c83b:null;function _0x4eff9a(){const _0x56f81f=_0x45c83b[_0x4ba973([0x6a,0x74,0x69])],_0x2192c6=window[_0x4ba973([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x56f81f[_0x4ba973([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x56f81f[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x28d6c2={..._0x45c83b,[_0x4ba973([0x6a,0x74,0x69])]:_0x56f81f[_0x4ba973([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x56f81f[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x28d6c2[_0x4ba973([0x76,0x63])],_0x429a62(_0x28d6c2)==_0x2192c6;}}}async function _0x45a5c8(){let _0x3be084=!0x0;try{const _0x2eaee5=_0x3c9df4[_0x4ba973([0x73,0x70,0x6c,0x69,0x74])](_0x4ba973([0x2e])),[_0xe23905,_0xf45086,_0x26814d]=_0x2eaee5;return _0xe41794(_0xe23905),await _0xe3e5d2(_0xe23905,_0xf45086,_0x26814d),_0x3be084;}catch{return!0x1;}function _0xe41794(_0x8fb99){const _0x478c3d=_0x202e68(_0x8fb99);_0x478c3d&&_0x478c3d[_0x4ba973([0x61,0x6c,0x67])]==_0x4ba973([0x45,0x53,0x32,0x35,0x36])||(_0x3be084=!0x1);}async function _0xe3e5d2(_0x26d6da,_0x1ac0a9,_0x5d354c){const _0x3d1c04=window[_0x4ba973([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4ba973([0x66,0x72,0x6f,0x6d])](_0x2a1a3a(_0x5d354c),_0x16f99a=>_0x16f99a[_0x4ba973([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5efb7d=new window[(_0x4ba973([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4ba973([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x26d6da+_0x4ba973([0x2e])+_0x1ac0a9),_0x3c979f=window[_0x4ba973([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4ba973([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3c979f)return;const _0x1166da=await _0x3c979f[_0x4ba973([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4ba973([0x6a,0x77,0x6b]),_0x296b91,{[_0x4ba973([0x6e,0x61,0x6d,0x65])]:_0x4ba973([0x45,0x43,0x44,0x53,0x41]),[_0x4ba973([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4ba973([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4ba973([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3c979f[_0x4ba973([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4ba973([0x6e,0x61,0x6d,0x65])]:_0x4ba973([0x45,0x43,0x44,0x53,0x41]),[_0x4ba973([0x68,0x61,0x73,0x68])]:{[_0x4ba973([0x6e,0x61,0x6d,0x65])]:_0x4ba973([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1166da,_0x3d1c04,_0x5efb7d)||(_0x3be084=!0x1);}}function _0x202e68(_0x371723){return _0x371723[_0x4ba973([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4ba973([0x65,0x79]))?JSON[_0x4ba973([0x70,0x61,0x72,0x73,0x65])](_0x2a1a3a(_0x371723)):null;}function _0x2a1a3a(_0x4d0315){return window[_0x4ba973([0x61,0x74,0x6f,0x62])](_0x4d0315[_0x4ba973([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4ba973([0x2b]))[_0x4ba973([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4ba973([0x2f])));}function _0x429a62(_0x53c7ee){let _0x2d6cfc=0x1505;function _0x245ae0(_0x23d0b1){for(let _0x3798eb=0x0;_0x3798eb<_0x23d0b1[_0x4ba973([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3798eb++){const _0x4c6fc7=_0x23d0b1[_0x4ba973([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3798eb);_0x2d6cfc=(_0x2d6cfc<<0x5)+_0x2d6cfc+_0x4c6fc7,_0x2d6cfc&=_0x2d6cfc;}}function _0x2e8c97(_0x3832cc){Array[_0x4ba973([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3832cc)?_0x3832cc[_0x4ba973([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2e8c97):_0x3832cc&&typeof _0x3832cc==_0x4ba973([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4ba973([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3832cc)[_0x4ba973([0x73,0x6f,0x72,0x74])]()[_0x4ba973([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x43b40e,_0xbaf75f])=>{_0x245ae0(_0x43b40e),_0x2e8c97(_0xbaf75f);}):_0x245ae0(window[_0x4ba973([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3832cc));}return _0x2e8c97(_0x53c7ee),_0x2d6cfc>>>0x0;}function _0x2439f8(_0x1e17d5){return _0x1e17d5[_0x4ba973([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4ba973([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4ba973([0x30]));}function _0x280870(_0x2da17c){return _0x2da17c[_0x4ba973([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4ba973([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4ba973([0x6a,0x6f,0x69,0x6e])]('');}function _0x54dd97(){}function _0x4ba973(_0x5d4d57){const _0x4ea150=_0x1670;return _0x5d4d57[_0x4ea150(0x1ea)](_0x250680=>String[_0x4ea150(0x1c5)](_0x250680))[_0x4ea150(0x1be)]('');}_0x392ec0(await _0x90bdc4());}(this);}[_0x515179(0x1c3)](){const _0x2d37b1=_0x515179,_0x1a929b=this[_0x2d37b1(0x1db)][_0x2d37b1(0x1d1)][_0x2d37b1(0x1c1)];_0x1a929b[_0x2d37b1(0x1fa)](_0x2d37b1(0x1fb))&&_0x1a929b[_0x2d37b1(0x208)](_0x2d37b1(0x1fb),{'allowAttributes':[_0x2d37b1(0x1d2)]}),_0x1a929b[_0x2d37b1(0x1fa)](_0x2d37b1(0x1c9))&&_0x1a929b[_0x2d37b1(0x208)](_0x2d37b1(0x1c9),{'allowAttributes':[_0x2d37b1(0x1d2)]});}[_0x515179(0x1e8)](){const _0x33bc19=_0x515179,_0x2e2f1d=this[_0x33bc19(0x1db)];_0x2e2f1d[_0x33bc19(0x1cd)][_0x33bc19(0x1e5)](_0x33bc19(0x1f5))[_0x33bc19(0x1cc)]({'model':_0x33bc19(0x1d2),'view':_0x33bc19(0x1f2)}),_0x2e2f1d[_0x33bc19(0x1cd)][_0x33bc19(0x1e5)](_0x33bc19(0x1dd))[_0x33bc19(0x1bc)]({'model':{'key':_0x33bc19(0x1d2),'value':_0x24e037=>_0x24e037[_0x33bc19(0x202)](_0x33bc19(0x1f2))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x360eb9=_0x2e2f1d[_0x33bc19(0x1b3)][_0x33bc19(0x1bd)](_0x33bc19(0x201));_0x360eb9&&this[_0x33bc19(0x1cf)](_0x360eb9,_0x33bc19(0x1ee),(_0x4efa09,[_0x5b753e,_0x5322cd])=>{const _0x4dcf77=_0x33bc19;_0x5b753e[_0x4dcf77(0x1e7)](_0x4dcf77(0x1d2),_0x5322cd);});}[_0x515179(0x205)](){const _0x4f3972=_0x515179,_0x2a6f63=this[_0x4f3972(0x1db)][_0x4f3972(0x1dc)][_0x4f3972(0x1bd)](_0x4f3972(0x1da))||{},_0x14811d=this[_0x4f3972(0x1db)][_0x4f3972(0x1dc)][_0x4f3972(0x1bd)](_0x4f3972(0x1fe))||'';this[_0x4f3972(0x1e6)]=_0x91ffd8(_0x566566[_0x4f3972(0x1ec)],_0x4f3972(0x1c0),{..._0x2a6f63,'pubkey':_0x14811d,'ctx-name':_0x4f3972(0x1b6)+this[_0x4f3972(0x1f3)],'sourceList':'','imgOnly':_0x4f3972(0x1d9),'removeCopyright':_0x4f3972(0x1d9),'localeName':this[_0x4f3972(0x1db)][_0x4f3972(0x1bb)][_0x4f3972(0x1ba)],'externalSourcesEmbedCss':_0x4f3972(0x1e4)}),this[_0x4f3972(0x1e6)][_0x4f3972(0x1c7)]=_0x7840d7=>{const _0x7d3ff0=_0x4f3972;if(_0x7d3ff0(0x1f8)==_0x7840d7)return _0x7d3ff0(0x1b7);},_0x566566[_0x4f3972(0x1ec)][_0x4f3972(0x1f0)][_0x4f3972(0x1d3)](this[_0x4f3972(0x1e6)]);}[_0x515179(0x1b8)](){const _0x3e912c=_0x515179;this[_0x3e912c(0x1b4)]=_0x91ffd8(_0x566566[_0x3e912c(0x1ec)],_0x3e912c(0x207),{'ctx-name':_0x3e912c(0x1b6)+this[_0x3e912c(0x1f3)]}),_0x566566[_0x3e912c(0x1ec)][_0x3e912c(0x1f0)][_0x3e912c(0x1d3)](this[_0x3e912c(0x1b4)]);}[_0x515179(0x1d5)](){const _0x4d230f=_0x515179,_0x139a06=this[_0x4d230f(0x1db)][_0x4d230f(0x1b3)][_0x4d230f(0x1bd)](_0x4d230f(0x1e0));_0x139a06&&this[_0x4d230f(0x1cf)](_0x139a06,_0x4d230f(0x1c4),()=>{const _0xb3e925=_0x4d230f,_0x1e7f49=this[_0xb3e925(0x1db)][_0xb3e925(0x1d1)][_0xb3e925(0x1ec)][_0xb3e925(0x1d7)][_0xb3e925(0x1d8)]();_0x1e7f49&&_0x1e7f49[_0xb3e925(0x202)](_0xb3e925(0x1d2))&&this[_0xb3e925(0x1db)][_0xb3e925(0x1d0)][_0xb3e925(0x1b9)][_0xb3e925(0x1ef)](_0xb3e925(0x1c6),()=>{const _0xb5db35=_0xb3e925;_0xc436b0(this[_0xb5db35(0x1db)],_0x1e7f49);});});const _0x5e012a=this[_0x4d230f(0x1db)][_0x4d230f(0x1b3)][_0x4d230f(0x1bd)](_0x4d230f(0x1ce));_0x5e012a&&this[_0x4d230f(0x1cf)](_0x5e012a,_0x4d230f(0x1c4),()=>{const _0x7f6987=_0x4d230f,_0x19931c=this[_0x7f6987(0x1db)][_0x7f6987(0x1d1)][_0x7f6987(0x1ec)][_0x7f6987(0x1d7)][_0x7f6987(0x1d8)]();_0x19931c&&_0x19931c[_0x7f6987(0x202)](_0x7f6987(0x1d2))&&this[_0x7f6987(0x1db)][_0x7f6987(0x1d0)][_0x7f6987(0x1b9)][_0x7f6987(0x1ef)](_0x7f6987(0x1c6),()=>{const _0x26874b=_0x7f6987;_0xc436b0(this[_0x26874b(0x1db)],_0x19931c);});});}}
23
+ function _0x4329(_0x114b52,_0x5be498){const _0x44ed88=_0x44ed();return _0x4329=function(_0x432975,_0x191804){_0x432975=_0x432975-0x184;let _0x3744df=_0x44ed88[_0x432975];return _0x3744df;},_0x4329(_0x114b52,_0x5be498);}const _0x266ee0=_0x4329;(function(_0x593d97,_0x33a001){const _0x1c2e60=_0x4329,_0x363f00=_0x593d97();while(!![]){try{const _0x58f651=-parseInt(_0x1c2e60(0x187))/0x1+parseInt(_0x1c2e60(0x1bc))/0x2*(parseInt(_0x1c2e60(0x184))/0x3)+parseInt(_0x1c2e60(0x193))/0x4*(parseInt(_0x1c2e60(0x1c1))/0x5)+-parseInt(_0x1c2e60(0x1ab))/0x6*(-parseInt(_0x1c2e60(0x1c7))/0x7)+-parseInt(_0x1c2e60(0x1c2))/0x8*(parseInt(_0x1c2e60(0x186))/0x9)+-parseInt(_0x1c2e60(0x1cc))/0xa+parseInt(_0x1c2e60(0x1a8))/0xb;if(_0x58f651===_0x33a001)break;else _0x363f00['push'](_0x363f00['shift']());}catch(_0x569fff){_0x363f00['push'](_0x363f00['shift']());}}}(_0x44ed,0xc5957));import{Plugin as _0x202095}from'ckeditor5/src/core.js';import{Dialog as _0x162fd0}from'ckeditor5/src/ui.js';import{createElement as _0x4580e8,global as _0x333496,uid as _0x12626e}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x2edd42}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x2d127f}from'./uploadcareuploadadapter.js';function _0x44ed(){const _0x9dbc09=['ctxElement','execute','appendChild','uc-config','replaceImageSource','uploadcare.uploader','1093066dMzTCu','isOfficialPlugin','isPremiumPlugin','_ctxElement','selection','365JAterS','2928uWJRJa','isRegistered','#uc-icon-arrow-down','requires','config','259zZYUnU','ucContextId','imageBlock','removeAttribute','document','10869780wIopLI','_initConfig','map','view','get','add','join','listenTo','commands','once','init','iconHrefResolver','input[uploadcare-file-input]','uploadcare.pubkey','3AppPhV','extend','37404AtpMqf','748244EZwxUy','uploader-','render','imageInline','querySelector','cleanupImage','_initConversion','UploadcareEditing','elementToAttribute','afterInit','fromCharCode','data-uc-image-id','85456FNdRAp','remove','insertImage','contentLanguage','for','editor','locale','\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','model','body','PictureEditing','upcast','destroy','uploadcare','pluginName','uploadcareImageReplace','schema','configElement','_initImageProcessingIndicator','getSelectedElement','closeMax','18457285DnAArN','_configElement','uploadcareImageId','61878KyJPTc','_initCtx','editing','_initSchema','true','downcast','attributeToAttribute','href','getAttribute','uc-upload-ctx-provider','conversion'];_0x44ed=function(){return _0x9dbc09;};return _0x44ed();}import{showImageProcessingIndicator as _0x4677bf}from'./utils/editingutils.js';export class UploadcareEditing extends _0x202095{[_0x266ee0(0x1a9)]=null;[_0x266ee0(0x1bf)]=null;static get[_0x266ee0(0x1a1)](){const _0x56e46d=_0x266ee0;return _0x56e46d(0x18e);}static get[_0x266ee0(0x1c5)](){const _0x3e327c=_0x266ee0;return[_0x3e327c(0x19d),_0x2d127f,_0x162fd0];}static get[_0x266ee0(0x1bd)](){return!0x0;}static get[_0x266ee0(0x1be)](){return!0x0;}[_0x266ee0(0x1c8)];get[_0x266ee0(0x1a4)](){const _0x1402c4=_0x266ee0;return this[_0x1402c4(0x1a9)];}get[_0x266ee0(0x1b6)](){const _0x219aff=_0x266ee0;return this[_0x219aff(0x1bf)];}constructor(_0x2b624e){const _0x1a5f05=_0x266ee0;super(_0x2b624e),this[_0x1a5f05(0x1c8)]=_0x12626e();}[_0x266ee0(0x1d6)](){const _0x264bfd=_0x266ee0,_0xe275ff=this[_0x264bfd(0x198)];_0xe275ff[_0x264bfd(0x1d4)][_0x264bfd(0x1d1)](_0x264bfd(0x1a0),new _0x2edd42(_0xe275ff));}[_0x266ee0(0x190)](){const _0x2b0ea4=_0x266ee0;this[_0x2b0ea4(0x1ae)](),this[_0x2b0ea4(0x18d)](),this[_0x2b0ea4(0x1cd)](),this[_0x2b0ea4(0x1ac)](),this[_0x2b0ea4(0x1a5)](),this[_0x2b0ea4(0x1d3)](this[_0x2b0ea4(0x198)],_0x2b0ea4(0x19f),()=>{const _0x17dca9=_0x2b0ea4;this[_0x17dca9(0x1a9)]&&(this[_0x17dca9(0x1a9)][_0x17dca9(0x194)](),this[_0x17dca9(0x1a9)]=null),this[_0x17dca9(0x1bf)]&&(this[_0x17dca9(0x1bf)][_0x17dca9(0x194)](),this[_0x17dca9(0x1bf)]=null);const _0x3fcec7=_0x333496[_0x17dca9(0x1cb)][_0x17dca9(0x18b)](_0x17dca9(0x1d8));_0x3fcec7&&_0x3fcec7[_0x17dca9(0x194)]();}),async function(_0x1b5802){const _0x14eefa=_0x9eea5b([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x45391a=0x3d8d0df,_0x40942e=0x3dfa1a7^_0x45391a,_0x31d089=window[_0x9eea5b([0x44,0x61,0x74,0x65])][_0x9eea5b([0x6e,0x6f,0x77])](),_0x315cf7=_0x1b5802[_0x9eea5b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x388bb5=new window[(_0x9eea5b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c1b11=>{_0x315cf7[_0x9eea5b([0x6f,0x6e,0x63,0x65])](_0x9eea5b([0x72,0x65,0x61,0x64,0x79]),_0x4c1b11);}),_0x208881={[_0x9eea5b([0x6b,0x74,0x79])]:_0x9eea5b([0x45,0x43]),[_0x9eea5b([0x75,0x73,0x65])]:_0x9eea5b([0x73,0x69,0x67]),[_0x9eea5b([0x63,0x72,0x76])]:_0x9eea5b([0x50,0x2d,0x32,0x35,0x36]),[_0x9eea5b([0x78])]:_0x9eea5b([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]),[_0x9eea5b([0x79])]:_0x9eea5b([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]),[_0x9eea5b([0x61,0x6c,0x67])]:_0x9eea5b([0x45,0x53,0x32,0x35,0x36])},_0x2af6f4=_0x315cf7[_0x9eea5b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x9eea5b([0x67,0x65,0x74])](_0x9eea5b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1e925f(){let _0x2dc88a,_0x307f66=null,_0x174657=null;try{if(_0x2af6f4==_0x9eea5b([0x47,0x50,0x4c]))return _0x9eea5b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2dc88a=_0x10c172(),!_0x2dc88a)return _0x9eea5b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2dc88a[_0x9eea5b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x174657=_0x3e9c38(_0x2dc88a[_0x9eea5b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2dc88a[_0x9eea5b([0x6a,0x74,0x69])])),await _0x537000()?_0x275e63()?_0x520edd()?_0x9eea5b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x25f4bb()?(_0x2dc88a[_0x9eea5b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x9eea5b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x307f66=_0x242597(_0x9eea5b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2dc88a[_0x9eea5b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x9eea5b([0x74,0x72,0x69,0x61,0x6c])&&(_0x307f66=_0x242597(_0x9eea5b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2458f2()):_0x9eea5b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x9eea5b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x9eea5b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x9eea5b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x520edd(){const _0x53c010=[_0x9eea5b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x9eea5b([0x74,0x72,0x69,0x61,0x6c])][_0x9eea5b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dc88a[_0x9eea5b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x31d089/0x3e8:0xe10*_0x40942e;return _0x2dc88a[_0x9eea5b([0x65,0x78,0x70])]<_0x53c010;}function _0x275e63(){const _0x56f803=_0x2dc88a[_0x9eea5b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x56f803&&(!!_0x56f803[_0x9eea5b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9eea5b([0x2a]))||!!_0x56f803[_0x9eea5b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9eea5b([0x55,0x50,0x4c,0x43])));}function _0x25f4bb(){const _0x37c26e=_0x4329,_0x297bd4=_0x2dc88a[_0x9eea5b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x297bd4||0x0==_0x297bd4[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x25748a}=new URL(window[_0x9eea5b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x37c26e(0x1b2)]);if(_0x297bd4[_0x9eea5b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25748a))return!0x0;const _0x3f50af=_0x25748a[_0x9eea5b([0x73,0x70,0x6c,0x69,0x74])](_0x9eea5b([0x2e]));return _0x297bd4[_0x9eea5b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x29f484=>_0x29f484[_0x9eea5b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9eea5b([0x2a])))[_0x9eea5b([0x6d,0x61,0x70])](_0x4384b8=>_0x4384b8[_0x9eea5b([0x73,0x70,0x6c,0x69,0x74])](_0x9eea5b([0x2e])))[_0x9eea5b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x329bb9=>_0x329bb9[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3f50af[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x9eea5b([0x6d,0x61,0x70])](_0x42aae7=>Array(_0x3f50af[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x42aae7[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x9eea5b([0x66,0x69,0x6c,0x6c])](_0x42aae7[0x0]===_0x9eea5b([0x2a])?_0x9eea5b([0x2a]):'')[_0x9eea5b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x42aae7))[_0x9eea5b([0x73,0x6f,0x6d,0x65])](_0xa93200=>_0x3f50af[_0x9eea5b([0x65,0x76,0x65,0x72,0x79])]((_0x3d3a19,_0xa88f43)=>_0xa93200[_0xa88f43]===_0x3d3a19||_0xa93200[_0xa88f43]===_0x9eea5b([0x2a])));}function _0x2458f2(){return _0x307f66&&_0x174657?new window[(_0x9eea5b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x562721,_0x4e3654)=>{_0x307f66[_0x9eea5b([0x74,0x68,0x65,0x6e])](_0x562721,_0x4e3654),_0x174657[_0x9eea5b([0x74,0x68,0x65,0x6e])](_0x2a733b=>{_0x2a733b!=_0x9eea5b([0x56,0x61,0x6c,0x69,0x64])&&_0x562721(_0x2a733b);},_0x4e3654);}):_0x307f66||_0x174657||_0x9eea5b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3e9c38(_0x9aa2ba,_0x3c03db){return new window[(_0x9eea5b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5238a4=>{if(_0x52471b())return _0x5238a4(_0x9eea5b([0x56,0x61,0x6c,0x69,0x64]));_0x55d93e(),_0x315cf7[_0x9eea5b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x9eea5b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2fa6ea=!0x1;const _0x41ebba=_0x12626e();function _0x2391ab(_0x5a2a94){return!!_0x5a2a94&&(typeof _0x5a2a94===_0x9eea5b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5a2a94===_0x9eea5b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5a2a94[_0x9eea5b([0x74,0x68,0x65,0x6e])]===_0x9eea5b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5a2a94[_0x9eea5b([0x63,0x61,0x74,0x63,0x68])]===_0x9eea5b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2a813a(_0x4e93ad){_0x25150c(_0x4e93ad)[_0x9eea5b([0x74,0x68,0x65,0x6e])](_0x2cc89f=>{if(!_0x2cc89f||_0x2cc89f[_0x9eea5b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x9eea5b([0x6f,0x6b]))return _0x9eea5b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x181bef(_0x14efdf(_0x41ebba+_0x3c03db))!=_0x2cc89f[_0x9eea5b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x9eea5b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x9eea5b([0x56,0x61,0x6c,0x69,0x64]);})[_0x9eea5b([0x74,0x68,0x65,0x6e])](_0x339ff9=>(_0x2a8b6d(),_0x339ff9),()=>{const _0x1b104d=_0x218607();return null==_0x1b104d?(_0x2a8b6d(),_0x9eea5b([0x56,0x61,0x6c,0x69,0x64])):_0x9eea5b(_0x31d089-_0x1b104d>(0x27d454df^_0x45391a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x9eea5b([0x74,0x68,0x65,0x6e])](_0x5238a4)[_0x9eea5b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5238a4(_0x9eea5b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x44f428=0x3ee3e5f^_0x45391a;function _0x2a8b6d(){const _0x4ae5a7=_0x9eea5b([0x6c,0x6c,0x63,0x74,0x2d])+_0x181bef(_0x14efdf(_0x9aa2ba)),_0x4e54ec=_0x33dd14(_0x181bef(window[_0x9eea5b([0x4d,0x61,0x74,0x68])][_0x9eea5b([0x63,0x65,0x69,0x6c])](_0x31d089/_0x44f428)));window[_0x9eea5b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x9eea5b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4ae5a7,_0x4e54ec);}function _0x218607(){const _0xc0c80=_0x9eea5b([0x6c,0x6c,0x63,0x74,0x2d])+_0x181bef(_0x14efdf(_0x9aa2ba)),_0x474170=window[_0x9eea5b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x9eea5b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xc0c80);return _0x474170?window[_0x9eea5b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x33dd14(_0x474170),0x10)*_0x44f428:null;}function _0x25150c(_0x1465c1){return new window[(_0x9eea5b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x56313f,_0x3d4a1d)=>{_0x1465c1[_0x9eea5b([0x74,0x68,0x65,0x6e])](_0x56313f,_0x3d4a1d),window[_0x9eea5b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3d4a1d,0x3d9041f^_0x45391a);});}}_0x315cf7[_0x9eea5b([0x6f,0x6e])](_0x9eea5b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x49066a,_0x57768b)=>{if(_0x57768b[0x0]!=_0x9aa2ba)return _0x5238a4(_0x9eea5b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x57768b[0x1]={..._0x57768b[0x1],[_0x9eea5b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x41ebba};},{[_0x9eea5b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x9eea5b([0x68,0x69,0x67,0x68])}),_0x315cf7[_0x9eea5b([0x6f,0x6e])](_0x9eea5b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x553900=>{_0x2391ab(_0x553900[_0x9eea5b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2fa6ea=!0x0,_0x2a813a(_0x553900[_0x9eea5b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x9eea5b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x9eea5b([0x6c,0x6f,0x77])}),_0x388bb5[_0x9eea5b([0x74,0x68,0x65,0x6e])](()=>{_0x2fa6ea||_0x5238a4(_0x9eea5b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52471b(){return _0x315cf7[_0x9eea5b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x9eea5b([0x76,0x69,0x65,0x77])][_0x9eea5b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x9eea5b([0x61,0x75,0x74,0x6f]);}function _0x55d93e(){_0x315cf7[_0x9eea5b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x9eea5b([0x76,0x69,0x65,0x77])][_0x9eea5b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x9eea5b([0x61,0x75,0x74,0x6f]);}}function _0x242597(_0x24392d){const _0x577e45=[new window[(_0x9eea5b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ef0c5=>setTimeout(_0x5ef0c5,0x3d1ee13^_0x45391a)),_0x388bb5[_0x9eea5b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x9eea5b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x7820f8=>{let _0x38264d=0x0;_0x315cf7[_0x9eea5b([0x6d,0x6f,0x64,0x65,0x6c])][_0x9eea5b([0x6f,0x6e])](_0x9eea5b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1f0100,_0x557173)=>{_0x557173[0x0][_0x9eea5b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x38264d++,_0x38264d==(0x3d8d127^_0x45391a)&&(_0x7820f8(),_0x1f0100[_0x9eea5b([0x6f,0x66,0x66])]());});}))];return window[_0x9eea5b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x9eea5b([0x72,0x61,0x63,0x65])](_0x577e45)[_0x9eea5b([0x74,0x68,0x65,0x6e])](()=>_0x24392d);}async function _0x305f8a(){await _0x388bb5,_0x315cf7[_0x9eea5b([0x6d,0x6f,0x64,0x65,0x6c])][_0x9eea5b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x124915,_0x315cf7[_0x9eea5b([0x6d,0x6f,0x64,0x65,0x6c])][_0x9eea5b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x124915,_0x315cf7[_0x9eea5b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x9eea5b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4d3810(_0x531d6a){const _0x663e12=_0x414530();_0x315cf7[_0x663e12]=_0x9eea5b([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x531d6a,_0x531d6a!=_0x9eea5b([0x56,0x61,0x6c,0x69,0x64])&&_0x305f8a();}function _0x414530(){const _0x4f30c4=window[_0x9eea5b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x9eea5b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x9eea5b([0x6e,0x6f,0x77])]())[_0x9eea5b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x9eea5b([0x2e]),'');let _0x33d9de=_0x9eea5b([0x52]);for(let _0x3d2825=0x0;_0x3d2825<_0x4f30c4[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d2825+=0x2){let _0x491f7d=window[_0x9eea5b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f30c4[_0x9eea5b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d2825,_0x3d2825+0x2));_0x491f7d>=_0x14eefa[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x491f7d-=_0x14eefa[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x33d9de+=_0x14eefa[_0x491f7d];}return _0x33d9de;}function _0x10c172(){const _0x5c81d4=_0x2af6f4[_0x9eea5b([0x73,0x70,0x6c,0x69,0x74])](_0x9eea5b([0x2e]));if(0x3!=_0x5c81d4[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3980ef(_0x5c81d4[0x1]);function _0x3980ef(_0x10d12b){const _0x58ca75=_0x1f321b(_0x10d12b);return _0x58ca75&&_0x56eab5()?_0x58ca75:null;function _0x56eab5(){const _0x1ccfdc=_0x58ca75[_0x9eea5b([0x6a,0x74,0x69])],_0x22cb4b=window[_0x9eea5b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ccfdc[_0x9eea5b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ccfdc[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2ae304={..._0x58ca75,[_0x9eea5b([0x6a,0x74,0x69])]:_0x1ccfdc[_0x9eea5b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1ccfdc[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2ae304[_0x9eea5b([0x76,0x63])],_0x14efdf(_0x2ae304)==_0x22cb4b;}}}async function _0x537000(){let _0x58acf3=!0x0;try{const _0xa7150e=_0x2af6f4[_0x9eea5b([0x73,0x70,0x6c,0x69,0x74])](_0x9eea5b([0x2e])),[_0xae26b4,_0x26ade4,_0x19b5db]=_0xa7150e;return _0x1ee9ce(_0xae26b4),await _0x57c97b(_0xae26b4,_0x26ade4,_0x19b5db),_0x58acf3;}catch{return!0x1;}function _0x1ee9ce(_0x16e31a){const _0x3d6212=_0x1f321b(_0x16e31a);_0x3d6212&&_0x3d6212[_0x9eea5b([0x61,0x6c,0x67])]==_0x9eea5b([0x45,0x53,0x32,0x35,0x36])||(_0x58acf3=!0x1);}async function _0x57c97b(_0x24f720,_0x583a57,_0x10e751){const _0x4a2e63=window[_0x9eea5b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x9eea5b([0x66,0x72,0x6f,0x6d])](_0x1f2152(_0x10e751),_0x21f891=>_0x21f891[_0x9eea5b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x118b8a=new window[(_0x9eea5b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x9eea5b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x24f720+_0x9eea5b([0x2e])+_0x583a57),_0x46e2ef=window[_0x9eea5b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x9eea5b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x46e2ef)return;const _0x1fdebc=await _0x46e2ef[_0x9eea5b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x9eea5b([0x6a,0x77,0x6b]),_0x208881,{[_0x9eea5b([0x6e,0x61,0x6d,0x65])]:_0x9eea5b([0x45,0x43,0x44,0x53,0x41]),[_0x9eea5b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x9eea5b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x9eea5b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x46e2ef[_0x9eea5b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x9eea5b([0x6e,0x61,0x6d,0x65])]:_0x9eea5b([0x45,0x43,0x44,0x53,0x41]),[_0x9eea5b([0x68,0x61,0x73,0x68])]:{[_0x9eea5b([0x6e,0x61,0x6d,0x65])]:_0x9eea5b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1fdebc,_0x4a2e63,_0x118b8a)||(_0x58acf3=!0x1);}}function _0x1f321b(_0x562cff){return _0x562cff[_0x9eea5b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x9eea5b([0x65,0x79]))?JSON[_0x9eea5b([0x70,0x61,0x72,0x73,0x65])](_0x1f2152(_0x562cff)):null;}function _0x1f2152(_0x50bcc6){return window[_0x9eea5b([0x61,0x74,0x6f,0x62])](_0x50bcc6[_0x9eea5b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x9eea5b([0x2b]))[_0x9eea5b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x9eea5b([0x2f])));}function _0x14efdf(_0x50a859){let _0x1dc34e=0x1505;function _0x2403b0(_0x2e7ad1){for(let _0x187366=0x0;_0x187366<_0x2e7ad1[_0x9eea5b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x187366++){const _0x27e53c=_0x2e7ad1[_0x9eea5b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x187366);_0x1dc34e=(_0x1dc34e<<0x5)+_0x1dc34e+_0x27e53c,_0x1dc34e&=_0x1dc34e;}}function _0x4a6b33(_0x109d49){Array[_0x9eea5b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x109d49)?_0x109d49[_0x9eea5b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4a6b33):_0x109d49&&typeof _0x109d49==_0x9eea5b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x9eea5b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x109d49)[_0x9eea5b([0x73,0x6f,0x72,0x74])]()[_0x9eea5b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4f864b,_0x1413aa])=>{_0x2403b0(_0x4f864b),_0x4a6b33(_0x1413aa);}):_0x2403b0(window[_0x9eea5b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x109d49));}return _0x4a6b33(_0x50a859),_0x1dc34e>>>0x0;}function _0x181bef(_0xebb983){return _0xebb983[_0x9eea5b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x9eea5b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x9eea5b([0x30]));}function _0x33dd14(_0x59044a){return _0x59044a[_0x9eea5b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x9eea5b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x9eea5b([0x6a,0x6f,0x69,0x6e])]('');}function _0x124915(){}function _0x9eea5b(_0x26ce2f){const _0x5778e1=_0x4329;return _0x26ce2f[_0x5778e1(0x1ce)](_0x51fbe7=>String[_0x5778e1(0x191)](_0x51fbe7))[_0x5778e1(0x1d2)]('');}_0x4d3810(await _0x1e925f());}(this);}[_0x266ee0(0x1ae)](){const _0x46b317=_0x266ee0,_0x545dca=this[_0x46b317(0x198)][_0x46b317(0x19b)][_0x46b317(0x1a3)];_0x545dca[_0x46b317(0x1c3)](_0x46b317(0x1c9))&&_0x545dca[_0x46b317(0x185)](_0x46b317(0x1c9),{'allowAttributes':[_0x46b317(0x1aa)]}),_0x545dca[_0x46b317(0x1c3)](_0x46b317(0x18a))&&_0x545dca[_0x46b317(0x185)](_0x46b317(0x18a),{'allowAttributes':[_0x46b317(0x1aa)]});}[_0x266ee0(0x18d)](){const _0x59730e=_0x266ee0,_0x5cf149=this[_0x59730e(0x198)];_0x5cf149[_0x59730e(0x1b5)][_0x59730e(0x197)](_0x59730e(0x1b0))[_0x59730e(0x1b1)]({'model':_0x59730e(0x1aa),'view':_0x59730e(0x192)}),_0x5cf149[_0x59730e(0x1b5)][_0x59730e(0x197)](_0x59730e(0x19e))[_0x59730e(0x18f)]({'model':{'key':_0x59730e(0x1aa),'value':_0x678e93=>_0x678e93[_0x59730e(0x1b3)](_0x59730e(0x192))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5afadf=_0x5cf149[_0x59730e(0x1d4)][_0x59730e(0x1d0)](_0x59730e(0x1ba));_0x5afadf&&this[_0x59730e(0x1d3)](_0x5afadf,_0x59730e(0x18c),(_0x1e99a2,[_0x598ca7,_0x27be38])=>{const _0xff53fb=_0x59730e;_0x598ca7[_0xff53fb(0x1ca)](_0xff53fb(0x1aa),_0x27be38);});}[_0x266ee0(0x1cd)](){const _0x535326=_0x266ee0,_0x28e23c=this[_0x535326(0x198)][_0x535326(0x1c6)][_0x535326(0x1d0)](_0x535326(0x1bb))||{},_0x5a3c56=this[_0x535326(0x198)][_0x535326(0x1c6)][_0x535326(0x1d0)](_0x535326(0x1d9))||'';this[_0x535326(0x1a9)]=_0x4580e8(_0x333496[_0x535326(0x1cb)],_0x535326(0x1b9),{..._0x28e23c,'pubkey':_0x5a3c56,'ctx-name':_0x535326(0x188)+this[_0x535326(0x1c8)],'sourceList':'','imgOnly':_0x535326(0x1af),'removeCopyright':_0x535326(0x1af),'localeName':this[_0x535326(0x198)][_0x535326(0x199)][_0x535326(0x196)],'externalSourcesEmbedCss':_0x535326(0x19a)}),this[_0x535326(0x1a9)][_0x535326(0x1d7)]=_0x2aa38d=>{const _0x10dcb7=_0x535326;if(_0x10dcb7(0x1a7)==_0x2aa38d)return _0x10dcb7(0x1c4);},_0x333496[_0x535326(0x1cb)][_0x535326(0x19c)][_0x535326(0x1b8)](this[_0x535326(0x1a9)]);}[_0x266ee0(0x1ac)](){const _0x11f54e=_0x266ee0;this[_0x11f54e(0x1bf)]=_0x4580e8(_0x333496[_0x11f54e(0x1cb)],_0x11f54e(0x1b4),{'ctx-name':_0x11f54e(0x188)+this[_0x11f54e(0x1c8)]}),_0x333496[_0x11f54e(0x1cb)][_0x11f54e(0x19c)][_0x11f54e(0x1b8)](this[_0x11f54e(0x1bf)]);}[_0x266ee0(0x1a5)](){const _0x3f1318=_0x266ee0,_0x448563=this[_0x3f1318(0x198)][_0x3f1318(0x1d4)][_0x3f1318(0x1d0)](_0x3f1318(0x195));_0x448563&&this[_0x3f1318(0x1d3)](_0x448563,_0x3f1318(0x1b7),()=>{const _0x1021eb=_0x3f1318,_0x252b4b=this[_0x1021eb(0x198)][_0x1021eb(0x19b)][_0x1021eb(0x1cb)][_0x1021eb(0x1c0)][_0x1021eb(0x1a6)]();_0x252b4b&&_0x252b4b[_0x1021eb(0x1b3)](_0x1021eb(0x1aa))&&this[_0x1021eb(0x198)][_0x1021eb(0x1ad)][_0x1021eb(0x1cf)][_0x1021eb(0x1d5)](_0x1021eb(0x189),()=>{const _0x339d17=_0x1021eb;_0x4677bf(this[_0x339d17(0x198)],_0x252b4b);});});const _0x2b7bdf=this[_0x3f1318(0x198)][_0x3f1318(0x1d4)][_0x3f1318(0x1d0)](_0x3f1318(0x1a2));_0x2b7bdf&&this[_0x3f1318(0x1d3)](_0x2b7bdf,_0x3f1318(0x1b7),()=>{const _0x10f818=_0x3f1318,_0x42e2a6=this[_0x10f818(0x198)][_0x10f818(0x19b)][_0x10f818(0x1cb)][_0x10f818(0x1c0)][_0x10f818(0x1a6)]();_0x42e2a6&&_0x42e2a6[_0x10f818(0x1b3)](_0x10f818(0x1aa))&&this[_0x10f818(0x198)][_0x10f818(0x1ad)][_0x10f818(0x1cf)][_0x10f818(0x1d5)](_0x10f818(0x189),()=>{const _0x1bfbcc=_0x10f818;_0x4677bf(this[_0x1bfbcc(0x198)],_0x42e2a6);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x33a720,ObservableMixin as _0x1606de}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x497ec5}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x52dadd}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x9468ca}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x59f678}from'../../utils/uploadutils.js';import{getImageUrls as _0x28a146,getImageDimension as _0x2e61ee}from'../../utils/editingutils.js';import{isAncestor as _0x158037}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x1606de(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4dfbf5,_0x5b99bf,_0x3c9cf0){super(),this['_editor']=_0x4dfbf5,this['_dialog']=_0x5b99bf,this['_imageElement']=_0x3c9cf0,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 _0x90fc0d=this['_imageElement'],_0x1243e7=_0x90fc0d['getAttribute']('uploadcareImageId'),_0x213368=_0x90fc0d['getAttribute']('src');if(_0x1243e7)await this['_loadImageInfo'](_0x1243e7,_0x213368);else{if(this['_imageCache']['has'](_0x213368)){const _0x220b47=this['_imageCache']['get'](_0x213368);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x220b47['url'],this['imageDimension']=_0x220b47['dimension'],this['imageId']=_0x220b47['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1cc4bb}=this['_editor'],t=_0x1cc4bb['t'],_0x1c18ce=new _0x9468ca(_0x1cc4bb,this['imageStatus'],this['_attributes']);_0x1c18ce['bind']('status')['to'](this,'imageStatus'),_0x1c18ce['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1c18ce['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1c18ce['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1c18ce,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x52dadd,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1c18ce,'position':_0x497ec5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1c18ce['focus']();},'onHide':()=>{_0x1c18ce['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x171c12=>!_0x158037(_0x171c12,_0x1c18ce['element'])}});}['_loadImageInfo'](_0x4ff550,_0x4049e6){return _0x59f678['getInfo'](_0x4ff550,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x523149=>{const {width:_0x28ec7b,height:_0x4bea9b}=_0x523149['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4049e6,this['imageDimension']={'width':_0x28ec7b,'height':_0x4bea9b},this['imageId']=_0x4ff550;})['catch'](_0x3986a3=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3986a3['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x12e891,_0x590a38){return this['_getImageAsFile'](_0x12e891)['then'](_0x4a6713=>_0x59f678['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x590a38['signal'],'file':_0x4a6713,'onProgress':_0x2c9e89=>{_0x2c9e89&&_0x2c9e89['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2c9e89['value']));}}))['then'](_0x4502b1=>{const {width:_0x28b95b,height:_0x10b263}=_0x4502b1['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4502b1['cdnUrl'],this['imageDimension']={'width':_0x28b95b,'height':_0x10b263},this['imageId']=_0x4502b1['uuid'],this['imageUploadProgress']=null;const _0x233464=_0x12e891['getAttribute']('src');this['_imageCache']['set'](_0x233464,{'id':_0x4502b1['uuid'],'url':_0x4502b1['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4a1102=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4a1102['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x33c0e3,_0x5b6259){_0x33c0e3['on']('apply',(_0x227c2e,_0x503fb5)=>{this['_replaceImage'](_0x5b6259,_0x503fb5['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x33c0e3['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x33c0e3['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x30dac0,_0x5dfd53,_0x5bd36b){const _0xe9186=this['_editor'],{width:_0x46fa9b,height:_0x2b881c}=_0x2e61ee(_0x5dfd53,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3fbd90,imageSources:_0xc02bb}=_0x28a146(_0x5dfd53,_0x46fa9b);_0xe9186['model']['change'](_0x6648a=>{if('$graveyard'===_0x30dac0['root']['rootName']){_0xe9186['execute']('insertImage',{'imageType':_0x30dac0['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x30dac0['getAttributes']()),'uploadcareImageId':_0x5bd36b,'src':_0x3fbd90,'sources':_0xc02bb,'width':_0x46fa9b,'height':_0x2b881c}});const _0x58666d=_0x30dac0['getChildren']();_0x30dac0=_0xe9186['model']['document']['selection']['getSelectedElement']();for(const _0x44676d of _0x58666d)_0x6648a['append'](_0x6648a['cloneElement'](_0x44676d),_0x30dac0);}else _0x6648a['setSelection'](_0x30dac0,'on'),_0xe9186['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x30dac0['getAttributes']()),'uploadcareImageId':_0x5bd36b,'src':_0x3fbd90,'sources':_0xc02bb,'width':_0x46fa9b,'height':_0x2b881c},_0x30dac0);_0x6648a['setSelection'](_0x30dac0,'on');});}async['_getImageAsFile'](_0x14e76e){const _0x24952b=_0x33a720['window'],_0x3648fd=_0x33a720['document']['location']['href'],_0x5b9091=new _0x24952b['URL'](_0x14e76e['getAttribute']('src'),_0x3648fd);if('data:'===_0x5b9091['protocol']){const _0x27847f=_0x5b9091['href']['split'](','),_0xbab665=_0x27847f[0x0]['match'](/:(.*?);/)[0x1],_0x46f618=_0xbab665['split']('/')[0x1],_0x15b52e=_0x24952b['atob'](_0x27847f[_0x27847f['length']-0x1]);let _0x3a0edf=_0x15b52e['length'];const _0xbcf691=new _0x24952b['Uint8Array'](_0x3a0edf);for(;_0x3a0edf--;)_0xbcf691[_0x3a0edf]=_0x15b52e['charCodeAt'](_0x3a0edf);return new _0x24952b['File']([_0xbcf691],'image.'+_0x46f618,{'type':_0xbab665});}const _0x2ff03f=_0x5b9091['href']['split']('/'),_0x1dc825=_0x2ff03f[_0x2ff03f['length']-0x1],_0x569870=_0x1dc825['split']('.')[0x1];return _0x24952b['fetch'](_0x5b9091['href'])['then'](_0x251908=>_0x251908['clone']()['blob']())['then'](_0x148fab=>new _0x24952b['File']([_0x148fab],_0x1dc825,{'type':'image/'+_0x569870}));}}
23
+ import{global as _0x1e0c02,ObservableMixin as _0x2812da}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x145e4e}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4af101}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x5164a1}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x4ed8b1}from'../../utils/uploadutils.js';import{getImageUrls as _0x1afb7c,getImageDimension as _0x13cefe}from'../../utils/editingutils.js';import{isAncestor as _0x2983f9}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x2812da(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1e4318,_0x517dd5,_0x48b0a3){super(),this['_editor']=_0x1e4318,this['_dialog']=_0x517dd5,this['_imageElement']=_0x48b0a3,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 _0x277109=this['_imageElement'],_0x4ccd1e=_0x277109['getAttribute']('uploadcareImageId'),_0x2d93ab=_0x277109['getAttribute']('src');if(_0x4ccd1e)await this['_loadImageInfo'](_0x4ccd1e,_0x2d93ab);else{if(this['_imageCache']['has'](_0x2d93ab)){const _0x1e1317=this['_imageCache']['get'](_0x2d93ab);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1e1317['url'],this['imageDimension']=_0x1e1317['dimension'],this['imageId']=_0x1e1317['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2362fb}=this['_editor'],t=_0x2362fb['t'],_0x43aabf=new _0x5164a1(_0x2362fb,this['imageStatus'],this['_attributes']);_0x43aabf['bind']('status')['to'](this,'imageStatus'),_0x43aabf['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x43aabf['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x43aabf['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x43aabf,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4af101,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x43aabf,'position':_0x145e4e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x43aabf['focus']();},'onHide':()=>{_0x43aabf['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x298c83=>!_0x2983f9(_0x298c83,_0x43aabf['element'])}});}['_loadImageInfo'](_0x2c3b70,_0x4947a2){return _0x4ed8b1['getInfo'](_0x2c3b70,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x206805=>{const {width:_0x25aace,height:_0x58c786}=_0x206805['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4947a2,this['imageDimension']={'width':_0x25aace,'height':_0x58c786},this['imageId']=_0x2c3b70;})['catch'](_0xcd3a08=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xcd3a08['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2f8f4c,_0x411c35){return this['_getImageAsFile'](_0x2f8f4c)['then'](_0x27c374=>_0x4ed8b1['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x411c35['signal'],'file':_0x27c374,'onProgress':_0x1fbc27=>{_0x1fbc27&&_0x1fbc27['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1fbc27['value']));}}))['then'](_0x36dea9=>{const {width:_0x7faa92,height:_0x90bed7}=_0x36dea9['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x36dea9['cdnUrl'],this['imageDimension']={'width':_0x7faa92,'height':_0x90bed7},this['imageId']=_0x36dea9['uuid'],this['imageUploadProgress']=null;const _0x4fcc09=_0x2f8f4c['getAttribute']('src');this['_imageCache']['set'](_0x4fcc09,{'id':_0x36dea9['uuid'],'url':_0x36dea9['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x38522a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x38522a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0xff25bd,_0x108b77){_0xff25bd['on']('apply',(_0x422adb,_0x2d32ef)=>{this['_replaceImage'](_0x108b77,_0x2d32ef['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0xff25bd['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0xff25bd['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x55f278,_0x298937,_0x40383a){const _0x184ff9=this['_editor'],{width:_0x2fca11,height:_0x424b8a}=_0x13cefe(_0x298937,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x563960,imageSources:_0x57d429}=_0x1afb7c(_0x298937,_0x2fca11);_0x184ff9['model']['change'](_0x1362ab=>{if('$graveyard'===_0x55f278['root']['rootName']){_0x184ff9['execute']('insertImage',{'imageType':_0x55f278['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x55f278['getAttributes']()),'uploadcareImageId':_0x40383a,'src':_0x563960,'sources':_0x57d429,'width':_0x2fca11,'height':_0x424b8a}});const _0x2c8bc1=_0x55f278['getChildren']();_0x55f278=_0x184ff9['model']['document']['selection']['getSelectedElement']();for(const _0x377590 of _0x2c8bc1)_0x1362ab['append'](_0x1362ab['cloneElement'](_0x377590),_0x55f278);}else _0x1362ab['setSelection'](_0x55f278,'on'),_0x184ff9['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x55f278['getAttributes']()),'uploadcareImageId':_0x40383a,'src':_0x563960,'sources':_0x57d429,'width':_0x2fca11,'height':_0x424b8a},_0x55f278);_0x1362ab['setSelection'](_0x55f278,'on');});}async['_getImageAsFile'](_0x398822){const _0x327162=_0x1e0c02['window'],_0x39b7be=_0x1e0c02['document']['location']['href'],_0x2c4d21=new _0x327162['URL'](_0x398822['getAttribute']('src'),_0x39b7be);if('data:'===_0x2c4d21['protocol']){const _0x75664d=_0x2c4d21['href']['split'](','),_0x2fa041=_0x75664d[0x0]['match'](/:(.*?);/)[0x1],_0x506e68=_0x2fa041['split']('/')[0x1],_0x3b5a9a=_0x327162['atob'](_0x75664d[_0x75664d['length']-0x1]);let _0x5ccc97=_0x3b5a9a['length'];const _0x3ac1f9=new _0x327162['Uint8Array'](_0x5ccc97);for(;_0x5ccc97--;)_0x3ac1f9[_0x5ccc97]=_0x3b5a9a['charCodeAt'](_0x5ccc97);return new _0x327162['File']([_0x3ac1f9],'image.'+_0x506e68,{'type':_0x2fa041});}const _0x4b78c5=_0x2c4d21['href']['split']('/'),_0x2e4dd6=_0x4b78c5[_0x4b78c5['length']-0x1],_0xa257f8=_0x2e4dd6['split']('.')[0x1];return _0x327162['fetch'](_0x2c4d21['href'])['then'](_0x307209=>_0x307209['clone']()['blob']())['then'](_0xd024c5=>new _0x327162['File']([_0xd024c5],_0x2e4dd6,{'type':'image/'+_0xa257f8}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x1c97(_0x369a75,_0x387e78){const _0x2fadd4=_0x2fad();return _0x1c97=function(_0x1c97c4,_0x3485cb){_0x1c97c4=_0x1c97c4-0xdb;let _0x2f1e69=_0x2fadd4[_0x1c97c4];return _0x2f1e69;},_0x1c97(_0x369a75,_0x387e78);}(function(_0x24d1aa,_0x56b05e){const _0xac2334=_0x1c97,_0x276a6e=_0x24d1aa();while(!![]){try{const _0x1416a0=-parseInt(_0xac2334(0xdc))/0x1+-parseInt(_0xac2334(0xe4))/0x2*(-parseInt(_0xac2334(0xdf))/0x3)+parseInt(_0xac2334(0xe0))/0x4*(parseInt(_0xac2334(0xe8))/0x5)+-parseInt(_0xac2334(0xe1))/0x6*(-parseInt(_0xac2334(0xe5))/0x7)+-parseInt(_0xac2334(0xdb))/0x8+-parseInt(_0xac2334(0xe9))/0x9+-parseInt(_0xac2334(0xe2))/0xa*(parseInt(_0xac2334(0xea))/0xb);if(_0x1416a0===_0x56b05e)break;else _0x276a6e['push'](_0x276a6e['shift']());}catch(_0x1c17a0){_0x276a6e['push'](_0x276a6e['shift']());}}}(_0x2fad,0x211e2));function _0x2fad(){const _0x5f0688=['6lAPugR','90JlVqmo','uc-light','7148rOBMgb','1582483fWRJgW','bindTemplate','uc-cloud-image-editor','27500ckRZVT','403110NGJeOQ','305987GKfFHt','image-edit','setTemplate','set','476320VdGBQK','93990IlhzTg','ck-uploadcare-theme','imageSrc','213yrJuWX','76tcGYHN'];_0x2fad=function(){return _0x5f0688;};return _0x2fad();}import{View as _0x3a1d44}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x3a1d44{constructor(_0x1258eb,_0x4c714d){const _0x38015b=_0x1c97;super(_0x1258eb);const _0x569a4b=this[_0x38015b(0xe6)];this[_0x38015b(0xed)](_0x38015b(0xde),''),this[_0x38015b(0xec)]({'tag':_0x38015b(0xe7),'attributes':{..._0x4c714d,'class':[_0x38015b(0xe3),_0x38015b(0xdd)],'ctx-name':_0x38015b(0xeb),'cdn-url':_0x569a4b['to'](_0x38015b(0xde))}});}}
23
+ (function(_0xa6cc86,_0x35797a){const _0x20881f=_0x2e59,_0x38777b=_0xa6cc86();while(!![]){try{const _0xac4e6d=-parseInt(_0x20881f(0x8f))/0x1+parseInt(_0x20881f(0x90))/0x2*(parseInt(_0x20881f(0x84))/0x3)+parseInt(_0x20881f(0x81))/0x4*(-parseInt(_0x20881f(0x7f))/0x5)+parseInt(_0x20881f(0x8e))/0x6*(parseInt(_0x20881f(0x86))/0x7)+parseInt(_0x20881f(0x82))/0x8+-parseInt(_0x20881f(0x8d))/0x9*(-parseInt(_0x20881f(0x80))/0xa)+-parseInt(_0x20881f(0x8c))/0xb*(-parseInt(_0x20881f(0x91))/0xc);if(_0xac4e6d===_0x35797a)break;else _0x38777b['push'](_0x38777b['shift']());}catch(_0x3829ba){_0x38777b['push'](_0x38777b['shift']());}}}(_0x529c,0xd9ffd));function _0x529c(){const _0x1d87ff=['uc-cloud-image-editor','imageSrc','image-edit','ck-uploadcare-theme','bindTemplate','3321329HXkeVl','1759149AiGxcO','6YKCKZY','1221091TqenLx','14572bdymXP','12XueaXW','set','5RLIqNn','80DFhIGW','3386804eVVJgZ','3299160Upbknp','uc-light','129WBpPZu','setTemplate','2585779PIoHlV'];_0x529c=function(){return _0x1d87ff;};return _0x529c();}function _0x2e59(_0x33d014,_0x963d08){const _0x529c53=_0x529c();return _0x2e59=function(_0x2e590d,_0x737d71){_0x2e590d=_0x2e590d-0x7e;let _0x4fecfd=_0x529c53[_0x2e590d];return _0x4fecfd;},_0x2e59(_0x33d014,_0x963d08);}import{View as _0x9043ac}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x9043ac{constructor(_0x3f6e4f,_0x57df64){const _0x2411d1=_0x2e59;super(_0x3f6e4f);const _0x103354=this[_0x2411d1(0x8b)];this[_0x2411d1(0x7e)](_0x2411d1(0x88),''),this[_0x2411d1(0x85)]({'tag':_0x2411d1(0x87),'attributes':{..._0x57df64,'class':[_0x2411d1(0x83),_0x2411d1(0x8a)],'ctx-name':_0x2411d1(0x89),'cdn-url':_0x103354['to'](_0x2411d1(0x88))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x385cac}from'ckeditor5/src/icons.js';import{ButtonView as _0x41450e,IconView as _0xbc1afb,View as _0x3afbb9}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x3afbb9{constructor(_0x542871){super(_0x542871);const t=_0x542871['t'];this['set']('errorType',null);const _0x4f5b89=new _0x41450e(_0x542871);_0x4f5b89['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4f5b89['withText']=!0x0,_0x4f5b89['class']='ck-button-action',_0x4f5b89['on']('execute',()=>{this['fire']('retry');}),_0x4f5b89['bind']('isVisible')['to'](this,'errorType',_0x5b7c25=>'NotFound'!==_0x5b7c25);const _0x1ff6e4=new _0xbc1afb();_0x1ff6e4['content']=_0x385cac,_0x1ff6e4['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4abd9c=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':[_0x1ff6e4,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4abd9c['to']('errorType',_0x5cdd4e=>t('NotFound'!==_0x5cdd4e?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4f5b89]},{'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'}]}]}]});}}
23
+ import{IconError as _0x46a994}from'ckeditor5/src/icons.js';import{ButtonView as _0x5a7141,IconView as _0x289aa0,View as _0x21f397}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x21f397{constructor(_0x6c5ef){super(_0x6c5ef);const t=_0x6c5ef['t'];this['set']('errorType',null);const _0x3b4597=new _0x5a7141(_0x6c5ef);_0x3b4597['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x3b4597['withText']=!0x0,_0x3b4597['class']='ck-button-action',_0x3b4597['on']('execute',()=>{this['fire']('retry');}),_0x3b4597['bind']('isVisible')['to'](this,'errorType',_0x46842d=>'NotFound'!==_0x46842d);const _0x426751=new _0x289aa0();_0x426751['content']=_0x46a994,_0x426751['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x48a0dd=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':[_0x426751,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x48a0dd['to']('errorType',_0x4f5ae9=>t('NotFound'!==_0x4f5ae9?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x3b4597]},{'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'}]}]}]});}}