Sid Gifari File Manager
🏠 Root
/
home2
/
meumer25
/
www
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
js
/
Editing: LicenseKey.96c51993.js
import{i as A,e as E,a as O,E as H,b as U}from"./index.317ad629.js";import{p as B}from"./popup.92105c51.js";import{u as M}from"./Wizard.2d82a982.js";import{C as N}from"./Index.2a391835.js";import{G as V,a as D}from"./Row.bb9acf3f.js";import{S as G}from"./Checkmark.762f711e.js";import{W as I,a as F,b as R}from"./Header.f7aecc8c.js";import{W as Y}from"./CloseAndExit.44cdfb74.js";import{_ as j}from"./Steps.ea5b309c.js";import"./translations.e71e2202.js";import{_ as q}from"./_plugin-vue_export-helper.eefbdd86.js";import{u as J}from"./ConnectStore.92e3ac21.js";import{u as X}from"./SetupWizardStore.d5fd9332.js";import{a as c,_ as t}from"./default-i18n.65d58dd6.js";import{c as _,l as s,a2 as a,a6 as i,o as d,_ as l,a7 as u,$ as h,a4 as f,F as Z,af as Q,a1 as S}from"./runtime-core.esm-bundler.ce5add0b.js";import"./helpers.633a054c.js";import"./params.af7ed354.js";import"./addons.a280be1f.js";import"./upperFirst.5dc701f8.js";import"./Close.ccd53ef3.js";import"./Logo.3715aad2.js";import"./Index.3a1576c6.js";import"./runtime-dom.esm-bundler.dc49ee3e.js";const o="all-in-one-seo-pack",$={setup(){const{getSelectedUpsellFeatures:e,strings:r}=M({stage:"license-key"});return{composableStrings:r,connectStore:J(),getSelectedUpsellFeatures:e,licenseStore:A(),optionsStore:E(),rootStore:O(),setupWizardStore:X()}},components:{CoreAlert:N,GridColumn:V,GridRow:D,SvgCheckmark:G,WizardBody:I,WizardCloseAndExit:Y,WizardContainer:F,WizardHeader:R,WizardSteps:j},data(){return{error:null,loading:!1,localLicenseKey:null,strings:H(this.composableStrings,{enterYourLicenseKey:c(t("Enter your %1$s License Key",o),"AIOSEO"),boldText:c("<strong>%1$s %2$s</strong>","AIOSEO","Lite"),purchasedBoldText:c("<strong>%1$s %2$s</strong>","AIOSEO","Pro"),linkText:c(t("upgrade to %1$s",o),"Pro"),placeholder:t("Paste your license key here",o),connect:t("Connect",o)})}},watch:{localLicenseKey(e){this.setupWizardStore.licenseKey=e}},computed:{noLicenseNeeded(){return c(t("You're using %1$s - no license needed. Enjoy!",o)+" 🙂",this.strings.boldText)},link(){return c('<strong><a href="%1$s" target="_blank">%2$s</a></strong>',U.getUpsellUrl("general-settings","license-box","liteUpgrade"),this.strings.linkText)},tooltipText(){return this.rootStore.isPro?t("To unlock the selected features, please enter your license key below.",o):c(t("To unlock the selected features, please %1$s and enter your license key below.",o),this.link)},alreadyPurchased(){return c(t("Already purchased? Simply enter your license key below to connect with %1$s!",o),this.strings.purchasedBoldText)}},methods:{processConnectOrActivate(){if(this.rootStore.isPro)return this.processActivateLicense();this.processGetConnectUrl()},processActivateLicense(){this.error=null,this.loading=!0,this.rootStore.loading=!0,this.licenseStore.activate(this.localLicenseKey).then(()=>{this.optionsStore.internalOptions.internal.license.expired=!1,this.setupWizardStore.saveWizard("license-key").then(()=>{this.$router.push(this.setupWizardStore.getNextLink)})}).catch(e=>{if(this.loading=!1,this.localLicenseKey=null,this.rootStore.loading=!1,!e||!e.response||!e.response.body||!e.response.body.error||!e.response.body.licenseData){this.error=t("An unknown error occurred, please try again later.",o);return}const r=e.response.body.licenseData;if(r.invalid){this.error=t("The license key provided is invalid. Please use a different key to continue receiving automatic updates.",o);return}if(r.disabled){this.error=t("The license key provided has been suspended. Please use a different key to continue receiving automatic updates. (Error Code AH12BGDT45D9)",o);return}if(r.domainDisabled){this.error=t("The license key provided cannot be used for this domain as it has been disabled. Please use a different key to continue receiving automatic updates, or contact our support team for more information. (Error Code RW94KXEO54I2)",o);return}if(r.expired){this.error=this.licenseKeyExpired;return}if(r.activationsError){this.error=t("This license key has reached the maximum number of activations. Please deactivate it from another site, or upgrade your license to continue receiving automatic updates. (Error Code ZL53IPPJ80RF)",o);return}(r.connectionError||r.requestError)&&(this.error=t("There was an error connecting to the licensing API. Please try again later.",o))})},processGetConnectUrl(){this.loading=!0,this.rootStore.loading=!0,this.connectStore.getConnectUrl({key:this.localLicenseKey,wizard:!0}).then(e=>{if(e.body.url){if(!e.body.popup)return this.loading=!1,this.rootStore.loading=!1,window.open(e.body.url);this.openPopup(e.body.url)}})},openPopup(e){B(e,"_self",600,630,!0,["file","token"],this.completedCallback,this.closedCallback)},completedCallback(e){return e.wizard=!0,this.connectStore.processConnect(e)},closedCallback(e){if(e)return window.location.reload();this.loading=!1,this.rootStore.loading=!1},skipStep(){this.setupWizardStore.saveWizard(),this.$router.push(this.setupWizardStore.getNextLink)}},mounted(){this.localLicenseKey=this.setupWizardStore.licenseKey}},ee={class:"aioseo-wizard-license-key"},te={class:"header"},oe=["innerHTML"],re={class:"license-cta-box"},ne=["innerHTML"],se=["innerHTML"],ie={class:"license-key"},ae=l("input",{type:"text",name:"username",autocomplete:"username",style:{display:"none"}},null,-1),ce={class:"go-back"},le=l("div",{class:"spacer"},null,-1);function de(e,r,ue,p,n,m){const b=i("wizard-header"),L=i("wizard-steps"),v=i("svg-checkmark"),w=i("grid-column"),z=i("grid-row"),x=i("base-input"),g=i("base-button"),C=i("core-alert"),k=i("router-link"),T=i("wizard-body"),P=i("wizard-close-and-exit"),W=i("wizard-container");return d(),_("div",ee,[s(b),s(W,null,{default:a(()=>[s(T,null,{footer:a(()=>[l("div",ce,[s(k,{to:p.setupWizardStore.getPrevLink,class:"no-underline"},{default:a(()=>[u("←")]),_:1},8,["to"]),u(" "),s(k,{to:p.setupWizardStore.getPrevLink},{default:a(()=>[u(h(n.strings.goBack),1)]),_:1},8,["to"])]),le,s(g,{type:"gray",onClick:m.skipStep},{default:a(()=>[u(h(n.strings.skipThisStep),1)]),_:1},8,["onClick"])]),default:a(()=>[s(L),l("div",te,h(n.strings.enterYourLicenseKey),1),p.rootStore.isPro?f("",!0):(d(),_("div",{key:0,class:"description",innerHTML:m.noLicenseNeeded},null,8,oe)),l("div",re,[l("div",{innerHTML:m.tooltipText},null,8,ne),s(z,null,{default:a(()=>[(d(!0),_(Z,null,Q(p.getSelectedUpsellFeatures,(y,K)=>(d(),S(w,{sm:"6",key:K},{default:a(()=>[s(v),u(" "+h(y.name),1)]),_:2},1024))),128))]),_:1})]),p.rootStore.isPro?f("",!0):(d(),_("div",{key:1,innerHTML:m.alreadyPurchased},null,8,se)),l("form",ie,[ae,s(x,{type:"password",placeholder:n.strings.placeholder,"append-icon":n.localLicenseKey?"circle-check":null,autocomplete:"new-password",modelValue:n.localLicenseKey,"onUpdate:modelValue":r[0]||(r[0]=y=>n.localLicenseKey=y)},null,8,["placeholder","append-icon","modelValue"]),s(g,{type:"green",disabled:!n.localLicenseKey,loading:n.loading,onClick:m.processConnectOrActivate},{default:a(()=>[u(h(n.strings.connect),1)]),_:1},8,["disabled","loading","onClick"])]),n.error?(d(),S(C,{key:2,class:"license-key-error",type:"red",innerHTML:n.error},null,8,["innerHTML"])):f("",!0)]),_:1}),s(P)]),_:1})])}const He=q($,[["render",de]]);export{He as default};
Save
Cancel