@ckeditor/ckeditor5-uploadcare 47.7.0-alpha.2 → 47.7.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x964c97,Command as _0x22cba9}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3f5df9,IconGooglePhotos as _0x23a916,IconGoogleDrive as _0x5b13eb,IconFacebook as _0x42a6c4,IconDropbox as _0xfa6937,IconUploadcareLink as _0x192cb2,IconUploadcareImageUpload as _0x594418,IconError as _0x131f02,IconUploadcareImageEdit as _0xea7d7a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x3bace2,MenuBarMenuListItemButtonView as _0x20576f,View as _0x8e5796,FocusCycler as _0x535dc5,Dialog as _0x390c13,DialogViewPosition as _0x330829,SpinnerView as _0x2fd75c,IconView as _0x3045a4,Notification as _0x140dff}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x20c215,DomEmitterMixin as _0x52f433,global as _0x15fb89,getAncestors as _0x45389f,ObservableMixin as _0x3cd85d,uid as _0x57a2af,createElement as _0x97ddba}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x13647e}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x578f1a,info as _0x2d8bd1}from'@uploadcare/upload-client';import*as _0xae926e from'@uploadcare/file-uploader';var i=function(_0x60b253){return _0x60b253['Local']='local',_0x60b253['URL']='url',_0x60b253['Dropbox']='dropbox',_0x60b253['GDrive']='gdrive',_0x60b253['Facebook']='facebook',_0x60b253['GPhotos']='gphotos',_0x60b253['OneDrive']='onedrive',_0x60b253;}({});function _(_0x1bca95,_0x188442,_0x1f1be3){const t=_0x1bca95['t'],_0x3d6fb6=_0x1bca95['t'];switch(_0x188442){case i['Local']:return{'text':_0x3d6fb6('Insert'===_0x1f1be3?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x3d6fb6('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x1f1be3?_0x3d6fb6('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x3d6fb6('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x1f1be3?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x1f1be3?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x1f1be3?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x1f1be3?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x1f1be3?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x188442;}}class e extends _0x964c97{['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 _0x5ac2da=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4e9e48;for(const _0x16803a in _0x5ac2da){const _0x4b5a54=_0x16803a,_0x7315ca=_0x5ac2da[_0x4b5a54];if('uploadcareLicenseKeyValid'==_0x7315ca||'uploadcareLicenseKeyInvalid'==_0x7315ca||'uploadcareLicenseKeyExpired'==_0x7315ca||'uploadcareLicenseKeyDomainLimit'==_0x7315ca||'uploadcareLicenseKeyNotAllowed'==_0x7315ca||'uploadcareLicenseKeyEvaluationLimit'==_0x7315ca||'uploadcareLicenseKeyUsageLimit'==_0x7315ca){delete _0x5ac2da[_0x4b5a54],_0x4e9e48=_0x7315ca,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x4e9e48&&_0x5ac2da['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x4e9e48&&_0x5ac2da['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x4e9e48&&_0x5ac2da['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x4e9e48&&_0x5ac2da['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x4e9e48&&_0x5ac2da['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x4e9e48&&_0x5ac2da['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x3c1dbc}=this,_0xa7107=_0x3c1dbc['commands']['get']('uploadcare');if(!_0xa7107)return;const _0x53c5ac=this['_normalizeConfigSourceList'](_0x3c1dbc['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x127885,_0x339dac)=>{const _0x286b73=this['_getIntegrationKey'](_0x339dac['type']);return _0x127885[_0x286b73]||(_0x127885[_0x286b73]=[]),_0x127885[_0x286b73]['push'](_0x339dac),_0x127885;},{});_0x3c1dbc['plugins']['has']('ImageInsertUI')&&_0x3c1dbc['commands']['get']('uploadcare')&&Object['entries'](_0x53c5ac)['forEach'](([_0x343bc4,_0x30be58])=>{_0x3c1dbc['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x343bc4,'observable':()=>_0xa7107,'buttonViewCreator':()=>this['_createToolbarButton'](_0x30be58),'formViewCreator':()=>this['_createDropdownButtons'](_0x30be58),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x30be58),'override':'assetManager'!==_0x343bc4});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x39ae0d){const {locale:_0x44dec1}=this['editor'];return _0x39ae0d['map'](_0x2bde1f=>{const _0x338cc8=_(_0x44dec1,_0x2bde1f,'Insert');switch(_0x2bde1f){case i['Local']:return{'icon':_0x594418,'type':i['Local'],..._0x338cc8};case i['URL']:return{'icon':_0x192cb2,'type':i['URL'],..._0x338cc8};case i['Dropbox']:return{'icon':_0xfa6937,'type':i['Dropbox'],..._0x338cc8};case i['Facebook']:return{'icon':_0x42a6c4,'type':i['Facebook'],..._0x338cc8};case i['GDrive']:return{'icon':_0x5b13eb,'type':i['GDrive'],..._0x338cc8};case i['GPhotos']:return{'icon':_0x23a916,'type':i['GPhotos'],..._0x338cc8};case i['OneDrive']:return{'icon':_0x3f5df9,'type':i['OneDrive'],..._0x338cc8};}});}['_getIntegrationKey'](_0x4c41fc){switch(_0x4c41fc){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3bf856,_0xf3cf0b){const _0x3b6809=this['editor'],_0x542074=new _0x3bf856(_0x3b6809['locale']),_0x41d012=_0x3b6809['commands']['get']('uploadcare');return _0x542074['bind']('isEnabled')['to'](_0x41d012),_0x542074['on']('execute',()=>{_0x41d012['execute'](_0xf3cf0b);}),_0x542074;}['_createToolbarButton'](_0x471101){const {locale:_0x55aa26}=this['editor'],_0x2b8d58=this['editor']['plugins']['get']('ImageInsertUI'),_0x16402a=_0x471101[0x0],_0x5d9118=this['_createButton'](_0x3bace2,_0x16402a['type']);return _0x5d9118['icon']=_0x16402a['icon'],_0x5d9118['bind']('label')['to'](_0x2b8d58,'isImageSelected',_0x3b69b9=>_(_0x55aa26,_0x16402a['type'],_0x3b69b9?'Replace':'Insert')['text']),_0x5d9118['tooltip']=!0x0,_0x5d9118;}['_createDropdownButtons'](_0x3c8820){const {locale:_0x40e8a0}=this['editor'],_0x3d4d89=this['editor']['plugins']['get']('ImageInsertUI');return _0x3c8820['map'](_0x3aa571=>{const _0x289ec7=this['_createButton'](_0x3bace2,_0x3aa571['type']);return _0x289ec7['withText']=!0x0,_0x289ec7['icon']=_0x3aa571['icon'],_0x289ec7['bind']('label')['to'](_0x3d4d89,'isImageSelected',_0xf1ac94=>_(_0x40e8a0,_0x3aa571['type'],_0xf1ac94?'Replace':'Insert')['text']),_0x289ec7;});}['_createMenuBarButtons'](_0x511c2b){return _0x511c2b['map'](_0x31ed96=>{const _0x11c297=this['_createButton'](_0x20576f,_0x31ed96['type']);return _0x11c297['icon']=_0x31ed96['icon'],_0x11c297['label']=_0x31ed96['shortText'],_0x11c297;});}}class F extends _0x8e5796{['focusTracker'];['focusCycler'];constructor(_0x1a5957){super(_0x1a5957),this['focusTracker']=new _0x20c215(),this['focusCycler']=new _0x535dc5({'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(_0x38e43a,_0x237f03){super(_0x38e43a),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-'+_0x237f03}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x3a3c77,_0x1fa0d9){const _0x1624b2=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x5281b9=>_0x5281b9<=_0x1fa0d9)['map'](_0x2dcc3b=>_0x3a3c77['replace'](/\/$/,'')+'/-/resize/'+_0x2dcc3b+'x/\x20'+_0x2dcc3b+'w');return{'imageFallbackUrl':_0x3a3c77,'imageSources':[{'srcset':_0x1624b2['join'](',\x20'),'sizes':'(max-width:\x20'+_0x1fa0d9+'px)\x20100vw,\x20'+_0x1fa0d9+'px','type':'image/webp'}]};}function S(_0x27f66f,_0x517749,_0x18484c){const _0x2bf727=_0x27f66f['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x2bf727?parseInt(_0x2bf727[0x1],0xa):_0x517749,'height':_0x2bf727?parseInt(_0x2bf727[0x2],0xa):_0x18484c};}function p(_0x58b2b5,_0x2b8f95){const _0x2afc1c=new(_0x52f433())(),_0x3cc852=_0x58b2b5['plugins']['get']('ImageUtils'),_0x53c5c9=_0x58b2b5['editing']['mapper']['toViewElement'](_0x2b8f95),_0x2009b6=_0x3cc852['findViewImgElement'](_0x53c5c9),_0x4badf5=_0x58b2b5['editing']['view']['domConverter']['viewToDom'](_0x2009b6),_0x36ad23=_0x2b8f95['getAttribute']('width'),_0x191ad8=_0x2b8f95['getAttribute']('height'),_0x20b4ac='image-processing';_0x58b2b5['editing']['view']['change'](_0x430f33=>{_0x430f33['addClass'](_0x20b4ac,_0x53c5c9),_0x430f33['setStyle']('aspect-ratio',_0x36ad23+'/'+_0x191ad8,_0x2009b6);}),_0x2afc1c['listenTo'](_0x4badf5,'load',()=>{_0x2afc1c['stopListening'](_0x4badf5,'load'),_0x58b2b5['editing']['view']['change'](_0x257a83=>{_0x257a83['removeClass'](_0x20b4ac,_0x53c5c9),_0x257a83['removeStyle']('aspect-ratio',_0x2009b6);});});}function z(_0x5675d4){if(Array['isArray'](_0x5675d4)){const _0x84bad7=_0x5675d4['map'](z);return _0x14eaca=>_0x84bad7['some'](_0x3c4125=>_0x3c4125(_0x14eaca));}if('origin'==_0x5675d4){const _0x16e9a3=_0x15fb89['window']['location']['origin'];return _0x2524ef=>new URL(_0x2524ef,_0x15fb89['document']['baseURI'])['origin']==_0x16e9a3;}return'function'==typeof _0x5675d4?_0x5675d4:_0x5675d4 instanceof RegExp?_0x59dc14=>!(!_0x59dc14['match'](_0x5675d4)&&!_0x59dc14['replace'](/^https?:\/\//,'')['match'](_0x5675d4)):()=>!0x1;}function A(_0xc9751b,_0x560eb8){return _0x45389f(_0xc9751b['target'])['includes'](_0x560eb8);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x3cd85d(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x35b127,_0x21f497,_0x38e34b){super(),this['_editor']=_0x35b127,this['_editing']=_0x21f497,this['_dialog']=_0x35b127['plugins']['get'](_0x390c13),this['_api']=_0x21f497['ctxElement']['getAPI'](),this['_type']=_0x38e34b,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:_0xa0ff35,model:_0xbacfc}=this['_editor'],_0x199e82=_0xbacfc['document']['selection']['getSelectedElement'](),_0x46020c=_0x199e82&&(_0x199e82['is']('element','imageBlock')||_0x199e82['is']('element','imageInline'));this['_formView']=new x(_0xa0ff35,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x594418,'title':_(_0xa0ff35,this['_type'],_0x46020c?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x330829['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4d8161=>!A(_0x4d8161,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0xffc914}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0xdd0a2a=>{const _0x7aa822=_0xffc914['length'];for(const _0x355d60 of _0xffc914){const _0x476e19=_0x355d60===_0xffc914[_0x7aa822-0x1],{cdnUrl:_0x191ff7,fileInfo:_0x1599e6}=_0x355d60;if(!_0x191ff7||!_0x1599e6)continue;const {width:_0x4f2c80,height:_0x51c290}=_0x1599e6['imageInfo'],_0x1df558=S(_0x191ff7,_0x4f2c80,_0x51c290),_0x2bf3cf=C(_0x191ff7,_0x1df558['width']),_0x16564c={'id':_0x1599e6['uuid'],'type':'image','attributes':{'imageDimension':_0x1df558,..._0x2bf3cf}};this['_insertAsset'](_0x16564c,_0x476e19,_0xdd0a2a);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1ea1fa=>{'idle'===_0x1ea1fa['detail']['status']&&!_0x1ea1fa['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x237dcd,_0x1830d4,_0x3a6698){const _0x3e7eef=this['_editor']['model']['document']['selection'],_0xb1bd8d=_0x3e7eef['getSelectedElement'](),_0x3cc427=!(!_0xb1bd8d||!_0xb1bd8d['is']('element','imageInline'));_0x3a6698['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x237dcd,_0x3cc427),_0x1830d4||_0x3a6698['setSelection'](_0x3e7eef['getLastPosition']());}['_insertImage'](_0x34ddb0,_0x5ddef7){const _0x17d586=this['_editor'],{imageDimension:_0xd81aa0,imageFallbackUrl:_0x34566a,imageSources:_0x4738b7}=_0x34ddb0['attributes'];_0x17d586['execute']('insertImage',{'imageType':_0x5ddef7?'imageInline':null,'source':{'uploadcareImageId':_0x34ddb0['id'],'src':_0x34566a,'sources':_0x4738b7,..._0xd81aa0}});}}class w extends _0x22cba9{['_editing'];['_controller']=null;static get['requires'](){return[_0x390c13,o];}constructor(_0xb1fa96){super(_0xb1fa96),this['_editing']=_0xb1fa96['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x50403b){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x50403b);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x1176f8,..._0x53e8c2}){return _0x578f1a(_0x1176f8,_0x53e8c2);}static['getInfo'](_0x1181f9,_0x3432cb){return _0x2d8bd1(_0x1181f9,_0x3432cb);}}class f extends _0x964c97{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x13647e,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x55d045=this['editor'];if(!!!_0x55d045['config']['get']('uploadcare'))return;_0x55d045['plugins']['get'](_0x13647e)['createUploadAdapter']=_0x215ba6=>new k(_0x215ba6,_0x55d045),_0x55d045['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x2deab7,{imageElement:_0x21b38c,data:_0x150353})=>{_0x55d045['model']['change'](_0x11d87b=>{_0x11d87b['setAttribute']('uploadcareImageId',_0x150353['uploadcareImageId'],_0x21b38c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x3cb563,_0x5a9564){this['loader']=_0x3cb563,this['editor']=_0x5a9564,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x58445f=await this['loader']['file'];return j['upload']({'file':_0x58445f,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x501aab=>{_0x501aab&&_0x501aab['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x501aab['value']);}})['then'](async _0x1ebbe5=>{const {imageFallbackUrl:_0x37bb56,imageSources:_0x176367}=C(_0x1ebbe5['cdnUrl'],_0x1ebbe5['imageInfo']['width']);return{'uploadcareImageId':_0x1ebbe5['uuid'],'default':_0x37bb56,'sources':_0x176367};})['catch'](()=>{const _0x4b5ff0=t('Cannot\x20upload\x20file:')+('\x20'+_0x58445f['name']+'.');return Promise['reject'](_0x4b5ff0);});}['abort'](){this['controller']['abort']();}}class o extends _0x964c97{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x390c13];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x350a11){super(_0x350a11),this['ucContextId']=_0x57a2af();}['init'](){const _0x5551fe=this['editor'];_0x5551fe['commands']['add']('uploadcare',new w(_0x5551fe));}['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 _0x5756c9=_0x15fb89['document']['querySelector']('input[uploadcare-file-input]');_0x5756c9&&_0x5756c9['remove']();}),async function(_0x4c17de){const _0xccb26=_0x41b0d0([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0xa91818=0x535f8c3a,_0x2ed92d=0x53580b1a^_0xa91818,_0x59cd12=window[_0x41b0d0([0x44,0x61,0x74,0x65])][_0x41b0d0([0x6e,0x6f,0x77])](),_0x48236a=_0x4c17de[_0x41b0d0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4bf3e7=new window[(_0x41b0d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3cf4fd=>{_0x48236a[_0x41b0d0([0x6f,0x6e,0x63,0x65])](_0x41b0d0([0x72,0x65,0x61,0x64,0x79]),_0x3cf4fd);}),_0x4a7ad6={[_0x41b0d0([0x6b,0x74,0x79])]:_0x41b0d0([0x45,0x43]),[_0x41b0d0([0x75,0x73,0x65])]:_0x41b0d0([0x73,0x69,0x67]),[_0x41b0d0([0x63,0x72,0x76])]:_0x41b0d0([0x50,0x2d,0x32,0x35,0x36]),[_0x41b0d0([0x78])]:_0x41b0d0([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]),[_0x41b0d0([0x79])]:_0x41b0d0([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]),[_0x41b0d0([0x61,0x6c,0x67])]:_0x41b0d0([0x45,0x53,0x32,0x35,0x36])},_0x53ef69=_0x48236a[_0x41b0d0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x41b0d0([0x67,0x65,0x74])](_0x41b0d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2171f7(){let _0x1af96e,_0x44a6c7=null,_0x3c6ccb=null;try{if(_0x53ef69==_0x41b0d0([0x47,0x50,0x4c]))return _0x41b0d0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1af96e=_0x213746(),!_0x1af96e)return _0x41b0d0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1af96e[_0x41b0d0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3c6ccb=_0x3cce5f(_0x1af96e[_0x41b0d0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1af96e[_0x41b0d0([0x6a,0x74,0x69])])),await _0x403cdf()?_0x5022c1()?_0x3cdbde()?_0x41b0d0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x248afd()?(_0x1af96e[_0x41b0d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41b0d0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x44a6c7=_0x300a7d(_0x41b0d0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5173d7()):_0x41b0d0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x41b0d0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x41b0d0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x41b0d0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3cdbde(){const _0x3c77ff=[_0x41b0d0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x41b0d0([0x74,0x72,0x69,0x61,0x6c])][_0x41b0d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1af96e[_0x41b0d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x59cd12/0x3e8:0xe10*_0x2ed92d;return _0x1af96e[_0x41b0d0([0x65,0x78,0x70])]<_0x3c77ff;}function _0x5022c1(){const _0x50b404=_0x1af96e[_0x41b0d0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x50b404&&(!!_0x50b404[_0x41b0d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41b0d0([0x2a]))||!!_0x50b404[_0x41b0d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41b0d0([0x55,0x50,0x4c,0x43])));}function _0x248afd(){const _0xc2f0d2=_0x1af96e[_0x41b0d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xc2f0d2||0x0==_0xc2f0d2[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x25acf4}=new URL(window[_0x41b0d0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xc2f0d2[_0x41b0d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25acf4))return!0x0;const _0x2586f7=_0x25acf4[_0x41b0d0([0x73,0x70,0x6c,0x69,0x74])](_0x41b0d0([0x2e]));return _0xc2f0d2[_0x41b0d0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4c3f30=>_0x4c3f30[_0x41b0d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41b0d0([0x2a])))[_0x41b0d0([0x6d,0x61,0x70])](_0x18e4ac=>_0x18e4ac[_0x41b0d0([0x73,0x70,0x6c,0x69,0x74])](_0x41b0d0([0x2e])))[_0x41b0d0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x420666=>_0x420666[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2586f7[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41b0d0([0x6d,0x61,0x70])](_0x18fc7a=>Array(_0x2586f7[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x18fc7a[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41b0d0([0x66,0x69,0x6c,0x6c])](_0x18fc7a[0x0]===_0x41b0d0([0x2a])?_0x41b0d0([0x2a]):'')[_0x41b0d0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x18fc7a))[_0x41b0d0([0x73,0x6f,0x6d,0x65])](_0x23a8d6=>_0x2586f7[_0x41b0d0([0x65,0x76,0x65,0x72,0x79])]((_0x2302a5,_0x5974b0)=>_0x23a8d6[_0x5974b0]===_0x2302a5||_0x23a8d6[_0x5974b0]===_0x41b0d0([0x2a])));}function _0x5173d7(){return _0x44a6c7&&_0x3c6ccb?new window[(_0x41b0d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x28ecb3,_0x29d1b5)=>{_0x44a6c7[_0x41b0d0([0x74,0x68,0x65,0x6e])](_0x28ecb3,_0x29d1b5),_0x3c6ccb[_0x41b0d0([0x74,0x68,0x65,0x6e])](_0x5ce640=>{_0x5ce640!=_0x41b0d0([0x56,0x61,0x6c,0x69,0x64])&&_0x28ecb3(_0x5ce640);},_0x29d1b5);}):_0x44a6c7||_0x3c6ccb||_0x41b0d0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3cce5f(_0x1462cc,_0x184774){return new window[(_0x41b0d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x154bdd=>{if(_0xf58766())return _0x154bdd(_0x41b0d0([0x56,0x61,0x6c,0x69,0x64]));_0x51d8f9(),_0x48236a[_0x41b0d0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x41b0d0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2f1c72=!0x1;const _0x51df9f=_0x57a2af();function _0x1cbf7a(_0x504156){return!!_0x504156&&(typeof _0x504156===_0x41b0d0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x504156===_0x41b0d0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x504156[_0x41b0d0([0x74,0x68,0x65,0x6e])]===_0x41b0d0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x504156[_0x41b0d0([0x63,0x61,0x74,0x63,0x68])]===_0x41b0d0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x14c4e6(_0x3db244){_0x50f0c4(_0x3db244)[_0x41b0d0([0x74,0x68,0x65,0x6e])](_0x2f0a30=>{if(!_0x2f0a30||_0x2f0a30[_0x41b0d0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x41b0d0([0x6f,0x6b]))return _0x41b0d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x119680(_0x4c0892(_0x51df9f+_0x184774))!=_0x2f0a30[_0x41b0d0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x41b0d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x41b0d0([0x56,0x61,0x6c,0x69,0x64]);})[_0x41b0d0([0x74,0x68,0x65,0x6e])](_0x1b961a=>(_0x338361(),_0x1b961a),()=>{const _0x27872d=_0x4202b9();return null==_0x27872d?(_0x338361(),_0x41b0d0([0x56,0x61,0x6c,0x69,0x64])):_0x41b0d0(_0x59cd12-_0x27872d>(0x7753083a^_0xa91818)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x41b0d0([0x74,0x68,0x65,0x6e])](_0x154bdd)[_0x41b0d0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x154bdd(_0x41b0d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x38bf1c=0x536962ba^_0xa91818;function _0x338361(){const _0x2b3e1f=_0x41b0d0([0x6c,0x6c,0x63,0x74,0x2d])+_0x119680(_0x4c0892(_0x1462cc)),_0x524a83=_0x7268da(_0x119680(window[_0x41b0d0([0x4d,0x61,0x74,0x68])][_0x41b0d0([0x63,0x65,0x69,0x6c])](_0x59cd12/_0x38bf1c)));window[_0x41b0d0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41b0d0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b3e1f,_0x524a83);}function _0x4202b9(){const _0x45434c=_0x41b0d0([0x6c,0x6c,0x63,0x74,0x2d])+_0x119680(_0x4c0892(_0x1462cc)),_0xda640b=window[_0x41b0d0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41b0d0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x45434c);return _0xda640b?window[_0x41b0d0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x7268da(_0xda640b),0x10)*_0x38bf1c:null;}function _0x50f0c4(_0x348515){return new window[(_0x41b0d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x562420,_0x57da6b)=>{_0x348515[_0x41b0d0([0x74,0x68,0x65,0x6e])](_0x562420,_0x57da6b),window[_0x41b0d0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x57da6b,0x535e58fa^_0xa91818);});}}_0x48236a[_0x41b0d0([0x6f,0x6e])](_0x41b0d0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2f380b,_0x35e33d)=>{if(_0x35e33d[0x0]!=_0x1462cc)return _0x154bdd(_0x41b0d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x35e33d[0x1]={..._0x35e33d[0x1],[_0x41b0d0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x51df9f};},{[_0x41b0d0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41b0d0([0x68,0x69,0x67,0x68])}),_0x48236a[_0x41b0d0([0x6f,0x6e])](_0x41b0d0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2f2455=>{_0x1cbf7a(_0x2f2455[_0x41b0d0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2f1c72=!0x0,_0x14c4e6(_0x2f2455[_0x41b0d0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x41b0d0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41b0d0([0x6c,0x6f,0x77])}),_0x4bf3e7[_0x41b0d0([0x74,0x68,0x65,0x6e])](()=>{_0x2f1c72||_0x154bdd(_0x41b0d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xf58766(){return _0x48236a[_0x41b0d0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41b0d0([0x76,0x69,0x65,0x77])][_0x41b0d0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x41b0d0([0x61,0x75,0x74,0x6f]);}function _0x51d8f9(){_0x48236a[_0x41b0d0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41b0d0([0x76,0x69,0x65,0x77])][_0x41b0d0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x41b0d0([0x61,0x75,0x74,0x6f]);}}function _0x300a7d(_0x41c593){const _0xf727a6=[new window[(_0x41b0d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e9877=>setTimeout(_0x1e9877,0x5356b2f6^_0xa91818)),_0x4bf3e7[_0x41b0d0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x41b0d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5dded3=>{let _0x1d70a5=0x0;_0x48236a[_0x41b0d0([0x6d,0x6f,0x64,0x65,0x6c])][_0x41b0d0([0x6f,0x6e])](_0x41b0d0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x937448,_0x370068)=>{_0x370068[0x0][_0x41b0d0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1d70a5++,_0x1d70a5==(0x535f89d2^_0xa91818)&&(_0x5dded3(),_0x937448[_0x41b0d0([0x6f,0x66,0x66])]());});}))];return window[_0x41b0d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x41b0d0([0x72,0x61,0x63,0x65])](_0xf727a6)[_0x41b0d0([0x74,0x68,0x65,0x6e])](()=>_0x41c593);}async function _0x500af6(){await _0x4bf3e7,_0x48236a[_0x41b0d0([0x6d,0x6f,0x64,0x65,0x6c])][_0x41b0d0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5e6262,_0x48236a[_0x41b0d0([0x6d,0x6f,0x64,0x65,0x6c])][_0x41b0d0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5e6262,_0x48236a[_0x41b0d0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x41b0d0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x415020(_0x54254e){const _0x2c68c8=_0x1a3f12();_0x48236a[_0x2c68c8]=_0x41b0d0([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x54254e,_0x54254e!=_0x41b0d0([0x56,0x61,0x6c,0x69,0x64])&&_0x500af6();}function _0x1a3f12(){const _0x448d03=window[_0x41b0d0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x41b0d0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x41b0d0([0x6e,0x6f,0x77])]())[_0x41b0d0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x41b0d0([0x2e]),'');let _0x37381f=_0x41b0d0([0x68]);for(let _0x224b50=0x0;_0x224b50<_0x448d03[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x224b50+=0x2){let _0x4cc1e4=window[_0x41b0d0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x448d03[_0x41b0d0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x224b50,_0x224b50+0x2));_0x4cc1e4>=_0xccb26[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4cc1e4-=_0xccb26[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x37381f+=_0xccb26[_0x4cc1e4];}return _0x37381f;}function _0x213746(){const _0x24e5e1=_0x53ef69[_0x41b0d0([0x73,0x70,0x6c,0x69,0x74])](_0x41b0d0([0x2e]));if(0x3!=_0x24e5e1[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5cd416(_0x24e5e1[0x1]);function _0x5cd416(_0x2acbf8){const _0x1e0411=_0x17e964(_0x2acbf8);return _0x1e0411&&_0x46cc34()?_0x1e0411:null;function _0x46cc34(){const _0x571310=_0x1e0411[_0x41b0d0([0x6a,0x74,0x69])],_0x7473b3=window[_0x41b0d0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x571310[_0x41b0d0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x571310[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x9ff78c={..._0x1e0411,[_0x41b0d0([0x6a,0x74,0x69])]:_0x571310[_0x41b0d0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x571310[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x9ff78c[_0x41b0d0([0x76,0x63])],_0x4c0892(_0x9ff78c)==_0x7473b3;}}}async function _0x403cdf(){let _0x123670=!0x0;try{const _0x4b6c83=_0x53ef69[_0x41b0d0([0x73,0x70,0x6c,0x69,0x74])](_0x41b0d0([0x2e])),[_0x443bbe,_0x234d19,_0x4533bb]=_0x4b6c83;return _0x4b7606(_0x443bbe),await _0x520442(_0x443bbe,_0x234d19,_0x4533bb),_0x123670;}catch{return!0x1;}function _0x4b7606(_0x3546f5){const _0xe2ab63=_0x17e964(_0x3546f5);_0xe2ab63&&_0xe2ab63[_0x41b0d0([0x61,0x6c,0x67])]==_0x41b0d0([0x45,0x53,0x32,0x35,0x36])||(_0x123670=!0x1);}async function _0x520442(_0xac791d,_0x2de3ef,_0xcce07f){const _0x1308e2=window[_0x41b0d0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x41b0d0([0x66,0x72,0x6f,0x6d])](_0x22e6fe(_0xcce07f),_0x137af8=>_0x137af8[_0x41b0d0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x52b6bd=new window[(_0x41b0d0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x41b0d0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xac791d+_0x41b0d0([0x2e])+_0x2de3ef),_0x151a34=window[_0x41b0d0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x41b0d0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x151a34)return;const _0x359e3e=await _0x151a34[_0x41b0d0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x41b0d0([0x6a,0x77,0x6b]),_0x4a7ad6,{[_0x41b0d0([0x6e,0x61,0x6d,0x65])]:_0x41b0d0([0x45,0x43,0x44,0x53,0x41]),[_0x41b0d0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x41b0d0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x41b0d0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x151a34[_0x41b0d0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x41b0d0([0x6e,0x61,0x6d,0x65])]:_0x41b0d0([0x45,0x43,0x44,0x53,0x41]),[_0x41b0d0([0x68,0x61,0x73,0x68])]:{[_0x41b0d0([0x6e,0x61,0x6d,0x65])]:_0x41b0d0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x359e3e,_0x1308e2,_0x52b6bd)||(_0x123670=!0x1);}}function _0x17e964(_0x2cc64f){return _0x2cc64f[_0x41b0d0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x41b0d0([0x65,0x79]))?JSON[_0x41b0d0([0x70,0x61,0x72,0x73,0x65])](_0x22e6fe(_0x2cc64f)):null;}function _0x22e6fe(_0x5f245f){return window[_0x41b0d0([0x61,0x74,0x6f,0x62])](_0x5f245f[_0x41b0d0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x41b0d0([0x2b]))[_0x41b0d0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x41b0d0([0x2f])));}function _0x4c0892(_0x3f3795){let _0x4df7a7=0x1505;function _0x3458c8(_0x200d0d){for(let _0x561ba9=0x0;_0x561ba9<_0x200d0d[_0x41b0d0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x561ba9++){const _0x510da3=_0x200d0d[_0x41b0d0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x561ba9);_0x4df7a7=(_0x4df7a7<<0x5)+_0x4df7a7+_0x510da3,_0x4df7a7&=_0x4df7a7;}}function _0x39b558(_0x571c97){Array[_0x41b0d0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x571c97)?_0x571c97[_0x41b0d0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39b558):_0x571c97&&typeof _0x571c97==_0x41b0d0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x41b0d0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x571c97)[_0x41b0d0([0x73,0x6f,0x72,0x74])]()[_0x41b0d0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x101abd,_0x25a658])=>{_0x3458c8(_0x101abd),_0x39b558(_0x25a658);}):_0x3458c8(window[_0x41b0d0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x571c97));}return _0x39b558(_0x3f3795),_0x4df7a7>>>0x0;}function _0x119680(_0x1238fd){return _0x1238fd[_0x41b0d0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x41b0d0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x41b0d0([0x30]));}function _0x7268da(_0x513317){return _0x513317[_0x41b0d0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x41b0d0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x41b0d0([0x6a,0x6f,0x69,0x6e])]('');}function _0x5e6262(){}function _0x41b0d0(_0x58ce2e){return _0x58ce2e['map'](_0x220bf4=>String['fromCharCode'](_0x220bf4))['join']('');}_0x415020(await _0x2171f7());}(this);}['_initSchema'](){const _0xe3ff36=this['editor']['model']['schema'];_0xe3ff36['isRegistered']('imageBlock')&&_0xe3ff36['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0xe3ff36['isRegistered']('imageInline')&&_0xe3ff36['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x10a2c6=this['editor'];_0x10a2c6['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x10a2c6['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x275a0d=>_0x275a0d['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xfa71bd=_0x10a2c6['commands']['get']('replaceImageSource');_0xfa71bd&&this['listenTo'](_0xfa71bd,'cleanupImage',(_0x1d9a36,[_0x4e7f52,_0x172aff])=>{_0x4e7f52['removeAttribute']('uploadcareImageId',_0x172aff);});}['_initConfig'](){const _0x1a3831=this['editor']['config']['get']('uploadcare.uploader')||{},_0x117ce7=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x97ddba(_0x15fb89['document'],'uc-config',{..._0x1a3831,'pubkey':_0x117ce7,'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']=_0x1b7cf7=>{if('closeMax'==_0x1b7cf7)return'#uc-icon-arrow-down';},_0x15fb89['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x97ddba(_0x15fb89['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x15fb89['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x483a7a=this['editor']['commands']['get']('insertImage');_0x483a7a&&this['listenTo'](_0x483a7a,'execute',()=>{const _0x241f8c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x241f8c&&_0x241f8c['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x241f8c);});});const _0x49241e=this['editor']['commands']['get']('uploadcareImageReplace');_0x49241e&&this['listenTo'](_0x49241e,'execute',()=>{const _0x1211cc=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1211cc&&_0x1211cc['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1211cc);});});}}class tt extends _0x964c97{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24de95){super(_0x24de95),_0x24de95['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0xae926e['defineComponents'](_0xae926e),this['_defineLocale']();}['_defineLocale'](){const _0x467bb1=this['editor']['config']['get']('uploadcare.locale'),_0x411212=this['editor']['locale']['contentLanguage'];_0x467bb1&&_0xae926e['defineLocale'](_0x411212,_0x467bb1);}}class ii extends _0x8e5796{constructor(_0x21d922){super(_0x21d922);const t=_0x21d922['t'],_0x1bca01=this['bindTemplate'],_0x3aa7cc=new _0x2fd75c();_0x3aa7cc['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':[_0x3aa7cc,{'text':_0x1bca01['to']('imageUploadProgress',_0xd05396=>t('Loading\x20image...')+'\x20('+(_0xd05396||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 _0x8e5796{constructor(_0x31a687){super(_0x31a687);const t=_0x31a687['t'];this['set']('errorType',null);const _0x4ff5ae=new _0x3bace2(_0x31a687);_0x4ff5ae['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4ff5ae['withText']=!0x0,_0x4ff5ae['class']='ck-button-action',_0x4ff5ae['on']('execute',()=>{this['fire']('retry');}),_0x4ff5ae['bind']('isVisible')['to'](this,'errorType',_0x2bf2ba=>'NotFound'!==_0x2bf2ba);const _0x4c47c3=new _0x3045a4();_0x4c47c3['content']=_0x131f02,_0x4c47c3['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x30398d=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':[_0x4c47c3,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x30398d['to']('errorType',_0xeee3f7=>t('NotFound'!==_0xeee3f7?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4ff5ae]},{'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 _0x8e5796{constructor(_0x54b903,_0x478459){super(_0x54b903);const _0x4b0126=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x478459,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x4b0126['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x3b9ec5,_0x4eae05,_0x4d58e2){super(_0x3b9ec5),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x3b9ec5),this['_errorView']=new ti(_0x3b9ec5),this['_editingView']=new ei(_0x3b9ec5,_0x4d58e2),this['_focusableView']=new _0x8e5796(_0x3b9ec5),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x4eae05),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'],_0x2d6906=>{this['_addUploadcareImageEditorListeners'](_0x2d6906);});}),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'](_0x4f51b6,_0x5f0a4d){const _0x126f80='uc-cloud-image-editor',_0x52a3f7=_0x4f51b6['querySelector'](_0x126f80);if(_0x52a3f7)return _0x5f0a4d(_0x52a3f7);const _0x3abed5=new MutationObserver(_0x52d06c=>{const _0x5d52f7=_0x52d06c['filter'](_0x57064e=>_0x57064e['target']===_0x4f51b6&&_0x57064e['addedNodes']['length']>0x0&&_0x57064e['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x126f80);_0x5d52f7['length']&&(_0x3abed5['disconnect'](),_0x5f0a4d(_0x5d52f7[0x0]['addedNodes'][0x0]));});_0x3abed5['observe'](_0x4f51b6,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x197f67){_0x197f67['addEventListener']('apply',_0x254521=>{this['fire']('apply',{'imageSrc':_0x254521['detail']['cdnUrl']});}),_0x197f67['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x3cd85d(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x131d3e,_0x843b34,_0x522ca5){super(),this['_editor']=_0x131d3e,this['_dialog']=_0x843b34,this['_imageElement']=_0x522ca5,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 _0x467ce0=this['_imageElement'],_0x54847e=_0x467ce0['getAttribute']('uploadcareImageId'),_0x4eca59=_0x467ce0['getAttribute']('src');if(_0x54847e)await this['_loadImageInfo'](_0x54847e,_0x4eca59);else{if(this['_imageCache']['has'](_0x4eca59)){const _0x213ed6=this['_imageCache']['get'](_0x4eca59);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x213ed6['url'],this['imageDimension']=_0x213ed6['dimension'],this['imageId']=_0x213ed6['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2336c4}=this['_editor'],t=_0x2336c4['t'],_0x444408=new X(_0x2336c4,this['imageStatus'],this['_attributes']);_0x444408['bind']('status')['to'](this,'imageStatus'),_0x444408['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x444408['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x444408['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x444408,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0xea7d7a,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x444408,'position':_0x330829['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x444408['focus']();},'onHide':()=>{_0x444408['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x184c53=>!A(_0x184c53,_0x444408['element'])}});}['_loadImageInfo'](_0x3533be,_0x50a9e0){return j['getInfo'](_0x3533be,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x391665=>{const {width:_0x40d8a6,height:_0x14af85}=_0x391665['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x50a9e0,this['imageDimension']={'width':_0x40d8a6,'height':_0x14af85},this['imageId']=_0x3533be;})['catch'](_0x2a9ddf=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2a9ddf['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4af0f7,_0x33c2a7){return this['_getImageAsFile'](_0x4af0f7)['then'](_0x1948e8=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x33c2a7['signal'],'file':_0x1948e8,'onProgress':_0xb4013e=>{_0xb4013e&&_0xb4013e['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0xb4013e['value']));}}))['then'](_0x2c0784=>{const {width:_0x20fe43,height:_0x14b41f}=_0x2c0784['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2c0784['cdnUrl'],this['imageDimension']={'width':_0x20fe43,'height':_0x14b41f},this['imageId']=_0x2c0784['uuid'],this['imageUploadProgress']=null;const _0x2da422=_0x4af0f7['getAttribute']('src');this['_imageCache']['set'](_0x2da422,{'id':_0x2c0784['uuid'],'url':_0x2c0784['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x6c37e6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x6c37e6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4a41f2,_0x23d948){_0x4a41f2['on']('apply',(_0x525d3f,_0x334905)=>{this['_replaceImage'](_0x23d948,_0x334905['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4a41f2['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4a41f2['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5e12d5,_0x4a17a3,_0x5e9088){const _0x1b02a7=this['_editor'],{width:_0x2e3a86,height:_0x4845e3}=S(_0x4a17a3,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0xe4dee1,imageSources:_0x1447f8}=C(_0x4a17a3,_0x2e3a86);_0x1b02a7['model']['change'](_0x267d86=>{if('$graveyard'===_0x5e12d5['root']['rootName']){_0x1b02a7['execute']('insertImage',{'imageType':_0x5e12d5['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5e12d5['getAttributes']()),'uploadcareImageId':_0x5e9088,'src':_0xe4dee1,'sources':_0x1447f8,'width':_0x2e3a86,'height':_0x4845e3}});const _0x3f3b00=_0x5e12d5['getChildren']();_0x5e12d5=_0x1b02a7['model']['document']['selection']['getSelectedElement']();for(const _0xee70ba of _0x3f3b00)_0x267d86['append'](_0x267d86['cloneElement'](_0xee70ba),_0x5e12d5);}else _0x267d86['setSelection'](_0x5e12d5,'on'),_0x1b02a7['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5e12d5['getAttributes']()),'uploadcareImageId':_0x5e9088,'src':_0xe4dee1,'sources':_0x1447f8,'width':_0x2e3a86,'height':_0x4845e3},_0x5e12d5);_0x267d86['setSelection'](_0x5e12d5,'on');});}async['_getImageAsFile'](_0x341a94){const _0x19d578=_0x15fb89['window'],_0x27ef53=_0x15fb89['document']['location']['href'],_0x4e19f8=new _0x19d578['URL'](_0x341a94['getAttribute']('src'),_0x27ef53);if('data:'===_0x4e19f8['protocol']){const _0x3d95b4=_0x4e19f8['href']['split'](','),_0x1a67e7=_0x3d95b4[0x0]['match'](/:(.*?);/)[0x1],_0xed330a=_0x1a67e7['split']('/')[0x1],_0x566886=_0x19d578['atob'](_0x3d95b4[_0x3d95b4['length']-0x1]);let _0x247d38=_0x566886['length'];const _0x3835a=new _0x19d578['Uint8Array'](_0x247d38);for(;_0x247d38--;)_0x3835a[_0x247d38]=_0x566886['charCodeAt'](_0x247d38);return new _0x19d578['File']([_0x3835a],'image.'+_0xed330a,{'type':_0x1a67e7});}const _0x2d48ec=_0x4e19f8['href']['split']('/'),_0x507701=_0x2d48ec[_0x2d48ec['length']-0x1],_0x227185=_0x507701['split']('.')[0x1];return _0x19d578['fetch'](_0x4e19f8['href'])['then'](_0x3aab4d=>_0x3aab4d['clone']()['blob']())['then'](_0x49dd6f=>new _0x19d578['File']([_0x49dd6f],_0x507701,{'type':'image/'+_0x227185}));}}class Q extends _0x22cba9{['imageEditController'];static get['requires'](){return[_0x390c13];}['_isEditable'];constructor(_0x2082c3){super(_0x2082c3),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x438654){const _0x2ba54f=z(_0x438654);return _0x3f944e=>!(!_0x3f944e||!_0x3f944e['is']('element','imageBlock')&&!_0x3f944e['is']('element','imageInline'))&&(!!_0x3f944e['hasAttribute']('uploadcareImageId')||!!_0x3f944e['hasAttribute']('src')&&_0x2ba54f(_0x3f944e['getAttribute']('src')));}(_0x2082c3['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0xf7c38=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0xf7c38);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x8cb5fc=this['editor']['model']['document']['selection']['getSelectedElement']();_0x8cb5fc&&(_0x8cb5fc['is']('element','imageBlock')||_0x8cb5fc['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x390c13),_0x8cb5fc),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x22cba9{['refresh'](){const _0x371092=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x371092&&(_0x371092['is']('element','imageBlock')||_0x371092['is']('element','imageInline')));}['execute'](_0x3f227d){const _0x4cac5c=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x25f158=>{_0x25f158['setAttributes'](_0x3f227d,_0x4cac5c),_0x25f158['removeAttribute']('srcset',_0x4cac5c),_0x25f158['removeAttribute']('sizes',_0x4cac5c);});}}class m extends _0x964c97{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x140dff,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x425e75}=this;_0x425e75['commands']['add']('uploadcareImageEdit',new Q(_0x425e75)),_0x425e75['commands']['add']('uploadcareImageReplace',new V(_0x425e75));}}class g extends _0x964c97{['_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 _0x434030=this['editor'];_0x434030['ui']['componentFactory']['add']('uploadcareImageEdit',_0x188462=>{const _0x5ed877=_0x434030['commands']['get']('uploadcareImageEdit'),_0x533516=new _0x3bace2(_0x188462),t=_0x188462['t'];return _0x533516['set']({'icon':_0xea7d7a,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x533516['bind']('isEnabled')['to'](_0x5ed877),_0x533516['bind']('isOn')['to'](_0x5ed877,'isActive'),this['listenTo'](_0x533516,'execute',()=>{_0x434030['execute']('uploadcareImageEdit'),_0x434030['editing']['view']['focus']();}),_0x533516;}),this['_initConfig']();}['_initConfig'](){const _0x54d9ab=_0x97ddba(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x54d9ab),this['listenTo'](this['editor'],'destroy',()=>{_0x54d9ab['remove']();});}}class et extends _0x964c97{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x5e9db5,Command as _0x1ec3c8}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2e4afd,IconGooglePhotos as _0x4d9161,IconGoogleDrive as _0x34b3f1,IconFacebook as _0x26d73f,IconDropbox as _0x40e2d3,IconUploadcareLink as _0x49f18e,IconUploadcareImageUpload as _0x567c24,IconError as _0x1429ca,IconUploadcareImageEdit as _0x44f628}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x27297c,MenuBarMenuListItemButtonView as _0x10a452,View as _0x5acd6e,FocusCycler as _0x81f639,Dialog as _0x517d8d,DialogViewPosition as _0x4b4b66,SpinnerView as _0x5e8920,IconView as _0x347bf8,Notification as _0x2fe6ce}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2f1893,DomEmitterMixin as _0x1819b5,global as _0x28d71c,getAncestors as _0x3bea48,ObservableMixin as _0x588ef9,uid as _0x1ab349,createElement as _0x416c18}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0xde05e4}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x22c3ef,info as _0x6d4bd6}from'@uploadcare/upload-client';import*as _0xac3b09 from'@uploadcare/file-uploader';var i=function(_0x5f391d){return _0x5f391d['Local']='local',_0x5f391d['URL']='url',_0x5f391d['Dropbox']='dropbox',_0x5f391d['GDrive']='gdrive',_0x5f391d['Facebook']='facebook',_0x5f391d['GPhotos']='gphotos',_0x5f391d['OneDrive']='onedrive',_0x5f391d;}({});function _(_0x13b2f8,_0x42d2e8,_0x582374){const t=_0x13b2f8['t'],_0x34c135=_0x13b2f8['t'];switch(_0x42d2e8){case i['Local']:return{'text':_0x34c135('Insert'===_0x582374?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x34c135('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x582374?_0x34c135('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x34c135('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x582374?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x582374?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x582374?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x582374?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x582374?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x42d2e8;}}class e extends _0x5e9db5{['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 _0x5bbbf8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3ea89e;for(const _0x267465 in _0x5bbbf8){const _0x24b8d8=_0x267465,_0x2fbba0=_0x5bbbf8[_0x24b8d8];if('uploadcareLicenseKeyValid'==_0x2fbba0||'uploadcareLicenseKeyInvalid'==_0x2fbba0||'uploadcareLicenseKeyExpired'==_0x2fbba0||'uploadcareLicenseKeyDomainLimit'==_0x2fbba0||'uploadcareLicenseKeyNotAllowed'==_0x2fbba0||'uploadcareLicenseKeyEvaluationLimit'==_0x2fbba0||'uploadcareLicenseKeyUsageLimit'==_0x2fbba0){delete _0x5bbbf8[_0x24b8d8],_0x3ea89e=_0x2fbba0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x3ea89e&&_0x5bbbf8['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x3ea89e&&_0x5bbbf8['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x3ea89e&&_0x5bbbf8['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x3ea89e&&_0x5bbbf8['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x3ea89e&&_0x5bbbf8['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x3ea89e&&_0x5bbbf8['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x3c166e}=this,_0x569e1d=_0x3c166e['commands']['get']('uploadcare');if(!_0x569e1d)return;const _0x27c6dc=this['_normalizeConfigSourceList'](_0x3c166e['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x3c8931,_0x5428c4)=>{const _0x49d035=this['_getIntegrationKey'](_0x5428c4['type']);return _0x3c8931[_0x49d035]||(_0x3c8931[_0x49d035]=[]),_0x3c8931[_0x49d035]['push'](_0x5428c4),_0x3c8931;},{});_0x3c166e['plugins']['has']('ImageInsertUI')&&_0x3c166e['commands']['get']('uploadcare')&&Object['entries'](_0x27c6dc)['forEach'](([_0x9fb5da,_0x2f930c])=>{_0x3c166e['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x9fb5da,'observable':()=>_0x569e1d,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2f930c),'formViewCreator':()=>this['_createDropdownButtons'](_0x2f930c),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2f930c),'override':'assetManager'!==_0x9fb5da});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x16a703){const {locale:_0xda4220}=this['editor'];return _0x16a703['map'](_0x2ab646=>{const _0x5eaaba=_(_0xda4220,_0x2ab646,'Insert');switch(_0x2ab646){case i['Local']:return{'icon':_0x567c24,'type':i['Local'],..._0x5eaaba};case i['URL']:return{'icon':_0x49f18e,'type':i['URL'],..._0x5eaaba};case i['Dropbox']:return{'icon':_0x40e2d3,'type':i['Dropbox'],..._0x5eaaba};case i['Facebook']:return{'icon':_0x26d73f,'type':i['Facebook'],..._0x5eaaba};case i['GDrive']:return{'icon':_0x34b3f1,'type':i['GDrive'],..._0x5eaaba};case i['GPhotos']:return{'icon':_0x4d9161,'type':i['GPhotos'],..._0x5eaaba};case i['OneDrive']:return{'icon':_0x2e4afd,'type':i['OneDrive'],..._0x5eaaba};}});}['_getIntegrationKey'](_0x561217){switch(_0x561217){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x37b680,_0x1213e4){const _0x4e8d85=this['editor'],_0x4cc1d0=new _0x37b680(_0x4e8d85['locale']),_0x5bac80=_0x4e8d85['commands']['get']('uploadcare');return _0x4cc1d0['bind']('isEnabled')['to'](_0x5bac80),_0x4cc1d0['on']('execute',()=>{_0x5bac80['execute'](_0x1213e4);}),_0x4cc1d0;}['_createToolbarButton'](_0x208061){const {locale:_0x2cdb88}=this['editor'],_0x386e67=this['editor']['plugins']['get']('ImageInsertUI'),_0x37e5e0=_0x208061[0x0],_0x51a56d=this['_createButton'](_0x27297c,_0x37e5e0['type']);return _0x51a56d['icon']=_0x37e5e0['icon'],_0x51a56d['bind']('label')['to'](_0x386e67,'isImageSelected',_0x1c77db=>_(_0x2cdb88,_0x37e5e0['type'],_0x1c77db?'Replace':'Insert')['text']),_0x51a56d['tooltip']=!0x0,_0x51a56d;}['_createDropdownButtons'](_0x36e237){const {locale:_0x5336ac}=this['editor'],_0x44b68b=this['editor']['plugins']['get']('ImageInsertUI');return _0x36e237['map'](_0x52b59d=>{const _0x4ca869=this['_createButton'](_0x27297c,_0x52b59d['type']);return _0x4ca869['withText']=!0x0,_0x4ca869['icon']=_0x52b59d['icon'],_0x4ca869['bind']('label')['to'](_0x44b68b,'isImageSelected',_0x2f5459=>_(_0x5336ac,_0x52b59d['type'],_0x2f5459?'Replace':'Insert')['text']),_0x4ca869;});}['_createMenuBarButtons'](_0x2dd991){return _0x2dd991['map'](_0x5722cd=>{const _0x2fe825=this['_createButton'](_0x10a452,_0x5722cd['type']);return _0x2fe825['icon']=_0x5722cd['icon'],_0x2fe825['label']=_0x5722cd['shortText'],_0x2fe825;});}}class F extends _0x5acd6e{['focusTracker'];['focusCycler'];constructor(_0x497a9a){super(_0x497a9a),this['focusTracker']=new _0x2f1893(),this['focusCycler']=new _0x81f639({'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(_0x4e3370,_0x20a93){super(_0x4e3370),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-'+_0x20a93}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x1f7a5c,_0x47e60c){const _0x4c237d=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4bc8ab=>_0x4bc8ab<=_0x47e60c)['map'](_0x43f36d=>_0x1f7a5c['replace'](/\/$/,'')+'/-/resize/'+_0x43f36d+'x/\x20'+_0x43f36d+'w');return{'imageFallbackUrl':_0x1f7a5c,'imageSources':[{'srcset':_0x4c237d['join'](',\x20'),'sizes':'(max-width:\x20'+_0x47e60c+'px)\x20100vw,\x20'+_0x47e60c+'px','type':'image/webp'}]};}function S(_0x4d8d63,_0x6f2561,_0x19a992){const _0x1bb5c4=_0x4d8d63['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1bb5c4?parseInt(_0x1bb5c4[0x1],0xa):_0x6f2561,'height':_0x1bb5c4?parseInt(_0x1bb5c4[0x2],0xa):_0x19a992};}function p(_0x267934,_0x3e19ba){const _0x26fe7a=new(_0x1819b5())(),_0x507bbf=_0x267934['plugins']['get']('ImageUtils'),_0x32f23e=_0x267934['editing']['mapper']['toViewElement'](_0x3e19ba),_0x5490af=_0x507bbf['findViewImgElement'](_0x32f23e),_0xe16972=_0x267934['editing']['view']['domConverter']['viewToDom'](_0x5490af),_0xa800bb=_0x3e19ba['getAttribute']('width'),_0x27c6a2=_0x3e19ba['getAttribute']('height'),_0x5e373e='image-processing';_0x267934['editing']['view']['change'](_0x5581c8=>{_0x5581c8['addClass'](_0x5e373e,_0x32f23e),_0x5581c8['setStyle']('aspect-ratio',_0xa800bb+'/'+_0x27c6a2,_0x5490af);}),_0x26fe7a['listenTo'](_0xe16972,'load',()=>{_0x26fe7a['stopListening'](_0xe16972,'load'),_0x267934['editing']['view']['change'](_0x253d63=>{_0x253d63['removeClass'](_0x5e373e,_0x32f23e),_0x253d63['removeStyle']('aspect-ratio',_0x5490af);});});}function G(_0x2a06d8){if(Array['isArray'](_0x2a06d8)){const _0x52020a=_0x2a06d8['map'](G);return _0x301894=>_0x52020a['some'](_0xde3802=>_0xde3802(_0x301894));}if('origin'==_0x2a06d8){const _0xfd8ee9=_0x28d71c['window']['location']['origin'];return _0x252575=>new URL(_0x252575,_0x28d71c['document']['baseURI'])['origin']==_0xfd8ee9;}return'function'==typeof _0x2a06d8?_0x2a06d8:_0x2a06d8 instanceof RegExp?_0x58e39a=>!(!_0x58e39a['match'](_0x2a06d8)&&!_0x58e39a['replace'](/^https?:\/\//,'')['match'](_0x2a06d8)):()=>!0x1;}function A(_0x3c8904,_0x2a7622){return _0x3bea48(_0x3c8904['target'])['includes'](_0x2a7622);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x588ef9(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x37c8b8,_0x2fec0d,_0x59f3b0){super(),this['_editor']=_0x37c8b8,this['_editing']=_0x2fec0d,this['_dialog']=_0x37c8b8['plugins']['get'](_0x517d8d),this['_api']=_0x2fec0d['ctxElement']['getAPI'](),this['_type']=_0x59f3b0,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:_0x218264,model:_0x16bed1}=this['_editor'],_0xdf900b=_0x16bed1['document']['selection']['getSelectedElement'](),_0x532dc6=_0xdf900b&&(_0xdf900b['is']('element','imageBlock')||_0xdf900b['is']('element','imageInline'));this['_formView']=new x(_0x218264,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x567c24,'title':_(_0x218264,this['_type'],_0x532dc6?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x4b4b66['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4610f3=>!A(_0x4610f3,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x2c517f}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4670ce=>{const _0x1b0126=_0x2c517f['length'];for(const _0x2402a3 of _0x2c517f){const _0x51be8f=_0x2402a3===_0x2c517f[_0x1b0126-0x1],{cdnUrl:_0x5e9d51,fileInfo:_0x73d3f7}=_0x2402a3;if(!_0x5e9d51||!_0x73d3f7)continue;const {width:_0x3b9704,height:_0xf0312f}=_0x73d3f7['imageInfo'],_0x47b2a0=S(_0x5e9d51,_0x3b9704,_0xf0312f),_0x4d944c=C(_0x5e9d51,_0x47b2a0['width']),_0x842357={'id':_0x73d3f7['uuid'],'type':'image','attributes':{'imageDimension':_0x47b2a0,..._0x4d944c}};this['_insertAsset'](_0x842357,_0x51be8f,_0x4670ce);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x210521=>{'idle'===_0x210521['detail']['status']&&!_0x210521['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4293f4,_0x37c29e,_0xb7b54a){const _0x593b27=this['_editor']['model']['document']['selection'],_0x2ff933=_0x593b27['getSelectedElement'](),_0x51142=!(!_0x2ff933||!_0x2ff933['is']('element','imageInline'));_0xb7b54a['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4293f4,_0x51142),_0x37c29e||_0xb7b54a['setSelection'](_0x593b27['getLastPosition']());}['_insertImage'](_0x1f4bb6,_0x53ea3f){const _0x5f4b01=this['_editor'],{imageDimension:_0x463a9e,imageFallbackUrl:_0x76336d,imageSources:_0x2286ef}=_0x1f4bb6['attributes'];_0x5f4b01['execute']('insertImage',{'imageType':_0x53ea3f?'imageInline':null,'source':{'uploadcareImageId':_0x1f4bb6['id'],'src':_0x76336d,'sources':_0x2286ef,..._0x463a9e}});}}class w extends _0x1ec3c8{['_editing'];['_controller']=null;static get['requires'](){return[_0x517d8d,o];}constructor(_0x4816f9){super(_0x4816f9),this['_editing']=_0x4816f9['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x50e8f8){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x50e8f8);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0xbb605,..._0x3bf546}){return _0x22c3ef(_0xbb605,_0x3bf546);}static['getInfo'](_0x2f4f64,_0x266c08){return _0x6d4bd6(_0x2f4f64,_0x266c08);}}class f extends _0x5e9db5{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0xde05e4,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2389ac=this['editor'];if(!!!_0x2389ac['config']['get']('uploadcare'))return;_0x2389ac['plugins']['get'](_0xde05e4)['createUploadAdapter']=_0x5df860=>new k(_0x5df860,_0x2389ac),_0x2389ac['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x536d13,{imageElement:_0x9b6d7c,data:_0x525cf6})=>{_0x2389ac['model']['change'](_0x73d635=>{_0x73d635['setAttribute']('uploadcareImageId',_0x525cf6['uploadcareImageId'],_0x9b6d7c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x2258ad,_0x167272){this['loader']=_0x2258ad,this['editor']=_0x167272,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x3db68c=await this['loader']['file'];return j['upload']({'file':_0x3db68c,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x53ce44=>{_0x53ce44&&_0x53ce44['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x53ce44['value']);}})['then'](async _0x184725=>{const {imageFallbackUrl:_0xf43535,imageSources:_0xe26c7c}=C(_0x184725['cdnUrl'],_0x184725['imageInfo']['width']);return{'uploadcareImageId':_0x184725['uuid'],'default':_0xf43535,'sources':_0xe26c7c};})['catch'](()=>{const _0x3b5cf8=t('Cannot\x20upload\x20file:')+('\x20'+_0x3db68c['name']+'.');return Promise['reject'](_0x3b5cf8);});}['abort'](){this['controller']['abort']();}}class o extends _0x5e9db5{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x517d8d];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x9048b3){super(_0x9048b3),this['ucContextId']=_0x1ab349();}['init'](){const _0x2254bb=this['editor'];_0x2254bb['commands']['add']('uploadcare',new w(_0x2254bb));}['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 _0x461072=_0x28d71c['document']['querySelector']('input[uploadcare-file-input]');_0x461072&&_0x461072['remove']();}),async function(_0x577c97){const _0x54a337=_0x416fe9([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x13db4a=0x535f8c3a,_0x47ffa7=0x53580b02^_0x13db4a,_0x539ea0=window[_0x416fe9([0x44,0x61,0x74,0x65])][_0x416fe9([0x6e,0x6f,0x77])](),_0x4236b5=_0x577c97[_0x416fe9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4d8d5=new window[(_0x416fe9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b4c5c=>{_0x4236b5[_0x416fe9([0x6f,0x6e,0x63,0x65])](_0x416fe9([0x72,0x65,0x61,0x64,0x79]),_0x5b4c5c);}),_0x2ba013={[_0x416fe9([0x6b,0x74,0x79])]:_0x416fe9([0x45,0x43]),[_0x416fe9([0x75,0x73,0x65])]:_0x416fe9([0x73,0x69,0x67]),[_0x416fe9([0x63,0x72,0x76])]:_0x416fe9([0x50,0x2d,0x32,0x35,0x36]),[_0x416fe9([0x78])]:_0x416fe9([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]),[_0x416fe9([0x79])]:_0x416fe9([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]),[_0x416fe9([0x61,0x6c,0x67])]:_0x416fe9([0x45,0x53,0x32,0x35,0x36])},_0x32bd8a=_0x4236b5[_0x416fe9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x416fe9([0x67,0x65,0x74])](_0x416fe9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1a72a3(){let _0x31ef8e,_0x1857b1=null,_0x526b6b=null;try{if(_0x32bd8a==_0x416fe9([0x47,0x50,0x4c]))return _0x416fe9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x31ef8e=_0x5bd658(),!_0x31ef8e)return _0x416fe9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x31ef8e[_0x416fe9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x526b6b=_0x2625a5(_0x31ef8e[_0x416fe9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x31ef8e[_0x416fe9([0x6a,0x74,0x69])])),await _0x39d643()?_0x5741a0()?_0x3ec18a()?_0x416fe9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x47e3b0()?(_0x31ef8e[_0x416fe9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x416fe9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1857b1=_0x1f1f89(_0x416fe9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x18f98c()):_0x416fe9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x416fe9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x416fe9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x416fe9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3ec18a(){const _0x24d276=[_0x416fe9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x416fe9([0x74,0x72,0x69,0x61,0x6c])][_0x416fe9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31ef8e[_0x416fe9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x539ea0/0x3e8:0xe10*_0x47ffa7;return _0x31ef8e[_0x416fe9([0x65,0x78,0x70])]<_0x24d276;}function _0x5741a0(){const _0x4b3600=_0x31ef8e[_0x416fe9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4b3600&&(!!_0x4b3600[_0x416fe9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x416fe9([0x2a]))||!!_0x4b3600[_0x416fe9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x416fe9([0x55,0x50,0x4c,0x43])));}function _0x47e3b0(){const _0x1a723f=_0x31ef8e[_0x416fe9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1a723f||0x0==_0x1a723f[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4fb6e2}=new URL(window[_0x416fe9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1a723f[_0x416fe9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4fb6e2))return!0x0;const _0x4a1bf=_0x4fb6e2[_0x416fe9([0x73,0x70,0x6c,0x69,0x74])](_0x416fe9([0x2e]));return _0x1a723f[_0x416fe9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x547391=>_0x547391[_0x416fe9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x416fe9([0x2a])))[_0x416fe9([0x6d,0x61,0x70])](_0x29aa41=>_0x29aa41[_0x416fe9([0x73,0x70,0x6c,0x69,0x74])](_0x416fe9([0x2e])))[_0x416fe9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x153946=>_0x153946[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4a1bf[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x416fe9([0x6d,0x61,0x70])](_0x491e5f=>Array(_0x4a1bf[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x491e5f[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x416fe9([0x66,0x69,0x6c,0x6c])](_0x491e5f[0x0]===_0x416fe9([0x2a])?_0x416fe9([0x2a]):'')[_0x416fe9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x491e5f))[_0x416fe9([0x73,0x6f,0x6d,0x65])](_0x5e12c3=>_0x4a1bf[_0x416fe9([0x65,0x76,0x65,0x72,0x79])]((_0xf584ca,_0x11d923)=>_0x5e12c3[_0x11d923]===_0xf584ca||_0x5e12c3[_0x11d923]===_0x416fe9([0x2a])));}function _0x18f98c(){return _0x1857b1&&_0x526b6b?new window[(_0x416fe9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4e37af,_0x1c3af0)=>{_0x1857b1[_0x416fe9([0x74,0x68,0x65,0x6e])](_0x4e37af,_0x1c3af0),_0x526b6b[_0x416fe9([0x74,0x68,0x65,0x6e])](_0x127d9b=>{_0x127d9b!=_0x416fe9([0x56,0x61,0x6c,0x69,0x64])&&_0x4e37af(_0x127d9b);},_0x1c3af0);}):_0x1857b1||_0x526b6b||_0x416fe9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2625a5(_0x47d3bc,_0x35e631){return new window[(_0x416fe9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x98c541=>{if(_0x26ad36())return _0x98c541(_0x416fe9([0x56,0x61,0x6c,0x69,0x64]));_0x5b5eac(),_0x4236b5[_0x416fe9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x416fe9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x27bb32=!0x1;const _0x41efec=_0x1ab349();function _0x3d6126(_0x18d4b2){return!!_0x18d4b2&&(typeof _0x18d4b2===_0x416fe9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x18d4b2===_0x416fe9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x18d4b2[_0x416fe9([0x74,0x68,0x65,0x6e])]===_0x416fe9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x18d4b2[_0x416fe9([0x63,0x61,0x74,0x63,0x68])]===_0x416fe9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x28b089(_0xffc76d){_0x164669(_0xffc76d)[_0x416fe9([0x74,0x68,0x65,0x6e])](_0x1d6f14=>{if(!_0x1d6f14||_0x1d6f14[_0x416fe9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x416fe9([0x6f,0x6b]))return _0x416fe9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x318d33(_0x1df3ae(_0x41efec+_0x35e631))!=_0x1d6f14[_0x416fe9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x416fe9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x416fe9([0x56,0x61,0x6c,0x69,0x64]);})[_0x416fe9([0x74,0x68,0x65,0x6e])](_0x3e2d53=>(_0x5d59e8(),_0x3e2d53),()=>{const _0x366e64=_0x4b7baa();return null==_0x366e64?(_0x5d59e8(),_0x416fe9([0x56,0x61,0x6c,0x69,0x64])):_0x416fe9(_0x539ea0-_0x366e64>(0x7753083a^_0x13db4a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x416fe9([0x74,0x68,0x65,0x6e])](_0x98c541)[_0x416fe9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x98c541(_0x416fe9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x87a06=0x536962ba^_0x13db4a;function _0x5d59e8(){const _0x2c94c6=_0x416fe9([0x6c,0x6c,0x63,0x74,0x2d])+_0x318d33(_0x1df3ae(_0x47d3bc)),_0x4eece2=_0x42fe93(_0x318d33(window[_0x416fe9([0x4d,0x61,0x74,0x68])][_0x416fe9([0x63,0x65,0x69,0x6c])](_0x539ea0/_0x87a06)));window[_0x416fe9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x416fe9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c94c6,_0x4eece2);}function _0x4b7baa(){const _0x5e578a=_0x416fe9([0x6c,0x6c,0x63,0x74,0x2d])+_0x318d33(_0x1df3ae(_0x47d3bc)),_0x3ec8d9=window[_0x416fe9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x416fe9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5e578a);return _0x3ec8d9?window[_0x416fe9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x42fe93(_0x3ec8d9),0x10)*_0x87a06:null;}function _0x164669(_0x58bb43){return new window[(_0x416fe9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x194efb,_0x409dd7)=>{_0x58bb43[_0x416fe9([0x74,0x68,0x65,0x6e])](_0x194efb,_0x409dd7),window[_0x416fe9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x409dd7,0x535e58fa^_0x13db4a);});}}_0x4236b5[_0x416fe9([0x6f,0x6e])](_0x416fe9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2751e3,_0x1e767f)=>{if(_0x1e767f[0x0]!=_0x47d3bc)return _0x98c541(_0x416fe9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1e767f[0x1]={..._0x1e767f[0x1],[_0x416fe9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x41efec};},{[_0x416fe9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x416fe9([0x68,0x69,0x67,0x68])}),_0x4236b5[_0x416fe9([0x6f,0x6e])](_0x416fe9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3baae1=>{_0x3d6126(_0x3baae1[_0x416fe9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x27bb32=!0x0,_0x28b089(_0x3baae1[_0x416fe9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x416fe9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x416fe9([0x6c,0x6f,0x77])}),_0x4d8d5[_0x416fe9([0x74,0x68,0x65,0x6e])](()=>{_0x27bb32||_0x98c541(_0x416fe9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x26ad36(){return _0x4236b5[_0x416fe9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x416fe9([0x76,0x69,0x65,0x77])][_0x416fe9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x416fe9([0x61,0x75,0x74,0x6f]);}function _0x5b5eac(){_0x4236b5[_0x416fe9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x416fe9([0x76,0x69,0x65,0x77])][_0x416fe9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x416fe9([0x61,0x75,0x74,0x6f]);}}function _0x1f1f89(_0x3b585b){const _0x5b2a12=[new window[(_0x416fe9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5cdbb7=>setTimeout(_0x5cdbb7,0x5356b2f6^_0x13db4a)),_0x4d8d5[_0x416fe9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x416fe9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d32b4=>{let _0x384934=0x0;_0x4236b5[_0x416fe9([0x6d,0x6f,0x64,0x65,0x6c])][_0x416fe9([0x6f,0x6e])](_0x416fe9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1b4086,_0x412658)=>{_0x412658[0x0][_0x416fe9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x384934++,_0x384934==(0x535f89d2^_0x13db4a)&&(_0x4d32b4(),_0x1b4086[_0x416fe9([0x6f,0x66,0x66])]());});}))];return window[_0x416fe9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x416fe9([0x72,0x61,0x63,0x65])](_0x5b2a12)[_0x416fe9([0x74,0x68,0x65,0x6e])](()=>_0x3b585b);}async function _0x407d31(){await _0x4d8d5,_0x4236b5[_0x416fe9([0x6d,0x6f,0x64,0x65,0x6c])][_0x416fe9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x14ba87,_0x4236b5[_0x416fe9([0x6d,0x6f,0x64,0x65,0x6c])][_0x416fe9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x14ba87,_0x4236b5[_0x416fe9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x416fe9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3d2db4(_0x5b197d){const _0x5cb0e8=_0x4466b8();_0x4236b5[_0x5cb0e8]=_0x416fe9([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5b197d,_0x5b197d!=_0x416fe9([0x56,0x61,0x6c,0x69,0x64])&&_0x407d31();}function _0x4466b8(){const _0x3ba642=window[_0x416fe9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x416fe9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x416fe9([0x6e,0x6f,0x77])]())[_0x416fe9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x416fe9([0x2e]),'');let _0x37781a=_0x416fe9([0x68]);for(let _0x5414fb=0x0;_0x5414fb<_0x3ba642[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5414fb+=0x2){let _0x57e630=window[_0x416fe9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3ba642[_0x416fe9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5414fb,_0x5414fb+0x2));_0x57e630>=_0x54a337[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x57e630-=_0x54a337[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x37781a+=_0x54a337[_0x57e630];}return _0x37781a;}function _0x5bd658(){const _0x103a4a=_0x32bd8a[_0x416fe9([0x73,0x70,0x6c,0x69,0x74])](_0x416fe9([0x2e]));if(0x3!=_0x103a4a[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x40bbdb(_0x103a4a[0x1]);function _0x40bbdb(_0x2d12b4){const _0x211ee1=_0x969199(_0x2d12b4);return _0x211ee1&&_0x52598e()?_0x211ee1:null;function _0x52598e(){const _0x1e7471=_0x211ee1[_0x416fe9([0x6a,0x74,0x69])],_0x57a0c1=window[_0x416fe9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e7471[_0x416fe9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1e7471[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x10f9ed={..._0x211ee1,[_0x416fe9([0x6a,0x74,0x69])]:_0x1e7471[_0x416fe9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1e7471[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x10f9ed[_0x416fe9([0x76,0x63])],_0x1df3ae(_0x10f9ed)==_0x57a0c1;}}}async function _0x39d643(){let _0x1d3387=!0x0;try{const _0x154513=_0x32bd8a[_0x416fe9([0x73,0x70,0x6c,0x69,0x74])](_0x416fe9([0x2e])),[_0x4bb713,_0x1a56ca,_0xd274b0]=_0x154513;return _0x6e90(_0x4bb713),await _0x2332a4(_0x4bb713,_0x1a56ca,_0xd274b0),_0x1d3387;}catch{return!0x1;}function _0x6e90(_0x1c50f6){const _0x3b250b=_0x969199(_0x1c50f6);_0x3b250b&&_0x3b250b[_0x416fe9([0x61,0x6c,0x67])]==_0x416fe9([0x45,0x53,0x32,0x35,0x36])||(_0x1d3387=!0x1);}async function _0x2332a4(_0x7f4585,_0x4504a0,_0x9e4f7a){const _0x2b1633=window[_0x416fe9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x416fe9([0x66,0x72,0x6f,0x6d])](_0x5d593c(_0x9e4f7a),_0x8f90e7=>_0x8f90e7[_0x416fe9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3ba8cd=new window[(_0x416fe9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x416fe9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x7f4585+_0x416fe9([0x2e])+_0x4504a0),_0x50a4dc=window[_0x416fe9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x416fe9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x50a4dc)return;const _0x559802=await _0x50a4dc[_0x416fe9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x416fe9([0x6a,0x77,0x6b]),_0x2ba013,{[_0x416fe9([0x6e,0x61,0x6d,0x65])]:_0x416fe9([0x45,0x43,0x44,0x53,0x41]),[_0x416fe9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x416fe9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x416fe9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x50a4dc[_0x416fe9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x416fe9([0x6e,0x61,0x6d,0x65])]:_0x416fe9([0x45,0x43,0x44,0x53,0x41]),[_0x416fe9([0x68,0x61,0x73,0x68])]:{[_0x416fe9([0x6e,0x61,0x6d,0x65])]:_0x416fe9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x559802,_0x2b1633,_0x3ba8cd)||(_0x1d3387=!0x1);}}function _0x969199(_0x27ca62){return _0x27ca62[_0x416fe9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x416fe9([0x65,0x79]))?JSON[_0x416fe9([0x70,0x61,0x72,0x73,0x65])](_0x5d593c(_0x27ca62)):null;}function _0x5d593c(_0x2d755c){return window[_0x416fe9([0x61,0x74,0x6f,0x62])](_0x2d755c[_0x416fe9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x416fe9([0x2b]))[_0x416fe9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x416fe9([0x2f])));}function _0x1df3ae(_0x325183){let _0xe1c05b=0x1505;function _0x37efee(_0x594341){for(let _0x4bbe30=0x0;_0x4bbe30<_0x594341[_0x416fe9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4bbe30++){const _0xdd8b24=_0x594341[_0x416fe9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4bbe30);_0xe1c05b=(_0xe1c05b<<0x5)+_0xe1c05b+_0xdd8b24,_0xe1c05b&=_0xe1c05b;}}function _0x153f3b(_0x24a3d9){Array[_0x416fe9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x24a3d9)?_0x24a3d9[_0x416fe9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x153f3b):_0x24a3d9&&typeof _0x24a3d9==_0x416fe9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x416fe9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x24a3d9)[_0x416fe9([0x73,0x6f,0x72,0x74])]()[_0x416fe9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2a2ae4,_0x267635])=>{_0x37efee(_0x2a2ae4),_0x153f3b(_0x267635);}):_0x37efee(window[_0x416fe9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x24a3d9));}return _0x153f3b(_0x325183),_0xe1c05b>>>0x0;}function _0x318d33(_0x3ebf3f){return _0x3ebf3f[_0x416fe9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x416fe9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x416fe9([0x30]));}function _0x42fe93(_0x487c23){return _0x487c23[_0x416fe9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x416fe9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x416fe9([0x6a,0x6f,0x69,0x6e])]('');}function _0x14ba87(){}function _0x416fe9(_0x4c35c){return _0x4c35c['map'](_0x29e61b=>String['fromCharCode'](_0x29e61b))['join']('');}_0x3d2db4(await _0x1a72a3());}(this);}['_initSchema'](){const _0x443663=this['editor']['model']['schema'];_0x443663['isRegistered']('imageBlock')&&_0x443663['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x443663['isRegistered']('imageInline')&&_0x443663['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x30307b=this['editor'];_0x30307b['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x30307b['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x47dd4c=>_0x47dd4c['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3448f1=_0x30307b['commands']['get']('replaceImageSource');_0x3448f1&&this['listenTo'](_0x3448f1,'cleanupImage',(_0x3837ee,[_0x4e26ce,_0x493e01])=>{_0x4e26ce['removeAttribute']('uploadcareImageId',_0x493e01);});}['_initConfig'](){const _0x1d7408=this['editor']['config']['get']('uploadcare.uploader')||{},_0x564bc0=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x416c18(_0x28d71c['document'],'uc-config',{..._0x1d7408,'pubkey':_0x564bc0,'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']=_0x4a1247=>{if('closeMax'==_0x4a1247)return'#uc-icon-arrow-down';},_0x28d71c['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x416c18(_0x28d71c['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x28d71c['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x311cdc=this['editor']['commands']['get']('insertImage');_0x311cdc&&this['listenTo'](_0x311cdc,'execute',()=>{const _0x18fd0d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x18fd0d&&_0x18fd0d['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x18fd0d);});});const _0x1caefc=this['editor']['commands']['get']('uploadcareImageReplace');_0x1caefc&&this['listenTo'](_0x1caefc,'execute',()=>{const _0x582e4a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x582e4a&&_0x582e4a['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x582e4a);});});}}class tt extends _0x5e9db5{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x46e54f){super(_0x46e54f),_0x46e54f['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0xac3b09['defineComponents'](_0xac3b09),this['_defineLocale']();}['_defineLocale'](){const _0x36370f=this['editor']['config']['get']('uploadcare.locale'),_0xe05b90=this['editor']['locale']['contentLanguage'];_0x36370f&&_0xac3b09['defineLocale'](_0xe05b90,_0x36370f);}}class ii extends _0x5acd6e{constructor(_0x592bcb){super(_0x592bcb);const t=_0x592bcb['t'],_0x24be38=this['bindTemplate'],_0x79888c=new _0x5e8920();_0x79888c['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':[_0x79888c,{'text':_0x24be38['to']('imageUploadProgress',_0x2d3c53=>t('Loading\x20image...')+'\x20('+(_0x2d3c53||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 _0x5acd6e{constructor(_0x51c3fa){super(_0x51c3fa);const t=_0x51c3fa['t'];this['set']('errorType',null);const _0x1413f9=new _0x27297c(_0x51c3fa);_0x1413f9['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1413f9['withText']=!0x0,_0x1413f9['class']='ck-button-action',_0x1413f9['on']('execute',()=>{this['fire']('retry');}),_0x1413f9['bind']('isVisible')['to'](this,'errorType',_0x2b6f2a=>'NotFound'!==_0x2b6f2a);const _0x51f9ed=new _0x347bf8();_0x51f9ed['content']=_0x1429ca,_0x51f9ed['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x196c37=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':[_0x51f9ed,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x196c37['to']('errorType',_0x88beeb=>t('NotFound'!==_0x88beeb?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1413f9]},{'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 _0x5acd6e{constructor(_0x4c7990,_0x570919){super(_0x4c7990);const _0x2e397d=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x570919,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2e397d['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x157652,_0x1aea69,_0x7ddca5){super(_0x157652),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x157652),this['_errorView']=new ti(_0x157652),this['_editingView']=new ei(_0x157652,_0x7ddca5),this['_focusableView']=new _0x5acd6e(_0x157652),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x1aea69),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'],_0x57ab7=>{this['_addUploadcareImageEditorListeners'](_0x57ab7);});}),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'](_0x43b2d6,_0x154f4a){const _0x4f25e2='uc-cloud-image-editor',_0x160fff=_0x43b2d6['querySelector'](_0x4f25e2);if(_0x160fff)return _0x154f4a(_0x160fff);const _0x56be93=new MutationObserver(_0x5212f2=>{const _0xac31af=_0x5212f2['filter'](_0x417c27=>_0x417c27['target']===_0x43b2d6&&_0x417c27['addedNodes']['length']>0x0&&_0x417c27['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4f25e2);_0xac31af['length']&&(_0x56be93['disconnect'](),_0x154f4a(_0xac31af[0x0]['addedNodes'][0x0]));});_0x56be93['observe'](_0x43b2d6,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x400b02){_0x400b02['addEventListener']('apply',_0x5a0910=>{this['fire']('apply',{'imageSrc':_0x5a0910['detail']['cdnUrl']});}),_0x400b02['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x588ef9(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x32218a,_0x4412b5,_0x2a6410){super(),this['_editor']=_0x32218a,this['_dialog']=_0x4412b5,this['_imageElement']=_0x2a6410,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 _0x3443d5=this['_imageElement'],_0x617380=_0x3443d5['getAttribute']('uploadcareImageId'),_0x1fba24=_0x3443d5['getAttribute']('src');if(_0x617380)await this['_loadImageInfo'](_0x617380,_0x1fba24);else{if(this['_imageCache']['has'](_0x1fba24)){const _0x6665d7=this['_imageCache']['get'](_0x1fba24);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x6665d7['url'],this['imageDimension']=_0x6665d7['dimension'],this['imageId']=_0x6665d7['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2f35cf}=this['_editor'],t=_0x2f35cf['t'],_0x4d59cb=new X(_0x2f35cf,this['imageStatus'],this['_attributes']);_0x4d59cb['bind']('status')['to'](this,'imageStatus'),_0x4d59cb['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4d59cb['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4d59cb['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4d59cb,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x44f628,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4d59cb,'position':_0x4b4b66['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4d59cb['focus']();},'onHide':()=>{_0x4d59cb['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2e77b3=>!A(_0x2e77b3,_0x4d59cb['element'])}});}['_loadImageInfo'](_0x15b507,_0x17372c){return j['getInfo'](_0x15b507,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x1e80da=>{const {width:_0x3acf7a,height:_0x56484c}=_0x1e80da['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x17372c,this['imageDimension']={'width':_0x3acf7a,'height':_0x56484c},this['imageId']=_0x15b507;})['catch'](_0x3c647c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3c647c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x31563e,_0x31b918){return this['_getImageAsFile'](_0x31563e)['then'](_0x3f5b24=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x31b918['signal'],'file':_0x3f5b24,'onProgress':_0x1fb175=>{_0x1fb175&&_0x1fb175['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1fb175['value']));}}))['then'](_0x59ca71=>{const {width:_0x19d9b0,height:_0x26fd2f}=_0x59ca71['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x59ca71['cdnUrl'],this['imageDimension']={'width':_0x19d9b0,'height':_0x26fd2f},this['imageId']=_0x59ca71['uuid'],this['imageUploadProgress']=null;const _0x7e5986=_0x31563e['getAttribute']('src');this['_imageCache']['set'](_0x7e5986,{'id':_0x59ca71['uuid'],'url':_0x59ca71['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x14414b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x14414b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3c8fd0,_0x29b94d){_0x3c8fd0['on']('apply',(_0x2c6310,_0x29cf8a)=>{this['_replaceImage'](_0x29b94d,_0x29cf8a['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3c8fd0['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3c8fd0['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x43287b,_0x38a9b4,_0x39f613){const _0x37b328=this['_editor'],{width:_0x1eeaf8,height:_0x364c6e}=S(_0x38a9b4,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x47291d,imageSources:_0x2b88a8}=C(_0x38a9b4,_0x1eeaf8);_0x37b328['model']['change'](_0x31e984=>{if('$graveyard'===_0x43287b['root']['rootName']){_0x37b328['execute']('insertImage',{'imageType':_0x43287b['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x43287b['getAttributes']()),'uploadcareImageId':_0x39f613,'src':_0x47291d,'sources':_0x2b88a8,'width':_0x1eeaf8,'height':_0x364c6e}});const _0x50675a=_0x43287b['getChildren']();_0x43287b=_0x37b328['model']['document']['selection']['getSelectedElement']();for(const _0x41f911 of _0x50675a)_0x31e984['append'](_0x31e984['cloneElement'](_0x41f911),_0x43287b);}else _0x31e984['setSelection'](_0x43287b,'on'),_0x37b328['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x43287b['getAttributes']()),'uploadcareImageId':_0x39f613,'src':_0x47291d,'sources':_0x2b88a8,'width':_0x1eeaf8,'height':_0x364c6e},_0x43287b);_0x31e984['setSelection'](_0x43287b,'on');});}async['_getImageAsFile'](_0x357b21){const _0xa1b606=_0x28d71c['window'],_0x15b408=_0x28d71c['document']['location']['href'],_0x173a43=new _0xa1b606['URL'](_0x357b21['getAttribute']('src'),_0x15b408);if('data:'===_0x173a43['protocol']){const _0x3039db=_0x173a43['href']['split'](','),_0x1585c7=_0x3039db[0x0]['match'](/:(.*?);/)[0x1],_0x1a4b34=_0x1585c7['split']('/')[0x1],_0x349527=_0xa1b606['atob'](_0x3039db[_0x3039db['length']-0x1]);let _0x40a8bf=_0x349527['length'];const _0xf57240=new _0xa1b606['Uint8Array'](_0x40a8bf);for(;_0x40a8bf--;)_0xf57240[_0x40a8bf]=_0x349527['charCodeAt'](_0x40a8bf);return new _0xa1b606['File']([_0xf57240],'image.'+_0x1a4b34,{'type':_0x1585c7});}const _0x1b6839=_0x173a43['href']['split']('/'),_0x2baaaa=_0x1b6839[_0x1b6839['length']-0x1],_0xd50849=_0x2baaaa['split']('.')[0x1];return _0xa1b606['fetch'](_0x173a43['href'])['then'](_0x12c3d5=>_0x12c3d5['clone']()['blob']())['then'](_0x2b3382=>new _0xa1b606['File']([_0x2b3382],_0x2baaaa,{'type':'image/'+_0xd50849}));}}class O extends _0x1ec3c8{['imageEditController'];static get['requires'](){return[_0x517d8d];}['_isEditable'];constructor(_0x1b3ec6){super(_0x1b3ec6),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x24b2c9){const _0x311b16=G(_0x24b2c9);return _0x248c40=>!(!_0x248c40||!_0x248c40['is']('element','imageBlock')&&!_0x248c40['is']('element','imageInline'))&&(!!_0x248c40['hasAttribute']('uploadcareImageId')||!!_0x248c40['hasAttribute']('src')&&_0x311b16(_0x248c40['getAttribute']('src')));}(_0x1b3ec6['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2e4f31=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2e4f31);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x15eb5c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x15eb5c&&(_0x15eb5c['is']('element','imageBlock')||_0x15eb5c['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x517d8d),_0x15eb5c),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x1ec3c8{['refresh'](){const _0xb41330=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0xb41330&&(_0xb41330['is']('element','imageBlock')||_0xb41330['is']('element','imageInline')));}['execute'](_0x44b493){const _0x4ed3b5=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x1641bf=>{_0x1641bf['setAttributes'](_0x44b493,_0x4ed3b5),_0x1641bf['removeAttribute']('srcset',_0x4ed3b5),_0x1641bf['removeAttribute']('sizes',_0x4ed3b5);});}}class m extends _0x5e9db5{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2fe6ce,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xecac7a}=this;_0xecac7a['commands']['add']('uploadcareImageEdit',new O(_0xecac7a)),_0xecac7a['commands']['add']('uploadcareImageReplace',new R(_0xecac7a));}}class g extends _0x5e9db5{['_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 _0x516301=this['editor'];_0x516301['ui']['componentFactory']['add']('uploadcareImageEdit',_0x323c46=>{const _0x4cfef4=_0x516301['commands']['get']('uploadcareImageEdit'),_0x25ed73=new _0x27297c(_0x323c46),t=_0x323c46['t'];return _0x25ed73['set']({'icon':_0x44f628,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x25ed73['bind']('isEnabled')['to'](_0x4cfef4),_0x25ed73['bind']('isOn')['to'](_0x4cfef4,'isActive'),this['listenTo'](_0x25ed73,'execute',()=>{_0x516301['execute']('uploadcareImageEdit'),_0x516301['editing']['view']['focus']();}),_0x25ed73;}),this['_initConfig']();}['_initConfig'](){const _0xb2280e=_0x416c18(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xb2280e),this['listenTo'](this['editor'],'destroy',()=>{_0xb2280e['remove']();});}}class et extends _0x5e9db5{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "47.7.0-alpha.
|
|
3
|
+
"version": "47.7.0-alpha.3",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "47.7.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "47.7.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-image": "47.7.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "47.7.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "47.7.0-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "47.7.0-alpha.
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "47.7.0-alpha.
|
|
33
|
-
"ckeditor5": "47.7.0-alpha.
|
|
26
|
+
"@ckeditor/ckeditor5-core": "47.7.0-alpha.3",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "47.7.0-alpha.3",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "47.7.0-alpha.3",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "47.7.0-alpha.3",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "47.7.0-alpha.3",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "47.7.0-alpha.3",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "47.7.0-alpha.3",
|
|
33
|
+
"ckeditor5": "47.7.0-alpha.3",
|
|
34
34
|
"@uploadcare/file-uploader": "1.24.5",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x333856=_0x1529;(function(_0x378477,_0x264c2f){const _0x35b970=_0x1529,_0x5a3bcb=_0x378477();while(!![]){try{const _0x592a58=-parseInt(_0x35b970(0x85))/0x1+parseInt(_0x35b970(0x8a))/0x2+parseInt(_0x35b970(0xc3))/0x3*(-parseInt(_0x35b970(0x99))/0x4)+-parseInt(_0x35b970(0x9b))/0x5+-parseInt(_0x35b970(0xd4))/0x6+-parseInt(_0x35b970(0x83))/0x7*(-parseInt(_0x35b970(0x89))/0x8)+parseInt(_0x35b970(0xc4))/0x9*(parseInt(_0x35b970(0xb1))/0xa);if(_0x592a58===_0x264c2f)break;else _0x5a3bcb['push'](_0x5a3bcb['shift']());}catch(_0x1bf2cb){_0x5a3bcb['push'](_0x5a3bcb['shift']());}}}(_0x593b,0x54061));import{Plugin as _0x5efb59}from'ckeditor5/src/core.js';function _0x593b(){const _0x4bb6bf=['1394616ImgYMM','113982cLyUxp','_initConversion','input[uploadcare-file-input]','uploadcare','insertImage','elementToAttribute','configElement','_initImageProcessingIndicator','fromCharCode','editing','uploadcare.uploader','getAttribute','isRegistered','for','_configElement','4tMHvXq','_initSchema','533830wfYxul','model','execute','PictureEditing','contentLanguage','extend','editor','schema','true','add','map','isPremiumPlugin','init','\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09','appendChild','destroy','cleanupImage','getSelectedElement','_ctxElement','uploadcareImageReplace','remove','uploader-','7326010KbRxIf','ctxElement','upcast','config','_initConfig','listenTo','ucContextId','once','get','uc-config','requires','uploadcareImageId','uploadcare.pubkey','afterInit','data-uc-image-id','join','#uc-icon-arrow-down','removeAttribute','820905LOAVkS','9GlEvbt','commands','isOfficialPlugin','imageInline','uc-upload-ctx-provider','body','imageBlock','locale','downcast','selection','render','querySelector','document','pluginName','closeMax','replaceImageSource','2089914sqPrVP','conversion','iconHrefResolver','UploadcareEditing','14MhjjLC','href','65365WmzZuO','_initCtx','view','attributeToAttribute'];_0x593b=function(){return _0x4bb6bf;};return _0x593b();}import{Dialog as _0x2bac8e}from'ckeditor5/src/ui.js';import{createElement as _0x41fd7f,global as _0x456893,uid as _0x182fbe}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x3a10c7}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x184f77}from'./uploadcareuploadadapter.js';function _0x1529(_0x3f4562,_0x3cb0dc){const _0x593bce=_0x593b();return _0x1529=function(_0x152992,_0x52e547){_0x152992=_0x152992-0x83;let _0xb7ad2=_0x593bce[_0x152992];return _0xb7ad2;},_0x1529(_0x3f4562,_0x3cb0dc);}import{showImageProcessingIndicator as _0x2d5c12}from'./utils/editingutils.js';export class UploadcareEditing extends _0x5efb59{[_0x333856(0x98)]=null;[_0x333856(0xad)]=null;static get[_0x333856(0xd1)](){const _0x2fafbe=_0x333856;return _0x2fafbe(0xd7);}static get[_0x333856(0xbb)](){const _0x3c411d=_0x333856;return[_0x3c411d(0x9e),_0x184f77,_0x2bac8e];}static get[_0x333856(0xc6)](){return!0x0;}static get[_0x333856(0xa6)](){return!0x0;}[_0x333856(0xb7)];get[_0x333856(0x90)](){const _0x543101=_0x333856;return this[_0x543101(0x98)];}get[_0x333856(0xb2)](){const _0x467260=_0x333856;return this[_0x467260(0xad)];}constructor(_0x1c45e9){const _0x523480=_0x333856;super(_0x1c45e9),this[_0x523480(0xb7)]=_0x182fbe();}[_0x333856(0xa7)](){const _0x4ea539=_0x333856,_0x4558d6=this[_0x4ea539(0xa1)];_0x4558d6[_0x4ea539(0xc5)][_0x4ea539(0xa4)](_0x4ea539(0x8d),new _0x3a10c7(_0x4558d6));}[_0x333856(0xbe)](){const _0xb908a2=_0x333856;this[_0xb908a2(0x9a)](),this[_0xb908a2(0x8b)](),this[_0xb908a2(0xb5)](),this[_0xb908a2(0x86)](),this[_0xb908a2(0x91)](),this[_0xb908a2(0xb6)](this[_0xb908a2(0xa1)],_0xb908a2(0xaa),()=>{const _0x4b2bda=_0xb908a2;this[_0x4b2bda(0x98)]&&(this[_0x4b2bda(0x98)][_0x4b2bda(0xaf)](),this[_0x4b2bda(0x98)]=null),this[_0x4b2bda(0xad)]&&(this[_0x4b2bda(0xad)][_0x4b2bda(0xaf)](),this[_0x4b2bda(0xad)]=null);const _0x57f17c=_0x456893[_0x4b2bda(0xd0)][_0x4b2bda(0xcf)](_0x4b2bda(0x8c));_0x57f17c&&_0x57f17c[_0x4b2bda(0xaf)]();}),async function(_0x53bb69){const _0x1ec18a=_0x15ef4d([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x28f4a8=0x535f8c3a,_0x22846e=0x53580b1a^_0x28f4a8,_0x3919cd=window[_0x15ef4d([0x44,0x61,0x74,0x65])][_0x15ef4d([0x6e,0x6f,0x77])](),_0x23f38a=_0x53bb69[_0x15ef4d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x393255=new window[(_0x15ef4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x221ea5=>{_0x23f38a[_0x15ef4d([0x6f,0x6e,0x63,0x65])](_0x15ef4d([0x72,0x65,0x61,0x64,0x79]),_0x221ea5);}),_0x2e4756={[_0x15ef4d([0x6b,0x74,0x79])]:_0x15ef4d([0x45,0x43]),[_0x15ef4d([0x75,0x73,0x65])]:_0x15ef4d([0x73,0x69,0x67]),[_0x15ef4d([0x63,0x72,0x76])]:_0x15ef4d([0x50,0x2d,0x32,0x35,0x36]),[_0x15ef4d([0x78])]:_0x15ef4d([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]),[_0x15ef4d([0x79])]:_0x15ef4d([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]),[_0x15ef4d([0x61,0x6c,0x67])]:_0x15ef4d([0x45,0x53,0x32,0x35,0x36])},_0x4987d0=_0x23f38a[_0x15ef4d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x15ef4d([0x67,0x65,0x74])](_0x15ef4d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2c1125(){let _0x382be0,_0x6c625=null,_0x33bc07=null;try{if(_0x4987d0==_0x15ef4d([0x47,0x50,0x4c]))return _0x15ef4d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x382be0=_0x375a0f(),!_0x382be0)return _0x15ef4d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x382be0[_0x15ef4d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x33bc07=_0x182e34(_0x382be0[_0x15ef4d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x382be0[_0x15ef4d([0x6a,0x74,0x69])])),await _0x5b9991()?_0x27981f()?_0x1694a9()?_0x15ef4d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x24325f()?(_0x382be0[_0x15ef4d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x15ef4d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x6c625=_0x3a87d5(_0x15ef4d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x511468()):_0x15ef4d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x15ef4d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x15ef4d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x15ef4d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1694a9(){const _0x5a9856=[_0x15ef4d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x15ef4d([0x74,0x72,0x69,0x61,0x6c])][_0x15ef4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x382be0[_0x15ef4d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3919cd/0x3e8:0xe10*_0x22846e;return _0x382be0[_0x15ef4d([0x65,0x78,0x70])]<_0x5a9856;}function _0x27981f(){const _0x137d76=_0x382be0[_0x15ef4d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x137d76&&(!!_0x137d76[_0x15ef4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15ef4d([0x2a]))||!!_0x137d76[_0x15ef4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15ef4d([0x55,0x50,0x4c,0x43])));}function _0x24325f(){const _0x292233=_0x1529,_0x254f7d=_0x382be0[_0x15ef4d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x254f7d||0x0==_0x254f7d[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x115666}=new URL(window[_0x15ef4d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x292233(0x84)]);if(_0x254f7d[_0x15ef4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x115666))return!0x0;const _0x4ab29d=_0x115666[_0x15ef4d([0x73,0x70,0x6c,0x69,0x74])](_0x15ef4d([0x2e]));return _0x254f7d[_0x15ef4d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x53d082=>_0x53d082[_0x15ef4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15ef4d([0x2a])))[_0x15ef4d([0x6d,0x61,0x70])](_0x3c18a6=>_0x3c18a6[_0x15ef4d([0x73,0x70,0x6c,0x69,0x74])](_0x15ef4d([0x2e])))[_0x15ef4d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x537135=>_0x537135[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4ab29d[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x15ef4d([0x6d,0x61,0x70])](_0x5a49ce=>Array(_0x4ab29d[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5a49ce[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x15ef4d([0x66,0x69,0x6c,0x6c])](_0x5a49ce[0x0]===_0x15ef4d([0x2a])?_0x15ef4d([0x2a]):'')[_0x15ef4d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5a49ce))[_0x15ef4d([0x73,0x6f,0x6d,0x65])](_0x373e41=>_0x4ab29d[_0x15ef4d([0x65,0x76,0x65,0x72,0x79])]((_0x4db9a1,_0xeb8114)=>_0x373e41[_0xeb8114]===_0x4db9a1||_0x373e41[_0xeb8114]===_0x15ef4d([0x2a])));}function _0x511468(){return _0x6c625&&_0x33bc07?new window[(_0x15ef4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xb7ef6c,_0x5f58fb)=>{_0x6c625[_0x15ef4d([0x74,0x68,0x65,0x6e])](_0xb7ef6c,_0x5f58fb),_0x33bc07[_0x15ef4d([0x74,0x68,0x65,0x6e])](_0xf44fcd=>{_0xf44fcd!=_0x15ef4d([0x56,0x61,0x6c,0x69,0x64])&&_0xb7ef6c(_0xf44fcd);},_0x5f58fb);}):_0x6c625||_0x33bc07||_0x15ef4d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x182e34(_0xd6e6d6,_0x27281e){return new window[(_0x15ef4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5503a3=>{if(_0x261a70())return _0x5503a3(_0x15ef4d([0x56,0x61,0x6c,0x69,0x64]));_0x3602f9(),_0x23f38a[_0x15ef4d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x15ef4d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1d030d=!0x1;const _0x190dfe=_0x182fbe();function _0x280779(_0x3e22ec){return!!_0x3e22ec&&(typeof _0x3e22ec===_0x15ef4d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3e22ec===_0x15ef4d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3e22ec[_0x15ef4d([0x74,0x68,0x65,0x6e])]===_0x15ef4d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3e22ec[_0x15ef4d([0x63,0x61,0x74,0x63,0x68])]===_0x15ef4d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xf1c34(_0x43cd02){_0x1c41b4(_0x43cd02)[_0x15ef4d([0x74,0x68,0x65,0x6e])](_0x3d2922=>{if(!_0x3d2922||_0x3d2922[_0x15ef4d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x15ef4d([0x6f,0x6b]))return _0x15ef4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x446927(_0x1b776f(_0x190dfe+_0x27281e))!=_0x3d2922[_0x15ef4d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x15ef4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x15ef4d([0x56,0x61,0x6c,0x69,0x64]);})[_0x15ef4d([0x74,0x68,0x65,0x6e])](_0x3db842=>(_0x2accff(),_0x3db842),()=>{const _0x45469d=_0x3727ae();return null==_0x45469d?(_0x2accff(),_0x15ef4d([0x56,0x61,0x6c,0x69,0x64])):_0x15ef4d(_0x3919cd-_0x45469d>(0x7753083a^_0x28f4a8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x15ef4d([0x74,0x68,0x65,0x6e])](_0x5503a3)[_0x15ef4d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5503a3(_0x15ef4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x548b22=0x536962ba^_0x28f4a8;function _0x2accff(){const _0x29146c=_0x15ef4d([0x6c,0x6c,0x63,0x74,0x2d])+_0x446927(_0x1b776f(_0xd6e6d6)),_0x4b4f48=_0x308d0b(_0x446927(window[_0x15ef4d([0x4d,0x61,0x74,0x68])][_0x15ef4d([0x63,0x65,0x69,0x6c])](_0x3919cd/_0x548b22)));window[_0x15ef4d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x15ef4d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x29146c,_0x4b4f48);}function _0x3727ae(){const _0xbe5745=_0x15ef4d([0x6c,0x6c,0x63,0x74,0x2d])+_0x446927(_0x1b776f(_0xd6e6d6)),_0x552e7c=window[_0x15ef4d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x15ef4d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xbe5745);return _0x552e7c?window[_0x15ef4d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x308d0b(_0x552e7c),0x10)*_0x548b22:null;}function _0x1c41b4(_0x51d252){return new window[(_0x15ef4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d299c,_0x14379c)=>{_0x51d252[_0x15ef4d([0x74,0x68,0x65,0x6e])](_0x2d299c,_0x14379c),window[_0x15ef4d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x14379c,0x535e58fa^_0x28f4a8);});}}_0x23f38a[_0x15ef4d([0x6f,0x6e])](_0x15ef4d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1f3ddc,_0x2e5a18)=>{if(_0x2e5a18[0x0]!=_0xd6e6d6)return _0x5503a3(_0x15ef4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2e5a18[0x1]={..._0x2e5a18[0x1],[_0x15ef4d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x190dfe};},{[_0x15ef4d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x15ef4d([0x68,0x69,0x67,0x68])}),_0x23f38a[_0x15ef4d([0x6f,0x6e])](_0x15ef4d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5158a4=>{_0x280779(_0x5158a4[_0x15ef4d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1d030d=!0x0,_0xf1c34(_0x5158a4[_0x15ef4d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x15ef4d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x15ef4d([0x6c,0x6f,0x77])}),_0x393255[_0x15ef4d([0x74,0x68,0x65,0x6e])](()=>{_0x1d030d||_0x5503a3(_0x15ef4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x261a70(){return _0x23f38a[_0x15ef4d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x15ef4d([0x76,0x69,0x65,0x77])][_0x15ef4d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x15ef4d([0x61,0x75,0x74,0x6f]);}function _0x3602f9(){_0x23f38a[_0x15ef4d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x15ef4d([0x76,0x69,0x65,0x77])][_0x15ef4d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x15ef4d([0x61,0x75,0x74,0x6f]);}}function _0x3a87d5(_0x599379){const _0x5ccb18=[new window[(_0x15ef4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18aef0=>setTimeout(_0x18aef0,0x5356b2f6^_0x28f4a8)),_0x393255[_0x15ef4d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x15ef4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18d23d=>{let _0x49d93c=0x0;_0x23f38a[_0x15ef4d([0x6d,0x6f,0x64,0x65,0x6c])][_0x15ef4d([0x6f,0x6e])](_0x15ef4d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1fafbe,_0x353559)=>{_0x353559[0x0][_0x15ef4d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x49d93c++,_0x49d93c==(0x535f89d2^_0x28f4a8)&&(_0x18d23d(),_0x1fafbe[_0x15ef4d([0x6f,0x66,0x66])]());});}))];return window[_0x15ef4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x15ef4d([0x72,0x61,0x63,0x65])](_0x5ccb18)[_0x15ef4d([0x74,0x68,0x65,0x6e])](()=>_0x599379);}async function _0x35d348(){await _0x393255,_0x23f38a[_0x15ef4d([0x6d,0x6f,0x64,0x65,0x6c])][_0x15ef4d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x46c4d1,_0x23f38a[_0x15ef4d([0x6d,0x6f,0x64,0x65,0x6c])][_0x15ef4d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x46c4d1,_0x23f38a[_0x15ef4d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x15ef4d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2f019b(_0x4e73f4){const _0x502e9b=_0x1f18be();_0x23f38a[_0x502e9b]=_0x15ef4d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4e73f4,_0x4e73f4!=_0x15ef4d([0x56,0x61,0x6c,0x69,0x64])&&_0x35d348();}function _0x1f18be(){const _0x8fc29b=window[_0x15ef4d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x15ef4d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x15ef4d([0x6e,0x6f,0x77])]())[_0x15ef4d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x15ef4d([0x2e]),'');let _0x91f0dd=_0x15ef4d([0x68]);for(let _0x2673de=0x0;_0x2673de<_0x8fc29b[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2673de+=0x2){let _0x1797d9=window[_0x15ef4d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x8fc29b[_0x15ef4d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2673de,_0x2673de+0x2));_0x1797d9>=_0x1ec18a[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1797d9-=_0x1ec18a[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x91f0dd+=_0x1ec18a[_0x1797d9];}return _0x91f0dd;}function _0x375a0f(){const _0x38a26e=_0x4987d0[_0x15ef4d([0x73,0x70,0x6c,0x69,0x74])](_0x15ef4d([0x2e]));if(0x3!=_0x38a26e[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1c2f2c(_0x38a26e[0x1]);function _0x1c2f2c(_0x4124ab){const _0x39ad1d=_0x507d1f(_0x4124ab);return _0x39ad1d&&_0x47cd47()?_0x39ad1d:null;function _0x47cd47(){const _0x5733e8=_0x39ad1d[_0x15ef4d([0x6a,0x74,0x69])],_0x10006a=window[_0x15ef4d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5733e8[_0x15ef4d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5733e8[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1561e0={..._0x39ad1d,[_0x15ef4d([0x6a,0x74,0x69])]:_0x5733e8[_0x15ef4d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5733e8[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1561e0[_0x15ef4d([0x76,0x63])],_0x1b776f(_0x1561e0)==_0x10006a;}}}async function _0x5b9991(){let _0x120955=!0x0;try{const _0x5f2226=_0x4987d0[_0x15ef4d([0x73,0x70,0x6c,0x69,0x74])](_0x15ef4d([0x2e])),[_0x5a6999,_0x48538,_0x1dee68]=_0x5f2226;return _0x398d58(_0x5a6999),await _0x36004e(_0x5a6999,_0x48538,_0x1dee68),_0x120955;}catch{return!0x1;}function _0x398d58(_0x2aaf71){const _0x3afcf4=_0x507d1f(_0x2aaf71);_0x3afcf4&&_0x3afcf4[_0x15ef4d([0x61,0x6c,0x67])]==_0x15ef4d([0x45,0x53,0x32,0x35,0x36])||(_0x120955=!0x1);}async function _0x36004e(_0x541b80,_0x3766fe,_0x36bfd9){const _0x231faa=window[_0x15ef4d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x15ef4d([0x66,0x72,0x6f,0x6d])](_0x9977b(_0x36bfd9),_0x4dd01d=>_0x4dd01d[_0x15ef4d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3e45b4=new window[(_0x15ef4d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x15ef4d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x541b80+_0x15ef4d([0x2e])+_0x3766fe),_0x41e59a=window[_0x15ef4d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x15ef4d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x41e59a)return;const _0x24dac5=await _0x41e59a[_0x15ef4d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x15ef4d([0x6a,0x77,0x6b]),_0x2e4756,{[_0x15ef4d([0x6e,0x61,0x6d,0x65])]:_0x15ef4d([0x45,0x43,0x44,0x53,0x41]),[_0x15ef4d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x15ef4d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x15ef4d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x41e59a[_0x15ef4d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x15ef4d([0x6e,0x61,0x6d,0x65])]:_0x15ef4d([0x45,0x43,0x44,0x53,0x41]),[_0x15ef4d([0x68,0x61,0x73,0x68])]:{[_0x15ef4d([0x6e,0x61,0x6d,0x65])]:_0x15ef4d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x24dac5,_0x231faa,_0x3e45b4)||(_0x120955=!0x1);}}function _0x507d1f(_0x55abd6){return _0x55abd6[_0x15ef4d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x15ef4d([0x65,0x79]))?JSON[_0x15ef4d([0x70,0x61,0x72,0x73,0x65])](_0x9977b(_0x55abd6)):null;}function _0x9977b(_0x27abd5){return window[_0x15ef4d([0x61,0x74,0x6f,0x62])](_0x27abd5[_0x15ef4d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x15ef4d([0x2b]))[_0x15ef4d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x15ef4d([0x2f])));}function _0x1b776f(_0x2da56f){let _0x10bd2e=0x1505;function _0x1c4ac7(_0x41dbbc){for(let _0x465798=0x0;_0x465798<_0x41dbbc[_0x15ef4d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x465798++){const _0x2dfe0e=_0x41dbbc[_0x15ef4d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x465798);_0x10bd2e=(_0x10bd2e<<0x5)+_0x10bd2e+_0x2dfe0e,_0x10bd2e&=_0x10bd2e;}}function _0x2f58f8(_0x4b87a1){Array[_0x15ef4d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4b87a1)?_0x4b87a1[_0x15ef4d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2f58f8):_0x4b87a1&&typeof _0x4b87a1==_0x15ef4d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x15ef4d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4b87a1)[_0x15ef4d([0x73,0x6f,0x72,0x74])]()[_0x15ef4d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x296330,_0x2db1be])=>{_0x1c4ac7(_0x296330),_0x2f58f8(_0x2db1be);}):_0x1c4ac7(window[_0x15ef4d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4b87a1));}return _0x2f58f8(_0x2da56f),_0x10bd2e>>>0x0;}function _0x446927(_0x4fbd23){return _0x4fbd23[_0x15ef4d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x15ef4d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x15ef4d([0x30]));}function _0x308d0b(_0x536bec){return _0x536bec[_0x15ef4d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x15ef4d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x15ef4d([0x6a,0x6f,0x69,0x6e])]('');}function _0x46c4d1(){}function _0x15ef4d(_0x266cec){const _0x3ce435=_0x1529;return _0x266cec[_0x3ce435(0xa5)](_0x69fe3=>String[_0x3ce435(0x92)](_0x69fe3))[_0x3ce435(0xc0)]('');}_0x2f019b(await _0x2c1125());}(this);}[_0x333856(0x9a)](){const _0x1fcabf=_0x333856,_0x48fe2f=this[_0x1fcabf(0xa1)][_0x1fcabf(0x9c)][_0x1fcabf(0xa2)];_0x48fe2f[_0x1fcabf(0x96)](_0x1fcabf(0xca))&&_0x48fe2f[_0x1fcabf(0xa0)](_0x1fcabf(0xca),{'allowAttributes':[_0x1fcabf(0xbc)]}),_0x48fe2f[_0x1fcabf(0x96)](_0x1fcabf(0xc7))&&_0x48fe2f[_0x1fcabf(0xa0)](_0x1fcabf(0xc7),{'allowAttributes':[_0x1fcabf(0xbc)]});}[_0x333856(0x8b)](){const _0x209f58=_0x333856,_0x243681=this[_0x209f58(0xa1)];_0x243681[_0x209f58(0xd5)][_0x209f58(0x97)](_0x209f58(0xcc))[_0x209f58(0x88)]({'model':_0x209f58(0xbc),'view':_0x209f58(0xbf)}),_0x243681[_0x209f58(0xd5)][_0x209f58(0x97)](_0x209f58(0xb3))[_0x209f58(0x8f)]({'model':{'key':_0x209f58(0xbc),'value':_0x3aa35f=>_0x3aa35f[_0x209f58(0x95)](_0x209f58(0xbf))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x25e590=_0x243681[_0x209f58(0xc5)][_0x209f58(0xb9)](_0x209f58(0xd3));_0x25e590&&this[_0x209f58(0xb6)](_0x25e590,_0x209f58(0xab),(_0x1f39d0,[_0x436d42,_0x4cbaf2])=>{const _0x56f8b6=_0x209f58;_0x436d42[_0x56f8b6(0xc2)](_0x56f8b6(0xbc),_0x4cbaf2);});}[_0x333856(0xb5)](){const _0x520fce=_0x333856,_0x5e4d07=this[_0x520fce(0xa1)][_0x520fce(0xb4)][_0x520fce(0xb9)](_0x520fce(0x94))||{},_0x21bcb3=this[_0x520fce(0xa1)][_0x520fce(0xb4)][_0x520fce(0xb9)](_0x520fce(0xbd))||'';this[_0x520fce(0x98)]=_0x41fd7f(_0x456893[_0x520fce(0xd0)],_0x520fce(0xba),{..._0x5e4d07,'pubkey':_0x21bcb3,'ctx-name':_0x520fce(0xb0)+this[_0x520fce(0xb7)],'sourceList':'','imgOnly':_0x520fce(0xa3),'removeCopyright':_0x520fce(0xa3),'localeName':this[_0x520fce(0xa1)][_0x520fce(0xcb)][_0x520fce(0x9f)],'externalSourcesEmbedCss':_0x520fce(0xa8)}),this[_0x520fce(0x98)][_0x520fce(0xd6)]=_0x2025c0=>{const _0xb15984=_0x520fce;if(_0xb15984(0xd2)==_0x2025c0)return _0xb15984(0xc1);},_0x456893[_0x520fce(0xd0)][_0x520fce(0xc9)][_0x520fce(0xa9)](this[_0x520fce(0x98)]);}[_0x333856(0x86)](){const _0x1e1e93=_0x333856;this[_0x1e1e93(0xad)]=_0x41fd7f(_0x456893[_0x1e1e93(0xd0)],_0x1e1e93(0xc8),{'ctx-name':_0x1e1e93(0xb0)+this[_0x1e1e93(0xb7)]}),_0x456893[_0x1e1e93(0xd0)][_0x1e1e93(0xc9)][_0x1e1e93(0xa9)](this[_0x1e1e93(0xad)]);}[_0x333856(0x91)](){const _0x3df458=_0x333856,_0x59cfdb=this[_0x3df458(0xa1)][_0x3df458(0xc5)][_0x3df458(0xb9)](_0x3df458(0x8e));_0x59cfdb&&this[_0x3df458(0xb6)](_0x59cfdb,_0x3df458(0x9d),()=>{const _0x2ef4ef=_0x3df458,_0x2d7e85=this[_0x2ef4ef(0xa1)][_0x2ef4ef(0x9c)][_0x2ef4ef(0xd0)][_0x2ef4ef(0xcd)][_0x2ef4ef(0xac)]();_0x2d7e85&&_0x2d7e85[_0x2ef4ef(0x95)](_0x2ef4ef(0xbc))&&this[_0x2ef4ef(0xa1)][_0x2ef4ef(0x93)][_0x2ef4ef(0x87)][_0x2ef4ef(0xb8)](_0x2ef4ef(0xce),()=>{const _0x2858be=_0x2ef4ef;_0x2d5c12(this[_0x2858be(0xa1)],_0x2d7e85);});});const _0x5518f7=this[_0x3df458(0xa1)][_0x3df458(0xc5)][_0x3df458(0xb9)](_0x3df458(0xae));_0x5518f7&&this[_0x3df458(0xb6)](_0x5518f7,_0x3df458(0x9d),()=>{const _0xe20ce3=_0x3df458,_0x156c97=this[_0xe20ce3(0xa1)][_0xe20ce3(0x9c)][_0xe20ce3(0xd0)][_0xe20ce3(0xcd)][_0xe20ce3(0xac)]();_0x156c97&&_0x156c97[_0xe20ce3(0x95)](_0xe20ce3(0xbc))&&this[_0xe20ce3(0xa1)][_0xe20ce3(0x93)][_0xe20ce3(0x87)][_0xe20ce3(0xb8)](_0xe20ce3(0xce),()=>{const _0x1512d8=_0xe20ce3;_0x2d5c12(this[_0x1512d8(0xa1)],_0x156c97);});});}}
|
|
23
|
+
function _0x100d(_0x176dd4,_0x16bfdc){const _0x19297b=_0x1929();return _0x100d=function(_0x100d3a,_0x2fb820){_0x100d3a=_0x100d3a-0xa0;let _0x423715=_0x19297b[_0x100d3a];return _0x423715;},_0x100d(_0x176dd4,_0x16bfdc);}const _0x4cb9f9=_0x100d;(function(_0xdc95e9,_0x34999e){const _0x4b63cb=_0x100d,_0x42bf96=_0xdc95e9();while(!![]){try{const _0x17f45f=parseInt(_0x4b63cb(0xaa))/0x1+-parseInt(_0x4b63cb(0xcc))/0x2+-parseInt(_0x4b63cb(0xd6))/0x3*(-parseInt(_0x4b63cb(0xe6))/0x4)+parseInt(_0x4b63cb(0xc1))/0x5+-parseInt(_0x4b63cb(0xa9))/0x6+-parseInt(_0x4b63cb(0xd4))/0x7+parseInt(_0x4b63cb(0xdf))/0x8;if(_0x17f45f===_0x34999e)break;else _0x42bf96['push'](_0x42bf96['shift']());}catch(_0x275709){_0x42bf96['push'](_0x42bf96['shift']());}}}(_0x1929,0x4eecc));import{Plugin as _0x3e76c2}from'ckeditor5/src/core.js';import{Dialog as _0x4f7b3d}from'ckeditor5/src/ui.js';import{createElement as _0x4e267,global as _0x327861,uid as _0xbd794f}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x515e89}from'./uploadcarecommand.js';function _0x1929(){const _0x3e12c2=['downcast','pluginName','_configElement','conversion','afterInit','true','input[uploadcare-file-input]','#uc-icon-arrow-down','72190tlnOKx','uc-config','uploadcare.pubkey','init','attributeToAttribute','removeAttribute','elementToAttribute','schema','render','once','ucContextId','304582vwGyTi','_initImageProcessingIndicator','get','model','requires','_initSchema','for','body','2310392QFpHIr','uc-upload-ctx-provider','805974RVhvRC','PictureEditing','querySelector','insertImage','_initConversion','getSelectedElement','destroy','uploadcare.uploader','uploadcareImageId','4283824POTgZQ','editing','uploader-','appendChild','imageInline','_initCtx','editor','8dsnyUH','UploadcareEditing','locale','data-uc-image-id','getAttribute','href','execute','commands','remove','isOfficialPlugin','join','selection','uploadcare','upcast','map','contentLanguage','uploadcareImageReplace','iconHrefResolver','imageBlock','_ctxElement','configElement','isPremiumPlugin','3194250mhpSSz','250766ikLeZU','config','view','fromCharCode','ctxElement','cleanupImage','add','listenTo','replaceImageSource','closeMax','isRegistered','extend','_initConfig','document','\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'];_0x1929=function(){return _0x3e12c2;};return _0x1929();}import{UploadcareUploadAdapter as _0x57ae18}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x5ead11}from'./utils/editingutils.js';export class UploadcareEditing extends _0x3e76c2{[_0x4cb9f9(0xbb)]=null;[_0x4cb9f9(0xa6)]=null;static get[_0x4cb9f9(0xba)](){const _0x4f3604=_0x4cb9f9;return _0x4f3604(0xe7);}static get[_0x4cb9f9(0xd0)](){const _0xe64054=_0x4cb9f9;return[_0xe64054(0xd7),_0x57ae18,_0x4f7b3d];}static get[_0x4cb9f9(0xef)](){return!0x0;}static get[_0x4cb9f9(0xa8)](){return!0x0;}[_0x4cb9f9(0xcb)];get[_0x4cb9f9(0xa7)](){const _0x48d654=_0x4cb9f9;return this[_0x48d654(0xbb)];}get[_0x4cb9f9(0xae)](){const _0x98d92e=_0x4cb9f9;return this[_0x98d92e(0xa6)];}constructor(_0x2e669c){const _0x53c420=_0x4cb9f9;super(_0x2e669c),this[_0x53c420(0xcb)]=_0xbd794f();}[_0x4cb9f9(0xc4)](){const _0x57f8b3=_0x4cb9f9,_0x43019f=this[_0x57f8b3(0xe5)];_0x43019f[_0x57f8b3(0xed)][_0x57f8b3(0xb0)](_0x57f8b3(0xf2),new _0x515e89(_0x43019f));}[_0x4cb9f9(0xbd)](){const _0x1fa816=_0x4cb9f9;this[_0x1fa816(0xd1)](),this[_0x1fa816(0xda)](),this[_0x1fa816(0xb6)](),this[_0x1fa816(0xe4)](),this[_0x1fa816(0xcd)](),this[_0x1fa816(0xb1)](this[_0x1fa816(0xe5)],_0x1fa816(0xdc),()=>{const _0x3cc28e=_0x1fa816;this[_0x3cc28e(0xbb)]&&(this[_0x3cc28e(0xbb)][_0x3cc28e(0xee)](),this[_0x3cc28e(0xbb)]=null),this[_0x3cc28e(0xa6)]&&(this[_0x3cc28e(0xa6)][_0x3cc28e(0xee)](),this[_0x3cc28e(0xa6)]=null);const _0x1a1299=_0x327861[_0x3cc28e(0xb7)][_0x3cc28e(0xd8)](_0x3cc28e(0xbf));_0x1a1299&&_0x1a1299[_0x3cc28e(0xee)]();}),async function(_0x563343){const _0x5929d1=_0x44c56f([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x182d90=0x535f8c3a,_0x162a15=0x53580b02^_0x182d90,_0x454a18=window[_0x44c56f([0x44,0x61,0x74,0x65])][_0x44c56f([0x6e,0x6f,0x77])](),_0x7d0a64=_0x563343[_0x44c56f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x31efe9=new window[(_0x44c56f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x28af32=>{_0x7d0a64[_0x44c56f([0x6f,0x6e,0x63,0x65])](_0x44c56f([0x72,0x65,0x61,0x64,0x79]),_0x28af32);}),_0x3971d7={[_0x44c56f([0x6b,0x74,0x79])]:_0x44c56f([0x45,0x43]),[_0x44c56f([0x75,0x73,0x65])]:_0x44c56f([0x73,0x69,0x67]),[_0x44c56f([0x63,0x72,0x76])]:_0x44c56f([0x50,0x2d,0x32,0x35,0x36]),[_0x44c56f([0x78])]:_0x44c56f([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]),[_0x44c56f([0x79])]:_0x44c56f([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]),[_0x44c56f([0x61,0x6c,0x67])]:_0x44c56f([0x45,0x53,0x32,0x35,0x36])},_0x3f2624=_0x7d0a64[_0x44c56f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x44c56f([0x67,0x65,0x74])](_0x44c56f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3e040c(){let _0xf3a419,_0x46ba06=null,_0x2c4039=null;try{if(_0x3f2624==_0x44c56f([0x47,0x50,0x4c]))return _0x44c56f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xf3a419=_0x306c50(),!_0xf3a419)return _0x44c56f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xf3a419[_0x44c56f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2c4039=_0xef46d1(_0xf3a419[_0x44c56f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xf3a419[_0x44c56f([0x6a,0x74,0x69])])),await _0xcc290d()?_0xa800fb()?_0x1dfab3()?_0x44c56f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x49a6cd()?(_0xf3a419[_0x44c56f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x44c56f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x46ba06=_0x4aa71d(_0x44c56f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x37a189()):_0x44c56f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x44c56f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x44c56f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x44c56f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1dfab3(){const _0x5a9c33=[_0x44c56f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x44c56f([0x74,0x72,0x69,0x61,0x6c])][_0x44c56f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf3a419[_0x44c56f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x454a18/0x3e8:0xe10*_0x162a15;return _0xf3a419[_0x44c56f([0x65,0x78,0x70])]<_0x5a9c33;}function _0xa800fb(){const _0x3af35d=_0xf3a419[_0x44c56f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3af35d&&(!!_0x3af35d[_0x44c56f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44c56f([0x2a]))||!!_0x3af35d[_0x44c56f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44c56f([0x55,0x50,0x4c,0x43])));}function _0x49a6cd(){const _0x46da6e=_0x100d,_0xa4a109=_0xf3a419[_0x44c56f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xa4a109||0x0==_0xa4a109[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xef32a8}=new URL(window[_0x44c56f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x46da6e(0xeb)]);if(_0xa4a109[_0x44c56f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xef32a8))return!0x0;const _0x427dd2=_0xef32a8[_0x44c56f([0x73,0x70,0x6c,0x69,0x74])](_0x44c56f([0x2e]));return _0xa4a109[_0x44c56f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a252f=>_0x5a252f[_0x44c56f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44c56f([0x2a])))[_0x44c56f([0x6d,0x61,0x70])](_0x2609de=>_0x2609de[_0x44c56f([0x73,0x70,0x6c,0x69,0x74])](_0x44c56f([0x2e])))[_0x44c56f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xe032ab=>_0xe032ab[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x427dd2[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x44c56f([0x6d,0x61,0x70])](_0x1ce104=>Array(_0x427dd2[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1ce104[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x44c56f([0x66,0x69,0x6c,0x6c])](_0x1ce104[0x0]===_0x44c56f([0x2a])?_0x44c56f([0x2a]):'')[_0x44c56f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1ce104))[_0x44c56f([0x73,0x6f,0x6d,0x65])](_0x4c595e=>_0x427dd2[_0x44c56f([0x65,0x76,0x65,0x72,0x79])]((_0x2619dc,_0x481930)=>_0x4c595e[_0x481930]===_0x2619dc||_0x4c595e[_0x481930]===_0x44c56f([0x2a])));}function _0x37a189(){return _0x46ba06&&_0x2c4039?new window[(_0x44c56f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x328a44,_0x59f555)=>{_0x46ba06[_0x44c56f([0x74,0x68,0x65,0x6e])](_0x328a44,_0x59f555),_0x2c4039[_0x44c56f([0x74,0x68,0x65,0x6e])](_0x12502f=>{_0x12502f!=_0x44c56f([0x56,0x61,0x6c,0x69,0x64])&&_0x328a44(_0x12502f);},_0x59f555);}):_0x46ba06||_0x2c4039||_0x44c56f([0x56,0x61,0x6c,0x69,0x64]);}}function _0xef46d1(_0x5932e7,_0x486c6d){return new window[(_0x44c56f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x210a73=>{if(_0x492ce6())return _0x210a73(_0x44c56f([0x56,0x61,0x6c,0x69,0x64]));_0x2a06a3(),_0x7d0a64[_0x44c56f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x44c56f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x33325f=!0x1;const _0x3d4624=_0xbd794f();function _0x568ac7(_0x57942e){return!!_0x57942e&&(typeof _0x57942e===_0x44c56f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x57942e===_0x44c56f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x57942e[_0x44c56f([0x74,0x68,0x65,0x6e])]===_0x44c56f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x57942e[_0x44c56f([0x63,0x61,0x74,0x63,0x68])]===_0x44c56f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3fa2d6(_0x4eb82e){_0x334737(_0x4eb82e)[_0x44c56f([0x74,0x68,0x65,0x6e])](_0x32f75b=>{if(!_0x32f75b||_0x32f75b[_0x44c56f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x44c56f([0x6f,0x6b]))return _0x44c56f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x6f1fcf(_0x520e61(_0x3d4624+_0x486c6d))!=_0x32f75b[_0x44c56f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x44c56f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x44c56f([0x56,0x61,0x6c,0x69,0x64]);})[_0x44c56f([0x74,0x68,0x65,0x6e])](_0x130f47=>(_0x384ac2(),_0x130f47),()=>{const _0x5a8ea5=_0x4c8be4();return null==_0x5a8ea5?(_0x384ac2(),_0x44c56f([0x56,0x61,0x6c,0x69,0x64])):_0x44c56f(_0x454a18-_0x5a8ea5>(0x7753083a^_0x182d90)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x44c56f([0x74,0x68,0x65,0x6e])](_0x210a73)[_0x44c56f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x210a73(_0x44c56f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5addca=0x536962ba^_0x182d90;function _0x384ac2(){const _0x2ac009=_0x44c56f([0x6c,0x6c,0x63,0x74,0x2d])+_0x6f1fcf(_0x520e61(_0x5932e7)),_0x2664ff=_0x4d2495(_0x6f1fcf(window[_0x44c56f([0x4d,0x61,0x74,0x68])][_0x44c56f([0x63,0x65,0x69,0x6c])](_0x454a18/_0x5addca)));window[_0x44c56f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x44c56f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2ac009,_0x2664ff);}function _0x4c8be4(){const _0x5bbfd6=_0x44c56f([0x6c,0x6c,0x63,0x74,0x2d])+_0x6f1fcf(_0x520e61(_0x5932e7)),_0x4e15cd=window[_0x44c56f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x44c56f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5bbfd6);return _0x4e15cd?window[_0x44c56f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4d2495(_0x4e15cd),0x10)*_0x5addca:null;}function _0x334737(_0x7a480a){return new window[(_0x44c56f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2a85df,_0x943bc1)=>{_0x7a480a[_0x44c56f([0x74,0x68,0x65,0x6e])](_0x2a85df,_0x943bc1),window[_0x44c56f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x943bc1,0x535e58fa^_0x182d90);});}}_0x7d0a64[_0x44c56f([0x6f,0x6e])](_0x44c56f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x253568,_0x203f10)=>{if(_0x203f10[0x0]!=_0x5932e7)return _0x210a73(_0x44c56f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x203f10[0x1]={..._0x203f10[0x1],[_0x44c56f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3d4624};},{[_0x44c56f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x44c56f([0x68,0x69,0x67,0x68])}),_0x7d0a64[_0x44c56f([0x6f,0x6e])](_0x44c56f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4f9674=>{_0x568ac7(_0x4f9674[_0x44c56f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x33325f=!0x0,_0x3fa2d6(_0x4f9674[_0x44c56f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x44c56f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x44c56f([0x6c,0x6f,0x77])}),_0x31efe9[_0x44c56f([0x74,0x68,0x65,0x6e])](()=>{_0x33325f||_0x210a73(_0x44c56f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x492ce6(){return _0x7d0a64[_0x44c56f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44c56f([0x76,0x69,0x65,0x77])][_0x44c56f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x44c56f([0x61,0x75,0x74,0x6f]);}function _0x2a06a3(){_0x7d0a64[_0x44c56f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44c56f([0x76,0x69,0x65,0x77])][_0x44c56f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x44c56f([0x61,0x75,0x74,0x6f]);}}function _0x4aa71d(_0x4fba8f){const _0xa48494=[new window[(_0x44c56f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4dd635=>setTimeout(_0x4dd635,0x5356b2f6^_0x182d90)),_0x31efe9[_0x44c56f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x44c56f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x143aea=>{let _0x345e79=0x0;_0x7d0a64[_0x44c56f([0x6d,0x6f,0x64,0x65,0x6c])][_0x44c56f([0x6f,0x6e])](_0x44c56f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4b83a6,_0x9b1601)=>{_0x9b1601[0x0][_0x44c56f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x345e79++,_0x345e79==(0x535f89d2^_0x182d90)&&(_0x143aea(),_0x4b83a6[_0x44c56f([0x6f,0x66,0x66])]());});}))];return window[_0x44c56f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x44c56f([0x72,0x61,0x63,0x65])](_0xa48494)[_0x44c56f([0x74,0x68,0x65,0x6e])](()=>_0x4fba8f);}async function _0x8bb00d(){await _0x31efe9,_0x7d0a64[_0x44c56f([0x6d,0x6f,0x64,0x65,0x6c])][_0x44c56f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5d0aa1,_0x7d0a64[_0x44c56f([0x6d,0x6f,0x64,0x65,0x6c])][_0x44c56f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5d0aa1,_0x7d0a64[_0x44c56f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x44c56f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3b7c5f(_0x52f649){const _0xa95823=_0x1cf9aa();_0x7d0a64[_0xa95823]=_0x44c56f([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x52f649,_0x52f649!=_0x44c56f([0x56,0x61,0x6c,0x69,0x64])&&_0x8bb00d();}function _0x1cf9aa(){const _0xae4416=window[_0x44c56f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x44c56f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x44c56f([0x6e,0x6f,0x77])]())[_0x44c56f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x44c56f([0x2e]),'');let _0x2fded7=_0x44c56f([0x68]);for(let _0x576b25=0x0;_0x576b25<_0xae4416[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x576b25+=0x2){let _0xcfaf8f=window[_0x44c56f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xae4416[_0x44c56f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x576b25,_0x576b25+0x2));_0xcfaf8f>=_0x5929d1[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xcfaf8f-=_0x5929d1[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2fded7+=_0x5929d1[_0xcfaf8f];}return _0x2fded7;}function _0x306c50(){const _0x446031=_0x3f2624[_0x44c56f([0x73,0x70,0x6c,0x69,0x74])](_0x44c56f([0x2e]));if(0x3!=_0x446031[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4b30e8(_0x446031[0x1]);function _0x4b30e8(_0xcbeadf){const _0x4d9ad8=_0x441b91(_0xcbeadf);return _0x4d9ad8&&_0x3342af()?_0x4d9ad8:null;function _0x3342af(){const _0x43e6ee=_0x4d9ad8[_0x44c56f([0x6a,0x74,0x69])],_0x535483=window[_0x44c56f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x43e6ee[_0x44c56f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x43e6ee[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x11c18c={..._0x4d9ad8,[_0x44c56f([0x6a,0x74,0x69])]:_0x43e6ee[_0x44c56f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x43e6ee[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x11c18c[_0x44c56f([0x76,0x63])],_0x520e61(_0x11c18c)==_0x535483;}}}async function _0xcc290d(){let _0x306ebd=!0x0;try{const _0x2a8c69=_0x3f2624[_0x44c56f([0x73,0x70,0x6c,0x69,0x74])](_0x44c56f([0x2e])),[_0x2c737d,_0x613ef,_0x1f48d5]=_0x2a8c69;return _0x467454(_0x2c737d),await _0x3f56ed(_0x2c737d,_0x613ef,_0x1f48d5),_0x306ebd;}catch{return!0x1;}function _0x467454(_0x36a5a9){const _0x2a0078=_0x441b91(_0x36a5a9);_0x2a0078&&_0x2a0078[_0x44c56f([0x61,0x6c,0x67])]==_0x44c56f([0x45,0x53,0x32,0x35,0x36])||(_0x306ebd=!0x1);}async function _0x3f56ed(_0x3967fa,_0xe3170e,_0x2b9840){const _0x330ba1=window[_0x44c56f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x44c56f([0x66,0x72,0x6f,0x6d])](_0x4193c1(_0x2b9840),_0x39ad67=>_0x39ad67[_0x44c56f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x466447=new window[(_0x44c56f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x44c56f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3967fa+_0x44c56f([0x2e])+_0xe3170e),_0x3a038d=window[_0x44c56f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x44c56f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3a038d)return;const _0x5d4bbe=await _0x3a038d[_0x44c56f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x44c56f([0x6a,0x77,0x6b]),_0x3971d7,{[_0x44c56f([0x6e,0x61,0x6d,0x65])]:_0x44c56f([0x45,0x43,0x44,0x53,0x41]),[_0x44c56f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x44c56f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x44c56f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3a038d[_0x44c56f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x44c56f([0x6e,0x61,0x6d,0x65])]:_0x44c56f([0x45,0x43,0x44,0x53,0x41]),[_0x44c56f([0x68,0x61,0x73,0x68])]:{[_0x44c56f([0x6e,0x61,0x6d,0x65])]:_0x44c56f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5d4bbe,_0x330ba1,_0x466447)||(_0x306ebd=!0x1);}}function _0x441b91(_0x173264){return _0x173264[_0x44c56f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x44c56f([0x65,0x79]))?JSON[_0x44c56f([0x70,0x61,0x72,0x73,0x65])](_0x4193c1(_0x173264)):null;}function _0x4193c1(_0x13ad18){return window[_0x44c56f([0x61,0x74,0x6f,0x62])](_0x13ad18[_0x44c56f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x44c56f([0x2b]))[_0x44c56f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x44c56f([0x2f])));}function _0x520e61(_0x2e660e){let _0x319760=0x1505;function _0x43396a(_0x1388ec){for(let _0xea6ba3=0x0;_0xea6ba3<_0x1388ec[_0x44c56f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xea6ba3++){const _0x54936e=_0x1388ec[_0x44c56f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xea6ba3);_0x319760=(_0x319760<<0x5)+_0x319760+_0x54936e,_0x319760&=_0x319760;}}function _0x42faf2(_0x4ebedd){Array[_0x44c56f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4ebedd)?_0x4ebedd[_0x44c56f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x42faf2):_0x4ebedd&&typeof _0x4ebedd==_0x44c56f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x44c56f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4ebedd)[_0x44c56f([0x73,0x6f,0x72,0x74])]()[_0x44c56f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1cbbc7,_0x5472d0])=>{_0x43396a(_0x1cbbc7),_0x42faf2(_0x5472d0);}):_0x43396a(window[_0x44c56f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4ebedd));}return _0x42faf2(_0x2e660e),_0x319760>>>0x0;}function _0x6f1fcf(_0x200b36){return _0x200b36[_0x44c56f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x44c56f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x44c56f([0x30]));}function _0x4d2495(_0x8eaf22){return _0x8eaf22[_0x44c56f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x44c56f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x44c56f([0x6a,0x6f,0x69,0x6e])]('');}function _0x5d0aa1(){}function _0x44c56f(_0x68f450){const _0x3a40a6=_0x100d;return _0x68f450[_0x3a40a6(0xa1)](_0x391b65=>String[_0x3a40a6(0xad)](_0x391b65))[_0x3a40a6(0xf0)]('');}_0x3b7c5f(await _0x3e040c());}(this);}[_0x4cb9f9(0xd1)](){const _0x7db988=_0x4cb9f9,_0x57891b=this[_0x7db988(0xe5)][_0x7db988(0xcf)][_0x7db988(0xc8)];_0x57891b[_0x7db988(0xb4)](_0x7db988(0xa5))&&_0x57891b[_0x7db988(0xb5)](_0x7db988(0xa5),{'allowAttributes':[_0x7db988(0xde)]}),_0x57891b[_0x7db988(0xb4)](_0x7db988(0xe3))&&_0x57891b[_0x7db988(0xb5)](_0x7db988(0xe3),{'allowAttributes':[_0x7db988(0xde)]});}[_0x4cb9f9(0xda)](){const _0x266b85=_0x4cb9f9,_0x55abdb=this[_0x266b85(0xe5)];_0x55abdb[_0x266b85(0xbc)][_0x266b85(0xd2)](_0x266b85(0xb9))[_0x266b85(0xc5)]({'model':_0x266b85(0xde),'view':_0x266b85(0xe9)}),_0x55abdb[_0x266b85(0xbc)][_0x266b85(0xd2)](_0x266b85(0xa0))[_0x266b85(0xc7)]({'model':{'key':_0x266b85(0xde),'value':_0x36a2af=>_0x36a2af[_0x266b85(0xea)](_0x266b85(0xe9))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x508924=_0x55abdb[_0x266b85(0xed)][_0x266b85(0xce)](_0x266b85(0xb2));_0x508924&&this[_0x266b85(0xb1)](_0x508924,_0x266b85(0xaf),(_0x27181d,[_0x19affb,_0x17e0a5])=>{const _0x1b8f1f=_0x266b85;_0x19affb[_0x1b8f1f(0xc6)](_0x1b8f1f(0xde),_0x17e0a5);});}[_0x4cb9f9(0xb6)](){const _0x2e0a24=_0x4cb9f9,_0x35e9a3=this[_0x2e0a24(0xe5)][_0x2e0a24(0xab)][_0x2e0a24(0xce)](_0x2e0a24(0xdd))||{},_0x3b4cf5=this[_0x2e0a24(0xe5)][_0x2e0a24(0xab)][_0x2e0a24(0xce)](_0x2e0a24(0xc3))||'';this[_0x2e0a24(0xbb)]=_0x4e267(_0x327861[_0x2e0a24(0xb7)],_0x2e0a24(0xc2),{..._0x35e9a3,'pubkey':_0x3b4cf5,'ctx-name':_0x2e0a24(0xe1)+this[_0x2e0a24(0xcb)],'sourceList':'','imgOnly':_0x2e0a24(0xbe),'removeCopyright':_0x2e0a24(0xbe),'localeName':this[_0x2e0a24(0xe5)][_0x2e0a24(0xe8)][_0x2e0a24(0xa2)],'externalSourcesEmbedCss':_0x2e0a24(0xb8)}),this[_0x2e0a24(0xbb)][_0x2e0a24(0xa4)]=_0x2935e6=>{const _0x29d413=_0x2e0a24;if(_0x29d413(0xb3)==_0x2935e6)return _0x29d413(0xc0);},_0x327861[_0x2e0a24(0xb7)][_0x2e0a24(0xd3)][_0x2e0a24(0xe2)](this[_0x2e0a24(0xbb)]);}[_0x4cb9f9(0xe4)](){const _0x444025=_0x4cb9f9;this[_0x444025(0xa6)]=_0x4e267(_0x327861[_0x444025(0xb7)],_0x444025(0xd5),{'ctx-name':_0x444025(0xe1)+this[_0x444025(0xcb)]}),_0x327861[_0x444025(0xb7)][_0x444025(0xd3)][_0x444025(0xe2)](this[_0x444025(0xa6)]);}[_0x4cb9f9(0xcd)](){const _0x3129b4=_0x4cb9f9,_0x32ed9c=this[_0x3129b4(0xe5)][_0x3129b4(0xed)][_0x3129b4(0xce)](_0x3129b4(0xd9));_0x32ed9c&&this[_0x3129b4(0xb1)](_0x32ed9c,_0x3129b4(0xec),()=>{const _0x53430b=_0x3129b4,_0x37b828=this[_0x53430b(0xe5)][_0x53430b(0xcf)][_0x53430b(0xb7)][_0x53430b(0xf1)][_0x53430b(0xdb)]();_0x37b828&&_0x37b828[_0x53430b(0xea)](_0x53430b(0xde))&&this[_0x53430b(0xe5)][_0x53430b(0xe0)][_0x53430b(0xac)][_0x53430b(0xca)](_0x53430b(0xc9),()=>{const _0x769c26=_0x53430b;_0x5ead11(this[_0x769c26(0xe5)],_0x37b828);});});const _0x1930cd=this[_0x3129b4(0xe5)][_0x3129b4(0xed)][_0x3129b4(0xce)](_0x3129b4(0xa3));_0x1930cd&&this[_0x3129b4(0xb1)](_0x1930cd,_0x3129b4(0xec),()=>{const _0x1b7075=_0x3129b4,_0x5e31df=this[_0x1b7075(0xe5)][_0x1b7075(0xcf)][_0x1b7075(0xb7)][_0x1b7075(0xf1)][_0x1b7075(0xdb)]();_0x5e31df&&_0x5e31df[_0x1b7075(0xea)](_0x1b7075(0xde))&&this[_0x1b7075(0xe5)][_0x1b7075(0xe0)][_0x1b7075(0xac)][_0x1b7075(0xca)](_0x1b7075(0xc9),()=>{const _0x4256e8=_0x1b7075;_0x5ead11(this[_0x4256e8(0xe5)],_0x5e31df);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x49fa59,ObservableMixin as _0x45b382}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x7b6c30}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x7751fd}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x5411d2}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x61d356}from'../../utils/uploadutils.js';import{getImageUrls as _0x1ec235,getImageDimension as _0x5b4663}from'../../utils/editingutils.js';import{isAncestor as _0x115ae4}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x45b382(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5c893b,_0x5dfd91,_0x422b1b){super(),this['_editor']=_0x5c893b,this['_dialog']=_0x5dfd91,this['_imageElement']=_0x422b1b,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 _0x215fb4=this['_imageElement'],_0xb9c3f8=_0x215fb4['getAttribute']('uploadcareImageId'),_0x2a4077=_0x215fb4['getAttribute']('src');if(_0xb9c3f8)await this['_loadImageInfo'](_0xb9c3f8,_0x2a4077);else{if(this['_imageCache']['has'](_0x2a4077)){const _0x51af2b=this['_imageCache']['get'](_0x2a4077);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x51af2b['url'],this['imageDimension']=_0x51af2b['dimension'],this['imageId']=_0x51af2b['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x511a69}=this['_editor'],t=_0x511a69['t'],_0x4a857a=new _0x5411d2(_0x511a69,this['imageStatus'],this['_attributes']);_0x4a857a['bind']('status')['to'](this,'imageStatus'),_0x4a857a['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4a857a['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4a857a['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4a857a,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x7751fd,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4a857a,'position':_0x7b6c30['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4a857a['focus']();},'onHide':()=>{_0x4a857a['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x78150a=>!_0x115ae4(_0x78150a,_0x4a857a['element'])}});}['_loadImageInfo'](_0x2c204c,_0x2232bd){return _0x61d356['getInfo'](_0x2c204c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x4a2e8a=>{const {width:_0x2ee93a,height:_0x39afbf}=_0x4a2e8a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2232bd,this['imageDimension']={'width':_0x2ee93a,'height':_0x39afbf},this['imageId']=_0x2c204c;})['catch'](_0x2bb2be=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2bb2be['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0xc16f66,_0x2e8039){return this['_getImageAsFile'](_0xc16f66)['then'](_0x4ce8b3=>_0x61d356['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x2e8039['signal'],'file':_0x4ce8b3,'onProgress':_0x360fa6=>{_0x360fa6&&_0x360fa6['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x360fa6['value']));}}))['then'](_0x479655=>{const {width:_0x37c8f0,height:_0x3b2b64}=_0x479655['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x479655['cdnUrl'],this['imageDimension']={'width':_0x37c8f0,'height':_0x3b2b64},this['imageId']=_0x479655['uuid'],this['imageUploadProgress']=null;const _0x25356c=_0xc16f66['getAttribute']('src');this['_imageCache']['set'](_0x25356c,{'id':_0x479655['uuid'],'url':_0x479655['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x5963b1=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5963b1['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x403950,_0xc28f2f){_0x403950['on']('apply',(_0x181aff,_0x1e10ef)=>{this['_replaceImage'](_0xc28f2f,_0x1e10ef['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x403950['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x403950['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x3fba80,_0x41be07,_0x31c0e3){const _0x450762=this['_editor'],{width:_0x19d29f,height:_0x2a0f08}=_0x5b4663(_0x41be07,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x793d7b,imageSources:_0x24627c}=_0x1ec235(_0x41be07,_0x19d29f);_0x450762['model']['change'](_0x3c220f=>{if('$graveyard'===_0x3fba80['root']['rootName']){_0x450762['execute']('insertImage',{'imageType':_0x3fba80['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x3fba80['getAttributes']()),'uploadcareImageId':_0x31c0e3,'src':_0x793d7b,'sources':_0x24627c,'width':_0x19d29f,'height':_0x2a0f08}});const _0x2392b7=_0x3fba80['getChildren']();_0x3fba80=_0x450762['model']['document']['selection']['getSelectedElement']();for(const _0x17de65 of _0x2392b7)_0x3c220f['append'](_0x3c220f['cloneElement'](_0x17de65),_0x3fba80);}else _0x3c220f['setSelection'](_0x3fba80,'on'),_0x450762['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x3fba80['getAttributes']()),'uploadcareImageId':_0x31c0e3,'src':_0x793d7b,'sources':_0x24627c,'width':_0x19d29f,'height':_0x2a0f08},_0x3fba80);_0x3c220f['setSelection'](_0x3fba80,'on');});}async['_getImageAsFile'](_0x238fd7){const _0x5a6988=_0x49fa59['window'],_0x599b6f=_0x49fa59['document']['location']['href'],_0x3a5806=new _0x5a6988['URL'](_0x238fd7['getAttribute']('src'),_0x599b6f);if('data:'===_0x3a5806['protocol']){const _0x50f940=_0x3a5806['href']['split'](','),_0x2bdcba=_0x50f940[0x0]['match'](/:(.*?);/)[0x1],_0x708bf1=_0x2bdcba['split']('/')[0x1],_0x3601d2=_0x5a6988['atob'](_0x50f940[_0x50f940['length']-0x1]);let _0x491261=_0x3601d2['length'];const _0x2bc3e1=new _0x5a6988['Uint8Array'](_0x491261);for(;_0x491261--;)_0x2bc3e1[_0x491261]=_0x3601d2['charCodeAt'](_0x491261);return new _0x5a6988['File']([_0x2bc3e1],'image.'+_0x708bf1,{'type':_0x2bdcba});}const _0x4f8ddc=_0x3a5806['href']['split']('/'),_0x35160c=_0x4f8ddc[_0x4f8ddc['length']-0x1],_0x1f5d90=_0x35160c['split']('.')[0x1];return _0x5a6988['fetch'](_0x3a5806['href'])['then'](_0x435141=>_0x435141['clone']()['blob']())['then'](_0x47e76f=>new _0x5a6988['File']([_0x47e76f],_0x35160c,{'type':'image/'+_0x1f5d90}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x5c2c(){const _0x13dce8=['183dnvPrd','2375549jvZLUK','imageSrc','725412SwiONf','843449DLpewC','2035IRTygj','ck-uploadcare-theme','set','uc-light','21278wuJSiN','369SrPMFd','bindTemplate','6263928QZGnum','45680GZYikZ','7036GGdYti','uc-cloud-image-editor','63CmliCz','image-edit','setTemplate'];_0x5c2c=function(){return _0x13dce8;};return _0x5c2c();}(function(_0x1ef4fd,_0x2a9afa){const _0x4d2094=_0xe9b3,_0x294df4=_0x1ef4fd();while(!![]){try{const _0x5bdf95=-parseInt(_0x4d2094(0x1e4))/0x1+-parseInt(_0x4d2094(0x1d6))/0x2*(-parseInt(_0x4d2094(0x1e0))/0x3)+-parseInt(_0x4d2094(0x1db))/0x4*(-parseInt(_0x4d2094(0x1e5))/0x5)+parseInt(_0x4d2094(0x1e3))/0x6*(-parseInt(_0x4d2094(0x1dd))/0x7)+parseInt(_0x4d2094(0x1d9))/0x8+parseInt(_0x4d2094(0x1d7))/0x9*(parseInt(_0x4d2094(0x1da))/0xa)+parseInt(_0x4d2094(0x1e1))/0xb;if(_0x5bdf95===_0x2a9afa)break;else _0x294df4['push'](_0x294df4['shift']());}catch(_0x9f1643){_0x294df4['push'](_0x294df4['shift']());}}}(_0x5c2c,0x9742b));import{View as _0x358629}from'ckeditor5/src/ui.js';function _0xe9b3(_0x278bec,_0x11a709){const _0x5c2c37=_0x5c2c();return _0xe9b3=function(_0xe9b3dc,_0x20911a){_0xe9b3dc=_0xe9b3dc-0x1d6;let _0x1a03c0=_0x5c2c37[_0xe9b3dc];return _0x1a03c0;},_0xe9b3(_0x278bec,_0x11a709);}export class UploadcareImageEditFormEditingView extends _0x358629{constructor(_0x2619fa,_0xbd7bfc){const _0x59cf55=_0xe9b3;super(_0x2619fa);const _0x5d0560=this[_0x59cf55(0x1d8)];this[_0x59cf55(0x1e7)](_0x59cf55(0x1e2),''),this[_0x59cf55(0x1df)]({'tag':_0x59cf55(0x1dc),'attributes':{..._0xbd7bfc,'class':[_0x59cf55(0x1e8),_0x59cf55(0x1e6)],'ctx-name':_0x59cf55(0x1de),'cdn-url':_0x5d0560['to'](_0x59cf55(0x1e2))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x562a44}from'ckeditor5/src/icons.js';import{ButtonView as _0x572088,IconView as _0x5eb46f,View as _0x3afbbc}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x3afbbc{constructor(_0x5c0131){super(_0x5c0131);const t=_0x5c0131['t'];this['set']('errorType',null);const _0x1e254c=new _0x572088(_0x5c0131);_0x1e254c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1e254c['withText']=!0x0,_0x1e254c['class']='ck-button-action',_0x1e254c['on']('execute',()=>{this['fire']('retry');}),_0x1e254c['bind']('isVisible')['to'](this,'errorType',_0x5b596a=>'NotFound'!==_0x5b596a);const _0xaac87d=new _0x5eb46f();_0xaac87d['content']=_0x562a44,_0xaac87d['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4604eb=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':[_0xaac87d,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4604eb['to']('errorType',_0x24df3e=>t('NotFound'!==_0x24df3e?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1e254c]},{'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'}]}]}]});}}
|