@ckeditor/ckeditor5-uploadcare 46.1.1-alpha.1 → 46.1.1-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x3c8b09,Command as _0x1e9b14}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x273e46,IconGooglePhotos as _0x4f76ce,IconGoogleDrive as _0x159e21,IconFacebook as _0x3bab91,IconDropbox as _0xf90335,IconUploadcareLink as _0x4ce268,IconUploadcareImageUpload as _0x82e1d0,IconError as _0x5cfd40,IconUploadcareImageEdit as _0x1e534e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x31ddd8,MenuBarMenuListItemButtonView as _0x3ed39f,View as _0x393d6c,FocusCycler as _0x55b923,Dialog as _0x563fe3,DialogViewPosition as _0xd31937,SpinnerView as _0x53c3b2,IconView as _0x5baf03,Notification as _0x2f4c69}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x943f1c,DomEmitterMixin as _0x2fb6b0,global as _0x7d8c4c,getAncestors as _0x17466b,ObservableMixin as _0x4c7309,uid as _0x103d12,createElement as _0x2bff64}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x3cfb53}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x55bd5e,info as _0x31f98e}from'@uploadcare/upload-client';import*as _0x12dac6 from'@uploadcare/file-uploader';var i=function(_0x5df952){return _0x5df952['Local']='local',_0x5df952['URL']='url',_0x5df952['Dropbox']='dropbox',_0x5df952['GDrive']='gdrive',_0x5df952['Facebook']='facebook',_0x5df952['GPhotos']='gphotos',_0x5df952['OneDrive']='onedrive',_0x5df952;}({});function _(_0x84d70a,_0x35fb3f,_0x44e43b){const t=_0x84d70a['t'],_0xfd31f9=_0x84d70a['t'];switch(_0x35fb3f){case i['Local']:return{'text':_0xfd31f9('Insert'===_0x44e43b?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0xfd31f9('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x44e43b?_0xfd31f9('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0xfd31f9('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x44e43b?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x44e43b?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x44e43b?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x44e43b?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x44e43b?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x35fb3f;}}class e extends _0x3c8b09{['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 _0x2e98b0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x566275;for(const _0x344e14 in _0x2e98b0){const _0x5635e6=_0x344e14,_0x411a67=_0x2e98b0[_0x5635e6];if('uploadcareLicenseKeyValid'==_0x411a67||'uploadcareLicenseKeyInvalid'==_0x411a67||'uploadcareLicenseKeyExpired'==_0x411a67||'uploadcareLicenseKeyDomainLimit'==_0x411a67||'uploadcareLicenseKeyNotAllowed'==_0x411a67||'uploadcareLicenseKeyEvaluationLimit'==_0x411a67||'uploadcareLicenseKeyTrialLimit'==_0x411a67||'uploadcareLicenseKeyUsageLimit'==_0x411a67){delete _0x2e98b0[_0x5635e6],_0x566275=_0x411a67,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x566275&&_0x2e98b0['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x566275&&_0x2e98b0['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x566275&&_0x2e98b0['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x566275&&_0x2e98b0['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x566275&&_0x2e98b0['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x566275&&_0x2e98b0['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x566275&&_0x2e98b0['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x1740ae}=this,_0x49a05a=_0x1740ae['commands']['get']('uploadcare');if(!_0x49a05a)return;const _0x1ade69=this['_normalizeConfigSourceList'](_0x1740ae['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0xe968ca,_0x290e03)=>{const _0x319665=this['_getIntegrationKey'](_0x290e03['type']);return _0xe968ca[_0x319665]||(_0xe968ca[_0x319665]=[]),_0xe968ca[_0x319665]['push'](_0x290e03),_0xe968ca;},{});_0x1740ae['plugins']['has']('ImageInsertUI')&&_0x1740ae['commands']['get']('uploadcare')&&Object['entries'](_0x1ade69)['forEach'](([_0x1aef85,_0x447108])=>{_0x1740ae['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x1aef85,'observable':()=>_0x49a05a,'buttonViewCreator':()=>this['_createToolbarButton'](_0x447108),'formViewCreator':()=>this['_createDropdownButtons'](_0x447108),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x447108),'override':'assetManager'!==_0x1aef85});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x2cb75b){const {locale:_0x31b2f2}=this['editor'];return _0x2cb75b['map'](_0x3e96a5=>{const _0xc7f2ad=_(_0x31b2f2,_0x3e96a5,'Insert');switch(_0x3e96a5){case i['Local']:return{'icon':_0x82e1d0,'type':i['Local'],..._0xc7f2ad};case i['URL']:return{'icon':_0x4ce268,'type':i['URL'],..._0xc7f2ad};case i['Dropbox']:return{'icon':_0xf90335,'type':i['Dropbox'],..._0xc7f2ad};case i['Facebook']:return{'icon':_0x3bab91,'type':i['Facebook'],..._0xc7f2ad};case i['GDrive']:return{'icon':_0x159e21,'type':i['GDrive'],..._0xc7f2ad};case i['GPhotos']:return{'icon':_0x4f76ce,'type':i['GPhotos'],..._0xc7f2ad};case i['OneDrive']:return{'icon':_0x273e46,'type':i['OneDrive'],..._0xc7f2ad};}});}['_getIntegrationKey'](_0x358d22){switch(_0x358d22){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x9d1900,_0x444b09){const _0x389315=this['editor'],_0x1dfd99=new _0x9d1900(_0x389315['locale']),_0x3c0496=_0x389315['commands']['get']('uploadcare');return _0x1dfd99['bind']('isEnabled')['to'](_0x3c0496),_0x1dfd99['on']('execute',()=>{_0x3c0496['execute'](_0x444b09);}),_0x1dfd99;}['_createToolbarButton'](_0x3fcb60){const {locale:_0xd092b3}=this['editor'],_0x8e5f58=this['editor']['plugins']['get']('ImageInsertUI'),_0x3a1af8=_0x3fcb60[0x0],_0x9dd36b=this['_createButton'](_0x31ddd8,_0x3a1af8['type']);return _0x9dd36b['icon']=_0x3a1af8['icon'],_0x9dd36b['bind']('label')['to'](_0x8e5f58,'isImageSelected',_0x1ced8c=>_(_0xd092b3,_0x3a1af8['type'],_0x1ced8c?'Replace':'Insert')['text']),_0x9dd36b['tooltip']=!0x0,_0x9dd36b;}['_createDropdownButtons'](_0x323490){const {locale:_0x7aa0a2}=this['editor'],_0x26d6d8=this['editor']['plugins']['get']('ImageInsertUI');return _0x323490['map'](_0xb31f20=>{const _0x530494=this['_createButton'](_0x31ddd8,_0xb31f20['type']);return _0x530494['withText']=!0x0,_0x530494['icon']=_0xb31f20['icon'],_0x530494['bind']('label')['to'](_0x26d6d8,'isImageSelected',_0x4910cd=>_(_0x7aa0a2,_0xb31f20['type'],_0x4910cd?'Replace':'Insert')['text']),_0x530494;});}['_createMenuBarButtons'](_0x81d1f2){return _0x81d1f2['map'](_0xebf14a=>{const _0x22fbc7=this['_createButton'](_0x3ed39f,_0xebf14a['type']);return _0x22fbc7['icon']=_0xebf14a['icon'],_0x22fbc7['label']=_0xebf14a['shortText'],_0x22fbc7;});}}class F extends _0x393d6c{['focusTracker'];['focusCycler'];constructor(_0x19a0ac){super(_0x19a0ac),this['focusTracker']=new _0x943f1c(),this['focusCycler']=new _0x55b923({'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(_0x4fd238,_0x33898d){super(_0x4fd238),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-'+_0x33898d}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x311c77,_0xa06d65){const _0x4c58ef=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x185ea3=>_0x185ea3<=_0xa06d65)['map'](_0x46b179=>_0x311c77['replace'](/\/$/,'')+'/-/resize/'+_0x46b179+'x/\x20'+_0x46b179+'w');return{'imageFallbackUrl':_0x311c77,'imageSources':[{'srcset':_0x4c58ef['join'](',\x20'),'sizes':'(max-width:\x20'+_0xa06d65+'px)\x20100vw,\x20'+_0xa06d65+'px','type':'image/webp'}]};}function S(_0x58d764,_0x4031df,_0x4bbf81){const _0x4cbd8e=_0x58d764['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x4cbd8e?parseInt(_0x4cbd8e[0x1],0xa):_0x4031df,'height':_0x4cbd8e?parseInt(_0x4cbd8e[0x2],0xa):_0x4bbf81};}function p(_0x39864f,_0x2e8cf7){const _0x235ca3=new(_0x2fb6b0())(),_0x2b6496=_0x39864f['plugins']['get']('ImageUtils'),_0x90632c=_0x39864f['editing']['mapper']['toViewElement'](_0x2e8cf7),_0x380bdf=_0x2b6496['findViewImgElement'](_0x90632c),_0xb2cb76=_0x39864f['editing']['view']['domConverter']['viewToDom'](_0x380bdf),_0x2f38bc=_0x2e8cf7['getAttribute']('width'),_0x3c64a5=_0x2e8cf7['getAttribute']('height'),_0x339fed='image-processing';_0x39864f['editing']['view']['change'](_0x59318b=>{_0x59318b['addClass'](_0x339fed,_0x90632c),_0x59318b['setStyle']('aspect-ratio',_0x2f38bc+'/'+_0x3c64a5,_0x380bdf);}),_0x235ca3['listenTo'](_0xb2cb76,'load',()=>{_0x235ca3['stopListening'](_0xb2cb76,'load'),_0x39864f['editing']['view']['change'](_0x421053=>{_0x421053['removeClass'](_0x339fed,_0x90632c),_0x421053['removeStyle']('aspect-ratio',_0x380bdf);});});}function G(_0x366239){if(Array['isArray'](_0x366239)){const _0x433f6b=_0x366239['map'](G);return _0x532424=>_0x433f6b['some'](_0x2836b5=>_0x2836b5(_0x532424));}if('origin'==_0x366239){const _0x52f16e=_0x7d8c4c['window']['location']['origin'];return _0x20f7d8=>new URL(_0x20f7d8,_0x7d8c4c['document']['baseURI'])['origin']==_0x52f16e;}return'function'==typeof _0x366239?_0x366239:_0x366239 instanceof RegExp?_0x3f900b=>!(!_0x3f900b['match'](_0x366239)&&!_0x3f900b['replace'](/^https?:\/\//,'')['match'](_0x366239)):()=>!0x1;}function A(_0x5b76fc,_0x32a897){return _0x17466b(_0x5b76fc['target'])['includes'](_0x32a897);}class n extends/* #__PURE__ -- @preserve */
24
- _0x4c7309(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x5e6576,_0x184efd,_0xef4aad){super(),this['_editor']=_0x5e6576,this['_editing']=_0x184efd,this['_dialog']=_0x5e6576['plugins']['get'](_0x563fe3),this['_api']=_0x184efd['ctxElement']['getAPI'](),this['_type']=_0xef4aad,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:_0x34c79c,model:_0x52045b}=this['_editor'],_0x3e8f56=_0x52045b['document']['selection']['getSelectedElement'](),_0xc1587f=_0x3e8f56&&(_0x3e8f56['is']('element','imageBlock')||_0x3e8f56['is']('element','imageInline'));this['_formView']=new x(_0x34c79c,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x82e1d0,'title':_(_0x34c79c,this['_type'],_0xc1587f?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xd31937['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5cffb9=>!A(_0x5cffb9,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x2079c9}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1b34dc=>{const _0xc8fb7a=_0x2079c9['length'];for(const _0x44de6e of _0x2079c9){const _0x6e48b=_0x44de6e===_0x2079c9[_0xc8fb7a-0x1],{cdnUrl:_0x5cfb5d,fileInfo:_0x3bbed5}=_0x44de6e;if(!_0x5cfb5d||!_0x3bbed5)continue;const {width:_0x107712,height:_0x3c966c}=_0x3bbed5['imageInfo'],_0x24e689=S(_0x5cfb5d,_0x107712,_0x3c966c),_0x200a5f=C(_0x5cfb5d,_0x24e689['width']),_0x2e8101={'id':_0x3bbed5['uuid'],'type':'image','attributes':{'imageDimension':_0x24e689,..._0x200a5f}};this['_insertAsset'](_0x2e8101,_0x6e48b,_0x1b34dc);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x380e45=>{'idle'===_0x380e45['detail']['status']&&!_0x380e45['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x592e97,_0x47e4b7,_0x265179){const _0x33dbc6=this['_editor']['model']['document']['selection'],_0xf79970=_0x33dbc6['getSelectedElement'](),_0x15677e=!(!_0xf79970||!_0xf79970['is']('element','imageInline'));_0x265179['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x592e97,_0x15677e),_0x47e4b7||_0x265179['setSelection'](_0x33dbc6['getLastPosition']());}['_insertImage'](_0x26ab92,_0x31e6c0){const _0x5a7559=this['_editor'],{imageDimension:_0xd4c22b,imageFallbackUrl:_0x5daa5e,imageSources:_0x3aeef3}=_0x26ab92['attributes'];_0x5a7559['execute']('insertImage',{'imageType':_0x31e6c0?'imageInline':null,'source':{'uploadcareImageId':_0x26ab92['id'],'src':_0x5daa5e,'sources':_0x3aeef3,..._0xd4c22b}});}}class w extends _0x1e9b14{['_editing'];['_controller']=null;static get['requires'](){return[_0x563fe3,o];}constructor(_0x3f26c){super(_0x3f26c),this['_editing']=_0x3f26c['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x244fbc){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x244fbc);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x5966d6,..._0xe6a2a0}){return _0x55bd5e(_0x5966d6,_0xe6a2a0);}static['getInfo'](_0x4fb1e6,_0x492430){return _0x31f98e(_0x4fb1e6,_0x492430);}}class f extends _0x3c8b09{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x3cfb53,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1aa5e1=this['editor'];if(!!!_0x1aa5e1['config']['get']('uploadcare'))return;_0x1aa5e1['plugins']['get'](_0x3cfb53)['createUploadAdapter']=_0x2c2ffa=>new k(_0x2c2ffa,_0x1aa5e1),_0x1aa5e1['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x2b906b,{imageElement:_0x209444,data:_0x2f74f1})=>{_0x1aa5e1['model']['change'](_0x35df74=>{_0x35df74['setAttribute']('uploadcareImageId',_0x2f74f1['uploadcareImageId'],_0x209444);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x50ac8c,_0x3b64db){this['loader']=_0x50ac8c,this['editor']=_0x3b64db,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x3e3719=await this['loader']['file'];return j['upload']({'file':_0x3e3719,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x2e067a=>{_0x2e067a&&_0x2e067a['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x2e067a['value']);}})['then'](async _0x218d8b=>{const {imageFallbackUrl:_0x5e3b3f,imageSources:_0x397e7e}=C(_0x218d8b['cdnUrl'],_0x218d8b['imageInfo']['width']);return{'uploadcareImageId':_0x218d8b['uuid'],'default':_0x5e3b3f,'sources':_0x397e7e};})['catch'](()=>{const _0x49b0a6=t('Cannot\x20upload\x20file:')+('\x20'+_0x3e3719['name']+'.');return Promise['reject'](_0x49b0a6);});}['abort'](){this['controller']['abort']();}}class o extends _0x3c8b09{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x563fe3];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x2ff0e0){super(_0x2ff0e0),this['ucContextId']=_0x103d12();}['init'](){const _0x13e08e=this['editor'];_0x13e08e['commands']['add']('uploadcare',new w(_0x13e08e));}['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 _0x31d8af=_0x7d8c4c['document']['querySelector']('input[uploadcare-file-input]');_0x31d8af&&_0x31d8af['remove']();}),async function(_0x3addfe){const _0x54af5d=_0x444e43([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]),_0x2c385b=0x3d8d0df,_0x32d527=0x3dfa39f^_0x2c385b,_0x4375c6=window[_0x444e43([0x44,0x61,0x74,0x65])][_0x444e43([0x6e,0x6f,0x77])](),_0x59a305=_0x3addfe[_0x444e43([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x179d8d=new window[(_0x444e43([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5bce0e=>{_0x59a305[_0x444e43([0x6f,0x6e,0x63,0x65])](_0x444e43([0x72,0x65,0x61,0x64,0x79]),_0x5bce0e);}),_0x554673={[_0x444e43([0x6b,0x74,0x79])]:_0x444e43([0x45,0x43]),[_0x444e43([0x75,0x73,0x65])]:_0x444e43([0x73,0x69,0x67]),[_0x444e43([0x63,0x72,0x76])]:_0x444e43([0x50,0x2d,0x32,0x35,0x36]),[_0x444e43([0x78])]:_0x444e43([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]),[_0x444e43([0x79])]:_0x444e43([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]),[_0x444e43([0x61,0x6c,0x67])]:_0x444e43([0x45,0x53,0x32,0x35,0x36])},_0x159afa=_0x59a305[_0x444e43([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x444e43([0x67,0x65,0x74])](_0x444e43([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x76f601(){let _0x2617ca,_0x13f6a2=null,_0x40fb02=null;try{if(_0x159afa==_0x444e43([0x47,0x50,0x4c]))return _0x444e43([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2617ca=_0x21fe5f(),!_0x2617ca)return _0x444e43([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2617ca[_0x444e43([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x40fb02=_0x5ed40d(_0x2617ca[_0x444e43([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2617ca[_0x444e43([0x6a,0x74,0x69])])),await _0x4c2b67()?_0x49d86c()?_0x430f29()?_0x444e43([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x56bc23()?(_0x2617ca[_0x444e43([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x444e43([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x13f6a2=_0xe329e6(_0x444e43([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2617ca[_0x444e43([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x444e43([0x74,0x72,0x69,0x61,0x6c])&&(_0x13f6a2=_0xe329e6(_0x444e43([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x49ede8()):_0x444e43([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x444e43([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x444e43([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x444e43([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x430f29(){const _0x3f089e=[_0x444e43([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x444e43([0x74,0x72,0x69,0x61,0x6c])][_0x444e43([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2617ca[_0x444e43([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4375c6/0x3e8:0xe10*_0x32d527;return _0x2617ca[_0x444e43([0x65,0x78,0x70])]<_0x3f089e;}function _0x49d86c(){const _0x4eb797=_0x2617ca[_0x444e43([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4eb797&&(!!_0x4eb797[_0x444e43([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x444e43([0x2a]))||!!_0x4eb797[_0x444e43([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x444e43([0x55,0x50,0x4c,0x43])));}function _0x56bc23(){const _0xf34c58=_0x2617ca[_0x444e43([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xf34c58||0x0==_0xf34c58[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x50c754}=new URL(window[_0x444e43([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xf34c58[_0x444e43([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x50c754))return!0x0;const _0x2ae7e0=_0x50c754[_0x444e43([0x73,0x70,0x6c,0x69,0x74])](_0x444e43([0x2e]));return _0xf34c58[_0x444e43([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x50107f=>_0x50107f[_0x444e43([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x444e43([0x2a])))[_0x444e43([0x6d,0x61,0x70])](_0x337e5b=>_0x337e5b[_0x444e43([0x73,0x70,0x6c,0x69,0x74])](_0x444e43([0x2e])))[_0x444e43([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3917d3=>_0x3917d3[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2ae7e0[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x444e43([0x6d,0x61,0x70])](_0x359268=>Array(_0x2ae7e0[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x359268[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x444e43([0x66,0x69,0x6c,0x6c])](_0x359268[0x0]===_0x444e43([0x2a])?_0x444e43([0x2a]):'')[_0x444e43([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x359268))[_0x444e43([0x73,0x6f,0x6d,0x65])](_0x57f4d0=>_0x2ae7e0[_0x444e43([0x65,0x76,0x65,0x72,0x79])]((_0x25e980,_0x445b10)=>_0x57f4d0[_0x445b10]===_0x25e980||_0x57f4d0[_0x445b10]===_0x444e43([0x2a])));}function _0x49ede8(){return _0x13f6a2&&_0x40fb02?new window[(_0x444e43([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1d0574,_0x36eea9)=>{_0x13f6a2[_0x444e43([0x74,0x68,0x65,0x6e])](_0x1d0574,_0x36eea9),_0x40fb02[_0x444e43([0x74,0x68,0x65,0x6e])](_0x4f47b0=>{_0x4f47b0!=_0x444e43([0x56,0x61,0x6c,0x69,0x64])&&_0x1d0574(_0x4f47b0);},_0x36eea9);}):_0x13f6a2||_0x40fb02||_0x444e43([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5ed40d(_0x4739d4,_0x4fca3e){return new window[(_0x444e43([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24c0b9=>{if(_0x4af5f8())return _0x24c0b9(_0x444e43([0x56,0x61,0x6c,0x69,0x64]));_0x355ac7(),_0x59a305[_0x444e43([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x444e43([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4a4c25=!0x1;const _0x38fd94=_0x103d12();function _0x5e0b52(_0x50e375){return!!_0x50e375&&(typeof _0x50e375===_0x444e43([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x50e375===_0x444e43([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x50e375[_0x444e43([0x74,0x68,0x65,0x6e])]===_0x444e43([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x50e375[_0x444e43([0x63,0x61,0x74,0x63,0x68])]===_0x444e43([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5cd0ec(_0x8ae650){_0x13d7af(_0x8ae650)[_0x444e43([0x74,0x68,0x65,0x6e])](_0x1e61f8=>{if(!_0x1e61f8||_0x1e61f8[_0x444e43([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x444e43([0x6f,0x6b]))return _0x444e43([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xac4b76(_0x539afb(_0x38fd94+_0x4fca3e))!=_0x1e61f8[_0x444e43([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x444e43([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x444e43([0x56,0x61,0x6c,0x69,0x64]);})[_0x444e43([0x74,0x68,0x65,0x6e])](_0x3dfe05=>(_0x122d20(),_0x3dfe05),()=>{const _0x5cde77=_0x2ee211();return null==_0x5cde77?(_0x122d20(),_0x444e43([0x56,0x61,0x6c,0x69,0x64])):_0x444e43(_0x4375c6-_0x5cde77>(0x27d454df^_0x2c385b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x444e43([0x74,0x68,0x65,0x6e])](_0x24c0b9)[_0x444e43([0x63,0x61,0x74,0x63,0x68])](()=>{_0x24c0b9(_0x444e43([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1c919e=0x3ee3e5f^_0x2c385b;function _0x122d20(){const _0x124aa1=_0x444e43([0x6c,0x6c,0x63,0x74,0x2d])+_0xac4b76(_0x539afb(_0x4739d4)),_0x46ee9f=_0x2f6100(_0xac4b76(window[_0x444e43([0x4d,0x61,0x74,0x68])][_0x444e43([0x63,0x65,0x69,0x6c])](_0x4375c6/_0x1c919e)));window[_0x444e43([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x444e43([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x124aa1,_0x46ee9f);}function _0x2ee211(){const _0x35e022=_0x444e43([0x6c,0x6c,0x63,0x74,0x2d])+_0xac4b76(_0x539afb(_0x4739d4)),_0x11ae41=window[_0x444e43([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x444e43([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35e022);return _0x11ae41?window[_0x444e43([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2f6100(_0x11ae41),0x10)*_0x1c919e:null;}function _0x13d7af(_0x3d2e1f){return new window[(_0x444e43([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5d58ea,_0x4eb0cc)=>{_0x3d2e1f[_0x444e43([0x74,0x68,0x65,0x6e])](_0x5d58ea,_0x4eb0cc),window[_0x444e43([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4eb0cc,0x3d9041f^_0x2c385b);});}}_0x59a305[_0x444e43([0x6f,0x6e])](_0x444e43([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2a69e7,_0x4cfdef)=>{if(_0x4cfdef[0x0]!=_0x4739d4)return _0x24c0b9(_0x444e43([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4cfdef[0x1]={..._0x4cfdef[0x1],[_0x444e43([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x38fd94};},{[_0x444e43([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x444e43([0x68,0x69,0x67,0x68])}),_0x59a305[_0x444e43([0x6f,0x6e])](_0x444e43([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2e42ef=>{_0x5e0b52(_0x2e42ef[_0x444e43([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4a4c25=!0x0,_0x5cd0ec(_0x2e42ef[_0x444e43([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x444e43([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x444e43([0x6c,0x6f,0x77])}),_0x179d8d[_0x444e43([0x74,0x68,0x65,0x6e])](()=>{_0x4a4c25||_0x24c0b9(_0x444e43([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4af5f8(){return _0x59a305[_0x444e43([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x444e43([0x76,0x69,0x65,0x77])][_0x444e43([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x444e43([0x61,0x75,0x74,0x6f]);}function _0x355ac7(){_0x59a305[_0x444e43([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x444e43([0x76,0x69,0x65,0x77])][_0x444e43([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x444e43([0x61,0x75,0x74,0x6f]);}}function _0xe329e6(_0x276b9e){const _0x5b43c8=[new window[(_0x444e43([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a91fb=>setTimeout(_0x3a91fb,0x3d1ee13^_0x2c385b)),_0x179d8d[_0x444e43([0x74,0x68,0x65,0x6e])](()=>new window[(_0x444e43([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44f157=>{let _0x3d70fa=0x0;_0x59a305[_0x444e43([0x6d,0x6f,0x64,0x65,0x6c])][_0x444e43([0x6f,0x6e])](_0x444e43([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2ae482,_0xe38b3e)=>{_0xe38b3e[0x0][_0x444e43([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3d70fa++,_0x3d70fa==(0x3d8d127^_0x2c385b)&&(_0x44f157(),_0x2ae482[_0x444e43([0x6f,0x66,0x66])]());});}))];return window[_0x444e43([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x444e43([0x72,0x61,0x63,0x65])](_0x5b43c8)[_0x444e43([0x74,0x68,0x65,0x6e])](()=>_0x276b9e);}async function _0x10bfc2(){await _0x179d8d,_0x59a305[_0x444e43([0x6d,0x6f,0x64,0x65,0x6c])][_0x444e43([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x34c02f,_0x59a305[_0x444e43([0x6d,0x6f,0x64,0x65,0x6c])][_0x444e43([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x34c02f,_0x59a305[_0x444e43([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x444e43([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2f7d8b(_0x31adc2){const _0x5dc90e=_0x1eb9ec();_0x59a305[_0x5dc90e]=_0x444e43([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x31adc2,_0x31adc2!=_0x444e43([0x56,0x61,0x6c,0x69,0x64])&&_0x10bfc2();}function _0x1eb9ec(){const _0x53df37=window[_0x444e43([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x444e43([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x444e43([0x6e,0x6f,0x77])]())[_0x444e43([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x444e43([0x2e]),'');let _0x3b7ab2=_0x444e43([0x52]);for(let _0x353dc9=0x0;_0x353dc9<_0x53df37[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x353dc9+=0x2){let _0x113d7a=window[_0x444e43([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53df37[_0x444e43([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x353dc9,_0x353dc9+0x2));_0x113d7a>=_0x54af5d[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x113d7a-=_0x54af5d[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b7ab2+=_0x54af5d[_0x113d7a];}return _0x3b7ab2;}function _0x21fe5f(){const _0x3e4c97=_0x159afa[_0x444e43([0x73,0x70,0x6c,0x69,0x74])](_0x444e43([0x2e]));if(0x3!=_0x3e4c97[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x387511(_0x3e4c97[0x1]);function _0x387511(_0x4cc489){const _0x20c3ee=_0x15f91f(_0x4cc489);return _0x20c3ee&&_0x541fff()?_0x20c3ee:null;function _0x541fff(){const _0x57f975=_0x20c3ee[_0x444e43([0x6a,0x74,0x69])],_0x1a7609=window[_0x444e43([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57f975[_0x444e43([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57f975[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x282bc7={..._0x20c3ee,[_0x444e43([0x6a,0x74,0x69])]:_0x57f975[_0x444e43([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x57f975[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x282bc7[_0x444e43([0x76,0x63])],_0x539afb(_0x282bc7)==_0x1a7609;}}}async function _0x4c2b67(){let _0x23da28=!0x0;try{const _0x4b85e8=_0x159afa[_0x444e43([0x73,0x70,0x6c,0x69,0x74])](_0x444e43([0x2e])),[_0x2d9d8e,_0x27073e,_0x4f62a2]=_0x4b85e8;return _0x3d38a9(_0x2d9d8e),await _0x503e29(_0x2d9d8e,_0x27073e,_0x4f62a2),_0x23da28;}catch{return!0x1;}function _0x3d38a9(_0x354afb){const _0x2440f6=_0x15f91f(_0x354afb);_0x2440f6&&_0x2440f6[_0x444e43([0x61,0x6c,0x67])]==_0x444e43([0x45,0x53,0x32,0x35,0x36])||(_0x23da28=!0x1);}async function _0x503e29(_0x3d05ef,_0x298d5c,_0x5b5fc0){const _0x1ad817=window[_0x444e43([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x444e43([0x66,0x72,0x6f,0x6d])](_0x5b300c(_0x5b5fc0),_0x3de1d3=>_0x3de1d3[_0x444e43([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x419ff1=new window[(_0x444e43([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x444e43([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3d05ef+_0x444e43([0x2e])+_0x298d5c),_0x2691e6=window[_0x444e43([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x444e43([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2691e6)return;const _0x2e4834=await _0x2691e6[_0x444e43([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x444e43([0x6a,0x77,0x6b]),_0x554673,{[_0x444e43([0x6e,0x61,0x6d,0x65])]:_0x444e43([0x45,0x43,0x44,0x53,0x41]),[_0x444e43([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x444e43([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x444e43([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2691e6[_0x444e43([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x444e43([0x6e,0x61,0x6d,0x65])]:_0x444e43([0x45,0x43,0x44,0x53,0x41]),[_0x444e43([0x68,0x61,0x73,0x68])]:{[_0x444e43([0x6e,0x61,0x6d,0x65])]:_0x444e43([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2e4834,_0x1ad817,_0x419ff1)||(_0x23da28=!0x1);}}function _0x15f91f(_0x4f6535){return _0x4f6535[_0x444e43([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x444e43([0x65,0x79]))?JSON[_0x444e43([0x70,0x61,0x72,0x73,0x65])](_0x5b300c(_0x4f6535)):null;}function _0x5b300c(_0x3d1d71){return window[_0x444e43([0x61,0x74,0x6f,0x62])](_0x3d1d71[_0x444e43([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x444e43([0x2b]))[_0x444e43([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x444e43([0x2f])));}function _0x539afb(_0x435d55){let _0x255102=0x1505;function _0x471d8e(_0x23fa82){for(let _0x1cc0e6=0x0;_0x1cc0e6<_0x23fa82[_0x444e43([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1cc0e6++){const _0x573589=_0x23fa82[_0x444e43([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1cc0e6);_0x255102=(_0x255102<<0x5)+_0x255102+_0x573589,_0x255102&=_0x255102;}}function _0x1ebdf8(_0x10f3d9){Array[_0x444e43([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x10f3d9)?_0x10f3d9[_0x444e43([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1ebdf8):_0x10f3d9&&typeof _0x10f3d9==_0x444e43([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x444e43([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x10f3d9)[_0x444e43([0x73,0x6f,0x72,0x74])]()[_0x444e43([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2e2010,_0x5ba898])=>{_0x471d8e(_0x2e2010),_0x1ebdf8(_0x5ba898);}):_0x471d8e(window[_0x444e43([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x10f3d9));}return _0x1ebdf8(_0x435d55),_0x255102>>>0x0;}function _0xac4b76(_0x2a3d3e){return _0x2a3d3e[_0x444e43([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x444e43([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x444e43([0x30]));}function _0x2f6100(_0x4fd2c4){return _0x4fd2c4[_0x444e43([0x73,0x70,0x6c,0x69,0x74])]('')[_0x444e43([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x444e43([0x6a,0x6f,0x69,0x6e])]('');}function _0x34c02f(){}function _0x444e43(_0xce3ff5){return _0xce3ff5['map'](_0x3c53b7=>String['fromCharCode'](_0x3c53b7))['join']('');}_0x2f7d8b(await _0x76f601());}(this);}['_initSchema'](){const _0x207d8f=this['editor']['model']['schema'];_0x207d8f['isRegistered']('imageBlock')&&_0x207d8f['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x207d8f['isRegistered']('imageInline')&&_0x207d8f['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x44e1c4=this['editor'];_0x44e1c4['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x44e1c4['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x57c373=>_0x57c373['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x230b71=_0x44e1c4['commands']['get']('replaceImageSource');_0x230b71&&this['listenTo'](_0x230b71,'cleanupImage',(_0x19de94,[_0x5f289e,_0x50f399])=>{_0x5f289e['removeAttribute']('uploadcareImageId',_0x50f399);});}['_initConfig'](){const _0x20d853=this['editor']['config']['get']('uploadcare.uploader')||{},_0x170e40=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x2bff64(_0x7d8c4c['document'],'uc-config',{..._0x20d853,'pubkey':_0x170e40,'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']=_0x55c299=>{if('closeMax'==_0x55c299)return'#uc-icon-arrow-down';},_0x7d8c4c['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x2bff64(_0x7d8c4c['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x7d8c4c['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x4846cb=this['editor']['commands']['get']('insertImage');_0x4846cb&&this['listenTo'](_0x4846cb,'execute',()=>{const _0x5d6a19=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5d6a19&&_0x5d6a19['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x5d6a19);});});const _0x427112=this['editor']['commands']['get']('uploadcareImageReplace');_0x427112&&this['listenTo'](_0x427112,'execute',()=>{const _0x380791=this['editor']['model']['document']['selection']['getSelectedElement']();_0x380791&&_0x380791['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x380791);});});}}class tt extends _0x3c8b09{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x451f79){super(_0x451f79),_0x451f79['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x12dac6['defineComponents'](_0x12dac6);}}class ii extends _0x393d6c{constructor(_0x568b0d){super(_0x568b0d);const t=_0x568b0d['t'],_0x441911=this['bindTemplate'],_0x2cf6da=new _0x53c3b2();_0x2cf6da['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':[_0x2cf6da,{'text':_0x441911['to']('imageUploadProgress',_0x2e7c27=>t('Loading\x20image...')+'\x20('+(_0x2e7c27||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 _0x393d6c{constructor(_0x4babbf){super(_0x4babbf);const t=_0x4babbf['t'];this['set']('errorType',null);const _0x31265c=new _0x31ddd8(_0x4babbf);_0x31265c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x31265c['withText']=!0x0,_0x31265c['class']='ck-button-action',_0x31265c['on']('execute',()=>{this['fire']('retry');}),_0x31265c['bind']('isVisible')['to'](this,'errorType',_0xa12389=>'NotFound'!==_0xa12389);const _0x53d1a4=new _0x5baf03();_0x53d1a4['content']=_0x5cfd40,_0x53d1a4['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3c22de=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':[_0x53d1a4,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3c22de['to']('errorType',_0x2a3588=>t('NotFound'!==_0x2a3588?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x31265c]},{'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 _0x393d6c{constructor(_0x228622,_0x3793cc){super(_0x228622);const _0x1d1568=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x3793cc,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x1d1568['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x42e5c0,_0xe018ea,_0x52a435){super(_0x42e5c0),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x42e5c0),this['_errorView']=new ti(_0x42e5c0),this['_editingView']=new ei(_0x42e5c0,_0x52a435),this['_focusableView']=new _0x393d6c(_0x42e5c0),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0xe018ea),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'],_0x5a43ee=>{this['_addUploadcareImageEditorListeners'](_0x5a43ee);});}),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'](_0x1fc1ec,_0x39ecf6){const _0x5cb422='uc-cloud-image-editor',_0x2145c4=_0x1fc1ec['querySelector'](_0x5cb422);if(_0x2145c4)return _0x39ecf6(_0x2145c4);const _0x23908f=new MutationObserver(_0xeb8103=>{const _0x4fffb5=_0xeb8103['filter'](_0x11a103=>_0x11a103['target']===_0x1fc1ec&&_0x11a103['addedNodes']['length']>0x0&&_0x11a103['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5cb422);_0x4fffb5['length']&&(_0x23908f['disconnect'](),_0x39ecf6(_0x4fffb5[0x0]['addedNodes'][0x0]));});_0x23908f['observe'](_0x1fc1ec,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x67f6f0){_0x67f6f0['addEventListener']('apply',_0xe8f024=>{this['fire']('apply',{'imageSrc':_0xe8f024['detail']['cdnUrl']});}),_0x67f6f0['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
- _0x4c7309(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x27ef18,_0xb7b65b,_0x537642){super(),this['_editor']=_0x27ef18,this['_dialog']=_0xb7b65b,this['_imageElement']=_0x537642,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 _0x32271c=this['_imageElement'],_0x9802eb=_0x32271c['getAttribute']('uploadcareImageId'),_0x32851c=_0x32271c['getAttribute']('src');if(_0x9802eb)await this['_loadImageInfo'](_0x9802eb,_0x32851c);else{if(this['_imageCache']['has'](_0x32851c)){const _0x170c9b=this['_imageCache']['get'](_0x32851c);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x170c9b['url'],this['imageDimension']=_0x170c9b['dimension'],this['imageId']=_0x170c9b['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x37667f}=this['_editor'],t=_0x37667f['t'],_0x2a0b4f=new X(_0x37667f,this['imageStatus'],this['_attributes']);_0x2a0b4f['bind']('status')['to'](this,'imageStatus'),_0x2a0b4f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2a0b4f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2a0b4f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2a0b4f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1e534e,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2a0b4f,'position':_0xd31937['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2a0b4f['focus']();},'onHide':()=>{_0x2a0b4f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4a3484=>!A(_0x4a3484,_0x2a0b4f['element'])}});}['_loadImageInfo'](_0x421cc4,_0xe12ef6){return j['getInfo'](_0x421cc4,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x328311=>{const {width:_0x2bffec,height:_0x444981}=_0x328311['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xe12ef6,this['imageDimension']={'width':_0x2bffec,'height':_0x444981},this['imageId']=_0x421cc4;})['catch'](_0x3c0a16=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3c0a16['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1b0e5a,_0x2a9d04){return this['_getImageAsFile'](_0x1b0e5a)['then'](_0x1b8130=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x2a9d04['signal'],'file':_0x1b8130,'onProgress':_0x66354e=>{_0x66354e&&_0x66354e['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x66354e['value']));}}))['then'](_0x28bf7f=>{const {width:_0x429faa,height:_0x5c76a4}=_0x28bf7f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x28bf7f['cdnUrl'],this['imageDimension']={'width':_0x429faa,'height':_0x5c76a4},this['imageId']=_0x28bf7f['uuid'],this['imageUploadProgress']=null;const _0x2ff171=_0x1b0e5a['getAttribute']('src');this['_imageCache']['set'](_0x2ff171,{'id':_0x28bf7f['uuid'],'url':_0x28bf7f['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x15dfa9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x15dfa9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x48e80b,_0xdaa995){_0x48e80b['on']('apply',(_0x47cff0,_0x72e2a5)=>{this['_replaceImage'](_0xdaa995,_0x72e2a5['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x48e80b['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x48e80b['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1caf08,_0x4a6455,_0x3e2944){const _0x1146fc=this['_editor'],{width:_0x20a4dd,height:_0x18d08b}=S(_0x4a6455,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4be2b1,imageSources:_0x51934a}=C(_0x4a6455,_0x20a4dd);_0x1146fc['model']['change'](_0x38b6d2=>{if('$graveyard'===_0x1caf08['root']['rootName']){_0x1146fc['execute']('insertImage',{'imageType':_0x1caf08['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1caf08['getAttributes']()),'uploadcareImageId':_0x3e2944,'src':_0x4be2b1,'sources':_0x51934a,'width':_0x20a4dd,'height':_0x18d08b}});const _0x480705=_0x1caf08['getChildren']();_0x1caf08=_0x1146fc['model']['document']['selection']['getSelectedElement']();for(const _0x49b846 of _0x480705)_0x38b6d2['append'](_0x38b6d2['cloneElement'](_0x49b846),_0x1caf08);}else _0x38b6d2['setSelection'](_0x1caf08,'on'),_0x1146fc['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1caf08['getAttributes']()),'uploadcareImageId':_0x3e2944,'src':_0x4be2b1,'sources':_0x51934a,'width':_0x20a4dd,'height':_0x18d08b},_0x1caf08);_0x38b6d2['setSelection'](_0x1caf08,'on');});}async['_getImageAsFile'](_0x312ecf){const _0x48d8ff=_0x7d8c4c['window'],_0x1d02f5=_0x7d8c4c['document']['location']['href'],_0x1b94e3=new _0x48d8ff['URL'](_0x312ecf['getAttribute']('src'),_0x1d02f5);if('data:'===_0x1b94e3['protocol']){const _0x67150f=_0x1b94e3['href']['split'](','),_0x1ab393=_0x67150f[0x0]['match'](/:(.*?);/)[0x1],_0x347ae0=_0x1ab393['split']('/')[0x1],_0x44ee0e=_0x48d8ff['atob'](_0x67150f[_0x67150f['length']-0x1]);let _0x549bf5=_0x44ee0e['length'];const _0x449e6e=new _0x48d8ff['Uint8Array'](_0x549bf5);for(;_0x549bf5--;)_0x449e6e[_0x549bf5]=_0x44ee0e['charCodeAt'](_0x549bf5);return new _0x48d8ff['File']([_0x449e6e],'image.'+_0x347ae0,{'type':_0x1ab393});}const _0x2e2567=_0x1b94e3['href']['split']('/'),_0x539119=_0x2e2567[_0x2e2567['length']-0x1],_0x512a14=_0x539119['split']('.')[0x1];return _0x48d8ff['fetch'](_0x1b94e3['href'])['then'](_0x21edfb=>_0x21edfb['clone']()['blob']())['then'](_0x1af2ed=>new _0x48d8ff['File']([_0x1af2ed],_0x539119,{'type':'image/'+_0x512a14}));}}class O extends _0x1e9b14{['imageEditController'];static get['requires'](){return[_0x563fe3];}['_isEditable'];constructor(_0x3e731b){super(_0x3e731b),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x578d84){const _0x14f708=G(_0x578d84);return _0x3738cd=>!(!_0x3738cd||!_0x3738cd['is']('element','imageBlock')&&!_0x3738cd['is']('element','imageInline'))&&(!!_0x3738cd['hasAttribute']('uploadcareImageId')||!!_0x3738cd['hasAttribute']('src')&&_0x14f708(_0x3738cd['getAttribute']('src')));}(_0x3e731b['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x54d3ab=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x54d3ab);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5764eb=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5764eb&&(_0x5764eb['is']('element','imageBlock')||_0x5764eb['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x563fe3),_0x5764eb),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x1e9b14{['refresh'](){const _0x13d67b=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x13d67b&&(_0x13d67b['is']('element','imageBlock')||_0x13d67b['is']('element','imageInline')));}['execute'](_0x213600){const _0x41edb1=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x152514=>{_0x152514['setAttributes'](_0x213600,_0x41edb1),_0x152514['removeAttribute']('srcset',_0x41edb1),_0x152514['removeAttribute']('sizes',_0x41edb1);});}}class m extends _0x3c8b09{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2f4c69,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xbd5611}=this;_0xbd5611['commands']['add']('uploadcareImageEdit',new O(_0xbd5611)),_0xbd5611['commands']['add']('uploadcareImageReplace',new R(_0xbd5611));}}class g extends _0x3c8b09{['_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 _0x17daf2=this['editor'];_0x17daf2['ui']['componentFactory']['add']('uploadcareImageEdit',_0x54aacf=>{const _0x5bc164=_0x17daf2['commands']['get']('uploadcareImageEdit'),_0x5852f1=new _0x31ddd8(_0x54aacf),t=_0x54aacf['t'];return _0x5852f1['set']({'icon':_0x1e534e,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x5852f1['bind']('isEnabled')['to'](_0x5bc164),_0x5852f1['bind']('isOn')['to'](_0x5bc164,'isActive'),this['listenTo'](_0x5852f1,'execute',()=>{_0x17daf2['execute']('uploadcareImageEdit'),_0x17daf2['editing']['view']['focus']();}),_0x5852f1;}),this['_initConfig']();}['_initConfig'](){const _0x5258b1=_0x2bff64(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5258b1),this['listenTo'](this['editor'],'destroy',()=>{_0x5258b1['remove']();});}}class et extends _0x3c8b09{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 _0x34f025,Command as _0x542e6d}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2bfdf4,IconGooglePhotos as _0x1ae181,IconGoogleDrive as _0x11b8d8,IconFacebook as _0x4b98c3,IconDropbox as _0x429150,IconUploadcareLink as _0x241afa,IconUploadcareImageUpload as _0x11b2c0,IconError as _0x5abe47,IconUploadcareImageEdit as _0x554d30}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x228f39,MenuBarMenuListItemButtonView as _0x47545f,View as _0x2e1cc4,FocusCycler as _0x245ff7,Dialog as _0x2b0a49,DialogViewPosition as _0x3a6281,SpinnerView as _0x215c5e,IconView as _0x18f700,Notification as _0x22b418}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x343b6e,DomEmitterMixin as _0x32cb15,global as _0x458d72,getAncestors as _0x8fa56b,ObservableMixin as _0x2540e3,uid as _0x1c7a19,createElement as _0x53d32b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2d80ff}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x448dfa,info as _0x280e9f}from'@uploadcare/upload-client';import*as _0x3bbf06 from'@uploadcare/file-uploader';var i=function(_0x4fbab5){return _0x4fbab5['Local']='local',_0x4fbab5['URL']='url',_0x4fbab5['Dropbox']='dropbox',_0x4fbab5['GDrive']='gdrive',_0x4fbab5['Facebook']='facebook',_0x4fbab5['GPhotos']='gphotos',_0x4fbab5['OneDrive']='onedrive',_0x4fbab5;}({});function _(_0x4c1f8a,_0x204aae,_0x1f9cb7){const t=_0x4c1f8a['t'],_0x38c85d=_0x4c1f8a['t'];switch(_0x204aae){case i['Local']:return{'text':_0x38c85d('Insert'===_0x1f9cb7?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x38c85d('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x1f9cb7?_0x38c85d('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x38c85d('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x1f9cb7?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x1f9cb7?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x1f9cb7?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x1f9cb7?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x1f9cb7?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x204aae;}}class e extends _0x34f025{['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 _0x190b32=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1936d4;for(const _0x95131a in _0x190b32){const _0x244475=_0x95131a,_0x4e9b27=_0x190b32[_0x244475];if('uploadcareLicenseKeyValid'==_0x4e9b27||'uploadcareLicenseKeyInvalid'==_0x4e9b27||'uploadcareLicenseKeyExpired'==_0x4e9b27||'uploadcareLicenseKeyDomainLimit'==_0x4e9b27||'uploadcareLicenseKeyNotAllowed'==_0x4e9b27||'uploadcareLicenseKeyEvaluationLimit'==_0x4e9b27||'uploadcareLicenseKeyTrialLimit'==_0x4e9b27||'uploadcareLicenseKeyUsageLimit'==_0x4e9b27){delete _0x190b32[_0x244475],_0x1936d4=_0x4e9b27,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x1936d4&&_0x190b32['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x1936d4&&_0x190b32['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x1936d4&&_0x190b32['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x1936d4&&_0x190b32['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x1936d4&&_0x190b32['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x1936d4&&_0x190b32['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x1936d4&&_0x190b32['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x3ec704}=this,_0x460dc3=_0x3ec704['commands']['get']('uploadcare');if(!_0x460dc3)return;const _0xdb3ed8=this['_normalizeConfigSourceList'](_0x3ec704['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x199b58,_0xc9f2c8)=>{const _0x510bdf=this['_getIntegrationKey'](_0xc9f2c8['type']);return _0x199b58[_0x510bdf]||(_0x199b58[_0x510bdf]=[]),_0x199b58[_0x510bdf]['push'](_0xc9f2c8),_0x199b58;},{});_0x3ec704['plugins']['has']('ImageInsertUI')&&_0x3ec704['commands']['get']('uploadcare')&&Object['entries'](_0xdb3ed8)['forEach'](([_0x38bf18,_0x4ef695])=>{_0x3ec704['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x38bf18,'observable':()=>_0x460dc3,'buttonViewCreator':()=>this['_createToolbarButton'](_0x4ef695),'formViewCreator':()=>this['_createDropdownButtons'](_0x4ef695),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x4ef695),'override':'assetManager'!==_0x38bf18});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x1b707d){const {locale:_0x198f9d}=this['editor'];return _0x1b707d['map'](_0x47ad6f=>{const _0x1d1a7b=_(_0x198f9d,_0x47ad6f,'Insert');switch(_0x47ad6f){case i['Local']:return{'icon':_0x11b2c0,'type':i['Local'],..._0x1d1a7b};case i['URL']:return{'icon':_0x241afa,'type':i['URL'],..._0x1d1a7b};case i['Dropbox']:return{'icon':_0x429150,'type':i['Dropbox'],..._0x1d1a7b};case i['Facebook']:return{'icon':_0x4b98c3,'type':i['Facebook'],..._0x1d1a7b};case i['GDrive']:return{'icon':_0x11b8d8,'type':i['GDrive'],..._0x1d1a7b};case i['GPhotos']:return{'icon':_0x1ae181,'type':i['GPhotos'],..._0x1d1a7b};case i['OneDrive']:return{'icon':_0x2bfdf4,'type':i['OneDrive'],..._0x1d1a7b};}});}['_getIntegrationKey'](_0x252f1f){switch(_0x252f1f){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0xaeb89c,_0x93a9d8){const _0xa8c5ed=this['editor'],_0x1f3ad3=new _0xaeb89c(_0xa8c5ed['locale']),_0x456105=_0xa8c5ed['commands']['get']('uploadcare');return _0x1f3ad3['bind']('isEnabled')['to'](_0x456105),_0x1f3ad3['on']('execute',()=>{_0x456105['execute'](_0x93a9d8);}),_0x1f3ad3;}['_createToolbarButton'](_0x37124d){const {locale:_0x292fb7}=this['editor'],_0x26e26f=this['editor']['plugins']['get']('ImageInsertUI'),_0x4039b8=_0x37124d[0x0],_0x347120=this['_createButton'](_0x228f39,_0x4039b8['type']);return _0x347120['icon']=_0x4039b8['icon'],_0x347120['bind']('label')['to'](_0x26e26f,'isImageSelected',_0x48cc20=>_(_0x292fb7,_0x4039b8['type'],_0x48cc20?'Replace':'Insert')['text']),_0x347120['tooltip']=!0x0,_0x347120;}['_createDropdownButtons'](_0x566fb4){const {locale:_0x285a72}=this['editor'],_0x6f7cf4=this['editor']['plugins']['get']('ImageInsertUI');return _0x566fb4['map'](_0x4814e5=>{const _0x112c09=this['_createButton'](_0x228f39,_0x4814e5['type']);return _0x112c09['withText']=!0x0,_0x112c09['icon']=_0x4814e5['icon'],_0x112c09['bind']('label')['to'](_0x6f7cf4,'isImageSelected',_0x2e69e2=>_(_0x285a72,_0x4814e5['type'],_0x2e69e2?'Replace':'Insert')['text']),_0x112c09;});}['_createMenuBarButtons'](_0x176514){return _0x176514['map'](_0x1b6624=>{const _0x11d660=this['_createButton'](_0x47545f,_0x1b6624['type']);return _0x11d660['icon']=_0x1b6624['icon'],_0x11d660['label']=_0x1b6624['shortText'],_0x11d660;});}}class F extends _0x2e1cc4{['focusTracker'];['focusCycler'];constructor(_0x1cafef){super(_0x1cafef),this['focusTracker']=new _0x343b6e(),this['focusCycler']=new _0x245ff7({'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(_0x11c51a,_0x3bd0cf){super(_0x11c51a),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-'+_0x3bd0cf}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x3d4963,_0x79cc32){const _0x1546e5=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x5ab871=>_0x5ab871<=_0x79cc32)['map'](_0x49e6c9=>_0x3d4963['replace'](/\/$/,'')+'/-/resize/'+_0x49e6c9+'x/\x20'+_0x49e6c9+'w');return{'imageFallbackUrl':_0x3d4963,'imageSources':[{'srcset':_0x1546e5['join'](',\x20'),'sizes':'(max-width:\x20'+_0x79cc32+'px)\x20100vw,\x20'+_0x79cc32+'px','type':'image/webp'}]};}function S(_0x285fab,_0x55beef,_0x2c1db8){const _0x148c46=_0x285fab['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x148c46?parseInt(_0x148c46[0x1],0xa):_0x55beef,'height':_0x148c46?parseInt(_0x148c46[0x2],0xa):_0x2c1db8};}function p(_0x4bd49c,_0x3283b9){const _0x119d46=new(_0x32cb15())(),_0x4cb2b0=_0x4bd49c['plugins']['get']('ImageUtils'),_0xe08b1c=_0x4bd49c['editing']['mapper']['toViewElement'](_0x3283b9),_0x31fd3a=_0x4cb2b0['findViewImgElement'](_0xe08b1c),_0x408e21=_0x4bd49c['editing']['view']['domConverter']['viewToDom'](_0x31fd3a),_0x2633e0=_0x3283b9['getAttribute']('width'),_0x242e0b=_0x3283b9['getAttribute']('height'),_0x503159='image-processing';_0x4bd49c['editing']['view']['change'](_0x31cec8=>{_0x31cec8['addClass'](_0x503159,_0xe08b1c),_0x31cec8['setStyle']('aspect-ratio',_0x2633e0+'/'+_0x242e0b,_0x31fd3a);}),_0x119d46['listenTo'](_0x408e21,'load',()=>{_0x119d46['stopListening'](_0x408e21,'load'),_0x4bd49c['editing']['view']['change'](_0x1772d4=>{_0x1772d4['removeClass'](_0x503159,_0xe08b1c),_0x1772d4['removeStyle']('aspect-ratio',_0x31fd3a);});});}function z(_0x204492){if(Array['isArray'](_0x204492)){const _0x92145e=_0x204492['map'](z);return _0x3729c7=>_0x92145e['some'](_0x396d2d=>_0x396d2d(_0x3729c7));}if('origin'==_0x204492){const _0x5d152c=_0x458d72['window']['location']['origin'];return _0x260fd2=>new URL(_0x260fd2,_0x458d72['document']['baseURI'])['origin']==_0x5d152c;}return'function'==typeof _0x204492?_0x204492:_0x204492 instanceof RegExp?_0x47235b=>!(!_0x47235b['match'](_0x204492)&&!_0x47235b['replace'](/^https?:\/\//,'')['match'](_0x204492)):()=>!0x1;}function A(_0x5cf51f,_0x5dc45d){return _0x8fa56b(_0x5cf51f['target'])['includes'](_0x5dc45d);}class n extends/* #__PURE__ -- @preserve */
24
+ _0x2540e3(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x35df50,_0x43c7ef,_0x11c865){super(),this['_editor']=_0x35df50,this['_editing']=_0x43c7ef,this['_dialog']=_0x35df50['plugins']['get'](_0x2b0a49),this['_api']=_0x43c7ef['ctxElement']['getAPI'](),this['_type']=_0x11c865,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:_0x2976e3,model:_0xda9e16}=this['_editor'],_0x8eedbd=_0xda9e16['document']['selection']['getSelectedElement'](),_0x65c7b3=_0x8eedbd&&(_0x8eedbd['is']('element','imageBlock')||_0x8eedbd['is']('element','imageInline'));this['_formView']=new x(_0x2976e3,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x11b2c0,'title':_(_0x2976e3,this['_type'],_0x65c7b3?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x3a6281['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xe7894b=>!A(_0xe7894b,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x46a6b5}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x5ab014=>{const _0x45e545=_0x46a6b5['length'];for(const _0x25bc85 of _0x46a6b5){const _0x5dd12d=_0x25bc85===_0x46a6b5[_0x45e545-0x1],{cdnUrl:_0x3f4726,fileInfo:_0x363a9e}=_0x25bc85;if(!_0x3f4726||!_0x363a9e)continue;const {width:_0x41671b,height:_0x4e43e0}=_0x363a9e['imageInfo'],_0x5de9d9=S(_0x3f4726,_0x41671b,_0x4e43e0),_0x5a9054=C(_0x3f4726,_0x5de9d9['width']),_0xf6da1b={'id':_0x363a9e['uuid'],'type':'image','attributes':{'imageDimension':_0x5de9d9,..._0x5a9054}};this['_insertAsset'](_0xf6da1b,_0x5dd12d,_0x5ab014);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x51d1db=>{'idle'===_0x51d1db['detail']['status']&&!_0x51d1db['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x505979,_0x35a327,_0x401d1d){const _0x5884b5=this['_editor']['model']['document']['selection'],_0x55a928=_0x5884b5['getSelectedElement'](),_0x1b092d=!(!_0x55a928||!_0x55a928['is']('element','imageInline'));_0x401d1d['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x505979,_0x1b092d),_0x35a327||_0x401d1d['setSelection'](_0x5884b5['getLastPosition']());}['_insertImage'](_0xb8c4bc,_0x5b54d7){const _0x2be962=this['_editor'],{imageDimension:_0x458133,imageFallbackUrl:_0x36fbaa,imageSources:_0x53751a}=_0xb8c4bc['attributes'];_0x2be962['execute']('insertImage',{'imageType':_0x5b54d7?'imageInline':null,'source':{'uploadcareImageId':_0xb8c4bc['id'],'src':_0x36fbaa,'sources':_0x53751a,..._0x458133}});}}class w extends _0x542e6d{['_editing'];['_controller']=null;static get['requires'](){return[_0x2b0a49,o];}constructor(_0x99f720){super(_0x99f720),this['_editing']=_0x99f720['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x16d212){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x16d212);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x2d27cc,..._0x517192}){return _0x448dfa(_0x2d27cc,_0x517192);}static['getInfo'](_0x411c89,_0x58bb61){return _0x280e9f(_0x411c89,_0x58bb61);}}class f extends _0x34f025{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2d80ff,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0xef2f0c=this['editor'];if(!!!_0xef2f0c['config']['get']('uploadcare'))return;_0xef2f0c['plugins']['get'](_0x2d80ff)['createUploadAdapter']=_0x5e52e7=>new k(_0x5e52e7,_0xef2f0c),_0xef2f0c['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x593b98,{imageElement:_0x123649,data:_0x3ca89a})=>{_0xef2f0c['model']['change'](_0x21ac81=>{_0x21ac81['setAttribute']('uploadcareImageId',_0x3ca89a['uploadcareImageId'],_0x123649);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x79fdb5,_0x2813b3){this['loader']=_0x79fdb5,this['editor']=_0x2813b3,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x21a007=await this['loader']['file'];return j['upload']({'file':_0x21a007,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x3bf22f=>{_0x3bf22f&&_0x3bf22f['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3bf22f['value']);}})['then'](async _0x55483f=>{const {imageFallbackUrl:_0x10fc41,imageSources:_0x5baf5a}=C(_0x55483f['cdnUrl'],_0x55483f['imageInfo']['width']);return{'uploadcareImageId':_0x55483f['uuid'],'default':_0x10fc41,'sources':_0x5baf5a};})['catch'](()=>{const _0x467494=t('Cannot\x20upload\x20file:')+('\x20'+_0x21a007['name']+'.');return Promise['reject'](_0x467494);});}['abort'](){this['controller']['abort']();}}class o extends _0x34f025{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x2b0a49];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0xce74a7){super(_0xce74a7),this['ucContextId']=_0x1c7a19();}['init'](){const _0x3e5aed=this['editor'];_0x3e5aed['commands']['add']('uploadcare',new w(_0x3e5aed));}['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 _0xcc5f6d=_0x458d72['document']['querySelector']('input[uploadcare-file-input]');_0xcc5f6d&&_0xcc5f6d['remove']();}),async function(_0x491f4e){const _0x470159=_0x4556ec([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]),_0x3d12cb=0x3d8d0df,_0x25d687=0x3dfa3af^_0x3d12cb,_0x272b9a=window[_0x4556ec([0x44,0x61,0x74,0x65])][_0x4556ec([0x6e,0x6f,0x77])](),_0x1f82f7=_0x491f4e[_0x4556ec([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x249ee9=new window[(_0x4556ec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x214358=>{_0x1f82f7[_0x4556ec([0x6f,0x6e,0x63,0x65])](_0x4556ec([0x72,0x65,0x61,0x64,0x79]),_0x214358);}),_0x2b1d44={[_0x4556ec([0x6b,0x74,0x79])]:_0x4556ec([0x45,0x43]),[_0x4556ec([0x75,0x73,0x65])]:_0x4556ec([0x73,0x69,0x67]),[_0x4556ec([0x63,0x72,0x76])]:_0x4556ec([0x50,0x2d,0x32,0x35,0x36]),[_0x4556ec([0x78])]:_0x4556ec([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]),[_0x4556ec([0x79])]:_0x4556ec([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]),[_0x4556ec([0x61,0x6c,0x67])]:_0x4556ec([0x45,0x53,0x32,0x35,0x36])},_0x33b998=_0x1f82f7[_0x4556ec([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4556ec([0x67,0x65,0x74])](_0x4556ec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x32ff8e(){let _0x5ef567,_0x576545=null,_0x3c56fb=null;try{if(_0x33b998==_0x4556ec([0x47,0x50,0x4c]))return _0x4556ec([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5ef567=_0x1367d1(),!_0x5ef567)return _0x4556ec([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5ef567[_0x4556ec([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3c56fb=_0x25e891(_0x5ef567[_0x4556ec([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5ef567[_0x4556ec([0x6a,0x74,0x69])])),await _0x3dab89()?_0x1c97af()?_0xff76a6()?_0x4556ec([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2900ba()?(_0x5ef567[_0x4556ec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4556ec([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x576545=_0x2790f9(_0x4556ec([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5ef567[_0x4556ec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4556ec([0x74,0x72,0x69,0x61,0x6c])&&(_0x576545=_0x2790f9(_0x4556ec([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xa273e5()):_0x4556ec([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4556ec([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4556ec([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4556ec([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xff76a6(){const _0x3088a9=[_0x4556ec([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4556ec([0x74,0x72,0x69,0x61,0x6c])][_0x4556ec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ef567[_0x4556ec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x272b9a/0x3e8:0xe10*_0x25d687;return _0x5ef567[_0x4556ec([0x65,0x78,0x70])]<_0x3088a9;}function _0x1c97af(){const _0x2a0b41=_0x5ef567[_0x4556ec([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2a0b41&&(!!_0x2a0b41[_0x4556ec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4556ec([0x2a]))||!!_0x2a0b41[_0x4556ec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4556ec([0x55,0x50,0x4c,0x43])));}function _0x2900ba(){const _0x1bae95=_0x5ef567[_0x4556ec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1bae95||0x0==_0x1bae95[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xd75bd7}=new URL(window[_0x4556ec([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1bae95[_0x4556ec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd75bd7))return!0x0;const _0x2a20a2=_0xd75bd7[_0x4556ec([0x73,0x70,0x6c,0x69,0x74])](_0x4556ec([0x2e]));return _0x1bae95[_0x4556ec([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e40ff=>_0x1e40ff[_0x4556ec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4556ec([0x2a])))[_0x4556ec([0x6d,0x61,0x70])](_0x33e5ff=>_0x33e5ff[_0x4556ec([0x73,0x70,0x6c,0x69,0x74])](_0x4556ec([0x2e])))[_0x4556ec([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x6eaeb8=>_0x6eaeb8[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2a20a2[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4556ec([0x6d,0x61,0x70])](_0x49b42d=>Array(_0x2a20a2[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x49b42d[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4556ec([0x66,0x69,0x6c,0x6c])](_0x49b42d[0x0]===_0x4556ec([0x2a])?_0x4556ec([0x2a]):'')[_0x4556ec([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x49b42d))[_0x4556ec([0x73,0x6f,0x6d,0x65])](_0x8efdf5=>_0x2a20a2[_0x4556ec([0x65,0x76,0x65,0x72,0x79])]((_0xb2ee69,_0xdb201e)=>_0x8efdf5[_0xdb201e]===_0xb2ee69||_0x8efdf5[_0xdb201e]===_0x4556ec([0x2a])));}function _0xa273e5(){return _0x576545&&_0x3c56fb?new window[(_0x4556ec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x48e8ed,_0x298018)=>{_0x576545[_0x4556ec([0x74,0x68,0x65,0x6e])](_0x48e8ed,_0x298018),_0x3c56fb[_0x4556ec([0x74,0x68,0x65,0x6e])](_0x634a42=>{_0x634a42!=_0x4556ec([0x56,0x61,0x6c,0x69,0x64])&&_0x48e8ed(_0x634a42);},_0x298018);}):_0x576545||_0x3c56fb||_0x4556ec([0x56,0x61,0x6c,0x69,0x64]);}}function _0x25e891(_0xcce32a,_0x44d6f6){return new window[(_0x4556ec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x336e11=>{if(_0x410887())return _0x336e11(_0x4556ec([0x56,0x61,0x6c,0x69,0x64]));_0x676cfb(),_0x1f82f7[_0x4556ec([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4556ec([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x24916b=!0x1;const _0x48f055=_0x1c7a19();function _0x3b27a5(_0xa4dc75){return!!_0xa4dc75&&(typeof _0xa4dc75===_0x4556ec([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xa4dc75===_0x4556ec([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xa4dc75[_0x4556ec([0x74,0x68,0x65,0x6e])]===_0x4556ec([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xa4dc75[_0x4556ec([0x63,0x61,0x74,0x63,0x68])]===_0x4556ec([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1c3c80(_0x2fe798){_0x596a2f(_0x2fe798)[_0x4556ec([0x74,0x68,0x65,0x6e])](_0x4d2e89=>{if(!_0x4d2e89||_0x4d2e89[_0x4556ec([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4556ec([0x6f,0x6b]))return _0x4556ec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5107b1(_0x2f22d8(_0x48f055+_0x44d6f6))!=_0x4d2e89[_0x4556ec([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4556ec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4556ec([0x56,0x61,0x6c,0x69,0x64]);})[_0x4556ec([0x74,0x68,0x65,0x6e])](_0x22097a=>(_0x225878(),_0x22097a),()=>{const _0x415161=_0x516b36();return null==_0x415161?(_0x225878(),_0x4556ec([0x56,0x61,0x6c,0x69,0x64])):_0x4556ec(_0x272b9a-_0x415161>(0x27d454df^_0x3d12cb)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4556ec([0x74,0x68,0x65,0x6e])](_0x336e11)[_0x4556ec([0x63,0x61,0x74,0x63,0x68])](()=>{_0x336e11(_0x4556ec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x44af38=0x3ee3e5f^_0x3d12cb;function _0x225878(){const _0x1616bd=_0x4556ec([0x6c,0x6c,0x63,0x74,0x2d])+_0x5107b1(_0x2f22d8(_0xcce32a)),_0x1d7e63=_0x2c052f(_0x5107b1(window[_0x4556ec([0x4d,0x61,0x74,0x68])][_0x4556ec([0x63,0x65,0x69,0x6c])](_0x272b9a/_0x44af38)));window[_0x4556ec([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4556ec([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1616bd,_0x1d7e63);}function _0x516b36(){const _0x5d2e31=_0x4556ec([0x6c,0x6c,0x63,0x74,0x2d])+_0x5107b1(_0x2f22d8(_0xcce32a)),_0x36fa7b=window[_0x4556ec([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4556ec([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5d2e31);return _0x36fa7b?window[_0x4556ec([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c052f(_0x36fa7b),0x10)*_0x44af38:null;}function _0x596a2f(_0x218f65){return new window[(_0x4556ec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4402a5,_0x55ad17)=>{_0x218f65[_0x4556ec([0x74,0x68,0x65,0x6e])](_0x4402a5,_0x55ad17),window[_0x4556ec([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x55ad17,0x3d9041f^_0x3d12cb);});}}_0x1f82f7[_0x4556ec([0x6f,0x6e])](_0x4556ec([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4d627a,_0x1fbe63)=>{if(_0x1fbe63[0x0]!=_0xcce32a)return _0x336e11(_0x4556ec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1fbe63[0x1]={..._0x1fbe63[0x1],[_0x4556ec([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x48f055};},{[_0x4556ec([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4556ec([0x68,0x69,0x67,0x68])}),_0x1f82f7[_0x4556ec([0x6f,0x6e])](_0x4556ec([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4bb709=>{_0x3b27a5(_0x4bb709[_0x4556ec([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x24916b=!0x0,_0x1c3c80(_0x4bb709[_0x4556ec([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4556ec([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4556ec([0x6c,0x6f,0x77])}),_0x249ee9[_0x4556ec([0x74,0x68,0x65,0x6e])](()=>{_0x24916b||_0x336e11(_0x4556ec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x410887(){return _0x1f82f7[_0x4556ec([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4556ec([0x76,0x69,0x65,0x77])][_0x4556ec([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4556ec([0x61,0x75,0x74,0x6f]);}function _0x676cfb(){_0x1f82f7[_0x4556ec([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4556ec([0x76,0x69,0x65,0x77])][_0x4556ec([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4556ec([0x61,0x75,0x74,0x6f]);}}function _0x2790f9(_0x28003e){const _0x2822c5=[new window[(_0x4556ec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f6899=>setTimeout(_0x3f6899,0x3d1ee13^_0x3d12cb)),_0x249ee9[_0x4556ec([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4556ec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26dcf7=>{let _0x2d2e5a=0x0;_0x1f82f7[_0x4556ec([0x6d,0x6f,0x64,0x65,0x6c])][_0x4556ec([0x6f,0x6e])](_0x4556ec([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2435a9,_0xcc6691)=>{_0xcc6691[0x0][_0x4556ec([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2d2e5a++,_0x2d2e5a==(0x3d8d127^_0x3d12cb)&&(_0x26dcf7(),_0x2435a9[_0x4556ec([0x6f,0x66,0x66])]());});}))];return window[_0x4556ec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4556ec([0x72,0x61,0x63,0x65])](_0x2822c5)[_0x4556ec([0x74,0x68,0x65,0x6e])](()=>_0x28003e);}async function _0x567ea7(){await _0x249ee9,_0x1f82f7[_0x4556ec([0x6d,0x6f,0x64,0x65,0x6c])][_0x4556ec([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x32ceb8,_0x1f82f7[_0x4556ec([0x6d,0x6f,0x64,0x65,0x6c])][_0x4556ec([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x32ceb8,_0x1f82f7[_0x4556ec([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4556ec([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x195cf5(_0x3f4bf2){const _0x110e7d=_0x205f3b();_0x1f82f7[_0x110e7d]=_0x4556ec([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3f4bf2,_0x3f4bf2!=_0x4556ec([0x56,0x61,0x6c,0x69,0x64])&&_0x567ea7();}function _0x205f3b(){const _0x5e55db=window[_0x4556ec([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4556ec([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4556ec([0x6e,0x6f,0x77])]())[_0x4556ec([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4556ec([0x2e]),'');let _0xeb18a7=_0x4556ec([0x52]);for(let _0x4cd5f7=0x0;_0x4cd5f7<_0x5e55db[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4cd5f7+=0x2){let _0x4cc2ba=window[_0x4556ec([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e55db[_0x4556ec([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4cd5f7,_0x4cd5f7+0x2));_0x4cc2ba>=_0x470159[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4cc2ba-=_0x470159[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xeb18a7+=_0x470159[_0x4cc2ba];}return _0xeb18a7;}function _0x1367d1(){const _0x11dab1=_0x33b998[_0x4556ec([0x73,0x70,0x6c,0x69,0x74])](_0x4556ec([0x2e]));if(0x3!=_0x11dab1[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x414311(_0x11dab1[0x1]);function _0x414311(_0x26013d){const _0x32b904=_0xba5c64(_0x26013d);return _0x32b904&&_0x4dc8c8()?_0x32b904:null;function _0x4dc8c8(){const _0x1ac53e=_0x32b904[_0x4556ec([0x6a,0x74,0x69])],_0x101099=window[_0x4556ec([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ac53e[_0x4556ec([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ac53e[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x381764={..._0x32b904,[_0x4556ec([0x6a,0x74,0x69])]:_0x1ac53e[_0x4556ec([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1ac53e[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x381764[_0x4556ec([0x76,0x63])],_0x2f22d8(_0x381764)==_0x101099;}}}async function _0x3dab89(){let _0x14d035=!0x0;try{const _0x4ff7a1=_0x33b998[_0x4556ec([0x73,0x70,0x6c,0x69,0x74])](_0x4556ec([0x2e])),[_0x507d44,_0x198b0d,_0x11d74d]=_0x4ff7a1;return _0x125610(_0x507d44),await _0x21666e(_0x507d44,_0x198b0d,_0x11d74d),_0x14d035;}catch{return!0x1;}function _0x125610(_0x315699){const _0x5e3c65=_0xba5c64(_0x315699);_0x5e3c65&&_0x5e3c65[_0x4556ec([0x61,0x6c,0x67])]==_0x4556ec([0x45,0x53,0x32,0x35,0x36])||(_0x14d035=!0x1);}async function _0x21666e(_0x5ca607,_0x865187,_0x507716){const _0x33848a=window[_0x4556ec([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4556ec([0x66,0x72,0x6f,0x6d])](_0x477a9d(_0x507716),_0x1e7e3c=>_0x1e7e3c[_0x4556ec([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x41c1dc=new window[(_0x4556ec([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4556ec([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5ca607+_0x4556ec([0x2e])+_0x865187),_0x468de3=window[_0x4556ec([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4556ec([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x468de3)return;const _0x551cc4=await _0x468de3[_0x4556ec([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4556ec([0x6a,0x77,0x6b]),_0x2b1d44,{[_0x4556ec([0x6e,0x61,0x6d,0x65])]:_0x4556ec([0x45,0x43,0x44,0x53,0x41]),[_0x4556ec([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4556ec([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4556ec([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x468de3[_0x4556ec([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4556ec([0x6e,0x61,0x6d,0x65])]:_0x4556ec([0x45,0x43,0x44,0x53,0x41]),[_0x4556ec([0x68,0x61,0x73,0x68])]:{[_0x4556ec([0x6e,0x61,0x6d,0x65])]:_0x4556ec([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x551cc4,_0x33848a,_0x41c1dc)||(_0x14d035=!0x1);}}function _0xba5c64(_0x405129){return _0x405129[_0x4556ec([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4556ec([0x65,0x79]))?JSON[_0x4556ec([0x70,0x61,0x72,0x73,0x65])](_0x477a9d(_0x405129)):null;}function _0x477a9d(_0x1322cb){return window[_0x4556ec([0x61,0x74,0x6f,0x62])](_0x1322cb[_0x4556ec([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4556ec([0x2b]))[_0x4556ec([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4556ec([0x2f])));}function _0x2f22d8(_0x35df2a){let _0x321156=0x1505;function _0xecab0e(_0x13b184){for(let _0x22c226=0x0;_0x22c226<_0x13b184[_0x4556ec([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x22c226++){const _0x484a64=_0x13b184[_0x4556ec([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x22c226);_0x321156=(_0x321156<<0x5)+_0x321156+_0x484a64,_0x321156&=_0x321156;}}function _0x24b3bc(_0x31428f){Array[_0x4556ec([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x31428f)?_0x31428f[_0x4556ec([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x24b3bc):_0x31428f&&typeof _0x31428f==_0x4556ec([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4556ec([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x31428f)[_0x4556ec([0x73,0x6f,0x72,0x74])]()[_0x4556ec([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x58b992,_0x382f77])=>{_0xecab0e(_0x58b992),_0x24b3bc(_0x382f77);}):_0xecab0e(window[_0x4556ec([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x31428f));}return _0x24b3bc(_0x35df2a),_0x321156>>>0x0;}function _0x5107b1(_0x267acf){return _0x267acf[_0x4556ec([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4556ec([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4556ec([0x30]));}function _0x2c052f(_0x34d9e9){return _0x34d9e9[_0x4556ec([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4556ec([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4556ec([0x6a,0x6f,0x69,0x6e])]('');}function _0x32ceb8(){}function _0x4556ec(_0x5dad03){return _0x5dad03['map'](_0x195d84=>String['fromCharCode'](_0x195d84))['join']('');}_0x195cf5(await _0x32ff8e());}(this);}['_initSchema'](){const _0x353cb7=this['editor']['model']['schema'];_0x353cb7['isRegistered']('imageBlock')&&_0x353cb7['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x353cb7['isRegistered']('imageInline')&&_0x353cb7['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x429cd7=this['editor'];_0x429cd7['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x429cd7['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x2c1337=>_0x2c1337['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x25e6bb=_0x429cd7['commands']['get']('replaceImageSource');_0x25e6bb&&this['listenTo'](_0x25e6bb,'cleanupImage',(_0x5e99ac,[_0x492f5e,_0x32b134])=>{_0x492f5e['removeAttribute']('uploadcareImageId',_0x32b134);});}['_initConfig'](){const _0x43022f=this['editor']['config']['get']('uploadcare.uploader')||{},_0x182b71=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x53d32b(_0x458d72['document'],'uc-config',{..._0x43022f,'pubkey':_0x182b71,'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']=_0x4805fa=>{if('closeMax'==_0x4805fa)return'#uc-icon-arrow-down';},_0x458d72['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x53d32b(_0x458d72['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x458d72['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x425ae2=this['editor']['commands']['get']('insertImage');_0x425ae2&&this['listenTo'](_0x425ae2,'execute',()=>{const _0x41904a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x41904a&&_0x41904a['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x41904a);});});const _0x45b814=this['editor']['commands']['get']('uploadcareImageReplace');_0x45b814&&this['listenTo'](_0x45b814,'execute',()=>{const _0xad440c=this['editor']['model']['document']['selection']['getSelectedElement']();_0xad440c&&_0xad440c['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0xad440c);});});}}class tt extends _0x34f025{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xd36bf7){super(_0xd36bf7),_0xd36bf7['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x3bbf06['defineComponents'](_0x3bbf06);}}class ii extends _0x2e1cc4{constructor(_0x4109b0){super(_0x4109b0);const t=_0x4109b0['t'],_0x4e8a69=this['bindTemplate'],_0x16e3e4=new _0x215c5e();_0x16e3e4['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':[_0x16e3e4,{'text':_0x4e8a69['to']('imageUploadProgress',_0x17d597=>t('Loading\x20image...')+'\x20('+(_0x17d597||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 _0x2e1cc4{constructor(_0x3d742c){super(_0x3d742c);const t=_0x3d742c['t'];this['set']('errorType',null);const _0x4cff98=new _0x228f39(_0x3d742c);_0x4cff98['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4cff98['withText']=!0x0,_0x4cff98['class']='ck-button-action',_0x4cff98['on']('execute',()=>{this['fire']('retry');}),_0x4cff98['bind']('isVisible')['to'](this,'errorType',_0x15e38c=>'NotFound'!==_0x15e38c);const _0x1d1c2c=new _0x18f700();_0x1d1c2c['content']=_0x5abe47,_0x1d1c2c['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x197a5f=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':[_0x1d1c2c,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x197a5f['to']('errorType',_0xdad94f=>t('NotFound'!==_0xdad94f?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4cff98]},{'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 _0x2e1cc4{constructor(_0x53ca94,_0x1d73aa){super(_0x53ca94);const _0x3f445c=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1d73aa,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3f445c['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x13289a,_0x282117,_0x360941){super(_0x13289a),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x13289a),this['_errorView']=new ti(_0x13289a),this['_editingView']=new ei(_0x13289a,_0x360941),this['_focusableView']=new _0x2e1cc4(_0x13289a),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x282117),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'],_0x4ca5aa=>{this['_addUploadcareImageEditorListeners'](_0x4ca5aa);});}),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'](_0x185e13,_0x56e998){const _0x277a13='uc-cloud-image-editor',_0x914181=_0x185e13['querySelector'](_0x277a13);if(_0x914181)return _0x56e998(_0x914181);const _0x34913e=new MutationObserver(_0x1e802e=>{const _0x161ee8=_0x1e802e['filter'](_0x6c4fa3=>_0x6c4fa3['target']===_0x185e13&&_0x6c4fa3['addedNodes']['length']>0x0&&_0x6c4fa3['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x277a13);_0x161ee8['length']&&(_0x34913e['disconnect'](),_0x56e998(_0x161ee8[0x0]['addedNodes'][0x0]));});_0x34913e['observe'](_0x185e13,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x5371f5){_0x5371f5['addEventListener']('apply',_0x5bb010=>{this['fire']('apply',{'imageSrc':_0x5bb010['detail']['cdnUrl']});}),_0x5371f5['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
+ _0x2540e3(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0xf9eb59,_0x302bec,_0x471fb3){super(),this['_editor']=_0xf9eb59,this['_dialog']=_0x302bec,this['_imageElement']=_0x471fb3,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 _0x5ed2ae=this['_imageElement'],_0x1865fa=_0x5ed2ae['getAttribute']('uploadcareImageId'),_0x12373c=_0x5ed2ae['getAttribute']('src');if(_0x1865fa)await this['_loadImageInfo'](_0x1865fa,_0x12373c);else{if(this['_imageCache']['has'](_0x12373c)){const _0x224221=this['_imageCache']['get'](_0x12373c);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x224221['url'],this['imageDimension']=_0x224221['dimension'],this['imageId']=_0x224221['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1a3262}=this['_editor'],t=_0x1a3262['t'],_0x4b826d=new X(_0x1a3262,this['imageStatus'],this['_attributes']);_0x4b826d['bind']('status')['to'](this,'imageStatus'),_0x4b826d['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4b826d['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4b826d['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4b826d,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x554d30,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4b826d,'position':_0x3a6281['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4b826d['focus']();},'onHide':()=>{_0x4b826d['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x56b595=>!A(_0x56b595,_0x4b826d['element'])}});}['_loadImageInfo'](_0x58377c,_0x238b8a){return j['getInfo'](_0x58377c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x3283f5=>{const {width:_0x4afb04,height:_0x3976ea}=_0x3283f5['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x238b8a,this['imageDimension']={'width':_0x4afb04,'height':_0x3976ea},this['imageId']=_0x58377c;})['catch'](_0x4db02b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4db02b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2764e8,_0x1673d7){return this['_getImageAsFile'](_0x2764e8)['then'](_0x363b4a=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x1673d7['signal'],'file':_0x363b4a,'onProgress':_0x1638c9=>{_0x1638c9&&_0x1638c9['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1638c9['value']));}}))['then'](_0xe9e86=>{const {width:_0x57ea13,height:_0x5d233f}=_0xe9e86['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xe9e86['cdnUrl'],this['imageDimension']={'width':_0x57ea13,'height':_0x5d233f},this['imageId']=_0xe9e86['uuid'],this['imageUploadProgress']=null;const _0x4c9386=_0x2764e8['getAttribute']('src');this['_imageCache']['set'](_0x4c9386,{'id':_0xe9e86['uuid'],'url':_0xe9e86['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1f821d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1f821d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0xade2f,_0x11d5e5){_0xade2f['on']('apply',(_0x353d69,_0x539a7a)=>{this['_replaceImage'](_0x11d5e5,_0x539a7a['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0xade2f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0xade2f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x228b6c,_0x14dd87,_0x486059){const _0x4d76b1=this['_editor'],{width:_0x3f932f,height:_0x1b3cc5}=S(_0x14dd87,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x251892,imageSources:_0x3656c0}=C(_0x14dd87,_0x3f932f);_0x4d76b1['model']['change'](_0x1afa6e=>{if('$graveyard'===_0x228b6c['root']['rootName']){_0x4d76b1['execute']('insertImage',{'imageType':_0x228b6c['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x228b6c['getAttributes']()),'uploadcareImageId':_0x486059,'src':_0x251892,'sources':_0x3656c0,'width':_0x3f932f,'height':_0x1b3cc5}});const _0x2d935f=_0x228b6c['getChildren']();_0x228b6c=_0x4d76b1['model']['document']['selection']['getSelectedElement']();for(const _0x3af740 of _0x2d935f)_0x1afa6e['append'](_0x1afa6e['cloneElement'](_0x3af740),_0x228b6c);}else _0x1afa6e['setSelection'](_0x228b6c,'on'),_0x4d76b1['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x228b6c['getAttributes']()),'uploadcareImageId':_0x486059,'src':_0x251892,'sources':_0x3656c0,'width':_0x3f932f,'height':_0x1b3cc5},_0x228b6c);_0x1afa6e['setSelection'](_0x228b6c,'on');});}async['_getImageAsFile'](_0x3d0581){const _0x35d80f=_0x458d72['window'],_0x4f56bc=_0x458d72['document']['location']['href'],_0x3fe2e5=new _0x35d80f['URL'](_0x3d0581['getAttribute']('src'),_0x4f56bc);if('data:'===_0x3fe2e5['protocol']){const _0x599e7b=_0x3fe2e5['href']['split'](','),_0x1f3806=_0x599e7b[0x0]['match'](/:(.*?);/)[0x1],_0x143444=_0x1f3806['split']('/')[0x1],_0x509b8c=_0x35d80f['atob'](_0x599e7b[_0x599e7b['length']-0x1]);let _0x428b11=_0x509b8c['length'];const _0x28dce7=new _0x35d80f['Uint8Array'](_0x428b11);for(;_0x428b11--;)_0x28dce7[_0x428b11]=_0x509b8c['charCodeAt'](_0x428b11);return new _0x35d80f['File']([_0x28dce7],'image.'+_0x143444,{'type':_0x1f3806});}const _0x45071f=_0x3fe2e5['href']['split']('/'),_0x95167e=_0x45071f[_0x45071f['length']-0x1],_0x22db8f=_0x95167e['split']('.')[0x1];return _0x35d80f['fetch'](_0x3fe2e5['href'])['then'](_0x389b0e=>_0x389b0e['clone']()['blob']())['then'](_0x20b304=>new _0x35d80f['File']([_0x20b304],_0x95167e,{'type':'image/'+_0x22db8f}));}}class Q extends _0x542e6d{['imageEditController'];static get['requires'](){return[_0x2b0a49];}['_isEditable'];constructor(_0x28e232){super(_0x28e232),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4fa451){const _0x368e7f=z(_0x4fa451);return _0x175fc6=>!(!_0x175fc6||!_0x175fc6['is']('element','imageBlock')&&!_0x175fc6['is']('element','imageInline'))&&(!!_0x175fc6['hasAttribute']('uploadcareImageId')||!!_0x175fc6['hasAttribute']('src')&&_0x368e7f(_0x175fc6['getAttribute']('src')));}(_0x28e232['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x34e984=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x34e984);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x2bd4ee=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2bd4ee&&(_0x2bd4ee['is']('element','imageBlock')||_0x2bd4ee['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x2b0a49),_0x2bd4ee),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x542e6d{['refresh'](){const _0x1c003e=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1c003e&&(_0x1c003e['is']('element','imageBlock')||_0x1c003e['is']('element','imageInline')));}['execute'](_0x5e2d3f){const _0x118248=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x334a18=>{_0x334a18['setAttributes'](_0x5e2d3f,_0x118248),_0x334a18['removeAttribute']('srcset',_0x118248),_0x334a18['removeAttribute']('sizes',_0x118248);});}}class m extends _0x34f025{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x22b418,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x46022d}=this;_0x46022d['commands']['add']('uploadcareImageEdit',new Q(_0x46022d)),_0x46022d['commands']['add']('uploadcareImageReplace',new V(_0x46022d));}}class g extends _0x34f025{['_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 _0x1f92bd=this['editor'];_0x1f92bd['ui']['componentFactory']['add']('uploadcareImageEdit',_0x30740f=>{const _0x381760=_0x1f92bd['commands']['get']('uploadcareImageEdit'),_0x50e621=new _0x228f39(_0x30740f),t=_0x30740f['t'];return _0x50e621['set']({'icon':_0x554d30,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x50e621['bind']('isEnabled')['to'](_0x381760),_0x50e621['bind']('isOn')['to'](_0x381760,'isActive'),this['listenTo'](_0x50e621,'execute',()=>{_0x1f92bd['execute']('uploadcareImageEdit'),_0x1f92bd['editing']['view']['focus']();}),_0x50e621;}),this['_initConfig']();}['_initConfig'](){const _0x1c0519=_0x53d32b(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1c0519),this['listenTo'](this['editor'],'destroy',()=>{_0x1c0519['remove']();});}}class et extends _0x34f025{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": "46.1.1-alpha.1",
3
+ "version": "46.1.1-alpha.3",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,14 +23,14 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "46.1.1-alpha.1",
27
- "@ckeditor/ckeditor5-icons": "46.1.1-alpha.1",
28
- "@ckeditor/ckeditor5-image": "46.1.1-alpha.1",
29
- "@ckeditor/ckeditor5-theme-lark": "46.1.1-alpha.1",
30
- "@ckeditor/ckeditor5-ui": "46.1.1-alpha.1",
31
- "@ckeditor/ckeditor5-upload": "46.1.1-alpha.1",
32
- "@ckeditor/ckeditor5-utils": "46.1.1-alpha.1",
33
- "ckeditor5": "46.1.1-alpha.1",
26
+ "@ckeditor/ckeditor5-core": "46.1.1-alpha.3",
27
+ "@ckeditor/ckeditor5-icons": "46.1.1-alpha.3",
28
+ "@ckeditor/ckeditor5-image": "46.1.1-alpha.3",
29
+ "@ckeditor/ckeditor5-theme-lark": "46.1.1-alpha.3",
30
+ "@ckeditor/ckeditor5-ui": "46.1.1-alpha.3",
31
+ "@ckeditor/ckeditor5-upload": "46.1.1-alpha.3",
32
+ "@ckeditor/ckeditor5-utils": "46.1.1-alpha.3",
33
+ "ckeditor5": "46.1.1-alpha.3",
34
34
  "@uploadcare/file-uploader": "1.19.4",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x4d49(){const _0x5f0e81=['insertImage','listenTo','fromCharCode','configElement','29762wsCzYR','init','\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','UploadcareEditing','6mSnToZ','for','render','get','2482375qNiLpi','86196wakYZt','#uc-icon-arrow-down','editor','appendChild','isPremiumPlugin','_initImageProcessingIndicator','iconHrefResolver','_ctxElement','1288pYNYhs','afterInit','264733KrxZng','pluginName','ctxElement','body','PictureEditing','locale','imageInline','attributeToAttribute','extend','selection','ucContextId','_initCtx','isRegistered','uploadcareImageReplace','replaceImageSource','schema','removeAttribute','uc-config','config','true','execute','elementToAttribute','_initSchema','document','1444037OMliqE','uploadcare','isOfficialPlugin','once','querySelector','upcast','conversion','editing','input[uploadcare-file-input]','contentLanguage','_configElement','getSelectedElement','_initConversion','uploader-','49473NKLREY','commands','imageBlock','closeMax','model','_initConfig','uc-upload-ctx-provider','uploadcareImageId','href','requires','data-uc-image-id','add','map','uploadcare.uploader','cleanupImage','getAttribute','downcast','view','destroy','uploadcare.pubkey','1595816sBuetu','join','remove'];_0x4d49=function(){return _0x5f0e81;};return _0x4d49();}function _0x246c(_0x345f4b,_0x2a87fa){const _0x4d497a=_0x4d49();return _0x246c=function(_0x246cd8,_0x48a9c2){_0x246cd8=_0x246cd8-0x16a;let _0x819059=_0x4d497a[_0x246cd8];return _0x819059;},_0x246c(_0x345f4b,_0x2a87fa);}const _0x145032=_0x246c;(function(_0x9e82d4,_0x52d709){const _0x1377b9=_0x246c,_0x21d39d=_0x9e82d4();while(!![]){try{const _0x4adbe3=-parseInt(_0x1377b9(0x195))/0x1+parseInt(_0x1377b9(0x182))/0x2+-parseInt(_0x1377b9(0x18b))/0x3+parseInt(_0x1377b9(0x17b))/0x4+-parseInt(_0x1377b9(0x18a))/0x5*(parseInt(_0x1377b9(0x186))/0x6)+-parseInt(_0x1377b9(0x1ad))/0x7+-parseInt(_0x1377b9(0x193))/0x8*(-parseInt(_0x1377b9(0x1bb))/0x9);if(_0x4adbe3===_0x52d709)break;else _0x21d39d['push'](_0x21d39d['shift']());}catch(_0x5a4374){_0x21d39d['push'](_0x21d39d['shift']());}}}(_0x4d49,0x49e1d));import{Plugin as _0x550a3e}from'ckeditor5/src/core.js';import{Dialog as _0x5c5418}from'ckeditor5/src/ui.js';import{createElement as _0x1e82e0,global as _0x12e3a6,uid as _0x2d75a3}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x7b2e4b}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x8e0037}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x36d461}from'./utils/editingutils.js';export class UploadcareEditing extends _0x550a3e{[_0x145032(0x1b7)]=null;[_0x145032(0x192)]=null;static get[_0x145032(0x196)](){const _0x5b2d13=_0x145032;return _0x5b2d13(0x185);}static get[_0x145032(0x170)](){const _0x22ce6a=_0x145032;return[_0x22ce6a(0x199),_0x8e0037,_0x5c5418];}static get[_0x145032(0x1af)](){return!0x0;}static get[_0x145032(0x18f)](){return!0x0;}[_0x145032(0x19f)];get[_0x145032(0x181)](){const _0xa5703d=_0x145032;return this[_0xa5703d(0x1b7)];}get[_0x145032(0x197)](){const _0x17de52=_0x145032;return this[_0x17de52(0x192)];}constructor(_0xc5ca7c){const _0xb0c4e0=_0x145032;super(_0xc5ca7c),this[_0xb0c4e0(0x19f)]=_0x2d75a3();}[_0x145032(0x183)](){const _0x51d907=_0x145032,_0x2c718e=this[_0x51d907(0x18d)];_0x2c718e[_0x51d907(0x1bc)][_0x51d907(0x172)](_0x51d907(0x1ae),new _0x7b2e4b(_0x2c718e));}[_0x145032(0x194)](){const _0x4a6e83=_0x145032;this[_0x4a6e83(0x1ab)](),this[_0x4a6e83(0x1b9)](),this[_0x4a6e83(0x16c)](),this[_0x4a6e83(0x1a0)](),this[_0x4a6e83(0x190)](),this[_0x4a6e83(0x17f)](this[_0x4a6e83(0x18d)],_0x4a6e83(0x179),()=>{const _0x2c0348=_0x4a6e83;this[_0x2c0348(0x1b7)]&&(this[_0x2c0348(0x1b7)][_0x2c0348(0x17d)](),this[_0x2c0348(0x1b7)]=null),this[_0x2c0348(0x192)]&&(this[_0x2c0348(0x192)][_0x2c0348(0x17d)](),this[_0x2c0348(0x192)]=null);const _0x4411a0=_0x12e3a6[_0x2c0348(0x1ac)][_0x2c0348(0x1b1)](_0x2c0348(0x1b5));_0x4411a0&&_0x4411a0[_0x2c0348(0x17d)]();}),async function(_0x586b0a){const _0x17c257=_0x885fac([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]),_0x152eed=0x3d8d0df,_0x395080=0x3dfa39f^_0x152eed,_0x4c24e1=window[_0x885fac([0x44,0x61,0x74,0x65])][_0x885fac([0x6e,0x6f,0x77])](),_0x1f8d9c=_0x586b0a[_0x885fac([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2bccb4=new window[(_0x885fac([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f613c=>{_0x1f8d9c[_0x885fac([0x6f,0x6e,0x63,0x65])](_0x885fac([0x72,0x65,0x61,0x64,0x79]),_0x3f613c);}),_0x21010b={[_0x885fac([0x6b,0x74,0x79])]:_0x885fac([0x45,0x43]),[_0x885fac([0x75,0x73,0x65])]:_0x885fac([0x73,0x69,0x67]),[_0x885fac([0x63,0x72,0x76])]:_0x885fac([0x50,0x2d,0x32,0x35,0x36]),[_0x885fac([0x78])]:_0x885fac([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]),[_0x885fac([0x79])]:_0x885fac([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]),[_0x885fac([0x61,0x6c,0x67])]:_0x885fac([0x45,0x53,0x32,0x35,0x36])},_0x34102f=_0x1f8d9c[_0x885fac([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x885fac([0x67,0x65,0x74])](_0x885fac([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x433de4(){let _0x19d3c3,_0x586464=null,_0x58402c=null;try{if(_0x34102f==_0x885fac([0x47,0x50,0x4c]))return _0x885fac([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x19d3c3=_0x13ffa9(),!_0x19d3c3)return _0x885fac([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x19d3c3[_0x885fac([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x58402c=_0x59c586(_0x19d3c3[_0x885fac([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x19d3c3[_0x885fac([0x6a,0x74,0x69])])),await _0x1911d2()?_0x411550()?_0x2f4f67()?_0x885fac([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4c69a3()?(_0x19d3c3[_0x885fac([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x885fac([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x586464=_0x4cc40f(_0x885fac([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x19d3c3[_0x885fac([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x885fac([0x74,0x72,0x69,0x61,0x6c])&&(_0x586464=_0x4cc40f(_0x885fac([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4843c2()):_0x885fac([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x885fac([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x885fac([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x885fac([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2f4f67(){const _0x2a00ee=[_0x885fac([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x885fac([0x74,0x72,0x69,0x61,0x6c])][_0x885fac([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x19d3c3[_0x885fac([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4c24e1/0x3e8:0xe10*_0x395080;return _0x19d3c3[_0x885fac([0x65,0x78,0x70])]<_0x2a00ee;}function _0x411550(){const _0x2b007f=_0x19d3c3[_0x885fac([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2b007f&&(!!_0x2b007f[_0x885fac([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x885fac([0x2a]))||!!_0x2b007f[_0x885fac([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x885fac([0x55,0x50,0x4c,0x43])));}function _0x4c69a3(){const _0x24f4c7=_0x246c,_0x2809bf=_0x19d3c3[_0x885fac([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2809bf||0x0==_0x2809bf[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x360e3c}=new URL(window[_0x885fac([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x24f4c7(0x16f)]);if(_0x2809bf[_0x885fac([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x360e3c))return!0x0;const _0x4bd35f=_0x360e3c[_0x885fac([0x73,0x70,0x6c,0x69,0x74])](_0x885fac([0x2e]));return _0x2809bf[_0x885fac([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xed2e0e=>_0xed2e0e[_0x885fac([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x885fac([0x2a])))[_0x885fac([0x6d,0x61,0x70])](_0x2c33d8=>_0x2c33d8[_0x885fac([0x73,0x70,0x6c,0x69,0x74])](_0x885fac([0x2e])))[_0x885fac([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2e0111=>_0x2e0111[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4bd35f[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x885fac([0x6d,0x61,0x70])](_0x877f2d=>Array(_0x4bd35f[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x877f2d[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x885fac([0x66,0x69,0x6c,0x6c])](_0x877f2d[0x0]===_0x885fac([0x2a])?_0x885fac([0x2a]):'')[_0x885fac([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x877f2d))[_0x885fac([0x73,0x6f,0x6d,0x65])](_0x1e4ec7=>_0x4bd35f[_0x885fac([0x65,0x76,0x65,0x72,0x79])]((_0x1e1c26,_0x4b0c91)=>_0x1e4ec7[_0x4b0c91]===_0x1e1c26||_0x1e4ec7[_0x4b0c91]===_0x885fac([0x2a])));}function _0x4843c2(){return _0x586464&&_0x58402c?new window[(_0x885fac([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x55ef17,_0x1d202b)=>{_0x586464[_0x885fac([0x74,0x68,0x65,0x6e])](_0x55ef17,_0x1d202b),_0x58402c[_0x885fac([0x74,0x68,0x65,0x6e])](_0x142159=>{_0x142159!=_0x885fac([0x56,0x61,0x6c,0x69,0x64])&&_0x55ef17(_0x142159);},_0x1d202b);}):_0x586464||_0x58402c||_0x885fac([0x56,0x61,0x6c,0x69,0x64]);}}function _0x59c586(_0x320620,_0x5842db){return new window[(_0x885fac([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a95cb=>{if(_0x13ae8f())return _0x4a95cb(_0x885fac([0x56,0x61,0x6c,0x69,0x64]));_0x14d062(),_0x1f8d9c[_0x885fac([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x885fac([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4c5922=!0x1;const _0x297bc3=_0x2d75a3();function _0x33323b(_0x2e77fb){return!!_0x2e77fb&&(typeof _0x2e77fb===_0x885fac([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2e77fb===_0x885fac([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2e77fb[_0x885fac([0x74,0x68,0x65,0x6e])]===_0x885fac([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2e77fb[_0x885fac([0x63,0x61,0x74,0x63,0x68])]===_0x885fac([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x18ea21(_0x4688f5){_0x2f9cc4(_0x4688f5)[_0x885fac([0x74,0x68,0x65,0x6e])](_0x1a32d7=>{if(!_0x1a32d7||_0x1a32d7[_0x885fac([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x885fac([0x6f,0x6b]))return _0x885fac([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x10ffb7(_0x32b4f0(_0x297bc3+_0x5842db))!=_0x1a32d7[_0x885fac([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x885fac([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x885fac([0x56,0x61,0x6c,0x69,0x64]);})[_0x885fac([0x74,0x68,0x65,0x6e])](_0x4ac3ac=>(_0x525f02(),_0x4ac3ac),()=>{const _0x31a997=_0x270e95();return null==_0x31a997?(_0x525f02(),_0x885fac([0x56,0x61,0x6c,0x69,0x64])):_0x885fac(_0x4c24e1-_0x31a997>(0x27d454df^_0x152eed)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x885fac([0x74,0x68,0x65,0x6e])](_0x4a95cb)[_0x885fac([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4a95cb(_0x885fac([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x28c8d3=0x3ee3e5f^_0x152eed;function _0x525f02(){const _0x4232d9=_0x885fac([0x6c,0x6c,0x63,0x74,0x2d])+_0x10ffb7(_0x32b4f0(_0x320620)),_0x538c11=_0x463292(_0x10ffb7(window[_0x885fac([0x4d,0x61,0x74,0x68])][_0x885fac([0x63,0x65,0x69,0x6c])](_0x4c24e1/_0x28c8d3)));window[_0x885fac([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x885fac([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4232d9,_0x538c11);}function _0x270e95(){const _0x2ea71b=_0x885fac([0x6c,0x6c,0x63,0x74,0x2d])+_0x10ffb7(_0x32b4f0(_0x320620)),_0x46577c=window[_0x885fac([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x885fac([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2ea71b);return _0x46577c?window[_0x885fac([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x463292(_0x46577c),0x10)*_0x28c8d3:null;}function _0x2f9cc4(_0x3aa187){return new window[(_0x885fac([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x467393,_0x2d0963)=>{_0x3aa187[_0x885fac([0x74,0x68,0x65,0x6e])](_0x467393,_0x2d0963),window[_0x885fac([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2d0963,0x3d9041f^_0x152eed);});}}_0x1f8d9c[_0x885fac([0x6f,0x6e])](_0x885fac([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4714f2,_0x45b2ca)=>{if(_0x45b2ca[0x0]!=_0x320620)return _0x4a95cb(_0x885fac([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x45b2ca[0x1]={..._0x45b2ca[0x1],[_0x885fac([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x297bc3};},{[_0x885fac([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x885fac([0x68,0x69,0x67,0x68])}),_0x1f8d9c[_0x885fac([0x6f,0x6e])](_0x885fac([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x57643d=>{_0x33323b(_0x57643d[_0x885fac([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4c5922=!0x0,_0x18ea21(_0x57643d[_0x885fac([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x885fac([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x885fac([0x6c,0x6f,0x77])}),_0x2bccb4[_0x885fac([0x74,0x68,0x65,0x6e])](()=>{_0x4c5922||_0x4a95cb(_0x885fac([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x13ae8f(){return _0x1f8d9c[_0x885fac([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x885fac([0x76,0x69,0x65,0x77])][_0x885fac([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x885fac([0x61,0x75,0x74,0x6f]);}function _0x14d062(){_0x1f8d9c[_0x885fac([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x885fac([0x76,0x69,0x65,0x77])][_0x885fac([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x885fac([0x61,0x75,0x74,0x6f]);}}function _0x4cc40f(_0x4d0ccf){const _0x18bd5f=[new window[(_0x885fac([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x373b19=>setTimeout(_0x373b19,0x3d1ee13^_0x152eed)),_0x2bccb4[_0x885fac([0x74,0x68,0x65,0x6e])](()=>new window[(_0x885fac([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4795f7=>{let _0x31e986=0x0;_0x1f8d9c[_0x885fac([0x6d,0x6f,0x64,0x65,0x6c])][_0x885fac([0x6f,0x6e])](_0x885fac([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1decb6,_0x1af2f4)=>{_0x1af2f4[0x0][_0x885fac([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x31e986++,_0x31e986==(0x3d8d127^_0x152eed)&&(_0x4795f7(),_0x1decb6[_0x885fac([0x6f,0x66,0x66])]());});}))];return window[_0x885fac([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x885fac([0x72,0x61,0x63,0x65])](_0x18bd5f)[_0x885fac([0x74,0x68,0x65,0x6e])](()=>_0x4d0ccf);}async function _0x16cd19(){await _0x2bccb4,_0x1f8d9c[_0x885fac([0x6d,0x6f,0x64,0x65,0x6c])][_0x885fac([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5b0e07,_0x1f8d9c[_0x885fac([0x6d,0x6f,0x64,0x65,0x6c])][_0x885fac([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5b0e07,_0x1f8d9c[_0x885fac([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x885fac([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1b4444(_0x479b4b){const _0x66f957=_0x5bddb1();_0x1f8d9c[_0x66f957]=_0x885fac([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x479b4b,_0x479b4b!=_0x885fac([0x56,0x61,0x6c,0x69,0x64])&&_0x16cd19();}function _0x5bddb1(){const _0x3f3eae=window[_0x885fac([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x885fac([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x885fac([0x6e,0x6f,0x77])]())[_0x885fac([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x885fac([0x2e]),'');let _0x225fff=_0x885fac([0x52]);for(let _0x4e21ae=0x0;_0x4e21ae<_0x3f3eae[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4e21ae+=0x2){let _0x556a8b=window[_0x885fac([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f3eae[_0x885fac([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4e21ae,_0x4e21ae+0x2));_0x556a8b>=_0x17c257[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x556a8b-=_0x17c257[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x225fff+=_0x17c257[_0x556a8b];}return _0x225fff;}function _0x13ffa9(){const _0x1ae70d=_0x34102f[_0x885fac([0x73,0x70,0x6c,0x69,0x74])](_0x885fac([0x2e]));if(0x3!=_0x1ae70d[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1e9c6d(_0x1ae70d[0x1]);function _0x1e9c6d(_0xdced0b){const _0x7292c8=_0x465de5(_0xdced0b);return _0x7292c8&&_0x38f286()?_0x7292c8:null;function _0x38f286(){const _0x6d1ec0=_0x7292c8[_0x885fac([0x6a,0x74,0x69])],_0x3751be=window[_0x885fac([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x6d1ec0[_0x885fac([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x6d1ec0[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5d8ab1={..._0x7292c8,[_0x885fac([0x6a,0x74,0x69])]:_0x6d1ec0[_0x885fac([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x6d1ec0[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5d8ab1[_0x885fac([0x76,0x63])],_0x32b4f0(_0x5d8ab1)==_0x3751be;}}}async function _0x1911d2(){let _0x3664ec=!0x0;try{const _0x491152=_0x34102f[_0x885fac([0x73,0x70,0x6c,0x69,0x74])](_0x885fac([0x2e])),[_0x349624,_0x4f1606,_0x2c9007]=_0x491152;return _0x18c7fb(_0x349624),await _0x7e3e01(_0x349624,_0x4f1606,_0x2c9007),_0x3664ec;}catch{return!0x1;}function _0x18c7fb(_0xcbbbeb){const _0x2c59cd=_0x465de5(_0xcbbbeb);_0x2c59cd&&_0x2c59cd[_0x885fac([0x61,0x6c,0x67])]==_0x885fac([0x45,0x53,0x32,0x35,0x36])||(_0x3664ec=!0x1);}async function _0x7e3e01(_0xceb2fb,_0x376aa0,_0x3c9cf5){const _0x34d4fe=window[_0x885fac([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x885fac([0x66,0x72,0x6f,0x6d])](_0x7ef95b(_0x3c9cf5),_0x3902f1=>_0x3902f1[_0x885fac([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x294a9c=new window[(_0x885fac([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x885fac([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xceb2fb+_0x885fac([0x2e])+_0x376aa0),_0x57aaab=window[_0x885fac([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x885fac([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x57aaab)return;const _0x3ca815=await _0x57aaab[_0x885fac([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x885fac([0x6a,0x77,0x6b]),_0x21010b,{[_0x885fac([0x6e,0x61,0x6d,0x65])]:_0x885fac([0x45,0x43,0x44,0x53,0x41]),[_0x885fac([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x885fac([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x885fac([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x57aaab[_0x885fac([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x885fac([0x6e,0x61,0x6d,0x65])]:_0x885fac([0x45,0x43,0x44,0x53,0x41]),[_0x885fac([0x68,0x61,0x73,0x68])]:{[_0x885fac([0x6e,0x61,0x6d,0x65])]:_0x885fac([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3ca815,_0x34d4fe,_0x294a9c)||(_0x3664ec=!0x1);}}function _0x465de5(_0x7b4eda){return _0x7b4eda[_0x885fac([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x885fac([0x65,0x79]))?JSON[_0x885fac([0x70,0x61,0x72,0x73,0x65])](_0x7ef95b(_0x7b4eda)):null;}function _0x7ef95b(_0x46b0b0){return window[_0x885fac([0x61,0x74,0x6f,0x62])](_0x46b0b0[_0x885fac([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x885fac([0x2b]))[_0x885fac([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x885fac([0x2f])));}function _0x32b4f0(_0x52c0b5){let _0x3fa2ff=0x1505;function _0x39c086(_0x13cd79){for(let _0x2bcf40=0x0;_0x2bcf40<_0x13cd79[_0x885fac([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2bcf40++){const _0x5077a2=_0x13cd79[_0x885fac([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2bcf40);_0x3fa2ff=(_0x3fa2ff<<0x5)+_0x3fa2ff+_0x5077a2,_0x3fa2ff&=_0x3fa2ff;}}function _0x3ecb69(_0x149f4d){Array[_0x885fac([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x149f4d)?_0x149f4d[_0x885fac([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3ecb69):_0x149f4d&&typeof _0x149f4d==_0x885fac([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x885fac([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x149f4d)[_0x885fac([0x73,0x6f,0x72,0x74])]()[_0x885fac([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x52fa4c,_0x1b8356])=>{_0x39c086(_0x52fa4c),_0x3ecb69(_0x1b8356);}):_0x39c086(window[_0x885fac([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x149f4d));}return _0x3ecb69(_0x52c0b5),_0x3fa2ff>>>0x0;}function _0x10ffb7(_0x514dbf){return _0x514dbf[_0x885fac([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x885fac([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x885fac([0x30]));}function _0x463292(_0x448cc6){return _0x448cc6[_0x885fac([0x73,0x70,0x6c,0x69,0x74])]('')[_0x885fac([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x885fac([0x6a,0x6f,0x69,0x6e])]('');}function _0x5b0e07(){}function _0x885fac(_0x4d1eae){const _0x22ae24=_0x246c;return _0x4d1eae[_0x22ae24(0x173)](_0x45abb7=>String[_0x22ae24(0x180)](_0x45abb7))[_0x22ae24(0x17c)]('');}_0x1b4444(await _0x433de4());}(this);}[_0x145032(0x1ab)](){const _0x69f4b2=_0x145032,_0xb2a112=this[_0x69f4b2(0x18d)][_0x69f4b2(0x16b)][_0x69f4b2(0x1a4)];_0xb2a112[_0x69f4b2(0x1a1)](_0x69f4b2(0x1bd))&&_0xb2a112[_0x69f4b2(0x19d)](_0x69f4b2(0x1bd),{'allowAttributes':[_0x69f4b2(0x16e)]}),_0xb2a112[_0x69f4b2(0x1a1)](_0x69f4b2(0x19b))&&_0xb2a112[_0x69f4b2(0x19d)](_0x69f4b2(0x19b),{'allowAttributes':[_0x69f4b2(0x16e)]});}[_0x145032(0x1b9)](){const _0x11801c=_0x145032,_0x486b27=this[_0x11801c(0x18d)];_0x486b27[_0x11801c(0x1b3)][_0x11801c(0x187)](_0x11801c(0x177))[_0x11801c(0x19c)]({'model':_0x11801c(0x16e),'view':_0x11801c(0x171)}),_0x486b27[_0x11801c(0x1b3)][_0x11801c(0x187)](_0x11801c(0x1b2))[_0x11801c(0x1aa)]({'model':{'key':_0x11801c(0x16e),'value':_0x291473=>_0x291473[_0x11801c(0x176)](_0x11801c(0x171))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4f20fd=_0x486b27[_0x11801c(0x1bc)][_0x11801c(0x189)](_0x11801c(0x1a3));_0x4f20fd&&this[_0x11801c(0x17f)](_0x4f20fd,_0x11801c(0x175),(_0x46991d,[_0x27f9cc,_0x302d6c])=>{const _0x438bb6=_0x11801c;_0x27f9cc[_0x438bb6(0x1a5)](_0x438bb6(0x16e),_0x302d6c);});}[_0x145032(0x16c)](){const _0x30d12a=_0x145032,_0x5c1720=this[_0x30d12a(0x18d)][_0x30d12a(0x1a7)][_0x30d12a(0x189)](_0x30d12a(0x174))||{},_0x5ce324=this[_0x30d12a(0x18d)][_0x30d12a(0x1a7)][_0x30d12a(0x189)](_0x30d12a(0x17a))||'';this[_0x30d12a(0x1b7)]=_0x1e82e0(_0x12e3a6[_0x30d12a(0x1ac)],_0x30d12a(0x1a6),{..._0x5c1720,'pubkey':_0x5ce324,'ctx-name':_0x30d12a(0x1ba)+this[_0x30d12a(0x19f)],'sourceList':'','imgOnly':_0x30d12a(0x1a8),'removeCopyright':_0x30d12a(0x1a8),'localeName':this[_0x30d12a(0x18d)][_0x30d12a(0x19a)][_0x30d12a(0x1b6)],'externalSourcesEmbedCss':_0x30d12a(0x184)}),this[_0x30d12a(0x1b7)][_0x30d12a(0x191)]=_0x460efb=>{const _0x2e51ab=_0x30d12a;if(_0x2e51ab(0x16a)==_0x460efb)return _0x2e51ab(0x18c);},_0x12e3a6[_0x30d12a(0x1ac)][_0x30d12a(0x198)][_0x30d12a(0x18e)](this[_0x30d12a(0x1b7)]);}[_0x145032(0x1a0)](){const _0x2c87aa=_0x145032;this[_0x2c87aa(0x192)]=_0x1e82e0(_0x12e3a6[_0x2c87aa(0x1ac)],_0x2c87aa(0x16d),{'ctx-name':_0x2c87aa(0x1ba)+this[_0x2c87aa(0x19f)]}),_0x12e3a6[_0x2c87aa(0x1ac)][_0x2c87aa(0x198)][_0x2c87aa(0x18e)](this[_0x2c87aa(0x192)]);}[_0x145032(0x190)](){const _0x440b57=_0x145032,_0x2a6c38=this[_0x440b57(0x18d)][_0x440b57(0x1bc)][_0x440b57(0x189)](_0x440b57(0x17e));_0x2a6c38&&this[_0x440b57(0x17f)](_0x2a6c38,_0x440b57(0x1a9),()=>{const _0x50e8e2=_0x440b57,_0x14d329=this[_0x50e8e2(0x18d)][_0x50e8e2(0x16b)][_0x50e8e2(0x1ac)][_0x50e8e2(0x19e)][_0x50e8e2(0x1b8)]();_0x14d329&&_0x14d329[_0x50e8e2(0x176)](_0x50e8e2(0x16e))&&this[_0x50e8e2(0x18d)][_0x50e8e2(0x1b4)][_0x50e8e2(0x178)][_0x50e8e2(0x1b0)](_0x50e8e2(0x188),()=>{const _0x35aa33=_0x50e8e2;_0x36d461(this[_0x35aa33(0x18d)],_0x14d329);});});const _0x316a32=this[_0x440b57(0x18d)][_0x440b57(0x1bc)][_0x440b57(0x189)](_0x440b57(0x1a2));_0x316a32&&this[_0x440b57(0x17f)](_0x316a32,_0x440b57(0x1a9),()=>{const _0x230c68=_0x440b57,_0x2978c4=this[_0x230c68(0x18d)][_0x230c68(0x16b)][_0x230c68(0x1ac)][_0x230c68(0x19e)][_0x230c68(0x1b8)]();_0x2978c4&&_0x2978c4[_0x230c68(0x176)](_0x230c68(0x16e))&&this[_0x230c68(0x18d)][_0x230c68(0x1b4)][_0x230c68(0x178)][_0x230c68(0x1b0)](_0x230c68(0x188),()=>{const _0xbbbe83=_0x230c68;_0x36d461(this[_0xbbbe83(0x18d)],_0x2978c4);});});}}
23
+ const _0x5afa72=_0x2e3a;(function(_0xe2dea7,_0x22bbb5){const _0x362cbb=_0x2e3a,_0x4ebe7c=_0xe2dea7();while(!![]){try{const _0x586b59=parseInt(_0x362cbb(0x1cc))/0x1+parseInt(_0x362cbb(0x200))/0x2+parseInt(_0x362cbb(0x21d))/0x3*(-parseInt(_0x362cbb(0x1f3))/0x4)+-parseInt(_0x362cbb(0x1e9))/0x5*(parseInt(_0x362cbb(0x212))/0x6)+-parseInt(_0x362cbb(0x21a))/0x7*(-parseInt(_0x362cbb(0x20d))/0x8)+parseInt(_0x362cbb(0x203))/0x9*(parseInt(_0x362cbb(0x1f5))/0xa)+parseInt(_0x362cbb(0x1fb))/0xb*(-parseInt(_0x362cbb(0x211))/0xc);if(_0x586b59===_0x22bbb5)break;else _0x4ebe7c['push'](_0x4ebe7c['shift']());}catch(_0x14461e){_0x4ebe7c['push'](_0x4ebe7c['shift']());}}}(_0x3c45,0x2b956));import{Plugin as _0x5720f9}from'ckeditor5/src/core.js';import{Dialog as _0x25cd1d}from'ckeditor5/src/ui.js';function _0x2e3a(_0x785aec,_0x4fceb7){const _0x3c45e2=_0x3c45();return _0x2e3a=function(_0x2e3a84,_0x27a014){_0x2e3a84=_0x2e3a84-0x1c7;let _0x1b601c=_0x3c45e2[_0x2e3a84];return _0x1b601c;},_0x2e3a(_0x785aec,_0x4fceb7);}import{createElement as _0x557634,global as _0x5a6d4e,uid as _0xbda6e4}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x1924ae}from'./uploadcarecommand.js';function _0x3c45(){const _0x6b81c4=['isOfficialPlugin','pluginName','selection','uc-config','854584JSmQqj','href','isPremiumPlugin','join','578112PAFrsZ','860514aIMseT','_ctxElement','view','_initCtx','listenTo','uploadcare.uploader','elementToAttribute','configElement','21axGXIq','editor','uc-upload-ctx-provider','3zebAuR','for','ucContextId','editing','_initConversion','document','58331APHMKm','\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','config','locale','extend','querySelector','get','PictureEditing','once','getAttribute','UploadcareEditing','contentLanguage','model','imageBlock','_configElement','add','iconHrefResolver','ctxElement','map','_initConfig','imageInline','execute','closeMax','downcast','getSelectedElement','destroy','afterInit','cleanupImage','uploadcare.pubkey','5pLWjDa','commands','#uc-icon-arrow-down','_initImageProcessingIndicator','body','uploader-','uploadcareImageId','data-uc-image-id','upcast','fromCharCode','1232492jCmLas','uploadcareImageReplace','20dHZMXg','init','uploadcare','removeAttribute','appendChild','_initSchema','55dkkZuK','attributeToAttribute','schema','insertImage','requires','384236Deafdc','conversion','render','1350099vKhedt','input[uploadcare-file-input]','true','isRegistered','replaceImageSource','remove'];_0x3c45=function(){return _0x6b81c4;};return _0x3c45();}import{UploadcareUploadAdapter as _0x3d316e}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x391cf0}from'./utils/editingutils.js';export class UploadcareEditing extends _0x5720f9{[_0x5afa72(0x1da)]=null;[_0x5afa72(0x213)]=null;static get[_0x5afa72(0x20a)](){const _0x3818b7=_0x5afa72;return _0x3818b7(0x1d6);}static get[_0x5afa72(0x1ff)](){const _0x3e9ec6=_0x5afa72;return[_0x3e9ec6(0x1d3),_0x3d316e,_0x25cd1d];}static get[_0x5afa72(0x209)](){return!0x0;}static get[_0x5afa72(0x20f)](){return!0x0;}[_0x5afa72(0x1c8)];get[_0x5afa72(0x219)](){const _0x1d87f3=_0x5afa72;return this[_0x1d87f3(0x1da)];}get[_0x5afa72(0x1dd)](){const _0x645f32=_0x5afa72;return this[_0x645f32(0x213)];}constructor(_0x5cc74d){const _0x47b442=_0x5afa72;super(_0x5cc74d),this[_0x47b442(0x1c8)]=_0xbda6e4();}[_0x5afa72(0x1f6)](){const _0x20573e=_0x5afa72,_0x13aa07=this[_0x20573e(0x21b)];_0x13aa07[_0x20573e(0x1ea)][_0x20573e(0x1db)](_0x20573e(0x1f7),new _0x1924ae(_0x13aa07));}[_0x5afa72(0x1e6)](){const _0x253cc1=_0x5afa72;this[_0x253cc1(0x1fa)](),this[_0x253cc1(0x1ca)](),this[_0x253cc1(0x1df)](),this[_0x253cc1(0x215)](),this[_0x253cc1(0x1ec)](),this[_0x253cc1(0x216)](this[_0x253cc1(0x21b)],_0x253cc1(0x1e5),()=>{const _0x5c01ad=_0x253cc1;this[_0x5c01ad(0x1da)]&&(this[_0x5c01ad(0x1da)][_0x5c01ad(0x208)](),this[_0x5c01ad(0x1da)]=null),this[_0x5c01ad(0x213)]&&(this[_0x5c01ad(0x213)][_0x5c01ad(0x208)](),this[_0x5c01ad(0x213)]=null);const _0x5181df=_0x5a6d4e[_0x5c01ad(0x1cb)][_0x5c01ad(0x1d1)](_0x5c01ad(0x204));_0x5181df&&_0x5181df[_0x5c01ad(0x208)]();}),async function(_0x1ec85f){const _0x205dd3=_0x5580d3([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]),_0x488b19=0x3d8d0df,_0x2cd6d9=0x3dfa3af^_0x488b19,_0x47bd0a=window[_0x5580d3([0x44,0x61,0x74,0x65])][_0x5580d3([0x6e,0x6f,0x77])](),_0x4fa2d=_0x1ec85f[_0x5580d3([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4534ca=new window[(_0x5580d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x467995=>{_0x4fa2d[_0x5580d3([0x6f,0x6e,0x63,0x65])](_0x5580d3([0x72,0x65,0x61,0x64,0x79]),_0x467995);}),_0x5d2806={[_0x5580d3([0x6b,0x74,0x79])]:_0x5580d3([0x45,0x43]),[_0x5580d3([0x75,0x73,0x65])]:_0x5580d3([0x73,0x69,0x67]),[_0x5580d3([0x63,0x72,0x76])]:_0x5580d3([0x50,0x2d,0x32,0x35,0x36]),[_0x5580d3([0x78])]:_0x5580d3([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]),[_0x5580d3([0x79])]:_0x5580d3([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]),[_0x5580d3([0x61,0x6c,0x67])]:_0x5580d3([0x45,0x53,0x32,0x35,0x36])},_0x49f04f=_0x4fa2d[_0x5580d3([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5580d3([0x67,0x65,0x74])](_0x5580d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x426917(){let _0x8c9e17,_0x328f0b=null,_0x55e677=null;try{if(_0x49f04f==_0x5580d3([0x47,0x50,0x4c]))return _0x5580d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x8c9e17=_0x2d5ba8(),!_0x8c9e17)return _0x5580d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x8c9e17[_0x5580d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x55e677=_0x30a6a2(_0x8c9e17[_0x5580d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x8c9e17[_0x5580d3([0x6a,0x74,0x69])])),await _0x4686f2()?_0x4dd47b()?_0x48d8e3()?_0x5580d3([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4e4f7c()?(_0x8c9e17[_0x5580d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5580d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x328f0b=_0x36235f(_0x5580d3([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x8c9e17[_0x5580d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5580d3([0x74,0x72,0x69,0x61,0x6c])&&(_0x328f0b=_0x36235f(_0x5580d3([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4455e4()):_0x5580d3([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5580d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5580d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5580d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x48d8e3(){const _0x101db7=[_0x5580d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5580d3([0x74,0x72,0x69,0x61,0x6c])][_0x5580d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8c9e17[_0x5580d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x47bd0a/0x3e8:0xe10*_0x2cd6d9;return _0x8c9e17[_0x5580d3([0x65,0x78,0x70])]<_0x101db7;}function _0x4dd47b(){const _0x25b74d=_0x8c9e17[_0x5580d3([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x25b74d&&(!!_0x25b74d[_0x5580d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5580d3([0x2a]))||!!_0x25b74d[_0x5580d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5580d3([0x55,0x50,0x4c,0x43])));}function _0x4e4f7c(){const _0x41675d=_0x2e3a,_0x4d7d5d=_0x8c9e17[_0x5580d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4d7d5d||0x0==_0x4d7d5d[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x219afa}=new URL(window[_0x5580d3([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x41675d(0x20e)]);if(_0x4d7d5d[_0x5580d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x219afa))return!0x0;const _0x9ef68=_0x219afa[_0x5580d3([0x73,0x70,0x6c,0x69,0x74])](_0x5580d3([0x2e]));return _0x4d7d5d[_0x5580d3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e509a=>_0x1e509a[_0x5580d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5580d3([0x2a])))[_0x5580d3([0x6d,0x61,0x70])](_0x763e0=>_0x763e0[_0x5580d3([0x73,0x70,0x6c,0x69,0x74])](_0x5580d3([0x2e])))[_0x5580d3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11836c=>_0x11836c[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x9ef68[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5580d3([0x6d,0x61,0x70])](_0x17ce5a=>Array(_0x9ef68[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x17ce5a[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5580d3([0x66,0x69,0x6c,0x6c])](_0x17ce5a[0x0]===_0x5580d3([0x2a])?_0x5580d3([0x2a]):'')[_0x5580d3([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x17ce5a))[_0x5580d3([0x73,0x6f,0x6d,0x65])](_0x54a261=>_0x9ef68[_0x5580d3([0x65,0x76,0x65,0x72,0x79])]((_0x41000c,_0x55362a)=>_0x54a261[_0x55362a]===_0x41000c||_0x54a261[_0x55362a]===_0x5580d3([0x2a])));}function _0x4455e4(){return _0x328f0b&&_0x55e677?new window[(_0x5580d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2916a7,_0x28777b)=>{_0x328f0b[_0x5580d3([0x74,0x68,0x65,0x6e])](_0x2916a7,_0x28777b),_0x55e677[_0x5580d3([0x74,0x68,0x65,0x6e])](_0x1c9652=>{_0x1c9652!=_0x5580d3([0x56,0x61,0x6c,0x69,0x64])&&_0x2916a7(_0x1c9652);},_0x28777b);}):_0x328f0b||_0x55e677||_0x5580d3([0x56,0x61,0x6c,0x69,0x64]);}}function _0x30a6a2(_0x37e848,_0x4c99dd){return new window[(_0x5580d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1148cf=>{if(_0x42545c())return _0x1148cf(_0x5580d3([0x56,0x61,0x6c,0x69,0x64]));_0x3b6a6e(),_0x4fa2d[_0x5580d3([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5580d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x330b7a=!0x1;const _0xf3d53b=_0xbda6e4();function _0x5c74f0(_0x28d913){return!!_0x28d913&&(typeof _0x28d913===_0x5580d3([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x28d913===_0x5580d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x28d913[_0x5580d3([0x74,0x68,0x65,0x6e])]===_0x5580d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x28d913[_0x5580d3([0x63,0x61,0x74,0x63,0x68])]===_0x5580d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x37fcd3(_0x1d4084){_0x2d6f8a(_0x1d4084)[_0x5580d3([0x74,0x68,0x65,0x6e])](_0x3d3d4b=>{if(!_0x3d3d4b||_0x3d3d4b[_0x5580d3([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5580d3([0x6f,0x6b]))return _0x5580d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1d9de6(_0x1bc484(_0xf3d53b+_0x4c99dd))!=_0x3d3d4b[_0x5580d3([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5580d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5580d3([0x56,0x61,0x6c,0x69,0x64]);})[_0x5580d3([0x74,0x68,0x65,0x6e])](_0x117a27=>(_0x36b335(),_0x117a27),()=>{const _0x273c52=_0x2e1085();return null==_0x273c52?(_0x36b335(),_0x5580d3([0x56,0x61,0x6c,0x69,0x64])):_0x5580d3(_0x47bd0a-_0x273c52>(0x27d454df^_0x488b19)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5580d3([0x74,0x68,0x65,0x6e])](_0x1148cf)[_0x5580d3([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1148cf(_0x5580d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xb9e223=0x3ee3e5f^_0x488b19;function _0x36b335(){const _0x1b78d7=_0x5580d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x1d9de6(_0x1bc484(_0x37e848)),_0xd0ae66=_0x4012e6(_0x1d9de6(window[_0x5580d3([0x4d,0x61,0x74,0x68])][_0x5580d3([0x63,0x65,0x69,0x6c])](_0x47bd0a/_0xb9e223)));window[_0x5580d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5580d3([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b78d7,_0xd0ae66);}function _0x2e1085(){const _0x649ea0=_0x5580d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x1d9de6(_0x1bc484(_0x37e848)),_0x330326=window[_0x5580d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5580d3([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x649ea0);return _0x330326?window[_0x5580d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4012e6(_0x330326),0x10)*_0xb9e223:null;}function _0x2d6f8a(_0x3580d7){return new window[(_0x5580d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5f0a82,_0x59728d)=>{_0x3580d7[_0x5580d3([0x74,0x68,0x65,0x6e])](_0x5f0a82,_0x59728d),window[_0x5580d3([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x59728d,0x3d9041f^_0x488b19);});}}_0x4fa2d[_0x5580d3([0x6f,0x6e])](_0x5580d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5c8468,_0x234b3c)=>{if(_0x234b3c[0x0]!=_0x37e848)return _0x1148cf(_0x5580d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x234b3c[0x1]={..._0x234b3c[0x1],[_0x5580d3([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xf3d53b};},{[_0x5580d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5580d3([0x68,0x69,0x67,0x68])}),_0x4fa2d[_0x5580d3([0x6f,0x6e])](_0x5580d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5b1de5=>{_0x5c74f0(_0x5b1de5[_0x5580d3([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x330b7a=!0x0,_0x37fcd3(_0x5b1de5[_0x5580d3([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5580d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5580d3([0x6c,0x6f,0x77])}),_0x4534ca[_0x5580d3([0x74,0x68,0x65,0x6e])](()=>{_0x330b7a||_0x1148cf(_0x5580d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x42545c(){return _0x4fa2d[_0x5580d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5580d3([0x76,0x69,0x65,0x77])][_0x5580d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5580d3([0x61,0x75,0x74,0x6f]);}function _0x3b6a6e(){_0x4fa2d[_0x5580d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5580d3([0x76,0x69,0x65,0x77])][_0x5580d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5580d3([0x61,0x75,0x74,0x6f]);}}function _0x36235f(_0x4e70b9){const _0x4cadc2=[new window[(_0x5580d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x442922=>setTimeout(_0x442922,0x3d1ee13^_0x488b19)),_0x4534ca[_0x5580d3([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5580d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x110cd0=>{let _0x30f97b=0x0;_0x4fa2d[_0x5580d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x5580d3([0x6f,0x6e])](_0x5580d3([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3c8fdc,_0x4a7f1c)=>{_0x4a7f1c[0x0][_0x5580d3([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x30f97b++,_0x30f97b==(0x3d8d127^_0x488b19)&&(_0x110cd0(),_0x3c8fdc[_0x5580d3([0x6f,0x66,0x66])]());});}))];return window[_0x5580d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5580d3([0x72,0x61,0x63,0x65])](_0x4cadc2)[_0x5580d3([0x74,0x68,0x65,0x6e])](()=>_0x4e70b9);}async function _0x5817d8(){await _0x4534ca,_0x4fa2d[_0x5580d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x5580d3([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x330b37,_0x4fa2d[_0x5580d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x5580d3([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x330b37,_0x4fa2d[_0x5580d3([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5580d3([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3edd3c(_0x43a24e){const _0x3b148d=_0x16fb6a();_0x4fa2d[_0x3b148d]=_0x5580d3([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x43a24e,_0x43a24e!=_0x5580d3([0x56,0x61,0x6c,0x69,0x64])&&_0x5817d8();}function _0x16fb6a(){const _0x46c9cf=window[_0x5580d3([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5580d3([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5580d3([0x6e,0x6f,0x77])]())[_0x5580d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5580d3([0x2e]),'');let _0x4d1c31=_0x5580d3([0x52]);for(let _0x15f400=0x0;_0x15f400<_0x46c9cf[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x15f400+=0x2){let _0x4ff43c=window[_0x5580d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x46c9cf[_0x5580d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15f400,_0x15f400+0x2));_0x4ff43c>=_0x205dd3[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4ff43c-=_0x205dd3[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4d1c31+=_0x205dd3[_0x4ff43c];}return _0x4d1c31;}function _0x2d5ba8(){const _0x4c3bff=_0x49f04f[_0x5580d3([0x73,0x70,0x6c,0x69,0x74])](_0x5580d3([0x2e]));if(0x3!=_0x4c3bff[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x9b1547(_0x4c3bff[0x1]);function _0x9b1547(_0x44475f){const _0x1998fb=_0x50a882(_0x44475f);return _0x1998fb&&_0xf760aa()?_0x1998fb:null;function _0xf760aa(){const _0xc345a0=_0x1998fb[_0x5580d3([0x6a,0x74,0x69])],_0x135201=window[_0x5580d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc345a0[_0x5580d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc345a0[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5cc5aa={..._0x1998fb,[_0x5580d3([0x6a,0x74,0x69])]:_0xc345a0[_0x5580d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xc345a0[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5cc5aa[_0x5580d3([0x76,0x63])],_0x1bc484(_0x5cc5aa)==_0x135201;}}}async function _0x4686f2(){let _0xc6f4ec=!0x0;try{const _0x158249=_0x49f04f[_0x5580d3([0x73,0x70,0x6c,0x69,0x74])](_0x5580d3([0x2e])),[_0x47962c,_0x8ac34e,_0x40db2b]=_0x158249;return _0x3c51c0(_0x47962c),await _0x513ba5(_0x47962c,_0x8ac34e,_0x40db2b),_0xc6f4ec;}catch{return!0x1;}function _0x3c51c0(_0x33d926){const _0x2f74c8=_0x50a882(_0x33d926);_0x2f74c8&&_0x2f74c8[_0x5580d3([0x61,0x6c,0x67])]==_0x5580d3([0x45,0x53,0x32,0x35,0x36])||(_0xc6f4ec=!0x1);}async function _0x513ba5(_0x3c4413,_0x35c219,_0x9a87c4){const _0x3ad04c=window[_0x5580d3([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5580d3([0x66,0x72,0x6f,0x6d])](_0x4f9356(_0x9a87c4),_0xc0c516=>_0xc0c516[_0x5580d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x181328=new window[(_0x5580d3([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5580d3([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3c4413+_0x5580d3([0x2e])+_0x35c219),_0x35e70e=window[_0x5580d3([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5580d3([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x35e70e)return;const _0x196d14=await _0x35e70e[_0x5580d3([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5580d3([0x6a,0x77,0x6b]),_0x5d2806,{[_0x5580d3([0x6e,0x61,0x6d,0x65])]:_0x5580d3([0x45,0x43,0x44,0x53,0x41]),[_0x5580d3([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5580d3([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5580d3([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x35e70e[_0x5580d3([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5580d3([0x6e,0x61,0x6d,0x65])]:_0x5580d3([0x45,0x43,0x44,0x53,0x41]),[_0x5580d3([0x68,0x61,0x73,0x68])]:{[_0x5580d3([0x6e,0x61,0x6d,0x65])]:_0x5580d3([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x196d14,_0x3ad04c,_0x181328)||(_0xc6f4ec=!0x1);}}function _0x50a882(_0x28ec12){return _0x28ec12[_0x5580d3([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5580d3([0x65,0x79]))?JSON[_0x5580d3([0x70,0x61,0x72,0x73,0x65])](_0x4f9356(_0x28ec12)):null;}function _0x4f9356(_0x3b08de){return window[_0x5580d3([0x61,0x74,0x6f,0x62])](_0x3b08de[_0x5580d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5580d3([0x2b]))[_0x5580d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5580d3([0x2f])));}function _0x1bc484(_0x42b31d){let _0x1f8271=0x1505;function _0x44d4dd(_0x5759ad){for(let _0x2f1d1d=0x0;_0x2f1d1d<_0x5759ad[_0x5580d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2f1d1d++){const _0xd49f34=_0x5759ad[_0x5580d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2f1d1d);_0x1f8271=(_0x1f8271<<0x5)+_0x1f8271+_0xd49f34,_0x1f8271&=_0x1f8271;}}function _0x5c88d4(_0x2e5716){Array[_0x5580d3([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2e5716)?_0x2e5716[_0x5580d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5c88d4):_0x2e5716&&typeof _0x2e5716==_0x5580d3([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5580d3([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2e5716)[_0x5580d3([0x73,0x6f,0x72,0x74])]()[_0x5580d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4c91a3,_0x59a4ce])=>{_0x44d4dd(_0x4c91a3),_0x5c88d4(_0x59a4ce);}):_0x44d4dd(window[_0x5580d3([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2e5716));}return _0x5c88d4(_0x42b31d),_0x1f8271>>>0x0;}function _0x1d9de6(_0x423617){return _0x423617[_0x5580d3([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5580d3([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5580d3([0x30]));}function _0x4012e6(_0x5bfc55){return _0x5bfc55[_0x5580d3([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5580d3([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5580d3([0x6a,0x6f,0x69,0x6e])]('');}function _0x330b37(){}function _0x5580d3(_0x291da8){const _0x1738cb=_0x2e3a;return _0x291da8[_0x1738cb(0x1de)](_0x3919e3=>String[_0x1738cb(0x1f2)](_0x3919e3))[_0x1738cb(0x210)]('');}_0x3edd3c(await _0x426917());}(this);}[_0x5afa72(0x1fa)](){const _0x3957b5=_0x5afa72,_0x34228b=this[_0x3957b5(0x21b)][_0x3957b5(0x1d8)][_0x3957b5(0x1fd)];_0x34228b[_0x3957b5(0x206)](_0x3957b5(0x1d9))&&_0x34228b[_0x3957b5(0x1d0)](_0x3957b5(0x1d9),{'allowAttributes':[_0x3957b5(0x1ef)]}),_0x34228b[_0x3957b5(0x206)](_0x3957b5(0x1e0))&&_0x34228b[_0x3957b5(0x1d0)](_0x3957b5(0x1e0),{'allowAttributes':[_0x3957b5(0x1ef)]});}[_0x5afa72(0x1ca)](){const _0x4e3982=_0x5afa72,_0x1198fe=this[_0x4e3982(0x21b)];_0x1198fe[_0x4e3982(0x201)][_0x4e3982(0x1c7)](_0x4e3982(0x1e3))[_0x4e3982(0x1fc)]({'model':_0x4e3982(0x1ef),'view':_0x4e3982(0x1f0)}),_0x1198fe[_0x4e3982(0x201)][_0x4e3982(0x1c7)](_0x4e3982(0x1f1))[_0x4e3982(0x218)]({'model':{'key':_0x4e3982(0x1ef),'value':_0x5ce574=>_0x5ce574[_0x4e3982(0x1d5)](_0x4e3982(0x1f0))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x2f6c14=_0x1198fe[_0x4e3982(0x1ea)][_0x4e3982(0x1d2)](_0x4e3982(0x207));_0x2f6c14&&this[_0x4e3982(0x216)](_0x2f6c14,_0x4e3982(0x1e7),(_0x390e8a,[_0x2028a2,_0x442338])=>{const _0x4db181=_0x4e3982;_0x2028a2[_0x4db181(0x1f8)](_0x4db181(0x1ef),_0x442338);});}[_0x5afa72(0x1df)](){const _0x51d7c7=_0x5afa72,_0x33e4cc=this[_0x51d7c7(0x21b)][_0x51d7c7(0x1ce)][_0x51d7c7(0x1d2)](_0x51d7c7(0x217))||{},_0x2aebbb=this[_0x51d7c7(0x21b)][_0x51d7c7(0x1ce)][_0x51d7c7(0x1d2)](_0x51d7c7(0x1e8))||'';this[_0x51d7c7(0x1da)]=_0x557634(_0x5a6d4e[_0x51d7c7(0x1cb)],_0x51d7c7(0x20c),{..._0x33e4cc,'pubkey':_0x2aebbb,'ctx-name':_0x51d7c7(0x1ee)+this[_0x51d7c7(0x1c8)],'sourceList':'','imgOnly':_0x51d7c7(0x205),'removeCopyright':_0x51d7c7(0x205),'localeName':this[_0x51d7c7(0x21b)][_0x51d7c7(0x1cf)][_0x51d7c7(0x1d7)],'externalSourcesEmbedCss':_0x51d7c7(0x1cd)}),this[_0x51d7c7(0x1da)][_0x51d7c7(0x1dc)]=_0x5c5530=>{const _0x7d0d9=_0x51d7c7;if(_0x7d0d9(0x1e2)==_0x5c5530)return _0x7d0d9(0x1eb);},_0x5a6d4e[_0x51d7c7(0x1cb)][_0x51d7c7(0x1ed)][_0x51d7c7(0x1f9)](this[_0x51d7c7(0x1da)]);}[_0x5afa72(0x215)](){const _0x960d92=_0x5afa72;this[_0x960d92(0x213)]=_0x557634(_0x5a6d4e[_0x960d92(0x1cb)],_0x960d92(0x21c),{'ctx-name':_0x960d92(0x1ee)+this[_0x960d92(0x1c8)]}),_0x5a6d4e[_0x960d92(0x1cb)][_0x960d92(0x1ed)][_0x960d92(0x1f9)](this[_0x960d92(0x213)]);}[_0x5afa72(0x1ec)](){const _0x1519c3=_0x5afa72,_0xa81390=this[_0x1519c3(0x21b)][_0x1519c3(0x1ea)][_0x1519c3(0x1d2)](_0x1519c3(0x1fe));_0xa81390&&this[_0x1519c3(0x216)](_0xa81390,_0x1519c3(0x1e1),()=>{const _0x3e1d76=_0x1519c3,_0x4ac8a4=this[_0x3e1d76(0x21b)][_0x3e1d76(0x1d8)][_0x3e1d76(0x1cb)][_0x3e1d76(0x20b)][_0x3e1d76(0x1e4)]();_0x4ac8a4&&_0x4ac8a4[_0x3e1d76(0x1d5)](_0x3e1d76(0x1ef))&&this[_0x3e1d76(0x21b)][_0x3e1d76(0x1c9)][_0x3e1d76(0x214)][_0x3e1d76(0x1d4)](_0x3e1d76(0x202),()=>{const _0x34a00c=_0x3e1d76;_0x391cf0(this[_0x34a00c(0x21b)],_0x4ac8a4);});});const _0x3582fe=this[_0x1519c3(0x21b)][_0x1519c3(0x1ea)][_0x1519c3(0x1d2)](_0x1519c3(0x1f4));_0x3582fe&&this[_0x1519c3(0x216)](_0x3582fe,_0x1519c3(0x1e1),()=>{const _0x5cc767=_0x1519c3,_0x26b4c4=this[_0x5cc767(0x21b)][_0x5cc767(0x1d8)][_0x5cc767(0x1cb)][_0x5cc767(0x20b)][_0x5cc767(0x1e4)]();_0x26b4c4&&_0x26b4c4[_0x5cc767(0x1d5)](_0x5cc767(0x1ef))&&this[_0x5cc767(0x21b)][_0x5cc767(0x1c9)][_0x5cc767(0x214)][_0x5cc767(0x1d4)](_0x5cc767(0x202),()=>{const _0x40e045=_0x5cc767;_0x391cf0(this[_0x40e045(0x21b)],_0x26b4c4);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x59bc2f,ObservableMixin as _0x4524f3}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x44d888}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x1d07bc}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x5cb7ee}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x18ea06}from'../../utils/uploadutils.js';import{getImageUrls as _0x289443,getImageDimension as _0x5027e7}from'../../utils/editingutils.js';import{isAncestor as _0x260043}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x4524f3(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1f7ac2,_0x513551,_0x123737){super(),this['_editor']=_0x1f7ac2,this['_dialog']=_0x513551,this['_imageElement']=_0x123737,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 _0x5d50b9=this['_imageElement'],_0x45af74=_0x5d50b9['getAttribute']('uploadcareImageId'),_0x5a92fa=_0x5d50b9['getAttribute']('src');if(_0x45af74)await this['_loadImageInfo'](_0x45af74,_0x5a92fa);else{if(this['_imageCache']['has'](_0x5a92fa)){const _0x4994c5=this['_imageCache']['get'](_0x5a92fa);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4994c5['url'],this['imageDimension']=_0x4994c5['dimension'],this['imageId']=_0x4994c5['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5caf97}=this['_editor'],t=_0x5caf97['t'],_0x7217d7=new _0x5cb7ee(_0x5caf97,this['imageStatus'],this['_attributes']);_0x7217d7['bind']('status')['to'](this,'imageStatus'),_0x7217d7['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x7217d7['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x7217d7['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x7217d7,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1d07bc,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x7217d7,'position':_0x44d888['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x7217d7['focus']();},'onHide':()=>{_0x7217d7['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x38560d=>!_0x260043(_0x38560d,_0x7217d7['element'])}});}['_loadImageInfo'](_0x38fe83,_0x593b89){return _0x18ea06['getInfo'](_0x38fe83,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x223294=>{const {width:_0x44bd23,height:_0x21d36a}=_0x223294['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x593b89,this['imageDimension']={'width':_0x44bd23,'height':_0x21d36a},this['imageId']=_0x38fe83;})['catch'](_0x5152a2=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5152a2['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x246f40,_0xc87a8a){return this['_getImageAsFile'](_0x246f40)['then'](_0x1ee9d8=>_0x18ea06['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0xc87a8a['signal'],'file':_0x1ee9d8,'onProgress':_0x424f92=>{_0x424f92&&_0x424f92['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x424f92['value']));}}))['then'](_0x604a2d=>{const {width:_0x243f72,height:_0x22c89b}=_0x604a2d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x604a2d['cdnUrl'],this['imageDimension']={'width':_0x243f72,'height':_0x22c89b},this['imageId']=_0x604a2d['uuid'],this['imageUploadProgress']=null;const _0x1ed27d=_0x246f40['getAttribute']('src');this['_imageCache']['set'](_0x1ed27d,{'id':_0x604a2d['uuid'],'url':_0x604a2d['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1fb3cb=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1fb3cb['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4d4ea4,_0x19fe1){_0x4d4ea4['on']('apply',(_0x59b12e,_0x40ad73)=>{this['_replaceImage'](_0x19fe1,_0x40ad73['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4d4ea4['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4d4ea4['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1d647b,_0x30c15c,_0x50eb38){const _0x1acad2=this['_editor'],{width:_0x18382b,height:_0x9e2d0b}=_0x5027e7(_0x30c15c,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x5dafc0,imageSources:_0x5c3ad8}=_0x289443(_0x30c15c,_0x18382b);_0x1acad2['model']['change'](_0x37c514=>{if('$graveyard'===_0x1d647b['root']['rootName']){_0x1acad2['execute']('insertImage',{'imageType':_0x1d647b['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1d647b['getAttributes']()),'uploadcareImageId':_0x50eb38,'src':_0x5dafc0,'sources':_0x5c3ad8,'width':_0x18382b,'height':_0x9e2d0b}});const _0x4052c9=_0x1d647b['getChildren']();_0x1d647b=_0x1acad2['model']['document']['selection']['getSelectedElement']();for(const _0x22ae34 of _0x4052c9)_0x37c514['append'](_0x37c514['cloneElement'](_0x22ae34),_0x1d647b);}else _0x37c514['setSelection'](_0x1d647b,'on'),_0x1acad2['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1d647b['getAttributes']()),'uploadcareImageId':_0x50eb38,'src':_0x5dafc0,'sources':_0x5c3ad8,'width':_0x18382b,'height':_0x9e2d0b},_0x1d647b);_0x37c514['setSelection'](_0x1d647b,'on');});}async['_getImageAsFile'](_0x52fc18){const _0x204484=_0x59bc2f['window'],_0x24c659=_0x59bc2f['document']['location']['href'],_0x146535=new _0x204484['URL'](_0x52fc18['getAttribute']('src'),_0x24c659);if('data:'===_0x146535['protocol']){const _0x51c2a2=_0x146535['href']['split'](','),_0x182f65=_0x51c2a2[0x0]['match'](/:(.*?);/)[0x1],_0x6990a1=_0x182f65['split']('/')[0x1],_0x13cd1a=_0x204484['atob'](_0x51c2a2[_0x51c2a2['length']-0x1]);let _0x44949c=_0x13cd1a['length'];const _0x4fed85=new _0x204484['Uint8Array'](_0x44949c);for(;_0x44949c--;)_0x4fed85[_0x44949c]=_0x13cd1a['charCodeAt'](_0x44949c);return new _0x204484['File']([_0x4fed85],'image.'+_0x6990a1,{'type':_0x182f65});}const _0x31e33c=_0x146535['href']['split']('/'),_0x17ae1d=_0x31e33c[_0x31e33c['length']-0x1],_0x276473=_0x17ae1d['split']('.')[0x1];return _0x204484['fetch'](_0x146535['href'])['then'](_0x59da9f=>_0x59da9f['clone']()['blob']())['then'](_0x579969=>new _0x204484['File']([_0x579969],_0x17ae1d,{'type':'image/'+_0x276473}));}}
23
+ import{global as _0x4b7548,ObservableMixin as _0x397d57}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x449390}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x3f358e}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x49a226}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x3adfe9}from'../../utils/uploadutils.js';import{getImageUrls as _0x807d8c,getImageDimension as _0x1665bf}from'../../utils/editingutils.js';import{isAncestor as _0xe213ee}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x397d57(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1ee991,_0x19e1bf,_0x185bdd){super(),this['_editor']=_0x1ee991,this['_dialog']=_0x19e1bf,this['_imageElement']=_0x185bdd,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 _0x176e26=this['_imageElement'],_0x14a72b=_0x176e26['getAttribute']('uploadcareImageId'),_0x2a909c=_0x176e26['getAttribute']('src');if(_0x14a72b)await this['_loadImageInfo'](_0x14a72b,_0x2a909c);else{if(this['_imageCache']['has'](_0x2a909c)){const _0x2bd330=this['_imageCache']['get'](_0x2a909c);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2bd330['url'],this['imageDimension']=_0x2bd330['dimension'],this['imageId']=_0x2bd330['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x95fe71}=this['_editor'],t=_0x95fe71['t'],_0x1c08bf=new _0x49a226(_0x95fe71,this['imageStatus'],this['_attributes']);_0x1c08bf['bind']('status')['to'](this,'imageStatus'),_0x1c08bf['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1c08bf['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1c08bf['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1c08bf,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3f358e,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1c08bf,'position':_0x449390['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1c08bf['focus']();},'onHide':()=>{_0x1c08bf['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5341a7=>!_0xe213ee(_0x5341a7,_0x1c08bf['element'])}});}['_loadImageInfo'](_0x7ec6a1,_0x20c0c3){return _0x3adfe9['getInfo'](_0x7ec6a1,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x2819e8=>{const {width:_0x52a419,height:_0x228703}=_0x2819e8['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x20c0c3,this['imageDimension']={'width':_0x52a419,'height':_0x228703},this['imageId']=_0x7ec6a1;})['catch'](_0x2b2bb1=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2b2bb1['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1d178a,_0x26032c){return this['_getImageAsFile'](_0x1d178a)['then'](_0x24cd45=>_0x3adfe9['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x26032c['signal'],'file':_0x24cd45,'onProgress':_0x540956=>{_0x540956&&_0x540956['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x540956['value']));}}))['then'](_0x3f3bb4=>{const {width:_0x175cf3,height:_0x41bfda}=_0x3f3bb4['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3f3bb4['cdnUrl'],this['imageDimension']={'width':_0x175cf3,'height':_0x41bfda},this['imageId']=_0x3f3bb4['uuid'],this['imageUploadProgress']=null;const _0x4810f1=_0x1d178a['getAttribute']('src');this['_imageCache']['set'](_0x4810f1,{'id':_0x3f3bb4['uuid'],'url':_0x3f3bb4['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0xcca6e0=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xcca6e0['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0xb2d87e,_0x281122){_0xb2d87e['on']('apply',(_0x547ac3,_0x1ada1e)=>{this['_replaceImage'](_0x281122,_0x1ada1e['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0xb2d87e['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0xb2d87e['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x26a919,_0xe6d3b3,_0xb59b62){const _0x422548=this['_editor'],{width:_0x58c9f6,height:_0x4b69e9}=_0x1665bf(_0xe6d3b3,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x27b7a9,imageSources:_0x3c7f08}=_0x807d8c(_0xe6d3b3,_0x58c9f6);_0x422548['model']['change'](_0x533249=>{if('$graveyard'===_0x26a919['root']['rootName']){_0x422548['execute']('insertImage',{'imageType':_0x26a919['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x26a919['getAttributes']()),'uploadcareImageId':_0xb59b62,'src':_0x27b7a9,'sources':_0x3c7f08,'width':_0x58c9f6,'height':_0x4b69e9}});const _0x2d8992=_0x26a919['getChildren']();_0x26a919=_0x422548['model']['document']['selection']['getSelectedElement']();for(const _0xbf2ef5 of _0x2d8992)_0x533249['append'](_0x533249['cloneElement'](_0xbf2ef5),_0x26a919);}else _0x533249['setSelection'](_0x26a919,'on'),_0x422548['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x26a919['getAttributes']()),'uploadcareImageId':_0xb59b62,'src':_0x27b7a9,'sources':_0x3c7f08,'width':_0x58c9f6,'height':_0x4b69e9},_0x26a919);_0x533249['setSelection'](_0x26a919,'on');});}async['_getImageAsFile'](_0x219fc5){const _0x3507f6=_0x4b7548['window'],_0x214c6a=_0x4b7548['document']['location']['href'],_0x565a7a=new _0x3507f6['URL'](_0x219fc5['getAttribute']('src'),_0x214c6a);if('data:'===_0x565a7a['protocol']){const _0x131dfa=_0x565a7a['href']['split'](','),_0x322f97=_0x131dfa[0x0]['match'](/:(.*?);/)[0x1],_0x5cba4d=_0x322f97['split']('/')[0x1],_0xd50a27=_0x3507f6['atob'](_0x131dfa[_0x131dfa['length']-0x1]);let _0x15ec85=_0xd50a27['length'];const _0x33d51c=new _0x3507f6['Uint8Array'](_0x15ec85);for(;_0x15ec85--;)_0x33d51c[_0x15ec85]=_0xd50a27['charCodeAt'](_0x15ec85);return new _0x3507f6['File']([_0x33d51c],'image.'+_0x5cba4d,{'type':_0x322f97});}const _0x1f378b=_0x565a7a['href']['split']('/'),_0x2ca72a=_0x1f378b[_0x1f378b['length']-0x1],_0x4c1157=_0x2ca72a['split']('.')[0x1];return _0x3507f6['fetch'](_0x565a7a['href'])['then'](_0x18dd94=>_0x18dd94['clone']()['blob']())['then'](_0x40bbd2=>new _0x3507f6['File']([_0x40bbd2],_0x2ca72a,{'type':'image/'+_0x4c1157}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x3377dd,_0x3031b7){const _0x519581=_0x41ef,_0x40ba89=_0x3377dd();while(!![]){try{const _0x4ef5cb=parseInt(_0x519581(0xe7))/0x1*(parseInt(_0x519581(0xd9))/0x2)+-parseInt(_0x519581(0xd4))/0x3*(-parseInt(_0x519581(0xd8))/0x4)+-parseInt(_0x519581(0xda))/0x5*(parseInt(_0x519581(0xdf))/0x6)+parseInt(_0x519581(0xe5))/0x7*(-parseInt(_0x519581(0xe6))/0x8)+-parseInt(_0x519581(0xe0))/0x9*(-parseInt(_0x519581(0xe1))/0xa)+parseInt(_0x519581(0xd7))/0xb*(parseInt(_0x519581(0xe4))/0xc)+-parseInt(_0x519581(0xdc))/0xd;if(_0x4ef5cb===_0x3031b7)break;else _0x40ba89['push'](_0x40ba89['shift']());}catch(_0x56a86a){_0x40ba89['push'](_0x40ba89['shift']());}}}(_0x243e,0x8ba2f));import{View as _0x43faec}from'ckeditor5/src/ui.js';function _0x243e(){const _0x368637=['258GhVzsq','107109UozghN','730ppiqvN','bindTemplate','ck-uploadcare-theme','70524JjwnLm','10654UVmrqE','1208YtaDxx','1807syddzA','image-edit','849Tkltox','setTemplate','set','2123LJnYEb','4264miXGyB','176EdiRnz','95220xmmkiy','imageSrc','10959819GvDRhD','uc-light','uc-cloud-image-editor'];_0x243e=function(){return _0x368637;};return _0x243e();}function _0x41ef(_0xb574b5,_0x3c6b12){const _0x243e41=_0x243e();return _0x41ef=function(_0x41ef7b,_0x521bef){_0x41ef7b=_0x41ef7b-0xd3;let _0x2497ce=_0x243e41[_0x41ef7b];return _0x2497ce;},_0x41ef(_0xb574b5,_0x3c6b12);}export class UploadcareImageEditFormEditingView extends _0x43faec{constructor(_0x226fa7,_0x3f4afa){const _0x31ca1a=_0x41ef;super(_0x226fa7);const _0x4fa05e=this[_0x31ca1a(0xe2)];this[_0x31ca1a(0xd6)](_0x31ca1a(0xdb),''),this[_0x31ca1a(0xd5)]({'tag':_0x31ca1a(0xde),'attributes':{..._0x3f4afa,'class':[_0x31ca1a(0xdd),_0x31ca1a(0xe3)],'ctx-name':_0x31ca1a(0xd3),'cdn-url':_0x4fa05e['to'](_0x31ca1a(0xdb))}});}}
23
+ function _0x3375(_0x4d54fa,_0x865dd8){const _0x13f637=_0x13f6();return _0x3375=function(_0x337526,_0x1d0e5d){_0x337526=_0x337526-0x1dd;let _0x54b72a=_0x13f637[_0x337526];return _0x54b72a;},_0x3375(_0x4d54fa,_0x865dd8);}(function(_0xfbb19c,_0x36fdd7){const _0x3fe132=_0x3375,_0x2d9394=_0xfbb19c();while(!![]){try{const _0x343602=-parseInt(_0x3fe132(0x1e6))/0x1+parseInt(_0x3fe132(0x1ee))/0x2*(parseInt(_0x3fe132(0x1e3))/0x3)+parseInt(_0x3fe132(0x1eb))/0x4*(parseInt(_0x3fe132(0x1ea))/0x5)+-parseInt(_0x3fe132(0x1e9))/0x6*(parseInt(_0x3fe132(0x1ef))/0x7)+-parseInt(_0x3fe132(0x1e7))/0x8*(parseInt(_0x3fe132(0x1e2))/0x9)+parseInt(_0x3fe132(0x1e4))/0xa*(parseInt(_0x3fe132(0x1e5))/0xb)+-parseInt(_0x3fe132(0x1f0))/0xc;if(_0x343602===_0x36fdd7)break;else _0x2d9394['push'](_0x2d9394['shift']());}catch(_0x6f7a82){_0x2d9394['push'](_0x2d9394['shift']());}}}(_0x13f6,0x5beee));function _0x13f6(){const _0x356ac4=['705228DMvrIu','2963465mAGtmi','4LRLthT','imageSrc','uc-cloud-image-editor','8608xvmutD','14HgAJNm','5720508LeknnB','image-edit','ck-uploadcare-theme','set','bindTemplate','uc-light','7164lVATWD','339aKgrrd','500djENLp','45760DCWQGg','61790KCsFLN','1376jzWMsN','setTemplate'];_0x13f6=function(){return _0x356ac4;};return _0x13f6();}import{View as _0x4ca0c3}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x4ca0c3{constructor(_0x23bad0,_0x126657){const _0x5e57fe=_0x3375;super(_0x23bad0);const _0x13932c=this[_0x5e57fe(0x1e0)];this[_0x5e57fe(0x1df)](_0x5e57fe(0x1ec),''),this[_0x5e57fe(0x1e8)]({'tag':_0x5e57fe(0x1ed),'attributes':{..._0x126657,'class':[_0x5e57fe(0x1e1),_0x5e57fe(0x1de)],'ctx-name':_0x5e57fe(0x1dd),'cdn-url':_0x13932c['to'](_0x5e57fe(0x1ec))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x12f4bb}from'ckeditor5/src/icons.js';import{ButtonView as _0x3ee0a1,IconView as _0x2aaae0,View as _0x1e0b3b}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x1e0b3b{constructor(_0xd2455a){super(_0xd2455a);const t=_0xd2455a['t'];this['set']('errorType',null);const _0x3765cd=new _0x3ee0a1(_0xd2455a);_0x3765cd['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x3765cd['withText']=!0x0,_0x3765cd['class']='ck-button-action',_0x3765cd['on']('execute',()=>{this['fire']('retry');}),_0x3765cd['bind']('isVisible')['to'](this,'errorType',_0x4bffbd=>'NotFound'!==_0x4bffbd);const _0x561611=new _0x2aaae0();_0x561611['content']=_0x12f4bb,_0x561611['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1a3553=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':[_0x561611,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1a3553['to']('errorType',_0xd80fdf=>t('NotFound'!==_0xd80fdf?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x3765cd]},{'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 _0x97fc0e}from'ckeditor5/src/icons.js';import{ButtonView as _0x3cb057,IconView as _0x275152,View as _0x409daf}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x409daf{constructor(_0x4b0ba5){super(_0x4b0ba5);const t=_0x4b0ba5['t'];this['set']('errorType',null);const _0x36c2b5=new _0x3cb057(_0x4b0ba5);_0x36c2b5['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x36c2b5['withText']=!0x0,_0x36c2b5['class']='ck-button-action',_0x36c2b5['on']('execute',()=>{this['fire']('retry');}),_0x36c2b5['bind']('isVisible')['to'](this,'errorType',_0x546c3b=>'NotFound'!==_0x546c3b);const _0x59382c=new _0x275152();_0x59382c['content']=_0x97fc0e,_0x59382c['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1afc45=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':[_0x59382c,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1afc45['to']('errorType',_0x170c5a=>t('NotFound'!==_0x170c5a?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x36c2b5]},{'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'}]}]}]});}}