@ckeditor/ckeditor5-uploadcare 46.0.1-alpha.3 → 46.0.1-alpha.4
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 _0xf6fbe1,Command as _0x7ffec3}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x201032,IconGooglePhotos as _0x5d013a,IconGoogleDrive as _0x42c81d,IconFacebook as _0x46bda6,IconDropbox as _0x5d1059,IconUploadcareLink as _0x45f1b8,IconUploadcareImageUpload as _0x48a625,IconError as _0x227ea7,IconUploadcareImageEdit as _0x52ad18}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x19c8b2,MenuBarMenuListItemButtonView as _0x5b7ad4,View as _0x41df65,FocusCycler as _0x3ec888,Dialog as _0x4d119e,DialogViewPosition as _0x1681aa,SpinnerView as _0xd3f9c8,IconView as _0x238f30,Notification as _0x551a71}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x30d413,DomEmitterMixin as _0x45af71,global as _0x185c34,getAncestors as _0x4e988d,ObservableMixin as _0x153c81,uid as _0x5dd4e2,createElement as _0x119a96}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x23b034}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x1db9f8,info as _0x4691eb}from'@uploadcare/upload-client';import*as _0x48c0cb from'@uploadcare/file-uploader';var i=function(_0xc1dbb9){return _0xc1dbb9['Local']='local',_0xc1dbb9['URL']='url',_0xc1dbb9['Dropbox']='dropbox',_0xc1dbb9['GDrive']='gdrive',_0xc1dbb9['Facebook']='facebook',_0xc1dbb9['GPhotos']='gphotos',_0xc1dbb9['OneDrive']='onedrive',_0xc1dbb9;}({});function _(_0x573494,_0x5caa15,_0x15a44f){const t=_0x573494['t'],_0x4d84eb=_0x573494['t'];switch(_0x5caa15){case i['Local']:return{'text':_0x4d84eb('Insert'===_0x15a44f?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4d84eb('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x15a44f?_0x4d84eb('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4d84eb('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x15a44f?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x15a44f?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x15a44f?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x15a44f?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x15a44f?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x5caa15;}}class e extends _0xf6fbe1{['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 _0x2c9706=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2bab23;for(const _0x578078 in _0x2c9706){const _0x15d3df=_0x578078,_0x4ae007=_0x2c9706[_0x15d3df];if('uploadcareLicenseKeyValid'==_0x4ae007||'uploadcareLicenseKeyInvalid'==_0x4ae007||'uploadcareLicenseKeyExpired'==_0x4ae007||'uploadcareLicenseKeyDomainLimit'==_0x4ae007||'uploadcareLicenseKeyNotAllowed'==_0x4ae007||'uploadcareLicenseKeyEvaluationLimit'==_0x4ae007||'uploadcareLicenseKeyTrialLimit'==_0x4ae007||'uploadcareLicenseKeyUsageLimit'==_0x4ae007){delete _0x2c9706[_0x15d3df],_0x2bab23=_0x4ae007,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x2bab23&&_0x2c9706['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x2bab23&&_0x2c9706['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x2bab23&&_0x2c9706['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x2bab23&&_0x2c9706['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x2bab23&&_0x2c9706['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x2bab23&&_0x2c9706['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x2bab23&&_0x2c9706['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2464b4}=this,_0xd4557=_0x2464b4['commands']['get']('uploadcare');if(!_0xd4557)return;const _0x385dcf=this['_normalizeConfigSourceList'](_0x2464b4['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x505a38,_0x56046f)=>{const _0x541ae5=this['_getIntegrationKey'](_0x56046f['type']);return _0x505a38[_0x541ae5]||(_0x505a38[_0x541ae5]=[]),_0x505a38[_0x541ae5]['push'](_0x56046f),_0x505a38;},{});_0x2464b4['plugins']['has']('ImageInsertUI')&&_0x2464b4['commands']['get']('uploadcare')&&Object['entries'](_0x385dcf)['forEach'](([_0x3a66ba,_0x16d245])=>{_0x2464b4['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3a66ba,'observable':()=>_0xd4557,'buttonViewCreator':()=>this['_createToolbarButton'](_0x16d245),'formViewCreator':()=>this['_createDropdownButtons'](_0x16d245),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x16d245),'override':'assetManager'!==_0x3a66ba});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0xe66f24){const {locale:_0x39a9cf}=this['editor'];return _0xe66f24['map'](_0x2f71a9=>{const _0x54e4a2=_(_0x39a9cf,_0x2f71a9,'Insert');switch(_0x2f71a9){case i['Local']:return{'icon':_0x48a625,'type':i['Local'],..._0x54e4a2};case i['URL']:return{'icon':_0x45f1b8,'type':i['URL'],..._0x54e4a2};case i['Dropbox']:return{'icon':_0x5d1059,'type':i['Dropbox'],..._0x54e4a2};case i['Facebook']:return{'icon':_0x46bda6,'type':i['Facebook'],..._0x54e4a2};case i['GDrive']:return{'icon':_0x42c81d,'type':i['GDrive'],..._0x54e4a2};case i['GPhotos']:return{'icon':_0x5d013a,'type':i['GPhotos'],..._0x54e4a2};case i['OneDrive']:return{'icon':_0x201032,'type':i['OneDrive'],..._0x54e4a2};}});}['_getIntegrationKey'](_0x3fc48a){switch(_0x3fc48a){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3ac569,_0x125df0){const _0x9b76e9=this['editor'],_0x180264=new _0x3ac569(_0x9b76e9['locale']),_0x4517ae=_0x9b76e9['commands']['get']('uploadcare');return _0x180264['bind']('isEnabled')['to'](_0x4517ae),_0x180264['on']('execute',()=>{_0x4517ae['execute'](_0x125df0);}),_0x180264;}['_createToolbarButton'](_0x285ffe){const {locale:_0x542f79}=this['editor'],_0x4d8745=this['editor']['plugins']['get']('ImageInsertUI'),_0x5e9fef=_0x285ffe[0x0],_0x2b92e8=this['_createButton'](_0x19c8b2,_0x5e9fef['type']);return _0x2b92e8['icon']=_0x5e9fef['icon'],_0x2b92e8['bind']('label')['to'](_0x4d8745,'isImageSelected',_0x1175a5=>_(_0x542f79,_0x5e9fef['type'],_0x1175a5?'Replace':'Insert')['text']),_0x2b92e8['tooltip']=!0x0,_0x2b92e8;}['_createDropdownButtons'](_0x430e7b){const {locale:_0x5ef681}=this['editor'],_0x262865=this['editor']['plugins']['get']('ImageInsertUI');return _0x430e7b['map'](_0x4aba64=>{const _0x23863=this['_createButton'](_0x19c8b2,_0x4aba64['type']);return _0x23863['withText']=!0x0,_0x23863['icon']=_0x4aba64['icon'],_0x23863['bind']('label')['to'](_0x262865,'isImageSelected',_0x20b1b2=>_(_0x5ef681,_0x4aba64['type'],_0x20b1b2?'Replace':'Insert')['text']),_0x23863;});}['_createMenuBarButtons'](_0x41136f){return _0x41136f['map'](_0x1b7031=>{const _0x1c762b=this['_createButton'](_0x5b7ad4,_0x1b7031['type']);return _0x1c762b['icon']=_0x1b7031['icon'],_0x1c762b['label']=_0x1b7031['shortText'],_0x1c762b;});}}class F extends _0x41df65{['focusTracker'];['focusCycler'];constructor(_0x4bda02){super(_0x4bda02),this['focusTracker']=new _0x30d413(),this['focusCycler']=new _0x3ec888({'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(_0x571e38,_0x3eee68){super(_0x571e38),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-'+_0x3eee68}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x4cb456,_0x46df60){const _0x982f8a=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0xc352c1=>_0xc352c1<=_0x46df60)['map'](_0x58d551=>_0x4cb456['replace'](/\/$/,'')+'/-/resize/'+_0x58d551+'x/\x20'+_0x58d551+'w');return{'imageFallbackUrl':_0x4cb456,'imageSources':[{'srcset':_0x982f8a['join'](',\x20'),'sizes':'(max-width:\x20'+_0x46df60+'px)\x20100vw,\x20'+_0x46df60+'px','type':'image/webp'}]};}function C(_0x298697,_0x5b71c1,_0x44b0e3){const _0x513812=_0x298697['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x513812?parseInt(_0x513812[0x1],0xa):_0x5b71c1,'height':_0x513812?parseInt(_0x513812[0x2],0xa):_0x44b0e3};}function p(_0x62688a,_0x3db338){const _0x2c5288=new(_0x45af71())(),_0x24760c=_0x62688a['plugins']['get']('ImageUtils'),_0x2cfe1b=_0x62688a['editing']['mapper']['toViewElement'](_0x3db338),_0x2832a2=_0x24760c['findViewImgElement'](_0x2cfe1b),_0x380283=_0x62688a['editing']['view']['domConverter']['viewToDom'](_0x2832a2),_0x52aba5=_0x3db338['getAttribute']('width'),_0x43b9c1=_0x3db338['getAttribute']('height'),_0x59cd2d='image-processing';_0x62688a['editing']['view']['change'](_0x149b2e=>{_0x149b2e['addClass'](_0x59cd2d,_0x2cfe1b),_0x149b2e['setStyle']('aspect-ratio',_0x52aba5+'/'+_0x43b9c1,_0x2832a2);}),_0x2c5288['listenTo'](_0x380283,'load',()=>{_0x2c5288['stopListening'](_0x380283,'load'),_0x62688a['editing']['view']['change'](_0x18da7d=>{_0x18da7d['removeClass'](_0x59cd2d,_0x2cfe1b),_0x18da7d['removeStyle']('aspect-ratio',_0x2832a2);});});}function G(_0x139f9f){if(Array['isArray'](_0x139f9f)){const _0x23636e=_0x139f9f['map'](G);return _0xa0b328=>_0x23636e['some'](_0x5713ac=>_0x5713ac(_0xa0b328));}if('origin'==_0x139f9f){const _0x1eea28=_0x185c34['window']['location']['origin'];return _0x35286c=>new URL(_0x35286c,_0x185c34['document']['baseURI'])['origin']==_0x1eea28;}return'function'==typeof _0x139f9f?_0x139f9f:_0x139f9f instanceof RegExp?_0x36ec83=>!(!_0x36ec83['match'](_0x139f9f)&&!_0x36ec83['replace'](/^https?:\/\//,'')['match'](_0x139f9f)):()=>!0x1;}function S(_0x807202,_0x5e5662){return _0x4e988d(_0x807202['target'])['includes'](_0x5e5662);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x153c81(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0xd47f62,_0x56355f,_0x1478c7){super(),this['_editor']=_0xd47f62,this['_editing']=_0x56355f,this['_dialog']=_0xd47f62['plugins']['get'](_0x4d119e),this['_api']=_0x56355f['ctxElement']['getAPI'](),this['_type']=_0x1478c7,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:_0xd4eef7,model:_0x1f71ce}=this['_editor'],_0x12e461=_0x1f71ce['document']['selection']['getSelectedElement'](),_0x1183a6=_0x12e461&&(_0x12e461['is']('element','imageBlock')||_0x12e461['is']('element','imageInline'));this['_formView']=new x(_0xd4eef7,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x48a625,'title':_(_0xd4eef7,this['_type'],_0x1183a6?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x1681aa['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x54b75c=>!S(_0x54b75c,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x398ef5}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x5c301b=>{const _0x339e80=_0x398ef5['length'];for(const _0x138800 of _0x398ef5){const _0x4eb2e6=_0x138800===_0x398ef5[_0x339e80-0x1],{cdnUrl:_0xcc88cf,fileInfo:_0x2ad3d2}=_0x138800;if(!_0xcc88cf||!_0x2ad3d2)continue;const {width:_0x2011cc,height:_0x23dd1b}=_0x2ad3d2['imageInfo'],_0x350807=C(_0xcc88cf,_0x2011cc,_0x23dd1b),_0x322d64=k(_0xcc88cf,_0x350807['width']),_0x9ae050={'id':_0x2ad3d2['uuid'],'type':'image','attributes':{'imageDimension':_0x350807,..._0x322d64}};this['_insertAsset'](_0x9ae050,_0x4eb2e6,_0x5c301b);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x28e21f=>{'idle'===_0x28e21f['detail']['status']&&!_0x28e21f['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0xe7aa00,_0x212f47,_0x4a2ea6){const _0x5e219d=this['_editor']['model']['document']['selection'],_0x5990b1=_0x5e219d['getSelectedElement'](),_0x51f7f4=!(!_0x5990b1||!_0x5990b1['is']('element','imageInline'));_0x4a2ea6['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0xe7aa00,_0x51f7f4),_0x212f47||_0x4a2ea6['setSelection'](_0x5e219d['getLastPosition']());}['_insertImage'](_0x41b958,_0x2014ab){const _0x20c3b9=this['_editor'],{imageDimension:_0x39f150,imageFallbackUrl:_0x59c50f,imageSources:_0x10dc40}=_0x41b958['attributes'];_0x20c3b9['execute']('insertImage',{'imageType':_0x2014ab?'imageInline':null,'source':{'uploadcareImageId':_0x41b958['id'],'src':_0x59c50f,'sources':_0x10dc40,..._0x39f150}});}}class w extends _0x7ffec3{['_editing'];['_controller']=null;static get['requires'](){return[_0x4d119e,o];}constructor(_0x51f0a6){super(_0x51f0a6),this['_editing']=_0x51f0a6['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0xeb7af0){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0xeb7af0);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0xec55d3,publicKey:_0x3dccf1,signal:_0x5e7aae,onProgress:_0x486591}){return _0x1db9f8(_0xec55d3,{'publicKey':_0x3dccf1,'store':'auto','signal':_0x5e7aae,'onProgress':_0x486591});}static['getInfo'](_0x3c88a1,_0x392dfe){return _0x4691eb(_0x3c88a1,_0x392dfe);}}class f extends _0xf6fbe1{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x23b034,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x22a10=this['editor'];if(!!!_0x22a10['config']['get']('uploadcare'))return;_0x22a10['plugins']['get'](_0x23b034)['createUploadAdapter']=_0x2dc2ae=>new A(_0x2dc2ae,_0x22a10),_0x22a10['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x3cba2a,{imageElement:_0x2ddeb8,data:_0x277825})=>{_0x22a10['model']['change'](_0xf3160a=>{_0xf3160a['setAttribute']('uploadcareImageId',_0x277825['uploadcareImageId'],_0x2ddeb8);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x435e58,_0x5c50c0){this['loader']=_0x435e58,this['editor']=_0x5c50c0,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x218551=this['editor']['config']['get']('uploadcare.pubkey'),_0x41720e=await this['loader']['file'];return j['upload']({'file':_0x41720e,'publicKey':_0x218551,'signal':this['controller']['signal'],'onProgress':_0x3d195a=>{_0x3d195a&&_0x3d195a['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3d195a['value']);}})['then'](async _0x5aee61=>{const {imageFallbackUrl:_0x40ce47,imageSources:_0x360f89}=k(_0x5aee61['cdnUrl'],_0x5aee61['imageInfo']['width']);return{'uploadcareImageId':_0x5aee61['uuid'],'default':_0x40ce47,'sources':_0x360f89};})['catch'](()=>{const _0x1d3430=t('Cannot\x20upload\x20file:')+('\x20'+_0x41720e['name']+'.');return Promise['reject'](_0x1d3430);});}['abort'](){this['controller']['abort']();}}class o extends _0xf6fbe1{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x4d119e];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x1f5224){super(_0x1f5224),this['ucContextId']=_0x5dd4e2();}['init'](){const _0x108733=this['editor'];_0x108733['commands']['add']('uploadcare',new w(_0x108733));}['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 _0x8471b0=_0x185c34['document']['querySelector']('input[uploadcare-file-input]');_0x8471b0&&_0x8471b0['remove']();}),async function(_0x2fc982){const _0x27f1b5=_0x256fd8([0x72,0x51,0x4d,0x64,0x61,0x78,0x4f,0x77,0x33,0x6e,0x65,0x6a,0x39,0x52,0x63,0x71,0x30,0x57,0x43,0x4e,0x38,0x42,0x7a,0x34,0x70,0x68,0x73,0x79,0x4a,0x5a,0x6d,0x67,0x6f,0x36,0x4b,0x54,0x50,0x55,0x35,0x48,0x66,0x56,0x31,0x58,0x69,0x75,0x4c,0x53,0x6b,0x76,0x41,0x37,0x6c,0x62,0x74,0x32,0x49,0x46,0x47,0x44,0x45,0x59]),_0x43f030=0x3f6883ea,_0xec88a6=0x3f6fecba^_0x43f030,_0x547a01=window[_0x256fd8([0x44,0x61,0x74,0x65])][_0x256fd8([0x6e,0x6f,0x77])](),_0x2f5e54=_0x2fc982[_0x256fd8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x349103=new window[(_0x256fd8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x166d74=>{_0x2f5e54[_0x256fd8([0x6f,0x6e,0x63,0x65])](_0x256fd8([0x72,0x65,0x61,0x64,0x79]),_0x166d74);}),_0x3f0798={[_0x256fd8([0x6b,0x74,0x79])]:_0x256fd8([0x45,0x43]),[_0x256fd8([0x75,0x73,0x65])]:_0x256fd8([0x73,0x69,0x67]),[_0x256fd8([0x63,0x72,0x76])]:_0x256fd8([0x50,0x2d,0x32,0x35,0x36]),[_0x256fd8([0x78])]:_0x256fd8([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]),[_0x256fd8([0x79])]:_0x256fd8([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]),[_0x256fd8([0x61,0x6c,0x67])]:_0x256fd8([0x45,0x53,0x32,0x35,0x36])},_0x92daed=_0x2f5e54[_0x256fd8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x256fd8([0x67,0x65,0x74])](_0x256fd8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x57c9e7(){let _0x58dd2e,_0x435ab6=null,_0x554579=null;try{if(_0x92daed==_0x256fd8([0x47,0x50,0x4c]))return _0x256fd8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x58dd2e=_0x27775d(),!_0x58dd2e)return _0x256fd8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x58dd2e[_0x256fd8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x554579=_0xff86ff(_0x58dd2e[_0x256fd8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x58dd2e[_0x256fd8([0x6a,0x74,0x69])])),await _0x437472()?_0x2d121c()?_0x42cc1b()?_0x256fd8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x152bae()?(_0x58dd2e[_0x256fd8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x256fd8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x435ab6=_0xb99438(_0x256fd8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x58dd2e[_0x256fd8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x256fd8([0x74,0x72,0x69,0x61,0x6c])&&(_0x435ab6=_0xb99438(_0x256fd8([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x21775d()):_0x256fd8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x256fd8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x256fd8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x256fd8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x42cc1b(){const _0x393b32=[_0x256fd8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x256fd8([0x74,0x72,0x69,0x61,0x6c])][_0x256fd8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58dd2e[_0x256fd8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x547a01/0x3e8:0xe10*_0xec88a6;return _0x58dd2e[_0x256fd8([0x65,0x78,0x70])]<_0x393b32;}function _0x2d121c(){const _0x5ee23e=_0x58dd2e[_0x256fd8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5ee23e&&(!!_0x5ee23e[_0x256fd8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x256fd8([0x2a]))||!!_0x5ee23e[_0x256fd8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x256fd8([0x55,0x50,0x4c,0x43])));}function _0x152bae(){const _0x2cae08=_0x58dd2e[_0x256fd8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2cae08||0x0==_0x2cae08[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1f2452}=new URL(window[_0x256fd8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2cae08[_0x256fd8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f2452))return!0x0;const _0x5f4cb6=_0x1f2452[_0x256fd8([0x73,0x70,0x6c,0x69,0x74])](_0x256fd8([0x2e]));return _0x2cae08[_0x256fd8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x28d895=>_0x28d895[_0x256fd8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x256fd8([0x2a])))[_0x256fd8([0x6d,0x61,0x70])](_0x36c376=>_0x36c376[_0x256fd8([0x73,0x70,0x6c,0x69,0x74])](_0x256fd8([0x2e])))[_0x256fd8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5e69cc=>_0x5e69cc[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5f4cb6[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x256fd8([0x6d,0x61,0x70])](_0x20e522=>Array(_0x5f4cb6[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x20e522[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x256fd8([0x66,0x69,0x6c,0x6c])](_0x20e522[0x0]===_0x256fd8([0x2a])?_0x256fd8([0x2a]):'')[_0x256fd8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x20e522))[_0x256fd8([0x73,0x6f,0x6d,0x65])](_0x498aa6=>_0x5f4cb6[_0x256fd8([0x65,0x76,0x65,0x72,0x79])]((_0x186e42,_0x1d0040)=>_0x498aa6[_0x1d0040]===_0x186e42||_0x498aa6[_0x1d0040]===_0x256fd8([0x2a])));}function _0x21775d(){return _0x435ab6&&_0x554579?new window[(_0x256fd8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4d3d4a,_0x310d3e)=>{_0x435ab6[_0x256fd8([0x74,0x68,0x65,0x6e])](_0x4d3d4a,_0x310d3e),_0x554579[_0x256fd8([0x74,0x68,0x65,0x6e])](_0x3be5d2=>{_0x3be5d2!=_0x256fd8([0x56,0x61,0x6c,0x69,0x64])&&_0x4d3d4a(_0x3be5d2);},_0x310d3e);}):_0x435ab6||_0x554579||_0x256fd8([0x56,0x61,0x6c,0x69,0x64]);}}function _0xff86ff(_0x2663b0,_0x35ffa6){return new window[(_0x256fd8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x30f891=>{if(_0x179ee4())return _0x30f891(_0x256fd8([0x56,0x61,0x6c,0x69,0x64]));_0x36bad9(),_0x2f5e54[_0x256fd8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x256fd8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x598f2d=!0x1;const _0x1a93ea=_0x5dd4e2();function _0xd9b871(_0x1272b7){return!!_0x1272b7&&(typeof _0x1272b7===_0x256fd8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1272b7===_0x256fd8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1272b7[_0x256fd8([0x74,0x68,0x65,0x6e])]===_0x256fd8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1272b7[_0x256fd8([0x63,0x61,0x74,0x63,0x68])]===_0x256fd8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x6b925c(_0x5f4af3){_0x5df434(_0x5f4af3)[_0x256fd8([0x74,0x68,0x65,0x6e])](_0x1dd90d=>{if(!_0x1dd90d||_0x1dd90d[_0x256fd8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x256fd8([0x6f,0x6b]))return _0x256fd8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5a65eb(_0x2cb908(_0x1a93ea+_0x35ffa6))!=_0x1dd90d[_0x256fd8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x256fd8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x256fd8([0x56,0x61,0x6c,0x69,0x64]);})[_0x256fd8([0x74,0x68,0x65,0x6e])](_0x375ecd=>(_0x36d3eb(),_0x375ecd),()=>{const _0x4b4a8b=_0x24b71f();return null==_0x4b4a8b?(_0x36d3eb(),_0x256fd8([0x56,0x61,0x6c,0x69,0x64])):_0x256fd8(_0x547a01-_0x4b4a8b>(0x1b6407ea^_0x43f030)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x256fd8([0x74,0x68,0x65,0x6e])](_0x30f891)[_0x256fd8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x30f891(_0x256fd8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x23af32=0x3f5e6d6a^_0x43f030;function _0x36d3eb(){const _0x4e2407=_0x256fd8([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a65eb(_0x2cb908(_0x2663b0)),_0x1d768d=_0x4a16d6(_0x5a65eb(window[_0x256fd8([0x4d,0x61,0x74,0x68])][_0x256fd8([0x63,0x65,0x69,0x6c])](_0x547a01/_0x23af32)));window[_0x256fd8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x256fd8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4e2407,_0x1d768d);}function _0x24b71f(){const _0xe43dd7=_0x256fd8([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a65eb(_0x2cb908(_0x2663b0)),_0x22a4c4=window[_0x256fd8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x256fd8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xe43dd7);return _0x22a4c4?window[_0x256fd8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4a16d6(_0x22a4c4),0x10)*_0x23af32:null;}function _0x5df434(_0x52fc32){return new window[(_0x256fd8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xd2078f,_0x119556)=>{_0x52fc32[_0x256fd8([0x74,0x68,0x65,0x6e])](_0xd2078f,_0x119556),window[_0x256fd8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x119556,0x3f69572a^_0x43f030);});}}_0x2f5e54[_0x256fd8([0x6f,0x6e])](_0x256fd8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1466a4,_0x10b42e)=>{if(_0x10b42e[0x0]!=_0x2663b0)return _0x30f891(_0x256fd8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x10b42e[0x1]={..._0x10b42e[0x1],[_0x256fd8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1a93ea};},{[_0x256fd8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x256fd8([0x68,0x69,0x67,0x68])}),_0x2f5e54[_0x256fd8([0x6f,0x6e])](_0x256fd8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x54825d=>{_0xd9b871(_0x54825d[_0x256fd8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x598f2d=!0x0,_0x6b925c(_0x54825d[_0x256fd8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x256fd8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x256fd8([0x6c,0x6f,0x77])}),_0x349103[_0x256fd8([0x74,0x68,0x65,0x6e])](()=>{_0x598f2d||_0x30f891(_0x256fd8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x179ee4(){return _0x2f5e54[_0x256fd8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x256fd8([0x76,0x69,0x65,0x77])][_0x256fd8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x256fd8([0x61,0x75,0x74,0x6f]);}function _0x36bad9(){_0x2f5e54[_0x256fd8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x256fd8([0x76,0x69,0x65,0x77])][_0x256fd8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x256fd8([0x61,0x75,0x74,0x6f]);}}function _0xb99438(_0x2d836f){const _0x1c8787=[new window[(_0x256fd8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b415d=>setTimeout(_0x3b415d,0x3f61bd26^_0x43f030)),_0x349103[_0x256fd8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x256fd8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5cfc20=>{let _0x1d09ff=0x0;_0x2f5e54[_0x256fd8([0x6d,0x6f,0x64,0x65,0x6c])][_0x256fd8([0x6f,0x6e])](_0x256fd8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x24e831,_0x1b4058)=>{_0x1b4058[0x0][_0x256fd8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1d09ff++,_0x1d09ff==(0x3f688212^_0x43f030)&&(_0x5cfc20(),_0x24e831[_0x256fd8([0x6f,0x66,0x66])]());});}))];return window[_0x256fd8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x256fd8([0x72,0x61,0x63,0x65])](_0x1c8787)[_0x256fd8([0x74,0x68,0x65,0x6e])](()=>_0x2d836f);}async function _0x580fd9(){await _0x349103,_0x2f5e54[_0x256fd8([0x6d,0x6f,0x64,0x65,0x6c])][_0x256fd8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x15d260,_0x2f5e54[_0x256fd8([0x6d,0x6f,0x64,0x65,0x6c])][_0x256fd8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x15d260,_0x2f5e54[_0x256fd8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x256fd8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x19757a(_0x315186){const _0x3bac3a=_0x4041b9();_0x2f5e54[_0x3bac3a]=_0x256fd8([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x315186,_0x315186!=_0x256fd8([0x56,0x61,0x6c,0x69,0x64])&&_0x580fd9();}function _0x4041b9(){const _0x37614c=window[_0x256fd8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x256fd8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x256fd8([0x6e,0x6f,0x77])]())[_0x256fd8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x256fd8([0x2e]),'');let _0x290d54=_0x256fd8([0x72]);for(let _0x3d7338=0x0;_0x3d7338<_0x37614c[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d7338+=0x2){let _0x3a12c8=window[_0x256fd8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x37614c[_0x256fd8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d7338,_0x3d7338+0x2));_0x3a12c8>=_0x27f1b5[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3a12c8-=_0x27f1b5[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x290d54+=_0x27f1b5[_0x3a12c8];}return _0x290d54;}function _0x27775d(){const _0x374ba5=_0x92daed[_0x256fd8([0x73,0x70,0x6c,0x69,0x74])](_0x256fd8([0x2e]));if(0x3!=_0x374ba5[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2e3303(_0x374ba5[0x1]);function _0x2e3303(_0x3c1f23){const _0x571ca2=_0x365560(_0x3c1f23);return _0x571ca2&&_0x16e9f2()?_0x571ca2:null;function _0x16e9f2(){const _0x2e7958=_0x571ca2[_0x256fd8([0x6a,0x74,0x69])],_0x3f8288=window[_0x256fd8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e7958[_0x256fd8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2e7958[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x53ea8f={..._0x571ca2,[_0x256fd8([0x6a,0x74,0x69])]:_0x2e7958[_0x256fd8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2e7958[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x53ea8f[_0x256fd8([0x76,0x63])],_0x2cb908(_0x53ea8f)==_0x3f8288;}}}async function _0x437472(){let _0x4cf725=!0x0;try{const _0x4a5e1f=_0x92daed[_0x256fd8([0x73,0x70,0x6c,0x69,0x74])](_0x256fd8([0x2e])),[_0x7566ab,_0x57cd3c,_0x481465]=_0x4a5e1f;return _0x416a42(_0x7566ab),await _0x5bf281(_0x7566ab,_0x57cd3c,_0x481465),_0x4cf725;}catch{return!0x1;}function _0x416a42(_0x54a4c5){const _0x1fb8eb=_0x365560(_0x54a4c5);_0x1fb8eb&&_0x1fb8eb[_0x256fd8([0x61,0x6c,0x67])]==_0x256fd8([0x45,0x53,0x32,0x35,0x36])||(_0x4cf725=!0x1);}async function _0x5bf281(_0x4f4772,_0x320e1c,_0x5acbbe){const _0x3ef66c=window[_0x256fd8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x256fd8([0x66,0x72,0x6f,0x6d])](_0x5b7999(_0x5acbbe),_0x3f35d1=>_0x3f35d1[_0x256fd8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2cb4ba=new window[(_0x256fd8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x256fd8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4f4772+_0x256fd8([0x2e])+_0x320e1c),_0x4b40a2=window[_0x256fd8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x256fd8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4b40a2)return;const _0x32157a=await _0x4b40a2[_0x256fd8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x256fd8([0x6a,0x77,0x6b]),_0x3f0798,{[_0x256fd8([0x6e,0x61,0x6d,0x65])]:_0x256fd8([0x45,0x43,0x44,0x53,0x41]),[_0x256fd8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x256fd8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x256fd8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4b40a2[_0x256fd8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x256fd8([0x6e,0x61,0x6d,0x65])]:_0x256fd8([0x45,0x43,0x44,0x53,0x41]),[_0x256fd8([0x68,0x61,0x73,0x68])]:{[_0x256fd8([0x6e,0x61,0x6d,0x65])]:_0x256fd8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x32157a,_0x3ef66c,_0x2cb4ba)||(_0x4cf725=!0x1);}}function _0x365560(_0x55e1b8){return _0x55e1b8[_0x256fd8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x256fd8([0x65,0x79]))?JSON[_0x256fd8([0x70,0x61,0x72,0x73,0x65])](_0x5b7999(_0x55e1b8)):null;}function _0x5b7999(_0x585296){return window[_0x256fd8([0x61,0x74,0x6f,0x62])](_0x585296[_0x256fd8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x256fd8([0x2b]))[_0x256fd8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x256fd8([0x2f])));}function _0x2cb908(_0x3be1c6){let _0x4f5ee8=0x1505;function _0x27a9ae(_0x18f280){for(let _0x118f20=0x0;_0x118f20<_0x18f280[_0x256fd8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x118f20++){const _0x11aa64=_0x18f280[_0x256fd8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x118f20);_0x4f5ee8=(_0x4f5ee8<<0x5)+_0x4f5ee8+_0x11aa64,_0x4f5ee8&=_0x4f5ee8;}}function _0x1ec3ca(_0x285bcf){Array[_0x256fd8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x285bcf)?_0x285bcf[_0x256fd8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1ec3ca):_0x285bcf&&typeof _0x285bcf==_0x256fd8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x256fd8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x285bcf)[_0x256fd8([0x73,0x6f,0x72,0x74])]()[_0x256fd8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3d0dda,_0x51b385])=>{_0x27a9ae(_0x3d0dda),_0x1ec3ca(_0x51b385);}):_0x27a9ae(window[_0x256fd8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x285bcf));}return _0x1ec3ca(_0x3be1c6),_0x4f5ee8>>>0x0;}function _0x5a65eb(_0x5d8e0f){return _0x5d8e0f[_0x256fd8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x256fd8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x256fd8([0x30]));}function _0x4a16d6(_0x10e370){return _0x10e370[_0x256fd8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x256fd8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x256fd8([0x6a,0x6f,0x69,0x6e])]('');}function _0x15d260(){}function _0x256fd8(_0x575f40){return _0x575f40['map'](_0x350187=>String['fromCharCode'](_0x350187))['join']('');}_0x19757a(await _0x57c9e7());}(this);}['_initSchema'](){const _0x528410=this['editor']['model']['schema'];_0x528410['isRegistered']('imageBlock')&&_0x528410['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x528410['isRegistered']('imageInline')&&_0x528410['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x44e282=this['editor'];_0x44e282['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x44e282['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x1b9243=>_0x1b9243['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x7aaa04=_0x44e282['commands']['get']('replaceImageSource');_0x7aaa04&&this['listenTo'](_0x7aaa04,'cleanupImage',(_0x2228d9,[_0x1b1b3c,_0x3620d3])=>{_0x1b1b3c['removeAttribute']('uploadcareImageId',_0x3620d3);});}['_initConfig'](){const _0x2eba45=this['editor']['config']['get']('uploadcare.uploader')||{},_0x357b34=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x119a96(_0x185c34['document'],'uc-config',{..._0x2eba45,'pubkey':_0x357b34,'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']=_0xb6a9c=>{if('closeMax'==_0xb6a9c)return'#uc-icon-arrow-down';},_0x185c34['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x119a96(_0x185c34['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x185c34['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x50f643=this['editor']['commands']['get']('insertImage');_0x50f643&&this['listenTo'](_0x50f643,'execute',()=>{const _0x4c4673=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4c4673&&_0x4c4673['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x4c4673);});});const _0x4873c2=this['editor']['commands']['get']('uploadcareImageReplace');_0x4873c2&&this['listenTo'](_0x4873c2,'execute',()=>{const _0x324acd=this['editor']['model']['document']['selection']['getSelectedElement']();_0x324acd&&_0x324acd['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x324acd);});});}}class tt extends _0xf6fbe1{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15cf2b){super(_0x15cf2b),_0x15cf2b['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x48c0cb['defineComponents'](_0x48c0cb);}}class ii extends _0x41df65{constructor(_0x16fbbc){super(_0x16fbbc);const t=_0x16fbbc['t'],_0x2c5804=this['bindTemplate'],_0x519816=new _0xd3f9c8();_0x519816['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':[_0x519816,{'text':_0x2c5804['to']('imageUploadProgress',_0x94d48b=>t('Loading\x20image...')+'\x20('+(_0x94d48b||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 _0x41df65{constructor(_0x60f71d){super(_0x60f71d);const t=_0x60f71d['t'];this['set']('errorType',null);const _0x49f67d=new _0x19c8b2(_0x60f71d);_0x49f67d['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x49f67d['withText']=!0x0,_0x49f67d['class']='ck-button-action',_0x49f67d['on']('execute',()=>{this['fire']('retry');}),_0x49f67d['bind']('isVisible')['to'](this,'errorType',_0x5174d5=>'NotFound'!==_0x5174d5);const _0x37f0f8=new _0x238f30();_0x37f0f8['content']=_0x227ea7,_0x37f0f8['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xddad08=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':[_0x37f0f8,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xddad08['to']('errorType',_0x97c1ad=>t('NotFound'!==_0x97c1ad?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x49f67d]},{'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 _0x41df65{constructor(_0x3edb69,_0x4cf61){super(_0x3edb69);const _0x38157b=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x4cf61,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x38157b['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x35454b,_0x113dcb,_0xeaf221){super(_0x35454b),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x35454b),this['_errorView']=new ti(_0x35454b),this['_editingView']=new ei(_0x35454b,_0xeaf221),this['_focusableView']=new _0x41df65(_0x35454b),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x113dcb),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'],_0x280629=>{this['_addUploadcareImageEditorListeners'](_0x280629);});}),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'](_0x102c75,_0x589d30){const _0x5303a5='uc-cloud-image-editor',_0x2b1971=_0x102c75['querySelector'](_0x5303a5);if(_0x2b1971)return _0x589d30(_0x2b1971);const _0xc6f28c=new MutationObserver(_0x439659=>{const _0x45f4b1=_0x439659['filter'](_0x2cded6=>_0x2cded6['target']===_0x102c75&&_0x2cded6['addedNodes']['length']>0x0&&_0x2cded6['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5303a5);_0x45f4b1['length']&&(_0xc6f28c['disconnect'](),_0x589d30(_0x45f4b1[0x0]['addedNodes'][0x0]));});_0xc6f28c['observe'](_0x102c75,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x4966ec){_0x4966ec['addEventListener']('apply',_0x31212d=>{this['fire']('apply',{'imageSrc':_0x31212d['detail']['cdnUrl']});}),_0x4966ec['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x153c81(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2b76a5,_0x1d51a6,_0x5444e6){super(),this['_editor']=_0x2b76a5,this['_dialog']=_0x1d51a6,this['_imageElement']=_0x5444e6,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 _0x1d6042=this['_imageElement'],_0x2b5b4d=_0x1d6042['getAttribute']('uploadcareImageId'),_0x1a8109=_0x1d6042['getAttribute']('src');if(_0x2b5b4d)await this['_loadImageInfo'](_0x2b5b4d,_0x1a8109);else{if(this['_imageCache']['has'](_0x1a8109)){const _0x3e5eef=this['_imageCache']['get'](_0x1a8109);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3e5eef['url'],this['imageDimension']=_0x3e5eef['dimension'],this['imageId']=_0x3e5eef['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x13d424}=this['_editor'],t=_0x13d424['t'],_0x5253ba=new X(_0x13d424,this['imageStatus'],this['_attributes']);_0x5253ba['bind']('status')['to'](this,'imageStatus'),_0x5253ba['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5253ba['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5253ba['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5253ba,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x52ad18,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5253ba,'position':_0x1681aa['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5253ba['focus']();},'onHide':()=>{_0x5253ba['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x17deb6=>!S(_0x17deb6,_0x5253ba['element'])}});}['_loadImageInfo'](_0x44d1d1,_0x255632){return j['getInfo'](_0x44d1d1,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x4565b8=>{const {width:_0x21b653,height:_0x22a102}=_0x4565b8['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x255632,this['imageDimension']={'width':_0x21b653,'height':_0x22a102},this['imageId']=_0x44d1d1;})['catch'](_0x1b6db6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1b6db6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3da3dc,_0x11ee47){return this['_getImageAsFile'](_0x3da3dc)['then'](_0x56e2f0=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x11ee47['signal'],'file':_0x56e2f0,'onProgress':_0x514bf2=>{_0x514bf2&&_0x514bf2['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x514bf2['value']));}}))['then'](_0x51b1d6=>{const {width:_0x10fac3,height:_0xb9074a}=_0x51b1d6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x51b1d6['cdnUrl'],this['imageDimension']={'width':_0x10fac3,'height':_0xb9074a},this['imageId']=_0x51b1d6['uuid'],this['imageUploadProgress']=null;const _0x2a37c7=_0x3da3dc['getAttribute']('src');this['_imageCache']['set'](_0x2a37c7,{'id':_0x51b1d6['uuid'],'url':_0x51b1d6['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2c9274=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2c9274['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2589a7,_0x576048){_0x2589a7['on']('apply',(_0x36a30a,_0x168148)=>{this['_replaceImage'](_0x576048,_0x168148['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2589a7['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2589a7['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x19ce17,_0xedbd04,_0x2ede18){const _0x3af515=this['_editor'],{width:_0x2c456d,height:_0x2318c9}=C(_0xedbd04,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x33441e,imageSources:_0x410c2b}=k(_0xedbd04,_0x2c456d);_0x3af515['model']['change'](_0x351289=>{if('$graveyard'===_0x19ce17['root']['rootName']){_0x3af515['execute']('insertImage',{'imageType':_0x19ce17['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x19ce17['getAttributes']()),'uploadcareImageId':_0x2ede18,'src':_0x33441e,'sources':_0x410c2b,'width':_0x2c456d,'height':_0x2318c9}});const _0x5f5804=_0x19ce17['getChildren']();_0x19ce17=_0x3af515['model']['document']['selection']['getSelectedElement']();for(const _0x21785e of _0x5f5804)_0x351289['append'](_0x351289['cloneElement'](_0x21785e),_0x19ce17);}else _0x351289['setSelection'](_0x19ce17,'on'),_0x3af515['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x19ce17['getAttributes']()),'uploadcareImageId':_0x2ede18,'src':_0x33441e,'sources':_0x410c2b,'width':_0x2c456d,'height':_0x2318c9},_0x19ce17);_0x351289['setSelection'](_0x19ce17,'on');});}async['_getImageAsFile'](_0xf8ec69){const _0x487e70=_0x185c34['window'],_0x46f61d=_0x185c34['document']['location']['href'],_0x4da45d=new _0x487e70['URL'](_0xf8ec69['getAttribute']('src'),_0x46f61d);if('data:'===_0x4da45d['protocol']){const _0x4f6a06=_0x4da45d['href']['split'](','),_0x593abd=_0x4f6a06[0x0]['match'](/:(.*?);/)[0x1],_0x52b5fa=_0x593abd['split']('/')[0x1],_0x5b16f6=_0x487e70['atob'](_0x4f6a06[_0x4f6a06['length']-0x1]);let _0x279810=_0x5b16f6['length'];const _0x6068e7=new _0x487e70['Uint8Array'](_0x279810);for(;_0x279810--;)_0x6068e7[_0x279810]=_0x5b16f6['charCodeAt'](_0x279810);return new _0x487e70['File']([_0x6068e7],'image.'+_0x52b5fa,{'type':_0x593abd});}const _0xddac75=_0x4da45d['href']['split']('/'),_0xc2bc08=_0xddac75[_0xddac75['length']-0x1],_0x1a8740=_0xc2bc08['split']('.')[0x1];return _0x487e70['fetch'](_0x4da45d['href'])['then'](_0x40fec5=>_0x40fec5['clone']()['blob']())['then'](_0x1b8d8d=>new _0x487e70['File']([_0x1b8d8d],_0xc2bc08,{'type':'image/'+_0x1a8740}));}}class O extends _0x7ffec3{['imageEditController'];static get['requires'](){return[_0x4d119e];}['_isEditable'];constructor(_0x6d2bf8){super(_0x6d2bf8),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x1d467a){const _0x406df0=G(_0x1d467a);return _0x384af5=>!(!_0x384af5||!_0x384af5['is']('element','imageBlock')&&!_0x384af5['is']('element','imageInline'))&&(!!_0x384af5['hasAttribute']('uploadcareImageId')||!!_0x384af5['hasAttribute']('src')&&_0x406df0(_0x384af5['getAttribute']('src')));}(_0x6d2bf8['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x586f85=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x586f85);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x3d130f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3d130f&&(_0x3d130f['is']('element','imageBlock')||_0x3d130f['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x4d119e),_0x3d130f),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x7ffec3{['refresh'](){const _0x4ed495=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x4ed495&&(_0x4ed495['is']('element','imageBlock')||_0x4ed495['is']('element','imageInline')));}['execute'](_0x3ee331){const _0x2e0537=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x2125e3=>{_0x2125e3['setAttributes'](_0x3ee331,_0x2e0537),_0x2125e3['removeAttribute']('srcset',_0x2e0537),_0x2125e3['removeAttribute']('sizes',_0x2e0537);});}}class m extends _0xf6fbe1{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x551a71,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xd782d5}=this;_0xd782d5['commands']['add']('uploadcareImageEdit',new O(_0xd782d5)),_0xd782d5['commands']['add']('uploadcareImageReplace',new R(_0xd782d5));}}class g extends _0xf6fbe1{['_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 _0x4502fa=this['editor'];_0x4502fa['ui']['componentFactory']['add']('uploadcareImageEdit',_0x50a426=>{const _0x9a5198=_0x4502fa['commands']['get']('uploadcareImageEdit'),_0x285e89=new _0x19c8b2(_0x50a426),t=_0x50a426['t'];return _0x285e89['set']({'icon':_0x52ad18,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x285e89['bind']('isEnabled')['to'](_0x9a5198),_0x285e89['bind']('isOn')['to'](_0x9a5198,'isActive'),this['listenTo'](_0x285e89,'execute',()=>{_0x4502fa['execute']('uploadcareImageEdit'),_0x4502fa['editing']['view']['focus']();}),_0x285e89;}),this['_initConfig']();}['_initConfig'](){const _0x2e15df=_0x119a96(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x2e15df),this['listenTo'](this['editor'],'destroy',()=>{_0x2e15df['remove']();});}}class et extends _0xf6fbe1{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 _0x511535,Command as _0x1322bd}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x430922,IconGooglePhotos as _0x490e3,IconGoogleDrive as _0x1ce41b,IconFacebook as _0x44f48f,IconDropbox as _0x75e6dc,IconUploadcareLink as _0x33e964,IconUploadcareImageUpload as _0x5134cb,IconError as _0x403606,IconUploadcareImageEdit as _0x3bb4ea}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x5bb4bc,MenuBarMenuListItemButtonView as _0xc340f3,View as _0x11bee3,FocusCycler as _0x1bff0a,Dialog as _0x6efc3,DialogViewPosition as _0x4f6012,SpinnerView as _0x5636a1,IconView as _0x57ed87,Notification as _0x54b827}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2ba674,DomEmitterMixin as _0x2caeda,global as _0x281122,getAncestors as _0xb6092b,ObservableMixin as _0x5b07b1,uid as _0x3fc1ef,createElement as _0x3eb04a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0xaa0f15}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2a5491,info as _0x578b47}from'@uploadcare/upload-client';import*as _0xd14136 from'@uploadcare/file-uploader';var i=function(_0x32128c){return _0x32128c['Local']='local',_0x32128c['URL']='url',_0x32128c['Dropbox']='dropbox',_0x32128c['GDrive']='gdrive',_0x32128c['Facebook']='facebook',_0x32128c['GPhotos']='gphotos',_0x32128c['OneDrive']='onedrive',_0x32128c;}({});function _(_0x1f5836,_0xf9e5a,_0x25aedb){const t=_0x1f5836['t'],_0xcd01e3=_0x1f5836['t'];switch(_0xf9e5a){case i['Local']:return{'text':_0xcd01e3('Insert'===_0x25aedb?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0xcd01e3('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x25aedb?_0xcd01e3('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0xcd01e3('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x25aedb?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x25aedb?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x25aedb?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x25aedb?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x25aedb?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0xf9e5a;}}class e extends _0x511535{['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 _0x1530f3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x16e875;for(const _0xf8f57a in _0x1530f3){const _0x2cb408=_0xf8f57a,_0x478f88=_0x1530f3[_0x2cb408];if('uploadcareLicenseKeyValid'==_0x478f88||'uploadcareLicenseKeyInvalid'==_0x478f88||'uploadcareLicenseKeyExpired'==_0x478f88||'uploadcareLicenseKeyDomainLimit'==_0x478f88||'uploadcareLicenseKeyNotAllowed'==_0x478f88||'uploadcareLicenseKeyEvaluationLimit'==_0x478f88||'uploadcareLicenseKeyTrialLimit'==_0x478f88||'uploadcareLicenseKeyUsageLimit'==_0x478f88){delete _0x1530f3[_0x2cb408],_0x16e875=_0x478f88,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x16e875&&_0x1530f3['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x16e875&&_0x1530f3['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x16e875&&_0x1530f3['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x16e875&&_0x1530f3['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x16e875&&_0x1530f3['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x16e875&&_0x1530f3['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x16e875&&_0x1530f3['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x4c1384}=this,_0x45316c=_0x4c1384['commands']['get']('uploadcare');if(!_0x45316c)return;const _0xc36ea9=this['_normalizeConfigSourceList'](_0x4c1384['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x598a31,_0x235461)=>{const _0x5ae6e2=this['_getIntegrationKey'](_0x235461['type']);return _0x598a31[_0x5ae6e2]||(_0x598a31[_0x5ae6e2]=[]),_0x598a31[_0x5ae6e2]['push'](_0x235461),_0x598a31;},{});_0x4c1384['plugins']['has']('ImageInsertUI')&&_0x4c1384['commands']['get']('uploadcare')&&Object['entries'](_0xc36ea9)['forEach'](([_0xf2197f,_0x493873])=>{_0x4c1384['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0xf2197f,'observable':()=>_0x45316c,'buttonViewCreator':()=>this['_createToolbarButton'](_0x493873),'formViewCreator':()=>this['_createDropdownButtons'](_0x493873),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x493873),'override':'assetManager'!==_0xf2197f});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x45ff3c){const {locale:_0x10c24d}=this['editor'];return _0x45ff3c['map'](_0x5de1de=>{const _0x14b4e7=_(_0x10c24d,_0x5de1de,'Insert');switch(_0x5de1de){case i['Local']:return{'icon':_0x5134cb,'type':i['Local'],..._0x14b4e7};case i['URL']:return{'icon':_0x33e964,'type':i['URL'],..._0x14b4e7};case i['Dropbox']:return{'icon':_0x75e6dc,'type':i['Dropbox'],..._0x14b4e7};case i['Facebook']:return{'icon':_0x44f48f,'type':i['Facebook'],..._0x14b4e7};case i['GDrive']:return{'icon':_0x1ce41b,'type':i['GDrive'],..._0x14b4e7};case i['GPhotos']:return{'icon':_0x490e3,'type':i['GPhotos'],..._0x14b4e7};case i['OneDrive']:return{'icon':_0x430922,'type':i['OneDrive'],..._0x14b4e7};}});}['_getIntegrationKey'](_0x5cd0a0){switch(_0x5cd0a0){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x13c8c9,_0x1baed1){const _0x212ce0=this['editor'],_0xe4e287=new _0x13c8c9(_0x212ce0['locale']),_0x510a11=_0x212ce0['commands']['get']('uploadcare');return _0xe4e287['bind']('isEnabled')['to'](_0x510a11),_0xe4e287['on']('execute',()=>{_0x510a11['execute'](_0x1baed1);}),_0xe4e287;}['_createToolbarButton'](_0x3b4bd0){const {locale:_0x24fde4}=this['editor'],_0x69a37f=this['editor']['plugins']['get']('ImageInsertUI'),_0x4f7c8c=_0x3b4bd0[0x0],_0x55a3e7=this['_createButton'](_0x5bb4bc,_0x4f7c8c['type']);return _0x55a3e7['icon']=_0x4f7c8c['icon'],_0x55a3e7['bind']('label')['to'](_0x69a37f,'isImageSelected',_0x229a83=>_(_0x24fde4,_0x4f7c8c['type'],_0x229a83?'Replace':'Insert')['text']),_0x55a3e7['tooltip']=!0x0,_0x55a3e7;}['_createDropdownButtons'](_0x93db0b){const {locale:_0x535d89}=this['editor'],_0x32656b=this['editor']['plugins']['get']('ImageInsertUI');return _0x93db0b['map'](_0x143707=>{const _0x541dcb=this['_createButton'](_0x5bb4bc,_0x143707['type']);return _0x541dcb['withText']=!0x0,_0x541dcb['icon']=_0x143707['icon'],_0x541dcb['bind']('label')['to'](_0x32656b,'isImageSelected',_0x36f9b3=>_(_0x535d89,_0x143707['type'],_0x36f9b3?'Replace':'Insert')['text']),_0x541dcb;});}['_createMenuBarButtons'](_0x324a66){return _0x324a66['map'](_0x18bebf=>{const _0x9f2f60=this['_createButton'](_0xc340f3,_0x18bebf['type']);return _0x9f2f60['icon']=_0x18bebf['icon'],_0x9f2f60['label']=_0x18bebf['shortText'],_0x9f2f60;});}}class F extends _0x11bee3{['focusTracker'];['focusCycler'];constructor(_0x2f9333){super(_0x2f9333),this['focusTracker']=new _0x2ba674(),this['focusCycler']=new _0x1bff0a({'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(_0x26bee6,_0x526cda){super(_0x26bee6),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-'+_0x526cda}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x3d9267,_0x3302c9){const _0x51123d=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x152e00=>_0x152e00<=_0x3302c9)['map'](_0x31af30=>_0x3d9267['replace'](/\/$/,'')+'/-/resize/'+_0x31af30+'x/\x20'+_0x31af30+'w');return{'imageFallbackUrl':_0x3d9267,'imageSources':[{'srcset':_0x51123d['join'](',\x20'),'sizes':'(max-width:\x20'+_0x3302c9+'px)\x20100vw,\x20'+_0x3302c9+'px','type':'image/webp'}]};}function C(_0x5d84f9,_0x4baea8,_0x2ba285){const _0x48f2d8=_0x5d84f9['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x48f2d8?parseInt(_0x48f2d8[0x1],0xa):_0x4baea8,'height':_0x48f2d8?parseInt(_0x48f2d8[0x2],0xa):_0x2ba285};}function p(_0x4b86ea,_0x4f7531){const _0x1d68ef=new(_0x2caeda())(),_0xbbaaf0=_0x4b86ea['plugins']['get']('ImageUtils'),_0x382a4e=_0x4b86ea['editing']['mapper']['toViewElement'](_0x4f7531),_0x432fbd=_0xbbaaf0['findViewImgElement'](_0x382a4e),_0x52993f=_0x4b86ea['editing']['view']['domConverter']['viewToDom'](_0x432fbd),_0x4a1b4d=_0x4f7531['getAttribute']('width'),_0x1f5325=_0x4f7531['getAttribute']('height'),_0x42116f='image-processing';_0x4b86ea['editing']['view']['change'](_0x17cda4=>{_0x17cda4['addClass'](_0x42116f,_0x382a4e),_0x17cda4['setStyle']('aspect-ratio',_0x4a1b4d+'/'+_0x1f5325,_0x432fbd);}),_0x1d68ef['listenTo'](_0x52993f,'load',()=>{_0x1d68ef['stopListening'](_0x52993f,'load'),_0x4b86ea['editing']['view']['change'](_0x589bfc=>{_0x589bfc['removeClass'](_0x42116f,_0x382a4e),_0x589bfc['removeStyle']('aspect-ratio',_0x432fbd);});});}function z(_0x30b2da){if(Array['isArray'](_0x30b2da)){const _0x4bd51d=_0x30b2da['map'](z);return _0x2466ea=>_0x4bd51d['some'](_0x46e96d=>_0x46e96d(_0x2466ea));}if('origin'==_0x30b2da){const _0x326bad=_0x281122['window']['location']['origin'];return _0x20627f=>new URL(_0x20627f,_0x281122['document']['baseURI'])['origin']==_0x326bad;}return'function'==typeof _0x30b2da?_0x30b2da:_0x30b2da instanceof RegExp?_0x586ac0=>!(!_0x586ac0['match'](_0x30b2da)&&!_0x586ac0['replace'](/^https?:\/\//,'')['match'](_0x30b2da)):()=>!0x1;}function S(_0x2db6ee,_0x3ae718){return _0xb6092b(_0x2db6ee['target'])['includes'](_0x3ae718);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x5b07b1(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x257328,_0x4e22ee,_0x44a817){super(),this['_editor']=_0x257328,this['_editing']=_0x4e22ee,this['_dialog']=_0x257328['plugins']['get'](_0x6efc3),this['_api']=_0x4e22ee['ctxElement']['getAPI'](),this['_type']=_0x44a817,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:_0x4ec293,model:_0xa13c4a}=this['_editor'],_0x403e68=_0xa13c4a['document']['selection']['getSelectedElement'](),_0x194e6a=_0x403e68&&(_0x403e68['is']('element','imageBlock')||_0x403e68['is']('element','imageInline'));this['_formView']=new x(_0x4ec293,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x5134cb,'title':_(_0x4ec293,this['_type'],_0x194e6a?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x4f6012['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4c9170=>!S(_0x4c9170,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x480ddc}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x49c025=>{const _0x14dd73=_0x480ddc['length'];for(const _0x14792a of _0x480ddc){const _0x3331ce=_0x14792a===_0x480ddc[_0x14dd73-0x1],{cdnUrl:_0x38655b,fileInfo:_0x1e9645}=_0x14792a;if(!_0x38655b||!_0x1e9645)continue;const {width:_0x49412a,height:_0x2cbc6e}=_0x1e9645['imageInfo'],_0x5cd340=C(_0x38655b,_0x49412a,_0x2cbc6e),_0x563fb6=k(_0x38655b,_0x5cd340['width']),_0x376ee6={'id':_0x1e9645['uuid'],'type':'image','attributes':{'imageDimension':_0x5cd340,..._0x563fb6}};this['_insertAsset'](_0x376ee6,_0x3331ce,_0x49c025);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x53bcf8=>{'idle'===_0x53bcf8['detail']['status']&&!_0x53bcf8['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x1e98a8,_0x8e7c0,_0x569cfd){const _0x575d49=this['_editor']['model']['document']['selection'],_0x351926=_0x575d49['getSelectedElement'](),_0x5720c9=!(!_0x351926||!_0x351926['is']('element','imageInline'));_0x569cfd['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x1e98a8,_0x5720c9),_0x8e7c0||_0x569cfd['setSelection'](_0x575d49['getLastPosition']());}['_insertImage'](_0x1f0db8,_0x538e1f){const _0x2d0ba9=this['_editor'],{imageDimension:_0x2a4640,imageFallbackUrl:_0x103564,imageSources:_0x33557e}=_0x1f0db8['attributes'];_0x2d0ba9['execute']('insertImage',{'imageType':_0x538e1f?'imageInline':null,'source':{'uploadcareImageId':_0x1f0db8['id'],'src':_0x103564,'sources':_0x33557e,..._0x2a4640}});}}class w extends _0x1322bd{['_editing'];['_controller']=null;static get['requires'](){return[_0x6efc3,o];}constructor(_0x42ac0e){super(_0x42ac0e),this['_editing']=_0x42ac0e['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x23bf79){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x23bf79);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x544048,publicKey:_0x743edb,signal:_0x568151,onProgress:_0x29ecfa}){return _0x2a5491(_0x544048,{'publicKey':_0x743edb,'store':'auto','signal':_0x568151,'onProgress':_0x29ecfa});}static['getInfo'](_0x5598c0,_0x221e60){return _0x578b47(_0x5598c0,_0x221e60);}}class f extends _0x511535{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0xaa0f15,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x11abdb=this['editor'];if(!!!_0x11abdb['config']['get']('uploadcare'))return;_0x11abdb['plugins']['get'](_0xaa0f15)['createUploadAdapter']=_0x290ff4=>new A(_0x290ff4,_0x11abdb),_0x11abdb['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x375f52,{imageElement:_0x2c7ac7,data:_0x3f6602})=>{_0x11abdb['model']['change'](_0x5ed036=>{_0x5ed036['setAttribute']('uploadcareImageId',_0x3f6602['uploadcareImageId'],_0x2c7ac7);});});}}class A{['loader'];['editor'];['controller'];constructor(_0xe3bfe3,_0x46c171){this['loader']=_0xe3bfe3,this['editor']=_0x46c171,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4ff33b=this['editor']['config']['get']('uploadcare.pubkey'),_0x45cc27=await this['loader']['file'];return j['upload']({'file':_0x45cc27,'publicKey':_0x4ff33b,'signal':this['controller']['signal'],'onProgress':_0x2ad462=>{_0x2ad462&&_0x2ad462['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x2ad462['value']);}})['then'](async _0x30462c=>{const {imageFallbackUrl:_0x432964,imageSources:_0x43f296}=k(_0x30462c['cdnUrl'],_0x30462c['imageInfo']['width']);return{'uploadcareImageId':_0x30462c['uuid'],'default':_0x432964,'sources':_0x43f296};})['catch'](()=>{const _0x6643fc=t('Cannot\x20upload\x20file:')+('\x20'+_0x45cc27['name']+'.');return Promise['reject'](_0x6643fc);});}['abort'](){this['controller']['abort']();}}class o extends _0x511535{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x6efc3];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x2b6b13){super(_0x2b6b13),this['ucContextId']=_0x3fc1ef();}['init'](){const _0x199fbe=this['editor'];_0x199fbe['commands']['add']('uploadcare',new w(_0x199fbe));}['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 _0x598c5c=_0x281122['document']['querySelector']('input[uploadcare-file-input]');_0x598c5c&&_0x598c5c['remove']();}),async function(_0x17848d){const _0x187ff7=_0x59fe28([0x41,0x78,0x6f,0x45,0x62,0x39,0x6d,0x46,0x56,0x5a,0x59,0x77,0x42,0x47,0x49,0x74,0x7a,0x30,0x55,0x33,0x44,0x43,0x4e,0x65,0x63,0x4f,0x76,0x36,0x4b,0x72,0x58,0x4d,0x34,0x37,0x31,0x32,0x50,0x6e,0x68,0x70,0x75,0x6c,0x48,0x66,0x53,0x38,0x52,0x4c,0x6a,0x35,0x69,0x54,0x73,0x6b,0x64,0x67,0x57,0x79,0x61,0x71,0x51,0x4a]),_0x180d55=0x101a9e7e,_0x7b660f=0x101df116^_0x180d55,_0x2f568c=window[_0x59fe28([0x44,0x61,0x74,0x65])][_0x59fe28([0x6e,0x6f,0x77])](),_0x363a80=_0x17848d[_0x59fe28([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1ee1a2=new window[(_0x59fe28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16aaec=>{_0x363a80[_0x59fe28([0x6f,0x6e,0x63,0x65])](_0x59fe28([0x72,0x65,0x61,0x64,0x79]),_0x16aaec);}),_0x211005={[_0x59fe28([0x6b,0x74,0x79])]:_0x59fe28([0x45,0x43]),[_0x59fe28([0x75,0x73,0x65])]:_0x59fe28([0x73,0x69,0x67]),[_0x59fe28([0x63,0x72,0x76])]:_0x59fe28([0x50,0x2d,0x32,0x35,0x36]),[_0x59fe28([0x78])]:_0x59fe28([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]),[_0x59fe28([0x79])]:_0x59fe28([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]),[_0x59fe28([0x61,0x6c,0x67])]:_0x59fe28([0x45,0x53,0x32,0x35,0x36])},_0x24357c=_0x363a80[_0x59fe28([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x59fe28([0x67,0x65,0x74])](_0x59fe28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xe05168(){let _0x26048b,_0x4697a8=null,_0x4da66b=null;try{if(_0x24357c==_0x59fe28([0x47,0x50,0x4c]))return _0x59fe28([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x26048b=_0x2e2579(),!_0x26048b)return _0x59fe28([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x26048b[_0x59fe28([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4da66b=_0x1d634a(_0x26048b[_0x59fe28([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x26048b[_0x59fe28([0x6a,0x74,0x69])])),await _0x24ac8b()?_0x5b6e9e()?_0x56a361()?_0x59fe28([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4f156()?(_0x26048b[_0x59fe28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x59fe28([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4697a8=_0x3b5d6e(_0x59fe28([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x26048b[_0x59fe28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x59fe28([0x74,0x72,0x69,0x61,0x6c])&&(_0x4697a8=_0x3b5d6e(_0x59fe28([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x18d305()):_0x59fe28([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x59fe28([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x59fe28([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x59fe28([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x56a361(){const _0x58391b=[_0x59fe28([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x59fe28([0x74,0x72,0x69,0x61,0x6c])][_0x59fe28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26048b[_0x59fe28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2f568c/0x3e8:0xe10*_0x7b660f;return _0x26048b[_0x59fe28([0x65,0x78,0x70])]<_0x58391b;}function _0x5b6e9e(){const _0x51ddac=_0x26048b[_0x59fe28([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x51ddac&&(!!_0x51ddac[_0x59fe28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59fe28([0x2a]))||!!_0x51ddac[_0x59fe28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59fe28([0x55,0x50,0x4c,0x43])));}function _0x4f156(){const _0x2de6d6=_0x26048b[_0x59fe28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2de6d6||0x0==_0x2de6d6[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x6f3161}=new URL(window[_0x59fe28([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2de6d6[_0x59fe28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6f3161))return!0x0;const _0x3fa605=_0x6f3161[_0x59fe28([0x73,0x70,0x6c,0x69,0x74])](_0x59fe28([0x2e]));return _0x2de6d6[_0x59fe28([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x320da2=>_0x320da2[_0x59fe28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59fe28([0x2a])))[_0x59fe28([0x6d,0x61,0x70])](_0x358743=>_0x358743[_0x59fe28([0x73,0x70,0x6c,0x69,0x74])](_0x59fe28([0x2e])))[_0x59fe28([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1f4391=>_0x1f4391[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3fa605[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x59fe28([0x6d,0x61,0x70])](_0x1e6f0f=>Array(_0x3fa605[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1e6f0f[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x59fe28([0x66,0x69,0x6c,0x6c])](_0x1e6f0f[0x0]===_0x59fe28([0x2a])?_0x59fe28([0x2a]):'')[_0x59fe28([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1e6f0f))[_0x59fe28([0x73,0x6f,0x6d,0x65])](_0x34521d=>_0x3fa605[_0x59fe28([0x65,0x76,0x65,0x72,0x79])]((_0x432734,_0x3f43b1)=>_0x34521d[_0x3f43b1]===_0x432734||_0x34521d[_0x3f43b1]===_0x59fe28([0x2a])));}function _0x18d305(){return _0x4697a8&&_0x4da66b?new window[(_0x59fe28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa3fb45,_0x31e492)=>{_0x4697a8[_0x59fe28([0x74,0x68,0x65,0x6e])](_0xa3fb45,_0x31e492),_0x4da66b[_0x59fe28([0x74,0x68,0x65,0x6e])](_0x334dbe=>{_0x334dbe!=_0x59fe28([0x56,0x61,0x6c,0x69,0x64])&&_0xa3fb45(_0x334dbe);},_0x31e492);}):_0x4697a8||_0x4da66b||_0x59fe28([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1d634a(_0x4e530e,_0x49766e){return new window[(_0x59fe28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x91473=>{if(_0x3d9c47())return _0x91473(_0x59fe28([0x56,0x61,0x6c,0x69,0x64]));_0x355b7c(),_0x363a80[_0x59fe28([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x59fe28([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1c5cab=!0x1;const _0x52b4a2=_0x3fc1ef();function _0x2d3b79(_0x24a644){return!!_0x24a644&&(typeof _0x24a644===_0x59fe28([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x24a644===_0x59fe28([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x24a644[_0x59fe28([0x74,0x68,0x65,0x6e])]===_0x59fe28([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x24a644[_0x59fe28([0x63,0x61,0x74,0x63,0x68])]===_0x59fe28([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x87fb04(_0xf5a55b){_0x3d231b(_0xf5a55b)[_0x59fe28([0x74,0x68,0x65,0x6e])](_0x4757c4=>{if(!_0x4757c4||_0x4757c4[_0x59fe28([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x59fe28([0x6f,0x6b]))return _0x59fe28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2d4e6b(_0x3eb870(_0x52b4a2+_0x49766e))!=_0x4757c4[_0x59fe28([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x59fe28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x59fe28([0x56,0x61,0x6c,0x69,0x64]);})[_0x59fe28([0x74,0x68,0x65,0x6e])](_0xfd4a18=>(_0x148e8c(),_0xfd4a18),()=>{const _0x30fae9=_0x242779();return null==_0x30fae9?(_0x148e8c(),_0x59fe28([0x56,0x61,0x6c,0x69,0x64])):_0x59fe28(_0x2f568c-_0x30fae9>(0x34161a7e^_0x180d55)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x59fe28([0x74,0x68,0x65,0x6e])](_0x91473)[_0x59fe28([0x63,0x61,0x74,0x63,0x68])](()=>{_0x91473(_0x59fe28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x29be84=0x102c70fe^_0x180d55;function _0x148e8c(){const _0x4de122=_0x59fe28([0x6c,0x6c,0x63,0x74,0x2d])+_0x2d4e6b(_0x3eb870(_0x4e530e)),_0x2fae57=_0x3e247c(_0x2d4e6b(window[_0x59fe28([0x4d,0x61,0x74,0x68])][_0x59fe28([0x63,0x65,0x69,0x6c])](_0x2f568c/_0x29be84)));window[_0x59fe28([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59fe28([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4de122,_0x2fae57);}function _0x242779(){const _0x3c9ce6=_0x59fe28([0x6c,0x6c,0x63,0x74,0x2d])+_0x2d4e6b(_0x3eb870(_0x4e530e)),_0x25cd13=window[_0x59fe28([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59fe28([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3c9ce6);return _0x25cd13?window[_0x59fe28([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3e247c(_0x25cd13),0x10)*_0x29be84:null;}function _0x3d231b(_0x5ba241){return new window[(_0x59fe28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2c5c60,_0x5c8ae6)=>{_0x5ba241[_0x59fe28([0x74,0x68,0x65,0x6e])](_0x2c5c60,_0x5c8ae6),window[_0x59fe28([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5c8ae6,0x101b4abe^_0x180d55);});}}_0x363a80[_0x59fe28([0x6f,0x6e])](_0x59fe28([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xd24bd4,_0x1fdb5c)=>{if(_0x1fdb5c[0x0]!=_0x4e530e)return _0x91473(_0x59fe28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1fdb5c[0x1]={..._0x1fdb5c[0x1],[_0x59fe28([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x52b4a2};},{[_0x59fe28([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59fe28([0x68,0x69,0x67,0x68])}),_0x363a80[_0x59fe28([0x6f,0x6e])](_0x59fe28([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xc0606f=>{_0x2d3b79(_0xc0606f[_0x59fe28([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1c5cab=!0x0,_0x87fb04(_0xc0606f[_0x59fe28([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x59fe28([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59fe28([0x6c,0x6f,0x77])}),_0x1ee1a2[_0x59fe28([0x74,0x68,0x65,0x6e])](()=>{_0x1c5cab||_0x91473(_0x59fe28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3d9c47(){return _0x363a80[_0x59fe28([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59fe28([0x76,0x69,0x65,0x77])][_0x59fe28([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x59fe28([0x61,0x75,0x74,0x6f]);}function _0x355b7c(){_0x363a80[_0x59fe28([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59fe28([0x76,0x69,0x65,0x77])][_0x59fe28([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x59fe28([0x61,0x75,0x74,0x6f]);}}function _0x3b5d6e(_0x5f4e57){const _0x32e259=[new window[(_0x59fe28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x37d6ae=>setTimeout(_0x37d6ae,0x1013a0b2^_0x180d55)),_0x1ee1a2[_0x59fe28([0x74,0x68,0x65,0x6e])](()=>new window[(_0x59fe28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x28b8c1=>{let _0x497122=0x0;_0x363a80[_0x59fe28([0x6d,0x6f,0x64,0x65,0x6c])][_0x59fe28([0x6f,0x6e])](_0x59fe28([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3e9966,_0x29acb7)=>{_0x29acb7[0x0][_0x59fe28([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x497122++,_0x497122==(0x101a9f86^_0x180d55)&&(_0x28b8c1(),_0x3e9966[_0x59fe28([0x6f,0x66,0x66])]());});}))];return window[_0x59fe28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x59fe28([0x72,0x61,0x63,0x65])](_0x32e259)[_0x59fe28([0x74,0x68,0x65,0x6e])](()=>_0x5f4e57);}async function _0x4bbc75(){await _0x1ee1a2,_0x363a80[_0x59fe28([0x6d,0x6f,0x64,0x65,0x6c])][_0x59fe28([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16d8b3,_0x363a80[_0x59fe28([0x6d,0x6f,0x64,0x65,0x6c])][_0x59fe28([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16d8b3,_0x363a80[_0x59fe28([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x59fe28([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x58a5c8(_0x3d7134){const _0x249e9c=_0x374480();_0x363a80[_0x249e9c]=_0x59fe28([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3d7134,_0x3d7134!=_0x59fe28([0x56,0x61,0x6c,0x69,0x64])&&_0x4bbc75();}function _0x374480(){const _0xce7717=window[_0x59fe28([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x59fe28([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x59fe28([0x6e,0x6f,0x77])]())[_0x59fe28([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x59fe28([0x2e]),'');let _0x2990a0=_0x59fe28([0x41]);for(let _0xbc47d4=0x0;_0xbc47d4<_0xce7717[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xbc47d4+=0x2){let _0x24d49c=window[_0x59fe28([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xce7717[_0x59fe28([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xbc47d4,_0xbc47d4+0x2));_0x24d49c>=_0x187ff7[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x24d49c-=_0x187ff7[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2990a0+=_0x187ff7[_0x24d49c];}return _0x2990a0;}function _0x2e2579(){const _0x4de20d=_0x24357c[_0x59fe28([0x73,0x70,0x6c,0x69,0x74])](_0x59fe28([0x2e]));if(0x3!=_0x4de20d[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x47f2df(_0x4de20d[0x1]);function _0x47f2df(_0x293c69){const _0x9dc427=_0x19249b(_0x293c69);return _0x9dc427&&_0x117414()?_0x9dc427:null;function _0x117414(){const _0x385446=_0x9dc427[_0x59fe28([0x6a,0x74,0x69])],_0x2c8ca0=window[_0x59fe28([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x385446[_0x59fe28([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x385446[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x389926={..._0x9dc427,[_0x59fe28([0x6a,0x74,0x69])]:_0x385446[_0x59fe28([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x385446[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x389926[_0x59fe28([0x76,0x63])],_0x3eb870(_0x389926)==_0x2c8ca0;}}}async function _0x24ac8b(){let _0x87deb4=!0x0;try{const _0x418591=_0x24357c[_0x59fe28([0x73,0x70,0x6c,0x69,0x74])](_0x59fe28([0x2e])),[_0xb2f3fa,_0x18fe3e,_0x4ce2b0]=_0x418591;return _0x395228(_0xb2f3fa),await _0x1cbbe9(_0xb2f3fa,_0x18fe3e,_0x4ce2b0),_0x87deb4;}catch{return!0x1;}function _0x395228(_0x5f5c43){const _0x1fd4ae=_0x19249b(_0x5f5c43);_0x1fd4ae&&_0x1fd4ae[_0x59fe28([0x61,0x6c,0x67])]==_0x59fe28([0x45,0x53,0x32,0x35,0x36])||(_0x87deb4=!0x1);}async function _0x1cbbe9(_0x33ec61,_0x1cfdc4,_0x2dda37){const _0x2b67cb=window[_0x59fe28([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x59fe28([0x66,0x72,0x6f,0x6d])](_0x4f04f6(_0x2dda37),_0x5725a1=>_0x5725a1[_0x59fe28([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x13bc73=new window[(_0x59fe28([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x59fe28([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x33ec61+_0x59fe28([0x2e])+_0x1cfdc4),_0x506dde=window[_0x59fe28([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x59fe28([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x506dde)return;const _0x502742=await _0x506dde[_0x59fe28([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x59fe28([0x6a,0x77,0x6b]),_0x211005,{[_0x59fe28([0x6e,0x61,0x6d,0x65])]:_0x59fe28([0x45,0x43,0x44,0x53,0x41]),[_0x59fe28([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x59fe28([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x59fe28([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x506dde[_0x59fe28([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x59fe28([0x6e,0x61,0x6d,0x65])]:_0x59fe28([0x45,0x43,0x44,0x53,0x41]),[_0x59fe28([0x68,0x61,0x73,0x68])]:{[_0x59fe28([0x6e,0x61,0x6d,0x65])]:_0x59fe28([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x502742,_0x2b67cb,_0x13bc73)||(_0x87deb4=!0x1);}}function _0x19249b(_0x565150){return _0x565150[_0x59fe28([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x59fe28([0x65,0x79]))?JSON[_0x59fe28([0x70,0x61,0x72,0x73,0x65])](_0x4f04f6(_0x565150)):null;}function _0x4f04f6(_0x3b5804){return window[_0x59fe28([0x61,0x74,0x6f,0x62])](_0x3b5804[_0x59fe28([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x59fe28([0x2b]))[_0x59fe28([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x59fe28([0x2f])));}function _0x3eb870(_0x5707bc){let _0x3500ed=0x1505;function _0x3d90ad(_0x568310){for(let _0xf9c784=0x0;_0xf9c784<_0x568310[_0x59fe28([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xf9c784++){const _0x1fd50b=_0x568310[_0x59fe28([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xf9c784);_0x3500ed=(_0x3500ed<<0x5)+_0x3500ed+_0x1fd50b,_0x3500ed&=_0x3500ed;}}function _0x383f91(_0x1331da){Array[_0x59fe28([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1331da)?_0x1331da[_0x59fe28([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x383f91):_0x1331da&&typeof _0x1331da==_0x59fe28([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x59fe28([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1331da)[_0x59fe28([0x73,0x6f,0x72,0x74])]()[_0x59fe28([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2ca7b8,_0x3aec32])=>{_0x3d90ad(_0x2ca7b8),_0x383f91(_0x3aec32);}):_0x3d90ad(window[_0x59fe28([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1331da));}return _0x383f91(_0x5707bc),_0x3500ed>>>0x0;}function _0x2d4e6b(_0x29597d){return _0x29597d[_0x59fe28([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x59fe28([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x59fe28([0x30]));}function _0x3e247c(_0x4f6f45){return _0x4f6f45[_0x59fe28([0x73,0x70,0x6c,0x69,0x74])]('')[_0x59fe28([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x59fe28([0x6a,0x6f,0x69,0x6e])]('');}function _0x16d8b3(){}function _0x59fe28(_0x32733d){return _0x32733d['map'](_0x1a742d=>String['fromCharCode'](_0x1a742d))['join']('');}_0x58a5c8(await _0xe05168());}(this);}['_initSchema'](){const _0x16e1f4=this['editor']['model']['schema'];_0x16e1f4['isRegistered']('imageBlock')&&_0x16e1f4['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x16e1f4['isRegistered']('imageInline')&&_0x16e1f4['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x49c1f2=this['editor'];_0x49c1f2['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x49c1f2['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x41dfce=>_0x41dfce['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4bbc53=_0x49c1f2['commands']['get']('replaceImageSource');_0x4bbc53&&this['listenTo'](_0x4bbc53,'cleanupImage',(_0x2378b9,[_0x528a2f,_0x5401b6])=>{_0x528a2f['removeAttribute']('uploadcareImageId',_0x5401b6);});}['_initConfig'](){const _0xe28dcc=this['editor']['config']['get']('uploadcare.uploader')||{},_0x17c902=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3eb04a(_0x281122['document'],'uc-config',{..._0xe28dcc,'pubkey':_0x17c902,'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']=_0xab7952=>{if('closeMax'==_0xab7952)return'#uc-icon-arrow-down';},_0x281122['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3eb04a(_0x281122['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x281122['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x102a9b=this['editor']['commands']['get']('insertImage');_0x102a9b&&this['listenTo'](_0x102a9b,'execute',()=>{const _0x3dad4e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3dad4e&&_0x3dad4e['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3dad4e);});});const _0x25c6e2=this['editor']['commands']['get']('uploadcareImageReplace');_0x25c6e2&&this['listenTo'](_0x25c6e2,'execute',()=>{const _0x465046=this['editor']['model']['document']['selection']['getSelectedElement']();_0x465046&&_0x465046['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x465046);});});}}class tt extends _0x511535{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x318178){super(_0x318178),_0x318178['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0xd14136['defineComponents'](_0xd14136);}}class ii extends _0x11bee3{constructor(_0x3ec8f6){super(_0x3ec8f6);const t=_0x3ec8f6['t'],_0x23cca0=this['bindTemplate'],_0x9428be=new _0x5636a1();_0x9428be['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':[_0x9428be,{'text':_0x23cca0['to']('imageUploadProgress',_0x4ba35e=>t('Loading\x20image...')+'\x20('+(_0x4ba35e||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 _0x11bee3{constructor(_0x46971b){super(_0x46971b);const t=_0x46971b['t'];this['set']('errorType',null);const _0x4dfac5=new _0x5bb4bc(_0x46971b);_0x4dfac5['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4dfac5['withText']=!0x0,_0x4dfac5['class']='ck-button-action',_0x4dfac5['on']('execute',()=>{this['fire']('retry');}),_0x4dfac5['bind']('isVisible')['to'](this,'errorType',_0x1a043b=>'NotFound'!==_0x1a043b);const _0x576743=new _0x57ed87();_0x576743['content']=_0x403606,_0x576743['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5379e0=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':[_0x576743,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5379e0['to']('errorType',_0x4869d9=>t('NotFound'!==_0x4869d9?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4dfac5]},{'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 _0x11bee3{constructor(_0x4d76db,_0x2c3d54){super(_0x4d76db);const _0xfe8164=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x2c3d54,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xfe8164['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x33285e,_0x5b823e,_0xafd1d8){super(_0x33285e),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x33285e),this['_errorView']=new ti(_0x33285e),this['_editingView']=new ei(_0x33285e,_0xafd1d8),this['_focusableView']=new _0x11bee3(_0x33285e),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5b823e),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'],_0x346a09=>{this['_addUploadcareImageEditorListeners'](_0x346a09);});}),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'](_0x37df5f,_0xf761c3){const _0x3c1a2a='uc-cloud-image-editor',_0x1533ad=_0x37df5f['querySelector'](_0x3c1a2a);if(_0x1533ad)return _0xf761c3(_0x1533ad);const _0x5b8883=new MutationObserver(_0x378cd5=>{const _0x274674=_0x378cd5['filter'](_0x37541f=>_0x37541f['target']===_0x37df5f&&_0x37541f['addedNodes']['length']>0x0&&_0x37541f['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x3c1a2a);_0x274674['length']&&(_0x5b8883['disconnect'](),_0xf761c3(_0x274674[0x0]['addedNodes'][0x0]));});_0x5b8883['observe'](_0x37df5f,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x450173){_0x450173['addEventListener']('apply',_0x1496d7=>{this['fire']('apply',{'imageSrc':_0x1496d7['detail']['cdnUrl']});}),_0x450173['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x5b07b1(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x52ae79,_0x1e439f,_0x345050){super(),this['_editor']=_0x52ae79,this['_dialog']=_0x1e439f,this['_imageElement']=_0x345050,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 _0x5f295a=this['_imageElement'],_0x147efa=_0x5f295a['getAttribute']('uploadcareImageId'),_0x31db6a=_0x5f295a['getAttribute']('src');if(_0x147efa)await this['_loadImageInfo'](_0x147efa,_0x31db6a);else{if(this['_imageCache']['has'](_0x31db6a)){const _0x1d68e7=this['_imageCache']['get'](_0x31db6a);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1d68e7['url'],this['imageDimension']=_0x1d68e7['dimension'],this['imageId']=_0x1d68e7['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x37a0b9}=this['_editor'],t=_0x37a0b9['t'],_0x27b8d9=new X(_0x37a0b9,this['imageStatus'],this['_attributes']);_0x27b8d9['bind']('status')['to'](this,'imageStatus'),_0x27b8d9['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x27b8d9['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x27b8d9['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x27b8d9,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3bb4ea,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x27b8d9,'position':_0x4f6012['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x27b8d9['focus']();},'onHide':()=>{_0x27b8d9['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4a8b2e=>!S(_0x4a8b2e,_0x27b8d9['element'])}});}['_loadImageInfo'](_0x13b0ca,_0x31735a){return j['getInfo'](_0x13b0ca,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x46aeb3=>{const {width:_0x4ad787,height:_0x1f65ff}=_0x46aeb3['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x31735a,this['imageDimension']={'width':_0x4ad787,'height':_0x1f65ff},this['imageId']=_0x13b0ca;})['catch'](_0x383b93=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x383b93['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0xc78281,_0x46c85e){return this['_getImageAsFile'](_0xc78281)['then'](_0x216079=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x46c85e['signal'],'file':_0x216079,'onProgress':_0x190c05=>{_0x190c05&&_0x190c05['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x190c05['value']));}}))['then'](_0x20fc4d=>{const {width:_0xaf1eca,height:_0x17a95d}=_0x20fc4d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x20fc4d['cdnUrl'],this['imageDimension']={'width':_0xaf1eca,'height':_0x17a95d},this['imageId']=_0x20fc4d['uuid'],this['imageUploadProgress']=null;const _0x21021=_0xc78281['getAttribute']('src');this['_imageCache']['set'](_0x21021,{'id':_0x20fc4d['uuid'],'url':_0x20fc4d['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x186b05=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x186b05['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4df92f,_0x4c128e){_0x4df92f['on']('apply',(_0x3e3268,_0x6c6af)=>{this['_replaceImage'](_0x4c128e,_0x6c6af['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4df92f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4df92f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0xeeb5b0,_0x4fbcb3,_0x2a0eaf){const _0x3a3d0f=this['_editor'],{width:_0x2c9510,height:_0x1fdb90}=C(_0x4fbcb3,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x38d334,imageSources:_0x103ee2}=k(_0x4fbcb3,_0x2c9510);_0x3a3d0f['model']['change'](_0x220b8c=>{if('$graveyard'===_0xeeb5b0['root']['rootName']){_0x3a3d0f['execute']('insertImage',{'imageType':_0xeeb5b0['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0xeeb5b0['getAttributes']()),'uploadcareImageId':_0x2a0eaf,'src':_0x38d334,'sources':_0x103ee2,'width':_0x2c9510,'height':_0x1fdb90}});const _0x1c092a=_0xeeb5b0['getChildren']();_0xeeb5b0=_0x3a3d0f['model']['document']['selection']['getSelectedElement']();for(const _0x47ab2c of _0x1c092a)_0x220b8c['append'](_0x220b8c['cloneElement'](_0x47ab2c),_0xeeb5b0);}else _0x220b8c['setSelection'](_0xeeb5b0,'on'),_0x3a3d0f['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0xeeb5b0['getAttributes']()),'uploadcareImageId':_0x2a0eaf,'src':_0x38d334,'sources':_0x103ee2,'width':_0x2c9510,'height':_0x1fdb90},_0xeeb5b0);_0x220b8c['setSelection'](_0xeeb5b0,'on');});}async['_getImageAsFile'](_0x42cf92){const _0x2893f3=_0x281122['window'],_0x20b824=_0x281122['document']['location']['href'],_0x2827de=new _0x2893f3['URL'](_0x42cf92['getAttribute']('src'),_0x20b824);if('data:'===_0x2827de['protocol']){const _0x3ec4b4=_0x2827de['href']['split'](','),_0xd81219=_0x3ec4b4[0x0]['match'](/:(.*?);/)[0x1],_0x27c3ef=_0xd81219['split']('/')[0x1],_0x342a83=_0x2893f3['atob'](_0x3ec4b4[_0x3ec4b4['length']-0x1]);let _0x4de5b9=_0x342a83['length'];const _0x21e101=new _0x2893f3['Uint8Array'](_0x4de5b9);for(;_0x4de5b9--;)_0x21e101[_0x4de5b9]=_0x342a83['charCodeAt'](_0x4de5b9);return new _0x2893f3['File']([_0x21e101],'image.'+_0x27c3ef,{'type':_0xd81219});}const _0x7e7b28=_0x2827de['href']['split']('/'),_0x8f6a93=_0x7e7b28[_0x7e7b28['length']-0x1],_0x2e61a7=_0x8f6a93['split']('.')[0x1];return _0x2893f3['fetch'](_0x2827de['href'])['then'](_0x352658=>_0x352658['clone']()['blob']())['then'](_0x4091fc=>new _0x2893f3['File']([_0x4091fc],_0x8f6a93,{'type':'image/'+_0x2e61a7}));}}class Q extends _0x1322bd{['imageEditController'];static get['requires'](){return[_0x6efc3];}['_isEditable'];constructor(_0x131245){super(_0x131245),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x2f048b){const _0x1a0000=z(_0x2f048b);return _0x331a70=>!(!_0x331a70||!_0x331a70['is']('element','imageBlock')&&!_0x331a70['is']('element','imageInline'))&&(!!_0x331a70['hasAttribute']('uploadcareImageId')||!!_0x331a70['hasAttribute']('src')&&_0x1a0000(_0x331a70['getAttribute']('src')));}(_0x131245['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x446ac5=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x446ac5);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x344ea3=this['editor']['model']['document']['selection']['getSelectedElement']();_0x344ea3&&(_0x344ea3['is']('element','imageBlock')||_0x344ea3['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x6efc3),_0x344ea3),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x1322bd{['refresh'](){const _0x3d3431=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3d3431&&(_0x3d3431['is']('element','imageBlock')||_0x3d3431['is']('element','imageInline')));}['execute'](_0x284471){const _0x21347d=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x3171af=>{_0x3171af['setAttributes'](_0x284471,_0x21347d),_0x3171af['removeAttribute']('srcset',_0x21347d),_0x3171af['removeAttribute']('sizes',_0x21347d);});}}class m extends _0x511535{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x54b827,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x239f7e}=this;_0x239f7e['commands']['add']('uploadcareImageEdit',new Q(_0x239f7e)),_0x239f7e['commands']['add']('uploadcareImageReplace',new V(_0x239f7e));}}class g extends _0x511535{['_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 _0x54a79c=this['editor'];_0x54a79c['ui']['componentFactory']['add']('uploadcareImageEdit',_0x358f24=>{const _0x1c1508=_0x54a79c['commands']['get']('uploadcareImageEdit'),_0x4217a8=new _0x5bb4bc(_0x358f24),t=_0x358f24['t'];return _0x4217a8['set']({'icon':_0x3bb4ea,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x4217a8['bind']('isEnabled')['to'](_0x1c1508),_0x4217a8['bind']('isOn')['to'](_0x1c1508,'isActive'),this['listenTo'](_0x4217a8,'execute',()=>{_0x54a79c['execute']('uploadcareImageEdit'),_0x54a79c['editing']['view']['focus']();}),_0x4217a8;}),this['_initConfig']();}['_initConfig'](){const _0x2019f8=_0x3eb04a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x2019f8),this['listenTo'](this['editor'],'destroy',()=>{_0x2019f8['remove']();});}}class et extends _0x511535{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "46.0.1-alpha.
|
|
3
|
+
"version": "46.0.1-alpha.4",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "46.0.1-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "46.0.1-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-image": "46.0.1-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "46.0.1-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "46.0.1-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "46.0.1-alpha.
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "46.0.1-alpha.
|
|
33
|
-
"ckeditor5": "46.0.1-alpha.
|
|
26
|
+
"@ckeditor/ckeditor5-core": "46.0.1-alpha.4",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "46.0.1-alpha.4",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "46.0.1-alpha.4",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "46.0.1-alpha.4",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "46.0.1-alpha.4",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "46.0.1-alpha.4",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "46.0.1-alpha.4",
|
|
33
|
+
"ckeditor5": "46.0.1-alpha.4",
|
|
34
34
|
"@uploadcare/file-uploader": "1.17.1",
|
|
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 _0x441a(){const _0x3b233b=['locale','uploadcareImageReplace','_initCtx','uploadcare','execute','uploadcareImageId','destroy','fromCharCode','1271413dxHKrl','insertImage','\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','2128458xNpQSZ','8336846WuvAQT','3170292ZlWEgS','6186orAnkH','afterInit','input[uploadcare-file-input]','view','closeMax','config','iconHrefResolver','uc-upload-ctx-provider','_initConversion','join','configElement','map','downcast','uploadcare.uploader','isOfficialPlugin','schema','_initConfig','ctxElement','add','remove','get','#uc-icon-arrow-down','body','document','listenTo','extend','uc-config','querySelector','appendChild','data-uc-image-id','_initImageProcessingIndicator','imageInline','href','72jQXKOU','isRegistered','init','3398310OpthVC','editing','conversion','commands','ucContextId','getAttribute','elementToAttribute','editor','attributeToAttribute','uploadcare.pubkey','cleanupImage','PictureEditing','_configElement','8CInLLm','contentLanguage','pluginName','uploader-','_initSchema','removeAttribute','model','getSelectedElement','_ctxElement','selection','for','imageBlock','upcast','requires','once','UploadcareEditing','true','render','351963qtbIOk','isPremiumPlugin','replaceImageSource'];_0x441a=function(){return _0x3b233b;};return _0x441a();}const _0x4404fd=_0x4894;function _0x4894(_0x3260a0,_0x35ba6f){const _0x441ae1=_0x441a();return _0x4894=function(_0x489434,_0x413536){_0x489434=_0x489434-0xd7;let _0x420af9=_0x441ae1[_0x489434];return _0x420af9;},_0x4894(_0x3260a0,_0x35ba6f);}(function(_0x164b4c,_0xcd7188){const _0x2cc1e2=_0x4894,_0x106bf8=_0x164b4c();while(!![]){try{const _0x455718=parseInt(_0x2cc1e2(0xdb))/0x1+parseInt(_0x2cc1e2(0x102))/0x2*(parseInt(_0x2cc1e2(0xe1))/0x3)+parseInt(_0x2cc1e2(0xe0))/0x4+-parseInt(_0x2cc1e2(0x105))/0x5+parseInt(_0x2cc1e2(0xde))/0x6+parseInt(_0x2cc1e2(0xdf))/0x7*(-parseInt(_0x2cc1e2(0x112))/0x8)+parseInt(_0x2cc1e2(0x124))/0x9;if(_0x455718===_0xcd7188)break;else _0x106bf8['push'](_0x106bf8['shift']());}catch(_0x32329e){_0x106bf8['push'](_0x106bf8['shift']());}}}(_0x441a,0xa17b4));import{Plugin as _0x1d81d9}from'ckeditor5/src/core.js';import{Dialog as _0x1d1c61}from'ckeditor5/src/ui.js';import{createElement as _0x200d44,global as _0x4e4db6,uid as _0x2a4209}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x306f1f}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x5b8a33}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x2e8bc0}from'./utils/editingutils.js';export class UploadcareEditing extends _0x1d81d9{[_0x4404fd(0x111)]=null;[_0x4404fd(0x11a)]=null;static get[_0x4404fd(0x114)](){const _0x2aa16a=_0x4404fd;return _0x2aa16a(0x121);}static get[_0x4404fd(0x11f)](){const _0x40791d=_0x4404fd;return[_0x40791d(0x110),_0x5b8a33,_0x1d1c61];}static get[_0x4404fd(0xef)](){return!0x0;}static get[_0x4404fd(0x125)](){return!0x0;}[_0x4404fd(0x109)];get[_0x4404fd(0xeb)](){const _0x1a45e8=_0x4404fd;return this[_0x1a45e8(0x111)];}get[_0x4404fd(0xf2)](){const _0x53d7d9=_0x4404fd;return this[_0x53d7d9(0x11a)];}constructor(_0x3468c3){const _0x30ac32=_0x4404fd;super(_0x3468c3),this[_0x30ac32(0x109)]=_0x2a4209();}[_0x4404fd(0x104)](){const _0x1051a7=_0x4404fd,_0x3e07ca=this[_0x1051a7(0x10c)];_0x3e07ca[_0x1051a7(0x108)][_0x1051a7(0xf3)](_0x1051a7(0x12a),new _0x306f1f(_0x3e07ca));}[_0x4404fd(0xe2)](){const _0x43626d=_0x4404fd;this[_0x43626d(0x116)](),this[_0x43626d(0xe9)](),this[_0x43626d(0xf1)](),this[_0x43626d(0x129)](),this[_0x43626d(0xff)](),this[_0x43626d(0xf9)](this[_0x43626d(0x10c)],_0x43626d(0xd9),()=>{const _0x4df8e7=_0x43626d;this[_0x4df8e7(0x111)]&&(this[_0x4df8e7(0x111)][_0x4df8e7(0xf4)](),this[_0x4df8e7(0x111)]=null),this[_0x4df8e7(0x11a)]&&(this[_0x4df8e7(0x11a)][_0x4df8e7(0xf4)](),this[_0x4df8e7(0x11a)]=null);const _0x33cfef=_0x4e4db6[_0x4df8e7(0xf8)][_0x4df8e7(0xfc)](_0x4df8e7(0xe3));_0x33cfef&&_0x33cfef[_0x4df8e7(0xf4)]();}),async function(_0x17c066){const _0x20fa56=_0x53e55d([0x72,0x51,0x4d,0x64,0x61,0x78,0x4f,0x77,0x33,0x6e,0x65,0x6a,0x39,0x52,0x63,0x71,0x30,0x57,0x43,0x4e,0x38,0x42,0x7a,0x34,0x70,0x68,0x73,0x79,0x4a,0x5a,0x6d,0x67,0x6f,0x36,0x4b,0x54,0x50,0x55,0x35,0x48,0x66,0x56,0x31,0x58,0x69,0x75,0x4c,0x53,0x6b,0x76,0x41,0x37,0x6c,0x62,0x74,0x32,0x49,0x46,0x47,0x44,0x45,0x59]),_0x514a0c=0x3f6883ea,_0x23b847=0x3f6fecba^_0x514a0c,_0x5bccfa=window[_0x53e55d([0x44,0x61,0x74,0x65])][_0x53e55d([0x6e,0x6f,0x77])](),_0x42ee44=_0x17c066[_0x53e55d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x494148=new window[(_0x53e55d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x179f81=>{_0x42ee44[_0x53e55d([0x6f,0x6e,0x63,0x65])](_0x53e55d([0x72,0x65,0x61,0x64,0x79]),_0x179f81);}),_0xd57589={[_0x53e55d([0x6b,0x74,0x79])]:_0x53e55d([0x45,0x43]),[_0x53e55d([0x75,0x73,0x65])]:_0x53e55d([0x73,0x69,0x67]),[_0x53e55d([0x63,0x72,0x76])]:_0x53e55d([0x50,0x2d,0x32,0x35,0x36]),[_0x53e55d([0x78])]:_0x53e55d([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]),[_0x53e55d([0x79])]:_0x53e55d([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]),[_0x53e55d([0x61,0x6c,0x67])]:_0x53e55d([0x45,0x53,0x32,0x35,0x36])},_0x540f58=_0x42ee44[_0x53e55d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x53e55d([0x67,0x65,0x74])](_0x53e55d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x55f508(){let _0x20adb4,_0x227131=null,_0x2ea83f=null;try{if(_0x540f58==_0x53e55d([0x47,0x50,0x4c]))return _0x53e55d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x20adb4=_0xe3b7b(),!_0x20adb4)return _0x53e55d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x20adb4[_0x53e55d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2ea83f=_0x503ecd(_0x20adb4[_0x53e55d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x20adb4[_0x53e55d([0x6a,0x74,0x69])])),await _0x1eeb0c()?_0x19aefe()?_0x4aa36f()?_0x53e55d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1ac17b()?(_0x20adb4[_0x53e55d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x53e55d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x227131=_0x5afc24(_0x53e55d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x20adb4[_0x53e55d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x53e55d([0x74,0x72,0x69,0x61,0x6c])&&(_0x227131=_0x5afc24(_0x53e55d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2e4b21()):_0x53e55d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x53e55d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x53e55d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x53e55d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4aa36f(){const _0x4b27c1=[_0x53e55d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x53e55d([0x74,0x72,0x69,0x61,0x6c])][_0x53e55d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x20adb4[_0x53e55d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5bccfa/0x3e8:0xe10*_0x23b847;return _0x20adb4[_0x53e55d([0x65,0x78,0x70])]<_0x4b27c1;}function _0x19aefe(){const _0x1b21f7=_0x20adb4[_0x53e55d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1b21f7&&(!!_0x1b21f7[_0x53e55d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x53e55d([0x2a]))||!!_0x1b21f7[_0x53e55d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x53e55d([0x55,0x50,0x4c,0x43])));}function _0x1ac17b(){const _0xb91ed1=_0x4894,_0x13ccc6=_0x20adb4[_0x53e55d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x13ccc6||0x0==_0x13ccc6[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5c2214}=new URL(window[_0x53e55d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0xb91ed1(0x101)]);if(_0x13ccc6[_0x53e55d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c2214))return!0x0;const _0x239ec6=_0x5c2214[_0x53e55d([0x73,0x70,0x6c,0x69,0x74])](_0x53e55d([0x2e]));return _0x13ccc6[_0x53e55d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x208fa2=>_0x208fa2[_0x53e55d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x53e55d([0x2a])))[_0x53e55d([0x6d,0x61,0x70])](_0x32d1db=>_0x32d1db[_0x53e55d([0x73,0x70,0x6c,0x69,0x74])](_0x53e55d([0x2e])))[_0x53e55d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x6037e0=>_0x6037e0[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x239ec6[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x53e55d([0x6d,0x61,0x70])](_0x4e259b=>Array(_0x239ec6[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4e259b[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x53e55d([0x66,0x69,0x6c,0x6c])](_0x4e259b[0x0]===_0x53e55d([0x2a])?_0x53e55d([0x2a]):'')[_0x53e55d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4e259b))[_0x53e55d([0x73,0x6f,0x6d,0x65])](_0x23c131=>_0x239ec6[_0x53e55d([0x65,0x76,0x65,0x72,0x79])]((_0x4484d5,_0x6f3a)=>_0x23c131[_0x6f3a]===_0x4484d5||_0x23c131[_0x6f3a]===_0x53e55d([0x2a])));}function _0x2e4b21(){return _0x227131&&_0x2ea83f?new window[(_0x53e55d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x47dfa7,_0x2b0604)=>{_0x227131[_0x53e55d([0x74,0x68,0x65,0x6e])](_0x47dfa7,_0x2b0604),_0x2ea83f[_0x53e55d([0x74,0x68,0x65,0x6e])](_0x218d84=>{_0x218d84!=_0x53e55d([0x56,0x61,0x6c,0x69,0x64])&&_0x47dfa7(_0x218d84);},_0x2b0604);}):_0x227131||_0x2ea83f||_0x53e55d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x503ecd(_0x590d8f,_0x34df80){return new window[(_0x53e55d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x332773=>{if(_0xe4d444())return _0x332773(_0x53e55d([0x56,0x61,0x6c,0x69,0x64]));_0x30301a(),_0x42ee44[_0x53e55d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x53e55d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x10bf83=!0x1;const _0x499e2d=_0x2a4209();function _0x4a1d37(_0x19df08){return!!_0x19df08&&(typeof _0x19df08===_0x53e55d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x19df08===_0x53e55d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x19df08[_0x53e55d([0x74,0x68,0x65,0x6e])]===_0x53e55d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x19df08[_0x53e55d([0x63,0x61,0x74,0x63,0x68])]===_0x53e55d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x12d7c5(_0x16c148){_0x23d53d(_0x16c148)[_0x53e55d([0x74,0x68,0x65,0x6e])](_0x230d5b=>{if(!_0x230d5b||_0x230d5b[_0x53e55d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x53e55d([0x6f,0x6b]))return _0x53e55d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x446aea(_0x3839cf(_0x499e2d+_0x34df80))!=_0x230d5b[_0x53e55d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x53e55d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x53e55d([0x56,0x61,0x6c,0x69,0x64]);})[_0x53e55d([0x74,0x68,0x65,0x6e])](_0x1995bb=>(_0x5e35ef(),_0x1995bb),()=>{const _0x38b4b4=_0x292013();return null==_0x38b4b4?(_0x5e35ef(),_0x53e55d([0x56,0x61,0x6c,0x69,0x64])):_0x53e55d(_0x5bccfa-_0x38b4b4>(0x1b6407ea^_0x514a0c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x53e55d([0x74,0x68,0x65,0x6e])](_0x332773)[_0x53e55d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x332773(_0x53e55d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5a9c95=0x3f5e6d6a^_0x514a0c;function _0x5e35ef(){const _0x285b29=_0x53e55d([0x6c,0x6c,0x63,0x74,0x2d])+_0x446aea(_0x3839cf(_0x590d8f)),_0x594eff=_0x65e589(_0x446aea(window[_0x53e55d([0x4d,0x61,0x74,0x68])][_0x53e55d([0x63,0x65,0x69,0x6c])](_0x5bccfa/_0x5a9c95)));window[_0x53e55d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x53e55d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x285b29,_0x594eff);}function _0x292013(){const _0x46ce08=_0x53e55d([0x6c,0x6c,0x63,0x74,0x2d])+_0x446aea(_0x3839cf(_0x590d8f)),_0x54f447=window[_0x53e55d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x53e55d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46ce08);return _0x54f447?window[_0x53e55d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x65e589(_0x54f447),0x10)*_0x5a9c95:null;}function _0x23d53d(_0x5456cc){return new window[(_0x53e55d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa4ab3b,_0x390514)=>{_0x5456cc[_0x53e55d([0x74,0x68,0x65,0x6e])](_0xa4ab3b,_0x390514),window[_0x53e55d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x390514,0x3f69572a^_0x514a0c);});}}_0x42ee44[_0x53e55d([0x6f,0x6e])](_0x53e55d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4a2a04,_0x45777f)=>{if(_0x45777f[0x0]!=_0x590d8f)return _0x332773(_0x53e55d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x45777f[0x1]={..._0x45777f[0x1],[_0x53e55d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x499e2d};},{[_0x53e55d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x53e55d([0x68,0x69,0x67,0x68])}),_0x42ee44[_0x53e55d([0x6f,0x6e])](_0x53e55d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2f7e74=>{_0x4a1d37(_0x2f7e74[_0x53e55d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x10bf83=!0x0,_0x12d7c5(_0x2f7e74[_0x53e55d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x53e55d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x53e55d([0x6c,0x6f,0x77])}),_0x494148[_0x53e55d([0x74,0x68,0x65,0x6e])](()=>{_0x10bf83||_0x332773(_0x53e55d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xe4d444(){return _0x42ee44[_0x53e55d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x53e55d([0x76,0x69,0x65,0x77])][_0x53e55d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x53e55d([0x61,0x75,0x74,0x6f]);}function _0x30301a(){_0x42ee44[_0x53e55d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x53e55d([0x76,0x69,0x65,0x77])][_0x53e55d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x53e55d([0x61,0x75,0x74,0x6f]);}}function _0x5afc24(_0x5e456a){const _0x4d967f=[new window[(_0x53e55d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf0abae=>setTimeout(_0xf0abae,0x3f61bd26^_0x514a0c)),_0x494148[_0x53e55d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x53e55d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d91c0=>{let _0x475cf4=0x0;_0x42ee44[_0x53e55d([0x6d,0x6f,0x64,0x65,0x6c])][_0x53e55d([0x6f,0x6e])](_0x53e55d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1fb018,_0xbc359c)=>{_0xbc359c[0x0][_0x53e55d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x475cf4++,_0x475cf4==(0x3f688212^_0x514a0c)&&(_0x5d91c0(),_0x1fb018[_0x53e55d([0x6f,0x66,0x66])]());});}))];return window[_0x53e55d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x53e55d([0x72,0x61,0x63,0x65])](_0x4d967f)[_0x53e55d([0x74,0x68,0x65,0x6e])](()=>_0x5e456a);}async function _0x523cef(){await _0x494148,_0x42ee44[_0x53e55d([0x6d,0x6f,0x64,0x65,0x6c])][_0x53e55d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x567023,_0x42ee44[_0x53e55d([0x6d,0x6f,0x64,0x65,0x6c])][_0x53e55d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x567023,_0x42ee44[_0x53e55d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x53e55d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x143412(_0x559f59){const _0x225be1=_0x1a8f00();_0x42ee44[_0x225be1]=_0x53e55d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x559f59,_0x559f59!=_0x53e55d([0x56,0x61,0x6c,0x69,0x64])&&_0x523cef();}function _0x1a8f00(){const _0x5684c2=window[_0x53e55d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x53e55d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x53e55d([0x6e,0x6f,0x77])]())[_0x53e55d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x53e55d([0x2e]),'');let _0x562fe5=_0x53e55d([0x72]);for(let _0x5b13f8=0x0;_0x5b13f8<_0x5684c2[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5b13f8+=0x2){let _0x53ad73=window[_0x53e55d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5684c2[_0x53e55d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b13f8,_0x5b13f8+0x2));_0x53ad73>=_0x20fa56[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x53ad73-=_0x20fa56[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x562fe5+=_0x20fa56[_0x53ad73];}return _0x562fe5;}function _0xe3b7b(){const _0x1f82f8=_0x540f58[_0x53e55d([0x73,0x70,0x6c,0x69,0x74])](_0x53e55d([0x2e]));if(0x3!=_0x1f82f8[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x545718(_0x1f82f8[0x1]);function _0x545718(_0x3723c8){const _0x4e8215=_0x118f4f(_0x3723c8);return _0x4e8215&&_0x357922()?_0x4e8215:null;function _0x357922(){const _0x4a7518=_0x4e8215[_0x53e55d([0x6a,0x74,0x69])],_0x4cf968=window[_0x53e55d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4a7518[_0x53e55d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4a7518[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x27944c={..._0x4e8215,[_0x53e55d([0x6a,0x74,0x69])]:_0x4a7518[_0x53e55d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4a7518[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x27944c[_0x53e55d([0x76,0x63])],_0x3839cf(_0x27944c)==_0x4cf968;}}}async function _0x1eeb0c(){let _0x57ca57=!0x0;try{const _0x15f5d5=_0x540f58[_0x53e55d([0x73,0x70,0x6c,0x69,0x74])](_0x53e55d([0x2e])),[_0x3657b5,_0x3df25d,_0x2247bb]=_0x15f5d5;return _0xd6e75b(_0x3657b5),await _0x24e966(_0x3657b5,_0x3df25d,_0x2247bb),_0x57ca57;}catch{return!0x1;}function _0xd6e75b(_0x3d01b8){const _0x149d66=_0x118f4f(_0x3d01b8);_0x149d66&&_0x149d66[_0x53e55d([0x61,0x6c,0x67])]==_0x53e55d([0x45,0x53,0x32,0x35,0x36])||(_0x57ca57=!0x1);}async function _0x24e966(_0x5aeb7b,_0x42ef7f,_0xfea089){const _0x242e1a=window[_0x53e55d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x53e55d([0x66,0x72,0x6f,0x6d])](_0x36acf4(_0xfea089),_0x1e8646=>_0x1e8646[_0x53e55d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2fe1ac=new window[(_0x53e55d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x53e55d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5aeb7b+_0x53e55d([0x2e])+_0x42ef7f),_0x51af36=window[_0x53e55d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x53e55d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x51af36)return;const _0x439827=await _0x51af36[_0x53e55d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x53e55d([0x6a,0x77,0x6b]),_0xd57589,{[_0x53e55d([0x6e,0x61,0x6d,0x65])]:_0x53e55d([0x45,0x43,0x44,0x53,0x41]),[_0x53e55d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x53e55d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x53e55d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x51af36[_0x53e55d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x53e55d([0x6e,0x61,0x6d,0x65])]:_0x53e55d([0x45,0x43,0x44,0x53,0x41]),[_0x53e55d([0x68,0x61,0x73,0x68])]:{[_0x53e55d([0x6e,0x61,0x6d,0x65])]:_0x53e55d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x439827,_0x242e1a,_0x2fe1ac)||(_0x57ca57=!0x1);}}function _0x118f4f(_0x55fe44){return _0x55fe44[_0x53e55d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x53e55d([0x65,0x79]))?JSON[_0x53e55d([0x70,0x61,0x72,0x73,0x65])](_0x36acf4(_0x55fe44)):null;}function _0x36acf4(_0x3ec4ef){return window[_0x53e55d([0x61,0x74,0x6f,0x62])](_0x3ec4ef[_0x53e55d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x53e55d([0x2b]))[_0x53e55d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x53e55d([0x2f])));}function _0x3839cf(_0x50d1a2){let _0x4e54d5=0x1505;function _0xc4f12c(_0x319381){for(let _0x3b2e9a=0x0;_0x3b2e9a<_0x319381[_0x53e55d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b2e9a++){const _0x380b7e=_0x319381[_0x53e55d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3b2e9a);_0x4e54d5=(_0x4e54d5<<0x5)+_0x4e54d5+_0x380b7e,_0x4e54d5&=_0x4e54d5;}}function _0x47455a(_0x611a4f){Array[_0x53e55d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x611a4f)?_0x611a4f[_0x53e55d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x47455a):_0x611a4f&&typeof _0x611a4f==_0x53e55d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x53e55d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x611a4f)[_0x53e55d([0x73,0x6f,0x72,0x74])]()[_0x53e55d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x10551f,_0x32b038])=>{_0xc4f12c(_0x10551f),_0x47455a(_0x32b038);}):_0xc4f12c(window[_0x53e55d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x611a4f));}return _0x47455a(_0x50d1a2),_0x4e54d5>>>0x0;}function _0x446aea(_0x5b60cb){return _0x5b60cb[_0x53e55d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x53e55d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x53e55d([0x30]));}function _0x65e589(_0xd8c712){return _0xd8c712[_0x53e55d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x53e55d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x53e55d([0x6a,0x6f,0x69,0x6e])]('');}function _0x567023(){}function _0x53e55d(_0x19a105){const _0x5612ee=_0x4894;return _0x19a105[_0x5612ee(0xec)](_0xac49e7=>String[_0x5612ee(0xda)](_0xac49e7))[_0x5612ee(0xea)]('');}_0x143412(await _0x55f508());}(this);}[_0x4404fd(0x116)](){const _0x1f7b2c=_0x4404fd,_0x6117f=this[_0x1f7b2c(0x10c)][_0x1f7b2c(0x118)][_0x1f7b2c(0xf0)];_0x6117f[_0x1f7b2c(0x103)](_0x1f7b2c(0x11d))&&_0x6117f[_0x1f7b2c(0xfa)](_0x1f7b2c(0x11d),{'allowAttributes':[_0x1f7b2c(0xd8)]}),_0x6117f[_0x1f7b2c(0x103)](_0x1f7b2c(0x100))&&_0x6117f[_0x1f7b2c(0xfa)](_0x1f7b2c(0x100),{'allowAttributes':[_0x1f7b2c(0xd8)]});}[_0x4404fd(0xe9)](){const _0x46fd7c=_0x4404fd,_0x38c5f9=this[_0x46fd7c(0x10c)];_0x38c5f9[_0x46fd7c(0x107)][_0x46fd7c(0x11c)](_0x46fd7c(0xed))[_0x46fd7c(0x10d)]({'model':_0x46fd7c(0xd8),'view':_0x46fd7c(0xfe)}),_0x38c5f9[_0x46fd7c(0x107)][_0x46fd7c(0x11c)](_0x46fd7c(0x11e))[_0x46fd7c(0x10b)]({'model':{'key':_0x46fd7c(0xd8),'value':_0x1eee50=>_0x1eee50[_0x46fd7c(0x10a)](_0x46fd7c(0xfe))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x11c393=_0x38c5f9[_0x46fd7c(0x108)][_0x46fd7c(0xf5)](_0x46fd7c(0x126));_0x11c393&&this[_0x46fd7c(0xf9)](_0x11c393,_0x46fd7c(0x10f),(_0x2f4da1,[_0xcd3dbd,_0x35df33])=>{const _0x30a747=_0x46fd7c;_0xcd3dbd[_0x30a747(0x117)](_0x30a747(0xd8),_0x35df33);});}[_0x4404fd(0xf1)](){const _0x449da2=_0x4404fd,_0x3fd676=this[_0x449da2(0x10c)][_0x449da2(0xe6)][_0x449da2(0xf5)](_0x449da2(0xee))||{},_0x54e133=this[_0x449da2(0x10c)][_0x449da2(0xe6)][_0x449da2(0xf5)](_0x449da2(0x10e))||'';this[_0x449da2(0x111)]=_0x200d44(_0x4e4db6[_0x449da2(0xf8)],_0x449da2(0xfb),{..._0x3fd676,'pubkey':_0x54e133,'ctx-name':_0x449da2(0x115)+this[_0x449da2(0x109)],'sourceList':'','imgOnly':_0x449da2(0x122),'removeCopyright':_0x449da2(0x122),'localeName':this[_0x449da2(0x10c)][_0x449da2(0x127)][_0x449da2(0x113)],'externalSourcesEmbedCss':_0x449da2(0xdd)}),this[_0x449da2(0x111)][_0x449da2(0xe7)]=_0x483e53=>{const _0x2485d9=_0x449da2;if(_0x2485d9(0xe5)==_0x483e53)return _0x2485d9(0xf6);},_0x4e4db6[_0x449da2(0xf8)][_0x449da2(0xf7)][_0x449da2(0xfd)](this[_0x449da2(0x111)]);}[_0x4404fd(0x129)](){const _0x105cd1=_0x4404fd;this[_0x105cd1(0x11a)]=_0x200d44(_0x4e4db6[_0x105cd1(0xf8)],_0x105cd1(0xe8),{'ctx-name':_0x105cd1(0x115)+this[_0x105cd1(0x109)]}),_0x4e4db6[_0x105cd1(0xf8)][_0x105cd1(0xf7)][_0x105cd1(0xfd)](this[_0x105cd1(0x11a)]);}[_0x4404fd(0xff)](){const _0x5aad8b=_0x4404fd,_0xc42e30=this[_0x5aad8b(0x10c)][_0x5aad8b(0x108)][_0x5aad8b(0xf5)](_0x5aad8b(0xdc));_0xc42e30&&this[_0x5aad8b(0xf9)](_0xc42e30,_0x5aad8b(0xd7),()=>{const _0x2ea38b=_0x5aad8b,_0x5d068f=this[_0x2ea38b(0x10c)][_0x2ea38b(0x118)][_0x2ea38b(0xf8)][_0x2ea38b(0x11b)][_0x2ea38b(0x119)]();_0x5d068f&&_0x5d068f[_0x2ea38b(0x10a)](_0x2ea38b(0xd8))&&this[_0x2ea38b(0x10c)][_0x2ea38b(0x106)][_0x2ea38b(0xe4)][_0x2ea38b(0x120)](_0x2ea38b(0x123),()=>{const _0x8f484e=_0x2ea38b;_0x2e8bc0(this[_0x8f484e(0x10c)],_0x5d068f);});});const _0xca6c7b=this[_0x5aad8b(0x10c)][_0x5aad8b(0x108)][_0x5aad8b(0xf5)](_0x5aad8b(0x128));_0xca6c7b&&this[_0x5aad8b(0xf9)](_0xca6c7b,_0x5aad8b(0xd7),()=>{const _0x2e4b37=_0x5aad8b,_0x1485cb=this[_0x2e4b37(0x10c)][_0x2e4b37(0x118)][_0x2e4b37(0xf8)][_0x2e4b37(0x11b)][_0x2e4b37(0x119)]();_0x1485cb&&_0x1485cb[_0x2e4b37(0x10a)](_0x2e4b37(0xd8))&&this[_0x2e4b37(0x10c)][_0x2e4b37(0x106)][_0x2e4b37(0xe4)][_0x2e4b37(0x120)](_0x2e4b37(0x123),()=>{const _0x5c51f1=_0x2e4b37;_0x2e8bc0(this[_0x5c51f1(0x10c)],_0x1485cb);});});}}
|
|
23
|
+
const _0x4854e2=_0x3057;(function(_0x28043d,_0x8961bf){const _0x324c08=_0x3057,_0x5bd402=_0x28043d();while(!![]){try{const _0x50ef11=parseInt(_0x324c08(0x15c))/0x1+parseInt(_0x324c08(0x15e))/0x2*(parseInt(_0x324c08(0x190))/0x3)+parseInt(_0x324c08(0x176))/0x4+-parseInt(_0x324c08(0x14c))/0x5*(-parseInt(_0x324c08(0x171))/0x6)+parseInt(_0x324c08(0x175))/0x7+parseInt(_0x324c08(0x15d))/0x8*(-parseInt(_0x324c08(0x160))/0x9)+-parseInt(_0x324c08(0x166))/0xa*(-parseInt(_0x324c08(0x19f))/0xb);if(_0x50ef11===_0x8961bf)break;else _0x5bd402['push'](_0x5bd402['shift']());}catch(_0xc48cf5){_0x5bd402['push'](_0x5bd402['shift']());}}}(_0x3b4d,0x84e33));import{Plugin as _0x2b6fd1}from'ckeditor5/src/core.js';import{Dialog as _0x21942a}from'ckeditor5/src/ui.js';function _0x3057(_0x4444bc,_0x3d1817){const _0x3b4d83=_0x3b4d();return _0x3057=function(_0x30578b,_0x1a9546){_0x30578b=_0x30578b-0x14a;let _0x5e1861=_0x3b4d83[_0x30578b];return _0x5e1861;},_0x3057(_0x4444bc,_0x3d1817);}import{createElement as _0x2f6253,global as _0x197197,uid as _0x5c5c6a}from'ckeditor5/src/utils.js';function _0x3b4d(){const _0x340736=['PictureEditing','pluginName','_ctxElement','isOfficialPlugin','init','document','_initConfig','schema','cleanupImage','11fVrJiL','uc-config','elementToAttribute','39815fFPpbs','uploadcareImageId','isPremiumPlugin','imageInline','uploadcare.pubkey','configElement','requires','replaceImageSource','iconHrefResolver','attributeToAttribute','contentLanguage','get','imageBlock','ctxElement','config','true','211764tlXxVx','928TnLsEk','930040UgfHRW','_initConversion','55089mmMKRy','uploadcare','execute','_initImageProcessingIndicator','_initCtx','once','1623530IAhilL','commands','join','_configElement','upcast','fromCharCode','input[uploadcare-file-input]','render','\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','data-uc-image-id','getAttribute','210HNCQWW','removeAttribute','afterInit','model','229509pWvjGb','414856eDUJlI','ucContextId','closeMax','isRegistered','getSelectedElement','querySelector','uploader-','locale','for','selection','UploadcareEditing','map','href','remove','view','downcast','conversion','#uc-icon-arrow-down','uc-upload-ctx-provider','uploadcareImageReplace','editor','uploadcare.uploader','appendChild','destroy','_initSchema','editing','3SxWaxq','add','insertImage','body','extend','listenTo'];_0x3b4d=function(){return _0x340736;};return _0x3b4d();}import{UploadcareCommand as _0x3490e0}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x185dc3}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x4aeb92}from'./utils/editingutils.js';export class UploadcareEditing extends _0x2b6fd1{[_0x4854e2(0x169)]=null;[_0x4854e2(0x198)]=null;static get[_0x4854e2(0x197)](){const _0x4949cc=_0x4854e2;return _0x4949cc(0x180);}static get[_0x4854e2(0x152)](){const _0x168c33=_0x4854e2;return[_0x168c33(0x196),_0x185dc3,_0x21942a];}static get[_0x4854e2(0x199)](){return!0x0;}static get[_0x4854e2(0x14e)](){return!0x0;}[_0x4854e2(0x177)];get[_0x4854e2(0x151)](){const _0x47396d=_0x4854e2;return this[_0x47396d(0x169)];}get[_0x4854e2(0x159)](){const _0x527d71=_0x4854e2;return this[_0x527d71(0x198)];}constructor(_0x203ce9){const _0x45fb1e=_0x4854e2;super(_0x203ce9),this[_0x45fb1e(0x177)]=_0x5c5c6a();}[_0x4854e2(0x19a)](){const _0x233aaa=_0x4854e2,_0xb74142=this[_0x233aaa(0x18a)];_0xb74142[_0x233aaa(0x167)][_0x233aaa(0x191)](_0x233aaa(0x161),new _0x3490e0(_0xb74142));}[_0x4854e2(0x173)](){const _0x1a4b1f=_0x4854e2;this[_0x1a4b1f(0x18e)](),this[_0x1a4b1f(0x15f)](),this[_0x1a4b1f(0x19c)](),this[_0x1a4b1f(0x164)](),this[_0x1a4b1f(0x163)](),this[_0x1a4b1f(0x195)](this[_0x1a4b1f(0x18a)],_0x1a4b1f(0x18d),()=>{const _0xf442f=_0x1a4b1f;this[_0xf442f(0x169)]&&(this[_0xf442f(0x169)][_0xf442f(0x183)](),this[_0xf442f(0x169)]=null),this[_0xf442f(0x198)]&&(this[_0xf442f(0x198)][_0xf442f(0x183)](),this[_0xf442f(0x198)]=null);const _0x1864d2=_0x197197[_0xf442f(0x19b)][_0xf442f(0x17b)](_0xf442f(0x16c));_0x1864d2&&_0x1864d2[_0xf442f(0x183)]();}),async function(_0x43563e){const _0x5562c2=_0x11439a([0x41,0x78,0x6f,0x45,0x62,0x39,0x6d,0x46,0x56,0x5a,0x59,0x77,0x42,0x47,0x49,0x74,0x7a,0x30,0x55,0x33,0x44,0x43,0x4e,0x65,0x63,0x4f,0x76,0x36,0x4b,0x72,0x58,0x4d,0x34,0x37,0x31,0x32,0x50,0x6e,0x68,0x70,0x75,0x6c,0x48,0x66,0x53,0x38,0x52,0x4c,0x6a,0x35,0x69,0x54,0x73,0x6b,0x64,0x67,0x57,0x79,0x61,0x71,0x51,0x4a]),_0x14fdf2=0x101a9e7e,_0x39a9a6=0x101df116^_0x14fdf2,_0x1449cd=window[_0x11439a([0x44,0x61,0x74,0x65])][_0x11439a([0x6e,0x6f,0x77])](),_0x3e6b59=_0x43563e[_0x11439a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3108d3=new window[(_0x11439a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1bce32=>{_0x3e6b59[_0x11439a([0x6f,0x6e,0x63,0x65])](_0x11439a([0x72,0x65,0x61,0x64,0x79]),_0x1bce32);}),_0x332966={[_0x11439a([0x6b,0x74,0x79])]:_0x11439a([0x45,0x43]),[_0x11439a([0x75,0x73,0x65])]:_0x11439a([0x73,0x69,0x67]),[_0x11439a([0x63,0x72,0x76])]:_0x11439a([0x50,0x2d,0x32,0x35,0x36]),[_0x11439a([0x78])]:_0x11439a([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]),[_0x11439a([0x79])]:_0x11439a([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]),[_0x11439a([0x61,0x6c,0x67])]:_0x11439a([0x45,0x53,0x32,0x35,0x36])},_0x22c6ab=_0x3e6b59[_0x11439a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x11439a([0x67,0x65,0x74])](_0x11439a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4b9d48(){let _0x3c46a4,_0x5a015d=null,_0x4a0492=null;try{if(_0x22c6ab==_0x11439a([0x47,0x50,0x4c]))return _0x11439a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3c46a4=_0x2ebf81(),!_0x3c46a4)return _0x11439a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3c46a4[_0x11439a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4a0492=_0x2841b5(_0x3c46a4[_0x11439a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3c46a4[_0x11439a([0x6a,0x74,0x69])])),await _0x4004b7()?_0x2cd789()?_0x3ac201()?_0x11439a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1b08a4()?(_0x3c46a4[_0x11439a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x11439a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5a015d=_0x438bfe(_0x11439a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3c46a4[_0x11439a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x11439a([0x74,0x72,0x69,0x61,0x6c])&&(_0x5a015d=_0x438bfe(_0x11439a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5b6274()):_0x11439a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x11439a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x11439a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x11439a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3ac201(){const _0x20412c=[_0x11439a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x11439a([0x74,0x72,0x69,0x61,0x6c])][_0x11439a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c46a4[_0x11439a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1449cd/0x3e8:0xe10*_0x39a9a6;return _0x3c46a4[_0x11439a([0x65,0x78,0x70])]<_0x20412c;}function _0x2cd789(){const _0x352a6f=_0x3c46a4[_0x11439a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x352a6f&&(!!_0x352a6f[_0x11439a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11439a([0x2a]))||!!_0x352a6f[_0x11439a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11439a([0x55,0x50,0x4c,0x43])));}function _0x1b08a4(){const _0x11539e=_0x3057,_0x3f8d36=_0x3c46a4[_0x11439a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3f8d36||0x0==_0x3f8d36[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4c49bf}=new URL(window[_0x11439a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x11539e(0x182)]);if(_0x3f8d36[_0x11439a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c49bf))return!0x0;const _0x369eb1=_0x4c49bf[_0x11439a([0x73,0x70,0x6c,0x69,0x74])](_0x11439a([0x2e]));return _0x3f8d36[_0x11439a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x33527c=>_0x33527c[_0x11439a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11439a([0x2a])))[_0x11439a([0x6d,0x61,0x70])](_0x1d662a=>_0x1d662a[_0x11439a([0x73,0x70,0x6c,0x69,0x74])](_0x11439a([0x2e])))[_0x11439a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x42743e=>_0x42743e[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x369eb1[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x11439a([0x6d,0x61,0x70])](_0xb06069=>Array(_0x369eb1[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xb06069[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x11439a([0x66,0x69,0x6c,0x6c])](_0xb06069[0x0]===_0x11439a([0x2a])?_0x11439a([0x2a]):'')[_0x11439a([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xb06069))[_0x11439a([0x73,0x6f,0x6d,0x65])](_0x5215c6=>_0x369eb1[_0x11439a([0x65,0x76,0x65,0x72,0x79])]((_0x436d03,_0x4a84b0)=>_0x5215c6[_0x4a84b0]===_0x436d03||_0x5215c6[_0x4a84b0]===_0x11439a([0x2a])));}function _0x5b6274(){return _0x5a015d&&_0x4a0492?new window[(_0x11439a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1bfe7d,_0x443cbc)=>{_0x5a015d[_0x11439a([0x74,0x68,0x65,0x6e])](_0x1bfe7d,_0x443cbc),_0x4a0492[_0x11439a([0x74,0x68,0x65,0x6e])](_0x58b51c=>{_0x58b51c!=_0x11439a([0x56,0x61,0x6c,0x69,0x64])&&_0x1bfe7d(_0x58b51c);},_0x443cbc);}):_0x5a015d||_0x4a0492||_0x11439a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2841b5(_0x796be2,_0x54cc65){return new window[(_0x11439a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5455b8=>{if(_0x599b99())return _0x5455b8(_0x11439a([0x56,0x61,0x6c,0x69,0x64]));_0x1f060c(),_0x3e6b59[_0x11439a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x11439a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2bd689=!0x1;const _0x2bf99b=_0x5c5c6a();function _0x53d699(_0x4f2737){return!!_0x4f2737&&(typeof _0x4f2737===_0x11439a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4f2737===_0x11439a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4f2737[_0x11439a([0x74,0x68,0x65,0x6e])]===_0x11439a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4f2737[_0x11439a([0x63,0x61,0x74,0x63,0x68])]===_0x11439a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x448b49(_0x14f6f1){_0x37fbf0(_0x14f6f1)[_0x11439a([0x74,0x68,0x65,0x6e])](_0x31ebb6=>{if(!_0x31ebb6||_0x31ebb6[_0x11439a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x11439a([0x6f,0x6b]))return _0x11439a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x554a40(_0x5664ad(_0x2bf99b+_0x54cc65))!=_0x31ebb6[_0x11439a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x11439a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x11439a([0x56,0x61,0x6c,0x69,0x64]);})[_0x11439a([0x74,0x68,0x65,0x6e])](_0x549b10=>(_0x457025(),_0x549b10),()=>{const _0x3b7c1c=_0xefa11b();return null==_0x3b7c1c?(_0x457025(),_0x11439a([0x56,0x61,0x6c,0x69,0x64])):_0x11439a(_0x1449cd-_0x3b7c1c>(0x34161a7e^_0x14fdf2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x11439a([0x74,0x68,0x65,0x6e])](_0x5455b8)[_0x11439a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5455b8(_0x11439a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4c1ffc=0x102c70fe^_0x14fdf2;function _0x457025(){const _0x427441=_0x11439a([0x6c,0x6c,0x63,0x74,0x2d])+_0x554a40(_0x5664ad(_0x796be2)),_0x4f0df1=_0x4014dc(_0x554a40(window[_0x11439a([0x4d,0x61,0x74,0x68])][_0x11439a([0x63,0x65,0x69,0x6c])](_0x1449cd/_0x4c1ffc)));window[_0x11439a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x11439a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x427441,_0x4f0df1);}function _0xefa11b(){const _0x1dc903=_0x11439a([0x6c,0x6c,0x63,0x74,0x2d])+_0x554a40(_0x5664ad(_0x796be2)),_0x1faf29=window[_0x11439a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x11439a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1dc903);return _0x1faf29?window[_0x11439a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4014dc(_0x1faf29),0x10)*_0x4c1ffc:null;}function _0x37fbf0(_0xe27790){return new window[(_0x11439a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4bbcd3,_0x404882)=>{_0xe27790[_0x11439a([0x74,0x68,0x65,0x6e])](_0x4bbcd3,_0x404882),window[_0x11439a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x404882,0x101b4abe^_0x14fdf2);});}}_0x3e6b59[_0x11439a([0x6f,0x6e])](_0x11439a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4c7dbf,_0x5a32a4)=>{if(_0x5a32a4[0x0]!=_0x796be2)return _0x5455b8(_0x11439a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5a32a4[0x1]={..._0x5a32a4[0x1],[_0x11439a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2bf99b};},{[_0x11439a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x11439a([0x68,0x69,0x67,0x68])}),_0x3e6b59[_0x11439a([0x6f,0x6e])](_0x11439a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1a1524=>{_0x53d699(_0x1a1524[_0x11439a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2bd689=!0x0,_0x448b49(_0x1a1524[_0x11439a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x11439a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x11439a([0x6c,0x6f,0x77])}),_0x3108d3[_0x11439a([0x74,0x68,0x65,0x6e])](()=>{_0x2bd689||_0x5455b8(_0x11439a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x599b99(){return _0x3e6b59[_0x11439a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x11439a([0x76,0x69,0x65,0x77])][_0x11439a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x11439a([0x61,0x75,0x74,0x6f]);}function _0x1f060c(){_0x3e6b59[_0x11439a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x11439a([0x76,0x69,0x65,0x77])][_0x11439a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x11439a([0x61,0x75,0x74,0x6f]);}}function _0x438bfe(_0x111416){const _0x3577a7=[new window[(_0x11439a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15e94a=>setTimeout(_0x15e94a,0x1013a0b2^_0x14fdf2)),_0x3108d3[_0x11439a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x11439a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc9c7f=>{let _0x215e47=0x0;_0x3e6b59[_0x11439a([0x6d,0x6f,0x64,0x65,0x6c])][_0x11439a([0x6f,0x6e])](_0x11439a([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1fd53,_0x56dd38)=>{_0x56dd38[0x0][_0x11439a([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x215e47++,_0x215e47==(0x101a9f86^_0x14fdf2)&&(_0xc9c7f(),_0x1fd53[_0x11439a([0x6f,0x66,0x66])]());});}))];return window[_0x11439a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x11439a([0x72,0x61,0x63,0x65])](_0x3577a7)[_0x11439a([0x74,0x68,0x65,0x6e])](()=>_0x111416);}async function _0x4e6f65(){await _0x3108d3,_0x3e6b59[_0x11439a([0x6d,0x6f,0x64,0x65,0x6c])][_0x11439a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3326f6,_0x3e6b59[_0x11439a([0x6d,0x6f,0x64,0x65,0x6c])][_0x11439a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3326f6,_0x3e6b59[_0x11439a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x11439a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1c631a(_0x44077a){const _0x9a65e9=_0x4c47fa();_0x3e6b59[_0x9a65e9]=_0x11439a([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x44077a,_0x44077a!=_0x11439a([0x56,0x61,0x6c,0x69,0x64])&&_0x4e6f65();}function _0x4c47fa(){const _0x335abb=window[_0x11439a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x11439a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x11439a([0x6e,0x6f,0x77])]())[_0x11439a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x11439a([0x2e]),'');let _0x3f7fa5=_0x11439a([0x41]);for(let _0x2d3cb8=0x0;_0x2d3cb8<_0x335abb[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2d3cb8+=0x2){let _0x39810a=window[_0x11439a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x335abb[_0x11439a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d3cb8,_0x2d3cb8+0x2));_0x39810a>=_0x5562c2[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x39810a-=_0x5562c2[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3f7fa5+=_0x5562c2[_0x39810a];}return _0x3f7fa5;}function _0x2ebf81(){const _0x59e8c6=_0x22c6ab[_0x11439a([0x73,0x70,0x6c,0x69,0x74])](_0x11439a([0x2e]));if(0x3!=_0x59e8c6[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2e3cd9(_0x59e8c6[0x1]);function _0x2e3cd9(_0x2d7d60){const _0x228575=_0x546e8e(_0x2d7d60);return _0x228575&&_0x536baf()?_0x228575:null;function _0x536baf(){const _0xe662a0=_0x228575[_0x11439a([0x6a,0x74,0x69])],_0x1a4325=window[_0x11439a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xe662a0[_0x11439a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xe662a0[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1cd625={..._0x228575,[_0x11439a([0x6a,0x74,0x69])]:_0xe662a0[_0x11439a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xe662a0[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1cd625[_0x11439a([0x76,0x63])],_0x5664ad(_0x1cd625)==_0x1a4325;}}}async function _0x4004b7(){let _0x2058d1=!0x0;try{const _0x18fe8e=_0x22c6ab[_0x11439a([0x73,0x70,0x6c,0x69,0x74])](_0x11439a([0x2e])),[_0x34d900,_0x2a1087,_0x182fed]=_0x18fe8e;return _0x5e39ad(_0x34d900),await _0x14822f(_0x34d900,_0x2a1087,_0x182fed),_0x2058d1;}catch{return!0x1;}function _0x5e39ad(_0x5d049e){const _0x2596a2=_0x546e8e(_0x5d049e);_0x2596a2&&_0x2596a2[_0x11439a([0x61,0x6c,0x67])]==_0x11439a([0x45,0x53,0x32,0x35,0x36])||(_0x2058d1=!0x1);}async function _0x14822f(_0xcaa3ad,_0x337ccc,_0x2c9bc1){const _0x4d4aba=window[_0x11439a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x11439a([0x66,0x72,0x6f,0x6d])](_0x514801(_0x2c9bc1),_0x3790c7=>_0x3790c7[_0x11439a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2e3c35=new window[(_0x11439a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x11439a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xcaa3ad+_0x11439a([0x2e])+_0x337ccc),_0x47d906=window[_0x11439a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x11439a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x47d906)return;const _0x128995=await _0x47d906[_0x11439a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x11439a([0x6a,0x77,0x6b]),_0x332966,{[_0x11439a([0x6e,0x61,0x6d,0x65])]:_0x11439a([0x45,0x43,0x44,0x53,0x41]),[_0x11439a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x11439a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x11439a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x47d906[_0x11439a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x11439a([0x6e,0x61,0x6d,0x65])]:_0x11439a([0x45,0x43,0x44,0x53,0x41]),[_0x11439a([0x68,0x61,0x73,0x68])]:{[_0x11439a([0x6e,0x61,0x6d,0x65])]:_0x11439a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x128995,_0x4d4aba,_0x2e3c35)||(_0x2058d1=!0x1);}}function _0x546e8e(_0x3f8dcd){return _0x3f8dcd[_0x11439a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x11439a([0x65,0x79]))?JSON[_0x11439a([0x70,0x61,0x72,0x73,0x65])](_0x514801(_0x3f8dcd)):null;}function _0x514801(_0x51232a){return window[_0x11439a([0x61,0x74,0x6f,0x62])](_0x51232a[_0x11439a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x11439a([0x2b]))[_0x11439a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x11439a([0x2f])));}function _0x5664ad(_0x2ecd68){let _0x448062=0x1505;function _0x60e69f(_0xf53780){for(let _0x4149d1=0x0;_0x4149d1<_0xf53780[_0x11439a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4149d1++){const _0x222ee5=_0xf53780[_0x11439a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4149d1);_0x448062=(_0x448062<<0x5)+_0x448062+_0x222ee5,_0x448062&=_0x448062;}}function _0x394802(_0x558528){Array[_0x11439a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x558528)?_0x558528[_0x11439a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x394802):_0x558528&&typeof _0x558528==_0x11439a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x11439a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x558528)[_0x11439a([0x73,0x6f,0x72,0x74])]()[_0x11439a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9697d0,_0x24f4b4])=>{_0x60e69f(_0x9697d0),_0x394802(_0x24f4b4);}):_0x60e69f(window[_0x11439a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x558528));}return _0x394802(_0x2ecd68),_0x448062>>>0x0;}function _0x554a40(_0x435191){return _0x435191[_0x11439a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x11439a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x11439a([0x30]));}function _0x4014dc(_0xd34801){return _0xd34801[_0x11439a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x11439a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x11439a([0x6a,0x6f,0x69,0x6e])]('');}function _0x3326f6(){}function _0x11439a(_0x1c6503){const _0x55a958=_0x3057;return _0x1c6503[_0x55a958(0x181)](_0x55757a=>String[_0x55a958(0x16b)](_0x55757a))[_0x55a958(0x168)]('');}_0x1c631a(await _0x4b9d48());}(this);}[_0x4854e2(0x18e)](){const _0x48b35=_0x4854e2,_0x533bbc=this[_0x48b35(0x18a)][_0x48b35(0x174)][_0x48b35(0x19d)];_0x533bbc[_0x48b35(0x179)](_0x48b35(0x158))&&_0x533bbc[_0x48b35(0x194)](_0x48b35(0x158),{'allowAttributes':[_0x48b35(0x14d)]}),_0x533bbc[_0x48b35(0x179)](_0x48b35(0x14f))&&_0x533bbc[_0x48b35(0x194)](_0x48b35(0x14f),{'allowAttributes':[_0x48b35(0x14d)]});}[_0x4854e2(0x15f)](){const _0x1257fc=_0x4854e2,_0x2a5025=this[_0x1257fc(0x18a)];_0x2a5025[_0x1257fc(0x186)][_0x1257fc(0x17e)](_0x1257fc(0x185))[_0x1257fc(0x155)]({'model':_0x1257fc(0x14d),'view':_0x1257fc(0x16f)}),_0x2a5025[_0x1257fc(0x186)][_0x1257fc(0x17e)](_0x1257fc(0x16a))[_0x1257fc(0x14b)]({'model':{'key':_0x1257fc(0x14d),'value':_0x504e27=>_0x504e27[_0x1257fc(0x170)](_0x1257fc(0x16f))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3a970a=_0x2a5025[_0x1257fc(0x167)][_0x1257fc(0x157)](_0x1257fc(0x153));_0x3a970a&&this[_0x1257fc(0x195)](_0x3a970a,_0x1257fc(0x19e),(_0x3d549b,[_0x265d3b,_0x7a6f14])=>{const _0x17f9c3=_0x1257fc;_0x265d3b[_0x17f9c3(0x172)](_0x17f9c3(0x14d),_0x7a6f14);});}[_0x4854e2(0x19c)](){const _0x36f68b=_0x4854e2,_0x57ea64=this[_0x36f68b(0x18a)][_0x36f68b(0x15a)][_0x36f68b(0x157)](_0x36f68b(0x18b))||{},_0x438f2f=this[_0x36f68b(0x18a)][_0x36f68b(0x15a)][_0x36f68b(0x157)](_0x36f68b(0x150))||'';this[_0x36f68b(0x169)]=_0x2f6253(_0x197197[_0x36f68b(0x19b)],_0x36f68b(0x14a),{..._0x57ea64,'pubkey':_0x438f2f,'ctx-name':_0x36f68b(0x17c)+this[_0x36f68b(0x177)],'sourceList':'','imgOnly':_0x36f68b(0x15b),'removeCopyright':_0x36f68b(0x15b),'localeName':this[_0x36f68b(0x18a)][_0x36f68b(0x17d)][_0x36f68b(0x156)],'externalSourcesEmbedCss':_0x36f68b(0x16e)}),this[_0x36f68b(0x169)][_0x36f68b(0x154)]=_0x38016c=>{const _0x11f481=_0x36f68b;if(_0x11f481(0x178)==_0x38016c)return _0x11f481(0x187);},_0x197197[_0x36f68b(0x19b)][_0x36f68b(0x193)][_0x36f68b(0x18c)](this[_0x36f68b(0x169)]);}[_0x4854e2(0x164)](){const _0x597d19=_0x4854e2;this[_0x597d19(0x198)]=_0x2f6253(_0x197197[_0x597d19(0x19b)],_0x597d19(0x188),{'ctx-name':_0x597d19(0x17c)+this[_0x597d19(0x177)]}),_0x197197[_0x597d19(0x19b)][_0x597d19(0x193)][_0x597d19(0x18c)](this[_0x597d19(0x198)]);}[_0x4854e2(0x163)](){const _0x139017=_0x4854e2,_0x3c2e32=this[_0x139017(0x18a)][_0x139017(0x167)][_0x139017(0x157)](_0x139017(0x192));_0x3c2e32&&this[_0x139017(0x195)](_0x3c2e32,_0x139017(0x162),()=>{const _0x553cb3=_0x139017,_0x5b2ca9=this[_0x553cb3(0x18a)][_0x553cb3(0x174)][_0x553cb3(0x19b)][_0x553cb3(0x17f)][_0x553cb3(0x17a)]();_0x5b2ca9&&_0x5b2ca9[_0x553cb3(0x170)](_0x553cb3(0x14d))&&this[_0x553cb3(0x18a)][_0x553cb3(0x18f)][_0x553cb3(0x184)][_0x553cb3(0x165)](_0x553cb3(0x16d),()=>{const _0x266746=_0x553cb3;_0x4aeb92(this[_0x266746(0x18a)],_0x5b2ca9);});});const _0x467625=this[_0x139017(0x18a)][_0x139017(0x167)][_0x139017(0x157)](_0x139017(0x189));_0x467625&&this[_0x139017(0x195)](_0x467625,_0x139017(0x162),()=>{const _0x5b485f=_0x139017,_0x49533b=this[_0x5b485f(0x18a)][_0x5b485f(0x174)][_0x5b485f(0x19b)][_0x5b485f(0x17f)][_0x5b485f(0x17a)]();_0x49533b&&_0x49533b[_0x5b485f(0x170)](_0x5b485f(0x14d))&&this[_0x5b485f(0x18a)][_0x5b485f(0x18f)][_0x5b485f(0x184)][_0x5b485f(0x165)](_0x5b485f(0x16d),()=>{const _0x44d902=_0x5b485f;_0x4aeb92(this[_0x44d902(0x18a)],_0x49533b);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x3b34bd,ObservableMixin as _0x2cb91d}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0xd8197b}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x3ef42e}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x1d6070}from'./uploadcareimageeditformview.js';import{UploadUtils as _0xafa7c3}from'../../utils/uploadutils.js';import{getImageUrls as _0x5428c9,getImageDimension as _0x18da96}from'../../utils/editingutils.js';import{isAncestor as _0x24982a}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2cb91d(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3a2f12,_0x356031,_0x3c5dba){super(),this['_editor']=_0x3a2f12,this['_dialog']=_0x356031,this['_imageElement']=_0x3c5dba,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 _0x70f380=this['_imageElement'],_0x2fcf39=_0x70f380['getAttribute']('uploadcareImageId'),_0x53772f=_0x70f380['getAttribute']('src');if(_0x2fcf39)await this['_loadImageInfo'](_0x2fcf39,_0x53772f);else{if(this['_imageCache']['has'](_0x53772f)){const _0x8a411d=this['_imageCache']['get'](_0x53772f);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x8a411d['url'],this['imageDimension']=_0x8a411d['dimension'],this['imageId']=_0x8a411d['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2041a3}=this['_editor'],t=_0x2041a3['t'],_0x50e116=new _0x1d6070(_0x2041a3,this['imageStatus'],this['_attributes']);_0x50e116['bind']('status')['to'](this,'imageStatus'),_0x50e116['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x50e116['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x50e116['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x50e116,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3ef42e,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x50e116,'position':_0xd8197b['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x50e116['focus']();},'onHide':()=>{_0x50e116['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3a6582=>!_0x24982a(_0x3a6582,_0x50e116['element'])}});}['_loadImageInfo'](_0x13b64a,_0x501674){return _0xafa7c3['getInfo'](_0x13b64a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x45bdff=>{const {width:_0x5ebb32,height:_0x322a25}=_0x45bdff['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x501674,this['imageDimension']={'width':_0x5ebb32,'height':_0x322a25},this['imageId']=_0x13b64a;})['catch'](_0x587fbd=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x587fbd['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x255dd7,_0x52a09a){return this['_getImageAsFile'](_0x255dd7)['then'](_0x201e22=>_0xafa7c3['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x52a09a['signal'],'file':_0x201e22,'onProgress':_0x4e97c6=>{_0x4e97c6&&_0x4e97c6['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4e97c6['value']));}}))['then'](_0x592cd9=>{const {width:_0x45be9b,height:_0x59118f}=_0x592cd9['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x592cd9['cdnUrl'],this['imageDimension']={'width':_0x45be9b,'height':_0x59118f},this['imageId']=_0x592cd9['uuid'],this['imageUploadProgress']=null;const _0x55ac48=_0x255dd7['getAttribute']('src');this['_imageCache']['set'](_0x55ac48,{'id':_0x592cd9['uuid'],'url':_0x592cd9['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x6f4303=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x6f4303['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x582073,_0x5d212e){_0x582073['on']('apply',(_0x4981ca,_0x298396)=>{this['_replaceImage'](_0x5d212e,_0x298396['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x582073['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x582073['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x70d060,_0x40bf4f,_0x38258d){const _0x520741=this['_editor'],{width:_0xa3ed53,height:_0x42a071}=_0x18da96(_0x40bf4f,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3de14f,imageSources:_0x2182e8}=_0x5428c9(_0x40bf4f,_0xa3ed53);_0x520741['model']['change'](_0xb039d7=>{if('$graveyard'===_0x70d060['root']['rootName']){_0x520741['execute']('insertImage',{'imageType':_0x70d060['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x70d060['getAttributes']()),'uploadcareImageId':_0x38258d,'src':_0x3de14f,'sources':_0x2182e8,'width':_0xa3ed53,'height':_0x42a071}});const _0x3cb2b4=_0x70d060['getChildren']();_0x70d060=_0x520741['model']['document']['selection']['getSelectedElement']();for(const _0x5b4984 of _0x3cb2b4)_0xb039d7['append'](_0xb039d7['cloneElement'](_0x5b4984),_0x70d060);}else _0xb039d7['setSelection'](_0x70d060,'on'),_0x520741['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x70d060['getAttributes']()),'uploadcareImageId':_0x38258d,'src':_0x3de14f,'sources':_0x2182e8,'width':_0xa3ed53,'height':_0x42a071},_0x70d060);_0xb039d7['setSelection'](_0x70d060,'on');});}async['_getImageAsFile'](_0x13f2ef){const _0x308c70=_0x3b34bd['window'],_0x3195ad=_0x3b34bd['document']['location']['href'],_0x2ca96f=new _0x308c70['URL'](_0x13f2ef['getAttribute']('src'),_0x3195ad);if('data:'===_0x2ca96f['protocol']){const _0xc10f33=_0x2ca96f['href']['split'](','),_0x24eab3=_0xc10f33[0x0]['match'](/:(.*?);/)[0x1],_0x444629=_0x24eab3['split']('/')[0x1],_0x4bd61d=_0x308c70['atob'](_0xc10f33[_0xc10f33['length']-0x1]);let _0x40e25b=_0x4bd61d['length'];const _0x27a7c4=new _0x308c70['Uint8Array'](_0x40e25b);for(;_0x40e25b--;)_0x27a7c4[_0x40e25b]=_0x4bd61d['charCodeAt'](_0x40e25b);return new _0x308c70['File']([_0x27a7c4],'image.'+_0x444629,{'type':_0x24eab3});}const _0x5af75f=_0x2ca96f['href']['split']('/'),_0x26c95c=_0x5af75f[_0x5af75f['length']-0x1],_0x58a3df=_0x26c95c['split']('.')[0x1];return _0x308c70['fetch'](_0x2ca96f['href'])['then'](_0xfa797f=>_0xfa797f['clone']()['blob']())['then'](_0x37f3c5=>new _0x308c70['File']([_0x37f3c5],_0x26c95c,{'type':'image/'+_0x58a3df}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x137b85,_0x2775c6){const _0x2f5629=_0x560e,_0xf9b2b7=_0x137b85();while(!![]){try{const _0x3c62a9=parseInt(_0x2f5629(0xaa))/0x1*(parseInt(_0x2f5629(0xad))/0x2)+-parseInt(_0x2f5629(0xab))/0x3+parseInt(_0x2f5629(0xb7))/0x4+parseInt(_0x2f5629(0xb3))/0x5*(parseInt(_0x2f5629(0xb0))/0x6)+parseInt(_0x2f5629(0xb2))/0x7+parseInt(_0x2f5629(0xa9))/0x8*(parseInt(_0x2f5629(0xa6))/0x9)+-parseInt(_0x2f5629(0xb6))/0xa*(parseInt(_0x2f5629(0xae))/0xb);if(_0x3c62a9===_0x2775c6)break;else _0xf9b2b7['push'](_0xf9b2b7['shift']());}catch(_0x1f3805){_0xf9b2b7['push'](_0xf9b2b7['shift']());}}}(_0x369c,0xccfd0));function _0x369c(){const _0x4c3be7=['1108195mnwzfD','set','image-edit','1744810YjRDui','1440684mnbPPi','setTemplate','909585mXkPOB','ck-uploadcare-theme','uc-cloud-image-editor','120lNPZHi','683691akjjVD','4008975LbnftD','bindTemplate','2OtFtCQ','121sxhqhK','imageSrc','18zoBCZd','uc-light','6093458JLCgUW'];_0x369c=function(){return _0x4c3be7;};return _0x369c();}import{View as _0x1776fd}from'ckeditor5/src/ui.js';function _0x560e(_0x1e9dcb,_0x25b4fb){const _0x369c39=_0x369c();return _0x560e=function(_0x560e91,_0x471f29){_0x560e91=_0x560e91-0xa5;let _0x3cce52=_0x369c39[_0x560e91];return _0x3cce52;},_0x560e(_0x1e9dcb,_0x25b4fb);}export class UploadcareImageEditFormEditingView extends _0x1776fd{constructor(_0x5a8006,_0x297e67){const _0x30cfae=_0x560e;super(_0x5a8006);const _0x289abb=this[_0x30cfae(0xac)];this[_0x30cfae(0xb4)](_0x30cfae(0xaf),''),this[_0x30cfae(0xa5)]({'tag':_0x30cfae(0xa8),'attributes':{..._0x297e67,'class':[_0x30cfae(0xb1),_0x30cfae(0xa7)],'ctx-name':_0x30cfae(0xb5),'cdn-url':_0x289abb['to'](_0x30cfae(0xaf))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x36b5cc}from'ckeditor5/src/icons.js';import{ButtonView as _0x4e3206,IconView as _0x573591,View as _0x5a01c3}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x5a01c3{constructor(_0x591a63){super(_0x591a63);const t=_0x591a63['t'];this['set']('errorType',null);const _0x1f8227=new _0x4e3206(_0x591a63);_0x1f8227['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1f8227['withText']=!0x0,_0x1f8227['class']='ck-button-action',_0x1f8227['on']('execute',()=>{this['fire']('retry');}),_0x1f8227['bind']('isVisible')['to'](this,'errorType',_0x57972=>'NotFound'!==_0x57972);const _0x4c8f6f=new _0x573591();_0x4c8f6f['content']=_0x36b5cc,_0x4c8f6f['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xa44094=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':[_0x4c8f6f,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xa44094['to']('errorType',_0x28f205=>t('NotFound'!==_0x28f205?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1f8227]},{'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'}]}]}]});}}
|