@ckeditor/ckeditor5-uploadcare 47.4.0-alpha.2 → 47.4.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 _0x2c9ec5,Command as _0x340ba3}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2487e4,IconGooglePhotos as _0x4795c0,IconGoogleDrive as _0x3f9010,IconFacebook as _0x16d930,IconDropbox as _0x1013a5,IconUploadcareLink as _0x379d01,IconUploadcareImageUpload as _0x4fca51,IconError as _0x367b8c,IconUploadcareImageEdit as _0x4ba6e4}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1f56a3,MenuBarMenuListItemButtonView as _0x29e4df,View as _0x56856a,FocusCycler as _0x166141,Dialog as _0x53818d,DialogViewPosition as _0xdf23b5,SpinnerView as _0x49c774,IconView as _0x36c794,Notification as _0x258fba}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2af186,DomEmitterMixin as _0xd9e5e8,global as _0x391e65,getAncestors as _0x48e23b,ObservableMixin as _0x553239,uid as _0x379c4a,createElement as _0x4c768c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x3e7ba4}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2a9864,info as _0x3ab88b}from'@uploadcare/upload-client';import*as _0x40bc2f from'@uploadcare/file-uploader';var i=function(_0x338f0b){return _0x338f0b['Local']='local',_0x338f0b['URL']='url',_0x338f0b['Dropbox']='dropbox',_0x338f0b['GDrive']='gdrive',_0x338f0b['Facebook']='facebook',_0x338f0b['GPhotos']='gphotos',_0x338f0b['OneDrive']='onedrive',_0x338f0b;}({});function _(_0x2e58c2,_0x52b36c,_0x296d97){const t=_0x2e58c2['t'],_0x235e5d=_0x2e58c2['t'];switch(_0x52b36c){case i['Local']:return{'text':_0x235e5d('Insert'===_0x296d97?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x235e5d('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x296d97?_0x235e5d('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x235e5d('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x52b36c;}}class e extends _0x2c9ec5{['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 _0x42120f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x17f7b5;for(const _0x4e5bc8 in _0x42120f){const _0x5dd3b0=_0x4e5bc8,_0x47d709=_0x42120f[_0x5dd3b0];if('uploadcareLicenseKeyValid'==_0x47d709||'uploadcareLicenseKeyInvalid'==_0x47d709||'uploadcareLicenseKeyExpired'==_0x47d709||'uploadcareLicenseKeyDomainLimit'==_0x47d709||'uploadcareLicenseKeyNotAllowed'==_0x47d709||'uploadcareLicenseKeyEvaluationLimit'==_0x47d709||'uploadcareLicenseKeyUsageLimit'==_0x47d709){delete _0x42120f[_0x5dd3b0],_0x17f7b5=_0x47d709,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x17f7b5&&_0x42120f['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x17f7b5&&_0x42120f['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x17f7b5&&_0x42120f['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x17f7b5&&_0x42120f['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x17f7b5&&_0x42120f['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x17f7b5&&_0x42120f['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x514e6d}=this,_0x30339d=_0x514e6d['commands']['get']('uploadcare');if(!_0x30339d)return;const _0x5507da=this['_normalizeConfigSourceList'](_0x514e6d['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x1d8102,_0x3f0816)=>{const _0x21b7b5=this['_getIntegrationKey'](_0x3f0816['type']);return _0x1d8102[_0x21b7b5]||(_0x1d8102[_0x21b7b5]=[]),_0x1d8102[_0x21b7b5]['push'](_0x3f0816),_0x1d8102;},{});_0x514e6d['plugins']['has']('ImageInsertUI')&&_0x514e6d['commands']['get']('uploadcare')&&Object['entries'](_0x5507da)['forEach'](([_0x24dc2f,_0x4eafa9])=>{_0x514e6d['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x24dc2f,'observable':()=>_0x30339d,'buttonViewCreator':()=>this['_createToolbarButton'](_0x4eafa9),'formViewCreator':()=>this['_createDropdownButtons'](_0x4eafa9),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x4eafa9),'override':'assetManager'!==_0x24dc2f});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x5e78c0){const {locale:_0x1e184d}=this['editor'];return _0x5e78c0['map'](_0x2ffd0c=>{const _0x4a99dd=_(_0x1e184d,_0x2ffd0c,'Insert');switch(_0x2ffd0c){case i['Local']:return{'icon':_0x4fca51,'type':i['Local'],..._0x4a99dd};case i['URL']:return{'icon':_0x379d01,'type':i['URL'],..._0x4a99dd};case i['Dropbox']:return{'icon':_0x1013a5,'type':i['Dropbox'],..._0x4a99dd};case i['Facebook']:return{'icon':_0x16d930,'type':i['Facebook'],..._0x4a99dd};case i['GDrive']:return{'icon':_0x3f9010,'type':i['GDrive'],..._0x4a99dd};case i['GPhotos']:return{'icon':_0x4795c0,'type':i['GPhotos'],..._0x4a99dd};case i['OneDrive']:return{'icon':_0x2487e4,'type':i['OneDrive'],..._0x4a99dd};}});}['_getIntegrationKey'](_0x537064){switch(_0x537064){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x592572,_0x4f4216){const _0x360a95=this['editor'],_0x2d5ab8=new _0x592572(_0x360a95['locale']),_0x5037c1=_0x360a95['commands']['get']('uploadcare');return _0x2d5ab8['bind']('isEnabled')['to'](_0x5037c1),_0x2d5ab8['on']('execute',()=>{_0x5037c1['execute'](_0x4f4216);}),_0x2d5ab8;}['_createToolbarButton'](_0x1cfc0b){const {locale:_0x2ab8d7}=this['editor'],_0x2d9bf5=this['editor']['plugins']['get']('ImageInsertUI'),_0x29c39b=_0x1cfc0b[0x0],_0x27cdd1=this['_createButton'](_0x1f56a3,_0x29c39b['type']);return _0x27cdd1['icon']=_0x29c39b['icon'],_0x27cdd1['bind']('label')['to'](_0x2d9bf5,'isImageSelected',_0x4ceffe=>_(_0x2ab8d7,_0x29c39b['type'],_0x4ceffe?'Replace':'Insert')['text']),_0x27cdd1['tooltip']=!0x0,_0x27cdd1;}['_createDropdownButtons'](_0x26c527){const {locale:_0x977894}=this['editor'],_0x296f5c=this['editor']['plugins']['get']('ImageInsertUI');return _0x26c527['map'](_0x3da9e6=>{const _0x4b4cad=this['_createButton'](_0x1f56a3,_0x3da9e6['type']);return _0x4b4cad['withText']=!0x0,_0x4b4cad['icon']=_0x3da9e6['icon'],_0x4b4cad['bind']('label')['to'](_0x296f5c,'isImageSelected',_0x1990d8=>_(_0x977894,_0x3da9e6['type'],_0x1990d8?'Replace':'Insert')['text']),_0x4b4cad;});}['_createMenuBarButtons'](_0x2ff2e8){return _0x2ff2e8['map'](_0x477f76=>{const _0x485840=this['_createButton'](_0x29e4df,_0x477f76['type']);return _0x485840['icon']=_0x477f76['icon'],_0x485840['label']=_0x477f76['shortText'],_0x485840;});}}class F extends _0x56856a{['focusTracker'];['focusCycler'];constructor(_0x55e261){super(_0x55e261),this['focusTracker']=new _0x2af186(),this['focusCycler']=new _0x166141({'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(_0x2046ad,_0x493490){super(_0x2046ad),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-'+_0x493490}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x46c2b5,_0x557f22){const _0x341d50=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x43d81e=>_0x43d81e<=_0x557f22)['map'](_0x2a7b7f=>_0x46c2b5['replace'](/\/$/,'')+'/-/resize/'+_0x2a7b7f+'x/\x20'+_0x2a7b7f+'w');return{'imageFallbackUrl':_0x46c2b5,'imageSources':[{'srcset':_0x341d50['join'](',\x20'),'sizes':'(max-width:\x20'+_0x557f22+'px)\x20100vw,\x20'+_0x557f22+'px','type':'image/webp'}]};}function S(_0x4994dc,_0x109bee,_0xe90e35){const _0xce24bf=_0x4994dc['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0xce24bf?parseInt(_0xce24bf[0x1],0xa):_0x109bee,'height':_0xce24bf?parseInt(_0xce24bf[0x2],0xa):_0xe90e35};}function p(_0x5dc235,_0x381d29){const _0x5b3764=new(_0xd9e5e8())(),_0x23a06a=_0x5dc235['plugins']['get']('ImageUtils'),_0x4a1f47=_0x5dc235['editing']['mapper']['toViewElement'](_0x381d29),_0x2b5dbd=_0x23a06a['findViewImgElement'](_0x4a1f47),_0x27d40e=_0x5dc235['editing']['view']['domConverter']['viewToDom'](_0x2b5dbd),_0x4ce95f=_0x381d29['getAttribute']('width'),_0x544307=_0x381d29['getAttribute']('height'),_0x394e34='image-processing';_0x5dc235['editing']['view']['change'](_0x38aa27=>{_0x38aa27['addClass'](_0x394e34,_0x4a1f47),_0x38aa27['setStyle']('aspect-ratio',_0x4ce95f+'/'+_0x544307,_0x2b5dbd);}),_0x5b3764['listenTo'](_0x27d40e,'load',()=>{_0x5b3764['stopListening'](_0x27d40e,'load'),_0x5dc235['editing']['view']['change'](_0x220d8b=>{_0x220d8b['removeClass'](_0x394e34,_0x4a1f47),_0x220d8b['removeStyle']('aspect-ratio',_0x2b5dbd);});});}function G(_0x4e836b){if(Array['isArray'](_0x4e836b)){const _0x54d988=_0x4e836b['map'](G);return _0xf39895=>_0x54d988['some'](_0x31d0b5=>_0x31d0b5(_0xf39895));}if('origin'==_0x4e836b){const _0x4bb54c=_0x391e65['window']['location']['origin'];return _0x28b820=>new URL(_0x28b820,_0x391e65['document']['baseURI'])['origin']==_0x4bb54c;}return'function'==typeof _0x4e836b?_0x4e836b:_0x4e836b instanceof RegExp?_0x2b9755=>!(!_0x2b9755['match'](_0x4e836b)&&!_0x2b9755['replace'](/^https?:\/\//,'')['match'](_0x4e836b)):()=>!0x1;}function A(_0x577145,_0x5ea058){return _0x48e23b(_0x577145['target'])['includes'](_0x5ea058);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x553239(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x55cbeb,_0x3b4bc4,_0x41199d){super(),this['_editor']=_0x55cbeb,this['_editing']=_0x3b4bc4,this['_dialog']=_0x55cbeb['plugins']['get'](_0x53818d),this['_api']=_0x3b4bc4['ctxElement']['getAPI'](),this['_type']=_0x41199d,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:_0x1f59a5,model:_0xe142dd}=this['_editor'],_0x2ac62c=_0xe142dd['document']['selection']['getSelectedElement'](),_0x1d21cb=_0x2ac62c&&(_0x2ac62c['is']('element','imageBlock')||_0x2ac62c['is']('element','imageInline'));this['_formView']=new x(_0x1f59a5,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4fca51,'title':_(_0x1f59a5,this['_type'],_0x1d21cb?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xdf23b5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x177afe=>!A(_0x177afe,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x21c5a0}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x8d7c01=>{const _0x3b31b4=_0x21c5a0['length'];for(const _0x5525dd of _0x21c5a0){const _0x9eba88=_0x5525dd===_0x21c5a0[_0x3b31b4-0x1],{cdnUrl:_0x1d2340,fileInfo:_0x598c85}=_0x5525dd;if(!_0x1d2340||!_0x598c85)continue;const {width:_0x3e0b87,height:_0x54ac79}=_0x598c85['imageInfo'],_0x37abac=S(_0x1d2340,_0x3e0b87,_0x54ac79),_0x1f15fc=C(_0x1d2340,_0x37abac['width']),_0x439368={'id':_0x598c85['uuid'],'type':'image','attributes':{'imageDimension':_0x37abac,..._0x1f15fc}};this['_insertAsset'](_0x439368,_0x9eba88,_0x8d7c01);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1694c4=>{'idle'===_0x1694c4['detail']['status']&&!_0x1694c4['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4dab0e,_0x5c1ce5,_0x33af2b){const _0x499498=this['_editor']['model']['document']['selection'],_0x3d371a=_0x499498['getSelectedElement'](),_0x364f4f=!(!_0x3d371a||!_0x3d371a['is']('element','imageInline'));_0x33af2b['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4dab0e,_0x364f4f),_0x5c1ce5||_0x33af2b['setSelection'](_0x499498['getLastPosition']());}['_insertImage'](_0x23198a,_0x3bfba6){const _0x19be75=this['_editor'],{imageDimension:_0x41a812,imageFallbackUrl:_0x394647,imageSources:_0x3f60c6}=_0x23198a['attributes'];_0x19be75['execute']('insertImage',{'imageType':_0x3bfba6?'imageInline':null,'source':{'uploadcareImageId':_0x23198a['id'],'src':_0x394647,'sources':_0x3f60c6,..._0x41a812}});}}class w extends _0x340ba3{['_editing'];['_controller']=null;static get['requires'](){return[_0x53818d,o];}constructor(_0x6c650){super(_0x6c650),this['_editing']=_0x6c650['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x845361){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x845361);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x30e146,..._0x10b58b}){return _0x2a9864(_0x30e146,_0x10b58b);}static['getInfo'](_0x1cb687,_0xf5fe54){return _0x3ab88b(_0x1cb687,_0xf5fe54);}}class f extends _0x2c9ec5{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x3e7ba4,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x9bfea5=this['editor'];if(!!!_0x9bfea5['config']['get']('uploadcare'))return;_0x9bfea5['plugins']['get'](_0x3e7ba4)['createUploadAdapter']=_0x4d749b=>new k(_0x4d749b,_0x9bfea5),_0x9bfea5['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4c9125,{imageElement:_0x43f27c,data:_0x59accf})=>{_0x9bfea5['model']['change'](_0x1f7b94=>{_0x1f7b94['setAttribute']('uploadcareImageId',_0x59accf['uploadcareImageId'],_0x43f27c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x41fff7,_0x21313c){this['loader']=_0x41fff7,this['editor']=_0x21313c,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x3a8266=await this['loader']['file'];return j['upload']({'file':_0x3a8266,'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':_0x4d4831=>{_0x4d4831&&_0x4d4831['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x4d4831['value']);}})['then'](async _0x3163ce=>{const {imageFallbackUrl:_0x114150,imageSources:_0xeed8dc}=C(_0x3163ce['cdnUrl'],_0x3163ce['imageInfo']['width']);return{'uploadcareImageId':_0x3163ce['uuid'],'default':_0x114150,'sources':_0xeed8dc};})['catch'](()=>{const _0x4aa0c4=t('Cannot\x20upload\x20file:')+('\x20'+_0x3a8266['name']+'.');return Promise['reject'](_0x4aa0c4);});}['abort'](){this['controller']['abort']();}}class o extends _0x2c9ec5{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x53818d];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x76a733){super(_0x76a733),this['ucContextId']=_0x379c4a();}['init'](){const _0x4141e8=this['editor'];_0x4141e8['commands']['add']('uploadcare',new w(_0x4141e8));}['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 _0x476f5a=_0x391e65['document']['querySelector']('input[uploadcare-file-input]');_0x476f5a&&_0x476f5a['remove']();}),async function(_0x584050){const _0x735bf1=_0x45c2fe([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]),_0x430c93=0x535f8c3a,_0x57e004=0x5358f252^_0x430c93,_0x1a0483=window[_0x45c2fe([0x44,0x61,0x74,0x65])][_0x45c2fe([0x6e,0x6f,0x77])](),_0x3e1ad8=_0x584050[_0x45c2fe([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4310d1=new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17d991=>{_0x3e1ad8[_0x45c2fe([0x6f,0x6e,0x63,0x65])](_0x45c2fe([0x72,0x65,0x61,0x64,0x79]),_0x17d991);}),_0xf2fe0b={[_0x45c2fe([0x6b,0x74,0x79])]:_0x45c2fe([0x45,0x43]),[_0x45c2fe([0x75,0x73,0x65])]:_0x45c2fe([0x73,0x69,0x67]),[_0x45c2fe([0x63,0x72,0x76])]:_0x45c2fe([0x50,0x2d,0x32,0x35,0x36]),[_0x45c2fe([0x78])]:_0x45c2fe([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]),[_0x45c2fe([0x79])]:_0x45c2fe([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]),[_0x45c2fe([0x61,0x6c,0x67])]:_0x45c2fe([0x45,0x53,0x32,0x35,0x36])},_0x4961dc=_0x3e1ad8[_0x45c2fe([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x45c2fe([0x67,0x65,0x74])](_0x45c2fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3386fb(){let _0x4ab03f,_0x484e3b=null,_0x260696=null;try{if(_0x4961dc==_0x45c2fe([0x47,0x50,0x4c]))return _0x45c2fe([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4ab03f=_0x33bc18(),!_0x4ab03f)return _0x45c2fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4ab03f[_0x45c2fe([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x260696=_0x4c64d3(_0x4ab03f[_0x45c2fe([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4ab03f[_0x45c2fe([0x6a,0x74,0x69])])),await _0x2e6635()?_0x2613b4()?_0x3387c3()?_0x45c2fe([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x31e7f5()?(_0x4ab03f[_0x45c2fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x45c2fe([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x484e3b=_0x3d77c2(_0x45c2fe([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x298f44()):_0x45c2fe([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x45c2fe([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x45c2fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x45c2fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3387c3(){const _0x85e950=[_0x45c2fe([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x45c2fe([0x74,0x72,0x69,0x61,0x6c])][_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ab03f[_0x45c2fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1a0483/0x3e8:0xe10*_0x57e004;return _0x4ab03f[_0x45c2fe([0x65,0x78,0x70])]<_0x85e950;}function _0x2613b4(){const _0x363193=_0x4ab03f[_0x45c2fe([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x363193&&(!!_0x363193[_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45c2fe([0x2a]))||!!_0x363193[_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45c2fe([0x55,0x50,0x4c,0x43])));}function _0x31e7f5(){const _0xa39fde=_0x4ab03f[_0x45c2fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xa39fde||0x0==_0xa39fde[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x20514a}=new URL(window[_0x45c2fe([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xa39fde[_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x20514a))return!0x0;const _0x30a8b6=_0x20514a[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])](_0x45c2fe([0x2e]));return _0xa39fde[_0x45c2fe([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5627f3=>_0x5627f3[_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45c2fe([0x2a])))[_0x45c2fe([0x6d,0x61,0x70])](_0x2258b2=>_0x2258b2[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])](_0x45c2fe([0x2e])))[_0x45c2fe([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x389ecd=>_0x389ecd[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x30a8b6[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45c2fe([0x6d,0x61,0x70])](_0x44a066=>Array(_0x30a8b6[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x44a066[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45c2fe([0x66,0x69,0x6c,0x6c])](_0x44a066[0x0]===_0x45c2fe([0x2a])?_0x45c2fe([0x2a]):'')[_0x45c2fe([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x44a066))[_0x45c2fe([0x73,0x6f,0x6d,0x65])](_0x2847ed=>_0x30a8b6[_0x45c2fe([0x65,0x76,0x65,0x72,0x79])]((_0x8813e3,_0x1a7da3)=>_0x2847ed[_0x1a7da3]===_0x8813e3||_0x2847ed[_0x1a7da3]===_0x45c2fe([0x2a])));}function _0x298f44(){return _0x484e3b&&_0x260696?new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57391e,_0x1e32fb)=>{_0x484e3b[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0x57391e,_0x1e32fb),_0x260696[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0x425a87=>{_0x425a87!=_0x45c2fe([0x56,0x61,0x6c,0x69,0x64])&&_0x57391e(_0x425a87);},_0x1e32fb);}):_0x484e3b||_0x260696||_0x45c2fe([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4c64d3(_0x363481,_0x5ce32d){return new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x405939=>{if(_0x1b6c53())return _0x405939(_0x45c2fe([0x56,0x61,0x6c,0x69,0x64]));_0xbf23a6(),_0x3e1ad8[_0x45c2fe([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x45c2fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x54e196=!0x1;const _0x28cc13=_0x379c4a();function _0x3f3dc6(_0x3f7814){return!!_0x3f7814&&(typeof _0x3f7814===_0x45c2fe([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3f7814===_0x45c2fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3f7814[_0x45c2fe([0x74,0x68,0x65,0x6e])]===_0x45c2fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3f7814[_0x45c2fe([0x63,0x61,0x74,0x63,0x68])]===_0x45c2fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x35bbb0(_0x4156b0){_0x8ac2a7(_0x4156b0)[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0xf70176=>{if(!_0xf70176||_0xf70176[_0x45c2fe([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x45c2fe([0x6f,0x6b]))return _0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5c8e19(_0x39f88c(_0x28cc13+_0x5ce32d))!=_0xf70176[_0x45c2fe([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x45c2fe([0x56,0x61,0x6c,0x69,0x64]);})[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0xf49578=>(_0x1593fa(),_0xf49578),()=>{const _0x7fcb75=_0x1cfc05();return null==_0x7fcb75?(_0x1593fa(),_0x45c2fe([0x56,0x61,0x6c,0x69,0x64])):_0x45c2fe(_0x1a0483-_0x7fcb75>(0x7753083a^_0x430c93)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0x405939)[_0x45c2fe([0x63,0x61,0x74,0x63,0x68])](()=>{_0x405939(_0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x379341=0x536962ba^_0x430c93;function _0x1593fa(){const _0x50ae0f=_0x45c2fe([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c8e19(_0x39f88c(_0x363481)),_0xfd4af0=_0x55f9a3(_0x5c8e19(window[_0x45c2fe([0x4d,0x61,0x74,0x68])][_0x45c2fe([0x63,0x65,0x69,0x6c])](_0x1a0483/_0x379341)));window[_0x45c2fe([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45c2fe([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x50ae0f,_0xfd4af0);}function _0x1cfc05(){const _0x35f18a=_0x45c2fe([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c8e19(_0x39f88c(_0x363481)),_0x56cf19=window[_0x45c2fe([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45c2fe([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35f18a);return _0x56cf19?window[_0x45c2fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x55f9a3(_0x56cf19),0x10)*_0x379341:null;}function _0x8ac2a7(_0x29f415){return new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x21eb1e,_0x12007b)=>{_0x29f415[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0x21eb1e,_0x12007b),window[_0x45c2fe([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x12007b,0x535e58fa^_0x430c93);});}}_0x3e1ad8[_0x45c2fe([0x6f,0x6e])](_0x45c2fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x15d491,_0x22dc12)=>{if(_0x22dc12[0x0]!=_0x363481)return _0x405939(_0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x22dc12[0x1]={..._0x22dc12[0x1],[_0x45c2fe([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x28cc13};},{[_0x45c2fe([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45c2fe([0x68,0x69,0x67,0x68])}),_0x3e1ad8[_0x45c2fe([0x6f,0x6e])](_0x45c2fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x150860=>{_0x3f3dc6(_0x150860[_0x45c2fe([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x54e196=!0x0,_0x35bbb0(_0x150860[_0x45c2fe([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x45c2fe([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45c2fe([0x6c,0x6f,0x77])}),_0x4310d1[_0x45c2fe([0x74,0x68,0x65,0x6e])](()=>{_0x54e196||_0x405939(_0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1b6c53(){return _0x3e1ad8[_0x45c2fe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45c2fe([0x76,0x69,0x65,0x77])][_0x45c2fe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x45c2fe([0x61,0x75,0x74,0x6f]);}function _0xbf23a6(){_0x3e1ad8[_0x45c2fe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45c2fe([0x76,0x69,0x65,0x77])][_0x45c2fe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x45c2fe([0x61,0x75,0x74,0x6f]);}}function _0x3d77c2(_0x391407){const _0x47086c=[new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f774a=>setTimeout(_0x2f774a,0x5356b2f6^_0x430c93)),_0x4310d1[_0x45c2fe([0x74,0x68,0x65,0x6e])](()=>new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31652c=>{let _0xfcaa95=0x0;_0x3e1ad8[_0x45c2fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x45c2fe([0x6f,0x6e])](_0x45c2fe([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x236513,_0x917922)=>{_0x917922[0x0][_0x45c2fe([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xfcaa95++,_0xfcaa95==(0x535f89d2^_0x430c93)&&(_0x31652c(),_0x236513[_0x45c2fe([0x6f,0x66,0x66])]());});}))];return window[_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x45c2fe([0x72,0x61,0x63,0x65])](_0x47086c)[_0x45c2fe([0x74,0x68,0x65,0x6e])](()=>_0x391407);}async function _0x3e61ea(){await _0x4310d1,_0x3e1ad8[_0x45c2fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x45c2fe([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x44c079,_0x3e1ad8[_0x45c2fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x45c2fe([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x44c079,_0x3e1ad8[_0x45c2fe([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x45c2fe([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4683a5(_0x48a0a3){const _0x13c5a8=_0x538d03();_0x3e1ad8[_0x13c5a8]=_0x45c2fe([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x48a0a3,_0x48a0a3!=_0x45c2fe([0x56,0x61,0x6c,0x69,0x64])&&_0x3e61ea();}function _0x538d03(){const _0x5e0eb7=window[_0x45c2fe([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x45c2fe([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x45c2fe([0x6e,0x6f,0x77])]())[_0x45c2fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x45c2fe([0x2e]),'');let _0x42fe52=_0x45c2fe([0x68]);for(let _0x1e1561=0x0;_0x1e1561<_0x5e0eb7[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1e1561+=0x2){let _0x5edd53=window[_0x45c2fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e0eb7[_0x45c2fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1e1561,_0x1e1561+0x2));_0x5edd53>=_0x735bf1[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5edd53-=_0x735bf1[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x42fe52+=_0x735bf1[_0x5edd53];}return _0x42fe52;}function _0x33bc18(){const _0x298682=_0x4961dc[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])](_0x45c2fe([0x2e]));if(0x3!=_0x298682[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2eecf9(_0x298682[0x1]);function _0x2eecf9(_0x51381c){const _0x544ccc=_0x17c4f6(_0x51381c);return _0x544ccc&&_0x577af7()?_0x544ccc:null;function _0x577af7(){const _0x15f2c6=_0x544ccc[_0x45c2fe([0x6a,0x74,0x69])],_0x2c2817=window[_0x45c2fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15f2c6[_0x45c2fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15f2c6[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x28a0b3={..._0x544ccc,[_0x45c2fe([0x6a,0x74,0x69])]:_0x15f2c6[_0x45c2fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x15f2c6[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x28a0b3[_0x45c2fe([0x76,0x63])],_0x39f88c(_0x28a0b3)==_0x2c2817;}}}async function _0x2e6635(){let _0x5577c6=!0x0;try{const _0x593ad=_0x4961dc[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])](_0x45c2fe([0x2e])),[_0x4a54f6,_0x373846,_0x33690e]=_0x593ad;return _0x273640(_0x4a54f6),await _0xa514bb(_0x4a54f6,_0x373846,_0x33690e),_0x5577c6;}catch{return!0x1;}function _0x273640(_0xc20ba3){const _0x26535b=_0x17c4f6(_0xc20ba3);_0x26535b&&_0x26535b[_0x45c2fe([0x61,0x6c,0x67])]==_0x45c2fe([0x45,0x53,0x32,0x35,0x36])||(_0x5577c6=!0x1);}async function _0xa514bb(_0x23cf0e,_0x4c98ed,_0x19fd2f){const _0x5efa8a=window[_0x45c2fe([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x45c2fe([0x66,0x72,0x6f,0x6d])](_0x4be939(_0x19fd2f),_0x4766ac=>_0x4766ac[_0x45c2fe([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x52d160=new window[(_0x45c2fe([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x45c2fe([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x23cf0e+_0x45c2fe([0x2e])+_0x4c98ed),_0x1e1f14=window[_0x45c2fe([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x45c2fe([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1e1f14)return;const _0x12d703=await _0x1e1f14[_0x45c2fe([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x45c2fe([0x6a,0x77,0x6b]),_0xf2fe0b,{[_0x45c2fe([0x6e,0x61,0x6d,0x65])]:_0x45c2fe([0x45,0x43,0x44,0x53,0x41]),[_0x45c2fe([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x45c2fe([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x45c2fe([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1e1f14[_0x45c2fe([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x45c2fe([0x6e,0x61,0x6d,0x65])]:_0x45c2fe([0x45,0x43,0x44,0x53,0x41]),[_0x45c2fe([0x68,0x61,0x73,0x68])]:{[_0x45c2fe([0x6e,0x61,0x6d,0x65])]:_0x45c2fe([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x12d703,_0x5efa8a,_0x52d160)||(_0x5577c6=!0x1);}}function _0x17c4f6(_0x3856b0){return _0x3856b0[_0x45c2fe([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x45c2fe([0x65,0x79]))?JSON[_0x45c2fe([0x70,0x61,0x72,0x73,0x65])](_0x4be939(_0x3856b0)):null;}function _0x4be939(_0x582974){return window[_0x45c2fe([0x61,0x74,0x6f,0x62])](_0x582974[_0x45c2fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x45c2fe([0x2b]))[_0x45c2fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x45c2fe([0x2f])));}function _0x39f88c(_0x45e12b){let _0x1e3361=0x1505;function _0x193f2c(_0x489e99){for(let _0x360ad8=0x0;_0x360ad8<_0x489e99[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x360ad8++){const _0x5334ac=_0x489e99[_0x45c2fe([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x360ad8);_0x1e3361=(_0x1e3361<<0x5)+_0x1e3361+_0x5334ac,_0x1e3361&=_0x1e3361;}}function _0x2d6c05(_0x4fcc04){Array[_0x45c2fe([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4fcc04)?_0x4fcc04[_0x45c2fe([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2d6c05):_0x4fcc04&&typeof _0x4fcc04==_0x45c2fe([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x45c2fe([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4fcc04)[_0x45c2fe([0x73,0x6f,0x72,0x74])]()[_0x45c2fe([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1f9c67,_0x97a805])=>{_0x193f2c(_0x1f9c67),_0x2d6c05(_0x97a805);}):_0x193f2c(window[_0x45c2fe([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4fcc04));}return _0x2d6c05(_0x45e12b),_0x1e3361>>>0x0;}function _0x5c8e19(_0x542592){return _0x542592[_0x45c2fe([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x45c2fe([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x45c2fe([0x30]));}function _0x55f9a3(_0x42802f){return _0x42802f[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])]('')[_0x45c2fe([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x45c2fe([0x6a,0x6f,0x69,0x6e])]('');}function _0x44c079(){}function _0x45c2fe(_0x3747a2){return _0x3747a2['map'](_0x411122=>String['fromCharCode'](_0x411122))['join']('');}_0x4683a5(await _0x3386fb());}(this);}['_initSchema'](){const _0x95490e=this['editor']['model']['schema'];_0x95490e['isRegistered']('imageBlock')&&_0x95490e['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x95490e['isRegistered']('imageInline')&&_0x95490e['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x53f4bb=this['editor'];_0x53f4bb['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x53f4bb['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x6a69b3=>_0x6a69b3['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x2f931d=_0x53f4bb['commands']['get']('replaceImageSource');_0x2f931d&&this['listenTo'](_0x2f931d,'cleanupImage',(_0x2bc013,[_0x5d1f51,_0x121e8b])=>{_0x5d1f51['removeAttribute']('uploadcareImageId',_0x121e8b);});}['_initConfig'](){const _0x14bb72=this['editor']['config']['get']('uploadcare.uploader')||{},_0x2b1dbc=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4c768c(_0x391e65['document'],'uc-config',{..._0x14bb72,'pubkey':_0x2b1dbc,'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']=_0x2b039c=>{if('closeMax'==_0x2b039c)return'#uc-icon-arrow-down';},_0x391e65['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4c768c(_0x391e65['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x391e65['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0xd591fa=this['editor']['commands']['get']('insertImage');_0xd591fa&&this['listenTo'](_0xd591fa,'execute',()=>{const _0x17e220=this['editor']['model']['document']['selection']['getSelectedElement']();_0x17e220&&_0x17e220['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x17e220);});});const _0x1b6604=this['editor']['commands']['get']('uploadcareImageReplace');_0x1b6604&&this['listenTo'](_0x1b6604,'execute',()=>{const _0x32aa86=this['editor']['model']['document']['selection']['getSelectedElement']();_0x32aa86&&_0x32aa86['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x32aa86);});});}}class tt extends _0x2c9ec5{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x151ee2){super(_0x151ee2),_0x151ee2['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x40bc2f['defineComponents'](_0x40bc2f),this['_defineLocale']();}['_defineLocale'](){const _0x39e909=this['editor']['config']['get']('uploadcare.locale'),_0x4c30b5=this['editor']['locale']['contentLanguage'];_0x39e909&&_0x40bc2f['defineLocale'](_0x4c30b5,_0x39e909);}}class ii extends _0x56856a{constructor(_0x9440c8){super(_0x9440c8);const t=_0x9440c8['t'],_0x4db71d=this['bindTemplate'],_0x540d88=new _0x49c774();_0x540d88['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':[_0x540d88,{'text':_0x4db71d['to']('imageUploadProgress',_0x3a0bfa=>t('Loading\x20image...')+'\x20('+(_0x3a0bfa||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 _0x56856a{constructor(_0x2b3fe3){super(_0x2b3fe3);const t=_0x2b3fe3['t'];this['set']('errorType',null);const _0x575e8d=new _0x1f56a3(_0x2b3fe3);_0x575e8d['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x575e8d['withText']=!0x0,_0x575e8d['class']='ck-button-action',_0x575e8d['on']('execute',()=>{this['fire']('retry');}),_0x575e8d['bind']('isVisible')['to'](this,'errorType',_0x3de963=>'NotFound'!==_0x3de963);const _0xf932ee=new _0x36c794();_0xf932ee['content']=_0x367b8c,_0xf932ee['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3b9fd8=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':[_0xf932ee,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3b9fd8['to']('errorType',_0x47a6a2=>t('NotFound'!==_0x47a6a2?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x575e8d]},{'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 _0x56856a{constructor(_0x23522a,_0x200e87){super(_0x23522a);const _0x405691=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x200e87,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x405691['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4f943c,_0x69d467,_0x538a5f){super(_0x4f943c),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x4f943c),this['_errorView']=new ti(_0x4f943c),this['_editingView']=new ei(_0x4f943c,_0x538a5f),this['_focusableView']=new _0x56856a(_0x4f943c),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x69d467),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'],_0x5c9fde=>{this['_addUploadcareImageEditorListeners'](_0x5c9fde);});}),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'](_0x57b224,_0x1b52ae){const _0x3bf474='uc-cloud-image-editor',_0x20989e=_0x57b224['querySelector'](_0x3bf474);if(_0x20989e)return _0x1b52ae(_0x20989e);const _0x4f2bdb=new MutationObserver(_0x2d8203=>{const _0x2b96db=_0x2d8203['filter'](_0x48eb5b=>_0x48eb5b['target']===_0x57b224&&_0x48eb5b['addedNodes']['length']>0x0&&_0x48eb5b['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x3bf474);_0x2b96db['length']&&(_0x4f2bdb['disconnect'](),_0x1b52ae(_0x2b96db[0x0]['addedNodes'][0x0]));});_0x4f2bdb['observe'](_0x57b224,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x3d8906){_0x3d8906['addEventListener']('apply',_0x232f45=>{this['fire']('apply',{'imageSrc':_0x232f45['detail']['cdnUrl']});}),_0x3d8906['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x553239(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4cfb91,_0x16d3eb,_0x5d8270){super(),this['_editor']=_0x4cfb91,this['_dialog']=_0x16d3eb,this['_imageElement']=_0x5d8270,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 _0x211fd1=this['_imageElement'],_0x49c6f3=_0x211fd1['getAttribute']('uploadcareImageId'),_0x39a3e6=_0x211fd1['getAttribute']('src');if(_0x49c6f3)await this['_loadImageInfo'](_0x49c6f3,_0x39a3e6);else{if(this['_imageCache']['has'](_0x39a3e6)){const _0x3d75bd=this['_imageCache']['get'](_0x39a3e6);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3d75bd['url'],this['imageDimension']=_0x3d75bd['dimension'],this['imageId']=_0x3d75bd['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x52597c}=this['_editor'],t=_0x52597c['t'],_0x515c09=new X(_0x52597c,this['imageStatus'],this['_attributes']);_0x515c09['bind']('status')['to'](this,'imageStatus'),_0x515c09['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x515c09['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x515c09['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x515c09,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4ba6e4,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x515c09,'position':_0xdf23b5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x515c09['focus']();},'onHide':()=>{_0x515c09['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2e5a6b=>!A(_0x2e5a6b,_0x515c09['element'])}});}['_loadImageInfo'](_0x3b8f25,_0x639e27){return j['getInfo'](_0x3b8f25,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x41793e=>{const {width:_0x2afddd,height:_0x23c8de}=_0x41793e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x639e27,this['imageDimension']={'width':_0x2afddd,'height':_0x23c8de},this['imageId']=_0x3b8f25;})['catch'](_0x2cd916=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2cd916['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4b001d,_0x12f820){return this['_getImageAsFile'](_0x4b001d)['then'](_0x51f68d=>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':_0x12f820['signal'],'file':_0x51f68d,'onProgress':_0x625b6d=>{_0x625b6d&&_0x625b6d['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x625b6d['value']));}}))['then'](_0x3f824e=>{const {width:_0x63d3cc,height:_0x38dc14}=_0x3f824e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3f824e['cdnUrl'],this['imageDimension']={'width':_0x63d3cc,'height':_0x38dc14},this['imageId']=_0x3f824e['uuid'],this['imageUploadProgress']=null;const _0xe15deb=_0x4b001d['getAttribute']('src');this['_imageCache']['set'](_0xe15deb,{'id':_0x3f824e['uuid'],'url':_0x3f824e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3c551a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3c551a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4907c0,_0x587d91){_0x4907c0['on']('apply',(_0x10fcf5,_0x2499b4)=>{this['_replaceImage'](_0x587d91,_0x2499b4['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4907c0['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4907c0['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x44b1fd,_0x84bbf2,_0x3c9af7){const _0x2fffe1=this['_editor'],{width:_0x40e7fe,height:_0x8849c5}=S(_0x84bbf2,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1ffb99,imageSources:_0x3d3224}=C(_0x84bbf2,_0x40e7fe);_0x2fffe1['model']['change'](_0x46bf0d=>{if('$graveyard'===_0x44b1fd['root']['rootName']){_0x2fffe1['execute']('insertImage',{'imageType':_0x44b1fd['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x44b1fd['getAttributes']()),'uploadcareImageId':_0x3c9af7,'src':_0x1ffb99,'sources':_0x3d3224,'width':_0x40e7fe,'height':_0x8849c5}});const _0x5be425=_0x44b1fd['getChildren']();_0x44b1fd=_0x2fffe1['model']['document']['selection']['getSelectedElement']();for(const _0x18b22f of _0x5be425)_0x46bf0d['append'](_0x46bf0d['cloneElement'](_0x18b22f),_0x44b1fd);}else _0x46bf0d['setSelection'](_0x44b1fd,'on'),_0x2fffe1['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x44b1fd['getAttributes']()),'uploadcareImageId':_0x3c9af7,'src':_0x1ffb99,'sources':_0x3d3224,'width':_0x40e7fe,'height':_0x8849c5},_0x44b1fd);_0x46bf0d['setSelection'](_0x44b1fd,'on');});}async['_getImageAsFile'](_0x1d8224){const _0x4275aa=_0x391e65['window'],_0x46ec3e=_0x391e65['document']['location']['href'],_0x10a0c0=new _0x4275aa['URL'](_0x1d8224['getAttribute']('src'),_0x46ec3e);if('data:'===_0x10a0c0['protocol']){const _0x3e0903=_0x10a0c0['href']['split'](','),_0x24548b=_0x3e0903[0x0]['match'](/:(.*?);/)[0x1],_0x38f7fe=_0x24548b['split']('/')[0x1],_0x3aed16=_0x4275aa['atob'](_0x3e0903[_0x3e0903['length']-0x1]);let _0x462203=_0x3aed16['length'];const _0x4155fd=new _0x4275aa['Uint8Array'](_0x462203);for(;_0x462203--;)_0x4155fd[_0x462203]=_0x3aed16['charCodeAt'](_0x462203);return new _0x4275aa['File']([_0x4155fd],'image.'+_0x38f7fe,{'type':_0x24548b});}const _0x48e6e8=_0x10a0c0['href']['split']('/'),_0x2182bd=_0x48e6e8[_0x48e6e8['length']-0x1],_0x1072c3=_0x2182bd['split']('.')[0x1];return _0x4275aa['fetch'](_0x10a0c0['href'])['then'](_0x153fd2=>_0x153fd2['clone']()['blob']())['then'](_0xfb02b8=>new _0x4275aa['File']([_0xfb02b8],_0x2182bd,{'type':'image/'+_0x1072c3}));}}class O extends _0x340ba3{['imageEditController'];static get['requires'](){return[_0x53818d];}['_isEditable'];constructor(_0x9b2bed){super(_0x9b2bed),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xa1e46a){const _0x2cf1d6=G(_0xa1e46a);return _0x1cea7b=>!(!_0x1cea7b||!_0x1cea7b['is']('element','imageBlock')&&!_0x1cea7b['is']('element','imageInline'))&&(!!_0x1cea7b['hasAttribute']('uploadcareImageId')||!!_0x1cea7b['hasAttribute']('src')&&_0x2cf1d6(_0x1cea7b['getAttribute']('src')));}(_0x9b2bed['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2d2d98=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2d2d98);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x4d68e8=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4d68e8&&(_0x4d68e8['is']('element','imageBlock')||_0x4d68e8['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x53818d),_0x4d68e8),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x340ba3{['refresh'](){const _0x2446b7=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x2446b7&&(_0x2446b7['is']('element','imageBlock')||_0x2446b7['is']('element','imageInline')));}['execute'](_0x7b4d00){const _0x1240f3=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x1fb91b=>{_0x1fb91b['setAttributes'](_0x7b4d00,_0x1240f3),_0x1fb91b['removeAttribute']('srcset',_0x1240f3),_0x1fb91b['removeAttribute']('sizes',_0x1240f3);});}}class m extends _0x2c9ec5{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x258fba,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xcdd39c}=this;_0xcdd39c['commands']['add']('uploadcareImageEdit',new O(_0xcdd39c)),_0xcdd39c['commands']['add']('uploadcareImageReplace',new R(_0xcdd39c));}}class g extends _0x2c9ec5{['_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 _0x4446cf=this['editor'];_0x4446cf['ui']['componentFactory']['add']('uploadcareImageEdit',_0x5670f2=>{const _0x3b54ef=_0x4446cf['commands']['get']('uploadcareImageEdit'),_0x3758f1=new _0x1f56a3(_0x5670f2),t=_0x5670f2['t'];return _0x3758f1['set']({'icon':_0x4ba6e4,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x3758f1['bind']('isEnabled')['to'](_0x3b54ef),_0x3758f1['bind']('isOn')['to'](_0x3b54ef,'isActive'),this['listenTo'](_0x3758f1,'execute',()=>{_0x4446cf['execute']('uploadcareImageEdit'),_0x4446cf['editing']['view']['focus']();}),_0x3758f1;}),this['_initConfig']();}['_initConfig'](){const _0x4317b3=_0x4c768c(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4317b3),this['listenTo'](this['editor'],'destroy',()=>{_0x4317b3['remove']();});}}class et extends _0x2c9ec5{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 _0x46feb1,Command as _0x207e1b}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x210989,IconGooglePhotos as _0x1f08cb,IconGoogleDrive as _0x12c42d,IconFacebook as _0x32fdf7,IconDropbox as _0x26fe24,IconUploadcareLink as _0xe5c044,IconUploadcareImageUpload as _0x382898,IconError as _0x3648d9,IconUploadcareImageEdit as _0x15c8dc}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x48ecd8,MenuBarMenuListItemButtonView as _0x1d53e6,View as _0x497fc2,FocusCycler as _0x54fcf7,Dialog as _0x2b6127,DialogViewPosition as _0x4bbf5e,SpinnerView as _0x286390,IconView as _0x5132f0,Notification as _0x2f6a12}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x558598,DomEmitterMixin as _0x325f8d,global as _0x364592,getAncestors as _0x205299,ObservableMixin as _0x1c66af,uid as _0xe388c3,createElement as _0x224cb9}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x5ef19f}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x1e04ff,info as _0x1c4200}from'@uploadcare/upload-client';import*as _0x42e4a7 from'@uploadcare/file-uploader';var i=function(_0x580980){return _0x580980['Local']='local',_0x580980['URL']='url',_0x580980['Dropbox']='dropbox',_0x580980['GDrive']='gdrive',_0x580980['Facebook']='facebook',_0x580980['GPhotos']='gphotos',_0x580980['OneDrive']='onedrive',_0x580980;}({});function _(_0x1484cf,_0x2a7547,_0x43e4aa){const t=_0x1484cf['t'],_0x43bdbf=_0x1484cf['t'];switch(_0x2a7547){case i['Local']:return{'text':_0x43bdbf('Insert'===_0x43e4aa?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x43bdbf('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x43e4aa?_0x43bdbf('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x43bdbf('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x43e4aa?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x43e4aa?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x43e4aa?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x43e4aa?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x43e4aa?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2a7547;}}class e extends _0x46feb1{['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 _0x194fa5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x10036e;for(const _0x44806e in _0x194fa5){const _0xe33f5d=_0x44806e,_0x16f310=_0x194fa5[_0xe33f5d];if('uploadcareLicenseKeyValid'==_0x16f310||'uploadcareLicenseKeyInvalid'==_0x16f310||'uploadcareLicenseKeyExpired'==_0x16f310||'uploadcareLicenseKeyDomainLimit'==_0x16f310||'uploadcareLicenseKeyNotAllowed'==_0x16f310||'uploadcareLicenseKeyEvaluationLimit'==_0x16f310||'uploadcareLicenseKeyUsageLimit'==_0x16f310){delete _0x194fa5[_0xe33f5d],_0x10036e=_0x16f310,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x10036e&&_0x194fa5['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x10036e&&_0x194fa5['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x10036e&&_0x194fa5['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x10036e&&_0x194fa5['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x10036e&&_0x194fa5['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x10036e&&_0x194fa5['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x215eb5}=this,_0x408ebe=_0x215eb5['commands']['get']('uploadcare');if(!_0x408ebe)return;const _0x23a4a9=this['_normalizeConfigSourceList'](_0x215eb5['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x2790d4,_0x5be6a7)=>{const _0x49d1ea=this['_getIntegrationKey'](_0x5be6a7['type']);return _0x2790d4[_0x49d1ea]||(_0x2790d4[_0x49d1ea]=[]),_0x2790d4[_0x49d1ea]['push'](_0x5be6a7),_0x2790d4;},{});_0x215eb5['plugins']['has']('ImageInsertUI')&&_0x215eb5['commands']['get']('uploadcare')&&Object['entries'](_0x23a4a9)['forEach'](([_0xe9639d,_0xc7ed57])=>{_0x215eb5['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0xe9639d,'observable':()=>_0x408ebe,'buttonViewCreator':()=>this['_createToolbarButton'](_0xc7ed57),'formViewCreator':()=>this['_createDropdownButtons'](_0xc7ed57),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0xc7ed57),'override':'assetManager'!==_0xe9639d});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x53d795){const {locale:_0x1ed246}=this['editor'];return _0x53d795['map'](_0x3fb210=>{const _0x59f501=_(_0x1ed246,_0x3fb210,'Insert');switch(_0x3fb210){case i['Local']:return{'icon':_0x382898,'type':i['Local'],..._0x59f501};case i['URL']:return{'icon':_0xe5c044,'type':i['URL'],..._0x59f501};case i['Dropbox']:return{'icon':_0x26fe24,'type':i['Dropbox'],..._0x59f501};case i['Facebook']:return{'icon':_0x32fdf7,'type':i['Facebook'],..._0x59f501};case i['GDrive']:return{'icon':_0x12c42d,'type':i['GDrive'],..._0x59f501};case i['GPhotos']:return{'icon':_0x1f08cb,'type':i['GPhotos'],..._0x59f501};case i['OneDrive']:return{'icon':_0x210989,'type':i['OneDrive'],..._0x59f501};}});}['_getIntegrationKey'](_0x7795e8){switch(_0x7795e8){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x359199,_0x3746f6){const _0x2b0425=this['editor'],_0x53fc38=new _0x359199(_0x2b0425['locale']),_0x32fb27=_0x2b0425['commands']['get']('uploadcare');return _0x53fc38['bind']('isEnabled')['to'](_0x32fb27),_0x53fc38['on']('execute',()=>{_0x32fb27['execute'](_0x3746f6);}),_0x53fc38;}['_createToolbarButton'](_0x113a0c){const {locale:_0x45af22}=this['editor'],_0x419880=this['editor']['plugins']['get']('ImageInsertUI'),_0x124d94=_0x113a0c[0x0],_0x410c29=this['_createButton'](_0x48ecd8,_0x124d94['type']);return _0x410c29['icon']=_0x124d94['icon'],_0x410c29['bind']('label')['to'](_0x419880,'isImageSelected',_0x1288cf=>_(_0x45af22,_0x124d94['type'],_0x1288cf?'Replace':'Insert')['text']),_0x410c29['tooltip']=!0x0,_0x410c29;}['_createDropdownButtons'](_0x4aac10){const {locale:_0x485a0a}=this['editor'],_0x18c0c3=this['editor']['plugins']['get']('ImageInsertUI');return _0x4aac10['map'](_0x5818c7=>{const _0x5f2f02=this['_createButton'](_0x48ecd8,_0x5818c7['type']);return _0x5f2f02['withText']=!0x0,_0x5f2f02['icon']=_0x5818c7['icon'],_0x5f2f02['bind']('label')['to'](_0x18c0c3,'isImageSelected',_0x56e95a=>_(_0x485a0a,_0x5818c7['type'],_0x56e95a?'Replace':'Insert')['text']),_0x5f2f02;});}['_createMenuBarButtons'](_0x10e0a9){return _0x10e0a9['map'](_0x352637=>{const _0x2aba0b=this['_createButton'](_0x1d53e6,_0x352637['type']);return _0x2aba0b['icon']=_0x352637['icon'],_0x2aba0b['label']=_0x352637['shortText'],_0x2aba0b;});}}class F extends _0x497fc2{['focusTracker'];['focusCycler'];constructor(_0x1c0006){super(_0x1c0006),this['focusTracker']=new _0x558598(),this['focusCycler']=new _0x54fcf7({'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(_0x4f8c5e,_0x486938){super(_0x4f8c5e),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-'+_0x486938}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x226c7,_0x4f63b1){const _0x1b2df0=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x49d864=>_0x49d864<=_0x4f63b1)['map'](_0x58373a=>_0x226c7['replace'](/\/$/,'')+'/-/resize/'+_0x58373a+'x/\x20'+_0x58373a+'w');return{'imageFallbackUrl':_0x226c7,'imageSources':[{'srcset':_0x1b2df0['join'](',\x20'),'sizes':'(max-width:\x20'+_0x4f63b1+'px)\x20100vw,\x20'+_0x4f63b1+'px','type':'image/webp'}]};}function S(_0x35bd6e,_0x51d891,_0x4d5ea6){const _0x4ca957=_0x35bd6e['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x4ca957?parseInt(_0x4ca957[0x1],0xa):_0x51d891,'height':_0x4ca957?parseInt(_0x4ca957[0x2],0xa):_0x4d5ea6};}function p(_0x8c0709,_0x3f16dd){const _0x568e47=new(_0x325f8d())(),_0x538e24=_0x8c0709['plugins']['get']('ImageUtils'),_0x4cc515=_0x8c0709['editing']['mapper']['toViewElement'](_0x3f16dd),_0x571877=_0x538e24['findViewImgElement'](_0x4cc515),_0x12ba94=_0x8c0709['editing']['view']['domConverter']['viewToDom'](_0x571877),_0x5616f9=_0x3f16dd['getAttribute']('width'),_0x516f21=_0x3f16dd['getAttribute']('height'),_0x4f7cc8='image-processing';_0x8c0709['editing']['view']['change'](_0x37b8c9=>{_0x37b8c9['addClass'](_0x4f7cc8,_0x4cc515),_0x37b8c9['setStyle']('aspect-ratio',_0x5616f9+'/'+_0x516f21,_0x571877);}),_0x568e47['listenTo'](_0x12ba94,'load',()=>{_0x568e47['stopListening'](_0x12ba94,'load'),_0x8c0709['editing']['view']['change'](_0x41f1a0=>{_0x41f1a0['removeClass'](_0x4f7cc8,_0x4cc515),_0x41f1a0['removeStyle']('aspect-ratio',_0x571877);});});}function z(_0x3b1ec2){if(Array['isArray'](_0x3b1ec2)){const _0x313c93=_0x3b1ec2['map'](z);return _0x2d0aff=>_0x313c93['some'](_0x427e93=>_0x427e93(_0x2d0aff));}if('origin'==_0x3b1ec2){const _0x311d4b=_0x364592['window']['location']['origin'];return _0xd65647=>new URL(_0xd65647,_0x364592['document']['baseURI'])['origin']==_0x311d4b;}return'function'==typeof _0x3b1ec2?_0x3b1ec2:_0x3b1ec2 instanceof RegExp?_0x28d950=>!(!_0x28d950['match'](_0x3b1ec2)&&!_0x28d950['replace'](/^https?:\/\//,'')['match'](_0x3b1ec2)):()=>!0x1;}function A(_0x338975,_0x52c05d){return _0x205299(_0x338975['target'])['includes'](_0x52c05d);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1c66af(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x18528f,_0x299758,_0xe5a6a4){super(),this['_editor']=_0x18528f,this['_editing']=_0x299758,this['_dialog']=_0x18528f['plugins']['get'](_0x2b6127),this['_api']=_0x299758['ctxElement']['getAPI'](),this['_type']=_0xe5a6a4,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:_0x2435c5,model:_0x41b1e7}=this['_editor'],_0x241b94=_0x41b1e7['document']['selection']['getSelectedElement'](),_0x1af825=_0x241b94&&(_0x241b94['is']('element','imageBlock')||_0x241b94['is']('element','imageInline'));this['_formView']=new x(_0x2435c5,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x382898,'title':_(_0x2435c5,this['_type'],_0x1af825?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x4bbf5e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5f5e0b=>!A(_0x5f5e0b,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x5dd5c2}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x64b134=>{const _0x425214=_0x5dd5c2['length'];for(const _0x1fd765 of _0x5dd5c2){const _0x2560e3=_0x1fd765===_0x5dd5c2[_0x425214-0x1],{cdnUrl:_0x258bb0,fileInfo:_0xcc36a3}=_0x1fd765;if(!_0x258bb0||!_0xcc36a3)continue;const {width:_0x3dff6a,height:_0x35cf55}=_0xcc36a3['imageInfo'],_0x40cb42=S(_0x258bb0,_0x3dff6a,_0x35cf55),_0x29921e=C(_0x258bb0,_0x40cb42['width']),_0x4040e2={'id':_0xcc36a3['uuid'],'type':'image','attributes':{'imageDimension':_0x40cb42,..._0x29921e}};this['_insertAsset'](_0x4040e2,_0x2560e3,_0x64b134);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x569e2e=>{'idle'===_0x569e2e['detail']['status']&&!_0x569e2e['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x56dfba,_0xb94543,_0x23e830){const _0x30c053=this['_editor']['model']['document']['selection'],_0x3d13f6=_0x30c053['getSelectedElement'](),_0x3043d5=!(!_0x3d13f6||!_0x3d13f6['is']('element','imageInline'));_0x23e830['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x56dfba,_0x3043d5),_0xb94543||_0x23e830['setSelection'](_0x30c053['getLastPosition']());}['_insertImage'](_0x411281,_0x37994a){const _0x3e74d9=this['_editor'],{imageDimension:_0x34bcb9,imageFallbackUrl:_0x2a4212,imageSources:_0x2f1d99}=_0x411281['attributes'];_0x3e74d9['execute']('insertImage',{'imageType':_0x37994a?'imageInline':null,'source':{'uploadcareImageId':_0x411281['id'],'src':_0x2a4212,'sources':_0x2f1d99,..._0x34bcb9}});}}class w extends _0x207e1b{['_editing'];['_controller']=null;static get['requires'](){return[_0x2b6127,o];}constructor(_0xcc7862){super(_0xcc7862),this['_editing']=_0xcc7862['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x504526){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x504526);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x3b614c,..._0x225903}){return _0x1e04ff(_0x3b614c,_0x225903);}static['getInfo'](_0x250347,_0x34f597){return _0x1c4200(_0x250347,_0x34f597);}}class f extends _0x46feb1{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x5ef19f,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x16ce56=this['editor'];if(!!!_0x16ce56['config']['get']('uploadcare'))return;_0x16ce56['plugins']['get'](_0x5ef19f)['createUploadAdapter']=_0xd57c5a=>new k(_0xd57c5a,_0x16ce56),_0x16ce56['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x527923,{imageElement:_0x24a5ae,data:_0x416267})=>{_0x16ce56['model']['change'](_0x4541b4=>{_0x4541b4['setAttribute']('uploadcareImageId',_0x416267['uploadcareImageId'],_0x24a5ae);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x9329cd,_0x384510){this['loader']=_0x9329cd,this['editor']=_0x384510,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4d1a30=await this['loader']['file'];return j['upload']({'file':_0x4d1a30,'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':_0x566711=>{_0x566711&&_0x566711['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x566711['value']);}})['then'](async _0x364d80=>{const {imageFallbackUrl:_0x273f76,imageSources:_0x1ef153}=C(_0x364d80['cdnUrl'],_0x364d80['imageInfo']['width']);return{'uploadcareImageId':_0x364d80['uuid'],'default':_0x273f76,'sources':_0x1ef153};})['catch'](()=>{const _0x75449d=t('Cannot\x20upload\x20file:')+('\x20'+_0x4d1a30['name']+'.');return Promise['reject'](_0x75449d);});}['abort'](){this['controller']['abort']();}}class o extends _0x46feb1{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x2b6127];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x59d47e){super(_0x59d47e),this['ucContextId']=_0xe388c3();}['init'](){const _0x349410=this['editor'];_0x349410['commands']['add']('uploadcare',new w(_0x349410));}['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 _0x4bcdec=_0x364592['document']['querySelector']('input[uploadcare-file-input]');_0x4bcdec&&_0x4bcdec['remove']();}),async function(_0x2c29f7){const _0x3e9897=_0x2f1db1([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]),_0xf0b079=0x535f8c3a,_0x1bb179=0x5358f2ba^_0xf0b079,_0x1654b0=window[_0x2f1db1([0x44,0x61,0x74,0x65])][_0x2f1db1([0x6e,0x6f,0x77])](),_0x1cef31=_0x2c29f7[_0x2f1db1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x53eb37=new window[(_0x2f1db1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x51c334=>{_0x1cef31[_0x2f1db1([0x6f,0x6e,0x63,0x65])](_0x2f1db1([0x72,0x65,0x61,0x64,0x79]),_0x51c334);}),_0x3b4981={[_0x2f1db1([0x6b,0x74,0x79])]:_0x2f1db1([0x45,0x43]),[_0x2f1db1([0x75,0x73,0x65])]:_0x2f1db1([0x73,0x69,0x67]),[_0x2f1db1([0x63,0x72,0x76])]:_0x2f1db1([0x50,0x2d,0x32,0x35,0x36]),[_0x2f1db1([0x78])]:_0x2f1db1([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]),[_0x2f1db1([0x79])]:_0x2f1db1([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]),[_0x2f1db1([0x61,0x6c,0x67])]:_0x2f1db1([0x45,0x53,0x32,0x35,0x36])},_0x2b071e=_0x1cef31[_0x2f1db1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2f1db1([0x67,0x65,0x74])](_0x2f1db1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x6c89a8(){let _0x4ec47f,_0x38e1e6=null,_0x37b204=null;try{if(_0x2b071e==_0x2f1db1([0x47,0x50,0x4c]))return _0x2f1db1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4ec47f=_0x2fbf22(),!_0x4ec47f)return _0x2f1db1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4ec47f[_0x2f1db1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x37b204=_0x35bd57(_0x4ec47f[_0x2f1db1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4ec47f[_0x2f1db1([0x6a,0x74,0x69])])),await _0x42c037()?_0x1a2d5a()?_0xaff8ee()?_0x2f1db1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x11337f()?(_0x4ec47f[_0x2f1db1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2f1db1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x38e1e6=_0x18afa1(_0x2f1db1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x278f8c()):_0x2f1db1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2f1db1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2f1db1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2f1db1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xaff8ee(){const _0x1081e0=[_0x2f1db1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2f1db1([0x74,0x72,0x69,0x61,0x6c])][_0x2f1db1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ec47f[_0x2f1db1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1654b0/0x3e8:0xe10*_0x1bb179;return _0x4ec47f[_0x2f1db1([0x65,0x78,0x70])]<_0x1081e0;}function _0x1a2d5a(){const _0x580247=_0x4ec47f[_0x2f1db1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x580247&&(!!_0x580247[_0x2f1db1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f1db1([0x2a]))||!!_0x580247[_0x2f1db1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f1db1([0x55,0x50,0x4c,0x43])));}function _0x11337f(){const _0x45c105=_0x4ec47f[_0x2f1db1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x45c105||0x0==_0x45c105[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x34a14c}=new URL(window[_0x2f1db1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x45c105[_0x2f1db1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34a14c))return!0x0;const _0x510bc6=_0x34a14c[_0x2f1db1([0x73,0x70,0x6c,0x69,0x74])](_0x2f1db1([0x2e]));return _0x45c105[_0x2f1db1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2457e1=>_0x2457e1[_0x2f1db1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f1db1([0x2a])))[_0x2f1db1([0x6d,0x61,0x70])](_0x11ecc8=>_0x11ecc8[_0x2f1db1([0x73,0x70,0x6c,0x69,0x74])](_0x2f1db1([0x2e])))[_0x2f1db1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x18fa15=>_0x18fa15[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x510bc6[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2f1db1([0x6d,0x61,0x70])](_0x2c6a71=>Array(_0x510bc6[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2c6a71[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2f1db1([0x66,0x69,0x6c,0x6c])](_0x2c6a71[0x0]===_0x2f1db1([0x2a])?_0x2f1db1([0x2a]):'')[_0x2f1db1([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2c6a71))[_0x2f1db1([0x73,0x6f,0x6d,0x65])](_0x429ed3=>_0x510bc6[_0x2f1db1([0x65,0x76,0x65,0x72,0x79])]((_0x1c040b,_0x370def)=>_0x429ed3[_0x370def]===_0x1c040b||_0x429ed3[_0x370def]===_0x2f1db1([0x2a])));}function _0x278f8c(){return _0x38e1e6&&_0x37b204?new window[(_0x2f1db1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f5ac9,_0x257239)=>{_0x38e1e6[_0x2f1db1([0x74,0x68,0x65,0x6e])](_0x3f5ac9,_0x257239),_0x37b204[_0x2f1db1([0x74,0x68,0x65,0x6e])](_0x51c4b6=>{_0x51c4b6!=_0x2f1db1([0x56,0x61,0x6c,0x69,0x64])&&_0x3f5ac9(_0x51c4b6);},_0x257239);}):_0x38e1e6||_0x37b204||_0x2f1db1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x35bd57(_0xe59715,_0x551bc5){return new window[(_0x2f1db1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3daf42=>{if(_0x3db1cf())return _0x3daf42(_0x2f1db1([0x56,0x61,0x6c,0x69,0x64]));_0xf9b21a(),_0x1cef31[_0x2f1db1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2f1db1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xe7eb9b=!0x1;const _0x4ac003=_0xe388c3();function _0x23f596(_0x40eaf5){return!!_0x40eaf5&&(typeof _0x40eaf5===_0x2f1db1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x40eaf5===_0x2f1db1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x40eaf5[_0x2f1db1([0x74,0x68,0x65,0x6e])]===_0x2f1db1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x40eaf5[_0x2f1db1([0x63,0x61,0x74,0x63,0x68])]===_0x2f1db1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x47c534(_0xbdf68b){_0x1d31f7(_0xbdf68b)[_0x2f1db1([0x74,0x68,0x65,0x6e])](_0x3a094c=>{if(!_0x3a094c||_0x3a094c[_0x2f1db1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2f1db1([0x6f,0x6b]))return _0x2f1db1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x80cff0(_0x2c792d(_0x4ac003+_0x551bc5))!=_0x3a094c[_0x2f1db1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2f1db1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2f1db1([0x56,0x61,0x6c,0x69,0x64]);})[_0x2f1db1([0x74,0x68,0x65,0x6e])](_0x22a355=>(_0x37dbce(),_0x22a355),()=>{const _0x5e41e3=_0xc07616();return null==_0x5e41e3?(_0x37dbce(),_0x2f1db1([0x56,0x61,0x6c,0x69,0x64])):_0x2f1db1(_0x1654b0-_0x5e41e3>(0x7753083a^_0xf0b079)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2f1db1([0x74,0x68,0x65,0x6e])](_0x3daf42)[_0x2f1db1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3daf42(_0x2f1db1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4d7c4f=0x536962ba^_0xf0b079;function _0x37dbce(){const _0x17725c=_0x2f1db1([0x6c,0x6c,0x63,0x74,0x2d])+_0x80cff0(_0x2c792d(_0xe59715)),_0x237b0b=_0x122276(_0x80cff0(window[_0x2f1db1([0x4d,0x61,0x74,0x68])][_0x2f1db1([0x63,0x65,0x69,0x6c])](_0x1654b0/_0x4d7c4f)));window[_0x2f1db1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2f1db1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x17725c,_0x237b0b);}function _0xc07616(){const _0xf2af91=_0x2f1db1([0x6c,0x6c,0x63,0x74,0x2d])+_0x80cff0(_0x2c792d(_0xe59715)),_0x46790b=window[_0x2f1db1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2f1db1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xf2af91);return _0x46790b?window[_0x2f1db1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x122276(_0x46790b),0x10)*_0x4d7c4f:null;}function _0x1d31f7(_0x3655fe){return new window[(_0x2f1db1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x274979,_0x53b636)=>{_0x3655fe[_0x2f1db1([0x74,0x68,0x65,0x6e])](_0x274979,_0x53b636),window[_0x2f1db1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x53b636,0x535e58fa^_0xf0b079);});}}_0x1cef31[_0x2f1db1([0x6f,0x6e])](_0x2f1db1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x7ff81,_0x6e80b1)=>{if(_0x6e80b1[0x0]!=_0xe59715)return _0x3daf42(_0x2f1db1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x6e80b1[0x1]={..._0x6e80b1[0x1],[_0x2f1db1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4ac003};},{[_0x2f1db1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2f1db1([0x68,0x69,0x67,0x68])}),_0x1cef31[_0x2f1db1([0x6f,0x6e])](_0x2f1db1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x378032=>{_0x23f596(_0x378032[_0x2f1db1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xe7eb9b=!0x0,_0x47c534(_0x378032[_0x2f1db1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2f1db1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2f1db1([0x6c,0x6f,0x77])}),_0x53eb37[_0x2f1db1([0x74,0x68,0x65,0x6e])](()=>{_0xe7eb9b||_0x3daf42(_0x2f1db1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3db1cf(){return _0x1cef31[_0x2f1db1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2f1db1([0x76,0x69,0x65,0x77])][_0x2f1db1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2f1db1([0x61,0x75,0x74,0x6f]);}function _0xf9b21a(){_0x1cef31[_0x2f1db1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2f1db1([0x76,0x69,0x65,0x77])][_0x2f1db1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2f1db1([0x61,0x75,0x74,0x6f]);}}function _0x18afa1(_0x421bc6){const _0x33338e=[new window[(_0x2f1db1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x14eb0b=>setTimeout(_0x14eb0b,0x5356b2f6^_0xf0b079)),_0x53eb37[_0x2f1db1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2f1db1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ff408=>{let _0x148614=0x0;_0x1cef31[_0x2f1db1([0x6d,0x6f,0x64,0x65,0x6c])][_0x2f1db1([0x6f,0x6e])](_0x2f1db1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xea09a,_0x8e6156)=>{_0x8e6156[0x0][_0x2f1db1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x148614++,_0x148614==(0x535f89d2^_0xf0b079)&&(_0x3ff408(),_0xea09a[_0x2f1db1([0x6f,0x66,0x66])]());});}))];return window[_0x2f1db1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2f1db1([0x72,0x61,0x63,0x65])](_0x33338e)[_0x2f1db1([0x74,0x68,0x65,0x6e])](()=>_0x421bc6);}async function _0x4b6a4d(){await _0x53eb37,_0x1cef31[_0x2f1db1([0x6d,0x6f,0x64,0x65,0x6c])][_0x2f1db1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1d5204,_0x1cef31[_0x2f1db1([0x6d,0x6f,0x64,0x65,0x6c])][_0x2f1db1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1d5204,_0x1cef31[_0x2f1db1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2f1db1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x51fa23(_0x437c95){const _0x19f86f=_0x19a8b8();_0x1cef31[_0x19f86f]=_0x2f1db1([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x437c95,_0x437c95!=_0x2f1db1([0x56,0x61,0x6c,0x69,0x64])&&_0x4b6a4d();}function _0x19a8b8(){const _0x4a616e=window[_0x2f1db1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2f1db1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2f1db1([0x6e,0x6f,0x77])]())[_0x2f1db1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2f1db1([0x2e]),'');let _0x5a0ba6=_0x2f1db1([0x68]);for(let _0xbfdeb9=0x0;_0xbfdeb9<_0x4a616e[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xbfdeb9+=0x2){let _0x3bee67=window[_0x2f1db1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4a616e[_0x2f1db1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xbfdeb9,_0xbfdeb9+0x2));_0x3bee67>=_0x3e9897[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3bee67-=_0x3e9897[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5a0ba6+=_0x3e9897[_0x3bee67];}return _0x5a0ba6;}function _0x2fbf22(){const _0x4d1ca5=_0x2b071e[_0x2f1db1([0x73,0x70,0x6c,0x69,0x74])](_0x2f1db1([0x2e]));if(0x3!=_0x4d1ca5[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3c80b4(_0x4d1ca5[0x1]);function _0x3c80b4(_0x3fd727){const _0x3ccc94=_0x3bc886(_0x3fd727);return _0x3ccc94&&_0x1b74e4()?_0x3ccc94:null;function _0x1b74e4(){const _0x1428fe=_0x3ccc94[_0x2f1db1([0x6a,0x74,0x69])],_0x522c18=window[_0x2f1db1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1428fe[_0x2f1db1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1428fe[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x133cad={..._0x3ccc94,[_0x2f1db1([0x6a,0x74,0x69])]:_0x1428fe[_0x2f1db1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1428fe[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x133cad[_0x2f1db1([0x76,0x63])],_0x2c792d(_0x133cad)==_0x522c18;}}}async function _0x42c037(){let _0x2be07a=!0x0;try{const _0x5deeb5=_0x2b071e[_0x2f1db1([0x73,0x70,0x6c,0x69,0x74])](_0x2f1db1([0x2e])),[_0x51ea3c,_0x53692c,_0x118cc3]=_0x5deeb5;return _0x1214ec(_0x51ea3c),await _0x47557c(_0x51ea3c,_0x53692c,_0x118cc3),_0x2be07a;}catch{return!0x1;}function _0x1214ec(_0x5f489e){const _0x4a3f4=_0x3bc886(_0x5f489e);_0x4a3f4&&_0x4a3f4[_0x2f1db1([0x61,0x6c,0x67])]==_0x2f1db1([0x45,0x53,0x32,0x35,0x36])||(_0x2be07a=!0x1);}async function _0x47557c(_0x505bf6,_0x2af31c,_0x5c7815){const _0x52bafe=window[_0x2f1db1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2f1db1([0x66,0x72,0x6f,0x6d])](_0x5ef0e9(_0x5c7815),_0x442ee7=>_0x442ee7[_0x2f1db1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x59aa07=new window[(_0x2f1db1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2f1db1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x505bf6+_0x2f1db1([0x2e])+_0x2af31c),_0x5a766f=window[_0x2f1db1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2f1db1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5a766f)return;const _0x1499d6=await _0x5a766f[_0x2f1db1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2f1db1([0x6a,0x77,0x6b]),_0x3b4981,{[_0x2f1db1([0x6e,0x61,0x6d,0x65])]:_0x2f1db1([0x45,0x43,0x44,0x53,0x41]),[_0x2f1db1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2f1db1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2f1db1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5a766f[_0x2f1db1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2f1db1([0x6e,0x61,0x6d,0x65])]:_0x2f1db1([0x45,0x43,0x44,0x53,0x41]),[_0x2f1db1([0x68,0x61,0x73,0x68])]:{[_0x2f1db1([0x6e,0x61,0x6d,0x65])]:_0x2f1db1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1499d6,_0x52bafe,_0x59aa07)||(_0x2be07a=!0x1);}}function _0x3bc886(_0x3ed9f4){return _0x3ed9f4[_0x2f1db1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2f1db1([0x65,0x79]))?JSON[_0x2f1db1([0x70,0x61,0x72,0x73,0x65])](_0x5ef0e9(_0x3ed9f4)):null;}function _0x5ef0e9(_0x1b483b){return window[_0x2f1db1([0x61,0x74,0x6f,0x62])](_0x1b483b[_0x2f1db1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2f1db1([0x2b]))[_0x2f1db1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2f1db1([0x2f])));}function _0x2c792d(_0x14c1b6){let _0x4b351c=0x1505;function _0x3139be(_0x16cf4a){for(let _0x591d9a=0x0;_0x591d9a<_0x16cf4a[_0x2f1db1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x591d9a++){const _0x341048=_0x16cf4a[_0x2f1db1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x591d9a);_0x4b351c=(_0x4b351c<<0x5)+_0x4b351c+_0x341048,_0x4b351c&=_0x4b351c;}}function _0x28c9f6(_0x538f1c){Array[_0x2f1db1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x538f1c)?_0x538f1c[_0x2f1db1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x28c9f6):_0x538f1c&&typeof _0x538f1c==_0x2f1db1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2f1db1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x538f1c)[_0x2f1db1([0x73,0x6f,0x72,0x74])]()[_0x2f1db1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xfe7fce,_0xb2f017])=>{_0x3139be(_0xfe7fce),_0x28c9f6(_0xb2f017);}):_0x3139be(window[_0x2f1db1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x538f1c));}return _0x28c9f6(_0x14c1b6),_0x4b351c>>>0x0;}function _0x80cff0(_0x306725){return _0x306725[_0x2f1db1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2f1db1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2f1db1([0x30]));}function _0x122276(_0x613b59){return _0x613b59[_0x2f1db1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2f1db1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2f1db1([0x6a,0x6f,0x69,0x6e])]('');}function _0x1d5204(){}function _0x2f1db1(_0x2261c7){return _0x2261c7['map'](_0x14840f=>String['fromCharCode'](_0x14840f))['join']('');}_0x51fa23(await _0x6c89a8());}(this);}['_initSchema'](){const _0x303708=this['editor']['model']['schema'];_0x303708['isRegistered']('imageBlock')&&_0x303708['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x303708['isRegistered']('imageInline')&&_0x303708['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x57c931=this['editor'];_0x57c931['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x57c931['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x3c5b32=>_0x3c5b32['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5b2e1=_0x57c931['commands']['get']('replaceImageSource');_0x5b2e1&&this['listenTo'](_0x5b2e1,'cleanupImage',(_0x10fd2b,[_0x251a4d,_0xe4f635])=>{_0x251a4d['removeAttribute']('uploadcareImageId',_0xe4f635);});}['_initConfig'](){const _0xaa4eb4=this['editor']['config']['get']('uploadcare.uploader')||{},_0x11e4b4=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x224cb9(_0x364592['document'],'uc-config',{..._0xaa4eb4,'pubkey':_0x11e4b4,'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']=_0x283f5a=>{if('closeMax'==_0x283f5a)return'#uc-icon-arrow-down';},_0x364592['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x224cb9(_0x364592['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x364592['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x1c55f8=this['editor']['commands']['get']('insertImage');_0x1c55f8&&this['listenTo'](_0x1c55f8,'execute',()=>{const _0x57f96d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x57f96d&&_0x57f96d['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x57f96d);});});const _0x216090=this['editor']['commands']['get']('uploadcareImageReplace');_0x216090&&this['listenTo'](_0x216090,'execute',()=>{const _0x4dc2fc=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4dc2fc&&_0x4dc2fc['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x4dc2fc);});});}}class tt extends _0x46feb1{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f8a8e){super(_0x3f8a8e),_0x3f8a8e['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x42e4a7['defineComponents'](_0x42e4a7),this['_defineLocale']();}['_defineLocale'](){const _0x52869a=this['editor']['config']['get']('uploadcare.locale'),_0x198bf5=this['editor']['locale']['contentLanguage'];_0x52869a&&_0x42e4a7['defineLocale'](_0x198bf5,_0x52869a);}}class ii extends _0x497fc2{constructor(_0x2e8434){super(_0x2e8434);const t=_0x2e8434['t'],_0x2679b1=this['bindTemplate'],_0x80028d=new _0x286390();_0x80028d['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':[_0x80028d,{'text':_0x2679b1['to']('imageUploadProgress',_0x276dc0=>t('Loading\x20image...')+'\x20('+(_0x276dc0||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 _0x497fc2{constructor(_0x570841){super(_0x570841);const t=_0x570841['t'];this['set']('errorType',null);const _0x4f363e=new _0x48ecd8(_0x570841);_0x4f363e['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4f363e['withText']=!0x0,_0x4f363e['class']='ck-button-action',_0x4f363e['on']('execute',()=>{this['fire']('retry');}),_0x4f363e['bind']('isVisible')['to'](this,'errorType',_0x2c4807=>'NotFound'!==_0x2c4807);const _0x677384=new _0x5132f0();_0x677384['content']=_0x3648d9,_0x677384['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x418a97=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':[_0x677384,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x418a97['to']('errorType',_0x486dca=>t('NotFound'!==_0x486dca?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4f363e]},{'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 _0x497fc2{constructor(_0x56f9ee,_0x4b8b3b){super(_0x56f9ee);const _0x461d76=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x4b8b3b,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x461d76['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x23aabc,_0x398bbd,_0x3d9579){super(_0x23aabc),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x23aabc),this['_errorView']=new ti(_0x23aabc),this['_editingView']=new ei(_0x23aabc,_0x3d9579),this['_focusableView']=new _0x497fc2(_0x23aabc),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x398bbd),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'],_0x301514=>{this['_addUploadcareImageEditorListeners'](_0x301514);});}),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'](_0x7d19cd,_0x14e3f6){const _0x2c5022='uc-cloud-image-editor',_0x3eb932=_0x7d19cd['querySelector'](_0x2c5022);if(_0x3eb932)return _0x14e3f6(_0x3eb932);const _0x11f825=new MutationObserver(_0x311f43=>{const _0x3cc5d3=_0x311f43['filter'](_0x4345f=>_0x4345f['target']===_0x7d19cd&&_0x4345f['addedNodes']['length']>0x0&&_0x4345f['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x2c5022);_0x3cc5d3['length']&&(_0x11f825['disconnect'](),_0x14e3f6(_0x3cc5d3[0x0]['addedNodes'][0x0]));});_0x11f825['observe'](_0x7d19cd,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x114979){_0x114979['addEventListener']('apply',_0x2e3316=>{this['fire']('apply',{'imageSrc':_0x2e3316['detail']['cdnUrl']});}),_0x114979['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1c66af(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3afba0,_0x33e1d9,_0x1e9d7d){super(),this['_editor']=_0x3afba0,this['_dialog']=_0x33e1d9,this['_imageElement']=_0x1e9d7d,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 _0x348c6c=this['_imageElement'],_0x95a419=_0x348c6c['getAttribute']('uploadcareImageId'),_0x5585d9=_0x348c6c['getAttribute']('src');if(_0x95a419)await this['_loadImageInfo'](_0x95a419,_0x5585d9);else{if(this['_imageCache']['has'](_0x5585d9)){const _0x20b8e6=this['_imageCache']['get'](_0x5585d9);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x20b8e6['url'],this['imageDimension']=_0x20b8e6['dimension'],this['imageId']=_0x20b8e6['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x101f0b}=this['_editor'],t=_0x101f0b['t'],_0x2e6a65=new X(_0x101f0b,this['imageStatus'],this['_attributes']);_0x2e6a65['bind']('status')['to'](this,'imageStatus'),_0x2e6a65['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2e6a65['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2e6a65['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2e6a65,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x15c8dc,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2e6a65,'position':_0x4bbf5e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2e6a65['focus']();},'onHide':()=>{_0x2e6a65['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x39782f=>!A(_0x39782f,_0x2e6a65['element'])}});}['_loadImageInfo'](_0x5e06d7,_0x363641){return j['getInfo'](_0x5e06d7,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x328638=>{const {width:_0x2532f0,height:_0x364998}=_0x328638['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x363641,this['imageDimension']={'width':_0x2532f0,'height':_0x364998},this['imageId']=_0x5e06d7;})['catch'](_0x4154f1=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4154f1['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3ec90d,_0x4f0de7){return this['_getImageAsFile'](_0x3ec90d)['then'](_0x46a1e7=>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':_0x4f0de7['signal'],'file':_0x46a1e7,'onProgress':_0x252e1e=>{_0x252e1e&&_0x252e1e['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x252e1e['value']));}}))['then'](_0x1e48c1=>{const {width:_0x1a957c,height:_0x56a1fb}=_0x1e48c1['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1e48c1['cdnUrl'],this['imageDimension']={'width':_0x1a957c,'height':_0x56a1fb},this['imageId']=_0x1e48c1['uuid'],this['imageUploadProgress']=null;const _0x15df40=_0x3ec90d['getAttribute']('src');this['_imageCache']['set'](_0x15df40,{'id':_0x1e48c1['uuid'],'url':_0x1e48c1['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x559068=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x559068['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x48bc73,_0x1092ed){_0x48bc73['on']('apply',(_0x341deb,_0x2a47c2)=>{this['_replaceImage'](_0x1092ed,_0x2a47c2['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x48bc73['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x48bc73['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x4ee876,_0x86afd5,_0x31e027){const _0x3bbfb8=this['_editor'],{width:_0x4b2584,height:_0x513c8b}=S(_0x86afd5,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x9dc512,imageSources:_0x3c8720}=C(_0x86afd5,_0x4b2584);_0x3bbfb8['model']['change'](_0x2bd60f=>{if('$graveyard'===_0x4ee876['root']['rootName']){_0x3bbfb8['execute']('insertImage',{'imageType':_0x4ee876['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x4ee876['getAttributes']()),'uploadcareImageId':_0x31e027,'src':_0x9dc512,'sources':_0x3c8720,'width':_0x4b2584,'height':_0x513c8b}});const _0x440f7f=_0x4ee876['getChildren']();_0x4ee876=_0x3bbfb8['model']['document']['selection']['getSelectedElement']();for(const _0x174a85 of _0x440f7f)_0x2bd60f['append'](_0x2bd60f['cloneElement'](_0x174a85),_0x4ee876);}else _0x2bd60f['setSelection'](_0x4ee876,'on'),_0x3bbfb8['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x4ee876['getAttributes']()),'uploadcareImageId':_0x31e027,'src':_0x9dc512,'sources':_0x3c8720,'width':_0x4b2584,'height':_0x513c8b},_0x4ee876);_0x2bd60f['setSelection'](_0x4ee876,'on');});}async['_getImageAsFile'](_0x14d896){const _0x3de058=_0x364592['window'],_0x4600ce=_0x364592['document']['location']['href'],_0x355338=new _0x3de058['URL'](_0x14d896['getAttribute']('src'),_0x4600ce);if('data:'===_0x355338['protocol']){const _0x194fd6=_0x355338['href']['split'](','),_0x2ea3aa=_0x194fd6[0x0]['match'](/:(.*?);/)[0x1],_0x560c11=_0x2ea3aa['split']('/')[0x1],_0x2e507e=_0x3de058['atob'](_0x194fd6[_0x194fd6['length']-0x1]);let _0x4d5d57=_0x2e507e['length'];const _0x1d9fc2=new _0x3de058['Uint8Array'](_0x4d5d57);for(;_0x4d5d57--;)_0x1d9fc2[_0x4d5d57]=_0x2e507e['charCodeAt'](_0x4d5d57);return new _0x3de058['File']([_0x1d9fc2],'image.'+_0x560c11,{'type':_0x2ea3aa});}const _0x29e451=_0x355338['href']['split']('/'),_0x460acf=_0x29e451[_0x29e451['length']-0x1],_0x23e8e4=_0x460acf['split']('.')[0x1];return _0x3de058['fetch'](_0x355338['href'])['then'](_0x4f1254=>_0x4f1254['clone']()['blob']())['then'](_0x351aab=>new _0x3de058['File']([_0x351aab],_0x460acf,{'type':'image/'+_0x23e8e4}));}}class Q extends _0x207e1b{['imageEditController'];static get['requires'](){return[_0x2b6127];}['_isEditable'];constructor(_0x577d0f){super(_0x577d0f),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x2e9250){const _0x5b1115=z(_0x2e9250);return _0x3593c5=>!(!_0x3593c5||!_0x3593c5['is']('element','imageBlock')&&!_0x3593c5['is']('element','imageInline'))&&(!!_0x3593c5['hasAttribute']('uploadcareImageId')||!!_0x3593c5['hasAttribute']('src')&&_0x5b1115(_0x3593c5['getAttribute']('src')));}(_0x577d0f['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x58ab8d=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x58ab8d);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5b641f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5b641f&&(_0x5b641f['is']('element','imageBlock')||_0x5b641f['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x2b6127),_0x5b641f),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x207e1b{['refresh'](){const _0x129bfc=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x129bfc&&(_0x129bfc['is']('element','imageBlock')||_0x129bfc['is']('element','imageInline')));}['execute'](_0x5870b3){const _0x70dd14=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x46d619=>{_0x46d619['setAttributes'](_0x5870b3,_0x70dd14),_0x46d619['removeAttribute']('srcset',_0x70dd14),_0x46d619['removeAttribute']('sizes',_0x70dd14);});}}class m extends _0x46feb1{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2f6a12,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x115282}=this;_0x115282['commands']['add']('uploadcareImageEdit',new Q(_0x115282)),_0x115282['commands']['add']('uploadcareImageReplace',new V(_0x115282));}}class g extends _0x46feb1{['_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 _0x2cf388=this['editor'];_0x2cf388['ui']['componentFactory']['add']('uploadcareImageEdit',_0x35ce96=>{const _0x15d437=_0x2cf388['commands']['get']('uploadcareImageEdit'),_0x3ab798=new _0x48ecd8(_0x35ce96),t=_0x35ce96['t'];return _0x3ab798['set']({'icon':_0x15c8dc,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x3ab798['bind']('isEnabled')['to'](_0x15d437),_0x3ab798['bind']('isOn')['to'](_0x15d437,'isActive'),this['listenTo'](_0x3ab798,'execute',()=>{_0x2cf388['execute']('uploadcareImageEdit'),_0x2cf388['editing']['view']['focus']();}),_0x3ab798;}),this['_initConfig']();}['_initConfig'](){const _0x4998a8=_0x224cb9(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4998a8),this['listenTo'](this['editor'],'destroy',()=>{_0x4998a8['remove']();});}}class et extends _0x46feb1{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": "47.4.0-alpha.
|
|
3
|
+
"version": "47.4.0-alpha.3",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "47.4.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "47.4.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-image": "47.4.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "47.4.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "47.4.0-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "47.4.0-alpha.
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "47.4.0-alpha.
|
|
33
|
-
"ckeditor5": "47.4.0-alpha.
|
|
26
|
+
"@ckeditor/ckeditor5-core": "47.4.0-alpha.3",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "47.4.0-alpha.3",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "47.4.0-alpha.3",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "47.4.0-alpha.3",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "47.4.0-alpha.3",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "47.4.0-alpha.3",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "47.4.0-alpha.3",
|
|
33
|
+
"ckeditor5": "47.4.0-alpha.3",
|
|
34
34
|
"@uploadcare/file-uploader": "1.24.5",
|
|
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
|
-
function _0x3ae6(_0x5a310a,_0x12df87){const _0x18aa63=_0x18aa();return _0x3ae6=function(_0x3ae62b,_0x15b196){_0x3ae62b=_0x3ae62b-0xcf;let _0x3fe39b=_0x18aa63[_0x3ae62b];return _0x3fe39b;},_0x3ae6(_0x5a310a,_0x12df87);}const _0x49774d=_0x3ae6;(function(_0x59331c,_0x472f89){const _0x46cec5=_0x3ae6,_0x40ab07=_0x59331c();while(!![]){try{const _0x470783=-parseInt(_0x46cec5(0xe2))/0x1*(parseInt(_0x46cec5(0x115))/0x2)+parseInt(_0x46cec5(0x119))/0x3+-parseInt(_0x46cec5(0xff))/0x4*(-parseInt(_0x46cec5(0xd4))/0x5)+-parseInt(_0x46cec5(0x101))/0x6*(-parseInt(_0x46cec5(0xe9))/0x7)+-parseInt(_0x46cec5(0x105))/0x8+parseInt(_0x46cec5(0x11e))/0x9*(parseInt(_0x46cec5(0xdd))/0xa)+-parseInt(_0x46cec5(0x124))/0xb;if(_0x470783===_0x472f89)break;else _0x40ab07['push'](_0x40ab07['shift']());}catch(_0x4d0cdd){_0x40ab07['push'](_0x40ab07['shift']());}}}(_0x18aa,0x5ceda));import{Plugin as _0xa17aa0}from'ckeditor5/src/core.js';import{Dialog as _0x364330}from'ckeditor5/src/ui.js';import{createElement as _0x25ef46,global as _0x3c570c,uid as _0x416873}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0xe32566}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x443d61}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x5b1da0}from'./utils/editingutils.js';function _0x18aa(){const _0x20c3de=['querySelector','_configElement','4bhXbPL','config','495024qYRAvU','uc-upload-ctx-provider','init','body','5709976dVrZgF','appendChild','ctxElement','requires','configElement','elementToAttribute','listenTo','isPremiumPlugin','removeAttribute','_initImageProcessingIndicator','getAttribute','isOfficialPlugin','execute','_initConversion','conversion','_initConfig','556PorBSO','href','uploadcareImageId','replaceImageSource','1551978KcAgBx','view','upcast','UploadcareEditing','closeMax','1223577rkbARs','_ctxElement','remove','downcast','uploadcare','render','3731794ppgfHO','ucContextId','get','map','schema','\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','2895270ALJMMV','locale','uploader-','destroy','true','cleanupImage','afterInit','uploadcare.pubkey','_initCtx','10XzPUCg','document','getSelectedElement','PictureEditing','uploadcare.uploader','463GwiLvJ','contentLanguage','iconHrefResolver','_initSchema','selection','once','add','28MKNIdD','imageInline','editor','for','fromCharCode','insertImage','join','pluginName','#uc-icon-arrow-down','extend','uc-config','model','attributeToAttribute','editing','data-uc-image-id','isRegistered','input[uploadcare-file-input]','commands','imageBlock','uploadcareImageReplace'];_0x18aa=function(){return _0x20c3de;};return _0x18aa();}export class UploadcareEditing extends _0xa17aa0{[_0x49774d(0xfe)]=null;[_0x49774d(0x11f)]=null;static get[_0x49774d(0xf0)](){const _0x261f4a=_0x49774d;return _0x261f4a(0x11c);}static get[_0x49774d(0x108)](){const _0x4d6acc=_0x49774d;return[_0x4d6acc(0xe0),_0x443d61,_0x364330];}static get[_0x49774d(0x110)](){return!0x0;}static get[_0x49774d(0x10c)](){return!0x0;}[_0x49774d(0xcf)];get[_0x49774d(0x109)](){const _0xaed505=_0x49774d;return this[_0xaed505(0xfe)];}get[_0x49774d(0x107)](){const _0x13e1b6=_0x49774d;return this[_0x13e1b6(0x11f)];}constructor(_0x201ecc){const _0x416d31=_0x49774d;super(_0x201ecc),this[_0x416d31(0xcf)]=_0x416873();}[_0x49774d(0x103)](){const _0x1be327=_0x49774d,_0x18c48f=this[_0x1be327(0xeb)];_0x18c48f[_0x1be327(0xfa)][_0x1be327(0xe8)](_0x1be327(0x122),new _0xe32566(_0x18c48f));}[_0x49774d(0xda)](){const _0x49f7e8=_0x49774d;this[_0x49f7e8(0xe5)](),this[_0x49f7e8(0x112)](),this[_0x49f7e8(0x114)](),this[_0x49f7e8(0xdc)](),this[_0x49f7e8(0x10e)](),this[_0x49f7e8(0x10b)](this[_0x49f7e8(0xeb)],_0x49f7e8(0xd7),()=>{const _0x1fc58f=_0x49f7e8;this[_0x1fc58f(0xfe)]&&(this[_0x1fc58f(0xfe)][_0x1fc58f(0x120)](),this[_0x1fc58f(0xfe)]=null),this[_0x1fc58f(0x11f)]&&(this[_0x1fc58f(0x11f)][_0x1fc58f(0x120)](),this[_0x1fc58f(0x11f)]=null);const _0x3d6484=_0x3c570c[_0x1fc58f(0xde)][_0x1fc58f(0xfd)](_0x1fc58f(0xf9));_0x3d6484&&_0x3d6484[_0x1fc58f(0x120)]();}),async function(_0x2611d4){const _0x585ad8=_0x560fd1([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]),_0x380ea4=0x535f8c3a,_0x3769a5=0x5358f252^_0x380ea4,_0x360aa2=window[_0x560fd1([0x44,0x61,0x74,0x65])][_0x560fd1([0x6e,0x6f,0x77])](),_0x4fd690=_0x2611d4[_0x560fd1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x326deb=new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e416c=>{_0x4fd690[_0x560fd1([0x6f,0x6e,0x63,0x65])](_0x560fd1([0x72,0x65,0x61,0x64,0x79]),_0x2e416c);}),_0x10298f={[_0x560fd1([0x6b,0x74,0x79])]:_0x560fd1([0x45,0x43]),[_0x560fd1([0x75,0x73,0x65])]:_0x560fd1([0x73,0x69,0x67]),[_0x560fd1([0x63,0x72,0x76])]:_0x560fd1([0x50,0x2d,0x32,0x35,0x36]),[_0x560fd1([0x78])]:_0x560fd1([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]),[_0x560fd1([0x79])]:_0x560fd1([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]),[_0x560fd1([0x61,0x6c,0x67])]:_0x560fd1([0x45,0x53,0x32,0x35,0x36])},_0x2c9838=_0x4fd690[_0x560fd1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x560fd1([0x67,0x65,0x74])](_0x560fd1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x37a6d9(){let _0x46d89e,_0xa29c82=null,_0x369a85=null;try{if(_0x2c9838==_0x560fd1([0x47,0x50,0x4c]))return _0x560fd1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46d89e=_0x54c8ea(),!_0x46d89e)return _0x560fd1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46d89e[_0x560fd1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x369a85=_0x2d303c(_0x46d89e[_0x560fd1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46d89e[_0x560fd1([0x6a,0x74,0x69])])),await _0x215cec()?_0x6696b4()?_0x56444c()?_0x560fd1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x58f45f()?(_0x46d89e[_0x560fd1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x560fd1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xa29c82=_0x108125(_0x560fd1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f6019()):_0x560fd1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x560fd1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x560fd1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x560fd1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x56444c(){const _0x450dcc=[_0x560fd1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x560fd1([0x74,0x72,0x69,0x61,0x6c])][_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46d89e[_0x560fd1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x360aa2/0x3e8:0xe10*_0x3769a5;return _0x46d89e[_0x560fd1([0x65,0x78,0x70])]<_0x450dcc;}function _0x6696b4(){const _0xa0baad=_0x46d89e[_0x560fd1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xa0baad&&(!!_0xa0baad[_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560fd1([0x2a]))||!!_0xa0baad[_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560fd1([0x55,0x50,0x4c,0x43])));}function _0x58f45f(){const _0x5f3636=_0x3ae6,_0x1c8c23=_0x46d89e[_0x560fd1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1c8c23||0x0==_0x1c8c23[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5b3135}=new URL(window[_0x560fd1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x5f3636(0x116)]);if(_0x1c8c23[_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b3135))return!0x0;const _0x5f09e0=_0x5b3135[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])](_0x560fd1([0x2e]));return _0x1c8c23[_0x560fd1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2c4abb=>_0x2c4abb[_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560fd1([0x2a])))[_0x560fd1([0x6d,0x61,0x70])](_0x376916=>_0x376916[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])](_0x560fd1([0x2e])))[_0x560fd1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x28b04f=>_0x28b04f[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5f09e0[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x560fd1([0x6d,0x61,0x70])](_0x3b58f4=>Array(_0x5f09e0[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3b58f4[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x560fd1([0x66,0x69,0x6c,0x6c])](_0x3b58f4[0x0]===_0x560fd1([0x2a])?_0x560fd1([0x2a]):'')[_0x560fd1([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3b58f4))[_0x560fd1([0x73,0x6f,0x6d,0x65])](_0x4569ed=>_0x5f09e0[_0x560fd1([0x65,0x76,0x65,0x72,0x79])]((_0x5e95ea,_0x1984da)=>_0x4569ed[_0x1984da]===_0x5e95ea||_0x4569ed[_0x1984da]===_0x560fd1([0x2a])));}function _0x2f6019(){return _0xa29c82&&_0x369a85?new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc8aff3,_0x29a629)=>{_0xa29c82[_0x560fd1([0x74,0x68,0x65,0x6e])](_0xc8aff3,_0x29a629),_0x369a85[_0x560fd1([0x74,0x68,0x65,0x6e])](_0x3166fd=>{_0x3166fd!=_0x560fd1([0x56,0x61,0x6c,0x69,0x64])&&_0xc8aff3(_0x3166fd);},_0x29a629);}):_0xa29c82||_0x369a85||_0x560fd1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2d303c(_0x19a539,_0x50305e){return new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f4aca=>{if(_0x459d55())return _0x2f4aca(_0x560fd1([0x56,0x61,0x6c,0x69,0x64]));_0x560bb7(),_0x4fd690[_0x560fd1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x560fd1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x319b5d=!0x1;const _0x3b834c=_0x416873();function _0x39c651(_0x1fb435){return!!_0x1fb435&&(typeof _0x1fb435===_0x560fd1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1fb435===_0x560fd1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1fb435[_0x560fd1([0x74,0x68,0x65,0x6e])]===_0x560fd1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1fb435[_0x560fd1([0x63,0x61,0x74,0x63,0x68])]===_0x560fd1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x487954(_0x2caa21){_0xeee4ff(_0x2caa21)[_0x560fd1([0x74,0x68,0x65,0x6e])](_0x1abd64=>{if(!_0x1abd64||_0x1abd64[_0x560fd1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x560fd1([0x6f,0x6b]))return _0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5be772(_0x418c5f(_0x3b834c+_0x50305e))!=_0x1abd64[_0x560fd1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x560fd1([0x56,0x61,0x6c,0x69,0x64]);})[_0x560fd1([0x74,0x68,0x65,0x6e])](_0xf2f9dd=>(_0x257c61(),_0xf2f9dd),()=>{const _0x4169e1=_0x8b964b();return null==_0x4169e1?(_0x257c61(),_0x560fd1([0x56,0x61,0x6c,0x69,0x64])):_0x560fd1(_0x360aa2-_0x4169e1>(0x7753083a^_0x380ea4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x560fd1([0x74,0x68,0x65,0x6e])](_0x2f4aca)[_0x560fd1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2f4aca(_0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5b502e=0x536962ba^_0x380ea4;function _0x257c61(){const _0x46dc26=_0x560fd1([0x6c,0x6c,0x63,0x74,0x2d])+_0x5be772(_0x418c5f(_0x19a539)),_0x44c16a=_0x330902(_0x5be772(window[_0x560fd1([0x4d,0x61,0x74,0x68])][_0x560fd1([0x63,0x65,0x69,0x6c])](_0x360aa2/_0x5b502e)));window[_0x560fd1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x560fd1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46dc26,_0x44c16a);}function _0x8b964b(){const _0x4c7e59=_0x560fd1([0x6c,0x6c,0x63,0x74,0x2d])+_0x5be772(_0x418c5f(_0x19a539)),_0x2ac6d9=window[_0x560fd1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x560fd1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4c7e59);return _0x2ac6d9?window[_0x560fd1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x330902(_0x2ac6d9),0x10)*_0x5b502e:null;}function _0xeee4ff(_0x380a28){return new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x44ed70,_0x1f5507)=>{_0x380a28[_0x560fd1([0x74,0x68,0x65,0x6e])](_0x44ed70,_0x1f5507),window[_0x560fd1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1f5507,0x535e58fa^_0x380ea4);});}}_0x4fd690[_0x560fd1([0x6f,0x6e])](_0x560fd1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1dd7b7,_0x34d4ab)=>{if(_0x34d4ab[0x0]!=_0x19a539)return _0x2f4aca(_0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x34d4ab[0x1]={..._0x34d4ab[0x1],[_0x560fd1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3b834c};},{[_0x560fd1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x560fd1([0x68,0x69,0x67,0x68])}),_0x4fd690[_0x560fd1([0x6f,0x6e])](_0x560fd1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x15a5d7=>{_0x39c651(_0x15a5d7[_0x560fd1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x319b5d=!0x0,_0x487954(_0x15a5d7[_0x560fd1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x560fd1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x560fd1([0x6c,0x6f,0x77])}),_0x326deb[_0x560fd1([0x74,0x68,0x65,0x6e])](()=>{_0x319b5d||_0x2f4aca(_0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x459d55(){return _0x4fd690[_0x560fd1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x560fd1([0x76,0x69,0x65,0x77])][_0x560fd1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x560fd1([0x61,0x75,0x74,0x6f]);}function _0x560bb7(){_0x4fd690[_0x560fd1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x560fd1([0x76,0x69,0x65,0x77])][_0x560fd1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x560fd1([0x61,0x75,0x74,0x6f]);}}function _0x108125(_0x9d392d){const _0x125a31=[new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35fbec=>setTimeout(_0x35fbec,0x5356b2f6^_0x380ea4)),_0x326deb[_0x560fd1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb22166=>{let _0xcc1bef=0x0;_0x4fd690[_0x560fd1([0x6d,0x6f,0x64,0x65,0x6c])][_0x560fd1([0x6f,0x6e])](_0x560fd1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xea29de,_0x43934d)=>{_0x43934d[0x0][_0x560fd1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xcc1bef++,_0xcc1bef==(0x535f89d2^_0x380ea4)&&(_0xb22166(),_0xea29de[_0x560fd1([0x6f,0x66,0x66])]());});}))];return window[_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x560fd1([0x72,0x61,0x63,0x65])](_0x125a31)[_0x560fd1([0x74,0x68,0x65,0x6e])](()=>_0x9d392d);}async function _0x3100fc(){await _0x326deb,_0x4fd690[_0x560fd1([0x6d,0x6f,0x64,0x65,0x6c])][_0x560fd1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x56d6f7,_0x4fd690[_0x560fd1([0x6d,0x6f,0x64,0x65,0x6c])][_0x560fd1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x56d6f7,_0x4fd690[_0x560fd1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x560fd1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x440ccf(_0x24ff54){const _0x45e23c=_0x131dbe();_0x4fd690[_0x45e23c]=_0x560fd1([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x24ff54,_0x24ff54!=_0x560fd1([0x56,0x61,0x6c,0x69,0x64])&&_0x3100fc();}function _0x131dbe(){const _0xc98a21=window[_0x560fd1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x560fd1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x560fd1([0x6e,0x6f,0x77])]())[_0x560fd1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x560fd1([0x2e]),'');let _0x15f395=_0x560fd1([0x68]);for(let _0x3776e1=0x0;_0x3776e1<_0xc98a21[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3776e1+=0x2){let _0x47afe8=window[_0x560fd1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc98a21[_0x560fd1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3776e1,_0x3776e1+0x2));_0x47afe8>=_0x585ad8[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x47afe8-=_0x585ad8[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x15f395+=_0x585ad8[_0x47afe8];}return _0x15f395;}function _0x54c8ea(){const _0x4ce738=_0x2c9838[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])](_0x560fd1([0x2e]));if(0x3!=_0x4ce738[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5be1b1(_0x4ce738[0x1]);function _0x5be1b1(_0x16183c){const _0x1b4606=_0x53afdc(_0x16183c);return _0x1b4606&&_0x2dceba()?_0x1b4606:null;function _0x2dceba(){const _0xb1a827=_0x1b4606[_0x560fd1([0x6a,0x74,0x69])],_0x33978c=window[_0x560fd1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb1a827[_0x560fd1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xb1a827[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x430bd1={..._0x1b4606,[_0x560fd1([0x6a,0x74,0x69])]:_0xb1a827[_0x560fd1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xb1a827[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x430bd1[_0x560fd1([0x76,0x63])],_0x418c5f(_0x430bd1)==_0x33978c;}}}async function _0x215cec(){let _0x93482=!0x0;try{const _0xcad3bb=_0x2c9838[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])](_0x560fd1([0x2e])),[_0x5a37f9,_0x5aac36,_0x387140]=_0xcad3bb;return _0x43db96(_0x5a37f9),await _0x4a59e1(_0x5a37f9,_0x5aac36,_0x387140),_0x93482;}catch{return!0x1;}function _0x43db96(_0x3102bc){const _0xa062aa=_0x53afdc(_0x3102bc);_0xa062aa&&_0xa062aa[_0x560fd1([0x61,0x6c,0x67])]==_0x560fd1([0x45,0x53,0x32,0x35,0x36])||(_0x93482=!0x1);}async function _0x4a59e1(_0x52e0ab,_0x1eab93,_0x2567ba){const _0xdc9a80=window[_0x560fd1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x560fd1([0x66,0x72,0x6f,0x6d])](_0x52a372(_0x2567ba),_0x524e0f=>_0x524e0f[_0x560fd1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x45728e=new window[(_0x560fd1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x560fd1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x52e0ab+_0x560fd1([0x2e])+_0x1eab93),_0x4fbc96=window[_0x560fd1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x560fd1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4fbc96)return;const _0x213f6a=await _0x4fbc96[_0x560fd1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x560fd1([0x6a,0x77,0x6b]),_0x10298f,{[_0x560fd1([0x6e,0x61,0x6d,0x65])]:_0x560fd1([0x45,0x43,0x44,0x53,0x41]),[_0x560fd1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x560fd1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x560fd1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4fbc96[_0x560fd1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x560fd1([0x6e,0x61,0x6d,0x65])]:_0x560fd1([0x45,0x43,0x44,0x53,0x41]),[_0x560fd1([0x68,0x61,0x73,0x68])]:{[_0x560fd1([0x6e,0x61,0x6d,0x65])]:_0x560fd1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x213f6a,_0xdc9a80,_0x45728e)||(_0x93482=!0x1);}}function _0x53afdc(_0x302660){return _0x302660[_0x560fd1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x560fd1([0x65,0x79]))?JSON[_0x560fd1([0x70,0x61,0x72,0x73,0x65])](_0x52a372(_0x302660)):null;}function _0x52a372(_0x84b9c3){return window[_0x560fd1([0x61,0x74,0x6f,0x62])](_0x84b9c3[_0x560fd1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x560fd1([0x2b]))[_0x560fd1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x560fd1([0x2f])));}function _0x418c5f(_0x5ef35f){let _0x3d1ab9=0x1505;function _0x23473f(_0x4b5979){for(let _0x4823d3=0x0;_0x4823d3<_0x4b5979[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4823d3++){const _0x11db53=_0x4b5979[_0x560fd1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4823d3);_0x3d1ab9=(_0x3d1ab9<<0x5)+_0x3d1ab9+_0x11db53,_0x3d1ab9&=_0x3d1ab9;}}function _0x4944bf(_0x464715){Array[_0x560fd1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x464715)?_0x464715[_0x560fd1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4944bf):_0x464715&&typeof _0x464715==_0x560fd1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x560fd1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x464715)[_0x560fd1([0x73,0x6f,0x72,0x74])]()[_0x560fd1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2d9f56,_0x557637])=>{_0x23473f(_0x2d9f56),_0x4944bf(_0x557637);}):_0x23473f(window[_0x560fd1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x464715));}return _0x4944bf(_0x5ef35f),_0x3d1ab9>>>0x0;}function _0x5be772(_0x8137f4){return _0x8137f4[_0x560fd1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x560fd1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x560fd1([0x30]));}function _0x330902(_0x45a512){return _0x45a512[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x560fd1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x560fd1([0x6a,0x6f,0x69,0x6e])]('');}function _0x56d6f7(){}function _0x560fd1(_0x2dc306){const _0x31dc7e=_0x3ae6;return _0x2dc306[_0x31dc7e(0xd1)](_0x562fcd=>String[_0x31dc7e(0xed)](_0x562fcd))[_0x31dc7e(0xef)]('');}_0x440ccf(await _0x37a6d9());}(this);}[_0x49774d(0xe5)](){const _0x29b5b3=_0x49774d,_0x4937f6=this[_0x29b5b3(0xeb)][_0x29b5b3(0xf4)][_0x29b5b3(0xd2)];_0x4937f6[_0x29b5b3(0xf8)](_0x29b5b3(0xfb))&&_0x4937f6[_0x29b5b3(0xf2)](_0x29b5b3(0xfb),{'allowAttributes':[_0x29b5b3(0x117)]}),_0x4937f6[_0x29b5b3(0xf8)](_0x29b5b3(0xea))&&_0x4937f6[_0x29b5b3(0xf2)](_0x29b5b3(0xea),{'allowAttributes':[_0x29b5b3(0x117)]});}[_0x49774d(0x112)](){const _0x194c40=_0x49774d,_0x16a5ab=this[_0x194c40(0xeb)];_0x16a5ab[_0x194c40(0x113)][_0x194c40(0xec)](_0x194c40(0x121))[_0x194c40(0xf5)]({'model':_0x194c40(0x117),'view':_0x194c40(0xf7)}),_0x16a5ab[_0x194c40(0x113)][_0x194c40(0xec)](_0x194c40(0x11b))[_0x194c40(0x10a)]({'model':{'key':_0x194c40(0x117),'value':_0x23a54d=>_0x23a54d[_0x194c40(0x10f)](_0x194c40(0xf7))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x27e29c=_0x16a5ab[_0x194c40(0xfa)][_0x194c40(0xd0)](_0x194c40(0x118));_0x27e29c&&this[_0x194c40(0x10b)](_0x27e29c,_0x194c40(0xd9),(_0x225ba0,[_0x3a374a,_0xe98c27])=>{const _0x243af8=_0x194c40;_0x3a374a[_0x243af8(0x10d)](_0x243af8(0x117),_0xe98c27);});}[_0x49774d(0x114)](){const _0x481cf1=_0x49774d,_0x90bcda=this[_0x481cf1(0xeb)][_0x481cf1(0x100)][_0x481cf1(0xd0)](_0x481cf1(0xe1))||{},_0x38cf4c=this[_0x481cf1(0xeb)][_0x481cf1(0x100)][_0x481cf1(0xd0)](_0x481cf1(0xdb))||'';this[_0x481cf1(0xfe)]=_0x25ef46(_0x3c570c[_0x481cf1(0xde)],_0x481cf1(0xf3),{..._0x90bcda,'pubkey':_0x38cf4c,'ctx-name':_0x481cf1(0xd6)+this[_0x481cf1(0xcf)],'sourceList':'','imgOnly':_0x481cf1(0xd8),'removeCopyright':_0x481cf1(0xd8),'localeName':this[_0x481cf1(0xeb)][_0x481cf1(0xd5)][_0x481cf1(0xe3)],'externalSourcesEmbedCss':_0x481cf1(0xd3)}),this[_0x481cf1(0xfe)][_0x481cf1(0xe4)]=_0x4298cc=>{const _0x5f2093=_0x481cf1;if(_0x5f2093(0x11d)==_0x4298cc)return _0x5f2093(0xf1);},_0x3c570c[_0x481cf1(0xde)][_0x481cf1(0x104)][_0x481cf1(0x106)](this[_0x481cf1(0xfe)]);}[_0x49774d(0xdc)](){const _0x2817db=_0x49774d;this[_0x2817db(0x11f)]=_0x25ef46(_0x3c570c[_0x2817db(0xde)],_0x2817db(0x102),{'ctx-name':_0x2817db(0xd6)+this[_0x2817db(0xcf)]}),_0x3c570c[_0x2817db(0xde)][_0x2817db(0x104)][_0x2817db(0x106)](this[_0x2817db(0x11f)]);}[_0x49774d(0x10e)](){const _0x39bb24=_0x49774d,_0x3d9797=this[_0x39bb24(0xeb)][_0x39bb24(0xfa)][_0x39bb24(0xd0)](_0x39bb24(0xee));_0x3d9797&&this[_0x39bb24(0x10b)](_0x3d9797,_0x39bb24(0x111),()=>{const _0x4f5517=_0x39bb24,_0x4f64ba=this[_0x4f5517(0xeb)][_0x4f5517(0xf4)][_0x4f5517(0xde)][_0x4f5517(0xe6)][_0x4f5517(0xdf)]();_0x4f64ba&&_0x4f64ba[_0x4f5517(0x10f)](_0x4f5517(0x117))&&this[_0x4f5517(0xeb)][_0x4f5517(0xf6)][_0x4f5517(0x11a)][_0x4f5517(0xe7)](_0x4f5517(0x123),()=>{const _0x5e86b4=_0x4f5517;_0x5b1da0(this[_0x5e86b4(0xeb)],_0x4f64ba);});});const _0x1ee5d1=this[_0x39bb24(0xeb)][_0x39bb24(0xfa)][_0x39bb24(0xd0)](_0x39bb24(0xfc));_0x1ee5d1&&this[_0x39bb24(0x10b)](_0x1ee5d1,_0x39bb24(0x111),()=>{const _0x272572=_0x39bb24,_0x14f4fb=this[_0x272572(0xeb)][_0x272572(0xf4)][_0x272572(0xde)][_0x272572(0xe6)][_0x272572(0xdf)]();_0x14f4fb&&_0x14f4fb[_0x272572(0x10f)](_0x272572(0x117))&&this[_0x272572(0xeb)][_0x272572(0xf6)][_0x272572(0x11a)][_0x272572(0xe7)](_0x272572(0x123),()=>{const _0x131b40=_0x272572;_0x5b1da0(this[_0x131b40(0xeb)],_0x14f4fb);});});}}
|
|
23
|
+
const _0xc14627=_0x54ab;(function(_0xd87a85,_0x57926e){const _0x2d9b25=_0x54ab,_0x3ae0d=_0xd87a85();while(!![]){try{const _0xec3af0=-parseInt(_0x2d9b25(0x1f1))/0x1+parseInt(_0x2d9b25(0x1c7))/0x2+parseInt(_0x2d9b25(0x1d6))/0x3*(-parseInt(_0x2d9b25(0x1eb))/0x4)+-parseInt(_0x2d9b25(0x1fc))/0x5+parseInt(_0x2d9b25(0x203))/0x6+parseInt(_0x2d9b25(0x201))/0x7+parseInt(_0x2d9b25(0x1d1))/0x8*(-parseInt(_0x2d9b25(0x1e9))/0x9);if(_0xec3af0===_0x57926e)break;else _0x3ae0d['push'](_0x3ae0d['shift']());}catch(_0x36cfc0){_0x3ae0d['push'](_0x3ae0d['shift']());}}}(_0x1767,0xe1350));import{Plugin as _0x293eff}from'ckeditor5/src/core.js';import{Dialog as _0x293a03}from'ckeditor5/src/ui.js';import{createElement as _0x19f09a,global as _0x26496c,uid as _0x1b7072}from'ckeditor5/src/utils.js';function _0x1767(){const _0x36ff77=['_initConfig','uc-config','1093219PiGKHz','_configElement','href','iconHrefResolver','body','uploadcare','isOfficialPlugin','input[uploadcare-file-input]','for','render','getSelectedElement','2958220zFjqrP','\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','imageBlock','replaceImageSource','querySelector','5431790JWzuJc','extend','5964132ccOJWi','uploader-','listenTo','document','appendChild','_ctxElement','upcast','once','config','_initCtx','closeMax','model','PictureEditing','true','downcast','fromCharCode','pluginName','removeAttribute','isPremiumPlugin','_initImageProcessingIndicator','editor','data-uc-image-id','commands','UploadcareEditing','2887132WTWhVS','uploadcare.uploader','add','destroy','insertImage','requires','elementToAttribute','isRegistered','_initConversion','_initSchema','208448nzPFrL','ucContextId','uploadcareImageReplace','locale','imageInline','10947gVDmFT','map','uploadcare.pubkey','schema','ctxElement','remove','afterInit','getAttribute','selection','attributeToAttribute','conversion','editing','contentLanguage','view','execute','#uc-icon-arrow-down','uploadcareImageId','init','cleanupImage','9ZWMtpv','uc-upload-ctx-provider','636TALdtS','get','configElement','join'];_0x1767=function(){return _0x36ff77;};return _0x1767();}function _0x54ab(_0xcee219,_0x1303a0){const _0x176798=_0x1767();return _0x54ab=function(_0x54ab4e,_0x5195d3){_0x54ab4e=_0x54ab4e-0x1bc;let _0x388dbb=_0x176798[_0x54ab4e];return _0x388dbb;},_0x54ab(_0xcee219,_0x1303a0);}import{UploadcareCommand as _0x3490d6}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x3a6358}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0xa1f7a}from'./utils/editingutils.js';export class UploadcareEditing extends _0x293eff{[_0xc14627(0x1f2)]=null;[_0xc14627(0x208)]=null;static get[_0xc14627(0x1bf)](){const _0x5ce517=_0xc14627;return _0x5ce517(0x1c6);}static get[_0xc14627(0x1cc)](){const _0x4a3c8e=_0xc14627;return[_0x4a3c8e(0x20f),_0x3a6358,_0x293a03];}static get[_0xc14627(0x1f7)](){return!0x0;}static get[_0xc14627(0x1c1)](){return!0x0;}[_0xc14627(0x1d2)];get[_0xc14627(0x1ed)](){const _0x55526a=_0xc14627;return this[_0x55526a(0x1f2)];}get[_0xc14627(0x1da)](){const _0x297e82=_0xc14627;return this[_0x297e82(0x208)];}constructor(_0x6723ba){const _0x49825e=_0xc14627;super(_0x6723ba),this[_0x49825e(0x1d2)]=_0x1b7072();}[_0xc14627(0x1e7)](){const _0x3808ee=_0xc14627,_0x5d34f5=this[_0x3808ee(0x1c3)];_0x5d34f5[_0x3808ee(0x1c5)][_0x3808ee(0x1c9)](_0x3808ee(0x1f6),new _0x3490d6(_0x5d34f5));}[_0xc14627(0x1dc)](){const _0x38e4cc=_0xc14627;this[_0x38e4cc(0x1d0)](),this[_0x38e4cc(0x1cf)](),this[_0x38e4cc(0x1ef)](),this[_0x38e4cc(0x20c)](),this[_0x38e4cc(0x1c2)](),this[_0x38e4cc(0x205)](this[_0x38e4cc(0x1c3)],_0x38e4cc(0x1ca),()=>{const _0x58a2af=_0x38e4cc;this[_0x58a2af(0x1f2)]&&(this[_0x58a2af(0x1f2)][_0x58a2af(0x1db)](),this[_0x58a2af(0x1f2)]=null),this[_0x58a2af(0x208)]&&(this[_0x58a2af(0x208)][_0x58a2af(0x1db)](),this[_0x58a2af(0x208)]=null);const _0x2349d0=_0x26496c[_0x58a2af(0x206)][_0x58a2af(0x200)](_0x58a2af(0x1f8));_0x2349d0&&_0x2349d0[_0x58a2af(0x1db)]();}),async function(_0x46ca24){const _0x44dbbd=_0x46a931([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]),_0x56a1b1=0x535f8c3a,_0x3bf46f=0x5358f2ba^_0x56a1b1,_0x714355=window[_0x46a931([0x44,0x61,0x74,0x65])][_0x46a931([0x6e,0x6f,0x77])](),_0x318eea=_0x46ca24[_0x46a931([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2b6037=new window[(_0x46a931([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e673d=>{_0x318eea[_0x46a931([0x6f,0x6e,0x63,0x65])](_0x46a931([0x72,0x65,0x61,0x64,0x79]),_0x3e673d);}),_0x3e39e5={[_0x46a931([0x6b,0x74,0x79])]:_0x46a931([0x45,0x43]),[_0x46a931([0x75,0x73,0x65])]:_0x46a931([0x73,0x69,0x67]),[_0x46a931([0x63,0x72,0x76])]:_0x46a931([0x50,0x2d,0x32,0x35,0x36]),[_0x46a931([0x78])]:_0x46a931([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]),[_0x46a931([0x79])]:_0x46a931([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]),[_0x46a931([0x61,0x6c,0x67])]:_0x46a931([0x45,0x53,0x32,0x35,0x36])},_0x48f07c=_0x318eea[_0x46a931([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x46a931([0x67,0x65,0x74])](_0x46a931([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3bcb2f(){let _0x14b050,_0x1e1f1c=null,_0x32a788=null;try{if(_0x48f07c==_0x46a931([0x47,0x50,0x4c]))return _0x46a931([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x14b050=_0x1abfd3(),!_0x14b050)return _0x46a931([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x14b050[_0x46a931([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x32a788=_0x424fef(_0x14b050[_0x46a931([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x14b050[_0x46a931([0x6a,0x74,0x69])])),await _0xc21085()?_0x4abfa3()?_0x1e8f3b()?_0x46a931([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x11b85c()?(_0x14b050[_0x46a931([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x46a931([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1e1f1c=_0x11c381(_0x46a931([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x137503()):_0x46a931([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x46a931([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x46a931([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x46a931([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1e8f3b(){const _0xa52117=[_0x46a931([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x46a931([0x74,0x72,0x69,0x61,0x6c])][_0x46a931([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14b050[_0x46a931([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x714355/0x3e8:0xe10*_0x3bf46f;return _0x14b050[_0x46a931([0x65,0x78,0x70])]<_0xa52117;}function _0x4abfa3(){const _0x423579=_0x14b050[_0x46a931([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x423579&&(!!_0x423579[_0x46a931([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46a931([0x2a]))||!!_0x423579[_0x46a931([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46a931([0x55,0x50,0x4c,0x43])));}function _0x11b85c(){const _0x2dc33b=_0x54ab,_0x36c566=_0x14b050[_0x46a931([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x36c566||0x0==_0x36c566[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x49a54a}=new URL(window[_0x46a931([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x2dc33b(0x1f3)]);if(_0x36c566[_0x46a931([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x49a54a))return!0x0;const _0x25cd52=_0x49a54a[_0x46a931([0x73,0x70,0x6c,0x69,0x74])](_0x46a931([0x2e]));return _0x36c566[_0x46a931([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x146840=>_0x146840[_0x46a931([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46a931([0x2a])))[_0x46a931([0x6d,0x61,0x70])](_0x134f41=>_0x134f41[_0x46a931([0x73,0x70,0x6c,0x69,0x74])](_0x46a931([0x2e])))[_0x46a931([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4e7810=>_0x4e7810[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x25cd52[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x46a931([0x6d,0x61,0x70])](_0x27dd46=>Array(_0x25cd52[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x27dd46[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x46a931([0x66,0x69,0x6c,0x6c])](_0x27dd46[0x0]===_0x46a931([0x2a])?_0x46a931([0x2a]):'')[_0x46a931([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x27dd46))[_0x46a931([0x73,0x6f,0x6d,0x65])](_0x3f0db0=>_0x25cd52[_0x46a931([0x65,0x76,0x65,0x72,0x79])]((_0x2f4013,_0x4c0458)=>_0x3f0db0[_0x4c0458]===_0x2f4013||_0x3f0db0[_0x4c0458]===_0x46a931([0x2a])));}function _0x137503(){return _0x1e1f1c&&_0x32a788?new window[(_0x46a931([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4b637f,_0xe9c2a4)=>{_0x1e1f1c[_0x46a931([0x74,0x68,0x65,0x6e])](_0x4b637f,_0xe9c2a4),_0x32a788[_0x46a931([0x74,0x68,0x65,0x6e])](_0x299e1c=>{_0x299e1c!=_0x46a931([0x56,0x61,0x6c,0x69,0x64])&&_0x4b637f(_0x299e1c);},_0xe9c2a4);}):_0x1e1f1c||_0x32a788||_0x46a931([0x56,0x61,0x6c,0x69,0x64]);}}function _0x424fef(_0x169847,_0x329aee){return new window[(_0x46a931([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e3d0e=>{if(_0x3c7e08())return _0x1e3d0e(_0x46a931([0x56,0x61,0x6c,0x69,0x64]));_0x4dcc73(),_0x318eea[_0x46a931([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x46a931([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x39d9a6=!0x1;const _0xaf9aa9=_0x1b7072();function _0x31dc92(_0x3ea20c){return!!_0x3ea20c&&(typeof _0x3ea20c===_0x46a931([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3ea20c===_0x46a931([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3ea20c[_0x46a931([0x74,0x68,0x65,0x6e])]===_0x46a931([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3ea20c[_0x46a931([0x63,0x61,0x74,0x63,0x68])]===_0x46a931([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1a3905(_0x8eb8d3){_0x1d9f5d(_0x8eb8d3)[_0x46a931([0x74,0x68,0x65,0x6e])](_0x188ea2=>{if(!_0x188ea2||_0x188ea2[_0x46a931([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x46a931([0x6f,0x6b]))return _0x46a931([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x315483(_0x3396b6(_0xaf9aa9+_0x329aee))!=_0x188ea2[_0x46a931([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x46a931([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x46a931([0x56,0x61,0x6c,0x69,0x64]);})[_0x46a931([0x74,0x68,0x65,0x6e])](_0x31813c=>(_0x2d7b91(),_0x31813c),()=>{const _0x56fc79=_0xafdb83();return null==_0x56fc79?(_0x2d7b91(),_0x46a931([0x56,0x61,0x6c,0x69,0x64])):_0x46a931(_0x714355-_0x56fc79>(0x7753083a^_0x56a1b1)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x46a931([0x74,0x68,0x65,0x6e])](_0x1e3d0e)[_0x46a931([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1e3d0e(_0x46a931([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x9a552c=0x536962ba^_0x56a1b1;function _0x2d7b91(){const _0x2c724c=_0x46a931([0x6c,0x6c,0x63,0x74,0x2d])+_0x315483(_0x3396b6(_0x169847)),_0x4d03be=_0x121350(_0x315483(window[_0x46a931([0x4d,0x61,0x74,0x68])][_0x46a931([0x63,0x65,0x69,0x6c])](_0x714355/_0x9a552c)));window[_0x46a931([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x46a931([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c724c,_0x4d03be);}function _0xafdb83(){const _0xfe29=_0x46a931([0x6c,0x6c,0x63,0x74,0x2d])+_0x315483(_0x3396b6(_0x169847)),_0x268c5c=window[_0x46a931([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x46a931([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xfe29);return _0x268c5c?window[_0x46a931([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x121350(_0x268c5c),0x10)*_0x9a552c:null;}function _0x1d9f5d(_0x317321){return new window[(_0x46a931([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xfdff0,_0x317695)=>{_0x317321[_0x46a931([0x74,0x68,0x65,0x6e])](_0xfdff0,_0x317695),window[_0x46a931([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x317695,0x535e58fa^_0x56a1b1);});}}_0x318eea[_0x46a931([0x6f,0x6e])](_0x46a931([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x49f73d,_0x35683c)=>{if(_0x35683c[0x0]!=_0x169847)return _0x1e3d0e(_0x46a931([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x35683c[0x1]={..._0x35683c[0x1],[_0x46a931([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xaf9aa9};},{[_0x46a931([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x46a931([0x68,0x69,0x67,0x68])}),_0x318eea[_0x46a931([0x6f,0x6e])](_0x46a931([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1866ee=>{_0x31dc92(_0x1866ee[_0x46a931([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x39d9a6=!0x0,_0x1a3905(_0x1866ee[_0x46a931([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x46a931([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x46a931([0x6c,0x6f,0x77])}),_0x2b6037[_0x46a931([0x74,0x68,0x65,0x6e])](()=>{_0x39d9a6||_0x1e3d0e(_0x46a931([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3c7e08(){return _0x318eea[_0x46a931([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x46a931([0x76,0x69,0x65,0x77])][_0x46a931([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x46a931([0x61,0x75,0x74,0x6f]);}function _0x4dcc73(){_0x318eea[_0x46a931([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x46a931([0x76,0x69,0x65,0x77])][_0x46a931([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x46a931([0x61,0x75,0x74,0x6f]);}}function _0x11c381(_0x2bafff){const _0x4ea52a=[new window[(_0x46a931([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ccbcb=>setTimeout(_0x2ccbcb,0x5356b2f6^_0x56a1b1)),_0x2b6037[_0x46a931([0x74,0x68,0x65,0x6e])](()=>new window[(_0x46a931([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40d78e=>{let _0x3fd669=0x0;_0x318eea[_0x46a931([0x6d,0x6f,0x64,0x65,0x6c])][_0x46a931([0x6f,0x6e])](_0x46a931([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x461a28,_0x5b7bc8)=>{_0x5b7bc8[0x0][_0x46a931([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3fd669++,_0x3fd669==(0x535f89d2^_0x56a1b1)&&(_0x40d78e(),_0x461a28[_0x46a931([0x6f,0x66,0x66])]());});}))];return window[_0x46a931([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x46a931([0x72,0x61,0x63,0x65])](_0x4ea52a)[_0x46a931([0x74,0x68,0x65,0x6e])](()=>_0x2bafff);}async function _0x455cdd(){await _0x2b6037,_0x318eea[_0x46a931([0x6d,0x6f,0x64,0x65,0x6c])][_0x46a931([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1263a7,_0x318eea[_0x46a931([0x6d,0x6f,0x64,0x65,0x6c])][_0x46a931([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1263a7,_0x318eea[_0x46a931([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x46a931([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4c6493(_0x1c08cc){const _0xabf5db=_0x4e1ebe();_0x318eea[_0xabf5db]=_0x46a931([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1c08cc,_0x1c08cc!=_0x46a931([0x56,0x61,0x6c,0x69,0x64])&&_0x455cdd();}function _0x4e1ebe(){const _0x103f1c=window[_0x46a931([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x46a931([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x46a931([0x6e,0x6f,0x77])]())[_0x46a931([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x46a931([0x2e]),'');let _0x4a6a62=_0x46a931([0x68]);for(let _0x26eaf2=0x0;_0x26eaf2<_0x103f1c[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x26eaf2+=0x2){let _0x47de22=window[_0x46a931([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x103f1c[_0x46a931([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x26eaf2,_0x26eaf2+0x2));_0x47de22>=_0x44dbbd[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x47de22-=_0x44dbbd[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4a6a62+=_0x44dbbd[_0x47de22];}return _0x4a6a62;}function _0x1abfd3(){const _0x504ed3=_0x48f07c[_0x46a931([0x73,0x70,0x6c,0x69,0x74])](_0x46a931([0x2e]));if(0x3!=_0x504ed3[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x223859(_0x504ed3[0x1]);function _0x223859(_0x1fcd6f){const _0x2c4df0=_0x2da138(_0x1fcd6f);return _0x2c4df0&&_0x123902()?_0x2c4df0:null;function _0x123902(){const _0x33cca2=_0x2c4df0[_0x46a931([0x6a,0x74,0x69])],_0x1b9b5a=window[_0x46a931([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x33cca2[_0x46a931([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x33cca2[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4e1a1e={..._0x2c4df0,[_0x46a931([0x6a,0x74,0x69])]:_0x33cca2[_0x46a931([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x33cca2[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4e1a1e[_0x46a931([0x76,0x63])],_0x3396b6(_0x4e1a1e)==_0x1b9b5a;}}}async function _0xc21085(){let _0x388f78=!0x0;try{const _0x57a746=_0x48f07c[_0x46a931([0x73,0x70,0x6c,0x69,0x74])](_0x46a931([0x2e])),[_0x137d73,_0x3a3da1,_0xebfe31]=_0x57a746;return _0x1a4282(_0x137d73),await _0xba0b86(_0x137d73,_0x3a3da1,_0xebfe31),_0x388f78;}catch{return!0x1;}function _0x1a4282(_0x442862){const _0x169b2f=_0x2da138(_0x442862);_0x169b2f&&_0x169b2f[_0x46a931([0x61,0x6c,0x67])]==_0x46a931([0x45,0x53,0x32,0x35,0x36])||(_0x388f78=!0x1);}async function _0xba0b86(_0x3cffb3,_0x2ff7e1,_0x34d0af){const _0xcf9d33=window[_0x46a931([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x46a931([0x66,0x72,0x6f,0x6d])](_0x3969f2(_0x34d0af),_0xde4408=>_0xde4408[_0x46a931([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5c7121=new window[(_0x46a931([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x46a931([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3cffb3+_0x46a931([0x2e])+_0x2ff7e1),_0x3bfbd1=window[_0x46a931([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x46a931([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3bfbd1)return;const _0x5a999f=await _0x3bfbd1[_0x46a931([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x46a931([0x6a,0x77,0x6b]),_0x3e39e5,{[_0x46a931([0x6e,0x61,0x6d,0x65])]:_0x46a931([0x45,0x43,0x44,0x53,0x41]),[_0x46a931([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x46a931([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x46a931([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3bfbd1[_0x46a931([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x46a931([0x6e,0x61,0x6d,0x65])]:_0x46a931([0x45,0x43,0x44,0x53,0x41]),[_0x46a931([0x68,0x61,0x73,0x68])]:{[_0x46a931([0x6e,0x61,0x6d,0x65])]:_0x46a931([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5a999f,_0xcf9d33,_0x5c7121)||(_0x388f78=!0x1);}}function _0x2da138(_0x125424){return _0x125424[_0x46a931([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x46a931([0x65,0x79]))?JSON[_0x46a931([0x70,0x61,0x72,0x73,0x65])](_0x3969f2(_0x125424)):null;}function _0x3969f2(_0x4bfb55){return window[_0x46a931([0x61,0x74,0x6f,0x62])](_0x4bfb55[_0x46a931([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x46a931([0x2b]))[_0x46a931([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x46a931([0x2f])));}function _0x3396b6(_0x4d10a0){let _0x15e355=0x1505;function _0x2d726f(_0x421765){for(let _0x3f6195=0x0;_0x3f6195<_0x421765[_0x46a931([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3f6195++){const _0x5db60a=_0x421765[_0x46a931([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3f6195);_0x15e355=(_0x15e355<<0x5)+_0x15e355+_0x5db60a,_0x15e355&=_0x15e355;}}function _0x10bab7(_0x346434){Array[_0x46a931([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x346434)?_0x346434[_0x46a931([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x10bab7):_0x346434&&typeof _0x346434==_0x46a931([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x46a931([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x346434)[_0x46a931([0x73,0x6f,0x72,0x74])]()[_0x46a931([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x485362,_0x474047])=>{_0x2d726f(_0x485362),_0x10bab7(_0x474047);}):_0x2d726f(window[_0x46a931([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x346434));}return _0x10bab7(_0x4d10a0),_0x15e355>>>0x0;}function _0x315483(_0x3063a7){return _0x3063a7[_0x46a931([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x46a931([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x46a931([0x30]));}function _0x121350(_0x4d3efd){return _0x4d3efd[_0x46a931([0x73,0x70,0x6c,0x69,0x74])]('')[_0x46a931([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x46a931([0x6a,0x6f,0x69,0x6e])]('');}function _0x1263a7(){}function _0x46a931(_0x2ab40a){const _0x57f8c8=_0x54ab;return _0x2ab40a[_0x57f8c8(0x1d7)](_0x293f7a=>String[_0x57f8c8(0x1be)](_0x293f7a))[_0x57f8c8(0x1ee)]('');}_0x4c6493(await _0x3bcb2f());}(this);}[_0xc14627(0x1d0)](){const _0x3769a1=_0xc14627,_0x17ad96=this[_0x3769a1(0x1c3)][_0x3769a1(0x20e)][_0x3769a1(0x1d9)];_0x17ad96[_0x3769a1(0x1ce)](_0x3769a1(0x1fe))&&_0x17ad96[_0x3769a1(0x202)](_0x3769a1(0x1fe),{'allowAttributes':[_0x3769a1(0x1e6)]}),_0x17ad96[_0x3769a1(0x1ce)](_0x3769a1(0x1d5))&&_0x17ad96[_0x3769a1(0x202)](_0x3769a1(0x1d5),{'allowAttributes':[_0x3769a1(0x1e6)]});}[_0xc14627(0x1cf)](){const _0x38418c=_0xc14627,_0x41f4b2=this[_0x38418c(0x1c3)];_0x41f4b2[_0x38418c(0x1e0)][_0x38418c(0x1f9)](_0x38418c(0x1bd))[_0x38418c(0x1df)]({'model':_0x38418c(0x1e6),'view':_0x38418c(0x1c4)}),_0x41f4b2[_0x38418c(0x1e0)][_0x38418c(0x1f9)](_0x38418c(0x209))[_0x38418c(0x1cd)]({'model':{'key':_0x38418c(0x1e6),'value':_0x5bdba4=>_0x5bdba4[_0x38418c(0x1dd)](_0x38418c(0x1c4))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x41d26b=_0x41f4b2[_0x38418c(0x1c5)][_0x38418c(0x1ec)](_0x38418c(0x1ff));_0x41d26b&&this[_0x38418c(0x205)](_0x41d26b,_0x38418c(0x1e8),(_0x40c8f6,[_0xd96bb1,_0x148513])=>{const _0x945ef1=_0x38418c;_0xd96bb1[_0x945ef1(0x1c0)](_0x945ef1(0x1e6),_0x148513);});}[_0xc14627(0x1ef)](){const _0x4e9aa1=_0xc14627,_0x1eae51=this[_0x4e9aa1(0x1c3)][_0x4e9aa1(0x20b)][_0x4e9aa1(0x1ec)](_0x4e9aa1(0x1c8))||{},_0x1dc389=this[_0x4e9aa1(0x1c3)][_0x4e9aa1(0x20b)][_0x4e9aa1(0x1ec)](_0x4e9aa1(0x1d8))||'';this[_0x4e9aa1(0x1f2)]=_0x19f09a(_0x26496c[_0x4e9aa1(0x206)],_0x4e9aa1(0x1f0),{..._0x1eae51,'pubkey':_0x1dc389,'ctx-name':_0x4e9aa1(0x204)+this[_0x4e9aa1(0x1d2)],'sourceList':'','imgOnly':_0x4e9aa1(0x1bc),'removeCopyright':_0x4e9aa1(0x1bc),'localeName':this[_0x4e9aa1(0x1c3)][_0x4e9aa1(0x1d4)][_0x4e9aa1(0x1e2)],'externalSourcesEmbedCss':_0x4e9aa1(0x1fd)}),this[_0x4e9aa1(0x1f2)][_0x4e9aa1(0x1f4)]=_0x392203=>{const _0xa988ca=_0x4e9aa1;if(_0xa988ca(0x20d)==_0x392203)return _0xa988ca(0x1e5);},_0x26496c[_0x4e9aa1(0x206)][_0x4e9aa1(0x1f5)][_0x4e9aa1(0x207)](this[_0x4e9aa1(0x1f2)]);}[_0xc14627(0x20c)](){const _0x345fc1=_0xc14627;this[_0x345fc1(0x208)]=_0x19f09a(_0x26496c[_0x345fc1(0x206)],_0x345fc1(0x1ea),{'ctx-name':_0x345fc1(0x204)+this[_0x345fc1(0x1d2)]}),_0x26496c[_0x345fc1(0x206)][_0x345fc1(0x1f5)][_0x345fc1(0x207)](this[_0x345fc1(0x208)]);}[_0xc14627(0x1c2)](){const _0x412e0f=_0xc14627,_0xd28bbe=this[_0x412e0f(0x1c3)][_0x412e0f(0x1c5)][_0x412e0f(0x1ec)](_0x412e0f(0x1cb));_0xd28bbe&&this[_0x412e0f(0x205)](_0xd28bbe,_0x412e0f(0x1e4),()=>{const _0x4005d8=_0x412e0f,_0x56bde8=this[_0x4005d8(0x1c3)][_0x4005d8(0x20e)][_0x4005d8(0x206)][_0x4005d8(0x1de)][_0x4005d8(0x1fb)]();_0x56bde8&&_0x56bde8[_0x4005d8(0x1dd)](_0x4005d8(0x1e6))&&this[_0x4005d8(0x1c3)][_0x4005d8(0x1e1)][_0x4005d8(0x1e3)][_0x4005d8(0x20a)](_0x4005d8(0x1fa),()=>{const _0x1e411c=_0x4005d8;_0xa1f7a(this[_0x1e411c(0x1c3)],_0x56bde8);});});const _0x2438e0=this[_0x412e0f(0x1c3)][_0x412e0f(0x1c5)][_0x412e0f(0x1ec)](_0x412e0f(0x1d3));_0x2438e0&&this[_0x412e0f(0x205)](_0x2438e0,_0x412e0f(0x1e4),()=>{const _0x219ac2=_0x412e0f,_0x3269f9=this[_0x219ac2(0x1c3)][_0x219ac2(0x20e)][_0x219ac2(0x206)][_0x219ac2(0x1de)][_0x219ac2(0x1fb)]();_0x3269f9&&_0x3269f9[_0x219ac2(0x1dd)](_0x219ac2(0x1e6))&&this[_0x219ac2(0x1c3)][_0x219ac2(0x1e1)][_0x219ac2(0x1e3)][_0x219ac2(0x20a)](_0x219ac2(0x1fa),()=>{const _0x2c2375=_0x219ac2;_0xa1f7a(this[_0x2c2375(0x1c3)],_0x3269f9);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x1926d9,ObservableMixin as _0x581978}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x9f1512}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x115756}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x183ae8}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x2234eb}from'../../utils/uploadutils.js';import{getImageUrls as _0x308a6a,getImageDimension as _0x67e557}from'../../utils/editingutils.js';import{isAncestor as _0x2d6df3}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x581978(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3d24b6,_0x4063e2,_0x26e629){super(),this['_editor']=_0x3d24b6,this['_dialog']=_0x4063e2,this['_imageElement']=_0x26e629,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 _0x92e876=this['_imageElement'],_0x1a2d30=_0x92e876['getAttribute']('uploadcareImageId'),_0x2aa084=_0x92e876['getAttribute']('src');if(_0x1a2d30)await this['_loadImageInfo'](_0x1a2d30,_0x2aa084);else{if(this['_imageCache']['has'](_0x2aa084)){const _0x349bdf=this['_imageCache']['get'](_0x2aa084);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x349bdf['url'],this['imageDimension']=_0x349bdf['dimension'],this['imageId']=_0x349bdf['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x382833}=this['_editor'],t=_0x382833['t'],_0x2e8aa8=new _0x183ae8(_0x382833,this['imageStatus'],this['_attributes']);_0x2e8aa8['bind']('status')['to'](this,'imageStatus'),_0x2e8aa8['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2e8aa8['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2e8aa8['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2e8aa8,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x115756,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2e8aa8,'position':_0x9f1512['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2e8aa8['focus']();},'onHide':()=>{_0x2e8aa8['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x32d1de=>!_0x2d6df3(_0x32d1de,_0x2e8aa8['element'])}});}['_loadImageInfo'](_0x5cdf83,_0x26a9b8){return _0x2234eb['getInfo'](_0x5cdf83,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x237aa5=>{const {width:_0x4e2a8f,height:_0x2c2fea}=_0x237aa5['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x26a9b8,this['imageDimension']={'width':_0x4e2a8f,'height':_0x2c2fea},this['imageId']=_0x5cdf83;})['catch'](_0x3873fe=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3873fe['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x148e7c,_0x50dc05){return this['_getImageAsFile'](_0x148e7c)['then'](_0x164a37=>_0x2234eb['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':_0x50dc05['signal'],'file':_0x164a37,'onProgress':_0x39a5c6=>{_0x39a5c6&&_0x39a5c6['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x39a5c6['value']));}}))['then'](_0x256be7=>{const {width:_0x3a7c75,height:_0x2cd582}=_0x256be7['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x256be7['cdnUrl'],this['imageDimension']={'width':_0x3a7c75,'height':_0x2cd582},this['imageId']=_0x256be7['uuid'],this['imageUploadProgress']=null;const _0x518b97=_0x148e7c['getAttribute']('src');this['_imageCache']['set'](_0x518b97,{'id':_0x256be7['uuid'],'url':_0x256be7['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x145d99=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x145d99['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5e04ca,_0x321e19){_0x5e04ca['on']('apply',(_0x4ece9c,_0x51c9bc)=>{this['_replaceImage'](_0x321e19,_0x51c9bc['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5e04ca['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5e04ca['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x506a9e,_0x4e6b65,_0x21db5e){const _0x167285=this['_editor'],{width:_0x2d0e78,height:_0x4a230b}=_0x67e557(_0x4e6b65,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x171362,imageSources:_0x387528}=_0x308a6a(_0x4e6b65,_0x2d0e78);_0x167285['model']['change'](_0x440d35=>{if('$graveyard'===_0x506a9e['root']['rootName']){_0x167285['execute']('insertImage',{'imageType':_0x506a9e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x506a9e['getAttributes']()),'uploadcareImageId':_0x21db5e,'src':_0x171362,'sources':_0x387528,'width':_0x2d0e78,'height':_0x4a230b}});const _0x2964d4=_0x506a9e['getChildren']();_0x506a9e=_0x167285['model']['document']['selection']['getSelectedElement']();for(const _0x7bfe2b of _0x2964d4)_0x440d35['append'](_0x440d35['cloneElement'](_0x7bfe2b),_0x506a9e);}else _0x440d35['setSelection'](_0x506a9e,'on'),_0x167285['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x506a9e['getAttributes']()),'uploadcareImageId':_0x21db5e,'src':_0x171362,'sources':_0x387528,'width':_0x2d0e78,'height':_0x4a230b},_0x506a9e);_0x440d35['setSelection'](_0x506a9e,'on');});}async['_getImageAsFile'](_0x332512){const _0x21bd60=_0x1926d9['window'],_0x282bcf=_0x1926d9['document']['location']['href'],_0xc7acfa=new _0x21bd60['URL'](_0x332512['getAttribute']('src'),_0x282bcf);if('data:'===_0xc7acfa['protocol']){const _0x23482d=_0xc7acfa['href']['split'](','),_0x36dfb7=_0x23482d[0x0]['match'](/:(.*?);/)[0x1],_0x27a56b=_0x36dfb7['split']('/')[0x1],_0x27f536=_0x21bd60['atob'](_0x23482d[_0x23482d['length']-0x1]);let _0x41c589=_0x27f536['length'];const _0x2a1cb3=new _0x21bd60['Uint8Array'](_0x41c589);for(;_0x41c589--;)_0x2a1cb3[_0x41c589]=_0x27f536['charCodeAt'](_0x41c589);return new _0x21bd60['File']([_0x2a1cb3],'image.'+_0x27a56b,{'type':_0x36dfb7});}const _0x182314=_0xc7acfa['href']['split']('/'),_0x101440=_0x182314[_0x182314['length']-0x1],_0x4dea6f=_0x101440['split']('.')[0x1];return _0x21bd60['fetch'](_0xc7acfa['href'])['then'](_0xb9f76d=>_0xb9f76d['clone']()['blob']())['then'](_0x4e5d44=>new _0x21bd60['File']([_0x4e5d44],_0x101440,{'type':'image/'+_0x4dea6f}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x1711(){const _0x4ca18f=['4986505gZoZut','3282RFVSKv','set','443988dHSngJ','imageSrc','uc-light','uc-cloud-image-editor','5003200nlKQJD','ck-uploadcare-theme','6300324HzTjNJ','bindTemplate','2114754jHafvG','image-edit','setTemplate','14ubzGtJ','285343fKLhtO','309zBiKhQ'];_0x1711=function(){return _0x4ca18f;};return _0x1711();}function _0x53e2(_0x2ae990,_0x14175f){const _0x1711f0=_0x1711();return _0x53e2=function(_0x53e28c,_0x43a4de){_0x53e28c=_0x53e28c-0x17b;let _0x2d5221=_0x1711f0[_0x53e28c];return _0x2d5221;},_0x53e2(_0x2ae990,_0x14175f);}(function(_0x4bf889,_0x33ea2b){const _0x1cb4df=_0x53e2,_0x5987fb=_0x4bf889();while(!![]){try{const _0x594181=parseInt(_0x1cb4df(0x17e))/0x1+parseInt(_0x1cb4df(0x181))/0x2*(-parseInt(_0x1cb4df(0x17f))/0x3)+-parseInt(_0x1cb4df(0x189))/0x4+parseInt(_0x1cb4df(0x180))/0x5+-parseInt(_0x1cb4df(0x18b))/0x6*(-parseInt(_0x1cb4df(0x17d))/0x7)+parseInt(_0x1cb4df(0x187))/0x8+-parseInt(_0x1cb4df(0x183))/0x9;if(_0x594181===_0x33ea2b)break;else _0x5987fb['push'](_0x5987fb['shift']());}catch(_0x42e20a){_0x5987fb['push'](_0x5987fb['shift']());}}}(_0x1711,0xc8146));import{View as _0x33ab1c}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x33ab1c{constructor(_0x2fba27,_0x11f6de){const _0x82ca6c=_0x53e2;super(_0x2fba27);const _0x5e2f45=this[_0x82ca6c(0x18a)];this[_0x82ca6c(0x182)](_0x82ca6c(0x184),''),this[_0x82ca6c(0x17c)]({'tag':_0x82ca6c(0x186),'attributes':{..._0x11f6de,'class':[_0x82ca6c(0x185),_0x82ca6c(0x188)],'ctx-name':_0x82ca6c(0x17b),'cdn-url':_0x5e2f45['to'](_0x82ca6c(0x184))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x479808}from'ckeditor5/src/icons.js';import{ButtonView as _0xcfb4b3,IconView as _0x21a8dd,View as _0x1b904c}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x1b904c{constructor(_0x3a4c53){super(_0x3a4c53);const t=_0x3a4c53['t'];this['set']('errorType',null);const _0x2996e8=new _0xcfb4b3(_0x3a4c53);_0x2996e8['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2996e8['withText']=!0x0,_0x2996e8['class']='ck-button-action',_0x2996e8['on']('execute',()=>{this['fire']('retry');}),_0x2996e8['bind']('isVisible')['to'](this,'errorType',_0x532f3e=>'NotFound'!==_0x532f3e);const _0x221d34=new _0x21a8dd();_0x221d34['content']=_0x479808,_0x221d34['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x15dbf3=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':[_0x221d34,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x15dbf3['to']('errorType',_0x2e8cfa=>t('NotFound'!==_0x2e8cfa?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2996e8]},{'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'}]}]}]});}}
|