@ckeditor/ckeditor5-uploadcare 47.6.0-alpha.9 → 47.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x5ca409,Command as _0x131af3}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0xcf189a,IconGooglePhotos as _0x55414b,IconGoogleDrive as _0x3d076e,IconFacebook as _0x2fde51,IconDropbox as _0x2a1f94,IconUploadcareLink as _0x4e0063,IconUploadcareImageUpload as _0x18f340,IconError as _0xd15cff,IconUploadcareImageEdit as _0x4dd893}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x63806c,MenuBarMenuListItemButtonView as _0x4519c7,View as _0x239003,FocusCycler as _0x319d95,Dialog as _0x1b5898,DialogViewPosition as _0x5321b1,SpinnerView as _0x202d5c,IconView as _0x56c578,Notification as _0x2c4251}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x171ee1,DomEmitterMixin as _0x1c4415,global as _0x5a182a,getAncestors as _0xb2a30b,ObservableMixin as _0x2f201a,uid as _0x258940,createElement as _0x37361f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x55b44e}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x5ecffe,info as _0x569448}from'@uploadcare/upload-client';import*as _0x5f3623 from'@uploadcare/file-uploader';var i=function(_0x446759){return _0x446759['Local']='local',_0x446759['URL']='url',_0x446759['Dropbox']='dropbox',_0x446759['GDrive']='gdrive',_0x446759['Facebook']='facebook',_0x446759['GPhotos']='gphotos',_0x446759['OneDrive']='onedrive',_0x446759;}({});function _(_0x5dd44d,_0x4da134,_0x56d927){const t=_0x5dd44d['t'],_0x495b82=_0x5dd44d['t'];switch(_0x4da134){case i['Local']:return{'text':_0x495b82('Insert'===_0x56d927?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x495b82('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x56d927?_0x495b82('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x495b82('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x56d927?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x56d927?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x56d927?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x56d927?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x56d927?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x4da134;}}class e extends _0x5ca409{['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 _0x286198=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x531094;for(const _0x1060fd in _0x286198){const _0x1a1643=_0x1060fd,_0x59305a=_0x286198[_0x1a1643];if('uploadcareLicenseKeyValid'==_0x59305a||'uploadcareLicenseKeyInvalid'==_0x59305a||'uploadcareLicenseKeyExpired'==_0x59305a||'uploadcareLicenseKeyDomainLimit'==_0x59305a||'uploadcareLicenseKeyNotAllowed'==_0x59305a||'uploadcareLicenseKeyEvaluationLimit'==_0x59305a||'uploadcareLicenseKeyUsageLimit'==_0x59305a){delete _0x286198[_0x1a1643],_0x531094=_0x59305a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x531094&&_0x286198['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x531094&&_0x286198['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x531094&&_0x286198['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x531094&&_0x286198['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x531094&&_0x286198['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x531094&&_0x286198['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x4ea18b}=this,_0x40c31a=_0x4ea18b['commands']['get']('uploadcare');if(!_0x40c31a)return;const _0x480fd2=this['_normalizeConfigSourceList'](_0x4ea18b['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x1c297f,_0x49c283)=>{const _0x51cab9=this['_getIntegrationKey'](_0x49c283['type']);return _0x1c297f[_0x51cab9]||(_0x1c297f[_0x51cab9]=[]),_0x1c297f[_0x51cab9]['push'](_0x49c283),_0x1c297f;},{});_0x4ea18b['plugins']['has']('ImageInsertUI')&&_0x4ea18b['commands']['get']('uploadcare')&&Object['entries'](_0x480fd2)['forEach'](([_0x4fe2b5,_0x1783cf])=>{_0x4ea18b['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x4fe2b5,'observable':()=>_0x40c31a,'buttonViewCreator':()=>this['_createToolbarButton'](_0x1783cf),'formViewCreator':()=>this['_createDropdownButtons'](_0x1783cf),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x1783cf),'override':'assetManager'!==_0x4fe2b5});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x31ab59){const {locale:_0x22888c}=this['editor'];return _0x31ab59['map'](_0xdb2d7c=>{const _0x3379e1=_(_0x22888c,_0xdb2d7c,'Insert');switch(_0xdb2d7c){case i['Local']:return{'icon':_0x18f340,'type':i['Local'],..._0x3379e1};case i['URL']:return{'icon':_0x4e0063,'type':i['URL'],..._0x3379e1};case i['Dropbox']:return{'icon':_0x2a1f94,'type':i['Dropbox'],..._0x3379e1};case i['Facebook']:return{'icon':_0x2fde51,'type':i['Facebook'],..._0x3379e1};case i['GDrive']:return{'icon':_0x3d076e,'type':i['GDrive'],..._0x3379e1};case i['GPhotos']:return{'icon':_0x55414b,'type':i['GPhotos'],..._0x3379e1};case i['OneDrive']:return{'icon':_0xcf189a,'type':i['OneDrive'],..._0x3379e1};}});}['_getIntegrationKey'](_0x59bed7){switch(_0x59bed7){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x1282ca,_0x3c08a6){const _0x39cf98=this['editor'],_0x289a83=new _0x1282ca(_0x39cf98['locale']),_0xe9fa3d=_0x39cf98['commands']['get']('uploadcare');return _0x289a83['bind']('isEnabled')['to'](_0xe9fa3d),_0x289a83['on']('execute',()=>{_0xe9fa3d['execute'](_0x3c08a6);}),_0x289a83;}['_createToolbarButton'](_0x3b68de){const {locale:_0x48a1e9}=this['editor'],_0x5b6130=this['editor']['plugins']['get']('ImageInsertUI'),_0x12a36d=_0x3b68de[0x0],_0x162135=this['_createButton'](_0x63806c,_0x12a36d['type']);return _0x162135['icon']=_0x12a36d['icon'],_0x162135['bind']('label')['to'](_0x5b6130,'isImageSelected',_0x334ae6=>_(_0x48a1e9,_0x12a36d['type'],_0x334ae6?'Replace':'Insert')['text']),_0x162135['tooltip']=!0x0,_0x162135;}['_createDropdownButtons'](_0x11a45e){const {locale:_0x22ff38}=this['editor'],_0x1d90ee=this['editor']['plugins']['get']('ImageInsertUI');return _0x11a45e['map'](_0x4b8595=>{const _0x5ee99d=this['_createButton'](_0x63806c,_0x4b8595['type']);return _0x5ee99d['withText']=!0x0,_0x5ee99d['icon']=_0x4b8595['icon'],_0x5ee99d['bind']('label')['to'](_0x1d90ee,'isImageSelected',_0x21fb33=>_(_0x22ff38,_0x4b8595['type'],_0x21fb33?'Replace':'Insert')['text']),_0x5ee99d;});}['_createMenuBarButtons'](_0x2a6bc0){return _0x2a6bc0['map'](_0x2d57e6=>{const _0x18a7a0=this['_createButton'](_0x4519c7,_0x2d57e6['type']);return _0x18a7a0['icon']=_0x2d57e6['icon'],_0x18a7a0['label']=_0x2d57e6['shortText'],_0x18a7a0;});}}class F extends _0x239003{['focusTracker'];['focusCycler'];constructor(_0x56efd5){super(_0x56efd5),this['focusTracker']=new _0x171ee1(),this['focusCycler']=new _0x319d95({'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(_0x117da4,_0x2802a6){super(_0x117da4),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-'+_0x2802a6}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x421631,_0x43af60){const _0x57e9bc=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x37e5c3=>_0x37e5c3<=_0x43af60)['map'](_0x46385d=>_0x421631['replace'](/\/$/,'')+'/-/resize/'+_0x46385d+'x/\x20'+_0x46385d+'w');return{'imageFallbackUrl':_0x421631,'imageSources':[{'srcset':_0x57e9bc['join'](',\x20'),'sizes':'(max-width:\x20'+_0x43af60+'px)\x20100vw,\x20'+_0x43af60+'px','type':'image/webp'}]};}function S(_0x2167dc,_0x9e11a0,_0x2e7584){const _0x5bfc60=_0x2167dc['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5bfc60?parseInt(_0x5bfc60[0x1],0xa):_0x9e11a0,'height':_0x5bfc60?parseInt(_0x5bfc60[0x2],0xa):_0x2e7584};}function p(_0x4b77ac,_0x4ad6e4){const _0x2e046f=new(_0x1c4415())(),_0x920c66=_0x4b77ac['plugins']['get']('ImageUtils'),_0x12175b=_0x4b77ac['editing']['mapper']['toViewElement'](_0x4ad6e4),_0x222906=_0x920c66['findViewImgElement'](_0x12175b),_0x23d713=_0x4b77ac['editing']['view']['domConverter']['viewToDom'](_0x222906),_0x4096a5=_0x4ad6e4['getAttribute']('width'),_0x5801c8=_0x4ad6e4['getAttribute']('height'),_0x52e110='image-processing';_0x4b77ac['editing']['view']['change'](_0x59083f=>{_0x59083f['addClass'](_0x52e110,_0x12175b),_0x59083f['setStyle']('aspect-ratio',_0x4096a5+'/'+_0x5801c8,_0x222906);}),_0x2e046f['listenTo'](_0x23d713,'load',()=>{_0x2e046f['stopListening'](_0x23d713,'load'),_0x4b77ac['editing']['view']['change'](_0x2405f4=>{_0x2405f4['removeClass'](_0x52e110,_0x12175b),_0x2405f4['removeStyle']('aspect-ratio',_0x222906);});});}function z(_0x179cf2){if(Array['isArray'](_0x179cf2)){const _0x178570=_0x179cf2['map'](z);return _0x1c1240=>_0x178570['some'](_0x375735=>_0x375735(_0x1c1240));}if('origin'==_0x179cf2){const _0x1f071f=_0x5a182a['window']['location']['origin'];return _0x402b56=>new URL(_0x402b56,_0x5a182a['document']['baseURI'])['origin']==_0x1f071f;}return'function'==typeof _0x179cf2?_0x179cf2:_0x179cf2 instanceof RegExp?_0x146f66=>!(!_0x146f66['match'](_0x179cf2)&&!_0x146f66['replace'](/^https?:\/\//,'')['match'](_0x179cf2)):()=>!0x1;}function A(_0x4d52c9,_0x335ef0){return _0xb2a30b(_0x4d52c9['target'])['includes'](_0x335ef0);}class n extends/* #__PURE__ -- @preserve */
24
- _0x2f201a(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x644239,_0x28970d,_0x48f0b9){super(),this['_editor']=_0x644239,this['_editing']=_0x28970d,this['_dialog']=_0x644239['plugins']['get'](_0x1b5898),this['_api']=_0x28970d['ctxElement']['getAPI'](),this['_type']=_0x48f0b9,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:_0x1dcf31,model:_0x1f6a7f}=this['_editor'],_0x403363=_0x1f6a7f['document']['selection']['getSelectedElement'](),_0xc2eb8e=_0x403363&&(_0x403363['is']('element','imageBlock')||_0x403363['is']('element','imageInline'));this['_formView']=new x(_0x1dcf31,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x18f340,'title':_(_0x1dcf31,this['_type'],_0xc2eb8e?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5321b1['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x58d99a=>!A(_0x58d99a,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x5a5b3f}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4fb570=>{const _0x424dda=_0x5a5b3f['length'];for(const _0x12595a of _0x5a5b3f){const _0x4582b7=_0x12595a===_0x5a5b3f[_0x424dda-0x1],{cdnUrl:_0x3d67a0,fileInfo:_0x1067e7}=_0x12595a;if(!_0x3d67a0||!_0x1067e7)continue;const {width:_0x1070ba,height:_0xe17d0d}=_0x1067e7['imageInfo'],_0x205a1f=S(_0x3d67a0,_0x1070ba,_0xe17d0d),_0x1034f3=C(_0x3d67a0,_0x205a1f['width']),_0x3ee157={'id':_0x1067e7['uuid'],'type':'image','attributes':{'imageDimension':_0x205a1f,..._0x1034f3}};this['_insertAsset'](_0x3ee157,_0x4582b7,_0x4fb570);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x21e23d=>{'idle'===_0x21e23d['detail']['status']&&!_0x21e23d['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x43b55b,_0x1252f6,_0x47fe3e){const _0x4a5fc3=this['_editor']['model']['document']['selection'],_0x5d0472=_0x4a5fc3['getSelectedElement'](),_0x436ce1=!(!_0x5d0472||!_0x5d0472['is']('element','imageInline'));_0x47fe3e['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x43b55b,_0x436ce1),_0x1252f6||_0x47fe3e['setSelection'](_0x4a5fc3['getLastPosition']());}['_insertImage'](_0x46465d,_0x2a6dac){const _0x3751bc=this['_editor'],{imageDimension:_0x1b9a31,imageFallbackUrl:_0x276358,imageSources:_0x4d1ccc}=_0x46465d['attributes'];_0x3751bc['execute']('insertImage',{'imageType':_0x2a6dac?'imageInline':null,'source':{'uploadcareImageId':_0x46465d['id'],'src':_0x276358,'sources':_0x4d1ccc,..._0x1b9a31}});}}class w extends _0x131af3{['_editing'];['_controller']=null;static get['requires'](){return[_0x1b5898,o];}constructor(_0x1934b0){super(_0x1934b0),this['_editing']=_0x1934b0['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x250ff8){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x250ff8);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x2f374d,..._0x19cfec}){return _0x5ecffe(_0x2f374d,_0x19cfec);}static['getInfo'](_0x2225a2,_0x2e5909){return _0x569448(_0x2225a2,_0x2e5909);}}class f extends _0x5ca409{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x55b44e,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x41558d=this['editor'];if(!!!_0x41558d['config']['get']('uploadcare'))return;_0x41558d['plugins']['get'](_0x55b44e)['createUploadAdapter']=_0x16df51=>new k(_0x16df51,_0x41558d),_0x41558d['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x482ec0,{imageElement:_0x2083f0,data:_0x3cac39})=>{_0x41558d['model']['change'](_0x5b1483=>{_0x5b1483['setAttribute']('uploadcareImageId',_0x3cac39['uploadcareImageId'],_0x2083f0);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x58d048,_0x3d8d0c){this['loader']=_0x58d048,this['editor']=_0x3d8d0c,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4b76c7=await this['loader']['file'];return j['upload']({'file':_0x4b76c7,'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':_0x4ea832=>{_0x4ea832&&_0x4ea832['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x4ea832['value']);}})['then'](async _0x38278f=>{const {imageFallbackUrl:_0x5f27fc,imageSources:_0x50957a}=C(_0x38278f['cdnUrl'],_0x38278f['imageInfo']['width']);return{'uploadcareImageId':_0x38278f['uuid'],'default':_0x5f27fc,'sources':_0x50957a};})['catch'](()=>{const _0x33cd7f=t('Cannot\x20upload\x20file:')+('\x20'+_0x4b76c7['name']+'.');return Promise['reject'](_0x33cd7f);});}['abort'](){this['controller']['abort']();}}class o extends _0x5ca409{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x1b5898];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x572d3f){super(_0x572d3f),this['ucContextId']=_0x258940();}['init'](){const _0xee8c22=this['editor'];_0xee8c22['commands']['add']('uploadcare',new w(_0xee8c22));}['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 _0x135af5=_0x5a182a['document']['querySelector']('input[uploadcare-file-input]');_0x135af5&&_0x135af5['remove']();}),async function(_0x5a1b13){const _0x57f991=_0x2883be([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x103663=0x535f8c3a,_0x5cfb50=0x53580f5a^_0x103663,_0x8210df=window[_0x2883be([0x44,0x61,0x74,0x65])][_0x2883be([0x6e,0x6f,0x77])](),_0x1fd6cd=_0x5a1b13[_0x2883be([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x55c0b6=new window[(_0x2883be([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20f95d=>{_0x1fd6cd[_0x2883be([0x6f,0x6e,0x63,0x65])](_0x2883be([0x72,0x65,0x61,0x64,0x79]),_0x20f95d);}),_0x1f34e9={[_0x2883be([0x6b,0x74,0x79])]:_0x2883be([0x45,0x43]),[_0x2883be([0x75,0x73,0x65])]:_0x2883be([0x73,0x69,0x67]),[_0x2883be([0x63,0x72,0x76])]:_0x2883be([0x50,0x2d,0x32,0x35,0x36]),[_0x2883be([0x78])]:_0x2883be([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]),[_0x2883be([0x79])]:_0x2883be([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]),[_0x2883be([0x61,0x6c,0x67])]:_0x2883be([0x45,0x53,0x32,0x35,0x36])},_0x47e27b=_0x1fd6cd[_0x2883be([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2883be([0x67,0x65,0x74])](_0x2883be([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1e225b(){let _0x4ab010,_0x155933=null,_0x2f08ee=null;try{if(_0x47e27b==_0x2883be([0x47,0x50,0x4c]))return _0x2883be([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4ab010=_0x5bb44a(),!_0x4ab010)return _0x2883be([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4ab010[_0x2883be([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2f08ee=_0x4f8c3d(_0x4ab010[_0x2883be([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4ab010[_0x2883be([0x6a,0x74,0x69])])),await _0x4cb54d()?_0x25171e()?_0x310329()?_0x2883be([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3b888a()?(_0x4ab010[_0x2883be([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2883be([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x155933=_0x52fa09(_0x2883be([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5af3f4()):_0x2883be([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2883be([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2883be([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2883be([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x310329(){const _0x2a89d2=[_0x2883be([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2883be([0x74,0x72,0x69,0x61,0x6c])][_0x2883be([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ab010[_0x2883be([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x8210df/0x3e8:0xe10*_0x5cfb50;return _0x4ab010[_0x2883be([0x65,0x78,0x70])]<_0x2a89d2;}function _0x25171e(){const _0x26c8bb=_0x4ab010[_0x2883be([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x26c8bb&&(!!_0x26c8bb[_0x2883be([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2883be([0x2a]))||!!_0x26c8bb[_0x2883be([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2883be([0x55,0x50,0x4c,0x43])));}function _0x3b888a(){const _0x12ed72=_0x4ab010[_0x2883be([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x12ed72||0x0==_0x12ed72[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x912445}=new URL(window[_0x2883be([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x12ed72[_0x2883be([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x912445))return!0x0;const _0x3a08ed=_0x912445[_0x2883be([0x73,0x70,0x6c,0x69,0x74])](_0x2883be([0x2e]));return _0x12ed72[_0x2883be([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x13ed57=>_0x13ed57[_0x2883be([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2883be([0x2a])))[_0x2883be([0x6d,0x61,0x70])](_0x5938ff=>_0x5938ff[_0x2883be([0x73,0x70,0x6c,0x69,0x74])](_0x2883be([0x2e])))[_0x2883be([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x541d06=>_0x541d06[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3a08ed[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2883be([0x6d,0x61,0x70])](_0x1474fd=>Array(_0x3a08ed[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1474fd[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2883be([0x66,0x69,0x6c,0x6c])](_0x1474fd[0x0]===_0x2883be([0x2a])?_0x2883be([0x2a]):'')[_0x2883be([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1474fd))[_0x2883be([0x73,0x6f,0x6d,0x65])](_0x2bc58f=>_0x3a08ed[_0x2883be([0x65,0x76,0x65,0x72,0x79])]((_0x3858c5,_0xfd699a)=>_0x2bc58f[_0xfd699a]===_0x3858c5||_0x2bc58f[_0xfd699a]===_0x2883be([0x2a])));}function _0x5af3f4(){return _0x155933&&_0x2f08ee?new window[(_0x2883be([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57feae,_0xdd02b0)=>{_0x155933[_0x2883be([0x74,0x68,0x65,0x6e])](_0x57feae,_0xdd02b0),_0x2f08ee[_0x2883be([0x74,0x68,0x65,0x6e])](_0x5238de=>{_0x5238de!=_0x2883be([0x56,0x61,0x6c,0x69,0x64])&&_0x57feae(_0x5238de);},_0xdd02b0);}):_0x155933||_0x2f08ee||_0x2883be([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4f8c3d(_0x4c54a6,_0x46de50){return new window[(_0x2883be([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x48c181=>{if(_0x573c9b())return _0x48c181(_0x2883be([0x56,0x61,0x6c,0x69,0x64]));_0x4ef33f(),_0x1fd6cd[_0x2883be([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2883be([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x476526=!0x1;const _0x3128c5=_0x258940();function _0x432f32(_0x2ba467){return!!_0x2ba467&&(typeof _0x2ba467===_0x2883be([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2ba467===_0x2883be([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2ba467[_0x2883be([0x74,0x68,0x65,0x6e])]===_0x2883be([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2ba467[_0x2883be([0x63,0x61,0x74,0x63,0x68])]===_0x2883be([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4aa4ea(_0x4cfd10){_0x1af815(_0x4cfd10)[_0x2883be([0x74,0x68,0x65,0x6e])](_0x2c3953=>{if(!_0x2c3953||_0x2c3953[_0x2883be([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2883be([0x6f,0x6b]))return _0x2883be([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5873e0(_0x56da18(_0x3128c5+_0x46de50))!=_0x2c3953[_0x2883be([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2883be([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2883be([0x56,0x61,0x6c,0x69,0x64]);})[_0x2883be([0x74,0x68,0x65,0x6e])](_0x49f41b=>(_0x57d4e9(),_0x49f41b),()=>{const _0x354035=_0x104bdf();return null==_0x354035?(_0x57d4e9(),_0x2883be([0x56,0x61,0x6c,0x69,0x64])):_0x2883be(_0x8210df-_0x354035>(0x7753083a^_0x103663)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2883be([0x74,0x68,0x65,0x6e])](_0x48c181)[_0x2883be([0x63,0x61,0x74,0x63,0x68])](()=>{_0x48c181(_0x2883be([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x43c1e5=0x536962ba^_0x103663;function _0x57d4e9(){const _0x10588b=_0x2883be([0x6c,0x6c,0x63,0x74,0x2d])+_0x5873e0(_0x56da18(_0x4c54a6)),_0x112aaf=_0x15829c(_0x5873e0(window[_0x2883be([0x4d,0x61,0x74,0x68])][_0x2883be([0x63,0x65,0x69,0x6c])](_0x8210df/_0x43c1e5)));window[_0x2883be([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2883be([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10588b,_0x112aaf);}function _0x104bdf(){const _0x2df9ff=_0x2883be([0x6c,0x6c,0x63,0x74,0x2d])+_0x5873e0(_0x56da18(_0x4c54a6)),_0x1b8baf=window[_0x2883be([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2883be([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2df9ff);return _0x1b8baf?window[_0x2883be([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15829c(_0x1b8baf),0x10)*_0x43c1e5:null;}function _0x1af815(_0x15e41e){return new window[(_0x2883be([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x348704,_0x557804)=>{_0x15e41e[_0x2883be([0x74,0x68,0x65,0x6e])](_0x348704,_0x557804),window[_0x2883be([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x557804,0x535e58fa^_0x103663);});}}_0x1fd6cd[_0x2883be([0x6f,0x6e])](_0x2883be([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1d009c,_0x1fbc70)=>{if(_0x1fbc70[0x0]!=_0x4c54a6)return _0x48c181(_0x2883be([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1fbc70[0x1]={..._0x1fbc70[0x1],[_0x2883be([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3128c5};},{[_0x2883be([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2883be([0x68,0x69,0x67,0x68])}),_0x1fd6cd[_0x2883be([0x6f,0x6e])](_0x2883be([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xe9a781=>{_0x432f32(_0xe9a781[_0x2883be([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x476526=!0x0,_0x4aa4ea(_0xe9a781[_0x2883be([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2883be([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2883be([0x6c,0x6f,0x77])}),_0x55c0b6[_0x2883be([0x74,0x68,0x65,0x6e])](()=>{_0x476526||_0x48c181(_0x2883be([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x573c9b(){return _0x1fd6cd[_0x2883be([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2883be([0x76,0x69,0x65,0x77])][_0x2883be([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2883be([0x61,0x75,0x74,0x6f]);}function _0x4ef33f(){_0x1fd6cd[_0x2883be([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2883be([0x76,0x69,0x65,0x77])][_0x2883be([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2883be([0x61,0x75,0x74,0x6f]);}}function _0x52fa09(_0x189b21){const _0xcd2cb=[new window[(_0x2883be([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a00ed=>setTimeout(_0x3a00ed,0x5356b2f6^_0x103663)),_0x55c0b6[_0x2883be([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2883be([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c5f37=>{let _0x5c4db2=0x0;_0x1fd6cd[_0x2883be([0x6d,0x6f,0x64,0x65,0x6c])][_0x2883be([0x6f,0x6e])](_0x2883be([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x27fbe4,_0x520f36)=>{_0x520f36[0x0][_0x2883be([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5c4db2++,_0x5c4db2==(0x535f89d2^_0x103663)&&(_0x3c5f37(),_0x27fbe4[_0x2883be([0x6f,0x66,0x66])]());});}))];return window[_0x2883be([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2883be([0x72,0x61,0x63,0x65])](_0xcd2cb)[_0x2883be([0x74,0x68,0x65,0x6e])](()=>_0x189b21);}async function _0x1d059d(){await _0x55c0b6,_0x1fd6cd[_0x2883be([0x6d,0x6f,0x64,0x65,0x6c])][_0x2883be([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4aede6,_0x1fd6cd[_0x2883be([0x6d,0x6f,0x64,0x65,0x6c])][_0x2883be([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4aede6,_0x1fd6cd[_0x2883be([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2883be([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x25c275(_0x1ff9d3){const _0x2068a8=_0xa65a57();_0x1fd6cd[_0x2068a8]=_0x2883be([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1ff9d3,_0x1ff9d3!=_0x2883be([0x56,0x61,0x6c,0x69,0x64])&&_0x1d059d();}function _0xa65a57(){const _0x15e538=window[_0x2883be([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2883be([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2883be([0x6e,0x6f,0x77])]())[_0x2883be([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2883be([0x2e]),'');let _0x1b0eae=_0x2883be([0x68]);for(let _0x22399f=0x0;_0x22399f<_0x15e538[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x22399f+=0x2){let _0x3a425f=window[_0x2883be([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15e538[_0x2883be([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x22399f,_0x22399f+0x2));_0x3a425f>=_0x57f991[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3a425f-=_0x57f991[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1b0eae+=_0x57f991[_0x3a425f];}return _0x1b0eae;}function _0x5bb44a(){const _0x2259aa=_0x47e27b[_0x2883be([0x73,0x70,0x6c,0x69,0x74])](_0x2883be([0x2e]));if(0x3!=_0x2259aa[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x45e855(_0x2259aa[0x1]);function _0x45e855(_0x2b43f0){const _0x1f8dc4=_0x390bca(_0x2b43f0);return _0x1f8dc4&&_0x5b5fc1()?_0x1f8dc4:null;function _0x5b5fc1(){const _0x52cf05=_0x1f8dc4[_0x2883be([0x6a,0x74,0x69])],_0x1c443f=window[_0x2883be([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x52cf05[_0x2883be([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x52cf05[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x23c2b2={..._0x1f8dc4,[_0x2883be([0x6a,0x74,0x69])]:_0x52cf05[_0x2883be([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x52cf05[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x23c2b2[_0x2883be([0x76,0x63])],_0x56da18(_0x23c2b2)==_0x1c443f;}}}async function _0x4cb54d(){let _0x4fd08a=!0x0;try{const _0x2cfdff=_0x47e27b[_0x2883be([0x73,0x70,0x6c,0x69,0x74])](_0x2883be([0x2e])),[_0x25659c,_0x3bd888,_0x5ccd63]=_0x2cfdff;return _0x37c36c(_0x25659c),await _0x1d7fc2(_0x25659c,_0x3bd888,_0x5ccd63),_0x4fd08a;}catch{return!0x1;}function _0x37c36c(_0x3a1e8b){const _0x2b389d=_0x390bca(_0x3a1e8b);_0x2b389d&&_0x2b389d[_0x2883be([0x61,0x6c,0x67])]==_0x2883be([0x45,0x53,0x32,0x35,0x36])||(_0x4fd08a=!0x1);}async function _0x1d7fc2(_0x53341b,_0x4e7d00,_0x49cd5e){const _0x32e37a=window[_0x2883be([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2883be([0x66,0x72,0x6f,0x6d])](_0x13b5db(_0x49cd5e),_0x3bfcc1=>_0x3bfcc1[_0x2883be([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3e9b68=new window[(_0x2883be([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2883be([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x53341b+_0x2883be([0x2e])+_0x4e7d00),_0x1ed0f3=window[_0x2883be([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2883be([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1ed0f3)return;const _0x444035=await _0x1ed0f3[_0x2883be([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2883be([0x6a,0x77,0x6b]),_0x1f34e9,{[_0x2883be([0x6e,0x61,0x6d,0x65])]:_0x2883be([0x45,0x43,0x44,0x53,0x41]),[_0x2883be([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2883be([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2883be([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1ed0f3[_0x2883be([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2883be([0x6e,0x61,0x6d,0x65])]:_0x2883be([0x45,0x43,0x44,0x53,0x41]),[_0x2883be([0x68,0x61,0x73,0x68])]:{[_0x2883be([0x6e,0x61,0x6d,0x65])]:_0x2883be([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x444035,_0x32e37a,_0x3e9b68)||(_0x4fd08a=!0x1);}}function _0x390bca(_0x31815f){return _0x31815f[_0x2883be([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2883be([0x65,0x79]))?JSON[_0x2883be([0x70,0x61,0x72,0x73,0x65])](_0x13b5db(_0x31815f)):null;}function _0x13b5db(_0x480d23){return window[_0x2883be([0x61,0x74,0x6f,0x62])](_0x480d23[_0x2883be([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2883be([0x2b]))[_0x2883be([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2883be([0x2f])));}function _0x56da18(_0x123f26){let _0x1233a0=0x1505;function _0x391c5a(_0x213d88){for(let _0x3c857b=0x0;_0x3c857b<_0x213d88[_0x2883be([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3c857b++){const _0x1b2629=_0x213d88[_0x2883be([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3c857b);_0x1233a0=(_0x1233a0<<0x5)+_0x1233a0+_0x1b2629,_0x1233a0&=_0x1233a0;}}function _0x39819c(_0x1175d7){Array[_0x2883be([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1175d7)?_0x1175d7[_0x2883be([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39819c):_0x1175d7&&typeof _0x1175d7==_0x2883be([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2883be([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1175d7)[_0x2883be([0x73,0x6f,0x72,0x74])]()[_0x2883be([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4de1f4,_0x330cfa])=>{_0x391c5a(_0x4de1f4),_0x39819c(_0x330cfa);}):_0x391c5a(window[_0x2883be([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1175d7));}return _0x39819c(_0x123f26),_0x1233a0>>>0x0;}function _0x5873e0(_0x45925a){return _0x45925a[_0x2883be([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2883be([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2883be([0x30]));}function _0x15829c(_0x1c6d24){return _0x1c6d24[_0x2883be([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2883be([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2883be([0x6a,0x6f,0x69,0x6e])]('');}function _0x4aede6(){}function _0x2883be(_0x3f4a59){return _0x3f4a59['map'](_0x3b9861=>String['fromCharCode'](_0x3b9861))['join']('');}_0x25c275(await _0x1e225b());}(this);}['_initSchema'](){const _0x23301b=this['editor']['model']['schema'];_0x23301b['isRegistered']('imageBlock')&&_0x23301b['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x23301b['isRegistered']('imageInline')&&_0x23301b['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x455fe8=this['editor'];_0x455fe8['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x455fe8['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x10dfe3=>_0x10dfe3['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x53c854=_0x455fe8['commands']['get']('replaceImageSource');_0x53c854&&this['listenTo'](_0x53c854,'cleanupImage',(_0x3609b8,[_0x1253e2,_0x3172f8])=>{_0x1253e2['removeAttribute']('uploadcareImageId',_0x3172f8);});}['_initConfig'](){const _0x41b774=this['editor']['config']['get']('uploadcare.uploader')||{},_0x10b808=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x37361f(_0x5a182a['document'],'uc-config',{..._0x41b774,'pubkey':_0x10b808,'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']=_0x2679d1=>{if('closeMax'==_0x2679d1)return'#uc-icon-arrow-down';},_0x5a182a['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x37361f(_0x5a182a['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x5a182a['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x238d56=this['editor']['commands']['get']('insertImage');_0x238d56&&this['listenTo'](_0x238d56,'execute',()=>{const _0x15840f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x15840f&&_0x15840f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x15840f);});});const _0x467c66=this['editor']['commands']['get']('uploadcareImageReplace');_0x467c66&&this['listenTo'](_0x467c66,'execute',()=>{const _0x5a54c4=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5a54c4&&_0x5a54c4['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x5a54c4);});});}}class tt extends _0x5ca409{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29ec45){super(_0x29ec45),_0x29ec45['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x5f3623['defineComponents'](_0x5f3623),this['_defineLocale']();}['_defineLocale'](){const _0x20e222=this['editor']['config']['get']('uploadcare.locale'),_0x2d8be1=this['editor']['locale']['contentLanguage'];_0x20e222&&_0x5f3623['defineLocale'](_0x2d8be1,_0x20e222);}}class ii extends _0x239003{constructor(_0x1e26cd){super(_0x1e26cd);const t=_0x1e26cd['t'],_0x54426b=this['bindTemplate'],_0x4d7c73=new _0x202d5c();_0x4d7c73['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':[_0x4d7c73,{'text':_0x54426b['to']('imageUploadProgress',_0x1d2857=>t('Loading\x20image...')+'\x20('+(_0x1d2857||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 _0x239003{constructor(_0x3e1d6c){super(_0x3e1d6c);const t=_0x3e1d6c['t'];this['set']('errorType',null);const _0x4702da=new _0x63806c(_0x3e1d6c);_0x4702da['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4702da['withText']=!0x0,_0x4702da['class']='ck-button-action',_0x4702da['on']('execute',()=>{this['fire']('retry');}),_0x4702da['bind']('isVisible')['to'](this,'errorType',_0x5b3ab1=>'NotFound'!==_0x5b3ab1);const _0x5a755f=new _0x56c578();_0x5a755f['content']=_0xd15cff,_0x5a755f['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4b33ee=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':[_0x5a755f,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4b33ee['to']('errorType',_0x2aa969=>t('NotFound'!==_0x2aa969?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4702da]},{'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 _0x239003{constructor(_0x289088,_0x271f2f){super(_0x289088);const _0xfc950e=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x271f2f,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xfc950e['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x32dbad,_0x2540cd,_0x21947d){super(_0x32dbad),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x32dbad),this['_errorView']=new ti(_0x32dbad),this['_editingView']=new ei(_0x32dbad,_0x21947d),this['_focusableView']=new _0x239003(_0x32dbad),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2540cd),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'],_0x5a3c20=>{this['_addUploadcareImageEditorListeners'](_0x5a3c20);});}),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'](_0x4b4465,_0x32e9f7){const _0x4716d8='uc-cloud-image-editor',_0x58fbfc=_0x4b4465['querySelector'](_0x4716d8);if(_0x58fbfc)return _0x32e9f7(_0x58fbfc);const _0x3d424e=new MutationObserver(_0x1ecf00=>{const _0x50a93e=_0x1ecf00['filter'](_0xab51ae=>_0xab51ae['target']===_0x4b4465&&_0xab51ae['addedNodes']['length']>0x0&&_0xab51ae['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4716d8);_0x50a93e['length']&&(_0x3d424e['disconnect'](),_0x32e9f7(_0x50a93e[0x0]['addedNodes'][0x0]));});_0x3d424e['observe'](_0x4b4465,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x2c8c34){_0x2c8c34['addEventListener']('apply',_0x4d920b=>{this['fire']('apply',{'imageSrc':_0x4d920b['detail']['cdnUrl']});}),_0x2c8c34['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
- _0x2f201a(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2286cb,_0x3b5e68,_0x1336c2){super(),this['_editor']=_0x2286cb,this['_dialog']=_0x3b5e68,this['_imageElement']=_0x1336c2,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 _0x87a24c=this['_imageElement'],_0x2da912=_0x87a24c['getAttribute']('uploadcareImageId'),_0x488bfe=_0x87a24c['getAttribute']('src');if(_0x2da912)await this['_loadImageInfo'](_0x2da912,_0x488bfe);else{if(this['_imageCache']['has'](_0x488bfe)){const _0x287d8f=this['_imageCache']['get'](_0x488bfe);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x287d8f['url'],this['imageDimension']=_0x287d8f['dimension'],this['imageId']=_0x287d8f['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x66efae}=this['_editor'],t=_0x66efae['t'],_0x5acac7=new X(_0x66efae,this['imageStatus'],this['_attributes']);_0x5acac7['bind']('status')['to'](this,'imageStatus'),_0x5acac7['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5acac7['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5acac7['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5acac7,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4dd893,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5acac7,'position':_0x5321b1['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5acac7['focus']();},'onHide':()=>{_0x5acac7['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4881f7=>!A(_0x4881f7,_0x5acac7['element'])}});}['_loadImageInfo'](_0x4bffc8,_0x5ada0a){return j['getInfo'](_0x4bffc8,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x460738=>{const {width:_0x4f3f92,height:_0x198650}=_0x460738['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5ada0a,this['imageDimension']={'width':_0x4f3f92,'height':_0x198650},this['imageId']=_0x4bffc8;})['catch'](_0x3d09ee=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3d09ee['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0xdde044,_0x3f1b26){return this['_getImageAsFile'](_0xdde044)['then'](_0x3cb910=>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':_0x3f1b26['signal'],'file':_0x3cb910,'onProgress':_0x5c2994=>{_0x5c2994&&_0x5c2994['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5c2994['value']));}}))['then'](_0x46f2d1=>{const {width:_0x1f1812,height:_0x5585d0}=_0x46f2d1['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x46f2d1['cdnUrl'],this['imageDimension']={'width':_0x1f1812,'height':_0x5585d0},this['imageId']=_0x46f2d1['uuid'],this['imageUploadProgress']=null;const _0x561788=_0xdde044['getAttribute']('src');this['_imageCache']['set'](_0x561788,{'id':_0x46f2d1['uuid'],'url':_0x46f2d1['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x38a926=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x38a926['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x34ae45,_0x570572){_0x34ae45['on']('apply',(_0x1fa2da,_0x3cd9cc)=>{this['_replaceImage'](_0x570572,_0x3cd9cc['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x34ae45['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x34ae45['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0xc16274,_0x3390a2,_0x4bae71){const _0x15c49e=this['_editor'],{width:_0x178778,height:_0x323b7f}=S(_0x3390a2,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x108e74,imageSources:_0x3a5b76}=C(_0x3390a2,_0x178778);_0x15c49e['model']['change'](_0x328d08=>{if('$graveyard'===_0xc16274['root']['rootName']){_0x15c49e['execute']('insertImage',{'imageType':_0xc16274['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0xc16274['getAttributes']()),'uploadcareImageId':_0x4bae71,'src':_0x108e74,'sources':_0x3a5b76,'width':_0x178778,'height':_0x323b7f}});const _0x421a37=_0xc16274['getChildren']();_0xc16274=_0x15c49e['model']['document']['selection']['getSelectedElement']();for(const _0x45e2bb of _0x421a37)_0x328d08['append'](_0x328d08['cloneElement'](_0x45e2bb),_0xc16274);}else _0x328d08['setSelection'](_0xc16274,'on'),_0x15c49e['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0xc16274['getAttributes']()),'uploadcareImageId':_0x4bae71,'src':_0x108e74,'sources':_0x3a5b76,'width':_0x178778,'height':_0x323b7f},_0xc16274);_0x328d08['setSelection'](_0xc16274,'on');});}async['_getImageAsFile'](_0x289225){const _0x26ec7c=_0x5a182a['window'],_0xb3e096=_0x5a182a['document']['location']['href'],_0x13e383=new _0x26ec7c['URL'](_0x289225['getAttribute']('src'),_0xb3e096);if('data:'===_0x13e383['protocol']){const _0x4196d1=_0x13e383['href']['split'](','),_0xcdae60=_0x4196d1[0x0]['match'](/:(.*?);/)[0x1],_0x1160b7=_0xcdae60['split']('/')[0x1],_0x1e62fd=_0x26ec7c['atob'](_0x4196d1[_0x4196d1['length']-0x1]);let _0x39a8ed=_0x1e62fd['length'];const _0x53929f=new _0x26ec7c['Uint8Array'](_0x39a8ed);for(;_0x39a8ed--;)_0x53929f[_0x39a8ed]=_0x1e62fd['charCodeAt'](_0x39a8ed);return new _0x26ec7c['File']([_0x53929f],'image.'+_0x1160b7,{'type':_0xcdae60});}const _0x444552=_0x13e383['href']['split']('/'),_0x39946b=_0x444552[_0x444552['length']-0x1],_0x36e453=_0x39946b['split']('.')[0x1];return _0x26ec7c['fetch'](_0x13e383['href'])['then'](_0x15c72f=>_0x15c72f['clone']()['blob']())['then'](_0x26ffc3=>new _0x26ec7c['File']([_0x26ffc3],_0x39946b,{'type':'image/'+_0x36e453}));}}class Q extends _0x131af3{['imageEditController'];static get['requires'](){return[_0x1b5898];}['_isEditable'];constructor(_0x3e7b76){super(_0x3e7b76),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4cca82){const _0x1ff4c1=z(_0x4cca82);return _0x2cbab6=>!(!_0x2cbab6||!_0x2cbab6['is']('element','imageBlock')&&!_0x2cbab6['is']('element','imageInline'))&&(!!_0x2cbab6['hasAttribute']('uploadcareImageId')||!!_0x2cbab6['hasAttribute']('src')&&_0x1ff4c1(_0x2cbab6['getAttribute']('src')));}(_0x3e7b76['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x51835a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x51835a);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x1e7307=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1e7307&&(_0x1e7307['is']('element','imageBlock')||_0x1e7307['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x1b5898),_0x1e7307),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x131af3{['refresh'](){const _0x52c823=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x52c823&&(_0x52c823['is']('element','imageBlock')||_0x52c823['is']('element','imageInline')));}['execute'](_0x3ff124){const _0x2a193e=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x52c454=>{_0x52c454['setAttributes'](_0x3ff124,_0x2a193e),_0x52c454['removeAttribute']('srcset',_0x2a193e),_0x52c454['removeAttribute']('sizes',_0x2a193e);});}}class m extends _0x5ca409{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2c4251,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x13e2cb}=this;_0x13e2cb['commands']['add']('uploadcareImageEdit',new Q(_0x13e2cb)),_0x13e2cb['commands']['add']('uploadcareImageReplace',new V(_0x13e2cb));}}class g extends _0x5ca409{['_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 _0x34ae9e=this['editor'];_0x34ae9e['ui']['componentFactory']['add']('uploadcareImageEdit',_0x4f96f1=>{const _0x340186=_0x34ae9e['commands']['get']('uploadcareImageEdit'),_0x1555ea=new _0x63806c(_0x4f96f1),t=_0x4f96f1['t'];return _0x1555ea['set']({'icon':_0x4dd893,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x1555ea['bind']('isEnabled')['to'](_0x340186),_0x1555ea['bind']('isOn')['to'](_0x340186,'isActive'),this['listenTo'](_0x1555ea,'execute',()=>{_0x34ae9e['execute']('uploadcareImageEdit'),_0x34ae9e['editing']['view']['focus']();}),_0x1555ea;}),this['_initConfig']();}['_initConfig'](){const _0x66eec7=_0x37361f(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x66eec7),this['listenTo'](this['editor'],'destroy',()=>{_0x66eec7['remove']();});}}class et extends _0x5ca409{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};
23
+ import{Plugin as _0x2d8fd2,Command as _0x361ebe}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x25f0a9,IconGooglePhotos as _0x37c4db,IconGoogleDrive as _0xdec08f,IconFacebook as _0xc44502,IconDropbox as _0xa8879f,IconUploadcareLink as _0x550586,IconUploadcareImageUpload as _0x160512,IconError as _0x404929,IconUploadcareImageEdit as _0x1364f2}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x5db41e,MenuBarMenuListItemButtonView as _0x58f233,View as _0x2936d5,FocusCycler as _0x3ac2a8,Dialog as _0x36ce1e,DialogViewPosition as _0xd008b3,SpinnerView as _0x16a0ee,IconView as _0x4160a7,Notification as _0x48be5a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x6a6955,DomEmitterMixin as _0x5b21d1,global as _0x310d51,getAncestors as _0x10b755,ObservableMixin as _0x484431,uid as _0x2e908f,createElement as _0x2d4bdb}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x50c303}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x208097,info as _0x293ba6}from'@uploadcare/upload-client';import*as _0x588e15 from'@uploadcare/file-uploader';var i=function(_0x5ad64c){return _0x5ad64c['Local']='local',_0x5ad64c['URL']='url',_0x5ad64c['Dropbox']='dropbox',_0x5ad64c['GDrive']='gdrive',_0x5ad64c['Facebook']='facebook',_0x5ad64c['GPhotos']='gphotos',_0x5ad64c['OneDrive']='onedrive',_0x5ad64c;}({});function _(_0x566be4,_0x3e68da,_0x4f1031){const t=_0x566be4['t'],_0x1ef167=_0x566be4['t'];switch(_0x3e68da){case i['Local']:return{'text':_0x1ef167('Insert'===_0x4f1031?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x1ef167('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x4f1031?_0x1ef167('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x1ef167('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x4f1031?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x4f1031?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x4f1031?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x4f1031?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x4f1031?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x3e68da;}}class e extends _0x2d8fd2{['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 _0x3cd2a9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x423b83;for(const _0x314068 in _0x3cd2a9){const _0x5229ef=_0x314068,_0xaeaf5f=_0x3cd2a9[_0x5229ef];if('uploadcareLicenseKeyValid'==_0xaeaf5f||'uploadcareLicenseKeyInvalid'==_0xaeaf5f||'uploadcareLicenseKeyExpired'==_0xaeaf5f||'uploadcareLicenseKeyDomainLimit'==_0xaeaf5f||'uploadcareLicenseKeyNotAllowed'==_0xaeaf5f||'uploadcareLicenseKeyEvaluationLimit'==_0xaeaf5f||'uploadcareLicenseKeyUsageLimit'==_0xaeaf5f){delete _0x3cd2a9[_0x5229ef],_0x423b83=_0xaeaf5f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x423b83&&_0x3cd2a9['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x423b83&&_0x3cd2a9['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x423b83&&_0x3cd2a9['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x423b83&&_0x3cd2a9['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x423b83&&_0x3cd2a9['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x423b83&&_0x3cd2a9['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2383de}=this,_0x5ee45d=_0x2383de['commands']['get']('uploadcare');if(!_0x5ee45d)return;const _0x52cb24=this['_normalizeConfigSourceList'](_0x2383de['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x10eb6e,_0x9b4180)=>{const _0x1c9748=this['_getIntegrationKey'](_0x9b4180['type']);return _0x10eb6e[_0x1c9748]||(_0x10eb6e[_0x1c9748]=[]),_0x10eb6e[_0x1c9748]['push'](_0x9b4180),_0x10eb6e;},{});_0x2383de['plugins']['has']('ImageInsertUI')&&_0x2383de['commands']['get']('uploadcare')&&Object['entries'](_0x52cb24)['forEach'](([_0x3e1b36,_0xd371dd])=>{_0x2383de['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3e1b36,'observable':()=>_0x5ee45d,'buttonViewCreator':()=>this['_createToolbarButton'](_0xd371dd),'formViewCreator':()=>this['_createDropdownButtons'](_0xd371dd),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0xd371dd),'override':'assetManager'!==_0x3e1b36});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x16f9a0){const {locale:_0x3feebd}=this['editor'];return _0x16f9a0['map'](_0x11e476=>{const _0x3de4ff=_(_0x3feebd,_0x11e476,'Insert');switch(_0x11e476){case i['Local']:return{'icon':_0x160512,'type':i['Local'],..._0x3de4ff};case i['URL']:return{'icon':_0x550586,'type':i['URL'],..._0x3de4ff};case i['Dropbox']:return{'icon':_0xa8879f,'type':i['Dropbox'],..._0x3de4ff};case i['Facebook']:return{'icon':_0xc44502,'type':i['Facebook'],..._0x3de4ff};case i['GDrive']:return{'icon':_0xdec08f,'type':i['GDrive'],..._0x3de4ff};case i['GPhotos']:return{'icon':_0x37c4db,'type':i['GPhotos'],..._0x3de4ff};case i['OneDrive']:return{'icon':_0x25f0a9,'type':i['OneDrive'],..._0x3de4ff};}});}['_getIntegrationKey'](_0x2e053a){switch(_0x2e053a){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x16c186,_0x5a1c75){const _0x21b4a5=this['editor'],_0x22fb31=new _0x16c186(_0x21b4a5['locale']),_0xdcad03=_0x21b4a5['commands']['get']('uploadcare');return _0x22fb31['bind']('isEnabled')['to'](_0xdcad03),_0x22fb31['on']('execute',()=>{_0xdcad03['execute'](_0x5a1c75);}),_0x22fb31;}['_createToolbarButton'](_0x38f095){const {locale:_0x220d70}=this['editor'],_0x2ea2e1=this['editor']['plugins']['get']('ImageInsertUI'),_0x1fc0f4=_0x38f095[0x0],_0x2906aa=this['_createButton'](_0x5db41e,_0x1fc0f4['type']);return _0x2906aa['icon']=_0x1fc0f4['icon'],_0x2906aa['bind']('label')['to'](_0x2ea2e1,'isImageSelected',_0x34c2f0=>_(_0x220d70,_0x1fc0f4['type'],_0x34c2f0?'Replace':'Insert')['text']),_0x2906aa['tooltip']=!0x0,_0x2906aa;}['_createDropdownButtons'](_0x3eb1eb){const {locale:_0x2c59ef}=this['editor'],_0x5b5955=this['editor']['plugins']['get']('ImageInsertUI');return _0x3eb1eb['map'](_0x3ded0c=>{const _0x983f12=this['_createButton'](_0x5db41e,_0x3ded0c['type']);return _0x983f12['withText']=!0x0,_0x983f12['icon']=_0x3ded0c['icon'],_0x983f12['bind']('label')['to'](_0x5b5955,'isImageSelected',_0x71baf2=>_(_0x2c59ef,_0x3ded0c['type'],_0x71baf2?'Replace':'Insert')['text']),_0x983f12;});}['_createMenuBarButtons'](_0x4521c7){return _0x4521c7['map'](_0x262b6c=>{const _0x3f5629=this['_createButton'](_0x58f233,_0x262b6c['type']);return _0x3f5629['icon']=_0x262b6c['icon'],_0x3f5629['label']=_0x262b6c['shortText'],_0x3f5629;});}}class F extends _0x2936d5{['focusTracker'];['focusCycler'];constructor(_0x222f93){super(_0x222f93),this['focusTracker']=new _0x6a6955(),this['focusCycler']=new _0x3ac2a8({'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(_0x3d504b,_0x505620){super(_0x3d504b),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-'+_0x505620}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x537889,_0x1022f3){const _0x36f2b7=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x291b9b=>_0x291b9b<=_0x1022f3)['map'](_0x78d719=>_0x537889['replace'](/\/$/,'')+'/-/resize/'+_0x78d719+'x/\x20'+_0x78d719+'w');return{'imageFallbackUrl':_0x537889,'imageSources':[{'srcset':_0x36f2b7['join'](',\x20'),'sizes':'(max-width:\x20'+_0x1022f3+'px)\x20100vw,\x20'+_0x1022f3+'px','type':'image/webp'}]};}function S(_0x92f934,_0x37653b,_0x2563f4){const _0x3a4071=_0x92f934['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3a4071?parseInt(_0x3a4071[0x1],0xa):_0x37653b,'height':_0x3a4071?parseInt(_0x3a4071[0x2],0xa):_0x2563f4};}function p(_0x33e220,_0x262e6d){const _0x404fbd=new(_0x5b21d1())(),_0x3d2ca0=_0x33e220['plugins']['get']('ImageUtils'),_0x23eda2=_0x33e220['editing']['mapper']['toViewElement'](_0x262e6d),_0x422506=_0x3d2ca0['findViewImgElement'](_0x23eda2),_0x469b15=_0x33e220['editing']['view']['domConverter']['viewToDom'](_0x422506),_0x8ab7e2=_0x262e6d['getAttribute']('width'),_0x1e19e4=_0x262e6d['getAttribute']('height'),_0x1b4ead='image-processing';_0x33e220['editing']['view']['change'](_0x1abfdf=>{_0x1abfdf['addClass'](_0x1b4ead,_0x23eda2),_0x1abfdf['setStyle']('aspect-ratio',_0x8ab7e2+'/'+_0x1e19e4,_0x422506);}),_0x404fbd['listenTo'](_0x469b15,'load',()=>{_0x404fbd['stopListening'](_0x469b15,'load'),_0x33e220['editing']['view']['change'](_0x296f00=>{_0x296f00['removeClass'](_0x1b4ead,_0x23eda2),_0x296f00['removeStyle']('aspect-ratio',_0x422506);});});}function G(_0x498b5b){if(Array['isArray'](_0x498b5b)){const _0x598cd3=_0x498b5b['map'](G);return _0x11b447=>_0x598cd3['some'](_0x131dbc=>_0x131dbc(_0x11b447));}if('origin'==_0x498b5b){const _0x27b4ee=_0x310d51['window']['location']['origin'];return _0xf20127=>new URL(_0xf20127,_0x310d51['document']['baseURI'])['origin']==_0x27b4ee;}return'function'==typeof _0x498b5b?_0x498b5b:_0x498b5b instanceof RegExp?_0x1677e9=>!(!_0x1677e9['match'](_0x498b5b)&&!_0x1677e9['replace'](/^https?:\/\//,'')['match'](_0x498b5b)):()=>!0x1;}function A(_0x194b60,_0x3a8ed5){return _0x10b755(_0x194b60['target'])['includes'](_0x3a8ed5);}class n extends/* #__PURE__ -- @preserve */
24
+ _0x484431(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0xcae886,_0x1550de,_0x3f67d1){super(),this['_editor']=_0xcae886,this['_editing']=_0x1550de,this['_dialog']=_0xcae886['plugins']['get'](_0x36ce1e),this['_api']=_0x1550de['ctxElement']['getAPI'](),this['_type']=_0x3f67d1,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:_0x61b3f0,model:_0x227955}=this['_editor'],_0x40a5b5=_0x227955['document']['selection']['getSelectedElement'](),_0x314357=_0x40a5b5&&(_0x40a5b5['is']('element','imageBlock')||_0x40a5b5['is']('element','imageInline'));this['_formView']=new x(_0x61b3f0,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x160512,'title':_(_0x61b3f0,this['_type'],_0x314357?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xd008b3['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x52b3e3=>!A(_0x52b3e3,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x384259}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1eb2ab=>{const _0x184261=_0x384259['length'];for(const _0x2f9570 of _0x384259){const _0x3329f6=_0x2f9570===_0x384259[_0x184261-0x1],{cdnUrl:_0x29f1b0,fileInfo:_0xb6e3f}=_0x2f9570;if(!_0x29f1b0||!_0xb6e3f)continue;const {width:_0x34900a,height:_0x2cf2f9}=_0xb6e3f['imageInfo'],_0x3f6917=S(_0x29f1b0,_0x34900a,_0x2cf2f9),_0x110c86=C(_0x29f1b0,_0x3f6917['width']),_0x3ebdfe={'id':_0xb6e3f['uuid'],'type':'image','attributes':{'imageDimension':_0x3f6917,..._0x110c86}};this['_insertAsset'](_0x3ebdfe,_0x3329f6,_0x1eb2ab);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x12a115=>{'idle'===_0x12a115['detail']['status']&&!_0x12a115['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x374207,_0xd426ad,_0x10d9f7){const _0xbc663=this['_editor']['model']['document']['selection'],_0x1fc00b=_0xbc663['getSelectedElement'](),_0x491df0=!(!_0x1fc00b||!_0x1fc00b['is']('element','imageInline'));_0x10d9f7['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x374207,_0x491df0),_0xd426ad||_0x10d9f7['setSelection'](_0xbc663['getLastPosition']());}['_insertImage'](_0x1c2b3b,_0xb7d1e4){const _0x277d9c=this['_editor'],{imageDimension:_0x171717,imageFallbackUrl:_0x5c4546,imageSources:_0x2c98ba}=_0x1c2b3b['attributes'];_0x277d9c['execute']('insertImage',{'imageType':_0xb7d1e4?'imageInline':null,'source':{'uploadcareImageId':_0x1c2b3b['id'],'src':_0x5c4546,'sources':_0x2c98ba,..._0x171717}});}}class w extends _0x361ebe{['_editing'];['_controller']=null;static get['requires'](){return[_0x36ce1e,o];}constructor(_0x3a0f72){super(_0x3a0f72),this['_editing']=_0x3a0f72['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x52d6c0){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x52d6c0);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x1cbc53,..._0x51a069}){return _0x208097(_0x1cbc53,_0x51a069);}static['getInfo'](_0x44b3b9,_0x217226){return _0x293ba6(_0x44b3b9,_0x217226);}}class f extends _0x2d8fd2{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x50c303,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x5f5362=this['editor'];if(!!!_0x5f5362['config']['get']('uploadcare'))return;_0x5f5362['plugins']['get'](_0x50c303)['createUploadAdapter']=_0x18bd0e=>new k(_0x18bd0e,_0x5f5362),_0x5f5362['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x1a37e8,{imageElement:_0x21ae8b,data:_0x5d205c})=>{_0x5f5362['model']['change'](_0x4c51e0=>{_0x4c51e0['setAttribute']('uploadcareImageId',_0x5d205c['uploadcareImageId'],_0x21ae8b);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x16d49a,_0x144a3d){this['loader']=_0x16d49a,this['editor']=_0x144a3d,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x33b0ab=await this['loader']['file'];return j['upload']({'file':_0x33b0ab,'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':_0x3a4879=>{_0x3a4879&&_0x3a4879['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3a4879['value']);}})['then'](async _0x275b17=>{const {imageFallbackUrl:_0x51000a,imageSources:_0x58c5f6}=C(_0x275b17['cdnUrl'],_0x275b17['imageInfo']['width']);return{'uploadcareImageId':_0x275b17['uuid'],'default':_0x51000a,'sources':_0x58c5f6};})['catch'](()=>{const _0x589662=t('Cannot\x20upload\x20file:')+('\x20'+_0x33b0ab['name']+'.');return Promise['reject'](_0x589662);});}['abort'](){this['controller']['abort']();}}class o extends _0x2d8fd2{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x36ce1e];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x10207a){super(_0x10207a),this['ucContextId']=_0x2e908f();}['init'](){const _0x526054=this['editor'];_0x526054['commands']['add']('uploadcare',new w(_0x526054));}['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 _0x170083=_0x310d51['document']['querySelector']('input[uploadcare-file-input]');_0x170083&&_0x170083['remove']();}),async function(_0x5bf6d8){const _0x256bf6=_0x5a3d49([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x203511=0x535f8c3a,_0x51a0fa=0x53580f5a^_0x203511,_0x120285=window[_0x5a3d49([0x44,0x61,0x74,0x65])][_0x5a3d49([0x6e,0x6f,0x77])](),_0x3b02e6=_0x5bf6d8[_0x5a3d49([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xb15394=new window[(_0x5a3d49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1dfe87=>{_0x3b02e6[_0x5a3d49([0x6f,0x6e,0x63,0x65])](_0x5a3d49([0x72,0x65,0x61,0x64,0x79]),_0x1dfe87);}),_0x579ea6={[_0x5a3d49([0x6b,0x74,0x79])]:_0x5a3d49([0x45,0x43]),[_0x5a3d49([0x75,0x73,0x65])]:_0x5a3d49([0x73,0x69,0x67]),[_0x5a3d49([0x63,0x72,0x76])]:_0x5a3d49([0x50,0x2d,0x32,0x35,0x36]),[_0x5a3d49([0x78])]:_0x5a3d49([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]),[_0x5a3d49([0x79])]:_0x5a3d49([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]),[_0x5a3d49([0x61,0x6c,0x67])]:_0x5a3d49([0x45,0x53,0x32,0x35,0x36])},_0xbfd294=_0x3b02e6[_0x5a3d49([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5a3d49([0x67,0x65,0x74])](_0x5a3d49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x51a8f6(){let _0x3194c5,_0x184f77=null,_0x31c4a5=null;try{if(_0xbfd294==_0x5a3d49([0x47,0x50,0x4c]))return _0x5a3d49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3194c5=_0x454b6f(),!_0x3194c5)return _0x5a3d49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3194c5[_0x5a3d49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x31c4a5=_0x5a9036(_0x3194c5[_0x5a3d49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3194c5[_0x5a3d49([0x6a,0x74,0x69])])),await _0x496897()?_0xbee62d()?_0x5c87f0()?_0x5a3d49([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x240507()?(_0x3194c5[_0x5a3d49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5a3d49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x184f77=_0x15a40b(_0x5a3d49([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x42f2c1()):_0x5a3d49([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5a3d49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5a3d49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5a3d49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5c87f0(){const _0x926859=[_0x5a3d49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5a3d49([0x74,0x72,0x69,0x61,0x6c])][_0x5a3d49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3194c5[_0x5a3d49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x120285/0x3e8:0xe10*_0x51a0fa;return _0x3194c5[_0x5a3d49([0x65,0x78,0x70])]<_0x926859;}function _0xbee62d(){const _0x2129a9=_0x3194c5[_0x5a3d49([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2129a9&&(!!_0x2129a9[_0x5a3d49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a3d49([0x2a]))||!!_0x2129a9[_0x5a3d49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a3d49([0x55,0x50,0x4c,0x43])));}function _0x240507(){const _0xc3b9fb=_0x3194c5[_0x5a3d49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xc3b9fb||0x0==_0xc3b9fb[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3769c5}=new URL(window[_0x5a3d49([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xc3b9fb[_0x5a3d49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3769c5))return!0x0;const _0x326fac=_0x3769c5[_0x5a3d49([0x73,0x70,0x6c,0x69,0x74])](_0x5a3d49([0x2e]));return _0xc3b9fb[_0x5a3d49([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x974c92=>_0x974c92[_0x5a3d49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a3d49([0x2a])))[_0x5a3d49([0x6d,0x61,0x70])](_0x9f30a8=>_0x9f30a8[_0x5a3d49([0x73,0x70,0x6c,0x69,0x74])](_0x5a3d49([0x2e])))[_0x5a3d49([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x280169=>_0x280169[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x326fac[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5a3d49([0x6d,0x61,0x70])](_0x5ea7f1=>Array(_0x326fac[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5ea7f1[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5a3d49([0x66,0x69,0x6c,0x6c])](_0x5ea7f1[0x0]===_0x5a3d49([0x2a])?_0x5a3d49([0x2a]):'')[_0x5a3d49([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5ea7f1))[_0x5a3d49([0x73,0x6f,0x6d,0x65])](_0x5e6581=>_0x326fac[_0x5a3d49([0x65,0x76,0x65,0x72,0x79])]((_0x112baf,_0x326661)=>_0x5e6581[_0x326661]===_0x112baf||_0x5e6581[_0x326661]===_0x5a3d49([0x2a])));}function _0x42f2c1(){return _0x184f77&&_0x31c4a5?new window[(_0x5a3d49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5b18c4,_0x3c1459)=>{_0x184f77[_0x5a3d49([0x74,0x68,0x65,0x6e])](_0x5b18c4,_0x3c1459),_0x31c4a5[_0x5a3d49([0x74,0x68,0x65,0x6e])](_0x3fee44=>{_0x3fee44!=_0x5a3d49([0x56,0x61,0x6c,0x69,0x64])&&_0x5b18c4(_0x3fee44);},_0x3c1459);}):_0x184f77||_0x31c4a5||_0x5a3d49([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5a9036(_0x157cb2,_0x130584){return new window[(_0x5a3d49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3789d2=>{if(_0x335e4d())return _0x3789d2(_0x5a3d49([0x56,0x61,0x6c,0x69,0x64]));_0x3df462(),_0x3b02e6[_0x5a3d49([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5a3d49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3b4e07=!0x1;const _0x2598b7=_0x2e908f();function _0x29e67b(_0xcbb2ee){return!!_0xcbb2ee&&(typeof _0xcbb2ee===_0x5a3d49([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xcbb2ee===_0x5a3d49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xcbb2ee[_0x5a3d49([0x74,0x68,0x65,0x6e])]===_0x5a3d49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xcbb2ee[_0x5a3d49([0x63,0x61,0x74,0x63,0x68])]===_0x5a3d49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x504b9e(_0x10f08d){_0x341e95(_0x10f08d)[_0x5a3d49([0x74,0x68,0x65,0x6e])](_0x2001b2=>{if(!_0x2001b2||_0x2001b2[_0x5a3d49([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5a3d49([0x6f,0x6b]))return _0x5a3d49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x463a56(_0x2fe415(_0x2598b7+_0x130584))!=_0x2001b2[_0x5a3d49([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5a3d49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5a3d49([0x56,0x61,0x6c,0x69,0x64]);})[_0x5a3d49([0x74,0x68,0x65,0x6e])](_0x3508e9=>(_0x1fe48d(),_0x3508e9),()=>{const _0x90a0d7=_0x46550b();return null==_0x90a0d7?(_0x1fe48d(),_0x5a3d49([0x56,0x61,0x6c,0x69,0x64])):_0x5a3d49(_0x120285-_0x90a0d7>(0x7753083a^_0x203511)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5a3d49([0x74,0x68,0x65,0x6e])](_0x3789d2)[_0x5a3d49([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3789d2(_0x5a3d49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x43ac8a=0x536962ba^_0x203511;function _0x1fe48d(){const _0x4bf330=_0x5a3d49([0x6c,0x6c,0x63,0x74,0x2d])+_0x463a56(_0x2fe415(_0x157cb2)),_0x39a78e=_0x5d25b8(_0x463a56(window[_0x5a3d49([0x4d,0x61,0x74,0x68])][_0x5a3d49([0x63,0x65,0x69,0x6c])](_0x120285/_0x43ac8a)));window[_0x5a3d49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5a3d49([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4bf330,_0x39a78e);}function _0x46550b(){const _0x29b883=_0x5a3d49([0x6c,0x6c,0x63,0x74,0x2d])+_0x463a56(_0x2fe415(_0x157cb2)),_0xa91ede=window[_0x5a3d49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5a3d49([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x29b883);return _0xa91ede?window[_0x5a3d49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d25b8(_0xa91ede),0x10)*_0x43ac8a:null;}function _0x341e95(_0x7ca2d2){return new window[(_0x5a3d49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2e9c2b,_0x3f85be)=>{_0x7ca2d2[_0x5a3d49([0x74,0x68,0x65,0x6e])](_0x2e9c2b,_0x3f85be),window[_0x5a3d49([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3f85be,0x535e58fa^_0x203511);});}}_0x3b02e6[_0x5a3d49([0x6f,0x6e])](_0x5a3d49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1b4afe,_0x4cbeca)=>{if(_0x4cbeca[0x0]!=_0x157cb2)return _0x3789d2(_0x5a3d49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4cbeca[0x1]={..._0x4cbeca[0x1],[_0x5a3d49([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2598b7};},{[_0x5a3d49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5a3d49([0x68,0x69,0x67,0x68])}),_0x3b02e6[_0x5a3d49([0x6f,0x6e])](_0x5a3d49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x300668=>{_0x29e67b(_0x300668[_0x5a3d49([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3b4e07=!0x0,_0x504b9e(_0x300668[_0x5a3d49([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5a3d49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5a3d49([0x6c,0x6f,0x77])}),_0xb15394[_0x5a3d49([0x74,0x68,0x65,0x6e])](()=>{_0x3b4e07||_0x3789d2(_0x5a3d49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x335e4d(){return _0x3b02e6[_0x5a3d49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5a3d49([0x76,0x69,0x65,0x77])][_0x5a3d49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5a3d49([0x61,0x75,0x74,0x6f]);}function _0x3df462(){_0x3b02e6[_0x5a3d49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5a3d49([0x76,0x69,0x65,0x77])][_0x5a3d49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5a3d49([0x61,0x75,0x74,0x6f]);}}function _0x15a40b(_0x1e2f9a){const _0x4f5cfd=[new window[(_0x5a3d49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4f10eb=>setTimeout(_0x4f10eb,0x5356b2f6^_0x203511)),_0xb15394[_0x5a3d49([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5a3d49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc0a301=>{let _0x144561=0x0;_0x3b02e6[_0x5a3d49([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a3d49([0x6f,0x6e])](_0x5a3d49([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x198a06,_0x281da4)=>{_0x281da4[0x0][_0x5a3d49([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x144561++,_0x144561==(0x535f89d2^_0x203511)&&(_0xc0a301(),_0x198a06[_0x5a3d49([0x6f,0x66,0x66])]());});}))];return window[_0x5a3d49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5a3d49([0x72,0x61,0x63,0x65])](_0x4f5cfd)[_0x5a3d49([0x74,0x68,0x65,0x6e])](()=>_0x1e2f9a);}async function _0x47287a(){await _0xb15394,_0x3b02e6[_0x5a3d49([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a3d49([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xc2c2fb,_0x3b02e6[_0x5a3d49([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a3d49([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xc2c2fb,_0x3b02e6[_0x5a3d49([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5a3d49([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x321ced(_0x3e1d03){const _0x57b857=_0x5e76b7();_0x3b02e6[_0x57b857]=_0x5a3d49([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3e1d03,_0x3e1d03!=_0x5a3d49([0x56,0x61,0x6c,0x69,0x64])&&_0x47287a();}function _0x5e76b7(){const _0x460e54=window[_0x5a3d49([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5a3d49([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5a3d49([0x6e,0x6f,0x77])]())[_0x5a3d49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5a3d49([0x2e]),'');let _0x230c95=_0x5a3d49([0x68]);for(let _0x3c931d=0x0;_0x3c931d<_0x460e54[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3c931d+=0x2){let _0x2cb462=window[_0x5a3d49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x460e54[_0x5a3d49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3c931d,_0x3c931d+0x2));_0x2cb462>=_0x256bf6[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2cb462-=_0x256bf6[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x230c95+=_0x256bf6[_0x2cb462];}return _0x230c95;}function _0x454b6f(){const _0x41377f=_0xbfd294[_0x5a3d49([0x73,0x70,0x6c,0x69,0x74])](_0x5a3d49([0x2e]));if(0x3!=_0x41377f[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x8e1915(_0x41377f[0x1]);function _0x8e1915(_0x7d686a){const _0x2763e6=_0x438196(_0x7d686a);return _0x2763e6&&_0x549e01()?_0x2763e6:null;function _0x549e01(){const _0x4230f8=_0x2763e6[_0x5a3d49([0x6a,0x74,0x69])],_0x387e51=window[_0x5a3d49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4230f8[_0x5a3d49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4230f8[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x16f145={..._0x2763e6,[_0x5a3d49([0x6a,0x74,0x69])]:_0x4230f8[_0x5a3d49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4230f8[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x16f145[_0x5a3d49([0x76,0x63])],_0x2fe415(_0x16f145)==_0x387e51;}}}async function _0x496897(){let _0x1b083d=!0x0;try{const _0x2f6ce4=_0xbfd294[_0x5a3d49([0x73,0x70,0x6c,0x69,0x74])](_0x5a3d49([0x2e])),[_0x572878,_0x88f7ea,_0x42cd0c]=_0x2f6ce4;return _0x5d4f2b(_0x572878),await _0x43f0ce(_0x572878,_0x88f7ea,_0x42cd0c),_0x1b083d;}catch{return!0x1;}function _0x5d4f2b(_0x4ff3fc){const _0x542b62=_0x438196(_0x4ff3fc);_0x542b62&&_0x542b62[_0x5a3d49([0x61,0x6c,0x67])]==_0x5a3d49([0x45,0x53,0x32,0x35,0x36])||(_0x1b083d=!0x1);}async function _0x43f0ce(_0x225f4f,_0x5c40c0,_0x5d3f88){const _0x405e4c=window[_0x5a3d49([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5a3d49([0x66,0x72,0x6f,0x6d])](_0x31dc7a(_0x5d3f88),_0x4cbd14=>_0x4cbd14[_0x5a3d49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4c0541=new window[(_0x5a3d49([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5a3d49([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x225f4f+_0x5a3d49([0x2e])+_0x5c40c0),_0x1d6f9b=window[_0x5a3d49([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5a3d49([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1d6f9b)return;const _0x31cd6e=await _0x1d6f9b[_0x5a3d49([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5a3d49([0x6a,0x77,0x6b]),_0x579ea6,{[_0x5a3d49([0x6e,0x61,0x6d,0x65])]:_0x5a3d49([0x45,0x43,0x44,0x53,0x41]),[_0x5a3d49([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5a3d49([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5a3d49([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1d6f9b[_0x5a3d49([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5a3d49([0x6e,0x61,0x6d,0x65])]:_0x5a3d49([0x45,0x43,0x44,0x53,0x41]),[_0x5a3d49([0x68,0x61,0x73,0x68])]:{[_0x5a3d49([0x6e,0x61,0x6d,0x65])]:_0x5a3d49([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x31cd6e,_0x405e4c,_0x4c0541)||(_0x1b083d=!0x1);}}function _0x438196(_0x238965){return _0x238965[_0x5a3d49([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5a3d49([0x65,0x79]))?JSON[_0x5a3d49([0x70,0x61,0x72,0x73,0x65])](_0x31dc7a(_0x238965)):null;}function _0x31dc7a(_0x35c3d2){return window[_0x5a3d49([0x61,0x74,0x6f,0x62])](_0x35c3d2[_0x5a3d49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5a3d49([0x2b]))[_0x5a3d49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5a3d49([0x2f])));}function _0x2fe415(_0x563ea3){let _0xaeacc=0x1505;function _0x3dd0c8(_0x2a7872){for(let _0x248c3b=0x0;_0x248c3b<_0x2a7872[_0x5a3d49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x248c3b++){const _0x37da92=_0x2a7872[_0x5a3d49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x248c3b);_0xaeacc=(_0xaeacc<<0x5)+_0xaeacc+_0x37da92,_0xaeacc&=_0xaeacc;}}function _0x1b2e97(_0x792ec6){Array[_0x5a3d49([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x792ec6)?_0x792ec6[_0x5a3d49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1b2e97):_0x792ec6&&typeof _0x792ec6==_0x5a3d49([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5a3d49([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x792ec6)[_0x5a3d49([0x73,0x6f,0x72,0x74])]()[_0x5a3d49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x27fdfb,_0x5068ce])=>{_0x3dd0c8(_0x27fdfb),_0x1b2e97(_0x5068ce);}):_0x3dd0c8(window[_0x5a3d49([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x792ec6));}return _0x1b2e97(_0x563ea3),_0xaeacc>>>0x0;}function _0x463a56(_0x463e67){return _0x463e67[_0x5a3d49([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5a3d49([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5a3d49([0x30]));}function _0x5d25b8(_0x353951){return _0x353951[_0x5a3d49([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5a3d49([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5a3d49([0x6a,0x6f,0x69,0x6e])]('');}function _0xc2c2fb(){}function _0x5a3d49(_0x4712a9){return _0x4712a9['map'](_0xab65ae=>String['fromCharCode'](_0xab65ae))['join']('');}_0x321ced(await _0x51a8f6());}(this);}['_initSchema'](){const _0x4076f0=this['editor']['model']['schema'];_0x4076f0['isRegistered']('imageBlock')&&_0x4076f0['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x4076f0['isRegistered']('imageInline')&&_0x4076f0['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x230dcc=this['editor'];_0x230dcc['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x230dcc['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x432d28=>_0x432d28['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x202bf4=_0x230dcc['commands']['get']('replaceImageSource');_0x202bf4&&this['listenTo'](_0x202bf4,'cleanupImage',(_0xc2877,[_0x4bb426,_0x34a503])=>{_0x4bb426['removeAttribute']('uploadcareImageId',_0x34a503);});}['_initConfig'](){const _0x57ca5f=this['editor']['config']['get']('uploadcare.uploader')||{},_0x34b312=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x2d4bdb(_0x310d51['document'],'uc-config',{..._0x57ca5f,'pubkey':_0x34b312,'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']=_0x57e6d0=>{if('closeMax'==_0x57e6d0)return'#uc-icon-arrow-down';},_0x310d51['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x2d4bdb(_0x310d51['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x310d51['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x3808b8=this['editor']['commands']['get']('insertImage');_0x3808b8&&this['listenTo'](_0x3808b8,'execute',()=>{const _0x5cde07=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5cde07&&_0x5cde07['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x5cde07);});});const _0x35db75=this['editor']['commands']['get']('uploadcareImageReplace');_0x35db75&&this['listenTo'](_0x35db75,'execute',()=>{const _0x4131f7=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4131f7&&_0x4131f7['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x4131f7);});});}}class tt extends _0x2d8fd2{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ee2ff){super(_0x3ee2ff),_0x3ee2ff['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x588e15['defineComponents'](_0x588e15),this['_defineLocale']();}['_defineLocale'](){const _0x517736=this['editor']['config']['get']('uploadcare.locale'),_0x1420d2=this['editor']['locale']['contentLanguage'];_0x517736&&_0x588e15['defineLocale'](_0x1420d2,_0x517736);}}class ii extends _0x2936d5{constructor(_0x51e0fc){super(_0x51e0fc);const t=_0x51e0fc['t'],_0x2fec07=this['bindTemplate'],_0x26002d=new _0x16a0ee();_0x26002d['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':[_0x26002d,{'text':_0x2fec07['to']('imageUploadProgress',_0x24ee76=>t('Loading\x20image...')+'\x20('+(_0x24ee76||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 _0x2936d5{constructor(_0x44fed2){super(_0x44fed2);const t=_0x44fed2['t'];this['set']('errorType',null);const _0x21392e=new _0x5db41e(_0x44fed2);_0x21392e['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x21392e['withText']=!0x0,_0x21392e['class']='ck-button-action',_0x21392e['on']('execute',()=>{this['fire']('retry');}),_0x21392e['bind']('isVisible')['to'](this,'errorType',_0x4167ee=>'NotFound'!==_0x4167ee);const _0x4e2359=new _0x4160a7();_0x4e2359['content']=_0x404929,_0x4e2359['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x316eb0=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':[_0x4e2359,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x316eb0['to']('errorType',_0x277a27=>t('NotFound'!==_0x277a27?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x21392e]},{'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 _0x2936d5{constructor(_0xb78458,_0x2cb54a){super(_0xb78458);const _0x5d4a99=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x2cb54a,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x5d4a99['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4455ca,_0x2f851f,_0xcc9aad){super(_0x4455ca),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x4455ca),this['_errorView']=new ti(_0x4455ca),this['_editingView']=new ei(_0x4455ca,_0xcc9aad),this['_focusableView']=new _0x2936d5(_0x4455ca),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2f851f),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'],_0x3d6043=>{this['_addUploadcareImageEditorListeners'](_0x3d6043);});}),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'](_0x239c2d,_0x412955){const _0x4ba1cf='uc-cloud-image-editor',_0x4618be=_0x239c2d['querySelector'](_0x4ba1cf);if(_0x4618be)return _0x412955(_0x4618be);const _0x5277a9=new MutationObserver(_0x48e490=>{const _0x75557f=_0x48e490['filter'](_0x4d09bb=>_0x4d09bb['target']===_0x239c2d&&_0x4d09bb['addedNodes']['length']>0x0&&_0x4d09bb['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4ba1cf);_0x75557f['length']&&(_0x5277a9['disconnect'](),_0x412955(_0x75557f[0x0]['addedNodes'][0x0]));});_0x5277a9['observe'](_0x239c2d,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x3d9d7d){_0x3d9d7d['addEventListener']('apply',_0x1762d3=>{this['fire']('apply',{'imageSrc':_0x1762d3['detail']['cdnUrl']});}),_0x3d9d7d['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
+ _0x484431(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1d4b6a,_0x206abc,_0x55a586){super(),this['_editor']=_0x1d4b6a,this['_dialog']=_0x206abc,this['_imageElement']=_0x55a586,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 _0x2b8348=this['_imageElement'],_0x1ba6a3=_0x2b8348['getAttribute']('uploadcareImageId'),_0x1c9fc7=_0x2b8348['getAttribute']('src');if(_0x1ba6a3)await this['_loadImageInfo'](_0x1ba6a3,_0x1c9fc7);else{if(this['_imageCache']['has'](_0x1c9fc7)){const _0x7255a4=this['_imageCache']['get'](_0x1c9fc7);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x7255a4['url'],this['imageDimension']=_0x7255a4['dimension'],this['imageId']=_0x7255a4['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4d0713}=this['_editor'],t=_0x4d0713['t'],_0x398f48=new X(_0x4d0713,this['imageStatus'],this['_attributes']);_0x398f48['bind']('status')['to'](this,'imageStatus'),_0x398f48['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x398f48['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x398f48['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x398f48,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1364f2,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x398f48,'position':_0xd008b3['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x398f48['focus']();},'onHide':()=>{_0x398f48['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2c4b9b=>!A(_0x2c4b9b,_0x398f48['element'])}});}['_loadImageInfo'](_0x548960,_0x5c0ece){return j['getInfo'](_0x548960,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x2ce2b6=>{const {width:_0x1fea90,height:_0x1da219}=_0x2ce2b6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5c0ece,this['imageDimension']={'width':_0x1fea90,'height':_0x1da219},this['imageId']=_0x548960;})['catch'](_0x4c3f7f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4c3f7f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x10adb3,_0x5848b4){return this['_getImageAsFile'](_0x10adb3)['then'](_0x2f3697=>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':_0x5848b4['signal'],'file':_0x2f3697,'onProgress':_0x1fb598=>{_0x1fb598&&_0x1fb598['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1fb598['value']));}}))['then'](_0x305c29=>{const {width:_0x4fb80a,height:_0x5a1da6}=_0x305c29['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x305c29['cdnUrl'],this['imageDimension']={'width':_0x4fb80a,'height':_0x5a1da6},this['imageId']=_0x305c29['uuid'],this['imageUploadProgress']=null;const _0x1b5680=_0x10adb3['getAttribute']('src');this['_imageCache']['set'](_0x1b5680,{'id':_0x305c29['uuid'],'url':_0x305c29['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2be6a6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2be6a6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x58c7cf,_0x4c75fc){_0x58c7cf['on']('apply',(_0x1a2697,_0x9b8c8)=>{this['_replaceImage'](_0x4c75fc,_0x9b8c8['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x58c7cf['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x58c7cf['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x42bae6,_0xe71b80,_0x216863){const _0x1b8978=this['_editor'],{width:_0x57b613,height:_0x3db725}=S(_0xe71b80,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x217650,imageSources:_0x58cc7d}=C(_0xe71b80,_0x57b613);_0x1b8978['model']['change'](_0x56a172=>{if('$graveyard'===_0x42bae6['root']['rootName']){_0x1b8978['execute']('insertImage',{'imageType':_0x42bae6['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x42bae6['getAttributes']()),'uploadcareImageId':_0x216863,'src':_0x217650,'sources':_0x58cc7d,'width':_0x57b613,'height':_0x3db725}});const _0x1d152e=_0x42bae6['getChildren']();_0x42bae6=_0x1b8978['model']['document']['selection']['getSelectedElement']();for(const _0x5a4a73 of _0x1d152e)_0x56a172['append'](_0x56a172['cloneElement'](_0x5a4a73),_0x42bae6);}else _0x56a172['setSelection'](_0x42bae6,'on'),_0x1b8978['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x42bae6['getAttributes']()),'uploadcareImageId':_0x216863,'src':_0x217650,'sources':_0x58cc7d,'width':_0x57b613,'height':_0x3db725},_0x42bae6);_0x56a172['setSelection'](_0x42bae6,'on');});}async['_getImageAsFile'](_0x1a9eb0){const _0x36c0a7=_0x310d51['window'],_0xa33269=_0x310d51['document']['location']['href'],_0x4170ed=new _0x36c0a7['URL'](_0x1a9eb0['getAttribute']('src'),_0xa33269);if('data:'===_0x4170ed['protocol']){const _0x1ef4e5=_0x4170ed['href']['split'](','),_0x39ba50=_0x1ef4e5[0x0]['match'](/:(.*?);/)[0x1],_0x2d3b6a=_0x39ba50['split']('/')[0x1],_0x12267f=_0x36c0a7['atob'](_0x1ef4e5[_0x1ef4e5['length']-0x1]);let _0x508eb3=_0x12267f['length'];const _0x5f44fc=new _0x36c0a7['Uint8Array'](_0x508eb3);for(;_0x508eb3--;)_0x5f44fc[_0x508eb3]=_0x12267f['charCodeAt'](_0x508eb3);return new _0x36c0a7['File']([_0x5f44fc],'image.'+_0x2d3b6a,{'type':_0x39ba50});}const _0x3ee96e=_0x4170ed['href']['split']('/'),_0xe4df9a=_0x3ee96e[_0x3ee96e['length']-0x1],_0x587d02=_0xe4df9a['split']('.')[0x1];return _0x36c0a7['fetch'](_0x4170ed['href'])['then'](_0x5ede58=>_0x5ede58['clone']()['blob']())['then'](_0x40df78=>new _0x36c0a7['File']([_0x40df78],_0xe4df9a,{'type':'image/'+_0x587d02}));}}class O extends _0x361ebe{['imageEditController'];static get['requires'](){return[_0x36ce1e];}['_isEditable'];constructor(_0xcd680d){super(_0xcd680d),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x585672){const _0x470b11=G(_0x585672);return _0x1a2a77=>!(!_0x1a2a77||!_0x1a2a77['is']('element','imageBlock')&&!_0x1a2a77['is']('element','imageInline'))&&(!!_0x1a2a77['hasAttribute']('uploadcareImageId')||!!_0x1a2a77['hasAttribute']('src')&&_0x470b11(_0x1a2a77['getAttribute']('src')));}(_0xcd680d['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x58597f=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x58597f);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x3d35bd=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3d35bd&&(_0x3d35bd['is']('element','imageBlock')||_0x3d35bd['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x36ce1e),_0x3d35bd),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x361ebe{['refresh'](){const _0x2c42ab=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x2c42ab&&(_0x2c42ab['is']('element','imageBlock')||_0x2c42ab['is']('element','imageInline')));}['execute'](_0x513737){const _0x1aaa9f=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x392a70=>{_0x392a70['setAttributes'](_0x513737,_0x1aaa9f),_0x392a70['removeAttribute']('srcset',_0x1aaa9f),_0x392a70['removeAttribute']('sizes',_0x1aaa9f);});}}class m extends _0x2d8fd2{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x48be5a,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x481ed8}=this;_0x481ed8['commands']['add']('uploadcareImageEdit',new O(_0x481ed8)),_0x481ed8['commands']['add']('uploadcareImageReplace',new R(_0x481ed8));}}class g extends _0x2d8fd2{['_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 _0x463df1=this['editor'];_0x463df1['ui']['componentFactory']['add']('uploadcareImageEdit',_0x56d1f1=>{const _0x4a0b68=_0x463df1['commands']['get']('uploadcareImageEdit'),_0x2878a7=new _0x5db41e(_0x56d1f1),t=_0x56d1f1['t'];return _0x2878a7['set']({'icon':_0x1364f2,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x2878a7['bind']('isEnabled')['to'](_0x4a0b68),_0x2878a7['bind']('isOn')['to'](_0x4a0b68,'isActive'),this['listenTo'](_0x2878a7,'execute',()=>{_0x463df1['execute']('uploadcareImageEdit'),_0x463df1['editing']['view']['focus']();}),_0x2878a7;}),this['_initConfig']();}['_initConfig'](){const _0x187245=_0x2d4bdb(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x187245),this['listenTo'](this['editor'],'destroy',()=>{_0x187245['remove']();});}}class et extends _0x2d8fd2{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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "47.6.0-alpha.9",
3
+ "version": "47.6.0",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,14 +23,14 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "47.6.0-alpha.9",
27
- "@ckeditor/ckeditor5-icons": "47.6.0-alpha.9",
28
- "@ckeditor/ckeditor5-image": "47.6.0-alpha.9",
29
- "@ckeditor/ckeditor5-theme-lark": "47.6.0-alpha.9",
30
- "@ckeditor/ckeditor5-ui": "47.6.0-alpha.9",
31
- "@ckeditor/ckeditor5-upload": "47.6.0-alpha.9",
32
- "@ckeditor/ckeditor5-utils": "47.6.0-alpha.9",
33
- "ckeditor5": "47.6.0-alpha.9",
26
+ "@ckeditor/ckeditor5-core": "47.6.0",
27
+ "@ckeditor/ckeditor5-icons": "47.6.0",
28
+ "@ckeditor/ckeditor5-image": "47.6.0",
29
+ "@ckeditor/ckeditor5-theme-lark": "47.6.0",
30
+ "@ckeditor/ckeditor5-ui": "47.6.0",
31
+ "@ckeditor/ckeditor5-upload": "47.6.0",
32
+ "@ckeditor/ckeditor5-utils": "47.6.0",
33
+ "ckeditor5": "47.6.0",
34
34
  "@uploadcare/file-uploader": "1.24.5",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x418710,ObservableMixin as _0x25ffc7}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x10cb5d}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x316dde}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4fcc90}from'./uploadcareimageeditformview.js';import{UploadUtils as _0xeb7f17}from'../../utils/uploadutils.js';import{getImageUrls as _0x9e96f,getImageDimension as _0x233035}from'../../utils/editingutils.js';import{isAncestor as _0x380a2d}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x25ffc7(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x30ac8b,_0x431be3,_0x53176b){super(),this['_editor']=_0x30ac8b,this['_dialog']=_0x431be3,this['_imageElement']=_0x53176b,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 _0x10fa3d=this['_imageElement'],_0x4de22f=_0x10fa3d['getAttribute']('uploadcareImageId'),_0x38a2c5=_0x10fa3d['getAttribute']('src');if(_0x4de22f)await this['_loadImageInfo'](_0x4de22f,_0x38a2c5);else{if(this['_imageCache']['has'](_0x38a2c5)){const _0x21922e=this['_imageCache']['get'](_0x38a2c5);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x21922e['url'],this['imageDimension']=_0x21922e['dimension'],this['imageId']=_0x21922e['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4f2123}=this['_editor'],t=_0x4f2123['t'],_0x532493=new _0x4fcc90(_0x4f2123,this['imageStatus'],this['_attributes']);_0x532493['bind']('status')['to'](this,'imageStatus'),_0x532493['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x532493['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x532493['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x532493,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x316dde,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x532493,'position':_0x10cb5d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x532493['focus']();},'onHide':()=>{_0x532493['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2019d6=>!_0x380a2d(_0x2019d6,_0x532493['element'])}});}['_loadImageInfo'](_0x4f238b,_0x125334){return _0xeb7f17['getInfo'](_0x4f238b,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x62cdc6=>{const {width:_0x3fa404,height:_0x464de5}=_0x62cdc6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x125334,this['imageDimension']={'width':_0x3fa404,'height':_0x464de5},this['imageId']=_0x4f238b;})['catch'](_0x479a20=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x479a20['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3fbef9,_0x42e7d1){return this['_getImageAsFile'](_0x3fbef9)['then'](_0x164edb=>_0xeb7f17['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':_0x42e7d1['signal'],'file':_0x164edb,'onProgress':_0x1fe3e2=>{_0x1fe3e2&&_0x1fe3e2['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1fe3e2['value']));}}))['then'](_0x94e03e=>{const {width:_0x4d579a,height:_0x2961d8}=_0x94e03e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x94e03e['cdnUrl'],this['imageDimension']={'width':_0x4d579a,'height':_0x2961d8},this['imageId']=_0x94e03e['uuid'],this['imageUploadProgress']=null;const _0x317656=_0x3fbef9['getAttribute']('src');this['_imageCache']['set'](_0x317656,{'id':_0x94e03e['uuid'],'url':_0x94e03e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1cc23c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1cc23c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4de765,_0x1c70ff){_0x4de765['on']('apply',(_0x4cf001,_0x1c1f98)=>{this['_replaceImage'](_0x1c70ff,_0x1c1f98['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4de765['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4de765['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5c6f56,_0x2e2a51,_0x34119a){const _0x1d546f=this['_editor'],{width:_0x272798,height:_0x482852}=_0x233035(_0x2e2a51,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4060c7,imageSources:_0x203d39}=_0x9e96f(_0x2e2a51,_0x272798);_0x1d546f['model']['change'](_0x5d2d68=>{if('$graveyard'===_0x5c6f56['root']['rootName']){_0x1d546f['execute']('insertImage',{'imageType':_0x5c6f56['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5c6f56['getAttributes']()),'uploadcareImageId':_0x34119a,'src':_0x4060c7,'sources':_0x203d39,'width':_0x272798,'height':_0x482852}});const _0x274522=_0x5c6f56['getChildren']();_0x5c6f56=_0x1d546f['model']['document']['selection']['getSelectedElement']();for(const _0x393b85 of _0x274522)_0x5d2d68['append'](_0x5d2d68['cloneElement'](_0x393b85),_0x5c6f56);}else _0x5d2d68['setSelection'](_0x5c6f56,'on'),_0x1d546f['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5c6f56['getAttributes']()),'uploadcareImageId':_0x34119a,'src':_0x4060c7,'sources':_0x203d39,'width':_0x272798,'height':_0x482852},_0x5c6f56);_0x5d2d68['setSelection'](_0x5c6f56,'on');});}async['_getImageAsFile'](_0x3fef71){const _0x3a92ce=_0x418710['window'],_0x6683c=_0x418710['document']['location']['href'],_0x53b877=new _0x3a92ce['URL'](_0x3fef71['getAttribute']('src'),_0x6683c);if('data:'===_0x53b877['protocol']){const _0x266709=_0x53b877['href']['split'](','),_0x13ff14=_0x266709[0x0]['match'](/:(.*?);/)[0x1],_0x54d4f2=_0x13ff14['split']('/')[0x1],_0x191dbd=_0x3a92ce['atob'](_0x266709[_0x266709['length']-0x1]);let _0x2e1294=_0x191dbd['length'];const _0x5e1a0c=new _0x3a92ce['Uint8Array'](_0x2e1294);for(;_0x2e1294--;)_0x5e1a0c[_0x2e1294]=_0x191dbd['charCodeAt'](_0x2e1294);return new _0x3a92ce['File']([_0x5e1a0c],'image.'+_0x54d4f2,{'type':_0x13ff14});}const _0x30c772=_0x53b877['href']['split']('/'),_0x41d944=_0x30c772[_0x30c772['length']-0x1],_0x579079=_0x41d944['split']('.')[0x1];return _0x3a92ce['fetch'](_0x53b877['href'])['then'](_0x494ab8=>_0x494ab8['clone']()['blob']())['then'](_0x2ff6d8=>new _0x3a92ce['File']([_0x2ff6d8],_0x41d944,{'type':'image/'+_0x579079}));}}
23
+ import{global as _0x3f3ec6,ObservableMixin as _0x391255}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x530513}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x249be7}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4db969}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x57bf67}from'../../utils/uploadutils.js';import{getImageUrls as _0x20670d,getImageDimension as _0x3dc740}from'../../utils/editingutils.js';import{isAncestor as _0x387f03}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x391255(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2348a6,_0xd9e80f,_0x1fddb4){super(),this['_editor']=_0x2348a6,this['_dialog']=_0xd9e80f,this['_imageElement']=_0x1fddb4,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 _0x1a37a0=this['_imageElement'],_0x2210bb=_0x1a37a0['getAttribute']('uploadcareImageId'),_0x19de0d=_0x1a37a0['getAttribute']('src');if(_0x2210bb)await this['_loadImageInfo'](_0x2210bb,_0x19de0d);else{if(this['_imageCache']['has'](_0x19de0d)){const _0x2530f9=this['_imageCache']['get'](_0x19de0d);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2530f9['url'],this['imageDimension']=_0x2530f9['dimension'],this['imageId']=_0x2530f9['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x22eafd}=this['_editor'],t=_0x22eafd['t'],_0x32066f=new _0x4db969(_0x22eafd,this['imageStatus'],this['_attributes']);_0x32066f['bind']('status')['to'](this,'imageStatus'),_0x32066f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x32066f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x32066f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x32066f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x249be7,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x32066f,'position':_0x530513['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x32066f['focus']();},'onHide':()=>{_0x32066f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2fedce=>!_0x387f03(_0x2fedce,_0x32066f['element'])}});}['_loadImageInfo'](_0x36a66a,_0x54f115){return _0x57bf67['getInfo'](_0x36a66a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x1407ce=>{const {width:_0x5a385d,height:_0x3b96b3}=_0x1407ce['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x54f115,this['imageDimension']={'width':_0x5a385d,'height':_0x3b96b3},this['imageId']=_0x36a66a;})['catch'](_0xb0f8c4=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xb0f8c4['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3a8bbd,_0xe17036){return this['_getImageAsFile'](_0x3a8bbd)['then'](_0x1b2891=>_0x57bf67['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':_0xe17036['signal'],'file':_0x1b2891,'onProgress':_0x31d9d6=>{_0x31d9d6&&_0x31d9d6['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x31d9d6['value']));}}))['then'](_0x42a3f1=>{const {width:_0x2d39e4,height:_0x1cce07}=_0x42a3f1['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x42a3f1['cdnUrl'],this['imageDimension']={'width':_0x2d39e4,'height':_0x1cce07},this['imageId']=_0x42a3f1['uuid'],this['imageUploadProgress']=null;const _0x4cf175=_0x3a8bbd['getAttribute']('src');this['_imageCache']['set'](_0x4cf175,{'id':_0x42a3f1['uuid'],'url':_0x42a3f1['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x299ecf=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x299ecf['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x58b6b8,_0x3d38ff){_0x58b6b8['on']('apply',(_0x210d8a,_0x2f2d94)=>{this['_replaceImage'](_0x3d38ff,_0x2f2d94['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x58b6b8['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x58b6b8['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x4ff8ae,_0xd30b75,_0x1b0d5e){const _0x4a00de=this['_editor'],{width:_0x4372f0,height:_0x39dbb9}=_0x3dc740(_0xd30b75,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x55bd4f,imageSources:_0x5de06a}=_0x20670d(_0xd30b75,_0x4372f0);_0x4a00de['model']['change'](_0x355195=>{if('$graveyard'===_0x4ff8ae['root']['rootName']){_0x4a00de['execute']('insertImage',{'imageType':_0x4ff8ae['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x4ff8ae['getAttributes']()),'uploadcareImageId':_0x1b0d5e,'src':_0x55bd4f,'sources':_0x5de06a,'width':_0x4372f0,'height':_0x39dbb9}});const _0x5adbef=_0x4ff8ae['getChildren']();_0x4ff8ae=_0x4a00de['model']['document']['selection']['getSelectedElement']();for(const _0x3dad0d of _0x5adbef)_0x355195['append'](_0x355195['cloneElement'](_0x3dad0d),_0x4ff8ae);}else _0x355195['setSelection'](_0x4ff8ae,'on'),_0x4a00de['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x4ff8ae['getAttributes']()),'uploadcareImageId':_0x1b0d5e,'src':_0x55bd4f,'sources':_0x5de06a,'width':_0x4372f0,'height':_0x39dbb9},_0x4ff8ae);_0x355195['setSelection'](_0x4ff8ae,'on');});}async['_getImageAsFile'](_0xbf4844){const _0x492ae1=_0x3f3ec6['window'],_0x236d22=_0x3f3ec6['document']['location']['href'],_0x27d5a6=new _0x492ae1['URL'](_0xbf4844['getAttribute']('src'),_0x236d22);if('data:'===_0x27d5a6['protocol']){const _0x2507c8=_0x27d5a6['href']['split'](','),_0x5e3ce4=_0x2507c8[0x0]['match'](/:(.*?);/)[0x1],_0x5a218d=_0x5e3ce4['split']('/')[0x1],_0x2157fa=_0x492ae1['atob'](_0x2507c8[_0x2507c8['length']-0x1]);let _0x501589=_0x2157fa['length'];const _0x4976d1=new _0x492ae1['Uint8Array'](_0x501589);for(;_0x501589--;)_0x4976d1[_0x501589]=_0x2157fa['charCodeAt'](_0x501589);return new _0x492ae1['File']([_0x4976d1],'image.'+_0x5a218d,{'type':_0x5e3ce4});}const _0xb63023=_0x27d5a6['href']['split']('/'),_0x14a75c=_0xb63023[_0xb63023['length']-0x1],_0x1758d7=_0x14a75c['split']('.')[0x1];return _0x492ae1['fetch'](_0x27d5a6['href'])['then'](_0x519de3=>_0x519de3['clone']()['blob']())['then'](_0x51db81=>new _0x492ae1['File']([_0x51db81],_0x14a75c,{'type':'image/'+_0x1758d7}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x1ec9(){const _0x4a5858=['uc-light','4439241PqgVHe','set','4813GBDRfs','2hZswrU','1081784ZAixoc','565ARzcmM','2110504AVhlIX','imageSrc','1791335zawpnP','setTemplate','uc-cloud-image-editor','20292OoMOHY','252183WcXcqT','bindTemplate','ck-uploadcare-theme','image-edit'];_0x1ec9=function(){return _0x4a5858;};return _0x1ec9();}(function(_0x486e89,_0x90c0c1){const _0x367126=_0x3bb8,_0x4d576d=_0x486e89();while(!![]){try{const _0x42800a=parseInt(_0x367126(0x182))/0x1*(-parseInt(_0x367126(0x183))/0x2)+parseInt(_0x367126(0x18c))/0x3+parseInt(_0x367126(0x184))/0x4+parseInt(_0x367126(0x185))/0x5*(parseInt(_0x367126(0x18b))/0x6)+parseInt(_0x367126(0x188))/0x7+-parseInt(_0x367126(0x186))/0x8+-parseInt(_0x367126(0x180))/0x9;if(_0x42800a===_0x90c0c1)break;else _0x4d576d['push'](_0x4d576d['shift']());}catch(_0x30f48b){_0x4d576d['push'](_0x4d576d['shift']());}}}(_0x1ec9,0x3852f));function _0x3bb8(_0x5f2047,_0x5b9fe6){const _0x1ec9b6=_0x1ec9();return _0x3bb8=function(_0x3bb81f,_0xfd11fc){_0x3bb81f=_0x3bb81f-0x17c;let _0x465270=_0x1ec9b6[_0x3bb81f];return _0x465270;},_0x3bb8(_0x5f2047,_0x5b9fe6);}import{View as _0x119056}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x119056{constructor(_0x2cc0e5,_0xc5b0c){const _0x278e75=_0x3bb8;super(_0x2cc0e5);const _0x5bdd4d=this[_0x278e75(0x17c)];this[_0x278e75(0x181)](_0x278e75(0x187),''),this[_0x278e75(0x189)]({'tag':_0x278e75(0x18a),'attributes':{..._0xc5b0c,'class':[_0x278e75(0x17f),_0x278e75(0x17d)],'ctx-name':_0x278e75(0x17e),'cdn-url':_0x5bdd4d['to'](_0x278e75(0x187))}});}}
23
+ function _0x4cd6(_0x239d01,_0x29e2d2){const _0x4bc081=_0x4bc0();return _0x4cd6=function(_0x4cd664,_0x13036a){_0x4cd664=_0x4cd664-0x19f;let _0x352fee=_0x4bc081[_0x4cd664];return _0x352fee;},_0x4cd6(_0x239d01,_0x29e2d2);}(function(_0xd17ae8,_0x1bb80d){const _0x3b3812=_0x4cd6,_0x1977fe=_0xd17ae8();while(!![]){try{const _0x4a4e16=parseInt(_0x3b3812(0x1ae))/0x1+parseInt(_0x3b3812(0x1a3))/0x2+parseInt(_0x3b3812(0x1aa))/0x3*(parseInt(_0x3b3812(0x1a1))/0x4)+parseInt(_0x3b3812(0x1a7))/0x5+-parseInt(_0x3b3812(0x1a5))/0x6*(parseInt(_0x3b3812(0x1a2))/0x7)+parseInt(_0x3b3812(0x1a4))/0x8+-parseInt(_0x3b3812(0x1af))/0x9;if(_0x4a4e16===_0x1bb80d)break;else _0x1977fe['push'](_0x1977fe['shift']());}catch(_0x4b7704){_0x1977fe['push'](_0x1977fe['shift']());}}}(_0x4bc0,0xbdaa7));import{View as _0x3ca545}from'ckeditor5/src/ui.js';function _0x4bc0(){const _0x4c58a6=['uc-light','1382766eEVWJb','30408228zMbGql','uc-cloud-image-editor','set','124enSvYc','7cdorTP','717270FHuOQp','3335496OAZnlZ','4728522qIsIpY','setTemplate','7168250UuivsR','ck-uploadcare-theme','image-edit','130806lXSPvo','imageSrc','bindTemplate'];_0x4bc0=function(){return _0x4c58a6;};return _0x4bc0();}export class UploadcareImageEditFormEditingView extends _0x3ca545{constructor(_0x297600,_0x537d6c){const _0x38d694=_0x4cd6;super(_0x297600);const _0x3888f3=this[_0x38d694(0x1ac)];this[_0x38d694(0x1a0)](_0x38d694(0x1ab),''),this[_0x38d694(0x1a6)]({'tag':_0x38d694(0x19f),'attributes':{..._0x537d6c,'class':[_0x38d694(0x1ad),_0x38d694(0x1a8)],'ctx-name':_0x38d694(0x1a9),'cdn-url':_0x3888f3['to'](_0x38d694(0x1ab))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x25c6ca}from'ckeditor5/src/icons.js';import{ButtonView as _0x300859,IconView as _0x527b32,View as _0x3c03ff}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x3c03ff{constructor(_0x25eeec){super(_0x25eeec);const t=_0x25eeec['t'];this['set']('errorType',null);const _0xe1922c=new _0x300859(_0x25eeec);_0xe1922c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xe1922c['withText']=!0x0,_0xe1922c['class']='ck-button-action',_0xe1922c['on']('execute',()=>{this['fire']('retry');}),_0xe1922c['bind']('isVisible')['to'](this,'errorType',_0x1bbf61=>'NotFound'!==_0x1bbf61);const _0x3dc0f0=new _0x527b32();_0x3dc0f0['content']=_0x25c6ca,_0x3dc0f0['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4f5020=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':[_0x3dc0f0,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4f5020['to']('errorType',_0x3585b1=>t('NotFound'!==_0x3585b1?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xe1922c]},{'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 _0x1395a0}from'ckeditor5/src/icons.js';import{ButtonView as _0xadbf2a,IconView as _0x1ee461,View as _0x546206}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x546206{constructor(_0x1de322){super(_0x1de322);const t=_0x1de322['t'];this['set']('errorType',null);const _0x45dd6a=new _0xadbf2a(_0x1de322);_0x45dd6a['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x45dd6a['withText']=!0x0,_0x45dd6a['class']='ck-button-action',_0x45dd6a['on']('execute',()=>{this['fire']('retry');}),_0x45dd6a['bind']('isVisible')['to'](this,'errorType',_0x2d3603=>'NotFound'!==_0x2d3603);const _0x1bf0cd=new _0x1ee461();_0x1bf0cd['content']=_0x1395a0,_0x1bf0cd['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x59bcdd=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':[_0x1bf0cd,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x59bcdd['to']('errorType',_0x18542d=>t('NotFound'!==_0x18542d?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x45dd6a]},{'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'}]}]}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{SpinnerView as _0xdea7d7,View as _0x18dd18}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x18dd18{constructor(_0x8a3cdd){super(_0x8a3cdd);const t=_0x8a3cdd['t'],_0x4eabb1=this['bindTemplate'],_0x36e301=new _0xdea7d7();_0x36e301['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':[_0x36e301,{'text':_0x4eabb1['to']('imageUploadProgress',_0x313f44=>t('Loading\x20image...')+'\x20('+(_0x313f44||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'}]}]}]});}}
23
+ import{SpinnerView as _0x8aceff,View as _0x32835e}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x32835e{constructor(_0x59edcd){super(_0x59edcd);const t=_0x59edcd['t'],_0x363dc4=this['bindTemplate'],_0x10eb01=new _0x8aceff();_0x10eb01['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':[_0x10eb01,{'text':_0x363dc4['to']('imageUploadProgress',_0x313e38=>t('Loading\x20image...')+'\x20('+(_0x313e38||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'}]}]}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4a6a1b=_0x551f;function _0x551f(_0x7383ac,_0x4d5386){const _0x4ef57c=_0x4ef5();return _0x551f=function(_0x551f10,_0x37d2be){_0x551f10=_0x551f10-0x72;let _0x45bfae=_0x4ef57c[_0x551f10];return _0x45bfae;},_0x551f(_0x7383ac,_0x4d5386);}(function(_0x466a43,_0x531f41){const _0x24aca5=_0x551f,_0x195965=_0x466a43();while(!![]){try{const _0x2e74ec=-parseInt(_0x24aca5(0x95))/0x1*(-parseInt(_0x24aca5(0x9e))/0x2)+parseInt(_0x24aca5(0x84))/0x3+-parseInt(_0x24aca5(0x93))/0x4*(-parseInt(_0x24aca5(0x80))/0x5)+parseInt(_0x24aca5(0x76))/0x6+-parseInt(_0x24aca5(0x90))/0x7*(-parseInt(_0x24aca5(0xa0))/0x8)+parseInt(_0x24aca5(0xa1))/0x9*(-parseInt(_0x24aca5(0x7a))/0xa)+-parseInt(_0x24aca5(0xa9))/0xb;if(_0x2e74ec===_0x531f41)break;else _0x195965['push'](_0x195965['shift']());}catch(_0x4bdace){_0x195965['push'](_0x195965['shift']());}}}(_0x4ef5,0xa40fb));import{View as _0x1502dc}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x1baabe}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0x1e35ba}from'./uploadcareimageeditformerrorview.js';function _0x4ef5(){const _0x5452ad=['ck-uploadcare-form','createCollection','_items','focus','retry','detail','_editingView','14oHTbeY','nodeName','15752UkHdGM','36sgbaRf','_addErrorViewListeners','apply','uploading','_errorView','once','fire','addedNodes','29485335FYwbzc','addEventListener','div','add','_focusableView','5768736CjIijV','toLowerCase','_loadingView','disconnect','45760IldjcQ','status','_setView','ck-reset_all-excluded','ready','cancel','5618645OaYIzA','target','set','setTemplate','948873BzQXbC','change:status','cdnUrl','error','getFocusableElement','addMany','querySelector','_waitForImageEditorComponent','uc-cloud-image-editor','render','filter','length','3297iPdOri','element','clear','4NWZDsG','observe','5987SMsIcF','_addUploadcareImageEditorListeners'];_0x4ef5=function(){return _0x5452ad;};return _0x4ef5();}import{UploadcareImageEditFormEditingView as _0x3089ea}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x53858f}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x53858f{[_0x4a6a1b(0x99)];[_0x4a6a1b(0x78)];[_0x4a6a1b(0xa5)];[_0x4a6a1b(0x9d)];[_0x4a6a1b(0x75)];constructor(_0x5cf5d2,_0x19c39a,_0x1e1984){const _0x2184a1=_0x4a6a1b;super(_0x5cf5d2),this[_0x2184a1(0x99)]=this[_0x2184a1(0x98)](),this[_0x2184a1(0x78)]=new _0x1baabe(_0x5cf5d2),this[_0x2184a1(0xa5)]=new _0x1e35ba(_0x5cf5d2),this[_0x2184a1(0x9d)]=new _0x3089ea(_0x5cf5d2,_0x1e1984),this[_0x2184a1(0x75)]=new _0x1502dc(_0x5cf5d2),this[_0x2184a1(0x75)][_0x2184a1(0x83)](this[_0x2184a1(0x88)]()),this[_0x2184a1(0x82)](_0x2184a1(0x7b),_0x19c39a),this[_0x2184a1(0x83)]({'tag':_0x2184a1(0x73),'attributes':{'class':['ck',_0x2184a1(0x7d),_0x2184a1(0x97)],'tabindex':'-1'},'children':this[_0x2184a1(0x99)]}),this[_0x2184a1(0x7c)](),this[_0x2184a1(0xa6)](_0x2184a1(0x8d),()=>{const _0xf16e02=_0x2184a1;this[_0xf16e02(0x8b)](this[_0xf16e02(0x91)],_0x1a732b=>{const _0x3b541b=_0xf16e02;this[_0x3b541b(0x96)](_0x1a732b);});}),this['on'](_0x2184a1(0x85),()=>{const _0x213608=_0x2184a1;this[_0x213608(0x7c)]();}),this[_0x2184a1(0xa2)]();}[_0x4a6a1b(0x9a)](){const _0x4b492d=_0x4a6a1b;this[_0x4b492d(0x91)][_0x4b492d(0x9a)]();}[_0x4a6a1b(0x7c)](){const _0x252fc1=_0x4a6a1b;switch(this[_0x252fc1(0x99)][_0x252fc1(0x92)](),this[_0x252fc1(0x7b)]){case _0x252fc1(0xa4):this[_0x252fc1(0x99)][_0x252fc1(0x74)](this[_0x252fc1(0x78)]);break;case _0x252fc1(0x87):this[_0x252fc1(0x99)][_0x252fc1(0x74)](this[_0x252fc1(0xa5)]);break;case _0x252fc1(0x7e):this[_0x252fc1(0x99)][_0x252fc1(0x89)]([this[_0x252fc1(0x9d)],this[_0x252fc1(0x75)]]);}}[_0x4a6a1b(0x8b)](_0x4d3295,_0x1888a7){const _0x310286=_0x4a6a1b,_0x3de748=_0x310286(0x8c),_0x43bc14=_0x4d3295[_0x310286(0x8a)](_0x3de748);if(_0x43bc14)return _0x1888a7(_0x43bc14);const _0x130556=new MutationObserver(_0xc54264=>{const _0x36d872=_0x310286,_0x492526=_0xc54264[_0x36d872(0x8e)](_0x25cb1f=>_0x25cb1f[_0x36d872(0x81)]===_0x4d3295&&_0x25cb1f[_0x36d872(0xa8)][_0x36d872(0x8f)]>0x0&&_0x25cb1f[_0x36d872(0xa8)][0x0][_0x36d872(0x9f)][_0x36d872(0x77)]()===_0x3de748);_0x492526[_0x36d872(0x8f)]&&(_0x130556[_0x36d872(0x79)](),_0x1888a7(_0x492526[0x0][_0x36d872(0xa8)][0x0]));});_0x130556[_0x310286(0x94)](_0x4d3295,{'childList':!0x0,'subtree':!0x0});}[_0x4a6a1b(0x96)](_0x3abb48){const _0x28b13c=_0x4a6a1b;_0x3abb48[_0x28b13c(0x72)](_0x28b13c(0xa3),_0x4e8768=>{const _0x4519e1=_0x28b13c;this[_0x4519e1(0xa7)](_0x4519e1(0xa3),{'imageSrc':_0x4e8768[_0x4519e1(0x9c)][_0x4519e1(0x86)]});}),_0x3abb48[_0x28b13c(0x72)](_0x28b13c(0x7f),()=>{const _0x2139d0=_0x28b13c;this[_0x2139d0(0xa7)](_0x2139d0(0x7f));});}[_0x4a6a1b(0xa2)](){const _0x5490dd=_0x4a6a1b;this[_0x5490dd(0xa5)]['on'](_0x5490dd(0x9b),()=>{const _0x442a79=_0x5490dd;this[_0x442a79(0xa7)](_0x442a79(0x9b));});}}
23
+ const _0x27f768=_0x5728;(function(_0x57ecce,_0x478750){const _0x1fc541=_0x5728,_0x638aac=_0x57ecce();while(!![]){try{const _0x4ac570=-parseInt(_0x1fc541(0x158))/0x1+parseInt(_0x1fc541(0x14c))/0x2+-parseInt(_0x1fc541(0x15a))/0x3+parseInt(_0x1fc541(0x16b))/0x4+parseInt(_0x1fc541(0x14d))/0x5*(-parseInt(_0x1fc541(0x155))/0x6)+-parseInt(_0x1fc541(0x169))/0x7+parseInt(_0x1fc541(0x170))/0x8*(parseInt(_0x1fc541(0x153))/0x9);if(_0x4ac570===_0x478750)break;else _0x638aac['push'](_0x638aac['shift']());}catch(_0x1e82d7){_0x638aac['push'](_0x638aac['shift']());}}}(_0x57d0,0x70308));import{View as _0x3da3da}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x167be6}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0x140b96}from'./uploadcareimageeditformerrorview.js';function _0x57d0(){const _0x17d84b=['15277720uRVhWo','set','once','uploading','div','_items','change:status','error','add','cancel','ck-uploadcare-form','clear','_addErrorViewListeners','addEventListener','focus','nodeName','uc-cloud-image-editor','ready','36638snGbQF','2680045LELtEr','_loadingView','_focusableView','observe','detail','_editingView','9GslAMn','target','6uaIDSu','apply','disconnect','687808LDAlos','cdnUrl','784077EYkzfF','createCollection','render','querySelector','element','toLowerCase','getFocusableElement','ck-reset_all-excluded','addMany','_addUploadcareImageEditorListeners','_errorView','_setView','length','status','setTemplate','4842152QPKRRy','addedNodes','2833624NnLZmO','_waitForImageEditorComponent','filter','retry','fire'];_0x57d0=function(){return _0x17d84b;};return _0x57d0();}import{UploadcareImageEditFormEditingView as _0x3e0af8}from'./uploadcareimageeditformeditingview.js';function _0x5728(_0x5a1c23,_0x5b00c4){const _0x57d030=_0x57d0();return _0x5728=function(_0x572878,_0x1ad11a){_0x572878=_0x572878-0x14a;let _0x5917b1=_0x57d030[_0x572878];return _0x5917b1;},_0x5728(_0x5a1c23,_0x5b00c4);}import{DialogFocusManagerView as _0x2bdf5f}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x2bdf5f{[_0x27f768(0x175)];[_0x27f768(0x14e)];[_0x27f768(0x164)];[_0x27f768(0x152)];[_0x27f768(0x14f)];constructor(_0x3f90fe,_0xeb32b0,_0x50a612){const _0x36e5ad=_0x27f768;super(_0x3f90fe),this[_0x36e5ad(0x175)]=this[_0x36e5ad(0x15b)](),this[_0x36e5ad(0x14e)]=new _0x167be6(_0x3f90fe),this[_0x36e5ad(0x164)]=new _0x140b96(_0x3f90fe),this[_0x36e5ad(0x152)]=new _0x3e0af8(_0x3f90fe,_0x50a612),this[_0x36e5ad(0x14f)]=new _0x3da3da(_0x3f90fe),this[_0x36e5ad(0x14f)][_0x36e5ad(0x168)](this[_0x36e5ad(0x160)]()),this[_0x36e5ad(0x171)](_0x36e5ad(0x167),_0xeb32b0),this[_0x36e5ad(0x168)]({'tag':_0x36e5ad(0x174),'attributes':{'class':['ck',_0x36e5ad(0x161),_0x36e5ad(0x17a)],'tabindex':'-1'},'children':this[_0x36e5ad(0x175)]}),this[_0x36e5ad(0x165)](),this[_0x36e5ad(0x172)](_0x36e5ad(0x15c),()=>{const _0x779c51=_0x36e5ad;this[_0x779c51(0x16c)](this[_0x779c51(0x15e)],_0x34c43c=>{const _0x74ae54=_0x779c51;this[_0x74ae54(0x163)](_0x34c43c);});}),this['on'](_0x36e5ad(0x176),()=>{const _0x37b1db=_0x36e5ad;this[_0x37b1db(0x165)]();}),this[_0x36e5ad(0x17c)]();}[_0x27f768(0x17e)](){const _0x166a8b=_0x27f768;this[_0x166a8b(0x15e)][_0x166a8b(0x17e)]();}[_0x27f768(0x165)](){const _0xc7f058=_0x27f768;switch(this[_0xc7f058(0x175)][_0xc7f058(0x17b)](),this[_0xc7f058(0x167)]){case _0xc7f058(0x173):this[_0xc7f058(0x175)][_0xc7f058(0x178)](this[_0xc7f058(0x14e)]);break;case _0xc7f058(0x177):this[_0xc7f058(0x175)][_0xc7f058(0x178)](this[_0xc7f058(0x164)]);break;case _0xc7f058(0x14b):this[_0xc7f058(0x175)][_0xc7f058(0x162)]([this[_0xc7f058(0x152)],this[_0xc7f058(0x14f)]]);}}[_0x27f768(0x16c)](_0x487338,_0x1a3de6){const _0x32f463=_0x27f768,_0x2f9dcd=_0x32f463(0x14a),_0x4177b6=_0x487338[_0x32f463(0x15d)](_0x2f9dcd);if(_0x4177b6)return _0x1a3de6(_0x4177b6);const _0x41ab10=new MutationObserver(_0x1fbdfb=>{const _0x2daddd=_0x32f463,_0xcfc279=_0x1fbdfb[_0x2daddd(0x16d)](_0x212d29=>_0x212d29[_0x2daddd(0x154)]===_0x487338&&_0x212d29[_0x2daddd(0x16a)][_0x2daddd(0x166)]>0x0&&_0x212d29[_0x2daddd(0x16a)][0x0][_0x2daddd(0x17f)][_0x2daddd(0x15f)]()===_0x2f9dcd);_0xcfc279[_0x2daddd(0x166)]&&(_0x41ab10[_0x2daddd(0x157)](),_0x1a3de6(_0xcfc279[0x0][_0x2daddd(0x16a)][0x0]));});_0x41ab10[_0x32f463(0x150)](_0x487338,{'childList':!0x0,'subtree':!0x0});}[_0x27f768(0x163)](_0x2de669){const _0x37f6d6=_0x27f768;_0x2de669[_0x37f6d6(0x17d)](_0x37f6d6(0x156),_0x18d1c5=>{const _0x14bdfa=_0x37f6d6;this[_0x14bdfa(0x16f)](_0x14bdfa(0x156),{'imageSrc':_0x18d1c5[_0x14bdfa(0x151)][_0x14bdfa(0x159)]});}),_0x2de669[_0x37f6d6(0x17d)](_0x37f6d6(0x179),()=>{const _0x25b868=_0x37f6d6;this[_0x25b868(0x16f)](_0x25b868(0x179));});}[_0x27f768(0x17c)](){const _0x5ad512=_0x27f768;this[_0x5ad512(0x164)]['on'](_0x5ad512(0x16e),()=>{const _0x312017=_0x5ad512;this[_0x312017(0x16f)](_0x312017(0x16e));});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1f072f=_0x5618;(function(_0x3a2d57,_0x15b6ba){const _0x596107=_0x5618,_0x41febb=_0x3a2d57();while(!![]){try{const _0x2df252=-parseInt(_0x596107(0x1b4))/0x1*(parseInt(_0x596107(0x1bf))/0x2)+parseInt(_0x596107(0x1b5))/0x3+parseInt(_0x596107(0x1d1))/0x4+parseInt(_0x596107(0x1c2))/0x5+-parseInt(_0x596107(0x1b6))/0x6*(-parseInt(_0x596107(0x1b2))/0x7)+-parseInt(_0x596107(0x1ce))/0x8+parseInt(_0x596107(0x1b7))/0x9*(-parseInt(_0x596107(0x1c9))/0xa);if(_0x2df252===_0x15b6ba)break;else _0x41febb['push'](_0x41febb['shift']());}catch(_0x3bd21e){_0x41febb['push'](_0x41febb['shift']());}}}(_0x272d,0x3e6e3));import{Command as _0x3bfe72}from'ckeditor5/src/core.js';import{Dialog as _0x36eec0}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x3bf3ec}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x326973}from'../utils/editingutils.js';function _0x5618(_0x3082ab,_0x1097ea){const _0x272dd1=_0x272d();return _0x5618=function(_0x5618e1,_0x3a8ed7){_0x5618e1=_0x5618e1-0x1b2;let _0x5eb6dd=_0x272dd1[_0x5618e1];return _0x5eb6dd;},_0x5618(_0x3082ab,_0x1097ea);}function _0x272d(){const _0x160ed1=['24JciZUs','49887EzbTou','get','bind','refresh','isEnabled','getSelectedElement','element','_isEditable','248364xLimTS','requires','imageInline','859505qHJReb','set','editor','uploadcare.allowExternalImagesEditing','config','model','imageEditController','310Zeejjj','execute','plugins','unbind','selection','2354528MCIpnZ','imageBlock','document','105752yjONuH','312998txenvM','isActive','1dcllKB','1406553HZSZBs'];_0x272d=function(){return _0x160ed1;};return _0x272d();}export class UploadcareImageEditCommand extends _0x3bfe72{[_0x1f072f(0x1c8)];static get[_0x1f072f(0x1c0)](){return[_0x36eec0];}[_0x1f072f(0x1be)];constructor(_0x36e310){const _0x39c361=_0x1f072f;super(_0x36e310),this[_0x39c361(0x1c8)]=void 0x0,this[_0x39c361(0x1be)]=_0x326973(_0x36e310[_0x39c361(0x1c6)][_0x39c361(0x1b8)](_0x39c361(0x1c5))||[]),this[_0x39c361(0x1c3)]({'isActive':!0x1});}[_0x1f072f(0x1ba)](){const _0x1ae8b5=_0x1f072f,_0x18524a=this[_0x1ae8b5(0x1c4)][_0x1ae8b5(0x1c7)][_0x1ae8b5(0x1d0)][_0x1ae8b5(0x1cd)][_0x1ae8b5(0x1bc)]();this[_0x1ae8b5(0x1bb)]=this[_0x1ae8b5(0x1be)](_0x18524a);}[_0x1f072f(0x1ca)](){const _0x13c304=_0x1f072f;this[_0x13c304(0x1c8)]&&(this[_0x13c304(0x1cc)](_0x13c304(0x1b3)),this[_0x13c304(0x1c8)]=void 0x0);const _0x4dc3d9=this[_0x13c304(0x1c4)][_0x13c304(0x1c7)][_0x13c304(0x1d0)][_0x13c304(0x1cd)][_0x13c304(0x1bc)]();_0x4dc3d9&&(_0x4dc3d9['is'](_0x13c304(0x1bd),_0x13c304(0x1cf))||_0x4dc3d9['is'](_0x13c304(0x1bd),_0x13c304(0x1c1)))&&(this[_0x13c304(0x1c8)]=new _0x3bf3ec(this[_0x13c304(0x1c4)],this[_0x13c304(0x1c4)][_0x13c304(0x1cb)][_0x13c304(0x1b8)](_0x36eec0),_0x4dc3d9),this[_0x13c304(0x1b9)](_0x13c304(0x1b3))['to'](this[_0x13c304(0x1c8)],_0x13c304(0x1b3)));}}
23
+ const _0x36a755=_0x93e0;(function(_0x591443,_0xb3592f){const _0x5529d6=_0x93e0,_0x1b08e1=_0x591443();while(!![]){try{const _0x4c7347=-parseInt(_0x5529d6(0x7f))/0x1*(parseInt(_0x5529d6(0x88))/0x2)+-parseInt(_0x5529d6(0x95))/0x3+-parseInt(_0x5529d6(0x93))/0x4+-parseInt(_0x5529d6(0x8d))/0x5*(parseInt(_0x5529d6(0x7d))/0x6)+parseInt(_0x5529d6(0x77))/0x7+parseInt(_0x5529d6(0x81))/0x8*(-parseInt(_0x5529d6(0x84))/0x9)+parseInt(_0x5529d6(0x79))/0xa*(parseInt(_0x5529d6(0x80))/0xb);if(_0x4c7347===_0xb3592f)break;else _0x1b08e1['push'](_0x1b08e1['shift']());}catch(_0x5c2216){_0x1b08e1['push'](_0x1b08e1['shift']());}}}(_0x80b3,0xee82e));import{Command as _0x24d2bf}from'ckeditor5/src/core.js';function _0x80b3(){const _0x2dd9d6=['162xUIemw','imageInline','isEnabled','_isEditable','refresh','5gFPgwX','config','execute','imageBlock','imageEditController','get','6685632nZDUZT','model','1926564tMnQKh','unbind','uploadcare.allowExternalImagesEditing','1718094CnUxqG','editor','69670DCafAN','element','isActive','document','3980940ehLAfj','selection','9236SmHtxS','8822BOZfKb','565416QkObhQ','set','requires','144oIvJAC','bind','getSelectedElement','plugins'];_0x80b3=function(){return _0x2dd9d6;};return _0x80b3();}import{Dialog as _0x52ff66}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0xc42bbd}from'./ui/uploadcareimageeditcontroller.js';function _0x93e0(_0x3c348d,_0x3561a4){const _0x80b31b=_0x80b3();return _0x93e0=function(_0x93e04d,_0x1ab1be){_0x93e04d=_0x93e04d-0x76;let _0x1ab754=_0x80b31b[_0x93e04d];return _0x1ab754;},_0x93e0(_0x3c348d,_0x3561a4);}import{createEditabilityChecker as _0x3fa8f1}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x24d2bf{[_0x36a755(0x91)];static get[_0x36a755(0x83)](){return[_0x52ff66];}[_0x36a755(0x8b)];constructor(_0x2cb21e){const _0x5f134e=_0x36a755;super(_0x2cb21e),this[_0x5f134e(0x91)]=void 0x0,this[_0x5f134e(0x8b)]=_0x3fa8f1(_0x2cb21e[_0x5f134e(0x8e)][_0x5f134e(0x92)](_0x5f134e(0x76))||[]),this[_0x5f134e(0x82)]({'isActive':!0x1});}[_0x36a755(0x8c)](){const _0x5cded0=_0x36a755,_0x103677=this[_0x5cded0(0x78)][_0x5cded0(0x94)][_0x5cded0(0x7c)][_0x5cded0(0x7e)][_0x5cded0(0x86)]();this[_0x5cded0(0x8a)]=this[_0x5cded0(0x8b)](_0x103677);}[_0x36a755(0x8f)](){const _0x2e9f83=_0x36a755;this[_0x2e9f83(0x91)]&&(this[_0x2e9f83(0x96)](_0x2e9f83(0x7b)),this[_0x2e9f83(0x91)]=void 0x0);const _0x5305fa=this[_0x2e9f83(0x78)][_0x2e9f83(0x94)][_0x2e9f83(0x7c)][_0x2e9f83(0x7e)][_0x2e9f83(0x86)]();_0x5305fa&&(_0x5305fa['is'](_0x2e9f83(0x7a),_0x2e9f83(0x90))||_0x5305fa['is'](_0x2e9f83(0x7a),_0x2e9f83(0x89)))&&(this[_0x2e9f83(0x91)]=new _0xc42bbd(this[_0x2e9f83(0x78)],this[_0x2e9f83(0x78)][_0x2e9f83(0x87)][_0x2e9f83(0x92)](_0x52ff66),_0x5305fa),this[_0x2e9f83(0x85)](_0x2e9f83(0x7b))['to'](this[_0x2e9f83(0x91)],_0x2e9f83(0x7b)));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1e55fd=_0x51bb;function _0x2af3(){const _0xf8ecb0=['13135496cSCOQW','UploadcareImageEditEditing','commands','ImageUtils','3TOKnkI','151256IvUDgF','4513736QjffCw','1048438DCguPG','3332808SMYLrj','14513283zxeBZl','init','requires','60umjYTV','uploadcareImageReplace','ImageEditing','pluginName','isOfficialPlugin','1952599LXRmBI','add','isPremiumPlugin','90jJgBSM','5NbpRmi','uploadcareImageEdit'];_0x2af3=function(){return _0xf8ecb0;};return _0x2af3();}(function(_0x3e1b80,_0x46c6d3){const _0x11b04d=_0x51bb,_0x71e445=_0x3e1b80();while(!![]){try{const _0x3c1233=parseInt(_0x11b04d(0xbc))/0x1*(-parseInt(_0x11b04d(0xbf))/0x2)+-parseInt(_0x11b04d(0xc0))/0x3+parseInt(_0x11b04d(0xbe))/0x4*(parseInt(_0x11b04d(0xb6))/0x5)+parseInt(_0x11b04d(0xb5))/0x6*(parseInt(_0x11b04d(0xbd))/0x7)+parseInt(_0x11b04d(0xb8))/0x8+parseInt(_0x11b04d(0xc1))/0x9+parseInt(_0x11b04d(0xc4))/0xa*(-parseInt(_0x11b04d(0xc9))/0xb);if(_0x3c1233===_0x46c6d3)break;else _0x71e445['push'](_0x71e445['shift']());}catch(_0x32f951){_0x71e445['push'](_0x71e445['shift']());}}}(_0x2af3,0xe9fdf));import{Plugin as _0x4c0e36}from'ckeditor5/src/core.js';import{Notification as _0x25bcd2}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x2080ce}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x2f80de}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x33e29a}from'../uploadcareediting.js';function _0x51bb(_0x16a51d,_0x20078b){const _0x2af349=_0x2af3();return _0x51bb=function(_0x51bbb9,_0x3ad37c){_0x51bbb9=_0x51bbb9-0xb3;let _0x56d6b5=_0x2af349[_0x51bbb9];return _0x56d6b5;},_0x51bb(_0x16a51d,_0x20078b);}export class UploadcareImageEditEditing extends _0x4c0e36{static get[_0x1e55fd(0xc7)](){const _0x3da482=_0x1e55fd;return _0x3da482(0xb9);}static get[_0x1e55fd(0xc3)](){const _0x3f140a=_0x1e55fd;return[_0x33e29a,_0x25bcd2,_0x3f140a(0xbb),_0x3f140a(0xc6)];}static get[_0x1e55fd(0xc8)](){return!0x0;}static get[_0x1e55fd(0xb4)](){return!0x0;}[_0x1e55fd(0xc2)](){const _0x307031=_0x1e55fd,{editor:_0x25a498}=this;_0x25a498[_0x307031(0xba)][_0x307031(0xb3)](_0x307031(0xb7),new _0x2080ce(_0x25a498)),_0x25a498[_0x307031(0xba)][_0x307031(0xb3)](_0x307031(0xc5),new _0x2f80de(_0x25a498));}}
23
+ function _0x9b28(_0x8357ba,_0x1a1175){const _0x154cdc=_0x154c();return _0x9b28=function(_0x9b28af,_0x1c3ccf){_0x9b28af=_0x9b28af-0x166;let _0x1d6bc9=_0x154cdc[_0x9b28af];return _0x1d6bc9;},_0x9b28(_0x8357ba,_0x1a1175);}const _0x5eb04a=_0x9b28;function _0x154c(){const _0x438bb9=['requires','6169416VSEOct','7qWEeiu','pluginName','uploadcareImageEdit','isPremiumPlugin','6270080Dncjlp','ImageUtils','init','4609875ftSVcp','uploadcareImageReplace','12706821ZIQtoY','commands','isOfficialPlugin','add','2FwwCcE','ImageEditing','5LbsLOU','1407409MKoDYb','16089050XgePUW','UploadcareImageEditEditing','8926818YTEhMr'];_0x154c=function(){return _0x438bb9;};return _0x154c();}(function(_0x484b31,_0x51d5e5){const _0xef72c8=_0x9b28,_0x4ebf51=_0x484b31();while(!![]){try{const _0xbf6522=parseInt(_0xef72c8(0x174))/0x1+-parseInt(_0xef72c8(0x171))/0x2*(-parseInt(_0xef72c8(0x16b))/0x3)+parseInt(_0xef72c8(0x168))/0x4*(-parseInt(_0xef72c8(0x173))/0x5)+parseInt(_0xef72c8(0x177))/0x6*(-parseInt(_0xef72c8(0x17a))/0x7)+parseInt(_0xef72c8(0x179))/0x8+-parseInt(_0xef72c8(0x16d))/0x9+parseInt(_0xef72c8(0x175))/0xa;if(_0xbf6522===_0x51d5e5)break;else _0x4ebf51['push'](_0x4ebf51['shift']());}catch(_0x16ecf1){_0x4ebf51['push'](_0x4ebf51['shift']());}}}(_0x154c,0xd135c));import{Plugin as _0x1a4d36}from'ckeditor5/src/core.js';import{Notification as _0x24831a}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x4659af}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x56c801}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x1a0345}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x1a4d36{static get[_0x5eb04a(0x17b)](){const _0x3cdd70=_0x5eb04a;return _0x3cdd70(0x176);}static get[_0x5eb04a(0x178)](){const _0x59c058=_0x5eb04a;return[_0x1a0345,_0x24831a,_0x59c058(0x169),_0x59c058(0x172)];}static get[_0x5eb04a(0x16f)](){return!0x0;}static get[_0x5eb04a(0x167)](){return!0x0;}[_0x5eb04a(0x16a)](){const _0xd5a9d4=_0x5eb04a,{editor:_0x3b521d}=this;_0x3b521d[_0xd5a9d4(0x16e)][_0xd5a9d4(0x170)](_0xd5a9d4(0x166),new _0x4659af(_0x3b521d)),_0x3b521d[_0xd5a9d4(0x16e)][_0xd5a9d4(0x170)](_0xd5a9d4(0x16c),new _0x56c801(_0x3b521d));}}