@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20260124.0 → 0.0.0-nightly-next-20260125.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/dist/index.js +3 -3
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x150695,Command as _0x35863b}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x228dd5,IconGooglePhotos as _0x139280,IconGoogleDrive as _0x1afef5,IconFacebook as _0x3c5dfd,IconDropbox as _0xfe594d,IconUploadcareLink as _0x319d94,IconUploadcareImageUpload as _0x565d2d,IconError as _0x3b0889,IconUploadcareImageEdit as _0x178804}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x56987c,MenuBarMenuListItemButtonView as _0x26feca,View as _0x39157e,FocusCycler as _0x38dbeb,Dialog as _0x3ac812,DialogViewPosition as _0x5773c9,SpinnerView as _0x4e4daa,IconView as _0x311890,Notification as _0x181562}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2f7f6f,DomEmitterMixin as _0x588bb3,global as _0x34be63,getAncestors as _0x20d0c4,ObservableMixin as _0x391e1b,uid as _0x146068,createElement as _0x4adfc6}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x433da8}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x1c39d4,info as _0x5759b9}from'@uploadcare/upload-client';import*as _0x349517 from'@uploadcare/file-uploader';var S=function(_0x72d442){return _0x72d442['Local']='local',_0x72d442['URL']='url',_0x72d442['Dropbox']='dropbox',_0x72d442['GDrive']='gdrive',_0x72d442['Facebook']='facebook',_0x72d442['GPhotos']='gphotos',_0x72d442['OneDrive']='onedrive',_0x72d442;}({});function T(_0x3aecf1,_0x4dc96c,_0x201536){const t=_0x3aecf1['t'],_0x221ee9=_0x3aecf1['t'];switch(_0x4dc96c){case S['Local']:return{'text':_0x221ee9('Insert'===_0x201536?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x221ee9('From\x20computer')};case S['URL']:return{'text':'Insert'===_0x201536?_0x221ee9('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x221ee9('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0x201536?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0x201536?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0x201536?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0x201536?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0x201536?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x4dc96c;}}class A extends _0x150695{['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 _0x373699=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1f36c4;for(const _0x2731c3 in _0x373699){const _0x2f7dbf=_0x2731c3,_0x431393=_0x373699[_0x2f7dbf];if('uploadcareLicenseKeyValid'==_0x431393||'uploadcareLicenseKeyInvalid'==_0x431393||'uploadcareLicenseKeyExpired'==_0x431393||'uploadcareLicenseKeyDomainLimit'==_0x431393||'uploadcareLicenseKeyNotAllowed'==_0x431393||'uploadcareLicenseKeyEvaluationLimit'==_0x431393||'uploadcareLicenseKeyUsageLimit'==_0x431393){delete _0x373699[_0x2f7dbf],_0x1f36c4=_0x431393,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x1f36c4&&_0x373699['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x1f36c4&&_0x373699['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x1f36c4&&_0x373699['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x1f36c4&&_0x373699['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x1f36c4&&_0x373699['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x1f36c4&&_0x373699['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x15f7a6}=this,_0x5dbcb6=_0x15f7a6['commands']['get']('uploadcare');if(!_0x5dbcb6)return;const _0x1e3109=this['_normalizeConfigSourceList'](_0x15f7a6['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x5a91cc,_0x717e1a)=>{const _0x2f1b74=this['_getIntegrationKey'](_0x717e1a['type']);return _0x5a91cc[_0x2f1b74]||(_0x5a91cc[_0x2f1b74]=[]),_0x5a91cc[_0x2f1b74]['push'](_0x717e1a),_0x5a91cc;},{});_0x15f7a6['plugins']['has']('ImageInsertUI')&&_0x15f7a6['commands']['get']('uploadcare')&&Object['entries'](_0x1e3109)['forEach'](([_0x3f55a8,_0xbcf306])=>{_0x15f7a6['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3f55a8,'observable':()=>_0x5dbcb6,'buttonViewCreator':()=>this['_createToolbarButton'](_0xbcf306),'formViewCreator':()=>this['_createDropdownButtons'](_0xbcf306),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0xbcf306),'override':'assetManager'!==_0x3f55a8});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x122111){const {locale:_0x46990c}=this['editor'];return _0x122111['map'](_0x45dd77=>{const _0x278888=T(_0x46990c,_0x45dd77,'Insert');switch(_0x45dd77){case S['Local']:return{'icon':_0x565d2d,'type':S['Local'],..._0x278888};case S['URL']:return{'icon':_0x319d94,'type':S['URL'],..._0x278888};case S['Dropbox']:return{'icon':_0xfe594d,'type':S['Dropbox'],..._0x278888};case S['Facebook']:return{'icon':_0x3c5dfd,'type':S['Facebook'],..._0x278888};case S['GDrive']:return{'icon':_0x1afef5,'type':S['GDrive'],..._0x278888};case S['GPhotos']:return{'icon':_0x139280,'type':S['GPhotos'],..._0x278888};case S['OneDrive']:return{'icon':_0x228dd5,'type':S['OneDrive'],..._0x278888};}});}['_getIntegrationKey'](_0x18a269){switch(_0x18a269){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x94d8d5,_0x3c481c){const _0x5ddd2b=this['editor'],_0x264222=new _0x94d8d5(_0x5ddd2b['locale']),_0x4ef557=_0x5ddd2b['commands']['get']('uploadcare');return _0x264222['bind']('isEnabled')['to'](_0x4ef557),_0x264222['on']('execute',()=>{_0x4ef557['execute'](_0x3c481c);}),_0x264222;}['_createToolbarButton'](_0x32d84c){const {locale:_0x408744}=this['editor'],_0x1aad20=this['editor']['plugins']['get']('ImageInsertUI'),_0x3270d3=_0x32d84c[0x0],_0x24e571=this['_createButton'](_0x56987c,_0x3270d3['type']);return _0x24e571['icon']=_0x3270d3['icon'],_0x24e571['bind']('label')['to'](_0x1aad20,'isImageSelected',_0x1524c9=>T(_0x408744,_0x3270d3['type'],_0x1524c9?'Replace':'Insert')['text']),_0x24e571['tooltip']=!0x0,_0x24e571;}['_createDropdownButtons'](_0x2b5810){const {locale:_0x28b1f0}=this['editor'],_0x683004=this['editor']['plugins']['get']('ImageInsertUI');return _0x2b5810['map'](_0xbd0e88=>{const _0x509f0b=this['_createButton'](_0x56987c,_0xbd0e88['type']);return _0x509f0b['withText']=!0x0,_0x509f0b['icon']=_0xbd0e88['icon'],_0x509f0b['bind']('label')['to'](_0x683004,'isImageSelected',_0x302e4d=>T(_0x28b1f0,_0xbd0e88['type'],_0x302e4d?'Replace':'Insert')['text']),_0x509f0b;});}['_createMenuBarButtons'](_0x320e73){return _0x320e73['map'](_0x538a51=>{const _0x2d5b4e=this['_createButton'](_0x26feca,_0x538a51['type']);return _0x2d5b4e['icon']=_0x538a51['icon'],_0x2d5b4e['label']=_0x538a51['shortText'],_0x2d5b4e;});}}class K extends _0x39157e{['focusTracker'];['focusCycler'];constructor(_0x27b63c){super(_0x27b63c),this['focusTracker']=new _0x2f7f6f(),this['focusCycler']=new _0x38dbeb({'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 O extends K{constructor(_0x5731cb,_0x3c46cc){super(_0x5731cb),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-'+_0x3c46cc}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x59b8ac,_0xf26c28){const _0x3a47c2=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x56fd0f=>_0x56fd0f<=_0xf26c28)['map'](_0x4cded2=>_0x59b8ac['replace'](/\/$/,'')+'/-/resize/'+_0x4cded2+'x/\x20'+_0x4cded2+'w');return{'imageFallbackUrl':_0x59b8ac,'imageSources':[{'srcset':_0x3a47c2['join'](',\x20'),'sizes':'(max-width:\x20'+_0xf26c28+'px)\x20100vw,\x20'+_0xf26c28+'px','type':'image/webp'}]};}function F(_0x51eea5,_0x2e48e5,_0x5b588e){const _0x5ccfc2=_0x51eea5['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5ccfc2?parseInt(_0x5ccfc2[0x1],0xa):_0x2e48e5,'height':_0x5ccfc2?parseInt(_0x5ccfc2[0x2],0xa):_0x5b588e};}function $(_0x50f891,_0x4358b8){const _0x1576bd=new(_0x588bb3())(),_0x1195e2=_0x50f891['plugins']['get']('ImageUtils'),_0x4ce9b7=_0x50f891['editing']['mapper']['toViewElement'](_0x4358b8),_0x45e04a=_0x1195e2['findViewImgElement'](_0x4ce9b7),_0x323fde=_0x50f891['editing']['view']['domConverter']['viewToDom'](_0x45e04a),_0x3f2f0f=_0x4358b8['getAttribute']('width'),_0x54a66b=_0x4358b8['getAttribute']('height'),_0x69a7d1='image-processing';_0x50f891['editing']['view']['change'](_0x4974b0=>{_0x4974b0['addClass'](_0x69a7d1,_0x4ce9b7),_0x4974b0['setStyle']('aspect-ratio',_0x3f2f0f+'/'+_0x54a66b,_0x45e04a);}),_0x1576bd['listenTo'](_0x323fde,'load',()=>{_0x1576bd['stopListening'](_0x323fde,'load'),_0x50f891['editing']['view']['change'](_0x5913ab=>{_0x5913ab['removeClass'](_0x69a7d1,_0x4ce9b7),_0x5913ab['removeStyle']('aspect-ratio',_0x45e04a);});});}function B(_0x5830a6){if(Array['isArray'](_0x5830a6)){const _0x5b7e75=_0x5830a6['map'](B);return _0x117379=>_0x5b7e75['some'](_0x9ebcfb=>_0x9ebcfb(_0x117379));}if('origin'==_0x5830a6){const _0x4518e7=_0x34be63['window']['location']['origin'];return _0x3b3279=>new URL(_0x3b3279,_0x34be63['document']['baseURI'])['origin']==_0x4518e7;}return'function'==typeof _0x5830a6?_0x5830a6:_0x5830a6 instanceof RegExp?_0x5b8c13=>!(!_0x5b8c13['match'](_0x5830a6)&&!_0x5b8c13['replace'](/^https?:\/\//,'')['match'](_0x5830a6)):()=>!0x1;}function V(_0x1cdacf,_0xa82f75){return _0x20d0c4(_0x1cdacf['target'])['includes'](_0xa82f75);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x391e1b(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x19a5c4,_0x8a7da3,_0x36ce8f){super(),this['_editor']=_0x19a5c4,this['_editing']=_0x8a7da3,this['_dialog']=_0x19a5c4['plugins']['get'](_0x3ac812),this['_api']=_0x8a7da3['ctxElement']['getAPI'](),this['_type']=_0x36ce8f,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:_0x2acbbc,model:_0x50b369}=this['_editor'],_0x4f518e=_0x50b369['document']['selection']['getSelectedElement'](),_0x165fe6=_0x4f518e&&(_0x4f518e['is']('element','imageBlock')||_0x4f518e['is']('element','imageInline'));this['_formView']=new O(_0x2acbbc,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x565d2d,'title':T(_0x2acbbc,this['_type'],_0x165fe6?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5773c9['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x51ea92=>!V(_0x51ea92,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x4cc76c}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1d55b3=>{const _0x4e3963=_0x4cc76c['length'];for(const _0x366ea7 of _0x4cc76c){const _0xdbfec=_0x366ea7===_0x4cc76c[_0x4e3963-0x1],{cdnUrl:_0x4bcfdb,fileInfo:_0x4edb90}=_0x366ea7;if(!_0x4bcfdb||!_0x4edb90)continue;const {width:_0x32ed39,height:_0x1e0408}=_0x4edb90['imageInfo'],_0x566c17=F(_0x4bcfdb,_0x32ed39,_0x1e0408),_0x148c65=D(_0x4bcfdb,_0x566c17['width']),_0x5491a4={'id':_0x4edb90['uuid'],'type':'image','attributes':{'imageDimension':_0x566c17,..._0x148c65}};this['_insertAsset'](_0x5491a4,_0xdbfec,_0x1d55b3);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x589181=>{'idle'===_0x589181['detail']['status']&&!_0x589181['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x6de567,_0x1f5472,_0x4305d5){const _0x35d5e7=this['_editor']['model']['document']['selection'],_0x376629=_0x35d5e7['getSelectedElement'](),_0x47fb2d=!(!_0x376629||!_0x376629['is']('element','imageInline'));_0x4305d5['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x6de567,_0x47fb2d),_0x1f5472||_0x4305d5['setSelection'](_0x35d5e7['getLastPosition']());}['_insertImage'](_0x315221,_0x2c2660){const _0x896cbd=this['_editor'],{imageDimension:_0x42fe68,imageFallbackUrl:_0xb1a90,imageSources:_0x1ff826}=_0x315221['attributes'];_0x896cbd['execute']('insertImage',{'imageType':_0x2c2660?'imageInline':null,'source':{'uploadcareImageId':_0x315221['id'],'src':_0xb1a90,'sources':_0x1ff826,..._0x42fe68}});}}class M extends _0x35863b{['_editing'];['_controller']=null;static get['requires'](){return[_0x3ac812,z];}constructor(_0x278def){super(_0x278def),this['_editing']=_0x278def['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x11ac00){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x11ac00);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x5dcec4,..._0x40370c}){return _0x1c39d4(_0x5dcec4,_0x40370c);}static['getInfo'](_0x461ec1,_0x5418a4){return _0x5759b9(_0x461ec1,_0x5418a4);}}class W extends _0x150695{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x433da8,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x4cdaf6=this['editor'];if(!!!_0x4cdaf6['config']['get']('uploadcare'))return;_0x4cdaf6['plugins']['get'](_0x433da8)['createUploadAdapter']=_0x3b97c0=>new G(_0x3b97c0,_0x4cdaf6),_0x4cdaf6['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4a695c,{imageElement:_0x4df60f,data:_0xbd4162})=>{_0x4cdaf6['model']['change'](_0x53e15a=>{_0x53e15a['setAttribute']('uploadcareImageId',_0xbd4162['uploadcareImageId'],_0x4df60f);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x1382a0,_0x3853f6){this['loader']=_0x1382a0,this['editor']=_0x3853f6,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x15bef4=await this['loader']['file'];return q['upload']({'file':_0x15bef4,'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':_0x3d4e57=>{_0x3d4e57&&_0x3d4e57['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3d4e57['value']);}})['then'](async _0x31f2de=>{const {imageFallbackUrl:_0x59a683,imageSources:_0x53e2a9}=D(_0x31f2de['cdnUrl'],_0x31f2de['imageInfo']['width']);return{'uploadcareImageId':_0x31f2de['uuid'],'default':_0x59a683,'sources':_0x53e2a9};})['catch'](()=>{const _0x3b77cf=t('Cannot\x20upload\x20file:')+('\x20'+_0x15bef4['name']+'.');return Promise['reject'](_0x3b77cf);});}['abort'](){this['controller']['abort']();}}class z extends _0x150695{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x3ac812];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x59c069){super(_0x59c069),this['ucContextId']=_0x146068();}['init'](){const _0x3d6c80=this['editor'];_0x3d6c80['commands']['add']('uploadcare',new M(_0x3d6c80));}['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 _0x32fa8c=_0x34be63['document']['querySelector']('input[uploadcare-file-input]');_0x32fa8c&&_0x32fa8c['remove']();}),async function(_0x23dce2){const _0x207b37=_0x534a5c([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]),_0x105c89=0x535f8c3a,_0x540a0a=0x5358f382^_0x105c89,_0x458512=window[_0x534a5c([0x44,0x61,0x74,0x65])][_0x534a5c([0x6e,0x6f,0x77])](),_0x352c12=_0x23dce2[_0x534a5c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x7bbdcd=new window[(_0x534a5c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x586903=>{_0x352c12[_0x534a5c([0x6f,0x6e,0x63,0x65])](_0x534a5c([0x72,0x65,0x61,0x64,0x79]),_0x586903);}),_0x14ae8b={[_0x534a5c([0x6b,0x74,0x79])]:_0x534a5c([0x45,0x43]),[_0x534a5c([0x75,0x73,0x65])]:_0x534a5c([0x73,0x69,0x67]),[_0x534a5c([0x63,0x72,0x76])]:_0x534a5c([0x50,0x2d,0x32,0x35,0x36]),[_0x534a5c([0x78])]:_0x534a5c([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]),[_0x534a5c([0x79])]:_0x534a5c([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]),[_0x534a5c([0x61,0x6c,0x67])]:_0x534a5c([0x45,0x53,0x32,0x35,0x36])},_0x47359b=_0x352c12[_0x534a5c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x534a5c([0x67,0x65,0x74])](_0x534a5c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1f5af5(){let _0x579cbc,_0x5293f4=null,_0x4a275f=null;try{if(_0x47359b==_0x534a5c([0x47,0x50,0x4c]))return _0x534a5c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x579cbc=_0xf8ed3c(),!_0x579cbc)return _0x534a5c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x579cbc[_0x534a5c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4a275f=_0x58361d(_0x579cbc[_0x534a5c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x579cbc[_0x534a5c([0x6a,0x74,0x69])])),await _0x3e1ecb()?_0x22bf1e()?_0x31ae5f()?_0x534a5c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x7678ef()?(_0x579cbc[_0x534a5c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x534a5c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5293f4=_0x480178(_0x534a5c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0xe7a6c9()):_0x534a5c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x534a5c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x534a5c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x534a5c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x31ae5f(){const _0x118b8b=[_0x534a5c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x534a5c([0x74,0x72,0x69,0x61,0x6c])][_0x534a5c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x579cbc[_0x534a5c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x458512/0x3e8:0xe10*_0x540a0a;return _0x579cbc[_0x534a5c([0x65,0x78,0x70])]<_0x118b8b;}function _0x22bf1e(){const _0x375877=_0x579cbc[_0x534a5c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x375877&&(!!_0x375877[_0x534a5c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x534a5c([0x2a]))||!!_0x375877[_0x534a5c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x534a5c([0x55,0x50,0x4c,0x43])));}function _0x7678ef(){const _0xa4148d=_0x579cbc[_0x534a5c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xa4148d||0x0==_0xa4148d[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x59eb41}=new URL(window[_0x534a5c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xa4148d[_0x534a5c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59eb41))return!0x0;const _0x19c9a7=_0x59eb41[_0x534a5c([0x73,0x70,0x6c,0x69,0x74])](_0x534a5c([0x2e]));return _0xa4148d[_0x534a5c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xaf1230=>_0xaf1230[_0x534a5c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x534a5c([0x2a])))[_0x534a5c([0x6d,0x61,0x70])](_0x383cb1=>_0x383cb1[_0x534a5c([0x73,0x70,0x6c,0x69,0x74])](_0x534a5c([0x2e])))[_0x534a5c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5f2567=>_0x5f2567[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x19c9a7[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x534a5c([0x6d,0x61,0x70])](_0x415e16=>Array(_0x19c9a7[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x415e16[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x534a5c([0x66,0x69,0x6c,0x6c])](_0x415e16[0x0]===_0x534a5c([0x2a])?_0x534a5c([0x2a]):'')[_0x534a5c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x415e16))[_0x534a5c([0x73,0x6f,0x6d,0x65])](_0x1022f4=>_0x19c9a7[_0x534a5c([0x65,0x76,0x65,0x72,0x79])]((_0x177698,_0x42870c)=>_0x1022f4[_0x42870c]===_0x177698||_0x1022f4[_0x42870c]===_0x534a5c([0x2a])));}function _0xe7a6c9(){return _0x5293f4&&_0x4a275f?new window[(_0x534a5c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1683b9,_0x5f6454)=>{_0x5293f4[_0x534a5c([0x74,0x68,0x65,0x6e])](_0x1683b9,_0x5f6454),_0x4a275f[_0x534a5c([0x74,0x68,0x65,0x6e])](_0x57e788=>{_0x57e788!=_0x534a5c([0x56,0x61,0x6c,0x69,0x64])&&_0x1683b9(_0x57e788);},_0x5f6454);}):_0x5293f4||_0x4a275f||_0x534a5c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x58361d(_0x4938f8,_0x527c4f){return new window[(_0x534a5c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2b5397=>{if(_0x52816b())return _0x2b5397(_0x534a5c([0x56,0x61,0x6c,0x69,0x64]));_0x3b4627(),_0x352c12[_0x534a5c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x534a5c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2f0490=!0x1;const _0x31c126=_0x146068();function _0x5088a1(_0x4adfcb){return!!_0x4adfcb&&(typeof _0x4adfcb===_0x534a5c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4adfcb===_0x534a5c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4adfcb[_0x534a5c([0x74,0x68,0x65,0x6e])]===_0x534a5c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4adfcb[_0x534a5c([0x63,0x61,0x74,0x63,0x68])]===_0x534a5c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x82fbf3(_0x502074){_0x28d75b(_0x502074)[_0x534a5c([0x74,0x68,0x65,0x6e])](_0x3b68c4=>{if(!_0x3b68c4||_0x3b68c4[_0x534a5c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x534a5c([0x6f,0x6b]))return _0x534a5c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x28f511(_0x5b20a7(_0x31c126+_0x527c4f))!=_0x3b68c4[_0x534a5c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x534a5c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x534a5c([0x56,0x61,0x6c,0x69,0x64]);})[_0x534a5c([0x74,0x68,0x65,0x6e])](_0x3fa48b=>(_0x37fe30(),_0x3fa48b),()=>{const _0x2a8cc8=_0x5e3612();return null==_0x2a8cc8?(_0x37fe30(),_0x534a5c([0x56,0x61,0x6c,0x69,0x64])):_0x534a5c(_0x458512-_0x2a8cc8>(0x7753083a^_0x105c89)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x534a5c([0x74,0x68,0x65,0x6e])](_0x2b5397)[_0x534a5c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2b5397(_0x534a5c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1e73f8=0x536962ba^_0x105c89;function _0x37fe30(){const _0x24f389=_0x534a5c([0x6c,0x6c,0x63,0x74,0x2d])+_0x28f511(_0x5b20a7(_0x4938f8)),_0x3ab324=_0x122ca8(_0x28f511(window[_0x534a5c([0x4d,0x61,0x74,0x68])][_0x534a5c([0x63,0x65,0x69,0x6c])](_0x458512/_0x1e73f8)));window[_0x534a5c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x534a5c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x24f389,_0x3ab324);}function _0x5e3612(){const _0x36e376=_0x534a5c([0x6c,0x6c,0x63,0x74,0x2d])+_0x28f511(_0x5b20a7(_0x4938f8)),_0x54fd5d=window[_0x534a5c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x534a5c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x36e376);return _0x54fd5d?window[_0x534a5c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x122ca8(_0x54fd5d),0x10)*_0x1e73f8:null;}function _0x28d75b(_0x36a874){return new window[(_0x534a5c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x81727d,_0x54e2a3)=>{_0x36a874[_0x534a5c([0x74,0x68,0x65,0x6e])](_0x81727d,_0x54e2a3),window[_0x534a5c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x54e2a3,0x535e58fa^_0x105c89);});}}_0x352c12[_0x534a5c([0x6f,0x6e])](_0x534a5c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xa7fe0b,_0x84f598)=>{if(_0x84f598[0x0]!=_0x4938f8)return _0x2b5397(_0x534a5c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x84f598[0x1]={..._0x84f598[0x1],[_0x534a5c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x31c126};},{[_0x534a5c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x534a5c([0x68,0x69,0x67,0x68])}),_0x352c12[_0x534a5c([0x6f,0x6e])](_0x534a5c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x31e746=>{_0x5088a1(_0x31e746[_0x534a5c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2f0490=!0x0,_0x82fbf3(_0x31e746[_0x534a5c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x534a5c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x534a5c([0x6c,0x6f,0x77])}),_0x7bbdcd[_0x534a5c([0x74,0x68,0x65,0x6e])](()=>{_0x2f0490||_0x2b5397(_0x534a5c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52816b(){return _0x352c12[_0x534a5c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x534a5c([0x76,0x69,0x65,0x77])][_0x534a5c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x534a5c([0x61,0x75,0x74,0x6f]);}function _0x3b4627(){_0x352c12[_0x534a5c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x534a5c([0x76,0x69,0x65,0x77])][_0x534a5c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x534a5c([0x61,0x75,0x74,0x6f]);}}function _0x480178(_0x106661){const _0x3f7aaa=[new window[(_0x534a5c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b625b=>setTimeout(_0x5b625b,0x5356b2f6^_0x105c89)),_0x7bbdcd[_0x534a5c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x534a5c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x51695b=>{let _0x51fd06=0x0;_0x352c12[_0x534a5c([0x6d,0x6f,0x64,0x65,0x6c])][_0x534a5c([0x6f,0x6e])](_0x534a5c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2a2510,_0x476069)=>{_0x476069[0x0][_0x534a5c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x51fd06++,_0x51fd06==(0x535f89d2^_0x105c89)&&(_0x51695b(),_0x2a2510[_0x534a5c([0x6f,0x66,0x66])]());});}))];return window[_0x534a5c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x534a5c([0x72,0x61,0x63,0x65])](_0x3f7aaa)[_0x534a5c([0x74,0x68,0x65,0x6e])](()=>_0x106661);}async function _0x364a18(){await _0x7bbdcd,_0x352c12[_0x534a5c([0x6d,0x6f,0x64,0x65,0x6c])][_0x534a5c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x20611d,_0x352c12[_0x534a5c([0x6d,0x6f,0x64,0x65,0x6c])][_0x534a5c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x20611d,_0x352c12[_0x534a5c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x534a5c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2f5ad7(_0x4b13da){const _0x51e83a=_0x3f7738();_0x352c12[_0x51e83a]=_0x534a5c([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4b13da,_0x4b13da!=_0x534a5c([0x56,0x61,0x6c,0x69,0x64])&&_0x364a18();}function _0x3f7738(){const _0x5af017=window[_0x534a5c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x534a5c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x534a5c([0x6e,0x6f,0x77])]())[_0x534a5c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x534a5c([0x2e]),'');let _0x31cf62=_0x534a5c([0x68]);for(let _0x4bb6e8=0x0;_0x4bb6e8<_0x5af017[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4bb6e8+=0x2){let _0x29c21a=window[_0x534a5c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5af017[_0x534a5c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4bb6e8,_0x4bb6e8+0x2));_0x29c21a>=_0x207b37[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x29c21a-=_0x207b37[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x31cf62+=_0x207b37[_0x29c21a];}return _0x31cf62;}function _0xf8ed3c(){const _0x277317=_0x47359b[_0x534a5c([0x73,0x70,0x6c,0x69,0x74])](_0x534a5c([0x2e]));if(0x3!=_0x277317[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4c0dd1(_0x277317[0x1]);function _0x4c0dd1(_0x25087b){const _0x38bac4=_0x1e0168(_0x25087b);return _0x38bac4&&_0x4210ff()?_0x38bac4:null;function _0x4210ff(){const _0x838372=_0x38bac4[_0x534a5c([0x6a,0x74,0x69])],_0x283f19=window[_0x534a5c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x838372[_0x534a5c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x838372[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x481e19={..._0x38bac4,[_0x534a5c([0x6a,0x74,0x69])]:_0x838372[_0x534a5c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x838372[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x481e19[_0x534a5c([0x76,0x63])],_0x5b20a7(_0x481e19)==_0x283f19;}}}async function _0x3e1ecb(){let _0x1cc9fb=!0x0;try{const _0x1ed99e=_0x47359b[_0x534a5c([0x73,0x70,0x6c,0x69,0x74])](_0x534a5c([0x2e])),[_0x114d18,_0x4c2ea1,_0x2bb914]=_0x1ed99e;return _0x43a431(_0x114d18),await _0x14456c(_0x114d18,_0x4c2ea1,_0x2bb914),_0x1cc9fb;}catch{return!0x1;}function _0x43a431(_0x1f1a32){const _0x2116be=_0x1e0168(_0x1f1a32);_0x2116be&&_0x2116be[_0x534a5c([0x61,0x6c,0x67])]==_0x534a5c([0x45,0x53,0x32,0x35,0x36])||(_0x1cc9fb=!0x1);}async function _0x14456c(_0x5c1d9b,_0x13989d,_0x77bde0){const _0x10d71b=window[_0x534a5c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x534a5c([0x66,0x72,0x6f,0x6d])](_0x596d82(_0x77bde0),_0x435859=>_0x435859[_0x534a5c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5cf478=new window[(_0x534a5c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x534a5c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5c1d9b+_0x534a5c([0x2e])+_0x13989d),_0x8a1007=window[_0x534a5c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x534a5c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x8a1007)return;const _0x53560b=await _0x8a1007[_0x534a5c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x534a5c([0x6a,0x77,0x6b]),_0x14ae8b,{[_0x534a5c([0x6e,0x61,0x6d,0x65])]:_0x534a5c([0x45,0x43,0x44,0x53,0x41]),[_0x534a5c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x534a5c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x534a5c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x8a1007[_0x534a5c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x534a5c([0x6e,0x61,0x6d,0x65])]:_0x534a5c([0x45,0x43,0x44,0x53,0x41]),[_0x534a5c([0x68,0x61,0x73,0x68])]:{[_0x534a5c([0x6e,0x61,0x6d,0x65])]:_0x534a5c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x53560b,_0x10d71b,_0x5cf478)||(_0x1cc9fb=!0x1);}}function _0x1e0168(_0x36fd52){return _0x36fd52[_0x534a5c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x534a5c([0x65,0x79]))?JSON[_0x534a5c([0x70,0x61,0x72,0x73,0x65])](_0x596d82(_0x36fd52)):null;}function _0x596d82(_0x29d9d8){return window[_0x534a5c([0x61,0x74,0x6f,0x62])](_0x29d9d8[_0x534a5c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x534a5c([0x2b]))[_0x534a5c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x534a5c([0x2f])));}function _0x5b20a7(_0x39fbd3){let _0x8a8f0b=0x1505;function _0x2154f0(_0x29ac2f){for(let _0x4a97e8=0x0;_0x4a97e8<_0x29ac2f[_0x534a5c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4a97e8++){const _0x1247a5=_0x29ac2f[_0x534a5c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4a97e8);_0x8a8f0b=(_0x8a8f0b<<0x5)+_0x8a8f0b+_0x1247a5,_0x8a8f0b&=_0x8a8f0b;}}function _0x25ea82(_0x17bed6){Array[_0x534a5c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x17bed6)?_0x17bed6[_0x534a5c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x25ea82):_0x17bed6&&typeof _0x17bed6==_0x534a5c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x534a5c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x17bed6)[_0x534a5c([0x73,0x6f,0x72,0x74])]()[_0x534a5c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x7f92d2,_0xc25384])=>{_0x2154f0(_0x7f92d2),_0x25ea82(_0xc25384);}):_0x2154f0(window[_0x534a5c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x17bed6));}return _0x25ea82(_0x39fbd3),_0x8a8f0b>>>0x0;}function _0x28f511(_0x2565d2){return _0x2565d2[_0x534a5c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x534a5c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x534a5c([0x30]));}function _0x122ca8(_0x43588a){return _0x43588a[_0x534a5c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x534a5c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x534a5c([0x6a,0x6f,0x69,0x6e])]('');}function _0x20611d(){}function _0x534a5c(_0x4e804e){return _0x4e804e['map'](_0x27e192=>String['fromCharCode'](_0x27e192))['join']('');}_0x2f5ad7(await _0x1f5af5());}(this);}['_initSchema'](){const _0x58a3ac=this['editor']['model']['schema'];_0x58a3ac['isRegistered']('imageBlock')&&_0x58a3ac['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x58a3ac['isRegistered']('imageInline')&&_0x58a3ac['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x14cdd1=this['editor'];_0x14cdd1['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x14cdd1['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x3fb064=>_0x3fb064['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4b3d4a=_0x14cdd1['commands']['get']('replaceImageSource');_0x4b3d4a&&this['listenTo'](_0x4b3d4a,'cleanupImage',(_0x4b3ee9,[_0x55de4d,_0x24dac1])=>{_0x55de4d['removeAttribute']('uploadcareImageId',_0x24dac1);});}['_initConfig'](){const _0x52780b=this['editor']['config']['get']('uploadcare.uploader')||{},_0x3a6541=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4adfc6(_0x34be63['document'],'uc-config',{..._0x52780b,'pubkey':_0x3a6541,'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']=_0x121c6c=>{if('closeMax'==_0x121c6c)return'#uc-icon-arrow-down';},_0x34be63['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4adfc6(_0x34be63['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x34be63['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x5d10de=this['editor']['commands']['get']('insertImage');_0x5d10de&&this['listenTo'](_0x5d10de,'execute',()=>{const _0x5b1b1a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5b1b1a&&_0x5b1b1a['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x5b1b1a);});});const _0x1967b=this['editor']['commands']['get']('uploadcareImageReplace');_0x1967b&&this['listenTo'](_0x1967b,'execute',()=>{const _0x32c7a6=this['editor']['model']['document']['selection']['getSelectedElement']();_0x32c7a6&&_0x32c7a6['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x32c7a6);});});}}class H extends _0x150695{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x79f40d){super(_0x79f40d),_0x79f40d['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0x349517['defineComponents'](_0x349517),this['_defineLocale']();}['_defineLocale'](){const _0x96e92f=this['editor']['config']['get']('uploadcare.locale'),_0x5a0a1a=this['editor']['locale']['contentLanguage'];_0x96e92f&&_0x349517['defineLocale'](_0x5a0a1a,_0x96e92f);}}class J extends _0x39157e{constructor(_0x878d39){super(_0x878d39);const t=_0x878d39['t'],_0x2967c2=this['bindTemplate'],_0x5e188c=new _0x4e4daa();_0x5e188c['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':[_0x5e188c,{'text':_0x2967c2['to']('imageUploadProgress',_0x4da655=>t('Loading\x20image...')+'\x20('+(_0x4da655||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 Z extends _0x39157e{constructor(_0x3b0163){super(_0x3b0163);const t=_0x3b0163['t'];this['set']('errorType',null);const _0x4b8c9e=new _0x56987c(_0x3b0163);_0x4b8c9e['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4b8c9e['withText']=!0x0,_0x4b8c9e['class']='ck-button-action',_0x4b8c9e['on']('execute',()=>{this['fire']('retry');}),_0x4b8c9e['bind']('isVisible')['to'](this,'errorType',_0x363e27=>'NotFound'!==_0x363e27);const _0x5be9ae=new _0x311890();_0x5be9ae['content']=_0x3b0889,_0x5be9ae['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1716d2=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':[_0x5be9ae,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1716d2['to']('errorType',_0x316d01=>t('NotFound'!==_0x316d01?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4b8c9e]},{'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 Q extends _0x39157e{constructor(_0xbf1c95,_0x56890b){super(_0xbf1c95);const _0xfc90b2=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x56890b,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xfc90b2['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0xd42fcb,_0x2e7efb,_0x115fc9){super(_0xd42fcb),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0xd42fcb),this['_errorView']=new Z(_0xd42fcb),this['_editingView']=new Q(_0xd42fcb,_0x115fc9),this['_focusableView']=new _0x39157e(_0xd42fcb),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2e7efb),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'],_0x58756f=>{this['_addUploadcareImageEditorListeners'](_0x58756f);});}),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'](_0x2cf7a6,_0x308e26){const _0xa7feae='uc-cloud-image-editor',_0x442747=_0x2cf7a6['querySelector'](_0xa7feae);if(_0x442747)return _0x308e26(_0x442747);const _0x476b13=new MutationObserver(_0x3ec5ef=>{const _0xeba31d=_0x3ec5ef['filter'](_0x9a4504=>_0x9a4504['target']===_0x2cf7a6&&_0x9a4504['addedNodes']['length']>0x0&&_0x9a4504['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0xa7feae);_0xeba31d['length']&&(_0x476b13['disconnect'](),_0x308e26(_0xeba31d[0x0]['addedNodes'][0x0]));});_0x476b13['observe'](_0x2cf7a6,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x2e37f3){_0x2e37f3['addEventListener']('apply',_0x2c817d=>{this['fire']('apply',{'imageSrc':_0x2c817d['detail']['cdnUrl']});}),_0x2e37f3['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x391e1b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5cbb66,_0x22854c,_0x35dead){super(),this['_editor']=_0x5cbb66,this['_dialog']=_0x22854c,this['_imageElement']=_0x35dead,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 _0x1890b5=this['_imageElement'],_0x4db2a5=_0x1890b5['getAttribute']('uploadcareImageId'),_0x21c557=_0x1890b5['getAttribute']('src');if(_0x4db2a5)await this['_loadImageInfo'](_0x4db2a5,_0x21c557);else{if(this['_imageCache']['has'](_0x21c557)){const _0x209e1d=this['_imageCache']['get'](_0x21c557);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x209e1d['url'],this['imageDimension']=_0x209e1d['dimension'],this['imageId']=_0x209e1d['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2903cf}=this['_editor'],t=_0x2903cf['t'],_0x225434=new X(_0x2903cf,this['imageStatus'],this['_attributes']);_0x225434['bind']('status')['to'](this,'imageStatus'),_0x225434['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x225434['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x225434['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x225434,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x178804,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x225434,'position':_0x5773c9['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x225434['focus']();},'onHide':()=>{_0x225434['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x29eb78=>!V(_0x29eb78,_0x225434['element'])}});}['_loadImageInfo'](_0x11518f,_0x269405){return q['getInfo'](_0x11518f,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x288bef=>{const {width:_0x5945e1,height:_0x38084b}=_0x288bef['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x269405,this['imageDimension']={'width':_0x5945e1,'height':_0x38084b},this['imageId']=_0x11518f;})['catch'](_0x21b076=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x21b076['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x5c96c,_0x2f9452){return this['_getImageAsFile'](_0x5c96c)['then'](_0x1579fa=>q['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':_0x2f9452['signal'],'file':_0x1579fa,'onProgress':_0x140bbd=>{_0x140bbd&&_0x140bbd['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x140bbd['value']));}}))['then'](_0x3adffb=>{const {width:_0x4adc14,height:_0x42e324}=_0x3adffb['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3adffb['cdnUrl'],this['imageDimension']={'width':_0x4adc14,'height':_0x42e324},this['imageId']=_0x3adffb['uuid'],this['imageUploadProgress']=null;const _0x4d54e2=_0x5c96c['getAttribute']('src');this['_imageCache']['set'](_0x4d54e2,{'id':_0x3adffb['uuid'],'url':_0x3adffb['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1226b0=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1226b0['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5a9984,_0x13bc49){_0x5a9984['on']('apply',(_0x423a86,_0x34b9ca)=>{this['_replaceImage'](_0x13bc49,_0x34b9ca['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5a9984['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5a9984['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x3e42f6,_0xeec200,_0x1d8c90){const _0x58ea95=this['_editor'],{width:_0x4a18b0,height:_0x264353}=F(_0xeec200,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3bc652,imageSources:_0x808e57}=D(_0xeec200,_0x4a18b0);_0x58ea95['model']['change'](_0x33509b=>{if('$graveyard'===_0x3e42f6['root']['rootName']){_0x58ea95['execute']('insertImage',{'imageType':_0x3e42f6['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x3e42f6['getAttributes']()),'uploadcareImageId':_0x1d8c90,'src':_0x3bc652,'sources':_0x808e57,'width':_0x4a18b0,'height':_0x264353}});const _0x3b40b7=_0x3e42f6['getChildren']();_0x3e42f6=_0x58ea95['model']['document']['selection']['getSelectedElement']();for(const _0x13b74a of _0x3b40b7)_0x33509b['append'](_0x33509b['cloneElement'](_0x13b74a),_0x3e42f6);}else _0x33509b['setSelection'](_0x3e42f6,'on'),_0x58ea95['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x3e42f6['getAttributes']()),'uploadcareImageId':_0x1d8c90,'src':_0x3bc652,'sources':_0x808e57,'width':_0x4a18b0,'height':_0x264353},_0x3e42f6);_0x33509b['setSelection'](_0x3e42f6,'on');});}async['_getImageAsFile'](_0x5e7d6d){const _0x56e2f5=_0x34be63['window'],_0x2b0179=_0x34be63['document']['location']['href'],_0x3ae347=new _0x56e2f5['URL'](_0x5e7d6d['getAttribute']('src'),_0x2b0179);if('data:'===_0x3ae347['protocol']){const _0x19fdeb=_0x3ae347['href']['split'](','),_0x5c55d7=_0x19fdeb[0x0]['match'](/:(.*?);/)[0x1],_0x186ae4=_0x5c55d7['split']('/')[0x1],_0x234116=_0x56e2f5['atob'](_0x19fdeb[_0x19fdeb['length']-0x1]);let _0x121706=_0x234116['length'];const _0x30e48f=new _0x56e2f5['Uint8Array'](_0x121706);for(;_0x121706--;)_0x30e48f[_0x121706]=_0x234116['charCodeAt'](_0x121706);return new _0x56e2f5['File']([_0x30e48f],'image.'+_0x186ae4,{'type':_0x5c55d7});}const _0x92c709=_0x3ae347['href']['split']('/'),_0x53e26b=_0x92c709[_0x92c709['length']-0x1],_0x2c6b59=_0x53e26b['split']('.')[0x1];return _0x56e2f5['fetch'](_0x3ae347['href'])['then'](_0x49ffb7=>_0x49ffb7['clone']()['blob']())['then'](_0xdae698=>new _0x56e2f5['File']([_0xdae698],_0x53e26b,{'type':'image/'+_0x2c6b59}));}}class tt extends _0x35863b{['imageEditController'];static get['requires'](){return[_0x3ac812];}['_isEditable'];constructor(_0x53d341){super(_0x53d341),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x307c83){const _0x438f33=B(_0x307c83);return _0xa56faa=>!(!_0xa56faa||!_0xa56faa['is']('element','imageBlock')&&!_0xa56faa['is']('element','imageInline'))&&(!!_0xa56faa['hasAttribute']('uploadcareImageId')||!!_0xa56faa['hasAttribute']('src')&&_0x438f33(_0xa56faa['getAttribute']('src')));}(_0x53d341['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x228941=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x228941);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5ac13e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5ac13e&&(_0x5ac13e['is']('element','imageBlock')||_0x5ac13e['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x3ac812),_0x5ac13e),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x35863b{['refresh'](){const _0x300ac3=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x300ac3&&(_0x300ac3['is']('element','imageBlock')||_0x300ac3['is']('element','imageInline')));}['execute'](_0x4dd0c8){const _0x1eccfd=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x2542d4=>{_0x2542d4['setAttributes'](_0x4dd0c8,_0x1eccfd),_0x2542d4['removeAttribute']('srcset',_0x1eccfd),_0x2542d4['removeAttribute']('sizes',_0x1eccfd);});}}class it extends _0x150695{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x181562,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x486685}=this;_0x486685['commands']['add']('uploadcareImageEdit',new tt(_0x486685)),_0x486685['commands']['add']('uploadcareImageReplace',new et(_0x486685));}}class st extends _0x150695{['_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 _0x45e4b0=this['editor'];_0x45e4b0['ui']['componentFactory']['add']('uploadcareImageEdit',_0xad1b98=>{const _0x145910=_0x45e4b0['commands']['get']('uploadcareImageEdit'),_0x28571a=new _0x56987c(_0xad1b98),t=_0xad1b98['t'];return _0x28571a['set']({'icon':_0x178804,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x28571a['bind']('isEnabled')['to'](_0x145910),_0x28571a['bind']('isOn')['to'](_0x145910,'isActive'),this['listenTo'](_0x28571a,'execute',()=>{_0x45e4b0['execute']('uploadcareImageEdit'),_0x45e4b0['editing']['view']['focus']();}),_0x28571a;}),this['_initConfig']();}['_initConfig'](){const _0xdb5bd1=_0x4adfc6(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xdb5bd1),this['listenTo'](this['editor'],'destroy',()=>{_0xdb5bd1['remove']();});}}class nt extends _0x150695{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[it,st];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{H as Uploadcare,M as UploadcareCommand,z as UploadcareEditing,nt as UploadcareImageEdit,tt as UploadcareImageEditCommand,it as UploadcareImageEditEditing,st as UploadcareImageEditUI,A as UploadcareUI,W as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x1381fe,Command as _0x4053fb}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x136e42,IconGooglePhotos as _0x890cfc,IconGoogleDrive as _0xe04989,IconFacebook as _0x1dfde4,IconDropbox as _0x30595f,IconUploadcareLink as _0xa0d5b4,IconUploadcareImageUpload as _0x4de35b,IconError as _0x3352f5,IconUploadcareImageEdit as _0x2e810c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1c2298,MenuBarMenuListItemButtonView as _0x2ef86d,View as _0x5e2bd9,FocusCycler as _0x580d81,Dialog as _0xc5a1d6,DialogViewPosition as _0x5be585,SpinnerView as _0x81341c,IconView as _0x20776e,Notification as _0x4a616d}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x4e710d,DomEmitterMixin as _0x572036,global as _0x58ec2d,getAncestors as _0x4fc9f1,ObservableMixin as _0x23ed1c,uid as _0x30f973,createElement as _0x367357}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x460eae}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x1267ba,info as _0x4e0038}from'@uploadcare/upload-client';import*as _0x132b1c from'@uploadcare/file-uploader';var S=function(_0x51cb32){return _0x51cb32['Local']='local',_0x51cb32['URL']='url',_0x51cb32['Dropbox']='dropbox',_0x51cb32['GDrive']='gdrive',_0x51cb32['Facebook']='facebook',_0x51cb32['GPhotos']='gphotos',_0x51cb32['OneDrive']='onedrive',_0x51cb32;}({});function T(_0xa61e75,_0x52934b,_0x5f1f0b){const t=_0xa61e75['t'],_0x3970b=_0xa61e75['t'];switch(_0x52934b){case S['Local']:return{'text':_0x3970b('Insert'===_0x5f1f0b?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x3970b('From\x20computer')};case S['URL']:return{'text':'Insert'===_0x5f1f0b?_0x3970b('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x3970b('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x52934b;}}class A extends _0x1381fe{['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 _0x60a97a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x206cab;for(const _0x4c549d in _0x60a97a){const _0x290dd1=_0x4c549d,_0x374b35=_0x60a97a[_0x290dd1];if('uploadcareLicenseKeyValid'==_0x374b35||'uploadcareLicenseKeyInvalid'==_0x374b35||'uploadcareLicenseKeyExpired'==_0x374b35||'uploadcareLicenseKeyDomainLimit'==_0x374b35||'uploadcareLicenseKeyNotAllowed'==_0x374b35||'uploadcareLicenseKeyEvaluationLimit'==_0x374b35||'uploadcareLicenseKeyUsageLimit'==_0x374b35){delete _0x60a97a[_0x290dd1],_0x206cab=_0x374b35,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x206cab&&_0x60a97a['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x206cab&&_0x60a97a['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x206cab&&_0x60a97a['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x206cab&&_0x60a97a['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x206cab&&_0x60a97a['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x206cab&&_0x60a97a['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2f3d30}=this,_0x2013a4=_0x2f3d30['commands']['get']('uploadcare');if(!_0x2013a4)return;const _0x34953e=this['_normalizeConfigSourceList'](_0x2f3d30['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x35de79,_0xc271a9)=>{const _0x13d84e=this['_getIntegrationKey'](_0xc271a9['type']);return _0x35de79[_0x13d84e]||(_0x35de79[_0x13d84e]=[]),_0x35de79[_0x13d84e]['push'](_0xc271a9),_0x35de79;},{});_0x2f3d30['plugins']['has']('ImageInsertUI')&&_0x2f3d30['commands']['get']('uploadcare')&&Object['entries'](_0x34953e)['forEach'](([_0x363a3f,_0x402bee])=>{_0x2f3d30['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x363a3f,'observable':()=>_0x2013a4,'buttonViewCreator':()=>this['_createToolbarButton'](_0x402bee),'formViewCreator':()=>this['_createDropdownButtons'](_0x402bee),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x402bee),'override':'assetManager'!==_0x363a3f});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0xf523ca){const {locale:_0x89ff36}=this['editor'];return _0xf523ca['map'](_0x271800=>{const _0x5322c0=T(_0x89ff36,_0x271800,'Insert');switch(_0x271800){case S['Local']:return{'icon':_0x4de35b,'type':S['Local'],..._0x5322c0};case S['URL']:return{'icon':_0xa0d5b4,'type':S['URL'],..._0x5322c0};case S['Dropbox']:return{'icon':_0x30595f,'type':S['Dropbox'],..._0x5322c0};case S['Facebook']:return{'icon':_0x1dfde4,'type':S['Facebook'],..._0x5322c0};case S['GDrive']:return{'icon':_0xe04989,'type':S['GDrive'],..._0x5322c0};case S['GPhotos']:return{'icon':_0x890cfc,'type':S['GPhotos'],..._0x5322c0};case S['OneDrive']:return{'icon':_0x136e42,'type':S['OneDrive'],..._0x5322c0};}});}['_getIntegrationKey'](_0xa5fbb4){switch(_0xa5fbb4){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3b1d43,_0x482d52){const _0x280716=this['editor'],_0x16d1d5=new _0x3b1d43(_0x280716['locale']),_0x27ac6e=_0x280716['commands']['get']('uploadcare');return _0x16d1d5['bind']('isEnabled')['to'](_0x27ac6e),_0x16d1d5['on']('execute',()=>{_0x27ac6e['execute'](_0x482d52);}),_0x16d1d5;}['_createToolbarButton'](_0x48669d){const {locale:_0x3718f6}=this['editor'],_0x2e06cd=this['editor']['plugins']['get']('ImageInsertUI'),_0x56507b=_0x48669d[0x0],_0x46f178=this['_createButton'](_0x1c2298,_0x56507b['type']);return _0x46f178['icon']=_0x56507b['icon'],_0x46f178['bind']('label')['to'](_0x2e06cd,'isImageSelected',_0x1d1314=>T(_0x3718f6,_0x56507b['type'],_0x1d1314?'Replace':'Insert')['text']),_0x46f178['tooltip']=!0x0,_0x46f178;}['_createDropdownButtons'](_0x286778){const {locale:_0x87e6bb}=this['editor'],_0x2ca0ad=this['editor']['plugins']['get']('ImageInsertUI');return _0x286778['map'](_0x283a0a=>{const _0xe21cb5=this['_createButton'](_0x1c2298,_0x283a0a['type']);return _0xe21cb5['withText']=!0x0,_0xe21cb5['icon']=_0x283a0a['icon'],_0xe21cb5['bind']('label')['to'](_0x2ca0ad,'isImageSelected',_0x3ae25d=>T(_0x87e6bb,_0x283a0a['type'],_0x3ae25d?'Replace':'Insert')['text']),_0xe21cb5;});}['_createMenuBarButtons'](_0x4d3566){return _0x4d3566['map'](_0x28d486=>{const _0x3d174e=this['_createButton'](_0x2ef86d,_0x28d486['type']);return _0x3d174e['icon']=_0x28d486['icon'],_0x3d174e['label']=_0x28d486['shortText'],_0x3d174e;});}}class K extends _0x5e2bd9{['focusTracker'];['focusCycler'];constructor(_0xb1055c){super(_0xb1055c),this['focusTracker']=new _0x4e710d(),this['focusCycler']=new _0x580d81({'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 O extends K{constructor(_0x4eb0a4,_0x369135){super(_0x4eb0a4),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-'+_0x369135}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x37eacc,_0xcd8f7f){const _0x1fdc63=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x504096=>_0x504096<=_0xcd8f7f)['map'](_0x2ec14b=>_0x37eacc['replace'](/\/$/,'')+'/-/resize/'+_0x2ec14b+'x/\x20'+_0x2ec14b+'w');return{'imageFallbackUrl':_0x37eacc,'imageSources':[{'srcset':_0x1fdc63['join'](',\x20'),'sizes':'(max-width:\x20'+_0xcd8f7f+'px)\x20100vw,\x20'+_0xcd8f7f+'px','type':'image/webp'}]};}function F(_0x12e357,_0x5ee673,_0x5a8f4f){const _0x44e05c=_0x12e357['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x44e05c?parseInt(_0x44e05c[0x1],0xa):_0x5ee673,'height':_0x44e05c?parseInt(_0x44e05c[0x2],0xa):_0x5a8f4f};}function $(_0x1cdfe0,_0x19dcfc){const _0x31779e=new(_0x572036())(),_0x20498c=_0x1cdfe0['plugins']['get']('ImageUtils'),_0x26f494=_0x1cdfe0['editing']['mapper']['toViewElement'](_0x19dcfc),_0x207367=_0x20498c['findViewImgElement'](_0x26f494),_0x30f885=_0x1cdfe0['editing']['view']['domConverter']['viewToDom'](_0x207367),_0x1e0029=_0x19dcfc['getAttribute']('width'),_0x1fcc12=_0x19dcfc['getAttribute']('height'),_0x430e17='image-processing';_0x1cdfe0['editing']['view']['change'](_0x162570=>{_0x162570['addClass'](_0x430e17,_0x26f494),_0x162570['setStyle']('aspect-ratio',_0x1e0029+'/'+_0x1fcc12,_0x207367);}),_0x31779e['listenTo'](_0x30f885,'load',()=>{_0x31779e['stopListening'](_0x30f885,'load'),_0x1cdfe0['editing']['view']['change'](_0x4ef38e=>{_0x4ef38e['removeClass'](_0x430e17,_0x26f494),_0x4ef38e['removeStyle']('aspect-ratio',_0x207367);});});}function B(_0x1e6891){if(Array['isArray'](_0x1e6891)){const _0x4cdc1f=_0x1e6891['map'](B);return _0x3e4966=>_0x4cdc1f['some'](_0xad94e8=>_0xad94e8(_0x3e4966));}if('origin'==_0x1e6891){const _0x316058=_0x58ec2d['window']['location']['origin'];return _0x231d3c=>new URL(_0x231d3c,_0x58ec2d['document']['baseURI'])['origin']==_0x316058;}return'function'==typeof _0x1e6891?_0x1e6891:_0x1e6891 instanceof RegExp?_0x536c15=>!(!_0x536c15['match'](_0x1e6891)&&!_0x536c15['replace'](/^https?:\/\//,'')['match'](_0x1e6891)):()=>!0x1;}function V(_0x58c051,_0x37f2f0){return _0x4fc9f1(_0x58c051['target'])['includes'](_0x37f2f0);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x23ed1c(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2d9580,_0x1e5db4,_0x3cfcdf){super(),this['_editor']=_0x2d9580,this['_editing']=_0x1e5db4,this['_dialog']=_0x2d9580['plugins']['get'](_0xc5a1d6),this['_api']=_0x1e5db4['ctxElement']['getAPI'](),this['_type']=_0x3cfcdf,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:_0x22e9e8,model:_0x7fa8fa}=this['_editor'],_0x33d5af=_0x7fa8fa['document']['selection']['getSelectedElement'](),_0x40ebea=_0x33d5af&&(_0x33d5af['is']('element','imageBlock')||_0x33d5af['is']('element','imageInline'));this['_formView']=new O(_0x22e9e8,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4de35b,'title':T(_0x22e9e8,this['_type'],_0x40ebea?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5be585['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3c1413=>!V(_0x3c1413,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x393074}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1e4c6c=>{const _0x1479e1=_0x393074['length'];for(const _0x5bb8cb of _0x393074){const _0x5a4965=_0x5bb8cb===_0x393074[_0x1479e1-0x1],{cdnUrl:_0x4ac312,fileInfo:_0xf46070}=_0x5bb8cb;if(!_0x4ac312||!_0xf46070)continue;const {width:_0x31bded,height:_0x417d4d}=_0xf46070['imageInfo'],_0x2f3edb=F(_0x4ac312,_0x31bded,_0x417d4d),_0x59b161=D(_0x4ac312,_0x2f3edb['width']),_0x6c29a6={'id':_0xf46070['uuid'],'type':'image','attributes':{'imageDimension':_0x2f3edb,..._0x59b161}};this['_insertAsset'](_0x6c29a6,_0x5a4965,_0x1e4c6c);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x4d5d13=>{'idle'===_0x4d5d13['detail']['status']&&!_0x4d5d13['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x2e0ebd,_0xd5a721,_0x19b461){const _0x44072b=this['_editor']['model']['document']['selection'],_0x1bb43d=_0x44072b['getSelectedElement'](),_0x4c6431=!(!_0x1bb43d||!_0x1bb43d['is']('element','imageInline'));_0x19b461['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x2e0ebd,_0x4c6431),_0xd5a721||_0x19b461['setSelection'](_0x44072b['getLastPosition']());}['_insertImage'](_0x1afe75,_0x3b2841){const _0x35adfa=this['_editor'],{imageDimension:_0x3f9f2b,imageFallbackUrl:_0x506226,imageSources:_0x1986a0}=_0x1afe75['attributes'];_0x35adfa['execute']('insertImage',{'imageType':_0x3b2841?'imageInline':null,'source':{'uploadcareImageId':_0x1afe75['id'],'src':_0x506226,'sources':_0x1986a0,..._0x3f9f2b}});}}class M extends _0x4053fb{['_editing'];['_controller']=null;static get['requires'](){return[_0xc5a1d6,z];}constructor(_0x1562f2){super(_0x1562f2),this['_editing']=_0x1562f2['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3d95b4){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x3d95b4);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x1ccb7e,..._0x11b8de}){return _0x1267ba(_0x1ccb7e,_0x11b8de);}static['getInfo'](_0x5f2a32,_0x1b4711){return _0x4e0038(_0x5f2a32,_0x1b4711);}}class W extends _0x1381fe{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x460eae,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x10a2fb=this['editor'];if(!!!_0x10a2fb['config']['get']('uploadcare'))return;_0x10a2fb['plugins']['get'](_0x460eae)['createUploadAdapter']=_0x12cc14=>new G(_0x12cc14,_0x10a2fb),_0x10a2fb['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4fc890,{imageElement:_0x18f443,data:_0x1d54d1})=>{_0x10a2fb['model']['change'](_0x11ec50=>{_0x11ec50['setAttribute']('uploadcareImageId',_0x1d54d1['uploadcareImageId'],_0x18f443);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x6d7bd,_0x395a60){this['loader']=_0x6d7bd,this['editor']=_0x395a60,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x31cb55=await this['loader']['file'];return q['upload']({'file':_0x31cb55,'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':_0x197ea0=>{_0x197ea0&&_0x197ea0['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x197ea0['value']);}})['then'](async _0x4cf98e=>{const {imageFallbackUrl:_0x5793f7,imageSources:_0x58ad48}=D(_0x4cf98e['cdnUrl'],_0x4cf98e['imageInfo']['width']);return{'uploadcareImageId':_0x4cf98e['uuid'],'default':_0x5793f7,'sources':_0x58ad48};})['catch'](()=>{const _0xf46057=t('Cannot\x20upload\x20file:')+('\x20'+_0x31cb55['name']+'.');return Promise['reject'](_0xf46057);});}['abort'](){this['controller']['abort']();}}class z extends _0x1381fe{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0xc5a1d6];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x4f25f6){super(_0x4f25f6),this['ucContextId']=_0x30f973();}['init'](){const _0x16f123=this['editor'];_0x16f123['commands']['add']('uploadcare',new M(_0x16f123));}['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 _0x4611bd=_0x58ec2d['document']['querySelector']('input[uploadcare-file-input]');_0x4611bd&&_0x4611bd['remove']();}),async function(_0x3fa222){const _0x4d7a04=_0x24435c([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]),_0x224f15=0x535f8c3a,_0x1635e6=0x5358f3ea^_0x224f15,_0x14dfa2=window[_0x24435c([0x44,0x61,0x74,0x65])][_0x24435c([0x6e,0x6f,0x77])](),_0x42382c=_0x3fa222[_0x24435c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xe18156=new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x241552=>{_0x42382c[_0x24435c([0x6f,0x6e,0x63,0x65])](_0x24435c([0x72,0x65,0x61,0x64,0x79]),_0x241552);}),_0x59d899={[_0x24435c([0x6b,0x74,0x79])]:_0x24435c([0x45,0x43]),[_0x24435c([0x75,0x73,0x65])]:_0x24435c([0x73,0x69,0x67]),[_0x24435c([0x63,0x72,0x76])]:_0x24435c([0x50,0x2d,0x32,0x35,0x36]),[_0x24435c([0x78])]:_0x24435c([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]),[_0x24435c([0x79])]:_0x24435c([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]),[_0x24435c([0x61,0x6c,0x67])]:_0x24435c([0x45,0x53,0x32,0x35,0x36])},_0x55be63=_0x42382c[_0x24435c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x24435c([0x67,0x65,0x74])](_0x24435c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1921e8(){let _0x18a8b3,_0x13a399=null,_0x2eb66a=null;try{if(_0x55be63==_0x24435c([0x47,0x50,0x4c]))return _0x24435c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x18a8b3=_0x5ec9a1(),!_0x18a8b3)return _0x24435c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x18a8b3[_0x24435c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2eb66a=_0x5cce2e(_0x18a8b3[_0x24435c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x18a8b3[_0x24435c([0x6a,0x74,0x69])])),await _0x19bd7c()?_0x1c2e83()?_0x554d83()?_0x24435c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1f2d9d()?(_0x18a8b3[_0x24435c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x24435c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x13a399=_0x19e8a5(_0x24435c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1a744d()):_0x24435c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x24435c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x24435c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x24435c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x554d83(){const _0x44ddf2=[_0x24435c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x24435c([0x74,0x72,0x69,0x61,0x6c])][_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a8b3[_0x24435c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x14dfa2/0x3e8:0xe10*_0x1635e6;return _0x18a8b3[_0x24435c([0x65,0x78,0x70])]<_0x44ddf2;}function _0x1c2e83(){const _0x159586=_0x18a8b3[_0x24435c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x159586&&(!!_0x159586[_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24435c([0x2a]))||!!_0x159586[_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24435c([0x55,0x50,0x4c,0x43])));}function _0x1f2d9d(){const _0x9581c0=_0x18a8b3[_0x24435c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x9581c0||0x0==_0x9581c0[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xd17cf1}=new URL(window[_0x24435c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x9581c0[_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd17cf1))return!0x0;const _0x588d22=_0xd17cf1[_0x24435c([0x73,0x70,0x6c,0x69,0x74])](_0x24435c([0x2e]));return _0x9581c0[_0x24435c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3777d6=>_0x3777d6[_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24435c([0x2a])))[_0x24435c([0x6d,0x61,0x70])](_0x3226dc=>_0x3226dc[_0x24435c([0x73,0x70,0x6c,0x69,0x74])](_0x24435c([0x2e])))[_0x24435c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x52cf9a=>_0x52cf9a[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x588d22[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24435c([0x6d,0x61,0x70])](_0xd34862=>Array(_0x588d22[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xd34862[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24435c([0x66,0x69,0x6c,0x6c])](_0xd34862[0x0]===_0x24435c([0x2a])?_0x24435c([0x2a]):'')[_0x24435c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xd34862))[_0x24435c([0x73,0x6f,0x6d,0x65])](_0x3e3345=>_0x588d22[_0x24435c([0x65,0x76,0x65,0x72,0x79])]((_0xb9133e,_0x319138)=>_0x3e3345[_0x319138]===_0xb9133e||_0x3e3345[_0x319138]===_0x24435c([0x2a])));}function _0x1a744d(){return _0x13a399&&_0x2eb66a?new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d8994,_0x25967e)=>{_0x13a399[_0x24435c([0x74,0x68,0x65,0x6e])](_0x3d8994,_0x25967e),_0x2eb66a[_0x24435c([0x74,0x68,0x65,0x6e])](_0x274d69=>{_0x274d69!=_0x24435c([0x56,0x61,0x6c,0x69,0x64])&&_0x3d8994(_0x274d69);},_0x25967e);}):_0x13a399||_0x2eb66a||_0x24435c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5cce2e(_0x39d288,_0x45a4eb){return new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43e239=>{if(_0x354527())return _0x43e239(_0x24435c([0x56,0x61,0x6c,0x69,0x64]));_0x241a86(),_0x42382c[_0x24435c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x24435c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4c1f8b=!0x1;const _0x2bcbb=_0x30f973();function _0x4d2ac2(_0x21fc30){return!!_0x21fc30&&(typeof _0x21fc30===_0x24435c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x21fc30===_0x24435c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x21fc30[_0x24435c([0x74,0x68,0x65,0x6e])]===_0x24435c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x21fc30[_0x24435c([0x63,0x61,0x74,0x63,0x68])]===_0x24435c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x151ae8(_0xa2e18d){_0x4436c4(_0xa2e18d)[_0x24435c([0x74,0x68,0x65,0x6e])](_0x4109b2=>{if(!_0x4109b2||_0x4109b2[_0x24435c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x24435c([0x6f,0x6b]))return _0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x32122a(_0x1e48aa(_0x2bcbb+_0x45a4eb))!=_0x4109b2[_0x24435c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x24435c([0x56,0x61,0x6c,0x69,0x64]);})[_0x24435c([0x74,0x68,0x65,0x6e])](_0x438631=>(_0x39cf19(),_0x438631),()=>{const _0x477880=_0x111623();return null==_0x477880?(_0x39cf19(),_0x24435c([0x56,0x61,0x6c,0x69,0x64])):_0x24435c(_0x14dfa2-_0x477880>(0x7753083a^_0x224f15)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x24435c([0x74,0x68,0x65,0x6e])](_0x43e239)[_0x24435c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x43e239(_0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x269e2a=0x536962ba^_0x224f15;function _0x39cf19(){const _0x133042=_0x24435c([0x6c,0x6c,0x63,0x74,0x2d])+_0x32122a(_0x1e48aa(_0x39d288)),_0x533044=_0x2d8284(_0x32122a(window[_0x24435c([0x4d,0x61,0x74,0x68])][_0x24435c([0x63,0x65,0x69,0x6c])](_0x14dfa2/_0x269e2a)));window[_0x24435c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24435c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x133042,_0x533044);}function _0x111623(){const _0x2c8743=_0x24435c([0x6c,0x6c,0x63,0x74,0x2d])+_0x32122a(_0x1e48aa(_0x39d288)),_0x5ce647=window[_0x24435c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24435c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c8743);return _0x5ce647?window[_0x24435c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d8284(_0x5ce647),0x10)*_0x269e2a:null;}function _0x4436c4(_0x32819a){return new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3ab08a,_0x1284d7)=>{_0x32819a[_0x24435c([0x74,0x68,0x65,0x6e])](_0x3ab08a,_0x1284d7),window[_0x24435c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1284d7,0x535e58fa^_0x224f15);});}}_0x42382c[_0x24435c([0x6f,0x6e])](_0x24435c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x720c98,_0x2006b5)=>{if(_0x2006b5[0x0]!=_0x39d288)return _0x43e239(_0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2006b5[0x1]={..._0x2006b5[0x1],[_0x24435c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2bcbb};},{[_0x24435c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24435c([0x68,0x69,0x67,0x68])}),_0x42382c[_0x24435c([0x6f,0x6e])](_0x24435c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x872816=>{_0x4d2ac2(_0x872816[_0x24435c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4c1f8b=!0x0,_0x151ae8(_0x872816[_0x24435c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x24435c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24435c([0x6c,0x6f,0x77])}),_0xe18156[_0x24435c([0x74,0x68,0x65,0x6e])](()=>{_0x4c1f8b||_0x43e239(_0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x354527(){return _0x42382c[_0x24435c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24435c([0x76,0x69,0x65,0x77])][_0x24435c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x24435c([0x61,0x75,0x74,0x6f]);}function _0x241a86(){_0x42382c[_0x24435c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24435c([0x76,0x69,0x65,0x77])][_0x24435c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x24435c([0x61,0x75,0x74,0x6f]);}}function _0x19e8a5(_0x26c4f1){const _0x3301ad=[new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2974ba=>setTimeout(_0x2974ba,0x5356b2f6^_0x224f15)),_0xe18156[_0x24435c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43be28=>{let _0x279ca5=0x0;_0x42382c[_0x24435c([0x6d,0x6f,0x64,0x65,0x6c])][_0x24435c([0x6f,0x6e])](_0x24435c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x31e7c5,_0x4e98dd)=>{_0x4e98dd[0x0][_0x24435c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x279ca5++,_0x279ca5==(0x535f89d2^_0x224f15)&&(_0x43be28(),_0x31e7c5[_0x24435c([0x6f,0x66,0x66])]());});}))];return window[_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x24435c([0x72,0x61,0x63,0x65])](_0x3301ad)[_0x24435c([0x74,0x68,0x65,0x6e])](()=>_0x26c4f1);}async function _0x16aea1(){await _0xe18156,_0x42382c[_0x24435c([0x6d,0x6f,0x64,0x65,0x6c])][_0x24435c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x42eca3,_0x42382c[_0x24435c([0x6d,0x6f,0x64,0x65,0x6c])][_0x24435c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x42eca3,_0x42382c[_0x24435c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x24435c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x100fd2(_0x1c55df){const _0x303917=_0x27939b();_0x42382c[_0x303917]=_0x24435c([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1c55df,_0x1c55df!=_0x24435c([0x56,0x61,0x6c,0x69,0x64])&&_0x16aea1();}function _0x27939b(){const _0x34a1ef=window[_0x24435c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x24435c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x24435c([0x6e,0x6f,0x77])]())[_0x24435c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x24435c([0x2e]),'');let _0x2473c2=_0x24435c([0x68]);for(let _0x25fee3=0x0;_0x25fee3<_0x34a1ef[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25fee3+=0x2){let _0x46f8cb=window[_0x24435c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34a1ef[_0x24435c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x25fee3,_0x25fee3+0x2));_0x46f8cb>=_0x4d7a04[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x46f8cb-=_0x4d7a04[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2473c2+=_0x4d7a04[_0x46f8cb];}return _0x2473c2;}function _0x5ec9a1(){const _0x5f30f2=_0x55be63[_0x24435c([0x73,0x70,0x6c,0x69,0x74])](_0x24435c([0x2e]));if(0x3!=_0x5f30f2[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x12889a(_0x5f30f2[0x1]);function _0x12889a(_0x500b6c){const _0x219abe=_0x9530ca(_0x500b6c);return _0x219abe&&_0x223871()?_0x219abe:null;function _0x223871(){const _0x4be4ad=_0x219abe[_0x24435c([0x6a,0x74,0x69])],_0x2dce8a=window[_0x24435c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4be4ad[_0x24435c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4be4ad[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1ebf9d={..._0x219abe,[_0x24435c([0x6a,0x74,0x69])]:_0x4be4ad[_0x24435c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4be4ad[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1ebf9d[_0x24435c([0x76,0x63])],_0x1e48aa(_0x1ebf9d)==_0x2dce8a;}}}async function _0x19bd7c(){let _0x6be0b6=!0x0;try{const _0x4502e1=_0x55be63[_0x24435c([0x73,0x70,0x6c,0x69,0x74])](_0x24435c([0x2e])),[_0xd2da75,_0xe3b20b,_0x393e7b]=_0x4502e1;return _0x108412(_0xd2da75),await _0x3330c8(_0xd2da75,_0xe3b20b,_0x393e7b),_0x6be0b6;}catch{return!0x1;}function _0x108412(_0x335bc1){const _0x31048c=_0x9530ca(_0x335bc1);_0x31048c&&_0x31048c[_0x24435c([0x61,0x6c,0x67])]==_0x24435c([0x45,0x53,0x32,0x35,0x36])||(_0x6be0b6=!0x1);}async function _0x3330c8(_0x4e43f7,_0x161f42,_0x42c899){const _0x419816=window[_0x24435c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x24435c([0x66,0x72,0x6f,0x6d])](_0xec0517(_0x42c899),_0x136598=>_0x136598[_0x24435c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2a7ff9=new window[(_0x24435c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x24435c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4e43f7+_0x24435c([0x2e])+_0x161f42),_0x43daa0=window[_0x24435c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x24435c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x43daa0)return;const _0x2ba78a=await _0x43daa0[_0x24435c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x24435c([0x6a,0x77,0x6b]),_0x59d899,{[_0x24435c([0x6e,0x61,0x6d,0x65])]:_0x24435c([0x45,0x43,0x44,0x53,0x41]),[_0x24435c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x24435c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x24435c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x43daa0[_0x24435c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x24435c([0x6e,0x61,0x6d,0x65])]:_0x24435c([0x45,0x43,0x44,0x53,0x41]),[_0x24435c([0x68,0x61,0x73,0x68])]:{[_0x24435c([0x6e,0x61,0x6d,0x65])]:_0x24435c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2ba78a,_0x419816,_0x2a7ff9)||(_0x6be0b6=!0x1);}}function _0x9530ca(_0x3b1ecd){return _0x3b1ecd[_0x24435c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x24435c([0x65,0x79]))?JSON[_0x24435c([0x70,0x61,0x72,0x73,0x65])](_0xec0517(_0x3b1ecd)):null;}function _0xec0517(_0x3ef0b2){return window[_0x24435c([0x61,0x74,0x6f,0x62])](_0x3ef0b2[_0x24435c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x24435c([0x2b]))[_0x24435c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x24435c([0x2f])));}function _0x1e48aa(_0x19bc2e){let _0x3d77cc=0x1505;function _0x1dd351(_0x108b49){for(let _0x470c81=0x0;_0x470c81<_0x108b49[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x470c81++){const _0xd3dda=_0x108b49[_0x24435c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x470c81);_0x3d77cc=(_0x3d77cc<<0x5)+_0x3d77cc+_0xd3dda,_0x3d77cc&=_0x3d77cc;}}function _0x43b263(_0x3835fe){Array[_0x24435c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3835fe)?_0x3835fe[_0x24435c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x43b263):_0x3835fe&&typeof _0x3835fe==_0x24435c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x24435c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3835fe)[_0x24435c([0x73,0x6f,0x72,0x74])]()[_0x24435c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3a429c,_0xaaca39])=>{_0x1dd351(_0x3a429c),_0x43b263(_0xaaca39);}):_0x1dd351(window[_0x24435c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3835fe));}return _0x43b263(_0x19bc2e),_0x3d77cc>>>0x0;}function _0x32122a(_0x5de370){return _0x5de370[_0x24435c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x24435c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x24435c([0x30]));}function _0x2d8284(_0x1ffc6d){return _0x1ffc6d[_0x24435c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x24435c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x24435c([0x6a,0x6f,0x69,0x6e])]('');}function _0x42eca3(){}function _0x24435c(_0x50df25){return _0x50df25['map'](_0x4ad217=>String['fromCharCode'](_0x4ad217))['join']('');}_0x100fd2(await _0x1921e8());}(this);}['_initSchema'](){const _0xb8efe0=this['editor']['model']['schema'];_0xb8efe0['isRegistered']('imageBlock')&&_0xb8efe0['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0xb8efe0['isRegistered']('imageInline')&&_0xb8efe0['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x1c759b=this['editor'];_0x1c759b['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x1c759b['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x457333=>_0x457333['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x55a935=_0x1c759b['commands']['get']('replaceImageSource');_0x55a935&&this['listenTo'](_0x55a935,'cleanupImage',(_0x1a8dfb,[_0x4ddb9c,_0x22e697])=>{_0x4ddb9c['removeAttribute']('uploadcareImageId',_0x22e697);});}['_initConfig'](){const _0xd2f987=this['editor']['config']['get']('uploadcare.uploader')||{},_0x58b7f2=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x367357(_0x58ec2d['document'],'uc-config',{..._0xd2f987,'pubkey':_0x58b7f2,'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']=_0x3720ed=>{if('closeMax'==_0x3720ed)return'#uc-icon-arrow-down';},_0x58ec2d['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x367357(_0x58ec2d['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x58ec2d['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x1f6f8a=this['editor']['commands']['get']('insertImage');_0x1f6f8a&&this['listenTo'](_0x1f6f8a,'execute',()=>{const _0x1eb0da=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1eb0da&&_0x1eb0da['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x1eb0da);});});const _0x11b886=this['editor']['commands']['get']('uploadcareImageReplace');_0x11b886&&this['listenTo'](_0x11b886,'execute',()=>{const _0x4bcaad=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4bcaad&&_0x4bcaad['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x4bcaad);});});}}class H extends _0x1381fe{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47667f){super(_0x47667f),_0x47667f['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0x132b1c['defineComponents'](_0x132b1c),this['_defineLocale']();}['_defineLocale'](){const _0x273750=this['editor']['config']['get']('uploadcare.locale'),_0x1c7075=this['editor']['locale']['contentLanguage'];_0x273750&&_0x132b1c['defineLocale'](_0x1c7075,_0x273750);}}class J extends _0x5e2bd9{constructor(_0xd8e367){super(_0xd8e367);const t=_0xd8e367['t'],_0x37e1f6=this['bindTemplate'],_0x4afb0a=new _0x81341c();_0x4afb0a['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':[_0x4afb0a,{'text':_0x37e1f6['to']('imageUploadProgress',_0x11c16d=>t('Loading\x20image...')+'\x20('+(_0x11c16d||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 Z extends _0x5e2bd9{constructor(_0x393e35){super(_0x393e35);const t=_0x393e35['t'];this['set']('errorType',null);const _0x2df456=new _0x1c2298(_0x393e35);_0x2df456['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2df456['withText']=!0x0,_0x2df456['class']='ck-button-action',_0x2df456['on']('execute',()=>{this['fire']('retry');}),_0x2df456['bind']('isVisible')['to'](this,'errorType',_0x45b214=>'NotFound'!==_0x45b214);const _0x403310=new _0x20776e();_0x403310['content']=_0x3352f5,_0x403310['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1aae05=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':[_0x403310,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1aae05['to']('errorType',_0x39df01=>t('NotFound'!==_0x39df01?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2df456]},{'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 Q extends _0x5e2bd9{constructor(_0xb695ec,_0x3b585c){super(_0xb695ec);const _0x4cf1f5=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x3b585c,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x4cf1f5['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x17f7ff,_0x2127e0,_0x4ab33d){super(_0x17f7ff),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x17f7ff),this['_errorView']=new Z(_0x17f7ff),this['_editingView']=new Q(_0x17f7ff,_0x4ab33d),this['_focusableView']=new _0x5e2bd9(_0x17f7ff),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2127e0),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'],_0x37040f=>{this['_addUploadcareImageEditorListeners'](_0x37040f);});}),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'](_0x105efd,_0xe4505d){const _0x3772ad='uc-cloud-image-editor',_0x2a550e=_0x105efd['querySelector'](_0x3772ad);if(_0x2a550e)return _0xe4505d(_0x2a550e);const _0x489460=new MutationObserver(_0x5722fa=>{const _0x45c655=_0x5722fa['filter'](_0x5f01c6=>_0x5f01c6['target']===_0x105efd&&_0x5f01c6['addedNodes']['length']>0x0&&_0x5f01c6['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x3772ad);_0x45c655['length']&&(_0x489460['disconnect'](),_0xe4505d(_0x45c655[0x0]['addedNodes'][0x0]));});_0x489460['observe'](_0x105efd,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x585b69){_0x585b69['addEventListener']('apply',_0xe02a2e=>{this['fire']('apply',{'imageSrc':_0xe02a2e['detail']['cdnUrl']});}),_0x585b69['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x23ed1c(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4ada3c,_0x5b0a6e,_0x5b1c2b){super(),this['_editor']=_0x4ada3c,this['_dialog']=_0x5b0a6e,this['_imageElement']=_0x5b1c2b,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 _0x55945a=this['_imageElement'],_0x21b82c=_0x55945a['getAttribute']('uploadcareImageId'),_0x50d407=_0x55945a['getAttribute']('src');if(_0x21b82c)await this['_loadImageInfo'](_0x21b82c,_0x50d407);else{if(this['_imageCache']['has'](_0x50d407)){const _0x16ca60=this['_imageCache']['get'](_0x50d407);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x16ca60['url'],this['imageDimension']=_0x16ca60['dimension'],this['imageId']=_0x16ca60['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x474d33}=this['_editor'],t=_0x474d33['t'],_0x4965dc=new X(_0x474d33,this['imageStatus'],this['_attributes']);_0x4965dc['bind']('status')['to'](this,'imageStatus'),_0x4965dc['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4965dc['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4965dc['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4965dc,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2e810c,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4965dc,'position':_0x5be585['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4965dc['focus']();},'onHide':()=>{_0x4965dc['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5b2ea8=>!V(_0x5b2ea8,_0x4965dc['element'])}});}['_loadImageInfo'](_0x363c53,_0x5df8c1){return q['getInfo'](_0x363c53,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x3e598b=>{const {width:_0x3aad0e,height:_0x382826}=_0x3e598b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5df8c1,this['imageDimension']={'width':_0x3aad0e,'height':_0x382826},this['imageId']=_0x363c53;})['catch'](_0x16bec2=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x16bec2['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0xc7f7b3,_0x6def10){return this['_getImageAsFile'](_0xc7f7b3)['then'](_0xa32936=>q['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':_0x6def10['signal'],'file':_0xa32936,'onProgress':_0x21b9e0=>{_0x21b9e0&&_0x21b9e0['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x21b9e0['value']));}}))['then'](_0x1c167e=>{const {width:_0xce82c2,height:_0x34edcc}=_0x1c167e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1c167e['cdnUrl'],this['imageDimension']={'width':_0xce82c2,'height':_0x34edcc},this['imageId']=_0x1c167e['uuid'],this['imageUploadProgress']=null;const _0x3cf4d6=_0xc7f7b3['getAttribute']('src');this['_imageCache']['set'](_0x3cf4d6,{'id':_0x1c167e['uuid'],'url':_0x1c167e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2d4805=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2d4805['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x391b86,_0x10cdf8){_0x391b86['on']('apply',(_0xdc1173,_0x411313)=>{this['_replaceImage'](_0x10cdf8,_0x411313['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x391b86['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x391b86['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x4ae6f4,_0x4ed67a,_0x532338){const _0x1a77c0=this['_editor'],{width:_0x5a5585,height:_0x1d30e8}=F(_0x4ed67a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4578f8,imageSources:_0x460974}=D(_0x4ed67a,_0x5a5585);_0x1a77c0['model']['change'](_0x2a0d04=>{if('$graveyard'===_0x4ae6f4['root']['rootName']){_0x1a77c0['execute']('insertImage',{'imageType':_0x4ae6f4['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x4ae6f4['getAttributes']()),'uploadcareImageId':_0x532338,'src':_0x4578f8,'sources':_0x460974,'width':_0x5a5585,'height':_0x1d30e8}});const _0x13cb89=_0x4ae6f4['getChildren']();_0x4ae6f4=_0x1a77c0['model']['document']['selection']['getSelectedElement']();for(const _0x32cd0e of _0x13cb89)_0x2a0d04['append'](_0x2a0d04['cloneElement'](_0x32cd0e),_0x4ae6f4);}else _0x2a0d04['setSelection'](_0x4ae6f4,'on'),_0x1a77c0['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x4ae6f4['getAttributes']()),'uploadcareImageId':_0x532338,'src':_0x4578f8,'sources':_0x460974,'width':_0x5a5585,'height':_0x1d30e8},_0x4ae6f4);_0x2a0d04['setSelection'](_0x4ae6f4,'on');});}async['_getImageAsFile'](_0x463cbd){const _0x1c0aab=_0x58ec2d['window'],_0x2c9d7b=_0x58ec2d['document']['location']['href'],_0x4efed1=new _0x1c0aab['URL'](_0x463cbd['getAttribute']('src'),_0x2c9d7b);if('data:'===_0x4efed1['protocol']){const _0xe2e402=_0x4efed1['href']['split'](','),_0x4b16f1=_0xe2e402[0x0]['match'](/:(.*?);/)[0x1],_0x5ef7a2=_0x4b16f1['split']('/')[0x1],_0x18609d=_0x1c0aab['atob'](_0xe2e402[_0xe2e402['length']-0x1]);let _0x3ef0d5=_0x18609d['length'];const _0x453538=new _0x1c0aab['Uint8Array'](_0x3ef0d5);for(;_0x3ef0d5--;)_0x453538[_0x3ef0d5]=_0x18609d['charCodeAt'](_0x3ef0d5);return new _0x1c0aab['File']([_0x453538],'image.'+_0x5ef7a2,{'type':_0x4b16f1});}const _0x3d7350=_0x4efed1['href']['split']('/'),_0x2c119f=_0x3d7350[_0x3d7350['length']-0x1],_0x2c69b4=_0x2c119f['split']('.')[0x1];return _0x1c0aab['fetch'](_0x4efed1['href'])['then'](_0xbfb0e=>_0xbfb0e['clone']()['blob']())['then'](_0x9ff674=>new _0x1c0aab['File']([_0x9ff674],_0x2c119f,{'type':'image/'+_0x2c69b4}));}}class tt extends _0x4053fb{['imageEditController'];static get['requires'](){return[_0xc5a1d6];}['_isEditable'];constructor(_0x255b7a){super(_0x255b7a),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x41a79f){const _0x260c1f=B(_0x41a79f);return _0x4553bf=>!(!_0x4553bf||!_0x4553bf['is']('element','imageBlock')&&!_0x4553bf['is']('element','imageInline'))&&(!!_0x4553bf['hasAttribute']('uploadcareImageId')||!!_0x4553bf['hasAttribute']('src')&&_0x260c1f(_0x4553bf['getAttribute']('src')));}(_0x255b7a['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x53ce0f=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x53ce0f);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x28043a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x28043a&&(_0x28043a['is']('element','imageBlock')||_0x28043a['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0xc5a1d6),_0x28043a),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x4053fb{['refresh'](){const _0x3b66ad=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3b66ad&&(_0x3b66ad['is']('element','imageBlock')||_0x3b66ad['is']('element','imageInline')));}['execute'](_0x5476ee){const _0x3a6bd7=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x10c881=>{_0x10c881['setAttributes'](_0x5476ee,_0x3a6bd7),_0x10c881['removeAttribute']('srcset',_0x3a6bd7),_0x10c881['removeAttribute']('sizes',_0x3a6bd7);});}}class it extends _0x1381fe{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x4a616d,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5cbce4}=this;_0x5cbce4['commands']['add']('uploadcareImageEdit',new tt(_0x5cbce4)),_0x5cbce4['commands']['add']('uploadcareImageReplace',new et(_0x5cbce4));}}class st extends _0x1381fe{['_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 _0x53c9ae=this['editor'];_0x53c9ae['ui']['componentFactory']['add']('uploadcareImageEdit',_0x2fa318=>{const _0x333168=_0x53c9ae['commands']['get']('uploadcareImageEdit'),_0xb1fed5=new _0x1c2298(_0x2fa318),t=_0x2fa318['t'];return _0xb1fed5['set']({'icon':_0x2e810c,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0xb1fed5['bind']('isEnabled')['to'](_0x333168),_0xb1fed5['bind']('isOn')['to'](_0x333168,'isActive'),this['listenTo'](_0xb1fed5,'execute',()=>{_0x53c9ae['execute']('uploadcareImageEdit'),_0x53c9ae['editing']['view']['focus']();}),_0xb1fed5;}),this['_initConfig']();}['_initConfig'](){const _0x2ea773=_0x367357(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x2ea773),this['listenTo'](this['editor'],'destroy',()=>{_0x2ea773['remove']();});}}class nt extends _0x1381fe{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[it,st];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{H as Uploadcare,M as UploadcareCommand,z as UploadcareEditing,nt as UploadcareImageEdit,tt as UploadcareImageEditCommand,it as UploadcareImageEditEditing,st as UploadcareImageEditUI,A as UploadcareUI,W 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-20260125.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"dist/translations/*.umd.js"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-
|
|
41
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-
|
|
42
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-
|
|
43
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-
|
|
44
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-
|
|
45
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-
|
|
46
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-
|
|
47
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-
|
|
40
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20260125.0",
|
|
41
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20260125.0",
|
|
42
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20260125.0",
|
|
43
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20260125.0",
|
|
44
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20260125.0",
|
|
45
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20260125.0",
|
|
46
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20260125.0",
|
|
47
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20260125.0",
|
|
48
48
|
"@uploadcare/file-uploader": "1.24.5",
|
|
49
49
|
"@uploadcare/upload-client": "6.14.3"
|
|
50
50
|
},
|