@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20251213.0 → 0.0.0-nightly-next-20251214.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x533e7e,Command as _0xb35fdf}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x492e1d,IconGooglePhotos as _0x42b62e,IconGoogleDrive as _0x149f84,IconFacebook as _0x45ca12,IconDropbox as _0x14d4fc,IconUploadcareLink as _0x302ea5,IconUploadcareImageUpload as _0x14985a,IconError as _0x165dab,IconUploadcareImageEdit as _0x354f1f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1ab08f,MenuBarMenuListItemButtonView as _0x2e36d0,View as _0xb1318f,FocusCycler as _0x19a2b8,Dialog as _0x86cc70,DialogViewPosition as _0x4cbbdf,SpinnerView as _0x5e95fc,IconView as _0x4166df,Notification as _0x601c08}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x45a33c,DomEmitterMixin as _0x1f53da,global as _0x48c778,getAncestors as _0x46e08f,ObservableMixin as _0x424f75,uid as _0x3112e1,createElement as _0x3c3e16}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x1f5158}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x23a594,info as _0x1e9fdc}from'@uploadcare/upload-client';import*as _0x4f87ba from'@uploadcare/file-uploader';var i=function(_0x28d426){return _0x28d426['Local']='local',_0x28d426['URL']='url',_0x28d426['Dropbox']='dropbox',_0x28d426['GDrive']='gdrive',_0x28d426['Facebook']='facebook',_0x28d426['GPhotos']='gphotos',_0x28d426['OneDrive']='onedrive',_0x28d426;}({});function _(_0x5bd72d,_0x2ffd1f,_0x22d0fe){const t=_0x5bd72d['t'],_0xa286f8=_0x5bd72d['t'];switch(_0x2ffd1f){case i['Local']:return{'text':_0xa286f8('Insert'===_0x22d0fe?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0xa286f8('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x22d0fe?_0xa286f8('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0xa286f8('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x22d0fe?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x22d0fe?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x22d0fe?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x22d0fe?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x22d0fe?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2ffd1f;}}class e extends _0x533e7e{['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 _0x259f6e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3aff08;for(const _0x5a7850 in _0x259f6e){const _0x1456ed=_0x5a7850,_0x5a259c=_0x259f6e[_0x1456ed];if('uploadcareLicenseKeyValid'==_0x5a259c||'uploadcareLicenseKeyInvalid'==_0x5a259c||'uploadcareLicenseKeyExpired'==_0x5a259c||'uploadcareLicenseKeyDomainLimit'==_0x5a259c||'uploadcareLicenseKeyNotAllowed'==_0x5a259c||'uploadcareLicenseKeyEvaluationLimit'==_0x5a259c||'uploadcareLicenseKeyTrialLimit'==_0x5a259c||'uploadcareLicenseKeyUsageLimit'==_0x5a259c){delete _0x259f6e[_0x1456ed],_0x3aff08=_0x5a259c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x3aff08&&_0x259f6e['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x3aff08&&_0x259f6e['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x3aff08&&_0x259f6e['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x3aff08&&_0x259f6e['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x3aff08&&_0x259f6e['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x3aff08&&_0x259f6e['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x3aff08&&_0x259f6e['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x19e567}=this,_0x1e7ebd=_0x19e567['commands']['get']('uploadcare');if(!_0x1e7ebd)return;const _0x598c82=this['_normalizeConfigSourceList'](_0x19e567['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x5a9a0b,_0x11897e)=>{const _0x60f5ed=this['_getIntegrationKey'](_0x11897e['type']);return _0x5a9a0b[_0x60f5ed]||(_0x5a9a0b[_0x60f5ed]=[]),_0x5a9a0b[_0x60f5ed]['push'](_0x11897e),_0x5a9a0b;},{});_0x19e567['plugins']['has']('ImageInsertUI')&&_0x19e567['commands']['get']('uploadcare')&&Object['entries'](_0x598c82)['forEach'](([_0x24df30,_0x5b1e44])=>{_0x19e567['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x24df30,'observable':()=>_0x1e7ebd,'buttonViewCreator':()=>this['_createToolbarButton'](_0x5b1e44),'formViewCreator':()=>this['_createDropdownButtons'](_0x5b1e44),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x5b1e44),'override':'assetManager'!==_0x24df30});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x6f109e){const {locale:_0x1b39af}=this['editor'];return _0x6f109e['map'](_0x218db0=>{const _0x61f085=_(_0x1b39af,_0x218db0,'Insert');switch(_0x218db0){case i['Local']:return{'icon':_0x14985a,'type':i['Local'],..._0x61f085};case i['URL']:return{'icon':_0x302ea5,'type':i['URL'],..._0x61f085};case i['Dropbox']:return{'icon':_0x14d4fc,'type':i['Dropbox'],..._0x61f085};case i['Facebook']:return{'icon':_0x45ca12,'type':i['Facebook'],..._0x61f085};case i['GDrive']:return{'icon':_0x149f84,'type':i['GDrive'],..._0x61f085};case i['GPhotos']:return{'icon':_0x42b62e,'type':i['GPhotos'],..._0x61f085};case i['OneDrive']:return{'icon':_0x492e1d,'type':i['OneDrive'],..._0x61f085};}});}['_getIntegrationKey'](_0x4bc198){switch(_0x4bc198){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x2d956b,_0x40bea5){const _0xc88c03=this['editor'],_0x549acd=new _0x2d956b(_0xc88c03['locale']),_0x2f2ca7=_0xc88c03['commands']['get']('uploadcare');return _0x549acd['bind']('isEnabled')['to'](_0x2f2ca7),_0x549acd['on']('execute',()=>{_0x2f2ca7['execute'](_0x40bea5);}),_0x549acd;}['_createToolbarButton'](_0x3e2812){const {locale:_0x11c259}=this['editor'],_0x2286a3=this['editor']['plugins']['get']('ImageInsertUI'),_0x358ed=_0x3e2812[0x0],_0x3a0765=this['_createButton'](_0x1ab08f,_0x358ed['type']);return _0x3a0765['icon']=_0x358ed['icon'],_0x3a0765['bind']('label')['to'](_0x2286a3,'isImageSelected',_0x40b1a6=>_(_0x11c259,_0x358ed['type'],_0x40b1a6?'Replace':'Insert')['text']),_0x3a0765['tooltip']=!0x0,_0x3a0765;}['_createDropdownButtons'](_0xaeee1e){const {locale:_0x474e2c}=this['editor'],_0x791904=this['editor']['plugins']['get']('ImageInsertUI');return _0xaeee1e['map'](_0x417058=>{const _0x32225a=this['_createButton'](_0x1ab08f,_0x417058['type']);return _0x32225a['withText']=!0x0,_0x32225a['icon']=_0x417058['icon'],_0x32225a['bind']('label')['to'](_0x791904,'isImageSelected',_0x37ef4f=>_(_0x474e2c,_0x417058['type'],_0x37ef4f?'Replace':'Insert')['text']),_0x32225a;});}['_createMenuBarButtons'](_0x4a71a6){return _0x4a71a6['map'](_0x150b13=>{const _0x15b37f=this['_createButton'](_0x2e36d0,_0x150b13['type']);return _0x15b37f['icon']=_0x150b13['icon'],_0x15b37f['label']=_0x150b13['shortText'],_0x15b37f;});}}class F extends _0xb1318f{['focusTracker'];['focusCycler'];constructor(_0x40ae76){super(_0x40ae76),this['focusTracker']=new _0x45a33c(),this['focusCycler']=new _0x19a2b8({'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(_0x428a51,_0x24bff5){super(_0x428a51),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-'+_0x24bff5}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x37a5a5,_0xafd184){const _0x166cf3=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4caff8=>_0x4caff8<=_0xafd184)['map'](_0xd7b035=>_0x37a5a5['replace'](/\/$/,'')+'/-/resize/'+_0xd7b035+'x/\x20'+_0xd7b035+'w');return{'imageFallbackUrl':_0x37a5a5,'imageSources':[{'srcset':_0x166cf3['join'](',\x20'),'sizes':'(max-width:\x20'+_0xafd184+'px)\x20100vw,\x20'+_0xafd184+'px','type':'image/webp'}]};}function S(_0xd51119,_0x55ed6f,_0x429abf){const _0x4ae0d2=_0xd51119['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x4ae0d2?parseInt(_0x4ae0d2[0x1],0xa):_0x55ed6f,'height':_0x4ae0d2?parseInt(_0x4ae0d2[0x2],0xa):_0x429abf};}function p(_0xd6224a,_0x478547){const _0x55a31d=new(_0x1f53da())(),_0x11a029=_0xd6224a['plugins']['get']('ImageUtils'),_0x478a80=_0xd6224a['editing']['mapper']['toViewElement'](_0x478547),_0xe5cf16=_0x11a029['findViewImgElement'](_0x478a80),_0x256850=_0xd6224a['editing']['view']['domConverter']['viewToDom'](_0xe5cf16),_0x5e9d3f=_0x478547['getAttribute']('width'),_0x33ed59=_0x478547['getAttribute']('height'),_0x52a2fb='image-processing';_0xd6224a['editing']['view']['change'](_0x5aac2b=>{_0x5aac2b['addClass'](_0x52a2fb,_0x478a80),_0x5aac2b['setStyle']('aspect-ratio',_0x5e9d3f+'/'+_0x33ed59,_0xe5cf16);}),_0x55a31d['listenTo'](_0x256850,'load',()=>{_0x55a31d['stopListening'](_0x256850,'load'),_0xd6224a['editing']['view']['change'](_0x3bb17f=>{_0x3bb17f['removeClass'](_0x52a2fb,_0x478a80),_0x3bb17f['removeStyle']('aspect-ratio',_0xe5cf16);});});}function G(_0x33877c){if(Array['isArray'](_0x33877c)){const _0x233fd9=_0x33877c['map'](G);return _0x888da7=>_0x233fd9['some'](_0x1b1e2f=>_0x1b1e2f(_0x888da7));}if('origin'==_0x33877c){const _0x3927c2=_0x48c778['window']['location']['origin'];return _0x1c7a83=>new URL(_0x1c7a83,_0x48c778['document']['baseURI'])['origin']==_0x3927c2;}return'function'==typeof _0x33877c?_0x33877c:_0x33877c instanceof RegExp?_0x4829ff=>!(!_0x4829ff['match'](_0x33877c)&&!_0x4829ff['replace'](/^https?:\/\//,'')['match'](_0x33877c)):()=>!0x1;}function A(_0x10f5a7,_0x3633c1){return _0x46e08f(_0x10f5a7['target'])['includes'](_0x3633c1);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x424f75(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x917ea5,_0xb7345,_0x1c47af){super(),this['_editor']=_0x917ea5,this['_editing']=_0xb7345,this['_dialog']=_0x917ea5['plugins']['get'](_0x86cc70),this['_api']=_0xb7345['ctxElement']['getAPI'](),this['_type']=_0x1c47af,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:_0x50ac1a,model:_0x1827d0}=this['_editor'],_0x5f40c5=_0x1827d0['document']['selection']['getSelectedElement'](),_0x3da3ae=_0x5f40c5&&(_0x5f40c5['is']('element','imageBlock')||_0x5f40c5['is']('element','imageInline'));this['_formView']=new x(_0x50ac1a,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x14985a,'title':_(_0x50ac1a,this['_type'],_0x3da3ae?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x4cbbdf['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4de588=>!A(_0x4de588,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x97b780}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x7eec57=>{const _0x2a7512=_0x97b780['length'];for(const _0x4b96bc of _0x97b780){const _0x45e792=_0x4b96bc===_0x97b780[_0x2a7512-0x1],{cdnUrl:_0xa14c7a,fileInfo:_0x3f5c2d}=_0x4b96bc;if(!_0xa14c7a||!_0x3f5c2d)continue;const {width:_0x13c26f,height:_0x54d27d}=_0x3f5c2d['imageInfo'],_0x484d9f=S(_0xa14c7a,_0x13c26f,_0x54d27d),_0x4287f3=C(_0xa14c7a,_0x484d9f['width']),_0xa7bd6f={'id':_0x3f5c2d['uuid'],'type':'image','attributes':{'imageDimension':_0x484d9f,..._0x4287f3}};this['_insertAsset'](_0xa7bd6f,_0x45e792,_0x7eec57);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x3569ad=>{'idle'===_0x3569ad['detail']['status']&&!_0x3569ad['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x10f0c3,_0x2d8d3f,_0x3ada15){const _0x2bbeec=this['_editor']['model']['document']['selection'],_0x15f59b=_0x2bbeec['getSelectedElement'](),_0x3913c3=!(!_0x15f59b||!_0x15f59b['is']('element','imageInline'));_0x3ada15['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x10f0c3,_0x3913c3),_0x2d8d3f||_0x3ada15['setSelection'](_0x2bbeec['getLastPosition']());}['_insertImage'](_0x3e2c40,_0x49c188){const _0x507d30=this['_editor'],{imageDimension:_0x26ba44,imageFallbackUrl:_0x42c93e,imageSources:_0x3318bf}=_0x3e2c40['attributes'];_0x507d30['execute']('insertImage',{'imageType':_0x49c188?'imageInline':null,'source':{'uploadcareImageId':_0x3e2c40['id'],'src':_0x42c93e,'sources':_0x3318bf,..._0x26ba44}});}}class w extends _0xb35fdf{['_editing'];['_controller']=null;static get['requires'](){return[_0x86cc70,o];}constructor(_0x249d45){super(_0x249d45),this['_editing']=_0x249d45['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x352946){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x352946);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x437822,..._0x432580}){return _0x23a594(_0x437822,_0x432580);}static['getInfo'](_0x3103cd,_0x34d896){return _0x1e9fdc(_0x3103cd,_0x34d896);}}class f extends _0x533e7e{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x1f5158,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x127584=this['editor'];if(!!!_0x127584['config']['get']('uploadcare'))return;_0x127584['plugins']['get'](_0x1f5158)['createUploadAdapter']=_0x1e233a=>new k(_0x1e233a,_0x127584),_0x127584['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x361195,{imageElement:_0x3654cf,data:_0x56330a})=>{_0x127584['model']['change'](_0x297821=>{_0x297821['setAttribute']('uploadcareImageId',_0x56330a['uploadcareImageId'],_0x3654cf);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x25873d,_0x18fd5c){this['loader']=_0x25873d,this['editor']=_0x18fd5c,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x2577ed=await this['loader']['file'];return j['upload']({'file':_0x2577ed,'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':_0x32569a=>{_0x32569a&&_0x32569a['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x32569a['value']);}})['then'](async _0x24a10f=>{const {imageFallbackUrl:_0x3a23bb,imageSources:_0x389602}=C(_0x24a10f['cdnUrl'],_0x24a10f['imageInfo']['width']);return{'uploadcareImageId':_0x24a10f['uuid'],'default':_0x3a23bb,'sources':_0x389602};})['catch'](()=>{const _0x59c64f=t('Cannot\x20upload\x20file:')+('\x20'+_0x2577ed['name']+'.');return Promise['reject'](_0x59c64f);});}['abort'](){this['controller']['abort']();}}class o extends _0x533e7e{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x86cc70];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x5deea4){super(_0x5deea4),this['ucContextId']=_0x3112e1();}['init'](){const _0x2dc6ef=this['editor'];_0x2dc6ef['commands']['add']('uploadcare',new w(_0x2dc6ef));}['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 _0x2115ca=_0x48c778['document']['querySelector']('input[uploadcare-file-input]');_0x2115ca&&_0x2115ca['remove']();}),async function(_0x1cc9a0){const _0x4c5fbb=_0x16ed1c([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]),_0x88250e=0x535f8c3a,_0x98286d=0x5358f7f2^_0x88250e,_0x2fba3d=window[_0x16ed1c([0x44,0x61,0x74,0x65])][_0x16ed1c([0x6e,0x6f,0x77])](),_0x17ce60=_0x1cc9a0[_0x16ed1c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1a209d=new window[(_0x16ed1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x380ba5=>{_0x17ce60[_0x16ed1c([0x6f,0x6e,0x63,0x65])](_0x16ed1c([0x72,0x65,0x61,0x64,0x79]),_0x380ba5);}),_0x43c2bf={[_0x16ed1c([0x6b,0x74,0x79])]:_0x16ed1c([0x45,0x43]),[_0x16ed1c([0x75,0x73,0x65])]:_0x16ed1c([0x73,0x69,0x67]),[_0x16ed1c([0x63,0x72,0x76])]:_0x16ed1c([0x50,0x2d,0x32,0x35,0x36]),[_0x16ed1c([0x78])]:_0x16ed1c([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]),[_0x16ed1c([0x79])]:_0x16ed1c([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]),[_0x16ed1c([0x61,0x6c,0x67])]:_0x16ed1c([0x45,0x53,0x32,0x35,0x36])},_0x33d864=_0x17ce60[_0x16ed1c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x16ed1c([0x67,0x65,0x74])](_0x16ed1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4869b6(){let _0x1da2a4,_0xea344b=null,_0x347ad9=null;try{if(_0x33d864==_0x16ed1c([0x47,0x50,0x4c]))return _0x16ed1c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1da2a4=_0x1a2e9b(),!_0x1da2a4)return _0x16ed1c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1da2a4[_0x16ed1c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x347ad9=_0x180f12(_0x1da2a4[_0x16ed1c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1da2a4[_0x16ed1c([0x6a,0x74,0x69])])),await _0x2758d1()?_0x5cca58()?_0x4ffe4e()?_0x16ed1c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x14941a()?(_0x1da2a4[_0x16ed1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x16ed1c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xea344b=_0x44beb2(_0x16ed1c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1da2a4[_0x16ed1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x16ed1c([0x74,0x72,0x69,0x61,0x6c])&&(_0xea344b=_0x44beb2(_0x16ed1c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4bbb53()):_0x16ed1c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x16ed1c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x16ed1c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x16ed1c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4ffe4e(){const _0x41a831=[_0x16ed1c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x16ed1c([0x74,0x72,0x69,0x61,0x6c])][_0x16ed1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1da2a4[_0x16ed1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2fba3d/0x3e8:0xe10*_0x98286d;return _0x1da2a4[_0x16ed1c([0x65,0x78,0x70])]<_0x41a831;}function _0x5cca58(){const _0x40ed4f=_0x1da2a4[_0x16ed1c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x40ed4f&&(!!_0x40ed4f[_0x16ed1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16ed1c([0x2a]))||!!_0x40ed4f[_0x16ed1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16ed1c([0x55,0x50,0x4c,0x43])));}function _0x14941a(){const _0x2112f4=_0x1da2a4[_0x16ed1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2112f4||0x0==_0x2112f4[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2e2c7e}=new URL(window[_0x16ed1c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2112f4[_0x16ed1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e2c7e))return!0x0;const _0x3fb942=_0x2e2c7e[_0x16ed1c([0x73,0x70,0x6c,0x69,0x74])](_0x16ed1c([0x2e]));return _0x2112f4[_0x16ed1c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x220f9f=>_0x220f9f[_0x16ed1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16ed1c([0x2a])))[_0x16ed1c([0x6d,0x61,0x70])](_0x2ef0c1=>_0x2ef0c1[_0x16ed1c([0x73,0x70,0x6c,0x69,0x74])](_0x16ed1c([0x2e])))[_0x16ed1c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xca2042=>_0xca2042[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3fb942[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x16ed1c([0x6d,0x61,0x70])](_0x4434ac=>Array(_0x3fb942[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4434ac[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x16ed1c([0x66,0x69,0x6c,0x6c])](_0x4434ac[0x0]===_0x16ed1c([0x2a])?_0x16ed1c([0x2a]):'')[_0x16ed1c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4434ac))[_0x16ed1c([0x73,0x6f,0x6d,0x65])](_0x4598a6=>_0x3fb942[_0x16ed1c([0x65,0x76,0x65,0x72,0x79])]((_0x547a3d,_0x440237)=>_0x4598a6[_0x440237]===_0x547a3d||_0x4598a6[_0x440237]===_0x16ed1c([0x2a])));}function _0x4bbb53(){return _0xea344b&&_0x347ad9?new window[(_0x16ed1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4a5fca,_0x39251b)=>{_0xea344b[_0x16ed1c([0x74,0x68,0x65,0x6e])](_0x4a5fca,_0x39251b),_0x347ad9[_0x16ed1c([0x74,0x68,0x65,0x6e])](_0x158699=>{_0x158699!=_0x16ed1c([0x56,0x61,0x6c,0x69,0x64])&&_0x4a5fca(_0x158699);},_0x39251b);}):_0xea344b||_0x347ad9||_0x16ed1c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x180f12(_0x1c9b92,_0x3402f6){return new window[(_0x16ed1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x571f2e=>{if(_0x5d2f5f())return _0x571f2e(_0x16ed1c([0x56,0x61,0x6c,0x69,0x64]));_0x1d2df2(),_0x17ce60[_0x16ed1c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x16ed1c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x277545=!0x1;const _0x1f5ad5=_0x3112e1();function _0x20c3ce(_0x1d1f0c){return!!_0x1d1f0c&&(typeof _0x1d1f0c===_0x16ed1c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1d1f0c===_0x16ed1c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1d1f0c[_0x16ed1c([0x74,0x68,0x65,0x6e])]===_0x16ed1c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1d1f0c[_0x16ed1c([0x63,0x61,0x74,0x63,0x68])]===_0x16ed1c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4d671b(_0x4975a8){_0x53981a(_0x4975a8)[_0x16ed1c([0x74,0x68,0x65,0x6e])](_0x5b92eb=>{if(!_0x5b92eb||_0x5b92eb[_0x16ed1c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x16ed1c([0x6f,0x6b]))return _0x16ed1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x23b146(_0x3a14a4(_0x1f5ad5+_0x3402f6))!=_0x5b92eb[_0x16ed1c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x16ed1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x16ed1c([0x56,0x61,0x6c,0x69,0x64]);})[_0x16ed1c([0x74,0x68,0x65,0x6e])](_0x316125=>(_0x59b641(),_0x316125),()=>{const _0xc86342=_0x3a96ca();return null==_0xc86342?(_0x59b641(),_0x16ed1c([0x56,0x61,0x6c,0x69,0x64])):_0x16ed1c(_0x2fba3d-_0xc86342>(0x7753083a^_0x88250e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x16ed1c([0x74,0x68,0x65,0x6e])](_0x571f2e)[_0x16ed1c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x571f2e(_0x16ed1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x11ff44=0x536962ba^_0x88250e;function _0x59b641(){const _0x5ebde4=_0x16ed1c([0x6c,0x6c,0x63,0x74,0x2d])+_0x23b146(_0x3a14a4(_0x1c9b92)),_0x3862e3=_0x17554f(_0x23b146(window[_0x16ed1c([0x4d,0x61,0x74,0x68])][_0x16ed1c([0x63,0x65,0x69,0x6c])](_0x2fba3d/_0x11ff44)));window[_0x16ed1c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x16ed1c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5ebde4,_0x3862e3);}function _0x3a96ca(){const _0x21baa2=_0x16ed1c([0x6c,0x6c,0x63,0x74,0x2d])+_0x23b146(_0x3a14a4(_0x1c9b92)),_0x440b26=window[_0x16ed1c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x16ed1c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x21baa2);return _0x440b26?window[_0x16ed1c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x17554f(_0x440b26),0x10)*_0x11ff44:null;}function _0x53981a(_0x232848){return new window[(_0x16ed1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xf99295,_0x22ce11)=>{_0x232848[_0x16ed1c([0x74,0x68,0x65,0x6e])](_0xf99295,_0x22ce11),window[_0x16ed1c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x22ce11,0x535e58fa^_0x88250e);});}}_0x17ce60[_0x16ed1c([0x6f,0x6e])](_0x16ed1c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xffa605,_0x9b16a4)=>{if(_0x9b16a4[0x0]!=_0x1c9b92)return _0x571f2e(_0x16ed1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x9b16a4[0x1]={..._0x9b16a4[0x1],[_0x16ed1c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1f5ad5};},{[_0x16ed1c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x16ed1c([0x68,0x69,0x67,0x68])}),_0x17ce60[_0x16ed1c([0x6f,0x6e])](_0x16ed1c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x24e19d=>{_0x20c3ce(_0x24e19d[_0x16ed1c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x277545=!0x0,_0x4d671b(_0x24e19d[_0x16ed1c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x16ed1c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x16ed1c([0x6c,0x6f,0x77])}),_0x1a209d[_0x16ed1c([0x74,0x68,0x65,0x6e])](()=>{_0x277545||_0x571f2e(_0x16ed1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5d2f5f(){return _0x17ce60[_0x16ed1c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x16ed1c([0x76,0x69,0x65,0x77])][_0x16ed1c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x16ed1c([0x61,0x75,0x74,0x6f]);}function _0x1d2df2(){_0x17ce60[_0x16ed1c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x16ed1c([0x76,0x69,0x65,0x77])][_0x16ed1c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x16ed1c([0x61,0x75,0x74,0x6f]);}}function _0x44beb2(_0x458bf9){const _0x5148fb=[new window[(_0x16ed1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc53a97=>setTimeout(_0xc53a97,0x5356b2f6^_0x88250e)),_0x1a209d[_0x16ed1c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x16ed1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3dd88e=>{let _0x4d2d8f=0x0;_0x17ce60[_0x16ed1c([0x6d,0x6f,0x64,0x65,0x6c])][_0x16ed1c([0x6f,0x6e])](_0x16ed1c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4dae59,_0xc2f84e)=>{_0xc2f84e[0x0][_0x16ed1c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4d2d8f++,_0x4d2d8f==(0x535f8dc2^_0x88250e)&&(_0x3dd88e(),_0x4dae59[_0x16ed1c([0x6f,0x66,0x66])]());});}))];return window[_0x16ed1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x16ed1c([0x72,0x61,0x63,0x65])](_0x5148fb)[_0x16ed1c([0x74,0x68,0x65,0x6e])](()=>_0x458bf9);}async function _0xb8c4a2(){await _0x1a209d,_0x17ce60[_0x16ed1c([0x6d,0x6f,0x64,0x65,0x6c])][_0x16ed1c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x396c73,_0x17ce60[_0x16ed1c([0x6d,0x6f,0x64,0x65,0x6c])][_0x16ed1c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x396c73,_0x17ce60[_0x16ed1c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x16ed1c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x595679(_0x296d88){const _0x3d78c6=_0x120127();_0x17ce60[_0x3d78c6]=_0x16ed1c([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x296d88,_0x296d88!=_0x16ed1c([0x56,0x61,0x6c,0x69,0x64])&&_0xb8c4a2();}function _0x120127(){const _0x2af30c=window[_0x16ed1c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x16ed1c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x16ed1c([0x6e,0x6f,0x77])]())[_0x16ed1c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x16ed1c([0x2e]),'');let _0xa8e787=_0x16ed1c([0x68]);for(let _0x58677b=0x0;_0x58677b<_0x2af30c[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x58677b+=0x2){let _0x44af2b=window[_0x16ed1c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2af30c[_0x16ed1c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x58677b,_0x58677b+0x2));_0x44af2b>=_0x4c5fbb[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x44af2b-=_0x4c5fbb[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xa8e787+=_0x4c5fbb[_0x44af2b];}return _0xa8e787;}function _0x1a2e9b(){const _0x99d6ae=_0x33d864[_0x16ed1c([0x73,0x70,0x6c,0x69,0x74])](_0x16ed1c([0x2e]));if(0x3!=_0x99d6ae[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1ce716(_0x99d6ae[0x1]);function _0x1ce716(_0x16487f){const _0x113a65=_0x3fd6bc(_0x16487f);return _0x113a65&&_0x15fc42()?_0x113a65:null;function _0x15fc42(){const _0x473d0d=_0x113a65[_0x16ed1c([0x6a,0x74,0x69])],_0x5cd42d=window[_0x16ed1c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x473d0d[_0x16ed1c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x473d0d[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1eee61={..._0x113a65,[_0x16ed1c([0x6a,0x74,0x69])]:_0x473d0d[_0x16ed1c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x473d0d[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1eee61[_0x16ed1c([0x76,0x63])],_0x3a14a4(_0x1eee61)==_0x5cd42d;}}}async function _0x2758d1(){let _0xc0d0c2=!0x0;try{const _0x74fb8=_0x33d864[_0x16ed1c([0x73,0x70,0x6c,0x69,0x74])](_0x16ed1c([0x2e])),[_0x416bc3,_0x194a1c,_0x4c23ad]=_0x74fb8;return _0x3a5649(_0x416bc3),await _0x26f3cd(_0x416bc3,_0x194a1c,_0x4c23ad),_0xc0d0c2;}catch{return!0x1;}function _0x3a5649(_0x534332){const _0x2f57e0=_0x3fd6bc(_0x534332);_0x2f57e0&&_0x2f57e0[_0x16ed1c([0x61,0x6c,0x67])]==_0x16ed1c([0x45,0x53,0x32,0x35,0x36])||(_0xc0d0c2=!0x1);}async function _0x26f3cd(_0x4dae1a,_0x4d7b5b,_0x1ac69f){const _0x29a7e5=window[_0x16ed1c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x16ed1c([0x66,0x72,0x6f,0x6d])](_0x205c64(_0x1ac69f),_0x3e4d20=>_0x3e4d20[_0x16ed1c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x10a735=new window[(_0x16ed1c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x16ed1c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4dae1a+_0x16ed1c([0x2e])+_0x4d7b5b),_0xd3229e=window[_0x16ed1c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x16ed1c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xd3229e)return;const _0x47c71f=await _0xd3229e[_0x16ed1c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x16ed1c([0x6a,0x77,0x6b]),_0x43c2bf,{[_0x16ed1c([0x6e,0x61,0x6d,0x65])]:_0x16ed1c([0x45,0x43,0x44,0x53,0x41]),[_0x16ed1c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x16ed1c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x16ed1c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xd3229e[_0x16ed1c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x16ed1c([0x6e,0x61,0x6d,0x65])]:_0x16ed1c([0x45,0x43,0x44,0x53,0x41]),[_0x16ed1c([0x68,0x61,0x73,0x68])]:{[_0x16ed1c([0x6e,0x61,0x6d,0x65])]:_0x16ed1c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x47c71f,_0x29a7e5,_0x10a735)||(_0xc0d0c2=!0x1);}}function _0x3fd6bc(_0x783209){return _0x783209[_0x16ed1c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x16ed1c([0x65,0x79]))?JSON[_0x16ed1c([0x70,0x61,0x72,0x73,0x65])](_0x205c64(_0x783209)):null;}function _0x205c64(_0x527e26){return window[_0x16ed1c([0x61,0x74,0x6f,0x62])](_0x527e26[_0x16ed1c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x16ed1c([0x2b]))[_0x16ed1c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x16ed1c([0x2f])));}function _0x3a14a4(_0x24be2a){let _0x530cb5=0x1505;function _0x5295ee(_0x19cec6){for(let _0x8a818f=0x0;_0x8a818f<_0x19cec6[_0x16ed1c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x8a818f++){const _0xe9419a=_0x19cec6[_0x16ed1c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x8a818f);_0x530cb5=(_0x530cb5<<0x5)+_0x530cb5+_0xe9419a,_0x530cb5&=_0x530cb5;}}function _0x5c84ab(_0x43a706){Array[_0x16ed1c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x43a706)?_0x43a706[_0x16ed1c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5c84ab):_0x43a706&&typeof _0x43a706==_0x16ed1c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x16ed1c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x43a706)[_0x16ed1c([0x73,0x6f,0x72,0x74])]()[_0x16ed1c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x380518,_0x201d5f])=>{_0x5295ee(_0x380518),_0x5c84ab(_0x201d5f);}):_0x5295ee(window[_0x16ed1c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x43a706));}return _0x5c84ab(_0x24be2a),_0x530cb5>>>0x0;}function _0x23b146(_0x554369){return _0x554369[_0x16ed1c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x16ed1c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x16ed1c([0x30]));}function _0x17554f(_0x4bc517){return _0x4bc517[_0x16ed1c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x16ed1c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x16ed1c([0x6a,0x6f,0x69,0x6e])]('');}function _0x396c73(){}function _0x16ed1c(_0x3153c9){return _0x3153c9['map'](_0x339c80=>String['fromCharCode'](_0x339c80))['join']('');}_0x595679(await _0x4869b6());}(this);}['_initSchema'](){const _0x2a4fad=this['editor']['model']['schema'];_0x2a4fad['isRegistered']('imageBlock')&&_0x2a4fad['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x2a4fad['isRegistered']('imageInline')&&_0x2a4fad['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x430713=this['editor'];_0x430713['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x430713['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x5cb873=>_0x5cb873['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x312067=_0x430713['commands']['get']('replaceImageSource');_0x312067&&this['listenTo'](_0x312067,'cleanupImage',(_0x5f4352,[_0xce57c5,_0x3b7855])=>{_0xce57c5['removeAttribute']('uploadcareImageId',_0x3b7855);});}['_initConfig'](){const _0x1afb2d=this['editor']['config']['get']('uploadcare.uploader')||{},_0x5436fe=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3c3e16(_0x48c778['document'],'uc-config',{..._0x1afb2d,'pubkey':_0x5436fe,'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']=_0x23bcaf=>{if('closeMax'==_0x23bcaf)return'#uc-icon-arrow-down';},_0x48c778['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3c3e16(_0x48c778['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x48c778['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x5aac55=this['editor']['commands']['get']('insertImage');_0x5aac55&&this['listenTo'](_0x5aac55,'execute',()=>{const _0x5eb418=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5eb418&&_0x5eb418['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x5eb418);});});const _0x2771f2=this['editor']['commands']['get']('uploadcareImageReplace');_0x2771f2&&this['listenTo'](_0x2771f2,'execute',()=>{const _0x4cdf52=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4cdf52&&_0x4cdf52['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x4cdf52);});});}}class tt extends _0x533e7e{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x80eb5f){super(_0x80eb5f),_0x80eb5f['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4f87ba['defineComponents'](_0x4f87ba),this['_defineLocale']();}['_defineLocale'](){const _0x25ef79=this['editor']['config']['get']('uploadcare.locale'),_0x450528=this['editor']['locale']['contentLanguage'];_0x25ef79&&_0x4f87ba['defineLocale'](_0x450528,_0x25ef79);}}class ii extends _0xb1318f{constructor(_0x1f1391){super(_0x1f1391);const t=_0x1f1391['t'],_0x5e245a=this['bindTemplate'],_0x32b06e=new _0x5e95fc();_0x32b06e['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':[_0x32b06e,{'text':_0x5e245a['to']('imageUploadProgress',_0x4e0515=>t('Loading\x20image...')+'\x20('+(_0x4e0515||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 _0xb1318f{constructor(_0x7c74d0){super(_0x7c74d0);const t=_0x7c74d0['t'];this['set']('errorType',null);const _0x9a970d=new _0x1ab08f(_0x7c74d0);_0x9a970d['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x9a970d['withText']=!0x0,_0x9a970d['class']='ck-button-action',_0x9a970d['on']('execute',()=>{this['fire']('retry');}),_0x9a970d['bind']('isVisible')['to'](this,'errorType',_0x40e66d=>'NotFound'!==_0x40e66d);const _0x2f3b5d=new _0x4166df();_0x2f3b5d['content']=_0x165dab,_0x2f3b5d['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x8179f3=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':[_0x2f3b5d,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x8179f3['to']('errorType',_0x5b9778=>t('NotFound'!==_0x5b9778?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x9a970d]},{'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 _0xb1318f{constructor(_0x3ab73c,_0x138c0a){super(_0x3ab73c);const _0x3cb6a7=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x138c0a,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3cb6a7['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x76cb82,_0x73ecbb,_0xec4fed){super(_0x76cb82),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x76cb82),this['_errorView']=new ti(_0x76cb82),this['_editingView']=new ei(_0x76cb82,_0xec4fed),this['_focusableView']=new _0xb1318f(_0x76cb82),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x73ecbb),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'],_0x206de7=>{this['_addUploadcareImageEditorListeners'](_0x206de7);});}),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'](_0x334d04,_0xda41f3){const _0x2ef38d='uc-cloud-image-editor',_0x5ec41f=_0x334d04['querySelector'](_0x2ef38d);if(_0x5ec41f)return _0xda41f3(_0x5ec41f);const _0x872098=new MutationObserver(_0x5abd92=>{const _0x55bdaa=_0x5abd92['filter'](_0x1c6e56=>_0x1c6e56['target']===_0x334d04&&_0x1c6e56['addedNodes']['length']>0x0&&_0x1c6e56['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x2ef38d);_0x55bdaa['length']&&(_0x872098['disconnect'](),_0xda41f3(_0x55bdaa[0x0]['addedNodes'][0x0]));});_0x872098['observe'](_0x334d04,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x3aca5a){_0x3aca5a['addEventListener']('apply',_0x7ceecf=>{this['fire']('apply',{'imageSrc':_0x7ceecf['detail']['cdnUrl']});}),_0x3aca5a['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x424f75(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5e736f,_0x33d2a3,_0x5a2c50){super(),this['_editor']=_0x5e736f,this['_dialog']=_0x33d2a3,this['_imageElement']=_0x5a2c50,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 _0x962151=this['_imageElement'],_0x4d81aa=_0x962151['getAttribute']('uploadcareImageId'),_0xd02214=_0x962151['getAttribute']('src');if(_0x4d81aa)await this['_loadImageInfo'](_0x4d81aa,_0xd02214);else{if(this['_imageCache']['has'](_0xd02214)){const _0x2576de=this['_imageCache']['get'](_0xd02214);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2576de['url'],this['imageDimension']=_0x2576de['dimension'],this['imageId']=_0x2576de['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3d34d6}=this['_editor'],t=_0x3d34d6['t'],_0x4ef25e=new X(_0x3d34d6,this['imageStatus'],this['_attributes']);_0x4ef25e['bind']('status')['to'](this,'imageStatus'),_0x4ef25e['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4ef25e['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4ef25e['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4ef25e,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x354f1f,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4ef25e,'position':_0x4cbbdf['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4ef25e['focus']();},'onHide':()=>{_0x4ef25e['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5dd1aa=>!A(_0x5dd1aa,_0x4ef25e['element'])}});}['_loadImageInfo'](_0x5498cf,_0x4f4621){return j['getInfo'](_0x5498cf,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x5d9c65=>{const {width:_0x11ff48,height:_0x20b750}=_0x5d9c65['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4f4621,this['imageDimension']={'width':_0x11ff48,'height':_0x20b750},this['imageId']=_0x5498cf;})['catch'](_0x13c5cb=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x13c5cb['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x321a7f,_0x421019){return this['_getImageAsFile'](_0x321a7f)['then'](_0x442824=>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':_0x421019['signal'],'file':_0x442824,'onProgress':_0x4ca0fb=>{_0x4ca0fb&&_0x4ca0fb['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4ca0fb['value']));}}))['then'](_0x500382=>{const {width:_0x3c980c,height:_0x39dbc8}=_0x500382['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x500382['cdnUrl'],this['imageDimension']={'width':_0x3c980c,'height':_0x39dbc8},this['imageId']=_0x500382['uuid'],this['imageUploadProgress']=null;const _0x4ca0c2=_0x321a7f['getAttribute']('src');this['_imageCache']['set'](_0x4ca0c2,{'id':_0x500382['uuid'],'url':_0x500382['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x451a6c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x451a6c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2f45ae,_0x5914a5){_0x2f45ae['on']('apply',(_0x896981,_0x14ab5f)=>{this['_replaceImage'](_0x5914a5,_0x14ab5f['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2f45ae['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2f45ae['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x17dad6,_0x71a18f,_0x1cae36){const _0x3874d9=this['_editor'],{width:_0x267bf9,height:_0x3ae5d8}=S(_0x71a18f,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x46d134,imageSources:_0x920aea}=C(_0x71a18f,_0x267bf9);_0x3874d9['model']['change'](_0x5b4606=>{if('$graveyard'===_0x17dad6['root']['rootName']){_0x3874d9['execute']('insertImage',{'imageType':_0x17dad6['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x17dad6['getAttributes']()),'uploadcareImageId':_0x1cae36,'src':_0x46d134,'sources':_0x920aea,'width':_0x267bf9,'height':_0x3ae5d8}});const _0x5da10e=_0x17dad6['getChildren']();_0x17dad6=_0x3874d9['model']['document']['selection']['getSelectedElement']();for(const _0x38e3a5 of _0x5da10e)_0x5b4606['append'](_0x5b4606['cloneElement'](_0x38e3a5),_0x17dad6);}else _0x5b4606['setSelection'](_0x17dad6,'on'),_0x3874d9['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x17dad6['getAttributes']()),'uploadcareImageId':_0x1cae36,'src':_0x46d134,'sources':_0x920aea,'width':_0x267bf9,'height':_0x3ae5d8},_0x17dad6);_0x5b4606['setSelection'](_0x17dad6,'on');});}async['_getImageAsFile'](_0x410d08){const _0x114060=_0x48c778['window'],_0xfce44c=_0x48c778['document']['location']['href'],_0xf4214a=new _0x114060['URL'](_0x410d08['getAttribute']('src'),_0xfce44c);if('data:'===_0xf4214a['protocol']){const _0x38ecae=_0xf4214a['href']['split'](','),_0x36cb03=_0x38ecae[0x0]['match'](/:(.*?);/)[0x1],_0x41b053=_0x36cb03['split']('/')[0x1],_0x50325c=_0x114060['atob'](_0x38ecae[_0x38ecae['length']-0x1]);let _0x2a6077=_0x50325c['length'];const _0x38ad8f=new _0x114060['Uint8Array'](_0x2a6077);for(;_0x2a6077--;)_0x38ad8f[_0x2a6077]=_0x50325c['charCodeAt'](_0x2a6077);return new _0x114060['File']([_0x38ad8f],'image.'+_0x41b053,{'type':_0x36cb03});}const _0x10bbdc=_0xf4214a['href']['split']('/'),_0x1b118e=_0x10bbdc[_0x10bbdc['length']-0x1],_0x9e4d07=_0x1b118e['split']('.')[0x1];return _0x114060['fetch'](_0xf4214a['href'])['then'](_0x2121b4=>_0x2121b4['clone']()['blob']())['then'](_0x5df27b=>new _0x114060['File']([_0x5df27b],_0x1b118e,{'type':'image/'+_0x9e4d07}));}}class O extends _0xb35fdf{['imageEditController'];static get['requires'](){return[_0x86cc70];}['_isEditable'];constructor(_0x30ea93){super(_0x30ea93),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x31de5c){const _0x2e1bfa=G(_0x31de5c);return _0x374bc6=>!(!_0x374bc6||!_0x374bc6['is']('element','imageBlock')&&!_0x374bc6['is']('element','imageInline'))&&(!!_0x374bc6['hasAttribute']('uploadcareImageId')||!!_0x374bc6['hasAttribute']('src')&&_0x2e1bfa(_0x374bc6['getAttribute']('src')));}(_0x30ea93['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x4d1905=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x4d1905);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x405ca7=this['editor']['model']['document']['selection']['getSelectedElement']();_0x405ca7&&(_0x405ca7['is']('element','imageBlock')||_0x405ca7['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x86cc70),_0x405ca7),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0xb35fdf{['refresh'](){const _0x1b04c4=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1b04c4&&(_0x1b04c4['is']('element','imageBlock')||_0x1b04c4['is']('element','imageInline')));}['execute'](_0x234a53){const _0x586aa2=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x4e98bf=>{_0x4e98bf['setAttributes'](_0x234a53,_0x586aa2),_0x4e98bf['removeAttribute']('srcset',_0x586aa2),_0x4e98bf['removeAttribute']('sizes',_0x586aa2);});}}class m extends _0x533e7e{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x601c08,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x48eb9d}=this;_0x48eb9d['commands']['add']('uploadcareImageEdit',new O(_0x48eb9d)),_0x48eb9d['commands']['add']('uploadcareImageReplace',new R(_0x48eb9d));}}class g extends _0x533e7e{['_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 _0x57dec6=this['editor'];_0x57dec6['ui']['componentFactory']['add']('uploadcareImageEdit',_0x15f9ab=>{const _0x1c70a0=_0x57dec6['commands']['get']('uploadcareImageEdit'),_0x221464=new _0x1ab08f(_0x15f9ab),t=_0x15f9ab['t'];return _0x221464['set']({'icon':_0x354f1f,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x221464['bind']('isEnabled')['to'](_0x1c70a0),_0x221464['bind']('isOn')['to'](_0x1c70a0,'isActive'),this['listenTo'](_0x221464,'execute',()=>{_0x57dec6['execute']('uploadcareImageEdit'),_0x57dec6['editing']['view']['focus']();}),_0x221464;}),this['_initConfig']();}['_initConfig'](){const _0x1aec99=_0x3c3e16(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1aec99),this['listenTo'](this['editor'],'destroy',()=>{_0x1aec99['remove']();});}}class et extends _0x533e7e{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x18d894,Command as _0xbc42aa}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x1b71f9,IconGooglePhotos as _0xcaad24,IconGoogleDrive as _0xab246c,IconFacebook as _0x3569fb,IconDropbox as _0x3aa1b4,IconUploadcareLink as _0x58684c,IconUploadcareImageUpload as _0x4069b0,IconError as _0x4555dc,IconUploadcareImageEdit as _0x3e58f7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xfa745e,MenuBarMenuListItemButtonView as _0x3532bd,View as _0x257250,FocusCycler as _0x9de5e,Dialog as _0x569bf8,DialogViewPosition as _0x161f8f,SpinnerView as _0x5391b8,IconView as _0x7fa819,Notification as _0x309de5}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x4e2ce6,DomEmitterMixin as _0xde0285,global as _0x5ce90b,getAncestors as _0x4e853f,ObservableMixin as _0x2afe1a,uid as _0x795be3,createElement as _0x3eadd0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x543a6d}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x50f113,info as _0x53664b}from'@uploadcare/upload-client';import*as _0x935c71 from'@uploadcare/file-uploader';var i=function(_0x33152a){return _0x33152a['Local']='local',_0x33152a['URL']='url',_0x33152a['Dropbox']='dropbox',_0x33152a['GDrive']='gdrive',_0x33152a['Facebook']='facebook',_0x33152a['GPhotos']='gphotos',_0x33152a['OneDrive']='onedrive',_0x33152a;}({});function _(_0x14e2a2,_0x50119f,_0x3f50a5){const t=_0x14e2a2['t'],_0x791a9b=_0x14e2a2['t'];switch(_0x50119f){case i['Local']:return{'text':_0x791a9b('Insert'===_0x3f50a5?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x791a9b('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x3f50a5?_0x791a9b('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x791a9b('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x3f50a5?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x3f50a5?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x3f50a5?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x3f50a5?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x3f50a5?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x50119f;}}class e extends _0x18d894{['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 _0x2a9ddf=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3dc1d1;for(const _0x399b7b in _0x2a9ddf){const _0x2b5157=_0x399b7b,_0x4377de=_0x2a9ddf[_0x2b5157];if('uploadcareLicenseKeyValid'==_0x4377de||'uploadcareLicenseKeyInvalid'==_0x4377de||'uploadcareLicenseKeyExpired'==_0x4377de||'uploadcareLicenseKeyDomainLimit'==_0x4377de||'uploadcareLicenseKeyNotAllowed'==_0x4377de||'uploadcareLicenseKeyEvaluationLimit'==_0x4377de||'uploadcareLicenseKeyTrialLimit'==_0x4377de||'uploadcareLicenseKeyUsageLimit'==_0x4377de){delete _0x2a9ddf[_0x2b5157],_0x3dc1d1=_0x4377de,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x3dc1d1&&_0x2a9ddf['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x3dc1d1&&_0x2a9ddf['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x3dc1d1&&_0x2a9ddf['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x3dc1d1&&_0x2a9ddf['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x3dc1d1&&_0x2a9ddf['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x3dc1d1&&_0x2a9ddf['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x3dc1d1&&_0x2a9ddf['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0xb89191}=this,_0x456b97=_0xb89191['commands']['get']('uploadcare');if(!_0x456b97)return;const _0x4f6049=this['_normalizeConfigSourceList'](_0xb89191['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x23fe4d,_0x50207b)=>{const _0x54221c=this['_getIntegrationKey'](_0x50207b['type']);return _0x23fe4d[_0x54221c]||(_0x23fe4d[_0x54221c]=[]),_0x23fe4d[_0x54221c]['push'](_0x50207b),_0x23fe4d;},{});_0xb89191['plugins']['has']('ImageInsertUI')&&_0xb89191['commands']['get']('uploadcare')&&Object['entries'](_0x4f6049)['forEach'](([_0x5101f9,_0x12d431])=>{_0xb89191['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x5101f9,'observable':()=>_0x456b97,'buttonViewCreator':()=>this['_createToolbarButton'](_0x12d431),'formViewCreator':()=>this['_createDropdownButtons'](_0x12d431),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x12d431),'override':'assetManager'!==_0x5101f9});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x558094){const {locale:_0x206b4a}=this['editor'];return _0x558094['map'](_0x496eeb=>{const _0x56af97=_(_0x206b4a,_0x496eeb,'Insert');switch(_0x496eeb){case i['Local']:return{'icon':_0x4069b0,'type':i['Local'],..._0x56af97};case i['URL']:return{'icon':_0x58684c,'type':i['URL'],..._0x56af97};case i['Dropbox']:return{'icon':_0x3aa1b4,'type':i['Dropbox'],..._0x56af97};case i['Facebook']:return{'icon':_0x3569fb,'type':i['Facebook'],..._0x56af97};case i['GDrive']:return{'icon':_0xab246c,'type':i['GDrive'],..._0x56af97};case i['GPhotos']:return{'icon':_0xcaad24,'type':i['GPhotos'],..._0x56af97};case i['OneDrive']:return{'icon':_0x1b71f9,'type':i['OneDrive'],..._0x56af97};}});}['_getIntegrationKey'](_0x78b2fd){switch(_0x78b2fd){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x5bee4f,_0x3e3f70){const _0x5202ca=this['editor'],_0x7371d2=new _0x5bee4f(_0x5202ca['locale']),_0x1f9fe8=_0x5202ca['commands']['get']('uploadcare');return _0x7371d2['bind']('isEnabled')['to'](_0x1f9fe8),_0x7371d2['on']('execute',()=>{_0x1f9fe8['execute'](_0x3e3f70);}),_0x7371d2;}['_createToolbarButton'](_0x529728){const {locale:_0x3ff300}=this['editor'],_0x49fc76=this['editor']['plugins']['get']('ImageInsertUI'),_0x3b1b07=_0x529728[0x0],_0x351585=this['_createButton'](_0xfa745e,_0x3b1b07['type']);return _0x351585['icon']=_0x3b1b07['icon'],_0x351585['bind']('label')['to'](_0x49fc76,'isImageSelected',_0x58ed3a=>_(_0x3ff300,_0x3b1b07['type'],_0x58ed3a?'Replace':'Insert')['text']),_0x351585['tooltip']=!0x0,_0x351585;}['_createDropdownButtons'](_0x5673e9){const {locale:_0x2f3d57}=this['editor'],_0x26b3b5=this['editor']['plugins']['get']('ImageInsertUI');return _0x5673e9['map'](_0x4720dd=>{const _0x388cd5=this['_createButton'](_0xfa745e,_0x4720dd['type']);return _0x388cd5['withText']=!0x0,_0x388cd5['icon']=_0x4720dd['icon'],_0x388cd5['bind']('label')['to'](_0x26b3b5,'isImageSelected',_0xc6eef7=>_(_0x2f3d57,_0x4720dd['type'],_0xc6eef7?'Replace':'Insert')['text']),_0x388cd5;});}['_createMenuBarButtons'](_0x490e80){return _0x490e80['map'](_0x156947=>{const _0x5e7117=this['_createButton'](_0x3532bd,_0x156947['type']);return _0x5e7117['icon']=_0x156947['icon'],_0x5e7117['label']=_0x156947['shortText'],_0x5e7117;});}}class F extends _0x257250{['focusTracker'];['focusCycler'];constructor(_0x6ea1bb){super(_0x6ea1bb),this['focusTracker']=new _0x4e2ce6(),this['focusCycler']=new _0x9de5e({'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(_0x1a42ed,_0x728c66){super(_0x1a42ed),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-'+_0x728c66}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x2ed3ff,_0x37e985){const _0xbec03f=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x2dd9cd=>_0x2dd9cd<=_0x37e985)['map'](_0xe0bc23=>_0x2ed3ff['replace'](/\/$/,'')+'/-/resize/'+_0xe0bc23+'x/\x20'+_0xe0bc23+'w');return{'imageFallbackUrl':_0x2ed3ff,'imageSources':[{'srcset':_0xbec03f['join'](',\x20'),'sizes':'(max-width:\x20'+_0x37e985+'px)\x20100vw,\x20'+_0x37e985+'px','type':'image/webp'}]};}function S(_0x3448cd,_0x59450b,_0x17c54e){const _0x4527ff=_0x3448cd['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x4527ff?parseInt(_0x4527ff[0x1],0xa):_0x59450b,'height':_0x4527ff?parseInt(_0x4527ff[0x2],0xa):_0x17c54e};}function p(_0x1568f4,_0x43c03d){const _0x1dadb5=new(_0xde0285())(),_0x45d14b=_0x1568f4['plugins']['get']('ImageUtils'),_0x1062ec=_0x1568f4['editing']['mapper']['toViewElement'](_0x43c03d),_0x25afe7=_0x45d14b['findViewImgElement'](_0x1062ec),_0x3a555a=_0x1568f4['editing']['view']['domConverter']['viewToDom'](_0x25afe7),_0x16370e=_0x43c03d['getAttribute']('width'),_0x3a9975=_0x43c03d['getAttribute']('height'),_0x504a86='image-processing';_0x1568f4['editing']['view']['change'](_0x43044b=>{_0x43044b['addClass'](_0x504a86,_0x1062ec),_0x43044b['setStyle']('aspect-ratio',_0x16370e+'/'+_0x3a9975,_0x25afe7);}),_0x1dadb5['listenTo'](_0x3a555a,'load',()=>{_0x1dadb5['stopListening'](_0x3a555a,'load'),_0x1568f4['editing']['view']['change'](_0x53dcfc=>{_0x53dcfc['removeClass'](_0x504a86,_0x1062ec),_0x53dcfc['removeStyle']('aspect-ratio',_0x25afe7);});});}function z(_0x1f238b){if(Array['isArray'](_0x1f238b)){const _0x2daa36=_0x1f238b['map'](z);return _0x47ceb5=>_0x2daa36['some'](_0xa1ecb5=>_0xa1ecb5(_0x47ceb5));}if('origin'==_0x1f238b){const _0x680c17=_0x5ce90b['window']['location']['origin'];return _0x1089fa=>new URL(_0x1089fa,_0x5ce90b['document']['baseURI'])['origin']==_0x680c17;}return'function'==typeof _0x1f238b?_0x1f238b:_0x1f238b instanceof RegExp?_0x22ac3e=>!(!_0x22ac3e['match'](_0x1f238b)&&!_0x22ac3e['replace'](/^https?:\/\//,'')['match'](_0x1f238b)):()=>!0x1;}function A(_0x46b786,_0x1cb6f5){return _0x4e853f(_0x46b786['target'])['includes'](_0x1cb6f5);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2afe1a(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x572ac4,_0x382a7c,_0x415e72){super(),this['_editor']=_0x572ac4,this['_editing']=_0x382a7c,this['_dialog']=_0x572ac4['plugins']['get'](_0x569bf8),this['_api']=_0x382a7c['ctxElement']['getAPI'](),this['_type']=_0x415e72,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:_0xa6b18d,model:_0x1bc912}=this['_editor'],_0x2dc9a2=_0x1bc912['document']['selection']['getSelectedElement'](),_0x3b0723=_0x2dc9a2&&(_0x2dc9a2['is']('element','imageBlock')||_0x2dc9a2['is']('element','imageInline'));this['_formView']=new x(_0xa6b18d,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4069b0,'title':_(_0xa6b18d,this['_type'],_0x3b0723?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x161f8f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x27b1fb=>!A(_0x27b1fb,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x5f1cd0}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0xc6def=>{const _0xb09dc3=_0x5f1cd0['length'];for(const _0x117c61 of _0x5f1cd0){const _0x2a70c3=_0x117c61===_0x5f1cd0[_0xb09dc3-0x1],{cdnUrl:_0x3c32be,fileInfo:_0x41f658}=_0x117c61;if(!_0x3c32be||!_0x41f658)continue;const {width:_0x52c8ae,height:_0x198e83}=_0x41f658['imageInfo'],_0x3bd8ef=S(_0x3c32be,_0x52c8ae,_0x198e83),_0x3833c3=C(_0x3c32be,_0x3bd8ef['width']),_0x3c32d7={'id':_0x41f658['uuid'],'type':'image','attributes':{'imageDimension':_0x3bd8ef,..._0x3833c3}};this['_insertAsset'](_0x3c32d7,_0x2a70c3,_0xc6def);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x26736a=>{'idle'===_0x26736a['detail']['status']&&!_0x26736a['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x22f22f,_0x106f21,_0x53d02a){const _0x533d8a=this['_editor']['model']['document']['selection'],_0x3c8ddf=_0x533d8a['getSelectedElement'](),_0x57722c=!(!_0x3c8ddf||!_0x3c8ddf['is']('element','imageInline'));_0x53d02a['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x22f22f,_0x57722c),_0x106f21||_0x53d02a['setSelection'](_0x533d8a['getLastPosition']());}['_insertImage'](_0x282d2f,_0x387744){const _0x1979a2=this['_editor'],{imageDimension:_0x22dc8d,imageFallbackUrl:_0x9b7325,imageSources:_0x360719}=_0x282d2f['attributes'];_0x1979a2['execute']('insertImage',{'imageType':_0x387744?'imageInline':null,'source':{'uploadcareImageId':_0x282d2f['id'],'src':_0x9b7325,'sources':_0x360719,..._0x22dc8d}});}}class w extends _0xbc42aa{['_editing'];['_controller']=null;static get['requires'](){return[_0x569bf8,o];}constructor(_0x70d96a){super(_0x70d96a),this['_editing']=_0x70d96a['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x14fbed){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x14fbed);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x260be0,..._0x5fd2fc}){return _0x50f113(_0x260be0,_0x5fd2fc);}static['getInfo'](_0x9c4bc4,_0x5d7563){return _0x53664b(_0x9c4bc4,_0x5d7563);}}class f extends _0x18d894{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x543a6d,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1fc904=this['editor'];if(!!!_0x1fc904['config']['get']('uploadcare'))return;_0x1fc904['plugins']['get'](_0x543a6d)['createUploadAdapter']=_0xb0e95d=>new k(_0xb0e95d,_0x1fc904),_0x1fc904['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x3758fa,{imageElement:_0x171f46,data:_0x53b55d})=>{_0x1fc904['model']['change'](_0xaa13e7=>{_0xaa13e7['setAttribute']('uploadcareImageId',_0x53b55d['uploadcareImageId'],_0x171f46);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x4eb6f5,_0x3b4a91){this['loader']=_0x4eb6f5,this['editor']=_0x3b4a91,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4427f0=await this['loader']['file'];return j['upload']({'file':_0x4427f0,'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':_0x1b85e0=>{_0x1b85e0&&_0x1b85e0['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x1b85e0['value']);}})['then'](async _0x2f2012=>{const {imageFallbackUrl:_0x50b9b0,imageSources:_0x53d086}=C(_0x2f2012['cdnUrl'],_0x2f2012['imageInfo']['width']);return{'uploadcareImageId':_0x2f2012['uuid'],'default':_0x50b9b0,'sources':_0x53d086};})['catch'](()=>{const _0x4b9568=t('Cannot\x20upload\x20file:')+('\x20'+_0x4427f0['name']+'.');return Promise['reject'](_0x4b9568);});}['abort'](){this['controller']['abort']();}}class o extends _0x18d894{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x569bf8];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x43ff21){super(_0x43ff21),this['ucContextId']=_0x795be3();}['init'](){const _0x17fa84=this['editor'];_0x17fa84['commands']['add']('uploadcare',new w(_0x17fa84));}['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 _0x502d79=_0x5ce90b['document']['querySelector']('input[uploadcare-file-input]');_0x502d79&&_0x502d79['remove']();}),async function(_0x27ad73){const _0x416459=_0x286e0a([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]),_0x3d5ae3=0x535f8c3a,_0x5499ac=0x5358f7da^_0x3d5ae3,_0x53603e=window[_0x286e0a([0x44,0x61,0x74,0x65])][_0x286e0a([0x6e,0x6f,0x77])](),_0x10319f=_0x27ad73[_0x286e0a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x9b920=new window[(_0x286e0a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x51a1d8=>{_0x10319f[_0x286e0a([0x6f,0x6e,0x63,0x65])](_0x286e0a([0x72,0x65,0x61,0x64,0x79]),_0x51a1d8);}),_0x4d487a={[_0x286e0a([0x6b,0x74,0x79])]:_0x286e0a([0x45,0x43]),[_0x286e0a([0x75,0x73,0x65])]:_0x286e0a([0x73,0x69,0x67]),[_0x286e0a([0x63,0x72,0x76])]:_0x286e0a([0x50,0x2d,0x32,0x35,0x36]),[_0x286e0a([0x78])]:_0x286e0a([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]),[_0x286e0a([0x79])]:_0x286e0a([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]),[_0x286e0a([0x61,0x6c,0x67])]:_0x286e0a([0x45,0x53,0x32,0x35,0x36])},_0x1f952e=_0x10319f[_0x286e0a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x286e0a([0x67,0x65,0x74])](_0x286e0a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x501f05(){let _0x314649,_0x29ba70=null,_0x31bdde=null;try{if(_0x1f952e==_0x286e0a([0x47,0x50,0x4c]))return _0x286e0a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x314649=_0x40190d(),!_0x314649)return _0x286e0a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x314649[_0x286e0a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x31bdde=_0x5c68ff(_0x314649[_0x286e0a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x314649[_0x286e0a([0x6a,0x74,0x69])])),await _0x365016()?_0x38ddaa()?_0x1dde9e()?_0x286e0a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x21f2bc()?(_0x314649[_0x286e0a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x286e0a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x29ba70=_0x41579c(_0x286e0a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x314649[_0x286e0a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x286e0a([0x74,0x72,0x69,0x61,0x6c])&&(_0x29ba70=_0x41579c(_0x286e0a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x7ad89e()):_0x286e0a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x286e0a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x286e0a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x286e0a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1dde9e(){const _0x1078d6=[_0x286e0a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x286e0a([0x74,0x72,0x69,0x61,0x6c])][_0x286e0a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x314649[_0x286e0a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x53603e/0x3e8:0xe10*_0x5499ac;return _0x314649[_0x286e0a([0x65,0x78,0x70])]<_0x1078d6;}function _0x38ddaa(){const _0x2357a3=_0x314649[_0x286e0a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2357a3&&(!!_0x2357a3[_0x286e0a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x286e0a([0x2a]))||!!_0x2357a3[_0x286e0a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x286e0a([0x55,0x50,0x4c,0x43])));}function _0x21f2bc(){const _0x2693b4=_0x314649[_0x286e0a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2693b4||0x0==_0x2693b4[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x210dbe}=new URL(window[_0x286e0a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2693b4[_0x286e0a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x210dbe))return!0x0;const _0x53726f=_0x210dbe[_0x286e0a([0x73,0x70,0x6c,0x69,0x74])](_0x286e0a([0x2e]));return _0x2693b4[_0x286e0a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf83c48=>_0xf83c48[_0x286e0a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x286e0a([0x2a])))[_0x286e0a([0x6d,0x61,0x70])](_0x2ad4a2=>_0x2ad4a2[_0x286e0a([0x73,0x70,0x6c,0x69,0x74])](_0x286e0a([0x2e])))[_0x286e0a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x249525=>_0x249525[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x53726f[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x286e0a([0x6d,0x61,0x70])](_0x29e819=>Array(_0x53726f[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x29e819[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x286e0a([0x66,0x69,0x6c,0x6c])](_0x29e819[0x0]===_0x286e0a([0x2a])?_0x286e0a([0x2a]):'')[_0x286e0a([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x29e819))[_0x286e0a([0x73,0x6f,0x6d,0x65])](_0x11dd95=>_0x53726f[_0x286e0a([0x65,0x76,0x65,0x72,0x79])]((_0x5d84c5,_0x3ef8c8)=>_0x11dd95[_0x3ef8c8]===_0x5d84c5||_0x11dd95[_0x3ef8c8]===_0x286e0a([0x2a])));}function _0x7ad89e(){return _0x29ba70&&_0x31bdde?new window[(_0x286e0a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x582094,_0xf5d919)=>{_0x29ba70[_0x286e0a([0x74,0x68,0x65,0x6e])](_0x582094,_0xf5d919),_0x31bdde[_0x286e0a([0x74,0x68,0x65,0x6e])](_0x471ab2=>{_0x471ab2!=_0x286e0a([0x56,0x61,0x6c,0x69,0x64])&&_0x582094(_0x471ab2);},_0xf5d919);}):_0x29ba70||_0x31bdde||_0x286e0a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5c68ff(_0x538adc,_0x36dbe4){return new window[(_0x286e0a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d1bfc=>{if(_0x3c935a())return _0x2d1bfc(_0x286e0a([0x56,0x61,0x6c,0x69,0x64]));_0x4c0f5c(),_0x10319f[_0x286e0a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x286e0a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x436b8f=!0x1;const _0x579d9c=_0x795be3();function _0xf3fa9e(_0x38ab99){return!!_0x38ab99&&(typeof _0x38ab99===_0x286e0a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x38ab99===_0x286e0a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x38ab99[_0x286e0a([0x74,0x68,0x65,0x6e])]===_0x286e0a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x38ab99[_0x286e0a([0x63,0x61,0x74,0x63,0x68])]===_0x286e0a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2921f0(_0x13295d){_0x45d133(_0x13295d)[_0x286e0a([0x74,0x68,0x65,0x6e])](_0x13d99d=>{if(!_0x13d99d||_0x13d99d[_0x286e0a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x286e0a([0x6f,0x6b]))return _0x286e0a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x26a70b(_0x4a6314(_0x579d9c+_0x36dbe4))!=_0x13d99d[_0x286e0a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x286e0a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x286e0a([0x56,0x61,0x6c,0x69,0x64]);})[_0x286e0a([0x74,0x68,0x65,0x6e])](_0x2ac582=>(_0xa7f1c6(),_0x2ac582),()=>{const _0x54318c=_0x5bdde4();return null==_0x54318c?(_0xa7f1c6(),_0x286e0a([0x56,0x61,0x6c,0x69,0x64])):_0x286e0a(_0x53603e-_0x54318c>(0x7753083a^_0x3d5ae3)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x286e0a([0x74,0x68,0x65,0x6e])](_0x2d1bfc)[_0x286e0a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2d1bfc(_0x286e0a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x373ed1=0x536962ba^_0x3d5ae3;function _0xa7f1c6(){const _0x595842=_0x286e0a([0x6c,0x6c,0x63,0x74,0x2d])+_0x26a70b(_0x4a6314(_0x538adc)),_0x21e046=_0x25d136(_0x26a70b(window[_0x286e0a([0x4d,0x61,0x74,0x68])][_0x286e0a([0x63,0x65,0x69,0x6c])](_0x53603e/_0x373ed1)));window[_0x286e0a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x286e0a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x595842,_0x21e046);}function _0x5bdde4(){const _0x5179cc=_0x286e0a([0x6c,0x6c,0x63,0x74,0x2d])+_0x26a70b(_0x4a6314(_0x538adc)),_0x386bc2=window[_0x286e0a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x286e0a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5179cc);return _0x386bc2?window[_0x286e0a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x25d136(_0x386bc2),0x10)*_0x373ed1:null;}function _0x45d133(_0x9234b1){return new window[(_0x286e0a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d1908,_0xd162b3)=>{_0x9234b1[_0x286e0a([0x74,0x68,0x65,0x6e])](_0x2d1908,_0xd162b3),window[_0x286e0a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xd162b3,0x535e58fa^_0x3d5ae3);});}}_0x10319f[_0x286e0a([0x6f,0x6e])](_0x286e0a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x17e88b,_0x495cea)=>{if(_0x495cea[0x0]!=_0x538adc)return _0x2d1bfc(_0x286e0a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x495cea[0x1]={..._0x495cea[0x1],[_0x286e0a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x579d9c};},{[_0x286e0a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x286e0a([0x68,0x69,0x67,0x68])}),_0x10319f[_0x286e0a([0x6f,0x6e])](_0x286e0a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2453c6=>{_0xf3fa9e(_0x2453c6[_0x286e0a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x436b8f=!0x0,_0x2921f0(_0x2453c6[_0x286e0a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x286e0a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x286e0a([0x6c,0x6f,0x77])}),_0x9b920[_0x286e0a([0x74,0x68,0x65,0x6e])](()=>{_0x436b8f||_0x2d1bfc(_0x286e0a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3c935a(){return _0x10319f[_0x286e0a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x286e0a([0x76,0x69,0x65,0x77])][_0x286e0a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x286e0a([0x61,0x75,0x74,0x6f]);}function _0x4c0f5c(){_0x10319f[_0x286e0a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x286e0a([0x76,0x69,0x65,0x77])][_0x286e0a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x286e0a([0x61,0x75,0x74,0x6f]);}}function _0x41579c(_0xe08ab6){const _0x154e28=[new window[(_0x286e0a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c8241=>setTimeout(_0x3c8241,0x5356b2f6^_0x3d5ae3)),_0x9b920[_0x286e0a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x286e0a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57f2f8=>{let _0x1a96e8=0x0;_0x10319f[_0x286e0a([0x6d,0x6f,0x64,0x65,0x6c])][_0x286e0a([0x6f,0x6e])](_0x286e0a([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x203b14,_0x184bd8)=>{_0x184bd8[0x0][_0x286e0a([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1a96e8++,_0x1a96e8==(0x535f8dc2^_0x3d5ae3)&&(_0x57f2f8(),_0x203b14[_0x286e0a([0x6f,0x66,0x66])]());});}))];return window[_0x286e0a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x286e0a([0x72,0x61,0x63,0x65])](_0x154e28)[_0x286e0a([0x74,0x68,0x65,0x6e])](()=>_0xe08ab6);}async function _0x2876cc(){await _0x9b920,_0x10319f[_0x286e0a([0x6d,0x6f,0x64,0x65,0x6c])][_0x286e0a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4aefc8,_0x10319f[_0x286e0a([0x6d,0x6f,0x64,0x65,0x6c])][_0x286e0a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4aefc8,_0x10319f[_0x286e0a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x286e0a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5b6fda(_0x267ff8){const _0x2b6aa3=_0x430712();_0x10319f[_0x2b6aa3]=_0x286e0a([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x267ff8,_0x267ff8!=_0x286e0a([0x56,0x61,0x6c,0x69,0x64])&&_0x2876cc();}function _0x430712(){const _0x301543=window[_0x286e0a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x286e0a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x286e0a([0x6e,0x6f,0x77])]())[_0x286e0a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x286e0a([0x2e]),'');let _0x81effe=_0x286e0a([0x68]);for(let _0x28d0ea=0x0;_0x28d0ea<_0x301543[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28d0ea+=0x2){let _0x141e5f=window[_0x286e0a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x301543[_0x286e0a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x28d0ea,_0x28d0ea+0x2));_0x141e5f>=_0x416459[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x141e5f-=_0x416459[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x81effe+=_0x416459[_0x141e5f];}return _0x81effe;}function _0x40190d(){const _0x4599d4=_0x1f952e[_0x286e0a([0x73,0x70,0x6c,0x69,0x74])](_0x286e0a([0x2e]));if(0x3!=_0x4599d4[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2a3618(_0x4599d4[0x1]);function _0x2a3618(_0x291048){const _0x4c981d=_0x47e1c0(_0x291048);return _0x4c981d&&_0x49f5a6()?_0x4c981d:null;function _0x49f5a6(){const _0x58b1b5=_0x4c981d[_0x286e0a([0x6a,0x74,0x69])],_0x380cbc=window[_0x286e0a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58b1b5[_0x286e0a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x58b1b5[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x34cdcc={..._0x4c981d,[_0x286e0a([0x6a,0x74,0x69])]:_0x58b1b5[_0x286e0a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x58b1b5[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x34cdcc[_0x286e0a([0x76,0x63])],_0x4a6314(_0x34cdcc)==_0x380cbc;}}}async function _0x365016(){let _0x48816f=!0x0;try{const _0x12d7e8=_0x1f952e[_0x286e0a([0x73,0x70,0x6c,0x69,0x74])](_0x286e0a([0x2e])),[_0x1fe36a,_0x390145,_0x3711e1]=_0x12d7e8;return _0x5bc7de(_0x1fe36a),await _0x3e1b74(_0x1fe36a,_0x390145,_0x3711e1),_0x48816f;}catch{return!0x1;}function _0x5bc7de(_0x56fe9e){const _0x23ba69=_0x47e1c0(_0x56fe9e);_0x23ba69&&_0x23ba69[_0x286e0a([0x61,0x6c,0x67])]==_0x286e0a([0x45,0x53,0x32,0x35,0x36])||(_0x48816f=!0x1);}async function _0x3e1b74(_0x2642ba,_0x264022,_0x5bc0e1){const _0x16ddc9=window[_0x286e0a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x286e0a([0x66,0x72,0x6f,0x6d])](_0x55ba09(_0x5bc0e1),_0x4cf550=>_0x4cf550[_0x286e0a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x311201=new window[(_0x286e0a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x286e0a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2642ba+_0x286e0a([0x2e])+_0x264022),_0x999833=window[_0x286e0a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x286e0a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x999833)return;const _0x437dce=await _0x999833[_0x286e0a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x286e0a([0x6a,0x77,0x6b]),_0x4d487a,{[_0x286e0a([0x6e,0x61,0x6d,0x65])]:_0x286e0a([0x45,0x43,0x44,0x53,0x41]),[_0x286e0a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x286e0a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x286e0a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x999833[_0x286e0a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x286e0a([0x6e,0x61,0x6d,0x65])]:_0x286e0a([0x45,0x43,0x44,0x53,0x41]),[_0x286e0a([0x68,0x61,0x73,0x68])]:{[_0x286e0a([0x6e,0x61,0x6d,0x65])]:_0x286e0a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x437dce,_0x16ddc9,_0x311201)||(_0x48816f=!0x1);}}function _0x47e1c0(_0x38292d){return _0x38292d[_0x286e0a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x286e0a([0x65,0x79]))?JSON[_0x286e0a([0x70,0x61,0x72,0x73,0x65])](_0x55ba09(_0x38292d)):null;}function _0x55ba09(_0x2b273c){return window[_0x286e0a([0x61,0x74,0x6f,0x62])](_0x2b273c[_0x286e0a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x286e0a([0x2b]))[_0x286e0a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x286e0a([0x2f])));}function _0x4a6314(_0x1239b0){let _0x43095e=0x1505;function _0x495ebc(_0x2c4bf7){for(let _0x9f05ab=0x0;_0x9f05ab<_0x2c4bf7[_0x286e0a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x9f05ab++){const _0x41d16d=_0x2c4bf7[_0x286e0a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x9f05ab);_0x43095e=(_0x43095e<<0x5)+_0x43095e+_0x41d16d,_0x43095e&=_0x43095e;}}function _0x2671f1(_0x42cd50){Array[_0x286e0a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x42cd50)?_0x42cd50[_0x286e0a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2671f1):_0x42cd50&&typeof _0x42cd50==_0x286e0a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x286e0a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x42cd50)[_0x286e0a([0x73,0x6f,0x72,0x74])]()[_0x286e0a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x502f48,_0x16dd69])=>{_0x495ebc(_0x502f48),_0x2671f1(_0x16dd69);}):_0x495ebc(window[_0x286e0a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x42cd50));}return _0x2671f1(_0x1239b0),_0x43095e>>>0x0;}function _0x26a70b(_0x2f4413){return _0x2f4413[_0x286e0a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x286e0a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x286e0a([0x30]));}function _0x25d136(_0x1ae6eb){return _0x1ae6eb[_0x286e0a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x286e0a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x286e0a([0x6a,0x6f,0x69,0x6e])]('');}function _0x4aefc8(){}function _0x286e0a(_0x3980f7){return _0x3980f7['map'](_0x361889=>String['fromCharCode'](_0x361889))['join']('');}_0x5b6fda(await _0x501f05());}(this);}['_initSchema'](){const _0x5f047c=this['editor']['model']['schema'];_0x5f047c['isRegistered']('imageBlock')&&_0x5f047c['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x5f047c['isRegistered']('imageInline')&&_0x5f047c['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x574471=this['editor'];_0x574471['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x574471['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x5e6fe6=>_0x5e6fe6['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x30424b=_0x574471['commands']['get']('replaceImageSource');_0x30424b&&this['listenTo'](_0x30424b,'cleanupImage',(_0x60e309,[_0x5d0b79,_0xc1766d])=>{_0x5d0b79['removeAttribute']('uploadcareImageId',_0xc1766d);});}['_initConfig'](){const _0x46a7f6=this['editor']['config']['get']('uploadcare.uploader')||{},_0x55d7f2=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3eadd0(_0x5ce90b['document'],'uc-config',{..._0x46a7f6,'pubkey':_0x55d7f2,'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']=_0x16d0bd=>{if('closeMax'==_0x16d0bd)return'#uc-icon-arrow-down';},_0x5ce90b['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3eadd0(_0x5ce90b['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x5ce90b['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x3f53e1=this['editor']['commands']['get']('insertImage');_0x3f53e1&&this['listenTo'](_0x3f53e1,'execute',()=>{const _0x320c4b=this['editor']['model']['document']['selection']['getSelectedElement']();_0x320c4b&&_0x320c4b['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x320c4b);});});const _0x2ace46=this['editor']['commands']['get']('uploadcareImageReplace');_0x2ace46&&this['listenTo'](_0x2ace46,'execute',()=>{const _0x29cb4e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x29cb4e&&_0x29cb4e['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x29cb4e);});});}}class tt extends _0x18d894{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2cac27){super(_0x2cac27),_0x2cac27['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x935c71['defineComponents'](_0x935c71),this['_defineLocale']();}['_defineLocale'](){const _0x1573bc=this['editor']['config']['get']('uploadcare.locale'),_0x2295a3=this['editor']['locale']['contentLanguage'];_0x1573bc&&_0x935c71['defineLocale'](_0x2295a3,_0x1573bc);}}class ii extends _0x257250{constructor(_0x1d5026){super(_0x1d5026);const t=_0x1d5026['t'],_0x5df793=this['bindTemplate'],_0x28fad9=new _0x5391b8();_0x28fad9['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':[_0x28fad9,{'text':_0x5df793['to']('imageUploadProgress',_0x6ef55c=>t('Loading\x20image...')+'\x20('+(_0x6ef55c||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 _0x257250{constructor(_0x60f3ad){super(_0x60f3ad);const t=_0x60f3ad['t'];this['set']('errorType',null);const _0x4888c6=new _0xfa745e(_0x60f3ad);_0x4888c6['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4888c6['withText']=!0x0,_0x4888c6['class']='ck-button-action',_0x4888c6['on']('execute',()=>{this['fire']('retry');}),_0x4888c6['bind']('isVisible')['to'](this,'errorType',_0x4b5ed4=>'NotFound'!==_0x4b5ed4);const _0xc45b16=new _0x7fa819();_0xc45b16['content']=_0x4555dc,_0xc45b16['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5820d7=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':[_0xc45b16,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5820d7['to']('errorType',_0x3195af=>t('NotFound'!==_0x3195af?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4888c6]},{'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 _0x257250{constructor(_0x1b93c9,_0x6cb643){super(_0x1b93c9);const _0x3e452e=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x6cb643,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3e452e['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x45d75f,_0x41c633,_0x1eedf2){super(_0x45d75f),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x45d75f),this['_errorView']=new ti(_0x45d75f),this['_editingView']=new ei(_0x45d75f,_0x1eedf2),this['_focusableView']=new _0x257250(_0x45d75f),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x41c633),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'],_0x44d9f1=>{this['_addUploadcareImageEditorListeners'](_0x44d9f1);});}),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'](_0x2d5465,_0x504695){const _0x219f12='uc-cloud-image-editor',_0x12049e=_0x2d5465['querySelector'](_0x219f12);if(_0x12049e)return _0x504695(_0x12049e);const _0x588026=new MutationObserver(_0x4f426f=>{const _0x3bb9ce=_0x4f426f['filter'](_0xb73d60=>_0xb73d60['target']===_0x2d5465&&_0xb73d60['addedNodes']['length']>0x0&&_0xb73d60['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x219f12);_0x3bb9ce['length']&&(_0x588026['disconnect'](),_0x504695(_0x3bb9ce[0x0]['addedNodes'][0x0]));});_0x588026['observe'](_0x2d5465,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x1c786c){_0x1c786c['addEventListener']('apply',_0x1af9b3=>{this['fire']('apply',{'imageSrc':_0x1af9b3['detail']['cdnUrl']});}),_0x1c786c['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x2afe1a(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x42a5bd,_0x4a422d,_0x35c260){super(),this['_editor']=_0x42a5bd,this['_dialog']=_0x4a422d,this['_imageElement']=_0x35c260,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 _0xcb8f54=this['_imageElement'],_0x4b6bdf=_0xcb8f54['getAttribute']('uploadcareImageId'),_0x12f21d=_0xcb8f54['getAttribute']('src');if(_0x4b6bdf)await this['_loadImageInfo'](_0x4b6bdf,_0x12f21d);else{if(this['_imageCache']['has'](_0x12f21d)){const _0x3d9446=this['_imageCache']['get'](_0x12f21d);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3d9446['url'],this['imageDimension']=_0x3d9446['dimension'],this['imageId']=_0x3d9446['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x190405}=this['_editor'],t=_0x190405['t'],_0x1e56b5=new X(_0x190405,this['imageStatus'],this['_attributes']);_0x1e56b5['bind']('status')['to'](this,'imageStatus'),_0x1e56b5['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1e56b5['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1e56b5['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1e56b5,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3e58f7,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1e56b5,'position':_0x161f8f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1e56b5['focus']();},'onHide':()=>{_0x1e56b5['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4ad068=>!A(_0x4ad068,_0x1e56b5['element'])}});}['_loadImageInfo'](_0x5f0d15,_0x4e29b0){return j['getInfo'](_0x5f0d15,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x48af3d=>{const {width:_0xb11821,height:_0xb29ac}=_0x48af3d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4e29b0,this['imageDimension']={'width':_0xb11821,'height':_0xb29ac},this['imageId']=_0x5f0d15;})['catch'](_0x379ee8=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x379ee8['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x54bed0,_0x2800f5){return this['_getImageAsFile'](_0x54bed0)['then'](_0x2a6b11=>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':_0x2800f5['signal'],'file':_0x2a6b11,'onProgress':_0x3196ed=>{_0x3196ed&&_0x3196ed['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3196ed['value']));}}))['then'](_0xc7cf35=>{const {width:_0x4aebe5,height:_0x1327e0}=_0xc7cf35['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xc7cf35['cdnUrl'],this['imageDimension']={'width':_0x4aebe5,'height':_0x1327e0},this['imageId']=_0xc7cf35['uuid'],this['imageUploadProgress']=null;const _0x32fb1e=_0x54bed0['getAttribute']('src');this['_imageCache']['set'](_0x32fb1e,{'id':_0xc7cf35['uuid'],'url':_0xc7cf35['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0xd8cc34=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xd8cc34['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x353167,_0x539713){_0x353167['on']('apply',(_0x3b6f9c,_0x433b93)=>{this['_replaceImage'](_0x539713,_0x433b93['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x353167['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x353167['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x16cdd0,_0x4b8feb,_0x1c66d2){const _0x3ef92d=this['_editor'],{width:_0xa86438,height:_0x274672}=S(_0x4b8feb,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x344bcb,imageSources:_0x51907d}=C(_0x4b8feb,_0xa86438);_0x3ef92d['model']['change'](_0x5fe517=>{if('$graveyard'===_0x16cdd0['root']['rootName']){_0x3ef92d['execute']('insertImage',{'imageType':_0x16cdd0['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x16cdd0['getAttributes']()),'uploadcareImageId':_0x1c66d2,'src':_0x344bcb,'sources':_0x51907d,'width':_0xa86438,'height':_0x274672}});const _0x277e2a=_0x16cdd0['getChildren']();_0x16cdd0=_0x3ef92d['model']['document']['selection']['getSelectedElement']();for(const _0x1436e8 of _0x277e2a)_0x5fe517['append'](_0x5fe517['cloneElement'](_0x1436e8),_0x16cdd0);}else _0x5fe517['setSelection'](_0x16cdd0,'on'),_0x3ef92d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x16cdd0['getAttributes']()),'uploadcareImageId':_0x1c66d2,'src':_0x344bcb,'sources':_0x51907d,'width':_0xa86438,'height':_0x274672},_0x16cdd0);_0x5fe517['setSelection'](_0x16cdd0,'on');});}async['_getImageAsFile'](_0x4670e1){const _0x186367=_0x5ce90b['window'],_0x7352c6=_0x5ce90b['document']['location']['href'],_0x20d15f=new _0x186367['URL'](_0x4670e1['getAttribute']('src'),_0x7352c6);if('data:'===_0x20d15f['protocol']){const _0x202b7d=_0x20d15f['href']['split'](','),_0x5650e7=_0x202b7d[0x0]['match'](/:(.*?);/)[0x1],_0x168124=_0x5650e7['split']('/')[0x1],_0x3afb95=_0x186367['atob'](_0x202b7d[_0x202b7d['length']-0x1]);let _0x714445=_0x3afb95['length'];const _0x5104d5=new _0x186367['Uint8Array'](_0x714445);for(;_0x714445--;)_0x5104d5[_0x714445]=_0x3afb95['charCodeAt'](_0x714445);return new _0x186367['File']([_0x5104d5],'image.'+_0x168124,{'type':_0x5650e7});}const _0x138b00=_0x20d15f['href']['split']('/'),_0x25ec66=_0x138b00[_0x138b00['length']-0x1],_0x5c5086=_0x25ec66['split']('.')[0x1];return _0x186367['fetch'](_0x20d15f['href'])['then'](_0x37df04=>_0x37df04['clone']()['blob']())['then'](_0x27527b=>new _0x186367['File']([_0x27527b],_0x25ec66,{'type':'image/'+_0x5c5086}));}}class Q extends _0xbc42aa{['imageEditController'];static get['requires'](){return[_0x569bf8];}['_isEditable'];constructor(_0x36587d){super(_0x36587d),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x12cb73){const _0x1b09da=z(_0x12cb73);return _0x569d77=>!(!_0x569d77||!_0x569d77['is']('element','imageBlock')&&!_0x569d77['is']('element','imageInline'))&&(!!_0x569d77['hasAttribute']('uploadcareImageId')||!!_0x569d77['hasAttribute']('src')&&_0x1b09da(_0x569d77['getAttribute']('src')));}(_0x36587d['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x3a9e02=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x3a9e02);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x49ed39=this['editor']['model']['document']['selection']['getSelectedElement']();_0x49ed39&&(_0x49ed39['is']('element','imageBlock')||_0x49ed39['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x569bf8),_0x49ed39),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0xbc42aa{['refresh'](){const _0x5b81eb=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x5b81eb&&(_0x5b81eb['is']('element','imageBlock')||_0x5b81eb['is']('element','imageInline')));}['execute'](_0xb0cfaf){const _0x30449b=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5b44c2=>{_0x5b44c2['setAttributes'](_0xb0cfaf,_0x30449b),_0x5b44c2['removeAttribute']('srcset',_0x30449b),_0x5b44c2['removeAttribute']('sizes',_0x30449b);});}}class m extends _0x18d894{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x309de5,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x38fd51}=this;_0x38fd51['commands']['add']('uploadcareImageEdit',new Q(_0x38fd51)),_0x38fd51['commands']['add']('uploadcareImageReplace',new V(_0x38fd51));}}class g extends _0x18d894{['_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 _0x55af47=this['editor'];_0x55af47['ui']['componentFactory']['add']('uploadcareImageEdit',_0xc17f59=>{const _0x42fd66=_0x55af47['commands']['get']('uploadcareImageEdit'),_0x594610=new _0xfa745e(_0xc17f59),t=_0xc17f59['t'];return _0x594610['set']({'icon':_0x3e58f7,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x594610['bind']('isEnabled')['to'](_0x42fd66),_0x594610['bind']('isOn')['to'](_0x42fd66,'isActive'),this['listenTo'](_0x594610,'execute',()=>{_0x55af47['execute']('uploadcareImageEdit'),_0x55af47['editing']['view']['focus']();}),_0x594610;}),this['_initConfig']();}['_initConfig'](){const _0x4a6c79=_0x3eadd0(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4a6c79),this['listenTo'](this['editor'],'destroy',()=>{_0x4a6c79['remove']();});}}class et extends _0x18d894{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-next-
|
|
3
|
+
"version": "0.0.0-nightly-next-20251214.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-next-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20251214.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20251214.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20251214.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20251214.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20251214.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20251214.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20251214.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-next-20251214.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.24.5",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x3252(_0x2461fe,_0x2926ac){const _0x2a992d=_0x2a99();return _0x3252=function(_0x325219,_0x56b529){_0x325219=_0x325219-0x11f;let _0x21ad65=_0x2a992d[_0x325219];return _0x21ad65;},_0x3252(_0x2461fe,_0x2926ac);}const _0x501edc=_0x3252;(function(_0x5214d8,_0x1b00ac){const _0x4d52d6=_0x3252,_0x118787=_0x5214d8();while(!![]){try{const _0x198367=parseInt(_0x4d52d6(0x131))/0x1+-parseInt(_0x4d52d6(0x170))/0x2+parseInt(_0x4d52d6(0x161))/0x3+parseInt(_0x4d52d6(0x15a))/0x4+parseInt(_0x4d52d6(0x128))/0x5+parseInt(_0x4d52d6(0x15d))/0x6*(parseInt(_0x4d52d6(0x12e))/0x7)+-parseInt(_0x4d52d6(0x155))/0x8;if(_0x198367===_0x1b00ac)break;else _0x118787['push'](_0x118787['shift']());}catch(_0x4e824b){_0x118787['push'](_0x118787['shift']());}}}(_0x2a99,0xde1f1));function _0x2a99(){const _0x5131fc=['execute','listenTo','get','cleanupImage','_configElement','isOfficialPlugin','view','body','305132JbrnBZ','ctxElement','imageBlock','_ctxElement','getSelectedElement','data-uc-image-id','selection','isRegistered','locale','getAttribute','pluginName','2264005OlPDbW','isPremiumPlugin','uploadcareImageId','replaceImageSource','UploadcareEditing','true','11076541kZMdGt','remove','_initImageProcessingIndicator','333894IbsXin','_initConfig','extend','imageInline','schema','for','insertImage','uploadcare.pubkey','map','editor','PictureEditing','querySelector','destroy','document','conversion','\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','once','uploadcareImageReplace','uploader-','afterInit','uc-upload-ctx-provider','fromCharCode','commands','iconHrefResolver','_initConversion','_initCtx','render','init','add','appendChild','ucContextId','contentLanguage','uc-config','closeMax','uploadcare.uploader','configElement','17472648KEzapF','downcast','join','requires','href','1330900iTIqGi','uploadcare','upcast','6oQwxJn','#uc-icon-arrow-down','removeAttribute','editing','1634019tBsOLI','_initSchema','input[uploadcare-file-input]','elementToAttribute','model','attributeToAttribute','config'];_0x2a99=function(){return _0x5131fc;};return _0x2a99();}import{Plugin as _0x585841}from'ckeditor5/src/core.js';import{Dialog as _0x3dbd7f}from'ckeditor5/src/ui.js';import{createElement as _0x26676a,global as _0x3093d1,uid as _0x3ea4f8}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x4589b7}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x251b39}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x3abb08}from'./utils/editingutils.js';export class UploadcareEditing extends _0x585841{[_0x501edc(0x16c)]=null;[_0x501edc(0x120)]=null;static get[_0x501edc(0x127)](){const _0x2f191e=_0x501edc;return _0x2f191e(0x12c);}static get[_0x501edc(0x158)](){const _0x3a68e4=_0x501edc;return[_0x3a68e4(0x13b),_0x251b39,_0x3dbd7f];}static get[_0x501edc(0x16d)](){return!0x0;}static get[_0x501edc(0x129)](){return!0x0;}[_0x501edc(0x14f)];get[_0x501edc(0x154)](){const _0x18673b=_0x501edc;return this[_0x18673b(0x16c)];}get[_0x501edc(0x171)](){const _0x1a1b1f=_0x501edc;return this[_0x1a1b1f(0x120)];}constructor(_0x51b14d){const _0x169c14=_0x501edc;super(_0x51b14d),this[_0x169c14(0x14f)]=_0x3ea4f8();}[_0x501edc(0x14c)](){const _0x439b45=_0x501edc,_0x5cad7f=this[_0x439b45(0x13a)];_0x5cad7f[_0x439b45(0x147)][_0x439b45(0x14d)](_0x439b45(0x15b),new _0x4589b7(_0x5cad7f));}[_0x501edc(0x144)](){const _0xc9ca8d=_0x501edc;this[_0xc9ca8d(0x162)](),this[_0xc9ca8d(0x149)](),this[_0xc9ca8d(0x132)](),this[_0xc9ca8d(0x14a)](),this[_0xc9ca8d(0x130)](),this[_0xc9ca8d(0x169)](this[_0xc9ca8d(0x13a)],_0xc9ca8d(0x13d),()=>{const _0x172219=_0xc9ca8d;this[_0x172219(0x16c)]&&(this[_0x172219(0x16c)][_0x172219(0x12f)](),this[_0x172219(0x16c)]=null),this[_0x172219(0x120)]&&(this[_0x172219(0x120)][_0x172219(0x12f)](),this[_0x172219(0x120)]=null);const _0x51fb61=_0x3093d1[_0x172219(0x13e)][_0x172219(0x13c)](_0x172219(0x163));_0x51fb61&&_0x51fb61[_0x172219(0x12f)]();}),async function(_0x4095a5){const _0x374781=_0x2b1bb7([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]),_0x5e678e=0x535f8c3a,_0x215289=0x5358f7f2^_0x5e678e,_0x4a055c=window[_0x2b1bb7([0x44,0x61,0x74,0x65])][_0x2b1bb7([0x6e,0x6f,0x77])](),_0x3fd1cd=_0x4095a5[_0x2b1bb7([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x536c8a=new window[(_0x2b1bb7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x51d69d=>{_0x3fd1cd[_0x2b1bb7([0x6f,0x6e,0x63,0x65])](_0x2b1bb7([0x72,0x65,0x61,0x64,0x79]),_0x51d69d);}),_0x5b0e78={[_0x2b1bb7([0x6b,0x74,0x79])]:_0x2b1bb7([0x45,0x43]),[_0x2b1bb7([0x75,0x73,0x65])]:_0x2b1bb7([0x73,0x69,0x67]),[_0x2b1bb7([0x63,0x72,0x76])]:_0x2b1bb7([0x50,0x2d,0x32,0x35,0x36]),[_0x2b1bb7([0x78])]:_0x2b1bb7([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]),[_0x2b1bb7([0x79])]:_0x2b1bb7([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]),[_0x2b1bb7([0x61,0x6c,0x67])]:_0x2b1bb7([0x45,0x53,0x32,0x35,0x36])},_0x5bb8e5=_0x3fd1cd[_0x2b1bb7([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2b1bb7([0x67,0x65,0x74])](_0x2b1bb7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x365a57(){let _0x26f341,_0x5edf13=null,_0xbe46d1=null;try{if(_0x5bb8e5==_0x2b1bb7([0x47,0x50,0x4c]))return _0x2b1bb7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x26f341=_0x5195ae(),!_0x26f341)return _0x2b1bb7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x26f341[_0x2b1bb7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xbe46d1=_0x186347(_0x26f341[_0x2b1bb7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x26f341[_0x2b1bb7([0x6a,0x74,0x69])])),await _0x1d0d98()?_0x5ddba3()?_0x383392()?_0x2b1bb7([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x121c93()?(_0x26f341[_0x2b1bb7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2b1bb7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5edf13=_0x229cd3(_0x2b1bb7([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x26f341[_0x2b1bb7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2b1bb7([0x74,0x72,0x69,0x61,0x6c])&&(_0x5edf13=_0x229cd3(_0x2b1bb7([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xea3a43()):_0x2b1bb7([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2b1bb7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2b1bb7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2b1bb7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x383392(){const _0x10abe1=[_0x2b1bb7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2b1bb7([0x74,0x72,0x69,0x61,0x6c])][_0x2b1bb7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26f341[_0x2b1bb7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4a055c/0x3e8:0xe10*_0x215289;return _0x26f341[_0x2b1bb7([0x65,0x78,0x70])]<_0x10abe1;}function _0x5ddba3(){const _0x537cb3=_0x26f341[_0x2b1bb7([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x537cb3&&(!!_0x537cb3[_0x2b1bb7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b1bb7([0x2a]))||!!_0x537cb3[_0x2b1bb7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b1bb7([0x55,0x50,0x4c,0x43])));}function _0x121c93(){const _0x166321=_0x3252,_0x21d90b=_0x26f341[_0x2b1bb7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x21d90b||0x0==_0x21d90b[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4a2d0d}=new URL(window[_0x2b1bb7([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x166321(0x159)]);if(_0x21d90b[_0x2b1bb7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a2d0d))return!0x0;const _0x180161=_0x4a2d0d[_0x2b1bb7([0x73,0x70,0x6c,0x69,0x74])](_0x2b1bb7([0x2e]));return _0x21d90b[_0x2b1bb7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x159738=>_0x159738[_0x2b1bb7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b1bb7([0x2a])))[_0x2b1bb7([0x6d,0x61,0x70])](_0x4682bd=>_0x4682bd[_0x2b1bb7([0x73,0x70,0x6c,0x69,0x74])](_0x2b1bb7([0x2e])))[_0x2b1bb7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x19dd3c=>_0x19dd3c[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x180161[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2b1bb7([0x6d,0x61,0x70])](_0x2a40db=>Array(_0x180161[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2a40db[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2b1bb7([0x66,0x69,0x6c,0x6c])](_0x2a40db[0x0]===_0x2b1bb7([0x2a])?_0x2b1bb7([0x2a]):'')[_0x2b1bb7([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2a40db))[_0x2b1bb7([0x73,0x6f,0x6d,0x65])](_0x33e2b6=>_0x180161[_0x2b1bb7([0x65,0x76,0x65,0x72,0x79])]((_0x5461a9,_0x134ce3)=>_0x33e2b6[_0x134ce3]===_0x5461a9||_0x33e2b6[_0x134ce3]===_0x2b1bb7([0x2a])));}function _0xea3a43(){return _0x5edf13&&_0xbe46d1?new window[(_0x2b1bb7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3e04e7,_0x5d0e97)=>{_0x5edf13[_0x2b1bb7([0x74,0x68,0x65,0x6e])](_0x3e04e7,_0x5d0e97),_0xbe46d1[_0x2b1bb7([0x74,0x68,0x65,0x6e])](_0x50aa6e=>{_0x50aa6e!=_0x2b1bb7([0x56,0x61,0x6c,0x69,0x64])&&_0x3e04e7(_0x50aa6e);},_0x5d0e97);}):_0x5edf13||_0xbe46d1||_0x2b1bb7([0x56,0x61,0x6c,0x69,0x64]);}}function _0x186347(_0x16db67,_0x223f3f){return new window[(_0x2b1bb7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e2bb9=>{if(_0x2551f0())return _0x4e2bb9(_0x2b1bb7([0x56,0x61,0x6c,0x69,0x64]));_0x1dd7cc(),_0x3fd1cd[_0x2b1bb7([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2b1bb7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3ae65e=!0x1;const _0x25ee7d=_0x3ea4f8();function _0x31a4e5(_0x5af295){return!!_0x5af295&&(typeof _0x5af295===_0x2b1bb7([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5af295===_0x2b1bb7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5af295[_0x2b1bb7([0x74,0x68,0x65,0x6e])]===_0x2b1bb7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5af295[_0x2b1bb7([0x63,0x61,0x74,0x63,0x68])]===_0x2b1bb7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1eaca6(_0x3aa76e){_0x609dd4(_0x3aa76e)[_0x2b1bb7([0x74,0x68,0x65,0x6e])](_0x30173d=>{if(!_0x30173d||_0x30173d[_0x2b1bb7([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2b1bb7([0x6f,0x6b]))return _0x2b1bb7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2aebec(_0x2bfb85(_0x25ee7d+_0x223f3f))!=_0x30173d[_0x2b1bb7([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2b1bb7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2b1bb7([0x56,0x61,0x6c,0x69,0x64]);})[_0x2b1bb7([0x74,0x68,0x65,0x6e])](_0x5a1074=>(_0x3f29fc(),_0x5a1074),()=>{const _0x4f14ac=_0x5c6890();return null==_0x4f14ac?(_0x3f29fc(),_0x2b1bb7([0x56,0x61,0x6c,0x69,0x64])):_0x2b1bb7(_0x4a055c-_0x4f14ac>(0x7753083a^_0x5e678e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2b1bb7([0x74,0x68,0x65,0x6e])](_0x4e2bb9)[_0x2b1bb7([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4e2bb9(_0x2b1bb7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x332492=0x536962ba^_0x5e678e;function _0x3f29fc(){const _0x1694b5=_0x2b1bb7([0x6c,0x6c,0x63,0x74,0x2d])+_0x2aebec(_0x2bfb85(_0x16db67)),_0x319dd4=_0x14aea9(_0x2aebec(window[_0x2b1bb7([0x4d,0x61,0x74,0x68])][_0x2b1bb7([0x63,0x65,0x69,0x6c])](_0x4a055c/_0x332492)));window[_0x2b1bb7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2b1bb7([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1694b5,_0x319dd4);}function _0x5c6890(){const _0x231d45=_0x2b1bb7([0x6c,0x6c,0x63,0x74,0x2d])+_0x2aebec(_0x2bfb85(_0x16db67)),_0x58c939=window[_0x2b1bb7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2b1bb7([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x231d45);return _0x58c939?window[_0x2b1bb7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x14aea9(_0x58c939),0x10)*_0x332492:null;}function _0x609dd4(_0x4a3833){return new window[(_0x2b1bb7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1eab1f,_0x19e377)=>{_0x4a3833[_0x2b1bb7([0x74,0x68,0x65,0x6e])](_0x1eab1f,_0x19e377),window[_0x2b1bb7([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x19e377,0x535e58fa^_0x5e678e);});}}_0x3fd1cd[_0x2b1bb7([0x6f,0x6e])](_0x2b1bb7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xd49614,_0x5595bc)=>{if(_0x5595bc[0x0]!=_0x16db67)return _0x4e2bb9(_0x2b1bb7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5595bc[0x1]={..._0x5595bc[0x1],[_0x2b1bb7([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x25ee7d};},{[_0x2b1bb7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2b1bb7([0x68,0x69,0x67,0x68])}),_0x3fd1cd[_0x2b1bb7([0x6f,0x6e])](_0x2b1bb7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5a322d=>{_0x31a4e5(_0x5a322d[_0x2b1bb7([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3ae65e=!0x0,_0x1eaca6(_0x5a322d[_0x2b1bb7([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2b1bb7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2b1bb7([0x6c,0x6f,0x77])}),_0x536c8a[_0x2b1bb7([0x74,0x68,0x65,0x6e])](()=>{_0x3ae65e||_0x4e2bb9(_0x2b1bb7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2551f0(){return _0x3fd1cd[_0x2b1bb7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b1bb7([0x76,0x69,0x65,0x77])][_0x2b1bb7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2b1bb7([0x61,0x75,0x74,0x6f]);}function _0x1dd7cc(){_0x3fd1cd[_0x2b1bb7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b1bb7([0x76,0x69,0x65,0x77])][_0x2b1bb7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2b1bb7([0x61,0x75,0x74,0x6f]);}}function _0x229cd3(_0x2557b6){const _0x2148ac=[new window[(_0x2b1bb7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f682f=>setTimeout(_0x1f682f,0x5356b2f6^_0x5e678e)),_0x536c8a[_0x2b1bb7([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2b1bb7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36ed39=>{let _0xb633fc=0x0;_0x3fd1cd[_0x2b1bb7([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b1bb7([0x6f,0x6e])](_0x2b1bb7([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1d21d9,_0x8a0090)=>{_0x8a0090[0x0][_0x2b1bb7([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xb633fc++,_0xb633fc==(0x535f8dc2^_0x5e678e)&&(_0x36ed39(),_0x1d21d9[_0x2b1bb7([0x6f,0x66,0x66])]());});}))];return window[_0x2b1bb7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2b1bb7([0x72,0x61,0x63,0x65])](_0x2148ac)[_0x2b1bb7([0x74,0x68,0x65,0x6e])](()=>_0x2557b6);}async function _0x5de88e(){await _0x536c8a,_0x3fd1cd[_0x2b1bb7([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b1bb7([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xca777b,_0x3fd1cd[_0x2b1bb7([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b1bb7([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xca777b,_0x3fd1cd[_0x2b1bb7([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2b1bb7([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2837dc(_0x3052d2){const _0x528960=_0x18c333();_0x3fd1cd[_0x528960]=_0x2b1bb7([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3052d2,_0x3052d2!=_0x2b1bb7([0x56,0x61,0x6c,0x69,0x64])&&_0x5de88e();}function _0x18c333(){const _0x22e9e7=window[_0x2b1bb7([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2b1bb7([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2b1bb7([0x6e,0x6f,0x77])]())[_0x2b1bb7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2b1bb7([0x2e]),'');let _0x568451=_0x2b1bb7([0x68]);for(let _0x18381a=0x0;_0x18381a<_0x22e9e7[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x18381a+=0x2){let _0x2ed009=window[_0x2b1bb7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x22e9e7[_0x2b1bb7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x18381a,_0x18381a+0x2));_0x2ed009>=_0x374781[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2ed009-=_0x374781[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x568451+=_0x374781[_0x2ed009];}return _0x568451;}function _0x5195ae(){const _0x5eeab8=_0x5bb8e5[_0x2b1bb7([0x73,0x70,0x6c,0x69,0x74])](_0x2b1bb7([0x2e]));if(0x3!=_0x5eeab8[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x16c811(_0x5eeab8[0x1]);function _0x16c811(_0x2d7f57){const _0xad305a=_0x271ac3(_0x2d7f57);return _0xad305a&&_0x225117()?_0xad305a:null;function _0x225117(){const _0x4b114c=_0xad305a[_0x2b1bb7([0x6a,0x74,0x69])],_0x379f66=window[_0x2b1bb7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4b114c[_0x2b1bb7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b114c[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x362641={..._0xad305a,[_0x2b1bb7([0x6a,0x74,0x69])]:_0x4b114c[_0x2b1bb7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4b114c[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x362641[_0x2b1bb7([0x76,0x63])],_0x2bfb85(_0x362641)==_0x379f66;}}}async function _0x1d0d98(){let _0x3ea88a=!0x0;try{const _0xe9865a=_0x5bb8e5[_0x2b1bb7([0x73,0x70,0x6c,0x69,0x74])](_0x2b1bb7([0x2e])),[_0x128525,_0x264668,_0x325c73]=_0xe9865a;return _0x411e7d(_0x128525),await _0x4a033c(_0x128525,_0x264668,_0x325c73),_0x3ea88a;}catch{return!0x1;}function _0x411e7d(_0x28706d){const _0x138988=_0x271ac3(_0x28706d);_0x138988&&_0x138988[_0x2b1bb7([0x61,0x6c,0x67])]==_0x2b1bb7([0x45,0x53,0x32,0x35,0x36])||(_0x3ea88a=!0x1);}async function _0x4a033c(_0xaf7c3a,_0x304bc4,_0x1456cc){const _0x1279a9=window[_0x2b1bb7([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2b1bb7([0x66,0x72,0x6f,0x6d])](_0x15e44d(_0x1456cc),_0x4dc809=>_0x4dc809[_0x2b1bb7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xfc6326=new window[(_0x2b1bb7([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2b1bb7([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xaf7c3a+_0x2b1bb7([0x2e])+_0x304bc4),_0x48b6d2=window[_0x2b1bb7([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2b1bb7([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x48b6d2)return;const _0x44b602=await _0x48b6d2[_0x2b1bb7([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2b1bb7([0x6a,0x77,0x6b]),_0x5b0e78,{[_0x2b1bb7([0x6e,0x61,0x6d,0x65])]:_0x2b1bb7([0x45,0x43,0x44,0x53,0x41]),[_0x2b1bb7([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2b1bb7([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2b1bb7([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x48b6d2[_0x2b1bb7([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2b1bb7([0x6e,0x61,0x6d,0x65])]:_0x2b1bb7([0x45,0x43,0x44,0x53,0x41]),[_0x2b1bb7([0x68,0x61,0x73,0x68])]:{[_0x2b1bb7([0x6e,0x61,0x6d,0x65])]:_0x2b1bb7([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x44b602,_0x1279a9,_0xfc6326)||(_0x3ea88a=!0x1);}}function _0x271ac3(_0x4ae802){return _0x4ae802[_0x2b1bb7([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2b1bb7([0x65,0x79]))?JSON[_0x2b1bb7([0x70,0x61,0x72,0x73,0x65])](_0x15e44d(_0x4ae802)):null;}function _0x15e44d(_0xb2fcee){return window[_0x2b1bb7([0x61,0x74,0x6f,0x62])](_0xb2fcee[_0x2b1bb7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2b1bb7([0x2b]))[_0x2b1bb7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2b1bb7([0x2f])));}function _0x2bfb85(_0x1760b8){let _0x3de271=0x1505;function _0x587d94(_0x4fda2d){for(let _0xfa071d=0x0;_0xfa071d<_0x4fda2d[_0x2b1bb7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xfa071d++){const _0x83dc3f=_0x4fda2d[_0x2b1bb7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xfa071d);_0x3de271=(_0x3de271<<0x5)+_0x3de271+_0x83dc3f,_0x3de271&=_0x3de271;}}function _0x41918e(_0x50f51e){Array[_0x2b1bb7([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x50f51e)?_0x50f51e[_0x2b1bb7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x41918e):_0x50f51e&&typeof _0x50f51e==_0x2b1bb7([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2b1bb7([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x50f51e)[_0x2b1bb7([0x73,0x6f,0x72,0x74])]()[_0x2b1bb7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4e3cac,_0x130f1f])=>{_0x587d94(_0x4e3cac),_0x41918e(_0x130f1f);}):_0x587d94(window[_0x2b1bb7([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x50f51e));}return _0x41918e(_0x1760b8),_0x3de271>>>0x0;}function _0x2aebec(_0x271d46){return _0x271d46[_0x2b1bb7([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2b1bb7([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2b1bb7([0x30]));}function _0x14aea9(_0x36fa43){return _0x36fa43[_0x2b1bb7([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2b1bb7([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2b1bb7([0x6a,0x6f,0x69,0x6e])]('');}function _0xca777b(){}function _0x2b1bb7(_0x46d448){const _0x1c7cf9=_0x3252;return _0x46d448[_0x1c7cf9(0x139)](_0x3131be=>String[_0x1c7cf9(0x146)](_0x3131be))[_0x1c7cf9(0x157)]('');}_0x2837dc(await _0x365a57());}(this);}[_0x501edc(0x162)](){const _0x50e6c5=_0x501edc,_0x156994=this[_0x50e6c5(0x13a)][_0x50e6c5(0x165)][_0x50e6c5(0x135)];_0x156994[_0x50e6c5(0x124)](_0x50e6c5(0x11f))&&_0x156994[_0x50e6c5(0x133)](_0x50e6c5(0x11f),{'allowAttributes':[_0x50e6c5(0x12a)]}),_0x156994[_0x50e6c5(0x124)](_0x50e6c5(0x134))&&_0x156994[_0x50e6c5(0x133)](_0x50e6c5(0x134),{'allowAttributes':[_0x50e6c5(0x12a)]});}[_0x501edc(0x149)](){const _0x1f7909=_0x501edc,_0x409090=this[_0x1f7909(0x13a)];_0x409090[_0x1f7909(0x13f)][_0x1f7909(0x136)](_0x1f7909(0x156))[_0x1f7909(0x166)]({'model':_0x1f7909(0x12a),'view':_0x1f7909(0x122)}),_0x409090[_0x1f7909(0x13f)][_0x1f7909(0x136)](_0x1f7909(0x15c))[_0x1f7909(0x164)]({'model':{'key':_0x1f7909(0x12a),'value':_0x3b6b4e=>_0x3b6b4e[_0x1f7909(0x126)](_0x1f7909(0x122))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x54526b=_0x409090[_0x1f7909(0x147)][_0x1f7909(0x16a)](_0x1f7909(0x12b));_0x54526b&&this[_0x1f7909(0x169)](_0x54526b,_0x1f7909(0x16b),(_0x49cf83,[_0x7f8067,_0xc2abbf])=>{const _0x1a9864=_0x1f7909;_0x7f8067[_0x1a9864(0x15f)](_0x1a9864(0x12a),_0xc2abbf);});}[_0x501edc(0x132)](){const _0x29462f=_0x501edc,_0x592efe=this[_0x29462f(0x13a)][_0x29462f(0x167)][_0x29462f(0x16a)](_0x29462f(0x153))||{},_0x44524b=this[_0x29462f(0x13a)][_0x29462f(0x167)][_0x29462f(0x16a)](_0x29462f(0x138))||'';this[_0x29462f(0x16c)]=_0x26676a(_0x3093d1[_0x29462f(0x13e)],_0x29462f(0x151),{..._0x592efe,'pubkey':_0x44524b,'ctx-name':_0x29462f(0x143)+this[_0x29462f(0x14f)],'sourceList':'','imgOnly':_0x29462f(0x12d),'removeCopyright':_0x29462f(0x12d),'localeName':this[_0x29462f(0x13a)][_0x29462f(0x125)][_0x29462f(0x150)],'externalSourcesEmbedCss':_0x29462f(0x140)}),this[_0x29462f(0x16c)][_0x29462f(0x148)]=_0x138661=>{const _0x3b72c5=_0x29462f;if(_0x3b72c5(0x152)==_0x138661)return _0x3b72c5(0x15e);},_0x3093d1[_0x29462f(0x13e)][_0x29462f(0x16f)][_0x29462f(0x14e)](this[_0x29462f(0x16c)]);}[_0x501edc(0x14a)](){const _0xe7b813=_0x501edc;this[_0xe7b813(0x120)]=_0x26676a(_0x3093d1[_0xe7b813(0x13e)],_0xe7b813(0x145),{'ctx-name':_0xe7b813(0x143)+this[_0xe7b813(0x14f)]}),_0x3093d1[_0xe7b813(0x13e)][_0xe7b813(0x16f)][_0xe7b813(0x14e)](this[_0xe7b813(0x120)]);}[_0x501edc(0x130)](){const _0x57b7c0=_0x501edc,_0x3745f6=this[_0x57b7c0(0x13a)][_0x57b7c0(0x147)][_0x57b7c0(0x16a)](_0x57b7c0(0x137));_0x3745f6&&this[_0x57b7c0(0x169)](_0x3745f6,_0x57b7c0(0x168),()=>{const _0x26a8bc=_0x57b7c0,_0x30c80e=this[_0x26a8bc(0x13a)][_0x26a8bc(0x165)][_0x26a8bc(0x13e)][_0x26a8bc(0x123)][_0x26a8bc(0x121)]();_0x30c80e&&_0x30c80e[_0x26a8bc(0x126)](_0x26a8bc(0x12a))&&this[_0x26a8bc(0x13a)][_0x26a8bc(0x160)][_0x26a8bc(0x16e)][_0x26a8bc(0x141)](_0x26a8bc(0x14b),()=>{const _0x56acf3=_0x26a8bc;_0x3abb08(this[_0x56acf3(0x13a)],_0x30c80e);});});const _0x4c76d1=this[_0x57b7c0(0x13a)][_0x57b7c0(0x147)][_0x57b7c0(0x16a)](_0x57b7c0(0x142));_0x4c76d1&&this[_0x57b7c0(0x169)](_0x4c76d1,_0x57b7c0(0x168),()=>{const _0x5d17d6=_0x57b7c0,_0x3ed45c=this[_0x5d17d6(0x13a)][_0x5d17d6(0x165)][_0x5d17d6(0x13e)][_0x5d17d6(0x123)][_0x5d17d6(0x121)]();_0x3ed45c&&_0x3ed45c[_0x5d17d6(0x126)](_0x5d17d6(0x12a))&&this[_0x5d17d6(0x13a)][_0x5d17d6(0x160)][_0x5d17d6(0x16e)][_0x5d17d6(0x141)](_0x5d17d6(0x14b),()=>{const _0x28c479=_0x5d17d6;_0x3abb08(this[_0x28c479(0x13a)],_0x3ed45c);});});}}
|
|
23
|
+
const _0x469c05=_0x31f7;function _0x31f7(_0x2f3c67,_0x57d0d9){const _0x536eed=_0x536e();return _0x31f7=function(_0x31f75a,_0x11393f){_0x31f75a=_0x31f75a-0xfc;let _0x36eeff=_0x536eed[_0x31f75a];return _0x36eeff;},_0x31f7(_0x2f3c67,_0x57d0d9);}(function(_0x33b084,_0x95d826){const _0x30a16b=_0x31f7,_0x47d162=_0x33b084();while(!![]){try{const _0x58ebf4=parseInt(_0x30a16b(0x104))/0x1+-parseInt(_0x30a16b(0x120))/0x2*(-parseInt(_0x30a16b(0x12d))/0x3)+-parseInt(_0x30a16b(0x10d))/0x4*(-parseInt(_0x30a16b(0x12f))/0x5)+-parseInt(_0x30a16b(0x116))/0x6+parseInt(_0x30a16b(0x14f))/0x7*(parseInt(_0x30a16b(0x111))/0x8)+-parseInt(_0x30a16b(0x129))/0x9+-parseInt(_0x30a16b(0x10b))/0xa;if(_0x58ebf4===_0x95d826)break;else _0x47d162['push'](_0x47d162['shift']());}catch(_0x3eabdb){_0x47d162['push'](_0x47d162['shift']());}}}(_0x536e,0x2d251));import{Plugin as _0x27a63a}from'ckeditor5/src/core.js';import{Dialog as _0x4b7b87}from'ckeditor5/src/ui.js';import{createElement as _0x239ace,global as _0x54c6e3,uid as _0x3916b6}from'ckeditor5/src/utils.js';function _0x536e(){const _0x2a13dc=['input[uploadcare-file-input]','140648bVFwwd','getSelectedElement','uploadcareImageReplace','requires','pluginName','1859622fJbsfL','cleanupImage','uc-config','ctxElement','render','init','uploadcareImageId','replaceImageSource','appendChild','afterInit','264MPzdBK','config','contentLanguage','get','add','document','uploadcare.pubkey','iconHrefResolver','getAttribute','784350ktxuRJ','model','join','configElement','7122PuafYm','view','307205cCTjkz','removeAttribute','commands','_initSchema','editor','uc-upload-ctx-provider','closeMax','downcast','isPremiumPlugin','uploader-','remove','fromCharCode','conversion','extend','#uc-icon-arrow-down','execute','_ctxElement','isRegistered','uploadcare','for','locale','querySelector','true','ucContextId','_initCtx','schema','imageBlock','isOfficialPlugin','once','upcast','insertImage','imageInline','14UQDimX','\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','_configElement','destroy','_initConversion','PictureEditing','_initImageProcessingIndicator','body','elementToAttribute','selection','44738pquMyl','uploadcare.uploader','attributeToAttribute','data-uc-image-id','listenTo','map','href','1184730CmLZZc','UploadcareEditing','20ekUuTG','editing','_initConfig'];_0x536e=function(){return _0x2a13dc;};return _0x536e();}import{UploadcareCommand as _0x4d2d30}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x2f0b4b}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x4a42b8}from'./utils/editingutils.js';export class UploadcareEditing extends _0x27a63a{[_0x469c05(0xfc)]=null;[_0x469c05(0x13f)]=null;static get[_0x469c05(0x115)](){const _0x4771c7=_0x469c05;return _0x4771c7(0x10c);}static get[_0x469c05(0x114)](){const _0x2454f3=_0x469c05;return[_0x2454f3(0xff),_0x2f0b4b,_0x4b7b87];}static get[_0x469c05(0x14a)](){return!0x0;}static get[_0x469c05(0x137)](){return!0x0;}[_0x469c05(0x146)];get[_0x469c05(0x12c)](){const _0x14879b=_0x469c05;return this[_0x14879b(0xfc)];}get[_0x469c05(0x119)](){const _0x675a59=_0x469c05;return this[_0x675a59(0x13f)];}constructor(_0x25c2b0){const _0x2ac2d6=_0x469c05;super(_0x25c2b0),this[_0x2ac2d6(0x146)]=_0x3916b6();}[_0x469c05(0x11b)](){const _0x5948e0=_0x469c05,_0x4cba34=this[_0x5948e0(0x133)];_0x4cba34[_0x5948e0(0x131)][_0x5948e0(0x124)](_0x5948e0(0x141),new _0x4d2d30(_0x4cba34));}[_0x469c05(0x11f)](){const _0x467f9e=_0x469c05;this[_0x467f9e(0x132)](),this[_0x467f9e(0xfe)](),this[_0x467f9e(0x10f)](),this[_0x467f9e(0x147)](),this[_0x467f9e(0x100)](),this[_0x467f9e(0x108)](this[_0x467f9e(0x133)],_0x467f9e(0xfd),()=>{const _0x4d74bc=_0x467f9e;this[_0x4d74bc(0xfc)]&&(this[_0x4d74bc(0xfc)][_0x4d74bc(0x139)](),this[_0x4d74bc(0xfc)]=null),this[_0x4d74bc(0x13f)]&&(this[_0x4d74bc(0x13f)][_0x4d74bc(0x139)](),this[_0x4d74bc(0x13f)]=null);const _0x4d008e=_0x54c6e3[_0x4d74bc(0x125)][_0x4d74bc(0x144)](_0x4d74bc(0x110));_0x4d008e&&_0x4d008e[_0x4d74bc(0x139)]();}),async function(_0xca0989){const _0x24f6cf=_0x5ae87b([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]),_0x12d4fa=0x535f8c3a,_0xe8f651=0x5358f7da^_0x12d4fa,_0x4dd5ee=window[_0x5ae87b([0x44,0x61,0x74,0x65])][_0x5ae87b([0x6e,0x6f,0x77])](),_0x5b2cbf=_0xca0989[_0x5ae87b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x31f74b=new window[(_0x5ae87b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1aa13d=>{_0x5b2cbf[_0x5ae87b([0x6f,0x6e,0x63,0x65])](_0x5ae87b([0x72,0x65,0x61,0x64,0x79]),_0x1aa13d);}),_0x474ea9={[_0x5ae87b([0x6b,0x74,0x79])]:_0x5ae87b([0x45,0x43]),[_0x5ae87b([0x75,0x73,0x65])]:_0x5ae87b([0x73,0x69,0x67]),[_0x5ae87b([0x63,0x72,0x76])]:_0x5ae87b([0x50,0x2d,0x32,0x35,0x36]),[_0x5ae87b([0x78])]:_0x5ae87b([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]),[_0x5ae87b([0x79])]:_0x5ae87b([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]),[_0x5ae87b([0x61,0x6c,0x67])]:_0x5ae87b([0x45,0x53,0x32,0x35,0x36])},_0x578d66=_0x5b2cbf[_0x5ae87b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5ae87b([0x67,0x65,0x74])](_0x5ae87b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xe582ed(){let _0x1a7b77,_0xccadb2=null,_0x289f32=null;try{if(_0x578d66==_0x5ae87b([0x47,0x50,0x4c]))return _0x5ae87b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1a7b77=_0x150eec(),!_0x1a7b77)return _0x5ae87b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1a7b77[_0x5ae87b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x289f32=_0x523a09(_0x1a7b77[_0x5ae87b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1a7b77[_0x5ae87b([0x6a,0x74,0x69])])),await _0x3222c5()?_0x198db5()?_0x51902a()?_0x5ae87b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2b5e04()?(_0x1a7b77[_0x5ae87b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5ae87b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xccadb2=_0x6697ff(_0x5ae87b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1a7b77[_0x5ae87b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5ae87b([0x74,0x72,0x69,0x61,0x6c])&&(_0xccadb2=_0x6697ff(_0x5ae87b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5348fb()):_0x5ae87b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5ae87b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5ae87b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5ae87b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x51902a(){const _0x105778=[_0x5ae87b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5ae87b([0x74,0x72,0x69,0x61,0x6c])][_0x5ae87b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a7b77[_0x5ae87b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4dd5ee/0x3e8:0xe10*_0xe8f651;return _0x1a7b77[_0x5ae87b([0x65,0x78,0x70])]<_0x105778;}function _0x198db5(){const _0x5050d=_0x1a7b77[_0x5ae87b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5050d&&(!!_0x5050d[_0x5ae87b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ae87b([0x2a]))||!!_0x5050d[_0x5ae87b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ae87b([0x55,0x50,0x4c,0x43])));}function _0x2b5e04(){const _0x1bbf5d=_0x31f7,_0x5d2ab2=_0x1a7b77[_0x5ae87b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5d2ab2||0x0==_0x5d2ab2[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5e5358}=new URL(window[_0x5ae87b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x1bbf5d(0x10a)]);if(_0x5d2ab2[_0x5ae87b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e5358))return!0x0;const _0x4ed9f8=_0x5e5358[_0x5ae87b([0x73,0x70,0x6c,0x69,0x74])](_0x5ae87b([0x2e]));return _0x5d2ab2[_0x5ae87b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x522825=>_0x522825[_0x5ae87b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ae87b([0x2a])))[_0x5ae87b([0x6d,0x61,0x70])](_0x2fe244=>_0x2fe244[_0x5ae87b([0x73,0x70,0x6c,0x69,0x74])](_0x5ae87b([0x2e])))[_0x5ae87b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b5a4f=>_0x5b5a4f[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4ed9f8[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ae87b([0x6d,0x61,0x70])](_0xfd46e1=>Array(_0x4ed9f8[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xfd46e1[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ae87b([0x66,0x69,0x6c,0x6c])](_0xfd46e1[0x0]===_0x5ae87b([0x2a])?_0x5ae87b([0x2a]):'')[_0x5ae87b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xfd46e1))[_0x5ae87b([0x73,0x6f,0x6d,0x65])](_0x48f1f3=>_0x4ed9f8[_0x5ae87b([0x65,0x76,0x65,0x72,0x79])]((_0x245c4c,_0x1ecf74)=>_0x48f1f3[_0x1ecf74]===_0x245c4c||_0x48f1f3[_0x1ecf74]===_0x5ae87b([0x2a])));}function _0x5348fb(){return _0xccadb2&&_0x289f32?new window[(_0x5ae87b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2bb174,_0x89f7f2)=>{_0xccadb2[_0x5ae87b([0x74,0x68,0x65,0x6e])](_0x2bb174,_0x89f7f2),_0x289f32[_0x5ae87b([0x74,0x68,0x65,0x6e])](_0xcc83f1=>{_0xcc83f1!=_0x5ae87b([0x56,0x61,0x6c,0x69,0x64])&&_0x2bb174(_0xcc83f1);},_0x89f7f2);}):_0xccadb2||_0x289f32||_0x5ae87b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x523a09(_0x10282b,_0x1afa2d){return new window[(_0x5ae87b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4fcb02=>{if(_0x540636())return _0x4fcb02(_0x5ae87b([0x56,0x61,0x6c,0x69,0x64]));_0x4bca9a(),_0x5b2cbf[_0x5ae87b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5ae87b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xa9a71f=!0x1;const _0x287b2e=_0x3916b6();function _0x4e34a3(_0x53398d){return!!_0x53398d&&(typeof _0x53398d===_0x5ae87b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x53398d===_0x5ae87b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x53398d[_0x5ae87b([0x74,0x68,0x65,0x6e])]===_0x5ae87b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x53398d[_0x5ae87b([0x63,0x61,0x74,0x63,0x68])]===_0x5ae87b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x494960(_0x38cfd9){_0x38fc8c(_0x38cfd9)[_0x5ae87b([0x74,0x68,0x65,0x6e])](_0x3b0a65=>{if(!_0x3b0a65||_0x3b0a65[_0x5ae87b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5ae87b([0x6f,0x6b]))return _0x5ae87b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1997c7(_0x42be6d(_0x287b2e+_0x1afa2d))!=_0x3b0a65[_0x5ae87b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5ae87b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5ae87b([0x56,0x61,0x6c,0x69,0x64]);})[_0x5ae87b([0x74,0x68,0x65,0x6e])](_0x3c3757=>(_0x57b92e(),_0x3c3757),()=>{const _0x563794=_0x37cd45();return null==_0x563794?(_0x57b92e(),_0x5ae87b([0x56,0x61,0x6c,0x69,0x64])):_0x5ae87b(_0x4dd5ee-_0x563794>(0x7753083a^_0x12d4fa)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5ae87b([0x74,0x68,0x65,0x6e])](_0x4fcb02)[_0x5ae87b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4fcb02(_0x5ae87b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xdab565=0x536962ba^_0x12d4fa;function _0x57b92e(){const _0x38f2b9=_0x5ae87b([0x6c,0x6c,0x63,0x74,0x2d])+_0x1997c7(_0x42be6d(_0x10282b)),_0xcaa73c=_0x251f8e(_0x1997c7(window[_0x5ae87b([0x4d,0x61,0x74,0x68])][_0x5ae87b([0x63,0x65,0x69,0x6c])](_0x4dd5ee/_0xdab565)));window[_0x5ae87b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ae87b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x38f2b9,_0xcaa73c);}function _0x37cd45(){const _0x69f71a=_0x5ae87b([0x6c,0x6c,0x63,0x74,0x2d])+_0x1997c7(_0x42be6d(_0x10282b)),_0x3c2824=window[_0x5ae87b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ae87b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x69f71a);return _0x3c2824?window[_0x5ae87b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x251f8e(_0x3c2824),0x10)*_0xdab565:null;}function _0x38fc8c(_0x5cd8ff){return new window[(_0x5ae87b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x561c0c,_0xd53041)=>{_0x5cd8ff[_0x5ae87b([0x74,0x68,0x65,0x6e])](_0x561c0c,_0xd53041),window[_0x5ae87b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xd53041,0x535e58fa^_0x12d4fa);});}}_0x5b2cbf[_0x5ae87b([0x6f,0x6e])](_0x5ae87b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1b652b,_0x5b53a3)=>{if(_0x5b53a3[0x0]!=_0x10282b)return _0x4fcb02(_0x5ae87b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5b53a3[0x1]={..._0x5b53a3[0x1],[_0x5ae87b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x287b2e};},{[_0x5ae87b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ae87b([0x68,0x69,0x67,0x68])}),_0x5b2cbf[_0x5ae87b([0x6f,0x6e])](_0x5ae87b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5b9c01=>{_0x4e34a3(_0x5b9c01[_0x5ae87b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xa9a71f=!0x0,_0x494960(_0x5b9c01[_0x5ae87b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5ae87b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ae87b([0x6c,0x6f,0x77])}),_0x31f74b[_0x5ae87b([0x74,0x68,0x65,0x6e])](()=>{_0xa9a71f||_0x4fcb02(_0x5ae87b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x540636(){return _0x5b2cbf[_0x5ae87b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ae87b([0x76,0x69,0x65,0x77])][_0x5ae87b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5ae87b([0x61,0x75,0x74,0x6f]);}function _0x4bca9a(){_0x5b2cbf[_0x5ae87b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ae87b([0x76,0x69,0x65,0x77])][_0x5ae87b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5ae87b([0x61,0x75,0x74,0x6f]);}}function _0x6697ff(_0x1379bc){const _0x4633c6=[new window[(_0x5ae87b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b2a0c=>setTimeout(_0x5b2a0c,0x5356b2f6^_0x12d4fa)),_0x31f74b[_0x5ae87b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5ae87b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d8f34=>{let _0x2e6f6c=0x0;_0x5b2cbf[_0x5ae87b([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ae87b([0x6f,0x6e])](_0x5ae87b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x28f2d7,_0x14c32d)=>{_0x14c32d[0x0][_0x5ae87b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2e6f6c++,_0x2e6f6c==(0x535f8dc2^_0x12d4fa)&&(_0x4d8f34(),_0x28f2d7[_0x5ae87b([0x6f,0x66,0x66])]());});}))];return window[_0x5ae87b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5ae87b([0x72,0x61,0x63,0x65])](_0x4633c6)[_0x5ae87b([0x74,0x68,0x65,0x6e])](()=>_0x1379bc);}async function _0x241b66(){await _0x31f74b,_0x5b2cbf[_0x5ae87b([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ae87b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3a9115,_0x5b2cbf[_0x5ae87b([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ae87b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3a9115,_0x5b2cbf[_0x5ae87b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5ae87b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x879e9a(_0x54afeb){const _0xaf9b9d=_0x4c1bd1();_0x5b2cbf[_0xaf9b9d]=_0x5ae87b([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x54afeb,_0x54afeb!=_0x5ae87b([0x56,0x61,0x6c,0x69,0x64])&&_0x241b66();}function _0x4c1bd1(){const _0x54b15d=window[_0x5ae87b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5ae87b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5ae87b([0x6e,0x6f,0x77])]())[_0x5ae87b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5ae87b([0x2e]),'');let _0x417e43=_0x5ae87b([0x68]);for(let _0x216169=0x0;_0x216169<_0x54b15d[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x216169+=0x2){let _0x1a00a7=window[_0x5ae87b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54b15d[_0x5ae87b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x216169,_0x216169+0x2));_0x1a00a7>=_0x24f6cf[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1a00a7-=_0x24f6cf[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x417e43+=_0x24f6cf[_0x1a00a7];}return _0x417e43;}function _0x150eec(){const _0x1c1da9=_0x578d66[_0x5ae87b([0x73,0x70,0x6c,0x69,0x74])](_0x5ae87b([0x2e]));if(0x3!=_0x1c1da9[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x48b829(_0x1c1da9[0x1]);function _0x48b829(_0x7f4698){const _0x49e0bb=_0x3c9b60(_0x7f4698);return _0x49e0bb&&_0x23641b()?_0x49e0bb:null;function _0x23641b(){const _0x5d70cd=_0x49e0bb[_0x5ae87b([0x6a,0x74,0x69])],_0x5d2f3c=window[_0x5ae87b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d70cd[_0x5ae87b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5d70cd[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x44c4fa={..._0x49e0bb,[_0x5ae87b([0x6a,0x74,0x69])]:_0x5d70cd[_0x5ae87b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5d70cd[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x44c4fa[_0x5ae87b([0x76,0x63])],_0x42be6d(_0x44c4fa)==_0x5d2f3c;}}}async function _0x3222c5(){let _0x2b54fe=!0x0;try{const _0x5029b7=_0x578d66[_0x5ae87b([0x73,0x70,0x6c,0x69,0x74])](_0x5ae87b([0x2e])),[_0x412cf9,_0x404379,_0x7b8008]=_0x5029b7;return _0x598f68(_0x412cf9),await _0xd40203(_0x412cf9,_0x404379,_0x7b8008),_0x2b54fe;}catch{return!0x1;}function _0x598f68(_0x35dee){const _0xae0feb=_0x3c9b60(_0x35dee);_0xae0feb&&_0xae0feb[_0x5ae87b([0x61,0x6c,0x67])]==_0x5ae87b([0x45,0x53,0x32,0x35,0x36])||(_0x2b54fe=!0x1);}async function _0xd40203(_0x490909,_0x1feb76,_0x239cab){const _0x1aa8cc=window[_0x5ae87b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5ae87b([0x66,0x72,0x6f,0x6d])](_0x2f6549(_0x239cab),_0x7492dc=>_0x7492dc[_0x5ae87b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x52964e=new window[(_0x5ae87b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5ae87b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x490909+_0x5ae87b([0x2e])+_0x1feb76),_0x262d3a=window[_0x5ae87b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5ae87b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x262d3a)return;const _0x11b659=await _0x262d3a[_0x5ae87b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5ae87b([0x6a,0x77,0x6b]),_0x474ea9,{[_0x5ae87b([0x6e,0x61,0x6d,0x65])]:_0x5ae87b([0x45,0x43,0x44,0x53,0x41]),[_0x5ae87b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5ae87b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5ae87b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x262d3a[_0x5ae87b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5ae87b([0x6e,0x61,0x6d,0x65])]:_0x5ae87b([0x45,0x43,0x44,0x53,0x41]),[_0x5ae87b([0x68,0x61,0x73,0x68])]:{[_0x5ae87b([0x6e,0x61,0x6d,0x65])]:_0x5ae87b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x11b659,_0x1aa8cc,_0x52964e)||(_0x2b54fe=!0x1);}}function _0x3c9b60(_0x5e4d24){return _0x5e4d24[_0x5ae87b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5ae87b([0x65,0x79]))?JSON[_0x5ae87b([0x70,0x61,0x72,0x73,0x65])](_0x2f6549(_0x5e4d24)):null;}function _0x2f6549(_0x54df37){return window[_0x5ae87b([0x61,0x74,0x6f,0x62])](_0x54df37[_0x5ae87b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5ae87b([0x2b]))[_0x5ae87b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5ae87b([0x2f])));}function _0x42be6d(_0x37b1d3){let _0x24075e=0x1505;function _0x1beb19(_0x2e50e3){for(let _0x12a74f=0x0;_0x12a74f<_0x2e50e3[_0x5ae87b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x12a74f++){const _0x18917b=_0x2e50e3[_0x5ae87b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x12a74f);_0x24075e=(_0x24075e<<0x5)+_0x24075e+_0x18917b,_0x24075e&=_0x24075e;}}function _0x5644ec(_0x1d51f9){Array[_0x5ae87b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1d51f9)?_0x1d51f9[_0x5ae87b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5644ec):_0x1d51f9&&typeof _0x1d51f9==_0x5ae87b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5ae87b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1d51f9)[_0x5ae87b([0x73,0x6f,0x72,0x74])]()[_0x5ae87b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3ce791,_0xb112b])=>{_0x1beb19(_0x3ce791),_0x5644ec(_0xb112b);}):_0x1beb19(window[_0x5ae87b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1d51f9));}return _0x5644ec(_0x37b1d3),_0x24075e>>>0x0;}function _0x1997c7(_0x3fddac){return _0x3fddac[_0x5ae87b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5ae87b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5ae87b([0x30]));}function _0x251f8e(_0x5a448f){return _0x5a448f[_0x5ae87b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5ae87b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5ae87b([0x6a,0x6f,0x69,0x6e])]('');}function _0x3a9115(){}function _0x5ae87b(_0x5107de){const _0x28d74f=_0x31f7;return _0x5107de[_0x28d74f(0x109)](_0xb77c1c=>String[_0x28d74f(0x13a)](_0xb77c1c))[_0x28d74f(0x12b)]('');}_0x879e9a(await _0xe582ed());}(this);}[_0x469c05(0x132)](){const _0x1c94d1=_0x469c05,_0x2bd19f=this[_0x1c94d1(0x133)][_0x1c94d1(0x12a)][_0x1c94d1(0x148)];_0x2bd19f[_0x1c94d1(0x140)](_0x1c94d1(0x149))&&_0x2bd19f[_0x1c94d1(0x13c)](_0x1c94d1(0x149),{'allowAttributes':[_0x1c94d1(0x11c)]}),_0x2bd19f[_0x1c94d1(0x140)](_0x1c94d1(0x14e))&&_0x2bd19f[_0x1c94d1(0x13c)](_0x1c94d1(0x14e),{'allowAttributes':[_0x1c94d1(0x11c)]});}[_0x469c05(0xfe)](){const _0x588434=_0x469c05,_0x1aee86=this[_0x588434(0x133)];_0x1aee86[_0x588434(0x13b)][_0x588434(0x142)](_0x588434(0x136))[_0x588434(0x106)]({'model':_0x588434(0x11c),'view':_0x588434(0x107)}),_0x1aee86[_0x588434(0x13b)][_0x588434(0x142)](_0x588434(0x14c))[_0x588434(0x102)]({'model':{'key':_0x588434(0x11c),'value':_0x37c0b4=>_0x37c0b4[_0x588434(0x128)](_0x588434(0x107))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x29040d=_0x1aee86[_0x588434(0x131)][_0x588434(0x123)](_0x588434(0x11d));_0x29040d&&this[_0x588434(0x108)](_0x29040d,_0x588434(0x117),(_0x19ef3d,[_0xb75f30,_0x38353e])=>{const _0x498b1b=_0x588434;_0xb75f30[_0x498b1b(0x130)](_0x498b1b(0x11c),_0x38353e);});}[_0x469c05(0x10f)](){const _0x341e0e=_0x469c05,_0x144345=this[_0x341e0e(0x133)][_0x341e0e(0x121)][_0x341e0e(0x123)](_0x341e0e(0x105))||{},_0x508f40=this[_0x341e0e(0x133)][_0x341e0e(0x121)][_0x341e0e(0x123)](_0x341e0e(0x126))||'';this[_0x341e0e(0xfc)]=_0x239ace(_0x54c6e3[_0x341e0e(0x125)],_0x341e0e(0x118),{..._0x144345,'pubkey':_0x508f40,'ctx-name':_0x341e0e(0x138)+this[_0x341e0e(0x146)],'sourceList':'','imgOnly':_0x341e0e(0x145),'removeCopyright':_0x341e0e(0x145),'localeName':this[_0x341e0e(0x133)][_0x341e0e(0x143)][_0x341e0e(0x122)],'externalSourcesEmbedCss':_0x341e0e(0x150)}),this[_0x341e0e(0xfc)][_0x341e0e(0x127)]=_0x353c4a=>{const _0x46dd79=_0x341e0e;if(_0x46dd79(0x135)==_0x353c4a)return _0x46dd79(0x13d);},_0x54c6e3[_0x341e0e(0x125)][_0x341e0e(0x101)][_0x341e0e(0x11e)](this[_0x341e0e(0xfc)]);}[_0x469c05(0x147)](){const _0x38bba5=_0x469c05;this[_0x38bba5(0x13f)]=_0x239ace(_0x54c6e3[_0x38bba5(0x125)],_0x38bba5(0x134),{'ctx-name':_0x38bba5(0x138)+this[_0x38bba5(0x146)]}),_0x54c6e3[_0x38bba5(0x125)][_0x38bba5(0x101)][_0x38bba5(0x11e)](this[_0x38bba5(0x13f)]);}[_0x469c05(0x100)](){const _0x16b0d0=_0x469c05,_0x2a7543=this[_0x16b0d0(0x133)][_0x16b0d0(0x131)][_0x16b0d0(0x123)](_0x16b0d0(0x14d));_0x2a7543&&this[_0x16b0d0(0x108)](_0x2a7543,_0x16b0d0(0x13e),()=>{const _0x127474=_0x16b0d0,_0x3b7f5d=this[_0x127474(0x133)][_0x127474(0x12a)][_0x127474(0x125)][_0x127474(0x103)][_0x127474(0x112)]();_0x3b7f5d&&_0x3b7f5d[_0x127474(0x128)](_0x127474(0x11c))&&this[_0x127474(0x133)][_0x127474(0x10e)][_0x127474(0x12e)][_0x127474(0x14b)](_0x127474(0x11a),()=>{const _0x2769c9=_0x127474;_0x4a42b8(this[_0x2769c9(0x133)],_0x3b7f5d);});});const _0x4f703b=this[_0x16b0d0(0x133)][_0x16b0d0(0x131)][_0x16b0d0(0x123)](_0x16b0d0(0x113));_0x4f703b&&this[_0x16b0d0(0x108)](_0x4f703b,_0x16b0d0(0x13e),()=>{const _0x397b47=_0x16b0d0,_0x58f204=this[_0x397b47(0x133)][_0x397b47(0x12a)][_0x397b47(0x125)][_0x397b47(0x103)][_0x397b47(0x112)]();_0x58f204&&_0x58f204[_0x397b47(0x128)](_0x397b47(0x11c))&&this[_0x397b47(0x133)][_0x397b47(0x10e)][_0x397b47(0x12e)][_0x397b47(0x14b)](_0x397b47(0x11a),()=>{const _0x7cf455=_0x397b47;_0x4a42b8(this[_0x7cf455(0x133)],_0x58f204);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x4d69ee,ObservableMixin as _0x3c8574}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x2c8ef5}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x45426e}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x2bfa5a}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x51e4d3}from'../../utils/uploadutils.js';import{getImageUrls as _0x194f1f,getImageDimension as _0x8e5ccc}from'../../utils/editingutils.js';import{isAncestor as _0x47a178}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3c8574(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x42b850,_0xf3a290,_0x121f45){super(),this['_editor']=_0x42b850,this['_dialog']=_0xf3a290,this['_imageElement']=_0x121f45,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 _0x3db072=this['_imageElement'],_0x25dc76=_0x3db072['getAttribute']('uploadcareImageId'),_0x273e3b=_0x3db072['getAttribute']('src');if(_0x25dc76)await this['_loadImageInfo'](_0x25dc76,_0x273e3b);else{if(this['_imageCache']['has'](_0x273e3b)){const _0x6b05bc=this['_imageCache']['get'](_0x273e3b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x6b05bc['url'],this['imageDimension']=_0x6b05bc['dimension'],this['imageId']=_0x6b05bc['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3fb31b}=this['_editor'],t=_0x3fb31b['t'],_0x265d4d=new _0x2bfa5a(_0x3fb31b,this['imageStatus'],this['_attributes']);_0x265d4d['bind']('status')['to'](this,'imageStatus'),_0x265d4d['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x265d4d['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x265d4d['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x265d4d,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x45426e,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x265d4d,'position':_0x2c8ef5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x265d4d['focus']();},'onHide':()=>{_0x265d4d['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x415109=>!_0x47a178(_0x415109,_0x265d4d['element'])}});}['_loadImageInfo'](_0x108b64,_0x536500){return _0x51e4d3['getInfo'](_0x108b64,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x1a1c78=>{const {width:_0x5db3d8,height:_0x230a51}=_0x1a1c78['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x536500,this['imageDimension']={'width':_0x5db3d8,'height':_0x230a51},this['imageId']=_0x108b64;})['catch'](_0x5520c6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5520c6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2a2812,_0x3435af){return this['_getImageAsFile'](_0x2a2812)['then'](_0x5ed4f9=>_0x51e4d3['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':_0x3435af['signal'],'file':_0x5ed4f9,'onProgress':_0x3c2f64=>{_0x3c2f64&&_0x3c2f64['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3c2f64['value']));}}))['then'](_0x5cbece=>{const {width:_0x39eeea,height:_0x150a1d}=_0x5cbece['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5cbece['cdnUrl'],this['imageDimension']={'width':_0x39eeea,'height':_0x150a1d},this['imageId']=_0x5cbece['uuid'],this['imageUploadProgress']=null;const _0x530808=_0x2a2812['getAttribute']('src');this['_imageCache']['set'](_0x530808,{'id':_0x5cbece['uuid'],'url':_0x5cbece['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4ec21d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4ec21d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x234112,_0x1e3fb9){_0x234112['on']('apply',(_0x334b40,_0x285595)=>{this['_replaceImage'](_0x1e3fb9,_0x285595['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x234112['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x234112['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2f6015,_0x39a5a5,_0x2e7fb4){const _0x4b4902=this['_editor'],{width:_0x3d869f,height:_0x1958da}=_0x8e5ccc(_0x39a5a5,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x534a2b,imageSources:_0x4cf1b4}=_0x194f1f(_0x39a5a5,_0x3d869f);_0x4b4902['model']['change'](_0xf80c73=>{if('$graveyard'===_0x2f6015['root']['rootName']){_0x4b4902['execute']('insertImage',{'imageType':_0x2f6015['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2f6015['getAttributes']()),'uploadcareImageId':_0x2e7fb4,'src':_0x534a2b,'sources':_0x4cf1b4,'width':_0x3d869f,'height':_0x1958da}});const _0x429339=_0x2f6015['getChildren']();_0x2f6015=_0x4b4902['model']['document']['selection']['getSelectedElement']();for(const _0x40b5b9 of _0x429339)_0xf80c73['append'](_0xf80c73['cloneElement'](_0x40b5b9),_0x2f6015);}else _0xf80c73['setSelection'](_0x2f6015,'on'),_0x4b4902['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2f6015['getAttributes']()),'uploadcareImageId':_0x2e7fb4,'src':_0x534a2b,'sources':_0x4cf1b4,'width':_0x3d869f,'height':_0x1958da},_0x2f6015);_0xf80c73['setSelection'](_0x2f6015,'on');});}async['_getImageAsFile'](_0xf64b46){const _0x4059af=_0x4d69ee['window'],_0x274682=_0x4d69ee['document']['location']['href'],_0x3a5b5f=new _0x4059af['URL'](_0xf64b46['getAttribute']('src'),_0x274682);if('data:'===_0x3a5b5f['protocol']){const _0x382621=_0x3a5b5f['href']['split'](','),_0x59fd95=_0x382621[0x0]['match'](/:(.*?);/)[0x1],_0x5e8f2a=_0x59fd95['split']('/')[0x1],_0x10c000=_0x4059af['atob'](_0x382621[_0x382621['length']-0x1]);let _0x41744c=_0x10c000['length'];const _0x295c7d=new _0x4059af['Uint8Array'](_0x41744c);for(;_0x41744c--;)_0x295c7d[_0x41744c]=_0x10c000['charCodeAt'](_0x41744c);return new _0x4059af['File']([_0x295c7d],'image.'+_0x5e8f2a,{'type':_0x59fd95});}const _0x4f7e92=_0x3a5b5f['href']['split']('/'),_0x3041e2=_0x4f7e92[_0x4f7e92['length']-0x1],_0x3482c6=_0x3041e2['split']('.')[0x1];return _0x4059af['fetch'](_0x3a5b5f['href'])['then'](_0x38cbef=>_0x38cbef['clone']()['blob']())['then'](_0x576862=>new _0x4059af['File']([_0x576862],_0x3041e2,{'type':'image/'+_0x3482c6}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x31a8(_0x33274d,_0x21326d){const _0x199225=_0x1992();return _0x31a8=function(_0x31a8e0,_0x42add1){_0x31a8e0=_0x31a8e0-0x1e7;let _0x4ac64e=_0x199225[_0x31a8e0];return _0x4ac64e;},_0x31a8(_0x33274d,_0x21326d);}function _0x1992(){const _0xbc14d1=['imageSrc','2309362ckQCZS','bindTemplate','5276736MEADjf','16wOJsYD','uc-light','30QREWoZ','6BdypIG','8753634jNtDig','1000254SUplDq','ck-uploadcare-theme','140966tqrEng','setTemplate','144543zHTHRb','8BdCBQZ','set','1694620WeQbjh','uc-cloud-image-editor','image-edit'];_0x1992=function(){return _0xbc14d1;};return _0x1992();}(function(_0x105ae4,_0x516044){const _0x50768f=_0x31a8,_0x1521dc=_0x105ae4();while(!![]){try{const _0x230b78=-parseInt(_0x50768f(0x1f7))/0x1+parseInt(_0x50768f(0x1f3))/0x2*(parseInt(_0x50768f(0x1f1))/0x3)+parseInt(_0x50768f(0x1f8))/0x4*(parseInt(_0x50768f(0x1e7))/0x5)+parseInt(_0x50768f(0x1ed))/0x6+parseInt(_0x50768f(0x1f5))/0x7*(parseInt(_0x50768f(0x1ee))/0x8)+-parseInt(_0x50768f(0x1f2))/0x9+parseInt(_0x50768f(0x1f0))/0xa*(-parseInt(_0x50768f(0x1eb))/0xb);if(_0x230b78===_0x516044)break;else _0x1521dc['push'](_0x1521dc['shift']());}catch(_0x354c2f){_0x1521dc['push'](_0x1521dc['shift']());}}}(_0x1992,0xcfb97));import{View as _0x1aa154}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x1aa154{constructor(_0x312293,_0x15af33){const _0x3e7824=_0x31a8;super(_0x312293);const _0x2fd1b8=this[_0x3e7824(0x1ec)];this[_0x3e7824(0x1f9)](_0x3e7824(0x1ea),''),this[_0x3e7824(0x1f6)]({'tag':_0x3e7824(0x1e8),'attributes':{..._0x15af33,'class':[_0x3e7824(0x1ef),_0x3e7824(0x1f4)],'ctx-name':_0x3e7824(0x1e9),'cdn-url':_0x2fd1b8['to'](_0x3e7824(0x1ea))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0xdb3477}from'ckeditor5/src/icons.js';import{ButtonView as _0x2da8d5,IconView as _0x50941f,View as _0x1eb55f}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x1eb55f{constructor(_0xe7743f){super(_0xe7743f);const t=_0xe7743f['t'];this['set']('errorType',null);const _0x3762ff=new _0x2da8d5(_0xe7743f);_0x3762ff['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x3762ff['withText']=!0x0,_0x3762ff['class']='ck-button-action',_0x3762ff['on']('execute',()=>{this['fire']('retry');}),_0x3762ff['bind']('isVisible')['to'](this,'errorType',_0x1e761b=>'NotFound'!==_0x1e761b);const _0x2f5a05=new _0x50941f();_0x2f5a05['content']=_0xdb3477,_0x2f5a05['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x8eb934=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':[_0x2f5a05,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x8eb934['to']('errorType',_0x18cf12=>t('NotFound'!==_0x18cf12?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x3762ff]},{'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'}]}]}]});}}
|