@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251129.0 → 0.0.0-nightly-20251130.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/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x20fef7,Command as _0x252380}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x461cd9,IconGooglePhotos as _0x286a4b,IconGoogleDrive as _0x4dab0,IconFacebook as _0x95ae7b,IconDropbox as _0x54af93,IconUploadcareLink as _0x2af3a1,IconUploadcareImageUpload as _0x24b477,IconError as _0x71f2d3,IconUploadcareImageEdit as _0x2e734e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x166585,MenuBarMenuListItemButtonView as _0x1ad5fb,View as _0x168403,FocusCycler as _0x25b54f,Dialog as _0x289807,DialogViewPosition as _0x59eb6a,SpinnerView as _0x1fdc1f,IconView as _0x1d7b20,Notification as _0x2654f3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x58f0e2,DomEmitterMixin as _0x323d1a,global as _0x1424b6,getAncestors as _0x54da65,ObservableMixin as _0xf74261,uid as _0x484902,createElement as _0x62c1a3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x138367}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x48d7e6,info as _0x3c3b62}from'@uploadcare/upload-client';import*as _0x4fc6b from'@uploadcare/file-uploader';var i=function(_0x328e9d){return _0x328e9d['Local']='local',_0x328e9d['URL']='url',_0x328e9d['Dropbox']='dropbox',_0x328e9d['GDrive']='gdrive',_0x328e9d['Facebook']='facebook',_0x328e9d['GPhotos']='gphotos',_0x328e9d['OneDrive']='onedrive',_0x328e9d;}({});function _(_0x1c98ed,_0x14e7b6,_0xc4a2c8){const t=_0x1c98ed['t'],_0x486bda=_0x1c98ed['t'];switch(_0x14e7b6){case i['Local']:return{'text':_0x486bda('Insert'===_0xc4a2c8?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x486bda('From\x20computer')};case i['URL']:return{'text':'Insert'===_0xc4a2c8?_0x486bda('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x486bda('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x14e7b6;}}class e extends _0x20fef7{['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 _0x12b686=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x48659f;for(const _0x461e70 in _0x12b686){const _0x28b623=_0x461e70,_0x665365=_0x12b686[_0x28b623];if('uploadcareLicenseKeyValid'==_0x665365||'uploadcareLicenseKeyInvalid'==_0x665365||'uploadcareLicenseKeyExpired'==_0x665365||'uploadcareLicenseKeyDomainLimit'==_0x665365||'uploadcareLicenseKeyNotAllowed'==_0x665365||'uploadcareLicenseKeyEvaluationLimit'==_0x665365||'uploadcareLicenseKeyTrialLimit'==_0x665365||'uploadcareLicenseKeyUsageLimit'==_0x665365){delete _0x12b686[_0x28b623],_0x48659f=_0x665365,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x48659f&&_0x12b686['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x48659f&&_0x12b686['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x48659f&&_0x12b686['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x48659f&&_0x12b686['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x48659f&&_0x12b686['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x48659f&&_0x12b686['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x48659f&&_0x12b686['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0xeabdd2}=this,_0xeb4009=_0xeabdd2['commands']['get']('uploadcare');if(!_0xeb4009)return;const _0x4086b9=this['_normalizeConfigSourceList'](_0xeabdd2['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4a6f42,_0x5034ab)=>{const _0x731afe=this['_getIntegrationKey'](_0x5034ab['type']);return _0x4a6f42[_0x731afe]||(_0x4a6f42[_0x731afe]=[]),_0x4a6f42[_0x731afe]['push'](_0x5034ab),_0x4a6f42;},{});_0xeabdd2['plugins']['has']('ImageInsertUI')&&_0xeabdd2['commands']['get']('uploadcare')&&Object['entries'](_0x4086b9)['forEach'](([_0x47f5c1,_0x24e5a9])=>{_0xeabdd2['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x47f5c1,'observable':()=>_0xeb4009,'buttonViewCreator':()=>this['_createToolbarButton'](_0x24e5a9),'formViewCreator':()=>this['_createDropdownButtons'](_0x24e5a9),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x24e5a9),'override':'assetManager'!==_0x47f5c1});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x43d232){const {locale:_0x264026}=this['editor'];return _0x43d232['map'](_0x1a9700=>{const _0x361fff=_(_0x264026,_0x1a9700,'Insert');switch(_0x1a9700){case i['Local']:return{'icon':_0x24b477,'type':i['Local'],..._0x361fff};case i['URL']:return{'icon':_0x2af3a1,'type':i['URL'],..._0x361fff};case i['Dropbox']:return{'icon':_0x54af93,'type':i['Dropbox'],..._0x361fff};case i['Facebook']:return{'icon':_0x95ae7b,'type':i['Facebook'],..._0x361fff};case i['GDrive']:return{'icon':_0x4dab0,'type':i['GDrive'],..._0x361fff};case i['GPhotos']:return{'icon':_0x286a4b,'type':i['GPhotos'],..._0x361fff};case i['OneDrive']:return{'icon':_0x461cd9,'type':i['OneDrive'],..._0x361fff};}});}['_getIntegrationKey'](_0x344d30){switch(_0x344d30){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x46ce00,_0x5df03d){const _0x5e4030=this['editor'],_0x4e6f93=new _0x46ce00(_0x5e4030['locale']),_0x3225bf=_0x5e4030['commands']['get']('uploadcare');return _0x4e6f93['bind']('isEnabled')['to'](_0x3225bf),_0x4e6f93['on']('execute',()=>{_0x3225bf['execute'](_0x5df03d);}),_0x4e6f93;}['_createToolbarButton'](_0x2997ee){const {locale:_0x3ffdd2}=this['editor'],_0x18dbe3=this['editor']['plugins']['get']('ImageInsertUI'),_0x15496c=_0x2997ee[0x0],_0x2a96be=this['_createButton'](_0x166585,_0x15496c['type']);return _0x2a96be['icon']=_0x15496c['icon'],_0x2a96be['bind']('label')['to'](_0x18dbe3,'isImageSelected',_0x3a7ba7=>_(_0x3ffdd2,_0x15496c['type'],_0x3a7ba7?'Replace':'Insert')['text']),_0x2a96be['tooltip']=!0x0,_0x2a96be;}['_createDropdownButtons'](_0x59843b){const {locale:_0x36ad6b}=this['editor'],_0x3a5f34=this['editor']['plugins']['get']('ImageInsertUI');return _0x59843b['map'](_0x2e7287=>{const _0x47bd01=this['_createButton'](_0x166585,_0x2e7287['type']);return _0x47bd01['withText']=!0x0,_0x47bd01['icon']=_0x2e7287['icon'],_0x47bd01['bind']('label')['to'](_0x3a5f34,'isImageSelected',_0x3db811=>_(_0x36ad6b,_0x2e7287['type'],_0x3db811?'Replace':'Insert')['text']),_0x47bd01;});}['_createMenuBarButtons'](_0x5e8d78){return _0x5e8d78['map'](_0x5caeb5=>{const _0x32ebcc=this['_createButton'](_0x1ad5fb,_0x5caeb5['type']);return _0x32ebcc['icon']=_0x5caeb5['icon'],_0x32ebcc['label']=_0x5caeb5['shortText'],_0x32ebcc;});}}class F extends _0x168403{['focusTracker'];['focusCycler'];constructor(_0x2e592e){super(_0x2e592e),this['focusTracker']=new _0x58f0e2(),this['focusCycler']=new _0x25b54f({'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(_0x26f942,_0x31008a){super(_0x26f942),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-'+_0x31008a}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x375325,_0x1a7063){const _0x23572d=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x36f375=>_0x36f375<=_0x1a7063)['map'](_0x586b2f=>_0x375325['replace'](/\/$/,'')+'/-/resize/'+_0x586b2f+'x/\x20'+_0x586b2f+'w');return{'imageFallbackUrl':_0x375325,'imageSources':[{'srcset':_0x23572d['join'](',\x20'),'sizes':'(max-width:\x20'+_0x1a7063+'px)\x20100vw,\x20'+_0x1a7063+'px','type':'image/webp'}]};}function S(_0x269143,_0x1bcd55,_0xb7451b){const _0x3e5b13=_0x269143['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3e5b13?parseInt(_0x3e5b13[0x1],0xa):_0x1bcd55,'height':_0x3e5b13?parseInt(_0x3e5b13[0x2],0xa):_0xb7451b};}function p(_0x4208ca,_0x5e8eeb){const _0x382053=new(_0x323d1a())(),_0x3952c0=_0x4208ca['plugins']['get']('ImageUtils'),_0x348318=_0x4208ca['editing']['mapper']['toViewElement'](_0x5e8eeb),_0x3c2045=_0x3952c0['findViewImgElement'](_0x348318),_0x58881f=_0x4208ca['editing']['view']['domConverter']['viewToDom'](_0x3c2045),_0x508375=_0x5e8eeb['getAttribute']('width'),_0x308ffa=_0x5e8eeb['getAttribute']('height'),_0x235f1b='image-processing';_0x4208ca['editing']['view']['change'](_0x38536a=>{_0x38536a['addClass'](_0x235f1b,_0x348318),_0x38536a['setStyle']('aspect-ratio',_0x508375+'/'+_0x308ffa,_0x3c2045);}),_0x382053['listenTo'](_0x58881f,'load',()=>{_0x382053['stopListening'](_0x58881f,'load'),_0x4208ca['editing']['view']['change'](_0x27f22f=>{_0x27f22f['removeClass'](_0x235f1b,_0x348318),_0x27f22f['removeStyle']('aspect-ratio',_0x3c2045);});});}function G(_0x313861){if(Array['isArray'](_0x313861)){const _0x4c8148=_0x313861['map'](G);return _0x47e8ec=>_0x4c8148['some'](_0x54e8ac=>_0x54e8ac(_0x47e8ec));}if('origin'==_0x313861){const _0x512d0e=_0x1424b6['window']['location']['origin'];return _0x43c0dc=>new URL(_0x43c0dc,_0x1424b6['document']['baseURI'])['origin']==_0x512d0e;}return'function'==typeof _0x313861?_0x313861:_0x313861 instanceof RegExp?_0x9c4f3d=>!(!_0x9c4f3d['match'](_0x313861)&&!_0x9c4f3d['replace'](/^https?:\/\//,'')['match'](_0x313861)):()=>!0x1;}function A(_0x11f9e6,_0x1f006d){return _0x54da65(_0x11f9e6['target'])['includes'](_0x1f006d);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0xf74261(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x15262d,_0x3467f9,_0x266d00){super(),this['_editor']=_0x15262d,this['_editing']=_0x3467f9,this['_dialog']=_0x15262d['plugins']['get'](_0x289807),this['_api']=_0x3467f9['ctxElement']['getAPI'](),this['_type']=_0x266d00,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:_0x3a4b4e,model:_0x41e4aa}=this['_editor'],_0x281e98=_0x41e4aa['document']['selection']['getSelectedElement'](),_0x170376=_0x281e98&&(_0x281e98['is']('element','imageBlock')||_0x281e98['is']('element','imageInline'));this['_formView']=new x(_0x3a4b4e,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x24b477,'title':_(_0x3a4b4e,this['_type'],_0x170376?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x59eb6a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x305195=>!A(_0x305195,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x4e1b4}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4ebecf=>{const _0x46b56c=_0x4e1b4['length'];for(const _0x412b8f of _0x4e1b4){const _0x14eac4=_0x412b8f===_0x4e1b4[_0x46b56c-0x1],{cdnUrl:_0x39c697,fileInfo:_0x4ecd3a}=_0x412b8f;if(!_0x39c697||!_0x4ecd3a)continue;const {width:_0x41c240,height:_0x1902e3}=_0x4ecd3a['imageInfo'],_0xd088cb=S(_0x39c697,_0x41c240,_0x1902e3),_0x20d364=C(_0x39c697,_0xd088cb['width']),_0x59eb5c={'id':_0x4ecd3a['uuid'],'type':'image','attributes':{'imageDimension':_0xd088cb,..._0x20d364}};this['_insertAsset'](_0x59eb5c,_0x14eac4,_0x4ebecf);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x15507e=>{'idle'===_0x15507e['detail']['status']&&!_0x15507e['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x458b13,_0x52def5,_0x4de6da){const _0x3b980e=this['_editor']['model']['document']['selection'],_0xb4d778=_0x3b980e['getSelectedElement'](),_0x3b2752=!(!_0xb4d778||!_0xb4d778['is']('element','imageInline'));_0x4de6da['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x458b13,_0x3b2752),_0x52def5||_0x4de6da['setSelection'](_0x3b980e['getLastPosition']());}['_insertImage'](_0x1063a6,_0x207ffc){const _0x5851d4=this['_editor'],{imageDimension:_0x1cf5e6,imageFallbackUrl:_0x4b886a,imageSources:_0x5c1c6}=_0x1063a6['attributes'];_0x5851d4['execute']('insertImage',{'imageType':_0x207ffc?'imageInline':null,'source':{'uploadcareImageId':_0x1063a6['id'],'src':_0x4b886a,'sources':_0x5c1c6,..._0x1cf5e6}});}}class w extends _0x252380{['_editing'];['_controller']=null;static get['requires'](){return[_0x289807,o];}constructor(_0x5b2e6a){super(_0x5b2e6a),this['_editing']=_0x5b2e6a['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x25d175){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x25d175);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x5ba274,..._0x113e8c}){return _0x48d7e6(_0x5ba274,_0x113e8c);}static['getInfo'](_0x332ca1,_0x532ba0){return _0x3c3b62(_0x332ca1,_0x532ba0);}}class f extends _0x20fef7{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x138367,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x11708c=this['editor'];if(!!!_0x11708c['config']['get']('uploadcare'))return;_0x11708c['plugins']['get'](_0x138367)['createUploadAdapter']=_0x4649c9=>new k(_0x4649c9,_0x11708c),_0x11708c['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x1dca1d,{imageElement:_0x2ccee3,data:_0x50d893})=>{_0x11708c['model']['change'](_0x3165f6=>{_0x3165f6['setAttribute']('uploadcareImageId',_0x50d893['uploadcareImageId'],_0x2ccee3);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x4f318a,_0x1d6897){this['loader']=_0x4f318a,this['editor']=_0x1d6897,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0xb7e544=await this['loader']['file'];return j['upload']({'file':_0xb7e544,'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':_0x1e1e3d=>{_0x1e1e3d&&_0x1e1e3d['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x1e1e3d['value']);}})['then'](async _0x373240=>{const {imageFallbackUrl:_0x221614,imageSources:_0xcf459}=C(_0x373240['cdnUrl'],_0x373240['imageInfo']['width']);return{'uploadcareImageId':_0x373240['uuid'],'default':_0x221614,'sources':_0xcf459};})['catch'](()=>{const _0x4893db=t('Cannot\x20upload\x20file:')+('\x20'+_0xb7e544['name']+'.');return Promise['reject'](_0x4893db);});}['abort'](){this['controller']['abort']();}}class o extends _0x20fef7{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x289807];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x4606bf){super(_0x4606bf),this['ucContextId']=_0x484902();}['init'](){const _0x55d78b=this['editor'];_0x55d78b['commands']['add']('uploadcare',new w(_0x55d78b));}['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 _0x29602d=_0x1424b6['document']['querySelector']('input[uploadcare-file-input]');_0x29602d&&_0x29602d['remove']();}),async function(_0x4cccb1){const _0x361c58=_0x24e524([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]),_0x48843c=0x535f8c3a,_0x2604e1=0x5358f642^_0x48843c,_0x132163=window[_0x24e524([0x44,0x61,0x74,0x65])][_0x24e524([0x6e,0x6f,0x77])](),_0x9fba3c=_0x4cccb1[_0x24e524([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xc8ed69=new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x513c40=>{_0x9fba3c[_0x24e524([0x6f,0x6e,0x63,0x65])](_0x24e524([0x72,0x65,0x61,0x64,0x79]),_0x513c40);}),_0x5d1f90={[_0x24e524([0x6b,0x74,0x79])]:_0x24e524([0x45,0x43]),[_0x24e524([0x75,0x73,0x65])]:_0x24e524([0x73,0x69,0x67]),[_0x24e524([0x63,0x72,0x76])]:_0x24e524([0x50,0x2d,0x32,0x35,0x36]),[_0x24e524([0x78])]:_0x24e524([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]),[_0x24e524([0x79])]:_0x24e524([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]),[_0x24e524([0x61,0x6c,0x67])]:_0x24e524([0x45,0x53,0x32,0x35,0x36])},_0x2c3993=_0x9fba3c[_0x24e524([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x24e524([0x67,0x65,0x74])](_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x561ba0(){let _0x485a39,_0x54df64=null,_0x90be0=null;try{if(_0x2c3993==_0x24e524([0x47,0x50,0x4c]))return _0x24e524([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x485a39=_0x423a8c(),!_0x485a39)return _0x24e524([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x485a39[_0x24e524([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x90be0=_0x486ad7(_0x485a39[_0x24e524([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x485a39[_0x24e524([0x6a,0x74,0x69])])),await _0x4d5f69()?_0x2269ed()?_0x50f8bb()?_0x24e524([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x394d81()?(_0x485a39[_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x24e524([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x54df64=_0x19e8eb(_0x24e524([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x485a39[_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x24e524([0x74,0x72,0x69,0x61,0x6c])&&(_0x54df64=_0x19e8eb(_0x24e524([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1f2a13()):_0x24e524([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x24e524([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x24e524([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x24e524([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x50f8bb(){const _0x49b66a=[_0x24e524([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x24e524([0x74,0x72,0x69,0x61,0x6c])][_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x485a39[_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x132163/0x3e8:0xe10*_0x2604e1;return _0x485a39[_0x24e524([0x65,0x78,0x70])]<_0x49b66a;}function _0x2269ed(){const _0x4c610=_0x485a39[_0x24e524([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4c610&&(!!_0x4c610[_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24e524([0x2a]))||!!_0x4c610[_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24e524([0x55,0x50,0x4c,0x43])));}function _0x394d81(){const _0x361d3e=_0x485a39[_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x361d3e||0x0==_0x361d3e[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5034c6}=new URL(window[_0x24e524([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x361d3e[_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5034c6))return!0x0;const _0x46464b=_0x5034c6[_0x24e524([0x73,0x70,0x6c,0x69,0x74])](_0x24e524([0x2e]));return _0x361d3e[_0x24e524([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x41a904=>_0x41a904[_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24e524([0x2a])))[_0x24e524([0x6d,0x61,0x70])](_0x4d9b74=>_0x4d9b74[_0x24e524([0x73,0x70,0x6c,0x69,0x74])](_0x24e524([0x2e])))[_0x24e524([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x188e1c=>_0x188e1c[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x46464b[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24e524([0x6d,0x61,0x70])](_0x6b6f4f=>Array(_0x46464b[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x6b6f4f[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24e524([0x66,0x69,0x6c,0x6c])](_0x6b6f4f[0x0]===_0x24e524([0x2a])?_0x24e524([0x2a]):'')[_0x24e524([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x6b6f4f))[_0x24e524([0x73,0x6f,0x6d,0x65])](_0x4b9f59=>_0x46464b[_0x24e524([0x65,0x76,0x65,0x72,0x79])]((_0x59ba85,_0x319302)=>_0x4b9f59[_0x319302]===_0x59ba85||_0x4b9f59[_0x319302]===_0x24e524([0x2a])));}function _0x1f2a13(){return _0x54df64&&_0x90be0?new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x542b57,_0x2cff7d)=>{_0x54df64[_0x24e524([0x74,0x68,0x65,0x6e])](_0x542b57,_0x2cff7d),_0x90be0[_0x24e524([0x74,0x68,0x65,0x6e])](_0x35e7e0=>{_0x35e7e0!=_0x24e524([0x56,0x61,0x6c,0x69,0x64])&&_0x542b57(_0x35e7e0);},_0x2cff7d);}):_0x54df64||_0x90be0||_0x24e524([0x56,0x61,0x6c,0x69,0x64]);}}function _0x486ad7(_0x3fee39,_0x35692f){return new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xef874d=>{if(_0x313c53())return _0xef874d(_0x24e524([0x56,0x61,0x6c,0x69,0x64]));_0x2df828(),_0x9fba3c[_0x24e524([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x24e524([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x230e55=!0x1;const _0x31bdbb=_0x484902();function _0x116db3(_0x35994a){return!!_0x35994a&&(typeof _0x35994a===_0x24e524([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x35994a===_0x24e524([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x35994a[_0x24e524([0x74,0x68,0x65,0x6e])]===_0x24e524([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x35994a[_0x24e524([0x63,0x61,0x74,0x63,0x68])]===_0x24e524([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x59c99f(_0x15ad18){_0x1df03a(_0x15ad18)[_0x24e524([0x74,0x68,0x65,0x6e])](_0x4030fd=>{if(!_0x4030fd||_0x4030fd[_0x24e524([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x24e524([0x6f,0x6b]))return _0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4fa581(_0x45cefa(_0x31bdbb+_0x35692f))!=_0x4030fd[_0x24e524([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x24e524([0x56,0x61,0x6c,0x69,0x64]);})[_0x24e524([0x74,0x68,0x65,0x6e])](_0x5347e0=>(_0x2107a6(),_0x5347e0),()=>{const _0x184c4b=_0x393939();return null==_0x184c4b?(_0x2107a6(),_0x24e524([0x56,0x61,0x6c,0x69,0x64])):_0x24e524(_0x132163-_0x184c4b>(0x7753083a^_0x48843c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x24e524([0x74,0x68,0x65,0x6e])](_0xef874d)[_0x24e524([0x63,0x61,0x74,0x63,0x68])](()=>{_0xef874d(_0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x41936a=0x536962ba^_0x48843c;function _0x2107a6(){const _0x219bd1=_0x24e524([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fa581(_0x45cefa(_0x3fee39)),_0x327a40=_0x9a9943(_0x4fa581(window[_0x24e524([0x4d,0x61,0x74,0x68])][_0x24e524([0x63,0x65,0x69,0x6c])](_0x132163/_0x41936a)));window[_0x24e524([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24e524([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x219bd1,_0x327a40);}function _0x393939(){const _0x3cda99=_0x24e524([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fa581(_0x45cefa(_0x3fee39)),_0x25fd87=window[_0x24e524([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24e524([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3cda99);return _0x25fd87?window[_0x24e524([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x9a9943(_0x25fd87),0x10)*_0x41936a:null;}function _0x1df03a(_0x215ab3){return new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x10aff5,_0x115147)=>{_0x215ab3[_0x24e524([0x74,0x68,0x65,0x6e])](_0x10aff5,_0x115147),window[_0x24e524([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x115147,0x535e58fa^_0x48843c);});}}_0x9fba3c[_0x24e524([0x6f,0x6e])](_0x24e524([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xee59fe,_0x13b26f)=>{if(_0x13b26f[0x0]!=_0x3fee39)return _0xef874d(_0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x13b26f[0x1]={..._0x13b26f[0x1],[_0x24e524([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x31bdbb};},{[_0x24e524([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24e524([0x68,0x69,0x67,0x68])}),_0x9fba3c[_0x24e524([0x6f,0x6e])](_0x24e524([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x122a53=>{_0x116db3(_0x122a53[_0x24e524([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x230e55=!0x0,_0x59c99f(_0x122a53[_0x24e524([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x24e524([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24e524([0x6c,0x6f,0x77])}),_0xc8ed69[_0x24e524([0x74,0x68,0x65,0x6e])](()=>{_0x230e55||_0xef874d(_0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x313c53(){return _0x9fba3c[_0x24e524([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24e524([0x76,0x69,0x65,0x77])][_0x24e524([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x24e524([0x61,0x75,0x74,0x6f]);}function _0x2df828(){_0x9fba3c[_0x24e524([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24e524([0x76,0x69,0x65,0x77])][_0x24e524([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x24e524([0x61,0x75,0x74,0x6f]);}}function _0x19e8eb(_0x4532df){const _0x2b863c=[new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f9d07=>setTimeout(_0x3f9d07,0x5356b2f6^_0x48843c)),_0xc8ed69[_0x24e524([0x74,0x68,0x65,0x6e])](()=>new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a1160=>{let _0x5a084c=0x0;_0x9fba3c[_0x24e524([0x6d,0x6f,0x64,0x65,0x6c])][_0x24e524([0x6f,0x6e])](_0x24e524([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3411fc,_0x364280)=>{_0x364280[0x0][_0x24e524([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5a084c++,_0x5a084c==(0x535f8dc2^_0x48843c)&&(_0x2a1160(),_0x3411fc[_0x24e524([0x6f,0x66,0x66])]());});}))];return window[_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x24e524([0x72,0x61,0x63,0x65])](_0x2b863c)[_0x24e524([0x74,0x68,0x65,0x6e])](()=>_0x4532df);}async function _0x1e796e(){await _0xc8ed69,_0x9fba3c[_0x24e524([0x6d,0x6f,0x64,0x65,0x6c])][_0x24e524([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x45848c,_0x9fba3c[_0x24e524([0x6d,0x6f,0x64,0x65,0x6c])][_0x24e524([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x45848c,_0x9fba3c[_0x24e524([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x24e524([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1c70df(_0x3ed093){const _0x3c6567=_0x49e090();_0x9fba3c[_0x3c6567]=_0x24e524([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3ed093,_0x3ed093!=_0x24e524([0x56,0x61,0x6c,0x69,0x64])&&_0x1e796e();}function _0x49e090(){const _0x3f1692=window[_0x24e524([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x24e524([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x24e524([0x6e,0x6f,0x77])]())[_0x24e524([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x24e524([0x2e]),'');let _0x226695=_0x24e524([0x68]);for(let _0xc985cf=0x0;_0xc985cf<_0x3f1692[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xc985cf+=0x2){let _0x5097d8=window[_0x24e524([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f1692[_0x24e524([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc985cf,_0xc985cf+0x2));_0x5097d8>=_0x361c58[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5097d8-=_0x361c58[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x226695+=_0x361c58[_0x5097d8];}return _0x226695;}function _0x423a8c(){const _0x4854fd=_0x2c3993[_0x24e524([0x73,0x70,0x6c,0x69,0x74])](_0x24e524([0x2e]));if(0x3!=_0x4854fd[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x555d87(_0x4854fd[0x1]);function _0x555d87(_0x5a9141){const _0x5ad944=_0x2298fe(_0x5a9141);return _0x5ad944&&_0x55a1af()?_0x5ad944:null;function _0x55a1af(){const _0x487332=_0x5ad944[_0x24e524([0x6a,0x74,0x69])],_0x3759cd=window[_0x24e524([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x487332[_0x24e524([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x487332[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x225164={..._0x5ad944,[_0x24e524([0x6a,0x74,0x69])]:_0x487332[_0x24e524([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x487332[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x225164[_0x24e524([0x76,0x63])],_0x45cefa(_0x225164)==_0x3759cd;}}}async function _0x4d5f69(){let _0x2d7b28=!0x0;try{const _0x283103=_0x2c3993[_0x24e524([0x73,0x70,0x6c,0x69,0x74])](_0x24e524([0x2e])),[_0x1d7081,_0x32818a,_0x80ba7e]=_0x283103;return _0x2cc9ae(_0x1d7081),await _0x338e68(_0x1d7081,_0x32818a,_0x80ba7e),_0x2d7b28;}catch{return!0x1;}function _0x2cc9ae(_0x6ce263){const _0x5c7e85=_0x2298fe(_0x6ce263);_0x5c7e85&&_0x5c7e85[_0x24e524([0x61,0x6c,0x67])]==_0x24e524([0x45,0x53,0x32,0x35,0x36])||(_0x2d7b28=!0x1);}async function _0x338e68(_0x117dc4,_0x750941,_0x2fed33){const _0x4e472a=window[_0x24e524([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x24e524([0x66,0x72,0x6f,0x6d])](_0x2836bb(_0x2fed33),_0x2bd57f=>_0x2bd57f[_0x24e524([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x197643=new window[(_0x24e524([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x24e524([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x117dc4+_0x24e524([0x2e])+_0x750941),_0x1d4822=window[_0x24e524([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x24e524([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1d4822)return;const _0x587456=await _0x1d4822[_0x24e524([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x24e524([0x6a,0x77,0x6b]),_0x5d1f90,{[_0x24e524([0x6e,0x61,0x6d,0x65])]:_0x24e524([0x45,0x43,0x44,0x53,0x41]),[_0x24e524([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x24e524([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x24e524([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1d4822[_0x24e524([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x24e524([0x6e,0x61,0x6d,0x65])]:_0x24e524([0x45,0x43,0x44,0x53,0x41]),[_0x24e524([0x68,0x61,0x73,0x68])]:{[_0x24e524([0x6e,0x61,0x6d,0x65])]:_0x24e524([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x587456,_0x4e472a,_0x197643)||(_0x2d7b28=!0x1);}}function _0x2298fe(_0x53a80f){return _0x53a80f[_0x24e524([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x24e524([0x65,0x79]))?JSON[_0x24e524([0x70,0x61,0x72,0x73,0x65])](_0x2836bb(_0x53a80f)):null;}function _0x2836bb(_0x52ff34){return window[_0x24e524([0x61,0x74,0x6f,0x62])](_0x52ff34[_0x24e524([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x24e524([0x2b]))[_0x24e524([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x24e524([0x2f])));}function _0x45cefa(_0x14b4c1){let _0x36617a=0x1505;function _0x47aad9(_0x51bb68){for(let _0x5229d7=0x0;_0x5229d7<_0x51bb68[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5229d7++){const _0x2f0394=_0x51bb68[_0x24e524([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5229d7);_0x36617a=(_0x36617a<<0x5)+_0x36617a+_0x2f0394,_0x36617a&=_0x36617a;}}function _0x20fb95(_0x145319){Array[_0x24e524([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x145319)?_0x145319[_0x24e524([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x20fb95):_0x145319&&typeof _0x145319==_0x24e524([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x24e524([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x145319)[_0x24e524([0x73,0x6f,0x72,0x74])]()[_0x24e524([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x15f71e,_0x1cc195])=>{_0x47aad9(_0x15f71e),_0x20fb95(_0x1cc195);}):_0x47aad9(window[_0x24e524([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x145319));}return _0x20fb95(_0x14b4c1),_0x36617a>>>0x0;}function _0x4fa581(_0x1cf23f){return _0x1cf23f[_0x24e524([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x24e524([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x24e524([0x30]));}function _0x9a9943(_0x3a9144){return _0x3a9144[_0x24e524([0x73,0x70,0x6c,0x69,0x74])]('')[_0x24e524([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x24e524([0x6a,0x6f,0x69,0x6e])]('');}function _0x45848c(){}function _0x24e524(_0x1429f1){return _0x1429f1['map'](_0x339c63=>String['fromCharCode'](_0x339c63))['join']('');}_0x1c70df(await _0x561ba0());}(this);}['_initSchema'](){const _0x11571c=this['editor']['model']['schema'];_0x11571c['isRegistered']('imageBlock')&&_0x11571c['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x11571c['isRegistered']('imageInline')&&_0x11571c['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5b5be0=this['editor'];_0x5b5be0['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5b5be0['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x1a44a9=>_0x1a44a9['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x120d57=_0x5b5be0['commands']['get']('replaceImageSource');_0x120d57&&this['listenTo'](_0x120d57,'cleanupImage',(_0x3e9b85,[_0x2d1838,_0x171460])=>{_0x2d1838['removeAttribute']('uploadcareImageId',_0x171460);});}['_initConfig'](){const _0x5abc1c=this['editor']['config']['get']('uploadcare.uploader')||{},_0x2d7649=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x62c1a3(_0x1424b6['document'],'uc-config',{..._0x5abc1c,'pubkey':_0x2d7649,'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']=_0x4b4e9e=>{if('closeMax'==_0x4b4e9e)return'#uc-icon-arrow-down';},_0x1424b6['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x62c1a3(_0x1424b6['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x1424b6['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x2ab3e4=this['editor']['commands']['get']('insertImage');_0x2ab3e4&&this['listenTo'](_0x2ab3e4,'execute',()=>{const _0x59ec4e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x59ec4e&&_0x59ec4e['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x59ec4e);});});const _0x346fa2=this['editor']['commands']['get']('uploadcareImageReplace');_0x346fa2&&this['listenTo'](_0x346fa2,'execute',()=>{const _0x14512f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x14512f&&_0x14512f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x14512f);});});}}class tt extends _0x20fef7{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49aa97){super(_0x49aa97),_0x49aa97['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4fc6b['defineComponents'](_0x4fc6b),this['_defineLocale']();}['_defineLocale'](){const _0x1a9c32=this['editor']['config']['get']('uploadcare.locale'),_0x81a527=this['editor']['locale']['contentLanguage'];_0x1a9c32&&_0x4fc6b['defineLocale'](_0x81a527,_0x1a9c32);}}class ii extends _0x168403{constructor(_0x2d46f0){super(_0x2d46f0);const t=_0x2d46f0['t'],_0x2c3b75=this['bindTemplate'],_0x20a3ba=new _0x1fdc1f();_0x20a3ba['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':[_0x20a3ba,{'text':_0x2c3b75['to']('imageUploadProgress',_0x5824b3=>t('Loading\x20image...')+'\x20('+(_0x5824b3||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 _0x168403{constructor(_0x304fa3){super(_0x304fa3);const t=_0x304fa3['t'];this['set']('errorType',null);const _0x252c13=new _0x166585(_0x304fa3);_0x252c13['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x252c13['withText']=!0x0,_0x252c13['class']='ck-button-action',_0x252c13['on']('execute',()=>{this['fire']('retry');}),_0x252c13['bind']('isVisible')['to'](this,'errorType',_0x702a53=>'NotFound'!==_0x702a53);const _0xed99a1=new _0x1d7b20();_0xed99a1['content']=_0x71f2d3,_0xed99a1['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x33cc6e=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':[_0xed99a1,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x33cc6e['to']('errorType',_0x42b742=>t('NotFound'!==_0x42b742?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x252c13]},{'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 _0x168403{constructor(_0x27a73c,_0x535a49){super(_0x27a73c);const _0x2bd2d6=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x535a49,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2bd2d6['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0xc7d875,_0x7d6f24,_0x10b0b4){super(_0xc7d875),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0xc7d875),this['_errorView']=new ti(_0xc7d875),this['_editingView']=new ei(_0xc7d875,_0x10b0b4),this['_focusableView']=new _0x168403(_0xc7d875),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x7d6f24),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'],_0x5c38ff=>{this['_addUploadcareImageEditorListeners'](_0x5c38ff);});}),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'](_0x1211bd,_0x517549){const _0x6e155c='uc-cloud-image-editor',_0x13ff2b=_0x1211bd['querySelector'](_0x6e155c);if(_0x13ff2b)return _0x517549(_0x13ff2b);const _0x1a38a7=new MutationObserver(_0x3e1702=>{const _0x2f5ed3=_0x3e1702['filter'](_0x59b0d5=>_0x59b0d5['target']===_0x1211bd&&_0x59b0d5['addedNodes']['length']>0x0&&_0x59b0d5['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x6e155c);_0x2f5ed3['length']&&(_0x1a38a7['disconnect'](),_0x517549(_0x2f5ed3[0x0]['addedNodes'][0x0]));});_0x1a38a7['observe'](_0x1211bd,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x1d1cff){_0x1d1cff['addEventListener']('apply',_0x257d54=>{this['fire']('apply',{'imageSrc':_0x257d54['detail']['cdnUrl']});}),_0x1d1cff['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0xf74261(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5897ba,_0x5a60fe,_0x10d985){super(),this['_editor']=_0x5897ba,this['_dialog']=_0x5a60fe,this['_imageElement']=_0x10d985,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 _0x18b186=this['_imageElement'],_0x44f360=_0x18b186['getAttribute']('uploadcareImageId'),_0x23b0e8=_0x18b186['getAttribute']('src');if(_0x44f360)await this['_loadImageInfo'](_0x44f360,_0x23b0e8);else{if(this['_imageCache']['has'](_0x23b0e8)){const _0x4fe143=this['_imageCache']['get'](_0x23b0e8);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4fe143['url'],this['imageDimension']=_0x4fe143['dimension'],this['imageId']=_0x4fe143['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x14dcc9}=this['_editor'],t=_0x14dcc9['t'],_0x1eef07=new X(_0x14dcc9,this['imageStatus'],this['_attributes']);_0x1eef07['bind']('status')['to'](this,'imageStatus'),_0x1eef07['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1eef07['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1eef07['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1eef07,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2e734e,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1eef07,'position':_0x59eb6a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1eef07['focus']();},'onHide':()=>{_0x1eef07['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xa89741=>!A(_0xa89741,_0x1eef07['element'])}});}['_loadImageInfo'](_0x9e28f1,_0x245ff2){return j['getInfo'](_0x9e28f1,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x497d06=>{const {width:_0x51fd96,height:_0x36a13d}=_0x497d06['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x245ff2,this['imageDimension']={'width':_0x51fd96,'height':_0x36a13d},this['imageId']=_0x9e28f1;})['catch'](_0x19b672=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x19b672['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2c2316,_0x2fd0eb){return this['_getImageAsFile'](_0x2c2316)['then'](_0x478f52=>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':_0x2fd0eb['signal'],'file':_0x478f52,'onProgress':_0x3069ed=>{_0x3069ed&&_0x3069ed['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3069ed['value']));}}))['then'](_0x3c9da2=>{const {width:_0x4ee1f6,height:_0x5843d6}=_0x3c9da2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3c9da2['cdnUrl'],this['imageDimension']={'width':_0x4ee1f6,'height':_0x5843d6},this['imageId']=_0x3c9da2['uuid'],this['imageUploadProgress']=null;const _0x435906=_0x2c2316['getAttribute']('src');this['_imageCache']['set'](_0x435906,{'id':_0x3c9da2['uuid'],'url':_0x3c9da2['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x60614d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x60614d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3f46db,_0x31feb1){_0x3f46db['on']('apply',(_0x59e79f,_0x7ef0c3)=>{this['_replaceImage'](_0x31feb1,_0x7ef0c3['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3f46db['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3f46db['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5cd1fb,_0x105cae,_0xe7dd7){const _0x41525d=this['_editor'],{width:_0x27a8bb,height:_0x57da16}=S(_0x105cae,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1e98a9,imageSources:_0x5e0ed6}=C(_0x105cae,_0x27a8bb);_0x41525d['model']['change'](_0x30e597=>{if('$graveyard'===_0x5cd1fb['root']['rootName']){_0x41525d['execute']('insertImage',{'imageType':_0x5cd1fb['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5cd1fb['getAttributes']()),'uploadcareImageId':_0xe7dd7,'src':_0x1e98a9,'sources':_0x5e0ed6,'width':_0x27a8bb,'height':_0x57da16}});const _0x299f5e=_0x5cd1fb['getChildren']();_0x5cd1fb=_0x41525d['model']['document']['selection']['getSelectedElement']();for(const _0x1e7fb4 of _0x299f5e)_0x30e597['append'](_0x30e597['cloneElement'](_0x1e7fb4),_0x5cd1fb);}else _0x30e597['setSelection'](_0x5cd1fb,'on'),_0x41525d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5cd1fb['getAttributes']()),'uploadcareImageId':_0xe7dd7,'src':_0x1e98a9,'sources':_0x5e0ed6,'width':_0x27a8bb,'height':_0x57da16},_0x5cd1fb);_0x30e597['setSelection'](_0x5cd1fb,'on');});}async['_getImageAsFile'](_0x2bd24e){const _0x3a78c5=_0x1424b6['window'],_0x3b5954=_0x1424b6['document']['location']['href'],_0x16ba76=new _0x3a78c5['URL'](_0x2bd24e['getAttribute']('src'),_0x3b5954);if('data:'===_0x16ba76['protocol']){const _0x449fd2=_0x16ba76['href']['split'](','),_0x300d91=_0x449fd2[0x0]['match'](/:(.*?);/)[0x1],_0x4f651e=_0x300d91['split']('/')[0x1],_0x4656f5=_0x3a78c5['atob'](_0x449fd2[_0x449fd2['length']-0x1]);let _0x4ec83a=_0x4656f5['length'];const _0x178984=new _0x3a78c5['Uint8Array'](_0x4ec83a);for(;_0x4ec83a--;)_0x178984[_0x4ec83a]=_0x4656f5['charCodeAt'](_0x4ec83a);return new _0x3a78c5['File']([_0x178984],'image.'+_0x4f651e,{'type':_0x300d91});}const _0x11eb0c=_0x16ba76['href']['split']('/'),_0x137f2d=_0x11eb0c[_0x11eb0c['length']-0x1],_0x5ba4cc=_0x137f2d['split']('.')[0x1];return _0x3a78c5['fetch'](_0x16ba76['href'])['then'](_0x58955a=>_0x58955a['clone']()['blob']())['then'](_0x155ca5=>new _0x3a78c5['File']([_0x155ca5],_0x137f2d,{'type':'image/'+_0x5ba4cc}));}}class O extends _0x252380{['imageEditController'];static get['requires'](){return[_0x289807];}['_isEditable'];constructor(_0x3273cc){super(_0x3273cc),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x7f6c44){const _0x41126d=G(_0x7f6c44);return _0x2cdadc=>!(!_0x2cdadc||!_0x2cdadc['is']('element','imageBlock')&&!_0x2cdadc['is']('element','imageInline'))&&(!!_0x2cdadc['hasAttribute']('uploadcareImageId')||!!_0x2cdadc['hasAttribute']('src')&&_0x41126d(_0x2cdadc['getAttribute']('src')));}(_0x3273cc['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x28f834=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x28f834);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x8c2b58=this['editor']['model']['document']['selection']['getSelectedElement']();_0x8c2b58&&(_0x8c2b58['is']('element','imageBlock')||_0x8c2b58['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x289807),_0x8c2b58),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x252380{['refresh'](){const _0x214170=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x214170&&(_0x214170['is']('element','imageBlock')||_0x214170['is']('element','imageInline')));}['execute'](_0x32b32c){const _0x563bc5=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5db41b=>{_0x5db41b['setAttributes'](_0x32b32c,_0x563bc5),_0x5db41b['removeAttribute']('srcset',_0x563bc5),_0x5db41b['removeAttribute']('sizes',_0x563bc5);});}}class m extends _0x20fef7{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2654f3,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x287880}=this;_0x287880['commands']['add']('uploadcareImageEdit',new O(_0x287880)),_0x287880['commands']['add']('uploadcareImageReplace',new R(_0x287880));}}class g extends _0x20fef7{['_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 _0x29ae67=this['editor'];_0x29ae67['ui']['componentFactory']['add']('uploadcareImageEdit',_0x8003a8=>{const _0x52566d=_0x29ae67['commands']['get']('uploadcareImageEdit'),_0x2b7160=new _0x166585(_0x8003a8),t=_0x8003a8['t'];return _0x2b7160['set']({'icon':_0x2e734e,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x2b7160['bind']('isEnabled')['to'](_0x52566d),_0x2b7160['bind']('isOn')['to'](_0x52566d,'isActive'),this['listenTo'](_0x2b7160,'execute',()=>{_0x29ae67['execute']('uploadcareImageEdit'),_0x29ae67['editing']['view']['focus']();}),_0x2b7160;}),this['_initConfig']();}['_initConfig'](){const _0x3dc277=_0x62c1a3(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x3dc277),this['listenTo'](this['editor'],'destroy',()=>{_0x3dc277['remove']();});}}class et extends _0x20fef7{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x412426,Command as _0x57022b}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3e5771,IconGooglePhotos as _0x1e2de4,IconGoogleDrive as _0x4645fa,IconFacebook as _0x458098,IconDropbox as _0x69b546,IconUploadcareLink as _0xe02ef7,IconUploadcareImageUpload as _0x243d57,IconError as _0x6059ee,IconUploadcareImageEdit as _0x47e873}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x36c05f,MenuBarMenuListItemButtonView as _0x3aa7be,View as _0x179a6d,FocusCycler as _0x3d3ae5,Dialog as _0x4a7b8f,DialogViewPosition as _0x5f1bc4,SpinnerView as _0x53ca23,IconView as _0x41fd44,Notification as _0xcce88d}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x9c523a,DomEmitterMixin as _0x7230e7,global as _0x494a9e,getAncestors as _0x1403cf,ObservableMixin as _0x1d985e,uid as _0x3e5d95,createElement as _0x24c806}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x31f334}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x41cf25,info as _0x58d73a}from'@uploadcare/upload-client';import*as _0x1adcc6 from'@uploadcare/file-uploader';var i=function(_0x2b9c46){return _0x2b9c46['Local']='local',_0x2b9c46['URL']='url',_0x2b9c46['Dropbox']='dropbox',_0x2b9c46['GDrive']='gdrive',_0x2b9c46['Facebook']='facebook',_0x2b9c46['GPhotos']='gphotos',_0x2b9c46['OneDrive']='onedrive',_0x2b9c46;}({});function _(_0x218c98,_0x23ec06,_0x596f7f){const t=_0x218c98['t'],_0x5a2eb3=_0x218c98['t'];switch(_0x23ec06){case i['Local']:return{'text':_0x5a2eb3('Insert'===_0x596f7f?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x5a2eb3('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x596f7f?_0x5a2eb3('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x5a2eb3('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x23ec06;}}class e extends _0x412426{['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 _0x1811e4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x23cb11;for(const _0x4e6d26 in _0x1811e4){const _0xaf3d65=_0x4e6d26,_0x561d70=_0x1811e4[_0xaf3d65];if('uploadcareLicenseKeyValid'==_0x561d70||'uploadcareLicenseKeyInvalid'==_0x561d70||'uploadcareLicenseKeyExpired'==_0x561d70||'uploadcareLicenseKeyDomainLimit'==_0x561d70||'uploadcareLicenseKeyNotAllowed'==_0x561d70||'uploadcareLicenseKeyEvaluationLimit'==_0x561d70||'uploadcareLicenseKeyTrialLimit'==_0x561d70||'uploadcareLicenseKeyUsageLimit'==_0x561d70){delete _0x1811e4[_0xaf3d65],_0x23cb11=_0x561d70,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x23cb11&&_0x1811e4['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x23cb11&&_0x1811e4['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x23cb11&&_0x1811e4['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x23cb11&&_0x1811e4['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x23cb11&&_0x1811e4['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x23cb11&&_0x1811e4['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x23cb11&&_0x1811e4['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x330d93}=this,_0x500bf0=_0x330d93['commands']['get']('uploadcare');if(!_0x500bf0)return;const _0x48471d=this['_normalizeConfigSourceList'](_0x330d93['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x583691,_0x1d4007)=>{const _0x104381=this['_getIntegrationKey'](_0x1d4007['type']);return _0x583691[_0x104381]||(_0x583691[_0x104381]=[]),_0x583691[_0x104381]['push'](_0x1d4007),_0x583691;},{});_0x330d93['plugins']['has']('ImageInsertUI')&&_0x330d93['commands']['get']('uploadcare')&&Object['entries'](_0x48471d)['forEach'](([_0x3bab07,_0xd5abc8])=>{_0x330d93['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3bab07,'observable':()=>_0x500bf0,'buttonViewCreator':()=>this['_createToolbarButton'](_0xd5abc8),'formViewCreator':()=>this['_createDropdownButtons'](_0xd5abc8),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0xd5abc8),'override':'assetManager'!==_0x3bab07});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x480fa9){const {locale:_0x37da64}=this['editor'];return _0x480fa9['map'](_0x306e39=>{const _0x2fcb76=_(_0x37da64,_0x306e39,'Insert');switch(_0x306e39){case i['Local']:return{'icon':_0x243d57,'type':i['Local'],..._0x2fcb76};case i['URL']:return{'icon':_0xe02ef7,'type':i['URL'],..._0x2fcb76};case i['Dropbox']:return{'icon':_0x69b546,'type':i['Dropbox'],..._0x2fcb76};case i['Facebook']:return{'icon':_0x458098,'type':i['Facebook'],..._0x2fcb76};case i['GDrive']:return{'icon':_0x4645fa,'type':i['GDrive'],..._0x2fcb76};case i['GPhotos']:return{'icon':_0x1e2de4,'type':i['GPhotos'],..._0x2fcb76};case i['OneDrive']:return{'icon':_0x3e5771,'type':i['OneDrive'],..._0x2fcb76};}});}['_getIntegrationKey'](_0x1ec479){switch(_0x1ec479){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x5478f7,_0x26a674){const _0xf825c8=this['editor'],_0x683288=new _0x5478f7(_0xf825c8['locale']),_0x476f34=_0xf825c8['commands']['get']('uploadcare');return _0x683288['bind']('isEnabled')['to'](_0x476f34),_0x683288['on']('execute',()=>{_0x476f34['execute'](_0x26a674);}),_0x683288;}['_createToolbarButton'](_0x58c671){const {locale:_0x56d1a8}=this['editor'],_0x162824=this['editor']['plugins']['get']('ImageInsertUI'),_0xa9553b=_0x58c671[0x0],_0x305ea2=this['_createButton'](_0x36c05f,_0xa9553b['type']);return _0x305ea2['icon']=_0xa9553b['icon'],_0x305ea2['bind']('label')['to'](_0x162824,'isImageSelected',_0x597d04=>_(_0x56d1a8,_0xa9553b['type'],_0x597d04?'Replace':'Insert')['text']),_0x305ea2['tooltip']=!0x0,_0x305ea2;}['_createDropdownButtons'](_0x1c4a20){const {locale:_0x1635ed}=this['editor'],_0x320960=this['editor']['plugins']['get']('ImageInsertUI');return _0x1c4a20['map'](_0x32d7de=>{const _0x13cd2a=this['_createButton'](_0x36c05f,_0x32d7de['type']);return _0x13cd2a['withText']=!0x0,_0x13cd2a['icon']=_0x32d7de['icon'],_0x13cd2a['bind']('label')['to'](_0x320960,'isImageSelected',_0x44f90c=>_(_0x1635ed,_0x32d7de['type'],_0x44f90c?'Replace':'Insert')['text']),_0x13cd2a;});}['_createMenuBarButtons'](_0x2920b8){return _0x2920b8['map'](_0x45bc4f=>{const _0x24ea11=this['_createButton'](_0x3aa7be,_0x45bc4f['type']);return _0x24ea11['icon']=_0x45bc4f['icon'],_0x24ea11['label']=_0x45bc4f['shortText'],_0x24ea11;});}}class F extends _0x179a6d{['focusTracker'];['focusCycler'];constructor(_0xbd8ea2){super(_0xbd8ea2),this['focusTracker']=new _0x9c523a(),this['focusCycler']=new _0x3d3ae5({'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(_0x4d1023,_0x17e9a6){super(_0x4d1023),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-'+_0x17e9a6}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x563a87,_0x4b5dd9){const _0x1cde9b=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x28de38=>_0x28de38<=_0x4b5dd9)['map'](_0x1e0656=>_0x563a87['replace'](/\/$/,'')+'/-/resize/'+_0x1e0656+'x/\x20'+_0x1e0656+'w');return{'imageFallbackUrl':_0x563a87,'imageSources':[{'srcset':_0x1cde9b['join'](',\x20'),'sizes':'(max-width:\x20'+_0x4b5dd9+'px)\x20100vw,\x20'+_0x4b5dd9+'px','type':'image/webp'}]};}function S(_0x1c4bae,_0x4ed470,_0x586b61){const _0x5c55f0=_0x1c4bae['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5c55f0?parseInt(_0x5c55f0[0x1],0xa):_0x4ed470,'height':_0x5c55f0?parseInt(_0x5c55f0[0x2],0xa):_0x586b61};}function p(_0x3e202e,_0x55297a){const _0x4b2bcf=new(_0x7230e7())(),_0x1ce87b=_0x3e202e['plugins']['get']('ImageUtils'),_0xaf4342=_0x3e202e['editing']['mapper']['toViewElement'](_0x55297a),_0x23f8b7=_0x1ce87b['findViewImgElement'](_0xaf4342),_0x55e72b=_0x3e202e['editing']['view']['domConverter']['viewToDom'](_0x23f8b7),_0x599176=_0x55297a['getAttribute']('width'),_0x2bdc6d=_0x55297a['getAttribute']('height'),_0x122ee2='image-processing';_0x3e202e['editing']['view']['change'](_0x44d278=>{_0x44d278['addClass'](_0x122ee2,_0xaf4342),_0x44d278['setStyle']('aspect-ratio',_0x599176+'/'+_0x2bdc6d,_0x23f8b7);}),_0x4b2bcf['listenTo'](_0x55e72b,'load',()=>{_0x4b2bcf['stopListening'](_0x55e72b,'load'),_0x3e202e['editing']['view']['change'](_0x5abb48=>{_0x5abb48['removeClass'](_0x122ee2,_0xaf4342),_0x5abb48['removeStyle']('aspect-ratio',_0x23f8b7);});});}function z(_0x46aaec){if(Array['isArray'](_0x46aaec)){const _0x34ad9d=_0x46aaec['map'](z);return _0x573fad=>_0x34ad9d['some'](_0x31d882=>_0x31d882(_0x573fad));}if('origin'==_0x46aaec){const _0x3b50ac=_0x494a9e['window']['location']['origin'];return _0x231c7c=>new URL(_0x231c7c,_0x494a9e['document']['baseURI'])['origin']==_0x3b50ac;}return'function'==typeof _0x46aaec?_0x46aaec:_0x46aaec instanceof RegExp?_0x2f96be=>!(!_0x2f96be['match'](_0x46aaec)&&!_0x2f96be['replace'](/^https?:\/\//,'')['match'](_0x46aaec)):()=>!0x1;}function A(_0x12eeda,_0x27a1f6){return _0x1403cf(_0x12eeda['target'])['includes'](_0x27a1f6);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1d985e(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2d54d8,_0x1ab045,_0x45a546){super(),this['_editor']=_0x2d54d8,this['_editing']=_0x1ab045,this['_dialog']=_0x2d54d8['plugins']['get'](_0x4a7b8f),this['_api']=_0x1ab045['ctxElement']['getAPI'](),this['_type']=_0x45a546,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:_0x40132e,model:_0x54c5bb}=this['_editor'],_0x55a5a6=_0x54c5bb['document']['selection']['getSelectedElement'](),_0x3c39b2=_0x55a5a6&&(_0x55a5a6['is']('element','imageBlock')||_0x55a5a6['is']('element','imageInline'));this['_formView']=new x(_0x40132e,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x243d57,'title':_(_0x40132e,this['_type'],_0x3c39b2?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5f1bc4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4ca72c=>!A(_0x4ca72c,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x41a827}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x284f2b=>{const _0x1a5d78=_0x41a827['length'];for(const _0x1e34bf of _0x41a827){const _0x387afe=_0x1e34bf===_0x41a827[_0x1a5d78-0x1],{cdnUrl:_0x4ccf26,fileInfo:_0x313eb3}=_0x1e34bf;if(!_0x4ccf26||!_0x313eb3)continue;const {width:_0x5af587,height:_0xf7d0ea}=_0x313eb3['imageInfo'],_0x4ca4f3=S(_0x4ccf26,_0x5af587,_0xf7d0ea),_0x56baca=C(_0x4ccf26,_0x4ca4f3['width']),_0x499385={'id':_0x313eb3['uuid'],'type':'image','attributes':{'imageDimension':_0x4ca4f3,..._0x56baca}};this['_insertAsset'](_0x499385,_0x387afe,_0x284f2b);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x21761d=>{'idle'===_0x21761d['detail']['status']&&!_0x21761d['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x48f4ba,_0x5960b0,_0x21798b){const _0x4dfdce=this['_editor']['model']['document']['selection'],_0x260253=_0x4dfdce['getSelectedElement'](),_0x33f56d=!(!_0x260253||!_0x260253['is']('element','imageInline'));_0x21798b['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x48f4ba,_0x33f56d),_0x5960b0||_0x21798b['setSelection'](_0x4dfdce['getLastPosition']());}['_insertImage'](_0x5346f4,_0x3e380a){const _0x11773d=this['_editor'],{imageDimension:_0x29a0bd,imageFallbackUrl:_0xb2ed47,imageSources:_0x5b4f62}=_0x5346f4['attributes'];_0x11773d['execute']('insertImage',{'imageType':_0x3e380a?'imageInline':null,'source':{'uploadcareImageId':_0x5346f4['id'],'src':_0xb2ed47,'sources':_0x5b4f62,..._0x29a0bd}});}}class w extends _0x57022b{['_editing'];['_controller']=null;static get['requires'](){return[_0x4a7b8f,o];}constructor(_0x24e70b){super(_0x24e70b),this['_editing']=_0x24e70b['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x17dc2a){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x17dc2a);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x27066e,..._0x5e5f7d}){return _0x41cf25(_0x27066e,_0x5e5f7d);}static['getInfo'](_0x1038d8,_0x4acf0e){return _0x58d73a(_0x1038d8,_0x4acf0e);}}class f extends _0x412426{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x31f334,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x4f26e0=this['editor'];if(!!!_0x4f26e0['config']['get']('uploadcare'))return;_0x4f26e0['plugins']['get'](_0x31f334)['createUploadAdapter']=_0x5a1344=>new k(_0x5a1344,_0x4f26e0),_0x4f26e0['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x50368a,{imageElement:_0x5498bf,data:_0xcaae63})=>{_0x4f26e0['model']['change'](_0x45a697=>{_0x45a697['setAttribute']('uploadcareImageId',_0xcaae63['uploadcareImageId'],_0x5498bf);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x1e9a74,_0x42f4b2){this['loader']=_0x1e9a74,this['editor']=_0x42f4b2,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x52917e=await this['loader']['file'];return j['upload']({'file':_0x52917e,'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':_0x526b78=>{_0x526b78&&_0x526b78['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x526b78['value']);}})['then'](async _0x1888e3=>{const {imageFallbackUrl:_0x4f4f3e,imageSources:_0x24ac08}=C(_0x1888e3['cdnUrl'],_0x1888e3['imageInfo']['width']);return{'uploadcareImageId':_0x1888e3['uuid'],'default':_0x4f4f3e,'sources':_0x24ac08};})['catch'](()=>{const _0x3b4ce2=t('Cannot\x20upload\x20file:')+('\x20'+_0x52917e['name']+'.');return Promise['reject'](_0x3b4ce2);});}['abort'](){this['controller']['abort']();}}class o extends _0x412426{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x4a7b8f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x1906e8){super(_0x1906e8),this['ucContextId']=_0x3e5d95();}['init'](){const _0x3d0018=this['editor'];_0x3d0018['commands']['add']('uploadcare',new w(_0x3d0018));}['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 _0x37aa17=_0x494a9e['document']['querySelector']('input[uploadcare-file-input]');_0x37aa17&&_0x37aa17['remove']();}),async function(_0x40ee77){const _0x4612fa=_0x3c2673([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]),_0x3df89f=0x535f8c3a,_0x32be68=0x5358f6aa^_0x3df89f,_0x27dbae=window[_0x3c2673([0x44,0x61,0x74,0x65])][_0x3c2673([0x6e,0x6f,0x77])](),_0x36d2e5=_0x40ee77[_0x3c2673([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x7d2c2c=new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x369d19=>{_0x36d2e5[_0x3c2673([0x6f,0x6e,0x63,0x65])](_0x3c2673([0x72,0x65,0x61,0x64,0x79]),_0x369d19);}),_0x562ffe={[_0x3c2673([0x6b,0x74,0x79])]:_0x3c2673([0x45,0x43]),[_0x3c2673([0x75,0x73,0x65])]:_0x3c2673([0x73,0x69,0x67]),[_0x3c2673([0x63,0x72,0x76])]:_0x3c2673([0x50,0x2d,0x32,0x35,0x36]),[_0x3c2673([0x78])]:_0x3c2673([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]),[_0x3c2673([0x79])]:_0x3c2673([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]),[_0x3c2673([0x61,0x6c,0x67])]:_0x3c2673([0x45,0x53,0x32,0x35,0x36])},_0x4b6af9=_0x36d2e5[_0x3c2673([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3c2673([0x67,0x65,0x74])](_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3f3777(){let _0x46abf2,_0x108bc7=null,_0x14cf80=null;try{if(_0x4b6af9==_0x3c2673([0x47,0x50,0x4c]))return _0x3c2673([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46abf2=_0x5dfa76(),!_0x46abf2)return _0x3c2673([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46abf2[_0x3c2673([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x14cf80=_0x3740b4(_0x46abf2[_0x3c2673([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46abf2[_0x3c2673([0x6a,0x74,0x69])])),await _0x2b5556()?_0x473446()?_0x4907c9()?_0x3c2673([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x433238()?(_0x46abf2[_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3c2673([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x108bc7=_0x2b0c4e(_0x3c2673([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x46abf2[_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3c2673([0x74,0x72,0x69,0x61,0x6c])&&(_0x108bc7=_0x2b0c4e(_0x3c2673([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x553d4c()):_0x3c2673([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3c2673([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3c2673([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3c2673([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4907c9(){const _0x579482=[_0x3c2673([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3c2673([0x74,0x72,0x69,0x61,0x6c])][_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46abf2[_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x27dbae/0x3e8:0xe10*_0x32be68;return _0x46abf2[_0x3c2673([0x65,0x78,0x70])]<_0x579482;}function _0x473446(){const _0x1afd7f=_0x46abf2[_0x3c2673([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1afd7f&&(!!_0x1afd7f[_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c2673([0x2a]))||!!_0x1afd7f[_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c2673([0x55,0x50,0x4c,0x43])));}function _0x433238(){const _0xf80d16=_0x46abf2[_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xf80d16||0x0==_0xf80d16[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x47e596}=new URL(window[_0x3c2673([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xf80d16[_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47e596))return!0x0;const _0x30afbb=_0x47e596[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])](_0x3c2673([0x2e]));return _0xf80d16[_0x3c2673([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3f781f=>_0x3f781f[_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c2673([0x2a])))[_0x3c2673([0x6d,0x61,0x70])](_0xe6a61a=>_0xe6a61a[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])](_0x3c2673([0x2e])))[_0x3c2673([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x36398b=>_0x36398b[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x30afbb[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3c2673([0x6d,0x61,0x70])](_0x4141cb=>Array(_0x30afbb[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4141cb[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3c2673([0x66,0x69,0x6c,0x6c])](_0x4141cb[0x0]===_0x3c2673([0x2a])?_0x3c2673([0x2a]):'')[_0x3c2673([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4141cb))[_0x3c2673([0x73,0x6f,0x6d,0x65])](_0x580afb=>_0x30afbb[_0x3c2673([0x65,0x76,0x65,0x72,0x79])]((_0x40c20a,_0xeb2718)=>_0x580afb[_0xeb2718]===_0x40c20a||_0x580afb[_0xeb2718]===_0x3c2673([0x2a])));}function _0x553d4c(){return _0x108bc7&&_0x14cf80?new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xedc227,_0x47c4f2)=>{_0x108bc7[_0x3c2673([0x74,0x68,0x65,0x6e])](_0xedc227,_0x47c4f2),_0x14cf80[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x16de82=>{_0x16de82!=_0x3c2673([0x56,0x61,0x6c,0x69,0x64])&&_0xedc227(_0x16de82);},_0x47c4f2);}):_0x108bc7||_0x14cf80||_0x3c2673([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3740b4(_0x5a0d77,_0x5e7e63){return new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f0397=>{if(_0x44da36())return _0x3f0397(_0x3c2673([0x56,0x61,0x6c,0x69,0x64]));_0x35e58f(),_0x36d2e5[_0x3c2673([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3c2673([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2342c3=!0x1;const _0x5cff87=_0x3e5d95();function _0x2f774b(_0x37c13c){return!!_0x37c13c&&(typeof _0x37c13c===_0x3c2673([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x37c13c===_0x3c2673([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x37c13c[_0x3c2673([0x74,0x68,0x65,0x6e])]===_0x3c2673([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x37c13c[_0x3c2673([0x63,0x61,0x74,0x63,0x68])]===_0x3c2673([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1e2039(_0x1b885d){_0x3d132f(_0x1b885d)[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x5f0cae=>{if(!_0x5f0cae||_0x5f0cae[_0x3c2673([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3c2673([0x6f,0x6b]))return _0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x15ac54(_0x3b6833(_0x5cff87+_0x5e7e63))!=_0x5f0cae[_0x3c2673([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3c2673([0x56,0x61,0x6c,0x69,0x64]);})[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x54265a=>(_0x4b0bc1(),_0x54265a),()=>{const _0xc502cb=_0x6776bd();return null==_0xc502cb?(_0x4b0bc1(),_0x3c2673([0x56,0x61,0x6c,0x69,0x64])):_0x3c2673(_0x27dbae-_0xc502cb>(0x7753083a^_0x3df89f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x3f0397)[_0x3c2673([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3f0397(_0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x12ab39=0x536962ba^_0x3df89f;function _0x4b0bc1(){const _0x282b55=_0x3c2673([0x6c,0x6c,0x63,0x74,0x2d])+_0x15ac54(_0x3b6833(_0x5a0d77)),_0x5f03d8=_0x3cb5fb(_0x15ac54(window[_0x3c2673([0x4d,0x61,0x74,0x68])][_0x3c2673([0x63,0x65,0x69,0x6c])](_0x27dbae/_0x12ab39)));window[_0x3c2673([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3c2673([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x282b55,_0x5f03d8);}function _0x6776bd(){const _0x4366d6=_0x3c2673([0x6c,0x6c,0x63,0x74,0x2d])+_0x15ac54(_0x3b6833(_0x5a0d77)),_0x3fc8d8=window[_0x3c2673([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3c2673([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4366d6);return _0x3fc8d8?window[_0x3c2673([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3cb5fb(_0x3fc8d8),0x10)*_0x12ab39:null;}function _0x3d132f(_0x99658){return new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57eed8,_0x5ec90a)=>{_0x99658[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x57eed8,_0x5ec90a),window[_0x3c2673([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5ec90a,0x535e58fa^_0x3df89f);});}}_0x36d2e5[_0x3c2673([0x6f,0x6e])](_0x3c2673([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5c4666,_0x586acb)=>{if(_0x586acb[0x0]!=_0x5a0d77)return _0x3f0397(_0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x586acb[0x1]={..._0x586acb[0x1],[_0x3c2673([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5cff87};},{[_0x3c2673([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3c2673([0x68,0x69,0x67,0x68])}),_0x36d2e5[_0x3c2673([0x6f,0x6e])](_0x3c2673([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5785f6=>{_0x2f774b(_0x5785f6[_0x3c2673([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2342c3=!0x0,_0x1e2039(_0x5785f6[_0x3c2673([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3c2673([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3c2673([0x6c,0x6f,0x77])}),_0x7d2c2c[_0x3c2673([0x74,0x68,0x65,0x6e])](()=>{_0x2342c3||_0x3f0397(_0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x44da36(){return _0x36d2e5[_0x3c2673([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3c2673([0x76,0x69,0x65,0x77])][_0x3c2673([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3c2673([0x61,0x75,0x74,0x6f]);}function _0x35e58f(){_0x36d2e5[_0x3c2673([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3c2673([0x76,0x69,0x65,0x77])][_0x3c2673([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3c2673([0x61,0x75,0x74,0x6f]);}}function _0x2b0c4e(_0xe17365){const _0x33de6c=[new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e7e03=>setTimeout(_0x4e7e03,0x5356b2f6^_0x3df89f)),_0x7d2c2c[_0x3c2673([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33eb17=>{let _0x46da8a=0x0;_0x36d2e5[_0x3c2673([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c2673([0x6f,0x6e])](_0x3c2673([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x23295b,_0x486d96)=>{_0x486d96[0x0][_0x3c2673([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x46da8a++,_0x46da8a==(0x535f8dc2^_0x3df89f)&&(_0x33eb17(),_0x23295b[_0x3c2673([0x6f,0x66,0x66])]());});}))];return window[_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3c2673([0x72,0x61,0x63,0x65])](_0x33de6c)[_0x3c2673([0x74,0x68,0x65,0x6e])](()=>_0xe17365);}async function _0x33bc47(){await _0x7d2c2c,_0x36d2e5[_0x3c2673([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c2673([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x25d660,_0x36d2e5[_0x3c2673([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c2673([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x25d660,_0x36d2e5[_0x3c2673([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3c2673([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4ce5b6(_0x527e43){const _0x4b4ee8=_0xd7a25a();_0x36d2e5[_0x4b4ee8]=_0x3c2673([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x527e43,_0x527e43!=_0x3c2673([0x56,0x61,0x6c,0x69,0x64])&&_0x33bc47();}function _0xd7a25a(){const _0x217533=window[_0x3c2673([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3c2673([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3c2673([0x6e,0x6f,0x77])]())[_0x3c2673([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3c2673([0x2e]),'');let _0x1152a8=_0x3c2673([0x68]);for(let _0x2da822=0x0;_0x2da822<_0x217533[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2da822+=0x2){let _0x5961fc=window[_0x3c2673([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x217533[_0x3c2673([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2da822,_0x2da822+0x2));_0x5961fc>=_0x4612fa[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5961fc-=_0x4612fa[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1152a8+=_0x4612fa[_0x5961fc];}return _0x1152a8;}function _0x5dfa76(){const _0x3c79dc=_0x4b6af9[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])](_0x3c2673([0x2e]));if(0x3!=_0x3c79dc[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1bc265(_0x3c79dc[0x1]);function _0x1bc265(_0x1fc09b){const _0x335a75=_0xabaf04(_0x1fc09b);return _0x335a75&&_0x283503()?_0x335a75:null;function _0x283503(){const _0x396ce8=_0x335a75[_0x3c2673([0x6a,0x74,0x69])],_0x21403b=window[_0x3c2673([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x396ce8[_0x3c2673([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x396ce8[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1f3ba4={..._0x335a75,[_0x3c2673([0x6a,0x74,0x69])]:_0x396ce8[_0x3c2673([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x396ce8[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1f3ba4[_0x3c2673([0x76,0x63])],_0x3b6833(_0x1f3ba4)==_0x21403b;}}}async function _0x2b5556(){let _0x1666e4=!0x0;try{const _0x60c5a5=_0x4b6af9[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])](_0x3c2673([0x2e])),[_0x187fc6,_0xda3a0e,_0x482759]=_0x60c5a5;return _0x45af9e(_0x187fc6),await _0x35bb46(_0x187fc6,_0xda3a0e,_0x482759),_0x1666e4;}catch{return!0x1;}function _0x45af9e(_0xd61e07){const _0x2752ec=_0xabaf04(_0xd61e07);_0x2752ec&&_0x2752ec[_0x3c2673([0x61,0x6c,0x67])]==_0x3c2673([0x45,0x53,0x32,0x35,0x36])||(_0x1666e4=!0x1);}async function _0x35bb46(_0x3bdd1f,_0x582033,_0x4204f2){const _0xeedf3b=window[_0x3c2673([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3c2673([0x66,0x72,0x6f,0x6d])](_0x190b70(_0x4204f2),_0x167988=>_0x167988[_0x3c2673([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1ad509=new window[(_0x3c2673([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3c2673([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3bdd1f+_0x3c2673([0x2e])+_0x582033),_0x28fdbc=window[_0x3c2673([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3c2673([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x28fdbc)return;const _0x311747=await _0x28fdbc[_0x3c2673([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3c2673([0x6a,0x77,0x6b]),_0x562ffe,{[_0x3c2673([0x6e,0x61,0x6d,0x65])]:_0x3c2673([0x45,0x43,0x44,0x53,0x41]),[_0x3c2673([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3c2673([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3c2673([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x28fdbc[_0x3c2673([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3c2673([0x6e,0x61,0x6d,0x65])]:_0x3c2673([0x45,0x43,0x44,0x53,0x41]),[_0x3c2673([0x68,0x61,0x73,0x68])]:{[_0x3c2673([0x6e,0x61,0x6d,0x65])]:_0x3c2673([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x311747,_0xeedf3b,_0x1ad509)||(_0x1666e4=!0x1);}}function _0xabaf04(_0x71c8e7){return _0x71c8e7[_0x3c2673([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3c2673([0x65,0x79]))?JSON[_0x3c2673([0x70,0x61,0x72,0x73,0x65])](_0x190b70(_0x71c8e7)):null;}function _0x190b70(_0x2911bb){return window[_0x3c2673([0x61,0x74,0x6f,0x62])](_0x2911bb[_0x3c2673([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3c2673([0x2b]))[_0x3c2673([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3c2673([0x2f])));}function _0x3b6833(_0x393f6b){let _0x2b3934=0x1505;function _0x5f07d3(_0x2c53e8){for(let _0x1702e2=0x0;_0x1702e2<_0x2c53e8[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1702e2++){const _0x168583=_0x2c53e8[_0x3c2673([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1702e2);_0x2b3934=(_0x2b3934<<0x5)+_0x2b3934+_0x168583,_0x2b3934&=_0x2b3934;}}function _0x1556de(_0x205eb2){Array[_0x3c2673([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x205eb2)?_0x205eb2[_0x3c2673([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1556de):_0x205eb2&&typeof _0x205eb2==_0x3c2673([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3c2673([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x205eb2)[_0x3c2673([0x73,0x6f,0x72,0x74])]()[_0x3c2673([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4b1f65,_0x2ba444])=>{_0x5f07d3(_0x4b1f65),_0x1556de(_0x2ba444);}):_0x5f07d3(window[_0x3c2673([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x205eb2));}return _0x1556de(_0x393f6b),_0x2b3934>>>0x0;}function _0x15ac54(_0x39959b){return _0x39959b[_0x3c2673([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3c2673([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3c2673([0x30]));}function _0x3cb5fb(_0x1447bf){return _0x1447bf[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3c2673([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3c2673([0x6a,0x6f,0x69,0x6e])]('');}function _0x25d660(){}function _0x3c2673(_0x8446fd){return _0x8446fd['map'](_0x3c7dab=>String['fromCharCode'](_0x3c7dab))['join']('');}_0x4ce5b6(await _0x3f3777());}(this);}['_initSchema'](){const _0x1f8aaf=this['editor']['model']['schema'];_0x1f8aaf['isRegistered']('imageBlock')&&_0x1f8aaf['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x1f8aaf['isRegistered']('imageInline')&&_0x1f8aaf['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x200f59=this['editor'];_0x200f59['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x200f59['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x3ac28b=>_0x3ac28b['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xaf84d3=_0x200f59['commands']['get']('replaceImageSource');_0xaf84d3&&this['listenTo'](_0xaf84d3,'cleanupImage',(_0x5cf3ce,[_0x505327,_0xbf327e])=>{_0x505327['removeAttribute']('uploadcareImageId',_0xbf327e);});}['_initConfig'](){const _0x27d9a9=this['editor']['config']['get']('uploadcare.uploader')||{},_0x37e086=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x24c806(_0x494a9e['document'],'uc-config',{..._0x27d9a9,'pubkey':_0x37e086,'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']=_0x43e78b=>{if('closeMax'==_0x43e78b)return'#uc-icon-arrow-down';},_0x494a9e['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x24c806(_0x494a9e['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x494a9e['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x34742e=this['editor']['commands']['get']('insertImage');_0x34742e&&this['listenTo'](_0x34742e,'execute',()=>{const _0x4b6fcd=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4b6fcd&&_0x4b6fcd['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x4b6fcd);});});const _0x53f923=this['editor']['commands']['get']('uploadcareImageReplace');_0x53f923&&this['listenTo'](_0x53f923,'execute',()=>{const _0x508cb9=this['editor']['model']['document']['selection']['getSelectedElement']();_0x508cb9&&_0x508cb9['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x508cb9);});});}}class tt extends _0x412426{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ca54d){super(_0x3ca54d),_0x3ca54d['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x1adcc6['defineComponents'](_0x1adcc6),this['_defineLocale']();}['_defineLocale'](){const _0x2173ed=this['editor']['config']['get']('uploadcare.locale'),_0x4d8bc7=this['editor']['locale']['contentLanguage'];_0x2173ed&&_0x1adcc6['defineLocale'](_0x4d8bc7,_0x2173ed);}}class ii extends _0x179a6d{constructor(_0x1d60e3){super(_0x1d60e3);const t=_0x1d60e3['t'],_0x424e7d=this['bindTemplate'],_0x5a030b=new _0x53ca23();_0x5a030b['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':[_0x5a030b,{'text':_0x424e7d['to']('imageUploadProgress',_0x47b5f7=>t('Loading\x20image...')+'\x20('+(_0x47b5f7||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 _0x179a6d{constructor(_0x6708bf){super(_0x6708bf);const t=_0x6708bf['t'];this['set']('errorType',null);const _0x412975=new _0x36c05f(_0x6708bf);_0x412975['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x412975['withText']=!0x0,_0x412975['class']='ck-button-action',_0x412975['on']('execute',()=>{this['fire']('retry');}),_0x412975['bind']('isVisible')['to'](this,'errorType',_0x585afd=>'NotFound'!==_0x585afd);const _0x153ed3=new _0x41fd44();_0x153ed3['content']=_0x6059ee,_0x153ed3['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x205f99=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':[_0x153ed3,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x205f99['to']('errorType',_0x12c1c0=>t('NotFound'!==_0x12c1c0?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x412975]},{'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 _0x179a6d{constructor(_0x4af643,_0x5ae8a5){super(_0x4af643);const _0x506d3=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5ae8a5,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x506d3['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x32330c,_0x60df68,_0x598d21){super(_0x32330c),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x32330c),this['_errorView']=new ti(_0x32330c),this['_editingView']=new ei(_0x32330c,_0x598d21),this['_focusableView']=new _0x179a6d(_0x32330c),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x60df68),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'],_0x158741=>{this['_addUploadcareImageEditorListeners'](_0x158741);});}),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'](_0x330eab,_0x58fba6){const _0x2c8f31='uc-cloud-image-editor',_0x47f3db=_0x330eab['querySelector'](_0x2c8f31);if(_0x47f3db)return _0x58fba6(_0x47f3db);const _0x20d926=new MutationObserver(_0x3085c1=>{const _0x27fabf=_0x3085c1['filter'](_0xa309d0=>_0xa309d0['target']===_0x330eab&&_0xa309d0['addedNodes']['length']>0x0&&_0xa309d0['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x2c8f31);_0x27fabf['length']&&(_0x20d926['disconnect'](),_0x58fba6(_0x27fabf[0x0]['addedNodes'][0x0]));});_0x20d926['observe'](_0x330eab,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x43c1a8){_0x43c1a8['addEventListener']('apply',_0x4b0ed2=>{this['fire']('apply',{'imageSrc':_0x4b0ed2['detail']['cdnUrl']});}),_0x43c1a8['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1d985e(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5b21a0,_0x14d385,_0x5abe02){super(),this['_editor']=_0x5b21a0,this['_dialog']=_0x14d385,this['_imageElement']=_0x5abe02,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 _0x4e4076=this['_imageElement'],_0x383891=_0x4e4076['getAttribute']('uploadcareImageId'),_0x5f15c0=_0x4e4076['getAttribute']('src');if(_0x383891)await this['_loadImageInfo'](_0x383891,_0x5f15c0);else{if(this['_imageCache']['has'](_0x5f15c0)){const _0x525a47=this['_imageCache']['get'](_0x5f15c0);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x525a47['url'],this['imageDimension']=_0x525a47['dimension'],this['imageId']=_0x525a47['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5a062b}=this['_editor'],t=_0x5a062b['t'],_0x4085bf=new X(_0x5a062b,this['imageStatus'],this['_attributes']);_0x4085bf['bind']('status')['to'](this,'imageStatus'),_0x4085bf['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4085bf['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4085bf['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4085bf,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x47e873,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4085bf,'position':_0x5f1bc4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4085bf['focus']();},'onHide':()=>{_0x4085bf['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2d5bb2=>!A(_0x2d5bb2,_0x4085bf['element'])}});}['_loadImageInfo'](_0x4b843a,_0x10272a){return j['getInfo'](_0x4b843a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x31b73f=>{const {width:_0xc966ac,height:_0x27244a}=_0x31b73f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x10272a,this['imageDimension']={'width':_0xc966ac,'height':_0x27244a},this['imageId']=_0x4b843a;})['catch'](_0x52cdaf=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x52cdaf['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x47ddd5,_0x14eeca){return this['_getImageAsFile'](_0x47ddd5)['then'](_0x19aaa6=>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':_0x14eeca['signal'],'file':_0x19aaa6,'onProgress':_0x2d81f5=>{_0x2d81f5&&_0x2d81f5['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2d81f5['value']));}}))['then'](_0x5c9852=>{const {width:_0x11ca62,height:_0x5731cf}=_0x5c9852['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5c9852['cdnUrl'],this['imageDimension']={'width':_0x11ca62,'height':_0x5731cf},this['imageId']=_0x5c9852['uuid'],this['imageUploadProgress']=null;const _0x30eb0a=_0x47ddd5['getAttribute']('src');this['_imageCache']['set'](_0x30eb0a,{'id':_0x5c9852['uuid'],'url':_0x5c9852['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x262992=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x262992['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1b8461,_0x5726eb){_0x1b8461['on']('apply',(_0x255071,_0x4bfd13)=>{this['_replaceImage'](_0x5726eb,_0x4bfd13['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1b8461['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1b8461['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2dac4d,_0x325233,_0x2e12d5){const _0x3a2936=this['_editor'],{width:_0x45e7f3,height:_0x2b5f9f}=S(_0x325233,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4c6bb1,imageSources:_0x2d4ccd}=C(_0x325233,_0x45e7f3);_0x3a2936['model']['change'](_0x50fa81=>{if('$graveyard'===_0x2dac4d['root']['rootName']){_0x3a2936['execute']('insertImage',{'imageType':_0x2dac4d['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2dac4d['getAttributes']()),'uploadcareImageId':_0x2e12d5,'src':_0x4c6bb1,'sources':_0x2d4ccd,'width':_0x45e7f3,'height':_0x2b5f9f}});const _0x12cdd2=_0x2dac4d['getChildren']();_0x2dac4d=_0x3a2936['model']['document']['selection']['getSelectedElement']();for(const _0x4ec842 of _0x12cdd2)_0x50fa81['append'](_0x50fa81['cloneElement'](_0x4ec842),_0x2dac4d);}else _0x50fa81['setSelection'](_0x2dac4d,'on'),_0x3a2936['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2dac4d['getAttributes']()),'uploadcareImageId':_0x2e12d5,'src':_0x4c6bb1,'sources':_0x2d4ccd,'width':_0x45e7f3,'height':_0x2b5f9f},_0x2dac4d);_0x50fa81['setSelection'](_0x2dac4d,'on');});}async['_getImageAsFile'](_0x10bd21){const _0x6d649b=_0x494a9e['window'],_0x1fa7d3=_0x494a9e['document']['location']['href'],_0x3d4df8=new _0x6d649b['URL'](_0x10bd21['getAttribute']('src'),_0x1fa7d3);if('data:'===_0x3d4df8['protocol']){const _0x48a992=_0x3d4df8['href']['split'](','),_0x389049=_0x48a992[0x0]['match'](/:(.*?);/)[0x1],_0x13d52e=_0x389049['split']('/')[0x1],_0x5d038c=_0x6d649b['atob'](_0x48a992[_0x48a992['length']-0x1]);let _0x44acf4=_0x5d038c['length'];const _0x19ca80=new _0x6d649b['Uint8Array'](_0x44acf4);for(;_0x44acf4--;)_0x19ca80[_0x44acf4]=_0x5d038c['charCodeAt'](_0x44acf4);return new _0x6d649b['File']([_0x19ca80],'image.'+_0x13d52e,{'type':_0x389049});}const _0x18a618=_0x3d4df8['href']['split']('/'),_0x32c933=_0x18a618[_0x18a618['length']-0x1],_0x5a1e38=_0x32c933['split']('.')[0x1];return _0x6d649b['fetch'](_0x3d4df8['href'])['then'](_0x5a20b8=>_0x5a20b8['clone']()['blob']())['then'](_0x45c38f=>new _0x6d649b['File']([_0x45c38f],_0x32c933,{'type':'image/'+_0x5a1e38}));}}class Q extends _0x57022b{['imageEditController'];static get['requires'](){return[_0x4a7b8f];}['_isEditable'];constructor(_0x457306){super(_0x457306),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4f318a){const _0x137da5=z(_0x4f318a);return _0x322d1c=>!(!_0x322d1c||!_0x322d1c['is']('element','imageBlock')&&!_0x322d1c['is']('element','imageInline'))&&(!!_0x322d1c['hasAttribute']('uploadcareImageId')||!!_0x322d1c['hasAttribute']('src')&&_0x137da5(_0x322d1c['getAttribute']('src')));}(_0x457306['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x17efce=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x17efce);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0xebaa16=this['editor']['model']['document']['selection']['getSelectedElement']();_0xebaa16&&(_0xebaa16['is']('element','imageBlock')||_0xebaa16['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x4a7b8f),_0xebaa16),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x57022b{['refresh'](){const _0x1d6a42=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1d6a42&&(_0x1d6a42['is']('element','imageBlock')||_0x1d6a42['is']('element','imageInline')));}['execute'](_0x30b474){const _0x497b8e=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x2ef515=>{_0x2ef515['setAttributes'](_0x30b474,_0x497b8e),_0x2ef515['removeAttribute']('srcset',_0x497b8e),_0x2ef515['removeAttribute']('sizes',_0x497b8e);});}}class m extends _0x412426{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0xcce88d,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1cd438}=this;_0x1cd438['commands']['add']('uploadcareImageEdit',new Q(_0x1cd438)),_0x1cd438['commands']['add']('uploadcareImageReplace',new V(_0x1cd438));}}class g extends _0x412426{['_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 _0x588ba3=this['editor'];_0x588ba3['ui']['componentFactory']['add']('uploadcareImageEdit',_0xb7ad5d=>{const _0x34a000=_0x588ba3['commands']['get']('uploadcareImageEdit'),_0x59e068=new _0x36c05f(_0xb7ad5d),t=_0xb7ad5d['t'];return _0x59e068['set']({'icon':_0x47e873,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x59e068['bind']('isEnabled')['to'](_0x34a000),_0x59e068['bind']('isOn')['to'](_0x34a000,'isActive'),this['listenTo'](_0x59e068,'execute',()=>{_0x588ba3['execute']('uploadcareImageEdit'),_0x588ba3['editing']['view']['focus']();}),_0x59e068;}),this['_initConfig']();}['_initConfig'](){const _0x463be0=_0x24c806(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x463be0),this['listenTo'](this['editor'],'destroy',()=>{_0x463be0['remove']();});}}class et extends _0x412426{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251130.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20251130.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251130.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20251130.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251130.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251130.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251130.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251130.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251130.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.19.4",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0xd416de=_0x15c1;(function(_0x3a8841,_0x5c9868){const _0xbbff4b=_0x15c1,_0x4777aa=_0x3a8841();while(!![]){try{const _0x4fb299=-parseInt(_0xbbff4b(0x9b))/0x1*(parseInt(_0xbbff4b(0xcf))/0x2)+-parseInt(_0xbbff4b(0xbe))/0x3*(-parseInt(_0xbbff4b(0xca))/0x4)+parseInt(_0xbbff4b(0xbd))/0x5+parseInt(_0xbbff4b(0xa9))/0x6+-parseInt(_0xbbff4b(0xce))/0x7*(parseInt(_0xbbff4b(0xd1))/0x8)+parseInt(_0xbbff4b(0xa5))/0x9+-parseInt(_0xbbff4b(0x97))/0xa;if(_0x4fb299===_0x5c9868)break;else _0x4777aa['push'](_0x4777aa['shift']());}catch(_0x1cda50){_0x4777aa['push'](_0x4777aa['shift']());}}}(_0x5948,0x657e1));import{Plugin as _0x4c4fee}from'ckeditor5/src/core.js';import{Dialog as _0x1adfab}from'ckeditor5/src/ui.js';import{createElement as _0x20e4bf,global as _0xd69da3,uid as _0x23e3f8}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x28c9a8}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x4ce3fa}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x3cc371}from'./utils/editingutils.js';function _0x15c1(_0xe57672,_0x586ccd){const _0x594897=_0x5948();return _0x15c1=function(_0x15c120,_0x467d37){_0x15c120=_0x15c120-0x80;let _0x27f46e=_0x594897[_0x15c120];return _0x27f46e;},_0x15c1(_0xe57672,_0x586ccd);}function _0x5948(){const _0x1d8ce1=['cleanupImage','contentLanguage','conversion','pluginName','uc-config','uploadcareImageReplace','isOfficialPlugin','input[uploadcare-file-input]','_initCtx','editor','ucContextId','closeMax','_ctxElement','for','schema','uc-upload-ctx-provider','1691705mniuYH','206520SwpgJH','render','iconHrefResolver','model','requires','replaceImageSource','insertImage','UploadcareEditing','fromCharCode','uploadcareImageId','getSelectedElement','once','32Zrjgkj','\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','removeAttribute','uploader-','78113rVKtTX','47330Ajmjdw','appendChild','136MrTmyw','ctxElement','execute','locale','document','remove','view','commands','listenTo','config','add','imageInline','uploadcare.uploader','_initImageProcessingIndicator','_initConfig','isRegistered','downcast','data-uc-image-id','destroy','true','uploadcare','uploadcare.pubkey','body','href','getAttribute','querySelector','configElement','15223900xzhfQG','_initConversion','_initSchema','_configElement','5nfvTlk','editing','#uc-icon-arrow-down','selection','init','elementToAttribute','upcast','isPremiumPlugin','imageBlock','PictureEditing','7001406HcEDZc','map','extend','afterInit','3474816mcTTTt','join','get','attributeToAttribute'];_0x5948=function(){return _0x1d8ce1;};return _0x5948();}export class UploadcareEditing extends _0x4c4fee{[_0xd416de(0x9a)]=null;[_0xd416de(0xb9)]=null;static get[_0xd416de(0xb0)](){const _0x2df56f=_0xd416de;return _0x2df56f(0xc5);}static get[_0xd416de(0xc2)](){const _0xd9c04d=_0xd416de;return[_0xd9c04d(0xa4),_0x4ce3fa,_0x1adfab];}static get[_0xd416de(0xb3)](){return!0x0;}static get[_0xd416de(0xa2)](){return!0x0;}[_0xd416de(0xb7)];get[_0xd416de(0x96)](){const _0x41278b=_0xd416de;return this[_0x41278b(0x9a)];}get[_0xd416de(0xd2)](){const _0x302114=_0xd416de;return this[_0x302114(0xb9)];}constructor(_0x5991e2){const _0x2b789b=_0xd416de;super(_0x5991e2),this[_0x2b789b(0xb7)]=_0x23e3f8();}[_0xd416de(0x9f)](){const _0x4e3099=_0xd416de,_0x18aece=this[_0x4e3099(0xb6)];_0x18aece[_0x4e3099(0x83)][_0x4e3099(0x86)](_0x4e3099(0x90),new _0x28c9a8(_0x18aece));}[_0xd416de(0xa8)](){const _0x1bbfca=_0xd416de;this[_0x1bbfca(0x99)](),this[_0x1bbfca(0x98)](),this[_0x1bbfca(0x8a)](),this[_0x1bbfca(0xb5)](),this[_0x1bbfca(0x89)](),this[_0x1bbfca(0x84)](this[_0x1bbfca(0xb6)],_0x1bbfca(0x8e),()=>{const _0x22a662=_0x1bbfca;this[_0x22a662(0x9a)]&&(this[_0x22a662(0x9a)][_0x22a662(0x81)](),this[_0x22a662(0x9a)]=null),this[_0x22a662(0xb9)]&&(this[_0x22a662(0xb9)][_0x22a662(0x81)](),this[_0x22a662(0xb9)]=null);const _0x3c6b8a=_0xd69da3[_0x22a662(0x80)][_0x22a662(0x95)](_0x22a662(0xb4));_0x3c6b8a&&_0x3c6b8a[_0x22a662(0x81)]();}),async function(_0x3565ad){const _0x4d9363=_0x5122ed([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]),_0x17e0bc=0x535f8c3a,_0x179255=0x5358f642^_0x17e0bc,_0x268be6=window[_0x5122ed([0x44,0x61,0x74,0x65])][_0x5122ed([0x6e,0x6f,0x77])](),_0x1c7585=_0x3565ad[_0x5122ed([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2541f1=new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1b4374=>{_0x1c7585[_0x5122ed([0x6f,0x6e,0x63,0x65])](_0x5122ed([0x72,0x65,0x61,0x64,0x79]),_0x1b4374);}),_0x4c4009={[_0x5122ed([0x6b,0x74,0x79])]:_0x5122ed([0x45,0x43]),[_0x5122ed([0x75,0x73,0x65])]:_0x5122ed([0x73,0x69,0x67]),[_0x5122ed([0x63,0x72,0x76])]:_0x5122ed([0x50,0x2d,0x32,0x35,0x36]),[_0x5122ed([0x78])]:_0x5122ed([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]),[_0x5122ed([0x79])]:_0x5122ed([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]),[_0x5122ed([0x61,0x6c,0x67])]:_0x5122ed([0x45,0x53,0x32,0x35,0x36])},_0x619ae3=_0x1c7585[_0x5122ed([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5122ed([0x67,0x65,0x74])](_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x510afe(){let _0x305707,_0x3392e9=null,_0xa1f92b=null;try{if(_0x619ae3==_0x5122ed([0x47,0x50,0x4c]))return _0x5122ed([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x305707=_0x5255fa(),!_0x305707)return _0x5122ed([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x305707[_0x5122ed([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xa1f92b=_0x29c11d(_0x305707[_0x5122ed([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x305707[_0x5122ed([0x6a,0x74,0x69])])),await _0x48ac59()?_0x4861be()?_0x3cf648()?_0x5122ed([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1b4d72()?(_0x305707[_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5122ed([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3392e9=_0xa8ad4d(_0x5122ed([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x305707[_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5122ed([0x74,0x72,0x69,0x61,0x6c])&&(_0x3392e9=_0xa8ad4d(_0x5122ed([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f16d6()):_0x5122ed([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5122ed([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5122ed([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5122ed([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3cf648(){const _0x131516=[_0x5122ed([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5122ed([0x74,0x72,0x69,0x61,0x6c])][_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x305707[_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x268be6/0x3e8:0xe10*_0x179255;return _0x305707[_0x5122ed([0x65,0x78,0x70])]<_0x131516;}function _0x4861be(){const _0x513533=_0x305707[_0x5122ed([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x513533&&(!!_0x513533[_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5122ed([0x2a]))||!!_0x513533[_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5122ed([0x55,0x50,0x4c,0x43])));}function _0x1b4d72(){const _0x10f1fa=_0x15c1,_0x1fe847=_0x305707[_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1fe847||0x0==_0x1fe847[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3b45dc}=new URL(window[_0x5122ed([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x10f1fa(0x93)]);if(_0x1fe847[_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b45dc))return!0x0;const _0x118635=_0x3b45dc[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])](_0x5122ed([0x2e]));return _0x1fe847[_0x5122ed([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4f7b8a=>_0x4f7b8a[_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5122ed([0x2a])))[_0x5122ed([0x6d,0x61,0x70])](_0x47f2ce=>_0x47f2ce[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])](_0x5122ed([0x2e])))[_0x5122ed([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3c77f3=>_0x3c77f3[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x118635[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5122ed([0x6d,0x61,0x70])](_0x439a50=>Array(_0x118635[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x439a50[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5122ed([0x66,0x69,0x6c,0x6c])](_0x439a50[0x0]===_0x5122ed([0x2a])?_0x5122ed([0x2a]):'')[_0x5122ed([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x439a50))[_0x5122ed([0x73,0x6f,0x6d,0x65])](_0x3c42ef=>_0x118635[_0x5122ed([0x65,0x76,0x65,0x72,0x79])]((_0x5cc3b1,_0x1f6feb)=>_0x3c42ef[_0x1f6feb]===_0x5cc3b1||_0x3c42ef[_0x1f6feb]===_0x5122ed([0x2a])));}function _0x2f16d6(){return _0x3392e9&&_0xa1f92b?new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59f338,_0x3e55ed)=>{_0x3392e9[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x59f338,_0x3e55ed),_0xa1f92b[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x2472f6=>{_0x2472f6!=_0x5122ed([0x56,0x61,0x6c,0x69,0x64])&&_0x59f338(_0x2472f6);},_0x3e55ed);}):_0x3392e9||_0xa1f92b||_0x5122ed([0x56,0x61,0x6c,0x69,0x64]);}}function _0x29c11d(_0x19eef9,_0x997a6a){return new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25510a=>{if(_0x589510())return _0x25510a(_0x5122ed([0x56,0x61,0x6c,0x69,0x64]));_0xc64d27(),_0x1c7585[_0x5122ed([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5122ed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x552600=!0x1;const _0x2facca=_0x23e3f8();function _0x49e375(_0xf5a6c8){return!!_0xf5a6c8&&(typeof _0xf5a6c8===_0x5122ed([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xf5a6c8===_0x5122ed([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xf5a6c8[_0x5122ed([0x74,0x68,0x65,0x6e])]===_0x5122ed([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xf5a6c8[_0x5122ed([0x63,0x61,0x74,0x63,0x68])]===_0x5122ed([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xd4e76b(_0x4ec719){_0x5f5aac(_0x4ec719)[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x37fdfd=>{if(!_0x37fdfd||_0x37fdfd[_0x5122ed([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5122ed([0x6f,0x6b]))return _0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x18aea1(_0xaf3793(_0x2facca+_0x997a6a))!=_0x37fdfd[_0x5122ed([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5122ed([0x56,0x61,0x6c,0x69,0x64]);})[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x4de30a=>(_0x16240d(),_0x4de30a),()=>{const _0x5564f7=_0x248f21();return null==_0x5564f7?(_0x16240d(),_0x5122ed([0x56,0x61,0x6c,0x69,0x64])):_0x5122ed(_0x268be6-_0x5564f7>(0x7753083a^_0x17e0bc)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x25510a)[_0x5122ed([0x63,0x61,0x74,0x63,0x68])](()=>{_0x25510a(_0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x419a2e=0x536962ba^_0x17e0bc;function _0x16240d(){const _0x2c63ed=_0x5122ed([0x6c,0x6c,0x63,0x74,0x2d])+_0x18aea1(_0xaf3793(_0x19eef9)),_0xb7eb02=_0x441814(_0x18aea1(window[_0x5122ed([0x4d,0x61,0x74,0x68])][_0x5122ed([0x63,0x65,0x69,0x6c])](_0x268be6/_0x419a2e)));window[_0x5122ed([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5122ed([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c63ed,_0xb7eb02);}function _0x248f21(){const _0x56446a=_0x5122ed([0x6c,0x6c,0x63,0x74,0x2d])+_0x18aea1(_0xaf3793(_0x19eef9)),_0x96a34e=window[_0x5122ed([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5122ed([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x56446a);return _0x96a34e?window[_0x5122ed([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x441814(_0x96a34e),0x10)*_0x419a2e:null;}function _0x5f5aac(_0x31351f){return new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x26c0dc,_0x221793)=>{_0x31351f[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x26c0dc,_0x221793),window[_0x5122ed([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x221793,0x535e58fa^_0x17e0bc);});}}_0x1c7585[_0x5122ed([0x6f,0x6e])](_0x5122ed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x19ff40,_0x40d62d)=>{if(_0x40d62d[0x0]!=_0x19eef9)return _0x25510a(_0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x40d62d[0x1]={..._0x40d62d[0x1],[_0x5122ed([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2facca};},{[_0x5122ed([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5122ed([0x68,0x69,0x67,0x68])}),_0x1c7585[_0x5122ed([0x6f,0x6e])](_0x5122ed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2fff7c=>{_0x49e375(_0x2fff7c[_0x5122ed([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x552600=!0x0,_0xd4e76b(_0x2fff7c[_0x5122ed([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5122ed([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5122ed([0x6c,0x6f,0x77])}),_0x2541f1[_0x5122ed([0x74,0x68,0x65,0x6e])](()=>{_0x552600||_0x25510a(_0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x589510(){return _0x1c7585[_0x5122ed([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5122ed([0x76,0x69,0x65,0x77])][_0x5122ed([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5122ed([0x61,0x75,0x74,0x6f]);}function _0xc64d27(){_0x1c7585[_0x5122ed([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5122ed([0x76,0x69,0x65,0x77])][_0x5122ed([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5122ed([0x61,0x75,0x74,0x6f]);}}function _0xa8ad4d(_0x492c5c){const _0xc7bd93=[new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x132cc9=>setTimeout(_0x132cc9,0x5356b2f6^_0x17e0bc)),_0x2541f1[_0x5122ed([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4bd839=>{let _0x59a556=0x0;_0x1c7585[_0x5122ed([0x6d,0x6f,0x64,0x65,0x6c])][_0x5122ed([0x6f,0x6e])](_0x5122ed([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5b31a1,_0x525ecd)=>{_0x525ecd[0x0][_0x5122ed([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x59a556++,_0x59a556==(0x535f8dc2^_0x17e0bc)&&(_0x4bd839(),_0x5b31a1[_0x5122ed([0x6f,0x66,0x66])]());});}))];return window[_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5122ed([0x72,0x61,0x63,0x65])](_0xc7bd93)[_0x5122ed([0x74,0x68,0x65,0x6e])](()=>_0x492c5c);}async function _0x5288d5(){await _0x2541f1,_0x1c7585[_0x5122ed([0x6d,0x6f,0x64,0x65,0x6c])][_0x5122ed([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3637cc,_0x1c7585[_0x5122ed([0x6d,0x6f,0x64,0x65,0x6c])][_0x5122ed([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3637cc,_0x1c7585[_0x5122ed([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5122ed([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5bedbe(_0x59dce4){const _0x2a0f8c=_0x3c1691();_0x1c7585[_0x2a0f8c]=_0x5122ed([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x59dce4,_0x59dce4!=_0x5122ed([0x56,0x61,0x6c,0x69,0x64])&&_0x5288d5();}function _0x3c1691(){const _0xad175e=window[_0x5122ed([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5122ed([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5122ed([0x6e,0x6f,0x77])]())[_0x5122ed([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5122ed([0x2e]),'');let _0x325faa=_0x5122ed([0x68]);for(let _0x4bc5fa=0x0;_0x4bc5fa<_0xad175e[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4bc5fa+=0x2){let _0x54bd8e=window[_0x5122ed([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xad175e[_0x5122ed([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4bc5fa,_0x4bc5fa+0x2));_0x54bd8e>=_0x4d9363[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x54bd8e-=_0x4d9363[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x325faa+=_0x4d9363[_0x54bd8e];}return _0x325faa;}function _0x5255fa(){const _0x5af8c8=_0x619ae3[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])](_0x5122ed([0x2e]));if(0x3!=_0x5af8c8[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x591ef1(_0x5af8c8[0x1]);function _0x591ef1(_0x5a4462){const _0x14a4ac=_0x5e6f95(_0x5a4462);return _0x14a4ac&&_0x5794d5()?_0x14a4ac:null;function _0x5794d5(){const _0x2825ba=_0x14a4ac[_0x5122ed([0x6a,0x74,0x69])],_0xf24ef1=window[_0x5122ed([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2825ba[_0x5122ed([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2825ba[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5d2cc0={..._0x14a4ac,[_0x5122ed([0x6a,0x74,0x69])]:_0x2825ba[_0x5122ed([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2825ba[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5d2cc0[_0x5122ed([0x76,0x63])],_0xaf3793(_0x5d2cc0)==_0xf24ef1;}}}async function _0x48ac59(){let _0x2e14fa=!0x0;try{const _0x1914fe=_0x619ae3[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])](_0x5122ed([0x2e])),[_0xd93aec,_0x19bebe,_0x245221]=_0x1914fe;return _0x5bb384(_0xd93aec),await _0x181548(_0xd93aec,_0x19bebe,_0x245221),_0x2e14fa;}catch{return!0x1;}function _0x5bb384(_0x527ebe){const _0x358c6a=_0x5e6f95(_0x527ebe);_0x358c6a&&_0x358c6a[_0x5122ed([0x61,0x6c,0x67])]==_0x5122ed([0x45,0x53,0x32,0x35,0x36])||(_0x2e14fa=!0x1);}async function _0x181548(_0x1f3e3a,_0x3f8600,_0xc3c2c8){const _0x5e4dc5=window[_0x5122ed([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5122ed([0x66,0x72,0x6f,0x6d])](_0x67bba7(_0xc3c2c8),_0x35e016=>_0x35e016[_0x5122ed([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x23028=new window[(_0x5122ed([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5122ed([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1f3e3a+_0x5122ed([0x2e])+_0x3f8600),_0x43f8d8=window[_0x5122ed([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5122ed([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x43f8d8)return;const _0x34a198=await _0x43f8d8[_0x5122ed([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5122ed([0x6a,0x77,0x6b]),_0x4c4009,{[_0x5122ed([0x6e,0x61,0x6d,0x65])]:_0x5122ed([0x45,0x43,0x44,0x53,0x41]),[_0x5122ed([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5122ed([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5122ed([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x43f8d8[_0x5122ed([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5122ed([0x6e,0x61,0x6d,0x65])]:_0x5122ed([0x45,0x43,0x44,0x53,0x41]),[_0x5122ed([0x68,0x61,0x73,0x68])]:{[_0x5122ed([0x6e,0x61,0x6d,0x65])]:_0x5122ed([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x34a198,_0x5e4dc5,_0x23028)||(_0x2e14fa=!0x1);}}function _0x5e6f95(_0x5f59ac){return _0x5f59ac[_0x5122ed([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5122ed([0x65,0x79]))?JSON[_0x5122ed([0x70,0x61,0x72,0x73,0x65])](_0x67bba7(_0x5f59ac)):null;}function _0x67bba7(_0x1b05f3){return window[_0x5122ed([0x61,0x74,0x6f,0x62])](_0x1b05f3[_0x5122ed([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5122ed([0x2b]))[_0x5122ed([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5122ed([0x2f])));}function _0xaf3793(_0x40b80c){let _0x872a44=0x1505;function _0x5b5fe0(_0x59bf0a){for(let _0x2db10d=0x0;_0x2db10d<_0x59bf0a[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2db10d++){const _0x48b82f=_0x59bf0a[_0x5122ed([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2db10d);_0x872a44=(_0x872a44<<0x5)+_0x872a44+_0x48b82f,_0x872a44&=_0x872a44;}}function _0x4a6146(_0x4f8c55){Array[_0x5122ed([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f8c55)?_0x4f8c55[_0x5122ed([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4a6146):_0x4f8c55&&typeof _0x4f8c55==_0x5122ed([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5122ed([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f8c55)[_0x5122ed([0x73,0x6f,0x72,0x74])]()[_0x5122ed([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1c8d61,_0x1aeeeb])=>{_0x5b5fe0(_0x1c8d61),_0x4a6146(_0x1aeeeb);}):_0x5b5fe0(window[_0x5122ed([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f8c55));}return _0x4a6146(_0x40b80c),_0x872a44>>>0x0;}function _0x18aea1(_0x17e1d3){return _0x17e1d3[_0x5122ed([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5122ed([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5122ed([0x30]));}function _0x441814(_0x4fec9b){return _0x4fec9b[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5122ed([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5122ed([0x6a,0x6f,0x69,0x6e])]('');}function _0x3637cc(){}function _0x5122ed(_0x2850dc){const _0x2df30c=_0x15c1;return _0x2850dc[_0x2df30c(0xa6)](_0x16186f=>String[_0x2df30c(0xc6)](_0x16186f))[_0x2df30c(0xaa)]('');}_0x5bedbe(await _0x510afe());}(this);}[_0xd416de(0x99)](){const _0x1974ea=_0xd416de,_0x57390d=this[_0x1974ea(0xb6)][_0x1974ea(0xc1)][_0x1974ea(0xbb)];_0x57390d[_0x1974ea(0x8b)](_0x1974ea(0xa3))&&_0x57390d[_0x1974ea(0xa7)](_0x1974ea(0xa3),{'allowAttributes':[_0x1974ea(0xc7)]}),_0x57390d[_0x1974ea(0x8b)](_0x1974ea(0x87))&&_0x57390d[_0x1974ea(0xa7)](_0x1974ea(0x87),{'allowAttributes':[_0x1974ea(0xc7)]});}[_0xd416de(0x98)](){const _0x1bc77f=_0xd416de,_0x3c88e2=this[_0x1bc77f(0xb6)];_0x3c88e2[_0x1bc77f(0xaf)][_0x1bc77f(0xba)](_0x1bc77f(0x8c))[_0x1bc77f(0xac)]({'model':_0x1bc77f(0xc7),'view':_0x1bc77f(0x8d)}),_0x3c88e2[_0x1bc77f(0xaf)][_0x1bc77f(0xba)](_0x1bc77f(0xa1))[_0x1bc77f(0xa0)]({'model':{'key':_0x1bc77f(0xc7),'value':_0x3af3bf=>_0x3af3bf[_0x1bc77f(0x94)](_0x1bc77f(0x8d))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4e0ffa=_0x3c88e2[_0x1bc77f(0x83)][_0x1bc77f(0xab)](_0x1bc77f(0xc3));_0x4e0ffa&&this[_0x1bc77f(0x84)](_0x4e0ffa,_0x1bc77f(0xad),(_0x5ea0ab,[_0x451e45,_0x2f8592])=>{const _0x471df9=_0x1bc77f;_0x451e45[_0x471df9(0xcc)](_0x471df9(0xc7),_0x2f8592);});}[_0xd416de(0x8a)](){const _0x2e453d=_0xd416de,_0xb0b541=this[_0x2e453d(0xb6)][_0x2e453d(0x85)][_0x2e453d(0xab)](_0x2e453d(0x88))||{},_0x251c8b=this[_0x2e453d(0xb6)][_0x2e453d(0x85)][_0x2e453d(0xab)](_0x2e453d(0x91))||'';this[_0x2e453d(0x9a)]=_0x20e4bf(_0xd69da3[_0x2e453d(0x80)],_0x2e453d(0xb1),{..._0xb0b541,'pubkey':_0x251c8b,'ctx-name':_0x2e453d(0xcd)+this[_0x2e453d(0xb7)],'sourceList':'','imgOnly':_0x2e453d(0x8f),'removeCopyright':_0x2e453d(0x8f),'localeName':this[_0x2e453d(0xb6)][_0x2e453d(0xd4)][_0x2e453d(0xae)],'externalSourcesEmbedCss':_0x2e453d(0xcb)}),this[_0x2e453d(0x9a)][_0x2e453d(0xc0)]=_0x25d56f=>{const _0x14a561=_0x2e453d;if(_0x14a561(0xb8)==_0x25d56f)return _0x14a561(0x9d);},_0xd69da3[_0x2e453d(0x80)][_0x2e453d(0x92)][_0x2e453d(0xd0)](this[_0x2e453d(0x9a)]);}[_0xd416de(0xb5)](){const _0x3de3a9=_0xd416de;this[_0x3de3a9(0xb9)]=_0x20e4bf(_0xd69da3[_0x3de3a9(0x80)],_0x3de3a9(0xbc),{'ctx-name':_0x3de3a9(0xcd)+this[_0x3de3a9(0xb7)]}),_0xd69da3[_0x3de3a9(0x80)][_0x3de3a9(0x92)][_0x3de3a9(0xd0)](this[_0x3de3a9(0xb9)]);}[_0xd416de(0x89)](){const _0x3003a1=_0xd416de,_0x24825b=this[_0x3003a1(0xb6)][_0x3003a1(0x83)][_0x3003a1(0xab)](_0x3003a1(0xc4));_0x24825b&&this[_0x3003a1(0x84)](_0x24825b,_0x3003a1(0xd3),()=>{const _0x4f7e3c=_0x3003a1,_0x2a7e56=this[_0x4f7e3c(0xb6)][_0x4f7e3c(0xc1)][_0x4f7e3c(0x80)][_0x4f7e3c(0x9e)][_0x4f7e3c(0xc8)]();_0x2a7e56&&_0x2a7e56[_0x4f7e3c(0x94)](_0x4f7e3c(0xc7))&&this[_0x4f7e3c(0xb6)][_0x4f7e3c(0x9c)][_0x4f7e3c(0x82)][_0x4f7e3c(0xc9)](_0x4f7e3c(0xbf),()=>{const _0x4ed509=_0x4f7e3c;_0x3cc371(this[_0x4ed509(0xb6)],_0x2a7e56);});});const _0x12b107=this[_0x3003a1(0xb6)][_0x3003a1(0x83)][_0x3003a1(0xab)](_0x3003a1(0xb2));_0x12b107&&this[_0x3003a1(0x84)](_0x12b107,_0x3003a1(0xd3),()=>{const _0x2516f2=_0x3003a1,_0xd6a4aa=this[_0x2516f2(0xb6)][_0x2516f2(0xc1)][_0x2516f2(0x80)][_0x2516f2(0x9e)][_0x2516f2(0xc8)]();_0xd6a4aa&&_0xd6a4aa[_0x2516f2(0x94)](_0x2516f2(0xc7))&&this[_0x2516f2(0xb6)][_0x2516f2(0x9c)][_0x2516f2(0x82)][_0x2516f2(0xc9)](_0x2516f2(0xbf),()=>{const _0x1393ce=_0x2516f2;_0x3cc371(this[_0x1393ce(0xb6)],_0xd6a4aa);});});}}
|
|
23
|
+
const _0xf2a2c8=_0x3acb;(function(_0x36424b,_0x3f51ca){const _0xb6a03d=_0x3acb,_0x1a6674=_0x36424b();while(!![]){try{const _0x4f918f=parseInt(_0xb6a03d(0x1f9))/0x1*(parseInt(_0xb6a03d(0x1c7))/0x2)+-parseInt(_0xb6a03d(0x202))/0x3+-parseInt(_0xb6a03d(0x1cc))/0x4+-parseInt(_0xb6a03d(0x1da))/0x5+-parseInt(_0xb6a03d(0x1e4))/0x6+-parseInt(_0xb6a03d(0x1e7))/0x7*(parseInt(_0xb6a03d(0x1b8))/0x8)+parseInt(_0xb6a03d(0x1ee))/0x9;if(_0x4f918f===_0x3f51ca)break;else _0x1a6674['push'](_0x1a6674['shift']());}catch(_0x5751fd){_0x1a6674['push'](_0x1a6674['shift']());}}}(_0x4ed9,0xa2292));import{Plugin as _0x2dd013}from'ckeditor5/src/core.js';import{Dialog as _0xf03c9f}from'ckeditor5/src/ui.js';import{createElement as _0x4c3e96,global as _0x3caf4e,uid as _0x3c700d}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0xbe07d2}from'./uploadcarecommand.js';function _0x4ed9(){const _0x239bc7=['commands','join','32wGQOtx','for','uploadcareImageReplace','uploadcare.pubkey','input[uploadcare-file-input]','config','isPremiumPlugin','getAttribute','replaceImageSource','fromCharCode','cleanupImage','imageInline','model','selection','uploader-','553218jqfmKU','conversion','editor','imageBlock','editing','2127132RPwRdr','destroy','_initImageProcessingIndicator','getSelectedElement','#uc-icon-arrow-down','href','UploadcareEditing','attributeToAttribute','removeAttribute','schema','requires','afterInit','data-uc-image-id','add','685130LUhwAQ','map','configElement','PictureEditing','pluginName','contentLanguage','querySelector','execute','listenTo','_initConfig','2643456sTiYtX','uc-config','insertImage','1689422HfNIMv','upcast','\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','downcast','_initCtx','_initSchema','remove','25701066ByGxlt','locale','closeMax','ctxElement','_ctxElement','init','extend','document','_configElement','appendChild','elementToAttribute','2vxQsgF','view','render','_initConversion','uc-upload-ctx-provider','uploadcare.uploader','get','iconHrefResolver','isRegistered','2009739gqJkQz','ucContextId','isOfficialPlugin','body','uploadcare','once','true','uploadcareImageId'];_0x4ed9=function(){return _0x239bc7;};return _0x4ed9();}import{UploadcareUploadAdapter as _0xa13693}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x1901df}from'./utils/editingutils.js';function _0x3acb(_0x11ca0f,_0x5cf93f){const _0x4ed9b9=_0x4ed9();return _0x3acb=function(_0x3acbcc,_0x244012){_0x3acbcc=_0x3acbcc-0x1af;let _0x51d2b5=_0x4ed9b9[_0x3acbcc];return _0x51d2b5;},_0x3acb(_0x11ca0f,_0x5cf93f);}export class UploadcareEditing extends _0x2dd013{[_0xf2a2c8(0x1f6)]=null;[_0xf2a2c8(0x1f2)]=null;static get[_0xf2a2c8(0x1de)](){const _0x1e96c1=_0xf2a2c8;return _0x1e96c1(0x1d2);}static get[_0xf2a2c8(0x1d6)](){const _0x39a792=_0xf2a2c8;return[_0x39a792(0x1dd),_0xa13693,_0xf03c9f];}static get[_0xf2a2c8(0x1b0)](){return!0x0;}static get[_0xf2a2c8(0x1be)](){return!0x0;}[_0xf2a2c8(0x1af)];get[_0xf2a2c8(0x1dc)](){const _0xfb14f=_0xf2a2c8;return this[_0xfb14f(0x1f6)];}get[_0xf2a2c8(0x1f1)](){const _0x3a369a=_0xf2a2c8;return this[_0x3a369a(0x1f2)];}constructor(_0x5239ff){const _0x5e9067=_0xf2a2c8;super(_0x5239ff),this[_0x5e9067(0x1af)]=_0x3c700d();}[_0xf2a2c8(0x1f3)](){const _0x40c7f4=_0xf2a2c8,_0x94c347=this[_0x40c7f4(0x1c9)];_0x94c347[_0x40c7f4(0x1b6)][_0x40c7f4(0x1d9)](_0x40c7f4(0x1b2),new _0xbe07d2(_0x94c347));}[_0xf2a2c8(0x1d7)](){const _0x3fdbf6=_0xf2a2c8;this[_0x3fdbf6(0x1ec)](),this[_0x3fdbf6(0x1fc)](),this[_0x3fdbf6(0x1e3)](),this[_0x3fdbf6(0x1eb)](),this[_0x3fdbf6(0x1ce)](),this[_0x3fdbf6(0x1e2)](this[_0x3fdbf6(0x1c9)],_0x3fdbf6(0x1cd),()=>{const _0x3cf1c7=_0x3fdbf6;this[_0x3cf1c7(0x1f6)]&&(this[_0x3cf1c7(0x1f6)][_0x3cf1c7(0x1ed)](),this[_0x3cf1c7(0x1f6)]=null),this[_0x3cf1c7(0x1f2)]&&(this[_0x3cf1c7(0x1f2)][_0x3cf1c7(0x1ed)](),this[_0x3cf1c7(0x1f2)]=null);const _0x5632cf=_0x3caf4e[_0x3cf1c7(0x1f5)][_0x3cf1c7(0x1e0)](_0x3cf1c7(0x1bc));_0x5632cf&&_0x5632cf[_0x3cf1c7(0x1ed)]();}),async function(_0x305e17){const _0x24ed8f=_0x160d58([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]),_0x51afae=0x535f8c3a,_0x5c5f13=0x5358f6aa^_0x51afae,_0x3bcfb6=window[_0x160d58([0x44,0x61,0x74,0x65])][_0x160d58([0x6e,0x6f,0x77])](),_0x3015f3=_0x305e17[_0x160d58([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xdffc44=new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ff662=>{_0x3015f3[_0x160d58([0x6f,0x6e,0x63,0x65])](_0x160d58([0x72,0x65,0x61,0x64,0x79]),_0x4ff662);}),_0x10b01e={[_0x160d58([0x6b,0x74,0x79])]:_0x160d58([0x45,0x43]),[_0x160d58([0x75,0x73,0x65])]:_0x160d58([0x73,0x69,0x67]),[_0x160d58([0x63,0x72,0x76])]:_0x160d58([0x50,0x2d,0x32,0x35,0x36]),[_0x160d58([0x78])]:_0x160d58([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]),[_0x160d58([0x79])]:_0x160d58([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]),[_0x160d58([0x61,0x6c,0x67])]:_0x160d58([0x45,0x53,0x32,0x35,0x36])},_0x4b5855=_0x3015f3[_0x160d58([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x160d58([0x67,0x65,0x74])](_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x22005f(){let _0xc24155,_0x46b587=null,_0x1935aa=null;try{if(_0x4b5855==_0x160d58([0x47,0x50,0x4c]))return _0x160d58([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xc24155=_0x35d48e(),!_0xc24155)return _0x160d58([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xc24155[_0x160d58([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1935aa=_0x38ada2(_0xc24155[_0x160d58([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xc24155[_0x160d58([0x6a,0x74,0x69])])),await _0x9072f0()?_0x5f314d()?_0x51bdd3()?_0x160d58([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xb520c9()?(_0xc24155[_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x160d58([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x46b587=_0x25c514(_0x160d58([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xc24155[_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x160d58([0x74,0x72,0x69,0x61,0x6c])&&(_0x46b587=_0x25c514(_0x160d58([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4c80f8()):_0x160d58([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x160d58([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x160d58([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x160d58([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x51bdd3(){const _0x4bdae6=[_0x160d58([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x160d58([0x74,0x72,0x69,0x61,0x6c])][_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc24155[_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3bcfb6/0x3e8:0xe10*_0x5c5f13;return _0xc24155[_0x160d58([0x65,0x78,0x70])]<_0x4bdae6;}function _0x5f314d(){const _0x534406=_0xc24155[_0x160d58([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x534406&&(!!_0x534406[_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x160d58([0x2a]))||!!_0x534406[_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x160d58([0x55,0x50,0x4c,0x43])));}function _0xb520c9(){const _0x417a2a=_0x3acb,_0x4ee9b1=_0xc24155[_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4ee9b1||0x0==_0x4ee9b1[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3be2aa}=new URL(window[_0x160d58([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x417a2a(0x1d1)]);if(_0x4ee9b1[_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3be2aa))return!0x0;const _0xe73018=_0x3be2aa[_0x160d58([0x73,0x70,0x6c,0x69,0x74])](_0x160d58([0x2e]));return _0x4ee9b1[_0x160d58([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2675f1=>_0x2675f1[_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x160d58([0x2a])))[_0x160d58([0x6d,0x61,0x70])](_0x46e925=>_0x46e925[_0x160d58([0x73,0x70,0x6c,0x69,0x74])](_0x160d58([0x2e])))[_0x160d58([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x481198=>_0x481198[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xe73018[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x160d58([0x6d,0x61,0x70])](_0x1151dc=>Array(_0xe73018[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1151dc[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x160d58([0x66,0x69,0x6c,0x6c])](_0x1151dc[0x0]===_0x160d58([0x2a])?_0x160d58([0x2a]):'')[_0x160d58([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1151dc))[_0x160d58([0x73,0x6f,0x6d,0x65])](_0x17f485=>_0xe73018[_0x160d58([0x65,0x76,0x65,0x72,0x79])]((_0x4852f0,_0x2fd8f3)=>_0x17f485[_0x2fd8f3]===_0x4852f0||_0x17f485[_0x2fd8f3]===_0x160d58([0x2a])));}function _0x4c80f8(){return _0x46b587&&_0x1935aa?new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x9d73c1,_0x1994ca)=>{_0x46b587[_0x160d58([0x74,0x68,0x65,0x6e])](_0x9d73c1,_0x1994ca),_0x1935aa[_0x160d58([0x74,0x68,0x65,0x6e])](_0x50ef79=>{_0x50ef79!=_0x160d58([0x56,0x61,0x6c,0x69,0x64])&&_0x9d73c1(_0x50ef79);},_0x1994ca);}):_0x46b587||_0x1935aa||_0x160d58([0x56,0x61,0x6c,0x69,0x64]);}}function _0x38ada2(_0x3e054a,_0x44b547){return new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x581312=>{if(_0x204e03())return _0x581312(_0x160d58([0x56,0x61,0x6c,0x69,0x64]));_0x26276a(),_0x3015f3[_0x160d58([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x160d58([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x41cdaa=!0x1;const _0x594c43=_0x3c700d();function _0x4dedb2(_0x2ebe1d){return!!_0x2ebe1d&&(typeof _0x2ebe1d===_0x160d58([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2ebe1d===_0x160d58([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2ebe1d[_0x160d58([0x74,0x68,0x65,0x6e])]===_0x160d58([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2ebe1d[_0x160d58([0x63,0x61,0x74,0x63,0x68])]===_0x160d58([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x20054a(_0x4ac2b4){_0xc95a81(_0x4ac2b4)[_0x160d58([0x74,0x68,0x65,0x6e])](_0x4a48dd=>{if(!_0x4a48dd||_0x4a48dd[_0x160d58([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x160d58([0x6f,0x6b]))return _0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x316ffe(_0x5c0eb8(_0x594c43+_0x44b547))!=_0x4a48dd[_0x160d58([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x160d58([0x56,0x61,0x6c,0x69,0x64]);})[_0x160d58([0x74,0x68,0x65,0x6e])](_0x170693=>(_0x2c8f4f(),_0x170693),()=>{const _0x4f9abb=_0xfffcc0();return null==_0x4f9abb?(_0x2c8f4f(),_0x160d58([0x56,0x61,0x6c,0x69,0x64])):_0x160d58(_0x3bcfb6-_0x4f9abb>(0x7753083a^_0x51afae)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x160d58([0x74,0x68,0x65,0x6e])](_0x581312)[_0x160d58([0x63,0x61,0x74,0x63,0x68])](()=>{_0x581312(_0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x237b4b=0x536962ba^_0x51afae;function _0x2c8f4f(){const _0x1b3162=_0x160d58([0x6c,0x6c,0x63,0x74,0x2d])+_0x316ffe(_0x5c0eb8(_0x3e054a)),_0x2d45bb=_0x5d8852(_0x316ffe(window[_0x160d58([0x4d,0x61,0x74,0x68])][_0x160d58([0x63,0x65,0x69,0x6c])](_0x3bcfb6/_0x237b4b)));window[_0x160d58([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x160d58([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b3162,_0x2d45bb);}function _0xfffcc0(){const _0x4cbb59=_0x160d58([0x6c,0x6c,0x63,0x74,0x2d])+_0x316ffe(_0x5c0eb8(_0x3e054a)),_0x3ac332=window[_0x160d58([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x160d58([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4cbb59);return _0x3ac332?window[_0x160d58([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d8852(_0x3ac332),0x10)*_0x237b4b:null;}function _0xc95a81(_0x1776a9){return new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x21787e,_0x1688c6)=>{_0x1776a9[_0x160d58([0x74,0x68,0x65,0x6e])](_0x21787e,_0x1688c6),window[_0x160d58([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1688c6,0x535e58fa^_0x51afae);});}}_0x3015f3[_0x160d58([0x6f,0x6e])](_0x160d58([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x269f4a,_0x1de5b8)=>{if(_0x1de5b8[0x0]!=_0x3e054a)return _0x581312(_0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1de5b8[0x1]={..._0x1de5b8[0x1],[_0x160d58([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x594c43};},{[_0x160d58([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x160d58([0x68,0x69,0x67,0x68])}),_0x3015f3[_0x160d58([0x6f,0x6e])](_0x160d58([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xbcaac2=>{_0x4dedb2(_0xbcaac2[_0x160d58([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x41cdaa=!0x0,_0x20054a(_0xbcaac2[_0x160d58([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x160d58([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x160d58([0x6c,0x6f,0x77])}),_0xdffc44[_0x160d58([0x74,0x68,0x65,0x6e])](()=>{_0x41cdaa||_0x581312(_0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x204e03(){return _0x3015f3[_0x160d58([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x160d58([0x76,0x69,0x65,0x77])][_0x160d58([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x160d58([0x61,0x75,0x74,0x6f]);}function _0x26276a(){_0x3015f3[_0x160d58([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x160d58([0x76,0x69,0x65,0x77])][_0x160d58([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x160d58([0x61,0x75,0x74,0x6f]);}}function _0x25c514(_0x51ca06){const _0x334a2f=[new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf3c938=>setTimeout(_0xf3c938,0x5356b2f6^_0x51afae)),_0xdffc44[_0x160d58([0x74,0x68,0x65,0x6e])](()=>new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ef6ca=>{let _0x7d47c=0x0;_0x3015f3[_0x160d58([0x6d,0x6f,0x64,0x65,0x6c])][_0x160d58([0x6f,0x6e])](_0x160d58([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x7ff92a,_0x10f0dd)=>{_0x10f0dd[0x0][_0x160d58([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x7d47c++,_0x7d47c==(0x535f8dc2^_0x51afae)&&(_0x2ef6ca(),_0x7ff92a[_0x160d58([0x6f,0x66,0x66])]());});}))];return window[_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x160d58([0x72,0x61,0x63,0x65])](_0x334a2f)[_0x160d58([0x74,0x68,0x65,0x6e])](()=>_0x51ca06);}async function _0x171934(){await _0xdffc44,_0x3015f3[_0x160d58([0x6d,0x6f,0x64,0x65,0x6c])][_0x160d58([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5afc3f,_0x3015f3[_0x160d58([0x6d,0x6f,0x64,0x65,0x6c])][_0x160d58([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5afc3f,_0x3015f3[_0x160d58([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x160d58([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x511a8f(_0xd0d406){const _0xa0201a=_0xf2b1ba();_0x3015f3[_0xa0201a]=_0x160d58([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xd0d406,_0xd0d406!=_0x160d58([0x56,0x61,0x6c,0x69,0x64])&&_0x171934();}function _0xf2b1ba(){const _0x97898a=window[_0x160d58([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x160d58([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x160d58([0x6e,0x6f,0x77])]())[_0x160d58([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x160d58([0x2e]),'');let _0x43064e=_0x160d58([0x68]);for(let _0x14f58a=0x0;_0x14f58a<_0x97898a[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x14f58a+=0x2){let _0x512144=window[_0x160d58([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x97898a[_0x160d58([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x14f58a,_0x14f58a+0x2));_0x512144>=_0x24ed8f[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x512144-=_0x24ed8f[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x43064e+=_0x24ed8f[_0x512144];}return _0x43064e;}function _0x35d48e(){const _0x5e4729=_0x4b5855[_0x160d58([0x73,0x70,0x6c,0x69,0x74])](_0x160d58([0x2e]));if(0x3!=_0x5e4729[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x423aff(_0x5e4729[0x1]);function _0x423aff(_0x30e435){const _0x38b78f=_0x5e023a(_0x30e435);return _0x38b78f&&_0x35fa40()?_0x38b78f:null;function _0x35fa40(){const _0x23100c=_0x38b78f[_0x160d58([0x6a,0x74,0x69])],_0x5c4347=window[_0x160d58([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23100c[_0x160d58([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x23100c[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x546e2a={..._0x38b78f,[_0x160d58([0x6a,0x74,0x69])]:_0x23100c[_0x160d58([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x23100c[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x546e2a[_0x160d58([0x76,0x63])],_0x5c0eb8(_0x546e2a)==_0x5c4347;}}}async function _0x9072f0(){let _0x5708d5=!0x0;try{const _0x2a1aa2=_0x4b5855[_0x160d58([0x73,0x70,0x6c,0x69,0x74])](_0x160d58([0x2e])),[_0x4f542f,_0x4e0b9a,_0x2106f3]=_0x2a1aa2;return _0x25097c(_0x4f542f),await _0x39c6ec(_0x4f542f,_0x4e0b9a,_0x2106f3),_0x5708d5;}catch{return!0x1;}function _0x25097c(_0x20a74a){const _0x4d2f24=_0x5e023a(_0x20a74a);_0x4d2f24&&_0x4d2f24[_0x160d58([0x61,0x6c,0x67])]==_0x160d58([0x45,0x53,0x32,0x35,0x36])||(_0x5708d5=!0x1);}async function _0x39c6ec(_0x41f999,_0x4deef9,_0xdf3bb2){const _0xcf0d65=window[_0x160d58([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x160d58([0x66,0x72,0x6f,0x6d])](_0x6def42(_0xdf3bb2),_0x4ce971=>_0x4ce971[_0x160d58([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x47e949=new window[(_0x160d58([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x160d58([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x41f999+_0x160d58([0x2e])+_0x4deef9),_0x5875b0=window[_0x160d58([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x160d58([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5875b0)return;const _0x4163ad=await _0x5875b0[_0x160d58([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x160d58([0x6a,0x77,0x6b]),_0x10b01e,{[_0x160d58([0x6e,0x61,0x6d,0x65])]:_0x160d58([0x45,0x43,0x44,0x53,0x41]),[_0x160d58([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x160d58([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x160d58([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5875b0[_0x160d58([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x160d58([0x6e,0x61,0x6d,0x65])]:_0x160d58([0x45,0x43,0x44,0x53,0x41]),[_0x160d58([0x68,0x61,0x73,0x68])]:{[_0x160d58([0x6e,0x61,0x6d,0x65])]:_0x160d58([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4163ad,_0xcf0d65,_0x47e949)||(_0x5708d5=!0x1);}}function _0x5e023a(_0x154210){return _0x154210[_0x160d58([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x160d58([0x65,0x79]))?JSON[_0x160d58([0x70,0x61,0x72,0x73,0x65])](_0x6def42(_0x154210)):null;}function _0x6def42(_0x43f0ca){return window[_0x160d58([0x61,0x74,0x6f,0x62])](_0x43f0ca[_0x160d58([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x160d58([0x2b]))[_0x160d58([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x160d58([0x2f])));}function _0x5c0eb8(_0x48975a){let _0x1939b6=0x1505;function _0x5767be(_0x49a2b1){for(let _0x36694b=0x0;_0x36694b<_0x49a2b1[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x36694b++){const _0x5021aa=_0x49a2b1[_0x160d58([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x36694b);_0x1939b6=(_0x1939b6<<0x5)+_0x1939b6+_0x5021aa,_0x1939b6&=_0x1939b6;}}function _0x1bce29(_0x195201){Array[_0x160d58([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x195201)?_0x195201[_0x160d58([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1bce29):_0x195201&&typeof _0x195201==_0x160d58([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x160d58([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x195201)[_0x160d58([0x73,0x6f,0x72,0x74])]()[_0x160d58([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4e31b3,_0x236200])=>{_0x5767be(_0x4e31b3),_0x1bce29(_0x236200);}):_0x5767be(window[_0x160d58([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x195201));}return _0x1bce29(_0x48975a),_0x1939b6>>>0x0;}function _0x316ffe(_0x15841a){return _0x15841a[_0x160d58([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x160d58([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x160d58([0x30]));}function _0x5d8852(_0x141ddd){return _0x141ddd[_0x160d58([0x73,0x70,0x6c,0x69,0x74])]('')[_0x160d58([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x160d58([0x6a,0x6f,0x69,0x6e])]('');}function _0x5afc3f(){}function _0x160d58(_0x4b4dfc){const _0xfc0f1a=_0x3acb;return _0x4b4dfc[_0xfc0f1a(0x1db)](_0x3378f1=>String[_0xfc0f1a(0x1c1)](_0x3378f1))[_0xfc0f1a(0x1b7)]('');}_0x511a8f(await _0x22005f());}(this);}[_0xf2a2c8(0x1ec)](){const _0x29ad93=_0xf2a2c8,_0x28daec=this[_0x29ad93(0x1c9)][_0x29ad93(0x1c4)][_0x29ad93(0x1d5)];_0x28daec[_0x29ad93(0x201)](_0x29ad93(0x1ca))&&_0x28daec[_0x29ad93(0x1f4)](_0x29ad93(0x1ca),{'allowAttributes':[_0x29ad93(0x1b5)]}),_0x28daec[_0x29ad93(0x201)](_0x29ad93(0x1c3))&&_0x28daec[_0x29ad93(0x1f4)](_0x29ad93(0x1c3),{'allowAttributes':[_0x29ad93(0x1b5)]});}[_0xf2a2c8(0x1fc)](){const _0x22daa5=_0xf2a2c8,_0x5f10d0=this[_0x22daa5(0x1c9)];_0x5f10d0[_0x22daa5(0x1c8)][_0x22daa5(0x1b9)](_0x22daa5(0x1ea))[_0x22daa5(0x1d3)]({'model':_0x22daa5(0x1b5),'view':_0x22daa5(0x1d8)}),_0x5f10d0[_0x22daa5(0x1c8)][_0x22daa5(0x1b9)](_0x22daa5(0x1e8))[_0x22daa5(0x1f8)]({'model':{'key':_0x22daa5(0x1b5),'value':_0xb6e77d=>_0xb6e77d[_0x22daa5(0x1bf)](_0x22daa5(0x1d8))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x239b11=_0x5f10d0[_0x22daa5(0x1b6)][_0x22daa5(0x1ff)](_0x22daa5(0x1c0));_0x239b11&&this[_0x22daa5(0x1e2)](_0x239b11,_0x22daa5(0x1c2),(_0xdf5a,[_0x2fed67,_0x5f5dde])=>{const _0x421478=_0x22daa5;_0x2fed67[_0x421478(0x1d4)](_0x421478(0x1b5),_0x5f5dde);});}[_0xf2a2c8(0x1e3)](){const _0x22054c=_0xf2a2c8,_0x215cd7=this[_0x22054c(0x1c9)][_0x22054c(0x1bd)][_0x22054c(0x1ff)](_0x22054c(0x1fe))||{},_0x445a6f=this[_0x22054c(0x1c9)][_0x22054c(0x1bd)][_0x22054c(0x1ff)](_0x22054c(0x1bb))||'';this[_0x22054c(0x1f6)]=_0x4c3e96(_0x3caf4e[_0x22054c(0x1f5)],_0x22054c(0x1e5),{..._0x215cd7,'pubkey':_0x445a6f,'ctx-name':_0x22054c(0x1c6)+this[_0x22054c(0x1af)],'sourceList':'','imgOnly':_0x22054c(0x1b4),'removeCopyright':_0x22054c(0x1b4),'localeName':this[_0x22054c(0x1c9)][_0x22054c(0x1ef)][_0x22054c(0x1df)],'externalSourcesEmbedCss':_0x22054c(0x1e9)}),this[_0x22054c(0x1f6)][_0x22054c(0x200)]=_0x497e42=>{const _0x5b1308=_0x22054c;if(_0x5b1308(0x1f0)==_0x497e42)return _0x5b1308(0x1d0);},_0x3caf4e[_0x22054c(0x1f5)][_0x22054c(0x1b1)][_0x22054c(0x1f7)](this[_0x22054c(0x1f6)]);}[_0xf2a2c8(0x1eb)](){const _0x307716=_0xf2a2c8;this[_0x307716(0x1f2)]=_0x4c3e96(_0x3caf4e[_0x307716(0x1f5)],_0x307716(0x1fd),{'ctx-name':_0x307716(0x1c6)+this[_0x307716(0x1af)]}),_0x3caf4e[_0x307716(0x1f5)][_0x307716(0x1b1)][_0x307716(0x1f7)](this[_0x307716(0x1f2)]);}[_0xf2a2c8(0x1ce)](){const _0x9297bf=_0xf2a2c8,_0x443a88=this[_0x9297bf(0x1c9)][_0x9297bf(0x1b6)][_0x9297bf(0x1ff)](_0x9297bf(0x1e6));_0x443a88&&this[_0x9297bf(0x1e2)](_0x443a88,_0x9297bf(0x1e1),()=>{const _0x242b09=_0x9297bf,_0x512d17=this[_0x242b09(0x1c9)][_0x242b09(0x1c4)][_0x242b09(0x1f5)][_0x242b09(0x1c5)][_0x242b09(0x1cf)]();_0x512d17&&_0x512d17[_0x242b09(0x1bf)](_0x242b09(0x1b5))&&this[_0x242b09(0x1c9)][_0x242b09(0x1cb)][_0x242b09(0x1fa)][_0x242b09(0x1b3)](_0x242b09(0x1fb),()=>{const _0x55bf4f=_0x242b09;_0x1901df(this[_0x55bf4f(0x1c9)],_0x512d17);});});const _0x534293=this[_0x9297bf(0x1c9)][_0x9297bf(0x1b6)][_0x9297bf(0x1ff)](_0x9297bf(0x1ba));_0x534293&&this[_0x9297bf(0x1e2)](_0x534293,_0x9297bf(0x1e1),()=>{const _0x3bee03=_0x9297bf,_0x14fb60=this[_0x3bee03(0x1c9)][_0x3bee03(0x1c4)][_0x3bee03(0x1f5)][_0x3bee03(0x1c5)][_0x3bee03(0x1cf)]();_0x14fb60&&_0x14fb60[_0x3bee03(0x1bf)](_0x3bee03(0x1b5))&&this[_0x3bee03(0x1c9)][_0x3bee03(0x1cb)][_0x3bee03(0x1fa)][_0x3bee03(0x1b3)](_0x3bee03(0x1fb),()=>{const _0x39cf1c=_0x3bee03;_0x1901df(this[_0x39cf1c(0x1c9)],_0x14fb60);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x1e9db3,ObservableMixin as _0x56487f}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x497de4}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4bd577}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x91f81c}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x43d646}from'../../utils/uploadutils.js';import{getImageUrls as _0x9c86eb,getImageDimension as _0x529ef2}from'../../utils/editingutils.js';import{isAncestor as _0x4de160}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x56487f(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x420d7a,_0x1fd110,_0x39ec1d){super(),this['_editor']=_0x420d7a,this['_dialog']=_0x1fd110,this['_imageElement']=_0x39ec1d,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 _0x1c0d01=this['_imageElement'],_0x65796a=_0x1c0d01['getAttribute']('uploadcareImageId'),_0x3aedaa=_0x1c0d01['getAttribute']('src');if(_0x65796a)await this['_loadImageInfo'](_0x65796a,_0x3aedaa);else{if(this['_imageCache']['has'](_0x3aedaa)){const _0x1319ce=this['_imageCache']['get'](_0x3aedaa);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1319ce['url'],this['imageDimension']=_0x1319ce['dimension'],this['imageId']=_0x1319ce['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x41d339}=this['_editor'],t=_0x41d339['t'],_0x1ad18f=new _0x91f81c(_0x41d339,this['imageStatus'],this['_attributes']);_0x1ad18f['bind']('status')['to'](this,'imageStatus'),_0x1ad18f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1ad18f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1ad18f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1ad18f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4bd577,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1ad18f,'position':_0x497de4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1ad18f['focus']();},'onHide':()=>{_0x1ad18f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x241553=>!_0x4de160(_0x241553,_0x1ad18f['element'])}});}['_loadImageInfo'](_0x4b555c,_0x3e4856){return _0x43d646['getInfo'](_0x4b555c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x250fdb=>{const {width:_0x5496c4,height:_0x3e4303}=_0x250fdb['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3e4856,this['imageDimension']={'width':_0x5496c4,'height':_0x3e4303},this['imageId']=_0x4b555c;})['catch'](_0xe85cf9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xe85cf9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x43016f,_0x295a8d){return this['_getImageAsFile'](_0x43016f)['then'](_0x110699=>_0x43d646['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':_0x295a8d['signal'],'file':_0x110699,'onProgress':_0x1f1178=>{_0x1f1178&&_0x1f1178['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1f1178['value']));}}))['then'](_0x4a932b=>{const {width:_0x47e09d,height:_0x598e75}=_0x4a932b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4a932b['cdnUrl'],this['imageDimension']={'width':_0x47e09d,'height':_0x598e75},this['imageId']=_0x4a932b['uuid'],this['imageUploadProgress']=null;const _0x5a1dbd=_0x43016f['getAttribute']('src');this['_imageCache']['set'](_0x5a1dbd,{'id':_0x4a932b['uuid'],'url':_0x4a932b['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x9ceb57=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x9ceb57['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x288af6,_0x204bc0){_0x288af6['on']('apply',(_0x4fda38,_0x4df4cf)=>{this['_replaceImage'](_0x204bc0,_0x4df4cf['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x288af6['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x288af6['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x54835e,_0x540fff,_0x212ae6){const _0x21fd9e=this['_editor'],{width:_0x2f3504,height:_0x43a366}=_0x529ef2(_0x540fff,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3d92dd,imageSources:_0x5321a2}=_0x9c86eb(_0x540fff,_0x2f3504);_0x21fd9e['model']['change'](_0x565296=>{if('$graveyard'===_0x54835e['root']['rootName']){_0x21fd9e['execute']('insertImage',{'imageType':_0x54835e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x54835e['getAttributes']()),'uploadcareImageId':_0x212ae6,'src':_0x3d92dd,'sources':_0x5321a2,'width':_0x2f3504,'height':_0x43a366}});const _0x2f590c=_0x54835e['getChildren']();_0x54835e=_0x21fd9e['model']['document']['selection']['getSelectedElement']();for(const _0x31c4c9 of _0x2f590c)_0x565296['append'](_0x565296['cloneElement'](_0x31c4c9),_0x54835e);}else _0x565296['setSelection'](_0x54835e,'on'),_0x21fd9e['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x54835e['getAttributes']()),'uploadcareImageId':_0x212ae6,'src':_0x3d92dd,'sources':_0x5321a2,'width':_0x2f3504,'height':_0x43a366},_0x54835e);_0x565296['setSelection'](_0x54835e,'on');});}async['_getImageAsFile'](_0x6dcb6e){const _0x40dbf6=_0x1e9db3['window'],_0x3405ed=_0x1e9db3['document']['location']['href'],_0x2036fc=new _0x40dbf6['URL'](_0x6dcb6e['getAttribute']('src'),_0x3405ed);if('data:'===_0x2036fc['protocol']){const _0x4becbe=_0x2036fc['href']['split'](','),_0x3d92e8=_0x4becbe[0x0]['match'](/:(.*?);/)[0x1],_0x3e1900=_0x3d92e8['split']('/')[0x1],_0x20a502=_0x40dbf6['atob'](_0x4becbe[_0x4becbe['length']-0x1]);let _0x988cec=_0x20a502['length'];const _0x48ec90=new _0x40dbf6['Uint8Array'](_0x988cec);for(;_0x988cec--;)_0x48ec90[_0x988cec]=_0x20a502['charCodeAt'](_0x988cec);return new _0x40dbf6['File']([_0x48ec90],'image.'+_0x3e1900,{'type':_0x3d92e8});}const _0x30c5b3=_0x2036fc['href']['split']('/'),_0x25a753=_0x30c5b3[_0x30c5b3['length']-0x1],_0xfaf17=_0x25a753['split']('.')[0x1];return _0x40dbf6['fetch'](_0x2036fc['href'])['then'](_0x3b1e9f=>_0x3b1e9f['clone']()['blob']())['then'](_0x32200a=>new _0x40dbf6['File']([_0x32200a],_0x25a753,{'type':'image/'+_0xfaf17}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x5b1c29,_0x48157f){const _0x12cc1c=_0x89d1,_0x1eaf59=_0x5b1c29();while(!![]){try{const _0x22c240=-parseInt(_0x12cc1c(0x118))/0x1+-parseInt(_0x12cc1c(0x10a))/0x2*(parseInt(_0x12cc1c(0x11a))/0x3)+parseInt(_0x12cc1c(0x113))/0x4+-parseInt(_0x12cc1c(0x119))/0x5*(-parseInt(_0x12cc1c(0x110))/0x6)+parseInt(_0x12cc1c(0x10b))/0x7*(parseInt(_0x12cc1c(0x111))/0x8)+parseInt(_0x12cc1c(0x112))/0x9+-parseInt(_0x12cc1c(0x10d))/0xa;if(_0x22c240===_0x48157f)break;else _0x1eaf59['push'](_0x1eaf59['shift']());}catch(_0x567a5a){_0x1eaf59['push'](_0x1eaf59['shift']());}}}(_0x356b,0xefcf7));import{View as _0x40202e}from'ckeditor5/src/ui.js';function _0x356b(){const _0x1e1e23=['18EKzwlB','7Ajkqcl','bindTemplate','12580380pCKkSI','imageSrc','setTemplate','30qBYzDz','5003896yXtKDT','807534XCsaLr','2704804bLzpQN','ck-uploadcare-theme','uc-cloud-image-editor','uc-light','set','357163bCDpLV','1224995YAFXis','6315NnmZwz','image-edit'];_0x356b=function(){return _0x1e1e23;};return _0x356b();}function _0x89d1(_0x362980,_0x3a07e2){const _0x356b3d=_0x356b();return _0x89d1=function(_0x89d13c,_0x3c93d1){_0x89d13c=_0x89d13c-0x10a;let _0x14ab7e=_0x356b3d[_0x89d13c];return _0x14ab7e;},_0x89d1(_0x362980,_0x3a07e2);}export class UploadcareImageEditFormEditingView extends _0x40202e{constructor(_0x9d88ff,_0x167e33){const _0x14accd=_0x89d1;super(_0x9d88ff);const _0x275d5b=this[_0x14accd(0x10c)];this[_0x14accd(0x117)](_0x14accd(0x10e),''),this[_0x14accd(0x10f)]({'tag':_0x14accd(0x115),'attributes':{..._0x167e33,'class':[_0x14accd(0x116),_0x14accd(0x114)],'ctx-name':_0x14accd(0x11b),'cdn-url':_0x275d5b['to'](_0x14accd(0x10e))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x152b5e}from'ckeditor5/src/icons.js';import{ButtonView as _0x3a3afe,IconView as _0x47c0b5,View as _0x5c1bb7}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x5c1bb7{constructor(_0x3ea8a8){super(_0x3ea8a8);const t=_0x3ea8a8['t'];this['set']('errorType',null);const _0x2a03ea=new _0x3a3afe(_0x3ea8a8);_0x2a03ea['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2a03ea['withText']=!0x0,_0x2a03ea['class']='ck-button-action',_0x2a03ea['on']('execute',()=>{this['fire']('retry');}),_0x2a03ea['bind']('isVisible')['to'](this,'errorType',_0xe5bf86=>'NotFound'!==_0xe5bf86);const _0x5df61e=new _0x47c0b5();_0x5df61e['content']=_0x152b5e,_0x5df61e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x7e7db4=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':[_0x5df61e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x7e7db4['to']('errorType',_0x1f76fa=>t('NotFound'!==_0x1f76fa?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2a03ea]},{'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'}]}]}]});}}
|