관리-도구
편집 파일: App.c699cb5e.js
import{n as Ne,v as p,o as a,c as S,C as d,l as c,x as A,t as m,a as u,k as _,b as g,G as Z,E as ue,K as jt,L as Wt,g as be,y as Co,M as Yt,Y as Po,h as Eo,H as kt,u as k,F as we,J as Ue,m as Ae,T as Ge,f as ke,D as xo,q as Se}from"./runtime-dom.esm-bundler.5c3c7d72.js";/* empty css */import{d as $t,e as J,b as Ee,h as nt,l as X,m as me,u as _e,B as $e,z as Zt,X as Re,Y as Ze,_ as To,k as Te,i as Ao,r as Xt,F as Lo,j as Jt,I as Io,x as Ke,J as Qt,y as Xe,o as Mo}from"./index.ae2b6956.js";import{a as Oo,C as Do,u as Bo}from"./LicenseKeyBar.e89a3a57.js";import{a as Le}from"./allowed.97bad57f.js";import{g as qe,r as ft}from"./params.af7ed354.js";import{C as Ce,a as Je,S as vt,f as bt,c as Qe,e as Ro,b as ze,d as it,h as Ho}from"./Caret.d9cc70ba.js";import{G as xe,P as Uo,F as Ko,d as Vo,S as Fo,O as No}from"./constants.24c44c43.js";import{C as Pe}from"./SettingsRow.9f92e269.js";import{B as zo}from"./Checkbox.6db0b9ed.js";import{G as Go,a as qo}from"./Row.df38a5f6.js";import"./translations.d159963e.js";import{_ as M}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as n,s as D}from"./default-i18n.20001971.js";import{u as jo}from"./Url.e2d414d9.js";import{C as De}from"./Tabs.b7a0989c.js";import{C as Ie}from"./Index.4b4d1967.js";import{u as wt}from"./MaxCounts.7c38e980.js";import{u as Ct}from"./Tags.36fc4b35.js";import{z as eo,A as to,t as oo,B as at,C as Wo,D as Yo,T as so,i as lt,E as ro}from"./helpers.979ce6ae.js";import{e as Oe}from"./regex.8a6101c0.js";import{C as fe}from"./Tooltip.73441134.js";import{S as Pt}from"./Ellipse.e3ae0692.js";import{S as je}from"./Eye.8dc261a7.js";import{d as ct}from"./debounce.d28a679a.js";import{V as $o,j as Zo}from"./helpers.c7282833.js";import{t as Ot}from"./toFinite.a7fa1cc6.js";import{u as Et}from"./TruSeoScore.9c887755.js";import{S as Xo}from"./Statistics.2cff8c0a.js";import{S as et,a as xt,g as dt,h as Jo,j as Qo,k as es,m as ts,n as os,o as ss,p as rs,q as ns,r as is,s as as,t as ls,u as cs,v as ds,w as us,x as ps,y as hs,z as gs,A as ms,C as _s,D as ys,e as fs,E as Ss,F as ks}from"./index.8c70464a.js";import{S as Tt}from"./Plus.426117bd.js";import{B as no}from"./RadioToggle.333e7750.js";import{C as vs}from"./GoogleSearchPreview.c38187f9.js";import{C as At}from"./HtmlTagsEditor.48d4a46c.js";import{T as bs}from"./Slide.39c07c03.js";import{C as ws}from"./ProBadge.751e0b85.js";import{u as Cs,p as Dt}from"./popup.a0c1a9c9.js";import{D as Bt}from"./datetime.f197aeae.js";import{l as He}from"./license.306f6adb.js";import{S as Ps,a as Es}from"./Mobile.ada2591a.js";import{u as xs,S as io}from"./Settings.9f4c4ffc.js";import{u as Ts}from"./vue3-apexcharts.57b6886c.js";import{_ as As}from"./ConnectCta.e7aee71e.js";import{C as tt}from"./Blur.edde4939.js";import{C as Lt}from"./Index.0e872043.js";import{G as St}from"./Graph.30801e76.js";import{u as ao}from"./WpTable.3bd76eb9.js";import{C as lo}from"./Table.dec4729d.js";import{R as co}from"./RequiredPlans.78e071b4.js";import{a as uo}from"./addons.2e54f461.js";import{u as Ls}from"./PostTypes.dafa8837.js";import{S as po}from"./External.3b8c2917.js";import{S as Is,a as Ms,b as Os}from"./InternalOutbound.8d129cbf.js";import{u as ho}from"./Image.6aea48d8.js";import{t as go}from"./Editor.cf7b5e9d.js";import{C as Ds}from"./FacebookPreview.eab372cf.js";import{C as mo}from"./ImageUploader.4861085d.js";import{C as Bs}from"./TwitterPreview.e775ca55.js";import{a as _o,S as Rs}from"./Build.b598c742.js";import{L as Hs}from"./Redirects.d05ac054.js";import{U as Us,S as Ks}from"./Upsell.ca03707b.js";var Vs=Math.floor,Fs=Math.random;function Ns(o,e){return o+Vs(Fs()*(e-o+1))}var zs=parseFloat,Gs=Math.min,qs=Math.random;function js(o,e,r){if(r&&typeof r!="boolean"&&$o(o,e,r)&&(e=r=void 0),r===void 0&&(typeof e=="boolean"?(r=e,e=void 0):typeof o=="boolean"&&(r=o,o=void 0)),o===void 0&&e===void 0?(o=0,e=1):(o=Ot(o),e===void 0?(e=o,o=0):e=Ot(e)),o>e){var t=o;o=e,e=t}if(r||o%1||e%1){var s=qs();return Gs(o+s*(e-o+zs("1e-"+((s+"").length-1))),e)}return Ns(o,e)}const ot=$t("TruSeoHighlighterStore",{state:()=>{var o,e;return{allowScrolling:!1,allowHighlighting:!0,dispatchAnnotations:((e=(o=window==null?void 0:window.wp)==null?void 0:o.data)==null?void 0:e.dispatch("core/annotations"))||null,enabled:!0,highlightAnalyzer:null,highlightMarks:[],highlightPopover:{},source:"aioseo-tru-seo-highlighter",wpBodyContentObserver:null}},getters:{highlightAnalysis(){var t,s;const e=((s=(t=J().currentPost)==null?void 0:t.page_analysis)==null?void 0:s.analysis)||{};return(Object.values(e).flat().find(i=>!!i[this.highlightAnalyzer])||{})[this.highlightAnalyzer]||{}},highlightAnalyzerHasError(){var o;return!!((o=this.highlightAnalysis)!=null&&o.error)},highlightSentences(){var e;let o=[];return Array.isArray((e=this.highlightAnalysis)==null?void 0:e.highlightSentences)&&(o=this.highlightAnalysis.highlightSentences.flat().map(r=>(r=r.replace(/&[a-zA-Z0-9#]{2,};$/,""),r=r.replace(/<br[^>]*>/gi,` `),r=eo(r),to(r))).filter(r=>!!r.trim())),o.length?o:null},activeMark(){return this.highlightMarks.length?this.highlightMarks.find(o=>o.active&&o.node):null}},actions:{clearHighlightPopover(){var o,e,r;(o=this.highlightPopover)!=null&&o.observer&&this.highlightPopover.observer.disconnect(),(e=this.highlightPopover)!=null&&e.node&&this.highlightPopover.node.remove(),(r=this.highlightPopover)!=null&&r.app&&this.highlightPopover.app.unmount(),this.highlightPopover={}},clearAnnotations(){var o,e;if(typeof((o=this.dispatchAnnotations)==null?void 0:o.__experimentalRemoveAnnotationsBySource)=="function"&&this.dispatchAnnotations.__experimentalRemoveAnnotationsBySource(this.source),typeof((e=window==null?void 0:window.tinymce)==null?void 0:e.editors)=="object")for(const r of window.tinymce.editors){const t=r.selection.win.getSelection(),s=Object.values(r.annotator.getAll(this.source)).flat();for(const i of Object.values(s))r.undoManager.ignore(()=>{t.selectAllChildren(i),t.setPosition(i,0),r.annotator.remove(this.source)})}this.highlightMarks=[]},clearAll(){this.clearHighlightPopover(),this.clearAnnotations()},sanitizeHighlightMarks(){this.highlightMarks=this.highlightMarks.filter(o=>!!o.node),this.highlightMarks.length&&!this.highlightMarks.find(o=>!!o.active)&&(this.highlightMarks[0].active=!0)},toggleHighlightAnalyzer(o){if(this.allowScrolling=!0,this.highlightAnalyzer===o)return this.highlightAnalyzer=null,!1;this.highlightAnalyzer=null,Ne().then(()=>{this.highlightAnalyzer=o})}}}),Rt="all-in-one-seo-pack",Ws=$t("SemrushStore",{state:()=>({results:[],error:null}),getters:{expired:()=>{const o=Ee();if(!o.internalOptions.integrations.semrush.expires)return!0;const e=Bt.now(),r=Bt.fromMillis(parseInt(o.internalOptions.integrations.semrush.expires*1e3,10));return e>=r},hasValidTokens:o=>{const e=Ee();return!o.expired&&!!e.internalOptions.integrations.semrush.accessToken&&!!e.internalOptions.integrations.semrush.refreshToken}},actions:{getKeyphrases(o){this.error=null;const e=J();return nt.post(X.restUrl("integration/semrush/keyphrases")).send({keyphrase:e.currentPost.keyphrases.focus.keyphrase,database:o}).then(r=>{if(r.body.keyphrases.status===403){this.error=r.body.keyphrases.error;return}this.results=r.body.keyphrases.data.rows}).catch(r=>{var t,s;if(!((s=(t=r==null?void 0:r.response)==null?void 0:t.body)!=null&&s.message)){this.error=n("An unknown error occurred, please try again later.",Rt);return}this.error=r.response.body.message})},authenticate(o){return this.error=null,nt.post(X.restUrl("integration/semrush/authenticate")).send({code:o}).then(e=>{const r=Ee();r.updateOption("internalOptions",{groups:["integrations"],key:"semrush",value:e.body.semrush},{root:!0}),r.internalOptions.integrations.semrush=e.body.semrush}).catch(e=>{var r,t;if(!((t=(r=e==null?void 0:e.response)==null?void 0:r.body)!=null&&t.message)){this.error=n("An unknown error occurred, please try again later.",Rt);return}this.error=e.response.body.message})},refresh(){return nt.post(X.restUrl("integration/semrush/refresh")).then(o=>{const e=Ee();e.updateOption("internalOptions",{groups:["integrations"],key:"semrush",value:o.body.semrush},{root:!0}),e.internalOptions.integrations.semrush=o.body.semrush})}}}),de="all-in-one-seo-pack",Ys={setup(){return{postEditorStore:J()}},components:{BaseCheckbox:zo,GridColumn:Go,GridRow:qo},data(){return{strings:{useDefaultSettings:n("Use Default Settings",de),robotsMeta:n("Robots meta:",de),maxSnippet:n("Max Snippet",de),maxVideoPreview:n("Max Video Preview",de),maxImagePreview:n("Max Image Preview",de),standard:n("Standard",de),none:n("None",de),large:n("Large",de),noindex:n("No Index",de),nofollow:n("No Follow",de),noarchive:n("No Archive",de),notranslate:n("No Translate",de),noimageindex:n("No Image Index",de),nosnippet:n("No Snippet",de),noodp:n("No ODP",de)}}},computed:{imagePreviewOptions(){return[{label:this.strings.none,value:"none"},{label:this.strings.standard,value:"standard"},{label:this.strings.large,value:"large"}]}},methods:{getImagePreview(o){return this.imagePreviewOptions.find(e=>e.value===o)},saveImagePreview(o){this.postEditorStore.currentPost.maxImagePreview=o,this.postEditorStore.isDirty=!0}}},$s={class:"aioseo-robots-meta"},Zs={key:0,class:"global-robots-settings aioseo-description"},Xs={class:"robots-meta-title"},Js={class:"global-robots-settings-options"},Qs={key:0,class:"aioseo-description max-snippet"},er={class:"aioseo-description max-video-preview"},tr={key:1,class:"aioseo-description max-image-preview"};function or(o,e,r,t,s,i){const h=p("base-toggle"),l=p("base-checkbox"),f=p("grid-column"),x=p("grid-row"),T=p("base-input"),P=p("base-select");return a(),S("div",$s,[d(h,{modelValue:t.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=C=>t.postEditorStore.currentPost.default=C),e[1]||(e[1]=C=>t.postEditorStore.isDirty=!0)]},{default:c(()=>[A(m(s.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),t.postEditorStore.currentPost.default?g("",!0):(a(),S("div",Zs,[u("span",Xs,m(s.strings.robotsMeta),1),d(x,{class:"settings"},{default:c(()=>[t.postEditorStore.currentPost.isHomePage?g("",!0):(a(),_(f,{key:0,xl:"3",md:"4",sm:"6"},{default:c(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=C=>t.postEditorStore.currentPost.noindex=C),e[3]||(e[3]=C=>t.postEditorStore.isDirty=!0)]},{default:c(()=>[A(m(s.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),d(f,{xl:"3",md:"4",sm:"6"},{default:c(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=C=>t.postEditorStore.currentPost.nofollow=C),e[5]||(e[5]=C=>t.postEditorStore.isDirty=!0)]},{default:c(()=>[A(m(s.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:c(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=C=>t.postEditorStore.currentPost.noarchive=C),e[7]||(e[7]=C=>t.postEditorStore.isDirty=!0)]},{default:c(()=>[A(m(s.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:c(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=C=>t.postEditorStore.currentPost.notranslate=C),e[9]||(e[9]=C=>t.postEditorStore.isDirty=!0)]},{default:c(()=>[A(m(s.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:c(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=C=>t.postEditorStore.currentPost.noimageindex=C),e[11]||(e[11]=C=>t.postEditorStore.isDirty=!0)]},{default:c(()=>[A(m(s.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:c(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=C=>t.postEditorStore.currentPost.nosnippet=C),e[13]||(e[13]=C=>t.postEditorStore.isDirty=!0)]},{default:c(()=>[A(m(s.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:c(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=C=>t.postEditorStore.currentPost.noodp=C),e[15]||(e[15]=C=>t.postEditorStore.isDirty=!0)]},{default:c(()=>[A(m(s.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),u("div",Js,[t.postEditorStore.currentPost.nosnippet?g("",!0):(a(),S("div",Qs,[u("span",null,m(s.strings.maxSnippet),1),d(T,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=C=>t.postEditorStore.currentPost.maxSnippet=C),e[17]||(e[17]=C=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),u("div",er,[u("span",null,m(s.strings.maxVideoPreview),1),d(T,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=C=>t.postEditorStore.currentPost.maxVideoPreview=C),e[19]||(e[19]=C=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),t.postEditorStore.currentPost.noimageindex?g("",!0):(a(),S("div",tr,[u("span",null,m(s.strings.maxImagePreview),1),d(P,{size:"medium",options:i.imagePreviewOptions,modelValue:i.getImagePreview(t.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=C=>i.saveImagePreview(C.value))},null,8,["options","modelValue"])]))])]))])}const sr=M(Ys,[["render",or]]),pe="all-in-one-seo-pack",rr={setup(){const{decodeUrl:o}=jo();return{licenseStore:me(),optionsStore:Ee(),postEditorStore:J(),rootStore:_e(),decodeUrl:o}},components:{CoreAlert:Ce,CoreSettingsRow:Pe,CoreSingleRobotsMeta:sr},props:{disabled:{type:Boolean,default(){return!1}},type:{type:String,required:!1},object:{type:Object,required:!1}},data(){return{strings:{pageName:n("Advanced",pe),robotsSetting:n("Robots Setting",pe),robotsToggle:n("Use Default Settings",pe),canonicalUrl:n("Canonical URL",pe),validUrl:n("Please enter a valid URL.",pe),placeholder:n("Enter a URL to change the default Canonical URL",pe),priorityScore:n("Priority Score",pe),priority:n("Priority",pe),frequency:n("Frequency",pe),priorityFrequencyUpsell:D(n("Priority Score is a %1$s feature. %2$s",pe),"PRO",X.getUpsellLink("post-advanced",xe.learnMore,"priority-frequency",!0)),keywords:n("Keywords",pe),tagPlaceholder:n("Press enter to create a keyword",pe)},error:!1}},computed:{getPriorityOptions(){return[{label:n("default",pe),value:"default"}].concat(Uo)},getFrequencyOptions(){return[{label:n("default",pe),value:"default"}].concat(Ko)}},methods:{getPriority(o){return o=o!=="default"?parseFloat(o):o,this.getPriorityOptions.find(e=>e.value===o)},savePriority(o){this.postEditorStore.currentPost.priority=o,this.postEditorStore.isDirty=!0},getFrequency(o){return this.getFrequencyOptions.find(e=>e.value===o)},saveFrequency(o){this.postEditorStore.currentPost.frequency=o,this.postEditorStore.isDirty=!0},inputEventDecodeUrl(o){const e=o.target.value;this.postEditorStore.currentPost.canonicalUrl="",this.postEditorStore.currentPost.canonicalUrl=this.decodeUrl(e)}}},nr={class:"aioseo-tab-content aioseo-post-advanced"},ir={class:"selectbox-row"},ar={class:"select"},lr=u("div",{class:"separator"},[u("span"),A(" - ")],-1),cr={class:"select"},dr=["innerHTML"];function ur(o,e,r,t,s,i){const h=p("core-single-robots-meta"),l=p("core-settings-row"),f=p("base-input"),x=p("core-alert"),T=p("base-select");return a(),S("div",nr,[d(l,{id:"aioseo-post-robots-setting",name:s.strings.robotsSetting,align:""},{content:c(()=>[d(h)]),_:1},8,["name"]),d(l,{id:"aioseo-post-canonical-url",name:s.strings.canonicalUrl,align:""},{content:c(()=>[d(f,{ref:"canonicalUrlInput",type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":[e[0]||(e[0]=P=>t.postEditorStore.currentPost.canonicalUrl=P),e[1]||(e[1]=P=>t.postEditorStore.isDirty=!0)],onInput:i.inputEventDecodeUrl},null,8,["placeholder","modelValue","onInput"]),s.error?(a(),_(x,{key:0,class:"cannonical-url-error",type:"red",size:"small"},{default:c(()=>[A(m(s.strings.validUrl),1)]),_:1})):g("",!0)]),_:1},8,["name"]),d(l,{name:s.strings.priorityScore,align:""},{content:c(()=>[u("div",ir,[u("div",ar,[u("span",null,m(s.strings.priority),1),d(T,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:i.getPriorityOptions,modelValue:t.licenseStore.isUnlicensed?i.getPriority("default"):i.getPriority(t.postEditorStore.currentPost.priority),"onUpdate:modelValue":e[2]||(e[2]=P=>t.licenseStore.isUnlicensed?null:i.savePriority(P.value))},null,8,["disabled","options","modelValue"])]),lr,u("div",cr,[u("span",null,m(s.strings.frequency),1),d(T,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:i.getFrequencyOptions,modelValue:t.licenseStore.isUnlicensed?i.getFrequency("default"):i.getFrequency(t.postEditorStore.currentPost.frequency),"onUpdate:modelValue":e[3]||(e[3]=P=>t.licenseStore.isUnlicensed?null:i.saveFrequency(P.value))},null,8,["disabled","options","modelValue"])])]),t.licenseStore.isUnlicensed?(a(),_(x,{key:0,class:"inline-upsell",type:"blue"},{default:c(()=>[u("div",{innerHTML:s.strings.priorityFrequencyUpsell},null,8,dr)]),_:1})):g("",!0)]),_:1},8,["name"]),t.optionsStore.options.searchAppearance.advanced.useKeywords?(a(),_(l,{key:0,name:s.strings.keywords,align:""},{content:c(()=>[d(T,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.keywords||[],modelValue:t.postEditorStore.currentPost.keywords||[],"onUpdate:modelValue":e[4]||(e[4]=P=>t.postEditorStore.currentPost.keywords=P),"tag-placeholder":s.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):g("",!0)])}const pr=M(rr,[["render",ur]]),hr={setup(){return{licenseStore:me(),rootStore:_e()}},components:{CoreApiBar:Oo,CoreLicenseKeyBar:Do}};function gr(o,e,r,t,s,i){const h=p("core-api-bar"),l=p("core-license-key-bar");return a(),S("div",null,[t.rootStore.pong?g("",!0):(a(),_(h,{key:0})),t.rootStore.isPro&&t.licenseStore.isUnlicensed&&t.rootStore.pong?(a(),_(l,{key:1})):g("",!0)])}const yo=M(hr,[["render",gr]]),mr={emits:["next","previous"],setup(){return{truSeoHighlighterStore:ot()}},components:{CoreTooltip:fe,SvgCaret:Je,SvgClose:vt,SvgEllipse:Pt,SvgEye:je},computed:{total(){return this.truSeoHighlighterStore.highlightMarks.length},error(){return this.truSeoHighlighterStore.highlightAnalyzerHasError},order(){return this.truSeoHighlighterStore.highlightMarks.findIndex(o=>o.active)+1},showSentence(){var o;return((o=this.truSeoHighlighterStore.activeMark)==null?void 0:o.sentence.length)&&this.truSeoHighlighterStore.activeMark.annotatorSelector==="block"},sentences(){const o=[];let e=1;return this.truSeoHighlighterStore.highlightMarks.forEach(r=>{r.node.isSameNode(this.truSeoHighlighterStore.activeMark.node)&&(o.push(`<strong>(${e})</strong> ${r.sentence}`),e++)}),oo(o.join(" "),1e3," [...]")}},methods:{close(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null)}}},_r=o=>(jt("data-v-aa3e0f58"),o=o(),Wt(),o),yr={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},fr={key:0,class:"tru-seo-highlight-popover__row tru-seo-highlight-popover__row--sentence"},Sr={class:"tru-seo-highlight-popover__sentence"},kr=["innerHTML"],vr={class:"tru-seo-highlight-popover__row tru-seo-highlight-popover__row--main"},br={class:"tru-seo-highlight-popover__count"},wr=_r(()=>u("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),Cr={class:"tru-seo-highlight-popover__nav"},Pr=["disabled"],Er=["disabled"],xr={class:"tru-seo-highlight-popover__close"};function Tr(o,e,r,t,s,i){const h=p("svg-eye"),l=p("core-tooltip"),f=p("svg-ellipse"),x=p("svg-caret"),T=p("svg-close");return a(),S("div",yr,[i.showSentence?(a(),S("div",fr,[u("div",Sr,[d(l,{offset:"120px,0"},{tooltip:c(()=>[u("span",{innerHTML:i.sentences},null,8,kr)]),default:c(()=>[d(h,{width:"16",height:"16"})]),_:1})])])):g("",!0),u("div",vr,[u("div",{class:Z(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":i.error}])},[d(f,{width:"8"})],2),u("div",br,[u("span",null,m(i.order)+"/"+m(i.total),1)]),wr,u("div",Cr,[u("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:i.order===1,onClick:e[0]||(e[0]=ue(P=>o.$emit("previous"),["stop","exact"]))},[d(x,{width:"20"})],8,Pr),u("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:i.order===i.total,onClick:e[1]||(e[1]=ue(P=>o.$emit("next"),["stop","exact"]))},[d(x,{width:"20"})],8,Er)]),u("div",xr,[u("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=ue((...P)=>i.close&&i.close(...P),["stop","exact"]))},[d(T,{width:"10"})],32)])])])}const Ar=M(mr,[["render",Tr],["__scopeId","data-v-aa3e0f58"]]),Lr=()=>{var O,R,ee,H;const o=be(null),e=be({}),r=$e(),t=Zt(),s=(R=(O=window==null?void 0:window.wp)==null?void 0:O.data)==null?void 0:R.select("core/block-editor"),i=(H=(ee=window==null?void 0:window.wp)==null?void 0:ee.data)==null?void 0:H.select("core/edit-post"),h=be(null),l=ot(),f=async(y,b="range")=>{var I,U,F,K,z,W;let w="content";(U=(I=y.block)==null?void 0:I.attributes)!=null&&U.caption?w="caption":(K=(F=y.block)==null?void 0:F.attributes)!=null&&K.value?w="value":(W=(z=y.block)==null?void 0:z.attributes)!=null&&W.citation&&(w="citation"),y.annotatorSelector=b;const L=b==="block"?{selector:b,source:l.source,blockClientId:y.block.clientId}:{selector:b,id:y.id,range:y.range,source:l.source,blockClientId:y.block.clientId,richTextIdentifier:w};return l.dispatchAnnotations.__experimentalAddAnnotation(L)},x=(y,b)=>{if(!b)return!1;!b.hasFocus()&&r&&b.focus();let w=b.selection.win.getSelection();w.selectAllChildren(y.parent);const L=w.toString().length;if(y.range.end<L)for(let I=y.range.end;I<L;I++)w.modify("extend","backward","character");if(0<y.range.start){w=Wo(w);for(let I=y.range.start;0<I;I--)w.modify("extend","forward","character")}b.undoManager.ignore(()=>{b.annotator.annotate(l.source,{uid:y.id})}),w.empty()},T=()=>{if(l.clearHighlightPopover(),l.sanitizeHighlightMarks(),!l.activeMark)return!1;const y=Po({name:"TruSeoHighlightPopover",render(){return Eo(Ar,{onNext(){Y(1)},onPrevious(){Y(-1)}})}}),b=Yo(),w=new ResizeObserver(ct(se,750)),L=v("wrapper");if(!L)return!1;L.parentElement.appendChild(b),y.mount(b),w.observe(v("wrapper"),{box:"border-box"}),l.highlightPopover.app=y,l.highlightPopover.node=b,l.highlightPopover.observer=w,se()},P=()=>{l.toggleHighlightAnalyzer(null),l.allowHighlighting=!1},C=({block:y,node:b})=>{var L,I,U,F;let w="";return b?w=b.outerText.replace(/\n\n/g,` `):y&&(w=((L=y==null?void 0:y.attributes)==null?void 0:L.content)||((I=y==null?void 0:y.attributes)==null?void 0:I.caption)||((U=y==null?void 0:y.attributes)==null?void 0:U.value)||((F=y==null?void 0:y.attributes)==null?void 0:F.citation)||"",y.name==="core/table"&&(w=(y==null?void 0:y.originalContent)||""),w=w.replace(/<br[^>]*>/gi,` `),w=to(w)),eo(w)},v=y=>{var b;if(y==="closest-relative")return at({element:v("wrapper").parentElement,property:"position",value:"relative"});if(y==="navigable")return at({element:v("wrapper").parentElement,property:"overflow-y",value:"auto"});if(t){if(y==="wrapper")return document.getElementById("content_ifr");if(y==="first-block")return((b=h.value.getBody())==null?void 0:b.firstElementChild)||{}}if(r){if(y==="wrapper")return document.querySelector(".editor-styles-wrapper");if(y==="first-block"){const w=s.getBlocks()[0];return document.getElementById(`block-${w==null?void 0:w.clientId}`)||{}}}},E=()=>{var y;for(const b of s.getBlocks()||[]){if(b.name==="core/freeform"){const w=window.tinymce.get(`editor-${b.clientId}`),L=((y=w.getBody())==null?void 0:y.children)||[];if(!L.length)continue;ye(w);for(const I of L)Q({block:b,node:I});continue}Q({block:b,node:null})}l.highlightMarks.forEach(async(b,w)=>{const L=w===l.highlightMarks.length-1;B(b.parent,L),b.block.name==="core/freeform"?x(b,window.tinymce.get(`editor-${b.block.clientId}`)):(await f(b),L&&setTimeout(()=>{var I;(I=l.highlightMarks.at(-1))==null||I.parent.classList.add("is-hovered")},100))})},q=()=>{var b;const y=((b=h.value.getBody())==null?void 0:b.children)||[];if(!y.length)return!1;ye(h.value);for(const w of y)Q({block:null,node:w});l.highlightMarks.forEach((w,L)=>{B(w.parent,L===l.highlightMarks.length-1),x(w,h.value)})},Y=y=>{const b=l.highlightMarks.findIndex(w=>w.active);if(!l.highlightMarks[b+y])return!1;l.allowScrolling=!0,l.highlightMarks[b].active=!1,l.highlightMarks[b+y].active=!0,T()},ie=y=>{var U,F;const b=()=>{y.preventDefault(),y.clipboardData.setData("text/html",window.getSelection().toString())},w=window.getSelection()||{};if(!(w!=null&&w.rangeCount))return!1;const L=((U=y.clipboardData)==null?void 0:U.getData("text/html"))||"";if(L&&L.indexOf(l.source)!==-1)return b(),!1;const I=w.getRangeAt(0)||{};for(const K of Object.values(((F=I==null?void 0:I.cloneContents())==null?void 0:F.children)||[]))if(Object.values((K==null?void 0:K.classList)||[]).some(z=>z.endsWith(l.source)))return b(),!1},ae=y=>{var U,F;const b=(K,z)=>{K.collapse(z.firstChild,z.firstChild.length),K.deleteFromDocument()};if(["Delete","Backspace"].indexOf(y.key)===-1)return!1;const w=window.getSelection()||null;if(!(w!=null&&w.toString()))return!1;const L=((U=w==null?void 0:w.anchorNode)==null?void 0:U.parentElement)||null,I=((F=w==null?void 0:w.anchorNode)==null?void 0:F.nextElementSibling)||null;Object.values((L==null?void 0:L.classList)||[]).some(K=>K.endsWith(l.source))?b(w,L):Object.values((I==null?void 0:I.classList)||[]).some(K=>K.endsWith(l.source))&&b(w,I)},oe=()=>{var b;o.value=new MutationObserver(w=>{let L=!1;for(const I of w)for(const U of(I==null?void 0:I.removedNodes)||[])(l.highlightMarks.some(F=>U.isEqualNode(F.parent))||Object.values((U==null?void 0:U.classList)||[]).some(F=>F.endsWith(l.source)))&&(L=!0);L&&ce()});const y=(b=v("first-block"))==null?void 0:b.parentElement;if(typeof y!="object")return!1;o.value.observe(y,{attributes:!1,childList:!0,subtree:!0})},B=(y,b=!1)=>{const w=(I,U)=>{var F,K;U.disconnect();for(const z of I){if((F=z==null?void 0:z.target)!=null&&F.classList.contains("is-hovered"))break;if(Object.values(((K=z==null?void 0:z.target)==null?void 0:K.classList)||[]).some(W=>W.endsWith(l.source))){V(z.target);continue}for(const W of(z==null?void 0:z.addedNodes)||[])if(Object.values((W==null?void 0:W.classList)||[]).some(rt=>rt.endsWith(l.source))){V(W);break}}b&&l.highlightMarks.forEach(async(z,W)=>{z.node||(B(z.parent),await f(z,"block")),W===l.highlightMarks.length-1&&(await Ne(),ct(T,250)())})};if(typeof(y==null?void 0:y.parentElement)!="object")return!1;new MutationObserver(w).observe(y,{attributes:!0,childList:!0,subtree:!0})},G=()=>{const y=b=>{var w,L,I;for(const U of b){if((U==null?void 0:U.type)!=="attributes")continue;if(!at({element:(w=v("wrapper"))==null?void 0:w.parentElement,property:"display",value:"none"}).isEqualNode(document.documentElement)||r&&(i.getEditorMode()!=="visual"||s.getBlockMode((L=s.getSelectedBlock())==null?void 0:L.clientId)==="html")||t&&(re(),((I=document.getElementById("content"))==null?void 0:I.nodeName)==="TEXTAREA"&&document.getElementById("content").style.display!=="none"))return P(),!1;l.allowHighlighting=!0}};l.wpBodyContentObserver=new MutationObserver(ct(y,250)),l.wpBodyContentObserver.observe(document.getElementById("wpbody-content"),{attributes:!0,childList:!1,subtree:!0})},ye=y=>{y.annotator.register(l.source,{persistent:!1,decorate:()=>({classes:["annotation-text",`annotation-text-${l.source}`]})})},se=(y=[])=>{var W;if(!l.activeMark||!l.highlightPopover.node)return!1;for(const rt of y)if(JSON.stringify(rt.contentRect)===JSON.stringify(e))return!1;y.length&&(e.value=((W=y[0])==null?void 0:W.contentRect)||e,l.allowScrolling=!1);const b=l.activeMark.node.getBoundingClientRect(),w=v("wrapper").getBoundingClientRect(),L=v("closest-relative").getBoundingClientRect(),I=v("first-block").getBoundingClientRect(),[U,F]=[140,32];let K=b.top,z=I.left-L.left;U<z?(l.highlightPopover.node.style.top=K-L.top+"px",l.highlightPopover.node.style.transform="translate(-105%, 0)",l.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(K=K-F-L.top,K=t?K+w.top:K,z=t?z+w.left:z,l.highlightPopover.node.style.top=K+"px",l.highlightPopover.node.style.transform="translate(0, 0)",l.highlightPopover.node.childNodes[0].dataset.arrowPlacement="bottomleft"),l.highlightPopover.node.style.left=z+"px",N()},ce=()=>{var y;window.removeEventListener("copy",ie),window.removeEventListener("keyup",ae),(y=o.value)==null||y.disconnect(),l.clearAll(),Ne().then(()=>{if(!l.highlightSentences)return l.toggleHighlightAnalyzer(null),!1;r&&E(),t&&q(),oe(),window.addEventListener("copy",ie),window.addEventListener("keyup",ae)})},N=()=>{Ne().then(()=>{var w,L,I,U;if(!l.allowScrolling)return!1;l.activeMark.node.scrollIntoView();let y=v("navigable"),b=y.scrollTop-60;t&&(b-=((L=(w=document.querySelector("#wp-content-editor-tools"))==null?void 0:w.getBoundingClientRect())==null?void 0:L.height)||0,b-=((U=(I=document.querySelector("#wp-content-editor-container .mce-toolbar-grp"))==null?void 0:I.getBoundingClientRect())==null?void 0:U.height)||0),y.isEqualNode(document.documentElement)&&(y=window),y.scrollTo({top:b}),l.allowScrolling=!1})},V=y=>{const b=[];l.highlightMarks.forEach((w,L)=>{if(y.hasAttribute("data-mce-annotation-uid")&&y.dataset.mceAnnotationUid.indexOf(w.id)!==-1){b.push(L);return}if(y.classList.contains(`is-annotated-by-${l.source}`)&&w.block.clientId===y.dataset.block){b.push(L);return}y.id.indexOf(w.id)!==-1&&b.push(L)}),b.length&&b.forEach(w=>{l.highlightMarks[w].node=y})},Q=({block:y,node:b})=>{const w=C({block:y,node:b});if(w)for(const[L,I]of Object.entries(l.highlightSentences||{})){const U=new RegExp(Oe(I),"g");let F;for(;(F=U.exec(w))!==null&&!l.highlightMarks.find(W=>W.sentenceIndex===L);){const K={start:F.index,end:F.index+F[0].length||1};l.highlightMarks.find(W=>b?(W.range.start===K.start||W.range.end===K.end)&&W.parent.isSameNode(b):(W.range.start===K.start||W.range.end===K.end)&&W.block.clientId===y.clientId)||l.highlightMarks.push({id:js(1,999999999),range:K,block:y,parent:b||document.getElementById(`block-${y.clientId}`),active:l.highlightMarks.length===0,sentenceIndex:L,sentence:I,node:null,annotatorSelector:null})}}if(y)for(const L of(y==null?void 0:y.innerBlocks)||[])Q({block:L,node:null})},re=()=>{if(h.value)return!1;const y=window.setInterval(()=>{var b;if(h.value=((b=window==null?void 0:window.tinymce)==null?void 0:b.get("content"))||null,!h.value)return!1;window.clearInterval(y),h.value.dom.addStyle(` span.annotation-text.annotation-text-${l.source} { background-color: #CCE0FF; color: inherit; display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; position: static; } `.trim())},500)},j=(y,b)=>{const w=JSON.stringify(y),L=JSON.stringify(b);w!==L&&ce()};return Co(()=>{var b;l.wpBodyContentObserver&&((b=l.wpBodyContentObserver)==null||b.disconnect());const y=window.setInterval(()=>{typeof v("wrapper")=="object"&&(window.clearInterval(y),G())},1e3)}),Yt(()=>{(Re()||!r&&!t)&&(l.enabled=!1),r&&(!l.dispatchAnnotations||!s||!i)&&(l.enabled=!1)}),{watchHighlightSentences:j}},Ir="all-in-one-seo-pack",Mr={emits:["selectedKeyphrase","deleted","saved"],setup(){return{keywordRankTrackerStore:Ze()}},components:{CoreTooltip:fe,SvgPencil:bt,SvgStatistics:Xo,SvgTrash:et},props:{index:{type:Number},keyphrase:{type:String},score:{type:Number}},data(){return{edit:!1,strings:{delete:n("Delete",Ir)}}},computed:{scoreClass(){return 79<this.score?"score-green":49<this.score?"score-orange":0<this.score?"score-red":"score-none"}},methods:{editKeyphraseEv(o){this.edit=!0,this.$emit("selectedKeyphrase",o)},deleteKeyphraseEv(o){this.edit=!1,this.$emit("deleted",o)},toggleKeyphrasesPanel(o){this.$emit("selectedKeyphrase",o)},closeEdit(o){var t;const e=(t=o.target)==null?void 0:t.value.trim(),r=this.index;e?(this.edit=!1,this.$emit("saved",{index:r,value:e})):this.deleteKeyphraseEv(r)},pressEnter(o){o.preventDefault(),o.target.blur(),this.edit=!1}}},Or={class:"aioseo-keyphrase-tag"},Dr={key:0,class:"aioseo-edit-keyphrase-tag"},Br=["value"];function Rr(o,e,r,t,s,i){const h=p("svg-pencil"),l=p("svg-statistics"),f=p("svg-trash"),x=p("core-tooltip");return a(),S("div",Or,[u("span",{class:Z(["aioseo-add-keyphrase-tag",s.edit?"hidden":""])},[u("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=T=>i.toggleKeyphrasesPanel(r.index))},m(r.keyphrase),1),u("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=T=>i.editKeyphraseEv(r.index))},[d(h)]),u("a",{href:"#",onClick:e[2]||(e[2]=ue(T=>t.keywordRankTrackerStore.toggleModal({modal:"modalOpenPostEdit",open:!0}),["prevent","exact"])),class:"btn-keyword-rank-tracker"},[d(l,{width:"20"})]),u("span",{class:Z(["keyphrase-score",i.scoreClass]),onClick:e[3]||(e[3]=T=>i.toggleKeyphrasesPanel(r.index))},m(r.score)+"/100",3)],2),s.edit?(a(),S("span",Dr,[u("input",{value:r.keyphrase,onBlur:e[4]||(e[4]=(...T)=>i.closeEdit&&i.closeEdit(...T)),onKeydown:e[5]||(e[5]=kt((...T)=>i.pressEnter&&i.pressEnter(...T),["enter"]))},null,40,Br),u("span",{class:"keyphrase-delete",onClick:e[6]||(e[6]=T=>i.deleteKeyphraseEv(r.index))},[d(x,{type:"action"},{tooltip:c(()=>[A(m(s.strings.delete),1)]),default:c(()=>[d(f)]),_:1})])])):g("",!0)])}const fo=M(Mr,[["render",Rr]]),Hr={},Ur={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"},Kr=u("path",{d:"M8.0018 8.57162C8.78938 8.57162 9.45817 8.29596 10.0082 7.74465C10.5582 7.19335 10.8332 6.5239 10.8332 5.73632C10.8332 4.94874 10.5575 4.27995 10.0062 3.72995C9.4549 3.17995 8.78546 2.90495 7.99787 2.90495C7.21029 2.90495 6.5415 3.1806 5.9915 3.73191C5.4415 4.28322 5.1665 4.95266 5.1665 5.74025C5.1665 6.52783 5.44216 7.19661 5.99347 7.74661C6.54477 8.29662 7.21422 8.57162 8.0018 8.57162ZM7.99592 7.60495C7.47631 7.60495 7.03595 7.42309 6.67484 7.05937C6.31373 6.69563 6.13317 6.25396 6.13317 5.73436C6.13317 5.21475 6.31503 4.77439 6.67875 4.41328C7.04249 4.05217 7.48415 3.87161 8.00375 3.87161C8.52337 3.87161 8.96373 4.05348 9.32484 4.4172C9.68595 4.78093 9.8665 5.2226 9.8665 5.7422C9.8665 6.26181 9.68464 6.70217 9.32092 7.06328C8.95719 7.42439 8.51552 7.60495 7.99592 7.60495ZM7.99984 10.7383C6.37762 10.7383 4.91095 10.2772 3.59984 9.35495C2.28873 8.43273 1.31095 7.22717 0.666504 5.73828C1.31095 4.24939 2.28873 3.04384 3.59984 2.12161C4.91095 1.19939 6.37762 0.738281 7.99984 0.738281C9.62206 0.738281 11.0887 1.19939 12.3998 2.12161C13.7109 3.04384 14.6887 4.24939 15.3332 5.73828C14.6887 7.22717 13.7109 8.43273 12.3998 9.35495C11.0887 10.2772 9.62206 10.7383 7.99984 10.7383Z",fill:"currentColor"},null,-1),Vr=[Kr];function Fr(o,e){return a(),S("svg",Ur,Vr)}const Nr=M(Hr,[["render",Fr]]),Ht="all-in-one-seo-pack",zr={setup(){return{truSeoHighlighterStore:ot()}},components:{CoreTooltip:fe,SvgEye:je,SvgEyeFilled:Nr},props:{analyzer:String},data(){return{strings:{highlightSections:n("Highlight sections in the Editor",Ht),highlightingIsDisabled:n("Highlighting is disabled for current view",Ht)}}},methods:{onClickBtnToggleHighlighter(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(this.analyzer)}}},Gr=["disabled"];function qr(o,e,r,t,s,i){const h=p("svg-eye"),l=p("core-tooltip"),f=p("svg-eye-filled");return t.truSeoHighlighterStore.enabled?(a(),S("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!t.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=ue(x=>i.onClickBtnToggleHighlighter(),["stop","exact"]))},[t.truSeoHighlighterStore.highlightAnalyzer!==r.analyzer?(a(),_(l,{key:0,offset:o.$root.$data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:c(()=>[A(m(t.truSeoHighlighterStore.allowHighlighting?s.strings.highlightSections:s.strings.highlightingIsDisabled),1)]),default:c(()=>[d(h,{width:"16",height:"16"})]),_:1},8,["offset"])):(a(),_(f,{key:1,width:"16",height:"16"}))],8,Gr)):g("",!0)}const jr=M(zr,[["render",qr]]),Wr={class:"aioseo-analysis-detail"},Yr={key:0,class:"detail detail--pl-0"},$r={key:0,class:"detail"},Zr={class:"title__text"},Xr={class:"description"},st={__name:"MetaboxAnalysisDetail",props:{analysisItems:{type:Object}},setup(o){const r={switchToVisualEditor:n("TruSEO cannot analyze the post while you are using the Code Editor. Please switch back to the Visual Editor to view your results.","all-in-one-seo-pack")},t=s=>{s.target.parentElement.classList.toggle("toggled")};return(s,i)=>(a(),S("ul",Wr,[k(To)()?(a(),S("li",Yr,[d(k(Ce),{type:"yellow"},{default:c(()=>[A(m(r.switchToVisualEditor),1)]),_:1})])):(a(!0),S(we,{key:1},Ue(o.analysisItems,(h,l)=>{var f;return a(),S(we,{key:l},[h.title?(a(),S("li",$r,[u("p",{class:Z(["title",h.error===0?"toggled":""])},[h.error===0?(a(),_(k(Qe),{key:0,width:"16"})):g("",!0),h.error===1?(a(),_(k(Ro),{key:1,width:"16"})):g("",!0),u("span",Zr,m(h.title),1),(f=h==null?void 0:h.highlightSentences)!=null&&f.length?(a(),_(k(jr),{key:2,analyzer:l},null,8,["analyzer"])):g("",!0),d(k(Je),{width:"16",role:"button",onClick:ue(t,["stop"])})],2),u("p",Xr,m(h.description),1)])):g("",!0)],64)}),128))]))}},Ve="all-in-one-seo-pack",Jr={setup(){return{licenseStore:me(),postEditorStore:J(),rootStore:_e(),optionsStore:Ee(),truSeo:new so}},components:{CoreAlert:Ce,CoreKeyphrase:fo,CoreLoader:ze,CoreTooltip:fe,SvgCirclePlus:Tt,metaboxAnalysisDetail:st},data(){return{selectedKeyphrase:0,strings:{additional:n("Additional Keyphrases",Ve),addKeyphrase:n("Add Additional Keyphrases",Ve),keyphraseDocumentation:n("Improve your SEO rankings with additional keyphrases.",Ve),upsell:D(n("Additional Keyphrases are a %1$s feature. %2$s",Ve),"PRO",X.getUpsellLink("post-settings",xe.learnMore,"additional-keywords",!0)),maxAmountReached:D(n("You have reached the maximum of %1$s additional keyphrases.",Ve),this.optionsStore.maxAdditionalKeyphrases)}}},watch:{"postEditorStore.currentPost.keyphrases.additional"(){this.postEditorStore.currentPost.keyphrases.additional&&!this.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&(this.selectedKeyphrase=0)}},methods:{onSelectedKeyphrase(o){this.selectedKeyphrase=o},onSaved(o){const{index:e,value:r}=o;this.postEditorStore.currentPost.keyphrases.additional[e].keyphrase=r,this.postEditorStore.currentPost.keyphrases.additional[e].score=0,this.postEditorStore.currentPost.loading.additional[e]=!0,this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}),this.selectedKeyphrase=e},onDeleted(o){const e=[...this.postEditorStore.currentPost.keyphrases.additional];e.splice(o,1),this.postEditorStore.currentPost.keyphrases.additional=null,setTimeout(()=>{this.postEditorStore.currentPost.keyphrases.additional=e,this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})},300)},addKeyphraseEv(){var t,s,i;if(this.optionsStore.maxAdditionalKeyphrases<=((s=(t=this.postEditorStore.currentPost.keyphrases)==null?void 0:t.additional)==null?void 0:s.length))return;const e=document.getElementsByClassName(`add-keyphrase-${this.$root.$data.screenContext}-input`)[0].querySelector(".medium"),r=e==null?void 0:e.value.trim();if(r){const h={keyphrase:r,score:0},l=this.postEditorStore.currentPost.keyphrases.additional.push(h),f=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.loading.additional[0]=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,(i=f[l])==null||i.click(),this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})}},pressEnter(o){const e=document.getElementById("add-additional-keyphrase");o.preventDefault(),e.click()},created(){this.postEditorStore.currentPost.keyphrases.forEach((o,e)=>{this.postEditorStore.currentPost.loading.additional[e]=!1})}}},Qr={class:"additional-keyphrases-panel"},en={key:0},tn={class:"analysis-wrapper"},on={class:"aioseo-description additional-keyphrases-description"},sn=["innerHTML"];function rn(o,e,r,t,s,i){var E,q,Y,ie,ae,oe;const h=p("core-keyphrase"),l=p("core-loader"),f=p("metaboxAnalysisDetail"),x=p("base-input"),T=p("svg-circle-plus"),P=p("base-button"),C=p("core-tooltip"),v=p("core-alert");return a(),S("div",Qr,[t.postEditorStore.currentPost.keyphrases.additional&&((q=(E=t.postEditorStore.currentPost.keyphrases)==null?void 0:E.additional)!=null&&q.length)&&t.rootStore.isPro&&t.licenseStore.license.isActive?(a(),S("div",en,[(a(!0),S(we,null,Ue(t.postEditorStore.currentPost.keyphrases.additional,(B,G)=>(a(),_(h,{key:G,index:G,keyphrase:B.keyphrase,score:B.score,onSaved:i.onSaved,onDeleted:i.onDeleted,onSelectedKeyphrase:i.onSelectedKeyphrase,class:Z(["aioseo-keyphrase-tag additional-keyphrase",s.selectedKeyphrase===G?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),u("div",tn,[t.postEditorStore.currentPost.loading.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].keyphrase?(a(),_(l,{key:0,class:"analysis-loading",dark:""})):g("",!0),!t.postEditorStore.currentPost.loading.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].keyphrase?(a(),_(f,{key:1,analysisItems:t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].analysis},null,8,["analysisItems"])):g("",!0)])])):g("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive?(a(),_(x,{key:1,size:"medium",class:Z(`add-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:kt(i.pressEnter,["enter"])},null,8,["class","onKeydown"])):g("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive&&t.optionsStore.maxAdditionalKeyphrases>((ie=(Y=t.postEditorStore.currentPost.keyphrases)==null?void 0:Y.additional)==null?void 0:ie.length)?(a(),_(P,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:i.addKeyphraseEv},{default:c(()=>[d(T,{width:"14",height:"14"}),A(" "+m(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):g("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive&&t.optionsStore.maxAdditionalKeyphrases<=((oe=(ae=t.postEditorStore.currentPost.keyphrases)==null?void 0:ae.additional)==null?void 0:oe.length)?(a(),_(C,{key:3},{tooltip:c(()=>[u("span",null,m(s.strings.maxAmountReached),1)]),default:c(()=>[d(P,{id:"add-additional-keyphrase",class:"add-keyphrase gray medium",disabled:!0,onClick:i.addKeyphraseEv},{default:c(()=>[d(T,{width:"14",height:"14"}),A(" "+m(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])]),_:1})):g("",!0),!t.rootStore.isPro||!t.licenseStore.license.isActive?(a(),S(we,{key:4},[u("div",on,m(s.strings.keyphraseDocumentation),1),d(v,{class:"inline-upsell",type:"blue"},{default:c(()=>[u("div",{innerHTML:s.strings.upsell},null,8,sn)]),_:1})],64)):g("",!0)])}const nn=M(Jr,[["render",rn],["__scopeId","data-v-e4d52c4e"]]),an=""+window.__aioseoDynamicImportPreload__("images/open-ai.eed9a73c.png"),le="all-in-one-seo-pack",ln={setup(){return{getAssetUrl:Zo,settingsStore:Te(),links:X}},components:{CoreModal:Ie},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:an,strings:{upgradeToPro:n("Unlock AI Generator",le),learnMoreLink:D('<a class="feature-link" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a> %3$s',X.getUpsellUrl("post-settings","general","open-ai"),n("Learn more about all the features",le),X.getUpsellLink("post-settings","","general",!0))}}},computed:{headerTitle(){return this.type==="title"?D(n("Generate New SEO %1$s",le),n("Title",le)):D(n("Generate New SEO %1$s",le),n("Description",le))},ctaHeaderTitle(){return this.type==="title"?D(n("Generating SEO %1$s is a Pro Feature",le),n("Titles",le)):D(n("Generating SEO %1$s is a Pro Feature",le),n("Descriptions",le))},ctaDescription(){return this.type==="title"?D(n("With our Pro version, you now have access to the powerful feature that generates SEO optimized %1$s with just a click of a button. Say goodbye to manual %2$s creation and hello to increased online visibility.",le),n("titles",le),n("title",le)):D(n("With our Pro version, you now have access to the powerful feature that generates SEO optimized %1$s with just a click of a button. Say goodbye to manual %2$s creation and hello to increased online visibility.",le),n("meta descriptions",le),n("description",le))}}},cn={class:"cta"},dn=["src"],un={class:"bottom"},pn={class:"title"},hn=["innerHTML"];function gn(o,e,r,t,s,i){const h=p("base-button"),l=p("core-modal");return a(),_(l,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=f=>t.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:c(()=>[A(m(i.headerTitle),1)]),body:c(()=>[u("div",cn,[u("img",{src:t.getAssetUrl(s.OpenAiImage),alt:"open-ai-upsell"},null,8,dn),u("div",un,[u("div",null,[u("p",pn,m(i.ctaHeaderTitle),1),u("p",null,m(i.ctaDescription),1)]),u("div",null,[d(h,{type:"green",size:"medium",tag:"a",href:t.links.getPricingUrl("post-settings","general","open-ai"),target:"_blank"},{default:c(()=>[A(m(s.strings.upgradeToPro),1)]),_:1},8,["href"]),u("span",{innerHTML:s.strings.learnMoreLink},null,8,hn)])])])]),_:1})}const mn=M(ln,[["render",gn]]),_n={},yn={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},fn=u("path",{d:"M2.23351 8.73334C1.73351 8.73334 1.31129 8.55996 0.966845 8.2132C0.622412 7.86644 0.450195 7.44537 0.450195 6.95C0.450195 6.45464 0.623579 6.03357 0.970345 5.6868C1.31709 5.34005 1.73815 5.16667 2.23351 5.16667V2.89999C2.23351 2.63332 2.33351 2.39999 2.53351 2.19999C2.73351 1.99999 2.96685 1.89999 3.23351 1.89999H6.21686C6.21686 1.39999 6.39024 0.977765 6.737 0.63332C7.08376 0.288876 7.50483 0.116653 8.0002 0.116653C8.49556 0.116653 8.91663 0.290037 9.2634 0.636803C9.61015 0.983559 9.78353 1.40462 9.78353 1.89999H12.7669C13.0335 1.89999 13.2669 1.99999 13.4669 2.19999C13.6669 2.39999 13.7669 2.63332 13.7669 2.89999V5.16667C14.2669 5.16667 14.6891 5.34005 15.0335 5.6868C15.378 6.03357 15.5502 6.45464 15.5502 6.95C15.5502 7.44537 15.3768 7.86644 15.0301 8.2132C14.6833 8.55996 14.2622 8.73334 13.7669 8.73334V12.2167C13.7669 12.4834 13.6669 12.7167 13.4669 12.9167C13.2669 13.1167 13.0335 13.2167 12.7669 13.2167H3.23351C2.96685 13.2167 2.73351 13.1167 2.53351 12.9167C2.33351 12.7167 2.23351 12.4834 2.23351 12.2167V8.73334ZM5.77731 7.01015C5.97615 7.01015 6.14416 6.94024 6.28136 6.80042C6.41856 6.66061 6.48716 6.48971 6.48716 6.28774C6.48716 6.08577 6.41726 5.91619 6.27745 5.77899C6.13762 5.64179 5.9683 5.57319 5.76946 5.57319C5.57063 5.57319 5.40104 5.64283 5.2607 5.78212C5.12036 5.92141 5.0502 6.09414 5.0502 6.3003C5.0502 6.49914 5.12167 6.66715 5.26463 6.80435C5.40758 6.94155 5.57848 7.01015 5.77731 7.01015ZM10.2309 7.01015C10.4298 7.01015 10.5994 6.94024 10.7397 6.80042C10.88 6.66061 10.9502 6.48971 10.9502 6.28774C10.9502 6.08577 10.8787 5.91619 10.7358 5.77899C10.5928 5.64179 10.4219 5.57319 10.2231 5.57319C10.0242 5.57319 9.85623 5.64283 9.71903 5.78212C9.58183 5.92141 9.51323 6.09414 9.51323 6.3003C9.51323 6.49914 9.58313 6.66715 9.72295 6.80435C9.86277 6.94155 10.0321 7.01015 10.2309 7.01015ZM5.30383 10.25H10.6966V9.14637H5.30383V10.25ZM3.55383 11.8964H12.4466V3.2203H3.55383V11.8964Z",fill:"currentColor"},null,-1),Sn=[fn];function kn(o,e){return a(),S("svg",yn,Sn)}const vn=M(_n,[["render",kn]]),bn="all-in-one-seo-pack",wn={setup(){return{settingsStore:Te()}},components:{AiModal:mn,CoreTooltip:fe,SvgAiRobot:vn},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:n("Use AI Generator",bn)}}}},Cn={class:"aioseo-ai-generator"};function Pn(o,e,r,t,s,i){const h=p("svg-ai-robot"),l=p("core-tooltip"),f=p("ai-modal");return a(),S("div",Cn,[d(l,{type:"action",offset:"-30px,0"},{tooltip:c(()=>[A(m(s.strings.useAiGenerator),1)]),default:c(()=>[u("button",{type:"button",onClick:e[1]||(e[1]=x=>t.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))},[d(h,{onClick:e[0]||(e[0]=x=>t.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))})])]),_:1}),d(f,{show:t.settingsStore.modals.aiGenerator===r.type,type:r.type},null,8,["show","type"])])}const En=M(wn,[["render",Pn]]),xn={setup(){const{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,strings:t}=Et();return{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,settingsStore:Te(),strings:t}},components:{CoreTooltip:fe,SvgCaret:Je,SvgCircleCheck:Qe,SvgCircleQuestionMark:xt,SvgEllipse:Pt,TransitionSlide:bs},props:{slug:{type:String,required:!0},headerText:String,focusScore:Number,trueSeoScore:Number,toggles:{type:Boolean,default(){return!0}},hideHeader:Boolean,noSlide:Boolean,saveToggleStatus:{type:Boolean,default(){return!0}}},watch:{"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(o){this.$root.$data.screenContext==="sidebar"&&this.openCard(o.card)}}},methods:{openCard(o){for(const e in this.settingsStore.settings.toggledCards)this.settingsStore.settings.toggledCards[e]&&this.settingsStore.toggleCard({slug:e});this.settingsStore.toggleCard({slug:o})}},created(){this.openCard(this.settingsStore.metaBoxTabs.mainSidebar.card)}},Tn={class:"aioseo-card aioseo-sidebar-card"},An={class:"text"},Ln={key:0,class:"content"},In={key:1,class:"content"};function Mn(o,e,r,t,s,i){const h=p("svg-ellipse"),l=p("svg-circle-check"),f=p("svg-circle-question-mark"),x=p("core-tooltip"),T=p("svg-caret"),P=p("transition-slide");return a(),S("div",Tn,[r.hideHeader?g("",!0):(a(),S("div",{key:0,class:"header",onClick:e[0]||(e[0]=C=>t.settingsStore.toggleCard({slug:r.slug,shouldSave:r.saveToggleStatus}))},[u("div",An,[Ae(o.$slots,"header",{},()=>[A(m(r.headerText),1)]),r.focusScore>=0?Ae(o.$slots,"alt",{key:0},()=>[r.focusScore!==null?(a(),S("span",{key:0,class:Z(["card-score",t.getScoreClass(r.focusScore)])},m(r.focusScore)+"/100 ",3)):g("",!0)]):g("",!0),r.trueSeoScore>=0?Ae(o.$slots,"alt",{key:1},()=>[u("span",{class:Z(["card-score",t.getErrorClass(r.trueSeoScore)])},[0<r.trueSeoScore?(a(),_(h,{key:0,width:"6"})):g("",!0),r.trueSeoScore===0?(a(),_(l,{key:1,width:"12"})):g("",!0),A(" "+m(t.getErrorDisplay(r.trueSeoScore)),1)],2)]):g("",!0),o.$slots.tooltip?(a(),_(x,{key:2},{tooltip:c(()=>[Ae(o.$slots,"tooltip")]),default:c(()=>[d(f)]),_:3})):g("",!0)]),r.toggles&&t.settingsStore.settings.toggledCards?(a(),_(T,{key:0,class:Z({rotated:!t.settingsStore.settings.toggledCards[r.slug]})},null,8,["class"])):g("",!0)])),t.settingsStore.settings.toggledCards||r.noSlide?(a(),_(P,{key:1,active:t.settingsStore.settings.toggledCards[r.slug]&&r.toggles||r.noSlide},{default:c(()=>[o.$slots["before-tabs"]?(a(),S("div",Ln,[Ae(o.$slots,"before-tabs")])):g("",!0),Ae(o.$slots,"tabs"),o.$slots.default?(a(),S("div",In,[Ae(o.$slots,"default")])):g("",!0)]),_:3},8,["active"])):g("",!0)])}const On=M(xn,[["render",Mn]]),Dn={props:{width:Number,height:Number,fillColor:String,strokeColor:String,strokeWidth:Number,data:Array},computed:{getViewBox(){return"0 0 "+this.width+" "+this.height},polylinePoints(){const o=Math.max(...this.data.map(s=>s.x)),e=Math.max(...this.data.map(s=>s.y)),r=this.height-this.strokeWidth,t=this.data.map(s=>{const i=s.x===0?0:s.x/o,h=s.y===0?0:s.y/e,l=i*this.width,f=r-h*r+this.strokeWidth;return`${l},${f}`}).join(" ");return`0,${r+this.strokeWidth} `+t+` ${this.width},${r+this.strokeWidth}`}}},Bn=["width","height","viewBox"],Rn=["fill","points"],Hn=["stroke","strokeWidth","points"];function Un(o,e,r,t,s,i){return a(),S("svg",{width:r.width,height:r.height,viewBox:i.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[u("polygon",{fill:r.fillColor,points:i.polylinePoints},null,8,Rn),u("polyline",{fill:"none",stroke:r.strokeColor,strokeWidth:r.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:i.polylinePoints},null,8,Hn)],8,Bn)}const Kn=M(Dn,[["render",Un]]),Vn={},Fn={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},Nn=u("path",{d:"M108.808 8.212c0-2.579-1.586-4.456-4.628-4.456h-9.826v13.37h3.227v-4.563h3.822l3.742 4.562h3.637v-.29l-3.637-4.351c2.288-.463 3.663-2.13 3.663-4.272zm-4.985 1.653h-6.229V6.533h6.229c1.15 0 1.891.608 1.891 1.666 0 1.084-.714 1.666-1.891 1.666zM157.593 3.756h-3.029v5.078h-8.133V3.756h-3.266v13.383h3.266v-5.277h8.133v5.277h3.029V3.756zM85.72 3.756l-3.598 11.253h-.198l-3.61-11.253H72.56v13.383h3.081V6.149h.185l3.597 10.99h4.96l3.61-10.99h.185v10.99h3.174V3.756h-5.634zM50.57 9.23c-1.138-.118-3.267-.317-4.404-.436-1.124-.119-1.772-.45-1.772-1.19 0-.714.687-1.31 3.464-1.31 2.46 0 4.721.53 6.692 1.482V4.787c-1.97-.939-4.153-1.402-6.864-1.402-3.808 0-6.44 1.587-6.44 4.285 0 2.275 1.547 3.518 4.642 3.861 1.124.12 3.028.291 4.364.397 1.454.12 1.878.569 1.878 1.23 0 .913-1.019 1.468-3.597 1.468-2.619 0-5.277-.86-7.168-2.063v3.081c1.521 1.019 4.14 1.878 7.062 1.878 4.152 0 6.824-1.6 6.824-4.47.026-2.168-1.402-3.478-4.682-3.821zM57.393 3.756v13.383h12.47V14.4h-9.389v-2.71h9.23V8.978h-9.23V6.493h9.39V3.756H57.392zM136.487 9.23c-1.138-.118-3.267-.317-4.404-.436-1.124-.119-1.772-.45-1.772-1.19 0-.714.688-1.31 3.465-1.31 2.459 0 4.721.53 6.691 1.482V4.787c-1.97-.939-4.152-1.402-6.863-1.402-3.809 0-6.44 1.587-6.44 4.285 0 2.275 1.547 3.518 4.641 3.861 1.124.12 3.029.291 4.364.397 1.455.12 1.878.569 1.878 1.23 0 .913-1.018 1.468-3.597 1.468-2.618 0-5.276-.86-7.167-2.063v3.081c1.52 1.019 4.139 1.878 7.061 1.878 4.153 0 6.824-1.6 6.824-4.47.027-2.168-1.402-3.478-4.681-3.821zM121.742 3.756v6.85c0 2.592-1.574 4.02-3.941 4.02-2.38 0-3.941-1.402-3.941-4.06v-6.81h-3.213v6.506c0 4.853 3.028 7.26 7.207 7.26 4.007 0 7.115-2.301 7.115-7.101V3.756h-3.227z",fill:"#020202"},null,-1),zn=u("path",{d:"M30.19 10.368c0 .648-.33.753-1.15.753-.872 0-1.031-.145-1.124-.806-.172-1.68-1.309-3.108-3.213-3.267-.608-.052-.754-.277-.754-1.031 0-.7.106-1.031.648-1.031 3.306.013 5.594 2.67 5.594 5.382zm4.814 0C35.004 5.329 31.593 0 23.711 0H8.054c-.318 0-.516.159-.516.45 0 .158.119.304.225.383.568.45 1.415.952 2.525 1.508 1.085.542 1.931.899 2.777 1.243.357.145.49.304.49.502 0 .278-.199.45-.582.45H.543c-.371 0-.543.238-.543.476 0 .198.066.37.238.542 1.005 1.058 2.618 2.328 4.96 3.796a71.557 71.557 0 006.611 3.636c.344.159.45.344.45.542-.013.225-.185.41-.582.41h-5.7c-.317 0-.502.172-.502.437 0 .145.119.33.278.476 1.295 1.177 3.372 2.46 6.136 3.636C15.579 20.061 19.32 21 23.526 21c7.974 0 11.478-5.964 11.478-10.632zm-10.407 7.445c-4.073 0-7.485-3.32-7.485-7.458 0-4.074 3.399-7.353 7.485-7.353 4.179 0 7.458 3.266 7.458 7.353-.013 4.139-3.28 7.458-7.458 7.458z",fill:"#FF642D"},null,-1),Gn=[Nn,zn];function qn(o,e){return a(),S("svg",Fn,Gn)}const jn=M(Vn,[["render",qn]]),$="all-in-one-seo-pack",Wn={setup(){return{connectStore:Cs(),licenseStore:me(),optionsStore:Ee(),postEditorStore:J(),rootStore:_e(),semrushStore:Ws(),truSeo:new so}},components:{CoreAlert:Ce,CoreKeyphrase:fo,CoreLoader:ze,CoreModal:Ie,CoreTooltip:fe,SvgAreaChart:Kn,SvgCircleCheck:Qe,SvgCirclePlus:Tt,SvgLogoSemrush:jn,SvgTrash:et,metaboxAnalysisDetail:st},data(){return{showSemrushTooltip:!1,loadingResults:!1,semrushShowModal:!1,addingAdditionalKeyphrase:!1,removingAdditionalKeyphrase:!1,semrushCountry:null,settingsStore:Te(),strings:{modalTitle:D(n("Additional Keyphrases by %1$s",$),"Semrush"),addKeyphrase:n("Add Focus Keyphrase",$),getAdditionalKeyphrases:n("Get Additional Keyphrases",$),showResultsFor:n("Show Results For:",$),keyphrase:n("Keyphrase",$),volume:n("Volume",$),trend:n("Trend",$),addAdditionalKeyphrase:n("Add Keyphrase",$),removeAdditionalKeyphrase:n("Remove Keyphrase",$),noResults:n("No results",$),upsell:D(n("Analyzing your content with %1$s keywords is only available to licensed %2$s users. %3$s",$),"Semrush","<strong>AIOSEO Pro</strong>",X.getUpsellLink("semrush-keywords",xe.learnMore,null,!0)),semrushGetAdditionalKeyphrases:D(n("%1$s integrates directly with %2$s to provide you with actionable keyphrases to help you write better content.",$),"AIOSEO","Semrush"),pleaseAddFocusKeyphrase:n("To use this feature, first add a focus keyphrase.",$),focusKeyphrase:n("Focus Keyphrase",$),delete:n("Delete",$),semrushTooltip:D(n("Get Additional Keyphrases with %1$s!",$),"Semrush"),semrushTooltipLicenseKey:D(n("%1$sA valid license key is required%2$s in order to connect with %3$s.",$),'<a href="'+this.rootStore.aioseo.urls.aio.settings+'">',"</a>","Semrush"),youHaveExceededSemrush:D(n("You have exceeded the number of requests allowed by your %1$s plan.",$),"Semrush"),inOrderToUpgradeSemrush:D(n("In order to continue searching for additional keyphrases, you'll need to upgrade. %1$s",$),X.getUpsellLink("semrush-pricing",xe.learnMore,"semrushPricing",!0)),maxAmountReached:D(n("You have reached the maximum of %1$s additional keyphrases.",$),this.optionsStore.maxAdditionalKeyphrases)}}},watch:{semrushCountry:{deep:!0,handler(){this.settingsStore.changeSemrushCountry(this.semrushCountry),this.getKeyphrases()}}},computed:{semrushError(){return this.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?n("You have exceeded the limit for requests. Please try again later.",$):n("An error occurred while fetching keyphrases. Please try again later.",$)}},methods:{semrushDatabase(){return JSON.parse(JSON.stringify(Vo)).map(e=>(e.value==="GB"&&(e.value="UK",e.label="United Kingdom"),e.value==="KR"&&(e.label="South Korea"),e)).filter(e=>Fo.includes(e.value.toLowerCase())).map(e=>(e.label=e.label+" - "+e.value.toUpperCase(),e))},getAdditionalKeyphrases(){if(this.showSemrushTooltip=!1,!this.connectStore.isConnected){this.openConnectPopup(this.rootStore.aioseo.urls.connect+"&semrush=true");return}if(!this.semrushStore.hasValidTokens){this.openPopup("https://oauth.semrush.com/auth/login?client_id=aioseo&redirect_uri=https%3A%2F%2Foauth.semrush.com%2Foauth2%2Faioseo%2Fsuccess&ref=2190331110&response_type=code&scope=user.id");return}this.openModal()},transformTrendDataToChartPoints(o){return o.split(",").map((r,t)=>({x:t,y:parseFloat(r)}))},openConnectPopup(o){Dt(o,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(o){Dt(o,"Semrush Oauth",450,570,!0,["code"],this.completedCallback,this.closedCallback,this.postMessageCallback)},async completedCallback(o){return this.semrushStore.authenticate(o.code)},completedConnectCallback(o){return this.connectStore.saveConnectToken(o.token)},openModal(){this.semrushShowModal=!0,!this.semrushStore.error&&this.getKeyphrases()},getKeyphrases(){var o,e,r;(r=(e=(o=this.postEditorStore.currentPost)==null?void 0:o.keyphrases)==null?void 0:e.focus)!=null&&r.keyphrase&&(this.loadingResults=!0,this.semrushStore.getKeyphrases(this.semrushCountry.value).then(()=>{this.loadingResults=!1}).catch(t=>{this.semrushShowModal=!1,this.loadingResults=!1,console.error(t.message)}))},closedCallback(o){o&&this.openModal()},closedConnectCallback(o){if(o){if(this.semrushStore.hasValidTokens){this.$nextTick(this.getAdditionalKeyphrases);return}this.showSemrushTooltip=!0}},async postMessageCallback(o,e,r){const{data:t,source:s,origin:i}=o;if(!(i!=="https://oauth.semrush.com"||e!==s)){if(t.type==="semrush:oauth:success"){window.removeEventListener("message",r,!1);let h={};try{const l=new URL(t.url);h=qe(l.search)}catch{}this.completedCallback(h).then(()=>{e.close(),e=null,this.closedCallback(!0)})}t.type==="semrush:oauth:denied"&&(e.close(),window.removeEventListener("message",r,!1),e=null,this.closedCallback())}},onSaved(o){const{value:e}=o;this.postEditorStore.currentPost.keyphrases.focus.keyphrase=e,this.postEditorStore.currentPost.loading.focus=!0,this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})},onDeleted(){this.postEditorStore.currentPost.keyphrases.focus.keyphrase="",this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})},addKeyphraseEv(){const e=document.getElementsByClassName(`add-focus-keyphrase-${this.$root.$data.screenContext}-input`)[0].querySelector(".medium"),r=e==null?void 0:e.value.trim();r&&(this.postEditorStore.currentPost.keyphrases.focus={keyphrase:r,score:0,analysis:{}},this.postEditorStore.currentPost.loading.focus=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}))},hasAdditionalKeyphrase(o){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.filter(r=>r.keyphrase.toLowerCase()===o).length},getAdditionalKeyphrase(o){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.find(r=>r.keyphrase.toLowerCase()===o)},scoreClass(o){return 79<o?"score-green":49<o?"score-orange":0<o?"score-red":"score-none"},async addAdditionalKeyphrase(o,e){var i,h;if(this.optionsStore.maxAdditionalKeyphrases<=((h=(i=this.postEditorStore.currentPost.keyphrases)==null?void 0:i.additional)==null?void 0:h.length))return;this.addingAdditionalKeyphrase=e;const{additional:r}=this.postEditorStore.currentPost.keyphrases,t=r.push({keyphrase:o,score:0}),s=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.keyphrases.additional=r,this.postEditorStore.isDirty=!0,await this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}),await this.$nextTick(),s[t]&&s[t].click(),this.addingAdditionalKeyphrase=!1},goToAdditionalKeyphrase(o){const{additional:e}=this.postEditorStore.currentPost.keyphrases,r=e.findIndex(t=>t.keyphrase.toLowerCase()===o);if(r!==-1){const t=document.getElementsByClassName("keyphrase-name");t[r+1]&&t[r+1].click(),this.semrushShowModal=!1}},removeAdditionalKeyphrase(o,e){this.removingAdditionalKeyphrase=e;const{additional:r}=this.postEditorStore.currentPost.keyphrases,t=r.findIndex(s=>s.keyphrase.toLowerCase()===o);if(t!==-1){r.splice(t,1),this.postEditorStore.currentPost.keyphrases.additional=r;const s=document.getElementsByClassName("keyphrase-name");s[0]&&s[0].click()}this.$nextTick(()=>{this.removingAdditionalKeyphrase=!1})},toggleDescriptionEv(o){o.target.parentElement.classList.toggle("toggled")},pressEnter(o){const e=document.getElementById("add-focus-keyphrase");o.preventDefault(),e.click()}},mounted(){var e;const o=[];this.optionsStore.internalOptions.integrations.semrush.accessToken&&this.semrushStore.expired&&o.push(this.semrushStore.refresh()),this.semrushCountry={value:this.settingsStore.settings.semrushCountry,label:(e=this.semrushDatabase().find(r=>r.value===this.settingsStore.settings.semrushCountry))==null?void 0:e.label}}},Yn={class:"aioseo-focus-keyphrase-panel"},$n={class:"disabled-button gray medium"},Zn={class:"disabled-button gray"},Xn=["innerHTML"],Jn={class:"aioseo-modal-content has-padding"},Qn={class:"aioseo-settings-row"},ei={class:"settings-name"},ti={class:"name"},oi={class:"results"},si={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},ri={class:"keyphrases-header"},ni={class:"keyphrase"},ii={class:"keyphrase-volume"},ai={class:"keyphrase-trend"},li={key:0,class:"keyphrase-actions"},ci={class:"keyphrases-rows"},di={class:"keyphrase"},ui={class:"keyphrase-volume"},pi={class:"keyphrase-trend"},hi={key:0,class:"keyphrase-actions"},gi={key:0,class:"focus-keyphrase"},mi={key:1},_i={key:2,class:"remove-keyphrase"},yi=["onClick"],fi={key:1,class:"keyphrase-row"},Si=["colspan"],ki={key:1},vi={class:"semrush-logo"},bi={class:"semrush-upsell"},wi=["innerHTML"],Ci=["innerHTML"];function Pi(o,e,r,t,s,i){const h=p("base-input"),l=p("svg-circle-plus"),f=p("base-button"),x=p("core-tooltip"),T=p("core-keyphrase"),P=p("core-loader"),C=p("metaboxAnalysisDetail"),v=p("core-alert"),E=p("base-select"),q=p("svg-area-chart"),Y=p("svg-circle-check"),ie=p("svg-trash"),ae=p("svg-logo-semrush"),oe=p("core-modal");return a(),S("div",Yn,[!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(a(),_(h,{key:0,size:"medium",class:Z(`add-focus-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:kt(i.pressEnter,["enter"])},null,8,["class","onKeydown"])):g("",!0),u("div",{class:Z(`add-focus-keyphrase-${o.$root.$data.screenContext}-button`)},[!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(a(),_(f,{key:0,id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:i.addKeyphraseEv},{default:c(()=>[d(l,{width:"14",height:"14"}),A(" "+m(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):g("",!0),!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(a(),_(x,{key:1},{tooltip:c(()=>[u("span",null,m(s.strings.semrushGetAdditionalKeyphrases)+" "+m(s.strings.pleaseAddFocusKeyphrase),1)]),default:c(()=>[u("div",$n,[d(l,{width:"14",height:"14"}),A(" "+m(s.strings.getAdditionalKeyphrases),1)])]),_:1})):g("",!0)],2),t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(a(),_(T,{key:1,index:0,keyphrase:t.postEditorStore.currentPost.keyphrases.focus.keyphrase,score:t.postEditorStore.currentPost.keyphrases.focus.score,onSaved:i.onSaved,onDeleted:i.onDeleted,class:"aioseo-keyphrase-tag"},null,8,["keyphrase","score","onSaved","onDeleted"])):g("",!0),t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus?(a(),_(P,{key:2,class:"analysis-loading",dark:""})):g("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(a(),_(C,{key:3,analysisItems:t.postEditorStore.currentPost.keyphrases.focus.analysis},null,8,["analysisItems"])):g("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase&&t.rootStore.isPro&&t.licenseStore.isUnlicensed?(a(),_(x,{key:4},{tooltip:c(()=>[u("span",{innerHTML:s.strings.semrushTooltipLicenseKey},null,8,Xn)]),default:c(()=>[u("div",Zn,[d(l,{width:"14",height:"14"}),A(" "+m(s.strings.getAdditionalKeyphrases),1)])]),_:1})):g("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase&&(!t.rootStore.isPro||!t.licenseStore.isUnlicensed)?(a(),_(x,{key:5,disabled:!s.showSemrushTooltip||t.rootStore.isPro,"force-show":s.showSemrushTooltip&&!t.rootStore.isPro},{tooltip:c(()=>[u("span",null,m(s.strings.semrushTooltip),1)]),default:c(()=>[d(f,{class:"add-keyphrase gray medium",onClick:i.getAdditionalKeyphrases},{default:c(()=>[d(l,{width:"14",height:"14"}),A(" "+m(s.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):g("",!0),d(oe,{show:s.semrushShowModal,onClose:e[1]||(e[1]=B=>s.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:c(()=>[A(m(s.strings.modalTitle),1)]),body:c(()=>[u("div",Jn,[t.licenseStore.isUnlicensed?(a(),_(v,{key:0,type:"blue",innerHTML:s.strings.upsell},null,8,["innerHTML"])):g("",!0),u("div",Qn,[u("div",ei,[u("div",ti,m(s.strings.showResultsFor),1)]),d(E,{class:"semrush-country-selector",size:"medium",options:i.semrushDatabase(),placeholder:s.strings.selectPriceIndicator,modelValue:s.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=B=>s.semrushCountry=B)},null,8,["options","placeholder","modelValue"])]),u("div",oi,[u("table",si,[u("thead",null,[u("tr",ri,[u("th",ni,m(s.strings.keyphrase),1),u("th",ii,m(s.strings.volume),1),u("th",ai,m(s.strings.trend),1),t.licenseStore.isUnlicensed?g("",!0):(a(),S("th",li))])]),u("tbody",ci,[t.semrushStore.results.length&&!s.loadingResults?(a(!0),S(we,{key:0},Ue(t.semrushStore.results,(B,G)=>{var ye,se,ce,N;return a(),S("tr",{class:Z(["keyphrase-row",{even:G%2===0}]),key:G},[u("td",di,m(B[0]),1),u("td",ui,m(B[1]),1),u("td",pi,[d(q,{width:66,height:24,data:i.transformTrendDataToChartPoints(B[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),t.licenseStore.isUnlicensed?g("",!0):(a(),S("td",hi,[B[0]===t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(a(),S("div",gi,[d(Y),A(" "+m(s.strings.focusKeyphrase),1)])):g("",!0),B[0]!==t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(a(),S("div",mi,[G!==s.removingAdditionalKeyphrase&&(G===s.addingAdditionalKeyphrase||!i.hasAdditionalKeyphrase(B[0]))&&t.optionsStore.maxAdditionalKeyphrases>((se=(ye=t.postEditorStore.currentPost.keyphrases)==null?void 0:ye.additional)==null?void 0:se.length)?(a(),_(f,{key:0,type:"gray",size:"medium",onClick:V=>i.addAdditionalKeyphrase(B[0],G),loading:G===s.addingAdditionalKeyphrase},{default:c(()=>[A(m(s.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):g("",!0),G!==s.removingAdditionalKeyphrase&&(G===s.addingAdditionalKeyphrase||!i.hasAdditionalKeyphrase(B[0]))&&t.optionsStore.maxAdditionalKeyphrases<=((N=(ce=t.postEditorStore.currentPost.keyphrases)==null?void 0:ce.additional)==null?void 0:N.length)?(a(),_(x,{key:1},{tooltip:c(()=>[u("span",null,m(s.strings.maxAmountReached),1)]),default:c(()=>[d(f,{type:"gray",size:"medium",disabled:!0,onClick:V=>i.addAdditionalKeyphrase(B[0],G),loading:G===s.addingAdditionalKeyphrase},{default:c(()=>[A(m(s.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])]),_:2},1024)):g("",!0),i.getAdditionalKeyphrase(B[0])&&G!==s.addingAdditionalKeyphrase&&(G===s.removingAdditionalKeyphrase||i.hasAdditionalKeyphrase(B[0]))?(a(),S("div",_i,[u("span",{class:Z(["keyphrase-score",i.scoreClass(i.getAdditionalKeyphrase(B[0]).score)]),onClick:V=>i.goToAdditionalKeyphrase(B[0])},m(i.getAdditionalKeyphrase(B[0]).score)+"/100",11,yi),d(x,{type:"action"},{tooltip:c(()=>[A(m(s.strings.delete),1)]),default:c(()=>[d(ie,{onClick:V=>i.removeAdditionalKeyphrase(B[0],G)},null,8,["onClick"])]),_:2},1024)])):g("",!0)])):g("",!0)]))],2)}),128)):g("",!0),!t.semrushStore.results.length||s.loadingResults?(a(),S("tr",fi,[u("td",{colspan:t.licenseStore.isUnlicensed?3:4,class:"no-results"},[u("div",null,[s.loadingResults?(a(),_(P,{key:0,dark:""})):g("",!0),!s.loadingResults&&!t.semrushStore.error?(a(),S("span",ki,m(s.strings.noResults),1)):g("",!0),t.semrushStore.error&&!t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(a(),_(v,{key:2,type:"red"},{default:c(()=>[A(m(i.semrushError),1)]),_:1})):g("",!0),t.semrushStore.error&&t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(a(),S(we,{key:3},[u("div",vi,[d(ae)]),u("div",bi,[u("span",null,[u("strong",{innerHTML:s.strings.youHaveExceededSemrush},null,8,wi)]),A(" "+m(" ")+" "),u("span",{innerHTML:s.strings.inOrderToUpgradeSemrush},null,8,Ci)])],64)):g("",!0)])],8,Si)])):g("",!0)])])])])]),_:1},8,["show"])])}const Ei=M(Wn,[["render",Pi]]),We="all-in-one-seo-pack",xi={setup(){const{getErrorClass:o,getErrorDisplay:e,strings:r}=Et();return{postEditorStore:J(),rootStore:_e(),getErrorClass:o,getErrorDisplay:e,strings:r}},components:{CoreAlert:Ce,CoreMainTabs:De,metaboxAnalysisDetail:st,SvgEllipse:Pt,SvgCircleCheck:Qe},data(){return{initTab:"basic",tabs:[{slug:"basic",name:n("Basic SEO",We)},{slug:"title",name:n("Title",We)},{slug:"readability",name:n("Readability",We)}]}},computed:{parseTabs(){return this.tabs.map(o=>(o.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[o.slug].errors,o))},pageBuilderAlert(){if(!$e()||!["elementor","divi"].includes(this.rootStore.aioseo.integration))return!1;const o=this.rootStore.aioseo.integration.charAt(0).toUpperCase()+this.rootStore.aioseo.integration.slice(1);return D(n("We have detected that you are currently using the %1$s Page Builder. Please click %2$shere%3$s to use the %1$s editor for a most accurate result.",We),o,'<a href="'+this.postEditorStore.currentPost.editlink+'">',"</a>")}},methods:{processChangeTab(o){this.initTab=o}}},Ti={class:"page-analysis-panel"},Ai=["innerHTML"];function Li(o,e,r,t,s,i){const h=p("core-alert"),l=p("svg-ellipse"),f=p("svg-circle-check"),x=p("core-main-tabs"),T=p("metaboxAnalysisDetail");return a(),S("div",Ti,[i.pageBuilderAlert?(a(),_(h,{key:0,type:"yellow"},{default:c(()=>[u("span",{innerHTML:i.pageBuilderAlert},null,8,Ai)]),_:1})):g("",!0),d(x,{tabs:i.parseTabs,showSaveButton:!1,active:s.initTab,internal:"",onChanged:e[0]||(e[0]=P=>i.processChangeTab(P))},{"after-label":c(({tab:P})=>[P.errorCount>=0?(a(),S("span",{key:0,class:Z(["tab-score",t.getErrorClass(t.postEditorStore.currentPost.page_analysis.analysis[P.slug].errors)])},[0<t.postEditorStore.currentPost.page_analysis.analysis[P.slug].errors?(a(),_(l,{key:0,width:"6"})):g("",!0),t.postEditorStore.currentPost.page_analysis.analysis[P.slug].errors===0?(a(),_(f,{key:1,width:"12"})):g("",!0),A(" "+m(t.getErrorDisplay(t.postEditorStore.currentPost.page_analysis.analysis[P.slug].errors)),1)],2)):g("",!0)]),_:1},8,["tabs","active"]),d(Ge,{mode:"out-in"},{default:c(()=>[t.postEditorStore.currentPost.page_analysis?(a(),_(T,{key:0,analysisItems:t.postEditorStore.currentPost.page_analysis.analysis[s.initTab]},null,8,["analysisItems"])):g("",!0)]),_:1})])}const Ii=M(xi,[["render",Li]]),Ye="all-in-one-seo-pack",Mi={emits:["changeTab"],setup(){return{licenseStore:me(),postEditorStore:J(),hasRequiredFeature:He.hasCoreFeature("general","cornerstone-content"),GLOBAL_STRINGS:xe,links:X}},components:{CoreAlert:Ce},data(){return{license:He,strings:{description:n("Cornerstone content refers to the most important and informative articles or pages on your website that serve as the foundation for your content strategy. AIOSEO uses cornerstone content for",Ye),linkingRecommendations:n("internal linking recommendations in Link Assistant.",Ye),upsell:D(n("Cornerstone Content is a %1$s feature. %2$s",Ye),"PRO",X.getUpsellLink("post-settings-general",xe.learnMore,"cornerstone-content",!0)),markAsCornerstone:n("Mark as Cornerstone",Ye)}}}},Oi={class:"cornerstone-content-panel"},Di={class:"cornerstone-content-text"},Bi=["innerHTML"],Ri=["innerHTML"];function Hi(o,e,r,t,s,i){const h=p("base-toggle"),l=p("core-alert");return a(),S("div",Oi,[u("p",Di,[u("span",null,m(s.strings.description),1),u("a",{href:"#",onClick:e[0]||(e[0]=ue(f=>o.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},m(s.strings.linkingRecommendations),1),u("span",{innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,Bi)]),d(h,{modelValue:t.postEditorStore.currentPost.pillar_content,"onUpdate:modelValue":[e[1]||(e[1]=f=>t.postEditorStore.currentPost.pillar_content=f),e[2]||(e[2]=f=>t.postEditorStore.isDirty=!0)],disabled:!t.hasRequiredFeature},{default:c(()=>[A(m(s.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),t.licenseStore.isUnlicensed||!t.hasRequiredFeature?(a(),_(l,{key:0,class:"inline-upsell",type:"blue"},{default:c(()=>[u("div",{innerHTML:s.strings.upsell},null,8,Ri)]),_:1})):g("",!0)])}const Ui=M(Mi,[["render",Hi]]),te="all-in-one-seo-pack",Ki={emits:["changeTab"],setup(){const{parseTags:o}=Ct({separator:void 0}),{maxRecommendedCount:e}=wt(),{watchHighlightSentences:r}=Lr(),{runAnalysis:t,strings:s}=Et();return{composableStrings:s,licenseStore:me(),maxRecommendedCount:e,optionsStore:Ee(),parseTags:o,postEditorStore:J(),rootStore:_e(),runAnalysis:t,seoPreviewStore:xs(),settingsStore:Te(),tagsStore:Ao(),truSeoHighlighterStore:ot(),watchHighlightSentences:r}},components:{AdditionalKeyphrases:nn,AiGenerator:En,BaseRadioToggle:no,CoreAlert:Ce,CoreGoogleSearchPreview:vs,CoreHtmlTagsEditor:At,CoreSettingsRow:Pe,CoreSidebarCard:On,CoreTooltip:fe,CoreProBadge:ws,FocusKeyphrase:Ei,MetaboxAnalysisDetail:st,PageAnalysis:Ii,CornerstoneContent:Ui,SvgCircleQuestionMark:xt,SvgDesktop:Ps,SvgMobile:Es,SvgPencil:bt},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{license:He,allowed:Le,isPageBuilderEditor:Re,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:Xt(this.composableStrings,{pageName:n("General",te),serpPreview:n("SERP Preview",te),serpPreviewDocumentation:n("SERP: Search Engine Results Page preview. Your site's potential appearance in Google search results. Final display may vary, but this preview closely resembles it.",te),editSnippet:n("Edit Snippet",te),clickToAddTitle:n("Click on the tags below to insert variables into your title.",te),metaDescription:n("Meta Description",te),clickToAddDescription:n("Click on the tags below to insert variables into your meta description.",te),cornerstoneContent:n("Cornerstone Content",te),focusKeyphrase:n("Focus Keyphrase",te),additionalKeyphrases:n("Additional Keyphrases",te),pageAnalysis:n("Page Analysis",te),basicSeo:n("Basic SEO",te),title:n("Title",te),readability:n("Readability",te),lookingForMetaKeywords:n("Looking for meta keywords?",te),goToAdvancedTab:n("Go to the Advanced tab to add/edit meta keywords",te),autogenerateDescriptionsAlert:D(n("Warning: You have disabled Autogenerate Descriptions and are using the default description format. %1$s will not output a description unless you enter a custom one. You can enable Autogenerate Descriptions under %2$s.",te),"AIOSEO",X.getPlainLink(n("Search Appearance > Advanced",te),this.rootStore.aioseo.urls.aio.searchAppearance+"#/advanced")),keyphraseDocumentation:D(n("Not sure what keyphrases are used for? Check out our documentation for more information. %1$s",te),X.getDocLink(xe.learnMore,"useKeyphrasesTooltip",!0))})}},watch:{"postEditorStore.currentPost.title"(){it(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){it(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"truSeoHighlighterStore.highlightSentences"(o,e){it(()=>this.watchHighlightSentences(o,e))}},computed:{title(){return D(n("%1$s Title",te),this.postEditorStore.currentPost.type)},toggled:function(){return this.postEditorStore.currentPost.pillar_content===1},displayTruSeoMetaboxCard(){return lt()&&this.$root.$data.screenContext==="metabox"&&this.postEditorStore.currentPost.context==="post"&&this.parentComponentContext!=="modal"&&Le("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return lt()&&this.$root.$data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&Le("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return lt()&&this.$root.$data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&Le("aioseo_page_analysis")&&!this.isForum},isForum(){return this.rootStore.aioseo.data.isBBPressActive&&(this.postEditorStore.currentPost.postType==="forum"||this.postEditorStore.currentPost.postType==="topic"||this.postEditorStore.currentPost.postType==="reply")},focusKeyphraseScore(){return this.postEditorStore.currentPost.keyphrases.focus.keyphrase?this.postEditorStore.currentPost.keyphrases.focus.score:null},showAutogenerateDescriptionsAlert(){return this.optionsStore.internalOptions.internal.deprecatedOptions.includes("autogenerateDescriptions")?(this.postEditorStore.currentPost.context==="post"?this.optionsStore.dynamicOptions.searchAppearance.postTypes[this.postEditorStore.currentPost.postType].metaDescription:this.optionsStore.dynamicOptions.searchAppearance.taxonomies[this.postEditorStore.currentPost.termType].metaDescription)===this.postEditorStore.currentPost.description&&!this.optionsStore.options.deprecated.searchAppearance.advanced.autogenerateDescriptions:!1}},methods:{hideKeywordsLooking(){this.optionsStore.options.searchAppearance.advanced.keywordsLooking=!1,this.optionsStore.saveChanges()},isMobilePreviewEv(o){this.postEditorStore.changeGeneralPreview(o)},editSnippetEv(){this.editSnippet=!this.editSnippet,this.settingsStore.changeTabSettings({setting:"modal",value:"general"}),this.postEditorStore.currentPost.modalOpen=!0},getDefaultTags(o){switch(o){case"title":return this.postEditorStore.currentPost.context==="post"?["post_title","separator_sa","site_title"]:["taxonomy_title","separator_sa","site_title"];case"description":return this.postEditorStore.currentPost.context==="post"?this.postEditorStore.currentPost.postType==="attachment"?["attachment_caption","separator_sa","site_title"]:this.postEditorStore.currentPost.postType==="product"?["post_excerpt","post_content"]:["post_excerpt","post_content","separator_sa"]:["taxonomy_title","separator_sa","taxonomy_description"]}},getFocusKeyphraseTooltipOffset(){return Lo()?"-15px,0":Re()?"35px,0":"0,0"}},mounted(){this.keyphrases=this.postEditorStore.currentPost.keyphrases,this.postEditorStore.currentPost.context==="post"&&!this.postEditorStore.currentPost.keyphrases.length&&(this.selectedKeyphrase=-1),window.aioseoBus.$on("updateTitleKey",()=>{this.titleKey="title"+Math.random(0,999)}),window.aioseoBus.$on("updateDescriptionKey",()=>{this.descriptionKey="description"+Math.random(0,999)})}},Vi={class:"aioseo-tab-content aioseo-post-general"},Fi=["innerHTML"],Ni=["innerHTML"],zi=["innerHTML"],Gi={key:0},qi=["innerHTML"],ji=["innerHTML"];function Wi(o,e,r,t,s,i){const h=p("svg-circle-question-mark"),l=p("core-tooltip"),f=p("svg-desktop"),x=p("svg-mobile"),T=p("base-radio-toggle"),P=p("core-google-search-preview"),C=p("svg-pencil"),v=p("base-button"),E=p("core-settings-row"),q=p("ai-generator"),Y=p("core-html-tags-editor"),ie=p("core-alert"),ae=p("core-pro-badge"),oe=p("cornerstone-content"),B=p("focus-keyphrase"),G=p("additional-keyphrases"),ye=p("page-analysis"),se=p("core-sidebar-card"),ce=p("metabox-analysis-detail");return a(),S("div",Vi,[s.allowed("aioseo_page_general_settings")?(a(),_(E,{key:0,class:"snippet-preview-row","no-right-max-width":""},{name:c(()=>[u("div",null,[u("span",null,m(s.strings.serpPreview),1),d(l,{offset:o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext==="metabox"?"10px,0":"50px,0",placement:"bottom"},{tooltip:c(()=>[A(m(s.strings.serpPreviewDocumentation),1)]),default:c(()=>[d(h)]),_:1},8,["offset"])]),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(a(),_(T,{key:0,modelValue:t.postEditorStore.currentPost.generalMobilePrev,"onUpdate:modelValue":i.isMobilePreviewEv,name:"previewGeneralIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:c(()=>[d(f)]),mobile:c(()=>[d(x)]),_:1},8,["modelValue","onUpdate:modelValue"])):g("",!0)]),content:c(()=>{var N,V,Q;return[d(P,{"focus-keyphrase":((Q=(V=(N=t.postEditorStore.currentPost)==null?void 0:N.keyphrases)==null?void 0:V.focus)==null?void 0:Q.keyphrase)??"",device:o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext==="metabox"||t.postEditorStore.currentPost.generalMobilePrev?"mobile":"desktop",url:t.tagsStore.liveTags.permalink,title:t.parseTags(t.postEditorStore.currentPost.title||t.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title"),description:t.parseTags(t.postEditorStore.currentPost.description||t.postEditorStore.currentPost.tags.description||"#post_content"),"rich-results":t.seoPreviewStore.richResults},null,8,["focus-keyphrase","device","url","title","description","rich-results"]),o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext!=="modal"?(a(),_(v,{key:0,class:"edit-snippet gray small",onClick:i.editSnippetEv},{default:c(()=>[d(C),A(" "+m(s.strings.editSnippet),1)]),_:1},8,["onClick"])):g("",!0)]}),_:1})):g("",!0),(o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal")&&s.allowed("aioseo_page_general_settings")?(a(),_(E,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:i.title,key:s.titleKey},{content:c(()=>[d(Y,{modelValue:t.postEditorStore.currentPost.title,"onUpdate:modelValue":[e[0]||(e[0]=N=>t.postEditorStore.currentPost.title=N),e[2]||(e[2]=N=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=N=>s.titleCount=N.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,defaultMenuOrientation:r.parentComponentContext==="modal"?"top":"bottom","default-tags":i.getDefaultTags("title")},{"tags-description":c(()=>[A(m(s.strings.clickToAddTitle),1)]),"append-button":c(()=>[t.postEditorStore.currentPost.postType&&t.postEditorStore.currentPost.postType!=="web-story"&&!s.isPageBuilderEditor()?(a(),_(q,{key:0,type:"title"})):g("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,60)},null,8,Fi)]),_:1},8,["name"])):g("",!0),(o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal")&&s.allowed("aioseo_page_general_settings")?(a(),_(E,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:s.strings.metaDescription,key:s.descriptionKey},{content:c(()=>[i.showAutogenerateDescriptionsAlert?(a(),_(ie,{key:0,type:"yellow"},{default:c(()=>[u("span",{innerHTML:s.strings.autogenerateDescriptionsAlert},null,8,Ni)]),_:1})):g("",!0),d(Y,{modelValue:t.postEditorStore.currentPost.description,"onUpdate:modelValue":[e[3]||(e[3]=N=>t.postEditorStore.currentPost.description=N),e[5]||(e[5]=N=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=N=>s.descriptionCount=N.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,defaultMenuOrientation:r.parentComponentContext==="modal"?"top":"bottom","default-tags":i.getDefaultTags("description")},{"tags-description":c(()=>[A(m(s.strings.clickToAddDescription),1)]),"append-button":c(()=>[t.postEditorStore.currentPost.postType&&t.postEditorStore.currentPost.postType!=="web-story"&&!s.isPageBuilderEditor()?(a(),_(q,{key:0,type:"description"})):g("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,160)},null,8,zi)]),_:1},8,["name"])):g("",!0),o.$root.$data.screenContext==="metabox"&&t.postEditorStore.currentPost.context==="post"&&!["attachment","web-story"].includes(t.postEditorStore.currentPost.postType)&&!s.isPageBuilderEditor()?(a(),_(E,{key:3,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:c(()=>[A(m(s.strings.cornerstoneContent)+" ",1),t.licenseStore.isUnlicensed?(a(),_(ae,{key:0})):g("",!0)]),content:c(()=>[d(oe,{onChangeTab:e[6]||(e[6]=N=>o.$emit("changeTab",N))})]),_:1})):g("",!0),i.displayTruSeoMetaboxCard?(a(),S(we,{key:4},[t.optionsStore.options.searchAppearance.advanced.useKeywords&&t.optionsStore.options.searchAppearance.advanced.keywordsLooking?(a(),S("div",Gi,[d(ie,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:i.hideKeywordsLooking},{default:c(()=>[A(m(s.strings.lookingForMetaKeywords)+" ",1),u("a",{href:"#",onClick:e[7]||(e[7]=ue(N=>o.$emit("changeTab","advanced"),["prevent"]))},m(s.strings.goToAdvancedTab),1),u("a",{class:"no-underline",href:"#",onClick:e[8]||(e[8]=ue(N=>o.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):g("",!0),d(E,{id:"aioseo-post-settings-snippet-focus-keyphrase-row",class:"snippet-focus-keyphrase-row",align:""},{name:c(()=>[u("span",null,m(s.strings.focusKeyphrase),1),d(l,{offset:"25px,0"},{tooltip:c(()=>[u("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,qi)]),default:c(()=>[d(h)]),_:1})]),content:c(()=>[d(B)]),_:1}),d(E,{name:s.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:c(()=>[d(G)]),_:1},8,["name"])],64)):g("",!0),i.displayTruSeoMetaboxCard&&t.postEditorStore.currentPost.page_analysis?(a(),_(E,{key:5,name:s.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:c(()=>[d(ye)]),_:1},8,["name"])):g("",!0),o.$root.$data.screenContext==="sidebar"&&!s.isPageBuilderEditor()&&r.parentComponentContext!=="modal"?(a(),_(se,{key:6,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":s.strings.cornerstoneContent},{default:c(()=>[d(oe,{onChangeTab:e[9]||(e[9]=N=>o.$emit("changeTab",N))})]),_:1},8,["header-text"])):g("",!0),i.displayTruSeoSidebarKeyphraseCard?(a(),_(se,{key:7,slug:"focus",focusScore:i.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:c(()=>[u("span",null,m(s.strings.focusKeyphrase),1),d(l,{offset:i.getFocusKeyphraseTooltipOffset()},{tooltip:c(()=>[u("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,ji)]),default:c(()=>[d(h)]),_:1},8,["offset"])]),default:c(()=>[d(B)]),_:1},8,["focusScore"])):g("",!0),i.displayTruSeoSidebarKeyphraseCard?(a(),_(se,{key:8,slug:"additional","header-text":s.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:c(()=>[d(G)]),_:1},8,["header-text"])):g("",!0),i.displayTruSeoSidebarAnalysisCard?(a(),_(se,{key:9,slug:"basicseo","header-text":s.strings.basicSeo,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:c(()=>[d(ce,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):g("",!0),i.displayTruSeoSidebarAnalysisCard?(a(),_(se,{key:10,slug:"title","header-text":s.strings.title,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:c(()=>[d(ce,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):g("",!0),i.displayTruSeoSidebarAnalysisCard?(a(),_(se,{key:11,slug:"readability","header-text":s.strings.readability,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:c(()=>[d(ce,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):g("",!0)])}const So=M(Ki,[["render",Wi]]),Yi={class:"post-title"},$i={key:1},Zi={key:1},Xi={key:0,class:"btn-view"},Ji=["href"],Ut="keyword-rank-tracker-keywords-table",Kt={__name:"KeywordsTable",props:{paginatedKeywords:Object,itemsPerPage:Number},setup(o){const e="all-in-one-seo-pack",r=Ze(),t=_e(),s={position:n("Position",e),openInKrt:n("Open in Keyword Rank Tracker",e)},i=[{label:xe.delete,value:"delete"},{label:s.addToGroup,value:"assignGroup"}],h=o,l=be(null),f=be([]),{orderBy:x,orderDir:T,pageNumber:P,processAdditionalFilters:C,processChangeItemsPerPage:v,processFilterTable:E,processPagination:q,processSearch:Y,processSort:ie,searchTerm:ae,wpTableKey:oe,wpTableLoading:B}=ao({fetchData:r.fetchKeywords,tableId:Ut,tableRef:l.value,resultsPerPage:h.itemsPerPage}),G=ke(()=>[{slug:"name",label:n("Keyword",e),sortable:1<h.paginatedKeywords.rows.length,sortDir:x.value==="name"?T.value:"asc",sorted:x.value==="name"},{slug:"position",label:n("Position",e),sortable:1<h.paginatedKeywords.rows.length,sortDir:x.value==="position"?T.value:"asc",sorted:x.value==="position",width:"100px"},{slug:"history",label:n("Position History",e),width:"150px"},{slug:"tracking",label:n("Tracking",e),width:"100px"},{slug:"view",label:"",width:"40px"}]),ye=(V,Q)=>{var j;let re=((j=V.statistics)==null?void 0:j[Q])??"";switch(Q){case"position":re=re!==""?Math.round(re).toFixed(0):re;break}return re},se=V=>{var Q;return(Q=V.statistics)!=null&&Q.history?[{name:s.position,data:V.statistics.history.map(re=>({x:re.date,y:re.position,label:re.position}))}]:[]},ce=V=>t.aioseo.urls.aio.searchStatistics+`&search=${encodeURIComponent(V.name)}&aioseo-scroll=keyword-rank-tracker-keywords-table#/keyword-rank-tracker`,N=async(V,Q)=>{f.value[Q]=!0;try{V.id?await r.deleteKeywords([V.id]):await r.insertKeywords({keywords:[V.name]}).then(()=>{V.tracking=!0}).catch(()=>{V.tracking=!1}),await r.fetchKeywords({rows:h.paginatedKeywords.rows}).then(()=>{r.maybeFetchStatistics({context:"keywords"})})}catch(re){console.error(re)}finally{f.value=[]}};return(V,Q)=>{const re=p("base-toggle");return a(),_(k(lo),{ref_key:"table",ref:l,id:Ut,"additional-filters":[],"bulk-options":i,columns:G.value,filters:[],"initial-items-per-page":100,"initial-page-number":k(P),"initial-search-term":k(ae),key:k(oe),loading:k(B),rows:o.paginatedKeywords.rows,"selected-filters":{},"show-bulk-actions":!1,"show-header":!1,"show-table-footer":!1,totals:{},"show-items-per-page":!1,"show-pagination":!1,onFilterTable:k(E),onPaginate:k(q),onProcessAdditionalFilters:k(C),onProcessBulkAction:j=>({}),onProcessChangeItemsPerPage:k(v),onSearch:k(Y),onSortColumn:k(ie)},{name:c(({row:j})=>[u("div",Yi,[u("b",null,m(j.name),1)])]),position:c(({row:j})=>[j.statistics===null?(a(),_(k(ze),{key:0,dark:""})):(a(),S("div",$i,m(ye(j,"position")),1))]),history:c(({row:j})=>[j.statistics===null?(a(),_(k(ze),{key:0,dark:""})):(a(),S("div",Zi,[se(j).length?(a(),_(k(St),{key:0,series:se(j),height:25,preset:"overview","chart-overrides":{tooltip:{y:{formatter:O=>parseFloat(O).toFixed(2)}}}},null,8,["series","chart-overrides"])):g("",!0)]))]),tracking:c(({row:j,index:O})=>[f.value[O]?(a(),_(k(ze),{key:0,dark:""})):g("",!0),d(re,{modelValue:j.tracking,"onUpdate:modelValue":[R=>j.tracking=R,R=>N(j,O,R)],disabled:!!f.value[O]},null,8,["modelValue","onUpdate:modelValue","disabled"])]),view:c(({row:j})=>[j.id?(a(),S("div",Xi,[u("a",{href:ce(j),target:"_blank"},[d(k(fe),{type:"action",offset:"-80px,0"},{tooltip:c(()=>[A(m(s.openInKrt),1)]),default:c(()=>[d(k(je))]),_:1})],8,Ji)])):g("",!0)]),_:1},8,["columns","initial-page-number","initial-search-term","loading","rows","onFilterTable","onPaginate","onProcessAdditionalFilters","onProcessChangeItemsPerPage","onSearch","onSortColumn"])}}},Qi={key:0,class:"keyword-rank-tracker-container"},ea=["innerHTML"],ta={class:"keyword-rank-tracker-container__card"},oa={class:"keyword-rank-tracker-container__card__header"},sa={class:"keyword-rank-tracker-container__card__body"},ra=["innerHTML"],na={class:"keyword-rank-tracker-container__card"},ia={class:"keyword-rank-tracker-container__card__header"},aa={class:"keyword-rank-tracker-container__card__body"},ut="320px",la={__name:"KeywordRankTracker",setup(o){xo(P=>({"580b842a":ut}));const e="all-in-one-seo-pack",r=Ze(),t=me(),s=_e(),i=Jt(),h=X.getDocLink(n("Learn More",e),"keywordRankTracker",!0),l={...Ts().strings,withAioseo:n("Below you can track how your page is performing in search results based on your keyword(s).",e),keywordPositions:n("Keyword Positions",e)},f=ke(()=>!t.isUnlicensed&&He.hasCoreFeature("search-statistics")&&(!i.isConnected||i.unverifiedSite)),x=ke(()=>({rows:r.keywords.all.rows.slice(0,3).map(P=>({...P,tracking:!0}))})),T=ke(()=>{var v;const P={};for(const E of x.value.rows)(v=E==null?void 0:E.statistics)!=null&&v.history&&(P[E.name]=E);const C=[];for(const E in P)C.push({name:E,data:P[E].statistics.history.map(q=>({x:q.date,y:q.position}))});return C});return(P,C)=>(a(),S("div",null,[k(i).shouldShowSampleReports?(a(),S("div",Qi,[u("div",null,[u("span",null,m(l.withAioseo),1),A(),u("span",{innerHTML:k(h)},null,8,ea)]),u("div",ta,[u("div",oa,m(l.keywordPositions),1),u("div",sa,[d(k(St),{height:parseInt(ut),series:T.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:v=>parseFloat(v).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),d(k(Kt),{"paginated-keywords":x.value},null,8,["paginated-keywords"])])):(a(),S(we,{key:1},[d(k(tt),{class:"keyword-rank-tracker-container"},{default:c(()=>[u("div",null,[u("span",null,m(l.withAioseo),1),A(),u("span",{innerHTML:k(h)},null,8,ra)]),u("div",na,[u("div",ia,m(l.keywordPositions),1),u("div",aa,[d(k(St),{height:parseInt(ut),series:T.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:v=>parseFloat(v).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),d(k(Kt),{"paginated-keywords":x.value},null,8,["paginated-keywords"])]),_:1}),f.value?(a(),_(k(As),{key:0})):(a(),_(k(Lt),{key:1,"cta-second-button-action":"",onCtaSecondButtonClick:k(i).showSampleReports,"cta-link":k(X).getPricingUrl("search-statistics","search-statistics-upsell","keyword-rank-tracker"),"button-text":l.ctaButtonText,"second-button-text":l.ctaSecondButtonText,"cta-second-button-new-badge":"","cta-second-button-visible":"","learn-more-link":k(X).getUpsellUrl("search-statistics","keyword-rank-tracker",k(s).isPro?"pricing":"liteUpgrade"),"feature-list":[l.feature1,l.feature2,l.feature3,l.feature4],"align-top":"","hide-bonus":!k(t).isUnlicensed},{"header-text":c(()=>[A(m(l.ctaHeader),1)]),description:c(()=>[d(k(co),{"core-feature":["search-statistics"]}),A(" "+m(l.ctaDescription),1)]),_:1},8,["onCtaSecondButtonClick","cta-link","button-text","second-button-text","learn-more-link","feature-list","hide-bonus"]))],64))]))}},Vt=M(la,[["__scopeId","data-v-6bf4070c"]]),ca={__name:"KeywordRankTracker",props:{modalOpen:Boolean},emits:["update:modalOpen"],setup(o,{emit:e}){const r="all-in-one-seo-pack",t=me(),s=Jt(),i=e,h={headerTitle:n("Keyword Performance Tracking",r)},l=ke(()=>s.isConnected&&!s.unverifiedSite);return(f,x)=>(a(),_(k(Ie),{show:o.modalOpen,onClose:x[0]||(x[0]=T=>i("update:modalOpen",!1)),classes:["keyword-rank-tracker-main"]},{headerTitle:c(()=>[A(m(h.headerTitle),1)]),body:c(()=>[u("div",{class:Z(["keyword-rank-tracker-main__body",{"keyword-rank-tracker-main__body--disable-click":k(s).shouldShowSampleReports}])},[!k(t).isUnlicensed&&k(He).hasCoreFeature("search-statistics","keyword-rank-tracker")&&l.value?(a(),_(k(Vt),{key:0})):(a(),_(k(Vt),{key:1}))],2)]),_:1},8,["show"]))}},da={},ua={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},pa=u("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),ha=[pa];function ga(o,e){return a(),S("svg",ua,ha)}const It=M(da,[["render",ga]]),pt="all-in-one-seo-pack",ma={setup(){return{postEditorStore:J()}},components:{CoreSettingsRow:Pe,SvgRightArrowShort:It},data(){return{strings:{title:n("Link Assistant",pt),description:n("Here you can view an overview of your existing links as well as find suggestions for new internal links. Click on the button below to view the Link Assistant panel.",pt),button:n("Open Link Assistant",pt)}}}},_a={class:"aioseo-link-assistant-sidebar"},ya={class:"aioseo-sidebar-content-title"};function fa(o,e,r,t,s,i){const h=p("svg-right-arrow-short"),l=p("base-button"),f=p("core-settings-row");return a(),S("div",_a,[o.$root.$data.screenContext==="sidebar"?(a(),_(f,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:c(()=>[u("div",ya,m(s.strings.title),1),u("p",null,m(s.strings.description),1),d(l,{class:"open-link-assistant-modal gray small",onClick:e[0]||(e[0]=x=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:c(()=>[d(h),A(" "+m(s.strings.button),1)]),_:1})]),_:1})):g("",!0)])}const Sa=M(ma,[["render",fa]]),ka=()=>{const o=(e,r)=>{const t=Oe(r);let s=null;return e.forEach(i=>{if(s||!i.attributes)return;if(i.attributes.content&&i.attributes.content.search(t)!==-1){s=i.clientId;return}if(!i.innerBlocks)return;const h=o(i.innerBlocks,r);h&&(s=h)}),s};return{findTargetBlock:o}},ve="all-in-one-seo-pack",va=(o={})=>{const{emit:e,linkType:r,linksReport:t,metabox:s,pageNumber:i,post:h,postIndex:l,postReport:f,refreshTable:x=()=>{},wpTableLoading:T}=o,P=be(""),C="linkAssistantPostsReport",v=be([]),E=be(!1),q=ke(()=>{if(!s)return h.links[r].rows;const O=i.value===1?0:(i.value-1)*10;return h.links[r].rows.slice(O,O+10)}),Y={frontPage:n("Front Page",ve),deleteLink:n("Delete Link",ve)},ie={areYouSureSingle:n("Are you sure you want to delete this link?",ve),areYouSureMultiple:n("Are you sure you want to delete these links?",ve),areYouSureAll:n("Are you sure you want to delete all links?",ve),actionCannotBeUndone:n("This action cannot be undone.",ve),yesSingle:n("Yes, I want to delete this link",ve),yesMultiple:n("Yes, I want to delete these links",ve),yesAll:n("Yes, I want to delete all links",ve),noChangedMind:n("No, I changed my mind",ve)},ae=[{label:n("Delete",ve),value:"delete"}],oe=Io(),B=J(),G=O=>{window.aioseoBus.$emit("updatingLinks",!0);const R={...O,additionalFilters:{postId:h.ID||B.currentPost.id,postIndex:l,type:r}};return oe[f?"fetchPostReport":"fetchLinksReportInner"](R).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},ye=O=>{window.location.href=`#/post-report?postId=${h.ID}&postIndex=${l}&initialTab=${O}`},se=({action:O,selectedRows:R})=>{!R.length||!O||(P.value=O,v.value=R,E.value=!0)},ce=()=>{if(E.value=!1,!!v.value.length){if(typeof v.value=="number"){N(v.value);return}if(s&&r!=="inboundInternal"){j(v.value).forEach(R=>{V(R)});return}window.aioseoBus.$emit("updatingLinks",!0),oe.linksBulk({postIndex:l,postId:h.ID||B.currentPost.id,action:P.value,linkType:r,linkIds:v.value,linksReport:t,postReport:f}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),x()})}},N=O=>{const R=h.links[r].rows[O].id;if(R){if(s&&r!=="inboundInternal"){V(O);return}window.aioseoBus.$emit("updatingLinks",!0),oe.linkDelete({postIndex:l,postId:h.ID||B.currentPost.id,linkId:R,linksReport:t,postReport:f}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),x()})}},V=O=>{$e()&&(window.aioseoBus.$emit("updatingLinks",!1),Q(O),window.aioseoBus.$emit("updatingLinks",!1)),Zt()&&re(O)},Q=O=>{const R=B.currentPost.linkAssistant.links[r].rows[O];if(!R)return;window.aioseoBus.$emit("updatingLinks",!0);const ee=Oe(R.anchor.trim()),H=R.phrase_html.trim(),y=Oe(H),b=window.wp.data.select("core/block-editor").getBlocks(),{findTargetBlock:w}=ka(),L=w(b,H);if(!L){window.aioseoBus.$emit("updatingLinks",!1);return}const I=window.wp.data.select("core/block-editor").getBlock(L);if(!I){window.aioseoBus.$emit("updatingLinks",!1);return}let U=new RegExp(`(<t?a[^<>]*>)(.*)?(${ee})(.*)?(</t?a[^<>]*>)`,"i");const F=H.replace(U,"$2$3$4");U=new RegExp(`${y}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(L,{content:I.attributes.content.replace(U,F)}).then(()=>{h.links[r].rows.splice(O,1)}).catch(K=>{console.error(`Couldn delete link with type "${r}" and index ${O}:`,K)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},re=O=>{var F;const R=B.currentPost.linkAssistant.links[r].rows[O];if(!R||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let ee="",H=null,y=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(H=window.tinyMCE.get("content"),ee=H.getContent({format:"raw"})):(y=document.querySelector("textarea#content"),ee=y?y.value:""),!ee){window.aioseoBus.$emit("updatingLinks",!1);return}let b=R.phrase_html.trim();H||(b=b.replace(/(\sdata-mce-href=".*")/gi,""));const w=Oe(R.anchor.trim());let L=new RegExp(`(<t?a[^<>]*>)(.*)?(${w})(.*)?(</t?a[^<>]*>)`,"i");const I=b.replace(L,"$2$3$4"),U=Oe(b);L=new RegExp(`${U}`,"i"),ee=ee.replace(L,I),H?H.setContent(ee):y.value=ee,h.links[r].rows.splice(O,1),(F=oe.postSettingsUpdate({postContent:ee}))==null||F.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},j=O=>{let R,ee=[];return Array.isArray(O)&&(R=O.map(Number)),R&&h.links[r].rows.forEach((H,y)=>{R.includes(H.id)&&ee.push(y)}),O==="all"&&(ee=h.links[r].rows.map((H,y)=>y)),ee.sort(function(H,y){return y-H})};return Yt(()=>{window.aioseoBus.$on("updatingLinks",O=>{T.value=O}),i.value=oe.postReport[r].totals.page}),{bulkOptions:ae,changeItemsPerPageSlug:C,doBulkAction:ce,fetchData:G,maybeDoBulkAction:se,modalStrings:ie,openPostReport:ye,rows:q,selectedRows:v,showModal:E,strings:Y}},ba={emits:["closeModal","doBulkAction"],components:{CoreModal:Ie,SvgClose:vt},props:{selectedRows:{required:!0},strings:{type:Object,required:!0},show:Boolean},computed:{areYouSure(){return this.selectedRows==="all"?this.strings.areYouSureAll:Array.isArray(this.selectedRows)&&1<this.selectedRows.length?this.strings.areYouSureMultiple:this.strings.areYouSureSingle},confirmation(){return this.selectedRows==="all"?this.strings.yesAll:Array.isArray(this.selectedRows)&&1<this.selectedRows.length?this.strings.yesMultiple:this.strings.yesSingle}}},wa={class:"aioseo-modal-body"},Ca=["innerHTML"];function Pa(o,e,r,t,s,i){const h=p("svg-close"),l=p("base-button"),f=p("core-modal");return a(),_(f,{show:r.show,classes:["aioseo-link-assistant-confirmation-modal"],"no-header":"",onClose:e[4]||(e[4]=x=>o.$emit("closeModal",!0))},{body:c(()=>[u("div",wa,[u("button",{class:"close",onClick:e[1]||(e[1]=ue(x=>o.$emit("closeModal",!0),["stop"]))},[d(h,{onClick:e[0]||(e[0]=x=>o.$emit("closeModal",!0))})]),u("h3",null,m(i.areYouSure),1),u("div",{class:"reset-description",innerHTML:r.strings.actionCannotBeUndone},null,8,Ca),d(l,{type:"blue",size:"medium",onClick:e[2]||(e[2]=x=>o.$emit("doBulkAction",x))},{default:c(()=>[A(m(i.confirmation),1)]),_:1}),d(l,{type:"gray",size:"medium",onClick:e[3]||(e[3]=x=>o.$emit("closeModal",!0))},{default:c(()=>[A(m(r.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const Ea=M(ba,[["render",Pa]]),xa={components:{CoreTooltip:fe},props:{phrase:{type:String,required:!0},phraseHtml:{type:String,required:!0},anchor:{type:String,required:!0},url:{type:String,required:!0},tooltip:{type:Boolean,required:!1,default:!0},clickableAnchor:{type:Boolean,default(){return!1}}},computed:{partPattern(){const o=Ke.decode(this.anchor),e=Oe(o);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return Ke.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return Ke.decode(this.stripTags(this.getPart(2)))},lastPart(){return Ke.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(o){const r=Ke.decode(this.stripTags(this.phraseHtml,!0)).match(this.partPattern);return r?r[o]:""},stripTags(o,e=!1){return o=o.replace(/<br\s?\/?>/gi," "),e?o.replace(/<(?!a\s)(?!\/a)[^>]*>/gi,""):o.replace(/<[^>]*>/gi,"")},maybeOpenLink(){this.clickableAnchor&&window.open(this.url,"_blank").focus()}}},Ta={class:"phrase"},Aa={key:0,class:"first"},La=["href"],Ia={key:2},Ma={class:"anchor"},Oa={key:3,class:"last"};function Da(o,e,r,t,s,i){const h=p("core-tooltip");return a(),S("div",{class:"aioseo-link-assistant-phrase",onMouseover:e[1]||(e[1]=l=>o.$emit("mouseOver")),onMouseleave:e[2]||(e[2]=l=>o.$emit("mouseLeave"))},[u("span",Ta,[i.firstPart?(a(),S("span",Aa,m(i.firstPart),1)):g("",!0),r.tooltip?(a(),_(h,{key:1,type:"action"},{tooltip:c(()=>[u("a",{class:"tooltip-url",href:r.url,target:"_blank"},m(r.url),9,La)]),default:c(()=>[u("span",{class:"anchor",onClick:e[0]||(e[0]=(...l)=>i.maybeOpenLink&&i.maybeOpenLink(...l))},m(i.linkAnchor),1)]),_:1})):g("",!0),r.tooltip?g("",!0):(a(),S("div",Ia,[u("span",Ma,m(i.linkAnchor),1)])),i.lastPart?(a(),S("span",Oa,m(i.lastPart),1)):g("",!0)]),Ae(o.$slots,"icons")],32)}const Ba=M(xa,[["render",Da]]),Ra={},Ha={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},Ua=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.66699 7.43742H4.33366C2.95866 7.43742 1.83366 6.31242 1.83366 4.93742C1.83366 3.56242 2.95866 2.43742 4.33366 2.43742H7.66699V0.770752H4.33366C2.03366 0.770752 0.166992 2.63742 0.166992 4.93742C0.166992 7.23742 2.03366 9.10408 4.33366 9.10408H7.66699V7.43742ZM12.667 0.770752H9.33366V2.43742H12.667C14.042 2.43742 15.167 3.56242 15.167 4.93742C15.167 6.31242 14.042 7.43742 12.667 7.43742H9.33366V9.10408H12.667C14.967 9.10408 16.8337 7.23742 16.8337 4.93742C16.8337 2.63742 14.967 0.770752 12.667 0.770752ZM11.8337 4.10409H5.16699V5.77075H11.8337V4.10409Z",fill:"currentColor"},null,-1),Ka=[Ua];function Va(o,e){return a(),S("svg",Ha,Ka)}const Mt=M(Ra,[["render",Va]]),Fa={key:0},Na={key:0,class:"row-actions"},za={class:"view"},Ga=["href"],qa={class:"edit"},ja=["href"],Wa={key:0,class:"links-bottom"},Ya={class:"links-bottom-left"},$a={key:1},Za={class:"links-bottom-right"},Xa="inboundInternal",Ft="aioseo-post-report-inbound-internal",Ja={__name:"InboundInternal",props:{post:{type:Object,required:!0},postIndex:{type:Number,required:!1},postId:{type:Number,required:!1},linksReport:{type:Boolean,default(){return!1}},postReport:{type:Boolean,default(){return!1}},metabox:{type:Boolean,default(){return!1}}},emits:["linksUpdated","openSuggestions"],setup(o,{emit:e}){const r="all-in-one-seo-pack",t=_e(),s=Te(),i=o,h=e,l=be(1),f=be(!1),{bulkOptions:x,changeItemsPerPageSlug:T,doBulkAction:P,fetchData:C,maybeDoBulkAction:v,modalStrings:E,openPostReport:q,rows:Y,selectedRows:ie,showModal:ae,strings:oe}=va({emit:h,linkType:Xa,linksReport:i.linksReport,metabox:i.metabox,pageNumber:l,post:i.post,postIndex:i.postIndex,postReport:i.postReport,refreshTable:()=>ce(),wpTableLoading:f}),{editPost:B,viewPost:G}=Ls(),{processChangeItemsPerPage:ye,processFetchTableData:se,refreshTable:ce,wpTableKey:N}=ao({changeItemsPerPageSlug:T,fetchData:C,pageNumber:l,tableId:Ft,wpTableLoading:f}),V=Xt(oe,{deleteAllLinks:D(n("Delete All %1$s Links",r),n("Inbound Internal",r)),outboundSuggestions:D(n("%1$s Link Suggestions",r),n("Inbound",r))}),Q=ke(()=>[{slug:"post_title",label:n("Post Title",r)},{slug:"phrase",label:n("Phrase",r)},{slug:"delete",width:"50px"}]),re=ke(()=>D(n("See All %1$s %2$s Links",r),i.post.links.inboundInternal.totals.total,n("Inbound Internal",r))),j=O=>{l.value=O,!i.metabox&&(f.value=!0,se().then(()=>f.value=!1))};return(O,R)=>{const ee=p("base-button");return a(),S("div",null,[(a(),_(k(lo),{id:Ft,key:k(N),class:Z({"link-assistant-inner-table":!o.postReport}),columns:Q.value,loading:f.value,rows:k(Y),totals:o.post.links.inboundInternal.totals,"bulk-options":k(x),"initial-items-per-page":k(s).settings.tablePagination.linkAssistantPostsReport,"initial-page-number":l.value,"show-pagination":!o.linksReport,"show-search":!1,"show-table-footer":o.postReport,"show-items-per-page":"",onPaginate:j,onProcessBulkAction:k(v),onProcessChangeItemsPerPage:k(ye)},{post_title:c(({row:H})=>{var y,b;return[u("span",null,[A(m(H.context.postTitle)+" ",1),((b=(y=H.context)==null?void 0:y.permalink)==null?void 0:b.replace(/\/$/,""))===k(t).aioseo.urls.home?(a(),S("span",Fa,"("+m(k(V).frontPage)+")",1)):g("",!0)]),H.context?(a(),S("div",Na,[u("span",za,[u("a",{href:H.context.permalink,target:"_blank"},m(k(G)(H.context.postType.singular)),9,Ga),A(" | ")]),u("span",qa,[u("a",{href:H.context.editLink,target:"_blank"},m(k(B)(H.context.postType.singular)),9,ja)])])):g("",!0)]}),phrase:c(({row:H})=>[d(k(Ba),{phrase:H.phrase,phraseHtml:H.phrase_html||"",anchor:H.anchor,url:H.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:c(({row:H})=>[d(k(fe),{type:"action"},{tooltip:c(()=>[A(m(k(V).deleteLink),1)]),default:c(()=>[d(k(et),{onClick:y=>k(v)({action:"delete",selectedRows:[H.id]})},null,8,["onClick"])]),_:2},1024)]),_:1},8,["class","columns","loading","rows","totals","bulk-options","initial-items-per-page","initial-page-number","show-pagination","show-table-footer","onProcessBulkAction","onProcessChangeItemsPerPage"])),o.postReport?g("",!0):(a(),S("div",Wa,[u("div",Ya,[o.post.links.inboundInternal.rows.length?(a(),_(ee,{key:0,type:"blue",tag:"button",onClick:R[0]||(R[0]=H=>h("openSuggestions"))},{default:c(()=>[d(k(Mt)),A(" "+m(k(V).outboundSuggestions),1)]),_:1})):g("",!0),o.post.links.inboundInternal.totals.total>5&&o.linksReport?(a(),S("div",$a,[d(k(po)),u("a",{class:"link-view",href:"#",onClick:R[1]||(R[1]=ue(H=>k(q)("inbound-internal"),["prevent"]))},m(re.value),1)])):g("",!0)]),u("div",Za,[o.post.links.inboundInternal.rows.length?(a(),S("a",{key:0,class:"link-delete",onClick:R[2]||(R[2]=ue(H=>k(v)({action:"delete",selectedRows:"all"}),["prevent"]))},m(k(V).deleteAllLinks),1)):g("",!0)])])),d(k(Ea),{show:k(ae),selectedRows:k(ie),strings:k(E),onDoBulkAction:k(P),onCloseModal:R[3]||(R[3]=H=>ae.value=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}}},he="all-in-one-seo-pack",Qa={setup(){return{licenseStore:me(),postEditorStore:J(),rootStore:_e(),links:X}},components:{CoreAlert:Ce,CoreBlur:tt,CoreMainTabs:De,CoreModal:Ie,Cta:Lt,LinkAssistantInboundInternal:Ja,LinksSideBar:Sa,SvgLinkAffiliate:Is,SvgLinkExternal:po,SvgLinkInternalInbound:Ms,SvgLinkInternalOutbound:Os,SvgLinkSuggestion:Mt,RequiredPlans:co},props:{parentComponentContext:String},data(){return{activeTab:"inbound-internal",activeSuggestionTab:"suggestions-inbound",mockedPostData:{links:{inboundInternal:{rows:[{phrase:"Are you looking for an easy way to do an SEO analysis for your website?",anchor:"SEO analysis",url:"#",context:{postTitle:"How to Perform an SEO Analysis on Your WordPress Website",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"AIOSEO also allows you to create video sitemaps and comes with tons of different SEO tools.",anchor:"video sitemaps",url:"#",context:{postTitle:"How to Create WordPress Image Sitemap",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"You may also want to check out how to name your image files for SEO in WordPress and write alt text for images.",anchor:"how to name your image files for SEO in WordPress",url:"#",context:{postTitle:"What’s the Best Image Format for Your Website?",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"Are you looking for an easy way to do an SEO analysis for your website?",anchor:"SEO analysis",url:"#",context:{postTitle:"How to Perform an SEO Analysis on Your WordPress Website",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"To learn more, please check out our post on image SEO: how to best optimize your images in WordPress. ",anchor:"image SEO",url:"#",context:{postTitle:"How to Write Alt Text for Images for SEO",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"So let’s now move on to showing you exactly how easy it is to import and export redirects using the best redirect plugin for WordPress.",anchor:"best redirect plugin for WordPress",url:"#",context:{postTitle:"How to Easily Import and Export Redirects in WordPress",permalink:"#",editLink:"#",postType:{singular:"Post"}}}],totals:{total:6}},outboundInternal:{totals:{total:12}},affiliate:{totals:{total:8}},external:{totals:{total:24}},suggestionsInbound:{totals:{total:9}},suggestionsOutbound:{totals:{total:9}}}},strings:{ctaButtonText:n("Unlock Link Assistant",he),ctaHeader:D(n("Link Assistant is a %1$s Feature",he),"PRO"),linkAssistantDescription:n("Get relevant suggestions for adding internal links to all your content as well as finding any orphaned posts that have no internal links.",he),thisFeatureRequires:n("This feature requires one of the following plans:",he),linkOpportunities:n("Actionable Link Suggestions",he),orphanedPosts:n("See Orphaned Posts",he),affiliateLinks:n("See Affiliate Links",he),domainReports:n("Top Domain Reports",he)}}},computed:{initialTab(){return"inbound-internal"},tabs(){return[{slug:"inbound-internal",icon:"svg-link-internal-inbound",name:D("%1$s %2$s",this.mockedPostData.links.inboundInternal.totals.total,n("Inbound Internal",he))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:D("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,n("Outbound Internal",he))},{slug:"affiliate",icon:"svg-link-affiliate",name:D("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,n("Affiliate",he))},{slug:"external",icon:"svg-link-external",name:D("%1$s %2$s",this.mockedPostData.links.external.totals.total,n("External",he))},{slug:"link-suggestions",icon:"svg-link-suggestion",name:D("%1$s %2$s",this.mockedPostData.links.suggestionsOutbound.totals.total+this.mockedPostData.links.suggestionsInbound.totals.total,n("Link Suggestions",he))}]},modalHeader(){return D(n('Links & Suggestions for "%1$s"',he),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},el={class:"aioseo-tab-content aioseo-link-assistant"},tl={key:0};function ol(o,e,r,t,s,i){const h=p("core-main-tabs"),l=p("link-assistant-inbound-internal"),f=p("core-blur"),x=p("required-plans"),T=p("cta"),P=p("core-modal"),C=p("links-side-bar");return a(),S("div",el,[o.$root.$data.screenContext==="metabox"?(a(),S("div",tl,[d(f,null,{default:c(()=>[d(h,{class:"link-tabs",internal:"",tabs:i.tabs,active:i.initialTab,showSaveButton:!1},{"var-tab-icon":c(({tab:v})=>[(a(),_(Se(v.icon),{class:Z([{warning:v.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(a(),_(l,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):g("",!0)]),_:1}),d(T,{"cta-link":t.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":s.strings.ctaButtonText,"learn-more-link":t.links.getUpsellUrl("link-assistant","metabox",t.rootStore.isPro?"pricing":"liteUpgrade"),"feature-list":[s.strings.linkOpportunities,s.strings.domainReports,s.strings.orphanedPosts,s.strings.affiliateLinks],"hide-bonus":!t.licenseStore.isUnlicensed},{"header-text":c(()=>[A(m(s.strings.ctaHeader),1)]),description:c(()=>[d(x,{addon:"aioseo-link-assistant"}),A(" "+m(s.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])])):g("",!0),d(P,{show:t.postEditorStore.currentPost.linkAssistant.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-link-assistant-modal"],onClose:e[0]||(e[0]=v=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!1)},{headerTitle:c(()=>[A(m(i.modalHeader),1)]),body:c(()=>[d(f,null,{default:c(()=>[d(h,{class:"link-tabs",internal:"",tabs:i.tabs,active:i.initialTab,showSaveButton:!1},{"var-tab-icon":c(({tab:v})=>[(a(),_(Se(v.icon),{class:Z([{warning:v.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(a(),_(l,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):g("",!0)]),_:1}),d(T,{"cta-link":t.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":s.strings.ctaButtonText,"learn-more-link":t.links.getUpsellUrl("link-assistant","metabox",t.rootStore.isPro?"pricing":"liteUpgrade"),"feature-list":[s.strings.linkOpportunities,s.strings.domainReports,s.strings.orphanedPosts,s.strings.affiliateLinks],"hide-bonus":!t.licenseStore.isUnlicensed},{"header-text":c(()=>[A(m(s.strings.ctaHeader),1)]),description:c(()=>[d(x,{addon:"aioseo-link-assistant"}),A(" "+m(s.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(a(),_(C,{key:1})):g("",!0)])}const Nt=M(Qa,[["render",ol]]),sl={};function rl(o,e){return a(),S("div")}const nl=M(sl,[["render",rl]]),il={setup(){return{addons:uo,licenseStore:me()}},components:{Links:Nt,LinksActivate:nl,LinksLite:Nt},props:{parentComponentContext:String}},al={class:"aioseo-tab-content aioseo-link-assistant"};function ll(o,e,r,t,s,i){const h=p("Links",!0),l=p("LinksLite"),f=p("LinksActivate");return a(),S("div",al,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(a(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-link-assistant")?(a(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),!t.licenseStore.isUnlicensed&&!t.addons.isActive("aioseo-link-assistant")&&t.addons.canActivate("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(a(),_(f,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):g("",!0)])}const cl=M(il,[["render",ll]]),Fe="all-in-one-seo-pack",ko=()=>{const o=ke(()=>[{groupLabel:n("Default",Fe),options:[{label:n("Default Object Type (Set in Social Networks)",Fe),value:"default"}]}].concat(No)),e=[{label:n("Default (Set under Social Networks)",Fe),value:"default"},{label:n("Summary",Fe),value:"summary"},{label:n("Summary with Large Image",Fe),value:"summary_large_image"}];return{getObjectTypeLabelByOption:s=>{let i="";return o.value.forEach(h=>{const l=h.options.find(f=>f.value===s);l&&(i=(l==null?void 0:l.label)||"")}),i},getTwitterCardLabelByOption:s=>{var i;return((i=e.find(h=>h.value===s))==null?void 0:i.label)||""},objectTypeOptions:o,twitterCardOptions:e}},ne="all-in-one-seo-pack",dl={setup(){const{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,setImageUrl:i}=ho(),{maxRecommendedCount:h}=wt(),{objectTypeOptions:l}=ko(),{parseTags:f}=Ct({separator:void 0});return{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,maxRecommendedCount:h,objectTypeOptions:l,optionsStore:Ee(),parseTags:f,postEditorStore:J(),rootStore:_e(),setImageUrl:i}},components:{CoreAlert:Ce,CoreFacebookPreview:Ds,CoreHtmlTagsEditor:At,CoreImageUploader:mo,CoreSettingsRow:Pe},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:go,titleCount:0,descriptionCount:0,strings:{tabName:n("Facebook Preview",ne),imageSource:n("Image Source",ne),customFieldsName:n("Custom Field Name",ne),video:n("Video URL",ne),width:n("Width",ne),height:n("Height",ne),facebookObjectType:n("Object Type",ne),facebookImage:n("Facebook Image",ne),facebookTitle:n("Facebook Title",ne),facebookDescription:n("Facebook Description",ne),minimumSize:n("Minimum size: 200px x 200px, ideal ratio 1.91:1, 5MB max. (eg: 1640px x 856px or 3280px x 1712px for Retina screens). JPG, PNG, WEBP and GIF formats only.",ne),clickToAddSiteName:n("Click on the tags below to insert variables into your site name.",ne),clickToAddHomePageDescription:n("Click on the tags below to insert variables into your meta description.",ne),articleSection:n("Article Section",ne),articleTags:n("Article Tags",ne),tagPlaceholder:n("Press enter to create an article tag",ne),facebookDisabled:D(n("No %1$s markup will be output for your post because it is currently disabled. You can enable %1$s markup in the Social Networks settings. %2$s",ne),n("Open Graph",ne),D('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#facebook",n("Go to Social Networks",ne)))}}},watch:{"postEditorStore.currentPost.og_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.og_image_custom_url"(){this.handleImageUpdate()}},computed:{previewTitle(){return this.parseTags(this.postEditorStore.currentPost.og_title||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){return this.parseTags(this.postEditorStore.currentPost.og_description||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")},shouldShowArticleSection(){const o=this.postEditorStore.currentPost.context==="term"?"taxonomies":"postTypes";return this.postEditorStore.currentPost.og_object_type==="article"||this.postEditorStore.currentPost.og_object_type==="default"&&this.optionsStore.dynamicOptions.social.facebook.general[o][this.postEditorStore.currentPost.postType||this.postEditorStore.currentPost.termType].objectType==="article"}},methods:{scrollToElement(){const o=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{o&&(o.firstChild.scrollTop=0)},10)},saveImageType(o){this.postEditorStore.currentPost.og_image_type=o,this.postEditorStore.isDirty=!0},getObjectTypeOptions(o){let e=null;return this.objectTypeOptions.forEach(r=>{const t=r.options.find(s=>s.value===o);t&&(e=t)}),e},setObjectType(o){this.postEditorStore.currentPost.og_object_type=o,this.postEditorStore.isDirty=!0},updateImage(o){this.postEditorStore.currentPost.og_image_custom_url=o,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("facebook")}},mounted(){this.scrollToElement(),this.setImageUrl("facebook"),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate)},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate)}},ul={class:"tab-facebook"},pl={id:"aioseo-post-settings-facebook"},hl=["innerHTML"],gl=["innerHTML"];function ml(o,e,r,t,s,i){const h=p("core-alert"),l=p("core-facebook-preview"),f=p("core-settings-row"),x=p("core-html-tags-editor"),T=p("base-select"),P=p("base-input"),C=p("core-image-uploader");return a(),S("div",ul,[d(f,{class:"snippet-preview-row"},{name:c(()=>[u("span",null,m(s.strings.tabName),1)]),content:c(()=>[t.optionsStore.options.social.facebook.general.enable?g("",!0):(a(),_(h,{key:0,class:"facebook-disabled-warning",innerHTML:s.strings.facebookDisabled,type:"red"},null,8,["innerHTML"])),d(l,{description:i.previewDescription,image:t.imageUrl,loading:t.loading,title:i.previewTitle},null,8,["description","image","loading","title"])]),_:1}),u("div",pl,[d(f,{name:s.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:c(()=>[d(x,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_title,"onUpdate:modelValue":[e[0]||(e[0]=v=>t.postEditorStore.currentPost.og_title=v),e[2]||(e[2]=v=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=v=>s.titleCount=v.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},{"tags-description":c(()=>[A(m(s.strings.clickToAddSiteName),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,95)},null,8,hl)]),_:1},8,["name"]),d(f,{name:s.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:c(()=>[d(x,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_description,"onUpdate:modelValue":[e[3]||(e[3]=v=>t.postEditorStore.currentPost.og_description=v),e[5]||(e[5]=v=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=v=>s.descriptionCount=v.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":c(()=>[A(m(s.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,200)},null,8,gl)]),_:1},8,["name"]),d(f,{class:"facebook-image-source",name:s.strings.imageSource,align:""},{content:c(()=>[d(T,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=v=>i.saveImageType(v.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.og_image_type==="custom"?(a(),_(f,{key:0,name:s.strings.customFieldsName,align:""},{content:c(()=>[d(P,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":[e[7]||(e[7]=v=>t.postEditorStore.currentPost.og_image_custom_fields=v),e[8]||(e[8]=v=>t.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):g("",!0),t.postEditorStore.currentPost.og_image_type==="custom_image"?(a(),_(f,{key:1,class:"facebook-image",name:s.strings.facebookImage},{content:c(()=>[d(C,{description:s.strings.minimumSize,modelValue:t.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":e[9]||(e[9]=v=>t.postEditorStore.currentPost.og_image_custom_url=v)},null,8,["description","modelValue"])]),_:1},8,["name"])):g("",!0),d(f,{class:"facebook-video",name:s.strings.video,align:""},{content:c(()=>[d(P,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[10]||(e[10]=v=>t.postEditorStore.currentPost.og_video=v)},null,8,["modelValue"])]),_:1},8,["name"]),d(f,{class:"facebook-object-type",name:s.strings.facebookObjectType,align:""},{content:c(()=>[d(T,{size:"medium","open-direction":"top",options:t.objectTypeOptions,"group-label":"groupLabel","group-values":"options",modelValue:i.getObjectTypeOptions(t.postEditorStore.currentPost.og_object_type),"onUpdate:modelValue":e[11]||(e[11]=v=>i.setObjectType(v.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),i.shouldShowArticleSection?(a(),_(f,{key:2,name:s.strings.articleSection,align:""},{content:c(()=>[d(P,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[12]||(e[12]=v=>t.postEditorStore.currentPost.og_article_section=v)},null,8,["modelValue"])]),_:1},8,["name"])):g("",!0),i.shouldShowArticleSection?(a(),_(f,{key:3,name:s.strings.articleTags,align:""},{content:c(()=>[d(T,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.og_article_tags||[],modelValue:t.postEditorStore.currentPost.og_article_tags||[],"onUpdate:modelValue":e[13]||(e[13]=v=>t.postEditorStore.currentPost.og_article_tags=v),"tag-placeholder":s.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):g("",!0)])])}const _l=M(dl,[["render",ml]]),ge="all-in-one-seo-pack",yl={setup(){const{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,setImageUrl:s}=ho(),{maxRecommendedCount:i}=wt(),{twitterCardOptions:h}=ko(),{parseTags:l}=Ct({separator:void 0});return{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,maxRecommendedCount:i,optionsStore:Ee(),parseTags:l,postEditorStore:J(),rootStore:_e(),setImageUrl:s,twitterCardOptions:h}},components:{CoreAlert:Ce,CoreHtmlTagsEditor:At,CoreImageUploader:mo,CoreSettingsRow:Pe,CoreTwitterPreview:Bs},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:go,titleCount:0,descriptionCount:0,facebookImageUrl:"",strings:{twitterPreview:n("X (Twitter) Preview",ge),twitterPreviewDescription:n("X cards by default will use the data defined below. If no data is set, X will instead pick up the data set on the Facebook tab.",ge),useFB:n("Use Data from Facebook Tab",ge),imageSource:n("Image Source",ge),customFieldsName:n("Custom Field Name",ge),twitterImage:n("X Image",ge),twitterTitle:n("X Title",ge),twitterDescription:n("X Description",ge),twitterCardType:n("X Card Type",ge),minimumSizeSummary:n("Minimum size: 144px x 144px, ideal ratio 1:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",ge),minimumSizeSummaryWithLarge:n("Minimum size: 300px x 157px, ideal ratio 2:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",ge),twitterDisabled:D(n("No %1$s markup will be output for your post because it is currently disabled. You can enable %1$s markup in the Social Networks settings. %2$s",ge),n("X (Twitter)",ge),D('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#twitter",n("Go to Social Networks",ge)))}}},watch:{"postEditorStore.currentPost.twitter_use_og"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_custom_url"(){this.handleImageUpdate()}},computed:{previewTitle(){const o=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_title?this.postEditorStore.currentPost.og_title:this.postEditorStore.currentPost.twitter_title;return this.parseTags(o||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){const o=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_description?this.postEditorStore.currentPost.og_description:this.postEditorStore.currentPost.twitter_description;return this.parseTags(o||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")},previewImage(){return this.postEditorStore.currentPost.twitter_use_og||!this.imageUrl?this.facebookImageUrl:this.imageUrl},twitterImageUploaderDescription(){return this.postEditorStore.currentPost.twitter_card==="summary"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary"?this.strings.minimumSizeSummary:this.postEditorStore.currentPost.twitter_card==="summary_large_image"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary_large_image"?this.strings.minimumSizeSummaryWithLarge:""}},methods:{getCardOptions(o){return this.twitterCardOptions.find(e=>e.value===o)},cardSelect(o){this.postEditorStore.currentPost.twitter_card=o,this.postEditorStore.isDirty=!0},scrollToElement(){const o=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{o&&(o.firstChild.scrollTop=0)},10)},saveTwitterImageType(o){this.postEditorStore.currentPost.twitter_image_type=o,this.postEditorStore.isDirty=!0},updateImage(o){this.postEditorStore.currentPost.twitter_image_custom_url=o,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("twitter")},updateImagePreview(o){o.social==="facebook"&&(this.facebookImageUrl=o.image)}},mounted(){window.aioseoBus.$on("updateSocialImagePreview",this.updateImagePreview),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate),this.scrollToElement(),this.setImageUrl("facebook").then(()=>{this.setImageUrl("twitter")})},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate),window.aioseoBus.$off("updateSocialImagePreview",this.updateImagePreview)}},fl={class:"tab-twitter"},Sl={id:"aioseo-post-settings-twitter"},kl=["innerHTML"],vl=["innerHTML"];function bl(o,e,r,t,s,i){const h=p("core-alert"),l=p("core-twitter-preview"),f=p("core-settings-row"),x=p("base-toggle"),T=p("core-html-tags-editor"),P=p("base-select"),C=p("base-input"),v=p("core-image-uploader");return a(),S("div",fl,[d(f,{class:"snippet-preview-row"},{name:c(()=>[u("span",null,m(s.strings.twitterPreview),1)]),description:c(()=>[u("i",null,m(s.strings.twitterPreviewDescription),1)]),content:c(()=>[t.optionsStore.options.social.twitter.general.enable?g("",!0):(a(),_(h,{key:0,class:"twitter-disabled-warning",innerHTML:s.strings.twitterDisabled,type:"red"},null,8,["innerHTML"])),d(l,{card:t.postEditorStore.currentPost.twitter_card,description:i.previewDescription,image:i.previewImage,loading:t.loading,title:i.previewTitle},null,8,["card","description","image","loading","title"])]),_:1}),u("div",Sl,[d(f,{name:s.strings.useFB,class:"use-facebook"},{content:c(()=>[d(x,{modelValue:t.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=E=>t.postEditorStore.currentPost.twitter_use_og=E),e[1]||(e[1]=E=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.twitter_use_og?g("",!0):(a(),_(f,{key:0,name:s.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:c(()=>[d(T,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=E=>t.postEditorStore.currentPost.twitter_title=E),e[4]||(e[4]=E=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=E=>s.titleCount=E.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},null,8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,70)},null,8,kl)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?g("",!0):(a(),_(f,{key:1,name:s.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:c(()=>[d(T,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=E=>t.postEditorStore.currentPost.twitter_description=E),e[7]||(e[7]=E=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=E=>s.descriptionCount=E.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":c(()=>[A(m(s.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,200)},null,8,vl)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?g("",!0):(a(),_(f,{key:2,class:"twitter-image-source",name:s.strings.imageSource,align:""},{content:c(()=>[d(P,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=E=>i.saveTwitterImageType(E.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom"?(a(),_(f,{key:3,class:"twitter-custom-field",name:s.strings.customFieldsName,align:""},{content:c(()=>[d(C,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=E=>t.postEditorStore.currentPost.twitter_image_custom_fields=E),e[10]||(e[10]=E=>t.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):g("",!0),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom_image"?(a(),_(f,{key:4,class:"twitter-image",name:s.strings.twitterImage},{content:c(()=>[d(v,{description:i.twitterImageUploaderDescription,modelValue:t.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[11]||(e[11]=E=>t.postEditorStore.currentPost.twitter_image_custom_url=E)},null,8,["description","modelValue"])]),_:1},8,["name"])):g("",!0),d(f,{class:"twitter-card-type",name:s.strings.twitterCardType,align:""},{content:c(()=>[d(P,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:i.getCardOptions(t.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[12]||(e[12]=E=>i.cardSelect(E.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const wl=M(yl,[["render",bl]]),ht="all-in-one-seo-pack",Cl={setup(){return{postEditorStore:J(),settingsStore:Te()}},components:{CoreSettingsRow:Pe,SvgPencil:bt},data(){return{strings:{title:n("Social Media",ht),sidebarCopy:n("Here you can view and edit the thumbnail, title and description that will be displayed when your site is shared on social media. Click on the button below to view and edit the preview.",ht),editSnippet:n("Preview & Edit",ht)}}},methods:{openModalEv(){this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0}}},Pl={class:"aioseo-sidebar-content-title"};function El(o,e,r,t,s,i){const h=p("svg-pencil"),l=p("base-button"),f=p("core-settings-row");return o.$root.$data.screenContext==="sidebar"?(a(),_(f,{key:0,name:s.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:c(()=>[u("div",Pl,m(s.strings.title),1),u("p",null,m(s.strings.sidebarCopy),1),d(l,{class:"open-social-modal gray small",onClick:i.openModalEv},{default:c(()=>[d(h),A(" "+m(s.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):g("",!0)}const xl=M(Cl,[["render",El]]),gt="all-in-one-seo-pack",Tl={setup(){return{postEditorStore:J(),settingsStore:Te()}},components:{BaseRadioToggle:no,CoreMainTabs:De,CoreSettingsRow:Pe,Facebook:_l,Twitter:wl,SocialSideBar:xl},props:{parentComponentContext:String},data(){return{strings:{pageName:n("Social",gt)},tabs:[{slug:"facebook",name:n("Facebook",gt)},{slug:"twitter",name:n("X (Twitter)",gt)}]}},computed:{initTab:function(){let o=this.settingsStore.metaBoxTabs.social;return this.parentComponentContext==="modal"&&(o=this.settingsStore.metaBoxTabs.socialModal),o}},methods:{processChangeTab(o){this.parentComponentContext==="modal"?this.settingsStore.changeTabSettings({setting:"socialModal",value:o}):this.settingsStore.changeTabSettings({setting:"social",value:o})}},mounted(){qe()["social-tab"]&&(this.processChangeTab(qe()["social-tab"]),setTimeout(()=>{ft("social-tab")},500))}},Al={class:"aioseo-tab-content aioseo-post-social"};function Ll(o,e,r,t,s,i){const h=p("core-main-tabs"),l=p("core-settings-row"),f=p("social-side-bar");return a(),S("div",Al,[o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(a(),_(l,{key:0,"no-border":""},{content:c(()=>[d(h,{tabs:s.tabs,showSaveButton:!1,active:i.initTab,internal:"",onChanged:e[0]||(e[0]=x=>i.processChangeTab(x)),disableMobile:""},null,8,["tabs","active"])]),_:1})):g("",!0),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(a(),_(Ge,{key:1,name:"route-fade",mode:"out-in"},{default:c(()=>[(a(),_(Se(i.initTab)))]),_:1})):g("",!0),r.parentComponentContext!=="modal"?(a(),_(f,{key:2})):g("",!0)])}const vo=M(Tl,[["render",Ll]]),mt="all-in-one-seo-pack",Il={setup(){return{settingsStore:Te()}},components:{CoreMainTabs:De,CoreSettingsRow:Pe,General:So,Social:vo,SvgSettings:io,SvgShare:_o},data(){return{strings:{pageName:n("Modal Content",mt)},tabs:[{slug:"general",icon:"svg-settings",name:n("General",mt)},{slug:"social",icon:"svg-share",name:n("Social",mt)}]}},computed:{getTabs(){return this.tabs.filter(o=>Le(`aioseo_page_${o.slug}_settings`))}},methods:{processChangeTab(o){this.settingsStore.changeTabSettings({setting:"modal",value:o})}}},Ml={class:"aioseo-modal-content"},Ol={class:"mobile-radio-buttons"},Dl={class:"component-wrapper"};function Bl(o,e,r,t,s,i){const h=p("core-main-tabs");return a(),S("div",Ml,[u("div",Ol,[d(h,{tabs:i.getTabs,showSaveButton:!1,active:t.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=l=>i.processChangeTab(l))},null,8,["tabs","active"])]),u("div",Dl,[d(Ge,{name:"route-fade",mode:"out-in"},{default:c(()=>[(a(),_(Se(t.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const Rl=M(Il,[["render",Bl]]),_t="all-in-one-seo-pack",Hl={setup(){return{postEditorStore:J()}},components:{CoreSettingsRow:Pe,SvgRightArrowShort:It},data(){return{strings:{title:n("Redirects",_t),description:n("Here you can add a redirect or view your existing redirects from this page. Click on the button below to view the Redirects panel.",_t),button:n("Open Redirects",_t)}}}},Ul={class:"aioseo-redirects-sidebar"},Kl={class:"aioseo-sidebar-content-title"};function Vl(o,e,r,t,s,i){const h=p("svg-right-arrow-short"),l=p("base-button"),f=p("core-settings-row");return a(),S("div",Ul,[o.$root.$data.screenContext==="sidebar"?(a(),_(f,{key:0,class:"snippet-description-row open-redirects-copy"},{content:c(()=>[u("div",Kl,m(s.strings.title),1),u("p",null,m(s.strings.description),1),d(l,{class:"open-redirects-modal gray small",onClick:e[0]||(e[0]=x=>t.postEditorStore.currentPost.redirects.modalOpen=!0)},{default:c(()=>[d(h),A(" "+m(s.strings.button),1)]),_:1})]),_:1})):g("",!0)])}const Fl=M(Hl,[["render",Vl],["__scopeId","data-v-1754537e"]]),Nl="all-in-one-seo-pack",zl={setup(){return{postEditorStore:J()}},components:{CoreModal:Ie,RedirectsSideBar:Fl,RedirectsLite:Hs},props:{parentComponentContext:String},data(){return{strings:{modalHeader:n("Redirects",Nl)}}}},Gl={class:"bd"};function ql(o,e,r,t,s,i){const h=p("redirects-lite"),l=p("core-modal"),f=p("redirects-side-bar");return a(),S("div",null,[o.$root.$data.screenContext==="metabox"?(a(),_(h,{key:0,noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),d(l,{show:t.postEditorStore.currentPost.redirects.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-redirects"],onClose:e[0]||(e[0]=x=>t.postEditorStore.currentPost.redirects.modalOpen=!1)},{headerTitle:c(()=>[A(m(s.strings.modalHeader),1)]),body:c(()=>[u("div",Gl,[d(h,{noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(a(),_(f,{key:1})):g("",!0)])}const zt=M(zl,[["render",ql]]),jl={};function Wl(o,e){return a(),S("div")}const Yl=M(jl,[["render",Wl]]),$l={setup(){return{addons:uo,licenseStore:me()}},components:{Redirects:zt,RedirectsActivate:Yl,RedirectsLite:zt},props:{parentComponentContext:String}},Zl={class:"aioseo-tab-content"};function Xl(o,e,r,t,s,i){const h=p("Redirects",!0),l=p("RedirectsLite"),f=p("RedirectsActivate");return a(),S("div",Zl,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-redirects")&&!t.addons.requiresUpgrade("aioseo-redirects")?(a(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-redirects")?(a(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),!t.licenseStore.isUnlicensed&&!t.addons.isActive("aioseo-redirects")&&t.addons.canActivate("aioseo-redirects")&&!t.addons.requiresUpgrade("aioseo-redirects")?(a(),_(f,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):g("",!0)])}const Jl=M($l,[["render",Xl]]),Ql={class:"graph-container"},ec={class:"graph"},tc={class:"left"},oc=["title"],sc={class:"right action-buttons"},bo={__name:"GraphCard",props:{graph:Object,customGraph:Boolean,defaultGraph:String},setup(o){const e="all-in-one-seo-pack",r=o,{childGraphs:t,graphs:s}=ro(),i=ke(()=>{var C,v,E,q;if(r.customGraph)return n("Custom Schema",e)+" - "+r.graph.graphName;if(r.defaultGraph)return f(r.defaultGraph);if((C=r.graph)!=null&&C.label)return r.graph.label;const T=(E=(v=r.graph)==null?void 0:v.slug)==null?void 0:E.toLowerCase();return((q=s.find(Y=>Y.slug===T))==null?void 0:q.label)||n("Parsing Block Data...",e)}),h=ke(()=>{if(r.customGraph)return dt;if(r.defaultGraph){const T=l(r.defaultGraph);return T?x(T):dt}return x(r.graph.slug)}),l=T=>{Object.entries(t).forEach(C=>{const v=C[0];C[1].forEach(E=>{T===E.childGraphName&&(T=v)})});let P="";return s.forEach(C=>{C.graphName===T&&(P=C.slug)}),P},f=T=>{let P="",C=T;return Object.entries(t).forEach(v=>{const E=v[0];v[1].forEach(q=>{P||T===q.childGraphName&&(P=E,C=q.label,s.forEach(Y=>{Y.graphName===E&&(P=Y.label)}))})}),P?P+" - "+C+" "+n("(Default)",e):T+" "+n("(Default)",e)},x=T=>{switch(T){case"article":return ys;case"book":return _s;case"car":return ms;case"course":return gs;case"dataset":return hs;case"event":return ps;case"faq-page":return us;case"fact-check":return ds;case"how-to":return cs;case"job-posting":return ls;case"movie":return as;case"music":return is;case"person":return ns;case"product":return rs;case"product-review":return ss;case"recipe":return os;case"service":return ts;case"software-application":return es;case"video":return Qo;case"web-page":return Jo;default:return dt}};return(T,P)=>(a(),S("div",Ql,[u("div",ec,[u("div",tc,[(a(),_(Se(h.value))),u("span",{title:i.value},m(i.value),9,oc)]),u("div",sc,[Ae(T.$slots,"buttons")])])]))}},rc={class:"title"},nc=["innerHTML"],ic={class:"schema-templates"},ac={class:"main"},lc={class:"schema-catalog"},cc={class:"graphs"},dc={__name:"CtaModal",setup(o){const e="all-in-one-seo-pack",{graphs:r}=ro(),t=_e(),s={schemaGenerator:n("Schema Generator",e),headerTooltip:D(n("Use our powerful Schema Generator to configure Schema Markup for your content. Search Engines use structured data to better understand what your site is about as well as to display rich snippets in search results. %1$s",e),X.getDocLink(xe.learnMore,"schema",!0)),searchSchema:n("Search Schema",e),ctaDescription:n("Easily generate unlimited schema markup for your content to help you rank higher in search results. Our schema validator ensures your schema works out of the box.",e),ctaButtonText:n("Unlock Schema Generator",e),ctaHeader:D(n("Schema Generator is a %1$s Feature",e),"PRO")},i=[n("Unlimited Schema",e),n("Validate with Google",e),n("Increase Rankings",e),n("Additional Schema Types",e)],h=[{slug:"schema-templates",icon:fs,name:n("Schema Templates",e),component:"templates"},{slug:"custom-schema",icon:Ss,name:n("Custom Schema",e),component:"custom"},{slug:"schema-validation",icon:ks,name:n("Schema Validation",e),component:"validation"}],l=[{slug:"schema-catalog",name:n("Schema Catalog",e)},{slug:"your-templates",name:n("Your Templates",e)}];return(f,x)=>{const T=p("base-input"),P=p("base-button");return a(),_(k(Ie),{classes:["aioseo-post-schema-modal-cta"],onClose:x[0]||(x[0]=C=>f.$emit("close"))},{headerTitle:c(()=>[u("div",rc,m(s.schemaGenerator),1),d(k(fe),null,{tooltip:c(()=>[u("span",{innerHTML:s.headerTooltip},null,8,nc)]),default:c(()=>[d(k(xt))]),_:1})]),body:c(()=>[d(k(tt),null,{default:c(()=>[d(k(De),{tabs:h,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":c(({tab:C})=>[(a(),_(Se(C.icon)))]),_:1}),u("div",ic,[d(k(De),{tabs:l,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":c(({tab:C})=>[(a(),_(Se(C.icon)))]),_:1}),u("div",ac,[d(T,{class:"search",size:"medium",prependIcon:"search",placeholder:s.searchSchema},null,8,["placeholder"]),u("div",lc,[u("div",cc,[(a(!0),S(we,null,Ue(k(r),(C,v)=>(a(),_(k(bo),{key:C.graphName+v,graph:C},{buttons:c(()=>[d(P,{class:"small",type:"gray"},{default:c(()=>[d(k(Tt))]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),d(k(Lt),{"cta-link":k(X).getPricingUrl("schema-generator","schema-generator-upsell"),"button-text":s.ctaButtonText,"learn-more-link":k(X).getUpsellUrl("schema-generator",null,k(t).isPro?"pricing":"liteUpgrade"),"feature-list":i},{"header-text":c(()=>[A(m(s.ctaHeader),1)]),description:c(()=>[A(m(s.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link"])]),_:1})}}},Be="all-in-one-seo-pack",uc={setup(){return{postEditorStore:J(),GLOBAL_STRINGS:xe,links:X}},components:{CoreAlert:Ce,CoreSettingsRow:Pe,CoreTooltip:fe,CtaModal:dc,GraphCard:bo,SvgEye:je},props:{parentComponentContext:String},data(){return{modalOpenMetabox:!1,modalOpenSidebar:!1,strings:{sidebarDescription:n("Configure Schema Markup for your content. Search engines use structured data to display rich results in SERPs.",Be),noGraphs:n("You have not added any schema yet. You can add any schema graphs you like via the Schema Generator below.",Be),schemaInUse:n("Schema In Use",Be),generateSchema:n("Generate Schema",Be),validateSchema:n("Validate Schema",Be),defaultGraphTooltip:n("This is the default graph for this post type. All data for this graph will be automatically generated.",Be)}}},computed:{isSidebar(){return this.$root.$data.screenContext==="sidebar"}},methods:{getDefaultSchemaTooltipOffset(){return Re()?"-120px,0":this.isSidebar?"-70px,0":"0,0"}}},pc={class:"graphs"},hc={key:0,class:"sidebar-description"},gc={class:"description"},mc=["innerHTML"],_c=["innerHTML"],yc={class:"buttons"};function fc(o,e,r,t,s,i){const h=p("svg-eye"),l=p("base-button"),f=p("core-tooltip"),x=p("graph-card"),T=p("core-alert"),P=p("cta-modal"),C=p("core-settings-row");return a(),S("div",{class:Z(["aioseo-tab-content aioseo-post-schema",[{sidebar:i.isSidebar}]])},[d(C,{name:s.strings.schemaInUse},{content:c(()=>[u("div",pc,[i.isSidebar?(a(),S("div",hc,[u("p",gc,m(s.strings.sidebarDescription),1),u("p",{class:"description",innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,mc)])):g("",!0),t.postEditorStore.currentPost.schema.default.graphName&&t.postEditorStore.currentPost.schema.default.isEnabled?(a(),_(x,{key:1,defaultGraph:t.postEditorStore.currentPost.schema.default.graphName},{buttons:c(()=>[d(f,{offset:i.getDefaultSchemaTooltipOffset()},{tooltip:c(()=>[u("span",{innerHTML:s.strings.defaultGraphTooltip},null,8,_c)]),default:c(()=>[d(l,{class:"small no-hover",type:"gray"},{default:c(()=>[d(h)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):g("",!0)]),u("div",yc,[!t.postEditorStore.currentPost.schema.default.graphName||!t.postEditorStore.currentPost.schema.default.isEnabled?(a(),_(T,{key:0,class:"no-graphs",type:"yellow"},{default:c(()=>[A(m(s.strings.noGraphs),1)]),_:1})):g("",!0),d(l,{class:"medium",type:"blue",onClick:e[0]||(e[0]=v=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:c(()=>[A(m(s.strings.generateSchema),1)]),_:1}),d(l,{class:"medium",type:"gray",onClick:e[1]||(e[1]=v=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:c(()=>[A(m(s.strings.validateSchema),1)]),_:1})]),d(P,{show:!i.isSidebar&&s.modalOpenMetabox,onClose:e[2]||(e[2]=v=>s.modalOpenMetabox=!1)},null,8,["show"]),d(P,{show:i.isSidebar&&s.modalOpenSidebar,onClose:e[3]||(e[3]=v=>s.modalOpenSidebar=!1)},null,8,["show"])]),_:1},8,["name"])],2)}const Gt=M(uc,[["render",fc]]),Sc={setup(){return{licenseStore:me()}},components:{Schema:Gt,SchemaLite:Gt},props:{parentComponentContext:String}},kc={class:"aioseo-post-schema-view"};function vc(o,e,r,t,s,i){const h=p("schema",!0),l=p("schema-lite");return a(),S("div",kc,[t.licenseStore.isUnlicensed?g("",!0):(a(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])),t.licenseStore.isUnlicensed?(a(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):g("",!0)])}const bc=M(Sc,[["render",vc]]),wo=o=>(jt("data-v-20175fdb"),o=o(),Wt(),o),wc={class:"aioseo-seo-revision-list-item"},Cc={class:"aioseo-seo-revision-list-item__author"},Pc={class:"aioseo-seo-revision-list-item__author__avatar"},Ec={class:"aioseo-seo-revision-list-item__author__name"},xc=wo(()=>u("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),Tc={class:"aioseo-seo-revision-list-item__action"},Ac=wo(()=>u("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),Lc={class:"aioseo-seo-revision-list-item__action__view"},Ic={class:"aioseo-seo-revision-list-item__action__delete"},Mc={__name:"ListItem",setup(o){const{currentUser:e}=Qt(Xe());return(r,t)=>(a(),S("div",wc,[u("div",Cc,[u("span",Pc,[d(k(Us),{src:k(e).avatar.url,size:k(e).avatar.size},null,8,["src","size"])]),u("span",Ec,m(k(oo)(k(e).display_name,30)),1)]),xc,u("div",Tc,[Ac,u("span",Lc,[d(k(je),{width:"18"})]),u("span",Ic,[d(k(et),{width:"18"})])])]))}},Oc=M(Mc,[["__scopeId","data-v-20175fdb"]]),Dc={components:{SeoRevisionListItem:Oc}},Bc={class:"aioseo-seo-revisions-list"};function Rc(o,e,r,t,s,i){const h=p("seo-revision-list-item");return a(),S("div",Bc,[(a(),S(we,null,Ue(13,l=>d(h,{key:"seo-revision-list-item-"+l})),64))])}const Hc=M(Dc,[["render",Rc],["__scopeId","data-v-7b502c37"]]),yt="all-in-one-seo-pack",Uc={setup(){return{seoRevisionsStore:Xe()}},components:{CoreBlur:tt,CoreModal:Ie,CoreSettingsRow:Pe,SeoRevisionsList:Hc,SeoRevisionsUpsell:Ks,SvgRightArrowShort:It},data(){return{strings:{button:n("Open SEO Revisions",yt),description:n("With our powerful revisions feature for all your SEO data, never lose the exact SEO title or description (and more!) that helped you rank higher in search results and restore it back in a single click.",yt),seoRevisions:n("SEO Revisions",yt)}}}},Kc={key:0,class:"aioseo-seo-revisions-metabox"},Vc={key:1,class:"aioseo-seo-revisions-sidebar"},Fc={class:"aioseo-seo-revisions-sidebar__modal-body"},Nc={class:"description"};function zc(o,e,r,t,s,i){const h=p("seo-revisions-list"),l=p("core-blur"),f=p("seo-revisions-upsell"),x=p("core-modal"),T=p("svg-right-arrow-short"),P=p("base-button"),C=p("core-settings-row");return o.$root.$data.screenContext==="metabox"?(a(),S("div",Kc,[d(l,null,{default:c(()=>[d(h)]),_:1}),d(f,{"parent-component-context":"metabox"})])):o.$root.$data.screenContext==="sidebar"?(a(),S("div",Vc,[d(x,{show:t.seoRevisionsStore.modalOpenSidebar,classes:[],onClose:e[0]||(e[0]=v=>t.seoRevisionsStore.modalOpenSidebar=!1)},{headerTitle:c(()=>[A(m(s.strings.seoRevisions),1)]),body:c(()=>[u("div",Fc,[d(l,null,{default:c(()=>[d(h)]),_:1}),d(f,{"parent-component-context":"modal"})])]),_:1},8,["show"]),d(C,{align:""},{name:c(()=>[A(m(s.strings.seoRevisions),1)]),description:c(()=>[u("p",Nc,m(s.strings.description),1)]),content:c(()=>[d(P,{class:"gray small",onClick:e[1]||(e[1]=ue(v=>t.seoRevisionsStore.modalOpenSidebar=!0,["stop","exact"]))},{default:c(()=>[d(T,{width:"10"}),A(" "+m(s.strings.button),1)]),_:1})]),_:1})])):g("",!0)}const qt=M(Uc,[["render",zc],["__scopeId","data-v-eda67d56"]]),Gc={setup(){return{licenseStore:me()}},components:{SeoRevisions:qt,SeoRevisionsLite:qt},props:{parentComponentContext:String},data(){return{license:He}}},qc={class:"aioseo-seo-revisions aioseo-tab-content"};function jc(o,e,r,t,s,i){const h=p("seo-revisions",!0),l=p("seo-revisions-lite");return a(),S("div",qc,[!t.licenseStore.isUnlicensed&&s.license.hasCoreFeature("seo-revisions")?(a(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):(a(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"]))])}const Wc=M(Gc,[["render",jc],["__scopeId","data-v-463f2e4b"]]),Yc={__name:"CountBadge",setup(o){const{itemsTotalCount:e}=Qt(Xe()),r=ke(()=>99<e.value?"99+":e.value);return(t,s)=>k(e)?(a(),S("span",{key:0,class:Z(["aioseo-seo-revisions-count-badge",{"aioseo-seo-revisions-count-badge--ml":t.$root.$data.screenContext==="sidebar","aioseo-seo-revisions-count-badge--mr":t.$root.$data.screenContext==="metabox","aioseo-seo-revisions-count-badge--sm":99<k(e)}])},m(r.value),3)):g("",!0)}},$c={},Zc={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},Xc=u("path",{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"},null,-1),Jc=[Xc];function Qc(o,e){return a(),S("svg",Zc,Jc)}const ed=M($c,[["render",Qc]]),td={},od={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},sd=u("path",{d:"M7.00016 0.833334C3.32016 0.833334 0.333496 3.82 0.333496 7.5C0.333496 11.18 3.32016 14.1667 7.00016 14.1667C10.6802 14.1667 13.6668 11.18 13.6668 7.5C13.6668 3.82 10.6802 0.833334 7.00016 0.833334ZM7.66683 10.8333H6.3335V9.5H7.66683V10.8333ZM7.66683 8.16667H6.3335V4.16667H7.66683V8.16667Z",fill:"currentColor"},null,-1),rd=[sd];function nd(o,e){return a(),S("svg",od,rd)}const id=M(td,[["render",nd]]),ad={},ld={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},cd=u("path",{d:"M11 1.83325L10 0.833252L9 1.83325L8 0.833252L7 1.83325L6 0.833252L5 1.83325L4 0.833252L3 1.83325L2 0.833252L1 1.83325L0 0.833252V14.1666L1 13.1666L2 14.1666L3 13.1666L4 14.1666L5 13.1666L6 14.1666L7 13.1666L8 14.1666L9 13.1666L10 14.1666L11 13.1666L12 14.1666V0.833252L11 1.83325ZM1.33333 12.2266V2.77328H10.6667V12.2266H1.33333ZM10 10.8333V9.49992H2V10.8333H10ZM10 6.83325V8.16659H2V6.83325H10ZM10 5.49992V4.16658H2V5.49992H10Z",fill:"currentColor"},null,-1),dd=[cd];function ud(o,e){return a(),S("svg",ld,dd)}const pd=M(ad,[["render",ud]]),hd={},gd={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},md=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.26625 4.7737L1.73375 0.249954L0.5 1.4837L5.02375 6.00745L6.26625 4.7737ZM9.6875 0.249954L11.4725 2.03495L0.5 13.0162L1.73375 14.25L12.715 3.27745L14.5 5.06245V0.249954H9.6875ZM8.74251 9.71747L9.97626 8.48372L12.715 11.2225L14.5 9.43746V14.25H9.68751L11.4813 12.4562L8.74251 9.71747Z",fill:"currentColor"},null,-1),_d=[md];function yd(o,e){return a(),S("svg",gd,_d)}const fd=M(hd,[["render",yd]]),Me="all-in-one-seo-pack",Sd={setup(){const o=Xe(),e=be(!1),r=()=>{window.wp.data.select("core/editor").isSavingPost()&&!window.wp.data.select("core/editor").isAutosavingPost()&&(e.value=!0,setTimeout(()=>{o.fetch().finally(()=>{e.value=!1})},2500))},t=async()=>{await Ne(),window.wp.data.subscribe(()=>{e.value||r()})};return{keywordRankTrackerStore:Ze(),licenseStore:me(),postEditorStore:J(),redirectsStore:Mo(),rootStore:_e(),seoRevisionsStore:o,settingsStore:Te(),watchObjectRevisionsOnSavePost:t}},components:{Advanced:pr,Alert:yo,CoreMainTabs:De,CoreModal:Ie,General:So,KeywordRankTracker:ca,LinkAssistant:cl,ModalContent:Rl,Redirects:Jl,Schema:bc,SeoRevisions:Wc,SeoRevisionsCountBadge:Yc,Social:vo,SvgBackup:ed,SvgBuild:Rs,SvgCaret:Je,SvgCircleInformationSolid:id,SvgClose:vt,SvgLinkSuggestion:Mt,SvgReceipt:pd,SvgRedirectCrossedArrows:fd,SvgSettings:io,SvgShare:_o},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:n("Preview Snippet Editor",Me)},activeMainSidebarTab:"",isPageBuilderEditor:Re}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){Ho(this.postEditorStore.savePostState,250)}},"postEditorStore.currentPost.modalOpen"(o){this.activeTab!=="general"&&this.maybeResetActiveTab(o)},"postEditorStore.currentPost.linkAssistant.modalOpen"(o){this.maybeResetActiveTab(o)},"postEditorStore.currentPost.redirects.modalOpen"(o){this.maybeResetActiveTab(o)},"seoRevisionsStore.modalOpenSidebar"(o){this.maybeResetActiveTab(o)},"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(o){this.$root.$data.screenContext==="sidebar"&&this.activeMainSidebarTab!==o.tab&&(this.activeMainSidebarTab=o.tab,this.processChangeTab(o.tab))}}},computed:{tabs(){var e;const o=[{slug:"general",icon:"svg-settings",name:n("General",Me)},{slug:"social",icon:"svg-share",name:n("Social",Me)},{slug:"schema",icon:"svg-receipt",name:n("Schema",Me)},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:n("Redirects",Me),warning:0<this.redirectsStore.rows.filter(r=>!!r.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:n("SEO Revisions",Me),badge:"seo-revisions-count-badge"},{slug:"advanced",icon:"svg-build",name:n("Advanced",Me)}];return!this.rootStore.aioseo.integration&&!Re()&&this.postEditorStore.currentPost.context==="post"&&!((e=this.postEditorStore.currentPost.linkAssistant)!=null&&e.isExcludedPost)&&o.splice(3,0,{slug:"linkAssistant",icon:"svg-link-suggestion",name:n("Link Assistant",Me)}),o},initTab(){return this.getTabs[0].slug},getTabs(){return this.postEditorStore.currentPost.context==="term"||this.postEditorStore.currentPost.isWooCommercePageWithoutSchema?this.tabs.filter(o=>o.slug!=="schema"&&Le(this.getTabPermission(o.slug))):this.tabs.filter(o=>Le(this.getTabPermission(o.slug))?!0:o.slug==="general"&&(Le("aioseo_page_analysis")||Le(this.getTabPermission(o.slug))))}},methods:{async processChangeTab(o){if(o!==null&&typeof o=="object"){this.processChangeTab(o.main),this.$nextTick(()=>{this.settingsStore.changeTabSettings({setting:o.main,value:o.sub})});return}switch(this.$root.$data.screenContext){case"sidebar":document.querySelectorAll(".components-panel__header").forEach(e=>{const r=o===null?"sticky":"static";e.style.position=r});break;default:this.activeTab=o,this.settingsStore.changeTabSettings({setting:"main",value:o});break}if(this.$root.$data.screenContext==="sidebar"&&this.activeTab!==o)switch(this.activeTab=o,await this.$nextTick(),o){case"social":this.postEditorStore.currentPost.modalOpen||(this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0);break;case"linkAssistant":this.postEditorStore.currentPost.linkAssistant&&!this.postEditorStore.currentPost.linkAssistant.modalOpen&&(this.postEditorStore.currentPost.linkAssistant.modalOpen=!0);break;case"redirects":this.postEditorStore.currentPost.redirects&&!this.postEditorStore.currentPost.redirects.modalOpen&&(this.postEditorStore.currentPost.redirects.modalOpen=!0);break;case"seoRevisions":await this.$nextTick(),!this.seoRevisionsStore.modalOpenSidebar&&(this.licenseStore.isUnlicensed||this.seoRevisionsStore.itemsLimit===0)&&(this.seoRevisionsStore.modalOpenSidebar=!0);break}},maybeResetActiveTab(o){o||this.$root.$data.screenContext==="sidebar"&&this.$nextTick(()=>{this.processChangeTab(null)})},closeModal(){this.postEditorStore.currentPost.modalOpen=!1},getTabPermission(o){const e=this.tabs.find(r=>r.slug===o);return typeof e.permission<"u"?e.permission:`aioseo_page_${e.slug}_settings`},getTabName(o){const e=this.tabs.find(r=>r.slug===o);return e==null?void 0:e.name}},created(){switch(this.modal=qe()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.currentPost.modalOpen=!0,setTimeout(()=>{ft("aioseo-modaltab")},500)),this.$nextTick(()=>{this.settingsStore.metaBoxTabs.mainSidebar.tab&&this.processChangeTab(this.settingsStore.metaBoxTabs.mainSidebar.tab)}),window.aioseoBus.$on("standalone-update-post",o=>{Object.keys(o).forEach(e=>{this.postEditorStore.currentPost[e]=o[e]})}),this.$root.$data.screenContext){case"sidebar":this.activeTab=null;break;default:this.activeTab=qe()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{ft("aioseo-tab")},500);break}},beforeMount(){const o=document.querySelector(".interface-complementary-area__pin-unpin-item");o&&o!==null&&(o.style.display="block")},mounted(){$e()&&!this.licenseStore.isUnlicensed&&this.watchObjectRevisionsOnSavePost()}},kd={class:"aioseo-app aioseo-post-settings"},vd={key:0,class:"aioseo-sidepanel"},bd=["onClick"],wd={class:"name"},Cd={key:0,class:"aioseo-tab-title"};function Pd(o,e,r,t,s,i){const h=p("core-main-tabs"),l=p("svg-circle-information-solid"),f=p("svg-caret"),x=p("svg-close"),T=p("alert"),P=p("modal-content"),C=p("core-modal"),v=p("keyword-rank-tracker");return a(),S("div",kd,[o.$root.$data.screenContext!=="sidebar"?(a(),_(h,{key:0,tabs:i.getTabs,showSaveButton:!1,active:s.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=E=>i.processChangeTab(E))},{"var-tab-icon":c(({tab:E})=>[(a(),_(Se(E.icon),{class:Z([{warning:E.warning}])},null,8,["class"])),(a(),_(Se(E.badge)))]),_:1},8,["tabs","active"])):g("",!0),d(Ge,{name:"route-fade",mode:"out-in"},{default:c(()=>[o.$root.$data.screenContext==="sidebar"&&s.activeTab===null?(a(),S("div",vd,[(a(!0),S(we,null,Ue(i.getTabs,(E,q)=>(a(),S("a",{key:q,class:"aioseo-sidepanel-button",href:"#",onClick:ue(Y=>i.processChangeTab(E.slug),["prevent"])},[(a(),_(Se(E.icon),{class:"icon"})),u("div",wd,m(E.name),1),(a(),_(Se(E.badge))),E.warning?(a(),_(l,{key:0,width:"15",height:"15"})):g("",!0),d(f)],8,bd))),128))])):g("",!0)]),_:1}),d(Ge,{name:"route-fade",mode:"out-in"},{default:c(()=>[s.activeTab?(a(),S("div",{key:s.activeTab,class:Z(["aioseo-tab",{"is-page-builder":!!t.rootStore.aioseo.integration}])},[o.$root.$data.screenContext==="sidebar"?(a(),S("div",Cd,[u("span",null,m(i.getTabName(s.activeTab)),1),d(x,{onClick:e[1]||(e[1]=E=>i.processChangeTab(null))})])):g("",!0),o.$root.$data.screenContext==="sidebar"?(a(),_(T,{key:1})):g("",!0),(a(),_(Se(s.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=E=>i.processChangeTab(E))},null,32))],2)):g("",!0)]),_:1}),d(C,{show:t.postEditorStore.currentPost.modalOpen&&o.$root.$data.screenContext==="sidebar",onClose:i.closeModal,classes:["aioseo-post-settings-modal"],"modal-name":"preview-snippet-editor"},{headerTitle:c(()=>[A(m(s.strings.modalTitle),1)]),body:c(()=>[d(P)]),_:1},8,["show","onClose"]),d(v,{"modal-open":t.keywordRankTrackerStore.modalOpenPostEdit,"onUpdate:modalOpen":e[3]||(e[3]=E=>t.keywordRankTrackerStore.toggleModal({modal:"modalOpenPostEdit",open:E}))},null,8,["modal-open"])])}const Ed=M(Sd,[["render",Pd]]),Du={__name:"App",setup(o){Bo({scrollTimeout:1e3,scrollAndHighlightTimeout:2e3});const e=J();return(r,t)=>(a(),S("div",{onClick:t[0]||(t[0]=ue(()=>{},["stop"])),id:"main-settings-cont"},[r.$root.$data.screenContext!=="sidebar"?(a(),_(k(yo),{key:0})):g("",!0),k(e).currentPost.id?(a(),_(k(Ed),{key:1})):g("",!0)]))}};export{Du as _};